@umriss-ui/table 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/table.js CHANGED
@@ -2,20 +2,20 @@ import "./table.css";
2
2
  var Jt = Object.defineProperty;
3
3
  var Xt = (e, t, n) => t in e ? Jt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
4
  var P = (e, t, n) => Xt(e, typeof t != "symbol" ? t + "" : t, n);
5
- import { useState as j, useCallback as X, useMemo as $, useRef as re, useId as se, useContext as Ue, useSyncExternalStore as Re, createContext as kt, useLayoutEffect as W } from "react";
6
- import { DEFAULT_FORMATS as St, useVirtual as Qt, useFormats as ue, useWording as U, Checkbox as Ce, DateRangePicker as Zt, FormField as rt, NumberInput as st, Popover as Ct, Button as ee, TagGroup as Nt, Tag as xt, Menu as At, MenuItem as Fe, MenuSeparator as en, VisuallyHidden as Le, useDensityFor as Tt, AngleGlyph as tn, assess as nn, verdictWeight as Ee, Select as on, Input as rn, DEFAULT_WORDING as sn, Badge as Ie, useFreshness as an } from "@umriss-ui/core";
7
- import { jsx as l, jsxs as O, Fragment as Q } from "react/jsx-runtime";
5
+ import { useState as H, useCallback as X, useMemo as j, useRef as re, useId as ie, useContext as Ue, useSyncExternalStore as qe, createContext as St, useLayoutEffect as W } from "react";
6
+ import { DEFAULT_FORMATS as Ct, useVirtual as Qt, useFormats as ue, useWording as U, Checkbox as Ce, DateRangePicker as Zt, FormField as st, NumberInput as it, Popover as Nt, Button as ee, TagGroup as xt, Tag as At, Menu as Tt, MenuItem as Oe, MenuSeparator as en, VisuallyHidden as Re, useDensityFor as Ot, AngleGlyph as tn, assess as nn, verdictWeight as Ge, Select as on, Input as rn, DEFAULT_WORDING as sn, Badge as De, useFreshness as an } from "@umriss-ui/core";
7
+ import { jsx as l, jsxs as F, Fragment as Q } from "react/jsx-runtime";
8
8
  import { createPortal as ln } from "react-dom";
