@fileflow/sdk 0.1.13 → 0.1.14

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,49 +1,49 @@
1
- import { jsx as g, jsxs as v, Fragment as ie } from "react/jsx-runtime";
1
+ import { jsx as g, jsxs as v, Fragment as Z } from "react/jsx-runtime";
2
2
  import * as he from "react";
3
- import lt, { useCallback as xe, useState as K, useMemo as Ee, useEffect as ke } from "react";
4
- import { h as A, j as it, k as st, X as ne, m as b, U as qe, n as _e, T as ve, q as at, p as Fe, o as Le, t as ut, d as ft, V as He, g as Q, S as se, L as ze } from "./index-oKr8Wtf5.mjs";
3
+ import at, { useCallback as xe, useState as K, useMemo as ke, useEffect as Le } from "react";
4
+ import { h as G, j as ut, k as ft, X as oe, m as B, U as je, n as _e, T as ve, q as dt, p as Fe, o as He, t as gt, d as ct, V as ze, g as Q, S as se, L as Ae } from "./index-fS1sp3k5.mjs";
5
5
  /**
6
6
  * @license lucide-react v0.563.0 - ISC
7
7
  *
8
8
  * This source code is licensed under the ISC license.
9
9
  * See the LICENSE file in the root directory of this source tree.
10
10
  */
11
- const dt = [
11
+ const pt = [
12
12
  ["path", { d: "M5 12h14", key: "1ays0h" }],
13
13
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
14
- ], gt = A("arrow-right", dt);
14
+ ], mt = G("arrow-right", pt);
15
15
  /**
16
16
  * @license lucide-react v0.563.0 - ISC
17
17
  *
18
18
  * This source code is licensed under the ISC license.
19
19
  * See the LICENSE file in the root directory of this source tree.
20
20
  */
21
- const ct = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], pt = A("check", ct);
21
+ const ht = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], vt = G("check", ht);
22
22
  /**
23
23
  * @license lucide-react v0.563.0 - ISC
24
24
  *
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
27
  */
28
- const mt = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], ht = A("chevron-left", mt);
28
+ const wt = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], Ct = G("chevron-left", wt);
29
29
  /**
30
30
  * @license lucide-react v0.563.0 - ISC
31
31
  *
32
32
  * This source code is licensed under the ISC license.
33
33
  * See the LICENSE file in the root directory of this source tree.
34
34
  */
35
- const vt = [
35
+ const St = [
36
36
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
37
37
  ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
38
38
  ["path", { d: "M12 17h.01", key: "p32p05" }]
39
- ], wt = A("circle-question-mark", vt);
39
+ ], Rt = G("circle-question-mark", St);
40
40
  /**
41
41
  * @license lucide-react v0.563.0 - ISC
42
42
  *
43
43
  * This source code is licensed under the ISC license.
44
44
  * See the LICENSE file in the root directory of this source tree.
45
45
  */
