@umriss-ui/table 0.3.1 → 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
@@ -1,21 +1,21 @@
1
1
  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
- var B = (e, t, n) => Xt(e, typeof t != "symbol" ? t + "" : t, n);
5
- import { useState as H, useCallback as X, useMemo as $, useRef as re, useId as se, useContext as Ue, useSyncExternalStore as Le, createContext as yt, useLayoutEffect as W } from "react";
6
- import { DEFAULT_FORMATS as Ct, useVirtual as Qt, useFormats as ue, useWording as U, Checkbox as Se, DateRangePicker as Zt, FormField as rt, NumberInput as st, Popover as St, Button as ee, TagGroup as Nt, Tag as xt, Menu as At, MenuItem as Fe, MenuSeparator as en, VisuallyHidden as Re, useDensityFor as Tt, assess as tn, verdictWeight as Ee, Select as nn, Input as on, DEFAULT_WORDING as rn, Badge as Ie, useFreshness as sn } from "@umriss-ui/core";
7
- import { jsx as l, jsxs as O, Fragment as Q } from "react/jsx-runtime";
8
- import { createPortal as an } from "react-dom";
9
- function ln(e) {
4
+ var P = (e, t, n) => Xt(e, typeof t != "symbol" ? t + "" : t, n);
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
+ import { createPortal as ln } from "react-dom";
9
+ function cn(e) {
10
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 ln(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";
41
- function _e(e, t, n, o) {
42
- switch (Me(e)) {
40
+ const Je = (e, t) => t ?? e === "number";
41
+ function ye(e, t, n, o) {
42
+ switch (Le(e)) {
43
43
  case "text":
44
44
  return e;
45
45
  case "number": {
@@ -56,10 +56,10 @@ function _e(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":
@@ -73,11 +73,11 @@ function ze(e, t) {
73
73
  }
74
74
  }
75
75
  }
76
- const cn = "ja", un = "nein";
77
- function Lt(e, t) {
76
+ const un = "ja", dn = "nein";
77
+ function qt(e, t) {
78
78
  if (!Y(e)) {
79
- if (t) return Lt(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":
@@ -85,21 +85,21 @@ function Lt(e, t) {
85
85
  case "date":
86
86
  return e.toISOString();
87
87
  case "boolean":
88
- return e ? cn : un;
88
+ return e ? un : dn;
89
89
  default:
90
90
  return;
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,69 +113,69 @@ function Xe(e, t) {
113
113
  return [a(Math.min(...s)), a(Math.max(...s))];
114
114
  }
115
115
  }
116
- const Qe = 3, Ce = (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 Be(e, t, n) {
121
- const o = Ce(e), r = Ce(t);
120
+ function Ie(e, t, n) {
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
- function dn(e, t) {
124
+ function fn(e, t) {
125
125
  const n = t.compareText ?? Ct.compareText, o = (r, s, i) => {
126
- var b;
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 _ = c.value(g), C = ge(_);
132
- let S = u.get(C);
133
- S || (S = {
134
- path: JSON.stringify([...i, C]),
130
+ for (const p of r) {
131
+ const _ = c.value(p), S = pe(_);
132
+ let C = u.get(S);
133
+ C || (C = {
134
+ path: JSON.stringify([...i, S]),
135
135
  value: Y(_) ? void 0 : _,
136
136
  level: s,
137
137
  rows: [],
138
138
  groups: [],
139
139
  aggregates: {}
140
- }, u.set(C, S), a.set(S, [...i, C])), S.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 _ of t.aggregates ?? []) g.aggregates[_.id] = Xe(_, g.rows);
144
- const h = (b = t.sort) == null ? void 0 : b.find(
145
- (g) => {
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
146
  var _;
147
- return g.column === c.id || ((_ = t.aggregates) == null ? void 0 : _.some((C) => C.id === g.column));
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) => {
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
150
  let _;
151
- for (const C of g.rows) {
152
- const S = c.order(C);
153
- Ce(S) !== void 0 && (_ === void 0 || Be(S, _, n) < 0) && (_ = S);
151
+ for (const S of p.rows) {
152
+ const C = c.order(S);
153
+ Se(C) !== void 0 && (_ === void 0 || Ie(C, _, n) < 0) && (_ = C);
154
154
  }
155
155
  return _;
156
- }, k = (g) => {
157
- if (m === void 0) return c.order ? w(g) : g.value;
158
- const _ = g.aggregates[m];
156
+ }, w = (p) => {
157
+ if (m === void 0) return c.order ? b(p) : p.value;
158
+ const _ = p.aggregates[m];
159
159
  return Array.isArray(_) ? _[0] : _;
160
- }, p = [...u.values()].sort((g, _) => {
161
- if (g.value === void 0 || _.value === void 0) return Be(g.value, _.value, n);
162
- const C = k(g), S = k(_), I = Be(C, S, n);
163
- return Ce(C) === void 0 || Ce(S) === void 0 ? I : I * d;
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
  }
171
- function fn(e, t) {
171
+ function hn(e, t) {
172
172
  const n = /* @__PURE__ */ new Set(), o = (r) => {
173
173
  for (const s of r)
174
174
  n.add(s.path), o(s.groups);
175
175
  };
176
176
  return o(e), t.filter((r) => n.has(r));
177
177
  }
178
- const hn = (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);
@@ -184,7 +184,7 @@ 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
  }
187
- function pn(e, t, n, o) {
187
+ 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") {
@@ -193,7 +193,7 @@ function pn(e, t, n, o) {
193
193
  }
194
194
  return n.date(t);
195
195
  }
196
- function mn(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,11 +205,11 @@ function mn(e, t) {
205
205
  };
206
206
  return o(e, []), n;
207
207
  }
208
- function wn(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
210
  return { lines: Rt(i), page: s, pageCount: r };
211
211
  }
212
- const Ze = (e) => e.flatMap((t) => t.kind === "row" ? [t.row] : []);
212
+ const et = (e) => e.flatMap((t) => t.kind === "row" ? [t.row] : []);
213
213
  function Rt(e) {
214
214
  const t = e[0];
215
215
  if (!t) return [...e];
@@ -221,14 +221,14 @@ function Rt(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 ke = (e) => e == null || typeof e == "number" && Number.isNaN(e), bn = (e, t) => typeof e == "number" && typeof t == "number" ? e - t : Ct.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,330 +238,330 @@ 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), k = (A) => !m || w.some((v) => {
242
- const F = v.value(A);
243
- return !ke(F) && String(F).toLowerCase().includes(m);
244
- }), p = e.filter((A) => k(A) && (r ? r(A) : !0)), b = Array.isArray(s) ? s : s ? [s] : [], g = b.map((A) => {
245
- const v = t.find((V) => V.id === A.column);
246
- if (!v || !v.compare && !v.value) return null;
247
- const F = A.direction === "asc" ? 1 : -1, L = v.compare, N = v.value;
248
- return N ? (V, z) => {
249
- const P = N(V), q = N(z);
250
- return ke(P) || ke(q) ? ke(P) === ke(q) ? 0 : ke(P) ? 1 : -1 : (L ? L(V, z) : bn(P, q)) * F;
251
- } : (V, z) => L(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, v) => {
254
- for (const F of g) {
255
- const L = F(A, v);
256
- if (L !== 0) return L;
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, ...v } = n.grouping, F = dn(p, { ...v, sort: b }), L = mn(F, A), N = wn(L, 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: L,
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 _ = a && a > 0 ? a : p.length || 1, C = Math.max(1, Math.ceil(p.length / _)), S = Math.min(Math.max(1, i), C), I = p.slice((S - 1) * _, S * _);
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,
278
- page: S,
279
- pageCount: C,
276
+ filtered: g,
277
+ visible: D,
278
+ page: C,
279
+ pageCount: S,
280
280
  columnCount: d.length
281
281
  };
282
282
  }
283
- function kn(e, t, n) {
283
+ function _n(e, t, n) {
284
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, k] = H((i == null ? void 0 : i.page) ?? 1), [p, b] = H(
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, _] = H([]), [C, S] = H((i == null ? void 0 : i.hidden) ?? []), [I, x] = H((i == null ? void 0 : i.order) ?? []), [A, v] = H(() => {
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, L = $(
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,
302
- hidden: C,
303
- order: I,
300
+ page: b,
301
+ pageSize: O,
302
+ hidden: S,
303
+ order: D,
304
304
  grouping: c
305
305
  }),
306
- [e, t, u, r, d, w, F, C, I, c]
307
- ), N = Qt(a ? (L.lines ?? L.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 && L.lines ? L.lines.slice(N.from, N.to) : L.visibleLines,
312
- [a, L.lines, L.visibleLines, N.from, N.to]
313
- ), z = $(
314
- () => a ? V ? Ze(V) : L.filtered.slice(N.from, N.to) : L.visible,
315
- [a, V, L.filtered, L.visible, N.from, N.to]
316
- ), P = $(() => L.filtered.map(o), [L.filtered, o]), q = ln(P), ie = X((T) => {
317
- h(T), k(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), k(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
- }), k(1);
329
+ ) : G.filter((he) => he.column !== T) : [...G, { column: T, direction: "asc" }];
330
+ }), w(1);
331
331
  }, []), fe = X((T) => {
332
332
  _(
333
- (D) => D.includes(T) ? D.filter((E) => E !== T) : [...D, T]
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) => {
339
- S(
340
- (D) => D.includes(T) ? D.filter((E) => E !== T) : [...D, T]
335
+ }, []), be = X(
336
+ (T) => p.includes(T),
337
+ [p]
338
+ ), ve = X((T) => {
339
+ C(
340
+ (V) => V.includes(T) ? V.filter((G) => G !== T) : [...V, T]
341
341
  );
342
- }, []), ye = X((T, D) => {
343
- v((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
- ), y = $(
365
- () => et(t, I).filter((T) => T.label !== void 0 && T.hideable !== !1).map((T) => ({ id: T.id, label: T.label, visible: !C.includes(T.id) })),
366
- [t, I, C]
367
- ), R = 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]), j = $(() => {
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 && L.page > 1 ? { page: L.page } : {},
393
- ...!a && p !== R ? { pageSize: p } : {},
394
- ...C.length ? { hidden: C } : {},
395
- ...I.length ? { order: I } : {},
396
- ...Object.keys(j).length ? { widths: j } : {}
392
+ ...!a && q.page > 1 ? { page: q.page } : {},
393
+ ...!a && g !== R ? { pageSize: g } : {},
394
+ ...S.length ? { hidden: S } : {},
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
- L.page,
404
- p,
403
+ q.page,
404
+ g,
405
405
  R,
406
- C,
407
- I,
408
- j
406
+ S,
407
+ D,
408
+ z
409
409
  ]
410
410
  );
411
411
  return {
412
- ...L,
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: k,
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,
429
- hidden: C,
430
- toggleColumn: be,
431
- columnChoices: y,
432
- order: I,
428
+ isExpanded: be,
429
+ hidden: S,
430
+ toggleColumn: ve,
431
+ columnChoices: k,
432
+ order: D,
433
433
  setOrder: x,
434
434
  widths: A,
435
- setWidth: ye,
436
- selection: q
435
+ setWidth: ke,
436
+ selection: K
437
437
  };
438
438
  }
439
- function vn() {
439
+ function yn() {
440
440
  var t;
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 = vn(), 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 _n = "_frame_1wkkr_11 _text_1hv7a_23", yn = "_children_1wkkr_23", Cn = "_scroll_1wkkr_29 _scroll_1hv7a_40", Sn = "_footerTarget_1wkkr_36", Nn = "_table_1wkkr_40", xn = "_th_1wkkr_48 _ring_1hv7a_65", An = "_sticky_1wkkr_63", Tn = "_td_1wkkr_71", Fn = "_rowHeader_1wkkr_83", On = "_compact_1wkkr_99", Ln = "_numeric_1wkkr_114", Rn = "_absent_1wkkr_126", Mn = "_striped_1wkkr_130", Vn = "_stickyCell_1wkkr_154", Dn = "_sortButton_1wkkr_166 _ring_1hv7a_65", In = "_sortIndicator_1wkkr_191", Bn = "_sortArrow_1wkkr_198", Pn = "_sortArrowDesc_1wkkr_202", Gn = "_sortActive_1wkkr_210", En = "_sortRank_1wkkr_216", zn = "_thFlex_1wkkr_224", jn = "_footerKind_1wkkr_245", Hn = "_emptyCell_1wkkr_253", $n = "_empty_1wkkr_253", Kn = "_emptyTitle_1wkkr_269", Wn = "_skeleton_1wkkr_276", qn = "_toolbar_1wkkr_304 _text_1hv7a_23", Yn = "_toolbarGroup_1wkkr_318", Un = "_toolbarInfo_1wkkr_335", Jn = "_pagination_1wkkr_341 _text_1hv7a_23", Xn = "_paginationControls_1wkkr_354", Qn = "_pageSize_1wkkr_361", Zn = "_paginationStatus_1wkkr_373", eo = "_filterButton_1wkkr_382 _ring_1hv7a_65", to = "_filterActive_1wkkr_405", no = "_filterPanel_1wkkr_410", oo = "_filterContent_1wkkr_423 _scroll_1hv7a_40", ro = "_filterFooter_1wkkr_434", so = "_filterLabel_1wkkr_448", io = "_filterValue_1wkkr_458", ao = "_filteredCount_1wkkr_464", lo = "_rangeFields_1wkkr_475", co = "_rangePeriod_1wkkr_485", uo = "_conditions_1wkkr_491", fo = "_conditionButton_1wkkr_497", ho = "_condition_1wkkr_491", go = "_columnsPanel_1wkkr_521", po = "_columnsList_1wkkr_529", mo = "_columnsEntry_1wkkr_538", wo = "_move_1wkkr_550", bo = "_groupingChoice_1wkkr_585", ko = "_groupingHeading_1wkkr_591", vo = "_groupingOptions_1wkkr_600", _o = "_groupingOption_1wkkr_600 _ring_1hv7a_65", yo = "_groupingLevel_1wkkr_639", Co = "_groupingTag_1wkkr_644", So = "_groupingTrigger_1wkkr_651", No = "_groupingPrefix_1wkkr_656", xo = "_groupingPath_1wkkr_661", Ao = "_groupingSeparator_1wkkr_665", To = "_groupHeader_1wkkr_682", Fo = "_spanCell_1wkkr_723", Oo = "_groupFolded_1wkkr_772", Lo = "_spanValue_1wkkr_776", Ro = "_groupLabel_1wkkr_777", Mo = "_spanText_1wkkr_789", Vo = "_groupValue_1wkkr_790", Do = "_groupCount_1wkkr_797", Io = "_continued_1wkkr_811", Bo = "_spanSelect_1wkkr_842", Po = "_fold_1wkkr_856", Go = "_foldClosed_1wkkr_888", Eo = "_foldedCount_1wkkr_898", zo = "_shareHost_1wkkr_906", jo = "_shareBar_1wkkr_913", Ho = "_expander_1wkkr_925", $o = "_expanderOpen_1wkkr_956", Ko = "_detailRow_1wkkr_960", Wo = "_detailCell_1wkkr_960", qo = "_actionsCell_1wkkr_968", Yo = "_actions_1wkkr_968", Uo = "_grip_1wkkr_996", Jo = "_virtualBody_1wkkr_1037", Xo = "_virtualRow_1wkkr_1045", Qo = "_fillerRow_1wkkr_1050", Zo = "_control_1wkkr_145", f = {
449
- frame: _n,
450
- children: yn,
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
+ frame: kn,
450
+ children: Sn,
451
451
  scroll: Cn,
452
- footerTarget: Sn,
453
- table: Nn,
454
- th: xn,
455
- sticky: An,
456
- td: Tn,
452
+ footerTarget: Nn,
453
+ table: xn,
454
+ th: An,
455
+ sticky: Tn,
456
+ td: On,
457
457
  rowHeader: Fn,
458
- compact: On,
459
- numeric: Ln,
460
- absent: Rn,
458
+ compact: qn,
459
+ numeric: Rn,
460
+ absent: Ln,
461
461
  striped: Mn,
462
462
  stickyCell: Vn,
463
463
  sortButton: Dn,
464
464
  sortIndicator: In,
465
- sortArrow: Bn,
466
- sortArrowDesc: Pn,
465
+ sortArrow: Pn,
466
+ sortArrowDesc: Bn,
467
467
  sortActive: Gn,
468
468
  sortRank: En,
469
469
  thFlex: zn,
470
- footerKind: jn,
471
- emptyCell: Hn,
470
+ footerKind: Hn,
471
+ emptyCell: jn,
472
472
  empty: $n,
473
473
  emptyTitle: Kn,
474
474
  skeleton: Wn,
475
- toolbar: qn,
476
- toolbarGroup: Yn,
477
- toolbarInfo: Un,
478
- pagination: Jn,
479
- paginationControls: Xn,
480
- pageSize: Qn,
481
- paginationStatus: Zn,
482
- filterButton: eo,
483
- filterActive: to,
484
- filterPanel: no,
485
- filterContent: oo,
486
- filterFooter: ro,
487
- filterLabel: so,
488
- filterValue: io,
489
- filteredCount: ao,
490
- rangeFields: lo,
491
- rangePeriod: co,
492
- conditions: uo,
493
- conditionButton: fo,
494
- condition: ho,
475
+ toolbar: Yn,
476
+ toolbarGroup: Un,
477
+ toolbarInfo: Jn,
478
+ pagination: Xn,
479
+ paginationControls: Qn,
480
+ pageSize: Zn,
481
+ paginationStatus: eo,
482
+ filterButton: to,
483
+ filterActive: no,
484
+ filterPanel: oo,
485
+ filterContent: ro,
486
+ filterFooter: so,
487
+ filterLabel: io,
488
+ filterValue: ao,
489
+ filteredCount: lo,
490
+ rangeFields: co,
491
+ rangePeriod: uo,
492
+ conditions: fo,
493
+ conditionButton: ho,
494
+ condition: po,
495
495
  columnsPanel: go,
496
- columnsList: po,
497
- columnsEntry: mo,
498
- move: wo,
499
- groupingChoice: bo,
500
- groupingHeading: ko,
501
- groupingOptions: vo,
502
- groupingOption: _o,
503
- groupingLevel: yo,
496
+ columnsList: mo,
497
+ columnsEntry: bo,
498
+ move: vo,
499
+ groupingChoice: wo,
500
+ groupingHeading: _o,
501
+ groupingOptions: yo,
502
+ groupingOption: ko,
503
+ groupingLevel: So,
504
504
  groupingTag: Co,
505
- groupingTrigger: So,
506
- groupingPrefix: No,
507
- groupingPath: xo,
508
- groupingSeparator: Ao,
509
- groupHeader: To,
505
+ groupingTrigger: No,
506
+ groupingPrefix: xo,
507
+ groupingPath: Ao,
508
+ groupingSeparator: To,
509
+ groupHeader: Oo,
510
510
  spanCell: Fo,
511
- groupFolded: Oo,
512
- spanValue: Lo,
513
- groupLabel: Ro,
511
+ groupFolded: qo,
512
+ spanValue: Ro,
513
+ groupLabel: Lo,
514
514
  spanText: Mo,
515
515
  groupValue: Vo,
516
516
  groupCount: Do,
517
517
  continued: Io,
518
- spanSelect: Bo,
519
- fold: Po,
518
+ spanSelect: Po,
519
+ fold: Bo,
520
520
  foldClosed: Go,
521
521
  foldedCount: Eo,
522
522
  shareHost: zo,
523
- shareBar: jo,
524
- expander: Ho,
523
+ shareBar: Ho,
524
+ expander: jo,
525
525
  expanderOpen: $o,
526
526
  detailRow: Ko,
527
527
  detailCell: Wo,
528
- actionsCell: qo,
529
- actions: Yo,
530
- grip: Uo,
531
- virtualBody: Jo,
532
- virtualRow: Xo,
533
- fillerRow: Qo,
534
- control: Zo
528
+ actionsCell: Yo,
529
+ actions: Uo,
530
+ grip: Jo,
531
+ virtualBody: Xo,
532
+ virtualRow: Qo,
533
+ fillerRow: Zo,
534
+ control: er
535
535
  };
536
- function Js(e) {
536
+ 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
- const er = (e) => Ne.has(e);
543
+ const tr = (e) => Ne.has(e);
544
544
  function me(e) {
545
- return e === "list" ? sr : e === "range" ? hr : 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";
551
551
  }
552
- function tr(e, t, n) {
552
+ function nr(e, t, n) {
553
553
  var o;
554
554
  return Y(t) ? ((o = Ne.get(e)) == null ? void 0 : o.absentMatches(n)) ?? !1 : e.matches(t, n);
555
555
  }
556
- function nr(e, t, n) {
556
+ 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
- function or(e, t, n) {
564
+ function rr(e, t, n) {
565
565
  const o = /* @__PURE__ */ new Map();
566
566
  let r = !1;
567
567
  for (const i of e) {
@@ -573,32 +573,32 @@ function or(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 je(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 He = (e, t) => Y(e) ? t.wording.cellAbsentValue : _e(e, t.format, t.formats, t.wording) ?? String(e);
584
- function rr({
583
+ const He = (e, t) => Y(e) ? t.wording.cellAbsentValue : ye(e, t.format, t.formats, t.wording) ?? String(e);
584
+ function sr({
585
585
  condition: e,
586
586
  setCondition: t,
587
587
  values: n,
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: He(b, d), value: b }));
593
- m.sort(It(s));
594
- const w = new Set(m.map((b) => b.key)), k = a.filter((b) => !Y(b) && !w.has(ge(b))).map((b) => ({ key: ge(b), text: He(b, d), value: b })), p = o || a.some(Y) ? [{ key: Je, text: i.cellAbsentValue, value: null }] : [];
595
- return [...m, ...k, ...p];
596
- }, [n, a, o, r, s, i]), u = je(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(
601
- Se,
601
+ Ce,
602
602
  {
603
603
  label: d.text,
604
604
  checked: u.has(d.key),
@@ -607,16 +607,16 @@ function rr({
607
607
  d.key
608
608
  )) });
609
609
  }
610
- const sr = Vt(
610
+ const ir = Mt(
611
611
  {
612
- matches: (e, t) => je(t).has(ge(e)),
613
- Input: rr,
612
+ matches: (e, t) => ze(t).has(pe(e)),
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) => je(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) => {
@@ -626,9 +626,9 @@ const sr = Vt(
626
626
  return `${n.slice(0, 2).join(", ")} ${t.wording.moreValues(o, t.formats.count(o))}`;
627
627
  }
628
628
  }
629
- ), ir = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime(), ar = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate() + 1).getTime(), ve = (e) => typeof e == "number" && Number.isFinite(e), ce = (e) => e instanceof Date && !Number.isNaN(e.getTime()), lr = (e) => ce(e) ? ir(e) : ve(e) ? e : void 0, cr = (e) => ce(e) ? { value: ar(e), open: !0 } : ve(e) ? { value: e, open: !1 } : void 0, Ae = (e, t) => ce(e) ? t.formats.date(e) : _e(e, t.format, t.formats, t.wording) ?? String(e);
630
- function ur({ condition: e, setCondition: t }) {
631
- const n = U(), [o, r] = H(null), s = o !== null, i = o ? o.from : ve(e == null ? void 0 : e.from) ? e.from : null, a = o ? o.to : ve(e == null ? void 0 : e.to) ? e.to : null, c = (u, h) => {
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
+ function dr({ condition: e, setCondition: t }) {
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,12 +643,12 @@ function ur({ 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
- function dr({ condition: e, setCondition: t }) {
651
+ function fr({ condition: e, setCondition: t }) {
652
652
  const n = ce(e == null ? void 0 : e.from) && ce(e == null ? void 0 : e.to) ? { from: e.from, to: e.to } : null;
653
653
  return /* @__PURE__ */ l("div", { className: f.rangePeriod, children: /* @__PURE__ */ l(
654
654
  Zt,
@@ -660,23 +660,23 @@ function dr({ condition: e, setCondition: t }) {
660
660
  }
661
661
  ) });
662
662
  }
663
- function fr(e) {
664
- return e.kind === "date" ? /* @__PURE__ */ l(dr, { ...e }) : /* @__PURE__ */ l(ur, { ...e });
663
+ function hr(e) {
664
+ return e.kind === "date" ? /* @__PURE__ */ l(fr, { ...e }) : /* @__PURE__ */ l(dr, { ...e });
665
665
  }
666
- const hr = Vt(
666
+ const pr = Mt(
667
667
  {
668
668
  matches: (e, t) => {
669
- const n = ce(e) ? e.getTime() : ve(e) ? e : void 0;
669
+ const n = ce(e) ? e.getTime() : _e(e) ? e : void 0;
670
670
  if (n === void 0) return !1;
671
- const o = lr(t.from), r = cr(t.to);
671
+ const o = cr(t.from), r = ur(t.to);
672
672
  return !(o !== void 0 && n < o || r !== void 0 && (r.open ? n >= r.value : n > r.value));
673
673
  },
674
- Input: fr,
674
+ Input: hr,
675
675
  describe: (e) => [e.from, e.to].map((t) => t === void 0 ? "" : String(t)).join("–")
676
676
  },
677
677
  {
678
678
  isCondition: (e) => typeof e != "object" || e === null || Array.isArray(e) || e instanceof Date ? !1 : Object.entries(e).every(
679
- ([n, o]) => (n === "from" || n === "to") && (o === void 0 || ve(o) || ce(o))
679
+ ([n, o]) => (n === "from" || n === "to") && (o === void 0 || _e(o) || ce(o))
680
680
  ),
681
681
  isEmpty: (e) => e.from === void 0 && e.to === void 0,
682
682
  absentMatches: () => !1,
@@ -695,11 +695,11 @@ const hr = Vt(
695
695
  );
696
696
  class Pe {
697
697
  constructor(t) {
698
- B(this, "entries", /* @__PURE__ */ new Map());
698
+ P(this, "entries", /* @__PURE__ */ new Map());
699
699
  /** Keys in the order of the running pass. */
700
- B(this, "pass", []);
700
+ P(this, "pass", []);
701
701
  /** Order from the markers in the DOM, after the last commit. */
702
- B(this, "dom", []);
702
+ P(this, "dom", []);
703
703
  this.markerAttribute = t;
704
704
  }
705
705
  note(t) {
@@ -720,7 +720,7 @@ class Pe {
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,59 +742,59 @@ 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];
745
+ ]), ft = (e, t) => e == null ? void 0 : e[t];
746
746
  class gr {
747
747
  constructor() {
748
- B(this, "columns", new Pe("data-umriss-column"));
749
- B(this, "actions", new Pe("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
- B(this, "groupKeys", new Pe("data-umriss-groupkey"));
752
- B(this, "signatures", /* @__PURE__ */ new Map());
751
+ P(this, "groupKeys", new Pe("data-umriss-groupkey"));
752
+ P(this, "signatures", /* @__PURE__ */ new Map());
753
753
  /** The row detail: the presentation of the `RowDetail` that registered last. */
754
- B(this, "detail", null);
754
+ P(this, "detail", null);
755
755
  /** How many `RowActions` stand right now. */
756
- B(this, "actionGroups", /* @__PURE__ */ new Set());
756
+ P(this, "actionGroups", /* @__PURE__ */ new Set());
757
757
  /** Whether the row header column sticks - it then stands first, on screen, in
758
758
  the column menu and in the export alike. */
759
- B(this, "stickyRowHeader", !1);
759
+ P(this, "stickyRowHeader", !1);
760
760
  /* Without a pagination bar the table does not page: one that stops quietly at
761
761
  the tenth row because nobody put one there is a trap (found at the alarm
762
762
  list, umriss-table 13). Without a table toolbar, but with a search or a
763
763
  column filter, the table puts one there itself (table-filters 04):
764
764
  conditions and the ratio need a place, and a place that came into being
765
765
  only with the first condition would shift the table. */
766
- B(this, "parts", /* @__PURE__ */ new Map());
766
+ P(this, "parts", /* @__PURE__ */ new Map());
767
767
  /** The element the table's children stand in - for the markers. */
768
- B(this, "children", null);
769
- B(this, "hook", null);
770
- B(this, "structure", 0);
771
- B(this, "values", 0);
772
- B(this, "presentation", 0);
773
- B(this, "hookVersion", 0);
774
- B(this, "reported", "");
775
- B(this, "listeners", /* @__PURE__ */ new Set());
768
+ P(this, "children", null);
769
+ P(this, "hook", null);
770
+ P(this, "structure", 0);
771
+ P(this, "values", 0);
772
+ P(this, "presentation", 0);
773
+ P(this, "hookVersion", 0);
774
+ P(this, "reported", "");
775
+ P(this, "listeners", /* @__PURE__ */ new Set());
776
776
  /* --- Subscription ------------------------------------------------------------- */
777
- B(this, "subscribe", (t) => (this.listeners.add(t), () => {
777
+ P(this, "subscribe", (t) => (this.listeners.add(t), () => {
778
778
  this.listeners.delete(t);
779
779
  }));
780
780
  /** What the hook reads. */
781
- B(this, "structureVersion", () => this.structure);
781
+ P(this, "structureVersion", () => this.structure);
782
782
  /** What body and unbound parts read. Every counter only rises, so the sum
783
783
  rises exactly when one of them rises. */
784
- B(this, "bodyVersion", () => this.structure + this.values + this.presentation + this.hookVersion);
784
+ P(this, "bodyVersion", () => this.structure + this.values + this.presentation + this.hookVersion);
785
785
  /** The focus a fold may hide: the focused element of a grouped line, the
786
786
  group that line stands in, and its table - noted before the fold, since
787
787
  afterwards the element may be gone and the focus lost. */
788
- B(this, "focusBeforeFold", null);
788
+ P(this, "focusBeforeFold", null);
789
789
  /** Whether the table lets itself be grouped at all (`<Table groupable>`). */
790
- B(this, "tableGroupable", !0);
791
- B(this, "groupingCache", null);
790
+ P(this, "tableGroupable", !0);
791
+ P(this, "groupingCache", null);
792
792
  /* --- The kind of a column ------------------------------------------------------- */
793
- B(this, "kinds", /* @__PURE__ */ new Map());
793
+ P(this, "kinds", /* @__PURE__ */ new Map());
794
794
  /* --- The model ------------------------------------------------------------------ */
795
- B(this, "modelCache", null);
796
- B(this, "projectionCache", null);
797
- B(this, "unpaged", null);
795
+ P(this, "modelCache", null);
796
+ P(this, "projectionCache", null);
797
+ P(this, "unpaged", null);
798
798
  }
799
799
  /** Reports from a layout effect what has changed since the last report.
800
800
  Without a change nothing happens. */
@@ -819,7 +819,7 @@ class gr {
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 gr {
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 gr {
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 gr {
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 gr {
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 gr {
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 gr {
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 ? hn(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 gr {
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, k) => n.compareText(String(m(w)), String(m(k))) : 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 gr {
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 ? pr(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 ---------------------------------------------------------- */
@@ -1104,14 +1104,14 @@ class gr {
1104
1104
  this.actions.entries.delete(t) && this.structure++;
1105
1105
  }
1106
1106
  }
1107
- function pr(e, t, n) {
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 Bt = /* @__PURE__ */ new WeakMap(), mr = (e, t) => {
1113
- Bt.set(e, t);
1114
- }, wr = (e) => typeof e == "function" || typeof e == "object" && e !== null ? Bt.get(e) : void 0, G = (...e) => e.filter(Boolean).join(" ");
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
1115
  function Pt({
1116
1116
  entry: e,
1117
1117
  registry: t,
@@ -1122,14 +1122,14 @@ function Pt({
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: k } = $(() => or(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, _ = er(p) ? { absentOccurs: k, format: m, kind: t.kindOf(e, n.rows) } : {}, C = () => {
1128
- var S;
1129
- i(!1), (S = (r ?? o).current) == null || S.focus();
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
+ var C;
1129
+ i(!1), (C = (r ?? o).current) == null || C.focus();
1130
1130
  };
1131
- return /* @__PURE__ */ O(
1132
- St,
1131
+ return /* @__PURE__ */ F(
1132
+ Nt,
1133
1133
  {
1134
1134
  open: s,
1135
1135
  onOpenChange: i,
@@ -1141,36 +1141,36 @@ function Pt({
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: (S) => b.setFilter(h, S),
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
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 }),
1155
- /* @__PURE__ */ l(ee, { size: "sm", onClick: C, children: c.filterDone })
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
+ /* @__PURE__ */ l(ee, { size: "sm", onClick: S, children: c.filterDone })
1156
1156
  ] })
1157
1157
  ]
1158
1158
  }
1159
1159
  );
1160
1160
  }
1161
- function br({
1161
+ function wr({
1162
1162
  entry: e,
1163
1163
  registry: t,
1164
1164
  hook: n
1165
1165
  }) {
1166
- const o = U(), [r, s] = H(!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,
@@ -1203,31 +1203,31 @@ function br({
1203
1203
  )
1204
1204
  ] });
1205
1205
  }
1206
- function kr({ registry: e, hook: t }) {
1206
+ function _r({ registry: e, hook: t }) {
1207
1207
  const n = U(), o = ue(), r = Object.entries(t.publicSnapshot.filter).flatMap(([s, i]) => {
1208
1208
  const a = e.columnById(s), c = a ? me(a.spec.filter) : void 0;
1209
1209
  if (!a || !c) return [];
1210
1210
  const u = { formats: o, wording: n, format: a.spec.format, kind: e.kindOf(a, t.rows) };
1211
- return [{ entry: a, text: nr(c, i, u) }];
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(vr, { 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
- function vr({
1215
+ function yr({
1216
1216
  entry: e,
1217
1217
  text: t,
1218
1218
  registry: n,
1219
1219
  hook: o
1220
1220
  }) {
1221
- const r = U(), [s, i] = H(!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,
@@ -1261,56 +1261,56 @@ function vr({
1261
1261
  )
1262
1262
  ] });
1263
1263
  }
1264
- const ft = ";", _r = `\r
1265
- `, yr = "\uFEFF", Cr = (e) => String(e).replace(".", ","), Gt = (e) => /[";\r\n]/.test(e) ? `"${e.replace(/"/g, '""')}"` : e, Sr = (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
- function Nr(e, t) {
1271
- const n = t.map((r) => Gt(r.label ?? r.id)).join(ft), o = e.map((r) => t.map((s) => Sr(r, s)).join(ft));
1272
- return yr + [n, ...o].join(_r);
1270
+ function xr(e, t) {
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
+ 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
- function xr(e) {
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) => Lt(o.read(r), o.spec.ownExportValue)
1289
+ value: (r) => qt(o.read(r), o.spec.ownExportValue)
1290
1290
  })
1291
1291
  );
1292
- return Nr(e.projection().filtered, n);
1292
+ return xr(e.projection().filtered, n);
1293
1293
  }
1294
- const Ar = (e, t, n) => {
1294
+ 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 Tr({ 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 }),
@@ -1325,31 +1325,31 @@ function Tr({ registry: e, hook: t }) {
1325
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
- const s = r.map((i) => Ar(e, t, i));
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 jt({
1352
+ function zt({
1353
1353
  registry: e,
1354
1354
  className: t,
1355
1355
  children: n,
@@ -1358,56 +1358,56 @@ function jt({
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: [
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
1363
  /* @__PURE__ */ l(Fr, { registry: e, hook: i }),
1364
- /* @__PURE__ */ l(kr, { registry: e, hook: i })
1365
- ] }), c = /* @__PURE__ */ O("div", { className: f.toolbarGroup, children: [
1364
+ /* @__PURE__ */ l(_r, { registry: e, hook: i })
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: k }) => /* @__PURE__ */ l(
1370
+ m.map(({ key: b, spec: w }) => /* @__PURE__ */ l(
1371
1371
  ee,
1372
1372
  {
1373
1373
  size: "sm",
1374
- variant: k.tone === "danger" ? "danger" : "secondary",
1375
- onClick: () => k.onSelect(d),
1376
- children: k.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 = yt(null), Or = () => () => {
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 ? wr(e.Table) ?? null : (t == null ? void 0 : t.registry) ?? null;
1396
- Le(
1397
- n ? n.subscribe : Or,
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
1404
  function Ht({ wording: e }) {
1405
- return /* @__PURE__ */ O(Q, { children: [
1405
+ return /* @__PURE__ */ F(Q, { children: [
1406
1406
  /* @__PURE__ */ l("span", { "aria-hidden": "true", className: f.absent, children: "—" }),
1407
1407
  /* @__PURE__ */ l(Re, { children: e.cellAbsentValue })
1408
1408
  ] });
1409
1409
  }
1410
- const Lr = { sum: "Σ", avg: "⌀", min: "min", max: "max" }, Rr = (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" }, Rr = (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,29 +1425,29 @@ 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) => _e(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
1430
  if (Y(u)) d = /* @__PURE__ */ l(Ht, { wording: o });
1431
1431
  else if (c === "range" && i === "date" && Mr(u)) {
1432
- const [w, k] = u;
1433
- d = w.getTime() === k.getTime() ? n.date(w) : o.rangeFromTo(n.dateShort(w), n.dateShort(k));
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, k] = u;
1437
- d = h(w) === h(k) ? h(w) : o.rangeFromTo(h(w) ?? "", h(k) ?? "");
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(Re, { children: [
1443
- Rr(c, o),
1442
+ r && /* @__PURE__ */ F(Re, { children: [
1443
+ Lr(c, o),
1444
1444
  " "
1445
1445
  ] }),
1446
1446
  d
1447
1447
  ] });
1448
1448
  }
1449
1449
  const Mr = ([e, t]) => e instanceof Date && t instanceof Date && e.getFullYear() === t.getFullYear();
1450
- function $t(e, t) {
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
  }
@@ -1459,7 +1459,7 @@ function Vr(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
  }
@@ -1476,7 +1476,7 @@ function Ir(e, t) {
1476
1476
  if (!o) return;
1477
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
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]"))) {
@@ -1485,12 +1485,12 @@ function Ir(e, t) {
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
- if (r != null && r.group && t instanceof Date) return pn(r.group, t, n, o);
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
- return _e(t, s, n, o) ?? String(t);
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
- (k) => k.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),
@@ -1552,20 +1552,20 @@ function qe({
1552
1552
  if (!d.altKey) return u();
1553
1553
  gt(e, o, r);
1554
1554
  },
1555
- children: /* @__PURE__ */ l("svg", { viewBox: "0 0 12 12", width: "12", height: "12", "aria-hidden": "true", children: /* @__PURE__ */ l("path", { d: "M3 4.5 6 7.5 9 4.5", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
1555
+ children: /* @__PURE__ */ l("svg", { viewBox: "0 0 10 10", width: "12", height: "12", "aria-hidden": "true", children: /* @__PURE__ */ l("path", { d: "M2.5 3.75 5 6.25 7.5 3.75", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) })
1556
1556
  }
1557
1557
  );
1558
1558
  }
1559
- function Pr({ 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
- Se,
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: () => {
@@ -1592,17 +1592,17 @@ function Gr({
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,55 +1616,55 @@ function pt({
1616
1616
  siblings: h,
1617
1617
  depth: d,
1618
1618
  hook: m,
1619
- formats: w,
1620
- wording: k
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), _ = s.findIndex((v) => v.spec.aggregate !== void 0), C = _ === -1 ? s.length : _, S = s.slice(C), I = s.find((v) => v.spec.aggregate === "sum" && v.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: k }),
1624
- /* @__PURE__ */ l("span", { className: f.groupValue, children: /* @__PURE__ */ l(We, { entry: r, group: p, formats: w, wording: k }) }),
1625
- /* @__PURE__ */ l(Pr, { value: p.rows.length, formats: w }),
1626
- b && e.continued && /* @__PURE__ */ l("span", { className: f.continued, children: k.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 }, (v, 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: k }) }, `c${F}`)),
1648
- b ? /* @__PURE__ */ l("td", { className: f.td, colSpan: (o ? 1 : 0) + C, 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: k }) }),
1651
- /* @__PURE__ */ l(qe, { group: p, parent: e.parents.at(-1), entry: o, open: !1, hook: m, formats: w, wording: k }),
1652
- /* @__PURE__ */ l("span", { className: f.spanText, children: /* @__PURE__ */ l(We, { entry: o, group: p, formats: w, wording: k }) }),
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
- C > 0 && /* @__PURE__ */ l("td", { className: G(f.td, f.foldedCount), colSpan: C, children: k.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
- S.map((v) => /* @__PURE__ */ l(
1657
+ C.map((y) => /* @__PURE__ */ l(
1658
1658
  Er,
1659
1659
  {
1660
- entry: v,
1661
- group: p,
1662
- share: b && v === I,
1660
+ entry: y,
1661
+ group: g,
1662
+ share: v && y === D,
1663
1663
  total: u,
1664
- formats: w,
1665
- wording: k
1664
+ formats: b,
1665
+ wording: w
1666
1666
  },
1667
- v.key
1667
+ y.key
1668
1668
  )),
1669
1669
  c && /* @__PURE__ */ l("td", { className: f.td })
1670
1670
  ]
@@ -1683,21 +1683,21 @@ function Er({
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
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 zr(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
- return Y(s) ? r.cellAbsentValue : _e(s, t.spec.format, o, r) ?? n.rowKey(e);
1725
+ return Y(s) ? r.cellAbsentValue : ye(s, t.spec.format, o, r) ?? n.rowKey(e);
1726
1726
  }
1727
- const Oe = 34;
1728
- function Hr(e) {
1727
+ const Fe = 34;
1728
+ function jr(e) {
1729
1729
  function t(c) {
1730
- const u = se(), h = Ue($e), d = zr(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 Hr(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 Hr(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 Hr(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 Hr(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,
@@ -1804,8 +1804,8 @@ function Hr(e) {
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
1810
  /* @__PURE__ */ l($r, { registry: e }),
1811
1811
  /* @__PURE__ */ l(Kr, { registry: e, props: c }),
@@ -1813,10 +1813,10 @@ function Hr(e) {
1813
1813
  ] }) });
1814
1814
  }
1815
1815
  const a = { Table: i, Column: t, RowDetail: n, RowActions: o, Action: r, GroupBy: s };
1816
- return mr(i, e), a;
1816
+ return br(i, e), a;
1817
1817
  }
1818
1818
  function $r({ registry: e }) {
1819
- return Le(e.subscribe, e.bodyVersion, e.bodyVersion), !e.hook || !e.needsOwnToolbar() ? null : /* @__PURE__ */ l(jt, { registry: e, own: !0 });
1819
+ return qe(e.subscribe, e.bodyVersion, e.bodyVersion), !e.hook || !e.needsOwnToolbar() ? null : /* @__PURE__ */ l(zt, { registry: e, own: !0 });
1820
1820
  }
1821
1821
  function Kr({ registry: e, props: t }) {
1822
1822
  const {
@@ -1831,154 +1831,163 @@ function Kr({ registry: e, props: t }) {
1831
1831
  rowProps: h,
1832
1832
  ariaLabel: d
1833
1833
  } = t;
1834
- Le(e.subscribe, e.bodyVersion, e.bodyVersion);
1835
- const m = U(), w = ue(), k = 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 j, M;
1838
- const y = b.current;
1839
- if (!y || !o) return;
1840
- const R = ((j = y.tHead) == null ? void 0 : j.getBoundingClientRect().height) ?? 0, K = ((M = y.querySelector("tr[data-line='header']")) == null ? void 0 : M.getBoundingClientRect().height) ?? 0;
1841
- y.style.setProperty("--u-table-head", `${R}px`), y.style.setProperty("--u-table-group-header", `${K}px`), y.parentElement && mt(y.parentElement);
1837
+ var z, L;
1838
+ const k = v.current;
1839
+ if (!k || !o) return;
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 y = e.takeFocusBeforeFold(), R = b.current;
1844
- if (!y || !R || y.table !== R || y.element.isConnected) return;
1845
- const K = Array.from(R.querySelectorAll("[data-fold-path]")), j = JSON.parse(y.group);
1846
- for (let M = j.length; M > 0; M--) {
1847
- const J = JSON.stringify(j.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
- Ir(b, g ? `${g.grouping.join("|")}#${g.folded.join("|")}` : "");
1851
+ const p = e.hook && !e.hook.companion.virtual ? e.hook.publicSnapshot : null;
1852
+ Ir(v, p ? `${p.grouping.join("|")}#${p.folded.join("|")}` : "");
1853
1853
  const _ = e.hook;
1854
1854
  if (!_) return null;
1855
- const C = _.publicSnapshot, S = e.projection(), I = e.rowHeader(), x = Et(e), A = e.detail, v = e.hasRowActions() ? e.actions.ordered() : [], F = _.companion.virtual, L = C.grouping, N = L.length > 0 ? S.visibleLines : void 0, V = N ? e.groupingEntries(_.rows) : [], z = (y) => V.find((R) => R.spec.id === y), P = N && L.length > 1 ? z(L.at(-1)) : void 0, q = N ? x.filter((y) => !L.includes(y.spec.id)) : x, ie = (n ? 1 : 0) + (A ? 1 : 0), ae = ie + (P ? 1 : 0) + q.length + (v.length > 0 ? 1 : 0), de = ie * Oe, fe = (y) => r && y === I, we = S.visible, be = !u && q.some((y) => y.spec.aggregate), ye = C.search !== "" || Object.keys(C.filter).length > 0, le = (y, R, K, j) => /* @__PURE__ */ l(
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
1856
  Wr,
1857
1857
  {
1858
- row: y,
1858
+ row: k,
1859
1859
  index: R,
1860
- absolute: F ? K : void 0,
1860
+ absolute: O ? $ : void 0,
1861
1861
  registry: e,
1862
1862
  hook: _,
1863
- columns: q,
1864
- line: j,
1865
- spanEntry: P,
1866
- header: I,
1863
+ columns: K,
1864
+ line: z,
1865
+ spanEntry: I,
1866
+ header: D,
1867
1867
  selectable: n,
1868
- actions: v,
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
- _.rowKey(y)
1877
+ _.rowKey(k)
1878
1878
  );
1879
1879
  let te;
1880
1880
  if (u)
1881
- te = /* @__PURE__ */ l("tbody", { children: /* @__PURE__ */ l(Xr, { columns: ae }) });
1882
- else if (S.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: _.admitted.length > 0 && ye ? /* @__PURE__ */ O(Q, { children: [
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
+ ) });
1891
+ else if (C.filtered.length === 0)
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(C), 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 y = F ? Rt(N).map((M) => M.kind === "folded" || !M.continued ? M : { ...M, continued: !1 }) : N, R = y.length - N.length, K = F && F.from > 0 ? F.fillerBefore / F.from : 0, j = (M, J) => {
1889
- var D, E;
1890
- const Z = J - R, 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: P,
1898
- levelEntry: z(L[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: v.length > 0,
1903
- total: S.filtered,
1904
- siblings: ((D = M.parents.at(-1)) == null ? void 0 : D.groups) ?? S.groups ?? [],
1905
- depth: L.length,
1911
+ hasActions: y.length > 0,
1912
+ total: C.filtered,
1913
+ siblings: ((V = L.parents.at(-1)) == null ? void 0 : V.groups) ?? C.groups ?? [],
1914
+ depth: q.length,
1906
1915
  hook: _,
1907
- formats: w,
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: P,
1918
- levelEntry: z(L[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: v.length > 0,
1923
- total: S.filtered,
1924
- siblings: ((E = M.parents.at(-1)) == null ? void 0 : E.groups) ?? S.groups ?? [],
1925
- depth: L.length,
1931
+ hasActions: y.length > 0,
1932
+ total: C.filtered,
1933
+ siblings: ((G = L.parents.at(-1)) == null ? void 0 : G.groups) ?? C.groups ?? [],
1934
+ depth: q.length,
1926
1935
  hook: _,
1927
- formats: w,
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
- kt,
1942
+ te = O ? /* @__PURE__ */ l(
1943
+ _t,
1935
1944
  {
1936
- virtual: { ...F, fillerBefore: Math.max(0, F.fillerBefore - R * K) },
1945
+ virtual: { ...O, fillerBefore: Math.max(0, O.fillerBefore - R * $) },
1937
1946
  colSpan: ae,
1938
- children: y.map(j)
1947
+ children: k.map(z)
1939
1948
  }
1940
- ) : /* @__PURE__ */ l("tbody", { children: N.map(j) });
1941
- } else F ? te = /* @__PURE__ */ l(kt, { virtual: F, colSpan: ae, children: we.map((y, R) => le(y, R, F.from + R)) }) : te = /* @__PURE__ */ l("tbody", { children: we.map((y, R) => le(y, R, R)) });
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,
1946
- onScroll: (y) => {
1947
- F == null || F.onScroll(), N && o && mt(y.currentTarget);
1954
+ ref: O == null ? void 0 : O.scrollRef,
1955
+ onScroll: (k) => {
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 ? L.length : void 0,
1957
- style: N ? { "--u-header-levels": L.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 ? (S.lines ?? S.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
- k === "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
- Se,
1985
+ Ce,
1977
1986
  {
1978
1987
  "aria-label": m.selectAllRows,
1979
- checked: C.selection.allSelected,
1980
- indeterminate: C.selection.someSelected,
1981
- onChange: C.selection.toggleAll
1988
+ checked: S.selection.allSelected,
1989
+ indeterminate: S.selection.someSelected,
1990
+ onChange: S.selection.toggleAll
1982
1991
  }
1983
1992
  )
1984
1993
  }
@@ -1986,48 +1995,48 @@ function Kr({ 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
- P && (e.columnById(P.spec.id) === P ? /* @__PURE__ */ l(wt, { entry: P, registry: e, hook: _, sticky: !1, left: de }) : /* @__PURE__ */ l("th", { scope: "col", className: f.th, children: P.spec.label })),
1994
- q.map((y) => /* @__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
- entry: y,
2006
+ entry: k,
1998
2007
  registry: e,
1999
2008
  hook: _,
2000
- sticky: fe(y),
2009
+ sticky: fe(k),
2001
2010
  left: de
2002
2011
  },
2003
- y.key
2012
+ k.key
2004
2013
  )),
2005
- v.length > 0 && /* @__PURE__ */ l("th", { scope: "col", className: G(f.th, f.actionsCell), children: /* @__PURE__ */ l(Re, { 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 ? (S.lines ?? S.filtered).length + 2 : void 0, children: [
2009
- Array.from({ length: ie }, (y, R) => /* @__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: R * Oe } : void 0
2021
+ className: B(f.td, f.control, r && f.stickyCell),
2022
+ style: r ? { left: R * Fe } : void 0
2014
2023
  },
2015
2024
  R
2016
2025
  )),
2017
- P && /* @__PURE__ */ l("td", { className: f.td }),
2018
- q.map((y) => /* @__PURE__ */ l(
2019
- Yr,
2026
+ I && /* @__PURE__ */ l("td", { className: f.td }),
2027
+ K.map((k) => /* @__PURE__ */ l(
2028
+ Ur,
2020
2029
  {
2021
- entry: y,
2022
- rows: S.filtered,
2023
- formats: w,
2030
+ entry: k,
2031
+ rows: C.filtered,
2032
+ formats: b,
2024
2033
  wording: m,
2025
- sticky: fe(y),
2034
+ sticky: fe(k),
2026
2035
  left: de
2027
2036
  },
2028
- y.key
2037
+ k.key
2029
2038
  )),
2030
- v.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 Kr({ 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, k = 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, v = A.closest("th");
2054
- if (!v) return;
2055
- const F = x.clientX, L = v.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 = (P) => {
2058
- P.pointerId === N && i.setWidth(h, Math.max(p, L + (P.clientX - F)));
2059
- }, z = (P) => {
2060
- P.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, v = x == null ? void 0 : x.closest("table");
2065
- if (!x || !A || !v) return;
2066
- const F = Array.from(A.children).indexOf(x), L = A.children.length, N = { cell: x.style.width, table: v.style.width };
2067
- x.style.width = "", v.style.width = "auto";
2068
- let V = 0;
2069
- for (const z of Array.from(v.rows)) {
2070
- if (z.cells.length !== L) continue;
2071
- const P = z.cells[F];
2072
- P && (V = Math.max(V, P.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, v.style.width = N.table, V > 0 && i.setWidth(h, Math.max(p, V + 1));
2083
+ x.style.width = N.cell, y.style.width = N.table, M > 0 && i.setWidth(h, Math.max(g, M + 1));
2075
2084
  }, _ = (x) => {
2076
2085
  if (!s.resizable || !x.altKey) return;
2077
- const A = x.key === "ArrowRight", v = x.key === "ArrowLeft", F = x.key === "Home";
2078
- if (!A && !v && !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 L = x.currentTarget;
2081
- if (F) {
2082
- g(L);
2089
+ const q = x.currentTarget;
2090
+ if (O) {
2091
+ p(q);
2083
2092
  return;
2084
2093
  }
2085
- const N = L.getBoundingClientRect().width, V = x.shiftKey ? 32 : 8;
2086
- i.setWidth(h, Math.max(p, N + (A ? V : -V)));
2087
- }, C = 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,41 +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", 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.6", strokeLinecap: "round", strokeLinejoin: "round" }) }) : /* @__PURE__ */ O("svg", { viewBox: "0 0 10 12", width: "10", height: "12", children: [
2097
- /* @__PURE__ */ l("path", { d: "M2.4 4.4 5 1.8l2.6 2.6", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
2098
- /* @__PURE__ */ l("path", { d: "M2.4 7.6 5 10.2l2.6-2.6", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
2099
- ] }) })
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" }) }) : (
2106
+ /* Drawn in the nominal box and set in the 12 pixels the indicator
2107
+ has always taken, so that the head does not move. */
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" }) })
2109
+ ) })
2100
2110
  ]
2101
2111
  }
2102
- ) : s.label, S = m === "asc" ? "ascending" : m === "desc" ? "descending" : "none", I = me(s.filter) !== void 0 && !(s.filter === "list" && a === "other");
2103
- 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(
2104
2114
  "th",
2105
2115
  {
2106
2116
  scope: "col",
2107
2117
  "data-column": h,
2108
- "aria-sort": u ? S : void 0,
2118
+ "aria-sort": u ? C : void 0,
2109
2119
  tabIndex: s.resizable && !u ? 0 : void 0,
2110
2120
  onKeyDown: _,
2111
- className: G(f.th, c && f.numeric, o && f.stickyCell),
2121
+ className: B(f.th, c && f.numeric, o && f.stickyCell),
2112
2122
  style: {
2113
- ...k !== void 0 ? { width: k } : {},
2123
+ ...w !== void 0 ? { width: w } : {},
2114
2124
  ...o ? { left: r } : {}
2115
2125
  },
2116
2126
  children: [
2117
- I ? /* @__PURE__ */ O("span", { className: f.thFlex, children: [
2118
- C,
2119
- /* @__PURE__ */ l(br, { entry: e, registry: t, hook: n })
2120
- ] }) : C,
2127
+ D ? /* @__PURE__ */ F("span", { className: f.thFlex, children: [
2128
+ S,
2129
+ /* @__PURE__ */ l(wr, { entry: e, registry: t, hook: n })
2130
+ ] }) : S,
2121
2131
  s.resizable && /* @__PURE__ */ l(
2122
2132
  "span",
2123
2133
  {
2124
2134
  role: "presentation",
2125
2135
  className: f.grip,
2126
- onPointerDown: b,
2136
+ onPointerDown: v,
2127
2137
  onClick: (x) => x.stopPropagation(),
2128
2138
  onDoubleClick: (x) => {
2129
- x.stopPropagation(), g(x.currentTarget.closest("th"));
2139
+ x.stopPropagation(), p(x.currentTarget.closest("th"));
2130
2140
  }
2131
2141
  }
2132
2142
  )
@@ -2148,27 +2158,28 @@ function Wr({
2148
2158
  rowHeaderLeft: h,
2149
2159
  columnCount: d,
2150
2160
  rowProps: m,
2151
- baseId: w,
2152
- formats: k,
2153
- wording: p,
2154
- line: b,
2155
- spanEntry: g
2161
+ baseId: b,
2162
+ formats: w,
2163
+ wording: g,
2164
+ line: v,
2165
+ spanEntry: p
2156
2166
  }) {
2157
- const _ = Ue(Wt), C = r.publicSnapshot, S = r.rowKey(e), I = jr(e, i, r, k, p), x = o.detail, A = x !== null && C.expanded.includes(S), v = `${w}-detail-${t}`, { className: F, ...L } = (m == null ? void 0 : m(e)) ?? {}, N = n !== void 0, V = b ? b.span ?? b.parents.at(-1) : void 0;
2158
- return /* @__PURE__ */ O(Q, { children: [
2159
- /* @__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(
2160
2170
  "tr",
2161
2171
  {
2162
- ...L,
2163
- className: G(F, N && f.virtualRow),
2172
+ ...q,
2173
+ className: B(O, N && f.virtualRow),
2164
2174
  "data-row": N ? n : void 0,
2165
- "data-line": b ? "row" : void 0,
2166
- "data-motion": S,
2167
- "data-group-first": b != null && b.first ? "" : void 0,
2168
- "data-group": V == null ? void 0 : V.path,
2169
- "aria-level": b ? b.parents.length + 1 : void 0,
2170
- "aria-posinset": V ? V.rows.indexOf(e) + 1 : void 0,
2171
- "aria-setsize": V == null ? void 0 : V.rows.length,
2175
+ "data-line": v ? "row" : void 0,
2176
+ "data-motion": C,
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,
2172
2183
  tabIndex: N ? n === _ ? 0 : -1 : void 0,
2173
2184
  "data-even": N && n % 2 === 1 ? "" : void 0,
2174
2185
  "aria-rowindex": N ? n + 2 : void 0,
@@ -2176,14 +2187,14 @@ function Wr({
2176
2187
  a && /* @__PURE__ */ l(
2177
2188
  "td",
2178
2189
  {
2179
- className: G(f.td, f.control, u && f.stickyCell),
2190
+ className: B(f.td, f.control, u && f.stickyCell),
2180
2191
  style: u ? { left: 0 } : void 0,
2181
2192
  children: /* @__PURE__ */ l(
2182
- Se,
2193
+ Ce,
2183
2194
  {
2184
- "aria-label": p.selectRow(I),
2185
- checked: C.selection.isSelected(S),
2186
- onChange: () => C.selection.toggle(S)
2195
+ "aria-label": g.selectRow(D),
2196
+ checked: S.selection.isSelected(C),
2197
+ onChange: () => S.selection.toggle(C)
2187
2198
  }
2188
2199
  )
2189
2200
  }
@@ -2191,44 +2202,44 @@ function Wr({
2191
2202
  x && /* @__PURE__ */ l(
2192
2203
  "td",
2193
2204
  {
2194
- className: G(f.td, f.control, u && f.stickyCell),
2195
- 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,
2196
2207
  children: /* @__PURE__ */ l(
2197
2208
  "button",
2198
2209
  {
2199
2210
  type: "button",
2200
2211
  "aria-expanded": A,
2201
- "aria-controls": A ? v : void 0,
2202
- "aria-label": A ? p.collapseRowNamed(I) : p.expandRowNamed(I),
2203
- className: G(f.expander, A && f.expanderOpen),
2204
- onClick: () => C.toggleRow(S),
2205
- children: /* @__PURE__ */ l("svg", { viewBox: "0 0 10 10", width: "10", height: "10", "aria-hidden": "true", children: /* @__PURE__ */ l("path", { d: "M3.5 1.5 7 5l-3.5 3.5", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
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),
2215
+ onClick: () => S.toggleRow(C),
2216
+ children: /* @__PURE__ */ l(tn, {})
2206
2217
  }
2207
2218
  )
2208
2219
  }
2209
2220
  ),
2210
- b && b.span && /* @__PURE__ */ l(Gr, { line: { ...b, span: b.span }, entry: g, selectable: a, hook: r, formats: k, wording: p }),
2211
- s.map((z) => /* @__PURE__ */ l(
2212
- qr,
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(
2223
+ Yr,
2213
2224
  {
2214
- entry: z,
2225
+ entry: E,
2215
2226
  row: e,
2216
- kind: o.kindOf(z, r.rows),
2217
- sticky: u && z === i,
2227
+ kind: o.kindOf(E, r.rows),
2228
+ sticky: u && E === i,
2218
2229
  left: h,
2219
- formats: k,
2220
- wording: p
2230
+ formats: w,
2231
+ wording: g
2221
2232
  },
2222
- z.key
2233
+ E.key
2223
2234
  )),
2224
- c.length > 0 && /* @__PURE__ */ l("td", { className: G(f.td, f.actionsCell), children: /* @__PURE__ */ l(Jr, { 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 }) })
2225
2236
  ]
2226
2237
  }
2227
2238
  ),
2228
- A && x && /* @__PURE__ */ l("tr", { id: v, 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) }) })
2229
2240
  ] });
2230
2241
  }
2231
- function qr({
2242
+ function Yr({
2232
2243
  entry: e,
2233
2244
  row: t,
2234
2245
  kind: n,
@@ -2237,21 +2248,21 @@ function qr({
2237
2248
  formats: s,
2238
2249
  wording: i
2239
2250
  }) {
2240
- 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);
2241
2252
  let h;
2242
- Y(c) ? h = /* @__PURE__ */ l(Ht, { wording: i }) : a.presentation ? h = a.presentation(c, t) : h = _e(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);
2243
2254
  const d = a.rowHeader ? "th" : "td";
2244
2255
  return /* @__PURE__ */ l(
2245
2256
  d,
2246
2257
  {
2247
2258
  scope: a.rowHeader ? "row" : void 0,
2248
- 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),
2249
2260
  style: o ? { left: r } : void 0,
2250
2261
  children: h
2251
2262
  }
2252
2263
  );
2253
2264
  }
2254
- function Yr({
2265
+ function Ur({
2255
2266
  entry: e,
2256
2267
  rows: t,
2257
2268
  formats: n,
@@ -2260,12 +2271,12 @@ function Yr({
2260
2271
  left: s
2261
2272
  }) {
2262
2273
  const i = r ? { left: s } : void 0;
2263
- 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 });
2264
2275
  const a = typeof e.spec.aggregate == "function" ? "own" : e.spec.aggregate;
2265
- 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 }) });
2266
2277
  }
2267
- const Ur = 2;
2268
- function Jr({
2278
+ const Jr = 2;
2279
+ function Xr({
2269
2280
  actions: e,
2270
2281
  row: t,
2271
2282
  name: n,
@@ -2275,7 +2286,7 @@ function Jr({
2275
2286
  const i = s.onSelect;
2276
2287
  i(s.bulk ? [t] : t);
2277
2288
  };
2278
- return e.length <= Ur ? /* @__PURE__ */ l("div", { className: f.actions, children: e.map(({ key: s, spec: i }) => /* @__PURE__ */ l(
2289
+ return e.length <= Jr ? /* @__PURE__ */ l("div", { className: f.actions, children: e.map(({ key: s, spec: i }) => /* @__PURE__ */ l(
2279
2290
  ee,
2280
2291
  {
2281
2292
  size: "sm",
@@ -2286,97 +2297,97 @@ function Jr({
2286
2297
  },
2287
2298
  s
2288
2299
  )) }) : /* @__PURE__ */ l("div", { className: f.actions, children: /* @__PURE__ */ l(
2289
- At,
2300
+ Tt,
2290
2301
  {
2291
2302
  align: "end",
2292
2303
  trigger: /* @__PURE__ */ l(ee, { size: "sm", variant: "ghost", "aria-label": o.rowActionsMenu(n), children: "⋯" }),
2293
- 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))
2294
2305
  }
2295
2306
  ) });
2296
2307
  }
2297
- function Xr({ columns: e, rows: t = 4 }) {
2298
- const n = [72, 48, 60, 40, 56, 64];
2299
- 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)) });
2300
2311
  }
2301
- const Wt = yt(0);
2302
- function bt({ height: e, colSpan: t }) {
2312
+ const Kt = St(0);
2313
+ function wt({ height: e, colSpan: t }) {
2303
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 } }) });
2304
2315
  }
2305
- function kt({
2316
+ function _t({
2306
2317
  virtual: e,
2307
2318
  colSpan: t,
2308
2319
  children: n
2309
2320
  }) {
2310
- const { count: o, fillerBefore: r, fillerAfter: s, showRow: i } = e, a = re(null), [c, u] = H(0), h = (w, k) => {
2311
- a.current = k, u(k), i(k), requestAnimationFrame(() => {
2312
- var p;
2313
- (p = w.querySelector(`[data-row="${k}"]`)) == 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();
2314
2325
  });
2315
- }, d = c >= e.from && c < e.to ? c : e.from, m = (w) => {
2316
- if (w.defaultPrevented || o === 0) return;
2317
- const k = w.target, p = k.closest("[data-row]");
2318
- if (p && k !== p) return;
2319
- const b = p ? Number(p.dataset.row) : a.current ?? -1;
2320
- let g = null;
2321
- 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));
2322
2333
  };
2323
2334
  return /* @__PURE__ */ l(
2324
2335
  "tbody",
2325
2336
  {
2326
2337
  className: f.virtualBody,
2327
2338
  onKeyDown: m,
2328
- onFocus: (w) => {
2329
- const k = w.target.closest("[data-row]");
2330
- k && u(Number(k.dataset.row));
2339
+ onFocus: (b) => {
2340
+ const w = b.target.closest("[data-row]");
2341
+ w && u(Number(w.dataset.row));
2331
2342
  },
2332
- children: /* @__PURE__ */ O(Wt.Provider, { value: d, children: [
2333
- /* @__PURE__ */ l(bt, { height: r, colSpan: t }),
2343
+ children: /* @__PURE__ */ F(Kt.Provider, { value: d, children: [
2344
+ /* @__PURE__ */ l(wt, { height: r, colSpan: t }),
2334
2345
  n,
2335
- /* @__PURE__ */ l(bt, { height: s, colSpan: t })
2346
+ /* @__PURE__ */ l(wt, { height: s, colSpan: t })
2336
2347
  ] })
2337
2348
  }
2338
2349
  );
2339
2350
  }
2340
- const Qr = "_verdict_yxa4g_6", Zr = "_glyph_yxa4g_13", es = "_value_yxa4g_23", ts = "_excess_yxa4g_28", Te = {
2341
- verdict: Qr,
2342
- glyph: Zr,
2343
- value: es,
2344
- excess: ts
2345
- }, vt = (e, t, n) => t === "percent" ? n.percent(e) : t === "count" ? n.count(e) : n.number(e, typeof t == "object" ? t.decimals : void 0), ns = (e, t) => e === "alarm" ? t.verdictAlarm : e === "warning" ? t.verdictWarning : e === "unknown" ? t.verdictUnknown : t.verdictOk, os = {
2351
+ const Zr = "_verdict_1mxfd_6", es = "_glyph_1mxfd_13", ts = "_value_1mxfd_23", ns = "_excess_1mxfd_28", Te = {
2352
+ verdict: Zr,
2353
+ glyph: es,
2354
+ value: ts,
2355
+ excess: ns
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 = {
2346
2357
  ok: "✓",
2347
2358
  unknown: "?",
2348
2359
  warning: "▲",
2349
2360
  alarm: "■"
2350
2361
  };
2351
- function rs({ reading: e, format: t }) {
2352
- const n = ue(), o = U(), { measured: r, assessment: s } = e, i = ns(s.verdict, o);
2353
- return /* @__PURE__ */ O("span", { className: Te.verdict, "data-verdict": s.verdict, title: i, children: [
2354
- /* @__PURE__ */ l("span", { "aria-hidden": "true", className: Te.glyph, children: os[s.verdict] }),
2355
- /* @__PURE__ */ l("span", { className: Te.value, children: r === null ? o.statAbsentValue : vt(r, t, n) }),
2356
- s.excess !== void 0 && /* @__PURE__ */ O("span", { className: Te.excess, children: [
2362
+ function ss({ reading: e, format: t }) {
2363
+ const n = ue(), o = U(), { measured: r, assessment: s } = e, i = os(s.verdict, o);
2364
+ return /* @__PURE__ */ F("span", { className: Te.verdict, "data-verdict": s.verdict, title: i, children: [
2365
+ /* @__PURE__ */ l("span", { "aria-hidden": "true", className: Te.glyph, children: rs[s.verdict] }),
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: [
2357
2368
  "+",
2358
- vt(s.excess, t, n)
2369
+ yt(s.excess, t, n)
2359
2370
  ] }),
2360
2371
  /* @__PURE__ */ l(Re, { children: i })
2361
2372
  ] });
2362
2373
  }
2363
- const ss = (e) => e.measured, is = (e) => e.reduce(
2364
- (t, n) => !t || Ee(n.assessment.verdict) > Ee(t.assessment.verdict) ? n : t,
2374
+ const is = (e) => e.measured, as = (e) => e.reduce(
2375
+ (t, n) => !t || Ge(n.assessment.verdict) > Ge(t.assessment.verdict) ? n : t,
2365
2376
  void 0
2366
2377
  );
2367
- function as(e) {
2378
+ function ls(e) {
2368
2379
  return function({ id: n, value: o, label: r, limits: s, format: i, sortBy: a = "verdict", width: c, resizable: u, aggregate: h }) {
2369
- const d = JSON.stringify(s), m = $(() => {
2370
- const k = JSON.parse(d);
2371
- return (p) => {
2372
- 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);
2373
2384
  return {
2374
- measured: typeof b == "number" && Number.isFinite(b) ? b : null,
2375
- assessment: tn(b, k)
2385
+ measured: typeof v == "number" && Number.isFinite(v) ? v : null,
2386
+ assessment: nn(v, w)
2376
2387
  };
2377
2388
  };
2378
- }, [o, d]), w = X(
2379
- (k) => a === "value" ? k.measured : Ee(k.assessment.verdict),
2389
+ }, [o, d]), b = X(
2390
+ (w) => a === "value" ? w.measured : Ge(w.assessment.verdict),
2380
2391
  [a]
2381
2392
  );
2382
2393
  return /* @__PURE__ */ l(
@@ -2388,25 +2399,25 @@ function as(e) {
2388
2399
  width: c,
2389
2400
  resizable: u,
2390
2401
  value: m,
2391
- sortValue: w,
2392
- exportValue: ss,
2393
- aggregate: h === "worst" ? is : void 0,
2394
- children: (k) => /* @__PURE__ */ l(rs, { reading: k, format: i })
2402
+ sortValue: b,
2403
+ exportValue: is,
2404
+ aggregate: h === "worst" ? as : void 0,
2405
+ children: (w) => /* @__PURE__ */ l(ss, { reading: w, format: i })
2395
2406
  }
2396
2407
  );
2397
2408
  };
2398
2409
  }
2399
- const qt = (e) => pe(
2410
+ const Wt = (e) => ge(
2400
2411
  `condition-foreign:${e}`,
2401
2412
  `The condition for "${e}" is not of the kind of its filter and is passed over.`
2402
2413
  );
2403
2414
  function Yt(e, t, n) {
2404
2415
  const o = e.columnById(t), r = o ? me(o.spec.filter) : void 0;
2405
2416
  if (!r) return !1;
2406
- const s = Dt(r, n);
2407
- return s === "foreign" && qt(t), s === "effective";
2417
+ const s = Vt(r, n);
2418
+ return s === "foreign" && Wt(t), s === "effective";
2408
2419
  }
2409
- function ls(e, t) {
2420
+ function cs(e, t) {
2410
2421
  if (e.length === 0) return;
2411
2422
  let n = -1, o = [];
2412
2423
  return (r) => {
@@ -2419,20 +2430,20 @@ function ls(e, t) {
2419
2430
  }
2420
2431
  return o.every(({ entry: s, condition: i }) => {
2421
2432
  const a = me(s.spec.filter);
2422
- return !a || tr(a, s.read(r), i);
2433
+ return !a || nr(a, s.read(r), i);
2423
2434
  });
2424
2435
  };
2425
2436
  }
2426
- function cs(e, t) {
2427
- const n = $(() => t ? e.filter((i) => t(i)) : e, [e, t]), [o, r] = H(() => ({ source: e, result: n }));
2437
+ function us(e, t) {
2438
+ const n = j(() => t ? e.filter((i) => t(i)) : e, [e, t]), [o, r] = H(() => ({ source: e, result: n }));
2428
2439
  if (!t) return e;
2429
2440
  const s = o.source === e && (o.result === n || o.result.length === n.length && o.result.every((i, a) => i === n[a]));
2430
2441
  return s || r({ source: e, result: n }), s ? o.result : n;
2431
2442
  }
2432
- function us(e, t) {
2443
+ function ds(e, t) {
2433
2444
  var a, c, u, h, d, m;
2434
2445
  if (t.size === 0) return e;
2435
- 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;
2436
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 : {
2437
2448
  ...e.search ? { search: e.search } : {},
2438
2449
  ...e.page ? { page: e.page } : {},
@@ -2443,33 +2454,33 @@ function us(e, t) {
2443
2454
  ...s && Object.keys(s).length ? { widths: s } : {}
2444
2455
  };
2445
2456
  }
2446
- const Ge = (e) => e === void 0 ? [] : typeof e == "string" ? [e] : [...e], ds = (e, t) => e.length === t.length && e.every((n, o) => n === t[o]);
2447
- function _t(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) {
2448
2459
  const t = [], n = (o) => {
2449
2460
  for (const r of o)
2450
2461
  t.push(r.path), n(r.groups);
2451
2462
  };
2452
2463
  return n(e ?? []), t;
2453
2464
  }
2454
- const fs = (e, t) => e.size === t.size && [...e].every((n) => t.has(n));
2455
- function hs(e, t) {
2465
+ const hs = (e, t) => e.size === t.size && [...e].every((n) => t.has(n));
2466
+ function ps(e, t) {
2456
2467
  const n = {};
2457
2468
  for (const o of e) o.width !== void 0 && (n[o.id] = o.width);
2458
2469
  return { ...n, ...t };
2459
2470
  }
2460
2471
  function gs(e, t) {
2461
2472
  const [n] = H(() => new gr()), [o] = H(() => {
2462
- const y = Hr(n);
2463
- return { ...y, VerdictColumn: as(y.Column) };
2473
+ const k = jr(n);
2474
+ return { ...k, VerdictColumn: ls(k.Column) };
2464
2475
  });
2465
- Le(n.subscribe, n.structureVersion, n.structureVersion);
2466
- 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 = $(() => ls(c, n), [c, n]), d = t.preFilter ?? t.filter, m = cs(s, d), [w, k] = H(
2467
- () => a != null && a.grouping ? [...a.grouping] : Ge(t.defaultGrouping)
2468
- ), [p, b] = H(() => (a == null ? void 0 : a.folded) ?? []), g = n.orderedColumns().length + n.groupKeys.entries.size > 0, _ = g ? n.effectiveGrouping(w, s) : w.slice(0, Qe), C = _.join("|"), S = $(() => new Set(p), [p]), I = _.length ? n.groupingModel(_, s) : null, x = $(
2469
- () => I && I.levels.length ? { ...I, folded: S, 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,
2470
2481
  // eslint-disable-next-line react-hooks/exhaustive-deps -- the model's identity carries the ids and the columns
2471
- [I, S, r.compareText, C]
2472
- ), A = t.rowKey, v = kn(m, i, {
2482
+ [D, C, r.compareText, S]
2483
+ ), A = t.rowKey, y = _n(m, i, {
2473
2484
  rowKey: A,
2474
2485
  pageSize: t.pageSize,
2475
2486
  defaultSort: t.defaultSort,
@@ -2477,100 +2488,100 @@ function gs(e, t) {
2477
2488
  initialView: a,
2478
2489
  virtual: t.virtual,
2479
2490
  grouping: x
2480
- }), { setPage: F } = v, L = X(
2481
- (y, R) => {
2482
- let K = R == null;
2483
- if (!K && n.orderedColumns().length > 0) {
2484
- const j = n.columnById(y), M = j ? me(j.spec.filter) : void 0;
2485
- if (!M) {
2486
- pe(
2487
- `condition-without-filter:${y}`,
2488
- j ? `The column "${y}" has no filter; its condition is passed over.` : `No column is called "${y}"; its condition is passed over.`
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(
2498
+ `condition-without-filter:${k}`,
2499
+ z ? `The column "${k}" has no filter; its condition is passed over.` : `No column is called "${k}"; its condition is passed over.`
2489
2500
  );
2490
2501
  return;
2491
2502
  }
2492
- const J = Dt(M, R);
2503
+ const J = Vt(L, R);
2493
2504
  if (J === "foreign") {
2494
- qt(y);
2505
+ Wt(k);
2495
2506
  return;
2496
2507
  }
2497
- K = J === "empty";
2508
+ $ = J === "empty";
2498
2509
  }
2499
- u((j) => {
2500
- const M = j.findIndex(([J]) => J === y);
2501
- return K ? M === -1 ? j : j.filter((J, Z) => Z !== M) : M === -1 ? [...j, [y, R]] : j.map((J, Z) => Z === M ? [y, R] : J);
2502
- }), 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);
2503
2514
  },
2504
- [n, F]
2505
- ), N = new Set(n.orderedColumns().map((y) => y.spec.id)), [V, z] = H(() => /* @__PURE__ */ new Set());
2506
- if (!fs(V, N)) {
2507
- const y = new Set([...V].filter((R) => !N.has(R)));
2508
- z(N), c.some(([R]) => y.has(R)) && u((R) => R.filter(([K]) => !y.has(K)));
2509
- }
2510
- const P = N.size === 0 ? c : c.filter(([y, R]) => Yt(n, y, R)), q = us(v.view, N), ie = P.length > 0 ? { ...q, conditions: Object.fromEntries(P) } : q, ae = N.size === 0 ? v.sort : v.sort.filter((y) => N.has(y.column)), de = g ? n.effectiveGrouping(Ge(t.defaultGrouping), s) : Ge(t.defaultGrouping), fe = v.groups ? fn(v.groups, p) : g ? [] : [...p], we = {
2511
- ...ie,
2512
- ...ds(_, de) ? {} : { grouping: _ },
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: _ },
2513
2524
  ...fe.length ? { folded: fe } : {}
2514
- }, be = (y) => {
2515
- k([...y]), F(1);
2516
- }, ye = (y) => {
2517
- _t(v.groups).includes(y) && (n.noteFocusBeforeFold(), b((R) => R.includes(y) ? R.filter((K) => K !== y) : [...R, y]));
2525
+ }, ve = (k) => {
2526
+ w([...k]), O(1);
2527
+ }, ke = (k) => {
2528
+ kt(y.groups).includes(k) && (n.noteFocusBeforeFold(), v((R) => R.includes(k) ? R.filter(($) => $ !== k) : [...R, k]));
2518
2529
  }, le = n.paginates() || t.virtual !== void 0, te = {
2519
2530
  rows: e,
2520
- filtered: v.filtered,
2521
- visible: le ? v.visible : v.filtered,
2522
- page: le ? v.page : 1,
2523
- pageCount: le ? v.pageCount : 1,
2524
- pageSize: v.pageSize,
2525
- setPage: v.setPage,
2526
- setPageSize: v.setPageSize,
2527
- search: v.search,
2528
- setSearch: v.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,
2529
2540
  sort: ae,
2530
- toggleSort: v.toggleSort,
2531
- hidden: v.hidden,
2532
- toggleColumn: v.toggleColumn,
2533
- order: v.order,
2534
- setOrder: v.setOrder,
2535
- widths: hs(i, v.widths),
2536
- setWidth: v.setWidth,
2537
- expanded: v.expanded,
2538
- toggleRow: v.toggleRow,
2539
- filter: Object.fromEntries(P),
2540
- setFilter: L,
2541
- selection: t.selection ?? v.selection,
2542
- view: we,
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,
2543
2554
  grouping: _,
2544
- setGrouping: be,
2555
+ setGrouping: ve,
2545
2556
  folded: fe,
2546
- toggleFold: ye,
2557
+ toggleFold: ke,
2547
2558
  foldAll: () => {
2548
- n.noteFocusBeforeFold(), b(_t(v.groups));
2559
+ n.noteFocusBeforeFold(), v(kt(y.groups));
2549
2560
  },
2550
2561
  unfoldAll: () => {
2551
- n.noteFocusBeforeFold(), b([]);
2562
+ n.noteFocusBeforeFold(), v([]);
2552
2563
  },
2553
- asCsv: () => xr(n),
2564
+ asCsv: () => Ar(n),
2554
2565
  virtual: t.virtual !== void 0
2555
2566
  };
2556
2567
  return n.setHook({
2557
2568
  rows: s,
2558
2569
  admitted: m,
2559
2570
  modelColumns: i,
2560
- companion: v,
2571
+ companion: y,
2561
2572
  filter: h,
2562
2573
  grouping: x,
2563
- folded: S,
2574
+ folded: C,
2564
2575
  publicSnapshot: te,
2565
2576
  rowKey: A,
2566
2577
  formats: r
2567
2578
  }), { ...te, ...o };
2568
2579
  }
2569
- function Xs(e) {
2580
+ function Qs(e) {
2570
2581
  return e;
2571
2582
  }
2572
- function nt(e, t) {
2573
- const n = se();
2583
+ function ot(e, t) {
2584
+ const n = ie();
2574
2585
  e == null || e.register(t, n), W(() => {
2575
2586
  if (e)
2576
2587
  return e.register(t, n), e.commit(), () => {
@@ -2578,18 +2589,18 @@ function nt(e, t) {
2578
2589
  };
2579
2590
  }, [e, t, n]);
2580
2591
  }
2581
- function Qs({ children: e, className: t, of: n }) {
2592
+ function Zs({ children: e, className: t, of: n }) {
2582
2593
  const o = xe(n);
2583
- nt(o == null ? void 0 : o.registry, "toolbar");
2594
+ ot(o == null ? void 0 : o.registry, "toolbar");
2584
2595
  const r = o == null ? void 0 : o.registry;
2585
- return /* @__PURE__ */ l(jt, { registry: r ?? null, className: t, children: e });
2596
+ return /* @__PURE__ */ l(zt, { registry: r ?? null, className: t, children: e });
2586
2597
  }
2587
- function Zs({ placeholder: e, "aria-label": t, className: n, of: o }) {
2598
+ function ei({ placeholder: e, "aria-label": t, className: n, of: o }) {
2588
2599
  const r = xe(o), s = U();
2589
- 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;
2590
2601
  const { snapshot: i } = r;
2591
2602
  return /* @__PURE__ */ l(
2592
- on,
2603
+ rn,
2593
2604
  {
2594
2605
  size: "sm",
2595
2606
  type: "search",
@@ -2603,26 +2614,26 @@ function Zs({ placeholder: e, "aria-label": t, className: n, of: o }) {
2603
2614
  }
2604
2615
  );
2605
2616
  }
2606
- function ei({ of: e }) {
2607
- var b;
2608
- const t = xe(e), n = U(), [o, r] = H(!1), s = re(null), i = re(null), a = se(), [c, u] = H(null);
2617
+ function ti({ of: e }) {
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);
2609
2620
  if (W(() => {
2610
- var S;
2621
+ var C;
2611
2622
  if (!c || !i.current) return;
2612
- const g = Array.from(i.current.children).find(
2613
- (I) => I.dataset.column === c.id
2614
- ), _ = g == null ? void 0 : g.querySelector(`[data-direction="${c.direction}"]`), C = 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(
2615
2626
  `[data-direction="${c.direction === "forward" ? "backward" : "forward"}"]`
2616
2627
  );
2617
- (S = _ && !_.disabled ? _ : C) == null || S.focus();
2628
+ (C = _ && !_.disabled ? _ : S) == null || C.focus();
2618
2629
  }, [c]), !t) return null;
2619
- const { registry: h, snapshot: d } = t, m = h.hook, w = h.withStickyHeaderFirst(
2620
- et(h.modelColumns(m.rows, m.formats), d.order)
2621
- ), k = h.stickyRowHeader ? ((b = w[0]) == null ? void 0 : b.hideable) === !1 : !1, p = (g, _) => {
2622
- const C = w.map((I) => I.id), S = g + _;
2623
- S < 0 || S >= C.length || ([C[g], C[S]] = [C[S], C[g]], d.setOrder(C), u({ id: w[g].id, direction: _ < 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" }));
2624
2635
  };
2625
- return /* @__PURE__ */ O(Q, { children: [
2636
+ return /* @__PURE__ */ F(Q, { children: [
2626
2637
  /* @__PURE__ */ l(
2627
2638
  ee,
2628
2639
  {
@@ -2635,8 +2646,8 @@ function ei({ of: e }) {
2635
2646
  children: n.columns
2636
2647
  }
2637
2648
  ),
2638
- /* @__PURE__ */ O(
2639
- St,
2649
+ /* @__PURE__ */ F(
2650
+ Nt,
2640
2651
  {
2641
2652
  open: o,
2642
2653
  onOpenChange: r,
@@ -2647,16 +2658,16 @@ function ei({ of: e }) {
2647
2658
  id: a,
2648
2659
  className: f.columnsPanel,
2649
2660
  children: [
2650
- /* @__PURE__ */ l("ul", { ref: i, className: f.columnsList, "aria-label": n.arrangeColumns, children: w.map((g, _) => {
2651
- const C = g.label ?? g.id;
2652
- 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: [
2653
2664
  /* @__PURE__ */ l(
2654
- Se,
2665
+ Ce,
2655
2666
  {
2656
- label: C,
2657
- checked: !d.hidden.includes(g.id),
2658
- disabled: g.hideable === !1,
2659
- onChange: () => d.toggleColumn(g.id)
2667
+ label: S,
2668
+ checked: !d.hidden.includes(p.id),
2669
+ disabled: p.hideable === !1,
2670
+ onChange: () => d.toggleColumn(p.id)
2660
2671
  }
2661
2672
  ),
2662
2673
  /* @__PURE__ */ l(
@@ -2665,10 +2676,10 @@ function ei({ of: e }) {
2665
2676
  type: "button",
2666
2677
  className: f.move,
2667
2678
  "data-direction": "forward",
2668
- "aria-label": n.columnForward(C),
2669
- disabled: _ === 0 || k && _ <= 1,
2670
- onClick: () => p(_, -1),
2671
- 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.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
2679
+ "aria-label": n.columnForward(S),
2680
+ disabled: _ === 0 || w && _ <= 1,
2681
+ onClick: () => g(_, -1),
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" }) })
2672
2683
  }
2673
2684
  ),
2674
2685
  /* @__PURE__ */ l(
@@ -2677,21 +2688,21 @@ function ei({ of: e }) {
2677
2688
  type: "button",
2678
2689
  className: f.move,
2679
2690
  "data-direction": "backward",
2680
- "aria-label": n.columnBackward(C),
2681
- disabled: _ === w.length - 1 || k && _ === 0,
2682
- onClick: () => p(_, 1),
2683
- 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.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
2691
+ "aria-label": n.columnBackward(S),
2692
+ disabled: _ === b.length - 1 || w && _ === 0,
2693
+ onClick: () => g(_, 1),
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" }) })
2684
2695
  }
2685
2696
  )
2686
- ] }, g.id);
2697
+ ] }, p.id);
2687
2698
  }) }),
2688
- /* @__PURE__ */ l(Tr, { registry: h, hook: m })
2699
+ /* @__PURE__ */ l(Or, { registry: h, hook: m })
2689
2700
  ]
2690
2701
  }
2691
2702
  )
2692
2703
  ] });
2693
2704
  }
2694
- function ti({ filename: e, onExport: t, of: n }) {
2705
+ function ni({ filename: e, onExport: t, of: n }) {
2695
2706
  const o = xe(n), r = U();
2696
2707
  if (!o) return null;
2697
2708
  const { snapshot: s } = o;
@@ -2705,16 +2716,16 @@ function ti({ filename: e, onExport: t, of: n }) {
2705
2716
  u.href = c, u.download = e ?? r.exportFileName, u.click(), setTimeout(() => URL.revokeObjectURL(c), 1e4);
2706
2717
  }, children: r.exportLabel });
2707
2718
  }
2708
- function ni({ pageSizes: e = [10, 25, 50], className: t, of: n }) {
2719
+ function oi({ pageSizes: e = [10, 25, 50], className: t, of: n }) {
2709
2720
  const o = xe(n), r = U(), s = ue();
2710
- if (nt(o == null ? void 0 : o.registry, "pagination"), !o || o.snapshot.virtual) return null;
2711
- 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: [
2712
2723
  /* @__PURE__ */ l("span", { children: r.entries(a, s.count(a)) }),
2713
- /* @__PURE__ */ O("div", { className: f.paginationControls, children: [
2714
- /* @__PURE__ */ O("label", { className: f.pageSize, children: [
2724
+ /* @__PURE__ */ F("div", { className: f.paginationControls, children: [
2725
+ /* @__PURE__ */ F("label", { className: f.pageSize, children: [
2715
2726
  r.rows,
2716
2727
  /* @__PURE__ */ l(
2717
- nn,
2728
+ on,
2718
2729
  {
2719
2730
  selectSize: "sm",
2720
2731
  value: i.pageSize,
@@ -2729,62 +2740,62 @@ function ni({ pageSizes: e = [10, 25, 50], className: t, of: n }) {
2729
2740
  /* @__PURE__ */ l(ee, { size: "sm", disabled: i.page >= i.pageCount, onClick: () => i.setPage(i.page + 1), children: r.nextPage })
2730
2741
  ] })
2731
2742
  ] });
2732
- return o.inside ? o.footerTarget ? an(u, o.footerTarget) : null : u;
2743
+ return o.inside ? o.footerTarget ? ln(u, o.footerTarget) : null : u;
2733
2744
  }
2734
- const ps = ["high", "medium", "low"], ms = (e) => ps.indexOf(e), ws = (e) => e === "standing-unacknowledged" || e === "standing-acknowledged", De = (e) => e === "standing-acknowledged" || e === "cleared-acknowledged", bs = (e) => e === "cleared-acknowledged";
2735
- function ks(e, t) {
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";
2746
+ function _s(e, t) {
2736
2747
  switch (t) {
2737
2748
  case "raised":
2738
2749
  return "standing-unacknowledged";
2739
2750
  case "acknowledged":
2740
- return ws(e) ? "standing-acknowledged" : "cleared-acknowledged";
2751
+ return vs(e) ? "standing-acknowledged" : "cleared-acknowledged";
2741
2752
  case "cleared":
2742
- return De(e) ? "cleared-acknowledged" : "cleared-unacknowledged";
2753
+ return Ve(e) ? "cleared-acknowledged" : "cleared-unacknowledged";
2743
2754
  }
2744
2755
  }
2745
- const oi = (e, t) => e.direction === "obere" ? t <= e.returnTo : t >= e.returnTo, ot = (e, t, n) => e > n - t && e <= n, ri = (e, t, n) => e.reduce((o, r) => o + (ot(r, t, n) ? 1 : 0), 0);
2746
- function vs(e, t, n) {
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);
2757
+ function ys(e, t, n) {
2747
2758
  const o = /* @__PURE__ */ new Map();
2748
2759
  for (const r of e)
2749
- 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);
2750
2761
  return o;
2751
2762
  }
2752
- function _s(e) {
2763
+ function ks(e) {
2753
2764
  let t = Number.POSITIVE_INFINITY;
2754
2765
  for (const n of e) n < t && (t = n);
2755
2766
  return t;
2756
2767
  }
2757
- function ys(e) {
2768
+ function Ss(e) {
2758
2769
  let t = Number.NEGATIVE_INFINITY;
2759
2770
  for (const n of e) n > t && (t = n);
2760
2771
  return t;
2761
2772
  }
2762
2773
  function Cs(e, t, n) {
2763
- const o = e.filter((s) => ot(s.raised, t.windowMs, n));
2774
+ const o = e.filter((s) => rt(s.raised, t.windowMs, n));
2764
2775
  if (o.length < t.atLeast) return null;
2765
2776
  const r = o.map((s) => s.raised);
2766
2777
  return {
2767
2778
  // No spread: a flood is the case with many elements, and an argument list
2768
2779
  // of that size blows the call stack at some point. A loop cannot.
2769
- from: _s(r),
2770
- to: ys(r),
2780
+ from: ks(r),
2781
+ to: Ss(r),
2771
2782
  count: o.length,
2772
2783
  alarms: o.map((s) => s.id)
2773
2784
  };
2774
2785
  }
2775
- function Ss(e, t) {
2786
+ function Ns(e, t) {
2776
2787
  const n = new Set(t);
2777
2788
  return e.reduce(
2778
- (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),
2779
2790
  0
2780
2791
  );
2781
2792
  }
2782
- function si(e, t, n) {
2793
+ function ii(e, t, n) {
2783
2794
  const o = new Set(t);
2784
2795
  let r = 0;
2785
- return { alarms: e.map((i) => !o.has(i.id) || De(i.lifecycle) ? i : (r += 1, { ...i, lifecycle: ks(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 };
2786
2797
  }
2787
- const Ns = (e) => [
2798
+ const xs = (e) => [
2788
2799
  {
2789
2800
  id: "type",
2790
2801
  label: e.columnAlarm,
@@ -2798,20 +2809,20 @@ const Ns = (e) => [
2798
2809
  level of the order asks only about the acknowledgement and expressly not
2799
2810
  about whether the alarm is still standing. Otherwise the fleeting alarm
2800
2811
  falls back down again. */
2801
- { 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 },
2802
2813
  { id: "raised", label: e.columnRaised, value: (t) => t.alarm.raised },
2803
2814
  { id: "age", label: e.columnAge, value: (t) => t.age },
2804
2815
  { id: "frequency", label: e.columnFrequency, value: (t) => t.frequency }
2805
- ], xs = Ns(rn), As = [
2816
+ ], As = xs(sn), Ts = [
2806
2817
  { column: "priority", direction: "asc" },
2807
2818
  { column: "acknowledgement", direction: "asc" },
2808
2819
  { column: "raised", direction: "desc" }
2809
- ], Ts = (e) => ({
2820
+ ], Os = (e) => ({
2810
2821
  id: e,
2811
2822
  label: e,
2812
2823
  priority: "high"
2813
2824
  });
2814
- function ii(e, t = {}) {
2825
+ function ai(e, t = {}) {
2815
2826
  const {
2816
2827
  alarms: n,
2817
2828
  types: o,
@@ -2819,46 +2830,46 @@ function ii(e, t = {}) {
2819
2830
  chatter: s,
2820
2831
  flood: i,
2821
2832
  keepDone: a = !1,
2822
- columns: c = xs
2823
- } = e, u = new Map(o.map((p) => [p.id, p])), h = vs(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 || !bs(p.lifecycle)).map((p) => {
2824
- const b = u.get(p.type) ?? Ts(p.type), g = h.get(p.type) ?? 0;
2833
+ columns: c = As
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;
2825
2836
  return {
2826
- id: p.id,
2827
- alarm: p,
2828
- type: b,
2829
- lifecycle: p.lifecycle,
2830
- priority: b.priority,
2831
- rank: ms(b.priority),
2832
- age: r - p.raised,
2833
- duration: (p.cleared ?? r) - p.raised,
2834
- frequency: g,
2835
- chatters: s !== void 0 && g >= s.atLeast,
2836
- 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)
2837
2848
  };
2838
- }), k = tt(w, c, {
2849
+ }), w = nt(b, c, {
2839
2850
  ...t,
2840
- sort: t.sort === void 0 ? As : t.sort
2851
+ sort: t.sort === void 0 ? Ts : t.sort
2841
2852
  });
2842
2853
  return {
2843
- ...k,
2854
+ ...w,
2844
2855
  flood: d,
2845
- standingUnacknowledged: k.filtered.reduce(
2846
- (p, b) => p + (b.lifecycle === "standing-unacknowledged" ? 1 : 0),
2856
+ standingUnacknowledged: w.filtered.reduce(
2857
+ (g, v) => g + (v.lifecycle === "standing-unacknowledged" ? 1 : 0),
2847
2858
  0
2848
2859
  )
2849
2860
  };
2850
2861
  }
2851
- const Fs = "_list_17f0w_4 _text_1hv7a_23", Os = "_bar_17f0w_12", Ls = "_heading_17f0w_19", Rs = "_filler_17f0w_25", Ms = "_asOf_17f0w_29", Vs = "_live_17f0w_46", Ds = "_label_17f0w_51", Is = "_counter_17f0w_55", Bs = "_lifecycle_17f0w_59", Ps = "_empty_17f0w_63", Gs = "_row_17f0w_70", oe = {
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 = {
2852
2863
  list: Fs,
2853
- bar: Os,
2854
- heading: Ls,
2855
- filler: Rs,
2864
+ bar: qs,
2865
+ heading: Rs,
2866
+ filler: Ls,
2856
2867
  asOf: Ms,
2857
2868
  live: Vs,
2858
2869
  label: Ds,
2859
2870
  counter: Is,
2860
- lifecycle: Bs,
2861
- empty: Ps,
2871
+ lifecycle: Ps,
2872
+ empty: Bs,
2862
2873
  row: Gs
2863
2874
  };
2864
2875
  function Es(e, t) {
@@ -2876,14 +2887,14 @@ function Es(e, t) {
2876
2887
  function zs(e, t) {
2877
2888
  return e === "high" ? t.priorityHigh : e === "medium" ? t.priorityMedium : t.priorityLow;
2878
2889
  }
2879
- function js(e) {
2890
+ function Hs(e) {
2880
2891
  return e === "high" ? "danger" : e === "medium" ? "warning" : "neutral";
2881
2892
  }
2882
- function Hs(e, t) {
2893
+ function js(e, t) {
2883
2894
  const n = Math.max(0, Math.floor(e / 6e4)), o = Math.floor(n / 60), r = n % 60, s = [];
2884
2895
  return o > 0 && s.push(t.hoursShort(o)), (o === 0 || r > 0) && s.push(t.minutesShort(r)), s.join(" ");
2885
2896
  }
2886
- function ai(e) {
2897
+ function li(e) {
2887
2898
  const { asOf: t, freshness: n, ...o } = e;
2888
2899
  return t === void 0 || n === void 0 ? /* @__PURE__ */ l(Ut, { ...o, freshness: null }) : /* @__PURE__ */ l($s, { ...o, asOf: t, ages: n });
2889
2900
  }
@@ -2892,7 +2903,7 @@ function $s({
2892
2903
  ages: t,
2893
2904
  ...n
2894
2905
  }) {
2895
- const o = sn(e, t);
2906
+ const o = an(e, t);
2896
2907
  return /* @__PURE__ */ l(Ut, { ...n, freshness: o });
2897
2908
  }
2898
2909
  function Ut({
@@ -2904,46 +2915,46 @@ function Ut({
2904
2915
  freshness: s,
2905
2916
  ...i
2906
2917
  }) {
2907
- const a = U(), c = ue(), u = s !== null, h = (s == null ? void 0 : s.freshness) === "lost", { Table: d, Column: m } = gs(e.visible, { rowKey: (g) => g.id, selection: t }), w = $(() => e.filtered.map((g) => g.alarm), [e.filtered]), k = $(() => t === void 0 ? [] : e.filtered.map((g) => g.id).filter((g) => t.selected.has(g)), [e.filtered, t]), p = $(() => Ss(w, k), [w, k]), b = Tt(o, "compact");
2908
- return /* @__PURE__ */ O("div", { className: [oe.list, r].filter(Boolean).join(" "), ...i, children: [
2909
- /* @__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: [
2910
2921
  /* @__PURE__ */ l("span", { className: oe.heading, children: a.alarms }),
2911
- e.flood !== null && /* @__PURE__ */ l(Ie, { tone: "warning", children: a.floodHint(e.flood.count) }),
2912
- 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: [
2913
2924
  s.freshness === "lost" ? a.freshnessDisconnected : s.freshness === "stale" ? a.freshnessStale : a.freshnessFresh,
2914
2925
  s.age !== null && ` · ${c.relative(s.age)}`
2915
2926
  ] }),
2916
2927
  /* @__PURE__ */ l("span", { className: oe.filler }),
2917
- t !== void 0 && n !== void 0 && /* @__PURE__ */ l(ee, { variant: "primary", size: "sm", disabled: p === 0, onClick: () => n(k), 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) })
2918
2929
  ] }),
2919
2930
  /* @__PURE__ */ l("div", { "aria-live": "polite", "aria-atomic": "true", className: oe.live, children: a.standingUnacknowledged(e.standingUnacknowledged) }),
2920
- /* @__PURE__ */ O(
2931
+ /* @__PURE__ */ F(
2921
2932
  d,
2922
2933
  {
2923
2934
  ariaLabel: a.alarms,
2924
2935
  selectable: t !== void 0,
2925
- density: b,
2936
+ density: v,
2926
2937
  stickyHeader: !0,
2927
- 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 }),
2928
2939
  empty: /* @__PURE__ */ l("span", { className: oe.empty, children: h ? a.noAlarmsDisconnected : a.noAlarms }),
2929
2940
  children: [
2930
- /* @__PURE__ */ l(m, { id: "type", label: a.columnAlarm, value: (g) => g.type.label, rowHeader: !0, sortable: !1, children: (g, _) => /* @__PURE__ */ O(Q, { children: [
2931
- /* @__PURE__ */ l("span", { className: oe.label, children: g }),
2932
- _.chatters && /* @__PURE__ */ l(Ie, { tone: "warning", pill: !0, className: oe.counter, children: a.chatterHint(_.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) })
2933
2944
  ] }) }),
2934
- /* @__PURE__ */ l(m, { value: "lifecycle", label: a.columnLifecycleState, sortable: !1, children: (g) => /* @__PURE__ */ l("span", { className: oe.lifecycle, children: Es(g, a) }) }),
2935
- /* @__PURE__ */ l(m, { value: "priority", label: a.columnPriority, sortable: !1, children: (g) => /* @__PURE__ */ l(Ie, { tone: js(g), children: zs(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) }) }),
2936
2947
  /* @__PURE__ */ l(
2937
2948
  m,
2938
2949
  {
2939
2950
  id: "raised",
2940
2951
  label: a.columnRaised,
2941
- value: (g) => new Date(g.alarm.raised),
2952
+ value: (p) => new Date(p.alarm.raised),
2942
2953
  numeric: !0,
2943
2954
  sortable: !1
2944
2955
  }
2945
2956
  ),
2946
- /* @__PURE__ */ l(m, { value: "duration", label: a.columnDuration, sortable: !1, children: (g) => Hs(g, a) }),
2957
+ /* @__PURE__ */ l(m, { value: "duration", label: a.columnDuration, sortable: !1, children: (p) => js(p, a) }),
2947
2958
  /* @__PURE__ */ l(m, { value: "frequency", label: a.columnFrequency, format: "count", sortable: !1 })
2948
2959
  ]
2949
2960
  }
@@ -2951,30 +2962,30 @@ function Ut({
2951
2962
  ] });
2952
2963
  }
2953
2964
  export {
2954
- xs as ALARM_COLUMNS,
2955
- ai as AlarmList,
2956
- ei as ColumnMenu,
2957
- As as DEFAULT_ORDER,
2958
- ti as Export,
2959
- ps as PRIORITIES,
2960
- ni as Pagination,
2961
- Zs as Search,
2962
- Qs as Toolbar,
2963
- si as acknowledge,
2964
- Ns as alarmColumns,
2965
- ii as alarmModel,
2966
- Xs as column,
2967
- Js as columnFilter,
2968
- Ss as countAcknowledgeable,
2969
- ri as countInWindow,
2965
+ As as ALARM_COLUMNS,
2966
+ li as AlarmList,
2967
+ ti as ColumnMenu,
2968
+ Ts as DEFAULT_ORDER,
2969
+ ni as Export,
2970
+ ms as PRIORITIES,
2971
+ oi as Pagination,
2972
+ ei as Search,
2973
+ Zs as Toolbar,
2974
+ ii as acknowledge,
2975
+ xs as alarmColumns,
2976
+ ai as alarmModel,
2977
+ Qs as column,
2978
+ Xs as columnFilter,
2979
+ Ns as countAcknowledgeable,
2980
+ si as countInWindow,
2970
2981
  Cs as detectFlood,
2971
- vs as frequencyByType,
2972
- oi as hasReturned,
2973
- De as isAcknowledged,
2974
- bs as isDone,
2975
- ws as isStanding,
2976
- ks as nextLifecycleState,
2977
- ms as priorityRank,
2982
+ ys as frequencyByType,
2983
+ ri as hasReturned,
2984
+ Ve as isAcknowledged,
2985
+ ws as isDone,
2986
+ vs as isStanding,
2987
+ _s as nextLifecycleState,
2988
+ bs as priorityRank,
2978
2989
  gs as useTable,
2979
- ln as useTableSelection
2990
+ cn as useTableSelection
2980
2991
  };