@umriss-ui/table 0.5.0 → 0.6.1

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,9 +1,9 @@
1
1
  import "./table.css";
2
- var An = Object.defineProperty;
3
- var Tn = (e, t, n) => t in e ? An(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
- var j = (e, t, n) => Tn(e, typeof t != "symbol" ? t + "" : t, n);
5
- import { useState as W, useCallback as le, useMemo as q, useRef as ce, useId as me, useContext as He, useSyncExternalStore as je, createContext as gt, useLayoutEffect as X, useEffect as jt } from "react";
6
- import { DEFAULT_FORMATS as Wt, useVirtual as On, useFormats as be, useWording as re, Checkbox as Le, DateRangePicker as Mn, FormField as tt, NumberInput as nt, Popover as pt, Button as fe, TagGroup as qt, Tag as Ut, Menu as Yt, MenuItem as Ke, MenuSeparator as Fn, VisuallyHidden as De, Select as Jt, DatePicker as Ln, Input as Xt, useDensityFor as Qt, AngleGlyph as Dn, assess as Rn, verdictWeight as ot, DEFAULT_WORDING as Pn, Badge as Pe, Tooltip as En, useFreshness as zn } from "@umriss-ui/core";
2
+ var Tn = Object.defineProperty;
3
+ var On = (e, t, n) => t in e ? Tn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
+ var j = (e, t, n) => On(e, typeof t != "symbol" ? t + "" : t, n);
5
+ import { useState as W, useCallback as le, useMemo as q, useRef as ce, useId as me, useContext as je, useSyncExternalStore as We, createContext as pt, useLayoutEffect as X, useEffect as Wt } from "react";
6
+ import { DEFAULT_FORMATS as qt, useVirtual as Mn, useFormats as be, useWording as re, Checkbox as Le, DateRangePicker as Fn, FormField as nt, NumberInput as ot, Tooltip as Ie, Popover as mt, Button as fe, TagGroup as Ut, Tag as Yt, Menu as Jt, MenuItem as Ke, MenuSeparator as Ln, VisuallyHidden as De, Select as Xt, DatePicker as Dn, Input as Qt, useDensityFor as Zt, AngleGlyph as Rn, assess as Pn, verdictWeight as rt, DEFAULT_WORDING as En, Badge as Pe, useFreshness as zn } from "@umriss-ui/core";
7
7
  import { jsx as u, jsxs as R, Fragment as ne } from "react/jsx-runtime";
8
8
  import { createPortal as In } from "react-dom";
9
9
  function Vn(e) {
@@ -27,19 +27,19 @@ function Vn(e) {
27
27
  return { selected: t, isSelected: o, toggle: r, toggleAll: l, clear: c, allSelected: s, someSelected: i, count: t.size };
28
28
  }
29
29
  const Q = (e) => e == null || typeof e == "number" && Number.isNaN(e);
30
- function We(e) {
30
+ function qe(e) {
31
31
  return Q(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
- function Zt(e, t) {
33
+ function en(e, t) {
34
34
  for (const n of e) {
35
- const o = We(t(n));
35
+ const o = qe(t(n));
36
36
  if (o !== "empty") return o;
37
37
  }
38
38
  return "empty";
39
39
  }
40
- const mt = (e, t) => t ?? e === "number";
40
+ const bt = (e, t) => t ?? e === "number";
41
41
  function Re(e, t, n, o) {
42
- switch (We(e)) {
42
+ switch (qe(e)) {
43
43
  case "text":
44
44
  return e;
45
45
  case "number": {
@@ -56,10 +56,10 @@ function Re(e, t, n, o) {
56
56
  return null;
57
57
  }
58
58
  }
59
- function rt(e, t) {
59
+ function st(e, t) {
60
60
  if (!Q(e)) {
61
- if (t) return rt(t(e));
62
- switch (We(e)) {
61
+ if (t) return st(t(e));
62
+ switch (qe(e)) {
63
63
  case "text":
64
64
  return e;
65
65
  case "number":
@@ -74,10 +74,10 @@ function rt(e, t) {
74
74
  }
75
75
  }
76
76
  const Bn = "ja", Gn = "nein";
77
- function en(e, t) {
77
+ function tn(e, t) {
78
78
  if (!Q(e)) {
79
- if (t) return en(t(e));
80
- switch (We(e)) {
79
+ if (t) return tn(t(e));
80
+ switch (qe(e)) {
81
81
  case "text":
82
82
  return e;
83
83
  case "number":
@@ -91,15 +91,15 @@ function en(e, t) {
91
91
  }
92
92
  }
93
93
  }
94
- const bt = "absent", Se = (e) => Q(e) ? bt : 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;
94
+ const wt = "absent", ke = (e) => Q(e) ? wt : e instanceof Date ? `value:${e.getTime()}` : `value:${String(e)}`, Tt = (e) => e instanceof Date ? e.getTime() : typeof e == "number" && !Number.isNaN(e) ? e : void 0;
95
95
  function vt(e, t) {
96
96
  const n = t.map(e.read).filter((c) => !Q(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(Se)).size;
100
- const r = n.filter((c) => At(c) !== void 0);
99
+ if (o === "distinct") return new Set(n.map(ke)).size;
100
+ const r = n.filter((c) => Tt(c) !== void 0);
101
101
  if (r.length === 0) return;
102
- const s = r.map((c) => At(c)), i = r[0] instanceof Date, l = (c) => i ? new Date(c) : c;
102
+ const s = r.map((c) => Tt(c)), i = r[0] instanceof Date, l = (c) => i ? new Date(c) : c;
103
103
  switch (o) {
104
104
  case "sum":
105
105
  return s.reduce((c, a) => c + a, 0);
@@ -113,69 +113,69 @@ function vt(e, t) {
113
113
  return [l(Math.min(...s)), l(Math.max(...s))];
114
114
  }
115
115
  }
116
- const wt = 3, Ie = (e) => {
116
+ const yt = 3, Ve = (e) => {
117
117
  if (!Q(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 Xe(e, t, n) {
121
- const o = Ie(e), r = Ie(t);
120
+ function Qe(e, t, n) {
121
+ const o = Ve(e), r = Ve(t);
122
122
  return o === void 0 || r === void 0 ? o === r ? 0 : o === void 0 ? 1 : -1 : typeof o == "number" && typeof r == "number" ? o - r : n(String(o), String(r));
123
123
  }
124
124
  function $n(e, t) {
125
- const n = t.compareText ?? Wt.compareText, o = (r, s, i) => {
125
+ const n = t.compareText ?? qt.compareText, o = (r, s, i) => {
126
126
  var O;
127
127
  const l = /* @__PURE__ */ new Map(), c = t.levels[s];
128
128
  if (!c) return [];
129
129
  const a = /* @__PURE__ */ new Map();
130
- for (const w of r) {
131
- const _ = c.value(w), F = Se(_);
132
- let g = a.get(F);
130
+ for (const y of r) {
131
+ const _ = c.value(y), L = ke(_);
132
+ let g = a.get(L);
133
133
  g || (g = {
134
- path: JSON.stringify([...i, F]),
134
+ path: JSON.stringify([...i, L]),
135
135
  value: Q(_) ? void 0 : _,
136
136
  level: s,
137
137
  rows: [],
138
138
  groups: [],
139
139
  aggregates: {}
140
- }, a.set(F, g), l.set(g, [...i, F])), g.rows.push(w);
140
+ }, a.set(L, g), l.set(g, [...i, L])), g.rows.push(y);
141
141
  }
142
- for (const w of a.values())
143
- for (const _ of t.aggregates ?? []) w.aggregates[_.id] = vt(_, w.rows);
142
+ for (const y of a.values())
143
+ for (const _ of t.aggregates ?? []) y.aggregates[_.id] = vt(_, y.rows);
144
144
  const f = (O = t.sort) == null ? void 0 : O.find(
145
- (w) => {
145
+ (y) => {
146
146
  var _;
147
- return w.column === c.id || ((_ = t.aggregates) == null ? void 0 : _.some((F) => F.id === w.column));
147
+ return y.column === c.id || ((_ = t.aggregates) == null ? void 0 : _.some((L) => L.id === y.column));
148
148
  }
149
- ), d = (f == null ? void 0 : f.direction) === "desc" ? -1 : 1, p = f !== void 0 && f.column !== c.id ? f.column : void 0, b = (w) => {
149
+ ), d = (f == null ? void 0 : f.direction) === "desc" ? -1 : 1, p = f !== void 0 && f.column !== c.id ? f.column : void 0, b = (y) => {
150
150
  let _;
151
- for (const F of w.rows) {
152
- const g = c.order(F);
153
- Ie(g) !== void 0 && (_ === void 0 || Xe(g, _, n) < 0) && (_ = g);
151
+ for (const L of y.rows) {
152
+ const g = c.order(L);
153
+ Ve(g) !== void 0 && (_ === void 0 || Qe(g, _, n) < 0) && (_ = g);
154
154
  }
155
155
  return _;
156
- }, S = (w) => {
157
- if (p === void 0) return c.order ? b(w) : w.value;
158
- const _ = w.aggregates[p];
156
+ }, S = (y) => {
157
+ if (p === void 0) return c.order ? b(y) : y.value;
158
+ const _ = y.aggregates[p];
159
159
  return Array.isArray(_) ? _[0] : _;
160
- }, v = [...a.values()].sort((w, _) => {
161
- if (w.value === void 0 || _.value === void 0) return Xe(w.value, _.value, n);
162
- const F = S(w), g = S(_), C = Xe(F, g, n);
163
- return Ie(F) === void 0 || Ie(g) === void 0 ? C : C * d;
160
+ }, w = [...a.values()].sort((y, _) => {
161
+ if (y.value === void 0 || _.value === void 0) return Qe(y.value, _.value, n);
162
+ const L = S(y), g = S(_), k = Qe(L, g, n);
163
+ return Ve(L) === void 0 || Ve(g) === void 0 ? k : k * d;
164
164
  });
165
- for (const w of v)
166
- w.groups = o(w.rows, s + 1, l.get(w));
167
- return v;
165
+ for (const y of w)
166
+ y.groups = o(y.rows, s + 1, l.get(y));
167
+ return w;
168
168
  };
169
169
  return o(e, 0, []);
170
170
  }
171
- function Kn(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 Kn = (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);
@@ -207,10 +207,10 @@ function qn(e, t) {
207
207
  }
208
208
  function Un(e, t, n) {
209
209
  const o = n > 0 ? n : e.length || 1, r = Math.max(1, Math.ceil(e.length / o)), s = Math.min(Math.max(1, t), r), i = e.slice((s - 1) * o, s * o);
210
- return { lines: tn(i), page: s, pageCount: r };
210
+ return { lines: nn(i), page: s, pageCount: r };
211
211
  }
212
- const yt = (e) => e.flatMap((t) => t.kind === "row" ? [t.row] : []);
213
- function tn(e) {
212
+ const _t = (e) => e.flatMap((t) => t.kind === "row" ? [t.row] : []);
213
+ function nn(e) {
214
214
  const t = e[0];
215
215
  if (!t) return [...e];
216
216
  const n = t.parents.map((r, s) => ({
@@ -221,15 +221,15 @@ function tn(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 _t(e, t) {
224
+ function xt(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 Me = (e) => e == null || typeof e == "number" && Number.isNaN(e), Yn = (e, t) => typeof e == "number" && typeof t == "number" ? e - t : Wt.compareText(String(e), String(t));
230
+ const Me = (e) => e == null || typeof e == "number" && Number.isNaN(e), Yn = (e, t) => typeof e == "number" && typeof t == "number" ? e - t : qt.compareText(String(e), String(t));
231
231
  function kt(e, t, n) {
232
- var A;
232
+ var T;
233
233
  const {
234
234
  search: o = "",
235
235
  filter: r,
@@ -238,57 +238,57 @@ function kt(e, t, n) {
238
238
  pageSize: l,
239
239
  hidden: c,
240
240
  order: a
241
- } = n, f = _t(t, a), d = c != null && c.length ? f.filter((L) => L.hideable === !1 || !c.includes(L.id)) : f;
241
+ } = n, f = xt(t, a), d = c != null && c.length ? f.filter((F) => F.hideable === !1 || !c.includes(F.id)) : f;
242
242
  if (n.manual) {
243
- const { rowCount: L } = n.manual, m = l && l > 0 ? l : Math.max(L, 1), k = Math.max(1, Math.ceil(L / m)), T = L > 0 ? Math.min(Math.max(1, i), k) : Math.max(1, i);
243
+ const { rowCount: F } = n.manual, m = l && l > 0 ? l : Math.max(F, 1), x = Math.max(1, Math.ceil(F / m)), A = F > 0 ? Math.min(Math.max(1, i), x) : Math.max(1, i);
244
244
  return {
245
245
  columns: d,
246
246
  filtered: [...e],
247
247
  visible: [...e],
248
- page: T,
249
- pageCount: k,
248
+ page: A,
249
+ pageCount: x,
250
250
  columnCount: d.length
251
251
  };
252
252
  }
253
- const p = o.trim().toLowerCase(), b = t.filter((L) => L.searchable && L.value), S = (L) => !p || b.some((m) => {
254
- const k = m.value(L);
255
- return !Me(k) && String(k).toLowerCase().includes(p);
256
- }), v = e.filter((L) => S(L) && (r ? r(L) : !0)), O = Array.isArray(s) ? s : s ? [s] : [], w = O.map((L) => {
257
- const m = t.find((M) => M.id === L.column);
253
+ const p = o.trim().toLowerCase(), b = t.filter((F) => F.searchable && F.value), S = (F) => !p || b.some((m) => {
254
+ const x = m.value(F);
255
+ return !Me(x) && String(x).toLowerCase().includes(p);
256
+ }), w = e.filter((F) => S(F) && (r ? r(F) : !0)), O = Array.isArray(s) ? s : s ? [s] : [], y = O.map((F) => {
257
+ const m = t.find((M) => M.id === F.column);
258
258
  if (!m || !m.compare && !m.value) return null;
259
- const k = L.direction === "asc" ? 1 : -1, T = m.compare, y = m.value;
260
- return y ? (M, N) => {
261
- const I = y(M), P = y(N);
262
- return Me(I) || Me(P) ? Me(I) === Me(P) ? 0 : Me(I) ? 1 : -1 : (T ? T(M, N) : Yn(I, P)) * k;
263
- } : (M, N) => T(M, N) * k;
264
- }).filter((L) => L !== null);
265
- if (w.length > 0 && v.sort((L, m) => {
266
- for (const k of w) {
267
- const T = k(L, m);
268
- if (T !== 0) return T;
259
+ const x = F.direction === "asc" ? 1 : -1, A = m.compare, v = m.value;
260
+ return v ? (M, N) => {
261
+ const I = v(M), P = v(N);
262
+ return Me(I) || Me(P) ? Me(I) === Me(P) ? 0 : Me(I) ? 1 : -1 : (A ? A(M, N) : Yn(I, P)) * x;
263
+ } : (M, N) => A(M, N) * x;
264
+ }).filter((F) => F !== null);
265
+ if (y.length > 0 && w.sort((F, m) => {
266
+ for (const x of y) {
267
+ const A = x(F, m);
268
+ if (A !== 0) return A;
269
269
  }
270
270
  return 0;
271
- }), (A = n.grouping) != null && A.levels.length) {
272
- const { folded: L, ...m } = n.grouping, k = $n(v, { ...m, sort: O }), T = qn(k, L), y = Un(T, i, l ?? 0);
271
+ }), (T = n.grouping) != null && T.levels.length) {
272
+ const { folded: F, ...m } = n.grouping, x = $n(w, { ...m, sort: O }), A = qn(x, F), v = Un(A, i, l ?? 0);
273
273
  return {
274
274
  columns: d,
275
- filtered: v,
276
- visible: yt(y.lines),
277
- groups: k,
278
- lines: T,
279
- visibleLines: y.lines,
280
- page: y.page,
281
- pageCount: y.pageCount,
275
+ filtered: w,
276
+ visible: _t(v.lines),
277
+ groups: x,
278
+ lines: A,
279
+ visibleLines: v.lines,
280
+ page: v.page,
281
+ pageCount: v.pageCount,
282
282
  columnCount: d.length
283
283
  };
284
284
  }
285
- const _ = l && l > 0 ? l : v.length || 1, F = Math.max(1, Math.ceil(v.length / _)), g = Math.min(Math.max(1, i), F), C = v.slice((g - 1) * _, g * _);
285
+ const _ = l && l > 0 ? l : w.length || 1, L = Math.max(1, Math.ceil(w.length / _)), g = Math.min(Math.max(1, i), L), k = w.slice((g - 1) * _, g * _);
286
286
  return {
287
287
  columns: d,
288
- filtered: v,
289
- visible: C,
288
+ filtered: w,
289
+ visible: k,
290
290
  page: g,
291
- pageCount: F,
291
+ pageCount: L,
292
292
  columnCount: d.length
293
293
  };
294
294
  }
@@ -296,87 +296,87 @@ function Jn(e, t, n) {
296
296
  const { rowKey: o, filter: r, defaultSort: s = null, initialView: i, virtual: l, grouping: c, manual: a } = n, [f, d] = W((i == null ? void 0 : i.search) ?? ""), [p, b] = W(() => {
297
297
  var D;
298
298
  return (D = i == null ? void 0 : i.sort) != null && D.length ? [...i.sort] : s ? Array.isArray(s) ? [...s] : [s] : [];
299
- }), [S, v] = W((i == null ? void 0 : i.page) ?? 1), [O, w] = W(
299
+ }), [S, w] = W((i == null ? void 0 : i.page) ?? 1), [O, y] = W(
300
300
  (i == null ? void 0 : i.pageSize) ?? n.pageSize ?? 10
301
- ), [_, F] = W([]), [g, C] = W((i == null ? void 0 : i.hidden) ?? []), [A, L] = W((i == null ? void 0 : i.order) ?? []), [m, k] = W(() => {
301
+ ), [_, L] = W([]), [g, k] = W((i == null ? void 0 : i.hidden) ?? []), [T, F] = W((i == null ? void 0 : i.order) ?? []), [m, x] = W(() => {
302
302
  if (i != null && i.widths) return { ...i.widths };
303
303
  const D = {};
304
304
  for (const G of t)
305
305
  G.width !== void 0 && (D[G.id] = G.width);
306
306
  return D;
307
- }), T = l ? 0 : O, y = q(
307
+ }), A = l ? 0 : O, v = q(
308
308
  () => kt(e, t, {
309
309
  search: f,
310
310
  filter: r,
311
311
  sort: p,
312
312
  page: S,
313
- pageSize: T,
313
+ pageSize: A,
314
314
  hidden: g,
315
- order: A,
315
+ order: T,
316
316
  grouping: c,
317
317
  manual: a
318
318
  }),
319
- [e, t, f, r, p, S, T, g, A, c, a]
320
- ), M = On(l ? (y.lines ?? y.filtered).length : 0, {
319
+ [e, t, f, r, p, S, A, g, T, c, a]
320
+ ), M = Mn(l ? (v.lines ?? v.filtered).length : 0, {
321
321
  rowHeight: (l == null ? void 0 : l.rowHeight) ?? 0,
322
322
  overscan: l == null ? void 0 : l.overscan
323
323
  }), N = q(
324
- () => l && y.lines ? y.lines.slice(M.from, M.to) : y.visibleLines,
325
- [l, y.lines, y.visibleLines, M.from, M.to]
324
+ () => l && v.lines ? v.lines.slice(M.from, M.to) : v.visibleLines,
325
+ [l, v.lines, v.visibleLines, M.from, M.to]
326
326
  ), I = q(
327
- () => l ? N ? yt(N) : y.filtered.slice(M.from, M.to) : y.visible,
328
- [l, N, y.filtered, y.visible, M.from, M.to]
329
- ), P = q(() => y.filtered.map(o), [y.filtered, o]), $ = Vn(P), U = le((D) => {
330
- d(D), v(1);
327
+ () => l ? N ? _t(N) : v.filtered.slice(M.from, M.to) : v.visible,
328
+ [l, N, v.filtered, v.visible, M.from, M.to]
329
+ ), P = q(() => v.filtered.map(o), [v.filtered, o]), $ = Vn(P), U = le((D) => {
330
+ d(D), w(1);
331
331
  }, []), Z = le((D) => {
332
- w(D), v(1);
332
+ y(D), w(1);
333
333
  }, []), he = le((D, G = !1) => {
334
- b((H) => {
335
- const x = H.find((E) => E.column === D);
334
+ b((K) => {
335
+ const C = K.find((E) => E.column === D);
336
336
  if (!G) {
337
- const E = H.length === 1 && (x == null ? void 0 : x.direction) === "asc" ? "desc" : "asc";
337
+ const E = K.length === 1 && (C == null ? void 0 : C.direction) === "asc" ? "desc" : "asc";
338
338
  return [{ column: D, direction: E }];
339
339
  }
340
- return x ? x.direction === "asc" ? H.map(
340
+ return C ? C.direction === "asc" ? K.map(
341
341
  (E) => E.column === D ? { column: D, direction: "desc" } : E
342
- ) : H.filter((E) => E.column !== D) : [...H, { column: D, direction: "asc" }];
343
- }), v(1);
342
+ ) : K.filter((E) => E.column !== D) : [...K, { column: D, direction: "asc" }];
343
+ }), w(1);
344
344
  }, []), se = le((D) => {
345
- F(
346
- (G) => G.includes(D) ? G.filter((H) => H !== D) : [...G, D]
345
+ L(
346
+ (G) => G.includes(D) ? G.filter((K) => K !== D) : [...G, D]
347
347
  );
348
- }, []), we = le(
348
+ }, []), ve = le(
349
349
  (D) => _.includes(D),
350
350
  [_]
351
- ), Ce = le((D) => {
352
- C(
353
- (G) => G.includes(D) ? G.filter((H) => H !== D) : [...G, D]
351
+ ), Se = le((D) => {
352
+ k(
353
+ (G) => G.includes(D) ? G.filter((K) => K !== D) : [...G, D]
354
354
  );
355
355
  }, []), Oe = le((D, G) => {
356
- k((H) => {
356
+ x((K) => {
357
357
  if (G === void 0) {
358
- if (!(D in H)) return H;
359
- const x = { ...H };
360
- return delete x[D], x;
358
+ if (!(D in K)) return K;
359
+ const C = { ...K };
360
+ return delete C[D], C;
361
361
  }
362
- return { ...H, [D]: G };
362
+ return { ...K, [D]: G };
363
363
  });
364
- }, []), xe = le(
364
+ }, []), Ce = le(
365
365
  (D) => {
366
366
  var G;
367
- return (G = p.find((H) => H.column === D)) == null ? void 0 : G.direction;
367
+ return (G = p.find((K) => K.column === D)) == null ? void 0 : G.direction;
368
368
  },
369
369
  [p]
370
370
  ), ue = le(
371
371
  (D) => {
372
372
  if (p.length < 2) return;
373
- const G = p.findIndex((H) => H.column === D);
373
+ const G = p.findIndex((K) => K.column === D);
374
374
  return G === -1 ? void 0 : G + 1;
375
375
  },
376
376
  [p]
377
377
  ), Y = q(
378
- () => _t(t, A).filter((D) => D.label !== void 0 && D.hideable !== !1).map((D) => ({ id: D.id, label: D.label, visible: !g.includes(D.id) })),
379
- [t, A, g]
378
+ () => xt(t, T).filter((D) => D.label !== void 0 && D.hideable !== !1).map((D) => ({ id: D.id, label: D.label, visible: !g.includes(D.id) })),
379
+ [t, T, g]
380
380
  ), ge = n.pageSize ?? 10, ye = q(() => {
381
381
  const D = {};
382
382
  for (const G of t)
@@ -384,45 +384,45 @@ function Jn(e, t, n) {
384
384
  return D;
385
385
  }, [t]), Ne = q(() => {
386
386
  const D = {};
387
- for (const [G, H] of Object.entries(m))
388
- ye[G] !== H && (D[G] = H);
387
+ for (const [G, K] of Object.entries(m))
388
+ ye[G] !== K && (D[G] = K);
389
389
  return D;
390
390
  }, [m, ye]), _e = q(
391
391
  () => s ? Array.isArray(s) ? s : [s] : [],
392
392
  [s]
393
- ), ke = p.length === _e.length && p.every(
393
+ ), xe = p.length === _e.length && p.every(
394
394
  (D, G) => {
395
- var H, x;
396
- return D.column === ((H = _e[G]) == null ? void 0 : H.column) && D.direction === ((x = _e[G]) == null ? void 0 : x.direction);
395
+ var K, C;
396
+ return D.column === ((K = _e[G]) == null ? void 0 : K.column) && D.direction === ((C = _e[G]) == null ? void 0 : C.direction);
397
397
  }
398
398
  ), J = q(
399
399
  () => ({
400
400
  ...f ? { search: f } : {},
401
- ...p.length && !ke ? { sort: p } : {},
401
+ ...p.length && !xe ? { sort: p } : {},
402
402
  /* Without paging there is no page a view could carry - a page three in
403
403
  the view of a virtualised table would be a promise nobody redeems on
404
404
  opening. */
405
- ...!l && y.page > 1 ? { page: y.page } : {},
405
+ ...!l && v.page > 1 ? { page: v.page } : {},
406
406
  ...!l && O !== ge ? { pageSize: O } : {},
407
407
  ...g.length ? { hidden: g } : {},
408
- ...A.length ? { order: A } : {},
408
+ ...T.length ? { order: T } : {},
409
409
  ...Object.keys(Ne).length ? { widths: Ne } : {}
410
410
  }),
411
411
  [
412
412
  l,
413
413
  f,
414
414
  p,
415
- ke,
416
- y.page,
415
+ xe,
416
+ v.page,
417
417
  O,
418
418
  ge,
419
419
  g,
420
- A,
420
+ T,
421
421
  Ne
422
422
  ]
423
423
  );
424
424
  return {
425
- ...y,
425
+ ...v,
426
426
  visible: I,
427
427
  visibleLines: N,
428
428
  virtual: l ? M : void 0,
@@ -432,19 +432,19 @@ function Jn(e, t, n) {
432
432
  setSearch: U,
433
433
  sort: p,
434
434
  toggleSort: he,
435
- sortDirectionOf: xe,
435
+ sortDirectionOf: Ce,
436
436
  sortRankOf: ue,
437
- setPage: v,
437
+ setPage: w,
438
438
  pageSize: O,
439
439
  setPageSize: Z,
440
440
  expanded: _,
441
441
  toggleRow: se,
442
- isExpanded: we,
442
+ isExpanded: ve,
443
443
  hidden: g,
444
- toggleColumn: Ce,
444
+ toggleColumn: Se,
445
445
  columnChoices: Y,
446
- order: A,
447
- setOrder: L,
446
+ order: T,
447
+ setOrder: F,
448
448
  widths: m,
449
449
  setWidth: Oe,
450
450
  selection: $
@@ -483,11 +483,11 @@ function ro() {
483
483
  const e = import.meta;
484
484
  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;
485
485
  }
486
- const nn = ro(), Tt = /* @__PURE__ */ new Set();
486
+ const on = ro(), Ot = /* @__PURE__ */ new Set();
487
487
  function ae(e, t) {
488
- !nn || Tt.has(e) || (Tt.add(e), console.warn(`@umriss-ui/table: ${t}`));
488
+ !on || Ot.has(e) || (Ot.add(e), console.warn(`@umriss-ui/table: ${t}`));
489
489
  }
490
- const so = "_frame_1eual_11 _text_k1tvc_23", io = "_children_1eual_24", lo = "_scroll_1eual_33 _scroll_k1tvc_40", ao = "_footerTarget_1eual_41", co = "_table_1eual_45", uo = "_th_1eual_53 _ring_k1tvc_69", fo = "_sticky_1eual_68", ho = "_td_1eual_76", go = "_rowHeader_1eual_88", po = "_compact_1eual_104", mo = "_numeric_1eual_137", bo = "_absent_1eual_149", vo = "_striped_1eual_153", wo = "_pinned_1eual_180", yo = "_pinStartEdge_1eual_196", _o = "_pinEndEdge_1eual_197", ko = "_sortButton_1eual_227 _ring_k1tvc_69", So = "_sortIndicator_1eual_252", Co = "_sortArrow_1eual_259", xo = "_sortArrowDesc_1eual_263", No = "_sortActive_1eual_271", Ao = "_sortRank_1eual_277", To = "_thFlex_1eual_285", Oo = "_footerKind_1eual_310", Mo = "_emptyCell_1eual_318", Fo = "_empty_1eual_318", Lo = "_emptyTitle_1eual_334", Do = "_skeleton_1eual_343", Ro = "_toolbar_1eual_375 _text_k1tvc_23", Po = "_toolbarGroup_1eual_389", Eo = "_toolbarInfo_1eual_406", zo = "_pagination_1eual_412 _text_k1tvc_23", Io = "_paginationControls_1eual_425", Vo = "_pageSize_1eual_432", Bo = "_paginationStatus_1eual_444", Go = "_filterButton_1eual_453 _ring_k1tvc_69", $o = "_filterActive_1eual_480", Ko = "_filterPanel_1eual_485", Ho = "_filterContent_1eual_499 _scroll_k1tvc_40", jo = "_filterFooter_1eual_510", Wo = "_filterLabel_1eual_524", qo = "_filterValue_1eual_534", Uo = "_filteredCount_1eual_540", Yo = "_rangeFields_1eual_551", Jo = "_rangePeriod_1eual_561", Xo = "_conditions_1eual_567", Qo = "_conditionButton_1eual_573", Zo = "_condition_1eual_567", er = "_columnsPanel_1eual_598", tr = "_columnsList_1eual_607", nr = "_columnsEntry_1eual_616", or = "_move_1eual_628", rr = "_pinOn_1eual_666", sr = "_groupingChoice_1eual_673", ir = "_groupingHeading_1eual_679", lr = "_groupingOptions_1eual_688", ar = "_groupingOption_1eual_688 _ring_k1tvc_69", cr = "_groupingLevel_1eual_731", ur = "_groupingTag_1eual_736", dr = "_groupingTrigger_1eual_743", fr = "_groupingPrefix_1eual_749", hr = "_groupingPath_1eual_754", gr = "_groupingSeparator_1eual_758", pr = "_groupHeader_1eual_775", mr = "_spanCell_1eual_816", br = "_groupFolded_1eual_894", vr = "_spanValue_1eual_898", wr = "_groupLabel_1eual_899", yr = "_spanText_1eual_911", _r = "_groupValue_1eual_912", kr = "_groupCount_1eual_919", Sr = "_continued_1eual_933", Cr = "_spanSelect_1eual_964", xr = "_fold_1eual_978", Nr = "_foldClosed_1eual_1014", Ar = "_foldedCount_1eual_1024", Tr = "_shareHost_1eual_1032", Or = "_shareBar_1eual_1039", Mr = "_expander_1eual_1051", Fr = "_expanderOpen_1eual_1086", Lr = "_detailRow_1eual_1090", Dr = "_detailCell_1eual_1090", Rr = "_actionsCell_1eual_1098", Pr = "_actions_1eual_1098", Er = "_grip_1eual_1126", zr = "_virtualBody_1eual_1167", Ir = "_virtualRow_1eual_1183", Vr = "_fillerRow_1eual_1207", Br = "_grid_1eual_1220", Gr = "_editing_1eual_1236", $r = "_editingValue_1eual_1240", Kr = "_editor_1eual_1244", Hr = "_editorField_1eual_1255", jr = "_editorMessage_1eual_1273", Wr = "_control_1eual_168", h = {
490
+ const so = "_frame_1x6w6_11 _text_k1tvc_23", io = "_children_1x6w6_24", lo = "_scroll_1x6w6_33 _scroll_k1tvc_40", ao = "_footerTarget_1x6w6_41", co = "_table_1x6w6_45", uo = "_th_1x6w6_53 _ring_k1tvc_69", fo = "_sticky_1x6w6_68", ho = "_td_1x6w6_76", go = "_rowHeader_1x6w6_88", po = "_compact_1x6w6_104", mo = "_numeric_1x6w6_137", bo = "_absent_1x6w6_149", wo = "_striped_1x6w6_153", vo = "_pinned_1x6w6_180", yo = "_pinStartEdge_1x6w6_196", _o = "_pinEndEdge_1x6w6_197", xo = "_sortButton_1x6w6_227 _ring_k1tvc_69", ko = "_sortIndicator_1x6w6_252", So = "_sortArrow_1x6w6_259", Co = "_sortArrowDesc_1x6w6_263", No = "_sortActive_1x6w6_271", Ao = "_sortRank_1x6w6_277", To = "_thFlex_1x6w6_285", Oo = "_footerKind_1x6w6_310", Mo = "_emptyCell_1x6w6_318", Fo = "_empty_1x6w6_318", Lo = "_emptyTitle_1x6w6_334", Do = "_skeleton_1x6w6_343", Ro = "_toolbar_1x6w6_375 _text_k1tvc_23", Po = "_toolbarGroup_1x6w6_389", Eo = "_toolbarInfo_1x6w6_406", zo = "_pagination_1x6w6_412 _text_k1tvc_23", Io = "_paginationControls_1x6w6_425", Vo = "_pageSize_1x6w6_432", Bo = "_paginationStatus_1x6w6_444", Go = "_filterButton_1x6w6_453 _ring_k1tvc_69", $o = "_filterActive_1x6w6_480", Ho = "_filterPanel_1x6w6_485", Ko = "_filterContent_1x6w6_499 _scroll_k1tvc_40", jo = "_filterFooter_1x6w6_510", Wo = "_filterLabel_1x6w6_524", qo = "_filterValue_1x6w6_534", Uo = "_filteredCount_1x6w6_540", Yo = "_rangeFields_1x6w6_551", Jo = "_rangePeriod_1x6w6_561", Xo = "_conditions_1x6w6_567", Qo = "_conditionButton_1x6w6_573", Zo = "_condition_1x6w6_567", er = "_columnsPanel_1x6w6_598", tr = "_columnsList_1x6w6_607", nr = "_columnsEntry_1x6w6_616", or = "_move_1x6w6_628", rr = "_pinOn_1x6w6_666", sr = "_groupingChoice_1x6w6_676", ir = "_groupingHeading_1x6w6_684", lr = "_groupingOptions_1x6w6_693", ar = "_groupingOption_1x6w6_693 _ring_k1tvc_69", cr = "_groupingLevel_1x6w6_736", ur = "_groupingTag_1x6w6_741", dr = "_groupingTrigger_1x6w6_748", fr = "_groupingPrefix_1x6w6_754", hr = "_groupingPath_1x6w6_759", gr = "_groupingSeparator_1x6w6_763", pr = "_groupHeader_1x6w6_780", mr = "_spanCell_1x6w6_821", br = "_groupFolded_1x6w6_899", wr = "_spanValue_1x6w6_903", vr = "_groupLabel_1x6w6_904", yr = "_spanText_1x6w6_916", _r = "_groupValue_1x6w6_917", xr = "_groupCount_1x6w6_924", kr = "_continued_1x6w6_938", Sr = "_spanSelect_1x6w6_969", Cr = "_fold_1x6w6_983", Nr = "_foldClosed_1x6w6_1019", Ar = "_foldedCount_1x6w6_1029", Tr = "_shareHost_1x6w6_1037", Or = "_shareBar_1x6w6_1044", Mr = "_expander_1x6w6_1056", Fr = "_expanderOpen_1x6w6_1091", Lr = "_detailRow_1x6w6_1095", Dr = "_detailCell_1x6w6_1095", Rr = "_actionsCell_1x6w6_1103", Pr = "_actions_1x6w6_1103", Er = "_grip_1x6w6_1131", zr = "_virtualBody_1x6w6_1172", Ir = "_virtualRow_1x6w6_1188", Vr = "_fillerRow_1x6w6_1212", Br = "_grid_1x6w6_1225", Gr = "_editing_1x6w6_1241", $r = "_editingValue_1x6w6_1245", Hr = "_editor_1x6w6_1249", Kr = "_editorField_1x6w6_1260", jr = "_editorMessage_1x6w6_1278", Wr = "_control_1x6w6_168", h = {
491
491
  frame: so,
492
492
  children: io,
493
493
  scroll: lo,
@@ -500,14 +500,14 @@ const so = "_frame_1eual_11 _text_k1tvc_23", io = "_children_1eual_24", lo = "_s
500
500
  compact: po,
501
501
  numeric: mo,
502
502
  absent: bo,
503
- striped: vo,
504
- pinned: wo,
503
+ striped: wo,
504
+ pinned: vo,
505
505
  pinStartEdge: yo,
506
506
  pinEndEdge: _o,
507
- sortButton: ko,
508
- sortIndicator: So,
509
- sortArrow: Co,
510
- sortArrowDesc: xo,
507
+ sortButton: xo,
508
+ sortIndicator: ko,
509
+ sortArrow: So,
510
+ sortArrowDesc: Co,
511
511
  sortActive: No,
512
512
  sortRank: Ao,
513
513
  thFlex: To,
@@ -525,8 +525,8 @@ const so = "_frame_1eual_11 _text_k1tvc_23", io = "_children_1eual_24", lo = "_s
525
525
  paginationStatus: Bo,
526
526
  filterButton: Go,
527
527
  filterActive: $o,
528
- filterPanel: Ko,
529
- filterContent: Ho,
528
+ filterPanel: Ho,
529
+ filterContent: Ko,
530
530
  filterFooter: jo,
531
531
  filterLabel: Wo,
532
532
  filterValue: qo,
@@ -554,14 +554,14 @@ const so = "_frame_1eual_11 _text_k1tvc_23", io = "_children_1eual_24", lo = "_s
554
554
  groupHeader: pr,
555
555
  spanCell: mr,
556
556
  groupFolded: br,
557
- spanValue: vr,
558
- groupLabel: wr,
557
+ spanValue: wr,
558
+ groupLabel: vr,
559
559
  spanText: yr,
560
560
  groupValue: _r,
561
- groupCount: kr,
562
- continued: Sr,
563
- spanSelect: Cr,
564
- fold: xr,
561
+ groupCount: xr,
562
+ continued: kr,
563
+ spanSelect: Sr,
564
+ fold: Cr,
565
565
  foldClosed: Nr,
566
566
  foldedCount: Ar,
567
567
  shareHost: Tr,
@@ -579,40 +579,40 @@ const so = "_frame_1eual_11 _text_k1tvc_23", io = "_children_1eual_24", lo = "_s
579
579
  grid: Br,
580
580
  editing: Gr,
581
581
  editingValue: $r,
582
- editor: Kr,
583
- editorField: Hr,
582
+ editor: Hr,
583
+ editorField: Kr,
584
584
  editorMessage: jr,
585
585
  control: Wr
586
586
  };
587
587
  function dl(e) {
588
588
  return e;
589
589
  }
590
- const Ve = /* @__PURE__ */ new WeakMap();
591
- function on(e, t) {
592
- return Ve.set(e, t), e;
590
+ const Be = /* @__PURE__ */ new WeakMap();
591
+ function rn(e, t) {
592
+ return Be.set(e, t), e;
593
593
  }
594
- const qr = (e) => Ve.has(e);
594
+ const qr = (e) => Be.has(e);
595
595
  function Te(e) {
596
596
  return e === "list" ? Xr : e === "range" ? ss : typeof e == "object" && e !== null ? e : void 0;
597
597
  }
598
- function rn(e, t) {
598
+ function sn(e, t) {
599
599
  if (t == null) return "empty";
600
- const n = Ve.get(e);
600
+ const n = Be.get(e);
601
601
  return n ? n.isCondition(t) ? n.isEmpty(t) ? "empty" : "effective" : "foreign" : "effective";
602
602
  }
603
603
  function Ur(e, t, n) {
604
604
  var o;
605
- return Q(t) ? ((o = Ve.get(e)) == null ? void 0 : o.absentMatches(n)) ?? !1 : e.matches(t, n);
605
+ return Q(t) ? ((o = Be.get(e)) == null ? void 0 : o.absentMatches(n)) ?? !1 : e.matches(t, n);
606
606
  }
607
607
  function Yr(e, t, n) {
608
- const o = Ve.get(e);
608
+ const o = Be.get(e);
609
609
  return o ? o.describeIn(t, n) : e.describe(t);
610
610
  }
611
- const Ot = (e) => e instanceof Date ? e.getTime() : typeof e == "number" ? e : void 0, sn = (e) => (t, n) => {
612
- const o = Ot(t.value), r = Ot(n.value);
611
+ const Mt = (e) => e instanceof Date ? e.getTime() : typeof e == "number" ? e : void 0, ln = (e) => (t, n) => {
612
+ const o = Mt(t.value), r = Mt(n.value);
613
613
  return o !== void 0 && r !== void 0 ? o - r : e.compareText(t.text, n.text);
614
614
  };
615
- function st(e, t, n) {
615
+ function it(e, t, n) {
616
616
  const o = /* @__PURE__ */ new Map();
617
617
  let r = !1;
618
618
  for (const i of e) {
@@ -624,14 +624,14 @@ function st(e, t, n) {
624
624
  const c = l instanceof Date ? `date:${l.getTime()}` : typeof l == "object" || typeof l == "function" ? l : `${typeof l}:${String(l)}`;
625
625
  o.has(c) || o.set(c, l);
626
626
  }
627
- return { values: [...o.values()].map((i) => ({ value: i, text: String(i) })).sort(sn(n)).map(({ value: i }) => i), absent: r };
627
+ return { values: [...o.values()].map((i) => ({ value: i, text: String(i) })).sort(ln(n)).map(({ value: i }) => i), absent: r };
628
628
  }
629
- const Mt = /* @__PURE__ */ new WeakMap();
630
- function it(e) {
631
- let t = Mt.get(e);
632
- return t || (t = new Set(e.map(Se)), Mt.set(e, t)), t;
629
+ const Ft = /* @__PURE__ */ new WeakMap();
630
+ function lt(e) {
631
+ let t = Ft.get(e);
632
+ return t || (t = new Set(e.map(ke)), Ft.set(e, t)), t;
633
633
  }
634
- const lt = (e, t) => Q(e) ? t.wording.cellAbsentValue : Re(e, t.format, t.formats, t.wording) ?? String(e);
634
+ const at = (e, t) => Q(e) ? t.wording.cellAbsentValue : Re(e, t.format, t.formats, t.wording) ?? String(e);
635
635
  function Jr({
636
636
  condition: e,
637
637
  setCondition: t,
@@ -640,12 +640,12 @@ function Jr({
640
640
  format: r
641
641
  }) {
642
642
  const s = be(), i = re(), l = q(() => e ?? [], [e]), c = q(() => {
643
- const d = { formats: s, wording: i, format: r }, p = n.map((O) => ({ key: Se(O), text: lt(O, d), value: O }));
644
- p.sort(sn(s));
645
- const b = new Set(p.map((O) => O.key)), S = l.filter((O) => !Q(O) && !b.has(Se(O))).map((O) => ({ key: Se(O), text: lt(O, d), value: O })), v = o || l.some(Q) ? [{ key: bt, text: i.cellAbsentValue, value: null }] : [];
646
- return [...p, ...S, ...v];
647
- }, [n, l, o, r, s, i]), a = it(l), f = (d) => {
648
- const p = a.has(d.key) ? l.filter((b) => Se(b) !== d.key) : [...l, d.value];
643
+ const d = { formats: s, wording: i, format: r }, p = n.map((O) => ({ key: ke(O), text: at(O, d), value: O }));
644
+ p.sort(ln(s));
645
+ const b = new Set(p.map((O) => O.key)), S = l.filter((O) => !Q(O) && !b.has(ke(O))).map((O) => ({ key: ke(O), text: at(O, d), value: O })), w = o || l.some(Q) ? [{ key: wt, text: i.cellAbsentValue, value: null }] : [];
646
+ return [...p, ...S, ...w];
647
+ }, [n, l, o, r, s, i]), a = lt(l), f = (d) => {
648
+ const p = a.has(d.key) ? l.filter((b) => ke(b) !== d.key) : [...l, d.value];
649
649
  t(p.length > 0 ? p : null);
650
650
  };
651
651
  return /* @__PURE__ */ u("div", { className: h.filterContent, children: c.map((d) => /* @__PURE__ */ u(
@@ -658,26 +658,26 @@ function Jr({
658
658
  d.key
659
659
  )) });
660
660
  }
661
- const Xr = on(
661
+ const Xr = rn(
662
662
  {
663
- matches: (e, t) => it(t).has(Se(e)),
663
+ matches: (e, t) => lt(t).has(ke(e)),
664
664
  Input: Jr,
665
665
  describe: (e) => e.map((t) => Q(t) ? "–" : String(t)).join(", ")
666
666
  },
667
667
  {
668
668
  isCondition: (e) => Array.isArray(e),
669
669
  isEmpty: (e) => e.length === 0,
670
- absentMatches: (e) => it(e).has(bt),
670
+ absentMatches: (e) => lt(e).has(wt),
671
671
  /* From three values on the first two and how many more: a condition is one
672
672
  line in the table toolbar, not a list. */
673
673
  describeIn: (e, t) => {
674
- const n = e.map((r) => lt(r, t));
674
+ const n = e.map((r) => at(r, t));
675
675
  if (n.length <= 2) return n.join(", ");
676
676
  const o = n.length - 2;
677
677
  return `${n.slice(0, 2).join(", ")} ${t.wording.moreValues(o, t.formats.count(o))}`;
678
678
  }
679
679
  }
680
- ), Qr = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime(), Zr = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate() + 1).getTime(), Fe = (e) => typeof e == "number" && Number.isFinite(e), ve = (e) => e instanceof Date && !Number.isNaN(e.getTime()), es = (e) => ve(e) ? Qr(e) : Fe(e) ? e : void 0, ts = (e) => ve(e) ? { value: Zr(e), open: !0 } : Fe(e) ? { value: e, open: !1 } : void 0, Ge = (e, t) => ve(e) ? t.formats.date(e) : Re(e, t.format, t.formats, t.wording) ?? String(e);
680
+ ), Qr = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime(), Zr = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate() + 1).getTime(), Fe = (e) => typeof e == "number" && Number.isFinite(e), we = (e) => e instanceof Date && !Number.isNaN(e.getTime()), es = (e) => we(e) ? Qr(e) : Fe(e) ? e : void 0, ts = (e) => we(e) ? { value: Zr(e), open: !0 } : Fe(e) ? { value: e, open: !1 } : void 0, $e = (e, t) => we(e) ? t.formats.date(e) : Re(e, t.format, t.formats, t.wording) ?? String(e);
681
681
  function ns({ condition: e, setCondition: t }) {
682
682
  const n = re(), [o, r] = W(null), s = o !== null, i = o ? o.from : Fe(e == null ? void 0 : e.from) ? e.from : null, l = o ? o.to : Fe(e == null ? void 0 : e.to) ? e.to : null, c = (a, f) => {
683
683
  const d = { from: i, to: l, [a]: f };
@@ -695,14 +695,14 @@ function ns({ condition: e, setCondition: t }) {
695
695
  });
696
696
  };
697
697
  return /* @__PURE__ */ R("div", { className: h.rangeFields, children: [
698
- /* @__PURE__ */ u(tt, { label: n.filterFrom, children: /* @__PURE__ */ u(nt, { size: "sm", value: i, invalid: s, onChange: (a) => c("from", a) }) }),
699
- /* @__PURE__ */ u(tt, { label: n.filterTo, error: s ? n.rangeInvalid : void 0, children: /* @__PURE__ */ u(nt, { size: "sm", value: l, onChange: (a) => c("to", a) }) })
698
+ /* @__PURE__ */ u(nt, { label: n.filterFrom, children: /* @__PURE__ */ u(ot, { size: "sm", value: i, invalid: s, onChange: (a) => c("from", a) }) }),
699
+ /* @__PURE__ */ u(nt, { label: n.filterTo, error: s ? n.rangeInvalid : void 0, children: /* @__PURE__ */ u(ot, { size: "sm", value: l, onChange: (a) => c("to", a) }) })
700
700
  ] });
701
701
  }
702
702
  function os({ condition: e, setCondition: t }) {
703
- const n = ve(e == null ? void 0 : e.from) && ve(e == null ? void 0 : e.to) ? { from: e.from, to: e.to } : null;
703
+ const n = we(e == null ? void 0 : e.from) && we(e == null ? void 0 : e.to) ? { from: e.from, to: e.to } : null;
704
704
  return /* @__PURE__ */ u("div", { className: h.rangePeriod, children: /* @__PURE__ */ u(
705
- Mn,
705
+ Fn,
706
706
  {
707
707
  size: "sm",
708
708
  clearable: !0,
@@ -714,10 +714,10 @@ function os({ condition: e, setCondition: t }) {
714
714
  function rs(e) {
715
715
  return e.kind === "date" ? /* @__PURE__ */ u(os, { ...e }) : /* @__PURE__ */ u(ns, { ...e });
716
716
  }
717
- const ss = on(
717
+ const ss = rn(
718
718
  {
719
719
  matches: (e, t) => {
720
- const n = ve(e) ? e.getTime() : Fe(e) ? e : void 0;
720
+ const n = we(e) ? e.getTime() : Fe(e) ? e : void 0;
721
721
  if (n === void 0) return !1;
722
722
  const o = es(t.from), r = ts(t.to);
723
723
  return !(o !== void 0 && n < o || r !== void 0 && (r.open ? n >= r.value : n > r.value));
@@ -727,24 +727,24 @@ const ss = on(
727
727
  },
728
728
  {
729
729
  isCondition: (e) => typeof e != "object" || e === null || Array.isArray(e) || e instanceof Date ? !1 : Object.entries(e).every(
730
- ([n, o]) => (n === "from" || n === "to") && (o === void 0 || Fe(o) || ve(o))
730
+ ([n, o]) => (n === "from" || n === "to") && (o === void 0 || Fe(o) || we(o))
731
731
  ),
732
732
  isEmpty: (e) => e.from === void 0 && e.to === void 0,
733
733
  absentMatches: () => !1,
734
734
  describeIn: (e, t) => {
735
735
  const { from: n, to: o } = e;
736
736
  if (n !== void 0 && o !== void 0) {
737
- const r = ve(n) && ve(o) && n.getFullYear() === o.getFullYear();
737
+ const r = we(n) && we(o) && n.getFullYear() === o.getFullYear();
738
738
  return t.wording.rangeFromTo(
739
- r ? t.formats.dateShort(n) : Ge(n, t),
740
- Ge(o, t)
739
+ r ? t.formats.dateShort(n) : $e(n, t),
740
+ $e(o, t)
741
741
  );
742
742
  }
743
- return n !== void 0 ? t.wording.rangeFrom(Ge(n, t)) : o === void 0 ? "" : t.wording.rangeTo(Ge(o, t));
743
+ return n !== void 0 ? t.wording.rangeFrom($e(n, t)) : o === void 0 ? "" : t.wording.rangeTo($e(o, t));
744
744
  }
745
745
  }
746
746
  );
747
- class Qe {
747
+ class Ze {
748
748
  constructor(t) {
749
749
  j(this, "entries", /* @__PURE__ */ new Map());
750
750
  /** Keys in the order of the running pass. */
@@ -771,7 +771,7 @@ class Qe {
771
771
  return this.dom = n, this.pass = n, o !== this.ordered().map((r) => r.key).join("|");
772
772
  }
773
773
  }
774
- const Ft = (e) => JSON.stringify([
774
+ const Lt = (e) => JSON.stringify([
775
775
  e.id,
776
776
  e.label,
777
777
  typeof e.value == "string" ? e.value : "ƒ",
@@ -797,13 +797,13 @@ const Ft = (e) => JSON.stringify([
797
797
  /* Whether a column edits, and how - not its editor or its check, which
798
798
  are new functions on every render and are read when an edit starts. */
799
799
  typeof e.edit == "function" ? "ƒ" : e.edit
800
- ]), Lt = (e, t) => e == null ? void 0 : e[t];
800
+ ]), Dt = (e, t) => e == null ? void 0 : e[t];
801
801
  class is {
802
802
  constructor() {
803
- j(this, "columns", new Qe("data-umriss-column"));
804
- j(this, "actions", new Qe("data-umriss-action"));
803
+ j(this, "columns", new Ze("data-umriss-column"));
804
+ j(this, "actions", new Ze("data-umriss-action"));
805
805
  /** The group keys: values to group by that are no column. */
806
- j(this, "groupKeys", new Qe("data-umriss-groupkey"));
806
+ j(this, "groupKeys", new Ze("data-umriss-groupkey"));
807
807
  j(this, "signatures", /* @__PURE__ */ new Map());
808
808
  /** The row detail: the presentation of the `RowDetail` that registered last. */
809
809
  j(this, "detail", null);
@@ -875,7 +875,7 @@ class is {
875
875
  /** A column registers during the render. Idempotent: the same spec changes no
876
876
  version. */
877
877
  registerColumn(t, n) {
878
- const o = this.columns.entries.get(t), r = Ft(n);
878
+ const o = this.columns.entries.get(t), r = Lt(n);
879
879
  if (o) {
880
880
  const s = o.spec;
881
881
  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;
@@ -885,7 +885,7 @@ class is {
885
885
  spec: n,
886
886
  read: (i) => {
887
887
  const l = s.spec.value;
888
- return typeof l == "string" ? Lt(i, l) : l(i);
888
+ return typeof l == "string" ? Dt(i, l) : l(i);
889
889
  }
890
890
  };
891
891
  this.columns.entries.set(t, s), this.structure++;
@@ -943,7 +943,7 @@ class is {
943
943
  /* --- Group keys and the grouping ---------------------------------------------- */
944
944
  /** A group key registers during the render, as a column does. Idempotent. */
945
945
  registerGroupKey(t, n) {
946
- const o = this.groupKeys.entries.get(t), r = Ft(n);
946
+ const o = this.groupKeys.entries.get(t), r = Lt(n);
947
947
  if (o)
948
948
  this.signatures.get(t) !== r && this.structure++, (o.spec.value !== n.value || o.spec.ownGroupValue !== n.ownGroupValue) && this.values++, o.spec = n;
949
949
  else {
@@ -952,7 +952,7 @@ class is {
952
952
  spec: n,
953
953
  read: (i) => {
954
954
  const l = s.spec.value;
955
- return typeof l == "string" ? Lt(i, l) : l(i);
955
+ return typeof l == "string" ? Dt(i, l) : l(i);
956
956
  }
957
957
  };
958
958
  this.groupKeys.entries.set(t, s), this.structure++;
@@ -1003,7 +1003,7 @@ class is {
1003
1003
  each once. */
1004
1004
  effectiveGrouping(t, n) {
1005
1005
  const o = new Set(this.groupingEntries(n).map((r) => r.spec.id));
1006
- return [...new Set(t)].filter((r) => o.has(r)).slice(0, wt);
1006
+ return [...new Set(t)].filter((r) => o.has(r)).slice(0, yt);
1007
1007
  }
1008
1008
  /** The levels and aggregates for the model - the same identity as long as
1009
1009
  nothing changed that they read. */
@@ -1017,10 +1017,10 @@ class is {
1017
1017
  const f = c.read(a);
1018
1018
  if (f == null) return;
1019
1019
  const { ownGroupValue: d, group: p } = c.spec;
1020
- return d ? d(f) : p ? Hn(p)(f) : f;
1020
+ return d ? d(f) : p ? Kn(p)(f) : f;
1021
1021
  },
1022
1022
  /* A value of one's own is a name; its groups stand by what they hold. */
1023
- order: c.spec.ownGroupValue ? (a) => rt(c.read(a), c.spec.ownSortValue) : void 0
1023
+ order: c.spec.ownGroupValue ? (a) => st(c.read(a), c.spec.ownSortValue) : void 0
1024
1024
  })), i = this.orderedColumns().filter((c) => c.spec.aggregate !== void 0).map(
1025
1025
  (c) => ({
1026
1026
  id: c.spec.id,
@@ -1045,7 +1045,7 @@ class is {
1045
1045
  kindOf(t, n) {
1046
1046
  const o = this.kinds.get(t.key);
1047
1047
  if (o && o.rows === n && o.value === t.spec.value) return o.kind;
1048
- const r = Zt(n, t.read);
1048
+ const r = en(n, t.read);
1049
1049
  return this.kinds.set(t.key, { rows: n, value: t.spec.value, kind: r }), r;
1050
1050
  }
1051
1051
  /** Can it be sorted by this column? Without a statement: when its value is
@@ -1064,7 +1064,7 @@ class is {
1064
1064
  if (((i = this.modelCache) == null ? void 0 : i.key) === r && this.modelCache.rows === t && this.modelCache.formats === n)
1065
1065
  return this.modelCache.columns;
1066
1066
  const s = o.map((l) => {
1067
- const { spec: c } = l, a = this.kindOf(l, t), f = this.isSortable(l, t), d = c.searchable ?? a === "text", p = (b) => rt(l.read(b), c.ownSortValue);
1067
+ const { spec: c } = l, a = this.kindOf(l, t), f = this.isSortable(l, t), d = c.searchable ?? a === "text", p = (b) => st(l.read(b), c.ownSortValue);
1068
1068
  return {
1069
1069
  id: c.id,
1070
1070
  label: c.label,
@@ -1182,58 +1182,59 @@ class is {
1182
1182
  function ls(e, t, n) {
1183
1183
  if (!e.lines) return { ...e, visible: e.filtered.slice(t, n) };
1184
1184
  const o = e.lines.slice(t, n);
1185
- return { ...e, visibleLines: o, visible: yt(o) };
1185
+ return { ...e, visibleLines: o, visible: _t(o) };
1186
1186
  }
1187
- const ln = /* @__PURE__ */ new WeakMap(), as = (e, t) => {
1188
- ln.set(e, t);
1189
- }, cs = (e) => typeof e == "function" || typeof e == "object" && e !== null ? ln.get(e) : void 0, K = (...e) => e.filter(Boolean).join(" ");
1190
- function an({
1187
+ const an = /* @__PURE__ */ new WeakMap(), as = (e, t) => {
1188
+ an.set(e, t);
1189
+ }, cs = (e) => typeof e == "function" || typeof e == "object" && e !== null ? an.get(e) : void 0, H = (...e) => e.filter(Boolean).join(" ");
1190
+ function cn({
1191
1191
  entry: e,
1192
1192
  registry: t,
1193
1193
  hook: n,
1194
1194
  anchor: o,
1195
- focus: r,
1196
- open: s,
1197
- setOpen: i,
1198
- panelId: l
1195
+ align: r,
1196
+ focus: s,
1197
+ open: i,
1198
+ setOpen: l,
1199
+ panelId: c
1199
1200
  }) {
1200
- const c = re(), a = be(), { id: f, label: d, format: p } = e.spec, { filterOptions: b } = n, S = b == null ? void 0 : b(f), { values: v, absent: O } = q(
1201
- () => S ? st(S, (A) => A, a) : st(n.admitted, e.read, a),
1202
- [S, n.admitted, e, a]
1203
- ), w = Te(e.spec.filter);
1204
- if (n.publicSnapshot.manual && !S && e.spec.filter === "list" && ae(
1205
- `manual-filter-options:${f}`,
1206
- `The list filter of "${f}" offers only the values of the page in manual mode; \`filterOptions\` gives it the server's.`
1207
- ), !w) return null;
1208
- const _ = n.publicSnapshot, F = w.Input, g = qr(w) ? { absentOccurs: O, format: p, kind: t.kindOf(e, n.rows) } : {}, C = () => {
1209
- var A;
1210
- i(!1), (A = (r ?? o).current) == null || A.focus();
1201
+ const a = re(), f = be(), { id: d, label: p, format: b } = e.spec, { filterOptions: S } = n, w = S == null ? void 0 : S(d), { values: O, absent: y } = q(
1202
+ () => w ? it(w, (F) => F, f) : it(n.admitted, e.read, f),
1203
+ [w, n.admitted, e, f]
1204
+ ), _ = Te(e.spec.filter);
1205
+ if (n.publicSnapshot.manual && !w && e.spec.filter === "list" && ae(
1206
+ `manual-filter-options:${d}`,
1207
+ `The list filter of "${d}" offers only the values of the page in manual mode; \`filterOptions\` gives it the server's.`
1208
+ ), !_) return null;
1209
+ const L = n.publicSnapshot, g = _.Input, k = qr(_) ? { absentOccurs: y, format: b, kind: t.kindOf(e, n.rows) } : {}, T = () => {
1210
+ var F;
1211
+ l(!1), (F = (s ?? o).current) == null || F.focus();
1211
1212
  };
1212
1213
  return /* @__PURE__ */ R(
1213
- pt,
1214
+ mt,
1214
1215
  {
1215
- open: s,
1216
- onOpenChange: i,
1216
+ open: i,
1217
+ onOpenChange: l,
1217
1218
  anchorRef: o,
1218
- align: "end",
1219
+ align: r,
1219
1220
  role: "dialog",
1220
- ariaLabel: c.filterColumn(d),
1221
- id: l,
1221
+ ariaLabel: a.filterColumn(p),
1222
+ id: c,
1222
1223
  className: h.filterPanel,
1223
1224
  children: [
1224
1225
  /* @__PURE__ */ u(
1225
- F,
1226
+ g,
1226
1227
  {
1227
- condition: _.filter[f] ?? null,
1228
- setCondition: (A) => _.setFilter(f, A),
1229
- values: v,
1230
- column: { id: f, label: d },
1231
- ...g
1228
+ condition: L.filter[d] ?? null,
1229
+ setCondition: (F) => L.setFilter(d, F),
1230
+ values: O,
1231
+ column: { id: d, label: p },
1232
+ ...k
1232
1233
  }
1233
1234
  ),
1234
1235
  /* @__PURE__ */ R("div", { className: h.filterFooter, children: [
1235
- /* @__PURE__ */ u(fe, { size: "sm", variant: "ghost", onClick: () => _.setFilter(f, null), children: c.filterReset }),
1236
- /* @__PURE__ */ u(fe, { size: "sm", onClick: C, children: c.filterDone })
1236
+ /* @__PURE__ */ u(fe, { size: "sm", variant: "ghost", onClick: () => L.setFilter(d, null), children: a.filterReset }),
1237
+ /* @__PURE__ */ u(fe, { size: "sm", onClick: T, children: a.filterDone })
1237
1238
  ] })
1238
1239
  ]
1239
1240
  }
@@ -1246,17 +1247,18 @@ function us({
1246
1247
  }) {
1247
1248
  const o = re(), [r, s] = W(!1), i = ce(null), l = me(), { id: c, label: a } = e.spec, f = c in n.publicSnapshot.filter;
1248
1249
  return /* @__PURE__ */ R(ne, { children: [
1249
- /* @__PURE__ */ u(
1250
+ /* @__PURE__ */ u(Ie, { content: o.filterHint, children: /* @__PURE__ */ u(
1250
1251
  "button",
1251
1252
  {
1252
- ref: i,
1253
1253
  type: "button",
1254
- className: K(h.filterButton, f && h.filterActive),
1254
+ className: H(h.filterButton, f && h.filterActive),
1255
1255
  "aria-label": o.filterColumn(a),
1256
1256
  "aria-haspopup": "dialog",
1257
1257
  "aria-expanded": r,
1258
1258
  "aria-controls": r ? l : void 0,
1259
- onClick: () => s(!r),
1259
+ onClick: (d) => {
1260
+ i.current = d.currentTarget, s(!r);
1261
+ },
1260
1262
  children: /* @__PURE__ */ u("svg", { viewBox: "0 0 14 14", width: "13", height: "13", "aria-hidden": "true", children: /* @__PURE__ */ u(
1261
1263
  "path",
1262
1264
  {
@@ -1269,14 +1271,15 @@ function us({
1269
1271
  }
1270
1272
  ) })
1271
1273
  }
1272
- ),
1274
+ ) }),
1273
1275
  /* @__PURE__ */ u(
1274
- an,
1276
+ cn,
1275
1277
  {
1276
1278
  entry: e,
1277
1279
  registry: t,
1278
1280
  hook: n,
1279
1281
  anchor: i,
1282
+ align: "end",
1280
1283
  open: r,
1281
1284
  setOpen: s,
1282
1285
  panelId: l
@@ -1291,7 +1294,7 @@ function ds({ registry: e, hook: t }) {
1291
1294
  const a = { formats: o, wording: n, format: l.spec.format, kind: e.kindOf(l, t.rows) };
1292
1295
  return [{ entry: l, text: Yr(c, i, a) }];
1293
1296
  });
1294
- return r.length === 0 ? null : /* @__PURE__ */ u(qt, { "aria-label": n.conditions, className: h.conditions, children: r.map(({ entry: s, text: i }) => /* @__PURE__ */ u(fs, { entry: s, text: i, registry: e, hook: t }, s.spec.id)) });
1297
+ return r.length === 0 ? null : /* @__PURE__ */ u(Ut, { "aria-label": n.conditions, className: h.conditions, children: r.map(({ entry: s, text: i }) => /* @__PURE__ */ u(fs, { entry: s, text: i, registry: e, hook: t }, s.spec.id)) });
1295
1298
  }
1296
1299
  function fs({
1297
1300
  entry: e,
@@ -1302,7 +1305,7 @@ function fs({
1302
1305
  const r = re(), [s, i] = W(!1), l = ce(null), c = ce(null), a = me(), { id: f, label: d } = e.spec;
1303
1306
  return /* @__PURE__ */ R(ne, { children: [
1304
1307
  /* @__PURE__ */ u(
1305
- Ut,
1308
+ Yt,
1306
1309
  {
1307
1310
  ref: l,
1308
1311
  className: h.condition,
@@ -1328,12 +1331,13 @@ function fs({
1328
1331
  }
1329
1332
  ),
1330
1333
  /* @__PURE__ */ u(
1331
- an,
1334
+ cn,
1332
1335
  {
1333
1336
  entry: e,
1334
1337
  registry: n,
1335
1338
  hook: o,
1336
1339
  anchor: l,
1340
+ align: "start",
1337
1341
  focus: c,
1338
1342
  open: s,
1339
1343
  setOpen: i,
@@ -1342,37 +1346,37 @@ function fs({
1342
1346
  )
1343
1347
  ] });
1344
1348
  }
1345
- const Dt = ";", hs = `\r
1346
- `, gs = "\uFEFF", ps = (e) => String(e).replace(".", ","), cn = (e) => /[";\r\n]/.test(e) ? `"${e.replace(/"/g, '""')}"` : e, ms = (e, t) => {
1349
+ const Rt = ";", hs = `\r
1350
+ `, gs = "\uFEFF", ps = (e) => String(e).replace(".", ","), un = (e) => /[";\r\n]/.test(e) ? `"${e.replace(/"/g, '""')}"` : e, ms = (e, t) => {
1347
1351
  var o;
1348
1352
  const n = (o = t.value) == null ? void 0 : o.call(t, e);
1349
- return n == null ? "" : cn(typeof n == "number" ? ps(n) : String(n));
1353
+ return n == null ? "" : un(typeof n == "number" ? ps(n) : String(n));
1350
1354
  };
1351
1355
  function bs(e, t) {
1352
- const n = t.map((r) => cn(r.label ?? r.id)).join(Dt), o = e.map((r) => t.map((s) => ms(r, s)).join(Dt));
1356
+ const n = t.map((r) => un(r.label ?? r.id)).join(Rt), o = e.map((r) => t.map((s) => ms(r, s)).join(Rt));
1353
1357
  return gs + [n, ...o].join(hs);
1354
1358
  }
1355
- function un(e) {
1359
+ function dn(e) {
1356
1360
  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);
1357
1361
  return e.inPinOrder(n.map((o) => ({ id: o.spec.id, e: o }))).map(({ e: o }) => o);
1358
1362
  }
1359
- function dn(e) {
1363
+ function fn(e) {
1360
1364
  e.setSearch("");
1361
1365
  for (const t of Object.keys(e.filter)) e.setFilter(t, null);
1362
1366
  }
1363
- function vs(e) {
1367
+ function ws(e) {
1364
1368
  const t = e.hook;
1365
1369
  if (!t) return "";
1366
- const n = un(e).filter((o) => e.kindOf(o, t.rows) !== "other" || o.spec.ownExportValue).map(
1370
+ const n = dn(e).filter((o) => e.kindOf(o, t.rows) !== "other" || o.spec.ownExportValue).map(
1367
1371
  (o) => ({
1368
1372
  id: o.spec.id,
1369
1373
  label: o.spec.label,
1370
- value: (r) => en(o.read(r), o.spec.ownExportValue)
1374
+ value: (r) => tn(o.read(r), o.spec.ownExportValue)
1371
1375
  })
1372
1376
  );
1373
1377
  return bs(e.projection().filtered, n);
1374
1378
  }
1375
- const ws = (e, t, n) => {
1379
+ const vs = (e, t, n) => {
1376
1380
  var o;
1377
1381
  return ((o = e.groupingEntries(t.rows).find((r) => r.spec.id === n)) == null ? void 0 : o.spec.label) ?? n;
1378
1382
  };
@@ -1391,7 +1395,7 @@ function ys({ registry: e, hook: t }) {
1391
1395
  className: h.groupingOption,
1392
1396
  "aria-label": n.groupBy(c),
1393
1397
  "aria-pressed": f,
1394
- disabled: !f && r.length >= wt,
1398
+ disabled: !f && r.length >= yt,
1395
1399
  onClick: () => s(f ? r.filter((d) => d !== l) : [...r, l]),
1396
1400
  children: [
1397
1401
  f && /* @__PURE__ */ u("span", { className: h.groupingLevel, "aria-hidden": "true", children: a + 1 }),
@@ -1406,14 +1410,14 @@ function ys({ registry: e, hook: t }) {
1406
1410
  function _s({ registry: e, hook: t }) {
1407
1411
  const n = re(), o = t.publicSnapshot, { grouping: r } = o;
1408
1412
  if (r.length === 0) return null;
1409
- const s = r.map((i) => ws(e, t, i));
1413
+ const s = r.map((i) => vs(e, t, i));
1410
1414
  return (
1411
1415
  /* In a tag group, as the conditions stand: the tag is one stop, its button
1412
1416
  the thing one tabs to, and the ring stands on the tag. */
1413
- /* @__PURE__ */ u(qt, { "aria-label": n.groupedBy, className: h.groupingTag, children: /* @__PURE__ */ u(Ut, { onRemove: () => o.setGrouping([]), removeLabel: n.removeGrouping, children: /* @__PURE__ */ R(
1414
- Yt,
1417
+ /* @__PURE__ */ u(Ut, { "aria-label": n.groupedBy, className: h.groupingTag, children: /* @__PURE__ */ u(Yt, { onRemove: () => o.setGrouping([]), removeLabel: n.removeGrouping, children: /* @__PURE__ */ R(
1418
+ Jt,
1415
1419
  {
1416
- trigger: /* @__PURE__ */ R("button", { type: "button", className: K(h.conditionButton, h.groupingTrigger), children: [
1420
+ trigger: /* @__PURE__ */ R("button", { type: "button", className: H(h.conditionButton, h.groupingTrigger), children: [
1417
1421
  /* @__PURE__ */ u("span", { className: h.groupingPrefix, children: n.groupedBy }),
1418
1422
  s.map((i, l) => /* @__PURE__ */ R("span", { className: h.groupingPath, children: [
1419
1423
  l > 0 && /* @__PURE__ */ u("span", { className: h.groupingSeparator, "aria-hidden": "true", children: "›" }),
@@ -1422,7 +1426,7 @@ function _s({ registry: e, hook: t }) {
1422
1426
  ] }),
1423
1427
  children: [
1424
1428
  r.map((i, l) => /* @__PURE__ */ u(Ke, { onSelect: () => o.setGrouping(r.filter((c) => c !== i)), children: n.removeGroupingLevel(s[l]) }, i)),
1425
- /* @__PURE__ */ u(Fn, {}),
1429
+ /* @__PURE__ */ u(Ln, {}),
1426
1430
  /* @__PURE__ */ u(Ke, { onSelect: o.unfoldAll, children: n.unfoldAll }),
1427
1431
  /* @__PURE__ */ u(Ke, { onSelect: o.foldAll, children: n.foldAll })
1428
1432
  ]
@@ -1430,7 +1434,7 @@ function _s({ registry: e, hook: t }) {
1430
1434
  ) }) })
1431
1435
  );
1432
1436
  }
1433
- function fn({
1437
+ function hn({
1434
1438
  registry: e,
1435
1439
  className: t,
1436
1440
  children: n,
@@ -1448,7 +1452,7 @@ function fn({
1448
1452
  /* The server counts the matches only; a total beside them would be a second request. */
1449
1453
  r.entries(a.rowCount, s.count(a.rowCount))
1450
1454
  ) : r.filteredOfTotal(s.count(a.filtered.length), s.count(i.admitted.length)) : "" }),
1451
- f && /* @__PURE__ */ u(fe, { size: "sm", variant: "ghost", onClick: () => dn(a), children: r.resetAll }),
1455
+ f && /* @__PURE__ */ u(fe, { size: "sm", variant: "ghost", onClick: () => fn(a), children: r.resetAll }),
1452
1456
  d.length > 0 && /* @__PURE__ */ R(ne, { children: [
1453
1457
  /* @__PURE__ */ u("span", { className: h.toolbarInfo, children: r.selectedCount(d.length, s.count(d.length)) }),
1454
1458
  p.map(({ key: b, spec: S }) => /* @__PURE__ */ u(
@@ -1464,7 +1468,7 @@ function fn({
1464
1468
  ] })
1465
1469
  ] });
1466
1470
  }
1467
- return /* @__PURE__ */ R("div", { className: K(h.toolbar, t), children: [
1471
+ return /* @__PURE__ */ R("div", { className: H(h.toolbar, t), children: [
1468
1472
  /* @__PURE__ */ R("div", { className: h.toolbarGroup, children: [
1469
1473
  n,
1470
1474
  l
@@ -1472,26 +1476,26 @@ function fn({
1472
1476
  c
1473
1477
  ] });
1474
1478
  }
1475
- const at = gt(null), ks = () => () => {
1476
- }, Rt = () => 0;
1477
- function Be(e) {
1479
+ const ct = pt(null), xs = () => () => {
1480
+ }, Pt = () => 0;
1481
+ function Ge(e) {
1478
1482
  var r;
1479
- const t = He(at), n = e ? cs(e.Table) ?? null : (t == null ? void 0 : t.registry) ?? null;
1480
- je(
1481
- n ? n.subscribe : ks,
1482
- n ? n.bodyVersion : Rt,
1483
- n ? n.bodyVersion : Rt
1483
+ const t = je(ct), n = e ? cs(e.Table) ?? null : (t == null ? void 0 : t.registry) ?? null;
1484
+ We(
1485
+ n ? n.subscribe : xs,
1486
+ n ? n.bodyVersion : Pt,
1487
+ n ? n.bodyVersion : Pt
1484
1488
  );
1485
1489
  const o = (r = n == null ? void 0 : n.hook) == null ? void 0 : r.publicSnapshot;
1486
1490
  return !n || !o ? null : { registry: n, snapshot: o, inside: !e && t !== null, footerTarget: e ? null : (t == null ? void 0 : t.footerTarget) ?? null };
1487
1491
  }
1488
- function hn({ wording: e }) {
1492
+ function gn({ wording: e }) {
1489
1493
  return /* @__PURE__ */ R(ne, { children: [
1490
1494
  /* @__PURE__ */ u("span", { "aria-hidden": "true", className: h.absent, children: "—" }),
1491
1495
  /* @__PURE__ */ u(De, { children: e.cellAbsentValue })
1492
1496
  ] });
1493
1497
  }
1494
- const Ss = { sum: "Σ", avg: "⌀", min: "min", max: "max" }, Cs = (e, t) => ({
1498
+ const ks = { sum: "Σ", avg: "⌀", min: "min", max: "max" }, Ss = (e, t) => ({
1495
1499
  sum: t.footerSum,
1496
1500
  avg: t.footerAverage,
1497
1501
  min: t.footerMinimum,
@@ -1500,7 +1504,7 @@ const Ss = { sum: "Σ", avg: "⌀", min: "min", max: "max" }, Cs = (e, t) => ({
1500
1504
  count: t.footerCount,
1501
1505
  distinct: t.footerDistinct
1502
1506
  })[e] ?? t.footerAggregate;
1503
- function ct({
1507
+ function ut({
1504
1508
  entry: e,
1505
1509
  rows: t,
1506
1510
  formats: n,
@@ -1511,8 +1515,8 @@ function ct({
1511
1515
  if (!s) return null;
1512
1516
  const c = typeof s == "function" ? "own" : s, a = vt({ id: e.spec.id, read: e.read, aggregate: s }, t), f = (b) => Re(b, i, n, o);
1513
1517
  let d;
1514
- if (Q(a)) d = /* @__PURE__ */ u(hn, { wording: o });
1515
- else if (c === "range" && i === "date" && xs(a)) {
1518
+ if (Q(a)) d = /* @__PURE__ */ u(gn, { wording: o });
1519
+ else if (c === "range" && i === "date" && Cs(a)) {
1516
1520
  const [b, S] = a;
1517
1521
  d = b.getTime() === S.getTime() ? n.date(b) : o.rangeFromTo(n.dateShort(b), n.dateShort(S));
1518
1522
  } else if (c === "count" || c === "distinct") d = n.count(a);
@@ -1520,20 +1524,20 @@ function ct({
1520
1524
  const [b, S] = a;
1521
1525
  d = f(b) === f(S) ? f(b) : o.rangeFromTo(f(b) ?? "", f(S) ?? "");
1522
1526
  } else c === "own" && l ? d = l(a, t[0]) : d = f(a);
1523
- const p = Ss[c];
1527
+ const p = ks[c];
1524
1528
  return /* @__PURE__ */ R(ne, { children: [
1525
1529
  r && p && /* @__PURE__ */ u("span", { "aria-hidden": "true", className: h.footerKind, children: p }),
1526
1530
  r && /* @__PURE__ */ R(De, { children: [
1527
- Cs(c, o),
1531
+ Ss(c, o),
1528
1532
  " "
1529
1533
  ] }),
1530
1534
  d
1531
1535
  ] });
1532
1536
  }
1533
- const xs = ([e, t]) => e instanceof Date && t instanceof Date && e.getFullYear() === t.getFullYear();
1534
- function gn(e, t) {
1537
+ const Cs = ([e, t]) => e instanceof Date && t instanceof Date && e.getFullYear() === t.getFullYear();
1538
+ function pn(e, t) {
1535
1539
  const n = e.spec.aggregate;
1536
- return n === "count" || n === "distinct" ? !0 : e.spec.rightAligned !== void 0 ? e.spec.rightAligned : Zt(t, e.read) === "number";
1540
+ return n === "count" || n === "distinct" ? !0 : e.spec.rightAligned !== void 0 ? e.spec.rightAligned : en(t, e.read) === "number";
1537
1541
  }
1538
1542
  function Ns(e, t) {
1539
1543
  const n = /* @__PURE__ */ new Map();
@@ -1543,7 +1547,7 @@ function Ns(e, t) {
1543
1547
  }
1544
1548
  return n;
1545
1549
  }
1546
- function pn(e, t) {
1550
+ function mn(e, t) {
1547
1551
  const n = getComputedStyle(e).getPropertyValue(t).trim(), o = Number.parseFloat(n);
1548
1552
  return Number.isFinite(o) ? n.endsWith("ms") ? o : o * 1e3 : 0;
1549
1553
  }
@@ -1560,7 +1564,7 @@ function Ts(e, t) {
1560
1564
  if (!o) return;
1561
1565
  const r = As(o), s = n.current;
1562
1566
  if (n.current = { trigger: t, positions: r }, !s || s.trigger === t) return;
1563
- const i = pn(o, "--u-duration-medium");
1567
+ const i = mn(o, "--u-duration-medium");
1564
1568
  if (i === 0 || typeof o.animate != "function") return;
1565
1569
  const l = getComputedStyle(o).getPropertyValue("--u-ease-out").trim() || "ease-out", c = Ns(s.positions, r);
1566
1570
  for (const a of Array.from(o.querySelectorAll("tbody > tr[data-motion]"))) {
@@ -1574,7 +1578,7 @@ function Os(e, t, n) {
1574
1578
  X(() => {
1575
1579
  const r = e.current, s = o.current;
1576
1580
  if (o.current = t, !r || s === t || typeof r.animate != "function") return;
1577
- const i = pn(r, "--u-duration-medium");
1581
+ const i = mn(r, "--u-duration-medium");
1578
1582
  if (i === 0) return;
1579
1583
  const l = performance.now();
1580
1584
  let c = requestAnimationFrame(function a(f) {
@@ -1586,13 +1590,13 @@ function Os(e, t, n) {
1586
1590
  };
1587
1591
  }, [e, t, n]);
1588
1592
  }
1589
- const mn = {};
1593
+ const bn = {};
1590
1594
  function St(e, t, n = t) {
1591
1595
  const o = no(e, t, n);
1592
- if (!o) return mn;
1596
+ if (!o) return bn;
1593
1597
  const r = o.side === "start";
1594
1598
  return {
1595
- className: K(h.pinned, o.edge && (r ? h.pinStartEdge : h.pinEndEdge)),
1599
+ className: H(h.pinned, o.edge && (r ? h.pinStartEdge : h.pinEndEdge)),
1596
1600
  /* The scroll area keeps a padding as wide as the block for the browser's
1597
1601
  scroll into view; a pinned cell lies inside it and would scroll the
1598
1602
  table back to its start when focused. Its target is shifted out of the
@@ -1609,7 +1613,7 @@ function St(e, t, n = t) {
1609
1613
  };
1610
1614
  }
1611
1615
  const Ms = (e) => e.controls + (e.span ? 1 : 0) + e.aggregates.length + (e.actions ? 1 : 0);
1612
- function bn(e) {
1616
+ function wn(e) {
1613
1617
  const { controls: t, span: n, aggregates: o, actions: r, blocks: s } = e, i = o.length, l = o.indexOf(!0), c = s.end > 0 ? s.end - (r ? 1 : 0) : 0, a = Math.max(n || i === 0 ? 0 : 1, Math.min(l === -1 ? i : l, i - c)), f = t + (n ? 1 : 0), d = s.start > 0 ? s.start - f : 0;
1614
1618
  return {
1615
1619
  lead: a,
@@ -1617,21 +1621,21 @@ function bn(e) {
1617
1621
  countColumns: d > 0 ? Math.min(a, d) : a
1618
1622
  };
1619
1623
  }
1620
- function Ze(e, t) {
1624
+ function et(e, t) {
1621
1625
  const n = Ms(t);
1622
1626
  if (e === "cells") return Array.from({ length: n }, () => 1);
1623
1627
  if (e === "whole") return [n];
1624
- const { lead: o, labelColumns: r, countColumns: s } = bn(t), i = Array.from({ length: t.controls }, () => 1), l = Array.from({ length: t.aggregates.length - o + (t.actions ? 1 : 0) }, () => 1), c = (a) => o - a > 0 ? [o - a] : [];
1628
+ const { lead: o, labelColumns: r, countColumns: s } = wn(t), i = Array.from({ length: t.controls }, () => 1), l = Array.from({ length: t.aggregates.length - o + (t.actions ? 1 : 0) }, () => 1), c = (a) => o - a > 0 ? [o - a] : [];
1625
1629
  return e === "header" ? [...i, (t.span ? 1 : 0) + r, ...c(r), ...l] : [...i, 1, ...s > 0 ? [s] : [], ...c(s), ...l];
1626
1630
  }
1627
- const qe = (e) => `row:${e}`;
1631
+ const Ue = (e) => `row:${e}`;
1628
1632
  function Fs({ layout: e, body: t, rowKey: n, expanded: o, foot: r }) {
1629
- const s = Ze("cells", e), i = Ze("whole", e), l = [{ key: "head", cells: s, at: -1 }], c = (a, f) => {
1633
+ const s = et("cells", e), i = et("whole", e), l = [{ key: "head", cells: s, at: -1 }], c = (a, f) => {
1630
1634
  const d = n(a);
1631
- l.push({ key: qe(d), cells: s, at: f, row: a }), o.has(d) && l.push({ key: `detail:${d}`, cells: i, at: f, row: a });
1635
+ l.push({ key: Ue(d), cells: s, at: f, row: a }), o.has(d) && l.push({ key: `detail:${d}`, cells: i, at: f, row: a });
1632
1636
  };
1633
1637
  return "rows" in t ? t.rows.forEach(c) : t.lines.forEach((a, f) => {
1634
- a.kind === "row" ? c(a.row, f) : l.push({ key: `${a.kind}:${a.group.path}`, cells: Ze(a.kind, e), at: f });
1638
+ a.kind === "row" ? c(a.row, f) : l.push({ key: `${a.kind}:${a.group.path}`, cells: et(a.kind, e), at: f });
1635
1639
  }), l.length === 1 && l.push({ key: "empty", cells: i, at: -1 }), r && l.push({ key: "foot", cells: s, at: -1 }), l;
1636
1640
  }
1637
1641
  function vn(e, t) {
@@ -1675,22 +1679,22 @@ function Ds(e, t, n, o) {
1675
1679
  const r = e.flatMap((l, c) => l.cells.map((a, f) => ({ line: c, column: ze(l.cells, f) }))), s = r.findIndex((l) => l.line === t.line && l.column === vn(e[t.line].cells, t.column).start);
1676
1680
  return (n ? r.slice(0, Math.max(0, s)).reverse() : r.slice(s + 1)).find(o) ?? null;
1677
1681
  }
1678
- function Pt(e, t, n) {
1682
+ function Et(e, t, n) {
1679
1683
  const o = e.indexOf(t);
1680
1684
  return o >= 0 ? o : Math.max(0, Math.min(e.length - 1, n));
1681
1685
  }
1682
- function Ue(e, t, n, o) {
1686
+ function Ye(e, t, n, o) {
1683
1687
  if (t === void 0) return o.groupNoValue;
1684
1688
  const r = e == null ? void 0 : e.spec;
1685
1689
  if (r != null && r.group && t instanceof Date) return Wn(r.group, t, n, o);
1686
1690
  const s = r != null && r.ownGroupValue || r == null ? void 0 : r.format;
1687
1691
  return Re(t, s, n, o) ?? String(t);
1688
1692
  }
1689
- function ut({ entry: e, group: t, formats: n, wording: o }) {
1693
+ function dt({ entry: e, group: t, formats: n, wording: o }) {
1690
1694
  const r = e == null ? void 0 : e.spec;
1691
- return t.value !== void 0 && (r != null && r.presentation) && !r.ownGroupValue && !r.group ? /* @__PURE__ */ u(ne, { children: r.presentation(t.value, t.rows[0]) }) : /* @__PURE__ */ u(ne, { children: Ue(e, t.value, n, o) });
1695
+ return t.value !== void 0 && (r != null && r.presentation) && !r.ownGroupValue && !r.group ? /* @__PURE__ */ u(ne, { children: r.presentation(t.value, t.rows[0]) }) : /* @__PURE__ */ u(ne, { children: Ye(e, t.value, n, o) });
1692
1696
  }
1693
- function dt({
1697
+ function ft({
1694
1698
  group: e,
1695
1699
  parent: t,
1696
1700
  entry: n,
@@ -1699,9 +1703,9 @@ function dt({
1699
1703
  formats: s,
1700
1704
  wording: i
1701
1705
  }) {
1702
- const l = Ue(n, e.value, s, i), c = s.count(e.rows.length), a = () => r.publicSnapshot.toggleFold(e.path), f = (d) => {
1706
+ const l = Ye(n, e.value, s, i), c = s.count(e.rows.length), a = () => r.publicSnapshot.toggleFold(e.path), f = (d) => {
1703
1707
  if (d.altKey && (d.key === "ArrowLeft" || d.key === "ArrowRight")) {
1704
- d.preventDefault(), Et(e, d.key === "ArrowLeft", r);
1708
+ d.preventDefault(), zt(e, d.key === "ArrowLeft", r);
1705
1709
  return;
1706
1710
  }
1707
1711
  if (d.key === "ArrowRight" && !o)
@@ -1720,14 +1724,14 @@ function dt({
1720
1724
  "button",
1721
1725
  {
1722
1726
  type: "button",
1723
- className: K(h.fold, !o && h.foldClosed),
1727
+ className: H(h.fold, !o && h.foldClosed),
1724
1728
  "data-fold-path": e.path,
1725
1729
  "aria-expanded": o,
1726
1730
  "aria-label": o ? i.foldGroup(l, c) : i.unfoldGroup(l, c),
1727
1731
  onKeyDown: f,
1728
1732
  onClick: (d) => {
1729
1733
  if (!d.altKey) return a();
1730
- Et(e, o, r);
1734
+ zt(e, o, r);
1731
1735
  },
1732
1736
  children: /* @__PURE__ */ u("svg", { viewBox: "0 0 10 10", width: "12", height: "12", "aria-hidden": "true", children: /* @__PURE__ */ u("path", { d: "M2.5 3.75 5 6.25 7.5 3.75", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) })
1733
1737
  }
@@ -1737,12 +1741,12 @@ function Rs({ value: e, formats: t }) {
1737
1741
  const n = ce(null);
1738
1742
  return Os(n, e, t.count), /* @__PURE__ */ u("span", { ref: n, className: h.groupCount, children: t.count(e) });
1739
1743
  }
1740
- function ft({ group: e, entry: t, hook: n, formats: o, wording: r }) {
1744
+ function ht({ group: e, entry: t, hook: n, formats: o, wording: r }) {
1741
1745
  const { selection: s } = n.publicSnapshot, i = e.rows.map(n.rowKey), l = i.filter((a) => s.isSelected(a)).length, c = l === i.length;
1742
1746
  return /* @__PURE__ */ u(
1743
1747
  Le,
1744
1748
  {
1745
- "aria-label": r.selectGroup(Ue(t, e.value, o, r)),
1749
+ "aria-label": r.selectGroup(Ye(t, e.value, o, r)),
1746
1750
  checked: c,
1747
1751
  indeterminate: l > 0 && !c,
1748
1752
  onChange: () => {
@@ -1751,7 +1755,7 @@ function ft({ group: e, entry: t, hook: n, formats: o, wording: r }) {
1751
1755
  }
1752
1756
  );
1753
1757
  }
1754
- function Et(e, t, n) {
1758
+ function zt(e, t, n) {
1755
1759
  const o = n.publicSnapshot, r = [], s = (i) => {
1756
1760
  for (const l of i)
1757
1761
  l.level === e.level ? r.push(l) : s(l.groups);
@@ -1770,17 +1774,17 @@ function Ps({
1770
1774
  wording: i
1771
1775
  }) {
1772
1776
  const l = e.span;
1773
- return /* @__PURE__ */ u("td", { className: K(h.td, h.spanCell, o.className), style: o.style, children: e.first && /* @__PURE__ */ R("span", { className: h.spanValue, children: [
1774
- n && /* @__PURE__ */ u("span", { className: h.spanSelect, children: /* @__PURE__ */ u(ft, { group: l, entry: t, hook: r, formats: s, wording: i }) }),
1775
- /* @__PURE__ */ u(dt, { group: l, parent: e.parents.at(-1), entry: t, open: !0, hook: r, formats: s, wording: i }),
1776
- /* @__PURE__ */ R("span", { className: h.spanText, title: Ue(t, l.value, s, i), children: [
1777
- /* @__PURE__ */ u(ut, { entry: t, group: l, formats: s, wording: i }),
1777
+ return /* @__PURE__ */ u("td", { className: H(h.td, h.spanCell, o.className), style: o.style, children: e.first && /* @__PURE__ */ R("span", { className: h.spanValue, children: [
1778
+ n && /* @__PURE__ */ u("span", { className: h.spanSelect, children: /* @__PURE__ */ u(ht, { group: l, entry: t, hook: r, formats: s, wording: i }) }),
1779
+ /* @__PURE__ */ u(ft, { group: l, parent: e.parents.at(-1), entry: t, open: !0, hook: r, formats: s, wording: i }),
1780
+ /* @__PURE__ */ R("span", { className: h.spanText, title: Ye(t, l.value, s, i), children: [
1781
+ /* @__PURE__ */ u(dt, { entry: t, group: l, formats: s, wording: i }),
1778
1782
  e.continued && /* @__PURE__ */ u("span", { className: h.continued, children: i.groupContinued })
1779
1783
  ] }),
1780
1784
  /* @__PURE__ */ u("span", { className: h.groupCount, children: s.count(l.rows.length) })
1781
1785
  ] }) });
1782
1786
  }
1783
- function zt({
1787
+ function It({
1784
1788
  line: e,
1785
1789
  index: t,
1786
1790
  absolute: n,
@@ -1796,88 +1800,88 @@ function zt({
1796
1800
  depth: p,
1797
1801
  hook: b,
1798
1802
  formats: S,
1799
- wording: v,
1803
+ wording: w,
1800
1804
  grid: O
1801
1805
  }) {
1802
- const { group: w } = e, _ = e.kind === "header", F = _ && !b.publicSnapshot.folded.includes(w.path), { lead: g, labelColumns: C, countColumns: A } = bn({
1806
+ const { group: y } = e, _ = e.kind === "header", L = _ && !b.publicSnapshot.folded.includes(y.path), { lead: g, labelColumns: k, countColumns: T } = wn({
1803
1807
  controls: i,
1804
1808
  span: o !== void 0,
1805
1809
  aggregates: s.map((I) => I.spec.aggregate !== void 0),
1806
1810
  actions: a,
1807
1811
  blocks: l
1808
- }), L = s.slice(g), m = i + (o ? 1 : 0), k = (I, P = I) => St(l, I, P), T = (I) => g - I > 0 && /* @__PURE__ */ u("td", { className: h.td, colSpan: g - I }), y = s.find((I) => I.spec.aggregate === "sum" && I.spec.share !== !1), M = n !== void 0, N = /* @__PURE__ */ R("span", { className: h.groupLabel, children: [
1809
- /* @__PURE__ */ u(dt, { group: w, parent: e.parents.at(-1), entry: r, open: F, hook: b, formats: S, wording: v }),
1810
- /* @__PURE__ */ u("span", { className: h.groupValue, children: /* @__PURE__ */ u(ut, { entry: r, group: w, formats: S, wording: v }) }),
1811
- /* @__PURE__ */ u(Rs, { value: w.rows.length, formats: S }),
1812
- _ && e.continued && /* @__PURE__ */ u("span", { className: h.continued, children: v.groupContinued })
1812
+ }), F = s.slice(g), m = i + (o ? 1 : 0), x = (I, P = I) => St(l, I, P), A = (I) => g - I > 0 && /* @__PURE__ */ u("td", { className: h.td, colSpan: g - I }), v = s.find((I) => I.spec.aggregate === "sum" && I.spec.share !== !1), M = n !== void 0, N = /* @__PURE__ */ R("span", { className: h.groupLabel, children: [
1813
+ /* @__PURE__ */ u(ft, { group: y, parent: e.parents.at(-1), entry: r, open: L, hook: b, formats: S, wording: w }),
1814
+ /* @__PURE__ */ u("span", { className: h.groupValue, children: /* @__PURE__ */ u(dt, { entry: r, group: y, formats: S, wording: w }) }),
1815
+ /* @__PURE__ */ u(Rs, { value: y.rows.length, formats: S }),
1816
+ _ && e.continued && /* @__PURE__ */ u("span", { className: h.continued, children: w.groupContinued })
1813
1817
  ] });
1814
1818
  return /* @__PURE__ */ R(
1815
1819
  "tr",
1816
1820
  {
1817
- className: K(_ ? h.groupHeader : h.groupFolded, M && h.virtualRow),
1821
+ className: H(_ ? h.groupHeader : h.groupFolded, M && h.virtualRow),
1818
1822
  "data-line": e.kind,
1819
- "data-level": w.level,
1820
- "data-motion": n !== void 0 || !(_ && e.continued) ? `${e.kind}:${w.path}` : void 0,
1823
+ "data-level": y.level,
1824
+ "data-motion": n !== void 0 || !(_ && e.continued) ? `${e.kind}:${y.path}` : void 0,
1821
1825
  "data-continued": _ && e.continued ? "" : void 0,
1822
1826
  "data-group-first": _ ? void 0 : "",
1823
- "data-group": w.path,
1824
- "data-grid-line": O ? `${e.kind}:${w.path}` : void 0,
1827
+ "data-group": y.path,
1828
+ "data-grid-line": O ? `${e.kind}:${y.path}` : void 0,
1825
1829
  "data-row": M ? n : void 0,
1826
1830
  "aria-rowindex": M ? n + 2 : void 0,
1827
1831
  "data-index": t,
1828
- style: _ ? { "--u-header-level": w.level } : void 0,
1829
- "aria-level": _ ? w.level + 1 : p,
1830
- "aria-expanded": F,
1831
- "aria-posinset": d.indexOf(w) + 1 || void 0,
1832
+ style: _ ? { "--u-header-level": y.level } : void 0,
1833
+ "aria-level": _ ? y.level + 1 : p,
1834
+ "aria-expanded": L,
1835
+ "aria-posinset": d.indexOf(y) + 1 || void 0,
1832
1836
  "aria-setsize": d.length || void 0,
1833
1837
  children: [
1834
- Array.from({ length: i }, (I, P) => /* @__PURE__ */ u("td", { className: K(h.td, h.control, k(P).className), style: k(P).style, children: P === 0 && c && _ && /* @__PURE__ */ u(ft, { group: w, entry: r, hook: b, formats: S, wording: v }) }, `c${P}`)),
1838
+ Array.from({ length: i }, (I, P) => /* @__PURE__ */ u("td", { className: H(h.td, h.control, x(P).className), style: x(P).style, children: P === 0 && c && _ && /* @__PURE__ */ u(ht, { group: y, entry: r, hook: b, formats: S, wording: w }) }, `c${P}`)),
1835
1839
  _ ? /* @__PURE__ */ R(ne, { children: [
1836
1840
  /* @__PURE__ */ u(
1837
1841
  "td",
1838
1842
  {
1839
- className: K(h.td, k(i, m + C - 1).className),
1840
- colSpan: (o ? 1 : 0) + C,
1843
+ className: H(h.td, x(i, m + k - 1).className),
1844
+ colSpan: (o ? 1 : 0) + k,
1841
1845
  style: {
1842
- ...k(i, m + C - 1).style,
1843
- paddingLeft: `calc(var(--u-space-3) + ${w.level * 20}px)`
1846
+ ...x(i, m + k - 1).style,
1847
+ paddingLeft: `calc(var(--u-space-3) + ${y.level * 20}px)`
1844
1848
  },
1845
1849
  children: N
1846
1850
  }
1847
1851
  ),
1848
- T(C)
1852
+ A(k)
1849
1853
  ] }) : /* @__PURE__ */ R(ne, { children: [
1850
- /* @__PURE__ */ u("td", { className: K(h.td, h.spanCell, k(i).className), style: k(i).style, children: /* @__PURE__ */ R("span", { className: h.spanValue, children: [
1851
- c && /* @__PURE__ */ u("span", { className: h.spanSelect, children: /* @__PURE__ */ u(ft, { group: w, entry: o, hook: b, formats: S, wording: v }) }),
1852
- /* @__PURE__ */ u(dt, { group: w, parent: e.parents.at(-1), entry: o, open: !1, hook: b, formats: S, wording: v }),
1853
- /* @__PURE__ */ u("span", { className: h.spanText, children: /* @__PURE__ */ u(ut, { entry: o, group: w, formats: S, wording: v }) }),
1854
- /* @__PURE__ */ u("span", { className: h.groupCount, children: S.count(w.rows.length) })
1854
+ /* @__PURE__ */ u("td", { className: H(h.td, h.spanCell, x(i).className), style: x(i).style, children: /* @__PURE__ */ R("span", { className: h.spanValue, children: [
1855
+ c && /* @__PURE__ */ u("span", { className: h.spanSelect, children: /* @__PURE__ */ u(ht, { group: y, entry: o, hook: b, formats: S, wording: w }) }),
1856
+ /* @__PURE__ */ u(ft, { group: y, parent: e.parents.at(-1), entry: o, open: !1, hook: b, formats: S, wording: w }),
1857
+ /* @__PURE__ */ u("span", { className: h.spanText, children: /* @__PURE__ */ u(dt, { entry: o, group: y, formats: S, wording: w }) }),
1858
+ /* @__PURE__ */ u("span", { className: h.groupCount, children: S.count(y.rows.length) })
1855
1859
  ] }) }),
1856
- A > 0 && /* @__PURE__ */ u(
1860
+ T > 0 && /* @__PURE__ */ u(
1857
1861
  "td",
1858
1862
  {
1859
- className: K(h.td, h.foldedCount, k(m, m + A - 1).className),
1860
- style: k(m, m + A - 1).style,
1861
- colSpan: A,
1862
- children: v.entries(w.rows.length, S.count(w.rows.length))
1863
+ className: H(h.td, h.foldedCount, x(m, m + T - 1).className),
1864
+ style: x(m, m + T - 1).style,
1865
+ colSpan: T,
1866
+ children: w.entries(y.rows.length, S.count(y.rows.length))
1863
1867
  }
1864
1868
  ),
1865
- T(A)
1869
+ A(T)
1866
1870
  ] }),
1867
- L.map((I, P) => /* @__PURE__ */ u(
1871
+ F.map((I, P) => /* @__PURE__ */ u(
1868
1872
  Es,
1869
1873
  {
1870
- pin: k(m + g + P),
1874
+ pin: x(m + g + P),
1871
1875
  entry: I,
1872
- group: w,
1873
- share: _ && I === y,
1876
+ group: y,
1877
+ share: _ && I === v,
1874
1878
  total: f,
1875
1879
  formats: S,
1876
- wording: v
1880
+ wording: w
1877
1881
  },
1878
1882
  I.key
1879
1883
  )),
1880
- a && /* @__PURE__ */ u("td", { className: K(h.td, k(l.count - 1).className), style: k(l.count - 1).style })
1884
+ a && /* @__PURE__ */ u("td", { className: H(h.td, x(l.count - 1).className), style: x(l.count - 1).style })
1881
1885
  ]
1882
1886
  }
1883
1887
  );
@@ -1892,7 +1896,7 @@ function Es({
1892
1896
  wording: i
1893
1897
  }) {
1894
1898
  const { spec: l } = e;
1895
- if (!l.aggregate) return /* @__PURE__ */ u("td", { className: K(h.td, t.className), style: t.style });
1899
+ if (!l.aggregate) return /* @__PURE__ */ u("td", { className: H(h.td, t.className), style: t.style });
1896
1900
  let c = null;
1897
1901
  if (o && l.aggregate === "sum" && l.share !== !1) {
1898
1902
  const a = vt({ id: l.id, read: e.read, aggregate: "sum" }, r), f = n.aggregates[l.id];
@@ -1901,10 +1905,10 @@ function Es({
1901
1905
  c = /* @__PURE__ */ u("span", { className: h.shareBar, style: { width: `${Math.max(2, Math.round(d * 64))}px` }, "aria-hidden": "true" });
1902
1906
  }
1903
1907
  }
1904
- return /* @__PURE__ */ u("td", { className: K(h.td, gn(e, n.rows) && h.numeric, h.aggregateCell, t.className), style: t.style, "data-aggregate": typeof l.aggregate == "function" ? "own" : l.aggregate, children: c ? /* @__PURE__ */ R("span", { className: h.shareHost, children: [
1905
- /* @__PURE__ */ u(ct, { entry: e, rows: n.rows, formats: s, wording: i }),
1908
+ return /* @__PURE__ */ u("td", { className: H(h.td, pn(e, n.rows) && h.numeric, h.aggregateCell, t.className), style: t.style, "data-aggregate": typeof l.aggregate == "function" ? "own" : l.aggregate, children: c ? /* @__PURE__ */ R("span", { className: h.shareHost, children: [
1909
+ /* @__PURE__ */ u(ut, { entry: e, rows: n.rows, formats: s, wording: i }),
1906
1910
  c
1907
- ] }) : /* @__PURE__ */ u(ct, { entry: e, rows: n.rows, formats: s, wording: i }) });
1911
+ ] }) : /* @__PURE__ */ u(ut, { entry: e, rows: n.rows, formats: s, wording: i }) });
1908
1912
  }
1909
1913
  class zs {
1910
1914
  constructor() {
@@ -1923,12 +1927,12 @@ function Is() {
1923
1927
  const [e, t] = W({ active: null, widget: !1, editing: null }), [n] = W(() => new zs());
1924
1928
  return { state: e, setState: t, focus: n };
1925
1929
  }
1926
- const wn = gt(null);
1930
+ const yn = pt(null);
1927
1931
  function Vs(e, t) {
1928
- const n = He(wn), o = n == null ? void 0 : n.editing;
1929
- return o && o.line === qe(e) && o.column === t ? n : null;
1932
+ const n = je(yn), o = n == null ? void 0 : n.editing;
1933
+ return o && o.line === Ue(e) && o.column === t ? n : null;
1930
1934
  }
1931
- const yn = 'a[href], button, input, select, textarea, [tabindex], [contenteditable="true"]', Ee = "data-grid-tabindex";
1935
+ const _n = 'a[href], button, input, select, textarea, [tabindex], [contenteditable="true"]', Ee = "data-grid-tabindex";
1932
1936
  function Bs(e, t) {
1933
1937
  if (t && !e.hasAttribute(Ee))
1934
1938
  e.setAttribute(Ee, e.getAttribute("tabindex") ?? ""), e.tabIndex = -1;
@@ -1944,7 +1948,7 @@ function Ct(e) {
1944
1948
  return t = o.end, o;
1945
1949
  });
1946
1950
  }
1947
- function It(e, t) {
1951
+ function Vt(e, t) {
1948
1952
  if (!(t instanceof Element)) return null;
1949
1953
  const n = t.closest("td, th"), o = n == null ? void 0 : n.parentElement, r = o == null ? void 0 : o.dataset.gridLine;
1950
1954
  if (!n || !o || r === void 0 || o.closest("table") !== e) return null;
@@ -1962,37 +1966,37 @@ function Gs({
1962
1966
  var O;
1963
1967
  const s = e.current;
1964
1968
  if (!s) return;
1965
- const { active: i, widget: l, editing: c } = t.state, a = $s(i, n, o), f = (O = n[a.line]) == null ? void 0 : O.key, d = new Map(n.map((w, _) => [w.key, _]));
1969
+ const { active: i, widget: l, editing: c } = t.state, a = $s(i, n, o), f = (O = n[a.line]) == null ? void 0 : O.key, d = new Map(n.map((y, _) => [y.key, _]));
1966
1970
  let p = null, b = null;
1967
- for (const w of Array.from(s.querySelectorAll("tr[data-grid-line]"))) {
1968
- const _ = w.dataset.gridLine, F = Ct(w);
1969
- for (const { cell: g, start: C, end: A } of F) {
1970
- const L = a.column >= C && a.column < A || g === F.at(-1).cell && a.column >= A;
1971
- L && _ === f && (p = g), L && b === null && _ !== "head" && (b = g), g.tabIndex = -1, r && _ !== "head" && !r({ line: d.get(_) ?? -1, column: C }) ? g.setAttribute("aria-readonly", "true") : g.removeAttribute("aria-readonly");
1971
+ for (const y of Array.from(s.querySelectorAll("tr[data-grid-line]"))) {
1972
+ const _ = y.dataset.gridLine, L = Ct(y);
1973
+ for (const { cell: g, start: k, end: T } of L) {
1974
+ const F = a.column >= k && a.column < T || g === L.at(-1).cell && a.column >= T;
1975
+ F && _ === f && (p = g), F && b === null && _ !== "head" && (b = g), g.tabIndex = -1, r && _ !== "head" && !r({ line: d.get(_) ?? -1, column: k }) ? g.setAttribute("aria-readonly", "true") : g.removeAttribute("aria-readonly");
1972
1976
  const m = g === p && (l || c !== null && c.line === _);
1973
- for (const k of Array.from(g.querySelectorAll(yn))) Bs(k, !m);
1977
+ for (const x of Array.from(g.querySelectorAll(_n))) Bs(x, !m);
1974
1978
  }
1975
1979
  }
1976
1980
  const S = p ?? b ?? s.querySelector("tr[data-grid-line] > *");
1977
1981
  S && (S.tabIndex = 0);
1978
- const v = t.focus.take(p !== null);
1979
- if (v === "editor") {
1980
- const w = p == null ? void 0 : p.querySelector("input, select, textarea, button");
1981
- w == null || w.focus(), w instanceof HTMLInputElement && w.type === "text" && w.setSelectionRange(w.value.length, w.value.length);
1982
- } else v === "cell" && (p == null || p.focus());
1982
+ const w = t.focus.take(p !== null);
1983
+ if (w === "editor") {
1984
+ const y = p == null ? void 0 : p.querySelector("input, select, textarea, button");
1985
+ y == null || y.focus(), y instanceof HTMLInputElement && y.type === "text" && y.setSelectionRange(y.value.length, y.value.length);
1986
+ } else w === "cell" && (p == null || p.focus());
1983
1987
  }), null;
1984
1988
  }
1985
1989
  function $s(e, t, n) {
1986
1990
  return e ? {
1987
- line: Pt(
1991
+ line: Et(
1988
1992
  t.map((o) => o.key),
1989
1993
  e.line,
1990
1994
  e.lineIndex
1991
1995
  ),
1992
- column: Pt(n, e.column, e.columnIndex)
1996
+ column: Et(n, e.column, e.columnIndex)
1993
1997
  } : { line: Math.min(1, t.length - 1), column: 0 };
1994
1998
  }
1995
- const Ks = {
1999
+ const Hs = {
1996
2000
  ArrowLeft: "left",
1997
2001
  ArrowRight: "right",
1998
2002
  ArrowUp: "up",
@@ -2001,119 +2005,119 @@ const Ks = {
2001
2005
  End: "lineEnd",
2002
2006
  PageUp: "pageUp",
2003
2007
  PageDown: "pageDown"
2004
- }, Hs = (e) => (e == null ? void 0 : e.spec.edit) !== void 0;
2005
- function _n(e, t) {
2008
+ }, Ks = (e) => (e == null ? void 0 : e.spec.edit) !== void 0;
2009
+ function xn(e, t) {
2006
2010
  const n = (o) => Q(o) || o === "" ? null : o instanceof Date ? o.getTime() : o;
2007
2011
  return Object.is(n(e), n(t));
2008
2012
  }
2009
2013
  function js(e) {
2010
2014
  const { grid: t, lines: n, ids: o, columnById: r, rowKey: s, virtual: i, onCellEdit: l, select: c } = e, { setState: a } = t, f = n.map((m) => m.key), d = (m) => {
2011
- var k;
2012
- return (k = n.find((T) => T.key === m)) == null ? void 0 : k.row;
2015
+ var x;
2016
+ return (x = n.find((A) => A.key === m)) == null ? void 0 : x.row;
2013
2017
  }, p = (m) => {
2014
- const k = n[m.line];
2015
- return (k == null ? void 0 : k.row) !== void 0 && k.key === qe(s(k.row)) ? { row: k.row } : null;
2016
- }, b = (m) => p(m) !== null && Hs(r(o[m.column] ?? "")), S = (m, k = t.state.active) => k && k.line === m.line && k.columnIndex >= m.column && k.columnIndex < m.end ? k.columnIndex : m.column, v = (m, k) => {
2018
+ const x = n[m.line];
2019
+ return (x == null ? void 0 : x.row) !== void 0 && x.key === Ue(s(x.row)) ? { row: x.row } : null;
2020
+ }, b = (m) => p(m) !== null && Ks(r(o[m.column] ?? "")), S = (m, x = t.state.active) => x && x.line === m.line && x.columnIndex >= m.column && x.columnIndex < m.end ? x.columnIndex : m.column, w = (m, x) => {
2017
2021
  var N;
2018
- const T = n[k.line];
2019
- if (!T) return;
2020
- a((I) => ({ ...I, widget: !1, active: { line: T.key, column: o[k.column] ?? "", lineIndex: k.line, columnIndex: k.column } }));
2021
- const y = Array.from(m.querySelectorAll("tr[data-grid-line]")).find((I) => I.dataset.gridLine === T.key), M = y ? (N = Ct(y).find((I) => k.column >= I.start && k.column < I.end)) == null ? void 0 : N.cell : void 0;
2022
- M ? M.focus({ preventScroll: T.key === "head" }) : (t.focus.want("cell"), i && T.at >= 0 && i.showRow(T.at));
2023
- }, O = (m, k) => {
2024
- const T = n[m.line], y = r(o[m.column] ?? "");
2022
+ const A = n[x.line];
2023
+ if (!A) return;
2024
+ a((I) => ({ ...I, widget: !1, active: { line: A.key, column: o[x.column] ?? "", lineIndex: x.line, columnIndex: x.column } }));
2025
+ const v = Array.from(m.querySelectorAll("tr[data-grid-line]")).find((I) => I.dataset.gridLine === A.key), M = v ? (N = Ct(v).find((I) => x.column >= I.start && x.column < I.end)) == null ? void 0 : N.cell : void 0;
2026
+ M ? M.focus({ preventScroll: A.key === "head" }) : (t.focus.want("cell"), i && A.at >= 0 && i.showRow(A.at));
2027
+ }, O = (m, x) => {
2028
+ const A = n[m.line], v = r(o[m.column] ?? "");
2025
2029
  t.focus.want("editor"), a((M) => ({
2026
2030
  ...M,
2027
- active: { line: T.key, column: y.spec.id, lineIndex: m.line, columnIndex: m.column },
2028
- editing: { line: T.key, column: y.spec.id, draft: k === void 0 ? y.read(T.row) : k, error: null }
2031
+ active: { line: A.key, column: v.spec.id, lineIndex: m.line, columnIndex: m.column },
2032
+ editing: { line: A.key, column: v.spec.id, draft: x === void 0 ? v.read(A.row) : x, error: null }
2029
2033
  }));
2030
- }, w = (m) => {
2034
+ }, y = (m) => {
2031
2035
  var N, I;
2032
- const k = t.state.editing;
2033
- if (!k) return !0;
2034
- const T = r(k.column), y = d(k.line);
2035
- if (!T || y === void 0)
2036
+ const x = t.state.editing;
2037
+ if (!x) return !0;
2038
+ const A = r(x.column), v = d(x.line);
2039
+ if (!A || v === void 0)
2036
2040
  return a((P) => ({ ...P, editing: null })), !0;
2037
- const M = (I = (N = T.spec).validate) == null ? void 0 : I.call(N, m, y);
2038
- return M ? (a((P) => ({ ...P, editing: P.editing && { ...P.editing, draft: m, error: M } })), !1) : (_n(m, T.read(y)) || l == null || l({ rowKey: s(y), columnId: T.spec.id, value: m, row: y }), t.focus.want("cell"), a((P) => ({ ...P, editing: null })), !0);
2041
+ const M = (I = (N = A.spec).validate) == null ? void 0 : I.call(N, m, v);
2042
+ return M ? (a((P) => ({ ...P, editing: P.editing && { ...P.editing, draft: m, error: M } })), !1) : (xn(m, A.read(v)) || l == null || l({ rowKey: s(v), columnId: A.spec.id, value: m, row: v }), t.focus.want("cell"), a((P) => ({ ...P, editing: null })), !0);
2039
2043
  }, _ = () => {
2040
2044
  t.focus.want("cell"), a((m) => ({ ...m, editing: null }));
2041
- }, F = (m) => a((k) => {
2045
+ }, L = (m) => a((x) => {
2042
2046
  var M, N;
2043
- if (!k.editing) return k;
2044
- const T = r(k.editing.column), y = k.editing.error === null ? null : ((N = T == null ? void 0 : (M = T.spec).validate) == null ? void 0 : N.call(M, m, d(k.editing.line))) ?? null;
2045
- return { ...k, editing: { ...k.editing, draft: m, error: y } };
2047
+ if (!x.editing) return x;
2048
+ const A = r(x.editing.column), v = x.editing.error === null ? null : ((N = A == null ? void 0 : (M = A.spec).validate) == null ? void 0 : N.call(M, m, d(x.editing.line))) ?? null;
2049
+ return { ...x, editing: { ...x.editing, draft: m, error: v } };
2046
2050
  }), g = (m) => {
2047
2051
  var I;
2048
- const k = m.currentTarget;
2052
+ const x = m.currentTarget;
2049
2053
  if (m.defaultPrevented) return;
2050
- const T = It(k, m.target);
2051
- if (!T) return;
2052
- const y = { line: f.indexOf(T.line), column: S(T) };
2053
- if (y.line < 0) return;
2054
+ const A = Vt(x, m.target);
2055
+ if (!A) return;
2056
+ const v = { line: f.indexOf(A.line), column: S(A) };
2057
+ if (v.line < 0) return;
2054
2058
  const M = t.state.editing;
2055
- if (M && M.line === T.line && M.column === o[T.column]) {
2059
+ if (M && M.line === A.line && M.column === o[A.column]) {
2056
2060
  if (m.key === "Escape")
2057
2061
  m.preventDefault(), _();
2058
2062
  else if (m.key === "Enter" && !(m.target instanceof HTMLButtonElement))
2059
- m.preventDefault(), w(M.draft);
2063
+ m.preventDefault(), y(M.draft);
2060
2064
  else if (m.key === "Tab") {
2061
- const P = Ds(n, y, m.shiftKey, b), $ = w(M.draft);
2065
+ const P = Ds(n, v, m.shiftKey, b), $ = y(M.draft);
2062
2066
  if ((P || !$) && m.preventDefault(), !$) return;
2063
2067
  P ? O(P) : t.focus.want(null);
2064
2068
  }
2065
2069
  return;
2066
2070
  }
2067
- if (m.target !== T.cell) {
2068
- (m.key === "Escape" || m.key === "F2") && (m.preventDefault(), a((P) => ({ ...P, widget: !1 })), T.cell.focus());
2071
+ if (m.target !== A.cell) {
2072
+ (m.key === "Escape" || m.key === "F2") && (m.preventDefault(), a((P) => ({ ...P, widget: !1 })), A.cell.focus());
2069
2073
  return;
2070
2074
  }
2071
2075
  if (m.altKey || m.metaKey) return;
2072
- const N = m.ctrlKey ? { Home: "first", End: "last" }[m.key] : Ks[m.key];
2076
+ const N = m.ctrlKey ? { Home: "first", End: "last" }[m.key] : Hs[m.key];
2073
2077
  if (N) {
2074
- m.preventDefault(), v(k, Ls(n, y, N, Ws(T.cell, k)));
2078
+ m.preventDefault(), w(x, Ls(n, v, N, Ws(A.cell, x)));
2075
2079
  return;
2076
2080
  }
2077
2081
  if (!m.ctrlKey) {
2078
2082
  if (m.key === " ") {
2079
- const P = p(y);
2083
+ const P = p(v);
2080
2084
  c && P && (m.preventDefault(), c(P.row));
2081
2085
  return;
2082
2086
  }
2083
2087
  if (m.key === "Enter" || m.key === "F2") {
2084
- if (b(y)) {
2085
- m.preventDefault(), O(y);
2088
+ if (b(v)) {
2089
+ m.preventDefault(), O(v);
2086
2090
  return;
2087
2091
  }
2088
- const P = T.cell.querySelector(yn);
2092
+ const P = A.cell.querySelector(_n);
2089
2093
  P && (m.preventDefault(), a(($) => ({ ...$, widget: !0 })), P.focus());
2090
2094
  return;
2091
2095
  }
2092
- if (m.key.length === 1 && b(y)) {
2093
- const P = (I = r(o[T.column] ?? "")) == null ? void 0 : I.spec.edit;
2094
- m.preventDefault(), O(y, P === "text" ? m.key : P === "number" && /\d/.test(m.key) ? Number(m.key) : void 0);
2096
+ if (m.key.length === 1 && b(v)) {
2097
+ const P = (I = r(o[A.column] ?? "")) == null ? void 0 : I.spec.edit;
2098
+ m.preventDefault(), O(v, P === "text" ? m.key : P === "number" && /\d/.test(m.key) ? Number(m.key) : void 0);
2095
2099
  }
2096
2100
  }
2097
- }, C = (m) => {
2098
- const k = It(m.currentTarget, m.target);
2099
- if (!k) return;
2100
- const T = f.indexOf(k.line), y = t.state.editing;
2101
- if (y && (y.line !== k.line || y.column !== o[k.column]) && !w(y.draft)) {
2101
+ }, k = (m) => {
2102
+ const x = Vt(m.currentTarget, m.target);
2103
+ if (!x) return;
2104
+ const A = f.indexOf(x.line), v = t.state.editing;
2105
+ if (v && (v.line !== x.line || v.column !== o[x.column]) && !y(v.draft)) {
2102
2106
  t.focus.want("editor");
2103
2107
  return;
2104
2108
  }
2105
2109
  t.focus.want(null), a((M) => {
2106
- const N = S(k, M.active);
2110
+ const N = S(x, M.active);
2107
2111
  return {
2108
2112
  ...M,
2109
- widget: m.target !== k.cell,
2110
- active: { line: k.line, column: o[N] ?? "", lineIndex: Math.max(0, T), columnIndex: N }
2113
+ widget: m.target !== x.cell,
2114
+ active: { line: x.line, column: o[N] ?? "", lineIndex: Math.max(0, A), columnIndex: N }
2111
2115
  };
2112
2116
  });
2113
- }, A = (m) => {
2114
- m.currentTarget.contains(m.relatedTarget) || a((k) => k.widget ? { ...k, widget: !1 } : k);
2115
- }, L = { editing: t.state.editing, setDraft: F, commit: w };
2116
- return { onKeyDown: g, onFocus: C, onBlur: A, context: L, editable: b };
2117
+ }, T = (m) => {
2118
+ m.currentTarget.contains(m.relatedTarget) || a((x) => x.widget ? { ...x, widget: !1 } : x);
2119
+ }, F = { editing: t.state.editing, setDraft: L, commit: y };
2120
+ return { onKeyDown: g, onFocus: k, onBlur: T, context: F, editable: b };
2117
2121
  }
2118
2122
  function Ws(e, t) {
2119
2123
  var s;
@@ -2133,20 +2137,20 @@ function qs({ entry: e, row: t, rowName: n, grid: o }) {
2133
2137
  label: a
2134
2138
  });
2135
2139
  else if (i.edit === "number")
2136
- f = /* @__PURE__ */ u(nt, { size: "sm", value: typeof c == "number" ? c : null, onChange: o.setDraft });
2140
+ f = /* @__PURE__ */ u(ot, { size: "sm", value: typeof c == "number" ? c : null, onChange: o.setDraft });
2137
2141
  else if (i.edit === "date")
2138
- f = /* @__PURE__ */ u(Ln, { size: "sm", value: c instanceof Date ? c : null, onChange: (d) => o.commit(d) });
2142
+ f = /* @__PURE__ */ u(Dn, { size: "sm", value: c instanceof Date ? c : null, onChange: (d) => o.commit(d) });
2139
2143
  else if (i.edit === "select") {
2140
- const d = i.editOptions ?? st(o.hook.admitted, e.read, r).values, p = d.findIndex((b) => _n(b, c));
2141
- f = /* @__PURE__ */ R(Jt, { selectSize: "sm", value: p < 0 ? "" : String(p), onChange: (b) => o.setDraft(d[Number(b.target.value)]), children: [
2144
+ const d = i.editOptions ?? it(o.hook.admitted, e.read, r).values, p = d.findIndex((b) => xn(b, c));
2145
+ f = /* @__PURE__ */ R(Xt, { selectSize: "sm", value: p < 0 ? "" : String(p), onChange: (b) => o.setDraft(d[Number(b.target.value)]), children: [
2142
2146
  p < 0 && /* @__PURE__ */ u("option", { value: "" }),
2143
2147
  d.map((b, S) => /* @__PURE__ */ u("option", { value: S, children: b instanceof Date ? r.date(b) : String(b) }, S))
2144
2148
  ] });
2145
2149
  } else
2146
- f = /* @__PURE__ */ u(Xt, { size: "sm", value: Q(c) ? "" : String(c), onChange: (d) => o.setDraft(d.target.value) });
2150
+ f = /* @__PURE__ */ u(Qt, { size: "sm", value: Q(c) ? "" : String(c), onChange: (d) => o.setDraft(d.target.value) });
2147
2151
  return /* @__PURE__ */ R("div", { ref: s, className: h.editor, children: [
2148
- /* @__PURE__ */ u(tt, { className: h.editorField, label: /* @__PURE__ */ u(De, { children: a }), error: l.error ?? void 0, children: f }),
2149
- /* @__PURE__ */ u(pt, { open: l.error !== null, onOpenChange: () => {
2152
+ /* @__PURE__ */ u(nt, { className: h.editorField, label: /* @__PURE__ */ u(De, { children: a }), error: l.error ?? void 0, children: f }),
2153
+ /* @__PURE__ */ u(mt, { open: l.error !== null, onOpenChange: () => {
2150
2154
  }, anchorRef: s, restoreFocus: !1, offset: 4, className: h.editorMessage, children: /* @__PURE__ */ u("span", { "aria-hidden": "true", children: l.error }) })
2151
2155
  ] });
2152
2156
  }
@@ -2186,7 +2190,7 @@ function Ys(e, t, n, o, r) {
2186
2190
  }
2187
2191
  function Js(e) {
2188
2192
  function t(c) {
2189
- const a = me(), f = He(at), d = Us(c);
2193
+ const a = me(), f = je(ct), d = Us(c);
2190
2194
  return e.registerColumn(a, d), X(
2191
2195
  () => () => {
2192
2196
  e.removeColumn(a), e.commit();
@@ -2194,7 +2198,7 @@ function Js(e) {
2194
2198
  [a]
2195
2199
  ), X(() => {
2196
2200
  e.ensureColumn(a, d), e.checkOrder(), e.commit();
2197
- }), nn && f && f.registry !== e && ae(
2201
+ }), on && f && f.registry !== e && ae(
2198
2202
  `foreign:${d.id}`,
2199
2203
  `The column "${d.id}" comes from a different useTable call than the table it stands in. It reads the rows of its own hook.`
2200
2204
  ), /* @__PURE__ */ u("span", { hidden: !0, "data-umriss-column": a });
@@ -2264,7 +2268,7 @@ function Js(e) {
2264
2268
  e.children = a.current, e.checkOrder(), e.commit();
2265
2269
  });
2266
2270
  const p = q(() => ({ registry: e, footerTarget: f }), [f]);
2267
- return /* @__PURE__ */ u(at.Provider, { value: p, children: /* @__PURE__ */ R("div", { className: K(h.frame, c.className), children: [
2271
+ return /* @__PURE__ */ u(ct.Provider, { value: p, children: /* @__PURE__ */ R("div", { className: H(h.frame, c.className), children: [
2268
2272
  /* @__PURE__ */ u("div", { ref: a, className: h.children, children: c.children }),
2269
2273
  /* @__PURE__ */ u(Xs, { registry: e }),
2270
2274
  /* @__PURE__ */ u(Qs, { registry: e, props: c }),
@@ -2275,7 +2279,7 @@ function Js(e) {
2275
2279
  return as(i, e), l;
2276
2280
  }
2277
2281
  function Xs({ registry: e }) {
2278
- return je(e.subscribe, e.bodyVersion, e.bodyVersion), !e.hook || !e.needsOwnToolbar() ? null : /* @__PURE__ */ u(fn, { registry: e, own: !0 });
2282
+ return We(e.subscribe, e.bodyVersion, e.bodyVersion), !e.hook || !e.needsOwnToolbar() ? null : /* @__PURE__ */ u(hn, { registry: e, own: !0 });
2279
2283
  }
2280
2284
  function Qs({ registry: e, props: t }) {
2281
2285
  const {
@@ -2290,18 +2294,18 @@ function Qs({ registry: e, props: t }) {
2290
2294
  ariaLabel: f,
2291
2295
  grid: d = !1
2292
2296
  } = t;
2293
- je(e.subscribe, e.bodyVersion, e.bodyVersion);
2294
- const p = re(), b = be(), S = Qt(s, "regular"), v = me(), O = ce(null), w = Is();
2297
+ We(e.subscribe, e.bodyVersion, e.bodyVersion);
2298
+ const p = re(), b = be(), S = Zt(s, "regular"), w = me(), O = ce(null), y = Is();
2295
2299
  X(() => {
2296
2300
  var oe, B, z;
2297
- const x = O.current;
2298
- if (x != null && x.parentElement && !o && x.parentElement.style.removeProperty("scroll-padding-top"), !x || !o) return;
2299
- const E = ((oe = x.tHead) == null ? void 0 : oe.getBoundingClientRect().height) ?? 0, ie = ((B = x.querySelector("tr[data-line='header']")) == null ? void 0 : B.getBoundingClientRect().height) ?? 0;
2300
- x.style.setProperty("--u-table-head", `${E}px`), x.style.setProperty("--u-table-group-header", `${ie}px`), (z = x.parentElement) == null || z.style.setProperty("scroll-padding-top", `${E}px`), x.parentElement && Vt(x.parentElement);
2301
+ const C = O.current;
2302
+ if (C != null && C.parentElement && !o && C.parentElement.style.removeProperty("scroll-padding-top"), !C || !o) return;
2303
+ const E = ((oe = C.tHead) == null ? void 0 : oe.getBoundingClientRect().height) ?? 0, ie = ((B = C.querySelector("tr[data-line='header']")) == null ? void 0 : B.getBoundingClientRect().height) ?? 0;
2304
+ C.style.setProperty("--u-table-head", `${E}px`), C.style.setProperty("--u-table-group-header", `${ie}px`), (z = C.parentElement) == null || z.style.setProperty("scroll-padding-top", `${E}px`), C.parentElement && Bt(C.parentElement);
2301
2305
  }), X(() => {
2302
- const x = e.takeFocusBeforeFold(), E = O.current;
2303
- if (!x || !E || x.table !== E || x.element.isConnected) return;
2304
- const ie = Array.from(E.querySelectorAll("[data-fold-path]")), oe = JSON.parse(x.group);
2306
+ const C = e.takeFocusBeforeFold(), E = O.current;
2307
+ if (!C || !E || C.table !== E || C.element.isConnected) return;
2308
+ const ie = Array.from(E.querySelectorAll("[data-fold-path]")), oe = JSON.parse(C.group);
2305
2309
  for (let B = oe.length; B > 0; B--) {
2306
2310
  const z = JSON.stringify(oe.slice(0, B)), V = ie.find((ee) => ee.dataset.foldPath === z);
2307
2311
  if (V) return V.focus();
@@ -2310,10 +2314,10 @@ function Qs({ registry: e, props: t }) {
2310
2314
  const _ = ce(null);
2311
2315
  X(() => {
2312
2316
  var oe;
2313
- const x = (oe = O.current) == null ? void 0 : oe.tBodies[0];
2314
- if (!x || !e.manual) return;
2317
+ const C = (oe = O.current) == null ? void 0 : oe.tBodies[0];
2318
+ if (!C || !e.manual) return;
2315
2319
  if (!c) {
2316
- const B = Array.from(x.querySelectorAll(":scope > tr[data-motion]"));
2320
+ const B = Array.from(C.querySelectorAll(":scope > tr[data-motion]"));
2317
2321
  if (B.length === 0) return;
2318
2322
  _.current = {
2319
2323
  height: B.reduce((z, V) => z + V.getBoundingClientRect().height, 0) / B.length,
@@ -2323,87 +2327,87 @@ function Qs({ registry: e, props: t }) {
2323
2327
  }
2324
2328
  const E = _.current;
2325
2329
  if (!E) return;
2326
- for (const B of Array.from(x.rows)) B.style.height = `${E.height}px`;
2327
- const ie = x.rows[0];
2330
+ for (const B of Array.from(C.rows)) B.style.height = `${E.height}px`;
2331
+ const ie = C.rows[0];
2328
2332
  (ie == null ? void 0 : ie.cells.length) === E.widths.length && Array.from(ie.cells).forEach((B, z) => B.style.width = `${E.widths[z]}px`);
2329
2333
  });
2330
- const F = e.hook && !e.hook.companion.virtual ? e.hook.publicSnapshot : null;
2331
- Ts(O, F ? `${F.grouping.join("|")}#${F.folded.join("|")}` : "");
2334
+ const L = e.hook && !e.hook.companion.virtual ? e.hook.publicSnapshot : null;
2335
+ Ts(O, L ? `${L.grouping.join("|")}#${L.folded.join("|")}` : "");
2332
2336
  const g = e.hook;
2333
2337
  if (!g) return null;
2334
- const C = g.publicSnapshot, A = e.projection(), L = e.rowHeader(), m = un(e), k = e.detail, T = e.hasRowActions() ? e.actions.ordered() : [], y = g.companion.virtual, M = C.grouping, N = M.length > 0 ? A.visibleLines : void 0, I = N ? e.groupingEntries(g.rows) : [], P = (x) => I.find((E) => E.spec.id === x), $ = N && M.length > 1 ? P(M.at(-1)) : void 0, U = N ? m.filter((x) => !M.includes(x.spec.id)) : m, Z = (n ? 1 : 0) + (k ? 1 : 0), he = Z + ($ ? 1 : 0), se = he + U.length + (T.length > 0 ? 1 : 0), we = e.pins(), Ce = U.filter((x) => we[x.spec.id] === "start").length, Oe = U.filter((x) => we[x.spec.id] === "end").length, xe = $ !== void 0 && we[$.spec.id] === "start", ue = {
2335
- start: Ce > 0 || xe ? he + Ce : 0,
2336
- end: Oe > 0 ? Oe + (T.length > 0 ? 1 : 0) : 0,
2338
+ const k = g.publicSnapshot, T = e.projection(), F = e.rowHeader(), m = dn(e), x = e.detail, A = e.hasRowActions() ? e.actions.ordered() : [], v = g.companion.virtual, M = k.grouping, N = M.length > 0 ? T.visibleLines : void 0, I = N ? e.groupingEntries(g.rows) : [], P = (C) => I.find((E) => E.spec.id === C), $ = N && M.length > 1 ? P(M.at(-1)) : void 0, U = N ? m.filter((C) => !M.includes(C.spec.id)) : m, Z = (n ? 1 : 0) + (x ? 1 : 0), he = Z + ($ ? 1 : 0), se = he + U.length + (A.length > 0 ? 1 : 0), ve = e.pins(), Se = U.filter((C) => ve[C.spec.id] === "start").length, Oe = U.filter((C) => ve[C.spec.id] === "end").length, Ce = $ !== void 0 && ve[$.spec.id] === "start", ue = {
2339
+ start: Se > 0 || Ce ? he + Se : 0,
2340
+ end: Oe > 0 ? Oe + (A.length > 0 ? 1 : 0) : 0,
2337
2341
  count: se
2338
- }, Y = (x, E = x) => St(ue, x, E), ge = A.visible, ye = !c && !C.manual && U.some((x) => x.spec.aggregate), Ne = C.search !== "" || Object.keys(C.filter).length > 0, _e = d ? Fs({
2339
- layout: { controls: Z, span: $ !== void 0, aggregates: U.map((x) => x.spec.aggregate !== void 0), actions: T.length > 0, blocks: ue },
2340
- body: c ? { rows: [] } : N ? { lines: y ? A.lines : N } : { rows: y ? A.filtered : ge },
2342
+ }, Y = (C, E = C) => St(ue, C, E), ge = T.visible, ye = !c && !k.manual && U.some((C) => C.spec.aggregate), Ne = k.search !== "" || Object.keys(k.filter).length > 0, _e = d ? Fs({
2343
+ layout: { controls: Z, span: $ !== void 0, aggregates: U.map((C) => C.spec.aggregate !== void 0), actions: A.length > 0, blocks: ue },
2344
+ body: c ? { rows: [] } : N ? { lines: v ? T.lines : N } : { rows: v ? T.filtered : ge },
2341
2345
  rowKey: g.rowKey,
2342
- expanded: new Set(k ? C.expanded : []),
2346
+ expanded: new Set(x ? k.expanded : []),
2343
2347
  foot: ye
2344
- }) : [], ke = [
2348
+ }) : [], xe = [
2345
2349
  ...n ? ["#select"] : [],
2346
- ...k ? ["#detail"] : [],
2350
+ ...x ? ["#detail"] : [],
2347
2351
  ...$ ? ["#span"] : [],
2348
- ...U.map((x) => x.spec.id),
2349
- ...T.length > 0 ? ["#actions"] : []
2352
+ ...U.map((C) => C.spec.id),
2353
+ ...A.length > 0 ? ["#actions"] : []
2350
2354
  ], J = d ? js({
2351
- grid: w,
2355
+ grid: y,
2352
2356
  lines: _e,
2353
- ids: ke,
2354
- columnById: (x) => U.find((E) => E.spec.id === x),
2357
+ ids: xe,
2358
+ columnById: (C) => U.find((E) => E.spec.id === C),
2355
2359
  rowKey: g.rowKey,
2356
- virtual: y,
2360
+ virtual: v,
2357
2361
  onCellEdit: t.onCellEdit,
2358
- select: n ? (x) => C.selection.toggle(g.rowKey(x)) : void 0
2359
- }) : void 0, D = (x) => d ? x : void 0, G = (x, E, ie, oe) => /* @__PURE__ */ u(
2362
+ select: n ? (C) => k.selection.toggle(g.rowKey(C)) : void 0
2363
+ }) : void 0, D = (C) => d ? C : void 0, G = (C, E, ie, oe) => /* @__PURE__ */ u(
2360
2364
  ei,
2361
2365
  {
2362
- row: x,
2366
+ row: C,
2363
2367
  index: E,
2364
- absolute: y ? ie : void 0,
2368
+ absolute: v ? ie : void 0,
2365
2369
  registry: e,
2366
2370
  hook: g,
2367
2371
  columns: U,
2368
2372
  line: oe,
2369
2373
  spanEntry: $,
2370
- header: L,
2374
+ header: F,
2371
2375
  selectable: n,
2372
- actions: T,
2376
+ actions: A,
2373
2377
  blocks: ue,
2374
2378
  columnCount: se,
2375
2379
  rowProps: a,
2376
- baseId: v,
2380
+ baseId: w,
2377
2381
  formats: b,
2378
2382
  wording: p,
2379
2383
  grid: d
2380
2384
  },
2381
- g.rowKey(x)
2385
+ g.rowKey(C)
2382
2386
  );
2383
- let H;
2387
+ let K;
2384
2388
  if (c)
2385
- H = /* @__PURE__ */ u("tbody", { children: /* @__PURE__ */ u(
2389
+ K = /* @__PURE__ */ u("tbody", { children: /* @__PURE__ */ u(
2386
2390
  si,
2387
2391
  {
2388
2392
  columns: se,
2389
- rows: C.manual ? ge.length || C.pageSize : void 0,
2393
+ rows: k.manual ? ge.length || k.pageSize : void 0,
2390
2394
  rightAligned: [
2391
2395
  ...Array.from({ length: Z + ($ ? 1 : 0) }, () => !1),
2392
- ...U.map((x) => mt(e.kindOf(x, g.rows), x.spec.rightAligned))
2396
+ ...U.map((C) => bt(e.kindOf(C, g.rows), C.spec.rightAligned))
2393
2397
  ]
2394
2398
  }
2395
2399
  ) });
2396
- else if (A.filtered.length === 0)
2397
- H = /* @__PURE__ */ u("tbody", { children: /* @__PURE__ */ u("tr", { "data-grid-line": D("empty"), children: /* @__PURE__ */ u("td", { colSpan: se, className: h.emptyCell, children: /* @__PURE__ */ u("div", { className: h.empty, children: (C.manual || g.admitted.length > 0) && Ne ? /* @__PURE__ */ R(ne, { children: [
2400
+ else if (T.filtered.length === 0)
2401
+ K = /* @__PURE__ */ u("tbody", { children: /* @__PURE__ */ u("tr", { "data-grid-line": D("empty"), children: /* @__PURE__ */ u("td", { colSpan: se, className: h.emptyCell, children: /* @__PURE__ */ u("div", { className: h.empty, children: (k.manual || g.admitted.length > 0) && Ne ? /* @__PURE__ */ R(ne, { children: [
2398
2402
  /* @__PURE__ */ u("p", { className: h.emptyTitle, children: p.nothingMatchesFilters }),
2399
- /* @__PURE__ */ u(fe, { size: "sm", variant: "ghost", onClick: () => dn(C), children: p.resetAll })
2403
+ /* @__PURE__ */ u(fe, { size: "sm", variant: "ghost", onClick: () => fn(k), children: p.resetAll })
2400
2404
  ] }) : l ?? /* @__PURE__ */ u("p", { className: h.emptyTitle, children: p.noEntries }) }) }) }) });
2401
2405
  else if (N) {
2402
- const x = y ? tn(N).map((B) => B.kind === "folded" || !B.continued ? B : { ...B, continued: !1 }) : N, E = x.length - N.length, ie = y && y.from > 0 ? y.fillerBefore / y.from : 0, oe = (B, z) => {
2406
+ const C = v ? nn(N).map((B) => B.kind === "folded" || !B.continued ? B : { ...B, continued: !1 }) : N, E = C.length - N.length, ie = v && v.from > 0 ? v.fillerBefore / v.from : 0, oe = (B, z) => {
2403
2407
  var de, pe;
2404
- const V = z - E, ee = y ? y.from + V : V;
2408
+ const V = z - E, ee = v ? v.from + V : V;
2405
2409
  return V < 0 ? B.kind === "row" ? null : /* @__PURE__ */ u(
2406
- zt,
2410
+ It,
2407
2411
  {
2408
2412
  line: B,
2409
2413
  index: z,
@@ -2414,9 +2418,9 @@ function Qs({ registry: e, props: t }) {
2414
2418
  controlColumns: Z,
2415
2419
  blocks: ue,
2416
2420
  selectable: n,
2417
- hasActions: T.length > 0,
2418
- total: A.filtered,
2419
- siblings: ((de = B.parents.at(-1)) == null ? void 0 : de.groups) ?? A.groups ?? [],
2421
+ hasActions: A.length > 0,
2422
+ total: T.filtered,
2423
+ siblings: ((de = B.parents.at(-1)) == null ? void 0 : de.groups) ?? T.groups ?? [],
2420
2424
  depth: M.length,
2421
2425
  grid: d,
2422
2426
  hook: g,
@@ -2425,20 +2429,20 @@ function Qs({ registry: e, props: t }) {
2425
2429
  },
2426
2430
  `${B.kind}:${B.group.path}:repeated`
2427
2431
  ) : B.kind === "row" ? G(B.row, V, ee, B) : /* @__PURE__ */ u(
2428
- zt,
2432
+ It,
2429
2433
  {
2430
2434
  line: B,
2431
2435
  index: V,
2432
- absolute: y ? ee : void 0,
2436
+ absolute: v ? ee : void 0,
2433
2437
  spanEntry: $,
2434
2438
  levelEntry: P(M[B.group.level]),
2435
2439
  columns: U,
2436
2440
  controlColumns: Z,
2437
2441
  blocks: ue,
2438
2442
  selectable: n,
2439
- hasActions: T.length > 0,
2440
- total: A.filtered,
2441
- siblings: ((pe = B.parents.at(-1)) == null ? void 0 : pe.groups) ?? A.groups ?? [],
2443
+ hasActions: A.length > 0,
2444
+ total: T.filtered,
2445
+ siblings: ((pe = B.parents.at(-1)) == null ? void 0 : pe.groups) ?? T.groups ?? [],
2442
2446
  depth: M.length,
2443
2447
  grid: d,
2444
2448
  hook: g,
@@ -2448,21 +2452,21 @@ function Qs({ registry: e, props: t }) {
2448
2452
  `${B.kind}:${B.group.path}${B.kind === "header" && B.continued ? ":continued" : ""}`
2449
2453
  );
2450
2454
  };
2451
- H = y ? /* @__PURE__ */ u(
2452
- $t,
2455
+ K = v ? /* @__PURE__ */ u(
2456
+ Ht,
2453
2457
  {
2454
- virtual: { ...y, fillerBefore: Math.max(0, y.fillerBefore - E * ie) },
2458
+ virtual: { ...v, fillerBefore: Math.max(0, v.fillerBefore - E * ie) },
2455
2459
  colSpan: se,
2456
- children: x.map(oe)
2460
+ children: C.map(oe)
2457
2461
  }
2458
2462
  ) : /* @__PURE__ */ u("tbody", { children: N.map(oe) });
2459
- } else y ? H = /* @__PURE__ */ u($t, { virtual: y, colSpan: se, children: ge.map((x, E) => G(x, E, y.from + E)) }) : H = /* @__PURE__ */ u("tbody", { children: ge.map((x, E) => G(x, E, E)) });
2463
+ } else v ? K = /* @__PURE__ */ u(Ht, { virtual: v, colSpan: se, children: ge.map((C, E) => G(C, E, v.from + E)) }) : K = /* @__PURE__ */ u("tbody", { children: ge.map((C, E) => G(C, E, E)) });
2460
2464
  return /* @__PURE__ */ R(
2461
2465
  "div",
2462
2466
  {
2463
- ref: y == null ? void 0 : y.scrollRef,
2464
- onScroll: (x) => {
2465
- y == null || y.onScroll(), N && o && Vt(x.currentTarget), (ue.start || ue.end) && kn(x.currentTarget);
2467
+ ref: v == null ? void 0 : v.scrollRef,
2468
+ onScroll: (C) => {
2469
+ v == null || v.onScroll(), N && o && Bt(C.currentTarget), (ue.start || ue.end) && kn(C.currentTarget);
2466
2470
  },
2467
2471
  className: h.scroll,
2468
2472
  style: i ? { maxHeight: i } : void 0,
@@ -2472,16 +2476,16 @@ function Qs({ registry: e, props: t }) {
2472
2476
  {
2473
2477
  ref: O,
2474
2478
  role: N ? "treegrid" : d ? "grid" : void 0,
2475
- "aria-readonly": d && !U.some((x) => x.spec.edit !== void 0) ? !0 : void 0,
2479
+ "aria-readonly": d && !U.some((C) => C.spec.edit !== void 0) ? !0 : void 0,
2476
2480
  onKeyDown: J == null ? void 0 : J.onKeyDown,
2477
2481
  onFocus: J == null ? void 0 : J.onFocus,
2478
2482
  onBlur: J == null ? void 0 : J.onBlur,
2479
2483
  "data-depth": N ? M.length : void 0,
2480
2484
  style: N ? { "--u-header-levels": M.length - 1 } : void 0,
2481
2485
  "aria-label": f,
2482
- "aria-rowcount": y ? (A.lines ?? A.filtered).length + 1 + (ye ? 1 : 0) : void 0,
2486
+ "aria-rowcount": v ? (T.lines ?? T.filtered).length + 1 + (ye ? 1 : 0) : void 0,
2483
2487
  "aria-busy": c || void 0,
2484
- className: K(
2488
+ className: H(
2485
2489
  h.table,
2486
2490
  S === "compact" && h.compact,
2487
2491
  o && h.sticky,
@@ -2489,51 +2493,51 @@ function Qs({ registry: e, props: t }) {
2489
2493
  d && h.grid
2490
2494
  ),
2491
2495
  children: [
2492
- /* @__PURE__ */ u("thead", { children: /* @__PURE__ */ R("tr", { "aria-rowindex": y ? 1 : void 0, "data-grid-line": D("head"), children: [
2493
- n && /* @__PURE__ */ u("th", { scope: "col", className: K(h.th, h.control, Y(0).className), style: Y(0).style, children: /* @__PURE__ */ u(
2496
+ /* @__PURE__ */ u("thead", { children: /* @__PURE__ */ R("tr", { "aria-rowindex": v ? 1 : void 0, "data-grid-line": D("head"), children: [
2497
+ n && /* @__PURE__ */ u("th", { scope: "col", className: H(h.th, h.control, Y(0).className), style: Y(0).style, children: /* @__PURE__ */ u(
2494
2498
  Le,
2495
2499
  {
2496
- "aria-label": C.manual ? p.selectAllOnPage : p.selectAllRows,
2497
- checked: C.selection.allSelected,
2498
- indeterminate: C.selection.someSelected,
2499
- onChange: C.selection.toggleAll
2500
+ "aria-label": k.manual ? p.selectAllOnPage : p.selectAllRows,
2501
+ checked: k.selection.allSelected,
2502
+ indeterminate: k.selection.someSelected,
2503
+ onChange: k.selection.toggleAll
2500
2504
  }
2501
2505
  ) }),
2502
- k && /* @__PURE__ */ u(
2506
+ x && /* @__PURE__ */ u(
2503
2507
  "td",
2504
2508
  {
2505
- className: K(h.th, h.control, Y(Z - 1).className),
2509
+ className: H(h.th, h.control, Y(Z - 1).className),
2506
2510
  style: Y(Z - 1).style
2507
2511
  }
2508
2512
  ),
2509
- $ && (e.columnById($.spec.id) === $ ? /* @__PURE__ */ u(Bt, { entry: $, registry: e, hook: g, pin: Y(Z) }) : /* @__PURE__ */ u("th", { scope: "col", className: K(h.th, Y(Z).className), style: Y(Z).style, children: $.spec.label })),
2510
- U.map((x, E) => /* @__PURE__ */ u(Bt, { entry: x, registry: e, hook: g, pin: Y(he + E) }, x.key)),
2511
- T.length > 0 && /* @__PURE__ */ u(
2513
+ $ && (e.columnById($.spec.id) === $ ? /* @__PURE__ */ u(Gt, { entry: $, registry: e, hook: g, pin: Y(Z) }) : /* @__PURE__ */ u("th", { scope: "col", className: H(h.th, Y(Z).className), style: Y(Z).style, children: $.spec.label })),
2514
+ U.map((C, E) => /* @__PURE__ */ u(Gt, { entry: C, registry: e, hook: g, pin: Y(he + E) }, C.key)),
2515
+ A.length > 0 && /* @__PURE__ */ u(
2512
2516
  "th",
2513
2517
  {
2514
2518
  scope: "col",
2515
- className: K(h.th, h.actionsCell, Y(se - 1).className),
2519
+ className: H(h.th, h.actionsCell, Y(se - 1).className),
2516
2520
  style: Y(se - 1).style,
2517
2521
  children: /* @__PURE__ */ u(De, { children: p.rowActions })
2518
2522
  }
2519
2523
  )
2520
2524
  ] }) }),
2521
- /* @__PURE__ */ u(wn.Provider, { value: J ? { ...J.context, hook: g, wording: p } : null, children: H }),
2522
- ye && /* @__PURE__ */ u("tfoot", { children: /* @__PURE__ */ R("tr", { "aria-rowindex": y ? (A.lines ?? A.filtered).length + 2 : void 0, "data-grid-line": D("foot"), children: [
2523
- Array.from({ length: Z }, (x, E) => /* @__PURE__ */ u("td", { className: K(h.td, h.control, Y(E).className), style: Y(E).style }, E)),
2524
- $ && /* @__PURE__ */ u("td", { className: K(h.td, Y(Z).className), style: Y(Z).style }),
2525
- U.map((x, E) => /* @__PURE__ */ u(
2525
+ /* @__PURE__ */ u(yn.Provider, { value: J ? { ...J.context, hook: g, wording: p } : null, children: K }),
2526
+ ye && /* @__PURE__ */ u("tfoot", { children: /* @__PURE__ */ R("tr", { "aria-rowindex": v ? (T.lines ?? T.filtered).length + 2 : void 0, "data-grid-line": D("foot"), children: [
2527
+ Array.from({ length: Z }, (C, E) => /* @__PURE__ */ u("td", { className: H(h.td, h.control, Y(E).className), style: Y(E).style }, E)),
2528
+ $ && /* @__PURE__ */ u("td", { className: H(h.td, Y(Z).className), style: Y(Z).style }),
2529
+ U.map((C, E) => /* @__PURE__ */ u(
2526
2530
  ni,
2527
2531
  {
2528
- entry: x,
2529
- rows: A.filtered,
2532
+ entry: C,
2533
+ rows: T.filtered,
2530
2534
  formats: b,
2531
2535
  wording: p,
2532
2536
  pin: Y(he + E)
2533
2537
  },
2534
- x.key
2538
+ C.key
2535
2539
  )),
2536
- T.length > 0 && /* @__PURE__ */ u("td", { className: K(h.td, Y(se - 1).className), style: Y(se - 1).style })
2540
+ A.length > 0 && /* @__PURE__ */ u("td", { className: H(h.td, Y(se - 1).className), style: Y(se - 1).style })
2537
2541
  ] }) })
2538
2542
  ]
2539
2543
  }
@@ -2543,17 +2547,17 @@ function Qs({ registry: e, props: t }) {
2543
2547
  {
2544
2548
  table: O,
2545
2549
  blocks: ue,
2546
- pinnedKeys: U.filter((x) => we[x.spec.id]).map((x) => x.key).join("|")
2550
+ pinnedKeys: U.filter((C) => ve[C.spec.id]).map((C) => C.key).join("|")
2547
2551
  }
2548
2552
  ),
2549
2553
  d && /* @__PURE__ */ u(
2550
2554
  Gs,
2551
2555
  {
2552
2556
  table: O,
2553
- grid: w,
2557
+ grid: y,
2554
2558
  lines: _e,
2555
- ids: ke,
2556
- editable: U.some((x) => x.spec.edit !== void 0) ? J == null ? void 0 : J.editable : void 0
2559
+ ids: xe,
2560
+ editable: U.some((C) => C.spec.edit !== void 0) ? J == null ? void 0 : J.editable : void 0
2557
2561
  }
2558
2562
  )
2559
2563
  ]
@@ -2571,14 +2575,14 @@ function Zs({
2571
2575
  if (!i || !l || (l.style.removeProperty("scroll-padding-left"), l.style.removeProperty("scroll-padding-right"), !o && !r)) return;
2572
2576
  const c = Array.from(((p = (d = i.tHead) == null ? void 0 : d.rows[0]) == null ? void 0 : p.cells) ?? []);
2573
2577
  let a = 0;
2574
- for (let v = 0; v < o; v++)
2575
- i.style.setProperty(`--u-table-pin-start-${v}`, `${a}px`), a += ((b = c[v]) == null ? void 0 : b.getBoundingClientRect().width) ?? 0;
2578
+ for (let w = 0; w < o; w++)
2579
+ i.style.setProperty(`--u-table-pin-start-${w}`, `${a}px`), a += ((b = c[w]) == null ? void 0 : b.getBoundingClientRect().width) ?? 0;
2576
2580
  let f = 0;
2577
- for (let v = 0; v < r; v++)
2578
- i.style.setProperty(`--u-table-pin-end-${v}`, `${f}px`), f += ((S = c[c.length - 1 - v]) == null ? void 0 : S.getBoundingClientRect().width) ?? 0;
2581
+ for (let w = 0; w < r; w++)
2582
+ i.style.setProperty(`--u-table-pin-end-${w}`, `${f}px`), f += ((S = c[c.length - 1 - w]) == null ? void 0 : S.getBoundingClientRect().width) ?? 0;
2579
2583
  i.style.setProperty("--u-table-pin-start", `${a}px`), i.style.setProperty("--u-table-pin-end", `${f}px`), a && l.style.setProperty("scroll-padding-left", `${a}px`), f && l.style.setProperty("scroll-padding-right", `${f}px`), kn(l);
2580
2584
  };
2581
- return X(s), jt(() => {
2585
+ return X(s), Wt(() => {
2582
2586
  var a, f;
2583
2587
  const i = e.current;
2584
2588
  if (!i || !o && !r || typeof ResizeObserver > "u") return;
@@ -2591,80 +2595,80 @@ function kn(e) {
2591
2595
  const t = e.scrollWidth - e.clientWidth;
2592
2596
  e.toggleAttribute("data-under-start", e.scrollLeft > 0.5), e.toggleAttribute("data-under-end", e.scrollLeft < t - 0.5);
2593
2597
  }
2594
- function Vt(e) {
2598
+ function Bt(e) {
2595
2599
  for (const t of Array.from(e.querySelectorAll("tbody > tr[data-line='header']"))) {
2596
2600
  const n = t.cells[t.cells.length - 1], o = !!n && n.getBoundingClientRect().top > t.getBoundingClientRect().top + 0.5;
2597
2601
  t.toggleAttribute("data-stuck", o);
2598
2602
  }
2599
2603
  }
2600
- function Bt({
2604
+ function Gt({
2601
2605
  entry: e,
2602
2606
  registry: t,
2603
2607
  hook: n,
2604
2608
  pin: o
2605
2609
  }) {
2606
- const { spec: r } = e, s = n.publicSnapshot, i = t.kindOf(e, n.rows), l = mt(i, r.rightAligned), c = t.isSortable(e, n.rows), a = r.id, f = s.sort.findIndex((C) => C.column === a), d = f === -1 ? void 0 : s.sort[f].direction, p = s.sort.length > 1 && f !== -1 ? f + 1 : void 0, b = s.widths[a], S = 48, v = (C) => {
2607
- C.stopPropagation(), C.preventDefault();
2608
- const A = C.currentTarget, L = A.closest("th");
2609
- if (!L) return;
2610
- const m = C.clientX, k = L.getBoundingClientRect().width, T = C.pointerId;
2611
- A.setPointerCapture(T);
2612
- const y = (N) => {
2613
- N.pointerId === T && s.setWidth(a, Math.max(S, k + (N.clientX - m)));
2610
+ const { spec: r } = e, s = n.publicSnapshot, i = t.kindOf(e, n.rows), l = bt(i, r.rightAligned), c = t.isSortable(e, n.rows), a = r.id, f = s.sort.findIndex((k) => k.column === a), d = f === -1 ? void 0 : s.sort[f].direction, p = s.sort.length > 1 && f !== -1 ? f + 1 : void 0, b = s.widths[a], S = 48, w = (k) => {
2611
+ k.stopPropagation(), k.preventDefault();
2612
+ const T = k.currentTarget, F = T.closest("th");
2613
+ if (!F) return;
2614
+ const m = k.clientX, x = F.getBoundingClientRect().width, A = k.pointerId;
2615
+ T.setPointerCapture(A);
2616
+ const v = (N) => {
2617
+ N.pointerId === A && s.setWidth(a, Math.max(S, x + (N.clientX - m)));
2614
2618
  }, M = (N) => {
2615
- N.pointerId === T && (A.removeEventListener("pointermove", y), A.removeEventListener("pointerup", M), A.removeEventListener("pointercancel", M), A.hasPointerCapture(T) && A.releasePointerCapture(T));
2619
+ N.pointerId === A && (T.removeEventListener("pointermove", v), T.removeEventListener("pointerup", M), T.removeEventListener("pointercancel", M), T.hasPointerCapture(A) && T.releasePointerCapture(A));
2616
2620
  };
2617
- A.addEventListener("pointermove", y), A.addEventListener("pointerup", M), A.addEventListener("pointercancel", M);
2618
- }, O = (C) => {
2619
- const A = C == null ? void 0 : C.parentElement, L = C == null ? void 0 : C.closest("table");
2620
- if (!C || !A || !L) return;
2621
- const m = Array.from(A.children).indexOf(C), k = A.children.length, T = { cell: C.style.width, table: L.style.width };
2622
- C.style.width = "", L.style.width = "auto";
2623
- let y = 0;
2624
- for (const M of Array.from(L.rows)) {
2625
- if (M.cells.length !== k) continue;
2621
+ T.addEventListener("pointermove", v), T.addEventListener("pointerup", M), T.addEventListener("pointercancel", M);
2622
+ }, O = (k) => {
2623
+ const T = k == null ? void 0 : k.parentElement, F = k == null ? void 0 : k.closest("table");
2624
+ if (!k || !T || !F) return;
2625
+ const m = Array.from(T.children).indexOf(k), x = T.children.length, A = { cell: k.style.width, table: F.style.width };
2626
+ k.style.width = "", F.style.width = "auto";
2627
+ let v = 0;
2628
+ for (const M of Array.from(F.rows)) {
2629
+ if (M.cells.length !== x) continue;
2626
2630
  const N = M.cells[m];
2627
- N && (y = Math.max(y, N.scrollWidth));
2631
+ N && (v = Math.max(v, N.scrollWidth));
2628
2632
  }
2629
- C.style.width = T.cell, L.style.width = T.table, y > 0 && s.setWidth(a, Math.max(S, y + 1));
2630
- }, w = (C) => {
2631
- if (!r.resizable || !C.altKey) return;
2632
- const A = C.key === "ArrowRight", L = C.key === "ArrowLeft", m = C.key === "Home";
2633
- if (!A && !L && !m) return;
2634
- C.preventDefault();
2635
- const k = C.currentTarget;
2633
+ k.style.width = A.cell, F.style.width = A.table, v > 0 && s.setWidth(a, Math.max(S, v + 1));
2634
+ }, y = (k) => {
2635
+ if (!r.resizable || !k.altKey) return;
2636
+ const T = k.key === "ArrowRight", F = k.key === "ArrowLeft", m = k.key === "Home";
2637
+ if (!T && !F && !m) return;
2638
+ k.preventDefault();
2639
+ const x = k.currentTarget;
2636
2640
  if (m) {
2637
- O(k);
2641
+ O(x);
2638
2642
  return;
2639
2643
  }
2640
- const T = k.getBoundingClientRect().width, y = C.shiftKey ? 32 : 8;
2641
- s.setWidth(a, Math.max(S, T + (A ? y : -y)));
2644
+ const A = x.getBoundingClientRect().width, v = k.shiftKey ? 32 : 8;
2645
+ s.setWidth(a, Math.max(S, A + (T ? v : -v)));
2642
2646
  }, _ = c ? /* @__PURE__ */ R(
2643
2647
  "button",
2644
2648
  {
2645
2649
  type: "button",
2646
2650
  className: h.sortButton,
2647
- onClick: (C) => s.toggleSort(a, C.shiftKey || C.metaKey),
2651
+ onClick: (k) => s.toggleSort(a, k.shiftKey || k.metaKey),
2648
2652
  children: [
2649
2653
  /* @__PURE__ */ u("span", { children: r.label }),
2650
2654
  p !== void 0 && /* @__PURE__ */ u("span", { className: h.sortRank, "aria-hidden": "true", children: p }),
2651
- /* @__PURE__ */ u("span", { className: K(h.sortIndicator, d && h.sortActive), "aria-hidden": "true", children: d ? /* @__PURE__ */ u("svg", { viewBox: "0 0 10 10", width: "10", height: "10", "aria-hidden": "true", className: K(h.sortArrow, d === "desc" && h.sortArrowDesc), children: /* @__PURE__ */ u("path", { d: "M2.2 6.2 5 3.4l2.8 2.8", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) }) : (
2655
+ /* @__PURE__ */ u("span", { className: H(h.sortIndicator, d && h.sortActive), "aria-hidden": "true", children: d ? /* @__PURE__ */ u("svg", { viewBox: "0 0 10 10", width: "10", height: "10", "aria-hidden": "true", className: H(h.sortArrow, d === "desc" && h.sortArrowDesc), children: /* @__PURE__ */ u("path", { d: "M2.2 6.2 5 3.4l2.8 2.8", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) }) : (
2652
2656
  /* Drawn in the nominal box and set in the 12 pixels the indicator
2653
2657
  has always taken, so that the head does not move. */
2654
2658
  /* @__PURE__ */ u("svg", { viewBox: "0 0 10 10", width: "10", height: "12", "aria-hidden": "true", children: /* @__PURE__ */ u("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" }) })
2655
2659
  ) })
2656
2660
  ]
2657
2661
  }
2658
- ) : r.label, F = d === "asc" ? "ascending" : d === "desc" ? "descending" : "none", g = Te(r.filter) !== void 0 && !(r.filter === "list" && i === "other");
2662
+ ) : r.label, L = d === "asc" ? "ascending" : d === "desc" ? "descending" : "none", g = Te(r.filter) !== void 0 && !(r.filter === "list" && i === "other");
2659
2663
  return /* @__PURE__ */ R(
2660
2664
  "th",
2661
2665
  {
2662
2666
  scope: "col",
2663
2667
  "data-column": a,
2664
- "aria-sort": c ? F : void 0,
2668
+ "aria-sort": c ? L : void 0,
2665
2669
  tabIndex: r.resizable && !c ? 0 : void 0,
2666
- onKeyDown: w,
2667
- className: K(h.th, l && h.numeric, o.className),
2670
+ onKeyDown: y,
2671
+ className: H(h.th, l && h.numeric, o.className),
2668
2672
  style: {
2669
2673
  ...b !== void 0 ? { width: b } : {},
2670
2674
  ...o.style
@@ -2679,10 +2683,10 @@ function Bt({
2679
2683
  {
2680
2684
  role: "presentation",
2681
2685
  className: h.grip,
2682
- onPointerDown: v,
2683
- onClick: (C) => C.stopPropagation(),
2684
- onDoubleClick: (C) => {
2685
- C.stopPropagation(), O(C.currentTarget.closest("th"));
2686
+ onPointerDown: w,
2687
+ onClick: (k) => k.stopPropagation(),
2688
+ onDoubleClick: (k) => {
2689
+ k.stopPropagation(), O(k.currentTarget.closest("th"));
2686
2690
  }
2687
2691
  }
2688
2692
  )
@@ -2706,55 +2710,55 @@ function ei({
2706
2710
  baseId: p,
2707
2711
  formats: b,
2708
2712
  wording: S,
2709
- line: v,
2713
+ line: w,
2710
2714
  spanEntry: O,
2711
- grid: w
2715
+ grid: y
2712
2716
  }) {
2713
- const _ = He(Sn), F = r.publicSnapshot, g = r.rowKey(e), C = Ys(e, i, r, b, S), A = o.detail, L = A !== null && F.expanded.includes(g), m = `${p}-detail-${t}`, { className: k, ...T } = (d == null ? void 0 : d(e)) ?? {}, y = n !== void 0, M = v ? v.span ?? v.parents.at(-1) : void 0, N = (l ? 1 : 0) + (A ? 1 : 0), I = N + (O ? 1 : 0), P = ($) => St(a, $);
2717
+ const _ = je(Sn), L = r.publicSnapshot, g = r.rowKey(e), k = Ys(e, i, r, b, S), T = o.detail, F = T !== null && L.expanded.includes(g), m = `${p}-detail-${t}`, { className: x, ...A } = (d == null ? void 0 : d(e)) ?? {}, v = n !== void 0, M = w ? w.span ?? w.parents.at(-1) : void 0, N = (l ? 1 : 0) + (T ? 1 : 0), I = N + (O ? 1 : 0), P = ($) => St(a, $);
2714
2718
  return /* @__PURE__ */ R(ne, { children: [
2715
2719
  /* @__PURE__ */ R(
2716
2720
  "tr",
2717
2721
  {
2718
- ...T,
2719
- className: K(k, y && h.virtualRow),
2720
- "data-row": y ? n : void 0,
2721
- "data-line": v ? "row" : void 0,
2722
+ ...A,
2723
+ className: H(x, v && h.virtualRow),
2724
+ "data-row": v ? n : void 0,
2725
+ "data-line": w ? "row" : void 0,
2722
2726
  "data-motion": g,
2723
- "data-selected": l && F.selection.isSelected(g) ? "" : void 0,
2724
- "data-group-first": v != null && v.first ? "" : void 0,
2727
+ "data-selected": l && L.selection.isSelected(g) ? "" : void 0,
2728
+ "data-group-first": w != null && w.first ? "" : void 0,
2725
2729
  "data-group": M == null ? void 0 : M.path,
2726
- "aria-level": v ? v.parents.length + 1 : void 0,
2730
+ "aria-level": w ? w.parents.length + 1 : void 0,
2727
2731
  "aria-posinset": M ? M.rows.indexOf(e) + 1 : void 0,
2728
2732
  "aria-setsize": M == null ? void 0 : M.rows.length,
2729
- tabIndex: y && !w ? n === _ ? 0 : -1 : void 0,
2730
- "data-grid-line": w ? qe(g) : void 0,
2731
- "data-even": y && n % 2 === 1 ? "" : void 0,
2732
- "aria-rowindex": y ? n + 2 : void 0,
2733
+ tabIndex: v && !y ? n === _ ? 0 : -1 : void 0,
2734
+ "data-grid-line": y ? Ue(g) : void 0,
2735
+ "data-even": v && n % 2 === 1 ? "" : void 0,
2736
+ "aria-rowindex": v ? n + 2 : void 0,
2733
2737
  children: [
2734
- l && /* @__PURE__ */ u("td", { className: K(h.td, h.control, P(0).className), style: P(0).style, children: /* @__PURE__ */ u(
2738
+ l && /* @__PURE__ */ u("td", { className: H(h.td, h.control, P(0).className), style: P(0).style, children: /* @__PURE__ */ u(
2735
2739
  Le,
2736
2740
  {
2737
- "aria-label": S.selectRow(C),
2738
- checked: F.selection.isSelected(g),
2739
- onChange: () => F.selection.toggle(g)
2741
+ "aria-label": S.selectRow(k),
2742
+ checked: L.selection.isSelected(g),
2743
+ onChange: () => L.selection.toggle(g)
2740
2744
  }
2741
2745
  ) }),
2742
- A && /* @__PURE__ */ u("td", { className: K(h.td, h.control, P(N - 1).className), style: P(N - 1).style, children: /* @__PURE__ */ u(
2746
+ T && /* @__PURE__ */ u("td", { className: H(h.td, h.control, P(N - 1).className), style: P(N - 1).style, children: /* @__PURE__ */ u(
2743
2747
  "button",
2744
2748
  {
2745
2749
  type: "button",
2746
- "aria-expanded": L,
2747
- "aria-controls": L ? m : void 0,
2748
- "aria-label": L ? S.collapseRowNamed(C) : S.expandRowNamed(C),
2749
- className: K(h.expander, L && h.expanderOpen),
2750
- onClick: () => F.toggleRow(g),
2751
- children: /* @__PURE__ */ u(Dn, {})
2750
+ "aria-expanded": F,
2751
+ "aria-controls": F ? m : void 0,
2752
+ "aria-label": F ? S.collapseRowNamed(k) : S.expandRowNamed(k),
2753
+ className: H(h.expander, F && h.expanderOpen),
2754
+ onClick: () => L.toggleRow(g),
2755
+ children: /* @__PURE__ */ u(Rn, {})
2752
2756
  }
2753
2757
  ) }),
2754
- v && v.span && /* @__PURE__ */ u(
2758
+ w && w.span && /* @__PURE__ */ u(
2755
2759
  Ps,
2756
2760
  {
2757
- line: { ...v, span: v.span },
2761
+ line: { ...w, span: w.span },
2758
2762
  entry: O,
2759
2763
  selectable: l,
2760
2764
  pin: P(N),
@@ -2773,15 +2777,15 @@ function ei({
2773
2777
  formats: b,
2774
2778
  wording: S,
2775
2779
  rowKey: g,
2776
- rowName: C
2780
+ rowName: k
2777
2781
  },
2778
2782
  $.key
2779
2783
  )),
2780
- c.length > 0 && /* @__PURE__ */ u("td", { className: K(h.td, h.actionsCell, P(f - 1).className), style: P(f - 1).style, children: /* @__PURE__ */ u(ri, { actions: c, row: e, name: C, wording: S }) })
2784
+ c.length > 0 && /* @__PURE__ */ u("td", { className: H(h.td, h.actionsCell, P(f - 1).className), style: P(f - 1).style, children: /* @__PURE__ */ u(ri, { actions: c, row: e, name: k, wording: S }) })
2781
2785
  ]
2782
2786
  }
2783
2787
  ),
2784
- L && A && /* @__PURE__ */ u("tr", { id: m, className: h.detailRow, "data-group": M == null ? void 0 : M.path, "data-grid-line": w ? `detail:${g}` : void 0, children: /* @__PURE__ */ u("td", { colSpan: f, className: h.detailCell, children: A.presentation(e) }) })
2788
+ F && T && /* @__PURE__ */ u("tr", { id: m, className: h.detailRow, "data-group": M == null ? void 0 : M.path, "data-grid-line": y ? `detail:${g}` : void 0, children: /* @__PURE__ */ u("td", { colSpan: f, className: h.detailCell, children: T.presentation(e) }) })
2785
2789
  ] });
2786
2790
  }
2787
2791
  function ti({
@@ -2794,15 +2798,15 @@ function ti({
2794
2798
  rowKey: i,
2795
2799
  rowName: l
2796
2800
  }) {
2797
- const { spec: c } = e, a = e.read(t), f = mt(n, c.rightAligned), d = Vs(i, c.id);
2801
+ const { spec: c } = e, a = e.read(t), f = bt(n, c.rightAligned), d = Vs(i, c.id);
2798
2802
  let p;
2799
- Q(a) ? p = /* @__PURE__ */ u(hn, { wording: s }) : c.presentation ? p = c.presentation(a, t) : p = Re(a, c.format, r, s);
2803
+ Q(a) ? p = /* @__PURE__ */ u(gn, { wording: s }) : c.presentation ? p = c.presentation(a, t) : p = Re(a, c.format, r, s);
2800
2804
  const b = c.rowHeader ? "th" : "td";
2801
2805
  return /* @__PURE__ */ u(
2802
2806
  b,
2803
2807
  {
2804
2808
  scope: c.rowHeader ? "row" : void 0,
2805
- className: K(h.td, f && h.numeric, c.rowHeader && h.rowHeader, o.className, d && h.editing),
2809
+ className: H(h.td, f && h.numeric, c.rowHeader && h.rowHeader, o.className, d && h.editing),
2806
2810
  style: o.style,
2807
2811
  children: d ? /* @__PURE__ */ R(ne, { children: [
2808
2812
  /* @__PURE__ */ u(qs, { entry: e, row: t, rowName: l, grid: d }),
@@ -2816,11 +2820,11 @@ function ni({
2816
2820
  rows: t,
2817
2821
  formats: n,
2818
2822
  wording: o,
2819
- pin: r = mn
2823
+ pin: r = bn
2820
2824
  }) {
2821
- if (!e.spec.aggregate) return /* @__PURE__ */ u("td", { className: K(h.td, r.className), style: r.style });
2825
+ if (!e.spec.aggregate) return /* @__PURE__ */ u("td", { className: H(h.td, r.className), style: r.style });
2822
2826
  const s = typeof e.spec.aggregate == "function" ? "own" : e.spec.aggregate;
2823
- return /* @__PURE__ */ u("td", { className: K(h.td, gn(e, t) && h.numeric, r.className), style: r.style, "data-footer": s, children: /* @__PURE__ */ u(ct, { entry: e, rows: t, formats: n, wording: o, signed: !0 }) });
2827
+ return /* @__PURE__ */ u("td", { className: H(h.td, pn(e, t) && h.numeric, r.className), style: r.style, "data-footer": s, children: /* @__PURE__ */ u(ut, { entry: e, rows: t, formats: n, wording: o, signed: !0 }) });
2824
2828
  }
2825
2829
  const oi = 2;
2826
2830
  function ri({
@@ -2844,7 +2848,7 @@ function ri({
2844
2848
  },
2845
2849
  s
2846
2850
  )) }) : /* @__PURE__ */ u("div", { className: h.actions, children: /* @__PURE__ */ u(
2847
- Yt,
2851
+ Jt,
2848
2852
  {
2849
2853
  align: "end",
2850
2854
  trigger: /* @__PURE__ */ u(fe, { size: "sm", variant: "ghost", "aria-label": o.rowActionsMenu(n), children: "⋯" }),
@@ -2854,29 +2858,29 @@ function ri({
2854
2858
  }
2855
2859
  function si({ columns: e, rightAligned: t = [], rows: n = 4 }) {
2856
2860
  const o = [72, 48, 60, 40, 56, 64];
2857
- return /* @__PURE__ */ u(ne, { children: Array.from({ length: n }, (r, s) => /* @__PURE__ */ u("tr", { "aria-hidden": "true", children: Array.from({ length: e }, (i, l) => /* @__PURE__ */ u("td", { className: K(h.td, t[l] && h.numeric), children: /* @__PURE__ */ u("span", { className: h.skeleton, style: { width: `${o[(s + l) % o.length]}%` } }) }, l)) }, s)) });
2861
+ return /* @__PURE__ */ u(ne, { children: Array.from({ length: n }, (r, s) => /* @__PURE__ */ u("tr", { "aria-hidden": "true", children: Array.from({ length: e }, (i, l) => /* @__PURE__ */ u("td", { className: H(h.td, t[l] && h.numeric), children: /* @__PURE__ */ u("span", { className: h.skeleton, style: { width: `${o[(s + l) % o.length]}%` } }) }, l)) }, s)) });
2858
2862
  }
2859
- const Sn = gt(0);
2860
- function Gt({ height: e, colSpan: t }) {
2863
+ const Sn = pt(0);
2864
+ function $t({ height: e, colSpan: t }) {
2861
2865
  return e <= 0 ? null : /* @__PURE__ */ u("tr", { "aria-hidden": "true", "data-filler": "", className: h.fillerRow, children: /* @__PURE__ */ u("td", { colSpan: t, style: { height: e } }) });
2862
2866
  }
2863
- function $t({
2867
+ function Ht({
2864
2868
  virtual: e,
2865
2869
  colSpan: t,
2866
2870
  children: n
2867
2871
  }) {
2868
2872
  const { count: o, fillerBefore: r, fillerAfter: s, showRow: i } = e, l = ce(null), [c, a] = W(0), f = (b, S) => {
2869
2873
  l.current = S, a(S), i(S), requestAnimationFrame(() => {
2870
- var v;
2871
- (v = b.querySelector(`[data-row="${S}"]`)) == null || v.focus();
2874
+ var w;
2875
+ (w = b.querySelector(`[data-row="${S}"]`)) == null || w.focus();
2872
2876
  });
2873
2877
  }, d = c >= e.from && c < e.to ? c : e.from, p = (b) => {
2874
2878
  if (b.defaultPrevented || o === 0) return;
2875
- const S = b.target, v = S.closest("[data-row]");
2876
- if (v && S !== v) return;
2877
- const O = v ? Number(v.dataset.row) : l.current ?? -1;
2878
- let w = null;
2879
- b.key === "ArrowDown" ? w = Math.min(o - 1, O + 1) : b.key === "ArrowUp" ? w = Math.max(0, O - 1) : b.key === "Home" ? w = 0 : b.key === "End" && (w = o - 1), !(w === null || w === O) && (b.preventDefault(), f(b.currentTarget, w));
2879
+ const S = b.target, w = S.closest("[data-row]");
2880
+ if (w && S !== w) return;
2881
+ const O = w ? Number(w.dataset.row) : l.current ?? -1;
2882
+ let y = null;
2883
+ b.key === "ArrowDown" ? y = Math.min(o - 1, O + 1) : b.key === "ArrowUp" ? y = Math.max(0, O - 1) : b.key === "Home" ? y = 0 : b.key === "End" && (y = o - 1), !(y === null || y === O) && (b.preventDefault(), f(b.currentTarget, y));
2880
2884
  };
2881
2885
  return /* @__PURE__ */ u(
2882
2886
  "tbody",
@@ -2888,14 +2892,14 @@ function $t({
2888
2892
  S && a(Number(S.dataset.row));
2889
2893
  },
2890
2894
  children: /* @__PURE__ */ R(Sn.Provider, { value: d, children: [
2891
- /* @__PURE__ */ u(Gt, { height: r, colSpan: t }),
2895
+ /* @__PURE__ */ u($t, { height: r, colSpan: t }),
2892
2896
  n,
2893
- /* @__PURE__ */ u(Gt, { height: s, colSpan: t })
2897
+ /* @__PURE__ */ u($t, { height: s, colSpan: t })
2894
2898
  ] })
2895
2899
  }
2896
2900
  );
2897
2901
  }
2898
- const ii = "_verdict_1mxfd_6", li = "_glyph_1mxfd_13", ai = "_value_1mxfd_23", ci = "_excess_1mxfd_28", $e = {
2902
+ const ii = "_verdict_1mxfd_6", li = "_glyph_1mxfd_13", ai = "_value_1mxfd_23", ci = "_excess_1mxfd_28", He = {
2899
2903
  verdict: ii,
2900
2904
  glyph: li,
2901
2905
  value: ai,
@@ -2908,10 +2912,10 @@ const ii = "_verdict_1mxfd_6", li = "_glyph_1mxfd_13", ai = "_value_1mxfd_23", c
2908
2912
  };
2909
2913
  function fi({ reading: e, format: t }) {
2910
2914
  const n = be(), o = re(), { measured: r, assessment: s } = e, i = ui(s.verdict, o);
2911
- return /* @__PURE__ */ R("span", { className: $e.verdict, "data-verdict": s.verdict, title: i, children: [
2912
- /* @__PURE__ */ u("span", { "aria-hidden": "true", className: $e.glyph, children: di[s.verdict] }),
2913
- /* @__PURE__ */ u("span", { className: $e.value, children: r === null ? o.statAbsentValue : Kt(r, t, n) }),
2914
- s.excess !== void 0 && /* @__PURE__ */ R("span", { className: $e.excess, children: [
2915
+ return /* @__PURE__ */ R("span", { className: He.verdict, "data-verdict": s.verdict, title: i, children: [
2916
+ /* @__PURE__ */ u("span", { "aria-hidden": "true", className: He.glyph, children: di[s.verdict] }),
2917
+ /* @__PURE__ */ u("span", { className: He.value, children: r === null ? o.statAbsentValue : Kt(r, t, n) }),
2918
+ s.excess !== void 0 && /* @__PURE__ */ R("span", { className: He.excess, children: [
2915
2919
  "+",
2916
2920
  Kt(s.excess, t, n)
2917
2921
  ] }),
@@ -2919,22 +2923,22 @@ function fi({ reading: e, format: t }) {
2919
2923
  ] });
2920
2924
  }
2921
2925
  const hi = (e) => e.measured, gi = (e) => e.reduce(
2922
- (t, n) => !t || ot(n.assessment.verdict) > ot(t.assessment.verdict) ? n : t,
2926
+ (t, n) => !t || rt(n.assessment.verdict) > rt(t.assessment.verdict) ? n : t,
2923
2927
  void 0
2924
2928
  );
2925
2929
  function pi(e) {
2926
2930
  return function({ id: n, value: o, label: r, limits: s, format: i, sortBy: l = "verdict", width: c, resizable: a, pin: f, aggregate: d }) {
2927
2931
  const p = JSON.stringify(s), b = q(() => {
2928
- const v = JSON.parse(p);
2932
+ const w = JSON.parse(p);
2929
2933
  return (O) => {
2930
- const w = typeof o == "string" ? O == null ? void 0 : O[o] : o(O);
2934
+ const y = typeof o == "string" ? O == null ? void 0 : O[o] : o(O);
2931
2935
  return {
2932
- measured: typeof w == "number" && Number.isFinite(w) ? w : null,
2933
- assessment: Rn(w, v)
2936
+ measured: typeof y == "number" && Number.isFinite(y) ? y : null,
2937
+ assessment: Pn(y, w)
2934
2938
  };
2935
2939
  };
2936
2940
  }, [o, p]), S = le(
2937
- (v) => l === "value" ? v.measured : ot(v.assessment.verdict),
2941
+ (w) => l === "value" ? w.measured : rt(w.assessment.verdict),
2938
2942
  [l]
2939
2943
  );
2940
2944
  return /* @__PURE__ */ u(
@@ -2950,7 +2954,7 @@ function pi(e) {
2950
2954
  sortValue: S,
2951
2955
  exportValue: hi,
2952
2956
  aggregate: d === "worst" ? gi : void 0,
2953
- children: (v) => /* @__PURE__ */ u(fi, { reading: v, format: i })
2957
+ children: (w) => /* @__PURE__ */ u(fi, { reading: w, format: i })
2954
2958
  }
2955
2959
  );
2956
2960
  };
@@ -2959,10 +2963,10 @@ const Cn = (e) => ae(
2959
2963
  `condition-foreign:${e}`,
2960
2964
  `The condition for "${e}" is not of the kind of its filter and is passed over.`
2961
2965
  );
2962
- function xn(e, t, n) {
2966
+ function Nn(e, t, n) {
2963
2967
  const o = e.columnById(t), r = o ? Te(o.spec.filter) : void 0;
2964
2968
  if (!r) return !1;
2965
- const s = rn(r, n);
2969
+ const s = sn(r, n);
2966
2970
  return s === "foreign" && Cn(t), s === "effective";
2967
2971
  }
2968
2972
  function mi(e, t) {
@@ -2973,7 +2977,7 @@ function mi(e, t) {
2973
2977
  n = t.structureVersion(), o = [];
2974
2978
  for (const [s, i] of e) {
2975
2979
  const l = t.columnById(s);
2976
- l && xn(t, s, i) && o.push({ entry: l, condition: i });
2980
+ l && Nn(t, s, i) && o.push({ entry: l, condition: i });
2977
2981
  }
2978
2982
  }
2979
2983
  return o.every(({ entry: s, condition: i }) => {
@@ -2988,7 +2992,7 @@ function bi(e, t) {
2988
2992
  const s = o.source === e && (o.result === n || o.result.length === n.length && o.result.every((i, l) => i === n[l]));
2989
2993
  return s || r({ source: e, result: n }), s ? o.result : n;
2990
2994
  }
2991
- function vi(e, t) {
2995
+ function wi(e, t) {
2992
2996
  var l, c, a, f, d, p;
2993
2997
  if (t.size === 0) return e;
2994
2998
  const n = (l = e.sort) == null ? void 0 : l.filter((b) => t.has(b.column)), o = (c = e.hidden) == null ? void 0 : c.filter((b) => t.has(b)), r = (a = e.order) == null ? void 0 : a.filter((b) => t.has(b)), s = e.widths ? Object.fromEntries(Object.entries(e.widths).filter(([b]) => t.has(b))) : void 0;
@@ -3002,8 +3006,8 @@ function vi(e, t) {
3002
3006
  ...s && Object.keys(s).length ? { widths: s } : {}
3003
3007
  };
3004
3008
  }
3005
- const et = (e) => e === void 0 ? [] : typeof e == "string" ? [e] : [...e], wi = (e, t) => e.length === t.length && e.every((n, o) => n === t[o]);
3006
- function Ht(e) {
3009
+ const tt = (e) => e === void 0 ? [] : typeof e == "string" ? [e] : [...e], vi = (e, t) => e.length === t.length && e.every((n, o) => n === t[o]);
3010
+ function jt(e) {
3007
3011
  const t = [], n = (o) => {
3008
3012
  for (const r of o)
3009
3013
  t.push(r.path), n(r.groups);
@@ -3016,29 +3020,29 @@ function _i(e, t) {
3016
3020
  for (const o of e) o.width !== void 0 && (n[o.id] = o.width);
3017
3021
  return { ...n, ...t };
3018
3022
  }
3019
- function ki(e, t) {
3023
+ function xi(e, t) {
3020
3024
  var B;
3021
3025
  const [n] = W(() => new is()), [o] = W(() => {
3022
3026
  const z = Js(n);
3023
3027
  return { ...z, VerdictColumn: pi(z.Column) };
3024
3028
  });
3025
- je(n.subscribe, n.structureVersion, n.structureVersion);
3029
+ We(n.subscribe, n.structureVersion, n.structureVersion);
3026
3030
  const r = be(), s = e, i = n.modelColumns(s, r), [l] = W(() => t.initialView), c = t.manual === !0, a = t.manual ? t.rowCount : 0, f = q(() => c ? { rowCount: a } : void 0, [c, a]);
3027
3031
  n.setManual(c), c && ((t.preFilter ?? t.filter) && ae("manual-prefilter", "`preFilter` is passed over in manual mode: the server decides which rows the table has."), t.virtual && ae("manual-virtual", "`virtual` is passed over in manual mode: the table pages instead."), (t.defaultGrouping !== void 0 || (B = l == null ? void 0 : l.grouping) != null && B.length) && ae("manual-grouping", "A grouping is passed over in manual mode: the groups would be the page's, not the server's."));
3028
- const [d, p] = W(() => Object.entries((l == null ? void 0 : l.conditions) ?? {})), b = q(() => mi(d, n), [d, n]), S = t.preFilter ?? t.filter, v = bi(s, c ? void 0 : S), [O, w] = W(
3029
- () => l != null && l.grouping ? [...l.grouping] : et(t.defaultGrouping)
3030
- ), [_, F] = W(() => (l == null ? void 0 : l.folded) ?? []), [g, C] = W(() => l != null && l.pinned ? { ...l.pinned } : null), A = n.orderedColumns().length + n.groupKeys.entries.size > 0, L = c ? [] : A ? n.effectiveGrouping(O, s) : O.slice(0, wt), m = L.join("|"), k = q(() => new Set(_), [_]), T = L.length ? n.groupingModel(L, s) : null, y = q(
3031
- () => T && T.levels.length ? { ...T, folded: k, compareText: r.compareText } : void 0,
3032
+ const [d, p] = W(() => Object.entries((l == null ? void 0 : l.conditions) ?? {})), b = q(() => mi(d, n), [d, n]), S = t.preFilter ?? t.filter, w = bi(s, c ? void 0 : S), [O, y] = W(
3033
+ () => l != null && l.grouping ? [...l.grouping] : tt(t.defaultGrouping)
3034
+ ), [_, L] = W(() => (l == null ? void 0 : l.folded) ?? []), [g, k] = W(() => l != null && l.pinned ? { ...l.pinned } : null), T = n.orderedColumns().length + n.groupKeys.entries.size > 0, F = c ? [] : T ? n.effectiveGrouping(O, s) : O.slice(0, yt), m = F.join("|"), x = q(() => new Set(_), [_]), A = F.length ? n.groupingModel(F, s) : null, v = q(
3035
+ () => A && A.levels.length ? { ...A, folded: x, compareText: r.compareText } : void 0,
3032
3036
  // eslint-disable-next-line react-hooks/exhaustive-deps -- the model's identity carries the ids and the columns
3033
- [T, k, r.compareText, m]
3034
- ), M = t.rowKey, N = Jn(v, i, {
3037
+ [A, x, r.compareText, m]
3038
+ ), M = t.rowKey, N = Jn(w, i, {
3035
3039
  rowKey: M,
3036
3040
  pageSize: t.pageSize,
3037
3041
  defaultSort: t.defaultSort,
3038
3042
  filter: b,
3039
3043
  initialView: l,
3040
3044
  virtual: c ? void 0 : t.virtual,
3041
- grouping: y,
3045
+ grouping: v,
3042
3046
  manual: f
3043
3047
  }), { setPage: I } = N, P = le(
3044
3048
  (z, V) => {
@@ -3052,7 +3056,7 @@ function ki(e, t) {
3052
3056
  );
3053
3057
  return;
3054
3058
  }
3055
- const Ae = rn(pe, V);
3059
+ const Ae = sn(pe, V);
3056
3060
  if (Ae === "foreign") {
3057
3061
  Cn(z);
3058
3062
  return;
@@ -3061,7 +3065,7 @@ function ki(e, t) {
3061
3065
  }
3062
3066
  p((de) => {
3063
3067
  const pe = de.findIndex(([Ae]) => Ae === z);
3064
- return ee ? pe === -1 ? de : de.filter((Ae, Je) => Je !== pe) : pe === -1 ? [...de, [z, V]] : de.map((Ae, Je) => Je === pe ? [z, V] : Ae);
3068
+ return ee ? pe === -1 ? de : de.filter((Ae, Xe) => Xe !== pe) : pe === -1 ? [...de, [z, V]] : de.map((Ae, Xe) => Xe === pe ? [z, V] : Ae);
3065
3069
  }), I(1);
3066
3070
  },
3067
3071
  [n, I]
@@ -3070,27 +3074,27 @@ function ki(e, t) {
3070
3074
  const z = new Set([...U].filter((V) => !$.has(V)));
3071
3075
  Z($), d.some(([V]) => z.has(V)) && p((V) => V.filter(([ee]) => !z.has(ee)));
3072
3076
  }
3073
- const he = $.size === 0 ? d : d.filter(([z, V]) => xn(n, z, V)), se = vi(N.view, $), we = he.length > 0 ? { ...se, conditions: Object.fromEntries(he) } : se, Ce = $.size === 0 ? N.sort : N.sort.filter((z) => $.has(z.column)), Oe = c ? [] : A ? n.effectiveGrouping(et(t.defaultGrouping), s) : et(t.defaultGrouping), xe = N.groups ? Kn(N.groups, _) : A ? [] : [..._], ue = n.declaredPins(), Y = to(g, ue, $), ge = {
3074
- ...we,
3075
- ...wi(L, Oe) ? {} : { grouping: L },
3076
- ...xe.length ? { folded: xe } : {},
3077
+ const he = $.size === 0 ? d : d.filter(([z, V]) => Nn(n, z, V)), se = wi(N.view, $), ve = he.length > 0 ? { ...se, conditions: Object.fromEntries(he) } : se, Se = $.size === 0 ? N.sort : N.sort.filter((z) => $.has(z.column)), Oe = c ? [] : T ? n.effectiveGrouping(tt(t.defaultGrouping), s) : tt(t.defaultGrouping), Ce = N.groups ? Hn(N.groups, _) : T ? [] : [..._], ue = n.declaredPins(), Y = to(g, ue, $), ge = {
3078
+ ...ve,
3079
+ ...vi(F, Oe) ? {} : { grouping: F },
3080
+ ...Ce.length ? { folded: Ce } : {},
3077
3081
  ...Y ? { pinned: Y } : {}
3078
- }, ye = (z, V) => C((ee) => Zn(ee ?? n.declaredPins(), z, V)), Ne = (z) => {
3079
- w([...z]), I(1);
3082
+ }, ye = (z, V) => k((ee) => Zn(ee ?? n.declaredPins(), z, V)), Ne = (z) => {
3083
+ y([...z]), I(1);
3080
3084
  }, _e = (z) => {
3081
- Ht(N.groups).includes(z) && (n.noteFocusBeforeFold(), F((V) => V.includes(z) ? V.filter((ee) => ee !== z) : [...V, z]));
3082
- }, ke = !c && t.virtual !== void 0, J = n.paginates() || ke, D = t.selection ?? N.selection, G = {
3085
+ jt(N.groups).includes(z) && (n.noteFocusBeforeFold(), L((V) => V.includes(z) ? V.filter((ee) => ee !== z) : [...V, z]));
3086
+ }, xe = !c && t.virtual !== void 0, J = n.paginates() || xe, D = t.selection ?? N.selection, G = {
3083
3087
  ...ge,
3084
3088
  search: N.search,
3085
3089
  conditions: Object.fromEntries(he),
3086
- sort: Ce,
3090
+ sort: Se,
3087
3091
  page: N.page,
3088
3092
  pageSize: N.pageSize
3089
- }, H = c ? oo(G) : "", x = ce(null);
3090
- jt(() => {
3093
+ }, K = c ? oo(G) : "", C = ce(null);
3094
+ Wt(() => {
3091
3095
  var z;
3092
- !c || x.current === H || (x.current = H, (z = t.onViewChange) == null || z.call(t, G));
3093
- }, [H]);
3096
+ !c || C.current === K || (C.current = K, (z = t.onViewChange) == null || z.call(t, G));
3097
+ }, [K]);
3094
3098
  const [E] = W(() => /* @__PURE__ */ new Map());
3095
3099
  let ie;
3096
3100
  if (c) {
@@ -3114,7 +3118,7 @@ function ki(e, t) {
3114
3118
  setPageSize: N.setPageSize,
3115
3119
  search: N.search,
3116
3120
  setSearch: N.setSearch,
3117
- sort: Ce,
3121
+ sort: Se,
3118
3122
  toggleSort: N.toggleSort,
3119
3123
  hidden: N.hidden,
3120
3124
  toggleColumn: N.toggleColumn,
@@ -3130,29 +3134,29 @@ function ki(e, t) {
3130
3134
  setFilter: P,
3131
3135
  selection: D,
3132
3136
  view: ge,
3133
- grouping: L,
3137
+ grouping: F,
3134
3138
  setGrouping: Ne,
3135
- folded: xe,
3139
+ folded: Ce,
3136
3140
  toggleFold: _e,
3137
3141
  foldAll: () => {
3138
- n.noteFocusBeforeFold(), F(Ht(N.groups));
3142
+ n.noteFocusBeforeFold(), L(jt(N.groups));
3139
3143
  },
3140
3144
  unfoldAll: () => {
3141
- n.noteFocusBeforeFold(), F([]);
3145
+ n.noteFocusBeforeFold(), L([]);
3142
3146
  },
3143
- asCsv: () => vs(n),
3144
- virtual: ke,
3147
+ asCsv: () => ws(n),
3148
+ virtual: xe,
3145
3149
  rowCount: c ? a : N.filtered.length,
3146
3150
  manual: c
3147
3151
  };
3148
3152
  return n.setHook({
3149
3153
  rows: s,
3150
- admitted: v,
3154
+ admitted: w,
3151
3155
  modelColumns: i,
3152
3156
  companion: N,
3153
3157
  filter: b,
3154
- grouping: y,
3155
- folded: k,
3158
+ grouping: v,
3159
+ folded: x,
3156
3160
  publicSnapshot: oe,
3157
3161
  rowKey: M,
3158
3162
  formats: r,
@@ -3164,7 +3168,7 @@ function ki(e, t) {
3164
3168
  function fl(e) {
3165
3169
  return e;
3166
3170
  }
3167
- function xt(e, t) {
3171
+ function Nt(e, t) {
3168
3172
  const n = me();
3169
3173
  e == null || e.register(t, n), X(() => {
3170
3174
  if (e)
@@ -3174,17 +3178,17 @@ function xt(e, t) {
3174
3178
  }, [e, t, n]);
3175
3179
  }
3176
3180
  function hl({ children: e, className: t, of: n }) {
3177
- const o = Be(n);
3178
- xt(o == null ? void 0 : o.registry, "toolbar");
3181
+ const o = Ge(n);
3182
+ Nt(o == null ? void 0 : o.registry, "toolbar");
3179
3183
  const r = o == null ? void 0 : o.registry;
3180
- return /* @__PURE__ */ u(fn, { registry: r ?? null, className: t, children: e });
3184
+ return /* @__PURE__ */ u(hn, { registry: r ?? null, className: t, children: e });
3181
3185
  }
3182
3186
  function gl({ placeholder: e, "aria-label": t, className: n, of: o }) {
3183
- const r = Be(o), s = re();
3184
- if (xt(r == null ? void 0 : r.registry, "search"), !r) return null;
3187
+ const r = Ge(o), s = re();
3188
+ if (Nt(r == null ? void 0 : r.registry, "search"), !r) return null;
3185
3189
  const { snapshot: i } = r;
3186
3190
  return /* @__PURE__ */ u(
3187
- Xt,
3191
+ Qt,
3188
3192
  {
3189
3193
  size: "sm",
3190
3194
  type: "search",
@@ -3199,35 +3203,35 @@ function gl({ placeholder: e, "aria-label": t, className: n, of: o }) {
3199
3203
  );
3200
3204
  }
3201
3205
  function pl({ of: e }) {
3202
- const t = Be(e), n = re(), [o, r] = W(!1), s = ce(null), i = ce(null), l = me(), [c, a] = W(null);
3206
+ const t = Ge(e), n = re(), [o, r] = W(!1), s = ce(null), i = ce(null), l = me(), [c, a] = W(null);
3203
3207
  if (X(() => {
3204
- var C;
3208
+ var k;
3205
3209
  if (!c || !i.current) return;
3206
3210
  const _ = Array.from(i.current.children).find(
3207
- (A) => A.dataset.column === c.id
3208
- ), F = _ == null ? void 0 : _.querySelector(c.key), g = c.otherwise ? _ == null ? void 0 : _.querySelector(c.otherwise) : void 0;
3209
- (C = F && !F.disabled ? F : g) == null || C.focus();
3211
+ (T) => T.dataset.column === c.id
3212
+ ), L = _ == null ? void 0 : _.querySelector(c.key), g = c.otherwise ? _ == null ? void 0 : _.querySelector(c.otherwise) : void 0;
3213
+ (k = L && !L.disabled ? L : g) == null || k.focus();
3210
3214
  }, [c]), !t) return null;
3211
- const { registry: f, snapshot: d } = t, p = f.hook, b = f.inPinOrder(_t(f.modelColumns(p.rows, p.formats), d.order)), S = f.pins(), v = (_, F) => {
3212
- const g = b[_ + F];
3215
+ const { registry: f, snapshot: d } = t, p = f.hook, b = f.inPinOrder(xt(f.modelColumns(p.rows, p.formats), d.order)), S = f.pins(), w = (_, L) => {
3216
+ const g = b[_ + L];
3213
3217
  return g !== void 0 && S[g.id] === S[b[_].id];
3214
- }, O = (_, F) => {
3215
- const g = b.map((m) => m.id), C = _ + F;
3216
- if (!v(_, F)) return;
3217
- [g[_], g[C]] = [g[C], g[_]], d.setOrder(g);
3218
- const [A, L] = F < 0 ? ["forward", "backward"] : ["backward", "forward"];
3219
- a({ id: b[_].id, key: `[data-direction="${A}"]`, otherwise: `[data-direction="${L}"]` });
3220
- }, w = (_, F, g) => {
3221
- const C = S[_] === g;
3222
- return /* @__PURE__ */ u(
3218
+ }, O = (_, L) => {
3219
+ const g = b.map((m) => m.id), k = _ + L;
3220
+ if (!w(_, L)) return;
3221
+ [g[_], g[k]] = [g[k], g[_]], d.setOrder(g);
3222
+ const [T, F] = L < 0 ? ["forward", "backward"] : ["backward", "forward"];
3223
+ a({ id: b[_].id, key: `[data-direction="${T}"]`, otherwise: `[data-direction="${F}"]` });
3224
+ }, y = (_, L, g) => {
3225
+ const k = S[_] === g;
3226
+ return /* @__PURE__ */ u(Ie, { content: k ? n.unpinHint : g === "start" ? n.pinToStartHint : n.pinToEndHint, children: /* @__PURE__ */ u(
3223
3227
  "button",
3224
3228
  {
3225
3229
  type: "button",
3226
- className: K(h.move, C && h.pinOn),
3230
+ className: H(h.move, k && h.pinOn),
3227
3231
  "data-pin": g,
3228
- "aria-label": C ? n.unpinColumn(F) : g === "start" ? n.pinColumnToStart(F) : n.pinColumnToEnd(F),
3232
+ "aria-label": k ? n.unpinColumn(L) : g === "start" ? n.pinColumnToStart(L) : n.pinColumnToEnd(L),
3229
3233
  onClick: () => {
3230
- d.setPin(_, C ? null : g), a({ id: _, key: `[data-pin="${g}"]` });
3234
+ d.setPin(_, k ? null : g), a({ id: _, key: `[data-pin="${g}"]` });
3231
3235
  },
3232
3236
  children: /* @__PURE__ */ u("svg", { viewBox: "0 0 10 10", width: "10", height: "10", "aria-hidden": "true", children: /* @__PURE__ */ u(
3233
3237
  "path",
@@ -3241,7 +3245,7 @@ function pl({ of: e }) {
3241
3245
  }
3242
3246
  ) })
3243
3247
  }
3244
- );
3248
+ ) });
3245
3249
  };
3246
3250
  return /* @__PURE__ */ R(ne, { children: [
3247
3251
  /* @__PURE__ */ u(
@@ -3257,18 +3261,18 @@ function pl({ of: e }) {
3257
3261
  }
3258
3262
  ),
3259
3263
  /* @__PURE__ */ R(
3260
- pt,
3264
+ mt,
3261
3265
  {
3262
3266
  open: o,
3263
3267
  onOpenChange: r,
3264
3268
  anchorRef: s,
3265
- align: "end",
3269
+ align: "start",
3266
3270
  role: "dialog",
3267
3271
  ariaLabel: n.arrangeColumns,
3268
3272
  id: l,
3269
3273
  className: h.columnsPanel,
3270
3274
  children: [
3271
- /* @__PURE__ */ u("ul", { ref: i, className: h.columnsList, "aria-label": n.arrangeColumns, children: b.map((_, F) => {
3275
+ /* @__PURE__ */ u("ul", { ref: i, className: h.columnsList, "aria-label": n.arrangeColumns, children: b.map((_, L) => {
3272
3276
  const g = _.label ?? _.id;
3273
3277
  return /* @__PURE__ */ R("li", { className: h.columnsEntry, "data-column": _.id, children: [
3274
3278
  /* @__PURE__ */ u(
@@ -3280,32 +3284,32 @@ function pl({ of: e }) {
3280
3284
  onChange: () => d.toggleColumn(_.id)
3281
3285
  }
3282
3286
  ),
3283
- /* @__PURE__ */ u(
3287
+ /* @__PURE__ */ u(Ie, { content: n.columnForwardHint, children: /* @__PURE__ */ u(
3284
3288
  "button",
3285
3289
  {
3286
3290
  type: "button",
3287
3291
  className: h.move,
3288
3292
  "data-direction": "forward",
3289
3293
  "aria-label": n.columnForward(g),
3290
- disabled: !v(F, -1),
3291
- onClick: () => O(F, -1),
3294
+ disabled: !w(L, -1),
3295
+ onClick: () => O(L, -1),
3292
3296
  children: /* @__PURE__ */ u("svg", { viewBox: "0 0 10 10", width: "10", height: "10", "aria-hidden": "true", children: /* @__PURE__ */ u("path", { d: "M2 6.5 5 3.5l3 3", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) })
3293
3297
  }
3294
- ),
3295
- /* @__PURE__ */ u(
3298
+ ) }),
3299
+ /* @__PURE__ */ u(Ie, { content: n.columnBackwardHint, children: /* @__PURE__ */ u(
3296
3300
  "button",
3297
3301
  {
3298
3302
  type: "button",
3299
3303
  className: h.move,
3300
3304
  "data-direction": "backward",
3301
3305
  "aria-label": n.columnBackward(g),
3302
- disabled: !v(F, 1),
3303
- onClick: () => O(F, 1),
3306
+ disabled: !w(L, 1),
3307
+ onClick: () => O(L, 1),
3304
3308
  children: /* @__PURE__ */ u("svg", { viewBox: "0 0 10 10", width: "10", height: "10", "aria-hidden": "true", children: /* @__PURE__ */ u("path", { d: "M2 3.5 5 6.5l3-3", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) })
3305
3309
  }
3306
- ),
3307
- w(_.id, g, "start"),
3308
- w(_.id, g, "end")
3310
+ ) }),
3311
+ y(_.id, g, "start"),
3312
+ y(_.id, g, "end")
3309
3313
  ] }, _.id);
3310
3314
  }) }),
3311
3315
  /* @__PURE__ */ u(ys, { registry: f, hook: p })
@@ -3315,7 +3319,7 @@ function pl({ of: e }) {
3315
3319
  ] });
3316
3320
  }
3317
3321
  function ml({ filename: e, onExport: t, of: n }) {
3318
- const o = Be(n), r = re();
3322
+ const o = Ge(n), r = re();
3319
3323
  if (!o) return null;
3320
3324
  const { snapshot: s } = o;
3321
3325
  return /* @__PURE__ */ u(fe, { size: "sm", onClick: () => {
@@ -3329,15 +3333,15 @@ function ml({ filename: e, onExport: t, of: n }) {
3329
3333
  }, children: s.manual ? r.exportPageLabel : r.exportLabel });
3330
3334
  }
3331
3335
  function bl({ pageSizes: e = [10, 25, 50], className: t, of: n }) {
3332
- const o = Be(n), r = re(), s = be();
3333
- if (xt(o == null ? void 0 : o.registry, "pagination"), !o || o.snapshot.virtual) return null;
3334
- const { snapshot: i } = o, l = i.rowCount, c = e.includes(i.pageSize) ? e : [...e, i.pageSize].sort((f, d) => f - d), a = /* @__PURE__ */ R("nav", { "aria-label": r.pagination, className: K(h.pagination, t), children: [
3336
+ const o = Ge(n), r = re(), s = be();
3337
+ if (Nt(o == null ? void 0 : o.registry, "pagination"), !o || o.snapshot.virtual) return null;
3338
+ const { snapshot: i } = o, l = i.rowCount, c = e.includes(i.pageSize) ? e : [...e, i.pageSize].sort((f, d) => f - d), a = /* @__PURE__ */ R("nav", { "aria-label": r.pagination, className: H(h.pagination, t), children: [
3335
3339
  /* @__PURE__ */ u("span", { children: r.entries(l, s.count(l)) }),
3336
3340
  /* @__PURE__ */ R("div", { className: h.paginationControls, children: [
3337
3341
  /* @__PURE__ */ R("label", { className: h.pageSize, children: [
3338
3342
  r.rows,
3339
3343
  /* @__PURE__ */ u(
3340
- Jt,
3344
+ Xt,
3341
3345
  {
3342
3346
  selectSize: "sm",
3343
3347
  value: i.pageSize,
@@ -3357,15 +3361,15 @@ function bl({ pageSizes: e = [10, 25, 50], className: t, of: n }) {
3357
3361
  ] });
3358
3362
  return o.inside ? o.footerTarget ? In(a, o.footerTarget) : null : a;
3359
3363
  }
3360
- const Si = ["high", "medium", "low"], Ci = (e) => Si.indexOf(e), xi = (e) => e === "active-unacknowledged" || e === "active-acknowledged", Ye = (e) => e === "active-acknowledged" || e === "resolved-acknowledged", Ni = (e) => e === "resolved-acknowledged";
3364
+ const ki = ["high", "medium", "low"], Si = (e) => ki.indexOf(e), Ci = (e) => e === "active-unacknowledged" || e === "active-acknowledged", Je = (e) => e === "active-acknowledged" || e === "resolved-acknowledged", Ni = (e) => e === "resolved-acknowledged";
3361
3365
  function Ai(e, t) {
3362
3366
  switch (t) {
3363
3367
  case "raised":
3364
3368
  return "active-unacknowledged";
3365
3369
  case "acknowledged":
3366
- return xi(e) ? "active-acknowledged" : "resolved-acknowledged";
3370
+ return Ci(e) ? "active-acknowledged" : "resolved-acknowledged";
3367
3371
  case "resolved":
3368
- return Ye(e) ? "resolved-acknowledged" : "resolved-unacknowledged";
3372
+ return Je(e) ? "resolved-acknowledged" : "resolved-unacknowledged";
3369
3373
  }
3370
3374
  }
3371
3375
  const Ti = [
@@ -3373,14 +3377,14 @@ const Ti = [
3373
3377
  "snoozed",
3374
3378
  "suppressed",
3375
3379
  "disabled"
3376
- ], ht = (e) => e !== "in-service";
3380
+ ], gt = (e) => e !== "in-service";
3377
3381
  function Oi(e, t) {
3378
3382
  return e.availability === "snoozed" ? t >= e.snooze.until ? "in-service" : "snoozed" : e.availability ?? "in-service";
3379
3383
  }
3380
- function vl(e, t, n) {
3384
+ function wl(e, t, n) {
3381
3385
  return e.availability === "disabled" || e.availability === "suppressed" ? e : { ...e, availability: "snoozed", snooze: { until: t, by: n } };
3382
3386
  }
3383
- function wl(e) {
3387
+ function vl(e) {
3384
3388
  return e.availability !== "snoozed" ? e : { ...e, availability: "in-service", snooze: void 0 };
3385
3389
  }
3386
3390
  function yl(e) {
@@ -3389,11 +3393,11 @@ function yl(e) {
3389
3393
  function _l(e) {
3390
3394
  return e.availability !== "disabled" ? e : { ...e, availability: "in-service" };
3391
3395
  }
3392
- const kl = (e, t) => e.direction === "upper" ? t <= e.returnTo : t >= e.returnTo, Nt = (e, t, n) => e > n - t && e <= n, Sl = (e, t, n) => e.reduce((o, r) => o + (Nt(r, t, n) ? 1 : 0), 0);
3396
+ const xl = (e, t) => e.direction === "upper" ? t <= e.returnTo : t >= e.returnTo, At = (e, t, n) => e > n - t && e <= n, kl = (e, t, n) => e.reduce((o, r) => o + (At(r, t, n) ? 1 : 0), 0);
3393
3397
  function Mi(e, t, n) {
3394
3398
  const o = /* @__PURE__ */ new Map();
3395
3399
  for (const r of e)
3396
- Nt(r.raised, t, n) && o.set(r.type, (o.get(r.type) ?? 0) + 1);
3400
+ At(r.raised, t, n) && o.set(r.type, (o.get(r.type) ?? 0) + 1);
3397
3401
  return o;
3398
3402
  }
3399
3403
  function Fi(e) {
@@ -3407,7 +3411,7 @@ function Li(e) {
3407
3411
  return t;
3408
3412
  }
3409
3413
  function Di(e, t, n) {
3410
- const o = e.filter((s) => Nt(s.raised, t.windowMs, n));
3414
+ const o = e.filter((s) => At(s.raised, t.windowMs, n));
3411
3415
  if (o.length < t.atLeast) return null;
3412
3416
  const r = o.map((s) => s.raised);
3413
3417
  return {
@@ -3422,14 +3426,14 @@ function Di(e, t, n) {
3422
3426
  function Ri(e, t) {
3423
3427
  const n = new Set(t);
3424
3428
  return e.reduce(
3425
- (o, r) => o + (n.has(r.id) && !Ye(r.lifecycle) ? 1 : 0),
3429
+ (o, r) => o + (n.has(r.id) && !Je(r.lifecycle) ? 1 : 0),
3426
3430
  0
3427
3431
  );
3428
3432
  }
3429
- function Cl(e, t, n) {
3433
+ function Sl(e, t, n) {
3430
3434
  const o = new Set(t);
3431
3435
  let r = 0;
3432
- return { alarms: e.map((i) => !o.has(i.id) || Ye(i.lifecycle) ? i : (r += 1, { ...i, lifecycle: Ai(i.lifecycle, "acknowledged"), acknowledgedAt: n })), count: r };
3436
+ return { alarms: e.map((i) => !o.has(i.id) || Je(i.lifecycle) ? i : (r += 1, { ...i, lifecycle: Ai(i.lifecycle, "acknowledged"), acknowledgedAt: n })), count: r };
3433
3437
  }
3434
3438
  const Pi = (e) => [
3435
3439
  {
@@ -3448,11 +3452,11 @@ const Pi = (e) => [
3448
3452
  level of the order asks only about the acknowledgement and expressly not
3449
3453
  about whether the alarm is still active. Otherwise the fleeting alarm
3450
3454
  falls back down again. */
3451
- { id: "acknowledgement", label: e.columnAcknowledgement, value: (t) => Ye(t.lifecycle) ? 1 : 0 },
3455
+ { id: "acknowledgement", label: e.columnAcknowledgement, value: (t) => Je(t.lifecycle) ? 1 : 0 },
3452
3456
  { id: "raised", label: e.columnRaised, value: (t) => t.alarm.raised },
3453
3457
  { id: "age", label: e.columnAge, value: (t) => t.age },
3454
3458
  { id: "frequency", label: e.columnFrequency, value: (t) => t.frequency }
3455
- ], Ei = Pi(Pn), zi = [
3459
+ ], Ei = Pi(En), zi = [
3456
3460
  { column: "availability", direction: "asc" },
3457
3461
  { column: "priority", direction: "asc" },
3458
3462
  { column: "acknowledgement", direction: "asc" },
@@ -3462,7 +3466,7 @@ const Pi = (e) => [
3462
3466
  label: e,
3463
3467
  priority: "high"
3464
3468
  });
3465
- function xl(e, t = {}) {
3469
+ function Cl(e, t = {}) {
3466
3470
  const {
3467
3471
  alarms: n,
3468
3472
  types: o,
@@ -3471,21 +3475,21 @@ function xl(e, t = {}) {
3471
3475
  flood: i,
3472
3476
  keepDone: l = !1,
3473
3477
  columns: c = Ei
3474
- } = e, a = new Map(o.map((v) => [v.id, v])), f = Mi(n, (s == null ? void 0 : s.windowMs) ?? 1 / 0, r), d = i ? Di(n, i, r) : null, p = new Set((d == null ? void 0 : d.alarms) ?? []), b = n.filter((v) => l || !Ni(v.lifecycle)).map((v) => {
3475
- const O = a.get(v.type) ?? Ii(v.type), w = f.get(v.type) ?? 0;
3478
+ } = e, a = new Map(o.map((w) => [w.id, w])), f = Mi(n, (s == null ? void 0 : s.windowMs) ?? 1 / 0, r), d = i ? Di(n, i, r) : null, p = new Set((d == null ? void 0 : d.alarms) ?? []), b = n.filter((w) => l || !Ni(w.lifecycle)).map((w) => {
3479
+ const O = a.get(w.type) ?? Ii(w.type), y = f.get(w.type) ?? 0;
3476
3480
  return {
3477
- id: v.id,
3478
- alarm: v,
3481
+ id: w.id,
3482
+ alarm: w,
3479
3483
  type: O,
3480
- lifecycle: v.lifecycle,
3481
- availability: Oi(v, r),
3484
+ lifecycle: w.lifecycle,
3485
+ availability: Oi(w, r),
3482
3486
  priority: O.priority,
3483
- rank: Ci(O.priority),
3484
- age: r - v.raised,
3485
- duration: (v.resolved ?? r) - v.raised,
3486
- frequency: w,
3487
- chatters: s !== void 0 && w >= s.atLeast,
3488
- inFlood: p.has(v.id)
3487
+ rank: Si(O.priority),
3488
+ age: r - w.raised,
3489
+ duration: (w.resolved ?? r) - w.raised,
3490
+ frequency: y,
3491
+ chatters: s !== void 0 && y >= s.atLeast,
3492
+ inFlood: p.has(w.id)
3489
3493
  };
3490
3494
  }), S = kt(b, c, {
3491
3495
  ...t,
@@ -3495,22 +3499,22 @@ function xl(e, t = {}) {
3495
3499
  ...S,
3496
3500
  flood: d,
3497
3501
  activeUnacknowledged: S.filtered.reduce(
3498
- (v, O) => v + (O.lifecycle === "active-unacknowledged" && !ht(O.availability) ? 1 : 0),
3502
+ (w, O) => w + (O.lifecycle === "active-unacknowledged" && !gt(O.availability) ? 1 : 0),
3499
3503
  0
3500
3504
  ),
3501
3505
  hiddenAlarms: S.filtered.reduce(
3502
- (v, O) => v + (ht(O.availability) ? 1 : 0),
3506
+ (w, O) => w + (gt(O.availability) ? 1 : 0),
3503
3507
  0
3504
3508
  )
3505
3509
  };
3506
3510
  }
3507
- const Vi = "_list_fm5vz_4 _text_k1tvc_23", Bi = "_bar_fm5vz_12", Gi = "_heading_fm5vz_19", $i = "_filler_fm5vz_25", Ki = "_asOf_fm5vz_29", Hi = "_live_fm5vz_46", ji = "_label_fm5vz_51", Wi = "_counter_fm5vz_55", qi = "_state_fm5vz_61", Ui = "_lifecycle_fm5vz_65", Yi = "_hidden_fm5vz_71", Ji = "_hiddenLabel_fm5vz_78", Xi = "_availability_fm5vz_84", Qi = "_empty_fm5vz_88", Zi = "_row_fm5vz_96", te = {
3511
+ const Vi = "_list_fm5vz_4 _text_k1tvc_23", Bi = "_bar_fm5vz_12", Gi = "_heading_fm5vz_19", $i = "_filler_fm5vz_25", Hi = "_asOf_fm5vz_29", Ki = "_live_fm5vz_46", ji = "_label_fm5vz_51", Wi = "_counter_fm5vz_55", qi = "_state_fm5vz_61", Ui = "_lifecycle_fm5vz_65", Yi = "_hidden_fm5vz_71", Ji = "_hiddenLabel_fm5vz_78", Xi = "_availability_fm5vz_84", Qi = "_empty_fm5vz_88", Zi = "_row_fm5vz_96", te = {
3508
3512
  list: Vi,
3509
3513
  bar: Bi,
3510
3514
  heading: Gi,
3511
3515
  filler: $i,
3512
- asOf: Ki,
3513
- live: Hi,
3516
+ asOf: Hi,
3517
+ live: Ki,
3514
3518
  label: ji,
3515
3519
  counter: Wi,
3516
3520
  state: qi,
@@ -3561,7 +3565,7 @@ function rl(e, t) {
3561
3565
  }
3562
3566
  function Nl(e) {
3563
3567
  const { asOf: t, freshness: n, ...o } = e;
3564
- return t === void 0 || n === void 0 ? /* @__PURE__ */ u(Nn, { ...o, freshness: null }) : /* @__PURE__ */ u(sl, { ...o, asOf: t, ages: n });
3568
+ return t === void 0 || n === void 0 ? /* @__PURE__ */ u(An, { ...o, freshness: null }) : /* @__PURE__ */ u(sl, { ...o, asOf: t, ages: n });
3565
3569
  }
3566
3570
  function sl({
3567
3571
  asOf: e,
@@ -3569,9 +3573,9 @@ function sl({
3569
3573
  ...n
3570
3574
  }) {
3571
3575
  const o = zn(e, t);
3572
- return /* @__PURE__ */ u(Nn, { ...n, freshness: o });
3576
+ return /* @__PURE__ */ u(An, { ...n, freshness: o });
3573
3577
  }
3574
- function Nn({
3578
+ function An({
3575
3579
  view: e,
3576
3580
  selection: t,
3577
3581
  onAcknowledge: n,
@@ -3582,7 +3586,7 @@ function Nn({
3582
3586
  onHiddenOnlyChange: l,
3583
3587
  ...c
3584
3588
  }) {
3585
- const a = re(), f = be(), d = s !== null, p = (s == null ? void 0 : s.freshness) === "lost", { Table: b, Column: S } = ki(e.visible, { rowKey: (g) => g.id, selection: t }), v = q(() => e.filtered.map((g) => g.alarm), [e.filtered]), O = q(() => t === void 0 ? [] : e.filtered.map((g) => g.id).filter((g) => t.selected.has(g)), [e.filtered, t]), w = q(() => Ri(v, O), [v, O]), _ = Qt(o, "compact"), F = a.hiddenAlarms(e.hiddenAlarms);
3589
+ const a = re(), f = be(), d = s !== null, p = (s == null ? void 0 : s.freshness) === "lost", { Table: b, Column: S } = xi(e.visible, { rowKey: (g) => g.id, selection: t }), w = q(() => e.filtered.map((g) => g.alarm), [e.filtered]), O = q(() => t === void 0 ? [] : e.filtered.map((g) => g.id).filter((g) => t.selected.has(g)), [e.filtered, t]), y = q(() => Ri(w, O), [w, O]), _ = Zt(o, "compact"), L = a.hiddenAlarms(e.hiddenAlarms);
3586
3590
  return /* @__PURE__ */ R("div", { className: [te.list, r].filter(Boolean).join(" "), ...c, children: [
3587
3591
  /* @__PURE__ */ R("div", { className: te.bar, children: [
3588
3592
  /* @__PURE__ */ u("span", { className: te.heading, children: a.alarms }),
@@ -3597,11 +3601,11 @@ function Nn({
3597
3601
  className: te.hidden,
3598
3602
  checked: i,
3599
3603
  onChange: (g) => l(g.currentTarget.checked),
3600
- label: /* @__PURE__ */ u("span", { className: te.hiddenLabel, children: F })
3604
+ label: /* @__PURE__ */ u("span", { className: te.hiddenLabel, children: L })
3601
3605
  }
3602
- ) : e.hiddenAlarms > 0 && /* @__PURE__ */ u("span", { className: te.hidden, children: F }),
3606
+ ) : e.hiddenAlarms > 0 && /* @__PURE__ */ u("span", { className: te.hidden, children: L }),
3603
3607
  /* @__PURE__ */ u("span", { className: te.filler }),
3604
- t !== void 0 && n !== void 0 && /* @__PURE__ */ u(fe, { variant: "primary", size: "sm", disabled: w === 0, onClick: () => n(O), children: w === 0 ? a.acknowledgeAlarm : a.acknowledgeAlarms(w) })
3608
+ t !== void 0 && n !== void 0 && /* @__PURE__ */ u(fe, { variant: "primary", size: "sm", disabled: y === 0, onClick: () => n(O), children: y === 0 ? a.acknowledgeAlarm : a.acknowledgeAlarms(y) })
3605
3609
  ] }),
3606
3610
  /* @__PURE__ */ u("div", { "aria-live": "polite", "aria-atomic": "true", className: te.live, children: a.activeUnacknowledged(e.activeUnacknowledged) }),
3607
3611
  /* @__PURE__ */ R(
@@ -3619,21 +3623,21 @@ function Nn({
3619
3623
  }),
3620
3624
  empty: /* @__PURE__ */ u("span", { className: te.empty, children: p ? a.noAlarmsDisconnected : a.noAlarms }),
3621
3625
  children: [
3622
- /* @__PURE__ */ u(S, { id: "type", label: a.columnAlarm, value: (g) => g.type.label, rowHeader: !0, sortable: !1, children: (g, C) => /* @__PURE__ */ R(ne, { children: [
3626
+ /* @__PURE__ */ u(S, { id: "type", label: a.columnAlarm, value: (g) => g.type.label, rowHeader: !0, sortable: !1, children: (g, k) => /* @__PURE__ */ R(ne, { children: [
3623
3627
  /* @__PURE__ */ u("span", { className: te.label, children: g }),
3624
- C.chatters && /* @__PURE__ */ u(Pe, { tone: "warning", pill: !0, className: te.counter, children: a.chatterHint(C.frequency) })
3628
+ k.chatters && /* @__PURE__ */ u(Pe, { tone: "warning", pill: !0, className: te.counter, children: a.chatterHint(k.frequency) })
3625
3629
  ] }) }),
3626
- /* @__PURE__ */ u(S, { value: "lifecycle", label: a.columnLifecycleState, sortable: !1, children: (g, C) => {
3627
- const A = tl(C, a, f), L = A === null ? null : A.short === A.full ? /* @__PURE__ */ u(Pe, { className: te.availability, children: A.short }) : /* @__PURE__ */ u(En, { content: A.full, children: /* @__PURE__ */ R(Pe, { className: te.availability, children: [
3628
- /* @__PURE__ */ u("span", { "aria-hidden": "true", children: A.short }),
3629
- /* @__PURE__ */ u(De, { children: A.full })
3630
+ /* @__PURE__ */ u(S, { value: "lifecycle", label: a.columnLifecycleState, sortable: !1, children: (g, k) => {
3631
+ const T = tl(k, a, f), F = T === null ? null : T.short === T.full ? /* @__PURE__ */ u(Pe, { className: te.availability, children: T.short }) : /* @__PURE__ */ u(Ie, { content: T.full, children: /* @__PURE__ */ R(Pe, { className: te.availability, children: [
3632
+ /* @__PURE__ */ u("span", { "aria-hidden": "true", children: T.short }),
3633
+ /* @__PURE__ */ u(De, { children: T.full })
3630
3634
  ] }) });
3631
3635
  return /* @__PURE__ */ R("span", { className: te.state, children: [
3632
- L,
3636
+ F,
3633
3637
  /* @__PURE__ */ u("span", { className: te.lifecycle, children: el(g, a) })
3634
3638
  ] });
3635
3639
  } }),
3636
- /* @__PURE__ */ u(S, { value: "priority", label: a.columnPriority, sortable: !1, children: (g, C) => /* @__PURE__ */ u(Pe, { tone: ht(C.availability) ? "neutral" : ol(g), children: nl(g, a) }) }),
3640
+ /* @__PURE__ */ u(S, { value: "priority", label: a.columnPriority, sortable: !1, children: (g, k) => /* @__PURE__ */ u(Pe, { tone: gt(k.availability) ? "neutral" : ol(g), children: nl(g, a) }) }),
3637
3641
  /* @__PURE__ */ u(
3638
3642
  S,
3639
3643
  {
@@ -3658,31 +3662,31 @@ export {
3658
3662
  pl as ColumnMenu,
3659
3663
  zi as DEFAULT_ORDER,
3660
3664
  ml as Export,
3661
- Si as PRIORITIES,
3665
+ ki as PRIORITIES,
3662
3666
  bl as Pagination,
3663
3667
  gl as Search,
3664
3668
  hl as Toolbar,
3665
- Cl as acknowledge,
3669
+ Sl as acknowledge,
3666
3670
  Pi as alarmColumns,
3667
- xl as alarmModel,
3671
+ Cl as alarmModel,
3668
3672
  Oi as availabilityAt,
3669
3673
  fl as column,
3670
3674
  dl as columnFilter,
3671
3675
  Ri as countAcknowledgeable,
3672
- Sl as countInWindow,
3676
+ kl as countInWindow,
3673
3677
  Di as detectFlood,
3674
3678
  yl as disable,
3675
3679
  _l as enable,
3676
3680
  Mi as frequencyByType,
3677
- kl as hasReturned,
3678
- Ye as isAcknowledged,
3679
- xi as isActive,
3681
+ xl as hasReturned,
3682
+ Je as isAcknowledged,
3683
+ Ci as isActive,
3680
3684
  Ni as isDone,
3681
- ht as isHidden,
3685
+ gt as isHidden,
3682
3686
  Ai as nextLifecycleState,
3683
- Ci as priorityRank,
3684
- vl as snooze,
3685
- wl as unsnooze,
3686
- ki as useTable,
3687
+ Si as priorityRank,
3688
+ wl as snooze,
3689
+ vl as unsnooze,
3690
+ xi as useTable,
3687
3691
  Vn as useTableSelection
3688
3692
  };