46
- const Ct = [
46
+ const yt = [
47
47
  [
48
48
  "path",
49
49
  {
@@ -52,14 +52,14 @@ const Ct = [
52
52
  }
53
53
  ],
54
54
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
55
- ], St = A("eye", Ct);
55
+ ], xt = G("eye", yt);
56
56
  /**
57
57
  * @license lucide-react v0.563.0 - ISC
58
58
  *
59
59
  * This source code is licensed under the ISC license.
60
60
  * See the LICENSE file in the root directory of this source tree.
61
61
  */
62
- const Rt = [
62
+ const _t = [
63
63
  [
64
64
  "path",
65
65
  {
@@ -72,14 +72,14 @@ const Rt = [
72
72
  ["path", { d: "M14 13h2", key: "un5t4a" }],
73
73
  ["path", { d: "M8 17h2", key: "2yhykz" }],
74
74
  ["path", { d: "M14 17h2", key: "10kma7" }]
75
- ], yt = A("file-spreadsheet", Rt);
75
+ ], Ft = G("file-spreadsheet", _t);
76
76
  /**
77
77
  * @license lucide-react v0.563.0 - ISC
78
78
  *
79
79
  * This source code is licensed under the ISC license.
80
80
  * See the LICENSE file in the root directory of this source tree.
81
81
  */
82
- const xt = [
82
+ const $t = [
83
83
  [
84
84
  "path",
85
85
  {
@@ -88,26 +88,26 @@ const xt = [
88
88
  }
89
89
  ],
90
90
  ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
91
- ], _t = A("file", xt);
91
+ ], Mt = G("file", $t);
92
92
  /**
93
93
  * @license lucide-react v0.563.0 - ISC
94
94
  *
95
95
  * This source code is licensed under the ISC license.
96
96
  * See the LICENSE file in the root directory of this source tree.
97
97
  */
98
- const Ft = [
98
+ const It = [
99
99
  ["line", { x1: "6", x2: "6", y1: "3", y2: "15", key: "17qcm7" }],
100
100
  ["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
101
101
  ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
102
102
  ["path", { d: "M18 9a9 9 0 0 1-9 9", key: "n2h4wq" }]
103
- ], $t = A("git-branch", Ft);
103
+ ], Vt = G("git-branch", It);
104
104
  /**
105
105
  * @license lucide-react v0.563.0 - ISC
106
106
  *
107
107
  * This source code is licensed under the ISC license.
108
108
  * See the LICENSE file in the root directory of this source tree.
109
109
  */
110
- const Mt = [
110
+ const Nt = [
111
111
  [
112
112
  "path",
113
113
  {
@@ -115,20 +115,20 @@ const Mt = [
115
115
  key: "1a8usu"
116
116
  }
117
117
  ]
118
- ], It = A("pen", Mt);
118
+ ], Pt = G("pen", Nt);
119
119
  /**
120
120
  * @license lucide-react v0.563.0 - ISC
121
121
  *
122
122
  * This source code is licensed under the ISC license.
123
123
  * See the LICENSE file in the root directory of this source tree.
124
124
  */
125
- const Vt = [
125
+ const Dt = [
126
126
  [
127
127
  "path",
128
128
  { d: "M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344", key: "2acyp4" }
129
129
  ],
130
130
  ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
131
- ], Nt = A("square-check-big", Vt), Ae = {
131
+ ], Et = G("square-check-big", Dt), Ge = {
132
132
  sessionId: null,
133
133
  status: "idle",
134
134
  step: "upload",
@@ -149,8 +149,8 @@ const Vt = [
149
149
  error: null,
150
150
  editingCell: null,
151
151
  editedRows: /* @__PURE__ */ new Set()
152
- }, X = it((e, o) => ({
153
- ...Ae,
152
+ }, X = ut((e, o) => ({
153
+ ...Ge,
154
154
  setSchema: (t) => e({ schema: t }),
155
155
  setSessionId: (t) => e({ sessionId: t }),
156
156
  setFile: (t) => e({
@@ -195,35 +195,35 @@ const Vt = [
195
195
  }),
196
196
  stopEditing: () => e({ editingCell: null }),
197
197
  updateCell: (t, n, r) => e((l) => {
198
- const i = [...l.rows], a = i.find((f) => f.rowIndex === t);
199
- a && (a.data = { ...a.data, [n]: String(r) });
198
+ const i = [...l.rows], s = i.find((d) => d.rowIndex === t);
199
+ s && (s.data = { ...s.data, [n]: String(r) });
200
200
  const u = new Set(l.editedRows);
201
201
  return u.add(t), { rows: i, editedRows: u, editingCell: null };
202
202
  }),
203
203
  setStatus: (t) => e({ status: t }),
204
204
  setLoading: (t) => e({ isLoading: t }),
205
205
  setError: (t) => e({ error: t }),
206
- reset: () => e(Ae)
207
- })), Pt = ({
206
+ reset: () => e(Ge)
207
+ })), kt = ({
208
208
  onFileSelect: e,
209
209
  maxSize: o = 50 * 1024 * 1024,
210
210
  // 50MB
211
211
  acceptedTypes: t = [".csv", ".xlsx", ".xls"]
212
212
  }) => {
213
- const { file: n, fileName: r, fileSize: l, setFile: i, error: a, setError: u, isLoading: f } = X(), c = xe(
213
+ const { file: n, fileName: r, fileSize: l, setFile: i, error: s, setError: u, isLoading: d } = X(), p = xe(
214
214
  (w, R) => {
215
215
  if (R.length > 0) {
216
216
  u("Invalid file type or file too large");
217
217
  return;
218
218
  }
219
219
  if (w.length > 0) {
220
- const x = w[0];
221
- i(x), e == null || e(x);
220
+ const _ = w[0];
221
+ i(_), e == null || e(_);
222
222
  }
223
223
  },
224
224
  [e, i, u]
225
- ), { getRootProps: p, getInputProps: d, isDragActive: s } = st({
226
- onDrop: c,
225
+ ), { getRootProps: c, getInputProps: f, isDragActive: a } = ft({
226
+ onDrop: p,
227
227
  accept: {
228
228
  "text/csv": [".csv"],
229
229
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [".xlsx"],
@@ -231,12 +231,12 @@ const Vt = [
231
231
  },
232
232
  maxSize: o,
233
233
  multiple: !1,
234
- disabled: f
234
+ disabled: d
235
235
  }), m = (w) => w < 1024 ? `${w} B` : w < 1024 * 1024 ? `${(w / 1024).toFixed(1)} KB` : `${(w / (1024 * 1024)).toFixed(1)} MB`, h = (w) => {
236
236
  w.stopPropagation(), X.getState().reset();
237
237
  };
238
238
  return n ? /* @__PURE__ */ g("div", { className: "ff-p-4 ff-rounded-xl ff-border", style: { backgroundColor: "var(--ff-success-light)", borderColor: "var(--ff-success)" }, children: /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-3", children: [
239
- /* @__PURE__ */ g("div", { className: "ff-p-2 ff-rounded-lg", style: { backgroundColor: "rgba(41, 142, 51, 0.15)" }, children: /* @__PURE__ */ g(_t, { className: "ff-w-6 ff-h-6", style: { color: "var(--ff-success)" } }) }),
239
+ /* @__PURE__ */ g("div", { className: "ff-p-2 ff-rounded-lg", style: { backgroundColor: "rgba(41, 142, 51, 0.15)" }, children: /* @__PURE__ */ g(Mt, { className: "ff-w-6 ff-h-6", style: { color: "var(--ff-success)" } }) }),
240
240
  /* @__PURE__ */ v("div", { className: "ff-flex-1 ff-min-w-0", children: [
241
241
  /* @__PURE__ */ g("p", { className: "ff-font-medium ff-truncate", style: { color: "var(--ff-success-dark)" }, children: r }),
242
242
  /* @__PURE__ */ g("p", { className: "ff-text-sm", style: { color: "var(--ff-success)" }, children: m(l || 0) })
@@ -248,28 +248,28 @@ const Vt = [
248
248
  className: "ff-p-1.5 ff-rounded-full ff-transition-colors",
249
249
  style: { color: "var(--ff-success)" },
250
250
  "aria-label": "Remove file",
251
- children: /* @__PURE__ */ g(ne, { className: "ff-w-5 ff-h-5" })
251
+ children: /* @__PURE__ */ g(oe, { className: "ff-w-5 ff-h-5" })
252
252
  }
253
253
  )
254
254
  ] }) }) : /* @__PURE__ */ v("div", { className: "ff-space-y-6", children: [
255
255
  /* @__PURE__ */ v(
256
256
  "div",
257
257
  {
258
- ...p(),
259
- className: b(
258
+ ...c(),
259
+ className: B(
260
260
  "ff-dropzone",
261
- s && "ff-dropzone-active",
262
- f && "ff-opacity-50 ff-cursor-not-allowed"
261
+ a && "ff-dropzone-active",
262
+ d && "ff-opacity-50 ff-cursor-not-allowed"
263
263
  ),
264
264
  children: [
265
- /* @__PURE__ */ g("input", { ...d() }),
266
- /* @__PURE__ */ g("div", { className: "ff-dropzone-icon-wrapper", children: /* @__PURE__ */ g(qe, { className: "ff-dropzone-icon" }) }),
267
- /* @__PURE__ */ g("h3", { className: "ff-dropzone-text", children: s ? "Drop your file here" : "Upload your file" }),
265
+ /* @__PURE__ */ g("input", { ...f() }),
266
+ /* @__PURE__ */ g("div", { className: "ff-dropzone-icon-wrapper", children: /* @__PURE__ */ g(je, { className: "ff-dropzone-icon" }) }),
267
+ /* @__PURE__ */ g("h3", { className: "ff-dropzone-text", children: a ? "Drop your file here" : "Upload your file" }),
268
268
  /* @__PURE__ */ g("p", { className: "ff-dropzone-hint", children: "Drag and drop or click to select" }),
269
- /* @__PURE__ */ g("label", { className: "ff-inline-block", children: /* @__PURE__ */ g("span", { className: b(
269
+ /* @__PURE__ */ g("label", { className: "ff-inline-block", children: /* @__PURE__ */ g("span", { className: B(
270
270
  "ff-btn ff-btn-primary",
271
- f && "ff-opacity-50 ff-cursor-wait"
272
- ), children: f ? "Processing..." : "Choose file" }) }),
271
+ d && "ff-opacity-50 ff-cursor-wait"
272
+ ), children: d ? "Processing..." : "Choose file" }) }),
273
273
  /* @__PURE__ */ v("p", { className: "ff-dropzone-formats", children: [
274
274
  "Supports ",
275
275
  t.join(", "),
@@ -279,17 +279,17 @@ const Vt = [
279
279
  ]
280
280
  }
281
281
  ),
282
- a && /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-2 ff-p-4 ff-rounded-lg ff-text-sm", style: { backgroundColor: "var(--ff-error-light)", color: "var(--ff-error)" }, children: [
282
+ s && /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-2 ff-p-4 ff-rounded-lg ff-text-sm", style: { backgroundColor: "var(--ff-error-light)", color: "var(--ff-error)" }, children: [
283
283
  /* @__PURE__ */ g(_e, { className: "ff-w-4 ff-h-4 ff-flex-shrink-0" }),
284
- /* @__PURE__ */ g("p", { children: a })
284
+ /* @__PURE__ */ g("p", { children: s })
285
285
  ] })
286
286
  ] });
287
- }, Dt = ({ onMappingChange: e }) => {
288
- const { mappings: o, schema: t, unmappedSource: n, updateMapping: r } = X(), l = (t == null ? void 0 : t.columns) || [], i = (p, d) => {
289
- const s = d === "" ? null : d;
290
- r(p, s), e == null || e(p, s);
291
- }, a = (p) => p >= 0.85 ? "var(--ff-success)" : p >= 0.6 ? "var(--ff-warning)" : "var(--ff-error)", u = (p) => p >= 0.85 ? "High" : p >= 0.6 ? "Medium" : "Low", c = new Set(
292
- o.filter((p) => p.targetKey !== null).map((p) => p.targetKey)
287
+ }, Lt = ({ onMappingChange: e }) => {
288
+ const { mappings: o, schema: t, unmappedSource: n, updateMapping: r } = X(), l = (t == null ? void 0 : t.columns) || [], i = (c, f) => {
289
+ const a = f === "" ? null : f;
290
+ r(c, a), e == null || e(c, a);
291
+ }, s = (c) => c >= 0.85 ? "var(--ff-success)" : c >= 0.6 ? "var(--ff-warning)" : "var(--ff-error)", u = (c) => c >= 0.85 ? "High" : c >= 0.6 ? "Medium" : "Low", p = new Set(
292
+ o.filter((c) => c.targetKey !== null).map((c) => c.targetKey)
293
293
  );
294
294
  return /* @__PURE__ */ v("div", { className: "ff-space-y-4", children: [
295
295
  /* @__PURE__ */ v("div", { className: "ff-mapping-header", children: [
@@ -312,25 +312,25 @@ const Vt = [
312
312
  ] })
313
313
  ] })
314
314
  ] }),
315
- /* @__PURE__ */ g("div", { className: "ff-space-y-2", children: o.map((p) => {
316
- l.find((m) => m.key === p.targetKey);
317
- const d = p.targetKey !== null, s = p.confidence >= 0.85;
315
+ /* @__PURE__ */ g("div", { className: "ff-space-y-2", children: o.map((c) => {
316
+ l.find((m) => m.key === c.targetKey);
317
+ const f = c.targetKey !== null, a = c.confidence >= 0.85;
318
318
  return /* @__PURE__ */ v(
319
319
  "div",
320
320
  {
321
- className: b(
321
+ className: B(
322
322
  "ff-mapping-row",
323
- d && s && "ff-mapping-row-success",
324
- d && !s && "ff-mapping-row-warning"
323
+ f && a && "ff-mapping-row-success",
324
+ f && !a && "ff-mapping-row-warning"
325
325
  ),
326
326
  children: [
327
- /* @__PURE__ */ g("div", { className: "ff-flex-1", children: /* @__PURE__ */ g("div", { className: "ff-mapping-source", children: p.sourceColumn }) }),
328
- /* @__PURE__ */ g("div", { className: "ff-mapping-arrow", children: /* @__PURE__ */ g(gt, { className: "ff-w-5 ff-h-5" }) }),
327
+ /* @__PURE__ */ g("div", { className: "ff-flex-1", children: /* @__PURE__ */ g("div", { className: "ff-mapping-source", children: c.sourceColumn }) }),
328
+ /* @__PURE__ */ g("div", { className: "ff-mapping-arrow", children: /* @__PURE__ */ g(mt, { className: "ff-w-5 ff-h-5" }) }),
329
329
  /* @__PURE__ */ g("div", { className: "ff-flex-1 ff-mapping-target", children: /* @__PURE__ */ v(
330
330
  "select",
331
331
  {
332
- value: p.targetKey || "",
333
- onChange: (m) => i(p.sourceColumn, m.target.value),
332
+ value: c.targetKey || "",
333
+ onChange: (m) => i(c.sourceColumn, m.target.value),
334
334
  className: "ff-input",
335
335
  children: [
336
336
  /* @__PURE__ */ g("option", { value: "", children: "-- Do not import --" }),
@@ -338,7 +338,7 @@ const Vt = [
338
338
  "option",
339
339
  {
340
340
  value: m.key,
341
- disabled: c.has(m.key) && p.targetKey !== m.key,
341
+ disabled: p.has(m.key) && c.targetKey !== m.key,
342
342
  children: [
343
343
  m.label,
344
344
  " (",
@@ -352,32 +352,32 @@ const Vt = [
352
352
  ]
353
353
  }
354
354
  ) }),
355
- /* @__PURE__ */ g("div", { className: "ff-mapping-status", children: d ? s ? /* @__PURE__ */ g(pt, { className: "ff-w-5 ff-h-5", style: { color: "var(--ff-success)" } }) : /* @__PURE__ */ g(wt, { className: "ff-w-5 ff-h-5", style: { color: "var(--ff-warning)" } }) : /* @__PURE__ */ g("span", { className: "ff-w-5 ff-h-5" }) }),
356
- p.confidence > 0 && /* @__PURE__ */ v("div", { className: "ff-confidence", style: { color: a(p.confidence) }, children: [
355
+ /* @__PURE__ */ g("div", { className: "ff-mapping-status", children: f ? a ? /* @__PURE__ */ g(vt, { className: "ff-w-5 ff-h-5", style: { color: "var(--ff-success)" } }) : /* @__PURE__ */ g(Rt, { className: "ff-w-5 ff-h-5", style: { color: "var(--ff-warning)" } }) : /* @__PURE__ */ g("span", { className: "ff-w-5 ff-h-5" }) }),
356
+ c.confidence > 0 && /* @__PURE__ */ v("div", { className: "ff-confidence", style: { color: s(c.confidence) }, children: [
357
357
  /* @__PURE__ */ v("span", { children: [
358
- Math.round(p.confidence * 100),
358
+ Math.round(c.confidence * 100),
359
359
  "%"
360
360
  ] }),
361
361
  /* @__PURE__ */ v("span", { style: { color: "var(--ff-text-muted)" }, children: [
362
362
  "(",
363
- u(p.confidence),
363
+ u(c.confidence),
364
364
  ")"
365
365
  ] })
366
366
  ] })
367
367
  ]
368
368
  },
369
- p.sourceColumn
369
+ c.sourceColumn
370
370
  );
371
371
  }) }),
372
372
  (() => {
373
- const p = l.filter(
374
- (d) => d.required && !c.has(d.key)
373
+ const c = l.filter(
374
+ (f) => f.required && !p.has(f.key)
375
375
  );
376
- return p.length > 0 ? /* @__PURE__ */ v("div", { className: "ff-flex ff-items-start ff-gap-2 ff-p-4 ff-rounded-lg", style: { backgroundColor: "var(--ff-warning-light)", borderColor: "var(--ff-warning)" }, children: [
376
+ return c.length > 0 ? /* @__PURE__ */ v("div", { className: "ff-flex ff-items-start ff-gap-2 ff-p-4 ff-rounded-lg", style: { backgroundColor: "var(--ff-warning-light)", borderColor: "var(--ff-warning)" }, children: [
377
377
  /* @__PURE__ */ g(_e, { className: "ff-w-5 ff-h-5 ff-flex-shrink-0 ff-mt-0.5", style: { color: "var(--ff-warning)" } }),
378
378
  /* @__PURE__ */ v("div", { children: [
379
379
  /* @__PURE__ */ g("p", { className: "ff-text-sm ff-font-medium", style: { color: "var(--ff-warning-dark)" }, children: "Required fields not mapped" }),
380
- /* @__PURE__ */ g("p", { className: "ff-text-sm ff-mt-1", style: { color: "var(--ff-warning)" }, children: p.map((d) => d.label).join(", ") })
380
+ /* @__PURE__ */ g("p", { className: "ff-text-sm ff-mt-1", style: { color: "var(--ff-warning)" }, children: c.map((f) => f.label).join(", ") })
381
381
  ] })
382
382
  ] }) : null;
383
383
  })()
@@ -393,7 +393,7 @@ const Vt = [
393
393
  *
394
394
  * @license MIT
395
395
  */
396
- function Et() {
396
+ function Ht() {
397
397
  return {
398
398
  accessor: (e, o) => typeof e == "function" ? {
399
399
  ...o,
@@ -406,24 +406,24 @@ function Et() {
406
406
  group: (e) => e
407
407
  };
408
408
  }
409
- function O(e, o) {
409
+ function b(e, o) {
410
410
  return typeof e == "function" ? e(o) : e;
411
411
  }
412
412
  function L(e, o) {
413
413
  return (t) => {
414
414
  o.setState((n) => ({
415
415
  ...n,
416
- [e]: O(t, n[e])
416
+ [e]: b(t, n[e])
417
417
  }));
418
418
  };
419
419
  }
420
- function oe(e) {
420
+ function re(e) {
421
421
  return e instanceof Function;
422
422
  }
423
- function kt(e) {
423
+ function zt(e) {
424
424
  return Array.isArray(e) && e.every((o) => typeof o == "number");
425
425
  }
426
- function Lt(e, o) {
426
+ function At(e, o) {
427
427
  const t = [], n = (r) => {
428
428
  r.forEach((l) => {
429
429
  t.push(l);
@@ -438,21 +438,21 @@ function C(e, o, t) {
438
438
  return (l) => {
439
439
  let i;
440
440
  t.key && t.debug && (i = Date.now());
441
- const a = e(l);
442
- if (!(a.length !== n.length || a.some((c, p) => n[p] !== c)))
441
+ const s = e(l);
442
+ if (!(s.length !== n.length || s.some((p, c) => n[c] !== p)))
443
443
  return r;
444
- n = a;
445
- let f;
446
- if (t.key && t.debug && (f = Date.now()), r = o(...a), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
447
- const c = Math.round((Date.now() - i) * 100) / 100, p = Math.round((Date.now() - f) * 100) / 100, d = p / 16, s = (m, h) => {
444
+ n = s;
445
+ let d;
446
+ if (t.key && t.debug && (d = Date.now()), r = o(...s), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
447
+ const p = Math.round((Date.now() - i) * 100) / 100, c = Math.round((Date.now() - d) * 100) / 100, f = c / 16, a = (m, h) => {
448
448
  for (m = String(m); m.length < h; )
449
449
  m = " " + m;
450
450
  return m;
451
451
  };
452
- console.info(`%c⏱ ${s(p, 5)} /${s(c, 5)} ms`, `
452
+ console.info(`%c⏱ ${a(c, 5)} /${a(p, 5)} ms`, `
453
453
  font-size: .6rem;
454
454
  font-weight: bold;
455
- color: hsl(${Math.max(0, Math.min(120 - 120 * d, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
455
+ color: hsl(${Math.max(0, Math.min(120 - 120 * f, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
456
456
  }
457
457
  return r;
458
458
  };
@@ -467,7 +467,7 @@ function S(e, o, t, n) {
467
467
  onChange: n
468
468
  };
469
469
  }
470
- function Ht(e, o, t, n) {
470
+ function Gt(e, o, t, n) {
471
471
  const r = () => {
472
472
  var i;
473
473
  return (i = l.getValue()) != null ? i : e.options.renderFallbackValue;
@@ -477,61 +477,61 @@ function Ht(e, o, t, n) {
477
477
  column: t,
478
478
  getValue: () => o.getValue(n),
479
479
  renderValue: r,
480
- getContext: C(() => [e, t, o, l], (i, a, u, f) => ({
480
+ getContext: C(() => [e, t, o, l], (i, s, u, d) => ({
481
481
  table: i,
482
- column: a,
482
+ column: s,
483
483
  row: u,
484
- cell: f,
485
- getValue: f.getValue,
486
- renderValue: f.renderValue
484
+ cell: d,
485
+ getValue: d.getValue,
486
+ renderValue: d.renderValue
487
487
  }), S(e.options, "debugCells", "cell.getContext"))
488
488
  };
489
489
  return e._features.forEach((i) => {
490
490
  i.createCell == null || i.createCell(l, t, o, e);
491
491
  }, {}), l;
492
492
  }
493
- function zt(e, o, t, n) {
493
+ function Ot(e, o, t, n) {
494
494
  var r, l;
495
- const a = {
495
+ const s = {
496
496
  ...e._getDefaultColumnDef(),
497
497
  ...o
498
- }, u = a.accessorKey;
499
- let f = (r = (l = a.id) != null ? l : u ? typeof String.prototype.replaceAll == "function" ? u.replaceAll(".", "_") : u.replace(/\./g, "_") : void 0) != null ? r : typeof a.header == "string" ? a.header : void 0, c;
500
- if (a.accessorFn ? c = a.accessorFn : u && (u.includes(".") ? c = (d) => {
501
- let s = d;
498
+ }, u = s.accessorKey;
499
+ let d = (r = (l = s.id) != null ? l : u ? typeof String.prototype.replaceAll == "function" ? u.replaceAll(".", "_") : u.replace(/\./g, "_") : void 0) != null ? r : typeof s.header == "string" ? s.header : void 0, p;
500
+ if (s.accessorFn ? p = s.accessorFn : u && (u.includes(".") ? p = (f) => {
501
+ let a = f;
502
502
  for (const h of u.split(".")) {
503
503
  var m;
504
- s = (m = s) == null ? void 0 : m[h], process.env.NODE_ENV !== "production" && s === void 0 && console.warn(`"${h}" in deeply nested key "${u}" returned undefined.`);
504
+ a = (m = a) == null ? void 0 : m[h], process.env.NODE_ENV !== "production" && a === void 0 && console.warn(`"${h}" in deeply nested key "${u}" returned undefined.`);
505
505
  }
506
- return s;
507
- } : c = (d) => d[a.accessorKey]), !f)
508
- throw process.env.NODE_ENV !== "production" ? new Error(a.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
509
- let p = {
510
- id: `${String(f)}`,
511
- accessorFn: c,
506
+ return a;
507
+ } : p = (f) => f[s.accessorKey]), !d)
508
+ throw process.env.NODE_ENV !== "production" ? new Error(s.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
509
+ let c = {
510
+ id: `${String(d)}`,
511
+ accessorFn: p,
512
512
  parent: n,
513
513
  depth: t,
514
- columnDef: a,
514
+ columnDef: s,
515
515
  columns: [],
516
516
  getFlatColumns: C(() => [!0], () => {
517
- var d;
518
- return [p, ...(d = p.columns) == null ? void 0 : d.flatMap((s) => s.getFlatColumns())];
517
+ var f;
518
+ return [c, ...(f = c.columns) == null ? void 0 : f.flatMap((a) => a.getFlatColumns())];
519
519
  }, S(e.options, "debugColumns", "column.getFlatColumns")),
520
- getLeafColumns: C(() => [e._getOrderColumnsFn()], (d) => {
521
- var s;
522
- if ((s = p.columns) != null && s.length) {
523
- let m = p.columns.flatMap((h) => h.getLeafColumns());
524
- return d(m);
520
+ getLeafColumns: C(() => [e._getOrderColumnsFn()], (f) => {
521
+ var a;
522
+ if ((a = c.columns) != null && a.length) {
523
+ let m = c.columns.flatMap((h) => h.getLeafColumns());
524
+ return f(m);
525
525
  }
526
- return [p];
526
+ return [c];
527
527
  }, S(e.options, "debugColumns", "column.getLeafColumns"))
528
528
  };
529
- for (const d of e._features)
530
- d.createColumn == null || d.createColumn(p, e);
531
- return p;
529
+ for (const f of e._features)
530
+ f.createColumn == null || f.createColumn(c, e);
531
+ return c;
532
532
  }
533
- const D = "debugHeaders";
534
- function Ge(e, o, t) {
533
+ const E = "debugHeaders";
534
+ function Oe(e, o, t) {
535
535
  var n;
536
536
  let l = {
537
537
  id: (n = t.id) != null ? n : o.id,
@@ -545,10 +545,10 @@ function Ge(e, o, t) {
545
545
  rowSpan: 0,
546
546
  headerGroup: null,
547
547
  getLeafHeaders: () => {
548
- const i = [], a = (u) => {
549
- u.subHeaders && u.subHeaders.length && u.subHeaders.map(a), i.push(u);
548
+ const i = [], s = (u) => {
549
+ u.subHeaders && u.subHeaders.length && u.subHeaders.map(s), i.push(u);
550
550
  };
551
- return a(l), i;
551
+ return s(l), i;
552
552
  },
553
553
  getContext: () => ({
554
554
  table: e,
@@ -560,93 +560,93 @@ function Ge(e, o, t) {
560
560
  i.createHeader == null || i.createHeader(l, e);
561
561
  }), l;
562
562
  }
563
- const At = {
563
+ const bt = {
564
564
  createTable: (e) => {
565
565
  e.getHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => {
566
566
  var l, i;
567
- const a = (l = n == null ? void 0 : n.map((p) => t.find((d) => d.id === p)).filter(Boolean)) != null ? l : [], u = (i = r == null ? void 0 : r.map((p) => t.find((d) => d.id === p)).filter(Boolean)) != null ? i : [], f = t.filter((p) => !(n != null && n.includes(p.id)) && !(r != null && r.includes(p.id)));
568
- return Z(o, [...a, ...f, ...u], e);
569
- }, S(e.options, D, "getHeaderGroups")), e.getCenterHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => (t = t.filter((l) => !(n != null && n.includes(l.id)) && !(r != null && r.includes(l.id))), Z(o, t, e, "center")), S(e.options, D, "getCenterHeaderGroups")), e.getLeftHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
567
+ const s = (l = n == null ? void 0 : n.map((c) => t.find((f) => f.id === c)).filter(Boolean)) != null ? l : [], u = (i = r == null ? void 0 : r.map((c) => t.find((f) => f.id === c)).filter(Boolean)) != null ? i : [], d = t.filter((c) => !(n != null && n.includes(c.id)) && !(r != null && r.includes(c.id)));
568
+ return ee(o, [...s, ...d, ...u], e);
569
+ }, S(e.options, E, "getHeaderGroups")), e.getCenterHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => (t = t.filter((l) => !(n != null && n.includes(l.id)) && !(r != null && r.includes(l.id))), ee(o, t, e, "center")), S(e.options, E, "getCenterHeaderGroups")), e.getLeftHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
570
570
  var r;
571
- const l = (r = n == null ? void 0 : n.map((i) => t.find((a) => a.id === i)).filter(Boolean)) != null ? r : [];
572
- return Z(o, l, e, "left");
573
- }, S(e.options, D, "getLeftHeaderGroups")), e.getRightHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (o, t, n) => {
571
+ const l = (r = n == null ? void 0 : n.map((i) => t.find((s) => s.id === i)).filter(Boolean)) != null ? r : [];
572
+ return ee(o, l, e, "left");
573
+ }, S(e.options, E, "getLeftHeaderGroups")), e.getRightHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (o, t, n) => {
574
574
  var r;
575
- const l = (r = n == null ? void 0 : n.map((i) => t.find((a) => a.id === i)).filter(Boolean)) != null ? r : [];
576
- return Z(o, l, e, "right");
577
- }, S(e.options, D, "getRightHeaderGroups")), e.getFooterGroups = C(() => [e.getHeaderGroups()], (o) => [...o].reverse(), S(e.options, D, "getFooterGroups")), e.getLeftFooterGroups = C(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), S(e.options, D, "getLeftFooterGroups")), e.getCenterFooterGroups = C(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), S(e.options, D, "getCenterFooterGroups")), e.getRightFooterGroups = C(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), S(e.options, D, "getRightFooterGroups")), e.getFlatHeaders = C(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, D, "getFlatHeaders")), e.getLeftFlatHeaders = C(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, D, "getLeftFlatHeaders")), e.getCenterFlatHeaders = C(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, D, "getCenterFlatHeaders")), e.getRightFlatHeaders = C(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, D, "getRightFlatHeaders")), e.getCenterLeafHeaders = C(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
575
+ const l = (r = n == null ? void 0 : n.map((i) => t.find((s) => s.id === i)).filter(Boolean)) != null ? r : [];
576
+ return ee(o, l, e, "right");
577
+ }, S(e.options, E, "getRightHeaderGroups")), e.getFooterGroups = C(() => [e.getHeaderGroups()], (o) => [...o].reverse(), S(e.options, E, "getFooterGroups")), e.getLeftFooterGroups = C(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), S(e.options, E, "getLeftFooterGroups")), e.getCenterFooterGroups = C(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), S(e.options, E, "getCenterFooterGroups")), e.getRightFooterGroups = C(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), S(e.options, E, "getRightFooterGroups")), e.getFlatHeaders = C(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, E, "getFlatHeaders")), e.getLeftFlatHeaders = C(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, E, "getLeftFlatHeaders")), e.getCenterFlatHeaders = C(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, E, "getCenterFlatHeaders")), e.getRightFlatHeaders = C(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, E, "getRightFlatHeaders")), e.getCenterLeafHeaders = C(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
578
578
  var n;
579
579
  return !((n = t.subHeaders) != null && n.length);
580
- }), S(e.options, D, "getCenterLeafHeaders")), e.getLeftLeafHeaders = C(() => [e.getLeftFlatHeaders()], (o) => o.filter((t) => {
580
+ }), S(e.options, E, "getCenterLeafHeaders")), e.getLeftLeafHeaders = C(() => [e.getLeftFlatHeaders()], (o) => o.filter((t) => {
581
581
  var n;
582
582
  return !((n = t.subHeaders) != null && n.length);
583
- }), S(e.options, D, "getLeftLeafHeaders")), e.getRightLeafHeaders = C(() => [e.getRightFlatHeaders()], (o) => o.filter((t) => {
583
+ }), S(e.options, E, "getLeftLeafHeaders")), e.getRightLeafHeaders = C(() => [e.getRightFlatHeaders()], (o) => o.filter((t) => {
584
584
  var n;
585
585
  return !((n = t.subHeaders) != null && n.length);
586
- }), S(e.options, D, "getRightLeafHeaders")), e.getLeafHeaders = C(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
587
- var r, l, i, a, u, f;
588
- return [...(r = (l = o[0]) == null ? void 0 : l.headers) != null ? r : [], ...(i = (a = t[0]) == null ? void 0 : a.headers) != null ? i : [], ...(u = (f = n[0]) == null ? void 0 : f.headers) != null ? u : []].map((c) => c.getLeafHeaders()).flat();
589
- }, S(e.options, D, "getLeafHeaders"));
586
+ }), S(e.options, E, "getRightLeafHeaders")), e.getLeafHeaders = C(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
587
+ var r, l, i, s, u, d;
588
+ return [...(r = (l = o[0]) == null ? void 0 : l.headers) != null ? r : [], ...(i = (s = t[0]) == null ? void 0 : s.headers) != null ? i : [], ...(u = (d = n[0]) == null ? void 0 : d.headers) != null ? u : []].map((p) => p.getLeafHeaders()).flat();
589
+ }, S(e.options, E, "getLeafHeaders"));
590
590
  }
591
591
  };
592
- function Z(e, o, t, n) {
592
+ function ee(e, o, t, n) {
593
593
  var r, l;
594
594
  let i = 0;
595
- const a = function(d, s) {
596
- s === void 0 && (s = 1), i = Math.max(i, s), d.filter((m) => m.getIsVisible()).forEach((m) => {
595
+ const s = function(f, a) {
596
+ a === void 0 && (a = 1), i = Math.max(i, a), f.filter((m) => m.getIsVisible()).forEach((m) => {
597
597
  var h;
598
- (h = m.columns) != null && h.length && a(m.columns, s + 1);
598
+ (h = m.columns) != null && h.length && s(m.columns, a + 1);
599
599
  }, 0);
600
600
  };
601
- a(e);
601
+ s(e);
602
602
  let u = [];
603
- const f = (d, s) => {
603
+ const d = (f, a) => {
604
604
  const m = {
605
- depth: s,
606
- id: [n, `${s}`].filter(Boolean).join("_"),
605
+ depth: a,
606
+ id: [n, `${a}`].filter(Boolean).join("_"),
607
607
  headers: []
608
608
  }, h = [];
609
- d.forEach((w) => {
610
- const R = [...h].reverse()[0], x = w.column.depth === m.depth;
611
- let F, E = !1;
612
- if (x && w.column.parent ? F = w.column.parent : (F = w.column, E = !0), R && (R == null ? void 0 : R.column) === F)
609
+ f.forEach((w) => {
610
+ const R = [...h].reverse()[0], _ = w.column.depth === m.depth;
611
+ let $, P = !1;
612
+ if (_ && w.column.parent ? $ = w.column.parent : ($ = w.column, P = !0), R && (R == null ? void 0 : R.column) === $)
613
613
  R.subHeaders.push(w);
614
614
  else {
615
- const M = Ge(t, F, {
616
- id: [n, s, F.id, w == null ? void 0 : w.id].filter(Boolean).join("_"),
617
- isPlaceholder: E,
618
- placeholderId: E ? `${h.filter((N) => N.column === F).length}` : void 0,
619
- depth: s,
615
+ const I = Oe(t, $, {
616
+ id: [n, a, $.id, w == null ? void 0 : w.id].filter(Boolean).join("_"),
617
+ isPlaceholder: P,
618
+ placeholderId: P ? `${h.filter((H) => H.column === $).length}` : void 0,
619
+ depth: a,
620
620
  index: h.length
621
621
  });
622
- M.subHeaders.push(w), h.push(M);
622
+ I.subHeaders.push(w), h.push(I);
623
623
  }
624
624
  m.headers.push(w), w.headerGroup = m;
625
- }), u.push(m), s > 0 && f(h, s - 1);
626
- }, c = o.map((d, s) => Ge(t, d, {
625
+ }), u.push(m), a > 0 && d(h, a - 1);
626
+ }, p = o.map((f, a) => Oe(t, f, {
627
627
  depth: i,
628
- index: s
628
+ index: a
629
629
  }));
630
- f(c, i - 1), u.reverse();
631
- const p = (d) => d.filter((m) => m.column.getIsVisible()).map((m) => {
630
+ d(p, i - 1), u.reverse();
631
+ const c = (f) => f.filter((m) => m.column.getIsVisible()).map((m) => {
632
632
  let h = 0, w = 0, R = [0];
633
- m.subHeaders && m.subHeaders.length ? (R = [], p(m.subHeaders).forEach((F) => {
633
+ m.subHeaders && m.subHeaders.length ? (R = [], c(m.subHeaders).forEach(($) => {
634
634
  let {
635
- colSpan: E,
636
- rowSpan: M
637
- } = F;
638
- h += E, R.push(M);
635
+ colSpan: P,
636
+ rowSpan: I
637
+ } = $;
638
+ h += P, R.push(I);
639
639
  })) : h = 1;
640
- const x = Math.min(...R);
641
- return w = w + x, m.colSpan = h, m.rowSpan = w, {
640
+ const _ = Math.min(...R);
641
+ return w = w + _, m.colSpan = h, m.rowSpan = w, {
642
642
  colSpan: h,
643
643
  rowSpan: w
644
644
  };
645
645
  });
646
- return p((r = (l = u[0]) == null ? void 0 : l.headers) != null ? r : []), u;
646
+ return c((r = (l = u[0]) == null ? void 0 : l.headers) != null ? r : []), u;
647
647
  }
648
648
  const $e = (e, o, t, n, r, l, i) => {
649
- let a = {
649
+ let s = {
650
650
  id: o,
651
651
  index: n,
652
652
  original: t,
@@ -655,85 +655,85 @@ const $e = (e, o, t, n, r, l, i) => {
655
655
  _valuesCache: {},
656
656
  _uniqueValuesCache: {},
657
657
  getValue: (u) => {
658
- if (a._valuesCache.hasOwnProperty(u))
659
- return a._valuesCache[u];
660
- const f = e.getColumn(u);
661
- if (f != null && f.accessorFn)
662
- return a._valuesCache[u] = f.accessorFn(a.original, n), a._valuesCache[u];
658
+ if (s._valuesCache.hasOwnProperty(u))
659
+ return s._valuesCache[u];
660
+ const d = e.getColumn(u);
661
+ if (d != null && d.accessorFn)
662
+ return s._valuesCache[u] = d.accessorFn(s.original, n), s._valuesCache[u];
663
663
  },
664
664
  getUniqueValues: (u) => {
665
- if (a._uniqueValuesCache.hasOwnProperty(u))
666
- return a._uniqueValuesCache[u];
667
- const f = e.getColumn(u);
668
- if (f != null && f.accessorFn)
669
- return f.columnDef.getUniqueValues ? (a._uniqueValuesCache[u] = f.columnDef.getUniqueValues(a.original, n), a._uniqueValuesCache[u]) : (a._uniqueValuesCache[u] = [a.getValue(u)], a._uniqueValuesCache[u]);
665
+ if (s._uniqueValuesCache.hasOwnProperty(u))
666
+ return s._uniqueValuesCache[u];
667
+ const d = e.getColumn(u);
668
+ if (d != null && d.accessorFn)
669
+ return d.columnDef.getUniqueValues ? (s._uniqueValuesCache[u] = d.columnDef.getUniqueValues(s.original, n), s._uniqueValuesCache[u]) : (s._uniqueValuesCache[u] = [s.getValue(u)], s._uniqueValuesCache[u]);
670
670
  },
671
671
  renderValue: (u) => {
672
- var f;
673
- return (f = a.getValue(u)) != null ? f : e.options.renderFallbackValue;
672
+ var d;
673
+ return (d = s.getValue(u)) != null ? d : e.options.renderFallbackValue;
674
674
  },
675
675
  subRows: [],
676
- getLeafRows: () => Lt(a.subRows, (u) => u.subRows),
677
- getParentRow: () => a.parentId ? e.getRow(a.parentId, !0) : void 0,
676
+ getLeafRows: () => At(s.subRows, (u) => u.subRows),
677
+ getParentRow: () => s.parentId ? e.getRow(s.parentId, !0) : void 0,
678
678
  getParentRows: () => {
679
- let u = [], f = a;
679
+ let u = [], d = s;
680
680
  for (; ; ) {
681
- const c = f.getParentRow();
682
- if (!c) break;
683
- u.push(c), f = c;
681
+ const p = d.getParentRow();
682
+ if (!p) break;
683
+ u.push(p), d = p;
684
684
  }
685
685
  return u.reverse();
686
686
  },
687
- getAllCells: C(() => [e.getAllLeafColumns()], (u) => u.map((f) => Ht(e, a, f, f.id)), S(e.options, "debugRows", "getAllCells")),
688
- _getAllCellsByColumnId: C(() => [a.getAllCells()], (u) => u.reduce((f, c) => (f[c.column.id] = c, f), {}), S(e.options, "debugRows", "getAllCellsByColumnId"))
687
+ getAllCells: C(() => [e.getAllLeafColumns()], (u) => u.map((d) => Gt(e, s, d, d.id)), S(e.options, "debugRows", "getAllCells")),
688
+ _getAllCellsByColumnId: C(() => [s.getAllCells()], (u) => u.reduce((d, p) => (d[p.column.id] = p, d), {}), S(e.options, "debugRows", "getAllCellsByColumnId"))
689
689
  };
690
690
  for (let u = 0; u < e._features.length; u++) {
691
- const f = e._features[u];
692
- f == null || f.createRow == null || f.createRow(a, e);
691
+ const d = e._features[u];
692
+ d == null || d.createRow == null || d.createRow(s, e);
693
693
  }
694
- return a;
695
- }, Gt = {
694
+ return s;
695
+ }, Bt = {
696
696
  createColumn: (e, o) => {
697
697
  e._getFacetedRowModel = o.options.getFacetedRowModel && o.options.getFacetedRowModel(o, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : o.getPreFilteredRowModel(), e._getFacetedUniqueValues = o.options.getFacetedUniqueValues && o.options.getFacetedUniqueValues(o, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = o.options.getFacetedMinMaxValues && o.options.getFacetedMinMaxValues(o, e.id), e.getFacetedMinMaxValues = () => {
698
698
  if (e._getFacetedMinMaxValues)
699
699
  return e._getFacetedMinMaxValues();
700
700
  };
701
701
  }
702
- }, je = (e, o, t) => {
702
+ }, Ue = (e, o, t) => {
703
703
  var n, r;
704
704
  const l = t == null || (n = t.toString()) == null ? void 0 : n.toLowerCase();
705
705
  return !!(!((r = e.getValue(o)) == null || (r = r.toString()) == null || (r = r.toLowerCase()) == null) && r.includes(l));
706
706
  };
707
- je.autoRemove = (e) => H(e);
708
- const Ue = (e, o, t) => {
707
+ Ue.autoRemove = (e) => z(e);
708
+ const Ke = (e, o, t) => {
709
709
  var n;
710
710
  return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
711
711
  };
712
- Ue.autoRemove = (e) => H(e);
713
- const Ke = (e, o, t) => {
712
+ Ke.autoRemove = (e) => z(e);
713
+ const Xe = (e, o, t) => {
714
714
  var n;
715
715
  return ((n = e.getValue(o)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
716
716
  };
717
- Ke.autoRemove = (e) => H(e);
718
- const Xe = (e, o, t) => {
717
+ Xe.autoRemove = (e) => z(e);
718
+ const We = (e, o, t) => {
719
719
  var n;
720
720
  return (n = e.getValue(o)) == null ? void 0 : n.includes(t);
721
721
  };
722
- Xe.autoRemove = (e) => H(e);
723
- const We = (e, o, t) => !t.some((n) => {
722
+ We.autoRemove = (e) => z(e);
723
+ const Qe = (e, o, t) => !t.some((n) => {
724
724
  var r;
725
725
  return !((r = e.getValue(o)) != null && r.includes(n));
726
726
  });
727
- We.autoRemove = (e) => H(e) || !(e != null && e.length);
728
- const Qe = (e, o, t) => t.some((n) => {
727
+ Qe.autoRemove = (e) => z(e) || !(e != null && e.length);
728
+ const Ye = (e, o, t) => t.some((n) => {
729
729
  var r;
730
730
  return (r = e.getValue(o)) == null ? void 0 : r.includes(n);
731
731
  });
732
- Qe.autoRemove = (e) => H(e) || !(e != null && e.length);
733
- const Ye = (e, o, t) => e.getValue(o) === t;
734
- Ye.autoRemove = (e) => H(e);
735
- const Je = (e, o, t) => e.getValue(o) == t;
736
- Je.autoRemove = (e) => H(e);
732
+ Ye.autoRemove = (e) => z(e) || !(e != null && e.length);
733
+ const Je = (e, o, t) => e.getValue(o) === t;
734
+ Je.autoRemove = (e) => z(e);
735
+ const Ze = (e, o, t) => e.getValue(o) == t;
736
+ Ze.autoRemove = (e) => z(e);
737
737
  const Me = (e, o, t) => {
738
738
  let [n, r] = t;
739
739
  const l = e.getValue(o);
@@ -742,27 +742,27 @@ const Me = (e, o, t) => {
742
742
  Me.resolveFilterValue = (e) => {
743
743
  let [o, t] = e, n = typeof o != "number" ? parseFloat(o) : o, r = typeof t != "number" ? parseFloat(t) : t, l = o === null || Number.isNaN(n) ? -1 / 0 : n, i = t === null || Number.isNaN(r) ? 1 / 0 : r;
744
744
  if (l > i) {
745
- const a = l;
746
- l = i, i = a;
745
+ const s = l;
746
+ l = i, i = s;
747
747
  }
748
748
  return [l, i];
749
749
  };
750
- Me.autoRemove = (e) => H(e) || H(e[0]) && H(e[1]);
751
- const G = {
752
- includesString: je,
753
- includesStringSensitive: Ue,
754
- equalsString: Ke,
755
- arrIncludes: Xe,
756
- arrIncludesAll: We,
757
- arrIncludesSome: Qe,
758
- equals: Ye,
759
- weakEquals: Je,
750
+ Me.autoRemove = (e) => z(e) || z(e[0]) && z(e[1]);
751
+ const O = {
752
+ includesString: Ue,
753
+ includesStringSensitive: Ke,
754
+ equalsString: Xe,
755
+ arrIncludes: We,
756
+ arrIncludesAll: Qe,
757
+ arrIncludesSome: Ye,
758
+ equals: Je,
759
+ weakEquals: Ze,
760
760
  inNumberRange: Me
761
761
  };
762
- function H(e) {
762
+ function z(e) {
763
763
  return e == null || e === "";
764
764
  }
765
- const Ot = {
765
+ const Tt = {
766
766
  getDefaultColumnDef: () => ({
767
767
  filterFn: "auto"
768
768
  }),
@@ -778,12 +778,12 @@ const Ot = {
778
778
  createColumn: (e, o) => {
779
779
  e.getAutoFilterFn = () => {
780
780
  const t = o.getCoreRowModel().flatRows[0], n = t == null ? void 0 : t.getValue(e.id);
781
- return typeof n == "string" ? G.includesString : typeof n == "number" ? G.inNumberRange : typeof n == "boolean" || n !== null && typeof n == "object" ? G.equals : Array.isArray(n) ? G.arrIncludes : G.weakEquals;
781
+ return typeof n == "string" ? O.includesString : typeof n == "number" ? O.inNumberRange : typeof n == "boolean" || n !== null && typeof n == "object" ? O.equals : Array.isArray(n) ? O.arrIncludes : O.weakEquals;
782
782
  }, e.getFilterFn = () => {
783
783
  var t, n;
784
- return oe(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
784
+ return re(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
785
785
  // @ts-ignore
786
- (t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t : G[e.columnDef.filterFn]
786
+ (t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t : O[e.columnDef.filterFn]
787
787
  );
788
788
  }, e.getCanFilter = () => {
789
789
  var t, n, r;
@@ -796,18 +796,18 @@ const Ot = {
796
796
  return (t = (n = o.getState().columnFilters) == null ? void 0 : n.findIndex((r) => r.id === e.id)) != null ? t : -1;
797
797
  }, e.setFilterValue = (t) => {
798
798
  o.setColumnFilters((n) => {
799
- const r = e.getFilterFn(), l = n == null ? void 0 : n.find((c) => c.id === e.id), i = O(t, l ? l.value : void 0);
800
- if (Oe(r, i, e)) {
801
- var a;
802
- return (a = n == null ? void 0 : n.filter((c) => c.id !== e.id)) != null ? a : [];
799
+ const r = e.getFilterFn(), l = n == null ? void 0 : n.find((p) => p.id === e.id), i = b(t, l ? l.value : void 0);
800
+ if (be(r, i, e)) {
801
+ var s;
802
+ return (s = n == null ? void 0 : n.filter((p) => p.id !== e.id)) != null ? s : [];
803
803
  }
804
804
  const u = {
805
805
  id: e.id,
806
806
  value: i
807
807
  };
808
808
  if (l) {
809
- var f;
810
- return (f = n == null ? void 0 : n.map((c) => c.id === e.id ? u : c)) != null ? f : [];
809
+ var d;
810
+ return (d = n == null ? void 0 : n.map((p) => p.id === e.id ? u : p)) != null ? d : [];
811
811
  }
812
812
  return n != null && n.length ? [...n, u] : [u];
813
813
  });
@@ -820,11 +820,11 @@ const Ot = {
820
820
  e.setColumnFilters = (o) => {
821
821
  const t = e.getAllLeafColumns(), n = (r) => {
822
822
  var l;
823
- return (l = O(o, r)) == null ? void 0 : l.filter((i) => {
824
- const a = t.find((u) => u.id === i.id);
825
- if (a) {
826
- const u = a.getFilterFn();
827
- if (Oe(u, i.value, a))
823
+ return (l = b(o, r)) == null ? void 0 : l.filter((i) => {
824
+ const s = t.find((u) => u.id === i.id);
825
+ if (s) {
826
+ const u = s.getFilterFn();
827
+ if (be(u, i.value, s))
828
828
  return !1;
829
829
  }
830
830
  return !0;
@@ -837,57 +837,57 @@ const Ot = {
837
837
  }, 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());
838
838
  }
839
839
  };
840
- function Oe(e, o, t) {
840
+ function be(e, o, t) {
841
841
  return (e && e.autoRemove ? e.autoRemove(o, t) : !1) || typeof o > "u" || typeof o == "string" && !o;
842
842
  }
843
- const bt = (e, o, t) => t.reduce((n, r) => {
843
+ const qt = (e, o, t) => t.reduce((n, r) => {
844
844
  const l = r.getValue(e);
845
845
  return n + (typeof l == "number" ? l : 0);
846
- }, 0), Bt = (e, o, t) => {
846
+ }, 0), jt = (e, o, t) => {
847
847
  let n;
848
848
  return t.forEach((r) => {
849
849
  const l = r.getValue(e);
850
850
  l != null && (n > l || n === void 0 && l >= l) && (n = l);
851
851
  }), n;
852
- }, Tt = (e, o, t) => {
852
+ }, Ut = (e, o, t) => {
853
853
  let n;
854
854
  return t.forEach((r) => {
855
855
  const l = r.getValue(e);
856
856
  l != null && (n < l || n === void 0 && l >= l) && (n = l);
857
857
  }), n;
858
- }, qt = (e, o, t) => {
858
+ }, Kt = (e, o, t) => {
859
859
  let n, r;
860
860
  return t.forEach((l) => {
861
861
  const i = l.getValue(e);
862
862
  i != null && (n === void 0 ? i >= i && (n = r = i) : (n > i && (n = i), r < i && (r = i)));
863
863
  }), [n, r];
864
- }, jt = (e, o) => {
864
+ }, Xt = (e, o) => {
865
865
  let t = 0, n = 0;
866
866
  if (o.forEach((r) => {
867
867
  let l = r.getValue(e);
868
868
  l != null && (l = +l) >= l && (++t, n += l);
869
869
  }), t) return n / t;
870
- }, Ut = (e, o) => {
870
+ }, Wt = (e, o) => {
871
871
  if (!o.length)
872
872
  return;
873
873
  const t = o.map((l) => l.getValue(e));
874
- if (!kt(t))
874
+ if (!zt(t))
875
875
  return;
876
876
  if (t.length === 1)
877
877
  return t[0];
878
878
  const n = Math.floor(t.length / 2), r = t.sort((l, i) => l - i);
879
879
  return t.length % 2 !== 0 ? r[n] : (r[n - 1] + r[n]) / 2;
880
- }, Kt = (e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), Xt = (e, o) => new Set(o.map((t) => t.getValue(e))).size, Wt = (e, o) => o.length, ae = {
881
- sum: bt,
882
- min: Bt,
883
- max: Tt,
884
- extent: qt,
885
- mean: jt,
886
- median: Ut,
887
- unique: Kt,
888
- uniqueCount: Xt,
889
- count: Wt
890
- }, Qt = {
880
+ }, Qt = (e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), Yt = (e, o) => new Set(o.map((t) => t.getValue(e))).size, Jt = (e, o) => o.length, ae = {
881
+ sum: qt,
882
+ min: jt,
883
+ max: Ut,
884
+ extent: Kt,
885
+ mean: Xt,
886
+ median: Wt,
887
+ unique: Qt,
888
+ uniqueCount: Yt,
889
+ count: Jt
890
+ }, Zt = {
891
891
  getDefaultColumnDef: () => ({
892
892
  aggregatedCell: (e) => {
893
893
  var o, t;
@@ -930,7 +930,7 @@ const bt = (e, o, t) => t.reduce((n, r) => {
930
930
  var t, n;
931
931
  if (!e)
932
932
  throw new Error();
933
- return oe(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (n = o.options.aggregationFns) == null ? void 0 : n[e.columnDef.aggregationFn]) != null ? t : ae[e.columnDef.aggregationFn];
933
+ return re(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (n = o.options.aggregationFns) == null ? void 0 : n[e.columnDef.aggregationFn]) != null ? t : ae[e.columnDef.aggregationFn];
934
934
  };
935
935
  },
936
936
  createTable: (e) => {
@@ -954,13 +954,13 @@ const bt = (e, o, t) => t.reduce((n, r) => {
954
954
  };
955
955
  }
956
956
  };
957
- function Yt(e, o, t) {
957
+ function en(e, o, t) {
958
958
  if (!(o != null && o.length) || !t)
959
959
  return e;
960
960
  const n = e.filter((l) => !o.includes(l.id));
961
961
  return t === "remove" ? n : [...o.map((l) => e.find((i) => i.id === l)).filter(Boolean), ...n];
962
962
  }
963
- const Jt = {
963
+ const tn = {
964
964
  getInitialState: (e) => ({
965
965
  columnOrder: [],
966
966
  ...e
@@ -987,20 +987,20 @@ const Jt = {
987
987
  if (!(o != null && o.length))
988
988
  l = r;
989
989
  else {
990
- const i = [...o], a = [...r];
991
- for (; a.length && i.length; ) {
992
- const u = i.shift(), f = a.findIndex((c) => c.id === u);
993
- f > -1 && l.push(a.splice(f, 1)[0]);
990
+ const i = [...o], s = [...r];
991
+ for (; s.length && i.length; ) {
992
+ const u = i.shift(), d = s.findIndex((p) => p.id === u);
993
+ d > -1 && l.push(s.splice(d, 1)[0]);
994
994
  }
995
- l = [...l, ...a];
995
+ l = [...l, ...s];
996
996
  }
997
- return Yt(l, t, n);
997
+ return en(l, t, n);
998
998
  }, S(e.options, "debugTable", "_getOrderColumnsFn"));
999
999
  }
1000
1000
  }, ue = () => ({
1001
1001
  left: [],
1002
1002
  right: []
1003
- }), Zt = {
1003
+ }), nn = {
1004
1004
  getInitialState: (e) => ({
1005
1005
  columnPinning: ue(),
1006
1006
  ...e
@@ -1014,32 +1014,32 @@ const Jt = {
1014
1014
  o.setColumnPinning((r) => {
1015
1015
  var l, i;
1016
1016
  if (t === "right") {
1017
- var a, u;
1017
+ var s, u;
1018
1018
  return {
1019
- left: ((a = r == null ? void 0 : r.left) != null ? a : []).filter((p) => !(n != null && n.includes(p))),
1020
- right: [...((u = r == null ? void 0 : r.right) != null ? u : []).filter((p) => !(n != null && n.includes(p))), ...n]
1019
+ left: ((s = r == null ? void 0 : r.left) != null ? s : []).filter((c) => !(n != null && n.includes(c))),
1020
+ right: [...((u = r == null ? void 0 : r.right) != null ? u : []).filter((c) => !(n != null && n.includes(c))), ...n]
1021
1021
  };
1022
1022
  }
1023
1023
  if (t === "left") {
1024
- var f, c;
1024
+ var d, p;
1025
1025
  return {
1026
- left: [...((f = r == null ? void 0 : r.left) != null ? f : []).filter((p) => !(n != null && n.includes(p))), ...n],
1027
- right: ((c = r == null ? void 0 : r.right) != null ? c : []).filter((p) => !(n != null && n.includes(p)))
1026
+ left: [...((d = r == null ? void 0 : r.left) != null ? d : []).filter((c) => !(n != null && n.includes(c))), ...n],
1027
+ right: ((p = r == null ? void 0 : r.right) != null ? p : []).filter((c) => !(n != null && n.includes(c)))
1028
1028
  };
1029
1029
  }
1030
1030
  return {
1031
- left: ((l = r == null ? void 0 : r.left) != null ? l : []).filter((p) => !(n != null && n.includes(p))),
1032
- right: ((i = r == null ? void 0 : r.right) != null ? i : []).filter((p) => !(n != null && n.includes(p)))
1031
+ left: ((l = r == null ? void 0 : r.left) != null ? l : []).filter((c) => !(n != null && n.includes(c))),
1032
+ right: ((i = r == null ? void 0 : r.right) != null ? i : []).filter((c) => !(n != null && n.includes(c)))
1033
1033
  };
1034
1034
  });
1035
1035
  }, e.getCanPin = () => e.getLeafColumns().some((n) => {
1036
1036
  var r, l, i;
1037
1037
  return ((r = n.columnDef.enablePinning) != null ? r : !0) && ((l = (i = o.options.enableColumnPinning) != null ? i : o.options.enablePinning) != null ? l : !0);
1038
1038
  }), e.getIsPinned = () => {
1039
- const t = e.getLeafColumns().map((a) => a.id), {
1039
+ const t = e.getLeafColumns().map((s) => s.id), {
1040
1040
  left: n,
1041
1041
  right: r
1042
- } = o.getState().columnPinning, l = t.some((a) => n == null ? void 0 : n.includes(a)), i = t.some((a) => r == null ? void 0 : r.includes(a));
1042
+ } = o.getState().columnPinning, l = t.some((s) => n == null ? void 0 : n.includes(s)), i = t.some((s) => r == null ? void 0 : r.includes(s));
1043
1043
  return l ? "left" : i ? "right" : !1;
1044
1044
  }, e.getPinnedIndex = () => {
1045
1045
  var t, n;
@@ -1077,10 +1077,10 @@ const Jt = {
1077
1077
  }, S(e.options, "debugColumns", "getCenterLeafColumns"));
1078
1078
  }
1079
1079
  };
1080
- function en(e) {
1080
+ function on(e) {
1081
1081
  return e || (typeof document < "u" ? document : null);
1082
1082
  }
1083
- const ee = {
1083
+ const te = {
1084
1084
  size: 150,
1085
1085
  minSize: 20,
1086
1086
  maxSize: Number.MAX_SAFE_INTEGER
@@ -1091,8 +1091,8 @@ const ee = {
1091
1091
  deltaPercentage: null,
1092
1092
  isResizingColumn: !1,
1093
1093
  columnSizingStart: []
1094
- }), tn = {
1095
- getDefaultColumnDef: () => ee,
1094
+ }), rn = {
1095
+ getDefaultColumnDef: () => te,
1096
1096
  getInitialState: (e) => ({
1097
1097
  columnSizing: {},
1098
1098
  columnSizingInfo: fe(),
@@ -1108,7 +1108,7 @@ const ee = {
1108
1108
  e.getSize = () => {
1109
1109
  var t, n, r;
1110
1110
  const l = o.getState().columnSizing[e.id];
1111
- return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : ee.minSize, (n = l ?? e.columnDef.size) != null ? n : ee.size), (r = e.columnDef.maxSize) != null ? r : ee.maxSize);
1111
+ return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : te.minSize, (n = l ?? e.columnDef.size) != null ? n : te.size), (r = e.columnDef.maxSize) != null ? r : te.maxSize);
1112
1112
  }, e.getStart = C((t) => [t, J(o, t), o.getState().columnSizing], (t, n) => n.slice(0, e.getIndex(t)).reduce((r, l) => r + l.getSize(), 0), S(o.options, "debugColumns", "getStart")), e.getAfter = C((t) => [t, J(o, t), o.getState().columnSizing], (t, n) => n.slice(e.getIndex(t) + 1).reduce((r, l) => r + l.getSize(), 0), S(o.options, "debugColumns", "getAfter")), e.resetSize = () => {
1113
1113
  o.setColumnSizing((t) => {
1114
1114
  let {
@@ -1145,25 +1145,25 @@ const ee = {
1145
1145
  return (l) => {
1146
1146
  if (!n || !r || (l.persist == null || l.persist(), de(l) && l.touches && l.touches.length > 1))
1147
1147
  return;
1148
- const i = e.getSize(), a = e ? e.getLeafHeaders().map((R) => [R.column.id, R.column.getSize()]) : [[n.id, n.getSize()]], u = de(l) ? Math.round(l.touches[0].clientX) : l.clientX, f = {}, c = (R, x) => {
1149
- typeof x == "number" && (o.setColumnSizingInfo((F) => {
1150
- var E, M;
1151
- const N = o.options.columnResizeDirection === "rtl" ? -1 : 1, T = (x - ((E = F == null ? void 0 : F.startOffset) != null ? E : 0)) * N, P = Math.max(T / ((M = F == null ? void 0 : F.startSize) != null ? M : 0), -0.999999);
1152
- return F.columnSizingStart.forEach((y) => {
1153
- let [_, V] = y;
1154
- f[_] = Math.round(Math.max(V + V * P, 0) * 100) / 100;
1148
+ const i = e.getSize(), s = e ? e.getLeafHeaders().map((R) => [R.column.id, R.column.getSize()]) : [[n.id, n.getSize()]], u = de(l) ? Math.round(l.touches[0].clientX) : l.clientX, d = {}, p = (R, _) => {
1149
+ typeof _ == "number" && (o.setColumnSizingInfo(($) => {
1150
+ var P, I;
1151
+ const H = o.options.columnResizeDirection === "rtl" ? -1 : 1, k = (_ - ((P = $ == null ? void 0 : $.startOffset) != null ? P : 0)) * H, N = Math.max(k / ((I = $ == null ? void 0 : $.startSize) != null ? I : 0), -0.999999);
1152
+ return $.columnSizingStart.forEach((x) => {
1153
+ let [y, V] = x;
1154
+ d[y] = Math.round(Math.max(V + V * N, 0) * 100) / 100;
1155
1155
  }), {
1156
- ...F,
1157
- deltaOffset: T,
1158
- deltaPercentage: P
1156
+ ...$,
1157
+ deltaOffset: k,
1158
+ deltaPercentage: N
1159
1159
  };
1160
- }), (o.options.columnResizeMode === "onChange" || R === "end") && o.setColumnSizing((F) => ({
1161
- ...F,
1162
- ...f
1160
+ }), (o.options.columnResizeMode === "onChange" || R === "end") && o.setColumnSizing(($) => ({
1161
+ ...$,
1162
+ ...d
1163
1163
  })));
1164
- }, p = (R) => c("move", R), d = (R) => {
1165
- c("end", R), o.setColumnSizingInfo((x) => ({
1166
- ...x,
1164
+ }, c = (R) => p("move", R), f = (R) => {
1165
+ p("end", R), o.setColumnSizingInfo((_) => ({
1166
+ ..._,
1167
1167
  isResizingColumn: !1,
1168
1168
  startOffset: null,
1169
1169
  startSize: null,
@@ -1171,27 +1171,27 @@ const ee = {
1171
1171
  deltaPercentage: null,
1172
1172
  columnSizingStart: []
1173
1173
  }));
1174
- }, s = en(t), m = {
1175
- moveHandler: (R) => p(R.clientX),
1174
+ }, a = on(t), m = {
1175
+ moveHandler: (R) => c(R.clientX),
1176
1176
  upHandler: (R) => {
1177
- s == null || s.removeEventListener("mousemove", m.moveHandler), s == null || s.removeEventListener("mouseup", m.upHandler), d(R.clientX);
1177
+ a == null || a.removeEventListener("mousemove", m.moveHandler), a == null || a.removeEventListener("mouseup", m.upHandler), f(R.clientX);
1178
1178
  }
1179
1179
  }, h = {
1180
- moveHandler: (R) => (R.cancelable && (R.preventDefault(), R.stopPropagation()), p(R.touches[0].clientX), !1),
1180
+ moveHandler: (R) => (R.cancelable && (R.preventDefault(), R.stopPropagation()), c(R.touches[0].clientX), !1),
1181
1181
  upHandler: (R) => {
1182
- var x;
1183
- s == null || s.removeEventListener("touchmove", h.moveHandler), s == null || s.removeEventListener("touchend", h.upHandler), R.cancelable && (R.preventDefault(), R.stopPropagation()), d((x = R.touches[0]) == null ? void 0 : x.clientX);
1182
+ var _;
1183
+ a == null || a.removeEventListener("touchmove", h.moveHandler), a == null || a.removeEventListener("touchend", h.upHandler), R.cancelable && (R.preventDefault(), R.stopPropagation()), f((_ = R.touches[0]) == null ? void 0 : _.clientX);
1184
1184
  }
1185
- }, w = nn() ? {
1185
+ }, w = ln() ? {
1186
1186
  passive: !1
1187
1187
  } : !1;
1188
- de(l) ? (s == null || s.addEventListener("touchmove", h.moveHandler, w), s == null || s.addEventListener("touchend", h.upHandler, w)) : (s == null || s.addEventListener("mousemove", m.moveHandler, w), s == null || s.addEventListener("mouseup", m.upHandler, w)), o.setColumnSizingInfo((R) => ({
1188
+ de(l) ? (a == null || a.addEventListener("touchmove", h.moveHandler, w), a == null || a.addEventListener("touchend", h.upHandler, w)) : (a == null || a.addEventListener("mousemove", m.moveHandler, w), a == null || a.addEventListener("mouseup", m.upHandler, w)), o.setColumnSizingInfo((R) => ({
1189
1189
  ...R,
1190
1190
  startOffset: u,
1191
1191
  startSize: i,
1192
1192
  deltaOffset: 0,
1193
1193
  deltaPercentage: 0,
1194
- columnSizingStart: a,
1194
+ columnSizingStart: s,
1195
1195
  isResizingColumn: n.id
1196
1196
  }));
1197
1197
  };
@@ -1219,9 +1219,9 @@ const ee = {
1219
1219
  };
1220
1220
  }
1221
1221
  };
1222
- let te = null;
1223
- function nn() {
1224
- if (typeof te == "boolean") return te;
1222
+ let ne = null;
1223
+ function ln() {
1224
+ if (typeof ne == "boolean") return ne;
1225
1225
  let e = !1;
1226
1226
  try {
1227
1227
  const o = {
@@ -1234,12 +1234,12 @@ function nn() {
1234
1234
  } catch {
1235
1235
  e = !1;
1236
1236
  }
1237
- return te = e, te;
1237
+ return ne = e, ne;
1238
1238
  }
1239
1239
  function de(e) {
1240
1240
  return e.type === "touchstart";
1241
1241
  }
1242
- const on = {
1242
+ const sn = {
1243
1243
  getInitialState: (e) => ({
1244
1244
  columnVisibility: {},
1245
1245
  ...e
@@ -1287,14 +1287,14 @@ const on = {
1287
1287
  function J(e, o) {
1288
1288
  return o ? o === "center" ? e.getCenterVisibleLeafColumns() : o === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
1289
1289
  }
1290
- const rn = {
1290
+ const an = {
1291
1291
  createTable: (e) => {
1292
1292
  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 = () => {
1293
1293
  if (e._getGlobalFacetedMinMaxValues)
1294
1294
  return e._getGlobalFacetedMinMaxValues();
1295
1295
  };
1296
1296
  }
1297
- }, ln = {
1297
+ }, un = {
1298
1298
  getInitialState: (e) => ({
1299
1299
  globalFilter: void 0,
1300
1300
  ...e
@@ -1315,19 +1315,19 @@ const rn = {
1315
1315
  };
1316
1316
  },
1317
1317
  createTable: (e) => {
1318
- e.getGlobalAutoFilterFn = () => G.includesString, e.getGlobalFilterFn = () => {
1318
+ e.getGlobalAutoFilterFn = () => O.includesString, e.getGlobalFilterFn = () => {
1319
1319
  var o, t;
1320
1320
  const {
1321
1321
  globalFilterFn: n
1322
1322
  } = e.options;
1323
- return oe(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (o = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? o : G[n];
1323
+ return re(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (o = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? o : O[n];
1324
1324
  }, e.setGlobalFilter = (o) => {
1325
1325
  e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(o);
1326
1326
  }, e.resetGlobalFilter = (o) => {
1327
1327
  e.setGlobalFilter(o ? void 0 : e.initialState.globalFilter);
1328
1328
  };
1329
1329
  }
1330
- }, sn = {
1330
+ }, fn = {
1331
1331
  getInitialState: (e) => ({
1332
1332
  expanded: {},
1333
1333
  ...e
@@ -1379,8 +1379,8 @@ const rn = {
1379
1379
  var r;
1380
1380
  const l = n === !0 ? !0 : !!(n != null && n[e.id]);
1381
1381
  let i = {};
1382
- if (n === !0 ? Object.keys(o.getRowModel().rowsById).forEach((a) => {
1383
- i[a] = !0;
1382
+ if (n === !0 ? Object.keys(o.getRowModel().rowsById).forEach((s) => {
1383
+ i[s] = !0;
1384
1384
  }) : i = n, t = (r = t) != null ? r : !l, !l && t)
1385
1385
  return {
1386
1386
  ...i,
@@ -1388,7 +1388,7 @@ const rn = {
1388
1388
  };
1389
1389
  if (l && !t) {
1390
1390
  const {
1391
- [e.id]: a,
1391
+ [e.id]: s,
1392
1392
  ...u
1393
1393
  } = i;
1394
1394
  return u;
@@ -1417,7 +1417,7 @@ const rn = {
1417
1417
  }, we = 0, Ce = 10, ge = () => ({
1418
1418
  pageIndex: we,
1419
1419
  pageSize: Ce
1420
- }), an = {
1420
+ }), dn = {
1421
1421
  getInitialState: (e) => ({
1422
1422
  ...e,
1423
1423
  pagination: {
@@ -1445,14 +1445,14 @@ const rn = {
1445
1445
  });
1446
1446
  }
1447
1447
  }, e.setPagination = (n) => {
1448
- const r = (l) => O(n, l);
1448
+ const r = (l) => b(n, l);
1449
1449
  return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(r);
1450
1450
  }, e.resetPagination = (n) => {
1451
1451
  var r;
1452
1452
  e.setPagination(n ? ge() : (r = e.initialState.pagination) != null ? r : ge());
1453
1453
  }, e.setPageIndex = (n) => {
1454
1454
  e.setPagination((r) => {
1455
- let l = O(n, r.pageIndex);
1455
+ let l = b(n, r.pageIndex);
1456
1456
  const i = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
1457
1457
  return l = Math.max(0, Math.min(l, i)), {
1458
1458
  ...r,
@@ -1467,16 +1467,16 @@ const rn = {
1467
1467
  e.setPageSize(n ? Ce : (r = (l = e.initialState) == null || (l = l.pagination) == null ? void 0 : l.pageSize) != null ? r : Ce);
1468
1468
  }, e.setPageSize = (n) => {
1469
1469
  e.setPagination((r) => {
1470
- const l = Math.max(1, O(n, r.pageSize)), i = r.pageSize * r.pageIndex, a = Math.floor(i / l);
1470
+ const l = Math.max(1, b(n, r.pageSize)), i = r.pageSize * r.pageIndex, s = Math.floor(i / l);
1471
1471
  return {
1472
1472
  ...r,
1473
- pageIndex: a,
1473
+ pageIndex: s,
1474
1474
  pageSize: l
1475
1475
  };
1476
1476
  });
1477
1477
  }, e.setPageCount = (n) => e.setPagination((r) => {
1478
1478
  var l;
1479
- let i = O(n, (l = e.options.pageCount) != null ? l : -1);
1479
+ let i = b(n, (l = e.options.pageCount) != null ? l : -1);
1480
1480
  return typeof i == "number" && (i = Math.max(-1, i)), {
1481
1481
  ...r,
1482
1482
  pageCount: i
@@ -1500,7 +1500,7 @@ const rn = {
1500
1500
  }, ce = () => ({
1501
1501
  top: [],
1502
1502
  bottom: []
1503
- }), un = {
1503
+ }), gn = {
1504
1504
  getInitialState: (e) => ({
1505
1505
  rowPinning: ce(),
1506
1506
  ...e
@@ -1512,34 +1512,34 @@ const rn = {
1512
1512
  e.pin = (t, n, r) => {
1513
1513
  const l = n ? e.getLeafRows().map((u) => {
1514
1514
  let {
1515
- id: f
1515
+ id: d
1516
1516
  } = u;
1517
- return f;
1517
+ return d;
1518
1518
  }) : [], i = r ? e.getParentRows().map((u) => {
1519
1519
  let {
1520
- id: f
1520
+ id: d
1521
1521
  } = u;
1522
- return f;
1523
- }) : [], a = /* @__PURE__ */ new Set([...i, e.id, ...l]);
1522
+ return d;
1523
+ }) : [], s = /* @__PURE__ */ new Set([...i, e.id, ...l]);
1524
1524
  o.setRowPinning((u) => {
1525
- var f, c;
1525
+ var d, p;
1526
1526
  if (t === "bottom") {
1527
- var p, d;
1527
+ var c, f;
1528
1528
  return {
1529
- top: ((p = u == null ? void 0 : u.top) != null ? p : []).filter((h) => !(a != null && a.has(h))),
1530
- bottom: [...((d = u == null ? void 0 : u.bottom) != null ? d : []).filter((h) => !(a != null && a.has(h))), ...Array.from(a)]
1529
+ top: ((c = u == null ? void 0 : u.top) != null ? c : []).filter((h) => !(s != null && s.has(h))),
1530
+ bottom: [...((f = u == null ? void 0 : u.bottom) != null ? f : []).filter((h) => !(s != null && s.has(h))), ...Array.from(s)]
1531
1531
  };
1532
1532
  }
1533
1533
  if (t === "top") {
1534
- var s, m;
1534
+ var a, m;
1535
1535
  return {
1536
- top: [...((s = u == null ? void 0 : u.top) != null ? s : []).filter((h) => !(a != null && a.has(h))), ...Array.from(a)],
1537
- bottom: ((m = u == null ? void 0 : u.bottom) != null ? m : []).filter((h) => !(a != null && a.has(h)))
1536
+ top: [...((a = u == null ? void 0 : u.top) != null ? a : []).filter((h) => !(s != null && s.has(h))), ...Array.from(s)],
1537
+ bottom: ((m = u == null ? void 0 : u.bottom) != null ? m : []).filter((h) => !(s != null && s.has(h)))
1538
1538
  };
1539
1539
  }
1540
1540
  return {
1541
- top: ((f = u == null ? void 0 : u.top) != null ? f : []).filter((h) => !(a != null && a.has(h))),
1542
- bottom: ((c = u == null ? void 0 : u.bottom) != null ? c : []).filter((h) => !(a != null && a.has(h)))
1541
+ top: ((d = u == null ? void 0 : u.top) != null ? d : []).filter((h) => !(s != null && s.has(h))),
1542
+ bottom: ((p = u == null ? void 0 : u.bottom) != null ? p : []).filter((h) => !(s != null && s.has(h)))
1543
1543
  };
1544
1544
  });
1545
1545
  }, e.getCanPin = () => {
@@ -1553,7 +1553,7 @@ const rn = {
1553
1553
  const t = [e.id], {
1554
1554
  top: n,
1555
1555
  bottom: r
1556
- } = o.getState().rowPinning, l = t.some((a) => n == null ? void 0 : n.includes(a)), i = t.some((a) => r == null ? void 0 : r.includes(a));
1556
+ } = o.getState().rowPinning, l = t.some((s) => n == null ? void 0 : n.includes(s)), i = t.some((s) => r == null ? void 0 : r.includes(s));
1557
1557
  return l ? "top" : i ? "bottom" : !1;
1558
1558
  }, e.getPinnedIndex = () => {
1559
1559
  var t, n;
@@ -1561,9 +1561,9 @@ const rn = {
1561
1561
  if (!r) return -1;
1562
1562
  const l = (t = r === "top" ? o.getTopRows() : o.getBottomRows()) == null ? void 0 : t.map((i) => {
1563
1563
  let {
1564
- id: a
1564
+ id: s
1565
1565
  } = i;
1566
- return a;
1566
+ return s;
1567
1567
  });
1568
1568
  return (n = l == null ? void 0 : l.indexOf(e.id)) != null ? n : -1;
1569
1569
  };
@@ -1586,12 +1586,12 @@ const rn = {
1586
1586
  //get all rows that are pinned even if they would not be otherwise visible
1587
1587
  //account for expanded parent rows, but not pagination or filtering
1588
1588
  (t ?? []).map((i) => {
1589
- const a = e.getRow(i, !0);
1590
- return a.getIsAllParentsExpanded() ? a : null;
1589
+ const s = e.getRow(i, !0);
1590
+ return s.getIsAllParentsExpanded() ? s : null;
1591
1591
  })
1592
1592
  ) : (
1593
1593
  //else get only visible rows that are pinned
1594
- (t ?? []).map((i) => o.find((a) => a.id === i))
1594
+ (t ?? []).map((i) => o.find((s) => s.id === i))
1595
1595
  )).filter(Boolean).map((i) => ({
1596
1596
  ...i,
1597
1597
  position: n
@@ -1601,7 +1601,7 @@ const rn = {
1601
1601
  return o.filter((l) => !r.has(l.id));
1602
1602
  }, S(e.options, "debugRows", "getCenterRows"));
1603
1603
  }
1604
- }, fn = {
1604
+ }, cn = {
1605
1605
  getInitialState: (e) => ({
1606
1606
  rowSelection: {},
1607
1607
  ...e
@@ -1682,10 +1682,10 @@ const rn = {
1682
1682
  var i;
1683
1683
  if (t = typeof t < "u" ? t : !r, e.getCanSelect() && r === t)
1684
1684
  return l;
1685
- const a = {
1685
+ const s = {
1686
1686
  ...l
1687
1687
  };
1688
- return Se(a, e.id, t, (i = n == null ? void 0 : n.selectChildren) != null ? i : !0, o), a;
1688
+ return Se(s, e.id, t, (i = n == null ? void 0 : n.selectChildren) != null ? i : !0, o), s;
1689
1689
  });
1690
1690
  }, e.getIsSelected = () => {
1691
1691
  const {
@@ -1722,17 +1722,17 @@ const rn = {
1722
1722
  }, Se = (e, o, t, n, r) => {
1723
1723
  var l;
1724
1724
  const i = r.getRow(o, !0);
1725
- t ? (i.getCanMultiSelect() || Object.keys(e).forEach((a) => delete e[a]), i.getCanSelect() && (e[o] = !0)) : delete e[o], n && (l = i.subRows) != null && l.length && i.getCanSelectSubRows() && i.subRows.forEach((a) => Se(e, a.id, t, n, r));
1725
+ t ? (i.getCanMultiSelect() || Object.keys(e).forEach((s) => delete e[s]), i.getCanSelect() && (e[o] = !0)) : delete e[o], n && (l = i.subRows) != null && l.length && i.getCanSelectSubRows() && i.subRows.forEach((s) => Se(e, s.id, t, n, r));
1726
1726
  };
1727
1727
  function pe(e, o) {
1728
- const t = e.getState().rowSelection, n = [], r = {}, l = function(i, a) {
1728
+ const t = e.getState().rowSelection, n = [], r = {}, l = function(i, s) {
1729
1729
  return i.map((u) => {
1730
- var f;
1731
- const c = Ie(u, t);
1732
- if (c && (n.push(u), r[u.id] = u), (f = u.subRows) != null && f.length && (u = {
1730
+ var d;
1731
+ const p = Ie(u, t);
1732
+ if (p && (n.push(u), r[u.id] = u), (d = u.subRows) != null && d.length && (u = {
1733
1733
  ...u,
1734
1734
  subRows: l(u.subRows)
1735
- }), c)
1735
+ }), p)
1736
1736
  return u;
1737
1737
  }).filter(Boolean);
1738
1738
  };
@@ -1752,25 +1752,25 @@ function Re(e, o, t) {
1752
1752
  let r = !0, l = !1;
1753
1753
  return e.subRows.forEach((i) => {
1754
1754
  if (!(l && !r) && (i.getCanSelect() && (Ie(i, o) ? l = !0 : r = !1), i.subRows && i.subRows.length)) {
1755
- const a = Re(i, o);
1756
- a === "all" ? l = !0 : (a === "some" && (l = !0), r = !1);
1755
+ const s = Re(i, o);
1756
+ s === "all" ? l = !0 : (s === "some" && (l = !0), r = !1);
1757
1757
  }
1758
1758
  }), r ? "all" : l ? "some" : !1;
1759
1759
  }
1760
- const ye = /([0-9]+)/gm, dn = (e, o, t) => Ze(B(e.getValue(t)).toLowerCase(), B(o.getValue(t)).toLowerCase()), gn = (e, o, t) => Ze(B(e.getValue(t)), B(o.getValue(t))), cn = (e, o, t) => Ve(B(e.getValue(t)).toLowerCase(), B(o.getValue(t)).toLowerCase()), pn = (e, o, t) => Ve(B(e.getValue(t)), B(o.getValue(t))), mn = (e, o, t) => {
1760
+ const ye = /([0-9]+)/gm, pn = (e, o, t) => et(T(e.getValue(t)).toLowerCase(), T(o.getValue(t)).toLowerCase()), mn = (e, o, t) => et(T(e.getValue(t)), T(o.getValue(t))), hn = (e, o, t) => Ve(T(e.getValue(t)).toLowerCase(), T(o.getValue(t)).toLowerCase()), vn = (e, o, t) => Ve(T(e.getValue(t)), T(o.getValue(t))), wn = (e, o, t) => {
1761
1761
  const n = e.getValue(t), r = o.getValue(t);
1762
1762
  return n > r ? 1 : n < r ? -1 : 0;
1763
- }, hn = (e, o, t) => Ve(e.getValue(t), o.getValue(t));
1763
+ }, Cn = (e, o, t) => Ve(e.getValue(t), o.getValue(t));
1764
1764
  function Ve(e, o) {
1765
1765
  return e === o ? 0 : e > o ? 1 : -1;
1766
1766
  }
1767
- function B(e) {
1767
+ function T(e) {
1768
1768
  return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
1769
1769
  }
1770
- function Ze(e, o) {
1770
+ function et(e, o) {
1771
1771
  const t = e.split(ye).filter(Boolean), n = o.split(ye).filter(Boolean);
1772
1772
  for (; t.length && n.length; ) {
1773
- const r = t.shift(), l = n.shift(), i = parseInt(r, 10), a = parseInt(l, 10), u = [i, a].sort();
1773
+ const r = t.shift(), l = n.shift(), i = parseInt(r, 10), s = parseInt(l, 10), u = [i, s].sort();
1774
1774
  if (isNaN(u[0])) {
1775
1775
  if (r > l)
1776
1776
  return 1;
@@ -1780,21 +1780,21 @@ function Ze(e, o) {
1780
1780
  }
1781
1781
  if (isNaN(u[1]))
1782
1782
  return isNaN(i) ? -1 : 1;
1783
- if (i > a)
1783
+ if (i > s)
1784
1784
  return 1;
1785
- if (a > i)
1785
+ if (s > i)
1786
1786
  return -1;
1787
1787
  }
1788
1788
  return t.length - n.length;
1789
1789
  }
1790
1790
  const Y = {
1791
- alphanumeric: dn,
1792
- alphanumericCaseSensitive: gn,
1793
- text: cn,
1794
- textCaseSensitive: pn,
1795
- datetime: mn,
1796
- basic: hn
1797
- }, vn = {
1791
+ alphanumeric: pn,
1792
+ alphanumericCaseSensitive: mn,
1793
+ text: hn,
1794
+ textCaseSensitive: vn,
1795
+ datetime: wn,
1796
+ basic: Cn
1797
+ }, Sn = {
1798
1798
  getInitialState: (e) => ({
1799
1799
  sorting: [],
1800
1800
  ...e
@@ -1826,26 +1826,26 @@ const Y = {
1826
1826
  var t, n;
1827
1827
  if (!e)
1828
1828
  throw new Error();
1829
- return oe(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (n = o.options.sortingFns) == null ? void 0 : n[e.columnDef.sortingFn]) != null ? t : Y[e.columnDef.sortingFn];
1829
+ return re(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (n = o.options.sortingFns) == null ? void 0 : n[e.columnDef.sortingFn]) != null ? t : Y[e.columnDef.sortingFn];
1830
1830
  }, e.toggleSorting = (t, n) => {
1831
1831
  const r = e.getNextSortingOrder(), l = typeof t < "u" && t !== null;
1832
1832
  o.setSorting((i) => {
1833
- const a = i == null ? void 0 : i.find((s) => s.id === e.id), u = i == null ? void 0 : i.findIndex((s) => s.id === e.id);
1834
- let f = [], c, p = l ? t : r === "desc";
1835
- if (i != null && i.length && e.getCanMultiSort() && n ? a ? c = "toggle" : c = "add" : i != null && i.length && u !== i.length - 1 ? c = "replace" : a ? c = "toggle" : c = "replace", c === "toggle" && (l || r || (c = "remove")), c === "add") {
1836
- var d;
1837
- f = [...i, {
1833
+ const s = i == null ? void 0 : i.find((a) => a.id === e.id), u = i == null ? void 0 : i.findIndex((a) => a.id === e.id);
1834
+ let d = [], p, c = l ? t : r === "desc";
1835
+ if (i != null && i.length && e.getCanMultiSort() && n ? s ? p = "toggle" : p = "add" : i != null && i.length && u !== i.length - 1 ? p = "replace" : s ? p = "toggle" : p = "replace", p === "toggle" && (l || r || (p = "remove")), p === "add") {
1836
+ var f;
1837
+ d = [...i, {
1838
1838
  id: e.id,
1839
- desc: p
1840
- }], f.splice(0, f.length - ((d = o.options.maxMultiSortColCount) != null ? d : Number.MAX_SAFE_INTEGER));
1841
- } else c === "toggle" ? f = i.map((s) => s.id === e.id ? {
1842
- ...s,
1843
- desc: p
1844
- } : s) : c === "remove" ? f = i.filter((s) => s.id !== e.id) : f = [{
1839
+ desc: c
1840
+ }], d.splice(0, d.length - ((f = o.options.maxMultiSortColCount) != null ? f : Number.MAX_SAFE_INTEGER));
1841
+ } else p === "toggle" ? d = i.map((a) => a.id === e.id ? {
1842
+ ...a,
1843
+ desc: c
1844
+ } : a) : p === "remove" ? d = i.filter((a) => a.id !== e.id) : d = [{
1845
1845
  id: e.id,
1846
- desc: p
1846
+ desc: c
1847
1847
  }];
1848
- return f;
1848
+ return d;
1849
1849
  });
1850
1850
  }, e.getFirstSortDir = () => {
1851
1851
  var t, n;
@@ -1883,92 +1883,92 @@ const Y = {
1883
1883
  e.setSorting(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.sorting) != null ? t : []);
1884
1884
  }, 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());
1885
1885
  }
1886
- }, wn = [
1887
- At,
1888
- on,
1889
- Jt,
1890
- Zt,
1891
- Gt,
1892
- Ot,
1893
- rn,
1894
- //depends on ColumnFaceting
1895
- ln,
1896
- //depends on ColumnFiltering
1897
- vn,
1898
- Qt,
1899
- //depends on RowSorting
1886
+ }, Rn = [
1887
+ bt,
1900
1888
  sn,
1889
+ tn,
1890
+ nn,
1891
+ Bt,
1892
+ Tt,
1901
1893
  an,
1894
+ //depends on ColumnFaceting
1902
1895
  un,
1896
+ //depends on ColumnFiltering
1897
+ Sn,
1898
+ Zt,
1899
+ //depends on RowSorting
1903
1900
  fn,
1904
- tn
1901
+ dn,
1902
+ gn,
1903
+ cn,
1904
+ rn
1905
1905
  ];
1906
- function Cn(e) {
1906
+ function yn(e) {
1907
1907
  var o, t;
1908
1908
  process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
1909
- const n = [...wn, ...(o = e._features) != null ? o : []];
1909
+ const n = [...Rn, ...(o = e._features) != null ? o : []];
1910
1910
  let r = {
1911
1911
  _features: n
1912
1912
  };
1913
- const l = r._features.reduce((d, s) => Object.assign(d, s.getDefaultOptions == null ? void 0 : s.getDefaultOptions(r)), {}), i = (d) => r.options.mergeOptions ? r.options.mergeOptions(l, d) : {
1913
+ const l = r._features.reduce((f, a) => Object.assign(f, a.getDefaultOptions == null ? void 0 : a.getDefaultOptions(r)), {}), i = (f) => r.options.mergeOptions ? r.options.mergeOptions(l, f) : {
1914
1914
  ...l,
1915
- ...d
1915
+ ...f
1916
1916
  };
1917
1917
  let u = {
1918
1918
  ...{},
1919
1919
  ...(t = e.initialState) != null ? t : {}
1920
1920
  };
1921
- r._features.forEach((d) => {
1922
- var s;
1923
- u = (s = d.getInitialState == null ? void 0 : d.getInitialState(u)) != null ? s : u;
1921
+ r._features.forEach((f) => {
1922
+ var a;
1923
+ u = (a = f.getInitialState == null ? void 0 : f.getInitialState(u)) != null ? a : u;
1924
1924
  });
1925
- const f = [];
1926
- let c = !1;
1927
- const p = {
1925
+ const d = [];
1926
+ let p = !1;
1927
+ const c = {
1928
1928
  _features: n,
1929
1929
  options: {
1930
1930
  ...l,
1931
1931
  ...e
1932
1932
  },
1933
1933
  initialState: u,
1934
- _queue: (d) => {
1935
- f.push(d), c || (c = !0, Promise.resolve().then(() => {
1936
- for (; f.length; )
1937
- f.shift()();
1938
- c = !1;
1939
- }).catch((s) => setTimeout(() => {
1940
- throw s;
1934
+ _queue: (f) => {
1935
+ d.push(f), p || (p = !0, Promise.resolve().then(() => {
1936
+ for (; d.length; )
1937
+ d.shift()();
1938
+ p = !1;
1939
+ }).catch((a) => setTimeout(() => {
1940
+ throw a;
1941
1941
  })));
1942
1942
  },
1943
1943
  reset: () => {
1944
1944
  r.setState(r.initialState);
1945
1945
  },
1946
- setOptions: (d) => {
1947
- const s = O(d, r.options);
1948
- r.options = i(s);
1946
+ setOptions: (f) => {
1947
+ const a = b(f, r.options);
1948
+ r.options = i(a);
1949
1949
  },
1950
1950
  getState: () => r.options.state,
1951
- setState: (d) => {
1952
- r.options.onStateChange == null || r.options.onStateChange(d);
1951
+ setState: (f) => {
1952
+ r.options.onStateChange == null || r.options.onStateChange(f);
1953
1953
  },
1954
- _getRowId: (d, s, m) => {
1954
+ _getRowId: (f, a, m) => {
1955
1955
  var h;
1956
- return (h = r.options.getRowId == null ? void 0 : r.options.getRowId(d, s, m)) != null ? h : `${m ? [m.id, s].join(".") : s}`;
1956
+ return (h = r.options.getRowId == null ? void 0 : r.options.getRowId(f, a, m)) != null ? h : `${m ? [m.id, a].join(".") : a}`;
1957
1957
  },
1958
1958
  getCoreRowModel: () => (r._getCoreRowModel || (r._getCoreRowModel = r.options.getCoreRowModel(r)), r._getCoreRowModel()),
1959
1959
  // The final calls start at the bottom of the model,
1960
1960
  // expanded rows, which then work their way up
1961
1961
  getRowModel: () => r.getPaginationRowModel(),
1962
1962
  //in next version, we should just pass in the row model as the optional 2nd arg
1963
- getRow: (d, s) => {
1964
- let m = (s ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[d];
1965
- if (!m && (m = r.getCoreRowModel().rowsById[d], !m))
1966
- throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${d}`) : new Error();
1963
+ getRow: (f, a) => {
1964
+ let m = (a ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[f];
1965
+ if (!m && (m = r.getCoreRowModel().rowsById[f], !m))
1966
+ throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${f}`) : new Error();
1967
1967
  return m;
1968
1968
  },
1969
- _getDefaultColumnDef: C(() => [r.options.defaultColumn], (d) => {
1970
- var s;
1971
- return d = (s = d) != null ? s : {}, {
1969
+ _getDefaultColumnDef: C(() => [r.options.defaultColumn], (f) => {
1970
+ var a;
1971
+ return f = (a = f) != null ? a : {}, {
1972
1972
  header: (m) => {
1973
1973
  const h = m.header.column.columnDef;
1974
1974
  return h.accessorKey ? h.accessorKey : h.accessorFn ? h.id : null;
@@ -1979,38 +1979,38 @@ function Cn(e) {
1979
1979
  return (h = (w = m.renderValue()) == null || w.toString == null ? void 0 : w.toString()) != null ? h : null;
1980
1980
  },
1981
1981
  ...r._features.reduce((m, h) => Object.assign(m, h.getDefaultColumnDef == null ? void 0 : h.getDefaultColumnDef()), {}),
1982
- ...d
1982
+ ...f
1983
1983
  };
1984
1984
  }, S(e, "debugColumns", "_getDefaultColumnDef")),
1985
1985
  _getColumnDefs: () => r.options.columns,
1986
- getAllColumns: C(() => [r._getColumnDefs()], (d) => {
1987
- const s = function(m, h, w) {
1986
+ getAllColumns: C(() => [r._getColumnDefs()], (f) => {
1987
+ const a = function(m, h, w) {
1988
1988
  return w === void 0 && (w = 0), m.map((R) => {
1989
- const x = zt(r, R, w, h), F = R;
1990
- return x.columns = F.columns ? s(F.columns, x, w + 1) : [], x;
1989
+ const _ = Ot(r, R, w, h), $ = R;
1990
+ return _.columns = $.columns ? a($.columns, _, w + 1) : [], _;
1991
1991
  });
1992
1992
  };
1993
- return s(d);
1993
+ return a(f);
1994
1994
  }, S(e, "debugColumns", "getAllColumns")),
1995
- getAllFlatColumns: C(() => [r.getAllColumns()], (d) => d.flatMap((s) => s.getFlatColumns()), S(e, "debugColumns", "getAllFlatColumns")),
1996
- _getAllFlatColumnsById: C(() => [r.getAllFlatColumns()], (d) => d.reduce((s, m) => (s[m.id] = m, s), {}), S(e, "debugColumns", "getAllFlatColumnsById")),
1997
- getAllLeafColumns: C(() => [r.getAllColumns(), r._getOrderColumnsFn()], (d, s) => {
1998
- let m = d.flatMap((h) => h.getLeafColumns());
1999
- return s(m);
1995
+ getAllFlatColumns: C(() => [r.getAllColumns()], (f) => f.flatMap((a) => a.getFlatColumns()), S(e, "debugColumns", "getAllFlatColumns")),
1996
+ _getAllFlatColumnsById: C(() => [r.getAllFlatColumns()], (f) => f.reduce((a, m) => (a[m.id] = m, a), {}), S(e, "debugColumns", "getAllFlatColumnsById")),
1997
+ getAllLeafColumns: C(() => [r.getAllColumns(), r._getOrderColumnsFn()], (f, a) => {
1998
+ let m = f.flatMap((h) => h.getLeafColumns());
1999
+ return a(m);
2000
2000
  }, S(e, "debugColumns", "getAllLeafColumns")),
2001
- getColumn: (d) => {
2002
- const s = r._getAllFlatColumnsById()[d];
2003
- return process.env.NODE_ENV !== "production" && !s && console.error(`[Table] Column with id '${d}' does not exist.`), s;
2001
+ getColumn: (f) => {
2002
+ const a = r._getAllFlatColumnsById()[f];
2003
+ return process.env.NODE_ENV !== "production" && !a && console.error(`[Table] Column with id '${f}' does not exist.`), a;
2004
2004
  }
2005
2005
  };
2006
- Object.assign(r, p);
2007
- for (let d = 0; d < r._features.length; d++) {
2008
- const s = r._features[d];
2009
- s == null || s.createTable == null || s.createTable(r);
2006
+ Object.assign(r, c);
2007
+ for (let f = 0; f < r._features.length; f++) {
2008
+ const a = r._features[f];
2009
+ a == null || a.createTable == null || a.createTable(r);
2010
2010
  }
2011
2011
  return r;
2012
2012
  }
2013
- function Sn() {
2013
+ function xn() {
2014
2014
  return (e) => C(() => [e.options.data], (o) => {
2015
2015
  const t = {
2016
2016
  rows: [],
@@ -2018,20 +2018,20 @@ function Sn() {
2018
2018
  rowsById: {}
2019
2019
  }, n = function(r, l, i) {
2020
2020
  l === void 0 && (l = 0);
2021
- const a = [];
2022
- for (let f = 0; f < r.length; f++) {
2023
- const c = $e(e, e._getRowId(r[f], f, i), r[f], f, l, void 0, i == null ? void 0 : i.id);
2024
- if (t.flatRows.push(c), t.rowsById[c.id] = c, a.push(c), e.options.getSubRows) {
2021
+ const s = [];
2022
+ for (let d = 0; d < r.length; d++) {
2023
+ const p = $e(e, e._getRowId(r[d], d, i), r[d], d, l, void 0, i == null ? void 0 : i.id);
2024
+ if (t.flatRows.push(p), t.rowsById[p.id] = p, s.push(p), e.options.getSubRows) {
2025
2025
  var u;
2026
- c.originalSubRows = e.options.getSubRows(r[f], f), (u = c.originalSubRows) != null && u.length && (c.subRows = n(c.originalSubRows, l + 1, c));
2026
+ p.originalSubRows = e.options.getSubRows(r[d], d), (u = p.originalSubRows) != null && u.length && (p.subRows = n(p.originalSubRows, l + 1, p));
2027
2027
  }
2028
2028
  }
2029
- return a;
2029
+ return s;
2030
2030
  };
2031
2031
  return t.rows = n(o), t;
2032
2032
  }, S(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
2033
2033
  }
2034
- function Rn(e) {
2034
+ function _n(e) {
2035
2035
  const o = [], t = (n) => {
2036
2036
  var r;
2037
2037
  o.push(n), (r = n.subRows) != null && r.length && n.getIsExpanded() && n.subRows.forEach(t);
@@ -2042,73 +2042,73 @@ function Rn(e) {
2042
2042
  rowsById: e.rowsById
2043
2043
  };
2044
2044
  }
2045
- function yn(e, o, t) {
2046
- return t.options.filterFromLeafRows ? xn(e, o, t) : _n(e, o, t);
2045
+ function Fn(e, o, t) {
2046
+ return t.options.filterFromLeafRows ? $n(e, o, t) : Mn(e, o, t);
2047
2047
  }
2048
- function xn(e, o, t) {
2048
+ function $n(e, o, t) {
2049
2049
  var n;
2050
- const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, a = function(u, f) {
2051
- f === void 0 && (f = 0);
2052
- const c = [];
2053
- for (let d = 0; d < u.length; d++) {
2054
- var p;
2055
- let s = u[d];
2056
- const m = $e(t, s.id, s.original, s.index, s.depth, void 0, s.parentId);
2057
- if (m.columnFilters = s.columnFilters, (p = s.subRows) != null && p.length && f < i) {
2058
- if (m.subRows = a(s.subRows, f + 1), s = m, o(s) && !m.subRows.length) {
2059
- c.push(s), l[s.id] = s, r.push(s);
2050
+ const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(u, d) {
2051
+ d === void 0 && (d = 0);
2052
+ const p = [];
2053
+ for (let f = 0; f < u.length; f++) {
2054
+ var c;
2055
+ let a = u[f];
2056
+ const m = $e(t, a.id, a.original, a.index, a.depth, void 0, a.parentId);
2057
+ if (m.columnFilters = a.columnFilters, (c = a.subRows) != null && c.length && d < i) {
2058
+ if (m.subRows = s(a.subRows, d + 1), a = m, o(a) && !m.subRows.length) {
2059
+ p.push(a), l[a.id] = a, r.push(a);
2060
2060
  continue;
2061
2061
  }
2062
- if (o(s) || m.subRows.length) {
2063
- c.push(s), l[s.id] = s, r.push(s);
2062
+ if (o(a) || m.subRows.length) {
2063
+ p.push(a), l[a.id] = a, r.push(a);
2064
2064
  continue;
2065
2065
  }
2066
2066
  } else
2067
- s = m, o(s) && (c.push(s), l[s.id] = s, r.push(s));
2067
+ a = m, o(a) && (p.push(a), l[a.id] = a, r.push(a));
2068
2068
  }
2069
- return c;
2069
+ return p;
2070
2070
  };
2071
2071
  return {
2072
- rows: a(e),
2072
+ rows: s(e),
2073
2073
  flatRows: r,
2074
2074
  rowsById: l
2075
2075
  };
2076
2076
  }
2077
- function _n(e, o, t) {
2077
+ function Mn(e, o, t) {
2078
2078
  var n;
2079
- const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, a = function(u, f) {
2080
- f === void 0 && (f = 0);
2081
- const c = [];
2082
- for (let d = 0; d < u.length; d++) {
2083
- let s = u[d];
2084
- if (o(s)) {
2085
- var p;
2086
- if ((p = s.subRows) != null && p.length && f < i) {
2087
- const h = $e(t, s.id, s.original, s.index, s.depth, void 0, s.parentId);
2088
- h.subRows = a(s.subRows, f + 1), s = h;
2079
+ const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(u, d) {
2080
+ d === void 0 && (d = 0);
2081
+ const p = [];
2082
+ for (let f = 0; f < u.length; f++) {
2083
+ let a = u[f];
2084
+ if (o(a)) {
2085
+ var c;
2086
+ if ((c = a.subRows) != null && c.length && d < i) {
2087
+ const h = $e(t, a.id, a.original, a.index, a.depth, void 0, a.parentId);
2088
+ h.subRows = s(a.subRows, d + 1), a = h;
2089
2089
  }
2090
- c.push(s), r.push(s), l[s.id] = s;
2090
+ p.push(a), r.push(a), l[a.id] = a;
2091
2091
  }
2092
2092
  }
2093
- return c;
2093
+ return p;
2094
2094
  };
2095
2095
  return {
2096
- rows: a(e),
2096
+ rows: s(e),
2097
2097
  flatRows: r,
2098
2098
  rowsById: l
2099
2099
  };
2100
2100
  }
2101
- function Fn() {
2101
+ function In() {
2102
2102
  return (e) => C(() => [e.getPreFilteredRowModel(), e.getState().columnFilters, e.getState().globalFilter], (o, t, n) => {
2103
2103
  if (!o.rows.length || !(t != null && t.length) && !n) {
2104
- for (let d = 0; d < o.flatRows.length; d++)
2105
- o.flatRows[d].columnFilters = {}, o.flatRows[d].columnFiltersMeta = {};
2104
+ for (let f = 0; f < o.flatRows.length; f++)
2105
+ o.flatRows[f].columnFilters = {}, o.flatRows[f].columnFiltersMeta = {};
2106
2106
  return o;
2107
2107
  }
2108
2108
  const r = [], l = [];
2109
- (t ?? []).forEach((d) => {
2110
- var s;
2111
- const m = e.getColumn(d.id);
2109
+ (t ?? []).forEach((f) => {
2110
+ var a;
2111
+ const m = e.getColumn(f.id);
2112
2112
  if (!m)
2113
2113
  return;
2114
2114
  const h = m.getFilterFn();
@@ -2117,55 +2117,55 @@ function Fn() {
2117
2117
  return;
2118
2118
  }
2119
2119
  r.push({
2120
- id: d.id,
2120
+ id: f.id,
2121
2121
  filterFn: h,
2122
- resolvedValue: (s = h.resolveFilterValue == null ? void 0 : h.resolveFilterValue(d.value)) != null ? s : d.value
2122
+ resolvedValue: (a = h.resolveFilterValue == null ? void 0 : h.resolveFilterValue(f.value)) != null ? a : f.value
2123
2123
  });
2124
2124
  });
2125
- const i = (t ?? []).map((d) => d.id), a = e.getGlobalFilterFn(), u = e.getAllLeafColumns().filter((d) => d.getCanGlobalFilter());
2126
- n && a && u.length && (i.push("__global__"), u.forEach((d) => {
2127
- var s;
2125
+ const i = (t ?? []).map((f) => f.id), s = e.getGlobalFilterFn(), u = e.getAllLeafColumns().filter((f) => f.getCanGlobalFilter());
2126
+ n && s && u.length && (i.push("__global__"), u.forEach((f) => {
2127
+ var a;
2128
2128
  l.push({
2129
- id: d.id,
2130
- filterFn: a,
2131
- resolvedValue: (s = a.resolveFilterValue == null ? void 0 : a.resolveFilterValue(n)) != null ? s : n
2129
+ id: f.id,
2130
+ filterFn: s,
2131
+ resolvedValue: (a = s.resolveFilterValue == null ? void 0 : s.resolveFilterValue(n)) != null ? a : n
2132
2132
  });
2133
2133
  }));
2134
- let f, c;
2135
- for (let d = 0; d < o.flatRows.length; d++) {
2136
- const s = o.flatRows[d];
2137
- if (s.columnFilters = {}, r.length)
2134
+ let d, p;
2135
+ for (let f = 0; f < o.flatRows.length; f++) {
2136
+ const a = o.flatRows[f];
2137
+ if (a.columnFilters = {}, r.length)
2138
2138
  for (let m = 0; m < r.length; m++) {
2139
- f = r[m];
2140
- const h = f.id;
2141
- s.columnFilters[h] = f.filterFn(s, h, f.resolvedValue, (w) => {
2142
- s.columnFiltersMeta[h] = w;
2139
+ d = r[m];
2140
+ const h = d.id;
2141
+ a.columnFilters[h] = d.filterFn(a, h, d.resolvedValue, (w) => {
2142
+ a.columnFiltersMeta[h] = w;
2143
2143
  });
2144
2144
  }
2145
2145
  if (l.length) {
2146
2146
  for (let m = 0; m < l.length; m++) {
2147
- c = l[m];
2148
- const h = c.id;
2149
- if (c.filterFn(s, h, c.resolvedValue, (w) => {
2150
- s.columnFiltersMeta[h] = w;
2147
+ p = l[m];
2148
+ const h = p.id;
2149
+ if (p.filterFn(a, h, p.resolvedValue, (w) => {
2150
+ a.columnFiltersMeta[h] = w;
2151
2151
  })) {
2152
- s.columnFilters.__global__ = !0;
2152
+ a.columnFilters.__global__ = !0;
2153
2153
  break;
2154
2154
  }
2155
2155
  }
2156
- s.columnFilters.__global__ !== !0 && (s.columnFilters.__global__ = !1);
2156
+ a.columnFilters.__global__ !== !0 && (a.columnFilters.__global__ = !1);
2157
2157
  }
2158
2158
  }
2159
- const p = (d) => {
2160
- for (let s = 0; s < i.length; s++)
2161
- if (d.columnFilters[i[s]] === !1)
2159
+ const c = (f) => {
2160
+ for (let a = 0; a < i.length; a++)
2161
+ if (f.columnFilters[i[a]] === !1)
2162
2162
  return !1;
2163
2163
  return !0;
2164
2164
  };
2165
- return yn(o.rows, p, e);
2165
+ return Fn(o.rows, c, e);
2166
2166
  }, S(e.options, "debugTable", "getFilteredRowModel", () => e._autoResetPageIndex()));
2167
2167
  }
2168
- function $n(e) {
2168
+ function Vn(e) {
2169
2169
  return (o) => C(() => [o.getState().pagination, o.getPrePaginationRowModel(), o.options.paginateExpandedRows ? void 0 : o.getState().expanded], (t, n) => {
2170
2170
  if (!n.rows.length)
2171
2171
  return n;
@@ -2175,71 +2175,71 @@ function $n(e) {
2175
2175
  } = t;
2176
2176
  let {
2177
2177
  rows: i,
2178
- flatRows: a,
2178
+ flatRows: s,
2179
2179
  rowsById: u
2180
2180
  } = n;
2181
- const f = r * l, c = f + r;
2182
- i = i.slice(f, c);
2183
- let p;
2184
- o.options.paginateExpandedRows ? p = {
2181
+ const d = r * l, p = d + r;
2182
+ i = i.slice(d, p);
2183
+ let c;
2184
+ o.options.paginateExpandedRows ? c = {
2185
2185
  rows: i,
2186
- flatRows: a,
2186
+ flatRows: s,
2187
2187
  rowsById: u
2188
- } : p = Rn({
2188
+ } : c = _n({
2189
2189
  rows: i,
2190
- flatRows: a,
2190
+ flatRows: s,
2191
2191
  rowsById: u
2192
- }), p.flatRows = [];
2193
- const d = (s) => {
2194
- p.flatRows.push(s), s.subRows.length && s.subRows.forEach(d);
2192
+ }), c.flatRows = [];
2193
+ const f = (a) => {
2194
+ c.flatRows.push(a), a.subRows.length && a.subRows.forEach(f);
2195
2195
  };
2196
- return p.rows.forEach(d), p;
2196
+ return c.rows.forEach(f), c;
2197
2197
  }, S(o.options, "debugTable", "getPaginationRowModel"));
2198
2198
  }
2199
- function Mn() {
2199
+ function Nn() {
2200
2200
  return (e) => C(() => [e.getState().sorting, e.getPreSortedRowModel()], (o, t) => {
2201
2201
  if (!t.rows.length || !(o != null && o.length))
2202
2202
  return t;
2203
2203
  const n = e.getState().sorting, r = [], l = n.filter((u) => {
2204
- var f;
2205
- return (f = e.getColumn(u.id)) == null ? void 0 : f.getCanSort();
2204
+ var d;
2205
+ return (d = e.getColumn(u.id)) == null ? void 0 : d.getCanSort();
2206
2206
  }), i = {};
2207
2207
  l.forEach((u) => {
2208
- const f = e.getColumn(u.id);
2209
- f && (i[u.id] = {
2210
- sortUndefined: f.columnDef.sortUndefined,
2211
- invertSorting: f.columnDef.invertSorting,
2212
- sortingFn: f.getSortingFn()
2208
+ const d = e.getColumn(u.id);
2209
+ d && (i[u.id] = {
2210
+ sortUndefined: d.columnDef.sortUndefined,
2211
+ invertSorting: d.columnDef.invertSorting,
2212
+ sortingFn: d.getSortingFn()
2213
2213
  });
2214
2214
  });
2215
- const a = (u) => {
2216
- const f = u.map((c) => ({
2217
- ...c
2215
+ const s = (u) => {
2216
+ const d = u.map((p) => ({
2217
+ ...p
2218
2218
  }));
2219
- return f.sort((c, p) => {
2220
- for (let s = 0; s < l.length; s += 1) {
2221
- var d;
2222
- const m = l[s], h = i[m.id], w = h.sortUndefined, R = (d = m == null ? void 0 : m.desc) != null ? d : !1;
2223
- let x = 0;
2219
+ return d.sort((p, c) => {
2220
+ for (let a = 0; a < l.length; a += 1) {
2221
+ var f;
2222
+ const m = l[a], h = i[m.id], w = h.sortUndefined, R = (f = m == null ? void 0 : m.desc) != null ? f : !1;
2223
+ let _ = 0;
2224
2224
  if (w) {
2225
- const F = c.getValue(m.id), E = p.getValue(m.id), M = F === void 0, N = E === void 0;
2226
- if (M || N) {
2227
- if (w === "first") return M ? -1 : 1;
2228
- if (w === "last") return M ? 1 : -1;
2229
- x = M && N ? 0 : M ? w : -w;
2225
+ const $ = p.getValue(m.id), P = c.getValue(m.id), I = $ === void 0, H = P === void 0;
2226
+ if (I || H) {
2227
+ if (w === "first") return I ? -1 : 1;
2228
+ if (w === "last") return I ? 1 : -1;
2229
+ _ = I && H ? 0 : I ? w : -w;
2230
2230
  }
2231
2231
  }
2232
- if (x === 0 && (x = h.sortingFn(c, p, m.id)), x !== 0)
2233
- return R && (x *= -1), h.invertSorting && (x *= -1), x;
2232
+ if (_ === 0 && (_ = h.sortingFn(p, c, m.id)), _ !== 0)
2233
+ return R && (_ *= -1), h.invertSorting && (_ *= -1), _;
2234
2234
  }
2235
- return c.index - p.index;
2236
- }), f.forEach((c) => {
2237
- var p;
2238
- r.push(c), (p = c.subRows) != null && p.length && (c.subRows = a(c.subRows));
2239
- }), f;
2235
+ return p.index - c.index;
2236
+ }), d.forEach((p) => {
2237
+ var c;
2238
+ r.push(p), (c = p.subRows) != null && c.length && (p.subRows = s(p.subRows));
2239
+ }), d;
2240
2240
  };
2241
2241
  return {
2242
- rows: a(t.rows),
2242
+ rows: s(t.rows),
2243
2243
  flatRows: r,
2244
2244
  rowsById: t.rowsById
2245
2245
  };
@@ -2255,22 +2255,22 @@ function Mn() {
2255
2255
  *
2256
2256
  * @license MIT
2257
2257
  */
2258
- function be(e, o) {
2259
- return e ? In(e) ? /* @__PURE__ */ he.createElement(e, o) : e : null;
2258
+ function Be(e, o) {
2259
+ return e ? Pn(e) ? /* @__PURE__ */ he.createElement(e, o) : e : null;
2260
2260
  }
2261
- function In(e) {
2262
- return Vn(e) || typeof e == "function" || Nn(e);
2261
+ function Pn(e) {
2262
+ return Dn(e) || typeof e == "function" || En(e);
2263
2263
  }
2264
- function Vn(e) {
2264
+ function Dn(e) {
2265
2265
  return typeof e == "function" && (() => {
2266
2266
  const o = Object.getPrototypeOf(e);
2267
2267
  return o.prototype && o.prototype.isReactComponent;
2268
2268
  })();
2269
2269
  }
2270
- function Nn(e) {
2270
+ function En(e) {
2271
2271
  return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
2272
2272
  }
2273
- function Pn(e) {
2273
+ function kn(e) {
2274
2274
  const o = {
2275
2275
  state: {},
2276
2276
  // Dummy state
@@ -2280,7 +2280,7 @@ function Pn(e) {
2280
2280
  renderFallbackValue: null,
2281
2281
  ...e
2282
2282
  }, [t] = he.useState(() => ({
2283
- current: Cn(o)
2283
+ current: yn(o)
2284
2284
  })), [n, r] = he.useState(() => t.current.initialState);
2285
2285
  return t.current.setOptions((l) => ({
2286
2286
  ...l,
@@ -2296,7 +2296,7 @@ function Pn(e) {
2296
2296
  }
2297
2297
  })), t.current;
2298
2298
  }
2299
- const Be = ({
2299
+ const Te = ({
2300
2300
  editable: e = !0,
2301
2301
  pageSize: o = 25,
2302
2302
  onCellEdit: t
@@ -2306,44 +2306,44 @@ const Be = ({
2306
2306
  schema: r,
2307
2307
  mappings: l,
2308
2308
  errorsByRow: i,
2309
- editingCell: a,
2309
+ editingCell: s,
2310
2310
  startEditing: u,
2311
- stopEditing: f,
2312
- updateCell: c
2313
- } = X(), [p, d] = K([]), [s, m] = K(""), [h, w] = K(""), R = Ee(() => l.filter((y) => y.targetKey !== null).map((y) => {
2314
- const _ = r == null ? void 0 : r.columns.find((V) => V.key === y.targetKey);
2311
+ stopEditing: d,
2312
+ updateCell: p
2313
+ } = X(), [c, f] = K([]), [a, m] = K(""), [h, w] = K(""), R = ke(() => l.filter((x) => x.targetKey !== null).map((x) => {
2314
+ const y = r == null ? void 0 : r.columns.find((V) => V.key === x.targetKey);
2315
2315
  return {
2316
- sourceColumn: y.sourceColumn,
2317
- targetKey: y.targetKey,
2318
- label: (_ == null ? void 0 : _.label) || y.targetKey,
2319
- type: (_ == null ? void 0 : _.type) || "string"
2316
+ sourceColumn: x.sourceColumn,
2317
+ targetKey: x.targetKey,
2318
+ label: (y == null ? void 0 : y.label) || x.targetKey,
2319
+ type: (y == null ? void 0 : y.type) || "string"
2320
2320
  };
2321
- }), [l, r]), x = xe(
2322
- (y, _) => {
2323
- const V = i.get(y);
2324
- return V == null ? void 0 : V.find((q) => q.columnKey === _);
2321
+ }), [l, r]), _ = xe(
2322
+ (x, y) => {
2323
+ const V = i.get(x);
2324
+ return V == null ? void 0 : V.find((q) => q.columnKey === y);
2325
2325
  },
2326
2326
  [i]
2327
- ), F = (y, _, V) => {
2328
- w(V), u(y, _);
2329
- }, E = () => {
2330
- a && (c(a.rowIndex, a.columnKey, h), t == null || t(a.rowIndex, a.columnKey, h)), f();
2331
- }, M = () => {
2332
- w(""), f();
2333
- }, N = Et(), T = Ee(
2327
+ ), $ = (x, y, V) => {
2328
+ w(V), u(x, y);
2329
+ }, P = () => {
2330
+ s && (p(s.rowIndex, s.columnKey, h), t == null || t(s.rowIndex, s.columnKey, h)), d();
2331
+ }, I = () => {
2332
+ w(""), d();
2333
+ }, H = Ht(), k = ke(
2334
2334
  () => [
2335
- N.accessor("rowIndex", {
2335
+ H.accessor("rowIndex", {
2336
2336
  header: "#",
2337
2337
  size: 60,
2338
- cell: (y) => /* @__PURE__ */ g("span", { className: "ff-font-mono ff-text-xs", style: { color: "var(--ff-text-muted)" }, children: y.getValue() + 1 })
2338
+ cell: (x) => /* @__PURE__ */ g("span", { className: "ff-font-mono ff-text-xs", style: { color: "var(--ff-text-muted)" }, children: x.getValue() + 1 })
2339
2339
  }),
2340
2340
  ...R.map(
2341
- (y) => N.accessor((_) => _.data[y.targetKey] || _.data[y.sourceColumn], {
2342
- id: y.targetKey,
2343
- header: y.label,
2344
- cell: (_) => {
2345
- const V = _.row.original.rowIndex, q = String(_.getValue() ?? ""), k = x(V, y.targetKey);
2346
- return (a == null ? void 0 : a.rowIndex) === V && (a == null ? void 0 : a.columnKey) === y.targetKey ? /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-1", children: [
2341
+ (x) => H.accessor((y) => y.data[x.targetKey] || y.data[x.sourceColumn], {
2342
+ id: x.targetKey,
2343
+ header: x.label,
2344
+ cell: (y) => {
2345
+ const V = y.row.original.rowIndex, q = String(y.getValue() ?? ""), D = _(V, x.targetKey);
2346
+ return (s == null ? void 0 : s.rowIndex) === V && (s == null ? void 0 : s.columnKey) === x.targetKey ? /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-1", children: [
2347
2347
  /* @__PURE__ */ g(
2348
2348
  "input",
2349
2349
  {
@@ -2351,7 +2351,7 @@ const Be = ({
2351
2351
  value: h,
2352
2352
  onChange: (j) => w(j.target.value),
2353
2353
  onKeyDown: (j) => {
2354
- j.key === "Enter" && E(), j.key === "Escape" && M();
2354
+ j.key === "Enter" && P(), j.key === "Escape" && I();
2355
2355
  },
2356
2356
  className: "ff-input ff-py-1 ff-text-sm",
2357
2357
  autoFocus: !0
@@ -2360,7 +2360,7 @@ const Be = ({
2360
2360
  /* @__PURE__ */ g(
2361
2361
  "button",
2362
2362
  {
2363
- onClick: E,
2363
+ onClick: P,
2364
2364
  className: "ff-btn ff-btn-primary ff-btn-sm",
2365
2365
  children: "Save"
2366
2366
  }
@@ -2368,7 +2368,7 @@ const Be = ({
2368
2368
  /* @__PURE__ */ g(
2369
2369
  "button",
2370
2370
  {
2371
- onClick: M,
2371
+ onClick: I,
2372
2372
  className: "ff-btn ff-btn-secondary ff-btn-sm",
2373
2373
  children: "Cancel"
2374
2374
  }
@@ -2376,26 +2376,26 @@ const Be = ({
2376
2376
  ] }) : /* @__PURE__ */ v(
2377
2377
  "div",
2378
2378
  {
2379
- className: b(
2379
+ className: B(
2380
2380
  "ff-group ff-flex ff-items-center ff-gap-2",
2381
- (k == null ? void 0 : k.severity) === "error" && "ff-cell-error",
2382
- (k == null ? void 0 : k.severity) === "warning" && "ff-cell-warning"
2381
+ (D == null ? void 0 : D.severity) === "error" && "ff-cell-error",
2382
+ (D == null ? void 0 : D.severity) === "warning" && "ff-cell-warning"
2383
2383
  ),
2384
2384
  children: [
2385
2385
  /* @__PURE__ */ g("span", { className: "ff-flex-1 ff-truncate", children: q || /* @__PURE__ */ g("span", { style: { color: "var(--ff-text-muted)" }, children: "—" }) }),
2386
- k && /* @__PURE__ */ v("div", { className: "ff-relative ff-group/tooltip", children: [
2387
- k.severity === "error" ? /* @__PURE__ */ g(_e, { className: "ff-w-4 ff-h-4", style: { color: "var(--ff-error)" } }) : /* @__PURE__ */ g(ve, { className: "ff-w-4 ff-h-4", style: { color: "var(--ff-warning)" } }),
2386
+ D && /* @__PURE__ */ v("div", { className: "ff-relative ff-group/tooltip", children: [
2387
+ D.severity === "error" ? /* @__PURE__ */ g(_e, { className: "ff-w-4 ff-h-4", style: { color: "var(--ff-error)" } }) : /* @__PURE__ */ g(ve, { className: "ff-w-4 ff-h-4", style: { color: "var(--ff-warning)" } }),
2388
2388
  /* @__PURE__ */ v("div", { className: "ff-tooltip ff-bottom-full ff-left-1/2 ff-transform ff--translate-x-1/2 ff-mb-2 ff-w-48 group-hover/tooltip:ff-tooltip-visible", children: [
2389
- k.message,
2390
- k.suggestion && /* @__PURE__ */ g("span", { className: "ff-block ff-mt-1", style: { color: "var(--ff-text-muted)" }, children: k.suggestion })
2389
+ D.message,
2390
+ D.suggestion && /* @__PURE__ */ g("span", { className: "ff-block ff-mt-1", style: { color: "var(--ff-text-muted)" }, children: D.suggestion })
2391
2391
  ] })
2392
2392
  ] }),
2393
- e && !k && /* @__PURE__ */ g(
2393
+ e && !D && /* @__PURE__ */ g(
2394
2394
  "button",
2395
2395
  {
2396
- onClick: () => F(V, y.targetKey, q),
2396
+ onClick: () => $(V, x.targetKey, q),
2397
2397
  className: "ff-opacity-0 group-hover:ff-opacity-100 ff-p-1 ff-rounded ff-transition-opacity ff-edit-btn",
2398
- children: /* @__PURE__ */ g(It, { className: "ff-w-3 ff-h-3" })
2398
+ children: /* @__PURE__ */ g(Pt, { className: "ff-w-3 ff-h-3" })
2399
2399
  }
2400
2400
  )
2401
2401
  ]
@@ -2405,20 +2405,20 @@ const Be = ({
2405
2405
  })
2406
2406
  )
2407
2407
  ],
2408
- [R, a, h, e, x, N]
2409
- ), P = Pn({
2408
+ [R, s, h, e, _, H]
2409
+ ), N = kn({
2410
2410
  data: n,
2411
- columns: T,
2411
+ columns: k,
2412
2412
  state: {
2413
- sorting: p,
2414
- globalFilter: s
2413
+ sorting: c,
2414
+ globalFilter: a
2415
2415
  },
2416
- onSortingChange: d,
2416
+ onSortingChange: f,
2417
2417
  onGlobalFilterChange: m,
2418
- getCoreRowModel: Sn(),
2419
- getPaginationRowModel: $n(),
2420
- getSortedRowModel: Mn(),
2421
- getFilteredRowModel: Fn(),
2418
+ getCoreRowModel: xn(),
2419
+ getPaginationRowModel: Vn(),
2420
+ getSortedRowModel: Nn(),
2421
+ getFilteredRowModel: In(),
2422
2422
  initialState: {
2423
2423
  pagination: {
2424
2424
  pageSize: o
@@ -2431,61 +2431,61 @@ const Be = ({
2431
2431
  "input",
2432
2432
  {
2433
2433
  type: "text",
2434
- value: s,
2435
- onChange: (y) => m(y.target.value),
2434
+ value: a,
2435
+ onChange: (x) => m(x.target.value),
2436
2436
  placeholder: "Search all columns...",
2437
2437
  className: "ff-input ff-max-w-xs"
2438
2438
  }
2439
2439
  ),
2440
2440
  /* @__PURE__ */ v("div", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
2441
- P.getFilteredRowModel().rows.length,
2441
+ N.getFilteredRowModel().rows.length,
2442
2442
  " rows"
2443
2443
  ] })
2444
2444
  ] }),
2445
2445
  /* @__PURE__ */ g("div", { className: "ff-table-container ff-max-h-[500px]", children: /* @__PURE__ */ v("table", { className: "ff-table", children: [
2446
- /* @__PURE__ */ g("thead", { children: P.getHeaderGroups().map((y) => /* @__PURE__ */ g("tr", { children: y.headers.map((_) => /* @__PURE__ */ g(
2446
+ /* @__PURE__ */ g("thead", { children: N.getHeaderGroups().map((x) => /* @__PURE__ */ g("tr", { children: x.headers.map((y) => /* @__PURE__ */ g(
2447
2447
  "th",
2448
2448
  {
2449
- style: { width: _.getSize() },
2450
- onClick: _.column.getToggleSortingHandler(),
2451
- className: b(
2452
- _.column.getCanSort() && "ff-cursor-pointer ff-select-none"
2449
+ style: { width: y.getSize() },
2450
+ onClick: y.column.getToggleSortingHandler(),
2451
+ className: B(
2452
+ y.column.getCanSort() && "ff-cursor-pointer ff-select-none"
2453
2453
  ),
2454
2454
  children: /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-1", children: [
2455
- be(_.column.columnDef.header, _.getContext()),
2456
- _.column.getIsSorted() && /* @__PURE__ */ g("span", { children: _.column.getIsSorted() === "asc" ? "↑" : "↓" })
2455
+ Be(y.column.columnDef.header, y.getContext()),
2456
+ y.column.getIsSorted() && /* @__PURE__ */ g("span", { children: y.column.getIsSorted() === "asc" ? "↑" : "↓" })
2457
2457
  ] })
2458
2458
  },
2459
- _.id
2460
- )) }, y.id)) }),
2461
- /* @__PURE__ */ g("tbody", { children: P.getRowModel().rows.map((y) => {
2462
- const _ = i.has(y.original.rowIndex);
2459
+ y.id
2460
+ )) }, x.id)) }),
2461
+ /* @__PURE__ */ g("tbody", { children: N.getRowModel().rows.map((x) => {
2462
+ const y = i.has(x.original.rowIndex);
2463
2463
  return /* @__PURE__ */ g(
2464
2464
  "tr",
2465
2465
  {
2466
- className: b(_ && "ff-row-error"),
2467
- children: y.getVisibleCells().map((V) => /* @__PURE__ */ g("td", { children: be(V.column.columnDef.cell, V.getContext()) }, V.id))
2466
+ className: B(y && "ff-row-error"),
2467
+ children: x.getVisibleCells().map((V) => /* @__PURE__ */ g("td", { children: Be(V.column.columnDef.cell, V.getContext()) }, V.id))
2468
2468
  },
2469
- y.id
2469
+ x.id
2470
2470
  );
2471
2471
  }) })
2472
2472
  ] }) }),
2473
2473
  /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-justify-between ff-px-2", children: [
2474
2474
  /* @__PURE__ */ v("div", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
2475
2475
  "Page ",
2476
- P.getState().pagination.pageIndex + 1,
2476
+ N.getState().pagination.pageIndex + 1,
2477
2477
  " of ",
2478
- P.getPageCount()
2478
+ N.getPageCount()
2479
2479
  ] }),
2480
2480
  /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-2", children: [
2481
2481
  /* @__PURE__ */ v(
2482
2482
  "button",
2483
2483
  {
2484
- onClick: () => P.previousPage(),
2485
- disabled: !P.getCanPreviousPage(),
2484
+ onClick: () => N.previousPage(),
2485
+ disabled: !N.getCanPreviousPage(),
2486
2486
  className: "ff-btn ff-btn-secondary ff-btn-sm",
2487
2487
  children: [
2488
- /* @__PURE__ */ g(ht, { className: "ff-w-4 ff-h-4" }),
2488
+ /* @__PURE__ */ g(Ct, { className: "ff-w-4 ff-h-4" }),
2489
2489
  "Previous"
2490
2490
  ]
2491
2491
  }
@@ -2493,25 +2493,25 @@ const Be = ({
2493
2493
  /* @__PURE__ */ v(
2494
2494
  "button",
2495
2495
  {
2496
- onClick: () => P.nextPage(),
2497
- disabled: !P.getCanNextPage(),
2496
+ onClick: () => N.nextPage(),
2497
+ disabled: !N.getCanNextPage(),
2498
2498
  className: "ff-btn ff-btn-secondary ff-btn-sm",
2499
2499
  children: [
2500
2500
  "Next",
2501
- /* @__PURE__ */ g(at, { className: "ff-w-4 ff-h-4" })
2501
+ /* @__PURE__ */ g(dt, { className: "ff-w-4 ff-h-4" })
2502
2502
  ]
2503
2503
  }
2504
2504
  )
2505
2505
  ] })
2506
2506
  ] })
2507
2507
  ] });
2508
- }, Te = ({
2508
+ }, qe = ({
2509
2509
  showDetails: e = !0
2510
2510
  }) => {
2511
2511
  const { validationResults: o } = X();
2512
2512
  if (!o)
2513
2513
  return null;
2514
- const { isValid: t, totalRows: n, validRows: r, errorCount: l, warningCount: i, infoCount: a, summary: u } = o, f = Math.round(r / n * 100);
2514
+ const { isValid: t, totalRows: n, validRows: r, errorCount: l, warningCount: i, infoCount: s, summary: u } = o, d = Math.round(r / n * 100);
2515
2515
  return /* @__PURE__ */ v("div", { className: "ff-space-y-4", children: [
2516
2516
  /* @__PURE__ */ v(
2517
2517
  "div",
@@ -2522,7 +2522,7 @@ const Be = ({
2522
2522
  borderColor: t ? "var(--ff-success)" : "var(--ff-error)"
2523
2523
  },
2524
2524
  children: [
2525
- t ? /* @__PURE__ */ g(Fe, { className: "ff-w-8 ff-h-8", style: { color: "var(--ff-success)" } }) : /* @__PURE__ */ g(Le, { className: "ff-w-8 ff-h-8", style: { color: "var(--ff-error)" } }),
2525
+ t ? /* @__PURE__ */ g(Fe, { className: "ff-w-8 ff-h-8", style: { color: "var(--ff-success)" } }) : /* @__PURE__ */ g(He, { className: "ff-w-8 ff-h-8", style: { color: "var(--ff-error)" } }),
2526
2526
  /* @__PURE__ */ v("div", { children: [
2527
2527
  /* @__PURE__ */ g(
2528
2528
  "h3",
@@ -2537,7 +2537,7 @@ const Be = ({
2537
2537
  " of ",
2538
2538
  n,
2539
2539
  " rows are valid (",
2540
- f,
2540
+ d,
2541
2541
  "%)"
2542
2542
  ] })
2543
2543
  ] })
@@ -2564,43 +2564,43 @@ const Be = ({
2564
2564
  ] }),
2565
2565
  e && u.byColumn && Object.keys(u.byColumn).length > 0 && /* @__PURE__ */ v("div", { className: "ff-border ff-rounded-lg ff-overflow-hidden", style: { backgroundColor: "var(--ff-bg-primary)", borderColor: "var(--ff-border-light)" }, children: [
2566
2566
  /* @__PURE__ */ g("div", { className: "ff-px-4 ff-py-3 ff-border-b", style: { backgroundColor: "var(--ff-bg-secondary)", borderColor: "var(--ff-border-light)" }, children: /* @__PURE__ */ g("h4", { className: "ff-font-medium", style: { color: "var(--ff-text-secondary)" }, children: "Issues by Column" }) }),
2567
- /* @__PURE__ */ g("div", { className: "ff-divide-y", style: { borderColor: "var(--ff-border-light)" }, children: Object.entries(u.byColumn).filter(([, c]) => c.errorCount > 0 || c.warningCount > 0).map(([c, p]) => /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-justify-between ff-px-4 ff-py-3", children: [
2567
+ /* @__PURE__ */ g("div", { className: "ff-divide-y", style: { borderColor: "var(--ff-border-light)" }, children: Object.entries(u.byColumn).filter(([, p]) => p.errorCount > 0 || p.warningCount > 0).map(([p, c]) => /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-justify-between ff-px-4 ff-py-3", children: [
2568
2568
  /* @__PURE__ */ v("div", { children: [
2569
- /* @__PURE__ */ g("p", { className: "ff-font-medium", style: { color: "var(--ff-text-primary)" }, children: p.columnKey }),
2570
- p.mostCommonError && /* @__PURE__ */ g("p", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: p.mostCommonError })
2569
+ /* @__PURE__ */ g("p", { className: "ff-font-medium", style: { color: "var(--ff-text-primary)" }, children: c.columnKey }),
2570
+ c.mostCommonError && /* @__PURE__ */ g("p", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: c.mostCommonError })
2571
2571
  ] }),
2572
2572
  /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-3", children: [
2573
- p.errorCount > 0 && /* @__PURE__ */ v("span", { className: "ff-badge ff-badge-error", children: [
2574
- /* @__PURE__ */ g(Le, { className: "ff-w-3 ff-h-3 ff-mr-1" }),
2575
- p.errorCount,
2573
+ c.errorCount > 0 && /* @__PURE__ */ v("span", { className: "ff-badge ff-badge-error", children: [
2574
+ /* @__PURE__ */ g(He, { className: "ff-w-3 ff-h-3 ff-mr-1" }),
2575
+ c.errorCount,
2576
2576
  " errors"
2577
2577
  ] }),
2578
- p.warningCount > 0 && /* @__PURE__ */ v("span", { className: "ff-badge ff-badge-warning", children: [
2578
+ c.warningCount > 0 && /* @__PURE__ */ v("span", { className: "ff-badge ff-badge-warning", children: [
2579
2579
  /* @__PURE__ */ g(ve, { className: "ff-w-3 ff-h-3 ff-mr-1" }),
2580
- p.warningCount,
2580
+ c.warningCount,
2581
2581
  " warnings"
2582
2582
  ] })
2583
2583
  ] })
2584
- ] }, c)) })
2584
+ ] }, p)) })
2585
2585
  ] }),
2586
2586
  e && u.duplicates && u.duplicates.length > 0 && /* @__PURE__ */ g("div", { className: "ff-border ff-rounded-lg ff-p-4", style: { backgroundColor: "var(--ff-warning-light)", borderColor: "var(--ff-warning)" }, children: /* @__PURE__ */ v("div", { className: "ff-flex ff-items-start ff-gap-3", children: [
2587
2587
  /* @__PURE__ */ g(ve, { className: "ff-w-5 ff-h-5 ff-flex-shrink-0 ff-mt-0.5", style: { color: "var(--ff-warning)" } }),
2588
2588
  /* @__PURE__ */ v("div", { children: [
2589
2589
  /* @__PURE__ */ g("h4", { className: "ff-font-medium", style: { color: "var(--ff-warning-dark)" }, children: "Duplicate Values Found" }),
2590
2590
  /* @__PURE__ */ v("ul", { className: "ff-mt-2 ff-space-y-1 ff-text-sm", style: { color: "var(--ff-warning-dark)" }, children: [
2591
- u.duplicates.slice(0, 5).map((c, p) => /* @__PURE__ */ v("li", { children: [
2592
- /* @__PURE__ */ g("span", { className: "ff-font-mono", children: c.columnKey }),
2591
+ u.duplicates.slice(0, 5).map((p, c) => /* @__PURE__ */ v("li", { children: [
2592
+ /* @__PURE__ */ g("span", { className: "ff-font-mono", children: p.columnKey }),
2593
2593
  ': "',
2594
- String(c.value),
2594
+ String(p.value),
2595
2595
  '" appears',
2596
2596
  " ",
2597
- c.rowIndices.length,
2597
+ p.rowIndices.length,
2598
2598
  " times (rows",
2599
2599
  " ",
2600
- c.rowIndices.slice(0, 3).map((d) => d + 1).join(", "),
2601
- c.rowIndices.length > 3 ? "..." : "",
2600
+ p.rowIndices.slice(0, 3).map((f) => f + 1).join(", "),
2601
+ p.rowIndices.length > 3 ? "..." : "",
2602
2602
  ")"
2603
- ] }, p)),
2603
+ ] }, c)),
2604
2604
  u.duplicates.length > 5 && /* @__PURE__ */ v("li", { style: { color: "var(--ff-warning)" }, children: [
2605
2605
  "... and ",
2606
2606
  u.duplicates.length - 5,
@@ -2610,220 +2610,221 @@ const Be = ({
2610
2610
  ] })
2611
2611
  ] }) })
2612
2612
  ] });
2613
- }, me = ["upload", "mapping", "validation", "complete"], Dn = [
2614
- { key: "upload", label: "Upload", icon: qe },
2615
- { key: "mapping", label: "Map Columns", icon: $t },
2616
- { key: "validation", label: "Validate", icon: Nt },
2617
- { key: "review", label: "Review", icon: St },
2613
+ }, me = ["upload", "mapping", "validation", "complete"], Ln = [
2614
+ { key: "upload", label: "Upload", icon: je },
2615
+ { key: "mapping", label: "Map Columns", icon: Vt },
2616
+ { key: "validation", label: "Validate", icon: Et },
2617
+ { key: "review", label: "Review", icon: xt },
2618
2618
  { key: "complete", label: "Complete", icon: Fe }
2619
- ], Hn = ({
2619
+ ], On = ({
2620
2620
  template: e,
2621
2621
  schema: o,
2622
- onComplete: t,
2623
- onCancel: n,
2624
- onError: r
2622
+ mode: t = "modal",
2623
+ theme: n,
2624
+ onComplete: r,
2625
+ onCancel: l,
2626
+ onError: i
2625
2627
  }) => {
2626
2628
  const {
2627
- step: l,
2628
- sessionId: i,
2629
- file: a,
2630
- mappings: u,
2631
- validationResults: f,
2632
- isLoading: c,
2633
- error: p,
2634
- setSchema: d,
2635
- setSessionId: s,
2636
- setParsedData: m,
2637
- setMappings: h,
2638
- setUnmapped: w,
2639
- setValidationResults: R,
2640
- setStep: x,
2641
- nextStep: F,
2642
- previousStep: E,
2643
- setLoading: M,
2629
+ step: s,
2630
+ sessionId: u,
2631
+ file: d,
2632
+ mappings: p,
2633
+ validationResults: c,
2634
+ isLoading: f,
2635
+ error: a,
2636
+ setSchema: m,
2637
+ setSessionId: h,
2638
+ setParsedData: w,
2639
+ setMappings: R,
2640
+ setUnmapped: _,
2641
+ setValidationResults: $,
2642
+ setStep: P,
2643
+ nextStep: I,
2644
+ previousStep: H,
2645
+ setLoading: k,
2644
2646
  setError: N,
2645
- reset: T
2646
- } = X(), [P, y] = K(null), [_, V] = K(null);
2647
- ke(() => {
2648
- if (V(null), e)
2649
- if (ut(e)) {
2650
- const $ = ft(e);
2651
- $ ? y($) : (V(`Failed to load template "${e}"`), r == null || r(new Error(`Failed to load template "${e}"`)));
2647
+ reset: x
2648
+ } = X(), [y, V] = K(null), [q, D] = K(null);
2649
+ Le(() => {
2650
+ if (D(null), e)
2651
+ if (gt(e)) {
2652
+ const F = ct(e);
2653
+ F ? V(F) : (D(`Failed to load template "${e}"`), i == null || i(new Error(`Failed to load template "${e}"`)));
2652
2654
  } else {
2653
- const $ = `Template "${e}" not found. Available templates: ${He.join(", ")}`;
2654
- V($), r == null || r(new Error($));
2655
+ const F = `Template "${e}" not found. Available templates: ${ze.join(", ")}`;
2656
+ D(F), i == null || i(new Error(F));
2655
2657
  }
2656
2658
  else if (o)
2657
- y(o);
2659
+ V(o);
2658
2660
  else {
2659
- const $ = `No template or schema provided. Please specify a template (${He.join(", ")}) or provide a custom schema.`;
2660
- V($), r == null || r(new Error($));
2661
+ const F = `No template or schema provided. Please specify a template (${ze.join(", ")}) or provide a custom schema.`;
2662
+ D(F), i == null || i(new Error(F));
2661
2663
  }
2662
- }, [e, o, r]), ke(() => {
2663
- P && (d(P), q(P));
2664
- }, [P]);
2665
- const q = async ($) => {
2664
+ }, [e, o, i]), Le(() => {
2665
+ y && (m(y), Ne(y));
2666
+ }, [y]);
2667
+ const Ne = async (F) => {
2666
2668
  try {
2667
- M(!0);
2668
- const z = await Q().createImportSession($);
2669
- s(z.sessionId);
2670
- } catch (I) {
2671
- const z = I;
2672
- N(z.message), r == null || r(z);
2669
+ k(!0);
2670
+ const A = await Q().createImportSession(F);
2671
+ h(A.sessionId);
2672
+ } catch (M) {
2673
+ const A = M;
2674
+ N(A.message), i == null || i(A);
2673
2675
  } finally {
2674
- M(!1);
2676
+ k(!1);
2675
2677
  }
2676
- }, k = xe(async ($) => {
2677
- if (i)
2678
+ }, j = xe(async (F) => {
2679
+ if (u)
2678
2680
  try {
2679
- M(!0), N(null);
2680
- const z = await Q().uploadFile(i, $), De = (U, rt) => ({
2681
- rowIndex: U.rowIndex ?? rt,
2681
+ k(!0), N(null);
2682
+ const A = await Q().uploadFile(u, F), Ee = (U, st) => ({
2683
+ rowIndex: U.rowIndex ?? st,
2682
2684
  data: U.data ?? U,
2683
2685
  rawData: U.rawData ?? Object.values(U.data ?? U)
2684
2686
  });
2685
- m({
2686
- headers: z.data.headers,
2687
- rows: z.data.sampleRows.map(De),
2688
- totalRows: z.data.totalRows,
2689
- sampleRows: z.data.sampleRows.map(De)
2690
- }), F(), await Ne();
2691
- } catch (I) {
2692
- N(`Failed to process the uploaded file: ${I.message}`);
2687
+ w({
2688
+ headers: A.data.headers,
2689
+ rows: A.data.sampleRows.map(Ee),
2690
+ totalRows: A.data.totalRows,
2691
+ sampleRows: A.data.sampleRows.map(Ee)
2692
+ }), I(), await tt();
2693
+ } catch (M) {
2694
+ N(`Failed to process the uploaded file: ${M.message}`);
2693
2695
  } finally {
2694
- M(!1);
2696
+ k(!1);
2695
2697
  }
2696
- }, [i]), Ne = async () => {
2697
- if (i)
2698
+ }, [u]), tt = async () => {
2699
+ if (u)
2698
2700
  try {
2699
- M(!0);
2700
- const I = await Q().matchColumns(i);
2701
- h(I.mappings), w(I.unmappedSource, I.unmappedTarget);
2702
- } catch ($) {
2703
- N(`Column matching failed: ${$.message}`);
2701
+ k(!0);
2702
+ const M = await Q().matchColumns(u);
2703
+ R(M.mappings), _(M.unmappedSource, M.unmappedTarget);
2704
+ } catch (F) {
2705
+ N(`Column matching failed: ${F.message}`);
2704
2706
  } finally {
2705
- M(!1);
2707
+ k(!1);
2706
2708
  }
2707
- }, j = async () => {
2708
- if (i)
2709
+ }, nt = async () => {
2710
+ if (u)
2709
2711
  try {
2710
- M(!0), N(null);
2711
- const I = await Q().validateImport(i);
2712
- R(I.validation), F();
2713
- } catch ($) {
2714
- N(`Validation failed: ${$.message}`);
2712
+ k(!0), N(null);
2713
+ const M = await Q().validateImport(u);
2714
+ $(M.validation), I();
2715
+ } catch (F) {
2716
+ N(`Validation failed: ${F.message}`);
2715
2717
  } finally {
2716
- M(!1);
2718
+ k(!1);
2717
2719
  }
2718
- }, [Pe, re] = K(null), et = async () => {
2719
- if (i)
2720
+ }, [Pe, le] = K(null), ot = async () => {
2721
+ if (u)
2720
2722
  try {
2721
- M(!0), N(null), re(null);
2722
- const I = await Q().completeImport(i, {
2723
+ k(!0), N(null), le(null);
2724
+ const M = await Q().completeImport(u, {
2723
2725
  skipInvalidRows: !0,
2724
2726
  acknowledgeWarnings: !0
2725
2727
  });
2726
- x("complete"), t == null || t(I);
2727
- } catch ($) {
2728
- re($.message), x("complete");
2728
+ P("complete"), r == null || r(M);
2729
+ } catch (F) {
2730
+ le(F.message), P("complete");
2729
2731
  } finally {
2730
- M(!1);
2732
+ k(!1);
2731
2733
  }
2732
- }, le = () => {
2733
- T(), n == null || n();
2734
- }, tt = () => Dn.findIndex(($) => $.key === l), nt = () => {
2735
- switch (l) {
2734
+ }, ie = () => {
2735
+ x(), l == null || l();
2736
+ }, rt = () => Ln.findIndex((F) => F.key === s), lt = () => {
2737
+ switch (s) {
2736
2738
  case "upload":
2737
- return a !== null;
2739
+ return d !== null;
2738
2740
  case "mapping":
2739
- return u.length > 0 && u.some(($) => $.targetKey !== null);
2741
+ return p.length > 0 && p.some((F) => F.targetKey !== null);
2740
2742
  case "validation":
2741
- return f !== null;
2743
+ return c !== null;
2742
2744
  case "review":
2743
- return f !== null && (f.isValid || f.errorCount === 0);
2745
+ return c !== null && (c.isValid || c.errorCount === 0);
2744
2746
  default:
2745
2747
  return !1;
2746
2748
  }
2747
- }, ot = async () => {
2748
- switch (l) {
2749
+ }, it = async () => {
2750
+ switch (s) {
2749
2751
  case "mapping":
2750
- await j();
2752
+ await nt();
2751
2753
  break;
2752
2754
  case "validation":
2753
- F();
2755
+ I();
2754
2756
  break;
2755
2757
  case "review":
2756
- await et();
2758
+ await ot();
2757
2759
  break;
2758
2760
  default:
2759
- F();
2761
+ I();
2760
2762
  }
2761
2763
  };
2762
- if (_)
2763
- return /* @__PURE__ */ g(se, { children: /* @__PURE__ */ g("div", { className: "ff-container ff-bg-white ff-rounded-xl ff-shadow-xl ff-overflow-hidden ff-p-6", children: /* @__PURE__ */ v("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: [
2764
- /* @__PURE__ */ g("div", { className: "ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", style: { backgroundColor: "var(--ff-error-light)" }, children: /* @__PURE__ */ g(ne, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-error)" } }) }),
2764
+ if (q)
2765
+ return /* @__PURE__ */ g(se, { theme: n, children: /* @__PURE__ */ g("div", { className: "ff-container ff-bg-white ff-rounded-xl ff-shadow-xl ff-overflow-hidden ff-p-6", children: /* @__PURE__ */ v("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: [
2766
+ /* @__PURE__ */ g("div", { className: "ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", style: { backgroundColor: "var(--ff-error-light)" }, children: /* @__PURE__ */ g(oe, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-error)" } }) }),
2765
2767
  /* @__PURE__ */ g("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Configuration Error" }),
2766
- /* @__PURE__ */ g("p", { className: "ff-text-center ff-max-w-md ff-mb-4", style: { color: "var(--ff-text-muted)" }, children: _ }),
2767
- n && /* @__PURE__ */ g("button", { onClick: le, className: "ff-btn ff-btn-secondary", children: "Close" })
2768
+ /* @__PURE__ */ g("p", { className: "ff-text-center ff-max-w-md ff-mb-4", style: { color: "var(--ff-text-muted)" }, children: q }),
2769
+ l && /* @__PURE__ */ g("button", { onClick: ie, className: "ff-btn ff-btn-secondary", children: "Close" })
2768
2770
  ] }) }) });
2769
- if (!P)
2770
- return /* @__PURE__ */ g(se, { children: /* @__PURE__ */ g("div", { className: "ff-container ff-bg-white ff-rounded-xl ff-shadow-xl ff-overflow-hidden ff-p-6", children: /* @__PURE__ */ v("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: [
2771
- /* @__PURE__ */ g(ze, { className: "ff-w-10 ff-h-10 ff-animate-spin ff-mb-4", style: { color: "var(--ff-primary-90)" } }),
2771
+ if (!y)
2772
+ return /* @__PURE__ */ g(se, { theme: n, children: /* @__PURE__ */ g("div", { className: "ff-container ff-bg-white ff-rounded-xl ff-shadow-xl ff-overflow-hidden ff-p-6", children: /* @__PURE__ */ v("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: [
2773
+ /* @__PURE__ */ g(Ae, { className: "ff-w-10 ff-h-10 ff-animate-spin ff-mb-4", style: { color: "var(--ff-primary-90)" } }),
2772
2774
  /* @__PURE__ */ g("p", { style: { color: "var(--ff-text-muted)" }, children: "Loading template..." })
2773
2775
  ] }) }) });
2774
2776
  const W = () => {
2775
- const $ = l === "review" ? "validation" : l;
2776
- return me.indexOf($);
2777
- };
2778
- return /* @__PURE__ */ g(se, { children: /* @__PURE__ */ v("div", { className: "ff-container ff-modal", children: [
2777
+ const F = s === "review" ? "validation" : s;
2778
+ return me.indexOf(F);
2779
+ }, De = /* @__PURE__ */ g(Z, { children: /* @__PURE__ */ v("div", { className: t === "embed" ? "ff-container ff-embed" : "ff-container ff-modal", children: [
2779
2780
  /* @__PURE__ */ v("div", { className: "ff-modal-header", children: [
2780
2781
  /* @__PURE__ */ v("div", { className: "ff-modal-header-left", children: [
2781
2782
  /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-3", children: [
2782
- /* @__PURE__ */ g("div", { className: "ff-modal-icon", children: /* @__PURE__ */ g(yt, {}) }),
2783
+ /* @__PURE__ */ g("div", { className: "ff-modal-icon", children: /* @__PURE__ */ g(Ft, {}) }),
2783
2784
  /* @__PURE__ */ g("h2", { className: "ff-modal-title", children: "Import Data" })
2784
2785
  ] }),
2785
- /* @__PURE__ */ g("div", { className: "ff-steps ff-ml-4", children: me.map(($, I) => /* @__PURE__ */ v(lt.Fragment, { children: [
2786
+ /* @__PURE__ */ g("div", { className: "ff-steps ff-ml-4", children: me.map((F, M) => /* @__PURE__ */ v(at.Fragment, { children: [
2786
2787
  /* @__PURE__ */ g(
2787
2788
  "div",
2788
2789
  {
2789
- className: b(
2790
+ className: B(
2790
2791
  "ff-step",
2791
- W() === I && "ff-step-active",
2792
- W() > I && "ff-step-complete",
2793
- W() < I && "ff-step-pending"
2792
+ W() === M && "ff-step-active",
2793
+ W() > M && "ff-step-complete",
2794
+ W() < M && "ff-step-pending"
2794
2795
  ),
2795
- children: W() > I ? "✓" : I + 1
2796
+ children: W() > M ? "✓" : M + 1
2796
2797
  }
2797
2798
  ),
2798
- I < me.length - 1 && /* @__PURE__ */ g("div", { className: b(
2799
+ M < me.length - 1 && /* @__PURE__ */ g("div", { className: B(
2799
2800
  "ff-step-connector",
2800
- W() > I && "ff-step-connector-complete"
2801
+ W() > M && "ff-step-connector-complete"
2801
2802
  ) })
2802
- ] }, $)) })
2803
+ ] }, F)) })
2803
2804
  ] }),
2804
2805
  /* @__PURE__ */ g(
2805
2806
  "button",
2806
2807
  {
2807
- onClick: le,
2808
+ onClick: ie,
2808
2809
  className: "ff-modal-close",
2809
- children: /* @__PURE__ */ g(ne, { className: "ff-w-5 ff-h-5" })
2810
+ children: /* @__PURE__ */ g(oe, { className: "ff-w-5 ff-h-5" })
2810
2811
  }
2811
2812
  )
2812
2813
  ] }),
2813
2814
  /* @__PURE__ */ v("div", { className: "ff-modal-body", children: [
2814
- p && /* @__PURE__ */ g("div", { className: "ff-mb-4 ff-p-4 ff-border ff-rounded-lg ff-text-sm", style: { backgroundColor: "var(--ff-error-light)", borderColor: "var(--ff-error)", color: "var(--ff-error)" }, children: p }),
2815
- l === "upload" && /* @__PURE__ */ g("div", { className: "ff-py-4", children: /* @__PURE__ */ g("div", { className: "ff-max-w-xl ff-mx-auto", children: /* @__PURE__ */ g(Pt, { onFileSelect: k }) }) }),
2816
- l === "mapping" && /* @__PURE__ */ g(Dt, {}),
2817
- l === "validation" && /* @__PURE__ */ v("div", { className: "ff-space-y-6", children: [
2818
- /* @__PURE__ */ g(Te, {}),
2819
- /* @__PURE__ */ g(Be, { editable: !0 })
2815
+ a && /* @__PURE__ */ g("div", { className: "ff-mb-4 ff-p-4 ff-border ff-rounded-lg ff-text-sm", style: { backgroundColor: "var(--ff-error-light)", borderColor: "var(--ff-error)", color: "var(--ff-error)" }, children: a }),
2816
+ s === "upload" && /* @__PURE__ */ g("div", { className: "ff-py-4", children: /* @__PURE__ */ g("div", { className: "ff-max-w-xl ff-mx-auto", children: /* @__PURE__ */ g(kt, { onFileSelect: j }) }) }),
2817
+ s === "mapping" && /* @__PURE__ */ g(Lt, {}),
2818
+ s === "validation" && /* @__PURE__ */ v("div", { className: "ff-space-y-6", children: [
2819
+ /* @__PURE__ */ g(qe, {}),
2820
+ /* @__PURE__ */ g(Te, { editable: !0 })
2820
2821
  ] }),
2821
- l === "review" && /* @__PURE__ */ v("div", { className: "ff-space-y-6", children: [
2822
- /* @__PURE__ */ g(Te, { showDetails: !1 }),
2823
- /* @__PURE__ */ g(Be, { editable: !1, pageSize: 10 })
2822
+ s === "review" && /* @__PURE__ */ v("div", { className: "ff-space-y-6", children: [
2823
+ /* @__PURE__ */ g(qe, { showDetails: !1 }),
2824
+ /* @__PURE__ */ g(Te, { editable: !1, pageSize: 10 })
2824
2825
  ] }),
2825
- l === "complete" && /* @__PURE__ */ g("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-12", children: Pe ? /* @__PURE__ */ v(ie, { children: [
2826
- /* @__PURE__ */ g("div", { className: "ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", style: { backgroundColor: "var(--ff-error-light)" }, children: /* @__PURE__ */ g(ne, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-error)" } }) }),
2826
+ s === "complete" && /* @__PURE__ */ g("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-12", children: Pe ? /* @__PURE__ */ v(Z, { children: [
2827
+ /* @__PURE__ */ g("div", { className: "ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", style: { backgroundColor: "var(--ff-error-light)" }, children: /* @__PURE__ */ g(oe, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-error)" } }) }),
2827
2828
  /* @__PURE__ */ g("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Import Failed" }),
2828
2829
  /* @__PURE__ */ g("p", { className: "ff-text-center ff-max-w-md ff-mb-4", style: { color: "var(--ff-text-muted)" }, children: Pe }),
2829
2830
  /* @__PURE__ */ v("div", { className: "ff-flex ff-gap-3", children: [
@@ -2831,26 +2832,26 @@ const Be = ({
2831
2832
  "button",
2832
2833
  {
2833
2834
  onClick: () => {
2834
- re(null), x("review");
2835
+ le(null), P("review");
2835
2836
  },
2836
2837
  className: "ff-btn ff-btn-secondary",
2837
2838
  children: "Back to Review"
2838
2839
  }
2839
2840
  ),
2840
- n && /* @__PURE__ */ g("button", { onClick: le, className: "ff-btn ff-btn-secondary", children: "Close" })
2841
+ l && /* @__PURE__ */ g("button", { onClick: ie, className: "ff-btn ff-btn-secondary", children: "Close" })
2841
2842
  ] })
2842
- ] }) : /* @__PURE__ */ v(ie, { children: [
2843
+ ] }) : /* @__PURE__ */ v(Z, { children: [
2843
2844
  /* @__PURE__ */ g("div", { className: "ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", style: { backgroundColor: "var(--ff-success-light)" }, children: /* @__PURE__ */ g(Fe, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-success)" } }) }),
2844
2845
  /* @__PURE__ */ g("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Import Complete!" }),
2845
2846
  /* @__PURE__ */ g("p", { style: { color: "var(--ff-text-muted)" }, children: "Your data has been successfully imported." })
2846
2847
  ] }) })
2847
2848
  ] }),
2848
- l !== "complete" && /* @__PURE__ */ v("div", { className: "ff-modal-footer", children: [
2849
+ s !== "complete" && /* @__PURE__ */ v("div", { className: "ff-modal-footer", children: [
2849
2850
  /* @__PURE__ */ g(
2850
2851
  "button",
2851
2852
  {
2852
- onClick: E,
2853
- disabled: tt() === 0 || c,
2853
+ onClick: H,
2854
+ disabled: rt() === 0 || f,
2854
2855
  className: "ff-btn ff-btn-secondary",
2855
2856
  children: "Back"
2856
2857
  }
@@ -2858,24 +2859,25 @@ const Be = ({
2858
2859
  /* @__PURE__ */ g(
2859
2860
  "button",
2860
2861
  {
2861
- onClick: ot,
2862
- disabled: !nt() || c,
2862
+ onClick: it,
2863
+ disabled: !lt() || f,
2863
2864
  className: "ff-btn ff-btn-primary",
2864
- children: c ? /* @__PURE__ */ v(ie, { children: [
2865
- /* @__PURE__ */ g(ze, { className: "ff-w-4 ff-h-4 ff-animate-spin" }),
2865
+ children: f ? /* @__PURE__ */ v(Z, { children: [
2866
+ /* @__PURE__ */ g(Ae, { className: "ff-w-4 ff-h-4 ff-animate-spin" }),
2866
2867
  "Processing..."
2867
- ] }) : l === "review" ? "Complete Import" : "Continue"
2868
+ ] }) : s === "review" ? "Complete Import" : "Continue"
2868
2869
  }
2869
2870
  )
2870
2871
  ] })
2871
2872
  ] }) });
2873
+ return /* @__PURE__ */ g(se, { theme: n, children: t === "modal" ? /* @__PURE__ */ g("div", { className: "ff-overlay", children: De }) : De });
2872
2874
  };
2873
2875
  export {
2874
- Dt as C,
2875
- Be as D,
2876
- Pt as F,
2877
- Hn as I,
2878
- Te as V,
2876
+ Lt as C,
2877
+ Te as D,
2878
+ kt as F,
2879
+ On as I,
2880
+ qe as V,
2879
2881
  X as u
2880
2882
  };
2881
- //# sourceMappingURL=ImportWizard-B69XBxtG.mjs.map
2883
+ //# sourceMappingURL=ImportWizard-BEdcnr4Q.mjs.map