@zhanxp/station-ui 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,262 @@
1
- import { jsx as f, jsxs as _, Fragment as Ze } from "react/jsx-runtime";
1
+ import { jsxs as F, jsx as h, Fragment as tt } from "react/jsx-runtime";
2
+ import { Transition as L, Dialog as K, Listbox as D } from "@headlessui/react";
2
3
  import * as B from "react";
3
- import { useState as q, useRef as yt, useCallback as W, useMemo as se, Fragment as L, forwardRef as et, useEffect as be } from "react";
4
- import { flushSync as _t, createPortal as tt } from "react-dom";
5
- import { Transition as G, Dialog as U, Listbox as D } from "@headlessui/react";
6
- import { Close as nt, Down as ke, Check as Te, Info as Ft, Attention as it, CloseOne as Mt, CheckOne as $t } from "@icon-park/react";
4
+ import { Fragment as G, useState as X, useRef as Mt, useCallback as J, useMemo as le, useEffect as pe } from "react";
5
+ import { Close as nt, Down as Be, Check as je, Info as $t, Attention as rt, CloseOne as It, CheckOne as Et } from "@icon-park/react";
6
+ import { flushSync as bt, createPortal as it } from "react-dom";
7
+ function ot(e) {
8
+ var r, t, n = "";
9
+ if (typeof e == "string" || typeof e == "number") n += e;
10
+ else if (typeof e == "object") if (Array.isArray(e)) {
11
+ var i = e.length;
12
+ for (r = 0; r < i; r++) e[r] && (t = ot(e[r])) && (n && (n += " "), n += t);
13
+ } else for (t in e) e[t] && (n && (n += " "), n += t);
14
+ return n;
15
+ }
16
+ function Vt() {
17
+ for (var e, r, t = 0, n = "", i = arguments.length; t < i; t++) (e = arguments[t]) && (r = ot(e)) && (n && (n += " "), n += r);
18
+ return n;
19
+ }
20
+ function V(...e) {
21
+ return Vt(e);
22
+ }
23
+ const Pt = {
24
+ default: "#d2d6de",
25
+ // primary 使用 CSS 变量,响应运行时主题切换
26
+ primary: "var(--theme-primary)",
27
+ info: "#00c0ef",
28
+ danger: "#dd4b39",
29
+ warning: "#f39c12",
30
+ success: "#00a65a",
31
+ simple: "transparent"
32
+ };
33
+ function Jn({
34
+ theme: e = "default",
35
+ title: r,
36
+ showClose: t = !1,
37
+ noPadding: n = !1,
38
+ fixtop: i,
39
+ bodyStyle: o = {},
40
+ tabs: s = [],
41
+ header: l,
42
+ tools: a,
43
+ breadcrumb: u,
44
+ footer: f,
45
+ children: m,
46
+ onClose: c,
47
+ onTabClick: d,
48
+ className: g = ""
49
+ }) {
50
+ const p = r || l || a || t, v = { ...o };
51
+ if (i && i > 0) {
52
+ const S = typeof window < "u" ? window.innerHeight : 800;
53
+ v.height = `${S - i}px`, v.overflow = "auto";
54
+ }
55
+ return (
56
+ // borderTop 颜色依赖运行时 theme prop,无法静态化为 Tailwind 类,保留内联 style
57
+ /* @__PURE__ */ F(
58
+ "div",
59
+ {
60
+ className: V("rounded-sm bg-white mb-2.5 shadow-sm", g),
61
+ style: { borderTop: `3px solid ${Pt[e]}` },
62
+ children: [
63
+ p && /* @__PURE__ */ F("div", { className: "border-b border-[#f4f4f4] text-[#444] relative", children: [
64
+ r && /* @__PURE__ */ h(
65
+ "h3",
66
+ {
67
+ className: "text-lg m-0 py-2.5 pl-[15px] pr-0 leading-none font-semibold",
68
+ dangerouslySetInnerHTML: { __html: r }
69
+ }
70
+ ),
71
+ s.map((S, w) => /* @__PURE__ */ h(
72
+ "h3",
73
+ {
74
+ className: V(
75
+ "cursor-pointer px-3 py-2.5 m-0 text-sm font-normal inline-block",
76
+ S.active ? "border-b-2 border-primary" : "border-b-0"
77
+ ),
78
+ onClick: () => d == null ? void 0 : d(S),
79
+ dangerouslySetInnerHTML: { __html: S.title }
80
+ },
81
+ w
82
+ )),
83
+ l,
84
+ (a || t) && /* @__PURE__ */ F("div", { className: "absolute right-2.5 top-0 flex items-center", children: [
85
+ a,
86
+ t && /* @__PURE__ */ h(
87
+ "button",
88
+ {
89
+ onClick: c,
90
+ className: "p-1 mr-1 text-sm bg-transparent border-none text-[#97a0b3] cursor-pointer",
91
+ children: "✕"
92
+ }
93
+ )
94
+ ] })
95
+ ] }),
96
+ /* @__PURE__ */ h(
97
+ "div",
98
+ {
99
+ className: V(!n && "p-4"),
100
+ style: v,
101
+ children: m
102
+ }
103
+ ),
104
+ f && /* @__PURE__ */ h("div", { className: "border-t border-[#f4f4f4] bg-white p-2 rounded-b-sm", children: f })
105
+ ]
106
+ }
107
+ )
108
+ );
109
+ }
110
+ function Qn({
111
+ actions: e,
112
+ search: r,
113
+ footer: t,
114
+ children: n,
115
+ className: i = "",
116
+ noPadding: o = !1
117
+ }) {
118
+ return /* @__PURE__ */ F("div", { className: V("em-grid", i), children: [
119
+ (e || r) && /* @__PURE__ */ F("div", { className: "flex items-center justify-between px-3 py-2 bg-gray-50 border-b border-gray-200 relative", children: [
120
+ e && /* @__PURE__ */ h("div", { className: "flex items-center gap-1", children: e }),
121
+ r && /* @__PURE__ */ h("div", { className: "flex items-center gap-1", children: r })
122
+ ] }),
123
+ /* @__PURE__ */ h("div", { className: V(o ? "" : "p-3"), children: n }),
124
+ t && /* @__PURE__ */ h("div", { className: "px-3 py-2 text-center border-t border-gray-200 bg-gray-50 text-sm text-gray-500", children: t })
125
+ ] });
126
+ }
127
+ const zt = {
128
+ sm: "max-w-sm",
129
+ md: "max-w-md",
130
+ lg: "max-w-lg",
131
+ xl: "max-w-xl"
132
+ };
133
+ function Yn({
134
+ open: e,
135
+ onClose: r,
136
+ title: t,
137
+ children: n,
138
+ footer: i,
139
+ maskClosable: o = !0,
140
+ size: s = "md",
141
+ className: l = ""
142
+ }) {
143
+ return /* @__PURE__ */ h(L, { appear: !0, show: e, as: G, children: /* @__PURE__ */ F(K, { as: "div", className: "relative z-[9990]", onClose: o ? r : () => {
144
+ }, children: [
145
+ /* @__PURE__ */ h(
146
+ L.Child,
147
+ {
148
+ as: G,
149
+ enter: "ease-out duration-200",
150
+ enterFrom: "opacity-0",
151
+ enterTo: "opacity-100",
152
+ leave: "ease-in duration-150",
153
+ leaveFrom: "opacity-100",
154
+ leaveTo: "opacity-0",
155
+ children: /* @__PURE__ */ h("div", { className: "fixed inset-0 bg-black/50" })
156
+ }
157
+ ),
158
+ /* @__PURE__ */ h("div", { className: "fixed inset-0 overflow-y-auto", children: /* @__PURE__ */ h("div", { className: "flex min-h-full items-center justify-center p-4", children: /* @__PURE__ */ h(
159
+ L.Child,
160
+ {
161
+ as: G,
162
+ enter: "ease-out duration-200",
163
+ enterFrom: "opacity-0 scale-95",
164
+ enterTo: "opacity-100 scale-100",
165
+ leave: "ease-in duration-150",
166
+ leaveFrom: "opacity-100 scale-100",
167
+ leaveTo: "opacity-0 scale-95",
168
+ children: /* @__PURE__ */ F(
169
+ K.Panel,
170
+ {
171
+ className: `w-full ${zt[s]} transform overflow-hidden rounded-lg bg-white shadow-xl transition-all ${l}`,
172
+ children: [
173
+ t && /* @__PURE__ */ F("div", { className: "flex items-center justify-between px-6 py-4 border-b border-gray-200", children: [
174
+ /* @__PURE__ */ h(K.Title, { as: "h3", className: "text-lg font-semibold text-gray-900", children: t }),
175
+ /* @__PURE__ */ h(
176
+ "button",
177
+ {
178
+ onClick: r,
179
+ className: "p-1 rounded hover:bg-gray-100 text-gray-400 hover:text-gray-600",
180
+ children: /* @__PURE__ */ h(nt, { size: 20 })
181
+ }
182
+ )
183
+ ] }),
184
+ /* @__PURE__ */ h("div", { className: "px-6 py-4", children: n }),
185
+ i && /* @__PURE__ */ h("div", { className: "px-6 py-4 bg-gray-50 border-t border-gray-200 flex justify-end gap-3", children: i })
186
+ ]
187
+ }
188
+ )
189
+ }
190
+ ) }) })
191
+ ] }) });
192
+ }
193
+ const Ot = {
194
+ sm: "max-w-sm",
195
+ md: "max-w-md",
196
+ lg: "max-w-2xl",
197
+ xl: "max-w-4xl",
198
+ full: "max-w-full"
199
+ };
200
+ function Zn({
201
+ open: e,
202
+ onClose: r,
203
+ title: t,
204
+ children: n,
205
+ footer: i,
206
+ size: o = "md",
207
+ maskClosable: s = !0,
208
+ className: l = ""
209
+ }) {
210
+ return /* @__PURE__ */ h(L, { appear: !0, show: e, as: G, children: /* @__PURE__ */ F(K, { as: "div", className: "relative z-[9990]", onClose: s ? r : () => {
211
+ }, children: [
212
+ /* @__PURE__ */ h(
213
+ L.Child,
214
+ {
215
+ as: G,
216
+ enter: "ease-out duration-300",
217
+ enterFrom: "opacity-0",
218
+ enterTo: "opacity-100",
219
+ leave: "ease-in duration-200",
220
+ leaveFrom: "opacity-100",
221
+ leaveTo: "opacity-0",
222
+ children: /* @__PURE__ */ h("div", { className: "fixed inset-0 bg-black/50" })
223
+ }
224
+ ),
225
+ /* @__PURE__ */ h("div", { className: "fixed inset-0 overflow-hidden", children: /* @__PURE__ */ h("div", { className: "absolute inset-0 overflow-hidden", children: /* @__PURE__ */ h("div", { className: "pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10", children: /* @__PURE__ */ h(
226
+ L.Child,
227
+ {
228
+ as: G,
229
+ enter: "transform transition ease-out duration-300",
230
+ enterFrom: "translate-x-full",
231
+ enterTo: "translate-x-0",
232
+ leave: "transform transition ease-in duration-200",
233
+ leaveFrom: "translate-x-0",
234
+ leaveTo: "translate-x-full",
235
+ children: /* @__PURE__ */ h(
236
+ K.Panel,
237
+ {
238
+ className: `pointer-events-auto w-screen ${Ot[o]} ${l}`,
239
+ children: /* @__PURE__ */ F("div", { className: "flex h-full flex-col bg-white shadow-xl", children: [
240
+ t && /* @__PURE__ */ F("div", { className: "flex items-center justify-between px-6 py-4 border-b border-gray-200", children: [
241
+ /* @__PURE__ */ h(K.Title, { as: "h3", className: "text-lg font-semibold text-gray-900", children: t }),
242
+ /* @__PURE__ */ h(
243
+ "button",
244
+ {
245
+ onClick: r,
246
+ className: "p-1 rounded hover:bg-gray-100 text-gray-400 hover:text-gray-600",
247
+ children: /* @__PURE__ */ h(nt, { size: 20 })
248
+ }
249
+ )
250
+ ] }),
251
+ /* @__PURE__ */ h("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: n }),
252
+ i && /* @__PURE__ */ h("div", { className: "px-6 py-4 bg-gray-50 border-t border-gray-200 flex justify-center gap-3", children: i })
253
+ ] })
254
+ }
255
+ )
256
+ }
257
+ ) }) }) })
258
+ ] }) });
259
+ }
7
260
  /**
8
261
  * table-core
9
262
  *
@@ -14,78 +267,78 @@ import { Close as nt, Down as ke, Check as Te, Info as Ft, Attention as it, Clos
14
267
  *
15
268
  * @license MIT
16
269
  */
17
- function H(e, i) {
18
- return typeof e == "function" ? e(i) : e;
270
+ function H(e, r) {
271
+ return typeof e == "function" ? e(r) : e;
19
272
  }
20
- function b(e, i) {
273
+ function P(e, r) {
21
274
  return (t) => {
22
- i.setState((n) => ({
275
+ r.setState((n) => ({
23
276
  ...n,
24
277
  [e]: H(t, n[e])
25
278
  }));
26
279
  };
27
280
  }
28
- function pe(e) {
281
+ function me(e) {
29
282
  return e instanceof Function;
30
283
  }
31
- function It(e) {
32
- return Array.isArray(e) && e.every((i) => typeof i == "number");
284
+ function Nt(e) {
285
+ return Array.isArray(e) && e.every((r) => typeof r == "number");
33
286
  }
34
- function Et(e, i) {
35
- const t = [], n = (o) => {
36
- o.forEach((r) => {
37
- t.push(r);
38
- const s = i(r);
287
+ function At(e, r) {
288
+ const t = [], n = (i) => {
289
+ i.forEach((o) => {
290
+ t.push(o);
291
+ const s = r(o);
39
292
  s != null && s.length && n(s);
40
293
  });
41
294
  };
42
295
  return n(e), t;
43
296
  }
44
- function C(e, i, t) {
45
- let n = [], o;
46
- return (r) => {
297
+ function C(e, r, t) {
298
+ let n = [], i;
299
+ return (o) => {
47
300
  let s;
48
301
  t.key && t.debug && (s = Date.now());
49
- const l = e(r);
50
- if (!(l.length !== n.length || l.some((g, m) => n[m] !== g)))
51
- return o;
302
+ const l = e(o);
303
+ if (!(l.length !== n.length || l.some((f, m) => n[m] !== f)))
304
+ return i;
52
305
  n = l;
53
306
  let u;
54
- if (t.key && t.debug && (u = Date.now()), o = i(...l), t == null || t.onChange == null || t.onChange(o), t.key && t.debug && t != null && t.debug()) {
55
- const g = Math.round((Date.now() - s) * 100) / 100, m = Math.round((Date.now() - u) * 100) / 100, c = m / 16, d = (p, h) => {
56
- for (p = String(p); p.length < h; )
57
- p = " " + p;
58
- return p;
307
+ if (t.key && t.debug && (u = Date.now()), i = r(...l), t == null || t.onChange == null || t.onChange(i), t.key && t.debug && t != null && t.debug()) {
308
+ const f = Math.round((Date.now() - s) * 100) / 100, m = Math.round((Date.now() - u) * 100) / 100, c = m / 16, d = (g, p) => {
309
+ for (g = String(g); g.length < p; )
310
+ g = " " + g;
311
+ return g;
59
312
  };
60
- console.info(`%c⏱ ${d(m, 5)} /${d(g, 5)} ms`, `
313
+ console.info(`%c⏱ ${d(m, 5)} /${d(f, 5)} ms`, `
61
314
  font-size: .6rem;
62
315
  font-weight: bold;
63
316
  color: hsl(${Math.max(0, Math.min(120 - 120 * c, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
64
317
  }
65
- return o;
318
+ return i;
66
319
  };
67
320
  }
68
- function x(e, i, t, n) {
321
+ function x(e, r, t, n) {
69
322
  return {
70
323
  debug: () => {
71
- var o;
72
- return (o = e == null ? void 0 : e.debugAll) != null ? o : e[i];
324
+ var i;
325
+ return (i = e == null ? void 0 : e.debugAll) != null ? i : e[r];
73
326
  },
74
327
  key: process.env.NODE_ENV === "development" && t,
75
328
  onChange: n
76
329
  };
77
330
  }
78
- function bt(e, i, t, n) {
79
- const o = () => {
331
+ function Dt(e, r, t, n) {
332
+ const i = () => {
80
333
  var s;
81
- return (s = r.getValue()) != null ? s : e.options.renderFallbackValue;
82
- }, r = {
83
- id: `${i.id}_${t.id}`,
84
- row: i,
334
+ return (s = o.getValue()) != null ? s : e.options.renderFallbackValue;
335
+ }, o = {
336
+ id: `${r.id}_${t.id}`,
337
+ row: r,
85
338
  column: t,
86
- getValue: () => i.getValue(n),
87
- renderValue: o,
88
- getContext: C(() => [e, t, i, r], (s, l, a, u) => ({
339
+ getValue: () => r.getValue(n),
340
+ renderValue: i,
341
+ getContext: C(() => [e, t, r, o], (s, l, a, u) => ({
89
342
  table: s,
90
343
  column: l,
91
344
  row: a,
@@ -95,28 +348,28 @@ function bt(e, i, t, n) {
95
348
  }), x(e.options, "debugCells", "cell.getContext"))
96
349
  };
97
350
  return e._features.forEach((s) => {
98
- s.createCell == null || s.createCell(r, t, i, e);
99
- }, {}), r;
351
+ s.createCell == null || s.createCell(o, t, r, e);
352
+ }, {}), o;
100
353
  }
101
- function Vt(e, i, t, n) {
102
- var o, r;
354
+ function Ht(e, r, t, n) {
355
+ var i, o;
103
356
  const l = {
104
357
  ...e._getDefaultColumnDef(),
105
- ...i
358
+ ...r
106
359
  }, a = l.accessorKey;
107
- let u = (o = (r = l.id) != null ? r : a ? typeof String.prototype.replaceAll == "function" ? a.replaceAll(".", "_") : a.replace(/\./g, "_") : void 0) != null ? o : typeof l.header == "string" ? l.header : void 0, g;
108
- if (l.accessorFn ? g = l.accessorFn : a && (a.includes(".") ? g = (c) => {
360
+ let u = (i = (o = l.id) != null ? o : a ? typeof String.prototype.replaceAll == "function" ? a.replaceAll(".", "_") : a.replace(/\./g, "_") : void 0) != null ? i : typeof l.header == "string" ? l.header : void 0, f;
361
+ if (l.accessorFn ? f = l.accessorFn : a && (a.includes(".") ? f = (c) => {
109
362
  let d = c;
110
- for (const h of a.split(".")) {
111
- var p;
112
- d = (p = d) == null ? void 0 : p[h], process.env.NODE_ENV !== "production" && d === void 0 && console.warn(`"${h}" in deeply nested key "${a}" returned undefined.`);
363
+ for (const p of a.split(".")) {
364
+ var g;
365
+ d = (g = d) == null ? void 0 : g[p], process.env.NODE_ENV !== "production" && d === void 0 && console.warn(`"${p}" in deeply nested key "${a}" returned undefined.`);
113
366
  }
114
367
  return d;
115
- } : g = (c) => c[l.accessorKey]), !u)
368
+ } : f = (c) => c[l.accessorKey]), !u)
116
369
  throw process.env.NODE_ENV !== "production" ? new Error(l.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
117
370
  let m = {
118
371
  id: `${String(u)}`,
119
- accessorFn: g,
372
+ accessorFn: f,
120
373
  parent: n,
121
374
  depth: t,
122
375
  columnDef: l,
@@ -128,8 +381,8 @@ function Vt(e, i, t, n) {
128
381
  getLeafColumns: C(() => [e._getOrderColumnsFn()], (c) => {
129
382
  var d;
130
383
  if ((d = m.columns) != null && d.length) {
131
- let p = m.columns.flatMap((h) => h.getLeafColumns());
132
- return c(p);
384
+ let g = m.columns.flatMap((p) => p.getLeafColumns());
385
+ return c(g);
133
386
  }
134
387
  return [m];
135
388
  }, x(e.options, "debugColumns", "column.getLeafColumns"))
@@ -138,12 +391,12 @@ function Vt(e, i, t, n) {
138
391
  c.createColumn == null || c.createColumn(m, e);
139
392
  return m;
140
393
  }
141
- const E = "debugHeaders";
142
- function Be(e, i, t) {
394
+ const b = "debugHeaders";
395
+ function qe(e, r, t) {
143
396
  var n;
144
- let r = {
145
- id: (n = t.id) != null ? n : i.id,
146
- column: i,
397
+ let o = {
398
+ id: (n = t.id) != null ? n : r.id,
399
+ column: r,
147
400
  index: t.index,
148
401
  isPlaceholder: !!t.isPlaceholder,
149
402
  placeholderId: t.placeholderId,
@@ -156,109 +409,109 @@ function Be(e, i, t) {
156
409
  const s = [], l = (a) => {
157
410
  a.subHeaders && a.subHeaders.length && a.subHeaders.map(l), s.push(a);
158
411
  };
159
- return l(r), s;
412
+ return l(o), s;
160
413
  },
161
414
  getContext: () => ({
162
415
  table: e,
163
- header: r,
164
- column: i
416
+ header: o,
417
+ column: r
165
418
  })
166
419
  };
167
420
  return e._features.forEach((s) => {
168
- s.createHeader == null || s.createHeader(r, e);
169
- }), r;
421
+ s.createHeader == null || s.createHeader(o, e);
422
+ }), o;
170
423
  }
171
- const Pt = {
424
+ const Lt = {
172
425
  createTable: (e) => {
173
- e.getHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (i, t, n, o) => {
174
- var r, s;
175
- const l = (r = n == null ? void 0 : n.map((m) => t.find((c) => c.id === m)).filter(Boolean)) != null ? r : [], a = (s = o == null ? void 0 : o.map((m) => t.find((c) => c.id === m)).filter(Boolean)) != null ? s : [], u = t.filter((m) => !(n != null && n.includes(m.id)) && !(o != null && o.includes(m.id)));
176
- return le(i, [...l, ...u, ...a], e);
177
- }, x(e.options, E, "getHeaderGroups")), e.getCenterHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (i, t, n, o) => (t = t.filter((r) => !(n != null && n.includes(r.id)) && !(o != null && o.includes(r.id))), le(i, t, e, "center")), x(e.options, E, "getCenterHeaderGroups")), e.getLeftHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (i, t, n) => {
178
- var o;
179
- const r = (o = n == null ? void 0 : n.map((s) => t.find((l) => l.id === s)).filter(Boolean)) != null ? o : [];
180
- return le(i, r, e, "left");
181
- }, x(e.options, E, "getLeftHeaderGroups")), e.getRightHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (i, t, n) => {
182
- var o;
183
- const r = (o = n == null ? void 0 : n.map((s) => t.find((l) => l.id === s)).filter(Boolean)) != null ? o : [];
184
- return le(i, r, e, "right");
185
- }, x(e.options, E, "getRightHeaderGroups")), e.getFooterGroups = C(() => [e.getHeaderGroups()], (i) => [...i].reverse(), x(e.options, E, "getFooterGroups")), e.getLeftFooterGroups = C(() => [e.getLeftHeaderGroups()], (i) => [...i].reverse(), x(e.options, E, "getLeftFooterGroups")), e.getCenterFooterGroups = C(() => [e.getCenterHeaderGroups()], (i) => [...i].reverse(), x(e.options, E, "getCenterFooterGroups")), e.getRightFooterGroups = C(() => [e.getRightHeaderGroups()], (i) => [...i].reverse(), x(e.options, E, "getRightFooterGroups")), e.getFlatHeaders = C(() => [e.getHeaderGroups()], (i) => i.map((t) => t.headers).flat(), x(e.options, E, "getFlatHeaders")), e.getLeftFlatHeaders = C(() => [e.getLeftHeaderGroups()], (i) => i.map((t) => t.headers).flat(), x(e.options, E, "getLeftFlatHeaders")), e.getCenterFlatHeaders = C(() => [e.getCenterHeaderGroups()], (i) => i.map((t) => t.headers).flat(), x(e.options, E, "getCenterFlatHeaders")), e.getRightFlatHeaders = C(() => [e.getRightHeaderGroups()], (i) => i.map((t) => t.headers).flat(), x(e.options, E, "getRightFlatHeaders")), e.getCenterLeafHeaders = C(() => [e.getCenterFlatHeaders()], (i) => i.filter((t) => {
426
+ e.getHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (r, t, n, i) => {
427
+ var o, s;
428
+ const l = (o = n == null ? void 0 : n.map((m) => t.find((c) => c.id === m)).filter(Boolean)) != null ? o : [], a = (s = i == null ? void 0 : i.map((m) => t.find((c) => c.id === m)).filter(Boolean)) != null ? s : [], u = t.filter((m) => !(n != null && n.includes(m.id)) && !(i != null && i.includes(m.id)));
429
+ return ae(r, [...l, ...u, ...a], e);
430
+ }, x(e.options, b, "getHeaderGroups")), e.getCenterHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (r, t, n, i) => (t = t.filter((o) => !(n != null && n.includes(o.id)) && !(i != null && i.includes(o.id))), ae(r, t, e, "center")), x(e.options, b, "getCenterHeaderGroups")), e.getLeftHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (r, t, n) => {
431
+ var i;
432
+ const o = (i = n == null ? void 0 : n.map((s) => t.find((l) => l.id === s)).filter(Boolean)) != null ? i : [];
433
+ return ae(r, o, e, "left");
434
+ }, x(e.options, b, "getLeftHeaderGroups")), e.getRightHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (r, t, n) => {
435
+ var i;
436
+ const o = (i = n == null ? void 0 : n.map((s) => t.find((l) => l.id === s)).filter(Boolean)) != null ? i : [];
437
+ return ae(r, o, e, "right");
438
+ }, x(e.options, b, "getRightHeaderGroups")), e.getFooterGroups = C(() => [e.getHeaderGroups()], (r) => [...r].reverse(), x(e.options, b, "getFooterGroups")), e.getLeftFooterGroups = C(() => [e.getLeftHeaderGroups()], (r) => [...r].reverse(), x(e.options, b, "getLeftFooterGroups")), e.getCenterFooterGroups = C(() => [e.getCenterHeaderGroups()], (r) => [...r].reverse(), x(e.options, b, "getCenterFooterGroups")), e.getRightFooterGroups = C(() => [e.getRightHeaderGroups()], (r) => [...r].reverse(), x(e.options, b, "getRightFooterGroups")), e.getFlatHeaders = C(() => [e.getHeaderGroups()], (r) => r.map((t) => t.headers).flat(), x(e.options, b, "getFlatHeaders")), e.getLeftFlatHeaders = C(() => [e.getLeftHeaderGroups()], (r) => r.map((t) => t.headers).flat(), x(e.options, b, "getLeftFlatHeaders")), e.getCenterFlatHeaders = C(() => [e.getCenterHeaderGroups()], (r) => r.map((t) => t.headers).flat(), x(e.options, b, "getCenterFlatHeaders")), e.getRightFlatHeaders = C(() => [e.getRightHeaderGroups()], (r) => r.map((t) => t.headers).flat(), x(e.options, b, "getRightFlatHeaders")), e.getCenterLeafHeaders = C(() => [e.getCenterFlatHeaders()], (r) => r.filter((t) => {
186
439
  var n;
187
440
  return !((n = t.subHeaders) != null && n.length);
188
- }), x(e.options, E, "getCenterLeafHeaders")), e.getLeftLeafHeaders = C(() => [e.getLeftFlatHeaders()], (i) => i.filter((t) => {
441
+ }), x(e.options, b, "getCenterLeafHeaders")), e.getLeftLeafHeaders = C(() => [e.getLeftFlatHeaders()], (r) => r.filter((t) => {
189
442
  var n;
190
443
  return !((n = t.subHeaders) != null && n.length);
191
- }), x(e.options, E, "getLeftLeafHeaders")), e.getRightLeafHeaders = C(() => [e.getRightFlatHeaders()], (i) => i.filter((t) => {
444
+ }), x(e.options, b, "getLeftLeafHeaders")), e.getRightLeafHeaders = C(() => [e.getRightFlatHeaders()], (r) => r.filter((t) => {
192
445
  var n;
193
446
  return !((n = t.subHeaders) != null && n.length);
194
- }), x(e.options, E, "getRightLeafHeaders")), e.getLeafHeaders = C(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (i, t, n) => {
195
- var o, r, s, l, a, u;
196
- return [...(o = (r = i[0]) == null ? void 0 : r.headers) != null ? o : [], ...(s = (l = t[0]) == null ? void 0 : l.headers) != null ? s : [], ...(a = (u = n[0]) == null ? void 0 : u.headers) != null ? a : []].map((g) => g.getLeafHeaders()).flat();
197
- }, x(e.options, E, "getLeafHeaders"));
447
+ }), x(e.options, b, "getRightLeafHeaders")), e.getLeafHeaders = C(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (r, t, n) => {
448
+ var i, o, s, l, a, u;
449
+ return [...(i = (o = r[0]) == null ? void 0 : o.headers) != null ? i : [], ...(s = (l = t[0]) == null ? void 0 : l.headers) != null ? s : [], ...(a = (u = n[0]) == null ? void 0 : u.headers) != null ? a : []].map((f) => f.getLeafHeaders()).flat();
450
+ }, x(e.options, b, "getLeafHeaders"));
198
451
  }
199
452
  };
200
- function le(e, i, t, n) {
201
- var o, r;
453
+ function ae(e, r, t, n) {
454
+ var i, o;
202
455
  let s = 0;
203
456
  const l = function(c, d) {
204
- d === void 0 && (d = 1), s = Math.max(s, d), c.filter((p) => p.getIsVisible()).forEach((p) => {
205
- var h;
206
- (h = p.columns) != null && h.length && l(p.columns, d + 1);
457
+ d === void 0 && (d = 1), s = Math.max(s, d), c.filter((g) => g.getIsVisible()).forEach((g) => {
458
+ var p;
459
+ (p = g.columns) != null && p.length && l(g.columns, d + 1);
207
460
  }, 0);
208
461
  };
209
462
  l(e);
210
463
  let a = [];
211
464
  const u = (c, d) => {
212
- const p = {
465
+ const g = {
213
466
  depth: d,
214
467
  id: [n, `${d}`].filter(Boolean).join("_"),
215
468
  headers: []
216
- }, h = [];
217
- c.forEach((w) => {
218
- const S = [...h].reverse()[0], v = w.column.depth === p.depth;
219
- let F, $ = !1;
220
- if (v && w.column.parent ? F = w.column.parent : (F = w.column, $ = !0), S && (S == null ? void 0 : S.column) === F)
221
- S.subHeaders.push(w);
469
+ }, p = [];
470
+ c.forEach((v) => {
471
+ const S = [...p].reverse()[0], w = v.column.depth === g.depth;
472
+ let _, $ = !1;
473
+ if (w && v.column.parent ? _ = v.column.parent : (_ = v.column, $ = !0), S && (S == null ? void 0 : S.column) === _)
474
+ S.subHeaders.push(v);
222
475
  else {
223
- const I = Be(t, F, {
224
- id: [n, d, F.id, w == null ? void 0 : w.id].filter(Boolean).join("_"),
476
+ const E = qe(t, _, {
477
+ id: [n, d, _.id, v == null ? void 0 : v.id].filter(Boolean).join("_"),
225
478
  isPlaceholder: $,
226
- placeholderId: $ ? `${h.filter((P) => P.column === F).length}` : void 0,
479
+ placeholderId: $ ? `${p.filter((O) => O.column === _).length}` : void 0,
227
480
  depth: d,
228
- index: h.length
481
+ index: p.length
229
482
  });
230
- I.subHeaders.push(w), h.push(I);
483
+ E.subHeaders.push(v), p.push(E);
231
484
  }
232
- p.headers.push(w), w.headerGroup = p;
233
- }), a.push(p), d > 0 && u(h, d - 1);
234
- }, g = i.map((c, d) => Be(t, c, {
485
+ g.headers.push(v), v.headerGroup = g;
486
+ }), a.push(g), d > 0 && u(p, d - 1);
487
+ }, f = r.map((c, d) => qe(t, c, {
235
488
  depth: s,
236
489
  index: d
237
490
  }));
238
- u(g, s - 1), a.reverse();
239
- const m = (c) => c.filter((p) => p.column.getIsVisible()).map((p) => {
240
- let h = 0, w = 0, S = [0];
241
- p.subHeaders && p.subHeaders.length ? (S = [], m(p.subHeaders).forEach((F) => {
491
+ u(f, s - 1), a.reverse();
492
+ const m = (c) => c.filter((g) => g.column.getIsVisible()).map((g) => {
493
+ let p = 0, v = 0, S = [0];
494
+ g.subHeaders && g.subHeaders.length ? (S = [], m(g.subHeaders).forEach((_) => {
242
495
  let {
243
496
  colSpan: $,
244
- rowSpan: I
245
- } = F;
246
- h += $, S.push(I);
247
- })) : h = 1;
248
- const v = Math.min(...S);
249
- return w = w + v, p.colSpan = h, p.rowSpan = w, {
250
- colSpan: h,
251
- rowSpan: w
497
+ rowSpan: E
498
+ } = _;
499
+ p += $, S.push(E);
500
+ })) : p = 1;
501
+ const w = Math.min(...S);
502
+ return v = v + w, g.colSpan = p, g.rowSpan = v, {
503
+ colSpan: p,
504
+ rowSpan: v
252
505
  };
253
506
  });
254
- return m((o = (r = a[0]) == null ? void 0 : r.headers) != null ? o : []), a;
507
+ return m((i = (o = a[0]) == null ? void 0 : o.headers) != null ? i : []), a;
255
508
  }
256
- const zt = (e, i, t, n, o, r, s) => {
509
+ const Gt = (e, r, t, n, i, o, s) => {
257
510
  let l = {
258
- id: i,
511
+ id: r,
259
512
  index: n,
260
513
  original: t,
261
- depth: o,
514
+ depth: i,
262
515
  parentId: s,
263
516
  _valuesCache: {},
264
517
  _uniqueValuesCache: {},
@@ -281,96 +534,96 @@ const zt = (e, i, t, n, o, r, s) => {
281
534
  return (u = l.getValue(a)) != null ? u : e.options.renderFallbackValue;
282
535
  },
283
536
  subRows: [],
284
- getLeafRows: () => Et(l.subRows, (a) => a.subRows),
537
+ getLeafRows: () => At(l.subRows, (a) => a.subRows),
285
538
  getParentRow: () => l.parentId ? e.getRow(l.parentId, !0) : void 0,
286
539
  getParentRows: () => {
287
540
  let a = [], u = l;
288
541
  for (; ; ) {
289
- const g = u.getParentRow();
290
- if (!g) break;
291
- a.push(g), u = g;
542
+ const f = u.getParentRow();
543
+ if (!f) break;
544
+ a.push(f), u = f;
292
545
  }
293
546
  return a.reverse();
294
547
  },
295
- getAllCells: C(() => [e.getAllLeafColumns()], (a) => a.map((u) => bt(e, l, u, u.id)), x(e.options, "debugRows", "getAllCells")),
296
- _getAllCellsByColumnId: C(() => [l.getAllCells()], (a) => a.reduce((u, g) => (u[g.column.id] = g, u), {}), x(e.options, "debugRows", "getAllCellsByColumnId"))
548
+ getAllCells: C(() => [e.getAllLeafColumns()], (a) => a.map((u) => Dt(e, l, u, u.id)), x(e.options, "debugRows", "getAllCells")),
549
+ _getAllCellsByColumnId: C(() => [l.getAllCells()], (a) => a.reduce((u, f) => (u[f.column.id] = f, u), {}), x(e.options, "debugRows", "getAllCellsByColumnId"))
297
550
  };
298
551
  for (let a = 0; a < e._features.length; a++) {
299
552
  const u = e._features[a];
300
553
  u == null || u.createRow == null || u.createRow(l, e);
301
554
  }
302
555
  return l;
303
- }, Nt = {
304
- createColumn: (e, i) => {
305
- e._getFacetedRowModel = i.options.getFacetedRowModel && i.options.getFacetedRowModel(i, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : i.getPreFilteredRowModel(), e._getFacetedUniqueValues = i.options.getFacetedUniqueValues && i.options.getFacetedUniqueValues(i, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = i.options.getFacetedMinMaxValues && i.options.getFacetedMinMaxValues(i, e.id), e.getFacetedMinMaxValues = () => {
556
+ }, kt = {
557
+ createColumn: (e, r) => {
558
+ e._getFacetedRowModel = r.options.getFacetedRowModel && r.options.getFacetedRowModel(r, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : r.getPreFilteredRowModel(), e._getFacetedUniqueValues = r.options.getFacetedUniqueValues && r.options.getFacetedUniqueValues(r, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = r.options.getFacetedMinMaxValues && r.options.getFacetedMinMaxValues(r, e.id), e.getFacetedMinMaxValues = () => {
306
559
  if (e._getFacetedMinMaxValues)
307
560
  return e._getFacetedMinMaxValues();
308
561
  };
309
562
  }
310
- }, ot = (e, i, t) => {
311
- var n, o;
312
- const r = t == null || (n = t.toString()) == null ? void 0 : n.toLowerCase();
313
- return !!(!((o = e.getValue(i)) == null || (o = o.toString()) == null || (o = o.toLowerCase()) == null) && o.includes(r));
563
+ }, st = (e, r, t) => {
564
+ var n, i;
565
+ const o = t == null || (n = t.toString()) == null ? void 0 : n.toLowerCase();
566
+ return !!(!((i = e.getValue(r)) == null || (i = i.toString()) == null || (i = i.toLowerCase()) == null) && i.includes(o));
314
567
  };
315
- ot.autoRemove = (e) => V(e);
316
- const rt = (e, i, t) => {
568
+ st.autoRemove = (e) => z(e);
569
+ const lt = (e, r, t) => {
317
570
  var n;
318
- return !!(!((n = e.getValue(i)) == null || (n = n.toString()) == null) && n.includes(t));
571
+ return !!(!((n = e.getValue(r)) == null || (n = n.toString()) == null) && n.includes(t));
319
572
  };
320
- rt.autoRemove = (e) => V(e);
321
- const st = (e, i, t) => {
573
+ lt.autoRemove = (e) => z(e);
574
+ const at = (e, r, t) => {
322
575
  var n;
323
- return ((n = e.getValue(i)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
576
+ return ((n = e.getValue(r)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
324
577
  };
325
- st.autoRemove = (e) => V(e);
326
- const lt = (e, i, t) => {
578
+ at.autoRemove = (e) => z(e);
579
+ const ut = (e, r, t) => {
327
580
  var n;
328
- return (n = e.getValue(i)) == null ? void 0 : n.includes(t);
581
+ return (n = e.getValue(r)) == null ? void 0 : n.includes(t);
329
582
  };
330
- lt.autoRemove = (e) => V(e);
331
- const at = (e, i, t) => !t.some((n) => {
332
- var o;
333
- return !((o = e.getValue(i)) != null && o.includes(n));
583
+ ut.autoRemove = (e) => z(e);
584
+ const dt = (e, r, t) => !t.some((n) => {
585
+ var i;
586
+ return !((i = e.getValue(r)) != null && i.includes(n));
334
587
  });
335
- at.autoRemove = (e) => V(e) || !(e != null && e.length);
336
- const ut = (e, i, t) => t.some((n) => {
337
- var o;
338
- return (o = e.getValue(i)) == null ? void 0 : o.includes(n);
588
+ dt.autoRemove = (e) => z(e) || !(e != null && e.length);
589
+ const gt = (e, r, t) => t.some((n) => {
590
+ var i;
591
+ return (i = e.getValue(r)) == null ? void 0 : i.includes(n);
339
592
  });
340
- ut.autoRemove = (e) => V(e) || !(e != null && e.length);
341
- const dt = (e, i, t) => e.getValue(i) === t;
342
- dt.autoRemove = (e) => V(e);
343
- const gt = (e, i, t) => e.getValue(i) == t;
344
- gt.autoRemove = (e) => V(e);
345
- const Ve = (e, i, t) => {
346
- let [n, o] = t;
347
- const r = e.getValue(i);
348
- return r >= n && r <= o;
593
+ gt.autoRemove = (e) => z(e) || !(e != null && e.length);
594
+ const ct = (e, r, t) => e.getValue(r) === t;
595
+ ct.autoRemove = (e) => z(e);
596
+ const ft = (e, r, t) => e.getValue(r) == t;
597
+ ft.autoRemove = (e) => z(e);
598
+ const Oe = (e, r, t) => {
599
+ let [n, i] = t;
600
+ const o = e.getValue(r);
601
+ return o >= n && o <= i;
349
602
  };
350
- Ve.resolveFilterValue = (e) => {
351
- let [i, t] = e, n = typeof i != "number" ? parseFloat(i) : i, o = typeof t != "number" ? parseFloat(t) : t, r = i === null || Number.isNaN(n) ? -1 / 0 : n, s = t === null || Number.isNaN(o) ? 1 / 0 : o;
352
- if (r > s) {
353
- const l = r;
354
- r = s, s = l;
603
+ Oe.resolveFilterValue = (e) => {
604
+ let [r, t] = e, n = typeof r != "number" ? parseFloat(r) : r, i = typeof t != "number" ? parseFloat(t) : t, o = r === null || Number.isNaN(n) ? -1 / 0 : n, s = t === null || Number.isNaN(i) ? 1 / 0 : i;
605
+ if (o > s) {
606
+ const l = o;
607
+ o = s, s = l;
355
608
  }
356
- return [r, s];
609
+ return [o, s];
357
610
  };
358
- Ve.autoRemove = (e) => V(e) || V(e[0]) && V(e[1]);
359
- const N = {
360
- includesString: ot,
361
- includesStringSensitive: rt,
362
- equalsString: st,
363
- arrIncludes: lt,
364
- arrIncludesAll: at,
365
- arrIncludesSome: ut,
366
- equals: dt,
367
- weakEquals: gt,
368
- inNumberRange: Ve
611
+ Oe.autoRemove = (e) => z(e) || z(e[0]) && z(e[1]);
612
+ const A = {
613
+ includesString: st,
614
+ includesStringSensitive: lt,
615
+ equalsString: at,
616
+ arrIncludes: ut,
617
+ arrIncludesAll: dt,
618
+ arrIncludesSome: gt,
619
+ equals: ct,
620
+ weakEquals: ft,
621
+ inNumberRange: Oe
369
622
  };
370
- function V(e) {
623
+ function z(e) {
371
624
  return e == null || e === "";
372
625
  }
373
- const Ot = {
626
+ const Tt = {
374
627
  getDefaultColumnDef: () => ({
375
628
  filterFn: "auto"
376
629
  }),
@@ -379,127 +632,127 @@ const Ot = {
379
632
  ...e
380
633
  }),
381
634
  getDefaultOptions: (e) => ({
382
- onColumnFiltersChange: b("columnFilters", e),
635
+ onColumnFiltersChange: P("columnFilters", e),
383
636
  filterFromLeafRows: !1,
384
637
  maxLeafRowFilterDepth: 100
385
638
  }),
386
- createColumn: (e, i) => {
639
+ createColumn: (e, r) => {
387
640
  e.getAutoFilterFn = () => {
388
- const t = i.getCoreRowModel().flatRows[0], n = t == null ? void 0 : t.getValue(e.id);
389
- return typeof n == "string" ? N.includesString : typeof n == "number" ? N.inNumberRange : typeof n == "boolean" || n !== null && typeof n == "object" ? N.equals : Array.isArray(n) ? N.arrIncludes : N.weakEquals;
641
+ const t = r.getCoreRowModel().flatRows[0], n = t == null ? void 0 : t.getValue(e.id);
642
+ return typeof n == "string" ? A.includesString : typeof n == "number" ? A.inNumberRange : typeof n == "boolean" || n !== null && typeof n == "object" ? A.equals : Array.isArray(n) ? A.arrIncludes : A.weakEquals;
390
643
  }, e.getFilterFn = () => {
391
644
  var t, n;
392
- return pe(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
645
+ return me(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
393
646
  // @ts-ignore
394
- (t = (n = i.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t : N[e.columnDef.filterFn]
647
+ (t = (n = r.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t : A[e.columnDef.filterFn]
395
648
  );
396
649
  }, e.getCanFilter = () => {
397
- var t, n, o;
398
- return ((t = e.columnDef.enableColumnFilter) != null ? t : !0) && ((n = i.options.enableColumnFilters) != null ? n : !0) && ((o = i.options.enableFilters) != null ? o : !0) && !!e.accessorFn;
650
+ var t, n, i;
651
+ return ((t = e.columnDef.enableColumnFilter) != null ? t : !0) && ((n = r.options.enableColumnFilters) != null ? n : !0) && ((i = r.options.enableFilters) != null ? i : !0) && !!e.accessorFn;
399
652
  }, e.getIsFiltered = () => e.getFilterIndex() > -1, e.getFilterValue = () => {
400
653
  var t;
401
- return (t = i.getState().columnFilters) == null || (t = t.find((n) => n.id === e.id)) == null ? void 0 : t.value;
654
+ return (t = r.getState().columnFilters) == null || (t = t.find((n) => n.id === e.id)) == null ? void 0 : t.value;
402
655
  }, e.getFilterIndex = () => {
403
656
  var t, n;
404
- return (t = (n = i.getState().columnFilters) == null ? void 0 : n.findIndex((o) => o.id === e.id)) != null ? t : -1;
657
+ return (t = (n = r.getState().columnFilters) == null ? void 0 : n.findIndex((i) => i.id === e.id)) != null ? t : -1;
405
658
  }, e.setFilterValue = (t) => {
406
- i.setColumnFilters((n) => {
407
- const o = e.getFilterFn(), r = n == null ? void 0 : n.find((g) => g.id === e.id), s = H(t, r ? r.value : void 0);
408
- if (je(o, s, e)) {
659
+ r.setColumnFilters((n) => {
660
+ const i = e.getFilterFn(), o = n == null ? void 0 : n.find((f) => f.id === e.id), s = H(t, o ? o.value : void 0);
661
+ if (Ue(i, s, e)) {
409
662
  var l;
410
- return (l = n == null ? void 0 : n.filter((g) => g.id !== e.id)) != null ? l : [];
663
+ return (l = n == null ? void 0 : n.filter((f) => f.id !== e.id)) != null ? l : [];
411
664
  }
412
665
  const a = {
413
666
  id: e.id,
414
667
  value: s
415
668
  };
416
- if (r) {
669
+ if (o) {
417
670
  var u;
418
- return (u = n == null ? void 0 : n.map((g) => g.id === e.id ? a : g)) != null ? u : [];
671
+ return (u = n == null ? void 0 : n.map((f) => f.id === e.id ? a : f)) != null ? u : [];
419
672
  }
420
673
  return n != null && n.length ? [...n, a] : [a];
421
674
  });
422
675
  };
423
676
  },
424
- createRow: (e, i) => {
677
+ createRow: (e, r) => {
425
678
  e.columnFilters = {}, e.columnFiltersMeta = {};
426
679
  },
427
680
  createTable: (e) => {
428
- e.setColumnFilters = (i) => {
429
- const t = e.getAllLeafColumns(), n = (o) => {
430
- var r;
431
- return (r = H(i, o)) == null ? void 0 : r.filter((s) => {
681
+ e.setColumnFilters = (r) => {
682
+ const t = e.getAllLeafColumns(), n = (i) => {
683
+ var o;
684
+ return (o = H(r, i)) == null ? void 0 : o.filter((s) => {
432
685
  const l = t.find((a) => a.id === s.id);
433
686
  if (l) {
434
687
  const a = l.getFilterFn();
435
- if (je(a, s.value, l))
688
+ if (Ue(a, s.value, l))
436
689
  return !1;
437
690
  }
438
691
  return !0;
439
692
  });
440
693
  };
441
694
  e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange(n);
442
- }, e.resetColumnFilters = (i) => {
695
+ }, e.resetColumnFilters = (r) => {
443
696
  var t, n;
444
- e.setColumnFilters(i ? [] : (t = (n = e.initialState) == null ? void 0 : n.columnFilters) != null ? t : []);
697
+ e.setColumnFilters(r ? [] : (t = (n = e.initialState) == null ? void 0 : n.columnFilters) != null ? t : []);
445
698
  }, e.getPreFilteredRowModel = () => e.getCoreRowModel(), e.getFilteredRowModel = () => (!e._getFilteredRowModel && e.options.getFilteredRowModel && (e._getFilteredRowModel = e.options.getFilteredRowModel(e)), e.options.manualFiltering || !e._getFilteredRowModel ? e.getPreFilteredRowModel() : e._getFilteredRowModel());
446
699
  }
447
700
  };
448
- function je(e, i, t) {
449
- return (e && e.autoRemove ? e.autoRemove(i, t) : !1) || typeof i > "u" || typeof i == "string" && !i;
701
+ function Ue(e, r, t) {
702
+ return (e && e.autoRemove ? e.autoRemove(r, t) : !1) || typeof r > "u" || typeof r == "string" && !r;
450
703
  }
451
- const At = (e, i, t) => t.reduce((n, o) => {
452
- const r = o.getValue(e);
453
- return n + (typeof r == "number" ? r : 0);
454
- }, 0), Dt = (e, i, t) => {
704
+ const Bt = (e, r, t) => t.reduce((n, i) => {
705
+ const o = i.getValue(e);
706
+ return n + (typeof o == "number" ? o : 0);
707
+ }, 0), jt = (e, r, t) => {
455
708
  let n;
456
- return t.forEach((o) => {
457
- const r = o.getValue(e);
458
- r != null && (n > r || n === void 0 && r >= r) && (n = r);
709
+ return t.forEach((i) => {
710
+ const o = i.getValue(e);
711
+ o != null && (n > o || n === void 0 && o >= o) && (n = o);
459
712
  }), n;
460
- }, Ht = (e, i, t) => {
713
+ }, qt = (e, r, t) => {
461
714
  let n;
462
- return t.forEach((o) => {
463
- const r = o.getValue(e);
464
- r != null && (n < r || n === void 0 && r >= r) && (n = r);
715
+ return t.forEach((i) => {
716
+ const o = i.getValue(e);
717
+ o != null && (n < o || n === void 0 && o >= o) && (n = o);
465
718
  }), n;
466
- }, Lt = (e, i, t) => {
467
- let n, o;
468
- return t.forEach((r) => {
469
- const s = r.getValue(e);
470
- s != null && (n === void 0 ? s >= s && (n = o = s) : (n > s && (n = s), o < s && (o = s)));
471
- }), [n, o];
472
- }, Gt = (e, i) => {
719
+ }, Ut = (e, r, t) => {
720
+ let n, i;
721
+ return t.forEach((o) => {
722
+ const s = o.getValue(e);
723
+ s != null && (n === void 0 ? s >= s && (n = i = s) : (n > s && (n = s), i < s && (i = s)));
724
+ }), [n, i];
725
+ }, Wt = (e, r) => {
473
726
  let t = 0, n = 0;
474
- if (i.forEach((o) => {
475
- let r = o.getValue(e);
476
- r != null && (r = +r) >= r && (++t, n += r);
727
+ if (r.forEach((i) => {
728
+ let o = i.getValue(e);
729
+ o != null && (o = +o) >= o && (++t, n += o);
477
730
  }), t) return n / t;
478
- }, kt = (e, i) => {
479
- if (!i.length)
731
+ }, Kt = (e, r) => {
732
+ if (!r.length)
480
733
  return;
481
- const t = i.map((r) => r.getValue(e));
482
- if (!It(t))
734
+ const t = r.map((o) => o.getValue(e));
735
+ if (!Nt(t))
483
736
  return;
484
737
  if (t.length === 1)
485
738
  return t[0];
486
- const n = Math.floor(t.length / 2), o = t.sort((r, s) => r - s);
487
- return t.length % 2 !== 0 ? o[n] : (o[n - 1] + o[n]) / 2;
488
- }, Tt = (e, i) => Array.from(new Set(i.map((t) => t.getValue(e))).values()), Bt = (e, i) => new Set(i.map((t) => t.getValue(e))).size, jt = (e, i) => i.length, Se = {
489
- sum: At,
490
- min: Dt,
491
- max: Ht,
492
- extent: Lt,
493
- mean: Gt,
494
- median: kt,
495
- unique: Tt,
496
- uniqueCount: Bt,
497
- count: jt
498
- }, qt = {
739
+ const n = Math.floor(t.length / 2), i = t.sort((o, s) => o - s);
740
+ return t.length % 2 !== 0 ? i[n] : (i[n - 1] + i[n]) / 2;
741
+ }, Xt = (e, r) => Array.from(new Set(r.map((t) => t.getValue(e))).values()), Jt = (e, r) => new Set(r.map((t) => t.getValue(e))).size, Qt = (e, r) => r.length, xe = {
742
+ sum: Bt,
743
+ min: jt,
744
+ max: qt,
745
+ extent: Ut,
746
+ mean: Wt,
747
+ median: Kt,
748
+ unique: Xt,
749
+ uniqueCount: Jt,
750
+ count: Qt
751
+ }, Yt = {
499
752
  getDefaultColumnDef: () => ({
500
753
  aggregatedCell: (e) => {
501
- var i, t;
502
- return (i = (t = e.getValue()) == null || t.toString == null ? void 0 : t.toString()) != null ? i : null;
754
+ var r, t;
755
+ return (r = (t = e.getValue()) == null || t.toString == null ? void 0 : t.toString()) != null ? r : null;
503
756
  },
504
757
  aggregationFn: "auto"
505
758
  }),
@@ -508,237 +761,237 @@ const At = (e, i, t) => t.reduce((n, o) => {
508
761
  ...e
509
762
  }),
510
763
  getDefaultOptions: (e) => ({
511
- onGroupingChange: b("grouping", e),
764
+ onGroupingChange: P("grouping", e),
512
765
  groupedColumnMode: "reorder"
513
766
  }),
514
- createColumn: (e, i) => {
767
+ createColumn: (e, r) => {
515
768
  e.toggleGrouping = () => {
516
- i.setGrouping((t) => t != null && t.includes(e.id) ? t.filter((n) => n !== e.id) : [...t ?? [], e.id]);
769
+ r.setGrouping((t) => t != null && t.includes(e.id) ? t.filter((n) => n !== e.id) : [...t ?? [], e.id]);
517
770
  }, e.getCanGroup = () => {
518
771
  var t, n;
519
- return ((t = e.columnDef.enableGrouping) != null ? t : !0) && ((n = i.options.enableGrouping) != null ? n : !0) && (!!e.accessorFn || !!e.columnDef.getGroupingValue);
772
+ return ((t = e.columnDef.enableGrouping) != null ? t : !0) && ((n = r.options.enableGrouping) != null ? n : !0) && (!!e.accessorFn || !!e.columnDef.getGroupingValue);
520
773
  }, e.getIsGrouped = () => {
521
774
  var t;
522
- return (t = i.getState().grouping) == null ? void 0 : t.includes(e.id);
775
+ return (t = r.getState().grouping) == null ? void 0 : t.includes(e.id);
523
776
  }, e.getGroupedIndex = () => {
524
777
  var t;
525
- return (t = i.getState().grouping) == null ? void 0 : t.indexOf(e.id);
778
+ return (t = r.getState().grouping) == null ? void 0 : t.indexOf(e.id);
526
779
  }, e.getToggleGroupingHandler = () => {
527
780
  const t = e.getCanGroup();
528
781
  return () => {
529
782
  t && e.toggleGrouping();
530
783
  };
531
784
  }, e.getAutoAggregationFn = () => {
532
- const t = i.getCoreRowModel().flatRows[0], n = t == null ? void 0 : t.getValue(e.id);
785
+ const t = r.getCoreRowModel().flatRows[0], n = t == null ? void 0 : t.getValue(e.id);
533
786
  if (typeof n == "number")
534
- return Se.sum;
787
+ return xe.sum;
535
788
  if (Object.prototype.toString.call(n) === "[object Date]")
536
- return Se.extent;
789
+ return xe.extent;
537
790
  }, e.getAggregationFn = () => {
538
791
  var t, n;
539
792
  if (!e)
540
793
  throw new Error();
541
- return pe(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (n = i.options.aggregationFns) == null ? void 0 : n[e.columnDef.aggregationFn]) != null ? t : Se[e.columnDef.aggregationFn];
794
+ return me(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (n = r.options.aggregationFns) == null ? void 0 : n[e.columnDef.aggregationFn]) != null ? t : xe[e.columnDef.aggregationFn];
542
795
  };
543
796
  },
544
797
  createTable: (e) => {
545
- e.setGrouping = (i) => e.options.onGroupingChange == null ? void 0 : e.options.onGroupingChange(i), e.resetGrouping = (i) => {
798
+ e.setGrouping = (r) => e.options.onGroupingChange == null ? void 0 : e.options.onGroupingChange(r), e.resetGrouping = (r) => {
546
799
  var t, n;
547
- e.setGrouping(i ? [] : (t = (n = e.initialState) == null ? void 0 : n.grouping) != null ? t : []);
800
+ e.setGrouping(r ? [] : (t = (n = e.initialState) == null ? void 0 : n.grouping) != null ? t : []);
548
801
  }, e.getPreGroupedRowModel = () => e.getFilteredRowModel(), e.getGroupedRowModel = () => (!e._getGroupedRowModel && e.options.getGroupedRowModel && (e._getGroupedRowModel = e.options.getGroupedRowModel(e)), e.options.manualGrouping || !e._getGroupedRowModel ? e.getPreGroupedRowModel() : e._getGroupedRowModel());
549
802
  },
550
- createRow: (e, i) => {
803
+ createRow: (e, r) => {
551
804
  e.getIsGrouped = () => !!e.groupingColumnId, e.getGroupingValue = (t) => {
552
805
  if (e._groupingValuesCache.hasOwnProperty(t))
553
806
  return e._groupingValuesCache[t];
554
- const n = i.getColumn(t);
807
+ const n = r.getColumn(t);
555
808
  return n != null && n.columnDef.getGroupingValue ? (e._groupingValuesCache[t] = n.columnDef.getGroupingValue(e.original), e._groupingValuesCache[t]) : e.getValue(t);
556
809
  }, e._groupingValuesCache = {};
557
810
  },
558
- createCell: (e, i, t, n) => {
559
- e.getIsGrouped = () => i.getIsGrouped() && i.id === t.groupingColumnId, e.getIsPlaceholder = () => !e.getIsGrouped() && i.getIsGrouped(), e.getIsAggregated = () => {
560
- var o;
561
- return !e.getIsGrouped() && !e.getIsPlaceholder() && !!((o = t.subRows) != null && o.length);
811
+ createCell: (e, r, t, n) => {
812
+ e.getIsGrouped = () => r.getIsGrouped() && r.id === t.groupingColumnId, e.getIsPlaceholder = () => !e.getIsGrouped() && r.getIsGrouped(), e.getIsAggregated = () => {
813
+ var i;
814
+ return !e.getIsGrouped() && !e.getIsPlaceholder() && !!((i = t.subRows) != null && i.length);
562
815
  };
563
816
  }
564
817
  };
565
- function Wt(e, i, t) {
566
- if (!(i != null && i.length) || !t)
818
+ function Zt(e, r, t) {
819
+ if (!(r != null && r.length) || !t)
567
820
  return e;
568
- const n = e.filter((r) => !i.includes(r.id));
569
- return t === "remove" ? n : [...i.map((r) => e.find((s) => s.id === r)).filter(Boolean), ...n];
821
+ const n = e.filter((o) => !r.includes(o.id));
822
+ return t === "remove" ? n : [...r.map((o) => e.find((s) => s.id === o)).filter(Boolean), ...n];
570
823
  }
571
- const Ut = {
824
+ const en = {
572
825
  getInitialState: (e) => ({
573
826
  columnOrder: [],
574
827
  ...e
575
828
  }),
576
829
  getDefaultOptions: (e) => ({
577
- onColumnOrderChange: b("columnOrder", e)
830
+ onColumnOrderChange: P("columnOrder", e)
578
831
  }),
579
- createColumn: (e, i) => {
580
- e.getIndex = C((t) => [ee(i, t)], (t) => t.findIndex((n) => n.id === e.id), x(i.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
832
+ createColumn: (e, r) => {
833
+ e.getIndex = C((t) => [re(r, t)], (t) => t.findIndex((n) => n.id === e.id), x(r.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
581
834
  var n;
582
- return ((n = ee(i, t)[0]) == null ? void 0 : n.id) === e.id;
835
+ return ((n = re(r, t)[0]) == null ? void 0 : n.id) === e.id;
583
836
  }, e.getIsLastColumn = (t) => {
584
837
  var n;
585
- const o = ee(i, t);
586
- return ((n = o[o.length - 1]) == null ? void 0 : n.id) === e.id;
838
+ const i = re(r, t);
839
+ return ((n = i[i.length - 1]) == null ? void 0 : n.id) === e.id;
587
840
  };
588
841
  },
589
842
  createTable: (e) => {
590
- e.setColumnOrder = (i) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(i), e.resetColumnOrder = (i) => {
843
+ e.setColumnOrder = (r) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(r), e.resetColumnOrder = (r) => {
591
844
  var t;
592
- e.setColumnOrder(i ? [] : (t = e.initialState.columnOrder) != null ? t : []);
593
- }, e._getOrderColumnsFn = C(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (i, t, n) => (o) => {
594
- let r = [];
595
- if (!(i != null && i.length))
596
- r = o;
845
+ e.setColumnOrder(r ? [] : (t = e.initialState.columnOrder) != null ? t : []);
846
+ }, e._getOrderColumnsFn = C(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (r, t, n) => (i) => {
847
+ let o = [];
848
+ if (!(r != null && r.length))
849
+ o = i;
597
850
  else {
598
- const s = [...i], l = [...o];
851
+ const s = [...r], l = [...i];
599
852
  for (; l.length && s.length; ) {
600
- const a = s.shift(), u = l.findIndex((g) => g.id === a);
601
- u > -1 && r.push(l.splice(u, 1)[0]);
853
+ const a = s.shift(), u = l.findIndex((f) => f.id === a);
854
+ u > -1 && o.push(l.splice(u, 1)[0]);
602
855
  }
603
- r = [...r, ...l];
856
+ o = [...o, ...l];
604
857
  }
605
- return Wt(r, t, n);
858
+ return Zt(o, t, n);
606
859
  }, x(e.options, "debugTable", "_getOrderColumnsFn"));
607
860
  }
608
- }, ve = () => ({
861
+ }, Re = () => ({
609
862
  left: [],
610
863
  right: []
611
- }), Kt = {
864
+ }), tn = {
612
865
  getInitialState: (e) => ({
613
- columnPinning: ve(),
866
+ columnPinning: Re(),
614
867
  ...e
615
868
  }),
616
869
  getDefaultOptions: (e) => ({
617
- onColumnPinningChange: b("columnPinning", e)
870
+ onColumnPinningChange: P("columnPinning", e)
618
871
  }),
619
- createColumn: (e, i) => {
872
+ createColumn: (e, r) => {
620
873
  e.pin = (t) => {
621
- const n = e.getLeafColumns().map((o) => o.id).filter(Boolean);
622
- i.setColumnPinning((o) => {
623
- var r, s;
874
+ const n = e.getLeafColumns().map((i) => i.id).filter(Boolean);
875
+ r.setColumnPinning((i) => {
876
+ var o, s;
624
877
  if (t === "right") {
625
878
  var l, a;
626
879
  return {
627
- left: ((l = o == null ? void 0 : o.left) != null ? l : []).filter((m) => !(n != null && n.includes(m))),
628
- right: [...((a = o == null ? void 0 : o.right) != null ? a : []).filter((m) => !(n != null && n.includes(m))), ...n]
880
+ left: ((l = i == null ? void 0 : i.left) != null ? l : []).filter((m) => !(n != null && n.includes(m))),
881
+ right: [...((a = i == null ? void 0 : i.right) != null ? a : []).filter((m) => !(n != null && n.includes(m))), ...n]
629
882
  };
630
883
  }
631
884
  if (t === "left") {
632
- var u, g;
885
+ var u, f;
633
886
  return {
634
- left: [...((u = o == null ? void 0 : o.left) != null ? u : []).filter((m) => !(n != null && n.includes(m))), ...n],
635
- right: ((g = o == null ? void 0 : o.right) != null ? g : []).filter((m) => !(n != null && n.includes(m)))
887
+ left: [...((u = i == null ? void 0 : i.left) != null ? u : []).filter((m) => !(n != null && n.includes(m))), ...n],
888
+ right: ((f = i == null ? void 0 : i.right) != null ? f : []).filter((m) => !(n != null && n.includes(m)))
636
889
  };
637
890
  }
638
891
  return {
639
- left: ((r = o == null ? void 0 : o.left) != null ? r : []).filter((m) => !(n != null && n.includes(m))),
640
- right: ((s = o == null ? void 0 : o.right) != null ? s : []).filter((m) => !(n != null && n.includes(m)))
892
+ left: ((o = i == null ? void 0 : i.left) != null ? o : []).filter((m) => !(n != null && n.includes(m))),
893
+ right: ((s = i == null ? void 0 : i.right) != null ? s : []).filter((m) => !(n != null && n.includes(m)))
641
894
  };
642
895
  });
643
896
  }, e.getCanPin = () => e.getLeafColumns().some((n) => {
644
- var o, r, s;
645
- return ((o = n.columnDef.enablePinning) != null ? o : !0) && ((r = (s = i.options.enableColumnPinning) != null ? s : i.options.enablePinning) != null ? r : !0);
897
+ var i, o, s;
898
+ return ((i = n.columnDef.enablePinning) != null ? i : !0) && ((o = (s = r.options.enableColumnPinning) != null ? s : r.options.enablePinning) != null ? o : !0);
646
899
  }), e.getIsPinned = () => {
647
900
  const t = e.getLeafColumns().map((l) => l.id), {
648
901
  left: n,
649
- right: o
650
- } = i.getState().columnPinning, r = t.some((l) => n == null ? void 0 : n.includes(l)), s = t.some((l) => o == null ? void 0 : o.includes(l));
651
- return r ? "left" : s ? "right" : !1;
902
+ right: i
903
+ } = r.getState().columnPinning, o = t.some((l) => n == null ? void 0 : n.includes(l)), s = t.some((l) => i == null ? void 0 : i.includes(l));
904
+ return o ? "left" : s ? "right" : !1;
652
905
  }, e.getPinnedIndex = () => {
653
906
  var t, n;
654
- const o = e.getIsPinned();
655
- return o ? (t = (n = i.getState().columnPinning) == null || (n = n[o]) == null ? void 0 : n.indexOf(e.id)) != null ? t : -1 : 0;
907
+ const i = e.getIsPinned();
908
+ return i ? (t = (n = r.getState().columnPinning) == null || (n = n[i]) == null ? void 0 : n.indexOf(e.id)) != null ? t : -1 : 0;
656
909
  };
657
910
  },
658
- createRow: (e, i) => {
659
- e.getCenterVisibleCells = C(() => [e._getAllVisibleCells(), i.getState().columnPinning.left, i.getState().columnPinning.right], (t, n, o) => {
660
- const r = [...n ?? [], ...o ?? []];
661
- return t.filter((s) => !r.includes(s.column.id));
662
- }, x(i.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = C(() => [e._getAllVisibleCells(), i.getState().columnPinning.left], (t, n) => (n ?? []).map((r) => t.find((s) => s.column.id === r)).filter(Boolean).map((r) => ({
663
- ...r,
911
+ createRow: (e, r) => {
912
+ e.getCenterVisibleCells = C(() => [e._getAllVisibleCells(), r.getState().columnPinning.left, r.getState().columnPinning.right], (t, n, i) => {
913
+ const o = [...n ?? [], ...i ?? []];
914
+ return t.filter((s) => !o.includes(s.column.id));
915
+ }, x(r.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = C(() => [e._getAllVisibleCells(), r.getState().columnPinning.left], (t, n) => (n ?? []).map((o) => t.find((s) => s.column.id === o)).filter(Boolean).map((o) => ({
916
+ ...o,
664
917
  position: "left"
665
- })), x(i.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = C(() => [e._getAllVisibleCells(), i.getState().columnPinning.right], (t, n) => (n ?? []).map((r) => t.find((s) => s.column.id === r)).filter(Boolean).map((r) => ({
666
- ...r,
918
+ })), x(r.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = C(() => [e._getAllVisibleCells(), r.getState().columnPinning.right], (t, n) => (n ?? []).map((o) => t.find((s) => s.column.id === o)).filter(Boolean).map((o) => ({
919
+ ...o,
667
920
  position: "right"
668
- })), x(i.options, "debugRows", "getRightVisibleCells"));
921
+ })), x(r.options, "debugRows", "getRightVisibleCells"));
669
922
  },
670
923
  createTable: (e) => {
671
- e.setColumnPinning = (i) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(i), e.resetColumnPinning = (i) => {
924
+ e.setColumnPinning = (r) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(r), e.resetColumnPinning = (r) => {
672
925
  var t, n;
673
- return e.setColumnPinning(i ? ve() : (t = (n = e.initialState) == null ? void 0 : n.columnPinning) != null ? t : ve());
674
- }, e.getIsSomeColumnsPinned = (i) => {
926
+ return e.setColumnPinning(r ? Re() : (t = (n = e.initialState) == null ? void 0 : n.columnPinning) != null ? t : Re());
927
+ }, e.getIsSomeColumnsPinned = (r) => {
675
928
  var t;
676
929
  const n = e.getState().columnPinning;
677
- if (!i) {
678
- var o, r;
679
- return !!((o = n.left) != null && o.length || (r = n.right) != null && r.length);
930
+ if (!r) {
931
+ var i, o;
932
+ return !!((i = n.left) != null && i.length || (o = n.right) != null && o.length);
680
933
  }
681
- return !!((t = n[i]) != null && t.length);
682
- }, e.getLeftLeafColumns = C(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (i, t) => (t ?? []).map((n) => i.find((o) => o.id === n)).filter(Boolean), x(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = C(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (i, t) => (t ?? []).map((n) => i.find((o) => o.id === n)).filter(Boolean), x(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = C(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (i, t, n) => {
683
- const o = [...t ?? [], ...n ?? []];
684
- return i.filter((r) => !o.includes(r.id));
934
+ return !!((t = n[r]) != null && t.length);
935
+ }, e.getLeftLeafColumns = C(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (r, t) => (t ?? []).map((n) => r.find((i) => i.id === n)).filter(Boolean), x(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = C(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (r, t) => (t ?? []).map((n) => r.find((i) => i.id === n)).filter(Boolean), x(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = C(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (r, t, n) => {
936
+ const i = [...t ?? [], ...n ?? []];
937
+ return r.filter((o) => !i.includes(o.id));
685
938
  }, x(e.options, "debugColumns", "getCenterLeafColumns"));
686
939
  }
687
940
  };
688
- function Xt(e) {
941
+ function nn(e) {
689
942
  return e || (typeof document < "u" ? document : null);
690
943
  }
691
- const ae = {
944
+ const ue = {
692
945
  size: 150,
693
946
  minSize: 20,
694
947
  maxSize: Number.MAX_SAFE_INTEGER
695
- }, we = () => ({
948
+ }, ye = () => ({
696
949
  startOffset: null,
697
950
  startSize: null,
698
951
  deltaOffset: null,
699
952
  deltaPercentage: null,
700
953
  isResizingColumn: !1,
701
954
  columnSizingStart: []
702
- }), Jt = {
703
- getDefaultColumnDef: () => ae,
955
+ }), rn = {
956
+ getDefaultColumnDef: () => ue,
704
957
  getInitialState: (e) => ({
705
958
  columnSizing: {},
706
- columnSizingInfo: we(),
959
+ columnSizingInfo: ye(),
707
960
  ...e
708
961
  }),
709
962
  getDefaultOptions: (e) => ({
710
963
  columnResizeMode: "onEnd",
711
964
  columnResizeDirection: "ltr",
712
- onColumnSizingChange: b("columnSizing", e),
713
- onColumnSizingInfoChange: b("columnSizingInfo", e)
965
+ onColumnSizingChange: P("columnSizing", e),
966
+ onColumnSizingInfoChange: P("columnSizingInfo", e)
714
967
  }),
715
- createColumn: (e, i) => {
968
+ createColumn: (e, r) => {
716
969
  e.getSize = () => {
717
- var t, n, o;
718
- const r = i.getState().columnSizing[e.id];
719
- return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : ae.minSize, (n = r ?? e.columnDef.size) != null ? n : ae.size), (o = e.columnDef.maxSize) != null ? o : ae.maxSize);
720
- }, e.getStart = C((t) => [t, ee(i, t), i.getState().columnSizing], (t, n) => n.slice(0, e.getIndex(t)).reduce((o, r) => o + r.getSize(), 0), x(i.options, "debugColumns", "getStart")), e.getAfter = C((t) => [t, ee(i, t), i.getState().columnSizing], (t, n) => n.slice(e.getIndex(t) + 1).reduce((o, r) => o + r.getSize(), 0), x(i.options, "debugColumns", "getAfter")), e.resetSize = () => {
721
- i.setColumnSizing((t) => {
970
+ var t, n, i;
971
+ const o = r.getState().columnSizing[e.id];
972
+ return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : ue.minSize, (n = o ?? e.columnDef.size) != null ? n : ue.size), (i = e.columnDef.maxSize) != null ? i : ue.maxSize);
973
+ }, e.getStart = C((t) => [t, re(r, t), r.getState().columnSizing], (t, n) => n.slice(0, e.getIndex(t)).reduce((i, o) => i + o.getSize(), 0), x(r.options, "debugColumns", "getStart")), e.getAfter = C((t) => [t, re(r, t), r.getState().columnSizing], (t, n) => n.slice(e.getIndex(t) + 1).reduce((i, o) => i + o.getSize(), 0), x(r.options, "debugColumns", "getAfter")), e.resetSize = () => {
974
+ r.setColumnSizing((t) => {
722
975
  let {
723
976
  [e.id]: n,
724
- ...o
977
+ ...i
725
978
  } = t;
726
- return o;
979
+ return i;
727
980
  });
728
981
  }, e.getCanResize = () => {
729
982
  var t, n;
730
- return ((t = e.columnDef.enableResizing) != null ? t : !0) && ((n = i.options.enableColumnResizing) != null ? n : !0);
731
- }, e.getIsResizing = () => i.getState().columnSizingInfo.isResizingColumn === e.id;
983
+ return ((t = e.columnDef.enableResizing) != null ? t : !0) && ((n = r.options.enableColumnResizing) != null ? n : !0);
984
+ }, e.getIsResizing = () => r.getState().columnSizingInfo.isResizingColumn === e.id;
732
985
  },
733
- createHeader: (e, i) => {
986
+ createHeader: (e, r) => {
734
987
  e.getSize = () => {
735
988
  let t = 0;
736
- const n = (o) => {
737
- if (o.subHeaders.length)
738
- o.subHeaders.forEach(n);
989
+ const n = (i) => {
990
+ if (i.subHeaders.length)
991
+ i.subHeaders.forEach(n);
739
992
  else {
740
- var r;
741
- t += (r = o.column.getSize()) != null ? r : 0;
993
+ var o;
994
+ t += (o = i.column.getSize()) != null ? o : 0;
742
995
  }
743
996
  };
744
997
  return n(e), t;
@@ -749,29 +1002,29 @@ const ae = {
749
1002
  }
750
1003
  return 0;
751
1004
  }, e.getResizeHandler = (t) => {
752
- const n = i.getColumn(e.column.id), o = n == null ? void 0 : n.getCanResize();
753
- return (r) => {
754
- if (!n || !o || (r.persist == null || r.persist(), Ce(r) && r.touches && r.touches.length > 1))
1005
+ const n = r.getColumn(e.column.id), i = n == null ? void 0 : n.getCanResize();
1006
+ return (o) => {
1007
+ if (!n || !i || (o.persist == null || o.persist(), _e(o) && o.touches && o.touches.length > 1))
755
1008
  return;
756
- const s = e.getSize(), l = e ? e.getLeafHeaders().map((S) => [S.column.id, S.column.getSize()]) : [[n.id, n.getSize()]], a = Ce(r) ? Math.round(r.touches[0].clientX) : r.clientX, u = {}, g = (S, v) => {
757
- typeof v == "number" && (i.setColumnSizingInfo((F) => {
758
- var $, I;
759
- const P = i.options.columnResizeDirection === "rtl" ? -1 : 1, ne = (v - (($ = F == null ? void 0 : F.startOffset) != null ? $ : 0)) * P, ie = Math.max(ne / ((I = F == null ? void 0 : F.startSize) != null ? I : 0), -0.999999);
760
- return F.columnSizingStart.forEach((X) => {
761
- let [J, O] = X;
762
- u[J] = Math.round(Math.max(O + O * ie, 0) * 100) / 100;
1009
+ const s = e.getSize(), l = e ? e.getLeafHeaders().map((S) => [S.column.id, S.column.getSize()]) : [[n.id, n.getSize()]], a = _e(o) ? Math.round(o.touches[0].clientX) : o.clientX, u = {}, f = (S, w) => {
1010
+ typeof w == "number" && (r.setColumnSizingInfo((_) => {
1011
+ var $, E;
1012
+ const O = r.options.columnResizeDirection === "rtl" ? -1 : 1, oe = (w - (($ = _ == null ? void 0 : _.startOffset) != null ? $ : 0)) * O, Y = Math.max(oe / ((E = _ == null ? void 0 : _.startSize) != null ? E : 0), -0.999999);
1013
+ return _.columnSizingStart.forEach((Se) => {
1014
+ let [ve, j] = Se;
1015
+ u[ve] = Math.round(Math.max(j + j * Y, 0) * 100) / 100;
763
1016
  }), {
764
- ...F,
765
- deltaOffset: ne,
766
- deltaPercentage: ie
1017
+ ..._,
1018
+ deltaOffset: oe,
1019
+ deltaPercentage: Y
767
1020
  };
768
- }), (i.options.columnResizeMode === "onChange" || S === "end") && i.setColumnSizing((F) => ({
769
- ...F,
1021
+ }), (r.options.columnResizeMode === "onChange" || S === "end") && r.setColumnSizing((_) => ({
1022
+ ..._,
770
1023
  ...u
771
1024
  })));
772
- }, m = (S) => g("move", S), c = (S) => {
773
- g("end", S), i.setColumnSizingInfo((v) => ({
774
- ...v,
1025
+ }, m = (S) => f("move", S), c = (S) => {
1026
+ f("end", S), r.setColumnSizingInfo((w) => ({
1027
+ ...w,
775
1028
  isResizingColumn: !1,
776
1029
  startOffset: null,
777
1030
  startSize: null,
@@ -779,21 +1032,21 @@ const ae = {
779
1032
  deltaPercentage: null,
780
1033
  columnSizingStart: []
781
1034
  }));
782
- }, d = Xt(t), p = {
1035
+ }, d = nn(t), g = {
783
1036
  moveHandler: (S) => m(S.clientX),
784
1037
  upHandler: (S) => {
785
- d == null || d.removeEventListener("mousemove", p.moveHandler), d == null || d.removeEventListener("mouseup", p.upHandler), c(S.clientX);
1038
+ d == null || d.removeEventListener("mousemove", g.moveHandler), d == null || d.removeEventListener("mouseup", g.upHandler), c(S.clientX);
786
1039
  }
787
- }, h = {
1040
+ }, p = {
788
1041
  moveHandler: (S) => (S.cancelable && (S.preventDefault(), S.stopPropagation()), m(S.touches[0].clientX), !1),
789
1042
  upHandler: (S) => {
790
- var v;
791
- d == null || d.removeEventListener("touchmove", h.moveHandler), d == null || d.removeEventListener("touchend", h.upHandler), S.cancelable && (S.preventDefault(), S.stopPropagation()), c((v = S.touches[0]) == null ? void 0 : v.clientX);
1043
+ var w;
1044
+ d == null || d.removeEventListener("touchmove", p.moveHandler), d == null || d.removeEventListener("touchend", p.upHandler), S.cancelable && (S.preventDefault(), S.stopPropagation()), c((w = S.touches[0]) == null ? void 0 : w.clientX);
792
1045
  }
793
- }, w = Qt() ? {
1046
+ }, v = on() ? {
794
1047
  passive: !1
795
1048
  } : !1;
796
- Ce(r) ? (d == null || d.addEventListener("touchmove", h.moveHandler, w), d == null || d.addEventListener("touchend", h.upHandler, w)) : (d == null || d.addEventListener("mousemove", p.moveHandler, w), d == null || d.addEventListener("mouseup", p.upHandler, w)), i.setColumnSizingInfo((S) => ({
1049
+ _e(o) ? (d == null || d.addEventListener("touchmove", p.moveHandler, v), d == null || d.addEventListener("touchend", p.upHandler, v)) : (d == null || d.addEventListener("mousemove", g.moveHandler, v), d == null || d.addEventListener("mouseup", g.upHandler, v)), r.setColumnSizingInfo((S) => ({
797
1050
  ...S,
798
1051
  startOffset: a,
799
1052
  startSize: s,
@@ -806,85 +1059,85 @@ const ae = {
806
1059
  };
807
1060
  },
808
1061
  createTable: (e) => {
809
- e.setColumnSizing = (i) => e.options.onColumnSizingChange == null ? void 0 : e.options.onColumnSizingChange(i), e.setColumnSizingInfo = (i) => e.options.onColumnSizingInfoChange == null ? void 0 : e.options.onColumnSizingInfoChange(i), e.resetColumnSizing = (i) => {
1062
+ e.setColumnSizing = (r) => e.options.onColumnSizingChange == null ? void 0 : e.options.onColumnSizingChange(r), e.setColumnSizingInfo = (r) => e.options.onColumnSizingInfoChange == null ? void 0 : e.options.onColumnSizingInfoChange(r), e.resetColumnSizing = (r) => {
810
1063
  var t;
811
- e.setColumnSizing(i ? {} : (t = e.initialState.columnSizing) != null ? t : {});
812
- }, e.resetHeaderSizeInfo = (i) => {
1064
+ e.setColumnSizing(r ? {} : (t = e.initialState.columnSizing) != null ? t : {});
1065
+ }, e.resetHeaderSizeInfo = (r) => {
813
1066
  var t;
814
- e.setColumnSizingInfo(i ? we() : (t = e.initialState.columnSizingInfo) != null ? t : we());
1067
+ e.setColumnSizingInfo(r ? ye() : (t = e.initialState.columnSizingInfo) != null ? t : ye());
815
1068
  }, e.getTotalSize = () => {
816
- var i, t;
817
- return (i = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, o) => n + o.getSize(), 0)) != null ? i : 0;
1069
+ var r, t;
1070
+ return (r = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, i) => n + i.getSize(), 0)) != null ? r : 0;
818
1071
  }, e.getLeftTotalSize = () => {
819
- var i, t;
820
- return (i = (t = e.getLeftHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, o) => n + o.getSize(), 0)) != null ? i : 0;
1072
+ var r, t;
1073
+ return (r = (t = e.getLeftHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, i) => n + i.getSize(), 0)) != null ? r : 0;
821
1074
  }, e.getCenterTotalSize = () => {
822
- var i, t;
823
- return (i = (t = e.getCenterHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, o) => n + o.getSize(), 0)) != null ? i : 0;
1075
+ var r, t;
1076
+ return (r = (t = e.getCenterHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, i) => n + i.getSize(), 0)) != null ? r : 0;
824
1077
  }, e.getRightTotalSize = () => {
825
- var i, t;
826
- return (i = (t = e.getRightHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, o) => n + o.getSize(), 0)) != null ? i : 0;
1078
+ var r, t;
1079
+ return (r = (t = e.getRightHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, i) => n + i.getSize(), 0)) != null ? r : 0;
827
1080
  };
828
1081
  }
829
1082
  };
830
- let ue = null;
831
- function Qt() {
832
- if (typeof ue == "boolean") return ue;
1083
+ let de = null;
1084
+ function on() {
1085
+ if (typeof de == "boolean") return de;
833
1086
  let e = !1;
834
1087
  try {
835
- const i = {
1088
+ const r = {
836
1089
  get passive() {
837
1090
  return e = !0, !1;
838
1091
  }
839
1092
  }, t = () => {
840
1093
  };
841
- window.addEventListener("test", t, i), window.removeEventListener("test", t);
1094
+ window.addEventListener("test", t, r), window.removeEventListener("test", t);
842
1095
  } catch {
843
1096
  e = !1;
844
1097
  }
845
- return ue = e, ue;
1098
+ return de = e, de;
846
1099
  }
847
- function Ce(e) {
1100
+ function _e(e) {
848
1101
  return e.type === "touchstart";
849
1102
  }
850
- const Yt = {
1103
+ const sn = {
851
1104
  getInitialState: (e) => ({
852
1105
  columnVisibility: {},
853
1106
  ...e
854
1107
  }),
855
1108
  getDefaultOptions: (e) => ({
856
- onColumnVisibilityChange: b("columnVisibility", e)
1109
+ onColumnVisibilityChange: P("columnVisibility", e)
857
1110
  }),
858
- createColumn: (e, i) => {
1111
+ createColumn: (e, r) => {
859
1112
  e.toggleVisibility = (t) => {
860
- e.getCanHide() && i.setColumnVisibility((n) => ({
1113
+ e.getCanHide() && r.setColumnVisibility((n) => ({
861
1114
  ...n,
862
1115
  [e.id]: t ?? !e.getIsVisible()
863
1116
  }));
864
1117
  }, e.getIsVisible = () => {
865
1118
  var t, n;
866
- const o = e.columns;
867
- return (t = o.length ? o.some((r) => r.getIsVisible()) : (n = i.getState().columnVisibility) == null ? void 0 : n[e.id]) != null ? t : !0;
1119
+ const i = e.columns;
1120
+ return (t = i.length ? i.some((o) => o.getIsVisible()) : (n = r.getState().columnVisibility) == null ? void 0 : n[e.id]) != null ? t : !0;
868
1121
  }, e.getCanHide = () => {
869
1122
  var t, n;
870
- return ((t = e.columnDef.enableHiding) != null ? t : !0) && ((n = i.options.enableHiding) != null ? n : !0);
1123
+ return ((t = e.columnDef.enableHiding) != null ? t : !0) && ((n = r.options.enableHiding) != null ? n : !0);
871
1124
  }, e.getToggleVisibilityHandler = () => (t) => {
872
1125
  e.toggleVisibility == null || e.toggleVisibility(t.target.checked);
873
1126
  };
874
1127
  },
875
- createRow: (e, i) => {
876
- e._getAllVisibleCells = C(() => [e.getAllCells(), i.getState().columnVisibility], (t) => t.filter((n) => n.column.getIsVisible()), x(i.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = C(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, n, o) => [...t, ...n, ...o], x(i.options, "debugRows", "getVisibleCells"));
1128
+ createRow: (e, r) => {
1129
+ e._getAllVisibleCells = C(() => [e.getAllCells(), r.getState().columnVisibility], (t) => t.filter((n) => n.column.getIsVisible()), x(r.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = C(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, n, i) => [...t, ...n, ...i], x(r.options, "debugRows", "getVisibleCells"));
877
1130
  },
878
1131
  createTable: (e) => {
879
- const i = (t, n) => C(() => [n(), n().filter((o) => o.getIsVisible()).map((o) => o.id).join("_")], (o) => o.filter((r) => r.getIsVisible == null ? void 0 : r.getIsVisible()), x(e.options, "debugColumns", t));
880
- e.getVisibleFlatColumns = i("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = i("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = i("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = i("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = i("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (t) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(t), e.resetColumnVisibility = (t) => {
1132
+ const r = (t, n) => C(() => [n(), n().filter((i) => i.getIsVisible()).map((i) => i.id).join("_")], (i) => i.filter((o) => o.getIsVisible == null ? void 0 : o.getIsVisible()), x(e.options, "debugColumns", t));
1133
+ e.getVisibleFlatColumns = r("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = r("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = r("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = r("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = r("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (t) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(t), e.resetColumnVisibility = (t) => {
881
1134
  var n;
882
1135
  e.setColumnVisibility(t ? {} : (n = e.initialState.columnVisibility) != null ? n : {});
883
1136
  }, e.toggleAllColumnsVisible = (t) => {
884
1137
  var n;
885
- t = (n = t) != null ? n : !e.getIsAllColumnsVisible(), e.setColumnVisibility(e.getAllLeafColumns().reduce((o, r) => ({
886
- ...o,
887
- [r.id]: t || !(r.getCanHide != null && r.getCanHide())
1138
+ t = (n = t) != null ? n : !e.getIsAllColumnsVisible(), e.setColumnVisibility(e.getAllLeafColumns().reduce((i, o) => ({
1139
+ ...i,
1140
+ [o.id]: t || !(o.getCanHide != null && o.getCanHide())
888
1141
  }), {}));
889
1142
  }, e.getIsAllColumnsVisible = () => !e.getAllLeafColumns().some((t) => !(t.getIsVisible != null && t.getIsVisible())), e.getIsSomeColumnsVisible = () => e.getAllLeafColumns().some((t) => t.getIsVisible == null ? void 0 : t.getIsVisible()), e.getToggleAllColumnsVisibilityHandler = () => (t) => {
890
1143
  var n;
@@ -892,69 +1145,69 @@ const Yt = {
892
1145
  };
893
1146
  }
894
1147
  };
895
- function ee(e, i) {
896
- return i ? i === "center" ? e.getCenterVisibleLeafColumns() : i === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
1148
+ function re(e, r) {
1149
+ return r ? r === "center" ? e.getCenterVisibleLeafColumns() : r === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
897
1150
  }
898
- const Zt = {
1151
+ const ln = {
899
1152
  createTable: (e) => {
900
1153
  e._getGlobalFacetedRowModel = e.options.getFacetedRowModel && e.options.getFacetedRowModel(e, "__global__"), e.getGlobalFacetedRowModel = () => e.options.manualFiltering || !e._getGlobalFacetedRowModel ? e.getPreFilteredRowModel() : e._getGlobalFacetedRowModel(), e._getGlobalFacetedUniqueValues = e.options.getFacetedUniqueValues && e.options.getFacetedUniqueValues(e, "__global__"), e.getGlobalFacetedUniqueValues = () => e._getGlobalFacetedUniqueValues ? e._getGlobalFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getGlobalFacetedMinMaxValues = e.options.getFacetedMinMaxValues && e.options.getFacetedMinMaxValues(e, "__global__"), e.getGlobalFacetedMinMaxValues = () => {
901
1154
  if (e._getGlobalFacetedMinMaxValues)
902
1155
  return e._getGlobalFacetedMinMaxValues();
903
1156
  };
904
1157
  }
905
- }, en = {
1158
+ }, an = {
906
1159
  getInitialState: (e) => ({
907
1160
  globalFilter: void 0,
908
1161
  ...e
909
1162
  }),
910
1163
  getDefaultOptions: (e) => ({
911
- onGlobalFilterChange: b("globalFilter", e),
1164
+ onGlobalFilterChange: P("globalFilter", e),
912
1165
  globalFilterFn: "auto",
913
- getColumnCanGlobalFilter: (i) => {
1166
+ getColumnCanGlobalFilter: (r) => {
914
1167
  var t;
915
- const n = (t = e.getCoreRowModel().flatRows[0]) == null || (t = t._getAllCellsByColumnId()[i.id]) == null ? void 0 : t.getValue();
1168
+ const n = (t = e.getCoreRowModel().flatRows[0]) == null || (t = t._getAllCellsByColumnId()[r.id]) == null ? void 0 : t.getValue();
916
1169
  return typeof n == "string" || typeof n == "number";
917
1170
  }
918
1171
  }),
919
- createColumn: (e, i) => {
1172
+ createColumn: (e, r) => {
920
1173
  e.getCanGlobalFilter = () => {
921
- var t, n, o, r;
922
- return ((t = e.columnDef.enableGlobalFilter) != null ? t : !0) && ((n = i.options.enableGlobalFilter) != null ? n : !0) && ((o = i.options.enableFilters) != null ? o : !0) && ((r = i.options.getColumnCanGlobalFilter == null ? void 0 : i.options.getColumnCanGlobalFilter(e)) != null ? r : !0) && !!e.accessorFn;
1174
+ var t, n, i, o;
1175
+ return ((t = e.columnDef.enableGlobalFilter) != null ? t : !0) && ((n = r.options.enableGlobalFilter) != null ? n : !0) && ((i = r.options.enableFilters) != null ? i : !0) && ((o = r.options.getColumnCanGlobalFilter == null ? void 0 : r.options.getColumnCanGlobalFilter(e)) != null ? o : !0) && !!e.accessorFn;
923
1176
  };
924
1177
  },
925
1178
  createTable: (e) => {
926
- e.getGlobalAutoFilterFn = () => N.includesString, e.getGlobalFilterFn = () => {
927
- var i, t;
1179
+ e.getGlobalAutoFilterFn = () => A.includesString, e.getGlobalFilterFn = () => {
1180
+ var r, t;
928
1181
  const {
929
1182
  globalFilterFn: n
930
1183
  } = e.options;
931
- return pe(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (i = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? i : N[n];
932
- }, e.setGlobalFilter = (i) => {
933
- e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(i);
934
- }, e.resetGlobalFilter = (i) => {
935
- e.setGlobalFilter(i ? void 0 : e.initialState.globalFilter);
1184
+ return me(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (r = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? r : A[n];
1185
+ }, e.setGlobalFilter = (r) => {
1186
+ e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(r);
1187
+ }, e.resetGlobalFilter = (r) => {
1188
+ e.setGlobalFilter(r ? void 0 : e.initialState.globalFilter);
936
1189
  };
937
1190
  }
938
- }, tn = {
1191
+ }, un = {
939
1192
  getInitialState: (e) => ({
940
1193
  expanded: {},
941
1194
  ...e
942
1195
  }),
943
1196
  getDefaultOptions: (e) => ({
944
- onExpandedChange: b("expanded", e),
1197
+ onExpandedChange: P("expanded", e),
945
1198
  paginateExpandedRows: !0
946
1199
  }),
947
1200
  createTable: (e) => {
948
- let i = !1, t = !1;
1201
+ let r = !1, t = !1;
949
1202
  e._autoResetExpanded = () => {
950
- var n, o;
951
- if (!i) {
1203
+ var n, i;
1204
+ if (!r) {
952
1205
  e._queue(() => {
953
- i = !0;
1206
+ r = !0;
954
1207
  });
955
1208
  return;
956
1209
  }
957
- if ((n = (o = e.options.autoResetAll) != null ? o : e.options.autoResetExpanded) != null ? n : !e.options.manualExpanding) {
1210
+ if ((n = (i = e.options.autoResetAll) != null ? i : e.options.autoResetExpanded) != null ? n : !e.options.manualExpanding) {
958
1211
  if (t) return;
959
1212
  t = !0, e._queue(() => {
960
1213
  e.resetExpanded(), t = !1;
@@ -963,8 +1216,8 @@ const Zt = {
963
1216
  }, e.setExpanded = (n) => e.options.onExpandedChange == null ? void 0 : e.options.onExpandedChange(n), e.toggleAllRowsExpanded = (n) => {
964
1217
  n ?? !e.getIsAllRowsExpanded() ? e.setExpanded(!0) : e.setExpanded({});
965
1218
  }, e.resetExpanded = (n) => {
966
- var o, r;
967
- e.setExpanded(n ? {} : (o = (r = e.initialState) == null ? void 0 : r.expanded) != null ? o : {});
1219
+ var i, o;
1220
+ e.setExpanded(n ? {} : (i = (o = e.initialState) == null ? void 0 : o.expanded) != null ? i : {});
968
1221
  }, e.getCanSomeRowsExpand = () => e.getPrePaginationRowModel().flatRows.some((n) => n.getCanExpand()), e.getToggleAllRowsExpandedHandler = () => (n) => {
969
1222
  n.persist == null || n.persist(), e.toggleAllRowsExpanded();
970
1223
  }, e.getIsSomeRowsExpanded = () => {
@@ -972,29 +1225,29 @@ const Zt = {
972
1225
  return n === !0 || Object.values(n).some(Boolean);
973
1226
  }, e.getIsAllRowsExpanded = () => {
974
1227
  const n = e.getState().expanded;
975
- return typeof n == "boolean" ? n === !0 : !(!Object.keys(n).length || e.getRowModel().flatRows.some((o) => !o.getIsExpanded()));
1228
+ return typeof n == "boolean" ? n === !0 : !(!Object.keys(n).length || e.getRowModel().flatRows.some((i) => !i.getIsExpanded()));
976
1229
  }, e.getExpandedDepth = () => {
977
1230
  let n = 0;
978
- return (e.getState().expanded === !0 ? Object.keys(e.getRowModel().rowsById) : Object.keys(e.getState().expanded)).forEach((r) => {
979
- const s = r.split(".");
1231
+ return (e.getState().expanded === !0 ? Object.keys(e.getRowModel().rowsById) : Object.keys(e.getState().expanded)).forEach((o) => {
1232
+ const s = o.split(".");
980
1233
  n = Math.max(n, s.length);
981
1234
  }), n;
982
1235
  }, e.getPreExpandedRowModel = () => e.getSortedRowModel(), e.getExpandedRowModel = () => (!e._getExpandedRowModel && e.options.getExpandedRowModel && (e._getExpandedRowModel = e.options.getExpandedRowModel(e)), e.options.manualExpanding || !e._getExpandedRowModel ? e.getPreExpandedRowModel() : e._getExpandedRowModel());
983
1236
  },
984
- createRow: (e, i) => {
1237
+ createRow: (e, r) => {
985
1238
  e.toggleExpanded = (t) => {
986
- i.setExpanded((n) => {
987
- var o;
988
- const r = n === !0 ? !0 : !!(n != null && n[e.id]);
1239
+ r.setExpanded((n) => {
1240
+ var i;
1241
+ const o = n === !0 ? !0 : !!(n != null && n[e.id]);
989
1242
  let s = {};
990
- if (n === !0 ? Object.keys(i.getRowModel().rowsById).forEach((l) => {
1243
+ if (n === !0 ? Object.keys(r.getRowModel().rowsById).forEach((l) => {
991
1244
  s[l] = !0;
992
- }) : s = n, t = (o = t) != null ? o : !r, !r && t)
1245
+ }) : s = n, t = (i = t) != null ? i : !o, !o && t)
993
1246
  return {
994
1247
  ...s,
995
1248
  [e.id]: !0
996
1249
  };
997
- if (r && !t) {
1250
+ if (o && !t) {
998
1251
  const {
999
1252
  [e.id]: l,
1000
1253
  ...a
@@ -1005,15 +1258,15 @@ const Zt = {
1005
1258
  });
1006
1259
  }, e.getIsExpanded = () => {
1007
1260
  var t;
1008
- const n = i.getState().expanded;
1009
- return !!((t = i.options.getIsRowExpanded == null ? void 0 : i.options.getIsRowExpanded(e)) != null ? t : n === !0 || n != null && n[e.id]);
1261
+ const n = r.getState().expanded;
1262
+ return !!((t = r.options.getIsRowExpanded == null ? void 0 : r.options.getIsRowExpanded(e)) != null ? t : n === !0 || n != null && n[e.id]);
1010
1263
  }, e.getCanExpand = () => {
1011
- var t, n, o;
1012
- return (t = i.options.getRowCanExpand == null ? void 0 : i.options.getRowCanExpand(e)) != null ? t : ((n = i.options.enableExpanding) != null ? n : !0) && !!((o = e.subRows) != null && o.length);
1264
+ var t, n, i;
1265
+ return (t = r.options.getRowCanExpand == null ? void 0 : r.options.getRowCanExpand(e)) != null ? t : ((n = r.options.enableExpanding) != null ? n : !0) && !!((i = e.subRows) != null && i.length);
1013
1266
  }, e.getIsAllParentsExpanded = () => {
1014
1267
  let t = !0, n = e;
1015
1268
  for (; t && n.parentId; )
1016
- n = i.getRow(n.parentId, !0), t = n.getIsExpanded();
1269
+ n = r.getRow(n.parentId, !0), t = n.getIsExpanded();
1017
1270
  return t;
1018
1271
  }, e.getToggleExpandedHandler = () => {
1019
1272
  const t = e.getCanExpand();
@@ -1022,81 +1275,81 @@ const Zt = {
1022
1275
  };
1023
1276
  };
1024
1277
  }
1025
- }, _e = 0, Fe = 10, xe = () => ({
1026
- pageIndex: _e,
1027
- pageSize: Fe
1028
- }), nn = {
1278
+ }, Ie = 0, Ee = 10, Fe = () => ({
1279
+ pageIndex: Ie,
1280
+ pageSize: Ee
1281
+ }), dn = {
1029
1282
  getInitialState: (e) => ({
1030
1283
  ...e,
1031
1284
  pagination: {
1032
- ...xe(),
1285
+ ...Fe(),
1033
1286
  ...e == null ? void 0 : e.pagination
1034
1287
  }
1035
1288
  }),
1036
1289
  getDefaultOptions: (e) => ({
1037
- onPaginationChange: b("pagination", e)
1290
+ onPaginationChange: P("pagination", e)
1038
1291
  }),
1039
1292
  createTable: (e) => {
1040
- let i = !1, t = !1;
1293
+ let r = !1, t = !1;
1041
1294
  e._autoResetPageIndex = () => {
1042
- var n, o;
1043
- if (!i) {
1295
+ var n, i;
1296
+ if (!r) {
1044
1297
  e._queue(() => {
1045
- i = !0;
1298
+ r = !0;
1046
1299
  });
1047
1300
  return;
1048
1301
  }
1049
- if ((n = (o = e.options.autoResetAll) != null ? o : e.options.autoResetPageIndex) != null ? n : !e.options.manualPagination) {
1302
+ if ((n = (i = e.options.autoResetAll) != null ? i : e.options.autoResetPageIndex) != null ? n : !e.options.manualPagination) {
1050
1303
  if (t) return;
1051
1304
  t = !0, e._queue(() => {
1052
1305
  e.resetPageIndex(), t = !1;
1053
1306
  });
1054
1307
  }
1055
1308
  }, e.setPagination = (n) => {
1056
- const o = (r) => H(n, r);
1057
- return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(o);
1309
+ const i = (o) => H(n, o);
1310
+ return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(i);
1058
1311
  }, e.resetPagination = (n) => {
1059
- var o;
1060
- e.setPagination(n ? xe() : (o = e.initialState.pagination) != null ? o : xe());
1312
+ var i;
1313
+ e.setPagination(n ? Fe() : (i = e.initialState.pagination) != null ? i : Fe());
1061
1314
  }, e.setPageIndex = (n) => {
1062
- e.setPagination((o) => {
1063
- let r = H(n, o.pageIndex);
1315
+ e.setPagination((i) => {
1316
+ let o = H(n, i.pageIndex);
1064
1317
  const s = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
1065
- return r = Math.max(0, Math.min(r, s)), {
1066
- ...o,
1067
- pageIndex: r
1318
+ return o = Math.max(0, Math.min(o, s)), {
1319
+ ...i,
1320
+ pageIndex: o
1068
1321
  };
1069
1322
  });
1070
1323
  }, e.resetPageIndex = (n) => {
1071
- var o, r;
1072
- e.setPageIndex(n ? _e : (o = (r = e.initialState) == null || (r = r.pagination) == null ? void 0 : r.pageIndex) != null ? o : _e);
1324
+ var i, o;
1325
+ e.setPageIndex(n ? Ie : (i = (o = e.initialState) == null || (o = o.pagination) == null ? void 0 : o.pageIndex) != null ? i : Ie);
1073
1326
  }, e.resetPageSize = (n) => {
1074
- var o, r;
1075
- e.setPageSize(n ? Fe : (o = (r = e.initialState) == null || (r = r.pagination) == null ? void 0 : r.pageSize) != null ? o : Fe);
1327
+ var i, o;
1328
+ e.setPageSize(n ? Ee : (i = (o = e.initialState) == null || (o = o.pagination) == null ? void 0 : o.pageSize) != null ? i : Ee);
1076
1329
  }, e.setPageSize = (n) => {
1077
- e.setPagination((o) => {
1078
- const r = Math.max(1, H(n, o.pageSize)), s = o.pageSize * o.pageIndex, l = Math.floor(s / r);
1330
+ e.setPagination((i) => {
1331
+ const o = Math.max(1, H(n, i.pageSize)), s = i.pageSize * i.pageIndex, l = Math.floor(s / o);
1079
1332
  return {
1080
- ...o,
1333
+ ...i,
1081
1334
  pageIndex: l,
1082
- pageSize: r
1335
+ pageSize: o
1083
1336
  };
1084
1337
  });
1085
- }, e.setPageCount = (n) => e.setPagination((o) => {
1086
- var r;
1087
- let s = H(n, (r = e.options.pageCount) != null ? r : -1);
1338
+ }, e.setPageCount = (n) => e.setPagination((i) => {
1339
+ var o;
1340
+ let s = H(n, (o = e.options.pageCount) != null ? o : -1);
1088
1341
  return typeof s == "number" && (s = Math.max(-1, s)), {
1089
- ...o,
1342
+ ...i,
1090
1343
  pageCount: s
1091
1344
  };
1092
1345
  }), e.getPageOptions = C(() => [e.getPageCount()], (n) => {
1093
- let o = [];
1094
- return n && n > 0 && (o = [...new Array(n)].fill(null).map((r, s) => s)), o;
1346
+ let i = [];
1347
+ return n && n > 0 && (i = [...new Array(n)].fill(null).map((o, s) => s)), i;
1095
1348
  }, x(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
1096
1349
  const {
1097
1350
  pageIndex: n
1098
- } = e.getState().pagination, o = e.getPageCount();
1099
- return o === -1 ? !0 : o === 0 ? !1 : n < o - 1;
1351
+ } = e.getState().pagination, i = e.getPageCount();
1352
+ return i === -1 ? !0 : i === 0 ? !1 : n < i - 1;
1100
1353
  }, e.previousPage = () => e.setPageIndex((n) => n - 1), e.nextPage = () => e.setPageIndex((n) => n + 1), e.firstPage = () => e.setPageIndex(0), e.lastPage = () => e.setPageIndex(e.getPageCount() - 1), e.getPrePaginationRowModel = () => e.getExpandedRowModel(), e.getPaginationRowModel = () => (!e._getPaginationRowModel && e.options.getPaginationRowModel && (e._getPaginationRowModel = e.options.getPaginationRowModel(e)), e.options.manualPagination || !e._getPaginationRowModel ? e.getPrePaginationRowModel() : e._getPaginationRowModel()), e.getPageCount = () => {
1101
1354
  var n;
1102
1355
  return (n = e.options.pageCount) != null ? n : Math.ceil(e.getRowCount() / e.getState().pagination.pageSize);
@@ -1105,92 +1358,92 @@ const Zt = {
1105
1358
  return (n = e.options.rowCount) != null ? n : e.getPrePaginationRowModel().rows.length;
1106
1359
  };
1107
1360
  }
1108
- }, Re = () => ({
1361
+ }, Me = () => ({
1109
1362
  top: [],
1110
1363
  bottom: []
1111
- }), on = {
1364
+ }), gn = {
1112
1365
  getInitialState: (e) => ({
1113
- rowPinning: Re(),
1366
+ rowPinning: Me(),
1114
1367
  ...e
1115
1368
  }),
1116
1369
  getDefaultOptions: (e) => ({
1117
- onRowPinningChange: b("rowPinning", e)
1370
+ onRowPinningChange: P("rowPinning", e)
1118
1371
  }),
1119
- createRow: (e, i) => {
1120
- e.pin = (t, n, o) => {
1121
- const r = n ? e.getLeafRows().map((a) => {
1372
+ createRow: (e, r) => {
1373
+ e.pin = (t, n, i) => {
1374
+ const o = n ? e.getLeafRows().map((a) => {
1122
1375
  let {
1123
1376
  id: u
1124
1377
  } = a;
1125
1378
  return u;
1126
- }) : [], s = o ? e.getParentRows().map((a) => {
1379
+ }) : [], s = i ? e.getParentRows().map((a) => {
1127
1380
  let {
1128
1381
  id: u
1129
1382
  } = a;
1130
1383
  return u;
1131
- }) : [], l = /* @__PURE__ */ new Set([...s, e.id, ...r]);
1132
- i.setRowPinning((a) => {
1133
- var u, g;
1384
+ }) : [], l = /* @__PURE__ */ new Set([...s, e.id, ...o]);
1385
+ r.setRowPinning((a) => {
1386
+ var u, f;
1134
1387
  if (t === "bottom") {
1135
1388
  var m, c;
1136
1389
  return {
1137
- top: ((m = a == null ? void 0 : a.top) != null ? m : []).filter((h) => !(l != null && l.has(h))),
1138
- bottom: [...((c = a == null ? void 0 : a.bottom) != null ? c : []).filter((h) => !(l != null && l.has(h))), ...Array.from(l)]
1390
+ top: ((m = a == null ? void 0 : a.top) != null ? m : []).filter((p) => !(l != null && l.has(p))),
1391
+ bottom: [...((c = a == null ? void 0 : a.bottom) != null ? c : []).filter((p) => !(l != null && l.has(p))), ...Array.from(l)]
1139
1392
  };
1140
1393
  }
1141
1394
  if (t === "top") {
1142
- var d, p;
1395
+ var d, g;
1143
1396
  return {
1144
- top: [...((d = a == null ? void 0 : a.top) != null ? d : []).filter((h) => !(l != null && l.has(h))), ...Array.from(l)],
1145
- bottom: ((p = a == null ? void 0 : a.bottom) != null ? p : []).filter((h) => !(l != null && l.has(h)))
1397
+ top: [...((d = a == null ? void 0 : a.top) != null ? d : []).filter((p) => !(l != null && l.has(p))), ...Array.from(l)],
1398
+ bottom: ((g = a == null ? void 0 : a.bottom) != null ? g : []).filter((p) => !(l != null && l.has(p)))
1146
1399
  };
1147
1400
  }
1148
1401
  return {
1149
- top: ((u = a == null ? void 0 : a.top) != null ? u : []).filter((h) => !(l != null && l.has(h))),
1150
- bottom: ((g = a == null ? void 0 : a.bottom) != null ? g : []).filter((h) => !(l != null && l.has(h)))
1402
+ top: ((u = a == null ? void 0 : a.top) != null ? u : []).filter((p) => !(l != null && l.has(p))),
1403
+ bottom: ((f = a == null ? void 0 : a.bottom) != null ? f : []).filter((p) => !(l != null && l.has(p)))
1151
1404
  };
1152
1405
  });
1153
1406
  }, e.getCanPin = () => {
1154
1407
  var t;
1155
1408
  const {
1156
1409
  enableRowPinning: n,
1157
- enablePinning: o
1158
- } = i.options;
1159
- return typeof n == "function" ? n(e) : (t = n ?? o) != null ? t : !0;
1410
+ enablePinning: i
1411
+ } = r.options;
1412
+ return typeof n == "function" ? n(e) : (t = n ?? i) != null ? t : !0;
1160
1413
  }, e.getIsPinned = () => {
1161
1414
  const t = [e.id], {
1162
1415
  top: n,
1163
- bottom: o
1164
- } = i.getState().rowPinning, r = t.some((l) => n == null ? void 0 : n.includes(l)), s = t.some((l) => o == null ? void 0 : o.includes(l));
1165
- return r ? "top" : s ? "bottom" : !1;
1416
+ bottom: i
1417
+ } = r.getState().rowPinning, o = t.some((l) => n == null ? void 0 : n.includes(l)), s = t.some((l) => i == null ? void 0 : i.includes(l));
1418
+ return o ? "top" : s ? "bottom" : !1;
1166
1419
  }, e.getPinnedIndex = () => {
1167
1420
  var t, n;
1168
- const o = e.getIsPinned();
1169
- if (!o) return -1;
1170
- const r = (t = o === "top" ? i.getTopRows() : i.getBottomRows()) == null ? void 0 : t.map((s) => {
1421
+ const i = e.getIsPinned();
1422
+ if (!i) return -1;
1423
+ const o = (t = i === "top" ? r.getTopRows() : r.getBottomRows()) == null ? void 0 : t.map((s) => {
1171
1424
  let {
1172
1425
  id: l
1173
1426
  } = s;
1174
1427
  return l;
1175
1428
  });
1176
- return (n = r == null ? void 0 : r.indexOf(e.id)) != null ? n : -1;
1429
+ return (n = o == null ? void 0 : o.indexOf(e.id)) != null ? n : -1;
1177
1430
  };
1178
1431
  },
1179
1432
  createTable: (e) => {
1180
- e.setRowPinning = (i) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(i), e.resetRowPinning = (i) => {
1433
+ e.setRowPinning = (r) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(r), e.resetRowPinning = (r) => {
1181
1434
  var t, n;
1182
- return e.setRowPinning(i ? Re() : (t = (n = e.initialState) == null ? void 0 : n.rowPinning) != null ? t : Re());
1183
- }, e.getIsSomeRowsPinned = (i) => {
1435
+ return e.setRowPinning(r ? Me() : (t = (n = e.initialState) == null ? void 0 : n.rowPinning) != null ? t : Me());
1436
+ }, e.getIsSomeRowsPinned = (r) => {
1184
1437
  var t;
1185
1438
  const n = e.getState().rowPinning;
1186
- if (!i) {
1187
- var o, r;
1188
- return !!((o = n.top) != null && o.length || (r = n.bottom) != null && r.length);
1439
+ if (!r) {
1440
+ var i, o;
1441
+ return !!((i = n.top) != null && i.length || (o = n.bottom) != null && o.length);
1189
1442
  }
1190
- return !!((t = n[i]) != null && t.length);
1191
- }, e._getPinnedRows = (i, t, n) => {
1192
- var o;
1193
- return ((o = e.options.keepPinnedRows) == null || o ? (
1443
+ return !!((t = n[r]) != null && t.length);
1444
+ }, e._getPinnedRows = (r, t, n) => {
1445
+ var i;
1446
+ return ((i = e.options.keepPinnedRows) == null || i ? (
1194
1447
  //get all rows that are pinned even if they would not be otherwise visible
1195
1448
  //account for expanded parent rows, but not pagination or filtering
1196
1449
  (t ?? []).map((s) => {
@@ -1199,23 +1452,23 @@ const Zt = {
1199
1452
  })
1200
1453
  ) : (
1201
1454
  //else get only visible rows that are pinned
1202
- (t ?? []).map((s) => i.find((l) => l.id === s))
1455
+ (t ?? []).map((s) => r.find((l) => l.id === s))
1203
1456
  )).filter(Boolean).map((s) => ({
1204
1457
  ...s,
1205
1458
  position: n
1206
1459
  }));
1207
- }, e.getTopRows = C(() => [e.getRowModel().rows, e.getState().rowPinning.top], (i, t) => e._getPinnedRows(i, t, "top"), x(e.options, "debugRows", "getTopRows")), e.getBottomRows = C(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (i, t) => e._getPinnedRows(i, t, "bottom"), x(e.options, "debugRows", "getBottomRows")), e.getCenterRows = C(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (i, t, n) => {
1208
- const o = /* @__PURE__ */ new Set([...t ?? [], ...n ?? []]);
1209
- return i.filter((r) => !o.has(r.id));
1460
+ }, e.getTopRows = C(() => [e.getRowModel().rows, e.getState().rowPinning.top], (r, t) => e._getPinnedRows(r, t, "top"), x(e.options, "debugRows", "getTopRows")), e.getBottomRows = C(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (r, t) => e._getPinnedRows(r, t, "bottom"), x(e.options, "debugRows", "getBottomRows")), e.getCenterRows = C(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (r, t, n) => {
1461
+ const i = /* @__PURE__ */ new Set([...t ?? [], ...n ?? []]);
1462
+ return r.filter((o) => !i.has(o.id));
1210
1463
  }, x(e.options, "debugRows", "getCenterRows"));
1211
1464
  }
1212
- }, rn = {
1465
+ }, cn = {
1213
1466
  getInitialState: (e) => ({
1214
1467
  rowSelection: {},
1215
1468
  ...e
1216
1469
  }),
1217
1470
  getDefaultOptions: (e) => ({
1218
- onRowSelectionChange: b("rowSelection", e),
1471
+ onRowSelectionChange: P("rowSelection", e),
1219
1472
  enableRowSelection: !0,
1220
1473
  enableMultiRowSelection: !0,
1221
1474
  enableSubRowSelection: !0
@@ -1224,165 +1477,165 @@ const Zt = {
1224
1477
  // isInclusiveSelectEvent: (e: unknown) => !!e.shiftKey,
1225
1478
  }),
1226
1479
  createTable: (e) => {
1227
- e.setRowSelection = (i) => e.options.onRowSelectionChange == null ? void 0 : e.options.onRowSelectionChange(i), e.resetRowSelection = (i) => {
1480
+ e.setRowSelection = (r) => e.options.onRowSelectionChange == null ? void 0 : e.options.onRowSelectionChange(r), e.resetRowSelection = (r) => {
1228
1481
  var t;
1229
- return e.setRowSelection(i ? {} : (t = e.initialState.rowSelection) != null ? t : {});
1230
- }, e.toggleAllRowsSelected = (i) => {
1482
+ return e.setRowSelection(r ? {} : (t = e.initialState.rowSelection) != null ? t : {});
1483
+ }, e.toggleAllRowsSelected = (r) => {
1231
1484
  e.setRowSelection((t) => {
1232
- i = typeof i < "u" ? i : !e.getIsAllRowsSelected();
1485
+ r = typeof r < "u" ? r : !e.getIsAllRowsSelected();
1233
1486
  const n = {
1234
1487
  ...t
1235
- }, o = e.getPreGroupedRowModel().flatRows;
1236
- return i ? o.forEach((r) => {
1237
- r.getCanSelect() && (n[r.id] = !0);
1238
- }) : o.forEach((r) => {
1239
- delete n[r.id];
1488
+ }, i = e.getPreGroupedRowModel().flatRows;
1489
+ return r ? i.forEach((o) => {
1490
+ o.getCanSelect() && (n[o.id] = !0);
1491
+ }) : i.forEach((o) => {
1492
+ delete n[o.id];
1240
1493
  }), n;
1241
1494
  });
1242
- }, e.toggleAllPageRowsSelected = (i) => e.setRowSelection((t) => {
1243
- const n = typeof i < "u" ? i : !e.getIsAllPageRowsSelected(), o = {
1495
+ }, e.toggleAllPageRowsSelected = (r) => e.setRowSelection((t) => {
1496
+ const n = typeof r < "u" ? r : !e.getIsAllPageRowsSelected(), i = {
1244
1497
  ...t
1245
1498
  };
1246
- return e.getRowModel().rows.forEach((r) => {
1247
- Me(o, r.id, n, !0, e);
1248
- }), o;
1249
- }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = C(() => [e.getState().rowSelection, e.getCoreRowModel()], (i, t) => Object.keys(i).length ? ye(e, t) : {
1499
+ return e.getRowModel().rows.forEach((o) => {
1500
+ be(i, o.id, n, !0, e);
1501
+ }), i;
1502
+ }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = C(() => [e.getState().rowSelection, e.getCoreRowModel()], (r, t) => Object.keys(r).length ? $e(e, t) : {
1250
1503
  rows: [],
1251
1504
  flatRows: [],
1252
1505
  rowsById: {}
1253
- }, x(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = C(() => [e.getState().rowSelection, e.getFilteredRowModel()], (i, t) => Object.keys(i).length ? ye(e, t) : {
1506
+ }, x(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = C(() => [e.getState().rowSelection, e.getFilteredRowModel()], (r, t) => Object.keys(r).length ? $e(e, t) : {
1254
1507
  rows: [],
1255
1508
  flatRows: [],
1256
1509
  rowsById: {}
1257
- }, x(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = C(() => [e.getState().rowSelection, e.getSortedRowModel()], (i, t) => Object.keys(i).length ? ye(e, t) : {
1510
+ }, x(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = C(() => [e.getState().rowSelection, e.getSortedRowModel()], (r, t) => Object.keys(r).length ? $e(e, t) : {
1258
1511
  rows: [],
1259
1512
  flatRows: [],
1260
1513
  rowsById: {}
1261
1514
  }, x(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
1262
- const i = e.getFilteredRowModel().flatRows, {
1515
+ const r = e.getFilteredRowModel().flatRows, {
1263
1516
  rowSelection: t
1264
1517
  } = e.getState();
1265
- let n = !!(i.length && Object.keys(t).length);
1266
- return n && i.some((o) => o.getCanSelect() && !t[o.id]) && (n = !1), n;
1518
+ let n = !!(r.length && Object.keys(t).length);
1519
+ return n && r.some((i) => i.getCanSelect() && !t[i.id]) && (n = !1), n;
1267
1520
  }, e.getIsAllPageRowsSelected = () => {
1268
- const i = e.getPaginationRowModel().flatRows.filter((o) => o.getCanSelect()), {
1521
+ const r = e.getPaginationRowModel().flatRows.filter((i) => i.getCanSelect()), {
1269
1522
  rowSelection: t
1270
1523
  } = e.getState();
1271
- let n = !!i.length;
1272
- return n && i.some((o) => !t[o.id]) && (n = !1), n;
1524
+ let n = !!r.length;
1525
+ return n && r.some((i) => !t[i.id]) && (n = !1), n;
1273
1526
  }, e.getIsSomeRowsSelected = () => {
1274
- var i;
1275
- const t = Object.keys((i = e.getState().rowSelection) != null ? i : {}).length;
1527
+ var r;
1528
+ const t = Object.keys((r = e.getState().rowSelection) != null ? r : {}).length;
1276
1529
  return t > 0 && t < e.getFilteredRowModel().flatRows.length;
1277
1530
  }, e.getIsSomePageRowsSelected = () => {
1278
- const i = e.getPaginationRowModel().flatRows;
1279
- return e.getIsAllPageRowsSelected() ? !1 : i.filter((t) => t.getCanSelect()).some((t) => t.getIsSelected() || t.getIsSomeSelected());
1280
- }, e.getToggleAllRowsSelectedHandler = () => (i) => {
1281
- e.toggleAllRowsSelected(i.target.checked);
1282
- }, e.getToggleAllPageRowsSelectedHandler = () => (i) => {
1283
- e.toggleAllPageRowsSelected(i.target.checked);
1531
+ const r = e.getPaginationRowModel().flatRows;
1532
+ return e.getIsAllPageRowsSelected() ? !1 : r.filter((t) => t.getCanSelect()).some((t) => t.getIsSelected() || t.getIsSomeSelected());
1533
+ }, e.getToggleAllRowsSelectedHandler = () => (r) => {
1534
+ e.toggleAllRowsSelected(r.target.checked);
1535
+ }, e.getToggleAllPageRowsSelectedHandler = () => (r) => {
1536
+ e.toggleAllPageRowsSelected(r.target.checked);
1284
1537
  };
1285
1538
  },
1286
- createRow: (e, i) => {
1539
+ createRow: (e, r) => {
1287
1540
  e.toggleSelected = (t, n) => {
1288
- const o = e.getIsSelected();
1289
- i.setRowSelection((r) => {
1541
+ const i = e.getIsSelected();
1542
+ r.setRowSelection((o) => {
1290
1543
  var s;
1291
- if (t = typeof t < "u" ? t : !o, e.getCanSelect() && o === t)
1292
- return r;
1544
+ if (t = typeof t < "u" ? t : !i, e.getCanSelect() && i === t)
1545
+ return o;
1293
1546
  const l = {
1294
- ...r
1547
+ ...o
1295
1548
  };
1296
- return Me(l, e.id, t, (s = n == null ? void 0 : n.selectChildren) != null ? s : !0, i), l;
1549
+ return be(l, e.id, t, (s = n == null ? void 0 : n.selectChildren) != null ? s : !0, r), l;
1297
1550
  });
1298
1551
  }, e.getIsSelected = () => {
1299
1552
  const {
1300
1553
  rowSelection: t
1301
- } = i.getState();
1302
- return Pe(e, t);
1554
+ } = r.getState();
1555
+ return Ne(e, t);
1303
1556
  }, e.getIsSomeSelected = () => {
1304
1557
  const {
1305
1558
  rowSelection: t
1306
- } = i.getState();
1307
- return $e(e, t) === "some";
1559
+ } = r.getState();
1560
+ return Ve(e, t) === "some";
1308
1561
  }, e.getIsAllSubRowsSelected = () => {
1309
1562
  const {
1310
1563
  rowSelection: t
1311
- } = i.getState();
1312
- return $e(e, t) === "all";
1564
+ } = r.getState();
1565
+ return Ve(e, t) === "all";
1313
1566
  }, e.getCanSelect = () => {
1314
1567
  var t;
1315
- return typeof i.options.enableRowSelection == "function" ? i.options.enableRowSelection(e) : (t = i.options.enableRowSelection) != null ? t : !0;
1568
+ return typeof r.options.enableRowSelection == "function" ? r.options.enableRowSelection(e) : (t = r.options.enableRowSelection) != null ? t : !0;
1316
1569
  }, e.getCanSelectSubRows = () => {
1317
1570
  var t;
1318
- return typeof i.options.enableSubRowSelection == "function" ? i.options.enableSubRowSelection(e) : (t = i.options.enableSubRowSelection) != null ? t : !0;
1571
+ return typeof r.options.enableSubRowSelection == "function" ? r.options.enableSubRowSelection(e) : (t = r.options.enableSubRowSelection) != null ? t : !0;
1319
1572
  }, e.getCanMultiSelect = () => {
1320
1573
  var t;
1321
- return typeof i.options.enableMultiRowSelection == "function" ? i.options.enableMultiRowSelection(e) : (t = i.options.enableMultiRowSelection) != null ? t : !0;
1574
+ return typeof r.options.enableMultiRowSelection == "function" ? r.options.enableMultiRowSelection(e) : (t = r.options.enableMultiRowSelection) != null ? t : !0;
1322
1575
  }, e.getToggleSelectedHandler = () => {
1323
1576
  const t = e.getCanSelect();
1324
1577
  return (n) => {
1325
- var o;
1326
- t && e.toggleSelected((o = n.target) == null ? void 0 : o.checked);
1578
+ var i;
1579
+ t && e.toggleSelected((i = n.target) == null ? void 0 : i.checked);
1327
1580
  };
1328
1581
  };
1329
1582
  }
1330
- }, Me = (e, i, t, n, o) => {
1331
- var r;
1332
- const s = o.getRow(i, !0);
1333
- t ? (s.getCanMultiSelect() || Object.keys(e).forEach((l) => delete e[l]), s.getCanSelect() && (e[i] = !0)) : delete e[i], n && (r = s.subRows) != null && r.length && s.getCanSelectSubRows() && s.subRows.forEach((l) => Me(e, l.id, t, n, o));
1583
+ }, be = (e, r, t, n, i) => {
1584
+ var o;
1585
+ const s = i.getRow(r, !0);
1586
+ t ? (s.getCanMultiSelect() || Object.keys(e).forEach((l) => delete e[l]), s.getCanSelect() && (e[r] = !0)) : delete e[r], n && (o = s.subRows) != null && o.length && s.getCanSelectSubRows() && s.subRows.forEach((l) => be(e, l.id, t, n, i));
1334
1587
  };
1335
- function ye(e, i) {
1336
- const t = e.getState().rowSelection, n = [], o = {}, r = function(s, l) {
1588
+ function $e(e, r) {
1589
+ const t = e.getState().rowSelection, n = [], i = {}, o = function(s, l) {
1337
1590
  return s.map((a) => {
1338
1591
  var u;
1339
- const g = Pe(a, t);
1340
- if (g && (n.push(a), o[a.id] = a), (u = a.subRows) != null && u.length && (a = {
1592
+ const f = Ne(a, t);
1593
+ if (f && (n.push(a), i[a.id] = a), (u = a.subRows) != null && u.length && (a = {
1341
1594
  ...a,
1342
- subRows: r(a.subRows)
1343
- }), g)
1595
+ subRows: o(a.subRows)
1596
+ }), f)
1344
1597
  return a;
1345
1598
  }).filter(Boolean);
1346
1599
  };
1347
1600
  return {
1348
- rows: r(i.rows),
1601
+ rows: o(r.rows),
1349
1602
  flatRows: n,
1350
- rowsById: o
1603
+ rowsById: i
1351
1604
  };
1352
1605
  }
1353
- function Pe(e, i) {
1606
+ function Ne(e, r) {
1354
1607
  var t;
1355
- return (t = i[e.id]) != null ? t : !1;
1608
+ return (t = r[e.id]) != null ? t : !1;
1356
1609
  }
1357
- function $e(e, i, t) {
1610
+ function Ve(e, r, t) {
1358
1611
  var n;
1359
1612
  if (!((n = e.subRows) != null && n.length)) return !1;
1360
- let o = !0, r = !1;
1613
+ let i = !0, o = !1;
1361
1614
  return e.subRows.forEach((s) => {
1362
- if (!(r && !o) && (s.getCanSelect() && (Pe(s, i) ? r = !0 : o = !1), s.subRows && s.subRows.length)) {
1363
- const l = $e(s, i);
1364
- l === "all" ? r = !0 : (l === "some" && (r = !0), o = !1);
1615
+ if (!(o && !i) && (s.getCanSelect() && (Ne(s, r) ? o = !0 : i = !1), s.subRows && s.subRows.length)) {
1616
+ const l = Ve(s, r);
1617
+ l === "all" ? o = !0 : (l === "some" && (o = !0), i = !1);
1365
1618
  }
1366
- }), o ? "all" : r ? "some" : !1;
1619
+ }), i ? "all" : o ? "some" : !1;
1367
1620
  }
1368
- const Ie = /([0-9]+)/gm, sn = (e, i, t) => ct(k(e.getValue(t)).toLowerCase(), k(i.getValue(t)).toLowerCase()), ln = (e, i, t) => ct(k(e.getValue(t)), k(i.getValue(t))), an = (e, i, t) => ze(k(e.getValue(t)).toLowerCase(), k(i.getValue(t)).toLowerCase()), un = (e, i, t) => ze(k(e.getValue(t)), k(i.getValue(t))), dn = (e, i, t) => {
1369
- const n = e.getValue(t), o = i.getValue(t);
1370
- return n > o ? 1 : n < o ? -1 : 0;
1371
- }, gn = (e, i, t) => ze(e.getValue(t), i.getValue(t));
1372
- function ze(e, i) {
1373
- return e === i ? 0 : e > i ? 1 : -1;
1621
+ const Pe = /([0-9]+)/gm, fn = (e, r, t) => ht(k(e.getValue(t)).toLowerCase(), k(r.getValue(t)).toLowerCase()), hn = (e, r, t) => ht(k(e.getValue(t)), k(r.getValue(t))), pn = (e, r, t) => Ae(k(e.getValue(t)).toLowerCase(), k(r.getValue(t)).toLowerCase()), mn = (e, r, t) => Ae(k(e.getValue(t)), k(r.getValue(t))), Sn = (e, r, t) => {
1622
+ const n = e.getValue(t), i = r.getValue(t);
1623
+ return n > i ? 1 : n < i ? -1 : 0;
1624
+ }, vn = (e, r, t) => Ae(e.getValue(t), r.getValue(t));
1625
+ function Ae(e, r) {
1626
+ return e === r ? 0 : e > r ? 1 : -1;
1374
1627
  }
1375
1628
  function k(e) {
1376
1629
  return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
1377
1630
  }
1378
- function ct(e, i) {
1379
- const t = e.split(Ie).filter(Boolean), n = i.split(Ie).filter(Boolean);
1631
+ function ht(e, r) {
1632
+ const t = e.split(Pe).filter(Boolean), n = r.split(Pe).filter(Boolean);
1380
1633
  for (; t.length && n.length; ) {
1381
- const o = t.shift(), r = n.shift(), s = parseInt(o, 10), l = parseInt(r, 10), a = [s, l].sort();
1634
+ const i = t.shift(), o = n.shift(), s = parseInt(i, 10), l = parseInt(o, 10), a = [s, l].sort();
1382
1635
  if (isNaN(a[0])) {
1383
- if (o > r)
1636
+ if (i > o)
1384
1637
  return 1;
1385
- if (r > o)
1638
+ if (o > i)
1386
1639
  return -1;
1387
1640
  continue;
1388
1641
  }
@@ -1395,14 +1648,14 @@ function ct(e, i) {
1395
1648
  }
1396
1649
  return t.length - n.length;
1397
1650
  }
1398
- const Q = {
1399
- alphanumeric: sn,
1400
- alphanumericCaseSensitive: ln,
1401
- text: an,
1402
- textCaseSensitive: un,
1403
- datetime: dn,
1404
- basic: gn
1405
- }, cn = {
1651
+ const ee = {
1652
+ alphanumeric: fn,
1653
+ alphanumericCaseSensitive: hn,
1654
+ text: pn,
1655
+ textCaseSensitive: mn,
1656
+ datetime: Sn,
1657
+ basic: vn
1658
+ }, wn = {
1406
1659
  getInitialState: (e) => ({
1407
1660
  sorting: [],
1408
1661
  ...e
@@ -1412,44 +1665,44 @@ const Q = {
1412
1665
  sortUndefined: 1
1413
1666
  }),
1414
1667
  getDefaultOptions: (e) => ({
1415
- onSortingChange: b("sorting", e),
1416
- isMultiSortEvent: (i) => i.shiftKey
1668
+ onSortingChange: P("sorting", e),
1669
+ isMultiSortEvent: (r) => r.shiftKey
1417
1670
  }),
1418
- createColumn: (e, i) => {
1671
+ createColumn: (e, r) => {
1419
1672
  e.getAutoSortingFn = () => {
1420
- const t = i.getFilteredRowModel().flatRows.slice(10);
1673
+ const t = r.getFilteredRowModel().flatRows.slice(10);
1421
1674
  let n = !1;
1422
- for (const o of t) {
1423
- const r = o == null ? void 0 : o.getValue(e.id);
1424
- if (Object.prototype.toString.call(r) === "[object Date]")
1425
- return Q.datetime;
1426
- if (typeof r == "string" && (n = !0, r.split(Ie).length > 1))
1427
- return Q.alphanumeric;
1675
+ for (const i of t) {
1676
+ const o = i == null ? void 0 : i.getValue(e.id);
1677
+ if (Object.prototype.toString.call(o) === "[object Date]")
1678
+ return ee.datetime;
1679
+ if (typeof o == "string" && (n = !0, o.split(Pe).length > 1))
1680
+ return ee.alphanumeric;
1428
1681
  }
1429
- return n ? Q.text : Q.basic;
1682
+ return n ? ee.text : ee.basic;
1430
1683
  }, e.getAutoSortDir = () => {
1431
- const t = i.getFilteredRowModel().flatRows[0];
1684
+ const t = r.getFilteredRowModel().flatRows[0];
1432
1685
  return typeof (t == null ? void 0 : t.getValue(e.id)) == "string" ? "asc" : "desc";
1433
1686
  }, e.getSortingFn = () => {
1434
1687
  var t, n;
1435
1688
  if (!e)
1436
1689
  throw new Error();
1437
- return pe(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (n = i.options.sortingFns) == null ? void 0 : n[e.columnDef.sortingFn]) != null ? t : Q[e.columnDef.sortingFn];
1690
+ return me(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (n = r.options.sortingFns) == null ? void 0 : n[e.columnDef.sortingFn]) != null ? t : ee[e.columnDef.sortingFn];
1438
1691
  }, e.toggleSorting = (t, n) => {
1439
- const o = e.getNextSortingOrder(), r = typeof t < "u" && t !== null;
1440
- i.setSorting((s) => {
1692
+ const i = e.getNextSortingOrder(), o = typeof t < "u" && t !== null;
1693
+ r.setSorting((s) => {
1441
1694
  const l = s == null ? void 0 : s.find((d) => d.id === e.id), a = s == null ? void 0 : s.findIndex((d) => d.id === e.id);
1442
- let u = [], g, m = r ? t : o === "desc";
1443
- if (s != null && s.length && e.getCanMultiSort() && n ? l ? g = "toggle" : g = "add" : s != null && s.length && a !== s.length - 1 ? g = "replace" : l ? g = "toggle" : g = "replace", g === "toggle" && (r || o || (g = "remove")), g === "add") {
1695
+ let u = [], f, m = o ? t : i === "desc";
1696
+ if (s != null && s.length && e.getCanMultiSort() && n ? l ? f = "toggle" : f = "add" : s != null && s.length && a !== s.length - 1 ? f = "replace" : l ? f = "toggle" : f = "replace", f === "toggle" && (o || i || (f = "remove")), f === "add") {
1444
1697
  var c;
1445
1698
  u = [...s, {
1446
1699
  id: e.id,
1447
1700
  desc: m
1448
- }], u.splice(0, u.length - ((c = i.options.maxMultiSortColCount) != null ? c : Number.MAX_SAFE_INTEGER));
1449
- } else g === "toggle" ? u = s.map((d) => d.id === e.id ? {
1701
+ }], u.splice(0, u.length - ((c = r.options.maxMultiSortColCount) != null ? c : Number.MAX_SAFE_INTEGER));
1702
+ } else f === "toggle" ? u = s.map((d) => d.id === e.id ? {
1450
1703
  ...d,
1451
1704
  desc: m
1452
- } : d) : g === "remove" ? u = s.filter((d) => d.id !== e.id) : u = [{
1705
+ } : d) : f === "remove" ? u = s.filter((d) => d.id !== e.id) : u = [{
1453
1706
  id: e.id,
1454
1707
  desc: m
1455
1708
  }];
@@ -1457,211 +1710,211 @@ const Q = {
1457
1710
  });
1458
1711
  }, e.getFirstSortDir = () => {
1459
1712
  var t, n;
1460
- return ((t = (n = e.columnDef.sortDescFirst) != null ? n : i.options.sortDescFirst) != null ? t : e.getAutoSortDir() === "desc") ? "desc" : "asc";
1713
+ return ((t = (n = e.columnDef.sortDescFirst) != null ? n : r.options.sortDescFirst) != null ? t : e.getAutoSortDir() === "desc") ? "desc" : "asc";
1461
1714
  }, e.getNextSortingOrder = (t) => {
1462
- var n, o;
1463
- const r = e.getFirstSortDir(), s = e.getIsSorted();
1464
- return s ? s !== r && ((n = i.options.enableSortingRemoval) == null || n) && // If enableSortRemove, enable in general
1465
- (!(t && (o = i.options.enableMultiRemove) != null) || o) ? !1 : s === "desc" ? "asc" : "desc" : r;
1715
+ var n, i;
1716
+ const o = e.getFirstSortDir(), s = e.getIsSorted();
1717
+ return s ? s !== o && ((n = r.options.enableSortingRemoval) == null || n) && // If enableSortRemove, enable in general
1718
+ (!(t && (i = r.options.enableMultiRemove) != null) || i) ? !1 : s === "desc" ? "asc" : "desc" : o;
1466
1719
  }, e.getCanSort = () => {
1467
1720
  var t, n;
1468
- return ((t = e.columnDef.enableSorting) != null ? t : !0) && ((n = i.options.enableSorting) != null ? n : !0) && !!e.accessorFn;
1721
+ return ((t = e.columnDef.enableSorting) != null ? t : !0) && ((n = r.options.enableSorting) != null ? n : !0) && !!e.accessorFn;
1469
1722
  }, e.getCanMultiSort = () => {
1470
1723
  var t, n;
1471
- return (t = (n = e.columnDef.enableMultiSort) != null ? n : i.options.enableMultiSort) != null ? t : !!e.accessorFn;
1724
+ return (t = (n = e.columnDef.enableMultiSort) != null ? n : r.options.enableMultiSort) != null ? t : !!e.accessorFn;
1472
1725
  }, e.getIsSorted = () => {
1473
1726
  var t;
1474
- const n = (t = i.getState().sorting) == null ? void 0 : t.find((o) => o.id === e.id);
1727
+ const n = (t = r.getState().sorting) == null ? void 0 : t.find((i) => i.id === e.id);
1475
1728
  return n ? n.desc ? "desc" : "asc" : !1;
1476
1729
  }, e.getSortIndex = () => {
1477
1730
  var t, n;
1478
- return (t = (n = i.getState().sorting) == null ? void 0 : n.findIndex((o) => o.id === e.id)) != null ? t : -1;
1731
+ return (t = (n = r.getState().sorting) == null ? void 0 : n.findIndex((i) => i.id === e.id)) != null ? t : -1;
1479
1732
  }, e.clearSorting = () => {
1480
- i.setSorting((t) => t != null && t.length ? t.filter((n) => n.id !== e.id) : []);
1733
+ r.setSorting((t) => t != null && t.length ? t.filter((n) => n.id !== e.id) : []);
1481
1734
  }, e.getToggleSortingHandler = () => {
1482
1735
  const t = e.getCanSort();
1483
1736
  return (n) => {
1484
- t && (n.persist == null || n.persist(), e.toggleSorting == null || e.toggleSorting(void 0, e.getCanMultiSort() ? i.options.isMultiSortEvent == null ? void 0 : i.options.isMultiSortEvent(n) : !1));
1737
+ t && (n.persist == null || n.persist(), e.toggleSorting == null || e.toggleSorting(void 0, e.getCanMultiSort() ? r.options.isMultiSortEvent == null ? void 0 : r.options.isMultiSortEvent(n) : !1));
1485
1738
  };
1486
1739
  };
1487
1740
  },
1488
1741
  createTable: (e) => {
1489
- e.setSorting = (i) => e.options.onSortingChange == null ? void 0 : e.options.onSortingChange(i), e.resetSorting = (i) => {
1742
+ e.setSorting = (r) => e.options.onSortingChange == null ? void 0 : e.options.onSortingChange(r), e.resetSorting = (r) => {
1490
1743
  var t, n;
1491
- e.setSorting(i ? [] : (t = (n = e.initialState) == null ? void 0 : n.sorting) != null ? t : []);
1744
+ e.setSorting(r ? [] : (t = (n = e.initialState) == null ? void 0 : n.sorting) != null ? t : []);
1492
1745
  }, e.getPreSortedRowModel = () => e.getGroupedRowModel(), e.getSortedRowModel = () => (!e._getSortedRowModel && e.options.getSortedRowModel && (e._getSortedRowModel = e.options.getSortedRowModel(e)), e.options.manualSorting || !e._getSortedRowModel ? e.getPreSortedRowModel() : e._getSortedRowModel());
1493
1746
  }
1494
- }, fn = [
1495
- Pt,
1496
- Yt,
1497
- Ut,
1498
- Kt,
1499
- Nt,
1500
- Ot,
1501
- Zt,
1502
- //depends on ColumnFaceting
1747
+ }, Cn = [
1748
+ Lt,
1749
+ sn,
1503
1750
  en,
1751
+ tn,
1752
+ kt,
1753
+ Tt,
1754
+ ln,
1755
+ //depends on ColumnFaceting
1756
+ an,
1504
1757
  //depends on ColumnFiltering
1505
- cn,
1506
- qt,
1758
+ wn,
1759
+ Yt,
1507
1760
  //depends on RowSorting
1508
- tn,
1509
- nn,
1510
- on,
1511
- rn,
1512
- Jt
1761
+ un,
1762
+ dn,
1763
+ gn,
1764
+ cn,
1765
+ rn
1513
1766
  ];
1514
- function pn(e) {
1515
- var i, t;
1767
+ function xn(e) {
1768
+ var r, t;
1516
1769
  process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
1517
- const n = [...fn, ...(i = e._features) != null ? i : []];
1518
- let o = {
1770
+ const n = [...Cn, ...(r = e._features) != null ? r : []];
1771
+ let i = {
1519
1772
  _features: n
1520
1773
  };
1521
- const r = o._features.reduce((c, d) => Object.assign(c, d.getDefaultOptions == null ? void 0 : d.getDefaultOptions(o)), {}), s = (c) => o.options.mergeOptions ? o.options.mergeOptions(r, c) : {
1522
- ...r,
1774
+ const o = i._features.reduce((c, d) => Object.assign(c, d.getDefaultOptions == null ? void 0 : d.getDefaultOptions(i)), {}), s = (c) => i.options.mergeOptions ? i.options.mergeOptions(o, c) : {
1775
+ ...o,
1523
1776
  ...c
1524
1777
  };
1525
1778
  let a = {
1526
1779
  ...{},
1527
1780
  ...(t = e.initialState) != null ? t : {}
1528
1781
  };
1529
- o._features.forEach((c) => {
1782
+ i._features.forEach((c) => {
1530
1783
  var d;
1531
1784
  a = (d = c.getInitialState == null ? void 0 : c.getInitialState(a)) != null ? d : a;
1532
1785
  });
1533
1786
  const u = [];
1534
- let g = !1;
1787
+ let f = !1;
1535
1788
  const m = {
1536
1789
  _features: n,
1537
1790
  options: {
1538
- ...r,
1791
+ ...o,
1539
1792
  ...e
1540
1793
  },
1541
1794
  initialState: a,
1542
1795
  _queue: (c) => {
1543
- u.push(c), g || (g = !0, Promise.resolve().then(() => {
1796
+ u.push(c), f || (f = !0, Promise.resolve().then(() => {
1544
1797
  for (; u.length; )
1545
1798
  u.shift()();
1546
- g = !1;
1799
+ f = !1;
1547
1800
  }).catch((d) => setTimeout(() => {
1548
1801
  throw d;
1549
1802
  })));
1550
1803
  },
1551
1804
  reset: () => {
1552
- o.setState(o.initialState);
1805
+ i.setState(i.initialState);
1553
1806
  },
1554
1807
  setOptions: (c) => {
1555
- const d = H(c, o.options);
1556
- o.options = s(d);
1808
+ const d = H(c, i.options);
1809
+ i.options = s(d);
1557
1810
  },
1558
- getState: () => o.options.state,
1811
+ getState: () => i.options.state,
1559
1812
  setState: (c) => {
1560
- o.options.onStateChange == null || o.options.onStateChange(c);
1813
+ i.options.onStateChange == null || i.options.onStateChange(c);
1561
1814
  },
1562
- _getRowId: (c, d, p) => {
1563
- var h;
1564
- return (h = o.options.getRowId == null ? void 0 : o.options.getRowId(c, d, p)) != null ? h : `${p ? [p.id, d].join(".") : d}`;
1815
+ _getRowId: (c, d, g) => {
1816
+ var p;
1817
+ return (p = i.options.getRowId == null ? void 0 : i.options.getRowId(c, d, g)) != null ? p : `${g ? [g.id, d].join(".") : d}`;
1565
1818
  },
1566
- getCoreRowModel: () => (o._getCoreRowModel || (o._getCoreRowModel = o.options.getCoreRowModel(o)), o._getCoreRowModel()),
1819
+ getCoreRowModel: () => (i._getCoreRowModel || (i._getCoreRowModel = i.options.getCoreRowModel(i)), i._getCoreRowModel()),
1567
1820
  // The final calls start at the bottom of the model,
1568
1821
  // expanded rows, which then work their way up
1569
- getRowModel: () => o.getPaginationRowModel(),
1822
+ getRowModel: () => i.getPaginationRowModel(),
1570
1823
  //in next version, we should just pass in the row model as the optional 2nd arg
1571
1824
  getRow: (c, d) => {
1572
- let p = (d ? o.getPrePaginationRowModel() : o.getRowModel()).rowsById[c];
1573
- if (!p && (p = o.getCoreRowModel().rowsById[c], !p))
1825
+ let g = (d ? i.getPrePaginationRowModel() : i.getRowModel()).rowsById[c];
1826
+ if (!g && (g = i.getCoreRowModel().rowsById[c], !g))
1574
1827
  throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${c}`) : new Error();
1575
- return p;
1828
+ return g;
1576
1829
  },
1577
- _getDefaultColumnDef: C(() => [o.options.defaultColumn], (c) => {
1830
+ _getDefaultColumnDef: C(() => [i.options.defaultColumn], (c) => {
1578
1831
  var d;
1579
1832
  return c = (d = c) != null ? d : {}, {
1580
- header: (p) => {
1581
- const h = p.header.column.columnDef;
1582
- return h.accessorKey ? h.accessorKey : h.accessorFn ? h.id : null;
1833
+ header: (g) => {
1834
+ const p = g.header.column.columnDef;
1835
+ return p.accessorKey ? p.accessorKey : p.accessorFn ? p.id : null;
1583
1836
  },
1584
1837
  // footer: props => props.header.column.id,
1585
- cell: (p) => {
1586
- var h, w;
1587
- return (h = (w = p.renderValue()) == null || w.toString == null ? void 0 : w.toString()) != null ? h : null;
1838
+ cell: (g) => {
1839
+ var p, v;
1840
+ return (p = (v = g.renderValue()) == null || v.toString == null ? void 0 : v.toString()) != null ? p : null;
1588
1841
  },
1589
- ...o._features.reduce((p, h) => Object.assign(p, h.getDefaultColumnDef == null ? void 0 : h.getDefaultColumnDef()), {}),
1842
+ ...i._features.reduce((g, p) => Object.assign(g, p.getDefaultColumnDef == null ? void 0 : p.getDefaultColumnDef()), {}),
1590
1843
  ...c
1591
1844
  };
1592
1845
  }, x(e, "debugColumns", "_getDefaultColumnDef")),
1593
- _getColumnDefs: () => o.options.columns,
1594
- getAllColumns: C(() => [o._getColumnDefs()], (c) => {
1595
- const d = function(p, h, w) {
1596
- return w === void 0 && (w = 0), p.map((S) => {
1597
- const v = Vt(o, S, w, h), F = S;
1598
- return v.columns = F.columns ? d(F.columns, v, w + 1) : [], v;
1846
+ _getColumnDefs: () => i.options.columns,
1847
+ getAllColumns: C(() => [i._getColumnDefs()], (c) => {
1848
+ const d = function(g, p, v) {
1849
+ return v === void 0 && (v = 0), g.map((S) => {
1850
+ const w = Ht(i, S, v, p), _ = S;
1851
+ return w.columns = _.columns ? d(_.columns, w, v + 1) : [], w;
1599
1852
  });
1600
1853
  };
1601
1854
  return d(c);
1602
1855
  }, x(e, "debugColumns", "getAllColumns")),
1603
- getAllFlatColumns: C(() => [o.getAllColumns()], (c) => c.flatMap((d) => d.getFlatColumns()), x(e, "debugColumns", "getAllFlatColumns")),
1604
- _getAllFlatColumnsById: C(() => [o.getAllFlatColumns()], (c) => c.reduce((d, p) => (d[p.id] = p, d), {}), x(e, "debugColumns", "getAllFlatColumnsById")),
1605
- getAllLeafColumns: C(() => [o.getAllColumns(), o._getOrderColumnsFn()], (c, d) => {
1606
- let p = c.flatMap((h) => h.getLeafColumns());
1607
- return d(p);
1856
+ getAllFlatColumns: C(() => [i.getAllColumns()], (c) => c.flatMap((d) => d.getFlatColumns()), x(e, "debugColumns", "getAllFlatColumns")),
1857
+ _getAllFlatColumnsById: C(() => [i.getAllFlatColumns()], (c) => c.reduce((d, g) => (d[g.id] = g, d), {}), x(e, "debugColumns", "getAllFlatColumnsById")),
1858
+ getAllLeafColumns: C(() => [i.getAllColumns(), i._getOrderColumnsFn()], (c, d) => {
1859
+ let g = c.flatMap((p) => p.getLeafColumns());
1860
+ return d(g);
1608
1861
  }, x(e, "debugColumns", "getAllLeafColumns")),
1609
1862
  getColumn: (c) => {
1610
- const d = o._getAllFlatColumnsById()[c];
1863
+ const d = i._getAllFlatColumnsById()[c];
1611
1864
  return process.env.NODE_ENV !== "production" && !d && console.error(`[Table] Column with id '${c}' does not exist.`), d;
1612
1865
  }
1613
1866
  };
1614
- Object.assign(o, m);
1615
- for (let c = 0; c < o._features.length; c++) {
1616
- const d = o._features[c];
1617
- d == null || d.createTable == null || d.createTable(o);
1867
+ Object.assign(i, m);
1868
+ for (let c = 0; c < i._features.length; c++) {
1869
+ const d = i._features[c];
1870
+ d == null || d.createTable == null || d.createTable(i);
1618
1871
  }
1619
- return o;
1872
+ return i;
1620
1873
  }
1621
- function hn() {
1622
- return (e) => C(() => [e.options.data], (i) => {
1874
+ function Rn() {
1875
+ return (e) => C(() => [e.options.data], (r) => {
1623
1876
  const t = {
1624
1877
  rows: [],
1625
1878
  flatRows: [],
1626
1879
  rowsById: {}
1627
- }, n = function(o, r, s) {
1628
- r === void 0 && (r = 0);
1880
+ }, n = function(i, o, s) {
1881
+ o === void 0 && (o = 0);
1629
1882
  const l = [];
1630
- for (let u = 0; u < o.length; u++) {
1631
- const g = zt(e, e._getRowId(o[u], u, s), o[u], u, r, void 0, s == null ? void 0 : s.id);
1632
- if (t.flatRows.push(g), t.rowsById[g.id] = g, l.push(g), e.options.getSubRows) {
1883
+ for (let u = 0; u < i.length; u++) {
1884
+ const f = Gt(e, e._getRowId(i[u], u, s), i[u], u, o, void 0, s == null ? void 0 : s.id);
1885
+ if (t.flatRows.push(f), t.rowsById[f.id] = f, l.push(f), e.options.getSubRows) {
1633
1886
  var a;
1634
- g.originalSubRows = e.options.getSubRows(o[u], u), (a = g.originalSubRows) != null && a.length && (g.subRows = n(g.originalSubRows, r + 1, g));
1887
+ f.originalSubRows = e.options.getSubRows(i[u], u), (a = f.originalSubRows) != null && a.length && (f.subRows = n(f.originalSubRows, o + 1, f));
1635
1888
  }
1636
1889
  }
1637
1890
  return l;
1638
1891
  };
1639
- return t.rows = n(i), t;
1892
+ return t.rows = n(r), t;
1640
1893
  }, x(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
1641
1894
  }
1642
- function mn() {
1643
- return (e) => C(() => [e.getState().expanded, e.getPreExpandedRowModel(), e.options.paginateExpandedRows], (i, t, n) => !t.rows.length || i !== !0 && !Object.keys(i ?? {}).length || !n ? t : Sn(t), x(e.options, "debugTable", "getExpandedRowModel"));
1895
+ function yn() {
1896
+ return (e) => C(() => [e.getState().expanded, e.getPreExpandedRowModel(), e.options.paginateExpandedRows], (r, t, n) => !t.rows.length || r !== !0 && !Object.keys(r ?? {}).length || !n ? t : _n(t), x(e.options, "debugTable", "getExpandedRowModel"));
1644
1897
  }
1645
- function Sn(e) {
1646
- const i = [], t = (n) => {
1647
- var o;
1648
- i.push(n), (o = n.subRows) != null && o.length && n.getIsExpanded() && n.subRows.forEach(t);
1898
+ function _n(e) {
1899
+ const r = [], t = (n) => {
1900
+ var i;
1901
+ r.push(n), (i = n.subRows) != null && i.length && n.getIsExpanded() && n.subRows.forEach(t);
1649
1902
  };
1650
1903
  return e.rows.forEach(t), {
1651
- rows: i,
1904
+ rows: r,
1652
1905
  flatRows: e.flatRows,
1653
1906
  rowsById: e.rowsById
1654
1907
  };
1655
1908
  }
1656
- function vn() {
1657
- return (e) => C(() => [e.getState().sorting, e.getPreSortedRowModel()], (i, t) => {
1658
- if (!t.rows.length || !(i != null && i.length))
1909
+ function Fn() {
1910
+ return (e) => C(() => [e.getState().sorting, e.getPreSortedRowModel()], (r, t) => {
1911
+ if (!t.rows.length || !(r != null && r.length))
1659
1912
  return t;
1660
- const n = e.getState().sorting, o = [], r = n.filter((a) => {
1913
+ const n = e.getState().sorting, i = [], o = n.filter((a) => {
1661
1914
  var u;
1662
1915
  return (u = e.getColumn(a.id)) == null ? void 0 : u.getCanSort();
1663
1916
  }), s = {};
1664
- r.forEach((a) => {
1917
+ o.forEach((a) => {
1665
1918
  const u = e.getColumn(a.id);
1666
1919
  u && (s[a.id] = {
1667
1920
  sortUndefined: u.columnDef.sortUndefined,
@@ -1670,34 +1923,34 @@ function vn() {
1670
1923
  });
1671
1924
  });
1672
1925
  const l = (a) => {
1673
- const u = a.map((g) => ({
1674
- ...g
1926
+ const u = a.map((f) => ({
1927
+ ...f
1675
1928
  }));
1676
- return u.sort((g, m) => {
1677
- for (let d = 0; d < r.length; d += 1) {
1929
+ return u.sort((f, m) => {
1930
+ for (let d = 0; d < o.length; d += 1) {
1678
1931
  var c;
1679
- const p = r[d], h = s[p.id], w = h.sortUndefined, S = (c = p == null ? void 0 : p.desc) != null ? c : !1;
1680
- let v = 0;
1681
- if (w) {
1682
- const F = g.getValue(p.id), $ = m.getValue(p.id), I = F === void 0, P = $ === void 0;
1683
- if (I || P) {
1684
- if (w === "first") return I ? -1 : 1;
1685
- if (w === "last") return I ? 1 : -1;
1686
- v = I && P ? 0 : I ? w : -w;
1932
+ const g = o[d], p = s[g.id], v = p.sortUndefined, S = (c = g == null ? void 0 : g.desc) != null ? c : !1;
1933
+ let w = 0;
1934
+ if (v) {
1935
+ const _ = f.getValue(g.id), $ = m.getValue(g.id), E = _ === void 0, O = $ === void 0;
1936
+ if (E || O) {
1937
+ if (v === "first") return E ? -1 : 1;
1938
+ if (v === "last") return E ? 1 : -1;
1939
+ w = E && O ? 0 : E ? v : -v;
1687
1940
  }
1688
1941
  }
1689
- if (v === 0 && (v = h.sortingFn(g, m, p.id)), v !== 0)
1690
- return S && (v *= -1), h.invertSorting && (v *= -1), v;
1942
+ if (w === 0 && (w = p.sortingFn(f, m, g.id)), w !== 0)
1943
+ return S && (w *= -1), p.invertSorting && (w *= -1), w;
1691
1944
  }
1692
- return g.index - m.index;
1693
- }), u.forEach((g) => {
1945
+ return f.index - m.index;
1946
+ }), u.forEach((f) => {
1694
1947
  var m;
1695
- o.push(g), (m = g.subRows) != null && m.length && (g.subRows = l(g.subRows));
1948
+ i.push(f), (m = f.subRows) != null && m.length && (f.subRows = l(f.subRows));
1696
1949
  }), u;
1697
1950
  };
1698
1951
  return {
1699
1952
  rows: l(t.rows),
1700
- flatRows: o,
1953
+ flatRows: i,
1701
1954
  rowsById: t.rowsById
1702
1955
  };
1703
1956
  }, x(e.options, "debugTable", "getSortedRowModel", () => e._autoResetPageIndex()));
@@ -1712,23 +1965,23 @@ function vn() {
1712
1965
  *
1713
1966
  * @license MIT
1714
1967
  */
1715
- function qe(e, i) {
1716
- return e ? wn(e) ? /* @__PURE__ */ B.createElement(e, i) : e : null;
1968
+ function We(e, r) {
1969
+ return e ? Mn(e) ? /* @__PURE__ */ B.createElement(e, r) : e : null;
1717
1970
  }
1718
- function wn(e) {
1719
- return Cn(e) || typeof e == "function" || xn(e);
1971
+ function Mn(e) {
1972
+ return $n(e) || typeof e == "function" || In(e);
1720
1973
  }
1721
- function Cn(e) {
1974
+ function $n(e) {
1722
1975
  return typeof e == "function" && (() => {
1723
- const i = Object.getPrototypeOf(e);
1724
- return i.prototype && i.prototype.isReactComponent;
1976
+ const r = Object.getPrototypeOf(e);
1977
+ return r.prototype && r.prototype.isReactComponent;
1725
1978
  })();
1726
1979
  }
1727
- function xn(e) {
1980
+ function In(e) {
1728
1981
  return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
1729
1982
  }
1730
- function Rn(e) {
1731
- const i = {
1983
+ function En(e) {
1984
+ const r = {
1732
1985
  state: {},
1733
1986
  // Dummy state
1734
1987
  onStateChange: () => {
@@ -1737,10 +1990,10 @@ function Rn(e) {
1737
1990
  renderFallbackValue: null,
1738
1991
  ...e
1739
1992
  }, [t] = B.useState(() => ({
1740
- current: pn(i)
1741
- })), [n, o] = B.useState(() => t.current.initialState);
1742
- return t.current.setOptions((r) => ({
1743
- ...r,
1993
+ current: xn(r)
1994
+ })), [n, i] = B.useState(() => t.current.initialState);
1995
+ return t.current.setOptions((o) => ({
1996
+ ...o,
1744
1997
  ...e,
1745
1998
  state: {
1746
1999
  ...n,
@@ -1749,158 +2002,158 @@ function Rn(e) {
1749
2002
  // Similarly, we'll maintain both our internal state and any user-provided
1750
2003
  // state.
1751
2004
  onStateChange: (s) => {
1752
- o(s), e.onStateChange == null || e.onStateChange(s);
2005
+ i(s), e.onStateChange == null || e.onStateChange(s);
1753
2006
  }
1754
2007
  })), t.current;
1755
2008
  }
1756
- function j(e, i, t) {
1757
- let n = t.initialDeps ?? [], o, r = !0;
2009
+ function W(e, r, t) {
2010
+ let n = t.initialDeps ?? [], i, o = !0;
1758
2011
  function s() {
1759
2012
  var l, a, u;
1760
- let g;
1761
- t.key && ((l = t.debug) != null && l.call(t)) && (g = Date.now());
2013
+ let f;
2014
+ t.key && ((l = t.debug) != null && l.call(t)) && (f = Date.now());
1762
2015
  const m = e();
1763
- if (!(m.length !== n.length || m.some((p, h) => n[h] !== p)))
1764
- return o;
2016
+ if (!(m.length !== n.length || m.some((g, p) => n[p] !== g)))
2017
+ return i;
1765
2018
  n = m;
1766
2019
  let d;
1767
- if (t.key && ((a = t.debug) != null && a.call(t)) && (d = Date.now()), o = i(...m), t.key && ((u = t.debug) != null && u.call(t))) {
1768
- const p = Math.round((Date.now() - g) * 100) / 100, h = Math.round((Date.now() - d) * 100) / 100, w = h / 16, S = (v, F) => {
1769
- for (v = String(v); v.length < F; )
1770
- v = " " + v;
1771
- return v;
2020
+ if (t.key && ((a = t.debug) != null && a.call(t)) && (d = Date.now()), i = r(...m), t.key && ((u = t.debug) != null && u.call(t))) {
2021
+ const g = Math.round((Date.now() - f) * 100) / 100, p = Math.round((Date.now() - d) * 100) / 100, v = p / 16, S = (w, _) => {
2022
+ for (w = String(w); w.length < _; )
2023
+ w = " " + w;
2024
+ return w;
1772
2025
  };
1773
2026
  console.info(
1774
- `%c⏱ ${S(h, 5)} /${S(p, 5)} ms`,
2027
+ `%c⏱ ${S(p, 5)} /${S(g, 5)} ms`,
1775
2028
  `
1776
2029
  font-size: .6rem;
1777
2030
  font-weight: bold;
1778
2031
  color: hsl(${Math.max(
1779
2032
  0,
1780
- Math.min(120 - 120 * w, 120)
2033
+ Math.min(120 - 120 * v, 120)
1781
2034
  )}deg 100% 31%);`,
1782
2035
  t == null ? void 0 : t.key
1783
2036
  );
1784
2037
  }
1785
- return t != null && t.onChange && !(r && t.skipInitialOnChange) && t.onChange(o), r = !1, o;
2038
+ return t != null && t.onChange && !(o && t.skipInitialOnChange) && t.onChange(i), o = !1, i;
1786
2039
  }
1787
2040
  return s.updateDeps = (l) => {
1788
2041
  n = l;
1789
2042
  }, s;
1790
2043
  }
1791
- function We(e, i) {
2044
+ function Ke(e, r) {
1792
2045
  if (e === void 0)
1793
2046
  throw new Error("Unexpected undefined");
1794
2047
  return e;
1795
2048
  }
1796
- const yn = (e, i) => Math.abs(e - i) < 1.01, _n = (e, i, t) => {
2049
+ const bn = (e, r) => Math.abs(e - r) < 1.01, Vn = (e, r, t) => {
1797
2050
  let n;
1798
- return function(...o) {
1799
- e.clearTimeout(n), n = e.setTimeout(() => i.apply(this, o), t);
2051
+ return function(...i) {
2052
+ e.clearTimeout(n), n = e.setTimeout(() => r.apply(this, i), t);
1800
2053
  };
1801
- }, Ue = (e) => {
1802
- const { offsetWidth: i, offsetHeight: t } = e;
1803
- return { width: i, height: t };
1804
- }, Fn = (e) => e, Mn = (e) => {
1805
- const i = Math.max(e.startIndex - e.overscan, 0), t = Math.min(e.endIndex + e.overscan, e.count - 1), n = [];
1806
- for (let o = i; o <= t; o++)
1807
- n.push(o);
2054
+ }, Xe = (e) => {
2055
+ const { offsetWidth: r, offsetHeight: t } = e;
2056
+ return { width: r, height: t };
2057
+ }, Pn = (e) => e, zn = (e) => {
2058
+ const r = Math.max(e.startIndex - e.overscan, 0), t = Math.min(e.endIndex + e.overscan, e.count - 1), n = [];
2059
+ for (let i = r; i <= t; i++)
2060
+ n.push(i);
1808
2061
  return n;
1809
- }, $n = (e, i) => {
2062
+ }, On = (e, r) => {
1810
2063
  const t = e.scrollElement;
1811
2064
  if (!t)
1812
2065
  return;
1813
2066
  const n = e.targetWindow;
1814
2067
  if (!n)
1815
2068
  return;
1816
- const o = (s) => {
2069
+ const i = (s) => {
1817
2070
  const { width: l, height: a } = s;
1818
- i({ width: Math.round(l), height: Math.round(a) });
2071
+ r({ width: Math.round(l), height: Math.round(a) });
1819
2072
  };
1820
- if (o(Ue(t)), !n.ResizeObserver)
2073
+ if (i(Xe(t)), !n.ResizeObserver)
1821
2074
  return () => {
1822
2075
  };
1823
- const r = new n.ResizeObserver((s) => {
2076
+ const o = new n.ResizeObserver((s) => {
1824
2077
  const l = () => {
1825
2078
  const a = s[0];
1826
2079
  if (a != null && a.borderBoxSize) {
1827
2080
  const u = a.borderBoxSize[0];
1828
2081
  if (u) {
1829
- o({ width: u.inlineSize, height: u.blockSize });
2082
+ i({ width: u.inlineSize, height: u.blockSize });
1830
2083
  return;
1831
2084
  }
1832
2085
  }
1833
- o(Ue(t));
2086
+ i(Xe(t));
1834
2087
  };
1835
2088
  e.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(l) : l();
1836
2089
  });
1837
- return r.observe(t, { box: "border-box" }), () => {
1838
- r.unobserve(t);
2090
+ return o.observe(t, { box: "border-box" }), () => {
2091
+ o.unobserve(t);
1839
2092
  };
1840
- }, Ke = {
2093
+ }, Je = {
1841
2094
  passive: !0
1842
- }, Xe = typeof window > "u" ? !0 : "onscrollend" in window, In = (e, i) => {
2095
+ }, Qe = typeof window > "u" ? !0 : "onscrollend" in window, Nn = (e, r) => {
1843
2096
  const t = e.scrollElement;
1844
2097
  if (!t)
1845
2098
  return;
1846
2099
  const n = e.targetWindow;
1847
2100
  if (!n)
1848
2101
  return;
1849
- let o = 0;
1850
- const r = e.options.useScrollendEvent && Xe ? () => {
1851
- } : _n(
2102
+ let i = 0;
2103
+ const o = e.options.useScrollendEvent && Qe ? () => {
2104
+ } : Vn(
1852
2105
  n,
1853
2106
  () => {
1854
- i(o, !1);
2107
+ r(i, !1);
1855
2108
  },
1856
2109
  e.options.isScrollingResetDelay
1857
- ), s = (g) => () => {
2110
+ ), s = (f) => () => {
1858
2111
  const { horizontal: m, isRtl: c } = e.options;
1859
- o = m ? t.scrollLeft * (c && -1 || 1) : t.scrollTop, r(), i(o, g);
2112
+ i = m ? t.scrollLeft * (c && -1 || 1) : t.scrollTop, o(), r(i, f);
1860
2113
  }, l = s(!0), a = s(!1);
1861
- t.addEventListener("scroll", l, Ke);
1862
- const u = e.options.useScrollendEvent && Xe;
1863
- return u && t.addEventListener("scrollend", a, Ke), () => {
2114
+ t.addEventListener("scroll", l, Je);
2115
+ const u = e.options.useScrollendEvent && Qe;
2116
+ return u && t.addEventListener("scrollend", a, Je), () => {
1864
2117
  t.removeEventListener("scroll", l), u && t.removeEventListener("scrollend", a);
1865
2118
  };
1866
- }, En = (e, i, t) => {
1867
- if (i != null && i.borderBoxSize) {
1868
- const n = i.borderBoxSize[0];
2119
+ }, An = (e, r, t) => {
2120
+ if (r != null && r.borderBoxSize) {
2121
+ const n = r.borderBoxSize[0];
1869
2122
  if (n)
1870
2123
  return Math.round(
1871
2124
  n[t.options.horizontal ? "inlineSize" : "blockSize"]
1872
2125
  );
1873
2126
  }
1874
2127
  return e[t.options.horizontal ? "offsetWidth" : "offsetHeight"];
1875
- }, bn = (e, {
1876
- adjustments: i = 0,
2128
+ }, Dn = (e, {
2129
+ adjustments: r = 0,
1877
2130
  behavior: t
1878
2131
  }, n) => {
1879
- var o, r;
1880
- const s = e + i;
1881
- (r = (o = n.scrollElement) == null ? void 0 : o.scrollTo) == null || r.call(o, {
2132
+ var i, o;
2133
+ const s = e + r;
2134
+ (o = (i = n.scrollElement) == null ? void 0 : i.scrollTo) == null || o.call(i, {
1882
2135
  [n.options.horizontal ? "left" : "top"]: s,
1883
2136
  behavior: t
1884
2137
  });
1885
2138
  };
1886
- class Vn {
1887
- constructor(i) {
2139
+ class Hn {
2140
+ constructor(r) {
1888
2141
  this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollState = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.laneAssignments = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.prevLanes = void 0, this.lanesChangedFlag = !1, this.lanesSettling = !1, this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.now = () => {
1889
- var t, n, o;
1890
- return ((o = (n = (t = this.targetWindow) == null ? void 0 : t.performance) == null ? void 0 : n.now) == null ? void 0 : o.call(n)) ?? Date.now();
2142
+ var t, n, i;
2143
+ return ((i = (n = (t = this.targetWindow) == null ? void 0 : t.performance) == null ? void 0 : n.now) == null ? void 0 : i.call(n)) ?? Date.now();
1891
2144
  }, this.observer = /* @__PURE__ */ (() => {
1892
2145
  let t = null;
1893
- const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((o) => {
1894
- o.forEach((r) => {
2146
+ const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((i) => {
2147
+ i.forEach((o) => {
1895
2148
  const s = () => {
1896
- const l = r.target, a = this.indexFromElement(l);
2149
+ const l = o.target, a = this.indexFromElement(l);
1897
2150
  if (!l.isConnected) {
1898
2151
  this.observer.unobserve(l);
1899
2152
  return;
1900
2153
  }
1901
2154
  this.shouldMeasureDuringScroll(a) && this.resizeItem(
1902
2155
  a,
1903
- this.options.measureElement(l, r, this)
2156
+ this.options.measureElement(l, o, this)
1904
2157
  );
1905
2158
  };
1906
2159
  this.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(s) : s();
@@ -1908,21 +2161,21 @@ class Vn {
1908
2161
  }));
1909
2162
  return {
1910
2163
  disconnect: () => {
1911
- var o;
1912
- (o = n()) == null || o.disconnect(), t = null;
2164
+ var i;
2165
+ (i = n()) == null || i.disconnect(), t = null;
1913
2166
  },
1914
- observe: (o) => {
1915
- var r;
1916
- return (r = n()) == null ? void 0 : r.observe(o, { box: "border-box" });
2167
+ observe: (i) => {
2168
+ var o;
2169
+ return (o = n()) == null ? void 0 : o.observe(i, { box: "border-box" });
1917
2170
  },
1918
- unobserve: (o) => {
1919
- var r;
1920
- return (r = n()) == null ? void 0 : r.unobserve(o);
2171
+ unobserve: (i) => {
2172
+ var o;
2173
+ return (o = n()) == null ? void 0 : o.unobserve(i);
1921
2174
  }
1922
2175
  };
1923
2176
  })(), this.range = null, this.setOptions = (t) => {
1924
- Object.entries(t).forEach(([n, o]) => {
1925
- typeof o > "u" && delete t[n];
2177
+ Object.entries(t).forEach(([n, i]) => {
2178
+ typeof i > "u" && delete t[n];
1926
2179
  }), this.options = {
1927
2180
  debug: !1,
1928
2181
  initialOffset: 0,
@@ -1932,11 +2185,11 @@ class Vn {
1932
2185
  scrollPaddingStart: 0,
1933
2186
  scrollPaddingEnd: 0,
1934
2187
  horizontal: !1,
1935
- getItemKey: Fn,
1936
- rangeExtractor: Mn,
2188
+ getItemKey: Pn,
2189
+ rangeExtractor: zn,
1937
2190
  onChange: () => {
1938
2191
  },
1939
- measureElement: En,
2192
+ measureElement: An,
1940
2193
  initialRect: { width: 0, height: 0 },
1941
2194
  scrollMargin: 0,
1942
2195
  gap: 0,
@@ -1951,9 +2204,9 @@ class Vn {
1951
2204
  ...t
1952
2205
  };
1953
2206
  }, this.notify = (t) => {
1954
- var n, o;
1955
- (o = (n = this.options).onChange) == null || o.call(n, this, t);
1956
- }, this.maybeNotify = j(
2207
+ var n, i;
2208
+ (i = (n = this.options).onChange) == null || i.call(n, this, t);
2209
+ }, this.maybeNotify = W(
1957
2210
  () => (this.calculateRange(), [
1958
2211
  this.isScrolling,
1959
2212
  this.range ? this.range.startIndex : null,
@@ -1983,15 +2236,15 @@ class Vn {
1983
2236
  this.maybeNotify();
1984
2237
  return;
1985
2238
  }
1986
- this.scrollElement = n, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = ((t = this.scrollElement) == null ? void 0 : t.window) ?? null, this.elementsCache.forEach((o) => {
1987
- this.observer.observe(o);
2239
+ this.scrollElement = n, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = ((t = this.scrollElement) == null ? void 0 : t.window) ?? null, this.elementsCache.forEach((i) => {
2240
+ this.observer.observe(i);
1988
2241
  }), this.unsubs.push(
1989
- this.options.observeElementRect(this, (o) => {
1990
- this.scrollRect = o, this.maybeNotify();
2242
+ this.options.observeElementRect(this, (i) => {
2243
+ this.scrollRect = i, this.maybeNotify();
1991
2244
  })
1992
2245
  ), this.unsubs.push(
1993
- this.options.observeElementOffset(this, (o, r) => {
1994
- this.scrollAdjustments = 0, this.scrollDirection = r ? this.getScrollOffset() < o ? "forward" : "backward" : null, this.scrollOffset = o, this.isScrolling = r, this.scrollState && this.scheduleScrollReconcile(), this.maybeNotify();
2246
+ this.options.observeElementOffset(this, (i, o) => {
2247
+ this.scrollAdjustments = 0, this.scrollDirection = o ? this.getScrollOffset() < i ? "forward" : "backward" : null, this.scrollOffset = i, this.isScrolling = o, this.scrollState && this.scheduleScrollReconcile(), this.maybeNotify();
1995
2248
  })
1996
2249
  ), this._scrollToOffset(this.getScrollOffset(), {
1997
2250
  adjustments: void 0,
@@ -1999,19 +2252,19 @@ class Vn {
1999
2252
  });
2000
2253
  }
2001
2254
  }, this.rafId = null, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getFurthestMeasurement = (t, n) => {
2002
- const o = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
2255
+ const i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
2003
2256
  for (let s = n - 1; s >= 0; s--) {
2004
2257
  const l = t[s];
2005
- if (o.has(l.lane))
2258
+ if (i.has(l.lane))
2006
2259
  continue;
2007
- const a = r.get(
2260
+ const a = o.get(
2008
2261
  l.lane
2009
2262
  );
2010
- if (a == null || l.end > a.end ? r.set(l.lane, l) : l.end < a.end && o.set(l.lane, !0), o.size === this.options.lanes)
2263
+ if (a == null || l.end > a.end ? o.set(l.lane, l) : l.end < a.end && i.set(l.lane, !0), i.size === this.options.lanes)
2011
2264
  break;
2012
2265
  }
2013
- return r.size === this.options.lanes ? Array.from(r.values()).sort((s, l) => s.end === l.end ? s.index - l.index : s.end - l.end)[0] : void 0;
2014
- }, this.getMeasurementOptions = j(
2266
+ return o.size === this.options.lanes ? Array.from(o.values()).sort((s, l) => s.end === l.end ? s.index - l.index : s.end - l.end)[0] : void 0;
2267
+ }, this.getMeasurementOptions = W(
2015
2268
  () => [
2016
2269
  this.options.count,
2017
2270
  this.options.paddingStart,
@@ -2020,20 +2273,20 @@ class Vn {
2020
2273
  this.options.enabled,
2021
2274
  this.options.lanes
2022
2275
  ],
2023
- (t, n, o, r, s, l) => (this.prevLanes !== void 0 && this.prevLanes !== l && (this.lanesChangedFlag = !0), this.prevLanes = l, this.pendingMeasuredCacheIndexes = [], {
2276
+ (t, n, i, o, s, l) => (this.prevLanes !== void 0 && this.prevLanes !== l && (this.lanesChangedFlag = !0), this.prevLanes = l, this.pendingMeasuredCacheIndexes = [], {
2024
2277
  count: t,
2025
2278
  paddingStart: n,
2026
- scrollMargin: o,
2027
- getItemKey: r,
2279
+ scrollMargin: i,
2280
+ getItemKey: o,
2028
2281
  enabled: s,
2029
2282
  lanes: l
2030
2283
  }),
2031
2284
  {
2032
2285
  key: !1
2033
2286
  }
2034
- ), this.getMeasurements = j(
2287
+ ), this.getMeasurements = W(
2035
2288
  () => [this.getMeasurementOptions(), this.itemSizeCache],
2036
- ({ count: t, paddingStart: n, scrollMargin: o, getItemKey: r, enabled: s, lanes: l }, a) => {
2289
+ ({ count: t, paddingStart: n, scrollMargin: i, getItemKey: o, enabled: s, lanes: l }, a) => {
2037
2290
  if (!s)
2038
2291
  return this.measurementsCache = [], this.itemSizeCache.clear(), this.laneAssignments.clear(), [];
2039
2292
  if (this.laneAssignments.size > t)
@@ -2044,62 +2297,62 @@ class Vn {
2044
2297
  }));
2045
2298
  const u = this.lanesSettling ? 0 : this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
2046
2299
  this.pendingMeasuredCacheIndexes = [], this.lanesSettling && this.measurementsCache.length === t && (this.lanesSettling = !1);
2047
- const g = this.measurementsCache.slice(0, u), m = new Array(l).fill(
2300
+ const f = this.measurementsCache.slice(0, u), m = new Array(l).fill(
2048
2301
  void 0
2049
2302
  );
2050
2303
  for (let c = 0; c < u; c++) {
2051
- const d = g[c];
2304
+ const d = f[c];
2052
2305
  d && (m[d.lane] = c);
2053
2306
  }
2054
2307
  for (let c = u; c < t; c++) {
2055
- const d = r(c), p = this.laneAssignments.get(c);
2056
- let h, w;
2057
- if (p !== void 0 && this.options.lanes > 1) {
2058
- h = p;
2059
- const $ = m[h], I = $ !== void 0 ? g[$] : void 0;
2060
- w = I ? I.end + this.options.gap : n + o;
2308
+ const d = o(c), g = this.laneAssignments.get(c);
2309
+ let p, v;
2310
+ if (g !== void 0 && this.options.lanes > 1) {
2311
+ p = g;
2312
+ const $ = m[p], E = $ !== void 0 ? f[$] : void 0;
2313
+ v = E ? E.end + this.options.gap : n + i;
2061
2314
  } else {
2062
- const $ = this.options.lanes === 1 ? g[c - 1] : this.getFurthestMeasurement(g, c);
2063
- w = $ ? $.end + this.options.gap : n + o, h = $ ? $.lane : c % this.options.lanes, this.options.lanes > 1 && this.laneAssignments.set(c, h);
2315
+ const $ = this.options.lanes === 1 ? f[c - 1] : this.getFurthestMeasurement(f, c);
2316
+ v = $ ? $.end + this.options.gap : n + i, p = $ ? $.lane : c % this.options.lanes, this.options.lanes > 1 && this.laneAssignments.set(c, p);
2064
2317
  }
2065
- const S = a.get(d), v = typeof S == "number" ? S : this.options.estimateSize(c), F = w + v;
2066
- g[c] = {
2318
+ const S = a.get(d), w = typeof S == "number" ? S : this.options.estimateSize(c), _ = v + w;
2319
+ f[c] = {
2067
2320
  index: c,
2068
- start: w,
2069
- size: v,
2070
- end: F,
2321
+ start: v,
2322
+ size: w,
2323
+ end: _,
2071
2324
  key: d,
2072
- lane: h
2073
- }, m[h] = c;
2325
+ lane: p
2326
+ }, m[p] = c;
2074
2327
  }
2075
- return this.measurementsCache = g, g;
2328
+ return this.measurementsCache = f, f;
2076
2329
  },
2077
2330
  {
2078
2331
  key: process.env.NODE_ENV !== "production" && "getMeasurements",
2079
2332
  debug: () => this.options.debug
2080
2333
  }
2081
- ), this.calculateRange = j(
2334
+ ), this.calculateRange = W(
2082
2335
  () => [
2083
2336
  this.getMeasurements(),
2084
2337
  this.getSize(),
2085
2338
  this.getScrollOffset(),
2086
2339
  this.options.lanes
2087
2340
  ],
2088
- (t, n, o, r) => this.range = t.length > 0 && n > 0 ? Pn({
2341
+ (t, n, i, o) => this.range = t.length > 0 && n > 0 ? Ln({
2089
2342
  measurements: t,
2090
2343
  outerSize: n,
2091
- scrollOffset: o,
2092
- lanes: r
2344
+ scrollOffset: i,
2345
+ lanes: o
2093
2346
  }) : null,
2094
2347
  {
2095
2348
  key: process.env.NODE_ENV !== "production" && "calculateRange",
2096
2349
  debug: () => this.options.debug
2097
2350
  }
2098
- ), this.getVirtualIndexes = j(
2351
+ ), this.getVirtualIndexes = W(
2099
2352
  () => {
2100
2353
  let t = null, n = null;
2101
- const o = this.calculateRange();
2102
- return o && (t = o.startIndex, n = o.endIndex), this.maybeNotify.updateDeps([this.isScrolling, t, n]), [
2354
+ const i = this.calculateRange();
2355
+ return i && (t = i.startIndex, n = i.endIndex), this.maybeNotify.updateDeps([this.isScrolling, t, n]), [
2103
2356
  this.options.rangeExtractor,
2104
2357
  this.options.overscan,
2105
2358
  this.options.count,
@@ -2107,33 +2360,33 @@ class Vn {
2107
2360
  n
2108
2361
  ];
2109
2362
  },
2110
- (t, n, o, r, s) => r === null || s === null ? [] : t({
2111
- startIndex: r,
2363
+ (t, n, i, o, s) => o === null || s === null ? [] : t({
2364
+ startIndex: o,
2112
2365
  endIndex: s,
2113
2366
  overscan: n,
2114
- count: o
2367
+ count: i
2115
2368
  }),
2116
2369
  {
2117
2370
  key: process.env.NODE_ENV !== "production" && "getVirtualIndexes",
2118
2371
  debug: () => this.options.debug
2119
2372
  }
2120
2373
  ), this.indexFromElement = (t) => {
2121
- const n = this.options.indexAttribute, o = t.getAttribute(n);
2122
- return o ? parseInt(o, 10) : (console.warn(
2374
+ const n = this.options.indexAttribute, i = t.getAttribute(n);
2375
+ return i ? parseInt(i, 10) : (console.warn(
2123
2376
  `Missing attribute name '${n}={index}' on measured element.`
2124
2377
  ), -1);
2125
2378
  }, this.shouldMeasureDuringScroll = (t) => {
2126
2379
  var n;
2127
2380
  if (!this.scrollState || this.scrollState.behavior !== "smooth")
2128
2381
  return !0;
2129
- const o = this.scrollState.index ?? ((n = this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)) == null ? void 0 : n.index);
2130
- if (o !== void 0 && this.range) {
2131
- const r = Math.max(
2382
+ const i = this.scrollState.index ?? ((n = this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)) == null ? void 0 : n.index);
2383
+ if (i !== void 0 && this.range) {
2384
+ const o = Math.max(
2132
2385
  this.options.overscan,
2133
2386
  Math.ceil((this.range.endIndex - this.range.startIndex) / 2)
2134
- ), s = Math.max(0, o - r), l = Math.min(
2387
+ ), s = Math.max(0, i - o), l = Math.min(
2135
2388
  this.options.count - 1,
2136
- o + r
2389
+ i + o
2137
2390
  );
2138
2391
  return t >= s && t <= l;
2139
2392
  }
@@ -2145,26 +2398,26 @@ class Vn {
2145
2398
  });
2146
2399
  return;
2147
2400
  }
2148
- const n = this.indexFromElement(t), o = this.options.getItemKey(n), r = this.elementsCache.get(o);
2149
- r !== t && (r && this.observer.unobserve(r), this.observer.observe(t), this.elementsCache.set(o, t)), (!this.isScrolling || this.scrollState) && this.shouldMeasureDuringScroll(n) && this.resizeItem(n, this.options.measureElement(t, void 0, this));
2401
+ const n = this.indexFromElement(t), i = this.options.getItemKey(n), o = this.elementsCache.get(i);
2402
+ o !== t && (o && this.observer.unobserve(o), this.observer.observe(t), this.elementsCache.set(i, t)), (!this.isScrolling || this.scrollState) && this.shouldMeasureDuringScroll(n) && this.resizeItem(n, this.options.measureElement(t, void 0, this));
2150
2403
  }, this.resizeItem = (t, n) => {
2151
- var o;
2152
- const r = this.measurementsCache[t];
2153
- if (!r) return;
2154
- const s = this.itemSizeCache.get(r.key) ?? r.size, l = n - s;
2155
- l !== 0 && (((o = this.scrollState) == null ? void 0 : o.behavior) !== "smooth" && (this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(r, l, this) : r.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", l), this._scrollToOffset(this.getScrollOffset(), {
2404
+ var i;
2405
+ const o = this.measurementsCache[t];
2406
+ if (!o) return;
2407
+ const s = this.itemSizeCache.get(o.key) ?? o.size, l = n - s;
2408
+ l !== 0 && (((i = this.scrollState) == null ? void 0 : i.behavior) !== "smooth" && (this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(o, l, this) : o.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", l), this._scrollToOffset(this.getScrollOffset(), {
2156
2409
  adjustments: this.scrollAdjustments += l,
2157
2410
  behavior: void 0
2158
- })), this.pendingMeasuredCacheIndexes.push(r.index), this.itemSizeCache = new Map(this.itemSizeCache.set(r.key, n)), this.notify(!1));
2159
- }, this.getVirtualItems = j(
2411
+ })), this.pendingMeasuredCacheIndexes.push(o.index), this.itemSizeCache = new Map(this.itemSizeCache.set(o.key, n)), this.notify(!1));
2412
+ }, this.getVirtualItems = W(
2160
2413
  () => [this.getVirtualIndexes(), this.getMeasurements()],
2161
2414
  (t, n) => {
2162
- const o = [];
2163
- for (let r = 0, s = t.length; r < s; r++) {
2164
- const l = t[r], a = n[l];
2165
- o.push(a);
2415
+ const i = [];
2416
+ for (let o = 0, s = t.length; o < s; o++) {
2417
+ const l = t[o], a = n[l];
2418
+ i.push(a);
2166
2419
  }
2167
- return o;
2420
+ return i;
2168
2421
  },
2169
2422
  {
2170
2423
  key: process.env.NODE_ENV !== "production" && "getVirtualItems",
@@ -2173,11 +2426,11 @@ class Vn {
2173
2426
  ), this.getVirtualItemForOffset = (t) => {
2174
2427
  const n = this.getMeasurements();
2175
2428
  if (n.length !== 0)
2176
- return We(
2177
- n[ft(
2429
+ return Ke(
2430
+ n[pt(
2178
2431
  0,
2179
2432
  n.length - 1,
2180
- (o) => We(n[o]).start,
2433
+ (i) => Ke(n[i]).start,
2181
2434
  t
2182
2435
  )]
2183
2436
  );
@@ -2189,23 +2442,23 @@ class Vn {
2189
2442
  const t = this.scrollElement.document.documentElement;
2190
2443
  return this.options.horizontal ? t.scrollWidth - this.scrollElement.innerWidth : t.scrollHeight - this.scrollElement.innerHeight;
2191
2444
  }
2192
- }, this.getOffsetForAlignment = (t, n, o = 0) => {
2445
+ }, this.getOffsetForAlignment = (t, n, i = 0) => {
2193
2446
  if (!this.scrollElement) return 0;
2194
- const r = this.getSize(), s = this.getScrollOffset();
2195
- n === "auto" && (n = t >= s + r ? "end" : "start"), n === "center" ? t += (o - r) / 2 : n === "end" && (t -= r);
2447
+ const o = this.getSize(), s = this.getScrollOffset();
2448
+ n === "auto" && (n = t >= s + o ? "end" : "start"), n === "center" ? t += (i - o) / 2 : n === "end" && (t -= o);
2196
2449
  const l = this.getMaxScrollOffset();
2197
2450
  return Math.max(Math.min(l, t), 0);
2198
2451
  }, this.getOffsetForIndex = (t, n = "auto") => {
2199
2452
  t = Math.max(0, Math.min(t, this.options.count - 1));
2200
- const o = this.getSize(), r = this.getScrollOffset(), s = this.measurementsCache[t];
2453
+ const i = this.getSize(), o = this.getScrollOffset(), s = this.measurementsCache[t];
2201
2454
  if (!s) return;
2202
2455
  if (n === "auto")
2203
- if (s.end >= r + o - this.options.scrollPaddingEnd)
2456
+ if (s.end >= o + i - this.options.scrollPaddingEnd)
2204
2457
  n = "end";
2205
- else if (s.start <= r + this.options.scrollPaddingStart)
2458
+ else if (s.start <= o + this.options.scrollPaddingStart)
2206
2459
  n = "start";
2207
2460
  else
2208
- return [r, n];
2461
+ return [o, n];
2209
2462
  if (n === "end" && t === this.options.count - 1)
2210
2463
  return [this.getMaxScrollOffset(), n];
2211
2464
  const l = n === "end" ? s.end + this.options.scrollPaddingEnd : s.start - this.options.scrollPaddingStart;
@@ -2213,72 +2466,72 @@ class Vn {
2213
2466
  this.getOffsetForAlignment(l, n, s.size),
2214
2467
  n
2215
2468
  ];
2216
- }, this.scrollToOffset = (t, { align: n = "start", behavior: o = "auto" } = {}) => {
2217
- const r = this.getOffsetForAlignment(t, n), s = this.now();
2469
+ }, this.scrollToOffset = (t, { align: n = "start", behavior: i = "auto" } = {}) => {
2470
+ const o = this.getOffsetForAlignment(t, n), s = this.now();
2218
2471
  this.scrollState = {
2219
2472
  index: null,
2220
2473
  align: n,
2221
- behavior: o,
2474
+ behavior: i,
2222
2475
  startedAt: s,
2223
- lastTargetOffset: r,
2476
+ lastTargetOffset: o,
2224
2477
  stableFrames: 0
2225
- }, this._scrollToOffset(r, { adjustments: void 0, behavior: o }), this.scheduleScrollReconcile();
2478
+ }, this._scrollToOffset(o, { adjustments: void 0, behavior: i }), this.scheduleScrollReconcile();
2226
2479
  }, this.scrollToIndex = (t, {
2227
2480
  align: n = "auto",
2228
- behavior: o = "auto"
2481
+ behavior: i = "auto"
2229
2482
  } = {}) => {
2230
2483
  t = Math.max(0, Math.min(t, this.options.count - 1));
2231
- const r = this.getOffsetForIndex(t, n);
2232
- if (!r)
2484
+ const o = this.getOffsetForIndex(t, n);
2485
+ if (!o)
2233
2486
  return;
2234
- const [s, l] = r, a = this.now();
2487
+ const [s, l] = o, a = this.now();
2235
2488
  this.scrollState = {
2236
2489
  index: t,
2237
2490
  align: l,
2238
- behavior: o,
2491
+ behavior: i,
2239
2492
  startedAt: a,
2240
2493
  lastTargetOffset: s,
2241
2494
  stableFrames: 0
2242
- }, this._scrollToOffset(s, { adjustments: void 0, behavior: o }), this.scheduleScrollReconcile();
2495
+ }, this._scrollToOffset(s, { adjustments: void 0, behavior: i }), this.scheduleScrollReconcile();
2243
2496
  }, this.scrollBy = (t, { behavior: n = "auto" } = {}) => {
2244
- const o = this.getScrollOffset() + t, r = this.now();
2497
+ const i = this.getScrollOffset() + t, o = this.now();
2245
2498
  this.scrollState = {
2246
2499
  index: null,
2247
2500
  align: "start",
2248
2501
  behavior: n,
2249
- startedAt: r,
2250
- lastTargetOffset: o,
2502
+ startedAt: o,
2503
+ lastTargetOffset: i,
2251
2504
  stableFrames: 0
2252
- }, this._scrollToOffset(o, { adjustments: void 0, behavior: n }), this.scheduleScrollReconcile();
2505
+ }, this._scrollToOffset(i, { adjustments: void 0, behavior: n }), this.scheduleScrollReconcile();
2253
2506
  }, this.getTotalSize = () => {
2254
2507
  var t;
2255
2508
  const n = this.getMeasurements();
2256
- let o;
2509
+ let i;
2257
2510
  if (n.length === 0)
2258
- o = this.options.paddingStart;
2511
+ i = this.options.paddingStart;
2259
2512
  else if (this.options.lanes === 1)
2260
- o = ((t = n[n.length - 1]) == null ? void 0 : t.end) ?? 0;
2513
+ i = ((t = n[n.length - 1]) == null ? void 0 : t.end) ?? 0;
2261
2514
  else {
2262
- const r = Array(this.options.lanes).fill(null);
2515
+ const o = Array(this.options.lanes).fill(null);
2263
2516
  let s = n.length - 1;
2264
- for (; s >= 0 && r.some((l) => l === null); ) {
2517
+ for (; s >= 0 && o.some((l) => l === null); ) {
2265
2518
  const l = n[s];
2266
- r[l.lane] === null && (r[l.lane] = l.end), s--;
2519
+ o[l.lane] === null && (o[l.lane] = l.end), s--;
2267
2520
  }
2268
- o = Math.max(...r.filter((l) => l !== null));
2521
+ i = Math.max(...o.filter((l) => l !== null));
2269
2522
  }
2270
2523
  return Math.max(
2271
- o - this.options.scrollMargin + this.options.paddingEnd,
2524
+ i - this.options.scrollMargin + this.options.paddingEnd,
2272
2525
  0
2273
2526
  );
2274
2527
  }, this._scrollToOffset = (t, {
2275
2528
  adjustments: n,
2276
- behavior: o
2529
+ behavior: i
2277
2530
  }) => {
2278
- this.options.scrollToFn(t, { behavior: o, adjustments: n }, this);
2531
+ this.options.scrollToFn(t, { behavior: i, adjustments: n }, this);
2279
2532
  }, this.measure = () => {
2280
2533
  this.itemSizeCache = /* @__PURE__ */ new Map(), this.laneAssignments = /* @__PURE__ */ new Map(), this.notify(!1);
2281
- }, this.setOptions(i);
2534
+ }, this.setOptions(r);
2282
2535
  }
2283
2536
  scheduleScrollReconcile() {
2284
2537
  if (!this.targetWindow) {
@@ -2295,337 +2548,410 @@ class Vn {
2295
2548
  this.scrollState = null;
2296
2549
  return;
2297
2550
  }
2298
- const n = this.scrollState.index != null ? this.getOffsetForIndex(this.scrollState.index, this.scrollState.align) : void 0, o = n ? n[0] : this.scrollState.lastTargetOffset, r = 1, s = o !== this.scrollState.lastTargetOffset;
2299
- if (!s && yn(o, this.getScrollOffset())) {
2300
- if (this.scrollState.stableFrames++, this.scrollState.stableFrames >= r) {
2551
+ const n = this.scrollState.index != null ? this.getOffsetForIndex(this.scrollState.index, this.scrollState.align) : void 0, i = n ? n[0] : this.scrollState.lastTargetOffset, o = 1, s = i !== this.scrollState.lastTargetOffset;
2552
+ if (!s && bn(i, this.getScrollOffset())) {
2553
+ if (this.scrollState.stableFrames++, this.scrollState.stableFrames >= o) {
2301
2554
  this.scrollState = null;
2302
2555
  return;
2303
2556
  }
2304
2557
  } else
2305
- this.scrollState.stableFrames = 0, s && (this.scrollState.lastTargetOffset = o, this.scrollState.behavior = "auto", this._scrollToOffset(o, {
2558
+ this.scrollState.stableFrames = 0, s && (this.scrollState.lastTargetOffset = i, this.scrollState.behavior = "auto", this._scrollToOffset(i, {
2306
2559
  adjustments: void 0,
2307
2560
  behavior: "auto"
2308
2561
  }));
2309
2562
  this.scheduleScrollReconcile();
2310
2563
  }
2311
2564
  }
2312
- const ft = (e, i, t, n) => {
2313
- for (; e <= i; ) {
2314
- const o = (e + i) / 2 | 0, r = t(o);
2315
- if (r < n)
2316
- e = o + 1;
2317
- else if (r > n)
2318
- i = o - 1;
2565
+ const pt = (e, r, t, n) => {
2566
+ for (; e <= r; ) {
2567
+ const i = (e + r) / 2 | 0, o = t(i);
2568
+ if (o < n)
2569
+ e = i + 1;
2570
+ else if (o > n)
2571
+ r = i - 1;
2319
2572
  else
2320
- return o;
2573
+ return i;
2321
2574
  }
2322
2575
  return e > 0 ? e - 1 : 0;
2323
2576
  };
2324
- function Pn({
2577
+ function Ln({
2325
2578
  measurements: e,
2326
- outerSize: i,
2579
+ outerSize: r,
2327
2580
  scrollOffset: t,
2328
2581
  lanes: n
2329
2582
  }) {
2330
- const o = e.length - 1, r = (a) => e[a].start;
2583
+ const i = e.length - 1, o = (a) => e[a].start;
2331
2584
  if (e.length <= n)
2332
2585
  return {
2333
2586
  startIndex: 0,
2334
- endIndex: o
2587
+ endIndex: i
2335
2588
  };
2336
- let s = ft(
2589
+ let s = pt(
2337
2590
  0,
2591
+ i,
2338
2592
  o,
2339
- r,
2340
2593
  t
2341
2594
  ), l = s;
2342
2595
  if (n === 1)
2343
- for (; l < o && e[l].end < t + i; )
2596
+ for (; l < i && e[l].end < t + r; )
2344
2597
  l++;
2345
2598
  else if (n > 1) {
2346
2599
  const a = Array(n).fill(0);
2347
- for (; l < o && a.some((g) => g < t + i); ) {
2348
- const g = e[l];
2349
- a[g.lane] = g.end, l++;
2600
+ for (; l < i && a.some((f) => f < t + r); ) {
2601
+ const f = e[l];
2602
+ a[f.lane] = f.end, l++;
2350
2603
  }
2351
- const u = Array(n).fill(t + i);
2352
- for (; s >= 0 && u.some((g) => g >= t); ) {
2353
- const g = e[s];
2354
- u[g.lane] = g.start, s--;
2604
+ const u = Array(n).fill(t + r);
2605
+ for (; s >= 0 && u.some((f) => f >= t); ) {
2606
+ const f = e[s];
2607
+ u[f.lane] = f.start, s--;
2355
2608
  }
2356
- s = Math.max(0, s - s % n), l = Math.min(o, l + (n - 1 - l % n));
2609
+ s = Math.max(0, s - s % n), l = Math.min(i, l + (n - 1 - l % n));
2357
2610
  }
2358
2611
  return { startIndex: s, endIndex: l };
2359
2612
  }
2360
- const Je = typeof document < "u" ? B.useLayoutEffect : B.useEffect;
2361
- function zn({
2613
+ const Ye = typeof document < "u" ? B.useLayoutEffect : B.useEffect;
2614
+ function Gn({
2362
2615
  useFlushSync: e = !0,
2363
- ...i
2616
+ ...r
2364
2617
  }) {
2365
2618
  const t = B.useReducer(() => ({}), {})[1], n = {
2366
- ...i,
2367
- onChange: (r, s) => {
2619
+ ...r,
2620
+ onChange: (o, s) => {
2368
2621
  var l;
2369
- e && s ? _t(t) : t(), (l = i.onChange) == null || l.call(i, r, s);
2622
+ e && s ? bt(t) : t(), (l = r.onChange) == null || l.call(r, o, s);
2370
2623
  }
2371
- }, [o] = B.useState(
2372
- () => new Vn(n)
2624
+ }, [i] = B.useState(
2625
+ () => new Hn(n)
2373
2626
  );
2374
- return o.setOptions(n), Je(() => o._didMount(), []), Je(() => o._willUpdate()), o;
2627
+ return i.setOptions(n), Ye(() => i._didMount(), []), Ye(() => i._willUpdate()), i;
2375
2628
  }
2376
- function Nn(e) {
2377
- return zn({
2378
- observeElementRect: $n,
2379
- observeElementOffset: In,
2380
- scrollToFn: bn,
2629
+ function kn(e) {
2630
+ return Gn({
2631
+ observeElementRect: On,
2632
+ observeElementOffset: Nn,
2633
+ scrollToFn: Dn,
2381
2634
  ...e
2382
2635
  });
2383
2636
  }
2384
- function On(e) {
2385
- const i = {}, t = {};
2637
+ function Tn(e) {
2638
+ const r = {}, t = {};
2386
2639
  let n = 0;
2387
- for (const r of e)
2388
- r.fixed === "left" && (i[r.key] = n, n += r.width || r.minWidth || 100);
2389
- let o = 0;
2390
- for (let r = e.length - 1; r >= 0; r--) {
2391
- const s = e[r];
2392
- s.fixed === "right" && (t[s.key] = o, o += s.width || s.minWidth || 100);
2640
+ for (const o of e)
2641
+ o.fixed === "left" && (r[o.key] = n, n += o.width || o.minWidth || 100);
2642
+ let i = 0;
2643
+ for (let o = e.length - 1; o >= 0; o--) {
2644
+ const s = e[o];
2645
+ s.fixed === "right" && (t[s.key] = i, i += s.width || s.minWidth || 100);
2393
2646
  }
2394
- return { leftOffsets: i, rightOffsets: t };
2647
+ return { leftOffsets: r, rightOffsets: t };
2395
2648
  }
2396
- function Jn({
2649
+ function er({
2397
2650
  columns: e,
2398
- data: i,
2399
- rowKey: t = "id",
2400
- childrenKey: n = "children",
2401
- height: o,
2402
- estimateRowHeight: r = 48,
2403
- bordered: s = !1,
2404
- striped: l = !1,
2405
- emptyText: a = "暂无数据",
2406
- selectable: u = !1,
2407
- onSelectionChange: g,
2408
- onSortChange: m,
2409
- onRowClick: c,
2410
- rowClassName: d,
2411
- loading: p = !1,
2412
- className: h = ""
2651
+ columnDefs: r,
2652
+ tableRef: t,
2653
+ data: n,
2654
+ rowKey: i = "id",
2655
+ childrenKey: o = "children",
2656
+ height: s,
2657
+ estimateRowHeight: l = 48,
2658
+ bordered: a = !1,
2659
+ striped: u = !1,
2660
+ emptyText: f = "暂无数据",
2661
+ selectable: m = !1,
2662
+ onSelectionChange: c,
2663
+ onSortChange: d,
2664
+ onRowClick: g,
2665
+ rowClassName: p,
2666
+ loading: v = !1,
2667
+ className: S = ""
2413
2668
  }) {
2414
- const [w, S] = q([]), [v, F] = q({}), [$, I] = q({}), P = yt(null), ne = W(
2669
+ const [w, _] = X([]), [$, E] = X({}), [O, oe] = X({}), Y = Mt(null), Se = J(
2415
2670
  (R) => {
2416
- S((y) => {
2417
- const M = typeof R == "function" ? R(y) : R;
2418
- return m == null || m(M), M;
2671
+ _((M) => {
2672
+ const y = typeof R == "function" ? R(M) : R;
2673
+ return d == null || d(y), y;
2419
2674
  });
2420
2675
  },
2421
- [m]
2422
- ), ie = W(
2676
+ [d]
2677
+ ), ve = J(
2423
2678
  (R) => {
2424
- I((y) => typeof R == "function" ? R(y) : R);
2679
+ oe((M) => typeof R == "function" ? R(M) : R);
2425
2680
  },
2426
2681
  []
2427
- ), { leftOffsets: X, rightOffsets: J } = se(() => On(e), [e]), O = se(() => {
2428
- const R = [];
2429
- u && R.push({
2682
+ ), { leftOffsets: j, rightOffsets: we } = le(
2683
+ () => Tn(e ?? []),
2684
+ [e]
2685
+ ), Z = le(() => {
2686
+ if (r)
2687
+ return m ? [
2688
+ {
2689
+ id: "__selection",
2690
+ size: 48,
2691
+ minSize: 48,
2692
+ enableSorting: !1,
2693
+ header: ({ table: y }) => /* @__PURE__ */ h(
2694
+ "input",
2695
+ {
2696
+ type: "checkbox",
2697
+ className: "w-4 h-4 rounded border-gray-300 text-primary focus:ring-primary",
2698
+ checked: y.getIsAllRowsSelected(),
2699
+ onChange: y.getToggleAllRowsSelectedHandler(),
2700
+ "aria-label": "全选"
2701
+ }
2702
+ ),
2703
+ cell: ({ row: y }) => /* @__PURE__ */ h(
2704
+ "input",
2705
+ {
2706
+ type: "checkbox",
2707
+ className: "w-4 h-4 rounded border-gray-300 text-primary focus:ring-primary",
2708
+ checked: y.getIsSelected(),
2709
+ onChange: y.getToggleSelectedHandler(),
2710
+ onClick: (I) => I.stopPropagation(),
2711
+ "aria-label": "选择行"
2712
+ }
2713
+ )
2714
+ },
2715
+ ...r
2716
+ ] : r;
2717
+ const R = e ?? [], M = [];
2718
+ m && M.push({
2430
2719
  id: "__selection",
2431
2720
  size: 48,
2432
2721
  minSize: 48,
2433
2722
  enableSorting: !1,
2434
- header: ({ table: y }) => /* @__PURE__ */ f(
2723
+ header: ({ table: y }) => /* @__PURE__ */ h(
2435
2724
  "input",
2436
2725
  {
2437
2726
  type: "checkbox",
2438
- className: "em-table-checkbox",
2727
+ className: "w-4 h-4 rounded border-gray-300 text-primary focus:ring-primary",
2439
2728
  checked: y.getIsAllRowsSelected(),
2440
2729
  onChange: y.getToggleAllRowsSelectedHandler(),
2441
2730
  "aria-label": "全选"
2442
2731
  }
2443
2732
  ),
2444
- cell: ({ row: y }) => /* @__PURE__ */ f(
2733
+ cell: ({ row: y }) => /* @__PURE__ */ h(
2445
2734
  "input",
2446
2735
  {
2447
2736
  type: "checkbox",
2448
- className: "em-table-checkbox",
2737
+ className: "w-4 h-4 rounded border-gray-300 text-primary focus:ring-primary",
2449
2738
  checked: y.getIsSelected(),
2450
2739
  onChange: y.getToggleSelectedHandler(),
2451
- onClick: (M) => M.stopPropagation(),
2740
+ onClick: (I) => I.stopPropagation(),
2452
2741
  "aria-label": "选择行"
2453
2742
  }
2454
2743
  )
2455
2744
  });
2456
- for (const y of e)
2457
- R.push({
2745
+ for (const y of R)
2746
+ M.push({
2458
2747
  id: y.key,
2459
2748
  accessorKey: y.key,
2460
2749
  header: y.title,
2461
2750
  size: y.width,
2462
2751
  minSize: y.minWidth || 80,
2463
2752
  enableSorting: y.sortable ?? !1,
2464
- cell: (M) => {
2465
- var Ge;
2466
- const A = M.getValue(), he = M.row.original, xt = M.row.index, me = ((Ge = e[0]) == null ? void 0 : Ge.key) === y.key, Le = me && M.row.getCanExpand();
2467
- return /* @__PURE__ */ _("div", { className: "flex items-center gap-1", style: { paddingLeft: me ? `${M.row.depth * 20}px` : void 0 }, children: [
2468
- Le && /* @__PURE__ */ f(
2753
+ cell: (I) => {
2754
+ var Te;
2755
+ const U = I.getValue(), yt = I.row.original, _t = I.row.index, Ce = ((Te = R[0]) == null ? void 0 : Te.key) === y.key, ke = Ce && I.row.getCanExpand();
2756
+ return /* @__PURE__ */ F("div", { className: "flex items-center gap-1", style: { paddingLeft: Ce ? `${I.row.depth * 20}px` : void 0 }, children: [
2757
+ ke && /* @__PURE__ */ h(
2469
2758
  "button",
2470
2759
  {
2471
- className: "em-table-expand-btn",
2472
- onClick: (Rt) => {
2473
- Rt.stopPropagation(), M.row.toggleExpanded();
2760
+ className: "p-0.5 rounded hover:bg-gray-200 text-gray-500",
2761
+ onClick: (Ft) => {
2762
+ Ft.stopPropagation(), I.row.toggleExpanded();
2474
2763
  },
2475
- "aria-label": M.row.getIsExpanded() ? "收起" : "展开",
2476
- children: /* @__PURE__ */ f("svg", { className: `w-4 h-4 transition-transform ${M.row.getIsExpanded() ? "rotate-90" : ""}`, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ f("path", { fillRule: "evenodd", d: "M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z", clipRule: "evenodd" }) })
2764
+ "aria-label": I.row.getIsExpanded() ? "收起" : "展开",
2765
+ children: /* @__PURE__ */ h("svg", { className: `w-4 h-4 transition-transform ${I.row.getIsExpanded() ? "rotate-90" : ""}`, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ h("path", { fillRule: "evenodd", d: "M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z", clipRule: "evenodd" }) })
2477
2766
  }
2478
2767
  ),
2479
- me && !Le && M.row.depth > 0 && /* @__PURE__ */ f("span", { className: "w-4" }),
2480
- /* @__PURE__ */ f("span", { className: `truncate ${y.align === "center" ? "text-center w-full" : y.align === "right" ? "text-right w-full" : ""}`, children: y.render ? y.render(A, he, xt) : A ?? "-" })
2768
+ Ce && !ke && I.row.depth > 0 && /* @__PURE__ */ h("span", { className: "w-4" }),
2769
+ /* @__PURE__ */ h("span", { className: `truncate ${y.align === "center" ? "text-center w-full" : y.align === "right" ? "text-right w-full" : ""}`, children: y.render ? y.render(U, yt, _t) : U ?? "-" })
2481
2770
  ] });
2482
2771
  }
2483
2772
  });
2484
- return R;
2485
- }, [e, u]), oe = Rn({
2486
- data: i,
2487
- columns: O,
2488
- state: { sorting: w, expanded: v, rowSelection: $ },
2489
- onSortingChange: ne,
2490
- onExpandedChange: F,
2491
- onRowSelectionChange: ie,
2492
- getRowId: (R) => String(R[t] ?? ""),
2493
- getSubRows: (R) => R[n],
2494
- getCoreRowModel: hn(),
2495
- getSortedRowModel: vn(),
2496
- getExpandedRowModel: mn(),
2497
- enableRowSelection: u
2498
- }), Ne = se(() => u ? oe.getSelectedRowModel().rows.map((R) => R.original) : [], [oe, u, $]);
2499
- se(() => {
2500
- u && g && g(Ne);
2501
- }, [Ne]);
2502
- const { rows: re } = oe.getRowModel(), Oe = Nn({
2503
- count: re.length,
2504
- getScrollElement: () => P.current,
2505
- estimateSize: () => r,
2773
+ return M;
2774
+ }, [e, r, m]), q = En({
2775
+ data: n,
2776
+ columns: Z,
2777
+ state: { sorting: w, expanded: $, rowSelection: O },
2778
+ onSortingChange: Se,
2779
+ onExpandedChange: E,
2780
+ onRowSelectionChange: ve,
2781
+ getRowId: (R) => String(R[i] ?? ""),
2782
+ getSubRows: (R) => R[o],
2783
+ getCoreRowModel: Rn(),
2784
+ getSortedRowModel: Fn(),
2785
+ getExpandedRowModel: yn(),
2786
+ enableRowSelection: m
2787
+ });
2788
+ pe(() => {
2789
+ t && (t.current = q);
2790
+ }, [q, t]);
2791
+ const De = le(() => m ? q.getSelectedRowModel().rows.map((R) => R.original) : [], [q, m, O]);
2792
+ le(() => {
2793
+ m && c && c(De);
2794
+ }, [De]);
2795
+ const { rows: se } = q.getRowModel(), He = kn({
2796
+ count: se.length,
2797
+ getScrollElement: () => Y.current,
2798
+ estimateSize: () => l,
2506
2799
  overscan: 10,
2507
- enabled: !!o
2508
- }), St = W((R, y) => {
2509
- const M = ["em-table-row", l && y % 2 === 1 ? "em-table-row--striped" : "", c ? "cursor-pointer" : ""];
2510
- return typeof d == "function" ? M.push(d(R.original, y)) : d && M.push(d), M.filter(Boolean).join(" ");
2511
- }, [l, c, d]), Ae = (R) => R in X ? { position: "sticky", left: X[R], zIndex: 1 } : R in J ? { position: "sticky", right: J[R], zIndex: 1 } : {}, De = (R) => R in X ? "em-table-cell--sticky-left" : R in J ? "em-table-cell--sticky-right" : "", vt = () => /* @__PURE__ */ f("thead", { className: "em-table-thead", children: oe.getHeaderGroups().map((R) => /* @__PURE__ */ f("tr", { children: R.headers.map((y) => {
2512
- const M = e.find((A) => A.key === y.id);
2513
- return /* @__PURE__ */ f(
2800
+ enabled: !!s
2801
+ }), vt = J((R, M) => V(
2802
+ "hover:bg-gray-50 transition-colors",
2803
+ u && M % 2 === 1 && "bg-gray-50",
2804
+ g && "cursor-pointer",
2805
+ typeof p == "function" ? p(R.original, M) : p
2806
+ ), [u, g, p]), Le = (R) => R in j ? { position: "sticky", left: j[R], zIndex: 1 } : R in we ? { position: "sticky", right: we[R], zIndex: 1 } : {}, wt = (R) => R in j || R in we ? "bg-white" : "", Ct = () => /* @__PURE__ */ h("thead", { children: q.getHeaderGroups().map((R) => /* @__PURE__ */ h("tr", { children: R.headers.map((M) => {
2807
+ const y = e == null ? void 0 : e.find((U) => U.key === M.id), I = M.column.getIsSorted();
2808
+ return /* @__PURE__ */ h(
2514
2809
  "th",
2515
2810
  {
2516
- className: `em-table-th ${De(y.id)} ${y.column.getCanSort() ? "cursor-pointer select-none" : ""}`,
2517
- style: { width: y.getSize(), minWidth: y.column.columnDef.minSize, textAlign: (M == null ? void 0 : M.align) || "left", ...Ae(y.id) },
2518
- onClick: y.column.getToggleSortingHandler(),
2519
- children: /* @__PURE__ */ _("div", { className: "flex items-center gap-1", children: [
2520
- qe(y.column.columnDef.header, y.getContext()),
2521
- y.column.getCanSort() && /* @__PURE__ */ f("span", { className: "em-table-sort-icon", children: { asc: "↑", desc: "↓" }[y.column.getIsSorted()] ?? "↕" })
2811
+ className: V(
2812
+ "px-3 py-2 text-left text-sm font-medium text-gray-600 bg-gray-50",
2813
+ "border-b border-gray-200 whitespace-nowrap",
2814
+ M.column.getCanSort() && "cursor-pointer select-none hover:bg-gray-100"
2815
+ ),
2816
+ style: {
2817
+ width: M.getSize(),
2818
+ minWidth: M.column.columnDef.minSize,
2819
+ textAlign: (y == null ? void 0 : y.align) || "left",
2820
+ // 固定列偏移量为运行时计算值,保留内联 style
2821
+ ...Le(M.id)
2822
+ },
2823
+ onClick: M.column.getToggleSortingHandler(),
2824
+ children: /* @__PURE__ */ F("div", { className: "flex items-center gap-1", children: [
2825
+ We(M.column.columnDef.header, M.getContext()),
2826
+ M.column.getCanSort() && // 排序图标激活状态使用 text-primary 工具类
2827
+ /* @__PURE__ */ h("span", { className: V("text-xs", I ? "text-primary" : "text-gray-400"), children: { asc: "↑", desc: "↓" }[I] ?? "↕" })
2522
2828
  ] })
2523
2829
  },
2524
- y.id
2830
+ M.id
2525
2831
  );
2526
- }) }, R.id)) }), He = (R, y) => /* @__PURE__ */ f("tr", { className: St(R, y), onClick: () => c == null ? void 0 : c(R.original), children: R.getVisibleCells().map((M) => {
2527
- const A = e.find((he) => he.key === M.column.id);
2528
- return /* @__PURE__ */ f(
2832
+ }) }, R.id)) }), Ge = (R, M) => /* @__PURE__ */ h("tr", { className: vt(R, M), onClick: () => g == null ? void 0 : g(R.original), children: R.getVisibleCells().map((y) => {
2833
+ const I = e == null ? void 0 : e.find((U) => U.key === y.column.id);
2834
+ return /* @__PURE__ */ h(
2529
2835
  "td",
2530
2836
  {
2531
- className: `em-table-td ${De(M.column.id)}`,
2532
- style: { width: M.column.getSize(), minWidth: M.column.columnDef.minSize, textAlign: (A == null ? void 0 : A.align) || "left", ...Ae(M.column.id) },
2533
- children: qe(M.column.columnDef.cell, M.getContext())
2837
+ className: V(
2838
+ "px-3 py-2 text-sm text-gray-700 border-b border-gray-100",
2839
+ wt(y.column.id)
2840
+ ),
2841
+ style: {
2842
+ width: y.column.getSize(),
2843
+ minWidth: y.column.columnDef.minSize,
2844
+ textAlign: (I == null ? void 0 : I.align) || "left",
2845
+ // 固定列偏移量为运行时计算值,保留内联 style
2846
+ ...Le(y.column.id)
2847
+ },
2848
+ children: We(y.column.columnDef.cell, y.getContext())
2534
2849
  },
2535
- M.id
2850
+ y.id
2536
2851
  );
2537
- }) }, R.id), wt = () => {
2538
- const R = Oe.getVirtualItems(), y = Oe.getTotalSize();
2539
- return /* @__PURE__ */ f("tbody", { children: R.length === 0 ? /* @__PURE__ */ f("tr", { children: /* @__PURE__ */ f("td", { colSpan: O.length, className: "em-table-empty", children: a }) }) : /* @__PURE__ */ _(Ze, { children: [
2540
- R[0].start > 0 && /* @__PURE__ */ f("tr", { children: /* @__PURE__ */ f("td", { colSpan: O.length, style: { height: R[0].start } }) }),
2541
- R.map((M) => He(re[M.index], M.index)),
2542
- R[R.length - 1].end < y && /* @__PURE__ */ f("tr", { children: /* @__PURE__ */ f("td", { colSpan: O.length, style: { height: y - R[R.length - 1].end } }) })
2852
+ }) }, R.id), xt = () => {
2853
+ const R = He.getVirtualItems(), M = He.getTotalSize();
2854
+ return /* @__PURE__ */ h("tbody", { children: R.length === 0 ? /* @__PURE__ */ h("tr", { children: /* @__PURE__ */ h("td", { colSpan: Z.length, className: "py-12 text-center text-sm text-gray-400", children: f }) }) : /* @__PURE__ */ F(tt, { children: [
2855
+ R[0].start > 0 && /* @__PURE__ */ h("tr", { children: /* @__PURE__ */ h("td", { colSpan: Z.length, style: { height: R[0].start } }) }),
2856
+ R.map((y) => Ge(se[y.index], y.index)),
2857
+ R[R.length - 1].end < M && /* @__PURE__ */ h("tr", { children: /* @__PURE__ */ h("td", { colSpan: Z.length, style: { height: M - R[R.length - 1].end } }) })
2543
2858
  ] }) });
2544
- }, Ct = () => /* @__PURE__ */ f("tbody", { children: re.length === 0 ? /* @__PURE__ */ f("tr", { children: /* @__PURE__ */ f("td", { colSpan: O.length, className: "em-table-empty", children: a }) }) : re.map((R, y) => He(R, y)) });
2545
- return /* @__PURE__ */ _("div", { className: `em-table-wrapper ${s ? "em-table--bordered" : ""} ${h}`, children: [
2546
- p && /* @__PURE__ */ f("div", { className: "em-table-loading", children: /* @__PURE__ */ f("div", { className: "em-table-loading-spinner" }) }),
2547
- /* @__PURE__ */ f(
2859
+ }, Rt = () => /* @__PURE__ */ h("tbody", { children: se.length === 0 ? /* @__PURE__ */ h("tr", { children: /* @__PURE__ */ h("td", { colSpan: Z.length, className: "py-12 text-center text-sm text-gray-400", children: f }) }) : se.map((R, M) => Ge(R, M)) });
2860
+ return /* @__PURE__ */ F("div", { className: V(
2861
+ "relative overflow-hidden",
2862
+ a && "border border-gray-200 rounded",
2863
+ S
2864
+ ), children: [
2865
+ v && /* @__PURE__ */ h("div", { className: "absolute inset-0 bg-white/60 flex items-center justify-center z-10", children: /* @__PURE__ */ h("div", { className: "w-8 h-8 border-2 border-gray-200 border-t-primary rounded-full animate-spin" }) }),
2866
+ /* @__PURE__ */ h(
2548
2867
  "div",
2549
2868
  {
2550
- ref: P,
2551
- className: "em-table-container",
2552
- style: o ? { height: o, overflow: "auto" } : { overflow: "auto" },
2553
- children: /* @__PURE__ */ _("table", { className: "em-table", children: [
2554
- vt(),
2555
- o ? wt() : Ct()
2869
+ ref: Y,
2870
+ style: s ? { height: s, overflow: "auto" } : { overflow: "auto" },
2871
+ children: /* @__PURE__ */ F("table", { className: "w-full border-collapse text-sm", children: [
2872
+ Ct(),
2873
+ s ? xt() : Rt()
2556
2874
  ] })
2557
2875
  }
2558
2876
  )
2559
2877
  ] });
2560
2878
  }
2561
- function Qn({
2879
+ function tr({
2562
2880
  total: e,
2563
- pageIndex: i,
2881
+ pageIndex: r,
2564
2882
  pageSize: t,
2565
2883
  pageSizes: n = [10, 20, 50, 100],
2566
- onChange: o,
2567
- onPageSizeChange: r,
2568
- className: s = ""
2884
+ onChange: i,
2885
+ onPageSizeChange: o,
2886
+ showSizeChanger: s = !1,
2887
+ showTotal: l = !0,
2888
+ className: a = ""
2569
2889
  }) {
2570
2890
  if (e <= 0) return null;
2571
- const l = Math.ceil(e / t), a = () => {
2572
- const u = [];
2573
- if (l <= 7)
2574
- for (let g = 1; g <= l; g++) u.push(g);
2891
+ const u = Math.ceil(e / t), f = (g) => {
2892
+ o == null || o(g), i(1, g);
2893
+ }, m = l ? typeof l == "function" ? l(e) : `共 ${e} 条` : null, c = () => {
2894
+ const g = [];
2895
+ if (u <= 7)
2896
+ for (let p = 1; p <= u; p++) g.push(p);
2575
2897
  else {
2576
- u.push(1), i > 4 && u.push("ellipsis-left");
2577
- const g = Math.max(2, i - 2), m = Math.min(l - 1, i + 2);
2578
- for (let c = g; c <= m; c++) u.push(c);
2579
- i < l - 3 && u.push("ellipsis-right"), u.push(l);
2898
+ g.push(1), r > 4 && g.push("ellipsis-left");
2899
+ const p = Math.max(2, r - 2), v = Math.min(u - 1, r + 2);
2900
+ for (let S = p; S <= v; S++) g.push(S);
2901
+ r < u - 3 && g.push("ellipsis-right"), g.push(u);
2580
2902
  }
2581
- return u;
2582
- };
2583
- return /* @__PURE__ */ _("div", { className: `em-pagination ${s}`, children: [
2584
- /* @__PURE__ */ _("span", { className: "em-pagination-total", children: [
2585
- " ",
2586
- e,
2587
- " "
2588
- ] }),
2589
- r && /* @__PURE__ */ f(
2903
+ return g;
2904
+ }, d = V(
2905
+ "min-w-[30px] h-7 px-1.5 text-sm border border-gray-300 rounded bg-white text-gray-600",
2906
+ "cursor-pointer transition-all hover:text-primary hover:border-primary",
2907
+ "disabled:text-gray-300 disabled:cursor-not-allowed disabled:bg-gray-50"
2908
+ );
2909
+ return /* @__PURE__ */ F("div", { className: V("flex items-center gap-1.5 flex-wrap", a), children: [
2910
+ m && /* @__PURE__ */ h("span", { className: "text-sm text-gray-500 mr-1", children: m }),
2911
+ (s || o) && /* @__PURE__ */ h(
2590
2912
  "select",
2591
2913
  {
2592
2914
  value: t,
2593
- onChange: (u) => r(Number(u.target.value)),
2594
- className: "em-pagination-size-select",
2595
- children: n.map((u) => /* @__PURE__ */ _("option", { value: u, children: [
2596
- u,
2915
+ onChange: (g) => f(Number(g.target.value)),
2916
+ className: "h-7 px-1.5 text-sm border border-gray-300 rounded bg-white text-gray-600 cursor-pointer focus:outline-none focus:border-primary",
2917
+ children: n.map((g) => /* @__PURE__ */ F("option", { value: g, children: [
2918
+ g,
2597
2919
  "条/页"
2598
- ] }, u))
2920
+ ] }, g))
2599
2921
  }
2600
2922
  ),
2601
- /* @__PURE__ */ _("div", { className: "em-pagination-pages", children: [
2602
- /* @__PURE__ */ f(
2923
+ /* @__PURE__ */ F("div", { className: "flex items-center gap-1", children: [
2924
+ /* @__PURE__ */ h(
2603
2925
  "button",
2604
2926
  {
2605
- className: "em-pagination-btn",
2606
- disabled: i <= 1,
2607
- onClick: () => o(i - 1),
2927
+ className: d,
2928
+ disabled: r <= 1,
2929
+ onClick: () => i(r - 1),
2608
2930
  "aria-label": "上一页",
2609
2931
  children: "‹"
2610
2932
  }
2611
2933
  ),
2612
- a().map(
2613
- (u, g) => typeof u == "string" ? /* @__PURE__ */ f("span", { className: "em-pagination-ellipsis", children: "…" }, u + g) : /* @__PURE__ */ f(
2934
+ c().map(
2935
+ (g, p) => typeof g == "string" ? /* @__PURE__ */ h("span", { className: "min-w-[30px] h-7 flex items-center justify-center text-sm text-gray-400", children: "…" }, g + p) : /* @__PURE__ */ h(
2614
2936
  "button",
2615
2937
  {
2616
- className: `em-pagination-btn ${u === i ? "em-pagination-btn--active" : ""}`,
2617
- onClick: () => o(u),
2618
- children: u
2938
+ className: V(
2939
+ d,
2940
+ // 激活页码使用 primary 工具类,不硬编码颜色
2941
+ g === r && "bg-primary text-white border-primary hover:text-white"
2942
+ ),
2943
+ onClick: () => i(g),
2944
+ children: g
2619
2945
  },
2620
- u
2946
+ g
2621
2947
  )
2622
2948
  ),
2623
- /* @__PURE__ */ f(
2949
+ /* @__PURE__ */ h(
2624
2950
  "button",
2625
2951
  {
2626
- className: "em-pagination-btn",
2627
- disabled: i >= l,
2628
- onClick: () => o(i + 1),
2952
+ className: d,
2953
+ disabled: r >= u,
2954
+ onClick: () => i(r + 1),
2629
2955
  "aria-label": "下一页",
2630
2956
  children: "›"
2631
2957
  }
@@ -2633,469 +2959,167 @@ function Qn({
2633
2959
  ] })
2634
2960
  ] });
2635
2961
  }
2636
- function Yn({
2637
- actions: e,
2638
- search: i,
2639
- footer: t,
2640
- children: n,
2641
- className: o = "",
2642
- noPadding: r = !1
2643
- }) {
2644
- return /* @__PURE__ */ _("div", { className: `em-grid ${o}`, children: [
2645
- (e || i) && /* @__PURE__ */ _("div", { className: "em-grid-toolbar", style: { display: "flex", alignItems: "center", justifyContent: "space-between", padding: "8px 12px", background: "#f8f8f8", borderBottom: "1px solid #e1e4eb", position: "relative" }, children: [
2646
- e && /* @__PURE__ */ f("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: e }),
2647
- i && /* @__PURE__ */ f("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: i })
2648
- ] }),
2649
- /* @__PURE__ */ f("div", { className: "em-grid-body", style: { padding: r ? 0 : "12px" }, children: n }),
2650
- t && /* @__PURE__ */ f("div", { className: "em-grid-footer", style: { padding: "8px 12px", textAlign: "center", borderTop: "1px solid #e1e4eb", background: "#f6f6f6", fontSize: "14px", color: "#6b7280" }, children: t })
2651
- ] });
2652
- }
2653
- function pt(e) {
2654
- var i, t, n = "";
2655
- if (typeof e == "string" || typeof e == "number") n += e;
2656
- else if (typeof e == "object") if (Array.isArray(e)) {
2657
- var o = e.length;
2658
- for (i = 0; i < o; i++) e[i] && (t = pt(e[i])) && (n && (n += " "), n += t);
2659
- } else for (t in e) e[t] && (n && (n += " "), n += t);
2660
- return n;
2661
- }
2662
- function An() {
2663
- for (var e, i, t = 0, n = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (i = pt(e)) && (n && (n += " "), n += i);
2664
- return n;
2665
- }
2666
- function Dn(...e) {
2667
- return An(e);
2668
- }
2669
- const Hn = {
2670
- default: "#d2d6de",
2671
- primary: "#3c8dbc",
2672
- info: "#00c0ef",
2673
- danger: "#dd4b39",
2674
- warning: "#f39c12",
2675
- success: "#00a65a",
2676
- simple: "transparent"
2677
- };
2678
- function Zn({
2679
- theme: e = "default",
2680
- title: i,
2681
- showClose: t = !1,
2682
- noPadding: n = !1,
2683
- fixtop: o,
2684
- bodyStyle: r = {},
2685
- tabs: s = [],
2686
- header: l,
2687
- tools: a,
2688
- breadcrumb: u,
2689
- footer: g,
2690
- children: m,
2691
- onClose: c,
2692
- onTabClick: d,
2693
- className: p = ""
2694
- }) {
2695
- const h = i || l || a || t, w = { ...r };
2696
- if (o && o > 0) {
2697
- const S = typeof window < "u" ? window.innerHeight : 800;
2698
- w.height = `${S - o}px`, w.overflow = "auto";
2699
- }
2700
- return /* @__PURE__ */ _("div", { className: Dn("box", p), style: {
2701
- borderRadius: "2px",
2702
- background: "#fff",
2703
- borderTop: `3px solid ${Hn[e]}`,
2704
- marginBottom: "10px",
2705
- boxShadow: "0 1px 1px rgba(0,0,0,0.1)"
2706
- }, children: [
2707
- h && /* @__PURE__ */ _("div", { style: { borderBottom: "1px solid #f4f4f4", color: "#444", position: "relative" }, children: [
2708
- i && /* @__PURE__ */ f("h3", { style: { fontSize: "18px", margin: 0, padding: "10px 0 10px 15px", lineHeight: 1, fontWeight: 600 }, dangerouslySetInnerHTML: { __html: i } }),
2709
- s.map((S, v) => /* @__PURE__ */ f(
2710
- "h3",
2711
- {
2712
- style: { cursor: "pointer", padding: "10px 12px", margin: 0, fontSize: "14px", fontWeight: 400, display: "inline-block", borderBottom: S.active ? "2px solid #3c8dbc" : "none" },
2713
- onClick: () => d == null ? void 0 : d(S),
2714
- dangerouslySetInnerHTML: { __html: S.title }
2715
- },
2716
- v
2717
- )),
2718
- l,
2719
- (a || t) && /* @__PURE__ */ _("div", { style: { position: "absolute", right: "10px", top: 0 }, children: [
2720
- a,
2721
- t && /* @__PURE__ */ f("button", { onClick: c, style: { padding: "4px", marginRight: "4px", fontSize: "14px", background: "transparent", border: "none", color: "#97a0b3", cursor: "pointer" }, children: "✕" })
2722
- ] })
2723
- ] }),
2724
- /* @__PURE__ */ f("div", { style: { padding: n ? 0 : "16px", ...w }, children: m }),
2725
- g && /* @__PURE__ */ f("div", { style: { borderTop: "1px solid #f4f4f4", background: "#fff", padding: "8px", borderRadius: "0 0 2px 2px" }, children: g })
2726
- ] });
2727
- }
2728
- const Ln = {
2729
- sm: "max-w-sm",
2730
- md: "max-w-md",
2731
- lg: "max-w-lg",
2732
- xl: "max-w-xl"
2733
- };
2734
- function ei({
2735
- open: e,
2736
- onClose: i,
2737
- title: t,
2738
- children: n,
2739
- footer: o,
2740
- maskClosable: r = !0,
2741
- size: s = "md",
2742
- className: l = ""
2743
- }) {
2744
- return /* @__PURE__ */ f(G, { appear: !0, show: e, as: L, children: /* @__PURE__ */ _(U, { as: "div", className: "relative z-[9990]", onClose: r ? i : () => {
2745
- }, children: [
2746
- /* @__PURE__ */ f(
2747
- G.Child,
2748
- {
2749
- as: L,
2750
- enter: "ease-out duration-200",
2751
- enterFrom: "opacity-0",
2752
- enterTo: "opacity-100",
2753
- leave: "ease-in duration-150",
2754
- leaveFrom: "opacity-100",
2755
- leaveTo: "opacity-0",
2756
- children: /* @__PURE__ */ f("div", { className: "fixed inset-0 bg-black/50" })
2757
- }
2758
- ),
2759
- /* @__PURE__ */ f("div", { className: "fixed inset-0 overflow-y-auto", children: /* @__PURE__ */ f("div", { className: "flex min-h-full items-center justify-center p-4", children: /* @__PURE__ */ f(
2760
- G.Child,
2761
- {
2762
- as: L,
2763
- enter: "ease-out duration-200",
2764
- enterFrom: "opacity-0 scale-95",
2765
- enterTo: "opacity-100 scale-100",
2766
- leave: "ease-in duration-150",
2767
- leaveFrom: "opacity-100 scale-100",
2768
- leaveTo: "opacity-0 scale-95",
2769
- children: /* @__PURE__ */ _(
2770
- U.Panel,
2771
- {
2772
- className: `w-full ${Ln[s]} transform overflow-hidden rounded-lg bg-white shadow-xl transition-all ${l}`,
2773
- children: [
2774
- t && /* @__PURE__ */ _("div", { className: "flex items-center justify-between px-6 py-4 border-b border-gray-200", children: [
2775
- /* @__PURE__ */ f(U.Title, { as: "h3", className: "text-lg font-semibold text-gray-900", children: t }),
2776
- /* @__PURE__ */ f(
2777
- "button",
2778
- {
2779
- onClick: i,
2780
- className: "p-1 rounded hover:bg-gray-100 text-gray-400 hover:text-gray-600",
2781
- children: /* @__PURE__ */ f(nt, { size: 20 })
2782
- }
2783
- )
2784
- ] }),
2785
- /* @__PURE__ */ f("div", { className: "px-6 py-4", children: n }),
2786
- o && /* @__PURE__ */ f("div", { className: "px-6 py-4 bg-gray-50 border-t border-gray-200 flex justify-end gap-3", children: o })
2787
- ]
2788
- }
2789
- )
2790
- }
2791
- ) }) })
2792
- ] }) });
2793
- }
2794
- const Gn = {
2795
- sm: "max-w-sm",
2796
- md: "max-w-md",
2797
- lg: "max-w-2xl",
2798
- xl: "max-w-4xl",
2799
- full: "max-w-full"
2800
- };
2801
- function ti({
2802
- open: e,
2803
- onClose: i,
2804
- title: t,
2805
- children: n,
2806
- footer: o,
2807
- size: r = "md",
2808
- maskClosable: s = !0,
2809
- className: l = ""
2810
- }) {
2811
- return /* @__PURE__ */ f(G, { appear: !0, show: e, as: L, children: /* @__PURE__ */ _(U, { as: "div", className: "relative z-[9990]", onClose: s ? i : () => {
2812
- }, children: [
2813
- /* @__PURE__ */ f(
2814
- G.Child,
2815
- {
2816
- as: L,
2817
- enter: "ease-out duration-300",
2818
- enterFrom: "opacity-0",
2819
- enterTo: "opacity-100",
2820
- leave: "ease-in duration-200",
2821
- leaveFrom: "opacity-100",
2822
- leaveTo: "opacity-0",
2823
- children: /* @__PURE__ */ f("div", { className: "fixed inset-0 bg-black/50" })
2824
- }
2825
- ),
2826
- /* @__PURE__ */ f("div", { className: "fixed inset-0 overflow-hidden", children: /* @__PURE__ */ f("div", { className: "absolute inset-0 overflow-hidden", children: /* @__PURE__ */ f("div", { className: "pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10", children: /* @__PURE__ */ f(
2827
- G.Child,
2828
- {
2829
- as: L,
2830
- enter: "transform transition ease-out duration-300",
2831
- enterFrom: "translate-x-full",
2832
- enterTo: "translate-x-0",
2833
- leave: "transform transition ease-in duration-200",
2834
- leaveFrom: "translate-x-0",
2835
- leaveTo: "translate-x-full",
2836
- children: /* @__PURE__ */ f(
2837
- U.Panel,
2838
- {
2839
- className: `pointer-events-auto w-screen ${Gn[r]} ${l}`,
2840
- children: /* @__PURE__ */ _("div", { className: "flex h-full flex-col bg-white shadow-xl", children: [
2841
- t && /* @__PURE__ */ _("div", { className: "flex items-center justify-between px-6 py-4 border-b border-gray-200", children: [
2842
- /* @__PURE__ */ f(U.Title, { as: "h3", className: "text-lg font-semibold text-gray-900", children: t }),
2843
- /* @__PURE__ */ f(
2844
- "button",
2845
- {
2846
- onClick: i,
2847
- className: "p-1 rounded hover:bg-gray-100 text-gray-400 hover:text-gray-600",
2848
- children: /* @__PURE__ */ f(nt, { size: 20 })
2849
- }
2850
- )
2851
- ] }),
2852
- /* @__PURE__ */ f("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: n }),
2853
- o && /* @__PURE__ */ f("div", { className: "px-6 py-4 bg-gray-50 border-t border-gray-200 flex justify-center gap-3", children: o })
2854
- ] })
2855
- }
2856
- )
2857
- }
2858
- ) }) }) })
2859
- ] }) });
2860
- }
2861
- const kn = et(
2862
- ({ variant: e = "default", size: i = "md", loading: t, children: n, className: o = "", disabled: r, icon: s, type: l = "button", ...a }, u) => {
2863
- const g = "inline-flex items-center justify-center font-medium rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary", m = {
2864
- primary: "bg-primary text-white hover:bg-primary/90 disabled:bg-primary/50",
2865
- default: "bg-white text-gray-700 border border-gray-300 hover:bg-gray-50 disabled:bg-gray-50",
2866
- danger: "bg-red-600 text-white hover:bg-red-700 disabled:bg-red-400",
2867
- text: "text-primary hover:bg-primary/10 disabled:bg-transparent"
2868
- }, c = {
2869
- sm: "px-3 py-1.5 text-sm gap-1.5",
2870
- md: "px-4 py-2 text-sm gap-2",
2871
- lg: "px-6 py-3 text-base gap-2"
2872
- };
2873
- return /* @__PURE__ */ _(
2874
- "button",
2875
- {
2876
- ref: u,
2877
- type: l,
2878
- className: `${g} ${m[e]} ${c[i]} ${o}`,
2879
- disabled: r || t,
2880
- ...a,
2881
- children: [
2882
- t && /* @__PURE__ */ _("svg", { className: "animate-spin h-4 w-4", viewBox: "0 0 24 24", children: [
2883
- /* @__PURE__ */ f("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4", fill: "none" }),
2884
- /* @__PURE__ */ f("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z" })
2885
- ] }),
2886
- s && /* @__PURE__ */ f("span", { className: "inline-flex", children: s }),
2887
- n
2888
- ]
2889
- }
2890
- );
2891
- }
2892
- );
2893
- kn.displayName = "EmButton";
2894
- const Tn = et(
2895
- ({ label: e, error: i, prefix: t, suffix: n, className: o = "", allowClear: r, showCount: s, maxLength: l, value: a, onChange: u, onPressEnter: g, ...m }, c) => {
2896
- const d = () => {
2897
- u && u({ target: { value: "" } });
2898
- };
2899
- return /* @__PURE__ */ _("div", { className: "w-full", children: [
2900
- e && /* @__PURE__ */ f("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: e }),
2901
- /* @__PURE__ */ _("div", { className: "relative", children: [
2902
- t && /* @__PURE__ */ f("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-gray-400", children: t }),
2903
- /* @__PURE__ */ f(
2904
- "input",
2905
- {
2906
- ref: c,
2907
- value: a,
2908
- maxLength: l,
2909
- onChange: u,
2910
- onKeyDown: (h) => {
2911
- h.key === "Enter" && g && g();
2912
- },
2913
- className: `w-full px-3 py-2 text-sm border rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-primary/50 ${i ? "border-red-500 focus:border-red-500" : "border-gray-300 focus:border-primary"} ${t ? "pl-10" : ""} ${n || r ? "pr-10" : ""} ${o}`,
2914
- ...m
2915
- }
2916
- ),
2917
- s && l && /* @__PURE__ */ _("div", { className: "absolute inset-y-0 right-3 flex items-center pointer-events-none text-gray-400 text-xs", children: [
2918
- String(a || "").length,
2919
- "/",
2920
- l
2921
- ] }),
2922
- r && a && /* @__PURE__ */ f(
2923
- "button",
2924
- {
2925
- type: "button",
2926
- onClick: d,
2927
- className: "absolute inset-y-0 right-0 pr-3 flex items-center text-gray-400 hover:text-gray-600",
2928
- children: /* @__PURE__ */ f("span", { className: "text-xs", children: "×" })
2929
- }
2930
- ),
2931
- n && !r && /* @__PURE__ */ f("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none text-gray-400", children: n })
2932
- ] }),
2933
- i && /* @__PURE__ */ f("p", { className: "mt-1 text-sm text-red-500", children: i })
2934
- ] });
2935
- }
2936
- );
2937
- Tn.displayName = "EmInput";
2938
- function ni(e) {
2962
+ function nr(e) {
2939
2963
  const {
2940
- label: i,
2964
+ label: r,
2941
2965
  value: t,
2942
2966
  options: n,
2943
- onChange: o,
2944
- placeholder: r = "请选择",
2967
+ onChange: i,
2968
+ placeholder: o = "请选择",
2945
2969
  error: s,
2946
2970
  disabled: l,
2947
2971
  className: a = "",
2948
2972
  style: u,
2949
- mode: g
2973
+ mode: f
2950
2974
  } = e;
2951
- if (g === "multiple") {
2952
- const p = t || [], h = o, w = (v) => {
2953
- p.includes(v) ? h(p.filter((F) => F !== v)) : h([...p, v]);
2954
- }, S = n.filter((v) => p.includes(v.value)).map((v) => v.label);
2955
- return /* @__PURE__ */ _("div", { className: `w-full ${a}`, style: u, children: [
2956
- i && /* @__PURE__ */ f("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: i }),
2957
- /* @__PURE__ */ f("div", { className: "relative", children: /* @__PURE__ */ f(D, { value: p, onChange: () => {
2958
- }, multiple: !0, disabled: l, children: /* @__PURE__ */ _("div", { className: "relative", children: [
2959
- /* @__PURE__ */ _(
2975
+ if (f === "multiple") {
2976
+ const g = t || [], p = i, v = (w) => {
2977
+ g.includes(w) ? p(g.filter((_) => _ !== w)) : p([...g, w]);
2978
+ }, S = n.filter((w) => g.includes(w.value)).map((w) => w.label);
2979
+ return /* @__PURE__ */ F("div", { className: `w-full ${a}`, style: u, children: [
2980
+ r && /* @__PURE__ */ h("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: r }),
2981
+ /* @__PURE__ */ h("div", { className: "relative", children: /* @__PURE__ */ h(D, { value: g, onChange: () => {
2982
+ }, multiple: !0, disabled: l, children: /* @__PURE__ */ F("div", { className: "relative", children: [
2983
+ /* @__PURE__ */ F(
2960
2984
  D.Button,
2961
2985
  {
2962
2986
  className: `relative w-full cursor-pointer rounded-md border text-left text-sm shadow-sm transition-colors focus:outline-none focus:ring-2 focus:ring-primary/50 ${s ? "border-red-500 focus:border-red-500" : "border-gray-300 focus:border-primary"} ${l ? "bg-gray-100 cursor-not-allowed" : "bg-white hover:border-gray-400"}`,
2963
2987
  children: [
2964
- /* @__PURE__ */ f("span", { className: `block px-3 py-2 ${S.length ? "text-gray-900" : "text-gray-400"}`, children: S.length ? S.join("、") : r }),
2965
- /* @__PURE__ */ f("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ f(ke, { size: 16, className: "text-gray-400" }) })
2988
+ /* @__PURE__ */ h("span", { className: `block px-3 py-2 ${S.length ? "text-gray-900" : "text-gray-400"}`, children: S.length ? S.join("、") : o }),
2989
+ /* @__PURE__ */ h("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ h(Be, { size: 16, className: "text-gray-400" }) })
2966
2990
  ]
2967
2991
  }
2968
2992
  ),
2969
- /* @__PURE__ */ f(
2970
- G,
2993
+ /* @__PURE__ */ h(
2994
+ L,
2971
2995
  {
2972
- as: L,
2996
+ as: G,
2973
2997
  leave: "transition ease-in duration-100",
2974
2998
  leaveFrom: "opacity-100",
2975
2999
  leaveTo: "opacity-0",
2976
- children: /* @__PURE__ */ f(D.Options, { className: "absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-sm shadow-lg ring-1 ring-black/5 focus:outline-none", children: n.map((v) => {
2977
- const F = p.includes(v.value);
2978
- return /* @__PURE__ */ _(
3000
+ children: /* @__PURE__ */ h(D.Options, { className: "absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-sm shadow-lg ring-1 ring-black/5 focus:outline-none", children: n.map((w) => {
3001
+ const _ = g.includes(w.value);
3002
+ return /* @__PURE__ */ F(
2979
3003
  D.Option,
2980
3004
  {
2981
- value: v.value,
2982
- disabled: v.disabled,
2983
- onClick: () => w(v.value),
2984
- className: ({ active: $ }) => `relative cursor-pointer select-none py-2 pl-10 pr-4 ${$ ? "bg-primary/10 text-primary" : "text-gray-900"} ${v.disabled ? "cursor-not-allowed opacity-50" : ""} ${F ? "bg-primary/5 font-medium" : ""}`,
3005
+ value: w.value,
3006
+ disabled: w.disabled,
3007
+ onClick: () => v(w.value),
3008
+ className: ({ active: $ }) => `relative cursor-pointer select-none py-2 pl-10 pr-4 ${$ ? "bg-primary/10 text-primary" : "text-gray-900"} ${w.disabled ? "cursor-not-allowed opacity-50" : ""} ${_ ? "bg-primary/5 font-medium" : ""}`,
2985
3009
  children: [
2986
- /* @__PURE__ */ f("span", { className: `block truncate ${F ? "font-medium" : "font-normal"}`, children: v.label }),
2987
- F && /* @__PURE__ */ f("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-primary", children: /* @__PURE__ */ f(Te, { size: 16 }) })
3010
+ /* @__PURE__ */ h("span", { className: `block truncate ${_ ? "font-medium" : "font-normal"}`, children: w.label }),
3011
+ _ && /* @__PURE__ */ h("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-primary", children: /* @__PURE__ */ h(je, { size: 16 }) })
2988
3012
  ]
2989
3013
  },
2990
- v.value
3014
+ w.value
2991
3015
  );
2992
3016
  }) })
2993
3017
  }
2994
3018
  )
2995
3019
  ] }) }) }),
2996
- s && /* @__PURE__ */ f("p", { className: "mt-1 text-sm text-red-500", children: s })
3020
+ s && /* @__PURE__ */ h("p", { className: "mt-1 text-sm text-red-500", children: s })
2997
3021
  ] });
2998
3022
  }
2999
- const m = t, c = o, d = n.find((p) => p.value === m);
3000
- return /* @__PURE__ */ _("div", { className: `w-full ${a}`, style: u, children: [
3001
- i && /* @__PURE__ */ f("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: i }),
3002
- /* @__PURE__ */ f(D, { value: m, onChange: c, disabled: l, children: /* @__PURE__ */ _("div", { className: "relative", children: [
3003
- /* @__PURE__ */ _(
3023
+ const m = t, c = i, d = n.find((g) => g.value === m);
3024
+ return /* @__PURE__ */ F("div", { className: `w-full ${a}`, style: u, children: [
3025
+ r && /* @__PURE__ */ h("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: r }),
3026
+ /* @__PURE__ */ h(D, { value: m, onChange: c, disabled: l, children: /* @__PURE__ */ F("div", { className: "relative", children: [
3027
+ /* @__PURE__ */ F(
3004
3028
  D.Button,
3005
3029
  {
3006
3030
  className: `relative w-full cursor-pointer rounded-md border text-left text-sm shadow-sm transition-colors focus:outline-none focus:ring-2 focus:ring-primary/50 ${s ? "border-red-500 focus:border-red-500" : "border-gray-300 focus:border-primary"} ${l ? "bg-gray-100 cursor-not-allowed" : "bg-white hover:border-gray-400"}`,
3007
3031
  children: [
3008
- /* @__PURE__ */ f("span", { className: `block px-3 py-2 ${d ? "text-gray-900" : "text-gray-400"}`, children: (d == null ? void 0 : d.label) || r }),
3009
- /* @__PURE__ */ f("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ f(ke, { size: 16, className: "text-gray-400" }) })
3032
+ /* @__PURE__ */ h("span", { className: `block px-3 py-2 ${d ? "text-gray-900" : "text-gray-400"}`, children: (d == null ? void 0 : d.label) || o }),
3033
+ /* @__PURE__ */ h("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ h(Be, { size: 16, className: "text-gray-400" }) })
3010
3034
  ]
3011
3035
  }
3012
3036
  ),
3013
- /* @__PURE__ */ f(
3014
- G,
3037
+ /* @__PURE__ */ h(
3038
+ L,
3015
3039
  {
3016
- as: L,
3040
+ as: G,
3017
3041
  leave: "transition ease-in duration-100",
3018
3042
  leaveFrom: "opacity-100",
3019
3043
  leaveTo: "opacity-0",
3020
- children: /* @__PURE__ */ f(D.Options, { className: "absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-sm shadow-lg ring-1 ring-black/5 focus:outline-none", children: n.map((p) => /* @__PURE__ */ f(
3044
+ children: /* @__PURE__ */ h(D.Options, { className: "absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-sm shadow-lg ring-1 ring-black/5 focus:outline-none", children: n.map((g) => /* @__PURE__ */ h(
3021
3045
  D.Option,
3022
3046
  {
3023
- value: p.value,
3024
- disabled: p.disabled,
3025
- className: ({ active: h, selected: w }) => `relative cursor-pointer select-none py-2 pl-10 pr-4 ${h ? "bg-primary/10 text-primary" : "text-gray-900"} ${p.disabled ? "cursor-not-allowed opacity-50" : ""} ${w ? "bg-primary/5 font-medium" : ""}`,
3026
- children: ({ selected: h }) => /* @__PURE__ */ _(Ze, { children: [
3027
- /* @__PURE__ */ f("span", { className: `block truncate ${h ? "font-medium" : "font-normal"}`, children: p.label }),
3028
- h && /* @__PURE__ */ f("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-primary", children: /* @__PURE__ */ f(Te, { size: 16 }) })
3047
+ value: g.value,
3048
+ disabled: g.disabled,
3049
+ className: ({ active: p, selected: v }) => `relative cursor-pointer select-none py-2 pl-10 pr-4 ${p ? "bg-primary/10 text-primary" : "text-gray-900"} ${g.disabled ? "cursor-not-allowed opacity-50" : ""} ${v ? "bg-primary/5 font-medium" : ""}`,
3050
+ children: ({ selected: p }) => /* @__PURE__ */ F(tt, { children: [
3051
+ /* @__PURE__ */ h("span", { className: `block truncate ${p ? "font-medium" : "font-normal"}`, children: g.label }),
3052
+ p && /* @__PURE__ */ h("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-primary", children: /* @__PURE__ */ h(je, { size: 16 }) })
3029
3053
  ] })
3030
3054
  },
3031
- p.value
3055
+ g.value
3032
3056
  )) })
3033
3057
  }
3034
3058
  )
3035
3059
  ] }) }),
3036
- s && /* @__PURE__ */ f("p", { className: "mt-1 text-sm text-red-500", children: s })
3060
+ s && /* @__PURE__ */ h("p", { className: "mt-1 text-sm text-red-500", children: s })
3037
3061
  ] });
3038
3062
  }
3039
- function ii({ size: e = "md", className: i, text: t }) {
3063
+ function rr({ size: e = "md", className: r, text: t }) {
3040
3064
  const n = {
3041
3065
  sm: "w-4 h-4 border-2",
3042
3066
  md: "w-8 h-8 border-3",
3043
3067
  lg: "w-12 h-12 border-4"
3044
3068
  };
3045
- return /* @__PURE__ */ _("div", { className: `flex flex-col items-center justify-center gap-2 ${i || ""}`, children: [
3046
- /* @__PURE__ */ f(
3069
+ return /* @__PURE__ */ F("div", { className: `flex flex-col items-center justify-center gap-2 ${r || ""}`, children: [
3070
+ /* @__PURE__ */ h(
3047
3071
  "div",
3048
3072
  {
3049
3073
  className: `animate-spin rounded-full border-primary border-t-transparent ${n[e]}`
3050
3074
  }
3051
3075
  ),
3052
- t && /* @__PURE__ */ f("p", { className: "text-sm text-gray-600", children: t })
3076
+ t && /* @__PURE__ */ h("p", { className: "text-sm text-gray-600", children: t })
3053
3077
  ] });
3054
3078
  }
3055
- let Y = [], Bn = 0, de = [];
3056
- function Qe() {
3057
- de.forEach((e) => e([...Y]));
3079
+ let te = [], Bn = 0, ge = [];
3080
+ function Ze() {
3081
+ ge.forEach((e) => e([...te]));
3058
3082
  }
3059
- function T(e, i = "info", t = 3e3) {
3083
+ function T(e, r = "info", t = 3e3) {
3060
3084
  const n = Bn++;
3061
- return Y = [...Y, { id: n, message: e, type: i, duration: t }], Qe(), t > 0 && setTimeout(() => {
3062
- Y = Y.filter((o) => o.id !== n), Qe();
3085
+ return te = [...te, { id: n, message: e, type: r, duration: t }], Ze(), t > 0 && setTimeout(() => {
3086
+ te = te.filter((i) => i.id !== n), Ze();
3063
3087
  }, t), n;
3064
3088
  }
3065
- T.success = (e, i) => T(e, "success", i);
3066
- T.error = (e, i) => T(e, "error", i ?? 5e3);
3067
- T.warning = (e, i) => T(e, "warning", i);
3068
- T.info = (e, i) => T(e, "info", i);
3089
+ T.success = (e, r) => T(e, "success", r);
3090
+ T.error = (e, r) => T(e, "error", r ?? 5e3);
3091
+ T.warning = (e, r) => T(e, "warning", r);
3092
+ T.info = (e, r) => T(e, "info", r);
3069
3093
  const jn = {
3070
- success: $t,
3071
- error: Mt,
3072
- warning: it,
3073
- info: Ft
3074
- }, Ye = {
3094
+ success: Et,
3095
+ error: It,
3096
+ warning: rt,
3097
+ info: $t
3098
+ }, et = {
3075
3099
  success: "#2b9b6a",
3076
3100
  error: "#f56c6c",
3077
3101
  warning: "#e6a23c",
3078
3102
  info: "#909399"
3079
3103
  };
3080
- function oi() {
3081
- const [e, i] = q([]);
3082
- return be(() => (de.push(i), () => {
3083
- de = de.filter((t) => t !== i);
3084
- }), []), e.length === 0 ? null : tt(
3085
- /* @__PURE__ */ f("div", { className: "fixed top-4 left-1/2 -translate-x-1/2 z-[9999] flex flex-col items-center gap-2 pointer-events-none", children: e.map((t) => {
3104
+ function ir() {
3105
+ const [e, r] = X([]);
3106
+ return pe(() => (ge.push(r), () => {
3107
+ ge = ge.filter((t) => t !== r);
3108
+ }), []), e.length === 0 ? null : it(
3109
+ /* @__PURE__ */ h("div", { className: "fixed top-4 left-1/2 -translate-x-1/2 z-[9999] flex flex-col items-center gap-2 pointer-events-none", children: e.map((t) => {
3086
3110
  const n = jn[t.type];
3087
- return /* @__PURE__ */ _(
3111
+ return /* @__PURE__ */ F(
3088
3112
  "div",
3089
3113
  {
3090
3114
  className: "pointer-events-auto px-5 py-3 rounded-lg shadow-lg flex items-center gap-2 text-sm animate-slide-down bg-white border",
3091
3115
  style: {
3092
- borderColor: `${Ye[t.type]}20`,
3116
+ borderColor: `${et[t.type]}20`,
3093
3117
  color: "#303133",
3094
3118
  minWidth: "200px"
3095
3119
  },
3096
3120
  children: [
3097
- /* @__PURE__ */ f(n, { size: 18, style: { color: Ye[t.type] } }),
3098
- /* @__PURE__ */ f("span", { children: t.message })
3121
+ /* @__PURE__ */ h(n, { size: 18, style: { color: et[t.type] } }),
3122
+ /* @__PURE__ */ h("span", { children: t.message })
3099
3123
  ]
3100
3124
  },
3101
3125
  t.id
@@ -3104,45 +3128,45 @@ function oi() {
3104
3128
  document.body
3105
3129
  );
3106
3130
  }
3107
- function ht({ open: e, onClose: i, children: t, maskClosable: n = !0 }) {
3108
- return e ? tt(
3109
- /* @__PURE__ */ _("div", { className: "fixed inset-0 z-[9990] flex items-center justify-center", children: [
3110
- /* @__PURE__ */ f(
3131
+ function mt({ open: e, onClose: r, children: t, maskClosable: n = !0 }) {
3132
+ return e ? it(
3133
+ /* @__PURE__ */ F("div", { className: "fixed inset-0 z-[9990] flex items-center justify-center", children: [
3134
+ /* @__PURE__ */ h(
3111
3135
  "div",
3112
3136
  {
3113
3137
  className: "absolute inset-0 bg-black/50 transition-opacity",
3114
- onClick: n ? i : void 0
3138
+ onClick: n ? r : void 0
3115
3139
  }
3116
3140
  ),
3117
- /* @__PURE__ */ f("div", { className: "relative bg-white rounded-lg shadow-xl max-w-[420px] w-[90%] animate-scale-in", children: t })
3141
+ /* @__PURE__ */ h("div", { className: "relative bg-white rounded-lg shadow-xl max-w-[420px] w-[90%] animate-scale-in", children: t })
3118
3142
  ] }),
3119
3143
  document.body
3120
3144
  ) : null;
3121
3145
  }
3122
- let Z = null, fe = null, ge = [];
3123
- function mt() {
3124
- ge.forEach((e) => e(fe ? { ...fe } : null));
3146
+ let ne = null, he = null, ce = [];
3147
+ function St() {
3148
+ ce.forEach((e) => e(he ? { ...he } : null));
3125
3149
  }
3126
- function K(e, i, t) {
3150
+ function Q(e, r, t) {
3127
3151
  return new Promise((n) => {
3128
- Z = n, fe = { message: e, title: i || "提示", type: t || "info", confirmText: "确定" }, mt();
3152
+ ne = n, he = { message: e, title: r || "提示", type: t || "info", confirmText: "确定" }, St();
3129
3153
  });
3130
3154
  }
3131
- K.success = (e, i) => K(e, i, "success");
3132
- K.error = (e, i) => K(e, i, "error");
3133
- K.warning = (e, i) => K(e, i, "warning");
3134
- function ri() {
3135
- const [e, i] = q(null);
3136
- be(() => (ge.push(i), () => {
3137
- ge = ge.filter((n) => n !== i);
3155
+ Q.success = (e, r) => Q(e, r, "success");
3156
+ Q.error = (e, r) => Q(e, r, "error");
3157
+ Q.warning = (e, r) => Q(e, r, "warning");
3158
+ function or() {
3159
+ const [e, r] = X(null);
3160
+ pe(() => (ce.push(r), () => {
3161
+ ce = ce.filter((n) => n !== r);
3138
3162
  }), []);
3139
- const t = W(() => {
3140
- fe = null, mt(), Z == null || Z(), Z = null;
3163
+ const t = J(() => {
3164
+ he = null, St(), ne == null || ne(), ne = null;
3141
3165
  }, []);
3142
- return /* @__PURE__ */ f(ht, { open: !!e, onClose: t, maskClosable: !1, children: e && /* @__PURE__ */ _("div", { className: "p-6", children: [
3143
- /* @__PURE__ */ f("h3", { className: "text-base font-semibold text-gray-900 mb-2", children: e.title }),
3144
- /* @__PURE__ */ f("p", { className: "text-sm text-gray-600 leading-relaxed whitespace-pre-wrap", children: e.message }),
3145
- /* @__PURE__ */ f("div", { className: "flex justify-end mt-5", children: /* @__PURE__ */ f(
3166
+ return /* @__PURE__ */ h(mt, { open: !!e, onClose: t, maskClosable: !1, children: e && /* @__PURE__ */ F("div", { className: "p-6", children: [
3167
+ /* @__PURE__ */ h("h3", { className: "text-base font-semibold text-gray-900 mb-2", children: e.title }),
3168
+ /* @__PURE__ */ h("p", { className: "text-sm text-gray-600 leading-relaxed whitespace-pre-wrap", children: e.message }),
3169
+ /* @__PURE__ */ h("div", { className: "flex justify-end mt-5", children: /* @__PURE__ */ h(
3146
3170
  "button",
3147
3171
  {
3148
3172
  onClick: t,
@@ -3152,34 +3176,34 @@ function ri() {
3152
3176
  ) })
3153
3177
  ] }) });
3154
3178
  }
3155
- let z = null, te = null, ce = [];
3156
- function Ee() {
3157
- ce.forEach((e) => e(te ? { ...te } : null));
3179
+ let N = null, ie = null, fe = [];
3180
+ function ze() {
3181
+ fe.forEach((e) => e(ie ? { ...ie } : null));
3158
3182
  }
3159
- function si(e, i, t) {
3183
+ function sr(e, r, t) {
3160
3184
  return new Promise((n) => {
3161
- z = n, te = {
3185
+ N = n, ie = {
3162
3186
  message: e,
3163
- title: i || "确认操作",
3187
+ title: r || "确认操作",
3164
3188
  type: t || "warning",
3165
3189
  confirmText: "确定",
3166
3190
  cancelText: "取消"
3167
- }, Ee();
3191
+ }, ze();
3168
3192
  });
3169
3193
  }
3170
- function li() {
3171
- const [e, i] = q(null);
3172
- be(() => (ce.push(i), () => {
3173
- ce = ce.filter((r) => r !== i);
3194
+ function lr() {
3195
+ const [e, r] = X(null);
3196
+ pe(() => (fe.push(r), () => {
3197
+ fe = fe.filter((o) => o !== r);
3174
3198
  }), []);
3175
- const t = W(() => {
3176
- te = null, Ee(), z == null || z(!0), z = null;
3177
- }, []), n = W(() => {
3178
- te = null, Ee(), z == null || z(!1), z = null;
3199
+ const t = J(() => {
3200
+ ie = null, ze(), N == null || N(!0), N = null;
3201
+ }, []), n = J(() => {
3202
+ ie = null, ze(), N == null || N(!1), N = null;
3179
3203
  }, []);
3180
- return /* @__PURE__ */ f(ht, { open: !!e, onClose: n, children: e && /* @__PURE__ */ _("div", { className: "p-6", children: [
3181
- /* @__PURE__ */ _("h3", { className: "text-base font-semibold text-gray-900 mb-2 flex items-center gap-2", children: [
3182
- /* @__PURE__ */ f(it, { size: 18, style: { color: {
3204
+ return /* @__PURE__ */ h(mt, { open: !!e, onClose: n, children: e && /* @__PURE__ */ F("div", { className: "p-6", children: [
3205
+ /* @__PURE__ */ F("h3", { className: "text-base font-semibold text-gray-900 mb-2 flex items-center gap-2", children: [
3206
+ /* @__PURE__ */ h(rt, { size: 18, style: { color: {
3183
3207
  info: "#909399",
3184
3208
  success: "#2b9b6a",
3185
3209
  warning: "#e6a23c",
@@ -3187,9 +3211,9 @@ function li() {
3187
3211
  }[e.type || "warning"] } }),
3188
3212
  e.title
3189
3213
  ] }),
3190
- /* @__PURE__ */ f("p", { className: "text-sm text-gray-600 leading-relaxed whitespace-pre-wrap ml-6", children: e.message }),
3191
- /* @__PURE__ */ _("div", { className: "flex justify-end gap-3 mt-5", children: [
3192
- /* @__PURE__ */ f(
3214
+ /* @__PURE__ */ h("p", { className: "text-sm text-gray-600 leading-relaxed whitespace-pre-wrap ml-6", children: e.message }),
3215
+ /* @__PURE__ */ F("div", { className: "flex justify-end gap-3 mt-5", children: [
3216
+ /* @__PURE__ */ h(
3193
3217
  "button",
3194
3218
  {
3195
3219
  onClick: n,
@@ -3197,7 +3221,7 @@ function li() {
3197
3221
  children: e.cancelText
3198
3222
  }
3199
3223
  ),
3200
- /* @__PURE__ */ f(
3224
+ /* @__PURE__ */ h(
3201
3225
  "button",
3202
3226
  {
3203
3227
  onClick: t,
@@ -3209,22 +3233,20 @@ function li() {
3209
3233
  ] }) });
3210
3234
  }
3211
3235
  export {
3212
- ri as AlertContainer,
3213
- li as ConfirmContainer,
3214
- Zn as EmBox,
3215
- kn as EmButton,
3216
- ti as EmDrawer,
3217
- Yn as EmGrid,
3218
- Tn as EmInput,
3219
- ei as EmModal,
3220
- Qn as EmPagination,
3221
- ni as EmSelect,
3222
- Jn as EmTable,
3223
- ii as Loading,
3224
- oi as ToastContainer,
3225
- K as alert,
3226
- Dn as cn,
3227
- si as confirm,
3236
+ or as AlertContainer,
3237
+ lr as ConfirmContainer,
3238
+ Jn as EmBox,
3239
+ Zn as EmDrawer,
3240
+ Qn as EmGrid,
3241
+ Yn as EmModal,
3242
+ tr as EmPagination,
3243
+ nr as EmSelect,
3244
+ er as EmTable,
3245
+ rr as Loading,
3246
+ ir as ToastContainer,
3247
+ Q as alert,
3248
+ V as cn,
3249
+ sr as confirm,
3228
3250
  T as toast
3229
3251
  };
3230
3252
  //# sourceMappingURL=station-ui.js.map