9
9
  function cn(e) {
10
- const [t, n] = j(/* @__PURE__ */ new Set()), o = X((u) => t.has(u), [t]), r = X((u) => {
10
+ const [t, n] = H(/* @__PURE__ */ new Set()), o = X((u) => t.has(u), [t]), r = X((u) => {
11
11
  n((h) => {
12
12
  const d = new Set(h);
13
13
  return d.has(u) ? d.delete(u) : d.add(u), d;
14
14
  });
15
- }, []), s = $(
15
+ }, []), s = j(
16
16
  () => e.length > 0 && e.every((u) => t.has(u)),
17
17
  [e, t]
18
- ), i = $(
18
+ ), i = j(
19
19
  () => !s && e.some((u) => t.has(u)),
20
20
  [e, t, s]
21
21
  ), a = X(() => {
@@ -27,19 +27,19 @@ function cn(e) {
27
27
  return { selected: t, isSelected: o, toggle: r, toggleAll: a, clear: c, allSelected: s, someSelected: i, count: t.size };
28
28
  }
29
29
  const Y = (e) => e == null || typeof e == "number" && Number.isNaN(e);
30
- function Me(e) {
30
+ function Le(e) {
31
31
  return Y(e) ? "empty" : typeof e == "string" ? "text" : typeof e == "number" ? "number" : typeof e == "boolean" ? "boolean" : e instanceof Date ? Number.isNaN(e.getTime()) ? "empty" : "date" : "other";
32
32
  }
33
33
  function Ft(e, t) {
34
34
  for (const n of e) {
35
- const o = Me(t(n));
35
+ const o = Le(t(n));
36
36
  if (o !== "empty") return o;
37
37
  }
38
38
  return "empty";
39
39
  }
40
- const Ot = (e, t) => t ?? e === "number";
40
+ const Je = (e, t) => t ?? e === "number";
41
41
  function ye(e, t, n, o) {
42
- switch (Me(e)) {
42
+ switch (Le(e)) {
43
43
  case "text":
44
44
  return e;
45
45
  case "number": {
@@ -56,10 +56,10 @@ function ye(e, t, n, o) {
56
56
  return null;
57
57
  }
58
58
  }
59
- function ze(e, t) {
59
+ function Ee(e, t) {
60
60
  if (!Y(e)) {
61
- if (t) return ze(t(e));
62
- switch (Me(e)) {
61
+ if (t) return Ee(t(e));
62
+ switch (Le(e)) {
63
63
  case "text":
64
64
  return e;
65
65
  case "number":
@@ -74,10 +74,10 @@ function ze(e, t) {
74
74
  }
75
75
  }
76
76
  const un = "ja", dn = "nein";
77
- function Rt(e, t) {
77
+ function qt(e, t) {
78
78
  if (!Y(e)) {
79
- if (t) return Rt(t(e));
80
- switch (Me(e)) {
79
+ if (t) return qt(t(e));
80
+ switch (Le(e)) {
81
81
  case "text":
82
82
  return e;
83
83
  case "number":
@@ -91,15 +91,15 @@ function Rt(e, t) {
91
91
  }
92
92
  }
93
93
  }
94
- const Je = "absent", ge = (e) => Y(e) ? Je : e instanceof Date ? `value:${e.getTime()}` : `value:${String(e)}`, it = (e) => e instanceof Date ? e.getTime() : typeof e == "number" && !Number.isNaN(e) ? e : void 0;
95
- function Xe(e, t) {
94
+ const Xe = "absent", pe = (e) => Y(e) ? Xe : e instanceof Date ? `value:${e.getTime()}` : `value:${String(e)}`, at = (e) => e instanceof Date ? e.getTime() : typeof e == "number" && !Number.isNaN(e) ? e : void 0;
95
+ function Qe(e, t) {
96
96
  const n = t.map(e.read).filter((c) => !Y(c) && !(c instanceof Date && Number.isNaN(c.getTime()))), o = e.aggregate;
97
97
  if (typeof o == "function") return o(n, t);
98
98
  if (o === "count") return n.length;
99
- if (o === "distinct") return new Set(n.map(ge)).size;
100
- const r = n.filter((c) => it(c) !== void 0);
99
+ if (o === "distinct") return new Set(n.map(pe)).size;
100
+ const r = n.filter((c) => at(c) !== void 0);
101
101
  if (r.length === 0) return;
102
- const s = r.map((c) => it(c)), i = r[0] instanceof Date, a = (c) => i ? new Date(c) : c;
102
+ const s = r.map((c) => at(c)), i = r[0] instanceof Date, a = (c) => i ? new Date(c) : c;
103
103
  switch (o) {
104
104
  case "sum":
105
105
  return s.reduce((c, u) => c + u, 0);
@@ -113,58 +113,58 @@ function Xe(e, t) {
113
113
  return [a(Math.min(...s)), a(Math.max(...s))];
114
114
  }
115
115
  }
116
- const Qe = 3, Se = (e) => {
116
+ const Ze = 3, Se = (e) => {
117
117
  if (!Y(e))
118
118
  return e instanceof Date ? e.getTime() : typeof e == "boolean" ? e ? 1 : 0 : typeof e == "number" ? e : String(e);
119
119
  };
120
- function Pe(e, t, n) {
120
+ function Ie(e, t, n) {
121
121
  const o = Se(e), r = Se(t);
122
122
  return o === void 0 || r === void 0 ? o === r ? 0 : o === void 0 ? 1 : -1 : typeof o == "number" && typeof r == "number" ? o - r : n(String(o), String(r));
123
123
  }
124
124
  function fn(e, t) {
125
- const n = t.compareText ?? St.compareText, o = (r, s, i) => {
126
- var b;
125
+ const n = t.compareText ?? Ct.compareText, o = (r, s, i) => {
126
+ var v;
127
127
  const a = /* @__PURE__ */ new Map(), c = t.levels[s];
128
128
  if (!c) return [];
129
129
  const u = /* @__PURE__ */ new Map();
130
- for (const g of r) {
131
- const y = c.value(g), S = ge(y);
130
+ for (const p of r) {
131
+ const _ = c.value(p), S = pe(_);
132
132
  let C = u.get(S);
133
133
  C || (C = {
134
134
  path: JSON.stringify([...i, S]),
135
- value: Y(y) ? void 0 : y,
135
+ value: Y(_) ? void 0 : _,
136
136
  level: s,
137
137
  rows: [],
138
138
  groups: [],
139
139
  aggregates: {}
140
- }, u.set(S, C), a.set(C, [...i, S])), C.rows.push(g);
140
+ }, u.set(S, C), a.set(C, [...i, S])), C.rows.push(p);
141
141
  }
142
- for (const g of u.values())
143
- for (const y of t.aggregates ?? []) g.aggregates[y.id] = Xe(y, g.rows);
144
- const h = (b = t.sort) == null ? void 0 : b.find(
145
- (g) => {
146
- var y;
147
- return g.column === c.id || ((y = t.aggregates) == null ? void 0 : y.some((S) => S.id === g.column));
142
+ for (const p of u.values())
143
+ for (const _ of t.aggregates ?? []) p.aggregates[_.id] = Qe(_, p.rows);
144
+ const h = (v = t.sort) == null ? void 0 : v.find(
145
+ (p) => {
146
+ var _;
147
+ return p.column === c.id || ((_ = t.aggregates) == null ? void 0 : _.some((S) => S.id === p.column));
148
148
  }
149
- ), d = (h == null ? void 0 : h.direction) === "desc" ? -1 : 1, m = h !== void 0 && h.column !== c.id ? h.column : void 0, w = (g) => {
150
- let y;
151
- for (const S of g.rows) {
149
+ ), d = (h == null ? void 0 : h.direction) === "desc" ? -1 : 1, m = h !== void 0 && h.column !== c.id ? h.column : void 0, b = (p) => {
150
+ let _;
151
+ for (const S of p.rows) {
152
152
  const C = c.order(S);
153
- Se(C) !== void 0 && (y === void 0 || Pe(C, y, n) < 0) && (y = C);
153
+ Se(C) !== void 0 && (_ === void 0 || Ie(C, _, n) < 0) && (_ = C);
154
154
  }
155
- return y;
156
- }, v = (g) => {
157
- if (m === void 0) return c.order ? w(g) : g.value;
158
- const y = g.aggregates[m];
159
- return Array.isArray(y) ? y[0] : y;
160
- }, p = [...u.values()].sort((g, y) => {
161
- if (g.value === void 0 || y.value === void 0) return Pe(g.value, y.value, n);
162
- const S = v(g), C = v(y), I = Pe(S, C, n);
163
- return Se(S) === void 0 || Se(C) === void 0 ? I : I * d;
155
+ return _;
156
+ }, w = (p) => {
157
+ if (m === void 0) return c.order ? b(p) : p.value;
158
+ const _ = p.aggregates[m];
159
+ return Array.isArray(_) ? _[0] : _;
160
+ }, g = [...u.values()].sort((p, _) => {
161
+ if (p.value === void 0 || _.value === void 0) return Ie(p.value, _.value, n);
162
+ const S = w(p), C = w(_), D = Ie(S, C, n);
163
+ return Se(S) === void 0 || Se(C) === void 0 ? D : D * d;
164
164
  });
165
- for (const g of p)
166
- g.groups = o(g.rows, s + 1, a.get(g));
167
- return p;
165
+ for (const p of g)
166
+ p.groups = o(p.rows, s + 1, a.get(p));
167
+ return g;
168
168
  };
169
169
  return o(e, 0, []);
170
170
  }
@@ -175,12 +175,12 @@ function hn(e, t) {
175
175
  };
176
176
  return o(e), t.filter((r) => n.has(r));
177
177
  }
178
- const gn = (e) => (t) => {
178
+ const pn = (e) => (t) => {
179
179
  if (!(t instanceof Date) || Number.isNaN(t.getTime())) return;
180
180
  const n = t.getFullYear(), o = t.getMonth(), r = t.getDate();
181
181
  return e === "year" ? new Date(n, 0, 1) : e === "month" ? new Date(n, o, 1) : e === "week" ? new Date(n, o, r - (t.getDay() + 6) % 7) : new Date(n, o, r);
182
182
  };
183
- function pn(e) {
183
+ function gn(e) {
184
184
  const t = new Date(e.getFullYear(), e.getMonth(), e.getDate() + 3 - (e.getDay() + 6) % 7), n = new Date(t.getFullYear(), 0, 4);
185
185
  return { week: 1 + Math.round((t.getTime() - n.getTime()) / 864e5 / 7 - ((n.getDay() + 6) % 7 - 3) / 7), year: t.getFullYear() };
186
186
  }
@@ -188,12 +188,12 @@ function mn(e, t, n, o) {
188
188
  if (e === "year") return String(t.getFullYear());
189
189
  if (e === "month") return n.month(t);
190
190
  if (e === "week") {
191
- const { week: r, year: s } = pn(t);
191
+ const { week: r, year: s } = gn(t);
192
192
  return o.calendarWeek(r, s);
193
193
  }
194
194
  return n.date(t);
195
195
  }
196
- function wn(e, t) {
196
+ function bn(e, t) {
197
197
  const n = [], o = (r, s) => {
198
198
  for (const i of r) {
199
199
  const a = t.has(i.path);
@@ -205,12 +205,12 @@ function wn(e, t) {
205
205
  };
206
206
  return o(e, []), n;
207
207
  }
208
- function bn(e, t, n) {
208
+ function vn(e, t, n) {
209
209
  const o = n > 0 ? n : e.length || 1, r = Math.max(1, Math.ceil(e.length / o)), s = Math.min(Math.max(1, t), r), i = e.slice((s - 1) * o, s * o);
210
- return { lines: Lt(i), page: s, pageCount: r };
210
+ return { lines: Rt(i), page: s, pageCount: r };
211
211
  }
212
- const Ze = (e) => e.flatMap((t) => t.kind === "row" ? [t.row] : []);
213
- function Lt(e) {
212
+ const et = (e) => e.flatMap((t) => t.kind === "row" ? [t.row] : []);
213
+ function Rt(e) {
214
214
  const t = e[0];
215
215
  if (!t) return [...e];
216
216
  const n = t.parents.map((r, s) => ({
@@ -221,14 +221,14 @@ function Lt(e) {
221
221
  })), o = t.kind === "row" && t.span && !t.first ? { ...t, first: !0, continued: !0 } : t;
222
222
  return [...n, o, ...e.slice(1)];
223
223
  }
224
- function et(e, t) {
224
+ function tt(e, t) {
225
225
  return t != null && t.length ? [
226
226
  ...t.map((n) => e.find((o) => o.id === n)).filter((n) => n !== void 0),
227
227
  ...e.filter((n) => !t.includes(n.id))
228
228
  ] : e;
229
229
  }
230
- const ve = (e) => e == null || typeof e == "number" && Number.isNaN(e), vn = (e, t) => typeof e == "number" && typeof t == "number" ? e - t : St.compareText(String(e), String(t));
231
- function tt(e, t, n) {
230
+ const we = (e) => e == null || typeof e == "number" && Number.isNaN(e), wn = (e, t) => typeof e == "number" && typeof t == "number" ? e - t : Ct.compareText(String(e), String(t));
231
+ function nt(e, t, n) {
232
232
  var x;
233
233
  const {
234
234
  search: o = "",
@@ -238,202 +238,202 @@ function tt(e, t, n) {
238
238
  pageSize: a,
239
239
  hidden: c,
240
240
  order: u
241
- } = n, h = et(t, u), d = c != null && c.length ? h.filter((A) => A.hideable === !1 || !c.includes(A.id)) : h, m = o.trim().toLowerCase(), w = t.filter((A) => A.searchable && A.value), v = (A) => !m || w.some((_) => {
242
- const F = _.value(A);
243
- return !ve(F) && String(F).toLowerCase().includes(m);
244
- }), p = e.filter((A) => v(A) && (r ? r(A) : !0)), b = Array.isArray(s) ? s : s ? [s] : [], g = b.map((A) => {
245
- const _ = t.find((V) => V.id === A.column);
246
- if (!_ || !_.compare && !_.value) return null;
247
- const F = A.direction === "asc" ? 1 : -1, R = _.compare, N = _.value;
248
- return N ? (V, z) => {
249
- const B = N(V), q = N(z);
250
- return ve(B) || ve(q) ? ve(B) === ve(q) ? 0 : ve(B) ? 1 : -1 : (R ? R(V, z) : vn(B, q)) * F;
251
- } : (V, z) => R(V, z) * F;
241
+ } = n, h = tt(t, u), d = c != null && c.length ? h.filter((A) => A.hideable === !1 || !c.includes(A.id)) : h, m = o.trim().toLowerCase(), b = t.filter((A) => A.searchable && A.value), w = (A) => !m || b.some((y) => {
242
+ const O = y.value(A);
243
+ return !we(O) && String(O).toLowerCase().includes(m);
244
+ }), g = e.filter((A) => w(A) && (r ? r(A) : !0)), v = Array.isArray(s) ? s : s ? [s] : [], p = v.map((A) => {
245
+ const y = t.find((M) => M.id === A.column);
246
+ if (!y || !y.compare && !y.value) return null;
247
+ const O = A.direction === "asc" ? 1 : -1, q = y.compare, N = y.value;
248
+ return N ? (M, E) => {
249
+ const I = N(M), K = N(E);
250
+ return we(I) || we(K) ? we(I) === we(K) ? 0 : we(I) ? 1 : -1 : (q ? q(M, E) : wn(I, K)) * O;
251
+ } : (M, E) => q(M, E) * O;
252
252
  }).filter((A) => A !== null);
253
- if (g.length > 0 && p.sort((A, _) => {
254
- for (const F of g) {
255
- const R = F(A, _);
256
- if (R !== 0) return R;
253
+ if (p.length > 0 && g.sort((A, y) => {
254
+ for (const O of p) {
255
+ const q = O(A, y);
256
+ if (q !== 0) return q;
257
257
  }
258
258
  return 0;
259
259
  }), (x = n.grouping) != null && x.levels.length) {
260
- const { folded: A, ..._ } = n.grouping, F = fn(p, { ..._, sort: b }), R = wn(F, A), N = bn(R, i, a ?? 0);
260
+ const { folded: A, ...y } = n.grouping, O = fn(g, { ...y, sort: v }), q = bn(O, A), N = vn(q, i, a ?? 0);
261
261
  return {
262
262
  columns: d,
263
- filtered: p,
264
- visible: Ze(N.lines),
265
- groups: F,
266
- lines: R,
263
+ filtered: g,
264
+ visible: et(N.lines),
265
+ groups: O,
266
+ lines: q,
267
267
  visibleLines: N.lines,
268
268
  page: N.page,
269
269
  pageCount: N.pageCount,
270
270
  columnCount: d.length
271
271
  };
272
272
  }
273
- const y = a && a > 0 ? a : p.length || 1, S = Math.max(1, Math.ceil(p.length / y)), C = Math.min(Math.max(1, i), S), I = p.slice((C - 1) * y, C * y);
273
+ const _ = a && a > 0 ? a : g.length || 1, S = Math.max(1, Math.ceil(g.length / _)), C = Math.min(Math.max(1, i), S), D = g.slice((C - 1) * _, C * _);
274
274
  return {
275
275
  columns: d,
276
- filtered: p,
277
- visible: I,
276
+ filtered: g,
277
+ visible: D,
278
278
  page: C,
279
279
  pageCount: S,
280
280
  columnCount: d.length
281
281
  };
282
282
  }
283
283
  function _n(e, t, n) {
284
- const { rowKey: o, filter: r, defaultSort: s = null, initialView: i, virtual: a, grouping: c } = n, [u, h] = j((i == null ? void 0 : i.search) ?? ""), [d, m] = j(() => {
284
+ const { rowKey: o, filter: r, defaultSort: s = null, initialView: i, virtual: a, grouping: c } = n, [u, h] = H((i == null ? void 0 : i.search) ?? ""), [d, m] = H(() => {
285
285
  var T;
286
286
  return (T = i == null ? void 0 : i.sort) != null && T.length ? [...i.sort] : s ? Array.isArray(s) ? [...s] : [s] : [];
287
- }), [w, v] = j((i == null ? void 0 : i.page) ?? 1), [p, b] = j(
287
+ }), [b, w] = H((i == null ? void 0 : i.page) ?? 1), [g, v] = H(
288
288
  (i == null ? void 0 : i.pageSize) ?? n.pageSize ?? 10
289
- ), [g, y] = j([]), [S, C] = j((i == null ? void 0 : i.hidden) ?? []), [I, x] = j((i == null ? void 0 : i.order) ?? []), [A, _] = j(() => {
289
+ ), [p, _] = H([]), [S, C] = H((i == null ? void 0 : i.hidden) ?? []), [D, x] = H((i == null ? void 0 : i.order) ?? []), [A, y] = H(() => {
290
290
  if (i != null && i.widths) return { ...i.widths };
291
291
  const T = {};
292
- for (const D of t)
293
- D.width !== void 0 && (T[D.id] = D.width);
292
+ for (const V of t)
293
+ V.width !== void 0 && (T[V.id] = V.width);
294
294
  return T;
295
- }), F = a ? 0 : p, R = $(
296
- () => tt(e, t, {
295
+ }), O = a ? 0 : g, q = j(
296
+ () => nt(e, t, {
297
297
  search: u,
298
298
  filter: r,
299
299
  sort: d,
300
- page: w,
301
- pageSize: F,
300
+ page: b,
301
+ pageSize: O,
302
302
  hidden: S,
303
- order: I,
303
+ order: D,
304
304
  grouping: c
305
305
  }),
306
- [e, t, u, r, d, w, F, S, I, c]
307
- ), N = Qt(a ? (R.lines ?? R.filtered).length : 0, {
306
+ [e, t, u, r, d, b, O, S, D, c]
307
+ ), N = Qt(a ? (q.lines ?? q.filtered).length : 0, {
308
308
  rowHeight: (a == null ? void 0 : a.rowHeight) ?? 0,
309
309
  overscan: a == null ? void 0 : a.overscan
310
- }), V = $(
311
- () => a && R.lines ? R.lines.slice(N.from, N.to) : R.visibleLines,
312
- [a, R.lines, R.visibleLines, N.from, N.to]
313
- ), z = $(
314
- () => a ? V ? Ze(V) : R.filtered.slice(N.from, N.to) : R.visible,
315
- [a, V, R.filtered, R.visible, N.from, N.to]
316
- ), B = $(() => R.filtered.map(o), [R.filtered, o]), q = cn(B), ie = X((T) => {
317
- h(T), v(1);
310
+ }), M = j(
311
+ () => a && q.lines ? q.lines.slice(N.from, N.to) : q.visibleLines,
312
+ [a, q.lines, q.visibleLines, N.from, N.to]
313
+ ), E = j(
314
+ () => a ? M ? et(M) : q.filtered.slice(N.from, N.to) : q.visible,
315
+ [a, M, q.filtered, q.visible, N.from, N.to]
316
+ ), I = j(() => q.filtered.map(o), [q.filtered, o]), K = cn(I), se = X((T) => {
317
+ h(T), w(1);
318
318
  }, []), ae = X((T) => {
319
- b(T), v(1);
320
- }, []), de = X((T, D = !1) => {
321
- m((E) => {
322
- const ne = E.find((he) => he.column === T);
323
- if (!D) {
324
- const he = E.length === 1 && (ne == null ? void 0 : ne.direction) === "asc" ? "desc" : "asc";
319
+ v(T), w(1);
320
+ }, []), de = X((T, V = !1) => {
321
+ m((G) => {
322
+ const ne = G.find((he) => he.column === T);
323
+ if (!V) {
324
+ const he = G.length === 1 && (ne == null ? void 0 : ne.direction) === "asc" ? "desc" : "asc";
325
325
  return [{ column: T, direction: he }];
326
326
  }
327
- return ne ? ne.direction === "asc" ? E.map(
327
+ return ne ? ne.direction === "asc" ? G.map(
328
328
  (he) => he.column === T ? { column: T, direction: "desc" } : he
329
- ) : E.filter((he) => he.column !== T) : [...E, { column: T, direction: "asc" }];
330
- }), v(1);
329
+ ) : G.filter((he) => he.column !== T) : [...G, { column: T, direction: "asc" }];
330
+ }), w(1);
331
331
  }, []), fe = X((T) => {
332
- y(
333
- (D) => D.includes(T) ? D.filter((E) => E !== T) : [...D, T]
332
+ _(
333
+ (V) => V.includes(T) ? V.filter((G) => G !== T) : [...V, T]
334
334
  );
335
- }, []), we = X(
336
- (T) => g.includes(T),
337
- [g]
338
- ), be = X((T) => {
335
+ }, []), be = X(
336
+ (T) => p.includes(T),
337
+ [p]
338
+ ), ve = X((T) => {
339
339
  C(
340
- (D) => D.includes(T) ? D.filter((E) => E !== T) : [...D, T]
340
+ (V) => V.includes(T) ? V.filter((G) => G !== T) : [...V, T]
341
341
  );
342
- }, []), ke = X((T, D) => {
343
- _((E) => {
344
- if (D === void 0) {
345
- if (!(T in E)) return E;
346
- const ne = { ...E };
342
+ }, []), ke = X((T, V) => {
343
+ y((G) => {
344
+ if (V === void 0) {
345
+ if (!(T in G)) return G;
346
+ const ne = { ...G };
347
347
  return delete ne[T], ne;
348
348
  }
349
- return { ...E, [T]: D };
349
+ return { ...G, [T]: V };
350
350
  });
351
351
  }, []), le = X(
352
352
  (T) => {
353
- var D;
354
- return (D = d.find((E) => E.column === T)) == null ? void 0 : D.direction;
353
+ var V;
354
+ return (V = d.find((G) => G.column === T)) == null ? void 0 : V.direction;
355
355
  },
356
356
  [d]
357
357
  ), te = X(
358
358
  (T) => {
359
359
  if (d.length < 2) return;
360
- const D = d.findIndex((E) => E.column === T);
361
- return D === -1 ? void 0 : D + 1;
360
+ const V = d.findIndex((G) => G.column === T);
361
+ return V === -1 ? void 0 : V + 1;
362
362
  },
363
363
  [d]
364
- ), k = $(
365
- () => et(t, I).filter((T) => T.label !== void 0 && T.hideable !== !1).map((T) => ({ id: T.id, label: T.label, visible: !S.includes(T.id) })),
366
- [t, I, S]
367
- ), L = n.pageSize ?? 10, K = $(() => {
364
+ ), k = j(
365
+ () => tt(t, D).filter((T) => T.label !== void 0 && T.hideable !== !1).map((T) => ({ id: T.id, label: T.label, visible: !S.includes(T.id) })),
366
+ [t, D, S]
367
+ ), R = n.pageSize ?? 10, $ = j(() => {
368
368
  const T = {};
369
- for (const D of t)
370
- D.width !== void 0 && (T[D.id] = D.width);
369
+ for (const V of t)
370
+ V.width !== void 0 && (T[V.id] = V.width);
371
371
  return T;
372
- }, [t]), H = $(() => {
372
+ }, [t]), z = j(() => {
373
373
  const T = {};
374
- for (const [D, E] of Object.entries(A))
375
- K[D] !== E && (T[D] = E);
374
+ for (const [V, G] of Object.entries(A))
375
+ $[V] !== G && (T[V] = G);
376
376
  return T;
377
- }, [A, K]), M = $(
377
+ }, [A, $]), L = j(
378
378
  () => s ? Array.isArray(s) ? s : [s] : [],
379
379
  [s]
380
- ), J = d.length === M.length && d.every(
381
- (T, D) => {
382
- var E, ne;
383
- return T.column === ((E = M[D]) == null ? void 0 : E.column) && T.direction === ((ne = M[D]) == null ? void 0 : ne.direction);
380
+ ), J = d.length === L.length && d.every(
381
+ (T, V) => {
382
+ var G, ne;
383
+ return T.column === ((G = L[V]) == null ? void 0 : G.column) && T.direction === ((ne = L[V]) == null ? void 0 : ne.direction);
384
384
  }
385
- ), Z = $(
385
+ ), Z = j(
386
386
  () => ({
387
387
  ...u ? { search: u } : {},
388
388
  ...d.length && !J ? { sort: d } : {},
389
389
  /* Without paging there is no page a view could carry - a page three in
390
390
  the view of a virtualised table would be a promise nobody redeems on
391
391
  opening. */
392
- ...!a && R.page > 1 ? { page: R.page } : {},
393
- ...!a && p !== L ? { pageSize: p } : {},
392
+ ...!a && q.page > 1 ? { page: q.page } : {},
393
+ ...!a && g !== R ? { pageSize: g } : {},
394
394
  ...S.length ? { hidden: S } : {},
395
- ...I.length ? { order: I } : {},
396
- ...Object.keys(H).length ? { widths: H } : {}
395
+ ...D.length ? { order: D } : {},
396
+ ...Object.keys(z).length ? { widths: z } : {}
397
397
  }),
398
398
  [
399
399
  a,
400
400
  u,
401
401
  d,
402
402
  J,
403
- R.page,
404
- p,
405
- L,
403
+ q.page,
404
+ g,
405
+ R,
406
406
  S,
407
- I,
408
- H
407
+ D,
408
+ z
409
409
  ]
410
410
  );
411
411
  return {
412
- ...R,
413
- visible: z,
414
- visibleLines: V,
412
+ ...q,
413
+ visible: E,
414
+ visibleLines: M,
415
415
  virtual: a ? N : void 0,
416
416
  view: Z,
417
417
  search: u,
418
- setSearch: ie,
418
+ setSearch: se,
419
419
  sort: d,
420
420
  toggleSort: de,
421
421
  sortDirectionOf: le,
422
422
  sortRankOf: te,
423
- setPage: v,
424
- pageSize: p,
423
+ setPage: w,
424
+ pageSize: g,
425
425
  setPageSize: ae,
426
- expanded: g,
426
+ expanded: p,
427
427
  toggleRow: fe,
428
- isExpanded: we,
428
+ isExpanded: be,
429
429
  hidden: S,
430
- toggleColumn: be,
430
+ toggleColumn: ve,
431
431
  columnChoices: k,
432
- order: I,
432
+ order: D,
433
433
  setOrder: x,
434
434
  widths: A,
435
435
  setWidth: ke,
436
- selection: q
436
+ selection: K
437
437
  };
438
438
  }
439
439
  function yn() {
@@ -441,11 +441,11 @@ function yn() {
441
441
  const e = import.meta;
442
442
  return typeof ((t = e.env) == null ? void 0 : t.DEV) == "boolean" ? e.env.DEV : typeof process < "u" && (process != null && process.env) ? process.env.NODE_ENV !== "production" : !1;
443
443
  }
444
- const Mt = yn(), at = /* @__PURE__ */ new Set();
445
- function pe(e, t) {
446
- !Mt || at.has(e) || (at.add(e), console.warn(`@umriss-ui/table: ${t}`));
444
+ const Lt = yn(), lt = /* @__PURE__ */ new Set();
445
+ function ge(e, t) {
446
+ !Lt || lt.has(e) || (lt.add(e), console.warn(`@umriss-ui/table: ${t}`));
447
447
  }
448
- const kn = "_frame_19w57_11 _text_1hv7a_23", Sn = "_children_19w57_23", Cn = "_scroll_19w57_29 _scroll_1hv7a_40", Nn = "_footerTarget_19w57_36", xn = "_table_19w57_40", An = "_th_19w57_48 _ring_1hv7a_65", Tn = "_sticky_19w57_63", Fn = "_td_19w57_71", On = "_rowHeader_19w57_83", Rn = "_compact_19w57_99", Ln = "_numeric_19w57_114", Mn = "_absent_19w57_126", Vn = "_striped_19w57_130", Dn = "_stickyCell_19w57_154", In = "_sortButton_19w57_166 _ring_1hv7a_65", Pn = "_sortIndicator_19w57_194", Bn = "_sortArrow_19w57_201", Gn = "_sortArrowDesc_19w57_205", En = "_sortActive_19w57_213", zn = "_sortRank_19w57_219", Hn = "_thFlex_19w57_227", jn = "_footerKind_19w57_248", $n = "_emptyCell_19w57_256", Kn = "_empty_19w57_256", Wn = "_emptyTitle_19w57_272", qn = "_skeleton_19w57_279", Yn = "_toolbar_19w57_307 _text_1hv7a_23", Un = "_toolbarGroup_19w57_321", Jn = "_toolbarInfo_19w57_338", Xn = "_pagination_19w57_344 _text_1hv7a_23", Qn = "_paginationControls_19w57_357", Zn = "_pageSize_19w57_364", eo = "_paginationStatus_19w57_376", to = "_filterButton_19w57_385 _ring_1hv7a_65", no = "_filterActive_19w57_412", oo = "_filterPanel_19w57_417", ro = "_filterContent_19w57_430 _scroll_1hv7a_40", so = "_filterFooter_19w57_441", io = "_filterLabel_19w57_455", ao = "_filterValue_19w57_465", lo = "_filteredCount_19w57_471", co = "_rangeFields_19w57_482", uo = "_rangePeriod_19w57_492", fo = "_conditions_19w57_498", ho = "_conditionButton_19w57_504", go = "_condition_19w57_498", po = "_columnsPanel_19w57_528", mo = "_columnsList_19w57_536", wo = "_columnsEntry_19w57_545", bo = "_move_19w57_557", vo = "_groupingChoice_19w57_595", _o = "_groupingHeading_19w57_601", yo = "_groupingOptions_19w57_610", ko = "_groupingOption_19w57_610 _ring_1hv7a_65", So = "_groupingLevel_19w57_653", Co = "_groupingTag_19w57_658", No = "_groupingTrigger_19w57_665", xo = "_groupingPrefix_19w57_670", Ao = "_groupingPath_19w57_675", To = "_groupingSeparator_19w57_679", Fo = "_groupHeader_19w57_696", Oo = "_spanCell_19w57_737", Ro = "_groupFolded_19w57_786", Lo = "_spanValue_19w57_790", Mo = "_groupLabel_19w57_791", Vo = "_spanText_19w57_803", Do = "_groupValue_19w57_804", Io = "_groupCount_19w57_811", Po = "_continued_19w57_825", Bo = "_spanSelect_19w57_856", Go = "_fold_19w57_870", Eo = "_foldClosed_19w57_906", zo = "_foldedCount_19w57_916", Ho = "_shareHost_19w57_924", jo = "_shareBar_19w57_931", $o = "_expander_19w57_943", Ko = "_expanderOpen_19w57_978", Wo = "_detailRow_19w57_982", qo = "_detailCell_19w57_982", Yo = "_actionsCell_19w57_990", Uo = "_actions_19w57_990", Jo = "_grip_19w57_1018", Xo = "_virtualBody_19w57_1059", Qo = "_virtualRow_19w57_1071", Zo = "_fillerRow_19w57_1076", er = "_control_19w57_145", f = {
448
+ const kn = "_frame_psm0q_11 _text_1hv7a_23", Sn = "_children_psm0q_23", Cn = "_scroll_psm0q_29 _scroll_1hv7a_40", Nn = "_footerTarget_psm0q_36", xn = "_table_psm0q_40", An = "_th_psm0q_48 _ring_1hv7a_65", Tn = "_sticky_psm0q_63", On = "_td_psm0q_71", Fn = "_rowHeader_psm0q_83", qn = "_compact_psm0q_99", Rn = "_numeric_psm0q_132", Ln = "_absent_psm0q_144", Mn = "_striped_psm0q_148", Vn = "_stickyCell_psm0q_172", Dn = "_sortButton_psm0q_187 _ring_1hv7a_65", In = "_sortIndicator_psm0q_212", Pn = "_sortArrow_psm0q_219", Bn = "_sortArrowDesc_psm0q_223", Gn = "_sortActive_psm0q_231", En = "_sortRank_psm0q_237", zn = "_thFlex_psm0q_245", Hn = "_footerKind_psm0q_270", jn = "_emptyCell_psm0q_278", $n = "_empty_psm0q_278", Kn = "_emptyTitle_psm0q_294", Wn = "_skeleton_psm0q_303", Yn = "_toolbar_psm0q_335 _text_1hv7a_23", Un = "_toolbarGroup_psm0q_349", Jn = "_toolbarInfo_psm0q_366", Xn = "_pagination_psm0q_372 _text_1hv7a_23", Qn = "_paginationControls_psm0q_385", Zn = "_pageSize_psm0q_392", eo = "_paginationStatus_psm0q_404", to = "_filterButton_psm0q_413 _ring_1hv7a_65", no = "_filterActive_psm0q_440", oo = "_filterPanel_psm0q_445", ro = "_filterContent_psm0q_458 _scroll_1hv7a_40", so = "_filterFooter_psm0q_469", io = "_filterLabel_psm0q_483", ao = "_filterValue_psm0q_493", lo = "_filteredCount_psm0q_499", co = "_rangeFields_psm0q_510", uo = "_rangePeriod_psm0q_520", fo = "_conditions_psm0q_526", ho = "_conditionButton_psm0q_532", po = "_condition_psm0q_526", go = "_columnsPanel_psm0q_556", mo = "_columnsList_psm0q_564", bo = "_columnsEntry_psm0q_573", vo = "_move_psm0q_585", wo = "_groupingChoice_psm0q_623", _o = "_groupingHeading_psm0q_629", yo = "_groupingOptions_psm0q_638", ko = "_groupingOption_psm0q_638 _ring_1hv7a_65", So = "_groupingLevel_psm0q_681", Co = "_groupingTag_psm0q_686", No = "_groupingTrigger_psm0q_693", xo = "_groupingPrefix_psm0q_698", Ao = "_groupingPath_psm0q_703", To = "_groupingSeparator_psm0q_707", Oo = "_groupHeader_psm0q_724", Fo = "_spanCell_psm0q_765", qo = "_groupFolded_psm0q_814", Ro = "_spanValue_psm0q_818", Lo = "_groupLabel_psm0q_819", Mo = "_spanText_psm0q_831", Vo = "_groupValue_psm0q_832", Do = "_groupCount_psm0q_839", Io = "_continued_psm0q_853", Po = "_spanSelect_psm0q_884", Bo = "_fold_psm0q_898", Go = "_foldClosed_psm0q_934", Eo = "_foldedCount_psm0q_944", zo = "_shareHost_psm0q_952", Ho = "_shareBar_psm0q_959", jo = "_expander_psm0q_971", $o = "_expanderOpen_psm0q_1006", Ko = "_detailRow_psm0q_1010", Wo = "_detailCell_psm0q_1010", Yo = "_actionsCell_psm0q_1018", Uo = "_actions_psm0q_1018", Jo = "_grip_psm0q_1046", Xo = "_virtualBody_psm0q_1087", Qo = "_virtualRow_psm0q_1103", Zo = "_fillerRow_psm0q_1127", er = "_control_psm0q_163", f = {
449
449
  frame: kn,
450
450
  children: Sn,
451
451
  scroll: Cn,
@@ -453,25 +453,25 @@ const kn = "_frame_19w57_11 _text_1hv7a_23", Sn = "_children_19w57_23", Cn = "_s
453
453
  table: xn,
454
454
  th: An,
455
455
  sticky: Tn,
456
- td: Fn,
457
- rowHeader: On,
458
- compact: Rn,
459
- numeric: Ln,
460
- absent: Mn,
461
- striped: Vn,
462
- stickyCell: Dn,
463
- sortButton: In,
464
- sortIndicator: Pn,
465
- sortArrow: Bn,
466
- sortArrowDesc: Gn,
467
- sortActive: En,
468
- sortRank: zn,
469
- thFlex: Hn,
470
- footerKind: jn,
471
- emptyCell: $n,
472
- empty: Kn,
473
- emptyTitle: Wn,
474
- skeleton: qn,
456
+ td: On,
457
+ rowHeader: Fn,
458
+ compact: qn,
459
+ numeric: Rn,
460
+ absent: Ln,
461
+ striped: Mn,
462
+ stickyCell: Vn,
463
+ sortButton: Dn,
464
+ sortIndicator: In,
465
+ sortArrow: Pn,
466
+ sortArrowDesc: Bn,
467
+ sortActive: Gn,
468
+ sortRank: En,
469
+ thFlex: zn,
470
+ footerKind: Hn,
471
+ emptyCell: jn,
472
+ empty: $n,
473
+ emptyTitle: Kn,
474
+ skeleton: Wn,
475
475
  toolbar: Yn,
476
476
  toolbarGroup: Un,
477
477
  toolbarInfo: Jn,
@@ -491,12 +491,12 @@ const kn = "_frame_19w57_11 _text_1hv7a_23", Sn = "_children_19w57_23", Cn = "_s
491
491
  rangePeriod: uo,
492
492
  conditions: fo,
493
493
  conditionButton: ho,
494
- condition: go,
495
- columnsPanel: po,
494
+ condition: po,
495
+ columnsPanel: go,
496
496
  columnsList: mo,
497
- columnsEntry: wo,
498
- move: bo,
499
- groupingChoice: vo,
497
+ columnsEntry: bo,
498
+ move: vo,
499
+ groupingChoice: wo,
500
500
  groupingHeading: _o,
501
501
  groupingOptions: yo,
502
502
  groupingOption: ko,
@@ -506,25 +506,25 @@ const kn = "_frame_19w57_11 _text_1hv7a_23", Sn = "_children_19w57_23", Cn = "_s
506
506
  groupingPrefix: xo,
507
507
  groupingPath: Ao,
508
508
  groupingSeparator: To,
509
- groupHeader: Fo,
510
- spanCell: Oo,
511
- groupFolded: Ro,
512
- spanValue: Lo,
513
- groupLabel: Mo,
514
- spanText: Vo,
515
- groupValue: Do,
516
- groupCount: Io,
517
- continued: Po,
518
- spanSelect: Bo,
519
- fold: Go,
520
- foldClosed: Eo,
521
- foldedCount: zo,
522
- shareHost: Ho,
523
- shareBar: jo,
524
- expander: $o,
525
- expanderOpen: Ko,
526
- detailRow: Wo,
527
- detailCell: qo,
509
+ groupHeader: Oo,
510
+ spanCell: Fo,
511
+ groupFolded: qo,
512
+ spanValue: Ro,
513
+ groupLabel: Lo,
514
+ spanText: Mo,
515
+ groupValue: Vo,
516
+ groupCount: Do,
517
+ continued: Io,
518
+ spanSelect: Po,
519
+ fold: Bo,
520
+ foldClosed: Go,
521
+ foldedCount: Eo,
522
+ shareHost: zo,
523
+ shareBar: Ho,
524
+ expander: jo,
525
+ expanderOpen: $o,
526
+ detailRow: Ko,
527
+ detailCell: Wo,
528
528
  actionsCell: Yo,
529
529
  actions: Uo,
530
530
  grip: Jo,
@@ -537,14 +537,14 @@ function Xs(e) {
537
537
  return e;
538
538
  }
539
539
  const Ne = /* @__PURE__ */ new WeakMap();
540
- function Vt(e, t) {
540
+ function Mt(e, t) {
541
541
  return Ne.set(e, t), e;
542
542
  }
543
543
  const tr = (e) => Ne.has(e);
544
544
  function me(e) {
545
- return e === "list" ? ir : e === "range" ? gr : typeof e == "object" && e !== null ? e : void 0;
545
+ return e === "list" ? ir : e === "range" ? pr : typeof e == "object" && e !== null ? e : void 0;
546
546
  }
547
- function Dt(e, t) {
547
+ function Vt(e, t) {
548
548
  if (t == null) return "empty";
549
549
  const n = Ne.get(e);
550
550
  return n ? n.isCondition(t) ? n.isEmpty(t) ? "empty" : "effective" : "foreign" : "effective";
@@ -557,8 +557,8 @@ function or(e, t, n) {
557
557
  const o = Ne.get(e);
558
558
  return o ? o.describeIn(t, n) : e.describe(t);
559
559
  }
560
- const lt = (e) => e instanceof Date ? e.getTime() : typeof e == "number" ? e : void 0, It = (e) => (t, n) => {
561
- const o = lt(t.value), r = lt(n.value);
560
+ const ct = (e) => e instanceof Date ? e.getTime() : typeof e == "number" ? e : void 0, Dt = (e) => (t, n) => {
561
+ const o = ct(t.value), r = ct(n.value);
562
562
  return o !== void 0 && r !== void 0 ? o - r : e.compareText(t.text, n.text);
563
563
  };
564
564
  function rr(e, t, n) {
@@ -573,14 +573,14 @@ function rr(e, t, n) {
573
573
  const c = a instanceof Date ? `date:${a.getTime()}` : typeof a == "object" || typeof a == "function" ? a : `${typeof a}:${String(a)}`;
574
574
  o.has(c) || o.set(c, a);
575
575
  }
576
- return { values: [...o.values()].map((i) => ({ value: i, text: String(i) })).sort(It(n)).map(({ value: i }) => i), absent: r };
576
+ return { values: [...o.values()].map((i) => ({ value: i, text: String(i) })).sort(Dt(n)).map(({ value: i }) => i), absent: r };
577
577
  }
578
- const ct = /* @__PURE__ */ new WeakMap();
579
- function He(e) {
580
- let t = ct.get(e);
581
- return t || (t = new Set(e.map(ge)), ct.set(e, t)), t;
578
+ const ut = /* @__PURE__ */ new WeakMap();
579
+ function ze(e) {
580
+ let t = ut.get(e);
581
+ return t || (t = new Set(e.map(pe)), ut.set(e, t)), t;
582
582
  }
583
- const je = (e, t) => Y(e) ? t.wording.cellAbsentValue : ye(e, t.format, t.formats, t.wording) ?? String(e);
583
+ const He = (e, t) => Y(e) ? t.wording.cellAbsentValue : ye(e, t.format, t.formats, t.wording) ?? String(e);
584
584
  function sr({
585
585
  condition: e,
586
586
  setCondition: t,
@@ -588,13 +588,13 @@ function sr({
588
588
  absentOccurs: o = !1,
589
589
  format: r
590
590
  }) {
591
- const s = ue(), i = U(), a = $(() => e ?? [], [e]), c = $(() => {
592
- const d = { formats: s, wording: i, format: r }, m = n.map((b) => ({ key: ge(b), text: je(b, d), value: b }));
593
- m.sort(It(s));
594
- const w = new Set(m.map((b) => b.key)), v = a.filter((b) => !Y(b) && !w.has(ge(b))).map((b) => ({ key: ge(b), text: je(b, d), value: b })), p = o || a.some(Y) ? [{ key: Je, text: i.cellAbsentValue, value: null }] : [];
595
- return [...m, ...v, ...p];
596
- }, [n, a, o, r, s, i]), u = He(a), h = (d) => {
597
- const m = u.has(d.key) ? a.filter((w) => ge(w) !== d.key) : [...a, d.value];
591
+ const s = ue(), i = U(), a = j(() => e ?? [], [e]), c = j(() => {
592
+ const d = { formats: s, wording: i, format: r }, m = n.map((v) => ({ key: pe(v), text: He(v, d), value: v }));
593
+ m.sort(Dt(s));
594
+ const b = new Set(m.map((v) => v.key)), w = a.filter((v) => !Y(v) && !b.has(pe(v))).map((v) => ({ key: pe(v), text: He(v, d), value: v })), g = o || a.some(Y) ? [{ key: Xe, text: i.cellAbsentValue, value: null }] : [];
595
+ return [...m, ...w, ...g];
596
+ }, [n, a, o, r, s, i]), u = ze(a), h = (d) => {
597
+ const m = u.has(d.key) ? a.filter((b) => pe(b) !== d.key) : [...a, d.value];
598
598
  t(m.length > 0 ? m : null);
599
599
  };
600
600
  return /* @__PURE__ */ l("div", { className: f.filterContent, children: c.map((d) => /* @__PURE__ */ l(
@@ -607,20 +607,20 @@ function sr({
607
607
  d.key
608
608
  )) });
609
609
  }
610
- const ir = Vt(
610
+ const ir = Mt(
611
611
  {
612
- matches: (e, t) => He(t).has(ge(e)),
612
+ matches: (e, t) => ze(t).has(pe(e)),
613
613
  Input: sr,
614
614
  describe: (e) => e.map((t) => Y(t) ? "–" : String(t)).join(", ")
615
615
  },
616
616
  {
617
617
  isCondition: (e) => Array.isArray(e),
618
618
  isEmpty: (e) => e.length === 0,
619
- absentMatches: (e) => He(e).has(Je),
619
+ absentMatches: (e) => ze(e).has(Xe),
620
620
  /* From three values on the first two and how many more: a condition is one
621
621
  line in the table toolbar, not a list. */
622
622
  describeIn: (e, t) => {
623
- const n = e.map((r) => je(r, t));
623
+ const n = e.map((r) => He(r, t));
624
624
  if (n.length <= 2) return n.join(", ");
625
625
  const o = n.length - 2;
626
626
  return `${n.slice(0, 2).join(", ")} ${t.wording.moreValues(o, t.formats.count(o))}`;
@@ -628,7 +628,7 @@ const ir = Vt(
628
628
  }
629
629
  ), ar = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime(), lr = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate() + 1).getTime(), _e = (e) => typeof e == "number" && Number.isFinite(e), ce = (e) => e instanceof Date && !Number.isNaN(e.getTime()), cr = (e) => ce(e) ? ar(e) : _e(e) ? e : void 0, ur = (e) => ce(e) ? { value: lr(e), open: !0 } : _e(e) ? { value: e, open: !1 } : void 0, Ae = (e, t) => ce(e) ? t.formats.date(e) : ye(e, t.format, t.formats, t.wording) ?? String(e);
630
630
  function dr({ condition: e, setCondition: t }) {
631
- const n = U(), [o, r] = j(null), s = o !== null, i = o ? o.from : _e(e == null ? void 0 : e.from) ? e.from : null, a = o ? o.to : _e(e == null ? void 0 : e.to) ? e.to : null, c = (u, h) => {
631
+ const n = U(), [o, r] = H(null), s = o !== null, i = o ? o.from : _e(e == null ? void 0 : e.from) ? e.from : null, a = o ? o.to : _e(e == null ? void 0 : e.to) ? e.to : null, c = (u, h) => {
632
632
  const d = { from: i, to: a, [u]: h };
633
633
  if (d.from !== null && d.to !== null && d.from > d.to) {
634
634
  r(d);
@@ -643,9 +643,9 @@ function dr({ condition: e, setCondition: t }) {
643
643
  ...d.to !== null ? { to: d.to } : {}
644
644
  });
645
645
  };
646
- return /* @__PURE__ */ O("div", { className: f.rangeFields, children: [
647
- /* @__PURE__ */ l(rt, { label: n.filterFrom, children: /* @__PURE__ */ l(st, { size: "sm", value: i, invalid: s, onChange: (u) => c("from", u) }) }),
648
- /* @__PURE__ */ l(rt, { label: n.filterTo, error: s ? n.rangeInvalid : void 0, children: /* @__PURE__ */ l(st, { size: "sm", value: a, onChange: (u) => c("to", u) }) })
646
+ return /* @__PURE__ */ F("div", { className: f.rangeFields, children: [
647
+ /* @__PURE__ */ l(st, { label: n.filterFrom, children: /* @__PURE__ */ l(it, { size: "sm", value: i, invalid: s, onChange: (u) => c("from", u) }) }),
648
+ /* @__PURE__ */ l(st, { label: n.filterTo, error: s ? n.rangeInvalid : void 0, children: /* @__PURE__ */ l(it, { size: "sm", value: a, onChange: (u) => c("to", u) }) })
649
649
  ] });
650
650
  }
651
651
  function fr({ condition: e, setCondition: t }) {
@@ -663,7 +663,7 @@ function fr({ condition: e, setCondition: t }) {
663
663
  function hr(e) {
664
664
  return e.kind === "date" ? /* @__PURE__ */ l(fr, { ...e }) : /* @__PURE__ */ l(dr, { ...e });
665
665
  }
666
- const gr = Vt(
666
+ const pr = Mt(
667
667
  {
668
668
  matches: (e, t) => {
669
669
  const n = ce(e) ? e.getTime() : _e(e) ? e : void 0;
@@ -693,7 +693,7 @@ const gr = Vt(
693
693
  }
694
694
  }
695
695
  );
696
- class Be {
696
+ class Pe {
697
697
  constructor(t) {
698
698
  P(this, "entries", /* @__PURE__ */ new Map());
699
699
  /** Keys in the order of the running pass. */
@@ -720,7 +720,7 @@ class Be {
720
720
  return this.dom = n, this.pass = n, o !== this.ordered().map((r) => r.key).join("|");
721
721
  }
722
722
  }
723
- const ut = (e) => JSON.stringify([
723
+ const dt = (e) => JSON.stringify([
724
724
  e.id,
725
725
  e.label,
726
726
  typeof e.value == "string" ? e.value : "ƒ",
@@ -742,13 +742,13 @@ const ut = (e) => JSON.stringify([
742
742
  !!e.ownGroupValue,
743
743
  e.group,
744
744
  e.groupable
745
- ]), dt = (e, t) => e == null ? void 0 : e[t];
746
- class pr {
745
+ ]), ft = (e, t) => e == null ? void 0 : e[t];
746
+ class gr {
747
747
  constructor() {
748
- P(this, "columns", new Be("data-umriss-column"));
749
- P(this, "actions", new Be("data-umriss-action"));
748
+ P(this, "columns", new Pe("data-umriss-column"));
749
+ P(this, "actions", new Pe("data-umriss-action"));
750
750
  /** The group keys: values to group by that are no column. */
751
- P(this, "groupKeys", new Be("data-umriss-groupkey"));
751
+ P(this, "groupKeys", new Pe("data-umriss-groupkey"));
752
752
  P(this, "signatures", /* @__PURE__ */ new Map());
753
753
  /** The row detail: the presentation of the `RowDetail` that registered last. */
754
754
  P(this, "detail", null);
@@ -819,7 +819,7 @@ class pr {
819
819
  /** A column registers during the render. Idempotent: the same spec changes no
820
820
  version. */
821
821
  registerColumn(t, n) {
822
- const o = this.columns.entries.get(t), r = ut(n);
822
+ const o = this.columns.entries.get(t), r = dt(n);
823
823
  if (o) {
824
824
  const s = o.spec;
825
825
  this.signatures.get(t) !== r && this.structure++, (s.value !== n.value || s.ownSortValue !== n.ownSortValue || s.ownGroupValue !== n.ownGroupValue) && this.values++, (s.presentation !== n.presentation || s.ownExportValue !== n.ownExportValue || s.aggregate !== n.aggregate) && this.presentation++, o.spec = n;
@@ -829,7 +829,7 @@ class pr {
829
829
  spec: n,
830
830
  read: (i) => {
831
831
  const a = s.spec.value;
832
- return typeof a == "string" ? dt(i, a) : a(i);
832
+ return typeof a == "string" ? ft(i, a) : a(i);
833
833
  }
834
834
  };
835
835
  this.columns.entries.set(t, s), this.structure++;
@@ -848,8 +848,8 @@ class pr {
848
848
  const t = /* @__PURE__ */ new Set();
849
849
  let n = 0;
850
850
  for (const { spec: o } of this.columns.entries.values())
851
- t.has(o.id) && pe(`id:${o.id}`, `Two columns carry the id "${o.id}". The second one is passed over.`), t.add(o.id), o.rowHeader && n++;
852
- n > 1 && pe("rowHeader", "More than one column is `rowHeader`. A table has at most one row header; the first one holds.");
851
+ t.has(o.id) && ge(`id:${o.id}`, `Two columns carry the id "${o.id}". The second one is passed over.`), t.add(o.id), o.rowHeader && n++;
852
+ n > 1 && ge("rowHeader", "More than one column is `rowHeader`. A table has at most one row header; the first one holds.");
853
853
  }
854
854
  /** The table says during the render whether its row header sticks. Idempotent. */
855
855
  setStickyRowHeader(t) {
@@ -877,7 +877,7 @@ class pr {
877
877
  /* --- Group keys and the grouping ---------------------------------------------- */
878
878
  /** A group key registers during the render, as a column does. Idempotent. */
879
879
  registerGroupKey(t, n) {
880
- const o = this.groupKeys.entries.get(t), r = ut(n);
880
+ const o = this.groupKeys.entries.get(t), r = dt(n);
881
881
  if (o)
882
882
  this.signatures.get(t) !== r && this.structure++, (o.spec.value !== n.value || o.spec.ownGroupValue !== n.ownGroupValue) && this.values++, o.spec = n;
883
883
  else {
@@ -886,7 +886,7 @@ class pr {
886
886
  spec: n,
887
887
  read: (i) => {
888
888
  const a = s.spec.value;
889
- return typeof a == "string" ? dt(i, a) : a(i);
889
+ return typeof a == "string" ? ft(i, a) : a(i);
890
890
  }
891
891
  };
892
892
  this.groupKeys.entries.set(t, s), this.structure++;
@@ -929,7 +929,7 @@ class pr {
929
929
  each once. */
930
930
  effectiveGrouping(t, n) {
931
931
  const o = new Set(this.groupingEntries(n).map((r) => r.spec.id));
932
- return [...new Set(t)].filter((r) => o.has(r)).slice(0, Qe);
932
+ return [...new Set(t)].filter((r) => o.has(r)).slice(0, Ze);
933
933
  }
934
934
  /** The levels and aggregates for the model - the same identity as long as
935
935
  nothing changed that they read. */
@@ -943,10 +943,10 @@ class pr {
943
943
  const h = c.read(u);
944
944
  if (h == null) return;
945
945
  const { ownGroupValue: d, group: m } = c.spec;
946
- return d ? d(h) : m ? gn(m)(h) : h;
946
+ return d ? d(h) : m ? pn(m)(h) : h;
947
947
  },
948
948
  /* A value of one's own is a name; its groups stand by what they hold. */
949
- order: c.spec.ownGroupValue ? (u) => ze(c.read(u), c.spec.ownSortValue) : void 0
949
+ order: c.spec.ownGroupValue ? (u) => Ee(c.read(u), c.spec.ownSortValue) : void 0
950
950
  })), i = this.orderedColumns().filter((c) => c.spec.aggregate !== void 0).map(
951
951
  (c) => ({
952
952
  id: c.spec.id,
@@ -990,14 +990,14 @@ class pr {
990
990
  if (((i = this.modelCache) == null ? void 0 : i.key) === r && this.modelCache.rows === t && this.modelCache.formats === n)
991
991
  return this.modelCache.columns;
992
992
  const s = o.map((a) => {
993
- const { spec: c } = a, u = this.kindOf(a, t), h = this.isSortable(a, t), d = c.searchable ?? u === "text", m = (w) => ze(a.read(w), c.ownSortValue);
993
+ const { spec: c } = a, u = this.kindOf(a, t), h = this.isSortable(a, t), d = c.searchable ?? u === "text", m = (b) => Ee(a.read(b), c.ownSortValue);
994
994
  return {
995
995
  id: c.id,
996
996
  label: c.label,
997
997
  value: h || d ? m : void 0,
998
998
  /* Text sorts with the provider's comparison, not with the built-in
999
999
  German one (spec, the table of defaults). */
1000
- compare: u === "text" && !c.ownSortValue ? (w, v) => n.compareText(String(m(w)), String(m(v))) : void 0,
1000
+ compare: u === "text" && !c.ownSortValue ? (b, w) => n.compareText(String(m(b)), String(m(w))) : void 0,
1001
1001
  searchable: d,
1002
1002
  hideable: !c.rowHeader,
1003
1003
  resizable: c.resizable,
@@ -1033,7 +1033,7 @@ class pr {
1033
1033
  hidden: o.hidden,
1034
1034
  order: o.order,
1035
1035
  grouping: this.groupingFor(t)
1036
- }, s = tt(t.admitted, n, r), i = o.virtual ? mr(s, o.virtual.from, o.virtual.to) : s;
1036
+ }, s = nt(t.admitted, n, r), i = o.virtual ? mr(s, o.virtual.from, o.virtual.to) : s;
1037
1037
  return this.projectionCache = { hook: t, columns: n, projection: i }, i;
1038
1038
  }
1039
1039
  /* --- The hook's snapshot ---------------------------------------------------------- */
@@ -1107,12 +1107,12 @@ class pr {
1107
1107
  function mr(e, t, n) {
1108
1108
  if (!e.lines) return { ...e, visible: e.filtered.slice(t, n) };
1109
1109
  const o = e.lines.slice(t, n);
1110
- return { ...e, visibleLines: o, visible: Ze(o) };
1110
+ return { ...e, visibleLines: o, visible: et(o) };
1111
1111
  }
1112
- const Pt = /* @__PURE__ */ new WeakMap(), wr = (e, t) => {
1113
- Pt.set(e, t);
1114
- }, br = (e) => typeof e == "function" || typeof e == "object" && e !== null ? Pt.get(e) : void 0, G = (...e) => e.filter(Boolean).join(" ");
1115
- function Bt({
1112
+ const It = /* @__PURE__ */ new WeakMap(), br = (e, t) => {
1113
+ It.set(e, t);
1114
+ }, vr = (e) => typeof e == "function" || typeof e == "object" && e !== null ? It.get(e) : void 0, B = (...e) => e.filter(Boolean).join(" ");
1115
+ function Pt({
1116
1116
  entry: e,
1117
1117
  registry: t,
1118
1118
  hook: n,
@@ -1122,14 +1122,14 @@ function Bt({
1122
1122
  setOpen: i,
1123
1123
  panelId: a
1124
1124
  }) {
1125
- const c = U(), u = ue(), { id: h, label: d, format: m } = e.spec, { values: w, absent: v } = $(() => rr(n.admitted, e.read, u), [n.admitted, e, u]), p = me(e.spec.filter);
1126
- if (!p) return null;
1127
- const b = n.publicSnapshot, g = p.Input, y = tr(p) ? { absentOccurs: v, format: m, kind: t.kindOf(e, n.rows) } : {}, S = () => {
1125
+ const c = U(), u = ue(), { id: h, label: d, format: m } = e.spec, { values: b, absent: w } = j(() => rr(n.admitted, e.read, u), [n.admitted, e, u]), g = me(e.spec.filter);
1126
+ if (!g) return null;
1127
+ const v = n.publicSnapshot, p = g.Input, _ = tr(g) ? { absentOccurs: w, format: m, kind: t.kindOf(e, n.rows) } : {}, S = () => {
1128
1128
  var C;
1129
1129
  i(!1), (C = (r ?? o).current) == null || C.focus();
1130
1130
  };
1131
- return /* @__PURE__ */ O(
1132
- Ct,
1131
+ return /* @__PURE__ */ F(
1132
+ Nt,
1133
1133
  {
1134
1134
  open: s,
1135
1135
  onOpenChange: i,
@@ -1141,36 +1141,36 @@ function Bt({
1141
1141
  className: f.filterPanel,
1142
1142
  children: [
1143
1143
  /* @__PURE__ */ l(
1144
- g,
1144
+ p,
1145
1145
  {
1146
- condition: b.filter[h] ?? null,
1147
- setCondition: (C) => b.setFilter(h, C),
1148
- values: w,
1146
+ condition: v.filter[h] ?? null,
1147
+ setCondition: (C) => v.setFilter(h, C),
1148
+ values: b,
1149
1149
  column: { id: h, label: d },
1150
- ...y
1150
+ ..._
1151
1151
  }
1152
1152
  ),
1153
- /* @__PURE__ */ O("div", { className: f.filterFooter, children: [
1154
- /* @__PURE__ */ l(ee, { size: "sm", variant: "ghost", onClick: () => b.setFilter(h, null), children: c.filterReset }),
1153
+ /* @__PURE__ */ F("div", { className: f.filterFooter, children: [
1154
+ /* @__PURE__ */ l(ee, { size: "sm", variant: "ghost", onClick: () => v.setFilter(h, null), children: c.filterReset }),
1155
1155
  /* @__PURE__ */ l(ee, { size: "sm", onClick: S, children: c.filterDone })
1156
1156
  ] })
1157
1157
  ]
1158
1158
  }
1159
1159
  );
1160
1160
  }
1161
- function vr({
1161
+ function wr({
1162
1162
  entry: e,
1163
1163
  registry: t,
1164
1164
  hook: n
1165
1165
  }) {
1166
- const o = U(), [r, s] = j(!1), i = re(null), a = se(), { id: c, label: u } = e.spec, h = c in n.publicSnapshot.filter;
1167
- return /* @__PURE__ */ O(Q, { children: [
1166
+ const o = U(), [r, s] = H(!1), i = re(null), a = ie(), { id: c, label: u } = e.spec, h = c in n.publicSnapshot.filter;
1167
+ return /* @__PURE__ */ F(Q, { children: [
1168
1168
  /* @__PURE__ */ l(
1169
1169
  "button",
1170
1170
  {
1171
1171
  ref: i,
1172
1172
  type: "button",
1173
- className: G(f.filterButton, h && f.filterActive),
1173
+ className: B(f.filterButton, h && f.filterActive),
1174
1174
  "aria-label": o.filterColumn(u),
1175
1175
  "aria-haspopup": "dialog",
1176
1176
  "aria-expanded": r,
@@ -1190,7 +1190,7 @@ function vr({
1190
1190
  }
1191
1191
  ),
1192
1192
  /* @__PURE__ */ l(
1193
- Bt,
1193
+ Pt,
1194
1194
  {
1195
1195
  entry: e,
1196
1196
  registry: t,
@@ -1210,7 +1210,7 @@ function _r({ registry: e, hook: t }) {
1210
1210
  const u = { formats: o, wording: n, format: a.spec.format, kind: e.kindOf(a, t.rows) };
1211
1211
  return [{ entry: a, text: or(c, i, u) }];
1212
1212
  });
1213
- return r.length === 0 ? null : /* @__PURE__ */ l(Nt, { "aria-label": n.conditions, className: f.conditions, children: r.map(({ entry: s, text: i }) => /* @__PURE__ */ l(yr, { entry: s, text: i, registry: e, hook: t }, s.spec.id)) });
1213
+ return r.length === 0 ? null : /* @__PURE__ */ l(xt, { "aria-label": n.conditions, className: f.conditions, children: r.map(({ entry: s, text: i }) => /* @__PURE__ */ l(yr, { entry: s, text: i, registry: e, hook: t }, s.spec.id)) });
1214
1214
  }
1215
1215
  function yr({
1216
1216
  entry: e,
@@ -1218,16 +1218,16 @@ function yr({
1218
1218
  registry: n,
1219
1219
  hook: o
1220
1220
  }) {
1221
- const r = U(), [s, i] = j(!1), a = re(null), c = re(null), u = se(), { id: h, label: d } = e.spec;
1222
- return /* @__PURE__ */ O(Q, { children: [
1221
+ const r = U(), [s, i] = H(!1), a = re(null), c = re(null), u = ie(), { id: h, label: d } = e.spec;
1222
+ return /* @__PURE__ */ F(Q, { children: [
1223
1223
  /* @__PURE__ */ l(
1224
- xt,
1224
+ At,
1225
1225
  {
1226
1226
  ref: a,
1227
1227
  className: f.condition,
1228
1228
  onRemove: () => o.publicSnapshot.setFilter(h, null),
1229
1229
  removeLabel: r.removeConditionNamed(d, t),
1230
- children: /* @__PURE__ */ O(
1230
+ children: /* @__PURE__ */ F(
1231
1231
  "button",
1232
1232
  {
1233
1233
  ref: c,
@@ -1247,7 +1247,7 @@ function yr({
1247
1247
  }
1248
1248
  ),
1249
1249
  /* @__PURE__ */ l(
1250
- Bt,
1250
+ Pt,
1251
1251
  {
1252
1252
  entry: e,
1253
1253
  registry: n,
@@ -1261,32 +1261,32 @@ function yr({
1261
1261
  )
1262
1262
  ] });
1263
1263
  }
1264
- const ft = ";", kr = `\r
1265
- `, Sr = "\uFEFF", Cr = (e) => String(e).replace(".", ","), Gt = (e) => /[";\r\n]/.test(e) ? `"${e.replace(/"/g, '""')}"` : e, Nr = (e, t) => {
1264
+ const ht = ";", kr = `\r
1265
+ `, Sr = "\uFEFF", Cr = (e) => String(e).replace(".", ","), Bt = (e) => /[";\r\n]/.test(e) ? `"${e.replace(/"/g, '""')}"` : e, Nr = (e, t) => {
1266
1266
  var o;
1267
1267
  const n = (o = t.value) == null ? void 0 : o.call(t, e);
1268
- return n == null ? "" : Gt(typeof n == "number" ? Cr(n) : String(n));
1268
+ return n == null ? "" : Bt(typeof n == "number" ? Cr(n) : String(n));
1269
1269
  };
1270
1270
  function xr(e, t) {
1271
- const n = t.map((r) => Gt(r.label ?? r.id)).join(ft), o = e.map((r) => t.map((s) => Nr(r, s)).join(ft));
1271
+ const n = t.map((r) => Bt(r.label ?? r.id)).join(ht), o = e.map((r) => t.map((s) => Nr(r, s)).join(ht));
1272
1272
  return Sr + [n, ...o].join(kr);
1273
1273
  }
1274
- function Et(e) {
1274
+ function Gt(e) {
1275
1275
  const t = new Map(e.orderedColumns().map((o) => [o.spec.id, o])), n = e.projection().columns.map((o) => t.get(o.id)).filter((o) => o !== void 0);
1276
1276
  return e.withStickyHeaderFirst(n.map((o) => ({ id: o.spec.id, e: o }))).map(({ e: o }) => o);
1277
1277
  }
1278
- function zt(e) {
1278
+ function Et(e) {
1279
1279
  e.setSearch("");
1280
1280
  for (const t of Object.keys(e.filter)) e.setFilter(t, null);
1281
1281
  }
1282
1282
  function Ar(e) {
1283
1283
  const t = e.hook;
1284
1284
  if (!t) return "";
1285
- const n = Et(e).filter((o) => e.kindOf(o, t.rows) !== "other" || o.spec.ownExportValue).map(
1285
+ const n = Gt(e).filter((o) => e.kindOf(o, t.rows) !== "other" || o.spec.ownExportValue).map(
1286
1286
  (o) => ({
1287
1287
  id: o.spec.id,
1288
1288
  label: o.spec.label,
1289
- value: (r) => Rt(o.read(r), o.spec.ownExportValue)
1289
+ value: (r) => qt(o.read(r), o.spec.ownExportValue)
1290
1290
  })
1291
1291
  );
1292
1292
  return xr(e.projection().filtered, n);
@@ -1295,22 +1295,22 @@ const Tr = (e, t, n) => {
1295
1295
  var o;
1296
1296
  return ((o = e.groupingEntries(t.rows).find((r) => r.spec.id === n)) == null ? void 0 : o.spec.label) ?? n;
1297
1297
  };
1298
- function Fr({ registry: e, hook: t }) {
1298
+ function Or({ registry: e, hook: t }) {
1299
1299
  const n = U(), o = e.groupingEntries(t.rows);
1300
1300
  if (o.length === 0) return null;
1301
1301
  const { grouping: r, setGrouping: s } = t.publicSnapshot;
1302
- return /* @__PURE__ */ O("section", { className: f.groupingChoice, "aria-label": n.grouping, children: [
1302
+ return /* @__PURE__ */ F("section", { className: f.groupingChoice, "aria-label": n.grouping, children: [
1303
1303
  /* @__PURE__ */ l("h3", { className: f.groupingHeading, children: n.grouping }),
1304
1304
  /* @__PURE__ */ l("div", { className: f.groupingOptions, children: o.map((i) => {
1305
1305
  const { id: a, label: c } = i.spec, u = r.indexOf(a), h = u !== -1;
1306
- return /* @__PURE__ */ O(
1306
+ return /* @__PURE__ */ F(
1307
1307
  "button",
1308
1308
  {
1309
1309
  type: "button",
1310
1310
  className: f.groupingOption,
1311
1311
  "aria-label": n.groupBy(c),
1312
1312
  "aria-pressed": h,
1313
- disabled: !h && r.length >= Qe,
1313
+ disabled: !h && r.length >= Ze,
1314
1314
  onClick: () => s(h ? r.filter((d) => d !== a) : [...r, a]),
1315
1315
  children: [
1316
1316
  h && /* @__PURE__ */ l("span", { className: f.groupingLevel, "aria-hidden": "true", children: u + 1 }),
@@ -1322,34 +1322,34 @@ function Fr({ registry: e, hook: t }) {
1322
1322
  }) })
1323
1323
  ] });
1324
1324
  }
1325
- function Or({ registry: e, hook: t }) {
1325
+ function Fr({ registry: e, hook: t }) {
1326
1326
  const n = U(), o = t.publicSnapshot, { grouping: r } = o;
1327
1327
  if (r.length === 0) return null;
1328
1328
  const s = r.map((i) => Tr(e, t, i));
1329
1329
  return (
1330
1330
  /* In a tag group, as the conditions stand: the tag is one stop, its button
1331
1331
  the thing one tabs to, and the ring stands on the tag. */
1332
- /* @__PURE__ */ l(Nt, { "aria-label": n.groupedBy, className: f.groupingTag, children: /* @__PURE__ */ l(xt, { onRemove: () => o.setGrouping([]), removeLabel: n.removeGrouping, children: /* @__PURE__ */ O(
1333
- At,
1332
+ /* @__PURE__ */ l(xt, { "aria-label": n.groupedBy, className: f.groupingTag, children: /* @__PURE__ */ l(At, { onRemove: () => o.setGrouping([]), removeLabel: n.removeGrouping, children: /* @__PURE__ */ F(
1333
+ Tt,
1334
1334
  {
1335
- trigger: /* @__PURE__ */ O("button", { type: "button", className: G(f.conditionButton, f.groupingTrigger), children: [
1335
+ trigger: /* @__PURE__ */ F("button", { type: "button", className: B(f.conditionButton, f.groupingTrigger), children: [
1336
1336
  /* @__PURE__ */ l("span", { className: f.groupingPrefix, children: n.groupedBy }),
1337
- s.map((i, a) => /* @__PURE__ */ O("span", { className: f.groupingPath, children: [
1337
+ s.map((i, a) => /* @__PURE__ */ F("span", { className: f.groupingPath, children: [
1338
1338
  a > 0 && /* @__PURE__ */ l("span", { className: f.groupingSeparator, "aria-hidden": "true", children: "›" }),
1339
1339
  i
1340
1340
  ] }, r[a]))
1341
1341
  ] }),
1342
1342
  children: [
1343
- r.map((i, a) => /* @__PURE__ */ l(Fe, { onSelect: () => o.setGrouping(r.filter((c) => c !== i)), children: n.removeGroupingLevel(s[a]) }, i)),
1343
+ r.map((i, a) => /* @__PURE__ */ l(Oe, { onSelect: () => o.setGrouping(r.filter((c) => c !== i)), children: n.removeGroupingLevel(s[a]) }, i)),
1344
1344
  /* @__PURE__ */ l(en, {}),
1345
- /* @__PURE__ */ l(Fe, { onSelect: o.unfoldAll, children: n.unfoldAll }),
1346
- /* @__PURE__ */ l(Fe, { onSelect: o.foldAll, children: n.foldAll })
1345
+ /* @__PURE__ */ l(Oe, { onSelect: o.unfoldAll, children: n.unfoldAll }),
1346
+ /* @__PURE__ */ l(Oe, { onSelect: o.foldAll, children: n.foldAll })
1347
1347
  ]
1348
1348
  }
1349
1349
  ) }) })
1350
1350
  );
1351
1351
  }
1352
- function Ht({
1352
+ function zt({
1353
1353
  registry: e,
1354
1354
  className: t,
1355
1355
  children: n,
@@ -1358,56 +1358,56 @@ function Ht({
1358
1358
  const r = U(), s = ue(), i = (e == null ? void 0 : e.hook) ?? null;
1359
1359
  let a = null, c = null;
1360
1360
  if (e && i) {
1361
- const u = i.publicSnapshot, h = u.search !== "" || Object.keys(u.filter).length > 0, d = o ? [] : u.filtered.filter((w) => u.selection.isSelected(i.rowKey(w))), m = e.hasRowActions() ? e.actions.ordered().filter((w) => w.spec.bulk) : [];
1362
- a = /* @__PURE__ */ O(Q, { children: [
1363
- /* @__PURE__ */ l(Or, { registry: e, hook: i }),
1361
+ const u = i.publicSnapshot, h = u.search !== "" || Object.keys(u.filter).length > 0, d = o ? [] : u.filtered.filter((b) => u.selection.isSelected(i.rowKey(b))), m = e.hasRowActions() ? e.actions.ordered().filter((b) => b.spec.bulk) : [];
1362
+ a = /* @__PURE__ */ F(Q, { children: [
1363
+ /* @__PURE__ */ l(Fr, { registry: e, hook: i }),
1364
1364
  /* @__PURE__ */ l(_r, { registry: e, hook: i })
1365
- ] }), c = /* @__PURE__ */ O("div", { className: f.toolbarGroup, children: [
1365
+ ] }), c = /* @__PURE__ */ F("div", { className: f.toolbarGroup, children: [
1366
1366
  /* @__PURE__ */ l("span", { role: "status", className: f.filteredCount, children: h ? r.filteredOfTotal(s.count(u.filtered.length), s.count(i.admitted.length)) : "" }),
1367
- h && /* @__PURE__ */ l(ee, { size: "sm", variant: "ghost", onClick: () => zt(u), children: r.resetAll }),
1368
- d.length > 0 && /* @__PURE__ */ O(Q, { children: [
1367
+ h && /* @__PURE__ */ l(ee, { size: "sm", variant: "ghost", onClick: () => Et(u), children: r.resetAll }),
1368
+ d.length > 0 && /* @__PURE__ */ F(Q, { children: [
1369
1369
  /* @__PURE__ */ l("span", { className: f.toolbarInfo, children: r.selectedCount(d.length, s.count(d.length)) }),
1370
- m.map(({ key: w, spec: v }) => /* @__PURE__ */ l(
1370
+ m.map(({ key: b, spec: w }) => /* @__PURE__ */ l(
1371
1371
  ee,
1372
1372
  {
1373
1373
  size: "sm",
1374
- variant: v.tone === "danger" ? "danger" : "secondary",
1375
- onClick: () => v.onSelect(d),
1376
- children: v.label
1374
+ variant: w.tone === "danger" ? "danger" : "secondary",
1375
+ onClick: () => w.onSelect(d),
1376
+ children: w.label
1377
1377
  },
1378
- w
1378
+ b
1379
1379
  ))
1380
1380
  ] })
1381
1381
  ] });
1382
1382
  }
1383
- return /* @__PURE__ */ O("div", { className: G(f.toolbar, t), children: [
1384
- /* @__PURE__ */ O("div", { className: f.toolbarGroup, children: [
1383
+ return /* @__PURE__ */ F("div", { className: B(f.toolbar, t), children: [
1384
+ /* @__PURE__ */ F("div", { className: f.toolbarGroup, children: [
1385
1385
  n,
1386
1386
  a
1387
1387
  ] }),
1388
1388
  c
1389
1389
  ] });
1390
1390
  }
1391
- const $e = kt(null), Rr = () => () => {
1392
- }, ht = () => 0;
1391
+ const je = St(null), qr = () => () => {
1392
+ }, pt = () => 0;
1393
1393
  function xe(e) {
1394
1394
  var r;
1395
- const t = Ue($e), n = e ? br(e.Table) ?? null : (t == null ? void 0 : t.registry) ?? null;
1396
- Re(
1397
- n ? n.subscribe : Rr,
1398
- n ? n.bodyVersion : ht,
1399
- n ? n.bodyVersion : ht
1395
+ const t = Ue(je), n = e ? vr(e.Table) ?? null : (t == null ? void 0 : t.registry) ?? null;
1396
+ qe(
1397
+ n ? n.subscribe : qr,
1398
+ n ? n.bodyVersion : pt,
1399
+ n ? n.bodyVersion : pt
1400
1400
  );
1401
1401
  const o = (r = n == null ? void 0 : n.hook) == null ? void 0 : r.publicSnapshot;
1402
1402
  return !n || !o ? null : { registry: n, snapshot: o, inside: !e && t !== null, footerTarget: e ? null : (t == null ? void 0 : t.footerTarget) ?? null };
1403
1403
  }
1404
- function jt({ wording: e }) {
1405
- return /* @__PURE__ */ O(Q, { children: [
1404
+ function Ht({ wording: e }) {
1405
+ return /* @__PURE__ */ F(Q, { children: [
1406
1406
  /* @__PURE__ */ l("span", { "aria-hidden": "true", className: f.absent, children: "—" }),
1407
- /* @__PURE__ */ l(Le, { children: e.cellAbsentValue })
1407
+ /* @__PURE__ */ l(Re, { children: e.cellAbsentValue })
1408
1408
  ] });
1409
1409
  }
1410
- const Lr = { sum: "Σ", avg: "⌀", min: "min", max: "max" }, Mr = (e, t) => ({
1410
+ const Rr = { sum: "Σ", avg: "⌀", min: "min", max: "max" }, Lr = (e, t) => ({
1411
1411
  sum: t.footerSum,
1412
1412
  avg: t.footerAverage,
1413
1413
  min: t.footerMinimum,
@@ -1416,7 +1416,7 @@ const Lr = { sum: "Σ", avg: "⌀", min: "min", max: "max" }, Mr = (e, t) => ({
1416
1416
  count: t.footerCount,
1417
1417
  distinct: t.footerDistinct
1418
1418
  })[e] ?? t.footerAggregate;
1419
- function Ke({
1419
+ function $e({
1420
1420
  entry: e,
1421
1421
  rows: t,
1422
1422
  formats: n,
@@ -1425,33 +1425,33 @@ function Ke({
1425
1425
  }) {
1426
1426
  const { aggregate: s, format: i, presentation: a } = e.spec;
1427
1427
  if (!s) return null;
1428
- const c = typeof s == "function" ? "own" : s, u = Xe({ id: e.spec.id, read: e.read, aggregate: s }, t), h = (w) => ye(w, i, n, o);
1428
+ const c = typeof s == "function" ? "own" : s, u = Qe({ id: e.spec.id, read: e.read, aggregate: s }, t), h = (b) => ye(b, i, n, o);
1429
1429
  let d;
1430
- if (Y(u)) d = /* @__PURE__ */ l(jt, { wording: o });
1431
- else if (c === "range" && i === "date" && Vr(u)) {
1432
- const [w, v] = u;
1433
- d = w.getTime() === v.getTime() ? n.date(w) : o.rangeFromTo(n.dateShort(w), n.dateShort(v));
1430
+ if (Y(u)) d = /* @__PURE__ */ l(Ht, { wording: o });
1431
+ else if (c === "range" && i === "date" && Mr(u)) {
1432
+ const [b, w] = u;
1433
+ d = b.getTime() === w.getTime() ? n.date(b) : o.rangeFromTo(n.dateShort(b), n.dateShort(w));
1434
1434
  } else if (c === "count" || c === "distinct") d = n.count(u);
1435
1435
  else if (c === "range") {
1436
- const [w, v] = u;
1437
- d = h(w) === h(v) ? h(w) : o.rangeFromTo(h(w) ?? "", h(v) ?? "");
1436
+ const [b, w] = u;
1437
+ d = h(b) === h(w) ? h(b) : o.rangeFromTo(h(b) ?? "", h(w) ?? "");
1438
1438
  } else c === "own" && a ? d = a(u, t[0]) : d = h(u);
1439
- const m = Lr[c];
1440
- return /* @__PURE__ */ O(Q, { children: [
1439
+ const m = Rr[c];
1440
+ return /* @__PURE__ */ F(Q, { children: [
1441
1441
  r && m && /* @__PURE__ */ l("span", { "aria-hidden": "true", className: f.footerKind, children: m }),
1442
- r && /* @__PURE__ */ O(Le, { children: [
1443
- Mr(c, o),
1442
+ r && /* @__PURE__ */ F(Re, { children: [
1443
+ Lr(c, o),
1444
1444
  " "
1445
1445
  ] }),
1446
1446
  d
1447
1447
  ] });
1448
1448
  }
1449
- const Vr = ([e, t]) => e instanceof Date && t instanceof Date && e.getFullYear() === t.getFullYear();
1450
- function $t(e, t) {
1449
+ const Mr = ([e, t]) => e instanceof Date && t instanceof Date && e.getFullYear() === t.getFullYear();
1450
+ function jt(e, t) {
1451
1451
  const n = e.spec.aggregate;
1452
1452
  return n === "count" || n === "distinct" ? !0 : e.spec.rightAligned !== void 0 ? e.spec.rightAligned : Ft(t, e.read) === "number";
1453
1453
  }
1454
- function Dr(e, t) {
1454
+ function Vr(e, t) {
1455
1455
  const n = /* @__PURE__ */ new Map();
1456
1456
  for (const [o, r] of t) {
1457
1457
  const s = e.get(o);
@@ -1459,38 +1459,38 @@ function Dr(e, t) {
1459
1459
  }
1460
1460
  return n;
1461
1461
  }
1462
- function Kt(e, t) {
1462
+ function $t(e, t) {
1463
1463
  const n = getComputedStyle(e).getPropertyValue(t).trim(), o = Number.parseFloat(n);
1464
1464
  return Number.isFinite(o) ? n.endsWith("ms") ? o : o * 1e3 : 0;
1465
1465
  }
1466
- const Ir = (e) => {
1466
+ const Dr = (e) => {
1467
1467
  const t = /* @__PURE__ */ new Map(), n = e.getBoundingClientRect().top;
1468
1468
  for (const o of Array.from(e.querySelectorAll("tbody > tr[data-motion]")))
1469
1469
  t.set(o.dataset.motion, o.getBoundingClientRect().top - n);
1470
1470
  return t;
1471
1471
  };
1472
- function Pr(e, t) {
1472
+ function Ir(e, t) {
1473
1473
  const n = re(null);
1474
1474
  W(() => {
1475
1475
  const o = e.current;
1476
1476
  if (!o) return;
1477
- const r = Ir(o), s = n.current;
1477
+ const r = Dr(o), s = n.current;
1478
1478
  if (n.current = { trigger: t, positions: r }, !s || s.trigger === t) return;
1479
- const i = Kt(o, "--u-duration-medium");
1479
+ const i = $t(o, "--u-duration-medium");
1480
1480
  if (i === 0 || typeof o.animate != "function") return;
1481
- const a = getComputedStyle(o).getPropertyValue("--u-ease-out").trim() || "ease-out", c = Dr(s.positions, r);
1481
+ const a = getComputedStyle(o).getPropertyValue("--u-ease-out").trim() || "ease-out", c = Vr(s.positions, r);
1482
1482
  for (const u of Array.from(o.querySelectorAll("tbody > tr[data-motion]"))) {
1483
1483
  const h = u.dataset.motion, d = c.get(h);
1484
1484
  d !== void 0 ? u.animate([{ transform: `translateY(${d}px)` }, { transform: "none" }], { duration: i, easing: a }) : s.positions.has(h) || u.animate([{ opacity: 0, transform: "translateY(-4px)" }, { opacity: 1, transform: "none" }], { duration: i, easing: a });
1485
1485
  }
1486
1486
  });
1487
1487
  }
1488
- function Br(e, t, n) {
1488
+ function Pr(e, t, n) {
1489
1489
  const o = re(t);
1490
1490
  W(() => {
1491
1491
  const r = e.current, s = o.current;
1492
1492
  if (o.current = t, !r || s === t || typeof r.animate != "function") return;
1493
- const i = Kt(r, "--u-duration-medium");
1493
+ const i = $t(r, "--u-duration-medium");
1494
1494
  if (i === 0) return;
1495
1495
  const a = performance.now();
1496
1496
  let c = requestAnimationFrame(function u(h) {
@@ -1502,18 +1502,18 @@ function Br(e, t, n) {
1502
1502
  };
1503
1503
  }, [e, t, n]);
1504
1504
  }
1505
- function Ve(e, t, n, o) {
1505
+ function Me(e, t, n, o) {
1506
1506
  if (t === void 0) return o.groupNoValue;
1507
1507
  const r = e == null ? void 0 : e.spec;
1508
1508
  if (r != null && r.group && t instanceof Date) return mn(r.group, t, n, o);
1509
1509
  const s = r != null && r.ownGroupValue || r == null ? void 0 : r.format;
1510
1510
  return ye(t, s, n, o) ?? String(t);
1511
1511
  }
1512
- function We({ entry: e, group: t, formats: n, wording: o }) {
1512
+ function Ke({ entry: e, group: t, formats: n, wording: o }) {
1513
1513
  const r = e == null ? void 0 : e.spec;
1514
- return t.value !== void 0 && (r != null && r.presentation) && !r.ownGroupValue && !r.group ? /* @__PURE__ */ l(Q, { children: r.presentation(t.value, t.rows[0]) }) : /* @__PURE__ */ l(Q, { children: Ve(e, t.value, n, o) });
1514
+ return t.value !== void 0 && (r != null && r.presentation) && !r.ownGroupValue && !r.group ? /* @__PURE__ */ l(Q, { children: r.presentation(t.value, t.rows[0]) }) : /* @__PURE__ */ l(Q, { children: Me(e, t.value, n, o) });
1515
1515
  }
1516
- function qe({
1516
+ function We({
1517
1517
  group: e,
1518
1518
  parent: t,
1519
1519
  entry: n,
@@ -1522,7 +1522,7 @@ function qe({
1522
1522
  formats: s,
1523
1523
  wording: i
1524
1524
  }) {
1525
- const a = Ve(n, e.value, s, i), c = s.count(e.rows.length), u = () => r.publicSnapshot.toggleFold(e.path), h = (d) => {
1525
+ const a = Me(n, e.value, s, i), c = s.count(e.rows.length), u = () => r.publicSnapshot.toggleFold(e.path), h = (d) => {
1526
1526
  if (d.altKey && (d.key === "ArrowLeft" || d.key === "ArrowRight")) {
1527
1527
  d.preventDefault(), gt(e, d.key === "ArrowLeft", r);
1528
1528
  return;
@@ -1532,10 +1532,10 @@ function qe({
1532
1532
  else if (d.key === "ArrowLeft") {
1533
1533
  if (d.preventDefault(), o) u();
1534
1534
  else if (t) {
1535
- const m = d.currentTarget.closest("table"), w = Array.from((m == null ? void 0 : m.querySelectorAll("[data-fold-path]")) ?? []).find(
1536
- (v) => v.dataset.foldPath === t.path
1535
+ const m = d.currentTarget.closest("table"), b = Array.from((m == null ? void 0 : m.querySelectorAll("[data-fold-path]")) ?? []).find(
1536
+ (w) => w.dataset.foldPath === t.path
1537
1537
  );
1538
- w == null || w.focus();
1538
+ b == null || b.focus();
1539
1539
  }
1540
1540
  }
1541
1541
  };
@@ -1543,7 +1543,7 @@ function qe({
1543
1543
  "button",
1544
1544
  {
1545
1545
  type: "button",
1546
- className: G(f.fold, !o && f.foldClosed),
1546
+ className: B(f.fold, !o && f.foldClosed),
1547
1547
  "data-fold-path": e.path,
1548
1548
  "aria-expanded": o,
1549
1549
  "aria-label": o ? i.foldGroup(a, c) : i.unfoldGroup(a, c),
@@ -1556,16 +1556,16 @@ function qe({
1556
1556
  }
1557
1557
  );
1558
1558
  }
1559
- function Gr({ value: e, formats: t }) {
1559
+ function Br({ value: e, formats: t }) {
1560
1560
  const n = re(null);
1561
- return Br(n, e, t.count), /* @__PURE__ */ l("span", { ref: n, className: f.groupCount, children: t.count(e) });
1561
+ return Pr(n, e, t.count), /* @__PURE__ */ l("span", { ref: n, className: f.groupCount, children: t.count(e) });
1562
1562
  }
1563
1563
  function Ye({ group: e, entry: t, hook: n, formats: o, wording: r }) {
1564
1564
  const { selection: s } = n.publicSnapshot, i = e.rows.map(n.rowKey), a = i.filter((u) => s.isSelected(u)).length, c = a === i.length;
1565
1565
  return /* @__PURE__ */ l(
1566
1566
  Ce,
1567
1567
  {
1568
- "aria-label": r.selectGroup(Ve(t, e.value, o, r)),
1568
+ "aria-label": r.selectGroup(Me(t, e.value, o, r)),
1569
1569
  checked: c,
1570
1570
  indeterminate: a > 0 && !c,
1571
1571
  onChange: () => {
@@ -1583,7 +1583,7 @@ function gt(e, t, n) {
1583
1583
  for (const i of r)
1584
1584
  o.folded.includes(i.path) !== t && o.toggleFold(i.path);
1585
1585
  }
1586
- function Er({
1586
+ function Gr({
1587
1587
  line: e,
1588
1588
  entry: t,
1589
1589
  selectable: n,
@@ -1592,17 +1592,17 @@ function Er({
1592
1592
  wording: s
1593
1593
  }) {
1594
1594
  const i = e.span;
1595
- return /* @__PURE__ */ l("td", { className: G(f.td, f.spanCell), children: e.first && /* @__PURE__ */ O("span", { className: f.spanValue, children: [
1595
+ return /* @__PURE__ */ l("td", { className: B(f.td, f.spanCell), children: e.first && /* @__PURE__ */ F("span", { className: f.spanValue, children: [
1596
1596
  n && /* @__PURE__ */ l("span", { className: f.spanSelect, children: /* @__PURE__ */ l(Ye, { group: i, entry: t, hook: o, formats: r, wording: s }) }),
1597
- /* @__PURE__ */ l(qe, { group: i, parent: e.parents.at(-1), entry: t, open: !0, hook: o, formats: r, wording: s }),
1598
- /* @__PURE__ */ O("span", { className: f.spanText, title: Ve(t, i.value, r, s), children: [
1599
- /* @__PURE__ */ l(We, { entry: t, group: i, formats: r, wording: s }),
1597
+ /* @__PURE__ */ l(We, { group: i, parent: e.parents.at(-1), entry: t, open: !0, hook: o, formats: r, wording: s }),
1598
+ /* @__PURE__ */ F("span", { className: f.spanText, title: Me(t, i.value, r, s), children: [
1599
+ /* @__PURE__ */ l(Ke, { entry: t, group: i, formats: r, wording: s }),
1600
1600
  e.continued && /* @__PURE__ */ l("span", { className: f.continued, children: s.groupContinued })
1601
1601
  ] }),
1602
1602
  /* @__PURE__ */ l("span", { className: f.groupCount, children: r.count(i.rows.length) })
1603
1603
  ] }) });
1604
1604
  }
1605
- function pt({
1605
+ function mt({
1606
1606
  line: e,
1607
1607
  index: t,
1608
1608
  absolute: n,
@@ -1616,62 +1616,62 @@ function pt({
1616
1616
  siblings: h,
1617
1617
  depth: d,
1618
1618
  hook: m,
1619
- formats: w,
1620
- wording: v
1619
+ formats: b,
1620
+ wording: w
1621
1621
  }) {
1622
- const { group: p } = e, b = e.kind === "header", g = b && !m.publicSnapshot.folded.includes(p.path), y = s.findIndex((_) => _.spec.aggregate !== void 0), S = y === -1 ? s.length : y, C = s.slice(S), I = s.find((_) => _.spec.aggregate === "sum" && _.spec.share !== !1), x = n !== void 0, A = /* @__PURE__ */ O("span", { className: f.groupLabel, children: [
1623
- /* @__PURE__ */ l(qe, { group: p, parent: e.parents.at(-1), entry: r, open: g, hook: m, formats: w, wording: v }),
1624
- /* @__PURE__ */ l("span", { className: f.groupValue, children: /* @__PURE__ */ l(We, { entry: r, group: p, formats: w, wording: v }) }),
1625
- /* @__PURE__ */ l(Gr, { value: p.rows.length, formats: w }),
1626
- b && e.continued && /* @__PURE__ */ l("span", { className: f.continued, children: v.groupContinued })
1622
+ const { group: g } = e, v = e.kind === "header", p = v && !m.publicSnapshot.folded.includes(g.path), _ = s.findIndex((y) => y.spec.aggregate !== void 0), S = _ === -1 ? s.length : _, C = s.slice(S), D = s.find((y) => y.spec.aggregate === "sum" && y.spec.share !== !1), x = n !== void 0, A = /* @__PURE__ */ F("span", { className: f.groupLabel, children: [
1623
+ /* @__PURE__ */ l(We, { group: g, parent: e.parents.at(-1), entry: r, open: p, hook: m, formats: b, wording: w }),
1624
+ /* @__PURE__ */ l("span", { className: f.groupValue, children: /* @__PURE__ */ l(Ke, { entry: r, group: g, formats: b, wording: w }) }),
1625
+ /* @__PURE__ */ l(Br, { value: g.rows.length, formats: b }),
1626
+ v && e.continued && /* @__PURE__ */ l("span", { className: f.continued, children: w.groupContinued })
1627
1627
  ] });
1628
- return /* @__PURE__ */ O(
1628
+ return /* @__PURE__ */ F(
1629
1629
  "tr",
1630
1630
  {
1631
- className: G(b ? f.groupHeader : f.groupFolded, x && f.virtualRow),
1631
+ className: B(v ? f.groupHeader : f.groupFolded, x && f.virtualRow),
1632
1632
  "data-line": e.kind,
1633
- "data-level": p.level,
1634
- "data-motion": n !== void 0 || !(b && e.continued) ? `${e.kind}:${p.path}` : void 0,
1635
- "data-continued": b && e.continued ? "" : void 0,
1636
- "data-group-first": b ? void 0 : "",
1637
- "data-group": p.path,
1633
+ "data-level": g.level,
1634
+ "data-motion": n !== void 0 || !(v && e.continued) ? `${e.kind}:${g.path}` : void 0,
1635
+ "data-continued": v && e.continued ? "" : void 0,
1636
+ "data-group-first": v ? void 0 : "",
1637
+ "data-group": g.path,
1638
1638
  "data-row": x ? n : void 0,
1639
1639
  "aria-rowindex": x ? n + 2 : void 0,
1640
1640
  "data-index": t,
1641
- style: b ? { "--u-header-level": p.level } : void 0,
1642
- "aria-level": b ? p.level + 1 : d,
1643
- "aria-expanded": g,
1644
- "aria-posinset": h.indexOf(p) + 1 || void 0,
1641
+ style: v ? { "--u-header-level": g.level } : void 0,
1642
+ "aria-level": v ? g.level + 1 : d,
1643
+ "aria-expanded": p,
1644
+ "aria-posinset": h.indexOf(g) + 1 || void 0,
1645
1645
  "aria-setsize": h.length || void 0,
1646
1646
  children: [
1647
- Array.from({ length: i }, (_, F) => /* @__PURE__ */ l("td", { className: G(f.td, f.control), children: F === 0 && a && b && /* @__PURE__ */ l(Ye, { group: p, entry: r, hook: m, formats: w, wording: v }) }, `c${F}`)),
1648
- b ? /* @__PURE__ */ l("td", { className: f.td, colSpan: (o ? 1 : 0) + S, style: { paddingLeft: `calc(var(--u-space-3) + ${p.level * 20}px)` }, children: A }) : /* @__PURE__ */ O(Q, { children: [
1649
- /* @__PURE__ */ l("td", { className: G(f.td, f.spanCell), children: /* @__PURE__ */ O("span", { className: f.spanValue, children: [
1650
- a && /* @__PURE__ */ l("span", { className: f.spanSelect, children: /* @__PURE__ */ l(Ye, { group: p, entry: o, hook: m, formats: w, wording: v }) }),
1651
- /* @__PURE__ */ l(qe, { group: p, parent: e.parents.at(-1), entry: o, open: !1, hook: m, formats: w, wording: v }),
1652
- /* @__PURE__ */ l("span", { className: f.spanText, children: /* @__PURE__ */ l(We, { entry: o, group: p, formats: w, wording: v }) }),
1653
- /* @__PURE__ */ l("span", { className: f.groupCount, children: w.count(p.rows.length) })
1647
+ Array.from({ length: i }, (y, O) => /* @__PURE__ */ l("td", { className: B(f.td, f.control), children: O === 0 && a && v && /* @__PURE__ */ l(Ye, { group: g, entry: r, hook: m, formats: b, wording: w }) }, `c${O}`)),
1648
+ v ? /* @__PURE__ */ l("td", { className: f.td, colSpan: (o ? 1 : 0) + S, style: { paddingLeft: `calc(var(--u-space-3) + ${g.level * 20}px)` }, children: A }) : /* @__PURE__ */ F(Q, { children: [
1649
+ /* @__PURE__ */ l("td", { className: B(f.td, f.spanCell), children: /* @__PURE__ */ F("span", { className: f.spanValue, children: [
1650
+ a && /* @__PURE__ */ l("span", { className: f.spanSelect, children: /* @__PURE__ */ l(Ye, { group: g, entry: o, hook: m, formats: b, wording: w }) }),
1651
+ /* @__PURE__ */ l(We, { group: g, parent: e.parents.at(-1), entry: o, open: !1, hook: m, formats: b, wording: w }),
1652
+ /* @__PURE__ */ l("span", { className: f.spanText, children: /* @__PURE__ */ l(Ke, { entry: o, group: g, formats: b, wording: w }) }),
1653
+ /* @__PURE__ */ l("span", { className: f.groupCount, children: b.count(g.rows.length) })
1654
1654
  ] }) }),
1655
- S > 0 && /* @__PURE__ */ l("td", { className: G(f.td, f.foldedCount), colSpan: S, children: v.entries(p.rows.length, w.count(p.rows.length)) })
1655
+ S > 0 && /* @__PURE__ */ l("td", { className: B(f.td, f.foldedCount), colSpan: S, children: w.entries(g.rows.length, b.count(g.rows.length)) })
1656
1656
  ] }),
1657
- C.map((_) => /* @__PURE__ */ l(
1658
- zr,
1657
+ C.map((y) => /* @__PURE__ */ l(
1658
+ Er,
1659
1659
  {
1660
- entry: _,
1661
- group: p,
1662
- share: b && _ === I,
1660
+ entry: y,
1661
+ group: g,
1662
+ share: v && y === D,
1663
1663
  total: u,
1664
- formats: w,
1665
- wording: v
1664
+ formats: b,
1665
+ wording: w
1666
1666
  },
1667
- _.key
1667
+ y.key
1668
1668
  )),
1669
1669
  c && /* @__PURE__ */ l("td", { className: f.td })
1670
1670
  ]
1671
1671
  }
1672
1672
  );
1673
1673
  }
1674
- function zr({
1674
+ function Er({
1675
1675
  entry: e,
1676
1676
  group: t,
1677
1677
  share: n,
@@ -1683,21 +1683,21 @@ function zr({
1683
1683
  if (!i.aggregate) return /* @__PURE__ */ l("td", { className: f.td });
1684
1684
  let a = null;
1685
1685
  if (n && i.aggregate === "sum" && i.share !== !1) {
1686
- const c = Xe({ id: i.id, read: e.read, aggregate: "sum" }, o), u = t.aggregates[i.id];
1686
+ const c = Qe({ id: i.id, read: e.read, aggregate: "sum" }, o), u = t.aggregates[i.id];
1687
1687
  if (typeof c == "number" && c > 0 && typeof u == "number" && u > 0) {
1688
1688
  const h = Math.min(1, u / c);
1689
1689
  a = /* @__PURE__ */ l("span", { className: f.shareBar, style: { width: `${Math.max(2, Math.round(h * 64))}px` }, "aria-hidden": "true" });
1690
1690
  }
1691
1691
  }
1692
- return /* @__PURE__ */ l("td", { className: G(f.td, $t(e, t.rows) && f.numeric, f.aggregateCell), "data-aggregate": typeof i.aggregate == "function" ? "own" : i.aggregate, children: a ? /* @__PURE__ */ O("span", { className: f.shareHost, children: [
1693
- /* @__PURE__ */ l(Ke, { entry: e, rows: t.rows, formats: r, wording: s }),
1692
+ return /* @__PURE__ */ l("td", { className: B(f.td, jt(e, t.rows) && f.numeric, f.aggregateCell), "data-aggregate": typeof i.aggregate == "function" ? "own" : i.aggregate, children: a ? /* @__PURE__ */ F("span", { className: f.shareHost, children: [
1693
+ /* @__PURE__ */ l($e, { entry: e, rows: t.rows, formats: r, wording: s }),
1694
1694
  a
1695
- ] }) : /* @__PURE__ */ l(Ke, { entry: e, rows: t.rows, formats: r, wording: s }) });
1695
+ ] }) : /* @__PURE__ */ l($e, { entry: e, rows: t.rows, formats: r, wording: s }) });
1696
1696
  }
1697
- function Hr(e) {
1697
+ function zr(e) {
1698
1698
  const t = typeof e.value == "string" ? e.value : void 0;
1699
1699
  let n = e.id ?? t;
1700
- return n === void 0 && (pe(`without-id:${e.label}`, `The column "${e.label}" has a computed value but no id. Its label serves as the id.`), n = e.label), e.footer !== void 0 && pe(`footer:${n}`, `The column "${n}" uses \`footer\`, which is called \`aggregate\` now. The old name goes with the next minor version.`), e.children !== void 0 && typeof e.children != "function" && pe(`children:${n}`, `The children of the column "${n}" are not a function and are passed over.`), {
1700
+ return n === void 0 && (ge(`without-id:${e.label}`, `The column "${e.label}" has a computed value but no id. Its label serves as the id.`), n = e.label), e.footer !== void 0 && ge(`footer:${n}`, `The column "${n}" uses \`footer\`, which is called \`aggregate\` now. The old name goes with the next minor version.`), e.children !== void 0 && typeof e.children != "function" && ge(`children:${n}`, `The children of the column "${n}" are not a function and are passed over.`), {
1701
1701
  id: n,
1702
1702
  label: e.label,
1703
1703
  value: e.value,
@@ -1719,15 +1719,15 @@ function Hr(e) {
1719
1719
  groupable: e.groupable
1720
1720
  };
1721
1721
  }
1722
- function jr(e, t, n, o, r) {
1722
+ function Hr(e, t, n, o, r) {
1723
1723
  if (!t) return n.rowKey(e);
1724
1724
  const s = t.read(e);
1725
1725
  return Y(s) ? r.cellAbsentValue : ye(s, t.spec.format, o, r) ?? n.rowKey(e);
1726
1726
  }
1727
- const Oe = 34;
1728
- function $r(e) {
1727
+ const Fe = 34;
1728
+ function jr(e) {
1729
1729
  function t(c) {
1730
- const u = se(), h = Ue($e), d = Hr(c);
1730
+ const u = ie(), h = Ue(je), d = zr(c);
1731
1731
  return e.registerColumn(u, d), W(
1732
1732
  () => () => {
1733
1733
  e.removeColumn(u), e.commit();
@@ -1735,13 +1735,13 @@ function $r(e) {
1735
1735
  [u]
1736
1736
  ), W(() => {
1737
1737
  e.ensureColumn(u, d), e.checkOrder(), e.commit();
1738
- }), Mt && h && h.registry !== e && pe(
1738
+ }), Lt && h && h.registry !== e && ge(
1739
1739
  `foreign:${d.id}`,
1740
1740
  `The column "${d.id}" comes from a different useTable call than the table it stands in. It reads the rows of its own hook.`
1741
1741
  ), /* @__PURE__ */ l("span", { hidden: !0, "data-umriss-column": u });
1742
1742
  }
1743
1743
  function n({ children: c }) {
1744
- const u = se();
1744
+ const u = ie();
1745
1745
  return e.registerDetail(u, c), W(
1746
1746
  () => () => {
1747
1747
  e.removeDetail(u), e.commit();
@@ -1752,7 +1752,7 @@ function $r(e) {
1752
1752
  }), null;
1753
1753
  }
1754
1754
  function o({ children: c }) {
1755
- const u = se();
1755
+ const u = ie();
1756
1756
  return e.registerActionGroup(u), W(
1757
1757
  () => () => {
1758
1758
  e.removeActionGroup(u), e.commit();
@@ -1763,7 +1763,7 @@ function $r(e) {
1763
1763
  }), /* @__PURE__ */ l(Q, { children: c });
1764
1764
  }
1765
1765
  function r(c) {
1766
- const u = se(), h = {
1766
+ const u = ie(), h = {
1767
1767
  label: c.children,
1768
1768
  bulk: c.bulk === !0,
1769
1769
  tone: c.tone ?? "default",
@@ -1779,7 +1779,7 @@ function $r(e) {
1779
1779
  }), /* @__PURE__ */ l("span", { hidden: !0, "data-umriss-action": u });
1780
1780
  }
1781
1781
  function s(c) {
1782
- const u = se(), h = typeof c.value == "string" ? c.value : void 0, m = {
1782
+ const u = ie(), h = typeof c.value == "string" ? c.value : void 0, m = {
1783
1783
  id: c.id ?? h ?? c.label,
1784
1784
  label: c.label,
1785
1785
  value: c.value,
@@ -1800,25 +1800,25 @@ function $r(e) {
1800
1800
  }
1801
1801
  function i(c) {
1802
1802
  e.beginPass(), e.setStickyRowHeader(c.stickyRowHeader === !0), e.setTableGroupable(c.groupable !== !1);
1803
- const u = re(null), [h, d] = j(null);
1803
+ const u = re(null), [h, d] = H(null);
1804
1804
  W(() => {
1805
1805
  e.children = u.current, e.checkOrder(), e.commit();
1806
1806
  });
1807
- const m = $(() => ({ registry: e, footerTarget: h }), [h]);
1808
- return /* @__PURE__ */ l($e.Provider, { value: m, children: /* @__PURE__ */ O("div", { className: G(f.frame, c.className), children: [
1807
+ const m = j(() => ({ registry: e, footerTarget: h }), [h]);
1808
+ return /* @__PURE__ */ l(je.Provider, { value: m, children: /* @__PURE__ */ F("div", { className: B(f.frame, c.className), children: [
1809
1809
  /* @__PURE__ */ l("div", { ref: u, className: f.children, children: c.children }),
1810
- /* @__PURE__ */ l(Kr, { registry: e }),
1811
- /* @__PURE__ */ l(Wr, { registry: e, props: c }),
1810
+ /* @__PURE__ */ l($r, { registry: e }),
1811
+ /* @__PURE__ */ l(Kr, { registry: e, props: c }),
1812
1812
  /* @__PURE__ */ l("div", { ref: d, className: f.footerTarget })
1813
1813
  ] }) });
1814
1814
  }
1815
1815
  const a = { Table: i, Column: t, RowDetail: n, RowActions: o, Action: r, GroupBy: s };
1816
- return wr(i, e), a;
1816
+ return br(i, e), a;
1817
1817
  }
1818
- function Kr({ registry: e }) {
1819
- return Re(e.subscribe, e.bodyVersion, e.bodyVersion), !e.hook || !e.needsOwnToolbar() ? null : /* @__PURE__ */ l(Ht, { registry: e, own: !0 });
1818
+ function $r({ registry: e }) {
1819
+ return qe(e.subscribe, e.bodyVersion, e.bodyVersion), !e.hook || !e.needsOwnToolbar() ? null : /* @__PURE__ */ l(zt, { registry: e, own: !0 });
1820
1820
  }
1821
- function Wr({ registry: e, props: t }) {
1821
+ function Kr({ registry: e, props: t }) {
1822
1822
  const {
1823
1823
  selectable: n = !1,
1824
1824
  stickyHeader: o = !1,
@@ -1831,146 +1831,155 @@ function Wr({ registry: e, props: t }) {
1831
1831
  rowProps: h,
1832
1832
  ariaLabel: d
1833
1833
  } = t;
1834
- Re(e.subscribe, e.bodyVersion, e.bodyVersion);
1835
- const m = U(), w = ue(), v = Tt(i, "regular"), p = se(), b = re(null);
1834
+ qe(e.subscribe, e.bodyVersion, e.bodyVersion);
1835
+ const m = U(), b = ue(), w = Ot(i, "regular"), g = ie(), v = re(null);
1836
1836
  W(() => {
1837
- var H, M;
1838
- const k = b.current;
1837
+ var z, L;
1838
+ const k = v.current;
1839
1839
  if (!k || !o) return;
1840
- const L = ((H = k.tHead) == null ? void 0 : H.getBoundingClientRect().height) ?? 0, K = ((M = k.querySelector("tr[data-line='header']")) == null ? void 0 : M.getBoundingClientRect().height) ?? 0;
1841
- k.style.setProperty("--u-table-head", `${L}px`), k.style.setProperty("--u-table-group-header", `${K}px`), k.parentElement && mt(k.parentElement);
1840
+ const R = ((z = k.tHead) == null ? void 0 : z.getBoundingClientRect().height) ?? 0, $ = ((L = k.querySelector("tr[data-line='header']")) == null ? void 0 : L.getBoundingClientRect().height) ?? 0;
1841
+ k.style.setProperty("--u-table-head", `${R}px`), k.style.setProperty("--u-table-group-header", `${$}px`), k.parentElement && bt(k.parentElement);
1842
1842
  }), W(() => {
1843
- const k = e.takeFocusBeforeFold(), L = b.current;
1844
- if (!k || !L || k.table !== L || k.element.isConnected) return;
1845
- const K = Array.from(L.querySelectorAll("[data-fold-path]")), H = JSON.parse(k.group);
1846
- for (let M = H.length; M > 0; M--) {
1847
- const J = JSON.stringify(H.slice(0, M)), Z = K.find((T) => T.dataset.foldPath === J);
1843
+ const k = e.takeFocusBeforeFold(), R = v.current;
1844
+ if (!k || !R || k.table !== R || k.element.isConnected) return;
1845
+ const $ = Array.from(R.querySelectorAll("[data-fold-path]")), z = JSON.parse(k.group);
1846
+ for (let L = z.length; L > 0; L--) {
1847
+ const J = JSON.stringify(z.slice(0, L)), Z = $.find((T) => T.dataset.foldPath === J);
1848
1848
  if (Z) return Z.focus();
1849
1849
  }
1850
1850
  });
1851
- const g = e.hook && !e.hook.companion.virtual ? e.hook.publicSnapshot : null;
1852
- Pr(b, g ? `${g.grouping.join("|")}#${g.folded.join("|")}` : "");
1853
- const y = e.hook;
1854
- if (!y) return null;
1855
- const S = y.publicSnapshot, C = e.projection(), I = e.rowHeader(), x = Et(e), A = e.detail, _ = e.hasRowActions() ? e.actions.ordered() : [], F = y.companion.virtual, R = S.grouping, N = R.length > 0 ? C.visibleLines : void 0, V = N ? e.groupingEntries(y.rows) : [], z = (k) => V.find((L) => L.spec.id === k), B = N && R.length > 1 ? z(R.at(-1)) : void 0, q = N ? x.filter((k) => !R.includes(k.spec.id)) : x, ie = (n ? 1 : 0) + (A ? 1 : 0), ae = ie + (B ? 1 : 0) + q.length + (_.length > 0 ? 1 : 0), de = ie * Oe, fe = (k) => r && k === I, we = C.visible, be = !u && q.some((k) => k.spec.aggregate), ke = S.search !== "" || Object.keys(S.filter).length > 0, le = (k, L, K, H) => /* @__PURE__ */ l(
1856
- qr,
1851
+ const p = e.hook && !e.hook.companion.virtual ? e.hook.publicSnapshot : null;
1852
+ Ir(v, p ? `${p.grouping.join("|")}#${p.folded.join("|")}` : "");
1853
+ const _ = e.hook;
1854
+ if (!_) return null;
1855
+ const S = _.publicSnapshot, C = e.projection(), D = e.rowHeader(), x = Gt(e), A = e.detail, y = e.hasRowActions() ? e.actions.ordered() : [], O = _.companion.virtual, q = S.grouping, N = q.length > 0 ? C.visibleLines : void 0, M = N ? e.groupingEntries(_.rows) : [], E = (k) => M.find((R) => R.spec.id === k), I = N && q.length > 1 ? E(q.at(-1)) : void 0, K = N ? x.filter((k) => !q.includes(k.spec.id)) : x, se = (n ? 1 : 0) + (A ? 1 : 0), ae = se + (I ? 1 : 0) + K.length + (y.length > 0 ? 1 : 0), de = se * Fe, fe = (k) => r && k === D, be = C.visible, ve = !u && K.some((k) => k.spec.aggregate), ke = S.search !== "" || Object.keys(S.filter).length > 0, le = (k, R, $, z) => /* @__PURE__ */ l(
1856
+ Wr,
1857
1857
  {
1858
1858
  row: k,
1859
- index: L,
1860
- absolute: F ? K : void 0,
1859
+ index: R,
1860
+ absolute: O ? $ : void 0,
1861
1861
  registry: e,
1862
- hook: y,
1863
- columns: q,
1864
- line: H,
1865
- spanEntry: B,
1866
- header: I,
1862
+ hook: _,
1863
+ columns: K,
1864
+ line: z,
1865
+ spanEntry: I,
1866
+ header: D,
1867
1867
  selectable: n,
1868
- actions: _,
1868
+ actions: y,
1869
1869
  stickyRowHeader: r,
1870
1870
  rowHeaderLeft: de,
1871
1871
  columnCount: ae,
1872
1872
  rowProps: h,
1873
- baseId: p,
1874
- formats: w,
1873
+ baseId: g,
1874
+ formats: b,
1875
1875
  wording: m
1876
1876
  },
1877
- y.rowKey(k)
1877
+ _.rowKey(k)
1878
1878
  );
1879
1879
  let te;
1880
1880
  if (u)
1881
- te = /* @__PURE__ */ l("tbody", { children: /* @__PURE__ */ l(Qr, { columns: ae }) });
1881
+ te = /* @__PURE__ */ l("tbody", { children: /* @__PURE__ */ l(
1882
+ Qr,
1883
+ {
1884
+ columns: ae,
1885
+ rightAligned: [
1886
+ ...Array.from({ length: se + (I ? 1 : 0) }, () => !1),
1887
+ ...K.map((k) => Je(e.kindOf(k, _.rows), k.spec.rightAligned))
1888
+ ]
1889
+ }
1890
+ ) });
1882
1891
  else if (C.filtered.length === 0)
1883
- te = /* @__PURE__ */ l("tbody", { children: /* @__PURE__ */ l("tr", { children: /* @__PURE__ */ l("td", { colSpan: ae, className: f.emptyCell, children: /* @__PURE__ */ l("div", { className: f.empty, children: y.admitted.length > 0 && ke ? /* @__PURE__ */ O(Q, { children: [
1892
+ te = /* @__PURE__ */ l("tbody", { children: /* @__PURE__ */ l("tr", { children: /* @__PURE__ */ l("td", { colSpan: ae, className: f.emptyCell, children: /* @__PURE__ */ l("div", { className: f.empty, children: _.admitted.length > 0 && ke ? /* @__PURE__ */ F(Q, { children: [
1884
1893
  /* @__PURE__ */ l("p", { className: f.emptyTitle, children: m.nothingMatchesFilters }),
1885
- /* @__PURE__ */ l(ee, { size: "sm", variant: "ghost", onClick: () => zt(S), children: m.resetAll })
1894
+ /* @__PURE__ */ l(ee, { size: "sm", variant: "ghost", onClick: () => Et(S), children: m.resetAll })
1886
1895
  ] }) : c ?? /* @__PURE__ */ l("p", { className: f.emptyTitle, children: m.noEntries }) }) }) }) });
1887
1896
  else if (N) {
1888
- const k = F ? Lt(N).map((M) => M.kind === "folded" || !M.continued ? M : { ...M, continued: !1 }) : N, L = k.length - N.length, K = F && F.from > 0 ? F.fillerBefore / F.from : 0, H = (M, J) => {
1889
- var D, E;
1890
- const Z = J - L, T = F ? F.from + Z : Z;
1891
- return Z < 0 ? M.kind === "row" ? null : /* @__PURE__ */ l(
1892
- pt,
1897
+ const k = O ? Rt(N).map((L) => L.kind === "folded" || !L.continued ? L : { ...L, continued: !1 }) : N, R = k.length - N.length, $ = O && O.from > 0 ? O.fillerBefore / O.from : 0, z = (L, J) => {
1898
+ var V, G;
1899
+ const Z = J - R, T = O ? O.from + Z : Z;
1900
+ return Z < 0 ? L.kind === "row" ? null : /* @__PURE__ */ l(
1901
+ mt,
1893
1902
  {
1894
- line: M,
1903
+ line: L,
1895
1904
  index: J,
1896
1905
  absolute: void 0,
1897
- spanEntry: B,
1898
- levelEntry: z(R[M.group.level]),
1899
- columns: q,
1900
- controlColumns: ie,
1906
+ spanEntry: I,
1907
+ levelEntry: E(q[L.group.level]),
1908
+ columns: K,
1909
+ controlColumns: se,
1901
1910
  selectable: n,
1902
- hasActions: _.length > 0,
1911
+ hasActions: y.length > 0,
1903
1912
  total: C.filtered,
1904
- siblings: ((D = M.parents.at(-1)) == null ? void 0 : D.groups) ?? C.groups ?? [],
1905
- depth: R.length,
1906
- hook: y,
1907
- formats: w,
1913
+ siblings: ((V = L.parents.at(-1)) == null ? void 0 : V.groups) ?? C.groups ?? [],
1914
+ depth: q.length,
1915
+ hook: _,
1916
+ formats: b,
1908
1917
  wording: m
1909
1918
  },
1910
- `${M.kind}:${M.group.path}:repeated`
1911
- ) : M.kind === "row" ? le(M.row, Z, T, M) : /* @__PURE__ */ l(
1912
- pt,
1919
+ `${L.kind}:${L.group.path}:repeated`
1920
+ ) : L.kind === "row" ? le(L.row, Z, T, L) : /* @__PURE__ */ l(
1921
+ mt,
1913
1922
  {
1914
- line: M,
1923
+ line: L,
1915
1924
  index: Z,
1916
- absolute: F ? T : void 0,
1917
- spanEntry: B,
1918
- levelEntry: z(R[M.group.level]),
1919
- columns: q,
1920
- controlColumns: ie,
1925
+ absolute: O ? T : void 0,
1926
+ spanEntry: I,
1927
+ levelEntry: E(q[L.group.level]),
1928
+ columns: K,
1929
+ controlColumns: se,
1921
1930
  selectable: n,
1922
- hasActions: _.length > 0,
1931
+ hasActions: y.length > 0,
1923
1932
  total: C.filtered,
1924
- siblings: ((E = M.parents.at(-1)) == null ? void 0 : E.groups) ?? C.groups ?? [],
1925
- depth: R.length,
1926
- hook: y,
1927
- formats: w,
1933
+ siblings: ((G = L.parents.at(-1)) == null ? void 0 : G.groups) ?? C.groups ?? [],
1934
+ depth: q.length,
1935
+ hook: _,
1936
+ formats: b,
1928
1937
  wording: m
1929
1938
  },
1930
- `${M.kind}:${M.group.path}${M.kind === "header" && M.continued ? ":continued" : ""}`
1939
+ `${L.kind}:${L.group.path}${L.kind === "header" && L.continued ? ":continued" : ""}`
1931
1940
  );
1932
1941
  };
1933
- te = F ? /* @__PURE__ */ l(
1934
- vt,
1942
+ te = O ? /* @__PURE__ */ l(
1943
+ _t,
1935
1944
  {
1936
- virtual: { ...F, fillerBefore: Math.max(0, F.fillerBefore - L * K) },
1945
+ virtual: { ...O, fillerBefore: Math.max(0, O.fillerBefore - R * $) },
1937
1946
  colSpan: ae,
1938
- children: k.map(H)
1947
+ children: k.map(z)
1939
1948
  }
1940
- ) : /* @__PURE__ */ l("tbody", { children: N.map(H) });
1941
- } else F ? te = /* @__PURE__ */ l(vt, { virtual: F, colSpan: ae, children: we.map((k, L) => le(k, L, F.from + L)) }) : te = /* @__PURE__ */ l("tbody", { children: we.map((k, L) => le(k, L, L)) });
1949
+ ) : /* @__PURE__ */ l("tbody", { children: N.map(z) });
1950
+ } else O ? te = /* @__PURE__ */ l(_t, { virtual: O, colSpan: ae, children: be.map((k, R) => le(k, R, O.from + R)) }) : te = /* @__PURE__ */ l("tbody", { children: be.map((k, R) => le(k, R, R)) });
1942
1951
  return /* @__PURE__ */ l(
1943
1952
  "div",
1944
1953
  {
1945
- ref: F == null ? void 0 : F.scrollRef,
1954
+ ref: O == null ? void 0 : O.scrollRef,
1946
1955
  onScroll: (k) => {
1947
- F == null || F.onScroll(), N && o && mt(k.currentTarget);
1956
+ O == null || O.onScroll(), N && o && bt(k.currentTarget);
1948
1957
  },
1949
1958
  className: f.scroll,
1950
1959
  style: a ? { maxHeight: a } : void 0,
1951
- children: /* @__PURE__ */ O(
1960
+ children: /* @__PURE__ */ F(
1952
1961
  "table",
1953
1962
  {
1954
- ref: b,
1963
+ ref: v,
1955
1964
  role: N ? "treegrid" : void 0,
1956
- "data-depth": N ? R.length : void 0,
1957
- style: N ? { "--u-header-levels": R.length - 1 } : void 0,
1965
+ "data-depth": N ? q.length : void 0,
1966
+ style: N ? { "--u-header-levels": q.length - 1 } : void 0,
1958
1967
  "aria-label": d,
1959
- "aria-rowcount": F ? (C.lines ?? C.filtered).length + 1 + (be ? 1 : 0) : void 0,
1968
+ "aria-rowcount": O ? (C.lines ?? C.filtered).length + 1 + (ve ? 1 : 0) : void 0,
1960
1969
  "aria-busy": u || void 0,
1961
- className: G(
1970
+ className: B(
1962
1971
  f.table,
1963
- v === "compact" && f.compact,
1972
+ w === "compact" && f.compact,
1964
1973
  o && f.sticky,
1965
1974
  s && f.striped
1966
1975
  ),
1967
1976
  children: [
1968
- /* @__PURE__ */ l("thead", { children: /* @__PURE__ */ O("tr", { "aria-rowindex": F ? 1 : void 0, children: [
1977
+ /* @__PURE__ */ l("thead", { children: /* @__PURE__ */ F("tr", { "aria-rowindex": O ? 1 : void 0, children: [
1969
1978
  n && /* @__PURE__ */ l(
1970
1979
  "th",
1971
1980
  {
1972
1981
  scope: "col",
1973
- className: G(f.th, f.control, r && f.stickyCell),
1982
+ className: B(f.th, f.control, r && f.stickyCell),
1974
1983
  style: r ? { left: 0 } : void 0,
1975
1984
  children: /* @__PURE__ */ l(
1976
1985
  Ce,
@@ -1986,48 +1995,48 @@ function Wr({ registry: e, props: t }) {
1986
1995
  A && /* @__PURE__ */ l(
1987
1996
  "td",
1988
1997
  {
1989
- className: G(f.th, f.control, r && f.stickyCell),
1990
- style: r ? { left: (n ? 1 : 0) * Oe } : void 0
1998
+ className: B(f.th, f.control, r && f.stickyCell),
1999
+ style: r ? { left: (n ? 1 : 0) * Fe } : void 0
1991
2000
  }
1992
2001
  ),
1993
- B && (e.columnById(B.spec.id) === B ? /* @__PURE__ */ l(wt, { entry: B, registry: e, hook: y, sticky: !1, left: de }) : /* @__PURE__ */ l("th", { scope: "col", className: f.th, children: B.spec.label })),
1994
- q.map((k) => /* @__PURE__ */ l(
1995
- wt,
2002
+ I && (e.columnById(I.spec.id) === I ? /* @__PURE__ */ l(vt, { entry: I, registry: e, hook: _, sticky: !1, left: de }) : /* @__PURE__ */ l("th", { scope: "col", className: f.th, children: I.spec.label })),
2003
+ K.map((k) => /* @__PURE__ */ l(
2004
+ vt,
1996
2005
  {
1997
2006
  entry: k,
1998
2007
  registry: e,
1999
- hook: y,
2008
+ hook: _,
2000
2009
  sticky: fe(k),
2001
2010
  left: de
2002
2011
  },
2003
2012
  k.key
2004
2013
  )),
2005
- _.length > 0 && /* @__PURE__ */ l("th", { scope: "col", className: G(f.th, f.actionsCell), children: /* @__PURE__ */ l(Le, { children: m.rowActions }) })
2014
+ y.length > 0 && /* @__PURE__ */ l("th", { scope: "col", className: B(f.th, f.actionsCell), children: /* @__PURE__ */ l(Re, { children: m.rowActions }) })
2006
2015
  ] }) }),
2007
2016
  te,
2008
- be && /* @__PURE__ */ l("tfoot", { children: /* @__PURE__ */ O("tr", { "aria-rowindex": F ? (C.lines ?? C.filtered).length + 2 : void 0, children: [
2009
- Array.from({ length: ie }, (k, L) => /* @__PURE__ */ l(
2017
+ ve && /* @__PURE__ */ l("tfoot", { children: /* @__PURE__ */ F("tr", { "aria-rowindex": O ? (C.lines ?? C.filtered).length + 2 : void 0, children: [
2018
+ Array.from({ length: se }, (k, R) => /* @__PURE__ */ l(
2010
2019
  "td",
2011
2020
  {
2012
- className: G(f.td, f.control, r && f.stickyCell),
2013
- style: r ? { left: L * Oe } : void 0
2021
+ className: B(f.td, f.control, r && f.stickyCell),
2022
+ style: r ? { left: R * Fe } : void 0
2014
2023
  },
2015
- L
2024
+ R
2016
2025
  )),
2017
- B && /* @__PURE__ */ l("td", { className: f.td }),
2018
- q.map((k) => /* @__PURE__ */ l(
2026
+ I && /* @__PURE__ */ l("td", { className: f.td }),
2027
+ K.map((k) => /* @__PURE__ */ l(
2019
2028
  Ur,
2020
2029
  {
2021
2030
  entry: k,
2022
2031
  rows: C.filtered,
2023
- formats: w,
2032
+ formats: b,
2024
2033
  wording: m,
2025
2034
  sticky: fe(k),
2026
2035
  left: de
2027
2036
  },
2028
2037
  k.key
2029
2038
  )),
2030
- _.length > 0 && /* @__PURE__ */ l("td", { className: f.td })
2039
+ y.length > 0 && /* @__PURE__ */ l("td", { className: f.td })
2031
2040
  ] }) })
2032
2041
  ]
2033
2042
  }
@@ -2035,56 +2044,56 @@ function Wr({ registry: e, props: t }) {
2035
2044
  }
2036
2045
  );
2037
2046
  }
2038
- function mt(e) {
2047
+ function bt(e) {
2039
2048
  for (const t of Array.from(e.querySelectorAll("tbody > tr[data-line='header']"))) {
2040
2049
  const n = t.cells[t.cells.length - 1], o = !!n && n.getBoundingClientRect().top > t.getBoundingClientRect().top + 0.5;
2041
2050
  t.toggleAttribute("data-stuck", o);
2042
2051
  }
2043
2052
  }
2044
- function wt({
2053
+ function vt({
2045
2054
  entry: e,
2046
2055
  registry: t,
2047
2056
  hook: n,
2048
2057
  sticky: o,
2049
2058
  left: r
2050
2059
  }) {
2051
- const { spec: s } = e, i = n.publicSnapshot, a = t.kindOf(e, n.rows), c = Ot(a, s.rightAligned), u = t.isSortable(e, n.rows), h = s.id, d = i.sort.findIndex((x) => x.column === h), m = d === -1 ? void 0 : i.sort[d].direction, w = i.sort.length > 1 && d !== -1 ? d + 1 : void 0, v = i.widths[h], p = 48, b = (x) => {
2060
+ const { spec: s } = e, i = n.publicSnapshot, a = t.kindOf(e, n.rows), c = Je(a, s.rightAligned), u = t.isSortable(e, n.rows), h = s.id, d = i.sort.findIndex((x) => x.column === h), m = d === -1 ? void 0 : i.sort[d].direction, b = i.sort.length > 1 && d !== -1 ? d + 1 : void 0, w = i.widths[h], g = 48, v = (x) => {
2052
2061
  x.stopPropagation(), x.preventDefault();
2053
- const A = x.currentTarget, _ = A.closest("th");
2054
- if (!_) return;
2055
- const F = x.clientX, R = _.getBoundingClientRect().width, N = x.pointerId;
2062
+ const A = x.currentTarget, y = A.closest("th");
2063
+ if (!y) return;
2064
+ const O = x.clientX, q = y.getBoundingClientRect().width, N = x.pointerId;
2056
2065
  A.setPointerCapture(N);
2057
- const V = (B) => {
2058
- B.pointerId === N && i.setWidth(h, Math.max(p, R + (B.clientX - F)));
2059
- }, z = (B) => {
2060
- B.pointerId === N && (A.removeEventListener("pointermove", V), A.removeEventListener("pointerup", z), A.removeEventListener("pointercancel", z), A.hasPointerCapture(N) && A.releasePointerCapture(N));
2066
+ const M = (I) => {
2067
+ I.pointerId === N && i.setWidth(h, Math.max(g, q + (I.clientX - O)));
2068
+ }, E = (I) => {
2069
+ I.pointerId === N && (A.removeEventListener("pointermove", M), A.removeEventListener("pointerup", E), A.removeEventListener("pointercancel", E), A.hasPointerCapture(N) && A.releasePointerCapture(N));
2061
2070
  };
2062
- A.addEventListener("pointermove", V), A.addEventListener("pointerup", z), A.addEventListener("pointercancel", z);
2063
- }, g = (x) => {
2064
- const A = x == null ? void 0 : x.parentElement, _ = x == null ? void 0 : x.closest("table");
2065
- if (!x || !A || !_) return;
2066
- const F = Array.from(A.children).indexOf(x), R = A.children.length, N = { cell: x.style.width, table: _.style.width };
2067
- x.style.width = "", _.style.width = "auto";
2068
- let V = 0;
2069
- for (const z of Array.from(_.rows)) {
2070
- if (z.cells.length !== R) continue;
2071
- const B = z.cells[F];
2072
- B && (V = Math.max(V, B.scrollWidth));
2071
+ A.addEventListener("pointermove", M), A.addEventListener("pointerup", E), A.addEventListener("pointercancel", E);
2072
+ }, p = (x) => {
2073
+ const A = x == null ? void 0 : x.parentElement, y = x == null ? void 0 : x.closest("table");
2074
+ if (!x || !A || !y) return;
2075
+ const O = Array.from(A.children).indexOf(x), q = A.children.length, N = { cell: x.style.width, table: y.style.width };
2076
+ x.style.width = "", y.style.width = "auto";
2077
+ let M = 0;
2078
+ for (const E of Array.from(y.rows)) {
2079
+ if (E.cells.length !== q) continue;
2080
+ const I = E.cells[O];
2081
+ I && (M = Math.max(M, I.scrollWidth));
2073
2082
  }
2074
- x.style.width = N.cell, _.style.width = N.table, V > 0 && i.setWidth(h, Math.max(p, V + 1));
2075
- }, y = (x) => {
2083
+ x.style.width = N.cell, y.style.width = N.table, M > 0 && i.setWidth(h, Math.max(g, M + 1));
2084
+ }, _ = (x) => {
2076
2085
  if (!s.resizable || !x.altKey) return;
2077
- const A = x.key === "ArrowRight", _ = x.key === "ArrowLeft", F = x.key === "Home";
2078
- if (!A && !_ && !F) return;
2086
+ const A = x.key === "ArrowRight", y = x.key === "ArrowLeft", O = x.key === "Home";
2087
+ if (!A && !y && !O) return;
2079
2088
  x.preventDefault();
2080
- const R = x.currentTarget;
2081
- if (F) {
2082
- g(R);
2089
+ const q = x.currentTarget;
2090
+ if (O) {
2091
+ p(q);
2083
2092
  return;
2084
2093
  }
2085
- const N = R.getBoundingClientRect().width, V = x.shiftKey ? 32 : 8;
2086
- i.setWidth(h, Math.max(p, N + (A ? V : -V)));
2087
- }, S = u ? /* @__PURE__ */ O(
2094
+ const N = q.getBoundingClientRect().width, M = x.shiftKey ? 32 : 8;
2095
+ i.setWidth(h, Math.max(g, N + (A ? M : -M)));
2096
+ }, S = u ? /* @__PURE__ */ F(
2088
2097
  "button",
2089
2098
  {
2090
2099
  type: "button",
@@ -2092,42 +2101,42 @@ function wt({
2092
2101
  onClick: (x) => i.toggleSort(h, x.shiftKey || x.metaKey),
2093
2102
  children: [
2094
2103
  /* @__PURE__ */ l("span", { children: s.label }),
2095
- w !== void 0 && /* @__PURE__ */ l("span", { className: f.sortRank, "aria-hidden": "true", children: w }),
2096
- /* @__PURE__ */ l("span", { className: G(f.sortIndicator, m && f.sortActive), "aria-hidden": "true", children: m ? /* @__PURE__ */ l("svg", { viewBox: "0 0 10 10", width: "10", height: "10", "aria-hidden": "true", className: G(f.sortArrow, m === "desc" && f.sortArrowDesc), children: /* @__PURE__ */ l("path", { d: "M2.2 6.2 5 3.4l2.8 2.8", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) }) : (
2104
+ b !== void 0 && /* @__PURE__ */ l("span", { className: f.sortRank, "aria-hidden": "true", children: b }),
2105
+ /* @__PURE__ */ l("span", { className: B(f.sortIndicator, m && f.sortActive), "aria-hidden": "true", children: m ? /* @__PURE__ */ l("svg", { viewBox: "0 0 10 10", width: "10", height: "10", "aria-hidden": "true", className: B(f.sortArrow, m === "desc" && f.sortArrowDesc), children: /* @__PURE__ */ l("path", { d: "M2.2 6.2 5 3.4l2.8 2.8", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) }) : (
2097
2106
  /* Drawn in the nominal box and set in the 12 pixels the indicator
2098
2107
  has always taken, so that the head does not move. */
2099
2108
  /* @__PURE__ */ l("svg", { viewBox: "0 0 10 10", width: "10", height: "12", "aria-hidden": "true", children: /* @__PURE__ */ l("path", { d: "M2.8 3.7 5 1.5l2.2 2.2M2.8 6.3 5 8.5l2.2-2.2", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) })
2100
2109
  ) })
2101
2110
  ]
2102
2111
  }
2103
- ) : s.label, C = m === "asc" ? "ascending" : m === "desc" ? "descending" : "none", I = me(s.filter) !== void 0 && !(s.filter === "list" && a === "other");
2104
- return /* @__PURE__ */ O(
2112
+ ) : s.label, C = m === "asc" ? "ascending" : m === "desc" ? "descending" : "none", D = me(s.filter) !== void 0 && !(s.filter === "list" && a === "other");
2113
+ return /* @__PURE__ */ F(
2105
2114
  "th",
2106
2115
  {
2107
2116
  scope: "col",
2108
2117
  "data-column": h,
2109
2118
  "aria-sort": u ? C : void 0,
2110
2119
  tabIndex: s.resizable && !u ? 0 : void 0,
2111
- onKeyDown: y,
2112
- className: G(f.th, c && f.numeric, o && f.stickyCell),
2120
+ onKeyDown: _,
2121
+ className: B(f.th, c && f.numeric, o && f.stickyCell),
2113
2122
  style: {
2114
- ...v !== void 0 ? { width: v } : {},
2123
+ ...w !== void 0 ? { width: w } : {},
2115
2124
  ...o ? { left: r } : {}
2116
2125
  },
2117
2126
  children: [
2118
- I ? /* @__PURE__ */ O("span", { className: f.thFlex, children: [
2127
+ D ? /* @__PURE__ */ F("span", { className: f.thFlex, children: [
2119
2128
  S,
2120
- /* @__PURE__ */ l(vr, { entry: e, registry: t, hook: n })
2129
+ /* @__PURE__ */ l(wr, { entry: e, registry: t, hook: n })
2121
2130
  ] }) : S,
2122
2131
  s.resizable && /* @__PURE__ */ l(
2123
2132
  "span",
2124
2133
  {
2125
2134
  role: "presentation",
2126
2135
  className: f.grip,
2127
- onPointerDown: b,
2136
+ onPointerDown: v,
2128
2137
  onClick: (x) => x.stopPropagation(),
2129
2138
  onDoubleClick: (x) => {
2130
- x.stopPropagation(), g(x.currentTarget.closest("th"));
2139
+ x.stopPropagation(), p(x.currentTarget.closest("th"));
2131
2140
  }
2132
2141
  }
2133
2142
  )
@@ -2135,7 +2144,7 @@ function wt({
2135
2144
  }
2136
2145
  );
2137
2146
  }
2138
- function qr({
2147
+ function Wr({
2139
2148
  row: e,
2140
2149
  index: t,
2141
2150
  absolute: n,
@@ -2149,40 +2158,41 @@ function qr({
2149
2158
  rowHeaderLeft: h,
2150
2159
  columnCount: d,
2151
2160
  rowProps: m,
2152
- baseId: w,
2153
- formats: v,
2154
- wording: p,
2155
- line: b,
2156
- spanEntry: g
2161
+ baseId: b,
2162
+ formats: w,
2163
+ wording: g,
2164
+ line: v,
2165
+ spanEntry: p
2157
2166
  }) {
2158
- const y = Ue(Wt), S = r.publicSnapshot, C = r.rowKey(e), I = jr(e, i, r, v, p), x = o.detail, A = x !== null && S.expanded.includes(C), _ = `${w}-detail-${t}`, { className: F, ...R } = (m == null ? void 0 : m(e)) ?? {}, N = n !== void 0, V = b ? b.span ?? b.parents.at(-1) : void 0;
2159
- return /* @__PURE__ */ O(Q, { children: [
2160
- /* @__PURE__ */ O(
2167
+ const _ = Ue(Kt), S = r.publicSnapshot, C = r.rowKey(e), D = Hr(e, i, r, w, g), x = o.detail, A = x !== null && S.expanded.includes(C), y = `${b}-detail-${t}`, { className: O, ...q } = (m == null ? void 0 : m(e)) ?? {}, N = n !== void 0, M = v ? v.span ?? v.parents.at(-1) : void 0;
2168
+ return /* @__PURE__ */ F(Q, { children: [
2169
+ /* @__PURE__ */ F(
2161
2170
  "tr",
2162
2171
  {
2163
- ...R,
2164
- className: G(F, N && f.virtualRow),
2172
+ ...q,
2173
+ className: B(O, N && f.virtualRow),
2165
2174
  "data-row": N ? n : void 0,
2166
- "data-line": b ? "row" : void 0,
2175
+ "data-line": v ? "row" : void 0,
2167
2176
  "data-motion": C,
2168
- "data-group-first": b != null && b.first ? "" : void 0,
2169
- "data-group": V == null ? void 0 : V.path,
2170
- "aria-level": b ? b.parents.length + 1 : void 0,
2171
- "aria-posinset": V ? V.rows.indexOf(e) + 1 : void 0,
2172
- "aria-setsize": V == null ? void 0 : V.rows.length,
2173
- tabIndex: N ? n === y ? 0 : -1 : void 0,
2177
+ "data-selected": a && S.selection.isSelected(C) ? "" : void 0,
2178
+ "data-group-first": v != null && v.first ? "" : void 0,
2179
+ "data-group": M == null ? void 0 : M.path,
2180
+ "aria-level": v ? v.parents.length + 1 : void 0,
2181
+ "aria-posinset": M ? M.rows.indexOf(e) + 1 : void 0,
2182
+ "aria-setsize": M == null ? void 0 : M.rows.length,
2183
+ tabIndex: N ? n === _ ? 0 : -1 : void 0,
2174
2184
  "data-even": N && n % 2 === 1 ? "" : void 0,
2175
2185
  "aria-rowindex": N ? n + 2 : void 0,
2176
2186
  children: [
2177
2187
  a && /* @__PURE__ */ l(
2178
2188
  "td",
2179
2189
  {
2180
- className: G(f.td, f.control, u && f.stickyCell),
2190
+ className: B(f.td, f.control, u && f.stickyCell),
2181
2191
  style: u ? { left: 0 } : void 0,
2182
2192
  children: /* @__PURE__ */ l(
2183
2193
  Ce,
2184
2194
  {
2185
- "aria-label": p.selectRow(I),
2195
+ "aria-label": g.selectRow(D),
2186
2196
  checked: S.selection.isSelected(C),
2187
2197
  onChange: () => S.selection.toggle(C)
2188
2198
  }
@@ -2192,41 +2202,41 @@ function qr({
2192
2202
  x && /* @__PURE__ */ l(
2193
2203
  "td",
2194
2204
  {
2195
- className: G(f.td, f.control, u && f.stickyCell),
2196
- style: u ? { left: (a ? 1 : 0) * Oe } : void 0,
2205
+ className: B(f.td, f.control, u && f.stickyCell),
2206
+ style: u ? { left: (a ? 1 : 0) * Fe } : void 0,
2197
2207
  children: /* @__PURE__ */ l(
2198
2208
  "button",
2199
2209
  {
2200
2210
  type: "button",
2201
2211
  "aria-expanded": A,
2202
- "aria-controls": A ? _ : void 0,
2203
- "aria-label": A ? p.collapseRowNamed(I) : p.expandRowNamed(I),
2204
- className: G(f.expander, A && f.expanderOpen),
2212
+ "aria-controls": A ? y : void 0,
2213
+ "aria-label": A ? g.collapseRowNamed(D) : g.expandRowNamed(D),
2214
+ className: B(f.expander, A && f.expanderOpen),
2205
2215
  onClick: () => S.toggleRow(C),
2206
2216
  children: /* @__PURE__ */ l(tn, {})
2207
2217
  }
2208
2218
  )
2209
2219
  }
2210
2220
  ),
2211
- b && b.span && /* @__PURE__ */ l(Er, { line: { ...b, span: b.span }, entry: g, selectable: a, hook: r, formats: v, wording: p }),
2212
- s.map((z) => /* @__PURE__ */ l(
2221
+ v && v.span && /* @__PURE__ */ l(Gr, { line: { ...v, span: v.span }, entry: p, selectable: a, hook: r, formats: w, wording: g }),
2222
+ s.map((E) => /* @__PURE__ */ l(
2213
2223
  Yr,
2214
2224
  {
2215
- entry: z,
2225
+ entry: E,
2216
2226
  row: e,
2217
- kind: o.kindOf(z, r.rows),
2218
- sticky: u && z === i,
2227
+ kind: o.kindOf(E, r.rows),
2228
+ sticky: u && E === i,
2219
2229
  left: h,
2220
- formats: v,
2221
- wording: p
2230
+ formats: w,
2231
+ wording: g
2222
2232
  },
2223
- z.key
2233
+ E.key
2224
2234
  )),
2225
- c.length > 0 && /* @__PURE__ */ l("td", { className: G(f.td, f.actionsCell), children: /* @__PURE__ */ l(Xr, { actions: c, row: e, name: I, wording: p }) })
2235
+ c.length > 0 && /* @__PURE__ */ l("td", { className: B(f.td, f.actionsCell), children: /* @__PURE__ */ l(Xr, { actions: c, row: e, name: D, wording: g }) })
2226
2236
  ]
2227
2237
  }
2228
2238
  ),
2229
- A && x && /* @__PURE__ */ l("tr", { id: _, className: f.detailRow, "data-group": V == null ? void 0 : V.path, children: /* @__PURE__ */ l("td", { colSpan: d, className: f.detailCell, children: x.presentation(e) }) })
2239
+ A && x && /* @__PURE__ */ l("tr", { id: y, className: f.detailRow, "data-group": M == null ? void 0 : M.path, children: /* @__PURE__ */ l("td", { colSpan: d, className: f.detailCell, children: x.presentation(e) }) })
2230
2240
  ] });
2231
2241
  }
2232
2242
  function Yr({
@@ -2238,15 +2248,15 @@ function Yr({
2238
2248
  formats: s,
2239
2249
  wording: i
2240
2250
  }) {
2241
- const { spec: a } = e, c = e.read(t), u = Ot(n, a.rightAligned);
2251
+ const { spec: a } = e, c = e.read(t), u = Je(n, a.rightAligned);
2242
2252
  let h;
2243
- Y(c) ? h = /* @__PURE__ */ l(jt, { wording: i }) : a.presentation ? h = a.presentation(c, t) : h = ye(c, a.format, s, i);
2253
+ Y(c) ? h = /* @__PURE__ */ l(Ht, { wording: i }) : a.presentation ? h = a.presentation(c, t) : h = ye(c, a.format, s, i);
2244
2254
  const d = a.rowHeader ? "th" : "td";
2245
2255
  return /* @__PURE__ */ l(
2246
2256
  d,
2247
2257
  {
2248
2258
  scope: a.rowHeader ? "row" : void 0,
2249
- className: G(f.td, u && f.numeric, a.rowHeader && f.rowHeader, o && f.stickyCell),
2259
+ className: B(f.td, u && f.numeric, a.rowHeader && f.rowHeader, o && f.stickyCell),
2250
2260
  style: o ? { left: r } : void 0,
2251
2261
  children: h
2252
2262
  }
@@ -2261,9 +2271,9 @@ function Ur({
2261
2271
  left: s
2262
2272
  }) {
2263
2273
  const i = r ? { left: s } : void 0;
2264
- if (!e.spec.aggregate) return /* @__PURE__ */ l("td", { className: G(f.td, r && f.stickyCell), style: i });
2274
+ if (!e.spec.aggregate) return /* @__PURE__ */ l("td", { className: B(f.td, r && f.stickyCell), style: i });
2265
2275
  const a = typeof e.spec.aggregate == "function" ? "own" : e.spec.aggregate;
2266
- return /* @__PURE__ */ l("td", { className: G(f.td, $t(e, t) && f.numeric, r && f.stickyCell), style: i, "data-footer": a, children: /* @__PURE__ */ l(Ke, { entry: e, rows: t, formats: n, wording: o, signed: !0 }) });
2276
+ return /* @__PURE__ */ l("td", { className: B(f.td, jt(e, t) && f.numeric, r && f.stickyCell), style: i, "data-footer": a, children: /* @__PURE__ */ l($e, { entry: e, rows: t, formats: n, wording: o, signed: !0 }) });
2267
2277
  }
2268
2278
  const Jr = 2;
2269
2279
  function Xr({
@@ -2287,53 +2297,53 @@ function Xr({
2287
2297
  },
2288
2298
  s
2289
2299
  )) }) : /* @__PURE__ */ l("div", { className: f.actions, children: /* @__PURE__ */ l(
2290
- At,
2300
+ Tt,
2291
2301
  {
2292
2302
  align: "end",
2293
2303
  trigger: /* @__PURE__ */ l(ee, { size: "sm", variant: "ghost", "aria-label": o.rowActionsMenu(n), children: "⋯" }),
2294
- children: e.map(({ key: s, spec: i }) => /* @__PURE__ */ l(Fe, { tone: i.tone, onSelect: () => r(i), children: i.label }, s))
2304
+ children: e.map(({ key: s, spec: i }) => /* @__PURE__ */ l(Oe, { tone: i.tone, onSelect: () => r(i), children: i.label }, s))
2295
2305
  }
2296
2306
  ) });
2297
2307
  }
2298
- function Qr({ columns: e, rows: t = 4 }) {
2299
- const n = [72, 48, 60, 40, 56, 64];
2300
- return /* @__PURE__ */ l(Q, { children: Array.from({ length: t }, (o, r) => /* @__PURE__ */ l("tr", { "aria-hidden": "true", children: Array.from({ length: e }, (s, i) => /* @__PURE__ */ l("td", { className: f.td, children: /* @__PURE__ */ l("span", { className: f.skeleton, style: { width: `${n[(r + i) % n.length]}%` } }) }, i)) }, r)) });
2308
+ function Qr({ columns: e, rightAligned: t = [], rows: n = 4 }) {
2309
+ const o = [72, 48, 60, 40, 56, 64];
2310
+ return /* @__PURE__ */ l(Q, { children: Array.from({ length: n }, (r, s) => /* @__PURE__ */ l("tr", { "aria-hidden": "true", children: Array.from({ length: e }, (i, a) => /* @__PURE__ */ l("td", { className: B(f.td, t[a] && f.numeric), children: /* @__PURE__ */ l("span", { className: f.skeleton, style: { width: `${o[(s + a) % o.length]}%` } }) }, a)) }, s)) });
2301
2311
  }
2302
- const Wt = kt(0);
2303
- function bt({ height: e, colSpan: t }) {
2312
+ const Kt = St(0);
2313
+ function wt({ height: e, colSpan: t }) {
2304
2314
  return e <= 0 ? null : /* @__PURE__ */ l("tr", { "aria-hidden": "true", "data-filler": "", className: f.fillerRow, children: /* @__PURE__ */ l("td", { colSpan: t, style: { height: e } }) });
2305
2315
  }
2306
- function vt({
2316
+ function _t({
2307
2317
  virtual: e,
2308
2318
  colSpan: t,
2309
2319
  children: n
2310
2320
  }) {
2311
- const { count: o, fillerBefore: r, fillerAfter: s, showRow: i } = e, a = re(null), [c, u] = j(0), h = (w, v) => {
2312
- a.current = v, u(v), i(v), requestAnimationFrame(() => {
2313
- var p;
2314
- (p = w.querySelector(`[data-row="${v}"]`)) == null || p.focus();
2321
+ const { count: o, fillerBefore: r, fillerAfter: s, showRow: i } = e, a = re(null), [c, u] = H(0), h = (b, w) => {
2322
+ a.current = w, u(w), i(w), requestAnimationFrame(() => {
2323
+ var g;
2324
+ (g = b.querySelector(`[data-row="${w}"]`)) == null || g.focus();
2315
2325
  });
2316
- }, d = c >= e.from && c < e.to ? c : e.from, m = (w) => {
2317
- if (w.defaultPrevented || o === 0) return;
2318
- const v = w.target, p = v.closest("[data-row]");
2319
- if (p && v !== p) return;
2320
- const b = p ? Number(p.dataset.row) : a.current ?? -1;
2321
- let g = null;
2322
- w.key === "ArrowDown" ? g = Math.min(o - 1, b + 1) : w.key === "ArrowUp" ? g = Math.max(0, b - 1) : w.key === "Home" ? g = 0 : w.key === "End" && (g = o - 1), !(g === null || g === b) && (w.preventDefault(), h(w.currentTarget, g));
2326
+ }, d = c >= e.from && c < e.to ? c : e.from, m = (b) => {
2327
+ if (b.defaultPrevented || o === 0) return;
2328
+ const w = b.target, g = w.closest("[data-row]");
2329
+ if (g && w !== g) return;
2330
+ const v = g ? Number(g.dataset.row) : a.current ?? -1;
2331
+ let p = null;
2332
+ b.key === "ArrowDown" ? p = Math.min(o - 1, v + 1) : b.key === "ArrowUp" ? p = Math.max(0, v - 1) : b.key === "Home" ? p = 0 : b.key === "End" && (p = o - 1), !(p === null || p === v) && (b.preventDefault(), h(b.currentTarget, p));
2323
2333
  };
2324
2334
  return /* @__PURE__ */ l(
2325
2335
  "tbody",
2326
2336
  {
2327
2337
  className: f.virtualBody,
2328
2338
  onKeyDown: m,
2329
- onFocus: (w) => {
2330
- const v = w.target.closest("[data-row]");
2331
- v && u(Number(v.dataset.row));
2339
+ onFocus: (b) => {
2340
+ const w = b.target.closest("[data-row]");
2341
+ w && u(Number(w.dataset.row));
2332
2342
  },
2333
- children: /* @__PURE__ */ O(Wt.Provider, { value: d, children: [
2334
- /* @__PURE__ */ l(bt, { height: r, colSpan: t }),
2343
+ children: /* @__PURE__ */ F(Kt.Provider, { value: d, children: [
2344
+ /* @__PURE__ */ l(wt, { height: r, colSpan: t }),
2335
2345
  n,
2336
- /* @__PURE__ */ l(bt, { height: s, colSpan: t })
2346
+ /* @__PURE__ */ l(wt, { height: s, colSpan: t })
2337
2347
  ] })
2338
2348
  }
2339
2349
  );
@@ -2343,7 +2353,7 @@ const Zr = "_verdict_1mxfd_6", es = "_glyph_1mxfd_13", ts = "_value_1mxfd_23", n
2343
2353
  glyph: es,
2344
2354
  value: ts,
2345
2355
  excess: ns
2346
- }, _t = (e, t, n) => t === "percent" ? n.percent(e) : t === "count" ? n.count(e) : n.number(e, typeof t == "object" ? t.decimals : void 0), os = (e, t) => e === "alarm" ? t.verdictAlarm : e === "warning" ? t.verdictWarning : e === "unknown" ? t.verdictUnknown : t.verdictOk, rs = {
2356
+ }, yt = (e, t, n) => t === "percent" ? n.percent(e) : t === "count" ? n.count(e) : n.number(e, typeof t == "object" ? t.decimals : void 0), os = (e, t) => e === "alarm" ? t.verdictAlarm : e === "warning" ? t.verdictWarning : e === "unknown" ? t.verdictUnknown : t.verdictOk, rs = {
2347
2357
  ok: "✓",
2348
2358
  unknown: "?",
2349
2359
  warning: "▲",
@@ -2351,33 +2361,33 @@ const Zr = "_verdict_1mxfd_6", es = "_glyph_1mxfd_13", ts = "_value_1mxfd_23", n
2351
2361
  };
2352
2362
  function ss({ reading: e, format: t }) {
2353
2363
  const n = ue(), o = U(), { measured: r, assessment: s } = e, i = os(s.verdict, o);
2354
- return /* @__PURE__ */ O("span", { className: Te.verdict, "data-verdict": s.verdict, title: i, children: [
2364
+ return /* @__PURE__ */ F("span", { className: Te.verdict, "data-verdict": s.verdict, title: i, children: [
2355
2365
  /* @__PURE__ */ l("span", { "aria-hidden": "true", className: Te.glyph, children: rs[s.verdict] }),
2356
- /* @__PURE__ */ l("span", { className: Te.value, children: r === null ? o.statAbsentValue : _t(r, t, n) }),
2357
- s.excess !== void 0 && /* @__PURE__ */ O("span", { className: Te.excess, children: [
2366
+ /* @__PURE__ */ l("span", { className: Te.value, children: r === null ? o.statAbsentValue : yt(r, t, n) }),
2367
+ s.excess !== void 0 && /* @__PURE__ */ F("span", { className: Te.excess, children: [
2358
2368
  "+",
2359
- _t(s.excess, t, n)
2369
+ yt(s.excess, t, n)
2360
2370
  ] }),
2361
- /* @__PURE__ */ l(Le, { children: i })
2371
+ /* @__PURE__ */ l(Re, { children: i })
2362
2372
  ] });
2363
2373
  }
2364
2374
  const is = (e) => e.measured, as = (e) => e.reduce(
2365
- (t, n) => !t || Ee(n.assessment.verdict) > Ee(t.assessment.verdict) ? n : t,
2375
+ (t, n) => !t || Ge(n.assessment.verdict) > Ge(t.assessment.verdict) ? n : t,
2366
2376
  void 0
2367
2377
  );
2368
2378
  function ls(e) {
2369
2379
  return function({ id: n, value: o, label: r, limits: s, format: i, sortBy: a = "verdict", width: c, resizable: u, aggregate: h }) {
2370
- const d = JSON.stringify(s), m = $(() => {
2371
- const v = JSON.parse(d);
2372
- return (p) => {
2373
- const b = typeof o == "string" ? p == null ? void 0 : p[o] : o(p);
2380
+ const d = JSON.stringify(s), m = j(() => {
2381
+ const w = JSON.parse(d);
2382
+ return (g) => {
2383
+ const v = typeof o == "string" ? g == null ? void 0 : g[o] : o(g);
2374
2384
  return {
2375
- measured: typeof b == "number" && Number.isFinite(b) ? b : null,
2376
- assessment: nn(b, v)
2385
+ measured: typeof v == "number" && Number.isFinite(v) ? v : null,
2386
+ assessment: nn(v, w)
2377
2387
  };
2378
2388
  };
2379
- }, [o, d]), w = X(
2380
- (v) => a === "value" ? v.measured : Ee(v.assessment.verdict),
2389
+ }, [o, d]), b = X(
2390
+ (w) => a === "value" ? w.measured : Ge(w.assessment.verdict),
2381
2391
  [a]
2382
2392
  );
2383
2393
  return /* @__PURE__ */ l(
@@ -2389,23 +2399,23 @@ function ls(e) {
2389
2399
  width: c,
2390
2400
  resizable: u,
2391
2401
  value: m,
2392
- sortValue: w,
2402
+ sortValue: b,
2393
2403
  exportValue: is,
2394
2404
  aggregate: h === "worst" ? as : void 0,
2395
- children: (v) => /* @__PURE__ */ l(ss, { reading: v, format: i })
2405
+ children: (w) => /* @__PURE__ */ l(ss, { reading: w, format: i })
2396
2406
  }
2397
2407
  );
2398
2408
  };
2399
2409
  }
2400
- const qt = (e) => pe(
2410
+ const Wt = (e) => ge(
2401
2411
  `condition-foreign:${e}`,
2402
2412
  `The condition for "${e}" is not of the kind of its filter and is passed over.`
2403
2413
  );
2404
2414
  function Yt(e, t, n) {
2405
2415
  const o = e.columnById(t), r = o ? me(o.spec.filter) : void 0;
2406
2416
  if (!r) return !1;
2407
- const s = Dt(r, n);
2408
- return s === "foreign" && qt(t), s === "effective";
2417
+ const s = Vt(r, n);
2418
+ return s === "foreign" && Wt(t), s === "effective";
2409
2419
  }
2410
2420
  function cs(e, t) {
2411
2421
  if (e.length === 0) return;
@@ -2425,7 +2435,7 @@ function cs(e, t) {
2425
2435
  };
2426
2436
  }
2427
2437
  function us(e, t) {
2428
- const n = $(() => t ? e.filter((i) => t(i)) : e, [e, t]), [o, r] = j(() => ({ source: e, result: n }));
2438
+ const n = j(() => t ? e.filter((i) => t(i)) : e, [e, t]), [o, r] = H(() => ({ source: e, result: n }));
2429
2439
  if (!t) return e;
2430
2440
  const s = o.source === e && (o.result === n || o.result.length === n.length && o.result.every((i, a) => i === n[a]));
2431
2441
  return s || r({ source: e, result: n }), s ? o.result : n;
@@ -2433,7 +2443,7 @@ function us(e, t) {
2433
2443
  function ds(e, t) {
2434
2444
  var a, c, u, h, d, m;
2435
2445
  if (t.size === 0) return e;
2436
- const n = (a = e.sort) == null ? void 0 : a.filter((w) => t.has(w.column)), o = (c = e.hidden) == null ? void 0 : c.filter((w) => t.has(w)), r = (u = e.order) == null ? void 0 : u.filter((w) => t.has(w)), s = e.widths ? Object.fromEntries(Object.entries(e.widths).filter(([w]) => t.has(w))) : void 0;
2446
+ const n = (a = e.sort) == null ? void 0 : a.filter((b) => t.has(b.column)), o = (c = e.hidden) == null ? void 0 : c.filter((b) => t.has(b)), r = (u = e.order) == null ? void 0 : u.filter((b) => t.has(b)), s = e.widths ? Object.fromEntries(Object.entries(e.widths).filter(([b]) => t.has(b))) : void 0;
2437
2447
  return (n == null ? void 0 : n.length) === ((h = e.sort) == null ? void 0 : h.length) && (o == null ? void 0 : o.length) === ((d = e.hidden) == null ? void 0 : d.length) && (r == null ? void 0 : r.length) === ((m = e.order) == null ? void 0 : m.length) && Object.keys(s ?? {}).length === Object.keys(e.widths ?? {}).length ? e : {
2438
2448
  ...e.search ? { search: e.search } : {},
2439
2449
  ...e.page ? { page: e.page } : {},
@@ -2444,8 +2454,8 @@ function ds(e, t) {
2444
2454
  ...s && Object.keys(s).length ? { widths: s } : {}
2445
2455
  };
2446
2456
  }
2447
- const Ge = (e) => e === void 0 ? [] : typeof e == "string" ? [e] : [...e], fs = (e, t) => e.length === t.length && e.every((n, o) => n === t[o]);
2448
- function yt(e) {
2457
+ const Be = (e) => e === void 0 ? [] : typeof e == "string" ? [e] : [...e], fs = (e, t) => e.length === t.length && e.every((n, o) => n === t[o]);
2458
+ function kt(e) {
2449
2459
  const t = [], n = (o) => {
2450
2460
  for (const r of o)
2451
2461
  t.push(r.path), n(r.groups);
@@ -2453,24 +2463,24 @@ function yt(e) {
2453
2463
  return n(e ?? []), t;
2454
2464
  }
2455
2465
  const hs = (e, t) => e.size === t.size && [...e].every((n) => t.has(n));
2456
- function gs(e, t) {
2466
+ function ps(e, t) {
2457
2467
  const n = {};
2458
2468
  for (const o of e) o.width !== void 0 && (n[o.id] = o.width);
2459
2469
  return { ...n, ...t };
2460
2470
  }
2461
- function ps(e, t) {
2462
- const [n] = j(() => new pr()), [o] = j(() => {
2463
- const k = $r(n);
2471
+ function gs(e, t) {
2472
+ const [n] = H(() => new gr()), [o] = H(() => {
2473
+ const k = jr(n);
2464
2474
  return { ...k, VerdictColumn: ls(k.Column) };
2465
2475
  });
2466
- Re(n.subscribe, n.structureVersion, n.structureVersion);
2467
- const r = ue(), s = e, i = n.modelColumns(s, r), [a] = j(() => t.initialView), [c, u] = j(() => Object.entries((a == null ? void 0 : a.conditions) ?? {})), h = $(() => cs(c, n), [c, n]), d = t.preFilter ?? t.filter, m = us(s, d), [w, v] = j(
2468
- () => a != null && a.grouping ? [...a.grouping] : Ge(t.defaultGrouping)
2469
- ), [p, b] = j(() => (a == null ? void 0 : a.folded) ?? []), g = n.orderedColumns().length + n.groupKeys.entries.size > 0, y = g ? n.effectiveGrouping(w, s) : w.slice(0, Qe), S = y.join("|"), C = $(() => new Set(p), [p]), I = y.length ? n.groupingModel(y, s) : null, x = $(
2470
- () => I && I.levels.length ? { ...I, folded: C, compareText: r.compareText } : void 0,
2476
+ qe(n.subscribe, n.structureVersion, n.structureVersion);
2477
+ const r = ue(), s = e, i = n.modelColumns(s, r), [a] = H(() => t.initialView), [c, u] = H(() => Object.entries((a == null ? void 0 : a.conditions) ?? {})), h = j(() => cs(c, n), [c, n]), d = t.preFilter ?? t.filter, m = us(s, d), [b, w] = H(
2478
+ () => a != null && a.grouping ? [...a.grouping] : Be(t.defaultGrouping)
2479
+ ), [g, v] = H(() => (a == null ? void 0 : a.folded) ?? []), p = n.orderedColumns().length + n.groupKeys.entries.size > 0, _ = p ? n.effectiveGrouping(b, s) : b.slice(0, Ze), S = _.join("|"), C = j(() => new Set(g), [g]), D = _.length ? n.groupingModel(_, s) : null, x = j(
2480
+ () => D && D.levels.length ? { ...D, folded: C, compareText: r.compareText } : void 0,
2471
2481
  // eslint-disable-next-line react-hooks/exhaustive-deps -- the model's identity carries the ids and the columns
2472
- [I, C, r.compareText, S]
2473
- ), A = t.rowKey, _ = _n(m, i, {
2482
+ [D, C, r.compareText, S]
2483
+ ), A = t.rowKey, y = _n(m, i, {
2474
2484
  rowKey: A,
2475
2485
  pageSize: t.pageSize,
2476
2486
  defaultSort: t.defaultSort,
@@ -2478,78 +2488,78 @@ function ps(e, t) {
2478
2488
  initialView: a,
2479
2489
  virtual: t.virtual,
2480
2490
  grouping: x
2481
- }), { setPage: F } = _, R = X(
2482
- (k, L) => {
2483
- let K = L == null;
2484
- if (!K && n.orderedColumns().length > 0) {
2485
- const H = n.columnById(k), M = H ? me(H.spec.filter) : void 0;
2486
- if (!M) {
2487
- pe(
2491
+ }), { setPage: O } = y, q = X(
2492
+ (k, R) => {
2493
+ let $ = R == null;
2494
+ if (!$ && n.orderedColumns().length > 0) {
2495
+ const z = n.columnById(k), L = z ? me(z.spec.filter) : void 0;
2496
+ if (!L) {
2497
+ ge(
2488
2498
  `condition-without-filter:${k}`,
2489
- H ? `The column "${k}" has no filter; its condition is passed over.` : `No column is called "${k}"; its condition is passed over.`
2499
+ z ? `The column "${k}" has no filter; its condition is passed over.` : `No column is called "${k}"; its condition is passed over.`
2490
2500
  );
2491
2501
  return;
2492
2502
  }
2493
- const J = Dt(M, L);
2503
+ const J = Vt(L, R);
2494
2504
  if (J === "foreign") {
2495
- qt(k);
2505
+ Wt(k);
2496
2506
  return;
2497
2507
  }
2498
- K = J === "empty";
2508
+ $ = J === "empty";
2499
2509
  }
2500
- u((H) => {
2501
- const M = H.findIndex(([J]) => J === k);
2502
- return K ? M === -1 ? H : H.filter((J, Z) => Z !== M) : M === -1 ? [...H, [k, L]] : H.map((J, Z) => Z === M ? [k, L] : J);
2503
- }), F(1);
2510
+ u((z) => {
2511
+ const L = z.findIndex(([J]) => J === k);
2512
+ return $ ? L === -1 ? z : z.filter((J, Z) => Z !== L) : L === -1 ? [...z, [k, R]] : z.map((J, Z) => Z === L ? [k, R] : J);
2513
+ }), O(1);
2504
2514
  },
2505
- [n, F]
2506
- ), N = new Set(n.orderedColumns().map((k) => k.spec.id)), [V, z] = j(() => /* @__PURE__ */ new Set());
2507
- if (!hs(V, N)) {
2508
- const k = new Set([...V].filter((L) => !N.has(L)));
2509
- z(N), c.some(([L]) => k.has(L)) && u((L) => L.filter(([K]) => !k.has(K)));
2510
- }
2511
- const B = N.size === 0 ? c : c.filter(([k, L]) => Yt(n, k, L)), q = ds(_.view, N), ie = B.length > 0 ? { ...q, conditions: Object.fromEntries(B) } : q, ae = N.size === 0 ? _.sort : _.sort.filter((k) => N.has(k.column)), de = g ? n.effectiveGrouping(Ge(t.defaultGrouping), s) : Ge(t.defaultGrouping), fe = _.groups ? hn(_.groups, p) : g ? [] : [...p], we = {
2512
- ...ie,
2513
- ...fs(y, de) ? {} : { grouping: y },
2515
+ [n, O]
2516
+ ), N = new Set(n.orderedColumns().map((k) => k.spec.id)), [M, E] = H(() => /* @__PURE__ */ new Set());
2517
+ if (!hs(M, N)) {
2518
+ const k = new Set([...M].filter((R) => !N.has(R)));
2519
+ E(N), c.some(([R]) => k.has(R)) && u((R) => R.filter(([$]) => !k.has($)));
2520
+ }
2521
+ const I = N.size === 0 ? c : c.filter(([k, R]) => Yt(n, k, R)), K = ds(y.view, N), se = I.length > 0 ? { ...K, conditions: Object.fromEntries(I) } : K, ae = N.size === 0 ? y.sort : y.sort.filter((k) => N.has(k.column)), de = p ? n.effectiveGrouping(Be(t.defaultGrouping), s) : Be(t.defaultGrouping), fe = y.groups ? hn(y.groups, g) : p ? [] : [...g], be = {
2522
+ ...se,
2523
+ ...fs(_, de) ? {} : { grouping: _ },
2514
2524
  ...fe.length ? { folded: fe } : {}
2515
- }, be = (k) => {
2516
- v([...k]), F(1);
2525
+ }, ve = (k) => {
2526
+ w([...k]), O(1);
2517
2527
  }, ke = (k) => {
2518
- yt(_.groups).includes(k) && (n.noteFocusBeforeFold(), b((L) => L.includes(k) ? L.filter((K) => K !== k) : [...L, k]));
2528
+ kt(y.groups).includes(k) && (n.noteFocusBeforeFold(), v((R) => R.includes(k) ? R.filter(($) => $ !== k) : [...R, k]));
2519
2529
  }, le = n.paginates() || t.virtual !== void 0, te = {
2520
2530
  rows: e,
2521
- filtered: _.filtered,
2522
- visible: le ? _.visible : _.filtered,
2523
- page: le ? _.page : 1,
2524
- pageCount: le ? _.pageCount : 1,
2525
- pageSize: _.pageSize,
2526
- setPage: _.setPage,
2527
- setPageSize: _.setPageSize,
2528
- search: _.search,
2529
- setSearch: _.setSearch,
2531
+ filtered: y.filtered,
2532
+ visible: le ? y.visible : y.filtered,
2533
+ page: le ? y.page : 1,
2534
+ pageCount: le ? y.pageCount : 1,
2535
+ pageSize: y.pageSize,
2536
+ setPage: y.setPage,
2537
+ setPageSize: y.setPageSize,
2538
+ search: y.search,
2539
+ setSearch: y.setSearch,
2530
2540
  sort: ae,
2531
- toggleSort: _.toggleSort,
2532
- hidden: _.hidden,
2533
- toggleColumn: _.toggleColumn,
2534
- order: _.order,
2535
- setOrder: _.setOrder,
2536
- widths: gs(i, _.widths),
2537
- setWidth: _.setWidth,
2538
- expanded: _.expanded,
2539
- toggleRow: _.toggleRow,
2540
- filter: Object.fromEntries(B),
2541
- setFilter: R,
2542
- selection: t.selection ?? _.selection,
2543
- view: we,
2544
- grouping: y,
2545
- setGrouping: be,
2541
+ toggleSort: y.toggleSort,
2542
+ hidden: y.hidden,
2543
+ toggleColumn: y.toggleColumn,
2544
+ order: y.order,
2545
+ setOrder: y.setOrder,
2546
+ widths: ps(i, y.widths),
2547
+ setWidth: y.setWidth,
2548
+ expanded: y.expanded,
2549
+ toggleRow: y.toggleRow,
2550
+ filter: Object.fromEntries(I),
2551
+ setFilter: q,
2552
+ selection: t.selection ?? y.selection,
2553
+ view: be,
2554
+ grouping: _,
2555
+ setGrouping: ve,
2546
2556
  folded: fe,
2547
2557
  toggleFold: ke,
2548
2558
  foldAll: () => {
2549
- n.noteFocusBeforeFold(), b(yt(_.groups));
2559
+ n.noteFocusBeforeFold(), v(kt(y.groups));
2550
2560
  },
2551
2561
  unfoldAll: () => {
2552
- n.noteFocusBeforeFold(), b([]);
2562
+ n.noteFocusBeforeFold(), v([]);
2553
2563
  },
2554
2564
  asCsv: () => Ar(n),
2555
2565
  virtual: t.virtual !== void 0
@@ -2558,7 +2568,7 @@ function ps(e, t) {
2558
2568
  rows: s,
2559
2569
  admitted: m,
2560
2570
  modelColumns: i,
2561
- companion: _,
2571
+ companion: y,
2562
2572
  filter: h,
2563
2573
  grouping: x,
2564
2574
  folded: C,
@@ -2570,8 +2580,8 @@ function ps(e, t) {
2570
2580
  function Qs(e) {
2571
2581
  return e;
2572
2582
  }
2573
- function nt(e, t) {
2574
- const n = se();
2583
+ function ot(e, t) {
2584
+ const n = ie();
2575
2585
  e == null || e.register(t, n), W(() => {
2576
2586
  if (e)
2577
2587
  return e.register(t, n), e.commit(), () => {
@@ -2581,13 +2591,13 @@ function nt(e, t) {
2581
2591
  }
2582
2592
  function Zs({ children: e, className: t, of: n }) {
2583
2593
  const o = xe(n);
2584
- nt(o == null ? void 0 : o.registry, "toolbar");
2594
+ ot(o == null ? void 0 : o.registry, "toolbar");
2585
2595
  const r = o == null ? void 0 : o.registry;
2586
- return /* @__PURE__ */ l(Ht, { registry: r ?? null, className: t, children: e });
2596
+ return /* @__PURE__ */ l(zt, { registry: r ?? null, className: t, children: e });
2587
2597
  }
2588
2598
  function ei({ placeholder: e, "aria-label": t, className: n, of: o }) {
2589
2599
  const r = xe(o), s = U();
2590
- if (nt(r == null ? void 0 : r.registry, "search"), !r) return null;
2600
+ if (ot(r == null ? void 0 : r.registry, "search"), !r) return null;
2591
2601
  const { snapshot: i } = r;
2592
2602
  return /* @__PURE__ */ l(
2593
2603
  rn,
@@ -2605,25 +2615,25 @@ function ei({ placeholder: e, "aria-label": t, className: n, of: o }) {
2605
2615
  );
2606
2616
  }
2607
2617
  function ti({ of: e }) {
2608
- var b;
2609
- const t = xe(e), n = U(), [o, r] = j(!1), s = re(null), i = re(null), a = se(), [c, u] = j(null);
2618
+ var v;
2619
+ const t = xe(e), n = U(), [o, r] = H(!1), s = re(null), i = re(null), a = ie(), [c, u] = H(null);
2610
2620
  if (W(() => {
2611
2621
  var C;
2612
2622
  if (!c || !i.current) return;
2613
- const g = Array.from(i.current.children).find(
2614
- (I) => I.dataset.column === c.id
2615
- ), y = g == null ? void 0 : g.querySelector(`[data-direction="${c.direction}"]`), S = g == null ? void 0 : g.querySelector(
2623
+ const p = Array.from(i.current.children).find(
2624
+ (D) => D.dataset.column === c.id
2625
+ ), _ = p == null ? void 0 : p.querySelector(`[data-direction="${c.direction}"]`), S = p == null ? void 0 : p.querySelector(
2616
2626
  `[data-direction="${c.direction === "forward" ? "backward" : "forward"}"]`
2617
2627
  );
2618
- (C = y && !y.disabled ? y : S) == null || C.focus();
2628
+ (C = _ && !_.disabled ? _ : S) == null || C.focus();
2619
2629
  }, [c]), !t) return null;
2620
- const { registry: h, snapshot: d } = t, m = h.hook, w = h.withStickyHeaderFirst(
2621
- et(h.modelColumns(m.rows, m.formats), d.order)
2622
- ), v = h.stickyRowHeader ? ((b = w[0]) == null ? void 0 : b.hideable) === !1 : !1, p = (g, y) => {
2623
- const S = w.map((I) => I.id), C = g + y;
2624
- C < 0 || C >= S.length || ([S[g], S[C]] = [S[C], S[g]], d.setOrder(S), u({ id: w[g].id, direction: y < 0 ? "forward" : "backward" }));
2630
+ const { registry: h, snapshot: d } = t, m = h.hook, b = h.withStickyHeaderFirst(
2631
+ tt(h.modelColumns(m.rows, m.formats), d.order)
2632
+ ), w = h.stickyRowHeader ? ((v = b[0]) == null ? void 0 : v.hideable) === !1 : !1, g = (p, _) => {
2633
+ const S = b.map((D) => D.id), C = p + _;
2634
+ C < 0 || C >= S.length || ([S[p], S[C]] = [S[C], S[p]], d.setOrder(S), u({ id: b[p].id, direction: _ < 0 ? "forward" : "backward" }));
2625
2635
  };
2626
- return /* @__PURE__ */ O(Q, { children: [
2636
+ return /* @__PURE__ */ F(Q, { children: [
2627
2637
  /* @__PURE__ */ l(
2628
2638
  ee,
2629
2639
  {
@@ -2636,8 +2646,8 @@ function ti({ of: e }) {
2636
2646
  children: n.columns
2637
2647
  }
2638
2648
  ),
2639
- /* @__PURE__ */ O(
2640
- Ct,
2649
+ /* @__PURE__ */ F(
2650
+ Nt,
2641
2651
  {
2642
2652
  open: o,
2643
2653
  onOpenChange: r,
@@ -2648,16 +2658,16 @@ function ti({ of: e }) {
2648
2658
  id: a,
2649
2659
  className: f.columnsPanel,
2650
2660
  children: [
2651
- /* @__PURE__ */ l("ul", { ref: i, className: f.columnsList, "aria-label": n.arrangeColumns, children: w.map((g, y) => {
2652
- const S = g.label ?? g.id;
2653
- return /* @__PURE__ */ O("li", { className: f.columnsEntry, "data-column": g.id, children: [
2661
+ /* @__PURE__ */ l("ul", { ref: i, className: f.columnsList, "aria-label": n.arrangeColumns, children: b.map((p, _) => {
2662
+ const S = p.label ?? p.id;
2663
+ return /* @__PURE__ */ F("li", { className: f.columnsEntry, "data-column": p.id, children: [
2654
2664
  /* @__PURE__ */ l(
2655
2665
  Ce,
2656
2666
  {
2657
2667
  label: S,
2658
- checked: !d.hidden.includes(g.id),
2659
- disabled: g.hideable === !1,
2660
- onChange: () => d.toggleColumn(g.id)
2668
+ checked: !d.hidden.includes(p.id),
2669
+ disabled: p.hideable === !1,
2670
+ onChange: () => d.toggleColumn(p.id)
2661
2671
  }
2662
2672
  ),
2663
2673
  /* @__PURE__ */ l(
@@ -2667,8 +2677,8 @@ function ti({ of: e }) {
2667
2677
  className: f.move,
2668
2678
  "data-direction": "forward",
2669
2679
  "aria-label": n.columnForward(S),
2670
- disabled: y === 0 || v && y <= 1,
2671
- onClick: () => p(y, -1),
2680
+ disabled: _ === 0 || w && _ <= 1,
2681
+ onClick: () => g(_, -1),
2672
2682
  children: /* @__PURE__ */ l("svg", { viewBox: "0 0 10 10", width: "10", height: "10", "aria-hidden": "true", children: /* @__PURE__ */ l("path", { d: "M2 6.5 5 3.5l3 3", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) })
2673
2683
  }
2674
2684
  ),
@@ -2679,14 +2689,14 @@ function ti({ of: e }) {
2679
2689
  className: f.move,
2680
2690
  "data-direction": "backward",
2681
2691
  "aria-label": n.columnBackward(S),
2682
- disabled: y === w.length - 1 || v && y === 0,
2683
- onClick: () => p(y, 1),
2692
+ disabled: _ === b.length - 1 || w && _ === 0,
2693
+ onClick: () => g(_, 1),
2684
2694
  children: /* @__PURE__ */ l("svg", { viewBox: "0 0 10 10", width: "10", height: "10", "aria-hidden": "true", children: /* @__PURE__ */ l("path", { d: "M2 3.5 5 6.5l3-3", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) })
2685
2695
  }
2686
2696
  )
2687
- ] }, g.id);
2697
+ ] }, p.id);
2688
2698
  }) }),
2689
- /* @__PURE__ */ l(Fr, { registry: h, hook: m })
2699
+ /* @__PURE__ */ l(Or, { registry: h, hook: m })
2690
2700
  ]
2691
2701
  }
2692
2702
  )
@@ -2708,11 +2718,11 @@ function ni({ filename: e, onExport: t, of: n }) {
2708
2718
  }
2709
2719
  function oi({ pageSizes: e = [10, 25, 50], className: t, of: n }) {
2710
2720
  const o = xe(n), r = U(), s = ue();
2711
- if (nt(o == null ? void 0 : o.registry, "pagination"), !o || o.snapshot.virtual) return null;
2712
- const { snapshot: i } = o, a = i.filtered.length, c = e.includes(i.pageSize) ? e : [...e, i.pageSize].sort((h, d) => h - d), u = /* @__PURE__ */ O("nav", { "aria-label": r.pagination, className: G(f.pagination, t), children: [
2721
+ if (ot(o == null ? void 0 : o.registry, "pagination"), !o || o.snapshot.virtual) return null;
2722
+ const { snapshot: i } = o, a = i.filtered.length, c = e.includes(i.pageSize) ? e : [...e, i.pageSize].sort((h, d) => h - d), u = /* @__PURE__ */ F("nav", { "aria-label": r.pagination, className: B(f.pagination, t), children: [
2713
2723
  /* @__PURE__ */ l("span", { children: r.entries(a, s.count(a)) }),
2714
- /* @__PURE__ */ O("div", { className: f.paginationControls, children: [
2715
- /* @__PURE__ */ O("label", { className: f.pageSize, children: [
2724
+ /* @__PURE__ */ F("div", { className: f.paginationControls, children: [
2725
+ /* @__PURE__ */ F("label", { className: f.pageSize, children: [
2716
2726
  r.rows,
2717
2727
  /* @__PURE__ */ l(
2718
2728
  on,
@@ -2732,22 +2742,22 @@ function oi({ pageSizes: e = [10, 25, 50], className: t, of: n }) {
2732
2742
  ] });
2733
2743
  return o.inside ? o.footerTarget ? ln(u, o.footerTarget) : null : u;
2734
2744
  }
2735
- const ms = ["high", "medium", "low"], ws = (e) => ms.indexOf(e), bs = (e) => e === "standing-unacknowledged" || e === "standing-acknowledged", De = (e) => e === "standing-acknowledged" || e === "cleared-acknowledged", vs = (e) => e === "cleared-acknowledged";
2745
+ const ms = ["high", "medium", "low"], bs = (e) => ms.indexOf(e), vs = (e) => e === "standing-unacknowledged" || e === "standing-acknowledged", Ve = (e) => e === "standing-acknowledged" || e === "cleared-acknowledged", ws = (e) => e === "cleared-acknowledged";
2736
2746
  function _s(e, t) {
2737
2747
  switch (t) {
2738
2748
  case "raised":
2739
2749
  return "standing-unacknowledged";
2740
2750
  case "acknowledged":
2741
- return bs(e) ? "standing-acknowledged" : "cleared-acknowledged";
2751
+ return vs(e) ? "standing-acknowledged" : "cleared-acknowledged";
2742
2752
  case "cleared":
2743
- return De(e) ? "cleared-acknowledged" : "cleared-unacknowledged";
2753
+ return Ve(e) ? "cleared-acknowledged" : "cleared-unacknowledged";
2744
2754
  }
2745
2755
  }
2746
- const ri = (e, t) => e.direction === "obere" ? t <= e.returnTo : t >= e.returnTo, ot = (e, t, n) => e > n - t && e <= n, si = (e, t, n) => e.reduce((o, r) => o + (ot(r, t, n) ? 1 : 0), 0);
2756
+ const ri = (e, t) => e.direction === "obere" ? t <= e.returnTo : t >= e.returnTo, rt = (e, t, n) => e > n - t && e <= n, si = (e, t, n) => e.reduce((o, r) => o + (rt(r, t, n) ? 1 : 0), 0);
2747
2757
  function ys(e, t, n) {
2748
2758
  const o = /* @__PURE__ */ new Map();
2749
2759
  for (const r of e)
2750
- ot(r.raised, t, n) && o.set(r.type, (o.get(r.type) ?? 0) + 1);
2760
+ rt(r.raised, t, n) && o.set(r.type, (o.get(r.type) ?? 0) + 1);
2751
2761
  return o;
2752
2762
  }
2753
2763
  function ks(e) {
@@ -2761,7 +2771,7 @@ function Ss(e) {
2761
2771
  return t;
2762
2772
  }
2763
2773
  function Cs(e, t, n) {
2764
- const o = e.filter((s) => ot(s.raised, t.windowMs, n));
2774
+ const o = e.filter((s) => rt(s.raised, t.windowMs, n));
2765
2775
  if (o.length < t.atLeast) return null;
2766
2776
  const r = o.map((s) => s.raised);
2767
2777
  return {
@@ -2776,14 +2786,14 @@ function Cs(e, t, n) {
2776
2786
  function Ns(e, t) {
2777
2787
  const n = new Set(t);
2778
2788
  return e.reduce(
2779
- (o, r) => o + (n.has(r.id) && !De(r.lifecycle) ? 1 : 0),
2789
+ (o, r) => o + (n.has(r.id) && !Ve(r.lifecycle) ? 1 : 0),
2780
2790
  0
2781
2791
  );
2782
2792
  }
2783
2793
  function ii(e, t, n) {
2784
2794
  const o = new Set(t);
2785
2795
  let r = 0;
2786
- return { alarms: e.map((i) => !o.has(i.id) || De(i.lifecycle) ? i : (r += 1, { ...i, lifecycle: _s(i.lifecycle, "acknowledged"), acknowledgedAt: n })), count: r };
2796
+ return { alarms: e.map((i) => !o.has(i.id) || Ve(i.lifecycle) ? i : (r += 1, { ...i, lifecycle: _s(i.lifecycle, "acknowledged"), acknowledgedAt: n })), count: r };
2787
2797
  }
2788
2798
  const xs = (e) => [
2789
2799
  {
@@ -2799,7 +2809,7 @@ const xs = (e) => [
2799
2809
  level of the order asks only about the acknowledgement and expressly not
2800
2810
  about whether the alarm is still standing. Otherwise the fleeting alarm
2801
2811
  falls back down again. */
2802
- { id: "acknowledgement", label: e.columnAcknowledgement, value: (t) => De(t.lifecycle) ? 1 : 0 },
2812
+ { id: "acknowledgement", label: e.columnAcknowledgement, value: (t) => Ve(t.lifecycle) ? 1 : 0 },
2803
2813
  { id: "raised", label: e.columnRaised, value: (t) => t.alarm.raised },
2804
2814
  { id: "age", label: e.columnAge, value: (t) => t.age },
2805
2815
  { id: "frequency", label: e.columnFrequency, value: (t) => t.frequency }
@@ -2807,7 +2817,7 @@ const xs = (e) => [
2807
2817
  { column: "priority", direction: "asc" },
2808
2818
  { column: "acknowledgement", direction: "asc" },
2809
2819
  { column: "raised", direction: "desc" }
2810
- ], Fs = (e) => ({
2820
+ ], Os = (e) => ({
2811
2821
  id: e,
2812
2822
  label: e,
2813
2823
  priority: "high"
@@ -2821,48 +2831,48 @@ function ai(e, t = {}) {
2821
2831
  flood: i,
2822
2832
  keepDone: a = !1,
2823
2833
  columns: c = As
2824
- } = e, u = new Map(o.map((p) => [p.id, p])), h = ys(n, (s == null ? void 0 : s.windowMs) ?? 1 / 0, r), d = i ? Cs(n, i, r) : null, m = new Set((d == null ? void 0 : d.alarms) ?? []), w = n.filter((p) => a || !vs(p.lifecycle)).map((p) => {
2825
- const b = u.get(p.type) ?? Fs(p.type), g = h.get(p.type) ?? 0;
2834
+ } = e, u = new Map(o.map((g) => [g.id, g])), h = ys(n, (s == null ? void 0 : s.windowMs) ?? 1 / 0, r), d = i ? Cs(n, i, r) : null, m = new Set((d == null ? void 0 : d.alarms) ?? []), b = n.filter((g) => a || !ws(g.lifecycle)).map((g) => {
2835
+ const v = u.get(g.type) ?? Os(g.type), p = h.get(g.type) ?? 0;
2826
2836
  return {
2827
- id: p.id,
2828
- alarm: p,
2829
- type: b,
2830
- lifecycle: p.lifecycle,
2831
- priority: b.priority,
2832
- rank: ws(b.priority),
2833
- age: r - p.raised,
2834
- duration: (p.cleared ?? r) - p.raised,
2835
- frequency: g,
2836
- chatters: s !== void 0 && g >= s.atLeast,
2837
- inFlood: m.has(p.id)
2837
+ id: g.id,
2838
+ alarm: g,
2839
+ type: v,
2840
+ lifecycle: g.lifecycle,
2841
+ priority: v.priority,
2842
+ rank: bs(v.priority),
2843
+ age: r - g.raised,
2844
+ duration: (g.cleared ?? r) - g.raised,
2845
+ frequency: p,
2846
+ chatters: s !== void 0 && p >= s.atLeast,
2847
+ inFlood: m.has(g.id)
2838
2848
  };
2839
- }), v = tt(w, c, {
2849
+ }), w = nt(b, c, {
2840
2850
  ...t,
2841
2851
  sort: t.sort === void 0 ? Ts : t.sort
2842
2852
  });
2843
2853
  return {
2844
- ...v,
2854
+ ...w,
2845
2855
  flood: d,
2846
- standingUnacknowledged: v.filtered.reduce(
2847
- (p, b) => p + (b.lifecycle === "standing-unacknowledged" ? 1 : 0),
2856
+ standingUnacknowledged: w.filtered.reduce(
2857
+ (g, v) => g + (v.lifecycle === "standing-unacknowledged" ? 1 : 0),
2848
2858
  0
2849
2859
  )
2850
2860
  };
2851
2861
  }
2852
- const Os = "_list_17f0w_4 _text_1hv7a_23", Rs = "_bar_17f0w_12", Ls = "_heading_17f0w_19", Ms = "_filler_17f0w_25", Vs = "_asOf_17f0w_29", Ds = "_live_17f0w_46", Is = "_label_17f0w_51", Ps = "_counter_17f0w_55", Bs = "_lifecycle_17f0w_59", Gs = "_empty_17f0w_63", Es = "_row_17f0w_70", oe = {
2853
- list: Os,
2854
- bar: Rs,
2855
- heading: Ls,
2856
- filler: Ms,
2857
- asOf: Vs,
2858
- live: Ds,
2859
- label: Is,
2860
- counter: Ps,
2861
- lifecycle: Bs,
2862
- empty: Gs,
2863
- row: Es
2862
+ const Fs = "_list_17f0w_4 _text_1hv7a_23", qs = "_bar_17f0w_12", Rs = "_heading_17f0w_19", Ls = "_filler_17f0w_25", Ms = "_asOf_17f0w_29", Vs = "_live_17f0w_46", Ds = "_label_17f0w_51", Is = "_counter_17f0w_55", Ps = "_lifecycle_17f0w_59", Bs = "_empty_17f0w_63", Gs = "_row_17f0w_70", oe = {
2863
+ list: Fs,
2864
+ bar: qs,
2865
+ heading: Rs,
2866
+ filler: Ls,
2867
+ asOf: Ms,
2868
+ live: Vs,
2869
+ label: Ds,
2870
+ counter: Is,
2871
+ lifecycle: Ps,
2872
+ empty: Bs,
2873
+ row: Gs
2864
2874
  };
2865
- function zs(e, t) {
2875
+ function Es(e, t) {
2866
2876
  switch (e) {
2867
2877
  case "standing-unacknowledged":
2868
2878
  return t.lifecycleStandingUnacknowledged;
@@ -2874,21 +2884,21 @@ function zs(e, t) {
2874
2884
  return t.lifecycleClearedAcknowledged;
2875
2885
  }
2876
2886
  }
2877
- function Hs(e, t) {
2887
+ function zs(e, t) {
2878
2888
  return e === "high" ? t.priorityHigh : e === "medium" ? t.priorityMedium : t.priorityLow;
2879
2889
  }
2880
- function js(e) {
2890
+ function Hs(e) {
2881
2891
  return e === "high" ? "danger" : e === "medium" ? "warning" : "neutral";
2882
2892
  }
2883
- function $s(e, t) {
2893
+ function js(e, t) {
2884
2894
  const n = Math.max(0, Math.floor(e / 6e4)), o = Math.floor(n / 60), r = n % 60, s = [];
2885
2895
  return o > 0 && s.push(t.hoursShort(o)), (o === 0 || r > 0) && s.push(t.minutesShort(r)), s.join(" ");
2886
2896
  }
2887
2897
  function li(e) {
2888
2898
  const { asOf: t, freshness: n, ...o } = e;
2889
- return t === void 0 || n === void 0 ? /* @__PURE__ */ l(Ut, { ...o, freshness: null }) : /* @__PURE__ */ l(Ks, { ...o, asOf: t, ages: n });
2899
+ return t === void 0 || n === void 0 ? /* @__PURE__ */ l(Ut, { ...o, freshness: null }) : /* @__PURE__ */ l($s, { ...o, asOf: t, ages: n });
2890
2900
  }
2891
- function Ks({
2901
+ function $s({
2892
2902
  asOf: e,
2893
2903
  ages: t,
2894
2904
  ...n
@@ -2905,46 +2915,46 @@ function Ut({
2905
2915
  freshness: s,
2906
2916
  ...i
2907
2917
  }) {
2908
- const a = U(), c = ue(), u = s !== null, h = (s == null ? void 0 : s.freshness) === "lost", { Table: d, Column: m } = ps(e.visible, { rowKey: (g) => g.id, selection: t }), w = $(() => e.filtered.map((g) => g.alarm), [e.filtered]), v = $(() => t === void 0 ? [] : e.filtered.map((g) => g.id).filter((g) => t.selected.has(g)), [e.filtered, t]), p = $(() => Ns(w, v), [w, v]), b = Tt(o, "compact");
2909
- return /* @__PURE__ */ O("div", { className: [oe.list, r].filter(Boolean).join(" "), ...i, children: [
2910
- /* @__PURE__ */ O("div", { className: oe.bar, children: [
2918
+ const a = U(), c = ue(), u = s !== null, h = (s == null ? void 0 : s.freshness) === "lost", { Table: d, Column: m } = gs(e.visible, { rowKey: (p) => p.id, selection: t }), b = j(() => e.filtered.map((p) => p.alarm), [e.filtered]), w = j(() => t === void 0 ? [] : e.filtered.map((p) => p.id).filter((p) => t.selected.has(p)), [e.filtered, t]), g = j(() => Ns(b, w), [b, w]), v = Ot(o, "compact");
2919
+ return /* @__PURE__ */ F("div", { className: [oe.list, r].filter(Boolean).join(" "), ...i, children: [
2920
+ /* @__PURE__ */ F("div", { className: oe.bar, children: [
2911
2921
  /* @__PURE__ */ l("span", { className: oe.heading, children: a.alarms }),
2912
- e.flood !== null && /* @__PURE__ */ l(Ie, { tone: "warning", children: a.floodHint(e.flood.count) }),
2913
- u && s !== null && /* @__PURE__ */ O("span", { className: oe.asOf, "data-freshness": s.freshness, children: [
2922
+ e.flood !== null && /* @__PURE__ */ l(De, { tone: "warning", children: a.floodHint(e.flood.count) }),
2923
+ u && s !== null && /* @__PURE__ */ F("span", { className: oe.asOf, "data-freshness": s.freshness, children: [
2914
2924
  s.freshness === "lost" ? a.freshnessDisconnected : s.freshness === "stale" ? a.freshnessStale : a.freshnessFresh,
2915
2925
  s.age !== null && ` · ${c.relative(s.age)}`
2916
2926
  ] }),
2917
2927
  /* @__PURE__ */ l("span", { className: oe.filler }),
2918
- t !== void 0 && n !== void 0 && /* @__PURE__ */ l(ee, { variant: "primary", size: "sm", disabled: p === 0, onClick: () => n(v), children: p === 0 ? a.acknowledgeAlarm : a.acknowledgeAlarms(p) })
2928
+ t !== void 0 && n !== void 0 && /* @__PURE__ */ l(ee, { variant: "primary", size: "sm", disabled: g === 0, onClick: () => n(w), children: g === 0 ? a.acknowledgeAlarm : a.acknowledgeAlarms(g) })
2919
2929
  ] }),
2920
2930
  /* @__PURE__ */ l("div", { "aria-live": "polite", "aria-atomic": "true", className: oe.live, children: a.standingUnacknowledged(e.standingUnacknowledged) }),
2921
- /* @__PURE__ */ O(
2931
+ /* @__PURE__ */ F(
2922
2932
  d,
2923
2933
  {
2924
2934
  ariaLabel: a.alarms,
2925
2935
  selectable: t !== void 0,
2926
- density: b,
2936
+ density: v,
2927
2937
  stickyHeader: !0,
2928
- rowProps: (g) => ({ className: oe.row, "data-lifecycle": g.lifecycle, "data-priority": g.priority }),
2938
+ rowProps: (p) => ({ className: oe.row, "data-lifecycle": p.lifecycle, "data-priority": p.priority }),
2929
2939
  empty: /* @__PURE__ */ l("span", { className: oe.empty, children: h ? a.noAlarmsDisconnected : a.noAlarms }),
2930
2940
  children: [
2931
- /* @__PURE__ */ l(m, { id: "type", label: a.columnAlarm, value: (g) => g.type.label, rowHeader: !0, sortable: !1, children: (g, y) => /* @__PURE__ */ O(Q, { children: [
2932
- /* @__PURE__ */ l("span", { className: oe.label, children: g }),
2933
- y.chatters && /* @__PURE__ */ l(Ie, { tone: "warning", pill: !0, className: oe.counter, children: a.chatterHint(y.frequency) })
2941
+ /* @__PURE__ */ l(m, { id: "type", label: a.columnAlarm, value: (p) => p.type.label, rowHeader: !0, sortable: !1, children: (p, _) => /* @__PURE__ */ F(Q, { children: [
2942
+ /* @__PURE__ */ l("span", { className: oe.label, children: p }),
2943
+ _.chatters && /* @__PURE__ */ l(De, { tone: "warning", pill: !0, className: oe.counter, children: a.chatterHint(_.frequency) })
2934
2944
  ] }) }),
2935
- /* @__PURE__ */ l(m, { value: "lifecycle", label: a.columnLifecycleState, sortable: !1, children: (g) => /* @__PURE__ */ l("span", { className: oe.lifecycle, children: zs(g, a) }) }),
2936
- /* @__PURE__ */ l(m, { value: "priority", label: a.columnPriority, sortable: !1, children: (g) => /* @__PURE__ */ l(Ie, { tone: js(g), children: Hs(g, a) }) }),
2945
+ /* @__PURE__ */ l(m, { value: "lifecycle", label: a.columnLifecycleState, sortable: !1, children: (p) => /* @__PURE__ */ l("span", { className: oe.lifecycle, children: Es(p, a) }) }),
2946
+ /* @__PURE__ */ l(m, { value: "priority", label: a.columnPriority, sortable: !1, children: (p) => /* @__PURE__ */ l(De, { tone: Hs(p), children: zs(p, a) }) }),
2937
2947
  /* @__PURE__ */ l(
2938
2948
  m,
2939
2949
  {
2940
2950
  id: "raised",
2941
2951
  label: a.columnRaised,
2942
- value: (g) => new Date(g.alarm.raised),
2952
+ value: (p) => new Date(p.alarm.raised),
2943
2953
  numeric: !0,
2944
2954
  sortable: !1
2945
2955
  }
2946
2956
  ),
2947
- /* @__PURE__ */ l(m, { value: "duration", label: a.columnDuration, sortable: !1, children: (g) => $s(g, a) }),
2957
+ /* @__PURE__ */ l(m, { value: "duration", label: a.columnDuration, sortable: !1, children: (p) => js(p, a) }),
2948
2958
  /* @__PURE__ */ l(m, { value: "frequency", label: a.columnFrequency, format: "count", sortable: !1 })
2949
2959
  ]
2950
2960
  }
@@ -2971,11 +2981,11 @@ export {
2971
2981
  Cs as detectFlood,
2972
2982
  ys as frequencyByType,
2973
2983
  ri as hasReturned,
2974
- De as isAcknowledged,
2975
- vs as isDone,
2976
- bs as isStanding,
2984
+ Ve as isAcknowledged,
2985
+ ws as isDone,
2986
+ vs as isStanding,
2977
2987
  _s as nextLifecycleState,
2978
- ws as priorityRank,
2979
- ps as useTable,
2988
+ bs as priorityRank,
2989
+ gs as useTable,
2980
2990
  cn as useTableSelection
2981
2991
  };