chordia-ui 4.0.7 → 4.0.8

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,25 +1,25 @@
1
- import { jsxs as m, jsx as s, Fragment as Fe } from "react/jsx-runtime";
2
- import ht, { useState as g, useRef as U, useEffect as I, Suspense as cn, useMemo as ge, useCallback as P, useLayoutEffect as dn } from "react";
3
- import { u as un, a as At, D as fn, c as pn, S as mn, h as hn, b as gn, s as yn, K as xn, P as bn, d as gt, e as vn, C as Sn } from "./sortable.esm.es.js";
4
- import { CalendarClock as Ot, Download as wn, ChevronDown as Fn, Settings2 as kn, X as Dn, GripVertical as yt, Search as Cn, Check as st, ArrowUp as Rn, ArrowDown as zn, ArrowUpDown as En, ListFilter as Mn } from "lucide-react";
5
- import { createPortal as vt } from "react-dom";
6
- import { C as Bn, P as Nn } from "./CustomFilterChips.es.js";
1
+ import { jsxs as p, jsx as o, Fragment as Re } from "react/jsx-runtime";
2
+ import St, { useState as y, useRef as U, useEffect as H, Suspense as Fn, useMemo as te, useCallback as A, useLayoutEffect as kn } from "react";
3
+ import { u as Dn, a as Kt, D as Cn, c as Rn, S as zn, h as Bn, b as En, s as Mn, K as Nn, P as An, d as wt, e as Wn, C as On } from "./sortable.esm.es.js";
4
+ import { CalendarClock as Ut, Download as Tn, ChevronDown as Ln, Settings2 as $n, X as Pn, GripVertical as Ft, Search as In, Check as Ye, Minus as jn, ArrowUp as _n, ArrowDown as Hn, ArrowUpDown as Kn, ListFilter as Un } from "lucide-react";
5
+ import { createPortal as Ct } from "react-dom";
6
+ import { C as Xn, P as Gn } from "./CustomFilterChips.es.js";
7
7
  import "motion/react";
8
8
  import "recharts";
9
9
  import "./AgentLiftAnalysisCard.es.js";
10
10
  import "./TourGuideTooltip.es.js";
11
- function Wn({
12
- dateRangePicker: n,
11
+ function Jn({
12
+ dateRangePicker: r,
13
13
  onWeekToDate: l,
14
14
  exportConfig: d,
15
15
  filterChipsConfig: f,
16
16
  trailingActions: S
17
17
  // Optional extra actions rendered after Export (e.g., Add Users button)
18
18
  }) {
19
- const [v, a] = g(!1), b = U(null), B = U(null);
20
- I(() => {
19
+ const [v, a] = y(!1), b = U(null), W = U(null);
20
+ H(() => {
21
21
  const D = (w) => {
22
- B.current && !B.current.contains(w.target) && b.current && !b.current.contains(w.target) && a(!1);
22
+ W.current && !W.current.contains(w.target) && b.current && !b.current.contains(w.target) && a(!1);
23
23
  };
24
24
  if (v)
25
25
  return document.addEventListener("mousedown", D), () => {
@@ -30,37 +30,37 @@ function Wn({
30
30
  a((D) => !D);
31
31
  }, C = (D) => {
32
32
  a(!1), d != null && d.onExport && d.onExport(D);
33
- }, L = (() => {
33
+ }, j = (() => {
34
34
  if (!(f != null && f.filters))
35
35
  return !1;
36
- const D = f.filters, w = f.customFilters || [], N = Object.entries(D).some(([E, M]) => !!(Array.isArray(M) && M.length || typeof M == "string" && M.trim() !== "" || M && typeof M == "object" && (M.min != null || M.max != null))), H = w.some((E) => E.active);
37
- return N || H;
36
+ const D = f.filters, w = f.customFilters || [], O = Object.entries(D).some(([B, E]) => !!(Array.isArray(E) && E.length || typeof E == "string" && E.trim() !== "" || E && typeof E == "object" && (E.min != null || E.max != null))), T = w.some((B) => B.active);
37
+ return O || T;
38
38
  })();
39
- return /* @__PURE__ */ m("div", { className: "flex items-center gap-3 flex-wrap", children: [
40
- l && /* @__PURE__ */ m(
39
+ return /* @__PURE__ */ p("div", { className: "flex items-center gap-3 flex-wrap", children: [
40
+ l && /* @__PURE__ */ p(
41
41
  "button",
42
42
  {
43
43
  onClick: l,
44
44
  className: "inline-flex items-center gap-2 rounded-lg border border-gray-300 bg-white/80 px-4 py-2.5 transition-colors hover:bg-white text-sm font-medium text-gray-900",
45
45
  style: { fontFamily: "var(--font-sans)" },
46
46
  children: [
47
- /* @__PURE__ */ s(Ot, { size: 16 }),
48
- /* @__PURE__ */ s("span", { children: "Week to Date" })
47
+ /* @__PURE__ */ o(Ut, { size: 16 }),
48
+ /* @__PURE__ */ o("span", { children: "Week to Date" })
49
49
  ]
50
50
  }
51
51
  ),
52
- n && /* @__PURE__ */ s(
53
- cn,
52
+ r && /* @__PURE__ */ o(
53
+ Fn,
54
54
  {
55
- fallback: /* @__PURE__ */ m("div", { className: "inline-flex items-center gap-2 rounded-lg border border-gray-300 bg-white/80 px-4 py-2.5 text-sm font-medium text-gray-400", children: [
56
- /* @__PURE__ */ s(Ot, { size: 16 }),
57
- /* @__PURE__ */ s("span", { children: "Loading..." })
55
+ fallback: /* @__PURE__ */ p("div", { className: "inline-flex items-center gap-2 rounded-lg border border-gray-300 bg-white/80 px-4 py-2.5 text-sm font-medium text-gray-400", children: [
56
+ /* @__PURE__ */ o(Ut, { size: 16 }),
57
+ /* @__PURE__ */ o("span", { children: "Loading..." })
58
58
  ] }),
59
- children: n
59
+ children: r
60
60
  }
61
61
  ),
62
- d && /* @__PURE__ */ m("div", { className: "relative", children: [
63
- /* @__PURE__ */ m(
62
+ d && /* @__PURE__ */ p("div", { className: "relative", children: [
63
+ /* @__PURE__ */ p(
64
64
  "button",
65
65
  {
66
66
  ref: b,
@@ -69,20 +69,20 @@ function Wn({
69
69
  className: "inline-flex items-center justify-between gap-2 rounded-lg border border-gray-300 bg-white/80 px-4 py-2.5 transition-colors hover:bg-white text-sm font-medium text-gray-900 disabled:opacity-50 disabled:cursor-not-allowed min-w-[120px]",
70
70
  style: { fontFamily: "var(--font-sans)" },
71
71
  children: [
72
- /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
73
- /* @__PURE__ */ s(wn, { size: 16 }),
74
- /* @__PURE__ */ s("span", { children: d.isExporting ? "Exporting..." : "Export" })
72
+ /* @__PURE__ */ p("div", { className: "flex items-center gap-2", children: [
73
+ /* @__PURE__ */ o(Tn, { size: 16 }),
74
+ /* @__PURE__ */ o("span", { children: d.isExporting ? "Exporting..." : "Export" })
75
75
  ] }),
76
- /* @__PURE__ */ s(Fn, { size: 16 })
76
+ /* @__PURE__ */ o(Ln, { size: 16 })
77
77
  ]
78
78
  }
79
79
  ),
80
- v && /* @__PURE__ */ s(
80
+ v && /* @__PURE__ */ o(
81
81
  "div",
82
82
  {
83
- ref: B,
83
+ ref: W,
84
84
  className: "absolute top-full right-0 mt-2 bg-white rounded-lg shadow-lg border border-gray-200 py-1 z-50 min-w-[120px]",
85
- children: (d.types || ["csv"]).map((D) => /* @__PURE__ */ m(
85
+ children: (d.types || ["csv"]).map((D) => /* @__PURE__ */ p(
86
86
  "button",
87
87
  {
88
88
  onClick: () => C(D),
@@ -98,11 +98,11 @@ function Wn({
98
98
  }
99
99
  )
100
100
  ] }),
101
- (L || S) && /* @__PURE__ */ m(Fe, { children: [
102
- L && /* @__PURE__ */ s("div", { className: "h-9 mt-1 w-px bg-gray-300 flex-shrink-0" }),
103
- /* @__PURE__ */ m("div", { className: "flex items-center gap-3 justify-end", children: [
104
- L && f && /* @__PURE__ */ s(
105
- Bn,
101
+ (j || S) && /* @__PURE__ */ p(Re, { children: [
102
+ j && /* @__PURE__ */ o("div", { className: "h-9 mt-1 w-px bg-gray-300 flex-shrink-0" }),
103
+ /* @__PURE__ */ p("div", { className: "flex items-center gap-3 justify-end", children: [
104
+ j && f && /* @__PURE__ */ o(
105
+ Xn,
106
106
  {
107
107
  filters: f.filters,
108
108
  onChange: f.onChange,
@@ -111,33 +111,33 @@ function Wn({
111
111
  fieldOptions: f.fieldOptions || {}
112
112
  }
113
113
  ),
114
- S && /* @__PURE__ */ s("div", { className: "flex-shrink-0", children: S })
114
+ S && /* @__PURE__ */ o("div", { className: "flex-shrink-0", children: S })
115
115
  ] })
116
116
  ] })
117
117
  ] });
118
118
  }
119
- function St(n) {
120
- if (n == null)
119
+ function Rt(r) {
120
+ if (r == null)
121
121
  return NaN;
122
- const l = String(n).replace(/[,$%]|pp/gi, "").trim(), d = parseFloat(l);
122
+ const l = String(r).replace(/[,$%]|pp/gi, "").trim(), d = parseFloat(l);
123
123
  return Number.isFinite(d) ? d : NaN;
124
124
  }
125
- function An(n) {
126
- if (n == null)
125
+ function Yn(r) {
126
+ if (r == null)
127
127
  return NaN;
128
- const l = String(n).trim(), d = l.match(/^(\d+):(\d+)(?::(\d+))?$/);
128
+ const l = String(r).trim(), d = l.match(/^(\d+):(\d+)(?::(\d+))?$/);
129
129
  if (d) {
130
130
  const k = +d[1], C = +d[2], z = d[3] != null ? +d[3] : null;
131
131
  return z != null ? k * 3600 + C * 60 + z : k * 60 + C;
132
132
  }
133
133
  let f = 0, S = !1;
134
- const v = l.match(/(\d+)\s*d\b/i), a = l.match(/(\d+)\s*h\b/i), b = l.match(/(\d+)\s*m(?!s)\b/i), B = l.match(/(\d+)\s*s\b/i);
135
- return v && (f += +v[1] * 86400, S = !0), a && (f += +a[1] * 3600, S = !0), b && (f += +b[1] * 60, S = !0), B && (f += +B[1], S = !0), S ? f : NaN;
134
+ const v = l.match(/(\d+)\s*d\b/i), a = l.match(/(\d+)\s*h\b/i), b = l.match(/(\d+)\s*m(?!s)\b/i), W = l.match(/(\d+)\s*s\b/i);
135
+ return v && (f += +v[1] * 86400, S = !0), a && (f += +a[1] * 3600, S = !0), b && (f += +b[1] * 60, S = !0), W && (f += +W[1], S = !0), S ? f : NaN;
136
136
  }
137
- function On(n) {
138
- if (!n)
137
+ function Qn(r) {
138
+ if (!r)
139
139
  return null;
140
- const l = String(n).trim(), d = l.match(/^(\d{1,2})\/(\d{1,2})\/(\d{2,4})$/);
140
+ const l = String(r).trim(), d = l.match(/^(\d{1,2})\/(\d{1,2})\/(\d{2,4})$/);
141
141
  if (d) {
142
142
  const S = d[3].length === 2 ? 2e3 + +d[3] : +d[3], v = new Date(S, +d[1] - 1, +d[2]);
143
143
  return isNaN(v.getTime()) ? null : v;
@@ -145,51 +145,51 @@ function On(n) {
145
145
  const f = new Date(l);
146
146
  return isNaN(f.getTime()) ? null : f;
147
147
  }
148
- function Tn(n) {
149
- if (!n || n.length === 0)
148
+ function qn(r) {
149
+ if (!r || r.length === 0)
150
150
  return "text";
151
- const l = n.slice(0, 25), d = (f) => l.every(f);
151
+ const l = r.slice(0, 25), d = (f) => l.every(f);
152
152
  return d((f) => /^\d{1,2}\/\d{1,2}\/\d{2,4}$/.test(f) || /^\d{4}-\d{2}-\d{2}/.test(f)) ? "date" : d((f) => /^\d+\s*[dhms]\b/i.test(f) || /^\d+:\d+(:\d+)?$/.test(f)) ? "duration" : d((f) => /^-?[\d,.]+(%|pp)?$/i.test(f)) ? "number" : "text";
153
153
  }
154
- function Ue(n) {
155
- return n ? Array.isArray(n) ? n.length > 0 : n.type === "range" ? n.min !== "" && n.min !== void 0 && n.min !== null || n.max !== "" && n.max !== void 0 && n.max !== null : n.type === "durationRange" ? n.minSec !== "" && n.minSec != null || n.maxSec !== "" && n.maxSec != null : n.type === "scoreRange" ? Array.isArray(n.values) && n.values.length > 0 || n.min !== "" && n.min != null || n.max !== "" && n.max != null : n.type === "dateRange" ? !!(n.from || n.to) : !1 : !1;
154
+ function Je(r) {
155
+ return r ? Array.isArray(r) ? r.length > 0 : r.type === "range" ? r.min !== "" && r.min !== void 0 && r.min !== null || r.max !== "" && r.max !== void 0 && r.max !== null : r.type === "durationRange" ? r.minSec !== "" && r.minSec != null || r.maxSec !== "" && r.maxSec != null : r.type === "scoreRange" ? Array.isArray(r.values) && r.values.length > 0 || r.min !== "" && r.min != null || r.max !== "" && r.max != null : r.type === "dateRange" ? !!(r.from || r.to) : !1 : !1;
156
156
  }
157
- function Tt(n) {
158
- if (n == null || n === "" || isNaN(n))
157
+ function Xt(r) {
158
+ if (r == null || r === "" || isNaN(r))
159
159
  return "";
160
- const l = Number(n), d = Math.floor(l / 3600), f = Math.floor(l % 3600 / 60), S = Math.floor(l % 60);
160
+ const l = Number(r), d = Math.floor(l / 3600), f = Math.floor(l % 3600 / 60), S = Math.floor(l % 60);
161
161
  return d > 0 ? `${d}h ${f}m` : f > 0 ? `${f}m ${S}s` : `${S}s`;
162
162
  }
163
- function $n(n) {
164
- if (!n)
163
+ function Zn(r) {
164
+ if (!r)
165
165
  return "";
166
- if (Array.isArray(n))
167
- return n.length === 0 ? "" : String(n[0]);
168
- if (n.type === "range") {
169
- const l = n.min !== "" && n.min != null ? n.min : null, d = n.max !== "" && n.max != null ? n.max : null;
166
+ if (Array.isArray(r))
167
+ return r.length === 0 ? "" : String(r[0]);
168
+ if (r.type === "range") {
169
+ const l = r.min !== "" && r.min != null ? r.min : null, d = r.max !== "" && r.max != null ? r.max : null;
170
170
  return l != null && d != null ? `${l} – ${d}` : l != null ? `≥ ${l}` : d != null ? `≤ ${d}` : "";
171
171
  }
172
- if (n.type === "durationRange") {
173
- const l = n.minSec !== "" && n.minSec != null ? Tt(n.minSec) : null, d = n.maxSec !== "" && n.maxSec != null ? Tt(n.maxSec) : null;
172
+ if (r.type === "durationRange") {
173
+ const l = r.minSec !== "" && r.minSec != null ? Xt(r.minSec) : null, d = r.maxSec !== "" && r.maxSec != null ? Xt(r.maxSec) : null;
174
174
  return l && d ? `${l} – ${d}` : l ? `≥ ${l}` : d ? `≤ ${d}` : "";
175
175
  }
176
- if (n.type === "scoreRange") {
177
- if (Array.isArray(n.values) && n.values.length > 0)
178
- return n.values.slice().sort((f, S) => f - S).join(", ");
179
- const l = n.min !== "" && n.min != null ? n.min : null, d = n.max !== "" && n.max != null ? n.max : null;
176
+ if (r.type === "scoreRange") {
177
+ if (Array.isArray(r.values) && r.values.length > 0)
178
+ return r.values.slice().sort((f, S) => f - S).join(", ");
179
+ const l = r.min !== "" && r.min != null ? r.min : null, d = r.max !== "" && r.max != null ? r.max : null;
180
180
  return l != null && d != null ? `${l} – ${d}` : l != null ? `≥ ${l}` : d != null ? `≤ ${d}` : "";
181
181
  }
182
- return n.type === "dateRange" ? n.from && n.to ? `${n.from} – ${n.to}` : n.from ? `from ${n.from}` : n.to ? `to ${n.to}` : "" : "";
182
+ return r.type === "dateRange" ? r.from && r.to ? `${r.from} – ${r.to}` : r.from ? `from ${r.from}` : r.to ? `to ${r.to}` : "" : "";
183
183
  }
184
- function Ln(n) {
185
- return Array.isArray(n) ? Math.max(0, n.length - 1) : 0;
184
+ function Vn(r) {
185
+ return Array.isArray(r) ? Math.max(0, r.length - 1) : 0;
186
186
  }
187
- function Pn(n) {
188
- return Array.isArray(n) ? n.slice(1).map(String).join(", ") : "";
187
+ function er(r) {
188
+ return Array.isArray(r) ? r.slice(1).map(String).join(", ") : "";
189
189
  }
190
- function In({ count: n, values: l }) {
191
- const [d, f] = g(!1);
192
- return /* @__PURE__ */ m(
190
+ function tr({ count: r, values: l }) {
191
+ const [d, f] = y(!1);
192
+ return /* @__PURE__ */ p(
193
193
  "span",
194
194
  {
195
195
  onMouseEnter: () => f(!0),
@@ -212,8 +212,8 @@ function In({ count: n, values: l }) {
212
212
  },
213
213
  children: [
214
214
  "+",
215
- n,
216
- d && /* @__PURE__ */ s(
215
+ r,
216
+ d && /* @__PURE__ */ o(
217
217
  "span",
218
218
  {
219
219
  role: "tooltip",
@@ -242,7 +242,7 @@ function In({ count: n, values: l }) {
242
242
  }
243
243
  );
244
244
  }
245
- function jn({ leftLabel: n, rightLabel: l, leftValue: d, rightValue: f, onLeftChange: S, onRightChange: v, type: a = "number", placeholderLeft: b = "Min", placeholderRight: B = "Max" }) {
245
+ function nr({ leftLabel: r, rightLabel: l, leftValue: d, rightValue: f, onLeftChange: S, onRightChange: v, type: a = "number", placeholderLeft: b = "Min", placeholderRight: W = "Max" }) {
246
246
  const k = {
247
247
  width: "100%",
248
248
  height: 32,
@@ -256,10 +256,10 @@ function jn({ leftLabel: n, rightLabel: l, leftValue: d, rightValue: f, onLeftCh
256
256
  outline: "none",
257
257
  boxSizing: "border-box"
258
258
  }, C = { fontSize: 12, color: "#676767", marginBottom: 4, fontFamily: "var(--font-sans)" };
259
- return /* @__PURE__ */ m("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
260
- /* @__PURE__ */ m("div", { style: { display: "flex", flexDirection: "column" }, children: [
261
- /* @__PURE__ */ s("span", { style: C, children: n }),
262
- /* @__PURE__ */ s(
259
+ return /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
260
+ /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "column" }, children: [
261
+ /* @__PURE__ */ o("span", { style: C, children: r }),
262
+ /* @__PURE__ */ o(
263
263
  "input",
264
264
  {
265
265
  type: a,
@@ -270,22 +270,22 @@ function jn({ leftLabel: n, rightLabel: l, leftValue: d, rightValue: f, onLeftCh
270
270
  }
271
271
  )
272
272
  ] }),
273
- /* @__PURE__ */ m("div", { style: { display: "flex", flexDirection: "column" }, children: [
274
- /* @__PURE__ */ s("span", { style: C, children: l }),
275
- /* @__PURE__ */ s(
273
+ /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "column" }, children: [
274
+ /* @__PURE__ */ o("span", { style: C, children: l }),
275
+ /* @__PURE__ */ o(
276
276
  "input",
277
277
  {
278
278
  type: a,
279
279
  value: f,
280
280
  onChange: (z) => v(z.target.value),
281
- placeholder: B,
281
+ placeholder: W,
282
282
  style: k
283
283
  }
284
284
  )
285
285
  ] })
286
286
  ] });
287
287
  }
288
- const $t = [
288
+ const Gt = [
289
289
  { id: "0-60", label: "0 to 60 Sec", minSec: 0, maxSec: 60 },
290
290
  { id: "60-120", label: "1m to 2 m", minSec: 60, maxSec: 120 },
291
291
  { id: "120-180", label: "2m to 3 m", minSec: 120, maxSec: 180 },
@@ -293,17 +293,17 @@ const $t = [
293
293
  { id: "240-300", label: "4m to 5m", minSec: 240, maxSec: 300 },
294
294
  { id: "300+", label: "5 mins and above", minSec: 300, maxSec: null }
295
295
  ];
296
- function Lt(n) {
297
- if (n == null || n === "")
296
+ function Jt(r) {
297
+ if (r == null || r === "")
298
298
  return null;
299
- const l = String(n).trim().match(/^(\d{1,3}):(\d{2})$/);
299
+ const l = String(r).trim().match(/^(\d{1,3}):(\d{2})$/);
300
300
  if (l)
301
301
  return Number(l[1]) * 60 + Number(l[2]);
302
- const d = Number(n);
302
+ const d = Number(r);
303
303
  return Number.isFinite(d) ? d : null;
304
304
  }
305
- function xt({ children: n }) {
306
- return /* @__PURE__ */ s(
305
+ function kt({ children: r }) {
306
+ return /* @__PURE__ */ o(
307
307
  "div",
308
308
  {
309
309
  style: {
@@ -314,12 +314,12 @@ function xt({ children: n }) {
314
314
  padding: "4px 0 2px",
315
315
  fontFamily: "var(--font-sans)"
316
316
  },
317
- children: n
317
+ children: r
318
318
  }
319
319
  );
320
320
  }
321
- function bt({
322
- minValue: n,
321
+ function Dt({
322
+ minValue: r,
323
323
  maxValue: l,
324
324
  onMinChange: d,
325
325
  onMaxChange: f,
@@ -327,7 +327,7 @@ function bt({
327
327
  inputMode: v = "decimal",
328
328
  step: a,
329
329
  placeholder: b = "0.0",
330
- unit: B
330
+ unit: W
331
331
  }) {
332
332
  const k = {
333
333
  width: "100%",
@@ -341,27 +341,27 @@ function bt({
341
341
  outline: "none",
342
342
  boxSizing: "border-box"
343
343
  };
344
- return /* @__PURE__ */ m("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
345
- /* @__PURE__ */ m("div", { style: { display: "flex", alignItems: "flex-end", gap: 8 }, children: [
346
- /* @__PURE__ */ m("div", { style: { display: "flex", flexDirection: "column", gap: 6, flex: 1, minWidth: 0 }, children: [
347
- /* @__PURE__ */ s("span", { style: { fontSize: 12, color: "#2E3236", fontFamily: "var(--font-sans)" }, children: "Min From" }),
348
- /* @__PURE__ */ s(
344
+ return /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
345
+ /* @__PURE__ */ p("div", { style: { display: "flex", alignItems: "flex-end", gap: 8 }, children: [
346
+ /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "column", gap: 6, flex: 1, minWidth: 0 }, children: [
347
+ /* @__PURE__ */ o("span", { style: { fontSize: 12, color: "#2E3236", fontFamily: "var(--font-sans)" }, children: "Min From" }),
348
+ /* @__PURE__ */ o(
349
349
  "input",
350
350
  {
351
351
  type: S,
352
352
  inputMode: v,
353
353
  step: a,
354
354
  placeholder: b,
355
- value: n,
355
+ value: r,
356
356
  onChange: (C) => d(C.target.value),
357
357
  style: k
358
358
  }
359
359
  )
360
360
  ] }),
361
- /* @__PURE__ */ s("span", { style: { fontSize: 12, fontWeight: 600, color: "#323232", paddingBottom: 8, fontFamily: "var(--font-sans)" }, children: "to" }),
362
- /* @__PURE__ */ m("div", { style: { display: "flex", flexDirection: "column", gap: 6, flex: 1, minWidth: 0 }, children: [
363
- /* @__PURE__ */ s("span", { style: { fontSize: 12, color: "#2E3236", fontFamily: "var(--font-sans)" }, children: "Max" }),
364
- /* @__PURE__ */ s(
361
+ /* @__PURE__ */ o("span", { style: { fontSize: 12, fontWeight: 600, color: "#323232", paddingBottom: 8, fontFamily: "var(--font-sans)" }, children: "to" }),
362
+ /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "column", gap: 6, flex: 1, minWidth: 0 }, children: [
363
+ /* @__PURE__ */ o("span", { style: { fontSize: 12, color: "#2E3236", fontFamily: "var(--font-sans)" }, children: "Max" }),
364
+ /* @__PURE__ */ o(
365
365
  "input",
366
366
  {
367
367
  type: S,
@@ -375,7 +375,7 @@ function bt({
375
375
  )
376
376
  ] })
377
377
  ] }),
378
- B && /* @__PURE__ */ m(
378
+ W && /* @__PURE__ */ p(
379
379
  "span",
380
380
  {
381
381
  style: {
@@ -385,129 +385,129 @@ function bt({
385
385
  },
386
386
  children: [
387
387
  "Enter durations in ",
388
- B === "sec" ? "seconds" : B
388
+ W === "sec" ? "seconds" : W
389
389
  ]
390
390
  }
391
391
  )
392
392
  ] });
393
393
  }
394
- function _n({ column: n, columnId: l, filterType: d = "text", position: f, popoverRef: S, distinctValues: v, initialValue: a, onApply: b, onCancel: B, onSearch: k = null, searchMinChars: C = 3 }) {
395
- const z = d === "text", L = d === "number", D = d === "date", w = d === "duration", N = d === "score", H = /duration/i.test(String((n == null ? void 0 : n.label) || l || "")), E = ge(() => {
396
- if (!N || !Array.isArray(v) || v.length === 0)
394
+ function rr({ column: r, columnId: l, filterType: d = "text", position: f, popoverRef: S, distinctValues: v, initialValue: a, onApply: b, onCancel: W, onSearch: k = null, searchMinChars: C = 3 }) {
395
+ const z = d === "text", j = d === "number", D = d === "date", w = d === "duration", O = d === "score", T = /duration/i.test(String((r == null ? void 0 : r.label) || l || "")), B = te(() => {
396
+ if (!O || !Array.isArray(v) || v.length === 0)
397
397
  return !1;
398
- let p = 1 / 0, h = -1 / 0;
399
- for (const y of v) {
400
- const F = St(y);
401
- Number.isFinite(F) && (F < p && (p = F), F > h && (h = F));
398
+ let h = 1 / 0, m = -1 / 0;
399
+ for (const g of v) {
400
+ const F = Rt(g);
401
+ Number.isFinite(F) && (F < h && (h = F), F > m && (m = F));
402
402
  }
403
- return Number.isFinite(p) && Number.isFinite(h) && p >= 0 && h <= 5;
404
- }, [N, v]), [M, ae] = g(
403
+ return Number.isFinite(h) && Number.isFinite(m) && h >= 0 && m <= 5;
404
+ }, [O, v]), [E, ue] = y(
405
405
  () => z ? new Set(Array.isArray(a) ? a : []) : /* @__PURE__ */ new Set()
406
- ), [ye, Y] = g(""), [O, oe] = g(() => L && (a == null ? void 0 : a.type) === "range" && a.min != null ? a.min : ""), [Z, K] = g(() => L && (a == null ? void 0 : a.type) === "range" && a.max != null ? a.max : ""), [X, xe] = g(/* @__PURE__ */ new Set()), [V, te] = g(
406
+ ), [xe, X] = y(""), [Z, G] = y(() => j && (a == null ? void 0 : a.type) === "range" && a.min != null ? a.min : ""), [V, oe] = y(() => j && (a == null ? void 0 : a.type) === "range" && a.max != null ? a.max : ""), [_, fe] = y(/* @__PURE__ */ new Set()), [ne, L] = y(
407
407
  () => w && (a == null ? void 0 : a.type) === "durationRange" && a.minSec != null && a.minSec !== "" ? String(a.minSec) : ""
408
- ), [be, ne] = g(
408
+ ), [Y, pe] = y(
409
409
  () => w && (a == null ? void 0 : a.type) === "durationRange" && a.maxSec != null && a.maxSec !== "" ? String(a.maxSec) : ""
410
- ), [ce, ke] = g(
411
- () => N && (a == null ? void 0 : a.type) === "scoreRange" && Array.isArray(a.values) ? new Set(a.values) : /* @__PURE__ */ new Set()
412
- ), [We, Q] = g(
413
- () => N && (a == null ? void 0 : a.type) === "scoreRange" && a.min != null && a.min !== "" ? String(a.min) : ""
414
- ), [W, se] = g(
415
- () => N && (a == null ? void 0 : a.type) === "scoreRange" && a.max != null && a.max !== "" ? String(a.max) : ""
416
- ), [re, de] = g(() => D && (a == null ? void 0 : a.type) === "dateRange" && a.from || ""), [G, De] = g(() => D && (a == null ? void 0 : a.type) === "dateRange" && a.to || "");
417
- I(() => {
418
- z && ae(new Set(Array.isArray(a) ? a : []));
410
+ ), [he, Qe] = y(
411
+ () => O && (a == null ? void 0 : a.type) === "scoreRange" && Array.isArray(a.values) ? new Set(a.values) : /* @__PURE__ */ new Set()
412
+ ), [Pe, ze] = y(
413
+ () => O && (a == null ? void 0 : a.type) === "scoreRange" && a.min != null && a.min !== "" ? String(a.min) : ""
414
+ ), [be, Be] = y(
415
+ () => O && (a == null ? void 0 : a.type) === "scoreRange" && a.max != null && a.max !== "" ? String(a.max) : ""
416
+ ), [qe, Q] = y(() => D && (a == null ? void 0 : a.type) === "dateRange" && a.from || ""), [$, se] = y(() => D && (a == null ? void 0 : a.type) === "dateRange" && a.to || "");
417
+ H(() => {
418
+ z && ue(new Set(Array.isArray(a) ? a : []));
419
419
  }, [l, z]);
420
- const [Ce, Ae] = g(null), [A, ue] = g(!1), Se = U(0), ee = ye.trim(), we = z && typeof k == "function" && ee.length >= C;
421
- I(() => {
420
+ const [re, ie] = y(null), [q, Fe] = y(!1), ve = U(0), le = xe.trim(), M = z && typeof k == "function" && le.length >= C;
421
+ H(() => {
422
422
  if (!z || typeof k != "function")
423
423
  return;
424
- if (ee.length < C) {
425
- Ae(null), ue(!1);
424
+ if (le.length < C) {
425
+ ie(null), Fe(!1);
426
426
  return;
427
427
  }
428
- const p = ++Se.current;
429
- ue(!0);
430
- const h = setTimeout(async () => {
428
+ const h = ++ve.current;
429
+ Fe(!0);
430
+ const m = setTimeout(async () => {
431
431
  try {
432
- const y = await k(ee);
433
- if (p !== Se.current)
432
+ const g = await k(le);
433
+ if (h !== ve.current)
434
434
  return;
435
- const F = Array.isArray(y) ? y.map((T) => T && typeof T == "object" ? T.label ?? T.value : T).filter((T) => T != null && T !== "").map(String) : [];
436
- Ae(F);
435
+ const F = Array.isArray(g) ? g.map((P) => P && typeof P == "object" ? P.label ?? P.value : P).filter((P) => P != null && P !== "").map(String) : [];
436
+ ie(F);
437
437
  } catch {
438
- p === Se.current && Ae([]);
438
+ h === ve.current && ie([]);
439
439
  } finally {
440
- p === Se.current && ue(!1);
440
+ h === ve.current && Fe(!1);
441
441
  }
442
442
  }, 300);
443
- return () => clearTimeout(h);
444
- }, [z, k, ee, C]);
445
- const ve = ge(() => {
446
- const p = ee.toLowerCase(), h = we ? Ce || [] : p ? v.filter((F) => String(F).toLowerCase().includes(p)) : v, y = /* @__PURE__ */ new Map();
447
- for (const F of h)
448
- y.set(String(F), F);
449
- for (const F of M)
450
- y.set(String(F), F);
451
- return Array.from(y.values()).sort((F, T) => {
452
- const fe = M.has(F), Pe = M.has(T);
453
- return fe !== Pe ? fe ? -1 : 1 : String(F).localeCompare(String(T));
443
+ return () => clearTimeout(m);
444
+ }, [z, k, le, C]);
445
+ const Se = te(() => {
446
+ const h = le.toLowerCase(), m = M ? re || [] : h ? v.filter((F) => String(F).toLowerCase().includes(h)) : v, g = /* @__PURE__ */ new Map();
447
+ for (const F of m)
448
+ g.set(String(F), F);
449
+ for (const F of E)
450
+ g.set(String(F), F);
451
+ return Array.from(g.values()).sort((F, P) => {
452
+ const ae = E.has(F), Ve = E.has(P);
453
+ return ae !== Ve ? ae ? -1 : 1 : String(F).localeCompare(String(P));
454
454
  });
455
- }, [v, ee, M, we, Ce]), Oe = (p) => {
456
- ae((h) => {
457
- const y = new Set(h);
458
- return y.has(p) ? y.delete(p) : y.add(p), y;
455
+ }, [v, le, E, M, re]), Ie = (h) => {
456
+ ue((m) => {
457
+ const g = new Set(m);
458
+ return g.has(h) ? g.delete(h) : g.add(h), g;
459
459
  });
460
- }, it = () => {
461
- z && ae(/* @__PURE__ */ new Set()), L && (oe(""), K("")), w && (xe(/* @__PURE__ */ new Set()), te(""), ne("")), N && (ke(/* @__PURE__ */ new Set()), Q(""), se("")), D && (de(""), De("")), Y("");
462
- }, Te = (p) => {
463
- xe((h) => {
464
- const y = new Set(h);
465
- return y.has(p) ? y.delete(p) : y.add(p), y;
460
+ }, je = () => {
461
+ z && ue(/* @__PURE__ */ new Set()), j && (G(""), oe("")), w && (fe(/* @__PURE__ */ new Set()), L(""), pe("")), O && (Qe(/* @__PURE__ */ new Set()), ze(""), Be("")), D && (Q(""), se("")), X("");
462
+ }, ke = (h) => {
463
+ fe((m) => {
464
+ const g = new Set(m);
465
+ return g.has(h) ? g.delete(h) : g.add(h), g;
466
466
  });
467
- }, $e = (p) => {
468
- ke((h) => {
469
- const y = new Set(h);
470
- return y.has(p) ? y.delete(p) : y.add(p), y;
467
+ }, we = (h) => {
468
+ Qe((m) => {
469
+ const g = new Set(m);
470
+ return g.has(h) ? g.delete(h) : g.add(h), g;
471
471
  });
472
- }, Le = () => {
472
+ }, Ze = () => {
473
473
  if (z)
474
- return b(Array.from(M));
475
- if (L)
476
- return b({ type: "range", min: O === "" ? "" : Number(O), max: Z === "" ? "" : Number(Z) });
474
+ return b(Array.from(E));
475
+ if (j)
476
+ return b({ type: "range", min: Z === "" ? "" : Number(Z), max: V === "" ? "" : Number(V) });
477
477
  if (w) {
478
- const p = Lt(V), h = Lt(be), y = p != null || h != null;
479
- let F = "", T = "";
480
- if (y)
481
- F = p ?? "", T = h ?? "";
482
- else if (X.size > 0) {
483
- const fe = $t.filter((q) => X.has(q.id));
484
- F = Math.min(...fe.map((q) => q.minSec)), T = fe.some((q) => q.maxSec == null) ? "" : Math.max(...fe.map((q) => q.maxSec));
478
+ const h = Jt(ne), m = Jt(Y), g = h != null || m != null;
479
+ let F = "", P = "";
480
+ if (g)
481
+ F = h ?? "", P = m ?? "";
482
+ else if (_.size > 0) {
483
+ const ae = Gt.filter((ee) => _.has(ee.id));
484
+ F = Math.min(...ae.map((ee) => ee.minSec)), P = ae.some((ee) => ee.maxSec == null) ? "" : Math.max(...ae.map((ee) => ee.maxSec));
485
485
  }
486
- return b({ type: "durationRange", minSec: F, maxSec: T });
486
+ return b({ type: "durationRange", minSec: F, maxSec: P });
487
487
  }
488
- if (N) {
489
- const p = We === "" ? null : Number(We), h = W === "" ? null : Number(W);
490
- return p != null || h != null ? b({
488
+ if (O) {
489
+ const h = Pe === "" ? null : Number(Pe), m = be === "" ? null : Number(be);
490
+ return h != null || m != null ? b({
491
491
  type: "scoreRange",
492
492
  values: [],
493
- min: p != null && Number.isFinite(p) ? p : "",
494
- max: h != null && Number.isFinite(h) ? h : ""
493
+ min: h != null && Number.isFinite(h) ? h : "",
494
+ max: m != null && Number.isFinite(m) ? m : ""
495
495
  }) : b({
496
496
  type: "scoreRange",
497
- values: Array.from(ce).sort((F, T) => F - T),
497
+ values: Array.from(he).sort((F, P) => F - P),
498
498
  min: "",
499
499
  max: ""
500
500
  });
501
501
  }
502
502
  if (D)
503
- return b({ type: "dateRange", from: re, to: G });
503
+ return b({ type: "dateRange", from: qe, to: $ });
504
504
  };
505
- return /* @__PURE__ */ m(
505
+ return /* @__PURE__ */ p(
506
506
  "div",
507
507
  {
508
508
  ref: S,
509
509
  role: "dialog",
510
- "aria-label": `Filter ${n.label || l}`,
510
+ "aria-label": `Filter ${r.label || l}`,
511
511
  style: {
512
512
  position: "fixed",
513
513
  top: f.top,
@@ -525,8 +525,8 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
525
525
  fontFamily: "var(--font-sans)"
526
526
  },
527
527
  children: [
528
- z && /* @__PURE__ */ m(Fe, { children: [
529
- /* @__PURE__ */ s(
528
+ z && /* @__PURE__ */ p(Re, { children: [
529
+ /* @__PURE__ */ o(
530
530
  "div",
531
531
  {
532
532
  style: {
@@ -537,7 +537,7 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
537
537
  display: "flex",
538
538
  alignItems: "center"
539
539
  },
540
- children: /* @__PURE__ */ m(
540
+ children: /* @__PURE__ */ p(
541
541
  "div",
542
542
  {
543
543
  style: {
@@ -551,14 +551,14 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
551
551
  padding: "0 8px"
552
552
  },
553
553
  children: [
554
- /* @__PURE__ */ s(Cn, { size: 16, color: "#989898", strokeWidth: 2 }),
555
- /* @__PURE__ */ s(
554
+ /* @__PURE__ */ o(In, { size: 16, color: "#989898", strokeWidth: 2 }),
555
+ /* @__PURE__ */ o(
556
556
  "input",
557
557
  {
558
558
  autoFocus: !0,
559
559
  type: "text",
560
- value: ye,
561
- onChange: (p) => Y(p.target.value),
560
+ value: xe,
561
+ onChange: (h) => X(h.target.value),
562
562
  placeholder: "Search",
563
563
  style: {
564
564
  flex: 1,
@@ -577,9 +577,9 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
577
577
  )
578
578
  }
579
579
  ),
580
- /* @__PURE__ */ s("div", { style: { maxHeight: 220, overflowY: "auto", display: "flex", flexDirection: "column", gap: 4 }, children: typeof k == "function" && ee.length > 0 && ee.length < C ? /* @__PURE__ */ s("div", { style: { fontSize: 13, color: "#676767", padding: "8px 4px", textAlign: "center" }, children: `Type at least ${C} characters to search` }) : A ? /* @__PURE__ */ s("div", { style: { fontSize: 13, color: "#676767", padding: "8px 4px", textAlign: "center" }, children: "Searching…" }) : ve.length === 0 ? /* @__PURE__ */ s("div", { style: { fontSize: 13, color: "#676767", padding: "8px 4px", textAlign: "center" }, children: "No values" }) : ve.map((p) => {
581
- const h = M.has(p);
582
- return /* @__PURE__ */ m(
580
+ /* @__PURE__ */ o("div", { style: { maxHeight: 220, overflowY: "auto", display: "flex", flexDirection: "column", gap: 4 }, children: typeof k == "function" && le.length > 0 && le.length < C ? /* @__PURE__ */ o("div", { style: { fontSize: 13, color: "#676767", padding: "8px 4px", textAlign: "center" }, children: `Type at least ${C} characters to search` }) : q ? /* @__PURE__ */ o("div", { style: { fontSize: 13, color: "#676767", padding: "8px 4px", textAlign: "center" }, children: "Searching…" }) : Se.length === 0 ? /* @__PURE__ */ o("div", { style: { fontSize: 13, color: "#676767", padding: "8px 4px", textAlign: "center" }, children: "No values" }) : Se.map((h) => {
581
+ const m = E.has(h);
582
+ return /* @__PURE__ */ p(
583
583
  "label",
584
584
  {
585
585
  style: {
@@ -591,7 +591,7 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
591
591
  borderRadius: 6
592
592
  },
593
593
  children: [
594
- /* @__PURE__ */ s(
594
+ /* @__PURE__ */ o(
595
595
  "span",
596
596
  {
597
597
  style: {
@@ -601,28 +601,28 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
601
601
  display: "inline-flex",
602
602
  alignItems: "center",
603
603
  justifyContent: "center",
604
- background: h ? "#0B0B0B" : "#FFFFFF",
605
- border: `1px solid ${h ? "#0B0B0B" : "#676767"}`,
604
+ background: m ? "#0B0B0B" : "#FFFFFF",
605
+ border: `1px solid ${m ? "#0B0B0B" : "#676767"}`,
606
606
  flexShrink: 0
607
607
  },
608
- children: h && /* @__PURE__ */ s(st, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
608
+ children: m && /* @__PURE__ */ o(Ye, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
609
609
  }
610
610
  ),
611
- /* @__PURE__ */ s(
611
+ /* @__PURE__ */ o(
612
612
  "input",
613
613
  {
614
614
  type: "checkbox",
615
- checked: h,
616
- onChange: () => Oe(p),
615
+ checked: m,
616
+ onChange: () => Ie(h),
617
617
  style: { position: "absolute", opacity: 0, pointerEvents: "none" },
618
618
  tabIndex: -1
619
619
  }
620
620
  ),
621
- /* @__PURE__ */ s(
621
+ /* @__PURE__ */ o(
622
622
  "span",
623
623
  {
624
- onClick: (y) => {
625
- y.preventDefault(), Oe(p);
624
+ onClick: (g) => {
625
+ g.preventDefault(), Ie(h);
626
626
  },
627
627
  style: {
628
628
  fontSize: 14,
@@ -633,43 +633,43 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
633
633
  textOverflow: "ellipsis",
634
634
  whiteSpace: "nowrap"
635
635
  },
636
- children: p
636
+ children: h
637
637
  }
638
638
  )
639
639
  ]
640
640
  },
641
- p
641
+ h
642
642
  );
643
643
  }) })
644
644
  ] }),
645
- L && /* @__PURE__ */ m(Fe, { children: [
646
- /* @__PURE__ */ s(xt, { children: n.label || "Filter" }),
647
- /* @__PURE__ */ s(
648
- bt,
645
+ j && /* @__PURE__ */ p(Re, { children: [
646
+ /* @__PURE__ */ o(kt, { children: r.label || "Filter" }),
647
+ /* @__PURE__ */ o(
648
+ Dt,
649
649
  {
650
- minValue: O,
651
- maxValue: Z,
652
- onMinChange: oe,
653
- onMaxChange: K,
654
- placeholder: H ? "00" : "0.0",
655
- unit: H ? "sec" : void 0
650
+ minValue: Z,
651
+ maxValue: V,
652
+ onMinChange: G,
653
+ onMaxChange: oe,
654
+ placeholder: T ? "00" : "0.0",
655
+ unit: T ? "sec" : void 0
656
656
  }
657
657
  )
658
658
  ] }),
659
- w && /* @__PURE__ */ m(Fe, { children: [
660
- /* @__PURE__ */ s(xt, { children: n.label || "Duration" }),
661
- n.filterShowPresets === !0 && /* @__PURE__ */ m(Fe, { children: [
662
- /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: $t.map((p) => {
663
- const h = X.has(p.id);
664
- return /* @__PURE__ */ m(
659
+ w && /* @__PURE__ */ p(Re, { children: [
660
+ /* @__PURE__ */ o(kt, { children: r.label || "Duration" }),
661
+ r.filterShowPresets === !0 && /* @__PURE__ */ p(Re, { children: [
662
+ /* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: Gt.map((h) => {
663
+ const m = _.has(h.id);
664
+ return /* @__PURE__ */ p(
665
665
  "div",
666
666
  {
667
667
  role: "checkbox",
668
- "aria-checked": h,
668
+ "aria-checked": m,
669
669
  tabIndex: 0,
670
- onClick: () => Te(p.id),
671
- onKeyDown: (y) => {
672
- (y.key === " " || y.key === "Enter") && (y.preventDefault(), Te(p.id));
670
+ onClick: () => ke(h.id),
671
+ onKeyDown: (g) => {
672
+ (g.key === " " || g.key === "Enter") && (g.preventDefault(), ke(h.id));
673
673
  },
674
674
  style: {
675
675
  display: "flex",
@@ -679,7 +679,7 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
679
679
  userSelect: "none"
680
680
  },
681
681
  children: [
682
- /* @__PURE__ */ s(
682
+ /* @__PURE__ */ o(
683
683
  "span",
684
684
  {
685
685
  style: {
@@ -689,14 +689,14 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
689
689
  display: "inline-flex",
690
690
  alignItems: "center",
691
691
  justifyContent: "center",
692
- background: h ? "#0B0B0B" : "#FFFFFF",
693
- border: `1px solid ${h ? "#0B0B0B" : "#676767"}`,
692
+ background: m ? "#0B0B0B" : "#FFFFFF",
693
+ border: `1px solid ${m ? "#0B0B0B" : "#676767"}`,
694
694
  flexShrink: 0
695
695
  },
696
- children: h && /* @__PURE__ */ s(st, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
696
+ children: m && /* @__PURE__ */ o(Ye, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
697
697
  }
698
698
  ),
699
- /* @__PURE__ */ s(
699
+ /* @__PURE__ */ o(
700
700
  "span",
701
701
  {
702
702
  style: {
@@ -705,16 +705,16 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
705
705
  color: "#0B0B0B",
706
706
  fontFamily: "var(--font-sans)"
707
707
  },
708
- children: p.label
708
+ children: h.label
709
709
  }
710
710
  )
711
711
  ]
712
712
  },
713
- p.id
713
+ h.id
714
714
  );
715
715
  }) }),
716
- /* @__PURE__ */ s("div", { style: { height: 1, background: "#D9D9D9", margin: "0 -12px" } }),
717
- /* @__PURE__ */ s(
716
+ /* @__PURE__ */ o("div", { style: { height: 1, background: "#D9D9D9", margin: "0 -12px" } }),
717
+ /* @__PURE__ */ o(
718
718
  "div",
719
719
  {
720
720
  style: {
@@ -729,13 +729,13 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
729
729
  }
730
730
  )
731
731
  ] }),
732
- /* @__PURE__ */ s(
733
- bt,
732
+ /* @__PURE__ */ o(
733
+ Dt,
734
734
  {
735
- minValue: V,
736
- maxValue: be,
737
- onMinChange: te,
738
- onMaxChange: ne,
735
+ minValue: ne,
736
+ maxValue: Y,
737
+ onMinChange: L,
738
+ onMaxChange: pe,
739
739
  inputType: "number",
740
740
  inputMode: "numeric",
741
741
  placeholder: "00",
@@ -743,20 +743,20 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
743
743
  }
744
744
  )
745
745
  ] }),
746
- N && /* @__PURE__ */ m(Fe, { children: [
747
- /* @__PURE__ */ s(xt, { children: n.label || "Score" }),
748
- E && n.filterShowPresets === !0 && /* @__PURE__ */ m(Fe, { children: [
749
- /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [1, 2, 3, 4, 5].map((p) => {
750
- const h = ce.has(p);
751
- return /* @__PURE__ */ m(
746
+ O && /* @__PURE__ */ p(Re, { children: [
747
+ /* @__PURE__ */ o(kt, { children: r.label || "Score" }),
748
+ B && r.filterShowPresets === !0 && /* @__PURE__ */ p(Re, { children: [
749
+ /* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [1, 2, 3, 4, 5].map((h) => {
750
+ const m = he.has(h);
751
+ return /* @__PURE__ */ p(
752
752
  "div",
753
753
  {
754
754
  role: "checkbox",
755
- "aria-checked": h,
755
+ "aria-checked": m,
756
756
  tabIndex: 0,
757
- onClick: () => $e(p),
758
- onKeyDown: (y) => {
759
- (y.key === " " || y.key === "Enter") && (y.preventDefault(), $e(p));
757
+ onClick: () => we(h),
758
+ onKeyDown: (g) => {
759
+ (g.key === " " || g.key === "Enter") && (g.preventDefault(), we(h));
760
760
  },
761
761
  style: {
762
762
  display: "flex",
@@ -766,7 +766,7 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
766
766
  userSelect: "none"
767
767
  },
768
768
  children: [
769
- /* @__PURE__ */ s(
769
+ /* @__PURE__ */ o(
770
770
  "span",
771
771
  {
772
772
  style: {
@@ -776,14 +776,14 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
776
776
  display: "inline-flex",
777
777
  alignItems: "center",
778
778
  justifyContent: "center",
779
- background: h ? "#0B0B0B" : "#FFFFFF",
780
- border: `1px solid ${h ? "#0B0B0B" : "#676767"}`,
779
+ background: m ? "#0B0B0B" : "#FFFFFF",
780
+ border: `1px solid ${m ? "#0B0B0B" : "#676767"}`,
781
781
  flexShrink: 0
782
782
  },
783
- children: h && /* @__PURE__ */ s(st, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
783
+ children: m && /* @__PURE__ */ o(Ye, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
784
784
  }
785
785
  ),
786
- /* @__PURE__ */ s(
786
+ /* @__PURE__ */ o(
787
787
  "span",
788
788
  {
789
789
  style: {
@@ -792,17 +792,17 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
792
792
  color: "#0B0B0B",
793
793
  fontFamily: "var(--font-sans)"
794
794
  },
795
- children: p
795
+ children: h
796
796
  }
797
797
  )
798
798
  ]
799
799
  },
800
- p
800
+ h
801
801
  );
802
802
  }) }),
803
- /* @__PURE__ */ s("div", { style: { height: 1, background: "#D9D9D9", margin: "0 -12px" } })
803
+ /* @__PURE__ */ o("div", { style: { height: 1, background: "#D9D9D9", margin: "0 -12px" } })
804
804
  ] }),
805
- E && n.filterShowPresets === !0 && /* @__PURE__ */ s(
805
+ B && r.filterShowPresets === !0 && /* @__PURE__ */ o(
806
806
  "div",
807
807
  {
808
808
  style: {
@@ -816,38 +816,38 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
816
816
  children: "Custom Range"
817
817
  }
818
818
  ),
819
- /* @__PURE__ */ s(
820
- bt,
819
+ /* @__PURE__ */ o(
820
+ Dt,
821
821
  {
822
- minValue: We,
823
- maxValue: W,
824
- onMinChange: Q,
825
- onMaxChange: se,
822
+ minValue: Pe,
823
+ maxValue: be,
824
+ onMinChange: ze,
825
+ onMaxChange: Be,
826
826
  step: "0.1"
827
827
  }
828
828
  )
829
829
  ] }),
830
- D && /* @__PURE__ */ s(
831
- jn,
830
+ D && /* @__PURE__ */ o(
831
+ nr,
832
832
  {
833
833
  leftLabel: "From",
834
834
  rightLabel: "To",
835
- leftValue: re,
836
- rightValue: G,
837
- onLeftChange: de,
838
- onRightChange: De,
835
+ leftValue: qe,
836
+ rightValue: $,
837
+ onLeftChange: Q,
838
+ onRightChange: se,
839
839
  type: "date",
840
840
  placeholderLeft: "",
841
841
  placeholderRight: ""
842
842
  }
843
843
  ),
844
- /* @__PURE__ */ s("div", { style: { height: 1, background: "#D9D9D9", margin: "0 -12px" } }),
845
- /* @__PURE__ */ m("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
846
- /* @__PURE__ */ s(
844
+ /* @__PURE__ */ o("div", { style: { height: 1, background: "#D9D9D9", margin: "0 -12px" } }),
845
+ /* @__PURE__ */ p("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
846
+ /* @__PURE__ */ o(
847
847
  "button",
848
848
  {
849
849
  type: "button",
850
- onClick: it,
850
+ onClick: je,
851
851
  style: {
852
852
  background: "transparent",
853
853
  border: "none",
@@ -858,14 +858,14 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
858
858
  color: "#323232",
859
859
  fontFamily: "var(--font-sans)"
860
860
  },
861
- children: w && n.filterShowPresets === !0 || N && E && n.filterShowPresets === !0 ? "View All" : "Reset"
861
+ children: w && r.filterShowPresets === !0 || O && B && r.filterShowPresets === !0 ? "View All" : "Reset"
862
862
  }
863
863
  ),
864
- /* @__PURE__ */ s(
864
+ /* @__PURE__ */ o(
865
865
  "button",
866
866
  {
867
867
  type: "button",
868
- onClick: Le,
868
+ onClick: Ze,
869
869
  style: {
870
870
  background: "#0B0B0B",
871
871
  color: "#FFFFFF",
@@ -886,43 +886,43 @@ function _n({ column: n, columnId: l, filterType: d = "text", position: f, popov
886
886
  }
887
887
  );
888
888
  }
889
- const Hn = () => ({ userData: { email: "anonymous" } }), Kn = (n) => /* @__PURE__ */ s("img", { ...n });
890
- function Un({
891
- children: n,
889
+ const or = () => ({ userData: { email: "anonymous" } }), sr = (r) => /* @__PURE__ */ o("img", { ...r });
890
+ function ir({
891
+ children: r,
892
892
  content: l,
893
893
  direction: d = "top",
894
894
  align: f = "center",
895
895
  styling: S,
896
896
  indicatorColor: v
897
897
  }) {
898
- const a = typeof l == "string" ? l : l != null ? String(l) : "", b = typeof v == "string" && (v.startsWith("#") || v.startsWith("rgb") || v.startsWith("hsl") || v.startsWith("var(")) ? v : "var(--Grey-Strong, #2E3236)", [B, k] = g(!1), [C, z] = g(!1), [L, D] = g({ top: 0, left: 0, arrowLeft: 0, placement: "top" }), w = U(null), N = U(null);
898
+ const a = typeof l == "string" ? l : l != null ? String(l) : "", b = typeof v == "string" && (v.startsWith("#") || v.startsWith("rgb") || v.startsWith("hsl") || v.startsWith("var(")) ? v : "var(--Grey-Strong, #2E3236)", [W, k] = y(!1), [C, z] = y(!1), [j, D] = y({ top: 0, left: 0, arrowLeft: 0, placement: "top" }), w = U(null), O = U(null);
899
899
  if (!a)
900
- return n;
901
- I(() => {
900
+ return r;
901
+ H(() => {
902
902
  z(!0);
903
903
  }, []);
904
- const H = P(() => {
905
- if (!w.current || !N.current || typeof window > "u")
904
+ const T = A(() => {
905
+ if (!w.current || !O.current || typeof window > "u")
906
906
  return;
907
- const E = w.current.getBoundingClientRect(), M = N.current.getBoundingClientRect(), ae = window.innerWidth, ye = window.innerHeight, Y = 8, O = 10, oe = M.width, Z = M.height, K = E.top, X = ye - E.bottom, xe = d === "bottom" ? "bottom" : "top";
908
- let V = xe;
909
- xe === "top" && K < Z + O + Y && X > K ? V = "bottom" : xe === "bottom" && X < Z + O + Y && K > X && (V = "top");
910
- let te = E.left + E.width / 2;
911
- f === "start" && (te = E.left), f === "end" && (te = E.right);
912
- let be = V === "top" ? E.top - Z - O : E.bottom + O, ne = f === "start" ? te : f === "end" ? te - oe : te - oe / 2;
913
- be = Math.max(Y, Math.min(be, ye - Z - Y)), ne = Math.max(Y, Math.min(ne, ae - oe - Y));
914
- const ce = Math.max(10, Math.min(te - ne, oe - 10));
915
- D({ top: be, left: ne, arrowLeft: ce, placement: V });
907
+ const B = w.current.getBoundingClientRect(), E = O.current.getBoundingClientRect(), ue = window.innerWidth, xe = window.innerHeight, X = 8, Z = 10, G = E.width, V = E.height, oe = B.top, _ = xe - B.bottom, fe = d === "bottom" ? "bottom" : "top";
908
+ let ne = fe;
909
+ fe === "top" && oe < V + Z + X && _ > oe ? ne = "bottom" : fe === "bottom" && _ < V + Z + X && oe > _ && (ne = "top");
910
+ let L = B.left + B.width / 2;
911
+ f === "start" && (L = B.left), f === "end" && (L = B.right);
912
+ let Y = ne === "top" ? B.top - V - Z : B.bottom + Z, pe = f === "start" ? L : f === "end" ? L - G : L - G / 2;
913
+ Y = Math.max(X, Math.min(Y, xe - V - X)), pe = Math.max(X, Math.min(pe, ue - G - X));
914
+ const he = Math.max(10, Math.min(L - pe, G - 10));
915
+ D({ top: Y, left: pe, arrowLeft: he, placement: ne });
916
916
  }, [f, d]);
917
- return I(() => {
918
- if (!B || !C)
917
+ return H(() => {
918
+ if (!W || !C)
919
919
  return;
920
- H();
921
- const E = () => H();
922
- return window.addEventListener("resize", E), window.addEventListener("scroll", E, !0), () => {
923
- window.removeEventListener("resize", E), window.removeEventListener("scroll", E, !0);
920
+ T();
921
+ const B = () => T();
922
+ return window.addEventListener("resize", B), window.addEventListener("scroll", B, !0), () => {
923
+ window.removeEventListener("resize", B), window.removeEventListener("scroll", B, !0);
924
924
  };
925
- }, [B, C, H]), /* @__PURE__ */ m(
925
+ }, [W, C, T]), /* @__PURE__ */ p(
926
926
  "span",
927
927
  {
928
928
  ref: w,
@@ -930,16 +930,16 @@ function Un({
930
930
  onMouseEnter: () => k(!0),
931
931
  onMouseLeave: () => k(!1),
932
932
  children: [
933
- n,
934
- B && C && vt(
935
- /* @__PURE__ */ m(
933
+ r,
934
+ W && C && Ct(
935
+ /* @__PURE__ */ p(
936
936
  "span",
937
937
  {
938
- ref: N,
938
+ ref: O,
939
939
  style: {
940
940
  position: "fixed",
941
- top: `${L.top}px`,
942
- left: `${L.left}px`,
941
+ top: `${j.top}px`,
942
+ left: `${j.left}px`,
943
943
  background: "var(--Grey-Strong, #2E3236)",
944
944
  color: "var(--Grey-White, #FFF)",
945
945
  fontSize: "12px",
@@ -957,18 +957,18 @@ function Un({
957
957
  },
958
958
  children: [
959
959
  a,
960
- /* @__PURE__ */ s(
960
+ /* @__PURE__ */ o(
961
961
  "span",
962
962
  {
963
963
  style: {
964
964
  position: "absolute",
965
- left: `${L.arrowLeft}px`,
965
+ left: `${j.arrowLeft}px`,
966
966
  transform: "translateX(-50%)",
967
967
  width: 0,
968
968
  height: 0,
969
969
  borderLeft: "6px solid transparent",
970
970
  borderRight: "6px solid transparent",
971
- ...L.placement === "top" ? {
971
+ ...j.placement === "top" ? {
972
972
  top: "100%",
973
973
  borderTop: `7px solid ${b}`
974
974
  } : {
@@ -987,8 +987,8 @@ function Un({
987
987
  }
988
988
  );
989
989
  }
990
- function rr({
991
- data: n = [],
990
+ function xr({
991
+ data: r = [],
992
992
  columns: l = [],
993
993
  initialPageSize: d = 10,
994
994
  onRowClick: f,
@@ -1001,7 +1001,7 @@ function rr({
1001
1001
  // Controlled pageSize (null = use internal state)
1002
1002
  onPageChange: b = null,
1003
1003
  // Callback for page changes (null = use internal state)
1004
- onPageSizeChange: B = null,
1004
+ onPageSizeChange: W = null,
1005
1005
  // Callback for pageSize changes (null = use internal state)
1006
1006
  onFilterChange: k = null,
1007
1007
  // Callback for filter changes (null = use client-side filtering)
@@ -1010,48 +1010,58 @@ function rr({
1010
1010
  // Optional callback to surface column limit errors to host app
1011
1011
  onMaxColumnsError: z = null,
1012
1012
  // Server-side sorting props (optional)
1013
- onSort: L = null,
1013
+ onSort: j = null,
1014
1014
  // Callback for sort changes (null = use client-side sorting)
1015
1015
  sortFields: D = [],
1016
1016
  // Array of [field, direction] tuples from parent (null = use internal state)
1017
1017
  tableId: w = null,
1018
1018
  // Optional unique identifier for localStorage persistence (e.g., "history", "agents")
1019
- isLoading: N = !1,
1019
+ isLoading: O = !1,
1020
1020
  // Loading state to show overlay inside table
1021
1021
  // Filter props (optional)
1022
- filtersConfig: H = null,
1022
+ filtersConfig: T = null,
1023
1023
  // Top toolbar filter config (chips/date/export). Note: this is different from `columnFilters` for inline header inputs.
1024
1024
  // Column resize (optional) — min/max in px; columns may override with column.minWidth / column.maxWidth
1025
- columnResizeMinWidth: E = 120,
1026
- columnResizeMaxWidth: M = 280,
1025
+ columnResizeMinWidth: B = 120,
1026
+ columnResizeMaxWidth: E = 280,
1027
1027
  // Fires whenever the user-visible column set changes. Useful for hosts that
1028
1028
  // want to scope a CSV export, etc., to whatever the user has selected.
1029
1029
  // Receives an array of column ids (excluding the action column).
1030
- onVisibleColumnsChange: ae = null,
1030
+ onVisibleColumnsChange: ue = null,
1031
1031
  // When true, hides the "Columns" picker button in the toolbar. The
1032
1032
  // surrounding toolbar wrapper is also skipped if no other toolbar content
1033
1033
  // (e.g. `filtersConfig`) is configured.
1034
- hideColumnPicker: ye = !1
1034
+ hideColumnPicker: xe = !1,
1035
+ // Row selection (opt-in). When `selectable` is true a leading checkbox
1036
+ // column is rendered outside the reorderable/persisted column system, so it
1037
+ // is always visible and unaffected by the column picker or saved prefs.
1038
+ // Selection is controlled by the host: pass `selectedRowIds` (array of ids)
1039
+ // and handle `onSelectionChange(nextIdsArray)`. `getRowId` resolves a row's
1040
+ // id (defaults to `row.id`).
1041
+ selectable: X = !1,
1042
+ selectedRowIds: Z = null,
1043
+ onSelectionChange: G = null,
1044
+ getRowId: V = null
1035
1045
  }) {
1036
- var Wt;
1037
- const { userData: Y } = Hn(), O = (Y == null ? void 0 : Y.email) || "anonymous", oe = ht.memo(({ children: e, content: t, className: r = "" }) => {
1038
- const i = U(null), [o, u] = g(!1);
1039
- I(() => {
1046
+ var Ht;
1047
+ const { userData: oe } = or(), _ = (oe == null ? void 0 : oe.email) || "anonymous", fe = St.memo(({ children: e, content: t, className: s = "" }) => {
1048
+ const i = U(null), [n, u] = y(!1);
1049
+ H(() => {
1040
1050
  const x = () => {
1041
1051
  if (i.current) {
1042
- const _ = i.current.scrollWidth > i.current.clientWidth;
1043
- u(_);
1052
+ const K = i.current.scrollWidth > i.current.clientWidth;
1053
+ u(K);
1044
1054
  }
1045
1055
  };
1046
1056
  x();
1047
- const j = setTimeout(x, 0);
1057
+ const N = setTimeout(x, 0);
1048
1058
  return window.addEventListener("resize", x), () => {
1049
- clearTimeout(j), window.removeEventListener("resize", x);
1059
+ clearTimeout(N), window.removeEventListener("resize", x);
1050
1060
  };
1051
1061
  }, [e, t]);
1052
- const c = /* @__PURE__ */ s("span", { className: `truncate block ${r}`, ref: i, children: e });
1053
- return o && t ? /* @__PURE__ */ s(
1054
- Un,
1062
+ const c = /* @__PURE__ */ o("span", { className: `truncate block ${s}`, ref: i, children: e });
1063
+ return n && t ? /* @__PURE__ */ o(
1064
+ ir,
1055
1065
  {
1056
1066
  content: t,
1057
1067
  styling: "bg-green-2 text-gray-900 px-3 py-2 text-sm rounded-lg shadow-md border border-gray-300 max-w-xs whitespace-normal",
@@ -1061,145 +1071,145 @@ function rr({
1061
1071
  }
1062
1072
  ) : c;
1063
1073
  });
1064
- oe.displayName = "TruncatedCell";
1065
- const Z = S !== null && b !== null, K = k !== null, X = L !== null, [xe, V] = g(1), [te, be] = g(d), ne = v !== null ? v : xe, ce = a !== null ? a : te, ke = (e) => {
1066
- b ? b(e) : V(e);
1067
- }, We = (e) => {
1068
- B ? B(e) : be(e);
1069
- }, Q = 50, W = "action", se = U(!1), re = ge(() => w ? `dataTable_columns_${w}:${O}` : `dataTable_columns_${l.map((t) => t.id || t.key).sort().join("_")}:${O}`, [w, l, O]), de = ge(() => w ? `dataTable_manual_change_${w}:${O}` : null, [w, O]);
1070
- P((e, t) => {
1074
+ fe.displayName = "TruncatedCell";
1075
+ const ne = S !== null && b !== null, L = k !== null, Y = j !== null, [pe, he] = y(1), [Qe, Pe] = y(d), ze = v !== null ? v : pe, be = a !== null ? a : Qe, Be = (e) => {
1076
+ b ? b(e) : he(e);
1077
+ }, qe = (e) => {
1078
+ W ? W(e) : Pe(e);
1079
+ }, Q = 50, $ = "action", se = U(!1), re = te(() => w ? `dataTable_columns_${w}:${_}` : `dataTable_columns_${l.map((t) => t.id || t.key).sort().join("_")}:${_}`, [w, l, _]), ie = te(() => w ? `dataTable_manual_change_${w}:${_}` : null, [w, _]);
1080
+ A((e, t) => {
1071
1081
  if (typeof window > "u" || !e || !t || t.length === 0)
1072
1082
  return null;
1073
1083
  try {
1074
- const r = localStorage.getItem(e);
1075
- if (r) {
1076
- const o = JSON.parse(r).filter(
1084
+ const s = localStorage.getItem(e);
1085
+ if (s) {
1086
+ const n = JSON.parse(s).filter(
1077
1087
  (u) => t.some((c) => (c.id || c.key) === u)
1078
1088
  );
1079
- if (o.length > 0)
1080
- return o;
1089
+ if (n.length > 0)
1090
+ return n;
1081
1091
  }
1082
- } catch (r) {
1083
- console.warn("Failed to load saved columns from localStorage:", r);
1092
+ } catch (s) {
1093
+ console.warn("Failed to load saved columns from localStorage:", s);
1084
1094
  }
1085
1095
  return null;
1086
1096
  }, []);
1087
- const [G, De] = g({}), [Ce, Ae] = g(""), [A, ue] = g(null), [Se, ee] = g({ top: 0, left: 0 }), we = U(null), ve = U({}), [Oe, it] = g(null), [Te, $e] = g("asc"), Le = P((e, t) => {
1088
- const r = Ue(t);
1089
- De((i) => {
1090
- const o = { ...i };
1091
- return r ? o[e] = t : delete o[e], o;
1092
- }), b ? b(1) : V(1), K && k && k(
1093
- r ? { ...G, [e]: t } : Object.fromEntries(Object.entries(G).filter(([i]) => i !== e))
1097
+ const [q, Fe] = y({}), [ve, le] = y(""), [M, Se] = y(null), [Ie, je] = y({ top: 0, left: 0 }), ke = U(null), we = U({}), [Ze, h] = y(null), [m, g] = y("asc"), F = A((e, t) => {
1098
+ const s = Je(t);
1099
+ Fe((i) => {
1100
+ const n = { ...i };
1101
+ return s ? n[e] = t : delete n[e], n;
1102
+ }), b ? b(1) : he(1), L && k && k(
1103
+ s ? { ...q, [e]: t } : Object.fromEntries(Object.entries(q).filter(([i]) => i !== e))
1094
1104
  );
1095
- }, [G, k, K, b]), p = P(() => {
1096
- De({}), Ae(""), b ? b(1) : V(1), K && k && k({});
1097
- }, [k, K, b]), h = P((e) => {
1098
- const t = l.find((o) => (o.id || o.key) === e);
1105
+ }, [q, k, L, b]), P = A(() => {
1106
+ Fe({}), le(""), b ? b(1) : he(1), L && k && k({});
1107
+ }, [k, L, b]), ae = A((e) => {
1108
+ const t = l.find((n) => (n.id || n.key) === e);
1099
1109
  if (t && Array.isArray(t.filterOptions)) {
1100
- const o = /* @__PURE__ */ new Set(), u = [];
1110
+ const n = /* @__PURE__ */ new Set(), u = [];
1101
1111
  for (const c of t.filterOptions) {
1102
1112
  if (c == null || c === "")
1103
1113
  continue;
1104
1114
  const x = typeof c == "object" ? JSON.stringify(c) : String(c);
1105
- o.has(x) || (o.add(x), u.push(x));
1115
+ n.has(x) || (n.add(x), u.push(x));
1106
1116
  }
1107
1117
  return u.sort((c, x) => c.localeCompare(x));
1108
1118
  }
1109
- if (!n || n.length === 0)
1119
+ if (!r || r.length === 0)
1110
1120
  return [];
1111
- const r = /* @__PURE__ */ new Set(), i = [];
1112
- for (const o of n) {
1113
- const u = o[e];
1121
+ const s = /* @__PURE__ */ new Set(), i = [];
1122
+ for (const n of r) {
1123
+ const u = n[e];
1114
1124
  if (u == null)
1115
1125
  continue;
1116
1126
  const c = typeof u == "object" ? JSON.stringify(u) : String(u);
1117
- r.has(c) || (r.add(c), i.push(c));
1127
+ s.has(c) || (s.add(c), i.push(c));
1118
1128
  }
1119
- return i.sort((o, u) => o.localeCompare(u));
1120
- }, [n, l]), y = P((e) => {
1121
- const t = l.find((r) => J(r) === e);
1122
- return t && t.filterType ? t.filterType : Tn(h(e));
1123
- }, [l, h]), F = P((e) => {
1129
+ return i.sort((n, u) => n.localeCompare(u));
1130
+ }, [r, l]), Ve = A((e) => {
1131
+ const t = l.find((s) => J(s) === e);
1132
+ return t && t.filterType ? t.filterType : qn(ae(e));
1133
+ }, [l, ae]), ee = A((e) => {
1124
1134
  const i = typeof window < "u" ? window.innerWidth : 1 / 0;
1125
- let o = e.left;
1126
- return o + 280 > i - 8 && (o = Math.max(8, e.right - 280)), { top: e.bottom + 6, left: o };
1127
- }, []), T = P((e, t) => {
1135
+ let n = e.left;
1136
+ return n + 280 > i - 8 && (n = Math.max(8, e.right - 280)), { top: e.bottom + 6, left: n };
1137
+ }, []), Yt = A((e, t) => {
1128
1138
  if (!t) {
1129
- ue(e);
1139
+ Se(e);
1130
1140
  return;
1131
1141
  }
1132
- const r = t.getBoundingClientRect();
1133
- ee(F(r)), ue((i) => i === e ? null : e);
1134
- }, [F]);
1135
- I(() => {
1136
- if (!A)
1142
+ const s = t.getBoundingClientRect();
1143
+ je(ee(s)), Se((i) => i === e ? null : e);
1144
+ }, [ee]);
1145
+ H(() => {
1146
+ if (!M)
1137
1147
  return;
1138
1148
  const e = (t) => {
1139
- if (we.current && we.current.contains(t.target))
1149
+ if (ke.current && ke.current.contains(t.target))
1140
1150
  return;
1141
- const r = ve.current[A];
1142
- r && r.contains(t.target) || Object.values(ve.current).some(
1143
- (o) => o && o.contains(t.target)
1144
- ) || ue(null);
1151
+ const s = we.current[M];
1152
+ s && s.contains(t.target) || Object.values(we.current).some(
1153
+ (n) => n && n.contains(t.target)
1154
+ ) || Se(null);
1145
1155
  };
1146
1156
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
1147
- }, [A]), I(() => {
1148
- if (!A)
1157
+ }, [M]), H(() => {
1158
+ if (!M)
1149
1159
  return;
1150
1160
  const e = () => {
1151
- const t = ve.current[A];
1161
+ const t = we.current[M];
1152
1162
  if (!t)
1153
1163
  return;
1154
- const r = t.getBoundingClientRect();
1155
- ee(F(r));
1164
+ const s = t.getBoundingClientRect();
1165
+ je(ee(s));
1156
1166
  };
1157
1167
  return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
1158
1168
  window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
1159
1169
  };
1160
- }, [A, F]), dn(() => {
1161
- if (!A)
1170
+ }, [M, ee]), kn(() => {
1171
+ if (!M)
1162
1172
  return;
1163
- const e = we.current, t = ve.current[A];
1173
+ const e = ke.current, t = we.current[M];
1164
1174
  if (!e || !t)
1165
1175
  return;
1166
- const r = e.offsetWidth, i = t.getBoundingClientRect(), o = 8, u = typeof window < "u" ? window.innerWidth : 1 / 0;
1167
- if (!(i.left + r > u - o))
1176
+ const s = e.offsetWidth, i = t.getBoundingClientRect(), n = 8, u = typeof window < "u" ? window.innerWidth : 1 / 0;
1177
+ if (!(i.left + s > u - n))
1168
1178
  return;
1169
- const x = Math.max(o, i.right - r);
1170
- ee((j) => j.left === x ? j : { ...j, left: x });
1171
- }, [A, Se.top]);
1172
- const fe = P((e) => !e || typeof e != "object" ? {} : Object.fromEntries(
1179
+ const x = Math.max(n, i.right - s);
1180
+ je((N) => N.left === x ? N : { ...N, left: x });
1181
+ }, [M, Ie.top]);
1182
+ const zt = A((e) => !e || typeof e != "object" ? {} : Object.fromEntries(
1173
1183
  Object.entries(e).filter(([, t]) => t == null ? !1 : typeof t == "string" ? t.trim() !== "" : !0)
1174
- ), []), Pe = P((e, t) => {
1175
- const r = Object.keys(e || {}), i = Object.keys(t || {});
1176
- return r.length !== i.length ? !1 : r.every((o) => e[o] === t[o]);
1184
+ ), []), Bt = A((e, t) => {
1185
+ const s = Object.keys(e || {}), i = Object.keys(t || {});
1186
+ return s.length !== i.length ? !1 : s.every((n) => e[n] === t[n]);
1177
1187
  }, []);
1178
- I(() => {
1179
- if (!K || C === null)
1188
+ H(() => {
1189
+ if (!L || C === null)
1180
1190
  return;
1181
- const e = fe(C);
1182
- De((t) => Pe(t, e) ? t : e);
1183
- }, [K, C, fe, Pe]), P((e, t) => e === "csat_score" && t === "evaluation.csat_score" ? t : e, []);
1184
- const q = X && D.length > 0 ? D[0][0] : Oe, Xe = X && D.length > 0 ? D[0][1] : Te, [Xn, wt] = g(
1191
+ const e = zt(C);
1192
+ Fe((t) => Bt(t, e) ? t : e);
1193
+ }, [L, C, zt, Bt]), A((e, t) => e === "csat_score" && t === "evaluation.csat_score" ? t : e, []);
1194
+ const _e = Y && D.length > 0 ? D[0][0] : Ze, et = Y && D.length > 0 ? D[0][1] : m, [lr, Et] = y(
1185
1195
  () => l.map((e) => e.id || e.key)
1186
- ), ie = P((e) => {
1196
+ ), ce = A((e) => {
1187
1197
  if (!e || e.length === 0)
1188
1198
  return e;
1189
1199
  let t = Array.from(new Set(e));
1190
1200
  t.length > Q && (t = t.slice(0, Q));
1191
- const i = l.map((c) => c.id || c.key).includes(W);
1192
- return !t.includes(W) && i && (t.length >= Q ? t = [...t.slice(0, Q - 1), W] : t = [...t, W]), [...t.filter((c) => c !== W), W];
1193
- }, [l]), [$, Ie] = g(() => {
1201
+ const i = l.map((c) => c.id || c.key).includes($);
1202
+ return !t.includes($) && i && (t.length >= Q ? t = [...t.slice(0, Q - 1), $] : t = [...t, $]), [...t.filter((c) => c !== $), $];
1203
+ }, [l]), [I, He] = y(() => {
1194
1204
  if (typeof window < "u" && w)
1195
1205
  try {
1196
- if (localStorage.getItem(`dataTable_manual_change_${w}:${O}`) === "true") {
1197
- const i = localStorage.getItem(`dataTable_columns_${w}:${O}`);
1206
+ if (localStorage.getItem(`dataTable_manual_change_${w}:${_}`) === "true") {
1207
+ const i = localStorage.getItem(`dataTable_columns_${w}:${_}`);
1198
1208
  if (i) {
1199
- const o = JSON.parse(i);
1200
- if (Array.isArray(o) && o.length > 0) {
1209
+ const n = JSON.parse(i);
1210
+ if (Array.isArray(n) && n.length > 0) {
1201
1211
  se.current = !0;
1202
- const u = o.filter(
1212
+ const u = n.filter(
1203
1213
  (c) => l.some((x) => (x.id || x.key) === c)
1204
1214
  );
1205
1215
  if (u.length > 0)
@@ -1207,14 +1217,14 @@ function rr({
1207
1217
  }
1208
1218
  }
1209
1219
  }
1210
- } catch (r) {
1211
- console.warn("Failed to load saved columns from localStorage:", r);
1220
+ } catch (s) {
1221
+ console.warn("Failed to load saved columns from localStorage:", s);
1212
1222
  }
1213
- const t = l.map((r) => r.id || r.key).slice(0, Q);
1214
- return ie(t);
1215
- }), [le, lt] = g(!1), [pe, Re] = g([]), [Ft, Pt] = g({ top: 0, left: 0, width: 0 }), [Ge, ze] = g(/* @__PURE__ */ new Set()), [Je, Ee] = g(/* @__PURE__ */ new Set()), me = U({}), Ye = U(null);
1216
- Ye.current === null && (Ye.current = [...$]);
1217
- const [he, at] = g(null), [It, Qe] = g(null), Me = U(null), ct = U(null), dt = U(null), [kt, ut] = g(null), [ft, jt] = g({}), _t = U(null), qe = U(null), J = (e) => e.id || e.key, Ze = P((e) => {
1223
+ const t = l.map((s) => s.id || s.key).slice(0, Q);
1224
+ return ce(t);
1225
+ }), [de, pt] = y(!1), [me, Ee] = y([]), [Mt, Qt] = y({ top: 0, left: 0, width: 0 }), [tt, Me] = y(/* @__PURE__ */ new Set()), [nt, Ne] = y(/* @__PURE__ */ new Set()), ge = U({}), rt = U(null);
1226
+ rt.current === null && (rt.current = [...I]);
1227
+ const [ye, ht] = y(null), [qt, ot] = y(null), Ae = U(null), mt = U(null), gt = U(null), [Nt, yt] = y(null), [xt, Zt] = y({}), Vt = U(null), st = U(null), J = (e) => e.id || e.key, it = A((e) => {
1218
1228
  if (typeof e == "number" && Number.isFinite(e))
1219
1229
  return e;
1220
1230
  if (typeof e == "string") {
@@ -1223,232 +1233,284 @@ function rr({
1223
1233
  const i = parseFloat(t);
1224
1234
  return Number.isFinite(i) ? i : null;
1225
1235
  }
1226
- const r = parseFloat(t);
1227
- return Number.isFinite(r) && `${r}` === t ? r : null;
1236
+ const s = parseFloat(t);
1237
+ return Number.isFinite(s) && `${s}` === t ? s : null;
1228
1238
  }
1229
1239
  return null;
1230
- }, []), Dt = P((e, t) => ft[e] != null ? `${ft[e]}px` : typeof t == "number" ? `${t}px` : t || "auto", [ft]), Ve = P((e) => {
1231
- if (!qe.current)
1240
+ }, []), At = A((e, t) => xt[e] != null ? `${xt[e]}px` : typeof t == "number" ? `${t}px` : t || "auto", [xt]), lt = A((e) => {
1241
+ if (!st.current)
1232
1242
  return;
1233
- const { columnId: t, startX: r, startWidth: i, minWidth: o, maxWidth: u } = qe.current, c = e.clientX - r, x = Math.round(i + c), j = Math.min(u, Math.max(o, x));
1234
- jt((_) => ({ ..._, [t]: j }));
1235
- }, []), je = P(() => {
1236
- qe.current = null, document.body.style.cursor = "", document.body.style.userSelect = "", document.removeEventListener("mousemove", Ve), document.removeEventListener("mouseup", je);
1237
- }, [Ve]), Ht = P((e, t, r) => {
1238
- var rt;
1243
+ const { columnId: t, startX: s, startWidth: i, minWidth: n, maxWidth: u } = st.current, c = e.clientX - s, x = Math.round(i + c), N = Math.min(u, Math.max(n, x));
1244
+ Zt((K) => ({ ...K, [t]: N }));
1245
+ }, []), Ke = A(() => {
1246
+ st.current = null, document.body.style.cursor = "", document.body.style.userSelect = "", document.removeEventListener("mousemove", lt), document.removeEventListener("mouseup", Ke);
1247
+ }, [lt]), en = A((e, t, s) => {
1248
+ var Le;
1239
1249
  e.preventDefault(), e.stopPropagation();
1240
- const i = t.id || t.key, o = Ze(t.minWidth) ?? E, u = Ze(t.maxWidth) ?? M, c = Math.min(o, u), x = Math.max(o, u), j = ((rt = e.currentTarget.closest("th")) == null ? void 0 : rt.getBoundingClientRect().width) || 0, _ = Ze(r), Ke = _ ?? Math.max(c, Math.round(j) || c), pt = Math.min(x, Math.max(c, Ke));
1241
- qe.current = { columnId: i, startX: e.clientX, startWidth: pt, minWidth: c, maxWidth: x }, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", Ve), document.addEventListener("mouseup", je);
1242
- }, [M, E, Ve, je, Ze]);
1243
- I(() => () => je(), [je]);
1244
- const Kt = un(
1245
- At(bn),
1246
- At(xn, {
1247
- coordinateGetter: yn
1250
+ const i = t.id || t.key, n = it(t.minWidth) ?? B, u = it(t.maxWidth) ?? E, c = Math.min(n, u), x = Math.max(n, u), N = ((Le = e.currentTarget.closest("th")) == null ? void 0 : Le.getBoundingClientRect().width) || 0, K = it(s), Ge = K ?? Math.max(c, Math.round(N) || c), Te = Math.min(x, Math.max(c, Ge));
1251
+ st.current = { columnId: i, startX: e.clientX, startWidth: Te, minWidth: c, maxWidth: x }, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", lt), document.addEventListener("mouseup", Ke);
1252
+ }, [E, B, lt, Ke, it]);
1253
+ H(() => () => Ke(), [Ke]);
1254
+ const tn = Dn(
1255
+ Kt(An),
1256
+ Kt(Nn, {
1257
+ coordinateGetter: Mn
1248
1258
  })
1249
- ), Ut = (e) => {
1250
- const { active: t, over: r } = e;
1251
- if (r && t.id !== r.id) {
1252
- if (t.id === W || r.id === W) {
1253
- Rt("Cannot drop columns on the Action column"), ut(null);
1259
+ ), nn = (e) => {
1260
+ const { active: t, over: s } = e;
1261
+ if (s && t.id !== s.id) {
1262
+ if (t.id === $ || s.id === $) {
1263
+ Lt("Cannot drop columns on the Action column"), yt(null);
1254
1264
  return;
1255
1265
  }
1256
- se.current = !0, Ie((i) => {
1257
- const o = i.indexOf(t.id), u = i.indexOf(r.id);
1258
- if (o !== -1 && u !== -1) {
1259
- const c = gt(i, o, u), x = ie(c);
1260
- return zt(x), x;
1266
+ se.current = !0, He((i) => {
1267
+ const n = i.indexOf(t.id), u = i.indexOf(s.id);
1268
+ if (n !== -1 && u !== -1) {
1269
+ const c = wt(i, n, u), x = ce(c);
1270
+ return $t(x), x;
1261
1271
  }
1262
1272
  return i;
1263
- }), wt((i) => {
1264
- const o = i.indexOf(t.id), u = i.indexOf(r.id);
1265
- return gt(i, o, u);
1273
+ }), Et((i) => {
1274
+ const n = i.indexOf(t.id), u = i.indexOf(s.id);
1275
+ return wt(i, n, u);
1266
1276
  });
1267
1277
  }
1268
- ut(null);
1269
- }, Xt = (e) => {
1270
- ut(e.active.id);
1271
- }, et = ge(() => {
1272
- if (K)
1273
- return n || [];
1274
- if (!n || n.length === 0)
1278
+ yt(null);
1279
+ }, rn = (e) => {
1280
+ yt(e.active.id);
1281
+ }, at = te(() => {
1282
+ if (L)
1283
+ return r || [];
1284
+ if (!r || r.length === 0)
1275
1285
  return [];
1276
- const e = Ce.trim().toLowerCase(), t = Object.entries(G).filter(([, r]) => Ue(r));
1277
- return n.filter((r) => {
1278
- for (const [i, o] of t) {
1279
- const u = r[i];
1286
+ const e = ve.trim().toLowerCase(), t = Object.entries(q).filter(([, s]) => Je(s));
1287
+ return r.filter((s) => {
1288
+ for (const [i, n] of t) {
1289
+ const u = s[i];
1280
1290
  if (u == null)
1281
1291
  return !1;
1282
- if (Array.isArray(o)) {
1292
+ if (Array.isArray(n)) {
1283
1293
  const c = String(u);
1284
- if (!o.some((x) => String(x) === c))
1294
+ if (!n.some((x) => String(x) === c))
1285
1295
  return !1;
1286
1296
  continue;
1287
1297
  }
1288
- if (o.type === "range") {
1289
- const c = St(u);
1290
- if (isNaN(c) || o.min !== "" && o.min != null && c < Number(o.min) || o.max !== "" && o.max != null && c > Number(o.max))
1298
+ if (n.type === "range") {
1299
+ const c = Rt(u);
1300
+ if (isNaN(c) || n.min !== "" && n.min != null && c < Number(n.min) || n.max !== "" && n.max != null && c > Number(n.max))
1291
1301
  return !1;
1292
1302
  continue;
1293
1303
  }
1294
- if (o.type === "durationRange") {
1295
- const c = An(u);
1296
- if (isNaN(c) || o.minSec !== "" && o.minSec != null && c < Number(o.minSec) || o.maxSec !== "" && o.maxSec != null && c > Number(o.maxSec))
1304
+ if (n.type === "durationRange") {
1305
+ const c = Yn(u);
1306
+ if (isNaN(c) || n.minSec !== "" && n.minSec != null && c < Number(n.minSec) || n.maxSec !== "" && n.maxSec != null && c > Number(n.maxSec))
1297
1307
  return !1;
1298
1308
  continue;
1299
1309
  }
1300
- if (o.type === "scoreRange") {
1301
- const c = St(u);
1310
+ if (n.type === "scoreRange") {
1311
+ const c = Rt(u);
1302
1312
  if (isNaN(c))
1303
1313
  return !1;
1304
- if (Array.isArray(o.values) && o.values.length > 0) {
1314
+ if (Array.isArray(n.values) && n.values.length > 0) {
1305
1315
  const x = Math.floor(c);
1306
- if (!o.values.includes(x))
1316
+ if (!n.values.includes(x))
1307
1317
  return !1;
1308
1318
  continue;
1309
1319
  }
1310
- if (o.min !== "" && o.min != null && c < Number(o.min) || o.max !== "" && o.max != null && c > Number(o.max))
1320
+ if (n.min !== "" && n.min != null && c < Number(n.min) || n.max !== "" && n.max != null && c > Number(n.max))
1311
1321
  return !1;
1312
1322
  continue;
1313
1323
  }
1314
- if (o.type === "dateRange") {
1315
- const c = On(u);
1324
+ if (n.type === "dateRange") {
1325
+ const c = Qn(u);
1316
1326
  if (!c)
1317
1327
  return !1;
1318
- if (o.from) {
1319
- const x = /* @__PURE__ */ new Date(o.from + "T00:00:00");
1328
+ if (n.from) {
1329
+ const x = /* @__PURE__ */ new Date(n.from + "T00:00:00");
1320
1330
  if (c < x)
1321
1331
  return !1;
1322
1332
  }
1323
- if (o.to) {
1324
- const x = /* @__PURE__ */ new Date(o.to + "T23:59:59");
1333
+ if (n.to) {
1334
+ const x = /* @__PURE__ */ new Date(n.to + "T23:59:59");
1325
1335
  if (c > x)
1326
1336
  return !1;
1327
1337
  }
1328
1338
  continue;
1329
1339
  }
1330
1340
  }
1331
- return !(e && !Object.values(r).some((o) => o == null ? !1 : String(o).toLowerCase().includes(e)));
1341
+ return !(e && !Object.values(s).some((n) => n == null ? !1 : String(n).toLowerCase().includes(e)));
1332
1342
  });
1333
- }, [n, G, Ce, K]), _e = ge(() => X || !q ? et : [...et].sort((e, t) => {
1334
- const r = e[q], i = t[q];
1335
- if (r == null)
1343
+ }, [r, q, ve, L]), Ue = te(() => Y || !_e ? at : [...at].sort((e, t) => {
1344
+ const s = e[_e], i = t[_e];
1345
+ if (s == null)
1336
1346
  return 1;
1337
1347
  if (i == null)
1338
1348
  return -1;
1339
- if (typeof r == "number" && typeof i == "number")
1340
- return Xe === "asc" ? r - i : i - r;
1341
- const o = String(r).toLowerCase(), u = String(i).toLowerCase();
1342
- return Xe === "asc" ? o.localeCompare(u) : u.localeCompare(o);
1343
- }), [et, q, Xe, X]), tt = ge(() => {
1344
- if (Z)
1345
- return _e;
1349
+ if (typeof s == "number" && typeof i == "number")
1350
+ return et === "asc" ? s - i : i - s;
1351
+ const n = String(s).toLowerCase(), u = String(i).toLowerCase();
1352
+ return et === "asc" ? n.localeCompare(u) : u.localeCompare(n);
1353
+ }), [at, _e, et, Y]), We = te(() => {
1354
+ if (ne)
1355
+ return Ue;
1346
1356
  {
1347
- const e = (ne - 1) * ce, t = e + ce;
1348
- return _e.slice(e, t);
1357
+ const e = (ze - 1) * be, t = e + be;
1358
+ return Ue.slice(e, t);
1349
1359
  }
1350
- }, [_e, ne, ce, Z]), Ct = (e) => {
1351
- X && L ? (L(e), b ? b(1) : V(1)) : (Oe === e ? $e(Te === "asc" ? "desc" : "asc") : (it(e), $e("asc")), ke(1));
1352
- }, Gt = (e, t) => {
1353
- const r = (t || "").split(/\s+/).map((i) => i.trim()).filter(Boolean);
1354
- Le(e, r);
1355
- }, Rt = (e) => {
1356
- dt.current || (typeof z == "function" && z(e), dt.current = setTimeout(() => {
1357
- dt.current = null;
1360
+ }, [Ue, ze, be, ne]), bt = A(
1361
+ (e, t) => V ? V(e, t) : (e == null ? void 0 : e.id) ?? t,
1362
+ [V]
1363
+ ), De = te(
1364
+ () => new Set(Array.isArray(Z) ? Z : []),
1365
+ [Z]
1366
+ ), Ce = te(
1367
+ () => We.map((e, t) => bt(e, t)),
1368
+ [We, bt]
1369
+ ), Wt = te(
1370
+ () => Ce.reduce((e, t) => De.has(t) ? e + 1 : e, 0),
1371
+ [Ce, De]
1372
+ ), ct = Ce.length > 0 && Wt === Ce.length, on = Wt > 0 && !ct, sn = A(
1373
+ (e) => {
1374
+ if (!G)
1375
+ return;
1376
+ const t = new Set(De);
1377
+ t.has(e) ? t.delete(e) : t.add(e), G(Array.from(t));
1378
+ },
1379
+ [G, De]
1380
+ ), ln = A(() => {
1381
+ if (!G)
1382
+ return;
1383
+ const e = new Set(De);
1384
+ ct ? Ce.forEach((t) => e.delete(t)) : Ce.forEach((t) => e.add(t)), G(Array.from(e));
1385
+ }, [G, De, ct, Ce]), Ot = ({ checked: e, indeterminate: t = !1, onToggle: s, ariaLabel: i }) => /* @__PURE__ */ o(
1386
+ "span",
1387
+ {
1388
+ role: "checkbox",
1389
+ "aria-checked": t ? "mixed" : e,
1390
+ "aria-label": i,
1391
+ tabIndex: 0,
1392
+ onClick: (n) => {
1393
+ n.stopPropagation(), s();
1394
+ },
1395
+ onKeyDown: (n) => {
1396
+ (n.key === " " || n.key === "Enter") && (n.preventDefault(), n.stopPropagation(), s());
1397
+ },
1398
+ style: {
1399
+ width: 16,
1400
+ height: 16,
1401
+ borderRadius: 5,
1402
+ display: "inline-flex",
1403
+ alignItems: "center",
1404
+ justifyContent: "center",
1405
+ background: e || t ? "#0B0B0B" : "#FFFFFF",
1406
+ border: `1px solid ${e || t ? "#0B0B0B" : "#676767"}`,
1407
+ cursor: "pointer",
1408
+ flexShrink: 0
1409
+ },
1410
+ children: t ? /* @__PURE__ */ o(jn, { size: 11, color: "#FFFFFF", strokeWidth: 3 }) : e ? /* @__PURE__ */ o(Ye, { size: 11, color: "#FFFFFF", strokeWidth: 3 }) : null
1411
+ }
1412
+ ), dt = 44, Tt = (e) => {
1413
+ Y && j ? (j(e), b ? b(1) : he(1)) : (Ze === e ? g(m === "asc" ? "desc" : "asc") : (h(e), g("asc")), Be(1));
1414
+ }, an = (e, t) => {
1415
+ const s = (t || "").split(/\s+/).map((i) => i.trim()).filter(Boolean);
1416
+ F(e, s);
1417
+ }, Lt = (e) => {
1418
+ gt.current || (typeof z == "function" && z(e), gt.current = setTimeout(() => {
1419
+ gt.current = null;
1358
1420
  }, 3e3));
1359
- }, zt = P((e) => {
1421
+ }, $t = A((e) => {
1360
1422
  if (typeof window < "u" && re && e.length > 0 && se.current)
1361
1423
  try {
1362
- localStorage.setItem(re, JSON.stringify(e)), de && localStorage.setItem(de, "true");
1424
+ localStorage.setItem(re, JSON.stringify(e)), ie && localStorage.setItem(ie, "true");
1363
1425
  } catch (t) {
1364
1426
  console.warn("Failed to save columns to localStorage:", t);
1365
1427
  }
1366
- }, [re, de]), Et = 250, nt = () => {
1367
- Object.values(me.current).forEach((e) => clearTimeout(e)), me.current = {};
1368
- }, Jt = () => {
1369
- const e = pe.filter((t) => !Je.has(t));
1370
- return Ge.forEach((t) => {
1428
+ }, [re, ie]), Pt = 250, ut = () => {
1429
+ Object.values(ge.current).forEach((e) => clearTimeout(e)), ge.current = {};
1430
+ }, cn = () => {
1431
+ const e = me.filter((t) => !nt.has(t));
1432
+ return tt.forEach((t) => {
1371
1433
  e.includes(t) || e.push(t);
1372
- }), ie(e);
1373
- }, Yt = (e) => {
1374
- if (e === W)
1434
+ }), ce(e);
1435
+ }, dn = (e) => {
1436
+ if (e === $)
1375
1437
  return;
1376
- if (me.current[e]) {
1377
- clearTimeout(me.current[e]), delete me.current[e], ze((r) => {
1378
- const i = new Set(r);
1438
+ if (ge.current[e]) {
1439
+ clearTimeout(ge.current[e]), delete ge.current[e], Me((s) => {
1440
+ const i = new Set(s);
1379
1441
  return i.delete(e), i;
1380
- }), Ee((r) => {
1381
- const i = new Set(r);
1442
+ }), Ne((s) => {
1443
+ const i = new Set(s);
1382
1444
  return i.delete(e), i;
1383
1445
  });
1384
1446
  return;
1385
1447
  }
1386
- if (pe.includes(e)) {
1387
- if (pe.length - Je.size <= 1)
1448
+ if (me.includes(e)) {
1449
+ if (me.length - nt.size <= 1)
1388
1450
  return;
1389
- Ee((i) => new Set(i).add(e)), me.current[e] = setTimeout(() => {
1390
- Re((i) => i.filter((o) => o !== e)), Ee((i) => {
1391
- const o = new Set(i);
1392
- return o.delete(e), o;
1393
- }), delete me.current[e];
1394
- }, Et);
1451
+ Ne((i) => new Set(i).add(e)), ge.current[e] = setTimeout(() => {
1452
+ Ee((i) => i.filter((n) => n !== e)), Ne((i) => {
1453
+ const n = new Set(i);
1454
+ return n.delete(e), n;
1455
+ }), delete ge.current[e];
1456
+ }, Pt);
1395
1457
  } else {
1396
- if (pe.length + Ge.size >= Q) {
1397
- Rt("Maximum 9 column selection allowed");
1458
+ if (me.length + tt.size >= Q) {
1459
+ Lt("Maximum 9 column selection allowed");
1398
1460
  return;
1399
1461
  }
1400
- ze((i) => new Set(i).add(e)), me.current[e] = setTimeout(() => {
1401
- Re((i) => ie([...i, e])), ze((i) => {
1402
- const o = new Set(i);
1403
- return o.delete(e), o;
1404
- }), delete me.current[e];
1405
- }, Et);
1462
+ Me((i) => new Set(i).add(e)), ge.current[e] = setTimeout(() => {
1463
+ Ee((i) => ce([...i, e])), Me((i) => {
1464
+ const n = new Set(i);
1465
+ return n.delete(e), n;
1466
+ }), delete ge.current[e];
1467
+ }, Pt);
1406
1468
  }
1407
- }, Qt = (e, t) => {
1408
- pe[t] !== W && at(t);
1409
- }, qt = () => {
1410
- at(null), Qe(null);
1411
- }, Zt = (e, t) => {
1412
- e.preventDefault(), he !== null && he !== t && Qe(t);
1413
- }, Vt = () => {
1414
- Qe(null);
1415
- }, en = (e, t) => {
1416
- e.preventDefault(), he !== null && he !== t && pe[t] !== W && pe[he] !== W && Re((r) => {
1417
- const i = gt(r, he, t);
1418
- return ie(i);
1419
- }), at(null), Qe(null);
1469
+ }, un = (e, t) => {
1470
+ me[t] !== $ && ht(t);
1471
+ }, fn = () => {
1472
+ ht(null), ot(null);
1473
+ }, pn = (e, t) => {
1474
+ e.preventDefault(), ye !== null && ye !== t && ot(t);
1475
+ }, hn = () => {
1476
+ ot(null);
1477
+ }, mn = (e, t) => {
1478
+ e.preventDefault(), ye !== null && ye !== t && me[t] !== $ && me[ye] !== $ && Ee((s) => {
1479
+ const i = wt(s, ye, t);
1480
+ return ce(i);
1481
+ }), ht(null), ot(null);
1420
1482
  };
1421
- I(() => {
1422
- wt((e) => {
1423
- const t = $.filter((o) => e.includes(o)), r = $.filter((o) => !e.includes(o)), i = e.filter((o) => !$.includes(o));
1424
- return [...t, ...r, ...i];
1483
+ H(() => {
1484
+ Et((e) => {
1485
+ const t = I.filter((n) => e.includes(n)), s = I.filter((n) => !e.includes(n)), i = e.filter((n) => !I.includes(n));
1486
+ return [...t, ...s, ...i];
1425
1487
  });
1426
- }, [$]), I(() => {
1427
- if (typeof window < "u" && re && $.length > 0 && se.current)
1488
+ }, [I]), H(() => {
1489
+ if (typeof window < "u" && re && I.length > 0 && se.current)
1428
1490
  try {
1429
- const e = ie($);
1430
- localStorage.setItem(re, JSON.stringify(e)), de && localStorage.setItem(de, "true");
1491
+ const e = ce(I);
1492
+ localStorage.setItem(re, JSON.stringify(e)), ie && localStorage.setItem(ie, "true");
1431
1493
  } catch (e) {
1432
1494
  console.warn("Failed to save columns to localStorage:", e);
1433
1495
  }
1434
- }, [$, re, de]), I(() => {
1435
- ae && ae(
1436
- $.filter((e) => e !== W)
1496
+ }, [I, re, ie]), H(() => {
1497
+ ue && ue(
1498
+ I.filter((e) => e !== $)
1437
1499
  );
1438
- }, [$, ae]), I(() => {
1439
- if (l.length > 0 && $.length === 0) {
1500
+ }, [I, ue]), H(() => {
1501
+ if (l.length > 0 && I.length === 0) {
1440
1502
  if (typeof window < "u" && w)
1441
1503
  try {
1442
- if (localStorage.getItem(`dataTable_manual_change_${w}:${O}`) === "true") {
1443
- const r = localStorage.getItem(`dataTable_columns_${w}:${O}`);
1444
- if (r) {
1445
- const i = JSON.parse(r);
1504
+ if (localStorage.getItem(`dataTable_manual_change_${w}:${_}`) === "true") {
1505
+ const s = localStorage.getItem(`dataTable_columns_${w}:${_}`);
1506
+ if (s) {
1507
+ const i = JSON.parse(s);
1446
1508
  if (Array.isArray(i) && i.length > 0) {
1447
- const o = i.filter(
1509
+ const n = i.filter(
1448
1510
  (u) => l.some((c) => (c.id || c.key) === u)
1449
1511
  );
1450
- if (o.length > 0) {
1451
- se.current = !0, Ie(o.slice(0, Q));
1512
+ if (n.length > 0) {
1513
+ se.current = !0, He(n.slice(0, Q));
1452
1514
  return;
1453
1515
  }
1454
1516
  }
@@ -1458,20 +1520,20 @@ function rr({
1458
1520
  console.warn("Failed to load saved columns from localStorage:", t);
1459
1521
  }
1460
1522
  const e = l.map((t) => t.id || t.key);
1461
- Ie(ie(e.slice(0, Q)));
1523
+ He(ce(e.slice(0, Q)));
1462
1524
  }
1463
- }, [l, w, O, ie]);
1464
- const Be = ge(() => {
1465
- const e = $.map((t) => l.find((r) => J(r) === t)).filter(Boolean);
1466
- return ie(e.map(J)).map((t) => l.find((r) => J(r) === t)).filter(Boolean);
1467
- }, [l, $]);
1468
- ge(() => Be.some((e) => e.filterable === !0), [Be]), I(() => {
1469
- if (!le || !Me.current)
1525
+ }, [l, w, _, ce]);
1526
+ const Oe = te(() => {
1527
+ const e = I.map((t) => l.find((s) => J(s) === t)).filter(Boolean);
1528
+ return ce(e.map(J)).map((t) => l.find((s) => J(s) === t)).filter(Boolean);
1529
+ }, [l, I]);
1530
+ te(() => Oe.some((e) => e.filterable === !0), [Oe]), H(() => {
1531
+ if (!de || !Ae.current)
1470
1532
  return;
1471
1533
  const e = () => {
1472
- if (Me.current) {
1473
- const t = Me.current.getBoundingClientRect(), r = 217, i = Math.max(8, t.right - r);
1474
- Pt({
1534
+ if (Ae.current) {
1535
+ const t = Ae.current.getBoundingClientRect(), s = 217, i = Math.max(8, t.right - s);
1536
+ Qt({
1475
1537
  top: t.bottom,
1476
1538
  left: i,
1477
1539
  width: Math.max(t.width || 220, 220)
@@ -1481,68 +1543,68 @@ function rr({
1481
1543
  return e(), window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
1482
1544
  window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
1483
1545
  };
1484
- }, [le]), I(() => {
1546
+ }, [de]), H(() => {
1485
1547
  const e = (t) => {
1486
- le && Me.current && !Me.current.contains(t.target) && ct.current && !ct.current.contains(t.target) && lt(!1);
1548
+ de && Ae.current && !Ae.current.contains(t.target) && mt.current && !mt.current.contains(t.target) && pt(!1);
1487
1549
  };
1488
- if (le)
1550
+ if (de)
1489
1551
  return document.addEventListener("mousedown", e), () => {
1490
1552
  document.removeEventListener("mousedown", e);
1491
1553
  };
1492
- }, [le]), I(() => {
1493
- le && (nt(), Re($), ze(/* @__PURE__ */ new Set()), Ee(/* @__PURE__ */ new Set()));
1494
- }, [le, $]), I(() => () => nt(), []), $.length === 1 ? (Wt = l.find((e) => (e.id || e.key) === $[0])) != null && Wt.label : `${$.length}`;
1495
- function tn({ column: e, isHeaderRow: t = !0 }) {
1496
- const r = J(e), i = r === W, o = Dt(r, e.width), [u, c] = g(!1), {
1554
+ }, [de]), H(() => {
1555
+ de && (ut(), Ee(I), Me(/* @__PURE__ */ new Set()), Ne(/* @__PURE__ */ new Set()));
1556
+ }, [de, I]), H(() => () => ut(), []), I.length === 1 ? (Ht = l.find((e) => (e.id || e.key) === I[0])) != null && Ht.label : `${I.length}`;
1557
+ function gn({ column: e, isHeaderRow: t = !0 }) {
1558
+ const s = J(e), i = s === $, n = At(s, e.width), [u, c] = y(!1), {
1497
1559
  attributes: x,
1498
- listeners: j,
1499
- setNodeRef: _,
1500
- transform: Ke,
1501
- transition: pt,
1502
- isDragging: rt
1503
- } = vn({ id: r }), rn = {
1504
- transform: Sn.Transform.toString(Ke),
1505
- transition: pt,
1506
- opacity: rt ? 0.5 : 1,
1507
- width: o,
1508
- minWidth: o
1560
+ listeners: N,
1561
+ setNodeRef: K,
1562
+ transform: Ge,
1563
+ transition: Te,
1564
+ isDragging: Le
1565
+ } = Wn({ id: s }), xn = {
1566
+ transform: On.Transform.toString(Ge),
1567
+ transition: Te,
1568
+ opacity: Le ? 0.5 : 1,
1569
+ width: n,
1570
+ minWidth: n
1509
1571
  };
1510
- let Ne = !1;
1511
- if (X && D.length > 0) {
1572
+ let $e = !1;
1573
+ if (Y && D.length > 0) {
1512
1574
  const R = D[0][0];
1513
- (R === r || R === "csat_score" && r === "evaluation.csat_score") && (Ne = !0);
1575
+ (R === s || R === "csat_score" && s === "evaluation.csat_score") && ($e = !0);
1514
1576
  } else
1515
- Ne = q === r;
1516
- const on = Xe === "asc", sn = e.filterable === !0;
1577
+ $e = _e === s;
1578
+ const bn = et === "asc", vn = e.filterable === !0;
1517
1579
  if (!t)
1518
- return /* @__PURE__ */ s(
1580
+ return /* @__PURE__ */ o(
1519
1581
  "th",
1520
1582
  {
1521
1583
  style: {
1522
- width: o,
1523
- minWidth: o,
1584
+ width: n,
1585
+ minWidth: n,
1524
1586
  backgroundColor: "var(--primary-foreground)",
1525
1587
  borderRight: "1px solid #e6e6e6",
1526
1588
  borderBottom: "1px solid #e6e6e6",
1527
1589
  boxSizing: "border-box"
1528
1590
  },
1529
1591
  className: "sticky top-[57px] z-10 border-b border-[var(--border-strong)] px-4 py-2 text-left",
1530
- children: sn ? /* @__PURE__ */ m("div", { className: "relative", children: [
1531
- /* @__PURE__ */ s(
1592
+ children: vn ? /* @__PURE__ */ p("div", { className: "relative", children: [
1593
+ /* @__PURE__ */ o(
1532
1594
  Filter,
1533
1595
  {
1534
1596
  size: 12,
1535
1597
  className: "absolute left-2 top-1/2 -translate-y-1/2 text-[var(--text-faint)] pointer-events-none"
1536
1598
  }
1537
1599
  ),
1538
- /* @__PURE__ */ s(
1600
+ /* @__PURE__ */ o(
1539
1601
  "input",
1540
1602
  {
1541
1603
  type: "text",
1542
1604
  placeholder: "Filter...",
1543
- value: G[r] || "",
1605
+ value: q[s] || "",
1544
1606
  onChange: (R) => {
1545
- R.stopPropagation(), Gt(r, R.target.value);
1607
+ R.stopPropagation(), an(s, R.target.value);
1546
1608
  },
1547
1609
  onKeyDown: (R) => R.stopPropagation(),
1548
1610
  onMouseDown: (R) => R.stopPropagation(),
@@ -1551,18 +1613,18 @@ function rr({
1551
1613
  autoComplete: "off"
1552
1614
  }
1553
1615
  )
1554
- ] }) : /* @__PURE__ */ s("div", { className: "h-[34px]" })
1616
+ ] }) : /* @__PURE__ */ o("div", { className: "h-[34px]" })
1555
1617
  }
1556
1618
  );
1557
- const mt = A === r, ot = Ue(G[r]), ln = e.sortable !== !1 && (u || Ne), an = e.filterable !== !1 && !i && (u || mt || ot);
1558
- return /* @__PURE__ */ m(
1619
+ const vt = M === s, ft = Je(q[s]), Sn = e.sortable !== !1 && (u || $e), wn = e.filterable !== !1 && !i && (u || vt || ft);
1620
+ return /* @__PURE__ */ p(
1559
1621
  "th",
1560
1622
  {
1561
- ref: _,
1623
+ ref: K,
1562
1624
  onMouseEnter: () => c(!0),
1563
1625
  onMouseLeave: () => c(!1),
1564
1626
  style: {
1565
- ...rn,
1627
+ ...xn,
1566
1628
  padding: "0 12px",
1567
1629
  height: 36,
1568
1630
  textAlign: i ? "center" : "left",
@@ -1572,8 +1634,8 @@ function rr({
1572
1634
  textTransform: "none",
1573
1635
  color: "#0b0b0b",
1574
1636
  cursor: e.sortable !== !1 ? "pointer" : "default",
1575
- width: o,
1576
- ...typeof o == "string" && o.endsWith("px") ? { maxWidth: o } : {},
1637
+ width: n,
1638
+ ...typeof n == "string" && n.endsWith("px") ? { maxWidth: n } : {},
1577
1639
  borderRight: "1px solid #e6e6e6",
1578
1640
  boxSizing: "border-box",
1579
1641
  userSelect: "none",
@@ -1581,7 +1643,7 @@ function rr({
1581
1643
  wordBreak: "normal",
1582
1644
  overflowWrap: "normal",
1583
1645
  verticalAlign: "middle",
1584
- background: u || mt ? "#e6e6e6" : "#f2f2f0",
1646
+ background: u || vt ? "#e6e6e6" : "#f2f2f0",
1585
1647
  borderBottom: "1px solid #e6e6e6",
1586
1648
  position: "sticky",
1587
1649
  top: 0,
@@ -1590,7 +1652,7 @@ function rr({
1590
1652
  transition: "background 100ms ease"
1591
1653
  },
1592
1654
  children: [
1593
- !i && /* @__PURE__ */ s(
1655
+ !i && /* @__PURE__ */ o(
1594
1656
  "span",
1595
1657
  {
1596
1658
  "aria-hidden": "true",
@@ -1607,7 +1669,7 @@ function rr({
1607
1669
  }
1608
1670
  }
1609
1671
  ),
1610
- /* @__PURE__ */ m(
1672
+ /* @__PURE__ */ p(
1611
1673
  "div",
1612
1674
  {
1613
1675
  style: {
@@ -1622,11 +1684,11 @@ function rr({
1622
1684
  overflow: "hidden"
1623
1685
  },
1624
1686
  children: [
1625
- !i && /* @__PURE__ */ s(
1687
+ !i && /* @__PURE__ */ o(
1626
1688
  "div",
1627
1689
  {
1628
1690
  ...x,
1629
- ...j,
1691
+ ...N,
1630
1692
  style: {
1631
1693
  cursor: "grab",
1632
1694
  color: "rgba(11, 11, 11, 0.36)",
@@ -1635,13 +1697,13 @@ function rr({
1635
1697
  visibility: u ? "visible" : "hidden",
1636
1698
  flexShrink: 0
1637
1699
  },
1638
- children: /* @__PURE__ */ s(yt, { size: 14 })
1700
+ children: /* @__PURE__ */ o(Ft, { size: 14 })
1639
1701
  }
1640
1702
  ),
1641
- /* @__PURE__ */ s(
1703
+ /* @__PURE__ */ o(
1642
1704
  "span",
1643
1705
  {
1644
- onClick: () => e.sortable !== !1 && Ct(r),
1706
+ onClick: () => e.sortable !== !1 && Tt(s),
1645
1707
  title: typeof e.label == "string" ? e.label : void 0,
1646
1708
  style: {
1647
1709
  cursor: e.sortable !== !1 ? "pointer" : "default",
@@ -1655,12 +1717,12 @@ function rr({
1655
1717
  children: e.label
1656
1718
  }
1657
1719
  ),
1658
- ln && /* @__PURE__ */ s(
1720
+ Sn && /* @__PURE__ */ o(
1659
1721
  "button",
1660
1722
  {
1661
1723
  type: "button",
1662
1724
  onClick: (R) => {
1663
- R.stopPropagation(), Ct(r);
1725
+ R.stopPropagation(), Tt(s);
1664
1726
  },
1665
1727
  title: "Sort",
1666
1728
  style: {
@@ -1672,26 +1734,26 @@ function rr({
1672
1734
  display: "inline-flex",
1673
1735
  alignItems: "center",
1674
1736
  justifyContent: "center",
1675
- color: Ne ? "#0b0b0b" : "rgba(11, 11, 11, 0.55)",
1737
+ color: $e ? "#0b0b0b" : "rgba(11, 11, 11, 0.55)",
1676
1738
  flexShrink: 0
1677
1739
  },
1678
- children: Ne ? on ? /* @__PURE__ */ s(Rn, { size: 14, strokeWidth: 1.75 }) : /* @__PURE__ */ s(zn, { size: 14, strokeWidth: 1.75 }) : /* @__PURE__ */ s(En, { size: 14, strokeWidth: 1.75 })
1740
+ children: $e ? bn ? /* @__PURE__ */ o(_n, { size: 14, strokeWidth: 1.75 }) : /* @__PURE__ */ o(Hn, { size: 14, strokeWidth: 1.75 }) : /* @__PURE__ */ o(Kn, { size: 14, strokeWidth: 1.75 })
1679
1741
  }
1680
1742
  ),
1681
- an && /* @__PURE__ */ m(
1743
+ wn && /* @__PURE__ */ p(
1682
1744
  "button",
1683
1745
  {
1684
1746
  type: "button",
1685
1747
  ref: (R) => {
1686
- ve.current[r] = R;
1748
+ we.current[s] = R;
1687
1749
  },
1688
1750
  onClick: (R) => {
1689
- R.stopPropagation(), T(r, R.currentTarget);
1751
+ R.stopPropagation(), Yt(s, R.currentTarget);
1690
1752
  },
1691
1753
  title: "Filter",
1692
1754
  style: {
1693
1755
  position: "relative",
1694
- background: mt || ot ? "#D8D8D8" : "transparent",
1756
+ background: vt || ft ? "#D8D8D8" : "transparent",
1695
1757
  border: "none",
1696
1758
  padding: 4,
1697
1759
  borderRadius: 4,
@@ -1699,12 +1761,12 @@ function rr({
1699
1761
  display: "inline-flex",
1700
1762
  alignItems: "center",
1701
1763
  justifyContent: "center",
1702
- color: ot ? "#0b0b0b" : "rgba(11, 11, 11, 0.7)",
1764
+ color: ft ? "#0b0b0b" : "rgba(11, 11, 11, 0.7)",
1703
1765
  flexShrink: 0
1704
1766
  },
1705
1767
  children: [
1706
- /* @__PURE__ */ s(Mn, { size: 14, strokeWidth: 1.75 }),
1707
- ot && /* @__PURE__ */ s(
1768
+ /* @__PURE__ */ o(Un, { size: 14, strokeWidth: 1.75 }),
1769
+ ft && /* @__PURE__ */ o(
1708
1770
  "span",
1709
1771
  {
1710
1772
  "aria-hidden": "true",
@@ -1725,7 +1787,7 @@ function rr({
1725
1787
  ]
1726
1788
  }
1727
1789
  ),
1728
- !i && /* @__PURE__ */ s(
1790
+ !i && /* @__PURE__ */ o(
1729
1791
  "span",
1730
1792
  {
1731
1793
  "aria-hidden": "true",
@@ -1742,14 +1804,14 @@ function rr({
1742
1804
  }
1743
1805
  }
1744
1806
  ),
1745
- !i && /* @__PURE__ */ s(
1807
+ !i && /* @__PURE__ */ o(
1746
1808
  "div",
1747
1809
  {
1748
1810
  role: "separator",
1749
1811
  "aria-orientation": "vertical",
1750
- "aria-label": `Resize ${e.label || r} column`,
1812
+ "aria-label": `Resize ${e.label || s} column`,
1751
1813
  title: "Drag to resize column",
1752
- onMouseDown: (R) => Ht(R, e, o),
1814
+ onMouseDown: (R) => en(R, e, n),
1753
1815
  onClick: (R) => R.stopPropagation(),
1754
1816
  onMouseEnter: (R) => {
1755
1817
  R.currentTarget.style.background = "rgba(30, 33, 37, 0.18)";
@@ -1773,34 +1835,34 @@ function rr({
1773
1835
  }
1774
1836
  );
1775
1837
  }
1776
- const Mt = kt ? l.find((e) => J(e) === kt) : null, Bt = ({ col: e, columnId: t, isSelected: r, draggable: i, isAction: o, actualIndex: u }) => {
1777
- const c = i && he === u, x = i && It === u && he !== null && he !== u;
1778
- r ? Je.has(t) : Ge.has(t);
1779
- const j = r ? !Je.has(t) : Ge.has(t);
1780
- return /* @__PURE__ */ m(
1838
+ const It = Nt ? l.find((e) => J(e) === Nt) : null, jt = ({ col: e, columnId: t, isSelected: s, draggable: i, isAction: n, actualIndex: u }) => {
1839
+ const c = i && ye === u, x = i && qt === u && ye !== null && ye !== u;
1840
+ s ? nt.has(t) : tt.has(t);
1841
+ const N = s ? !nt.has(t) : tt.has(t);
1842
+ return /* @__PURE__ */ p(
1781
1843
  "div",
1782
1844
  {
1783
1845
  draggable: i,
1784
- onDragStart: i ? (_) => Qt(_, u) : void 0,
1785
- onDragEnd: i ? qt : void 0,
1786
- onDragOver: i ? (_) => Zt(_, u) : void 0,
1787
- onDragLeave: i ? Vt : void 0,
1788
- onDrop: i ? (_) => en(_, u) : void 0,
1846
+ onDragStart: i ? (K) => un(K, u) : void 0,
1847
+ onDragEnd: i ? fn : void 0,
1848
+ onDragOver: i ? (K) => pn(K, u) : void 0,
1849
+ onDragLeave: i ? hn : void 0,
1850
+ onDrop: i ? (K) => mn(K, u) : void 0,
1789
1851
  onClick: () => {
1790
- o || Yt(t);
1852
+ n || dn(t);
1791
1853
  },
1792
1854
  style: {
1793
1855
  display: "flex",
1794
1856
  alignItems: "center",
1795
1857
  gap: 4,
1796
1858
  padding: "2px 0",
1797
- cursor: o ? "default" : i ? "grab" : "pointer",
1859
+ cursor: n ? "default" : i ? "grab" : "pointer",
1798
1860
  opacity: c ? 0.5 : 1,
1799
1861
  background: x ? "#F2F2F0" : "transparent",
1800
1862
  borderRadius: 6
1801
1863
  },
1802
1864
  children: [
1803
- /* @__PURE__ */ s(
1865
+ /* @__PURE__ */ o(
1804
1866
  "span",
1805
1867
  {
1806
1868
  style: {
@@ -1813,10 +1875,10 @@ function rr({
1813
1875
  visibility: i ? "visible" : "hidden",
1814
1876
  flexShrink: 0
1815
1877
  },
1816
- children: /* @__PURE__ */ s(yt, { size: 14, strokeWidth: 1.75 })
1878
+ children: /* @__PURE__ */ o(Ft, { size: 14, strokeWidth: 1.75 })
1817
1879
  }
1818
1880
  ),
1819
- /* @__PURE__ */ s(
1881
+ /* @__PURE__ */ o(
1820
1882
  "span",
1821
1883
  {
1822
1884
  style: {
@@ -1826,15 +1888,15 @@ function rr({
1826
1888
  display: "inline-flex",
1827
1889
  alignItems: "center",
1828
1890
  justifyContent: "center",
1829
- background: j ? "#0B0B0B" : "#FFFFFF",
1830
- border: `1px solid ${j ? "#0B0B0B" : "#676767"}`,
1891
+ background: N ? "#0B0B0B" : "#FFFFFF",
1892
+ border: `1px solid ${N ? "#0B0B0B" : "#676767"}`,
1831
1893
  flexShrink: 0,
1832
1894
  marginLeft: 8
1833
1895
  },
1834
- children: j && /* @__PURE__ */ s(st, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
1896
+ children: N && /* @__PURE__ */ o(Ye, { size: 14, color: "#FFFFFF", strokeWidth: 3 })
1835
1897
  }
1836
1898
  ),
1837
- /* @__PURE__ */ s(
1899
+ /* @__PURE__ */ o(
1838
1900
  "span",
1839
1901
  {
1840
1902
  style: {
@@ -1851,14 +1913,14 @@ function rr({
1851
1913
  ]
1852
1914
  }
1853
1915
  );
1854
- }, nn = le ? /* @__PURE__ */ m(
1916
+ }, yn = de ? /* @__PURE__ */ p(
1855
1917
  "div",
1856
1918
  {
1857
- ref: ct,
1919
+ ref: mt,
1858
1920
  style: {
1859
1921
  position: "fixed",
1860
- top: `${Ft.top}px`,
1861
- left: `${Ft.left}px`,
1922
+ top: `${Mt.top}px`,
1923
+ left: `${Mt.left}px`,
1862
1924
  width: 217,
1863
1925
  maxHeight: 320,
1864
1926
  zIndex: 49,
@@ -1872,7 +1934,7 @@ function rr({
1872
1934
  boxShadow: "0 8px 24px rgba(11, 11, 11, 0.08)"
1873
1935
  },
1874
1936
  children: [
1875
- /* @__PURE__ */ m(
1937
+ /* @__PURE__ */ p(
1876
1938
  "div",
1877
1939
  {
1878
1940
  style: {
@@ -1885,12 +1947,12 @@ function rr({
1885
1947
  gap: 12
1886
1948
  },
1887
1949
  children: [
1888
- pe.map((e, t) => {
1889
- if (e === W)
1950
+ me.map((e, t) => {
1951
+ if (e === $)
1890
1952
  return null;
1891
- const r = l.find((i) => J(i) === e);
1892
- return r ? /* @__PURE__ */ s(ht.Fragment, { children: Bt({
1893
- col: r,
1953
+ const s = l.find((i) => J(i) === e);
1954
+ return s ? /* @__PURE__ */ o(St.Fragment, { children: jt({
1955
+ col: s,
1894
1956
  columnId: e,
1895
1957
  isSelected: !0,
1896
1958
  draggable: !0,
@@ -1900,10 +1962,10 @@ function rr({
1900
1962
  }),
1901
1963
  l.filter((e) => {
1902
1964
  const t = J(e);
1903
- return t !== W && !pe.includes(t);
1965
+ return t !== $ && !me.includes(t);
1904
1966
  }).map((e) => {
1905
1967
  const t = J(e);
1906
- return /* @__PURE__ */ s(ht.Fragment, { children: Bt({
1968
+ return /* @__PURE__ */ o(St.Fragment, { children: jt({
1907
1969
  col: e,
1908
1970
  columnId: t,
1909
1971
  isSelected: !1,
@@ -1915,7 +1977,7 @@ function rr({
1915
1977
  ]
1916
1978
  }
1917
1979
  ),
1918
- /* @__PURE__ */ m(
1980
+ /* @__PURE__ */ p(
1919
1981
  "div",
1920
1982
  {
1921
1983
  style: {
@@ -1930,14 +1992,14 @@ function rr({
1930
1992
  boxSizing: "border-box"
1931
1993
  },
1932
1994
  children: [
1933
- /* @__PURE__ */ s(
1995
+ /* @__PURE__ */ o(
1934
1996
  "button",
1935
1997
  {
1936
1998
  type: "button",
1937
1999
  onClick: (e) => {
1938
2000
  e.preventDefault(), e.stopPropagation();
1939
- const t = Ye.current ? [...Ye.current] : l.map(J).slice(0, Q), r = ie(t);
1940
- if (se.current = !1, nt(), Re(r), Ie(r), ze(/* @__PURE__ */ new Set()), Ee(/* @__PURE__ */ new Set()), typeof window < "u" && re)
2001
+ const t = rt.current ? [...rt.current] : l.map(J).slice(0, Q), s = ce(t);
2002
+ if (se.current = !1, ut(), Ee(s), He(s), Me(/* @__PURE__ */ new Set()), Ne(/* @__PURE__ */ new Set()), typeof window < "u" && re)
1941
2003
  try {
1942
2004
  localStorage.removeItem(re);
1943
2005
  } catch {
@@ -1956,14 +2018,14 @@ function rr({
1956
2018
  children: "Reset"
1957
2019
  }
1958
2020
  ),
1959
- /* @__PURE__ */ s(
2021
+ /* @__PURE__ */ o(
1960
2022
  "button",
1961
2023
  {
1962
2024
  type: "button",
1963
2025
  onClick: (e) => {
1964
- e.preventDefault(), e.stopPropagation(), nt();
1965
- const t = Jt();
1966
- Re(t), ze(/* @__PURE__ */ new Set()), Ee(/* @__PURE__ */ new Set()), se.current = !0, Ie(t), zt(t), lt(!1);
2026
+ e.preventDefault(), e.stopPropagation(), ut();
2027
+ const t = cn();
2028
+ Ee(t), Me(/* @__PURE__ */ new Set()), Ne(/* @__PURE__ */ new Set()), se.current = !0, He(t), $t(t), pt(!1);
1967
2029
  },
1968
2030
  style: {
1969
2031
  background: "#2E3236",
@@ -1985,28 +2047,28 @@ function rr({
1985
2047
  )
1986
2048
  ]
1987
2049
  }
1988
- ) : null, He = A ? l.find((e) => J(e) === A) : null, Nt = He ? /* @__PURE__ */ s(
1989
- _n,
2050
+ ) : null, Xe = M ? l.find((e) => J(e) === M) : null, _t = Xe ? /* @__PURE__ */ o(
2051
+ rr,
1990
2052
  {
1991
- column: He,
1992
- columnId: A,
1993
- filterType: y(A),
1994
- position: Se,
1995
- popoverRef: we,
1996
- distinctValues: h(A),
1997
- initialValue: G[A],
1998
- onSearch: typeof He.onFilterSearch == "function" ? He.onFilterSearch : null,
1999
- searchMinChars: He.filterSearchMinChars ?? 3,
2053
+ column: Xe,
2054
+ columnId: M,
2055
+ filterType: Ve(M),
2056
+ position: Ie,
2057
+ popoverRef: ke,
2058
+ distinctValues: ae(M),
2059
+ initialValue: q[M],
2060
+ onSearch: typeof Xe.onFilterSearch == "function" ? Xe.onFilterSearch : null,
2061
+ searchMinChars: Xe.filterSearchMinChars ?? 3,
2000
2062
  onApply: (e) => {
2001
- Le(A, e), ue(null);
2063
+ F(M, e), Se(null);
2002
2064
  },
2003
- onCancel: () => ue(null)
2065
+ onCancel: () => Se(null)
2004
2066
  },
2005
- A
2067
+ M
2006
2068
  ) : null;
2007
- return /* @__PURE__ */ m("div", { className: "w-full", children: [
2008
- Nt && vt(Nt, document.body),
2009
- l.length > 0 && (H || !ye) && /* @__PURE__ */ s(
2069
+ return /* @__PURE__ */ p("div", { className: "w-full", children: [
2070
+ _t && Ct(_t, document.body),
2071
+ l.length > 0 && (T || !xe) && /* @__PURE__ */ o(
2010
2072
  "div",
2011
2073
  {
2012
2074
  className: "pt-2 pb-1",
@@ -2015,7 +2077,7 @@ function rr({
2015
2077
  zIndex: 35,
2016
2078
  backgroundColor: "var(--primary-foreground)"
2017
2079
  },
2018
- children: /* @__PURE__ */ m(
2080
+ children: /* @__PURE__ */ p(
2019
2081
  "div",
2020
2082
  {
2021
2083
  style: {
@@ -2026,23 +2088,24 @@ function rr({
2026
2088
  flexWrap: "wrap"
2027
2089
  },
2028
2090
  children: [
2029
- H && /* @__PURE__ */ s("div", { style: { marginRight: "auto" }, children: /* @__PURE__ */ s(
2030
- Wn,
2091
+ T && /* @__PURE__ */ o("div", { style: { marginRight: "auto" }, children: /* @__PURE__ */ o(
2092
+ Jn,
2031
2093
  {
2032
- dateRangePicker: H.dateRangePicker,
2033
- onWeekToDate: H.onWeekToDate,
2034
- exportConfig: H.exportConfig,
2035
- filterChipsConfig: H.filterChipsConfig,
2036
- trailingActions: H.trailingActions
2094
+ dateRangePicker: T.dateRangePicker,
2095
+ onWeekToDate: T.onWeekToDate,
2096
+ exportConfig: T.exportConfig,
2097
+ filterChipsConfig: T.filterChipsConfig,
2098
+ trailingActions: T.trailingActions
2037
2099
  }
2038
2100
  ) }),
2039
- !ye && /* @__PURE__ */ m("div", { style: { position: "relative" }, children: [
2040
- /* @__PURE__ */ m(
2101
+ (T == null ? void 0 : T.rightActions) && /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", gap: 12, flexShrink: 0 }, children: T.rightActions }),
2102
+ !xe && /* @__PURE__ */ p("div", { style: { position: "relative" }, children: [
2103
+ /* @__PURE__ */ p(
2041
2104
  "button",
2042
2105
  {
2043
- ref: Me,
2106
+ ref: Ae,
2044
2107
  type: "button",
2045
- onClick: () => lt(!le),
2108
+ onClick: () => pt(!de),
2046
2109
  style: {
2047
2110
  display: "inline-flex",
2048
2111
  alignItems: "center",
@@ -2060,19 +2123,19 @@ function rr({
2060
2123
  whiteSpace: "nowrap"
2061
2124
  },
2062
2125
  children: [
2063
- /* @__PURE__ */ s(kn, { size: 20, strokeWidth: 1.75 }),
2126
+ /* @__PURE__ */ o($n, { size: 20, strokeWidth: 1.75 }),
2064
2127
  "Columns"
2065
2128
  ]
2066
2129
  }
2067
2130
  ),
2068
- le && vt(nn, document.body)
2131
+ de && Ct(yn, document.body)
2069
2132
  ] })
2070
2133
  ]
2071
2134
  }
2072
2135
  )
2073
2136
  }
2074
2137
  ),
2075
- Object.keys(G).length > 0 && /* @__PURE__ */ m(
2138
+ Object.keys(q).length > 0 && /* @__PURE__ */ p(
2076
2139
  "div",
2077
2140
  {
2078
2141
  style: {
@@ -2083,12 +2146,12 @@ function rr({
2083
2146
  padding: "8px 0"
2084
2147
  },
2085
2148
  children: [
2086
- Object.entries(G).map(([e, t]) => {
2087
- const r = l.find((c) => J(c) === e);
2088
- if (!r || !Ue(t))
2149
+ Object.entries(q).map(([e, t]) => {
2150
+ const s = l.find((c) => J(c) === e);
2151
+ if (!s || !Je(t))
2089
2152
  return null;
2090
- const i = $n(t), o = Ln(t), u = Pn(t);
2091
- return /* @__PURE__ */ m(
2153
+ const i = Zn(t), n = Vn(t), u = er(t);
2154
+ return /* @__PURE__ */ p(
2092
2155
  "span",
2093
2156
  {
2094
2157
  style: {
@@ -2107,20 +2170,20 @@ function rr({
2107
2170
  whiteSpace: "nowrap"
2108
2171
  },
2109
2172
  children: [
2110
- /* @__PURE__ */ m("span", { children: [
2111
- /* @__PURE__ */ m("span", { style: { color: "#676767" }, children: [
2112
- r.label,
2173
+ /* @__PURE__ */ p("span", { children: [
2174
+ /* @__PURE__ */ p("span", { style: { color: "#676767" }, children: [
2175
+ s.label,
2113
2176
  ": "
2114
2177
  ] }),
2115
- /* @__PURE__ */ s("span", { children: i })
2178
+ /* @__PURE__ */ o("span", { children: i })
2116
2179
  ] }),
2117
- o > 0 && /* @__PURE__ */ s(In, { count: o, values: u }),
2118
- /* @__PURE__ */ s(
2180
+ n > 0 && /* @__PURE__ */ o(tr, { count: n, values: u }),
2181
+ /* @__PURE__ */ o(
2119
2182
  "button",
2120
2183
  {
2121
2184
  type: "button",
2122
- onClick: () => Le(e, []),
2123
- "aria-label": `Remove ${r.label} filter`,
2185
+ onClick: () => F(e, []),
2186
+ "aria-label": `Remove ${s.label} filter`,
2124
2187
  style: {
2125
2188
  background: "transparent",
2126
2189
  border: "none",
@@ -2129,7 +2192,7 @@ function rr({
2129
2192
  display: "inline-flex",
2130
2193
  color: "#676767"
2131
2194
  },
2132
- children: /* @__PURE__ */ s(Dn, { size: 14, strokeWidth: 2 })
2195
+ children: /* @__PURE__ */ o(Pn, { size: 14, strokeWidth: 2 })
2133
2196
  }
2134
2197
  )
2135
2198
  ]
@@ -2137,11 +2200,11 @@ function rr({
2137
2200
  `chip-${e}`
2138
2201
  );
2139
2202
  }),
2140
- /* @__PURE__ */ s(
2203
+ /* @__PURE__ */ o(
2141
2204
  "button",
2142
2205
  {
2143
2206
  type: "button",
2144
- onClick: p,
2207
+ onClick: P,
2145
2208
  style: {
2146
2209
  marginLeft: "auto",
2147
2210
  background: "transparent",
@@ -2159,15 +2222,15 @@ function rr({
2159
2222
  ]
2160
2223
  }
2161
2224
  ),
2162
- l.length > 0 && Be.length > 0 ? /* @__PURE__ */ m(
2163
- fn,
2225
+ l.length > 0 && Oe.length > 0 ? /* @__PURE__ */ p(
2226
+ Cn,
2164
2227
  {
2165
- sensors: Kt,
2166
- collisionDetection: pn,
2167
- onDragStart: Xt,
2168
- onDragEnd: Ut,
2228
+ sensors: tn,
2229
+ collisionDetection: Rn,
2230
+ onDragStart: rn,
2231
+ onDragEnd: nn,
2169
2232
  children: [
2170
- /* @__PURE__ */ m("div", { style: {
2233
+ /* @__PURE__ */ p("div", { style: {
2171
2234
  borderRadius: 8,
2172
2235
  border: "1px solid #E6E6E6",
2173
2236
  overflow: "hidden",
@@ -2178,9 +2241,9 @@ function rr({
2178
2241
  // collapse to just the header height and the centered overlay/loader
2179
2242
  // would be squeezed into a thin strip. Reserve vertical space so the
2180
2243
  // loader stays properly visible and centered.
2181
- ...N ? { minHeight: 320 } : {}
2244
+ ...O ? { minHeight: 320 } : {}
2182
2245
  }, children: [
2183
- N && /* @__PURE__ */ s("div", { style: {
2246
+ O && /* @__PURE__ */ o("div", { style: {
2184
2247
  position: "absolute",
2185
2248
  inset: 0,
2186
2249
  background: "rgba(255, 255, 255, 0.9)",
@@ -2191,19 +2254,19 @@ function rr({
2191
2254
  alignItems: "center",
2192
2255
  justifyContent: "center",
2193
2256
  borderRadius: "14px"
2194
- }, children: /* @__PURE__ */ m("div", { style: {
2257
+ }, children: /* @__PURE__ */ p("div", { style: {
2195
2258
  display: "flex",
2196
2259
  flexDirection: "column",
2197
2260
  alignItems: "center",
2198
2261
  gap: "12px"
2199
2262
  }, children: [
2200
- /* @__PURE__ */ s("p", { style: {
2263
+ /* @__PURE__ */ o("p", { style: {
2201
2264
  fontSize: "13px",
2202
2265
  color: "rgba(30, 33, 37, 0.6)",
2203
2266
  margin: 0
2204
2267
  }, children: "Loading..." }),
2205
- /* @__PURE__ */ s(
2206
- Kn,
2268
+ /* @__PURE__ */ o(
2269
+ sr,
2207
2270
  {
2208
2271
  src: "/BrandLoading.gif",
2209
2272
  alt: "Loading",
@@ -2214,7 +2277,7 @@ function rr({
2214
2277
  }
2215
2278
  )
2216
2279
  ] }) }),
2217
- /* @__PURE__ */ s("div", { className: "overflow-x-auto custom-thin-scrollbar-hidden", ref: _t, style: { maxHeight: "500px", overflowY: "auto", position: "relative", zIndex: 1 }, children: /* @__PURE__ */ m("table", { style: {
2280
+ /* @__PURE__ */ o("div", { className: "overflow-x-auto custom-thin-scrollbar-hidden", ref: Vt, style: { maxHeight: "500px", overflowY: "auto", position: "relative", zIndex: 1 }, children: /* @__PURE__ */ p("table", { style: {
2218
2281
  width: "auto",
2219
2282
  minWidth: "100%",
2220
2283
  tableLayout: "fixed",
@@ -2224,18 +2287,48 @@ function rr({
2224
2287
  border: "1px solid #e6e6e6",
2225
2288
  boxSizing: "border-box"
2226
2289
  }, children: [
2227
- /* @__PURE__ */ s("thead", { children: /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s(
2228
- mn,
2229
- {
2230
- items: $,
2231
- strategy: hn,
2232
- children: Be.map((e) => /* @__PURE__ */ s(tn, { column: e, isHeaderRow: !0 }, `header-${J(e)}`))
2233
- }
2234
- ) }) }),
2235
- /* @__PURE__ */ s("tbody", { children: !N && tt.length === 0 ? /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s(
2290
+ /* @__PURE__ */ o("thead", { children: /* @__PURE__ */ p("tr", { children: [
2291
+ X && /* @__PURE__ */ o(
2292
+ "th",
2293
+ {
2294
+ style: {
2295
+ width: dt,
2296
+ minWidth: dt,
2297
+ padding: "10px 8px",
2298
+ textAlign: "center",
2299
+ verticalAlign: "middle",
2300
+ background: "#f2f2f0",
2301
+ borderRight: "1px solid #e6e6e6",
2302
+ borderBottom: "1px solid #e6e6e6",
2303
+ position: "sticky",
2304
+ top: 0,
2305
+ zIndex: 10,
2306
+ boxSizing: "border-box"
2307
+ },
2308
+ children: /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", lineHeight: 0 }, children: /* @__PURE__ */ o(
2309
+ Ot,
2310
+ {
2311
+ checked: ct,
2312
+ indeterminate: on,
2313
+ onToggle: ln,
2314
+ ariaLabel: "Select all rows on this page"
2315
+ }
2316
+ ) })
2317
+ }
2318
+ ),
2319
+ /* @__PURE__ */ o(
2320
+ zn,
2321
+ {
2322
+ items: I,
2323
+ strategy: Bn,
2324
+ children: Oe.map((e) => /* @__PURE__ */ o(gn, { column: e, isHeaderRow: !0 }, `header-${J(e)}`))
2325
+ }
2326
+ )
2327
+ ] }) }),
2328
+ /* @__PURE__ */ o("tbody", { children: !O && We.length === 0 ? /* @__PURE__ */ o("tr", { children: /* @__PURE__ */ o(
2236
2329
  "td",
2237
2330
  {
2238
- colSpan: Be.length,
2331
+ colSpan: Oe.length + (X ? 1 : 0),
2239
2332
  style: {
2240
2333
  padding: "32px",
2241
2334
  textAlign: "center",
@@ -2245,69 +2338,98 @@ function rr({
2245
2338
  },
2246
2339
  children: "No results found"
2247
2340
  }
2248
- ) }) : !N && tt.length > 0 ? tt.map((e, t) => /* @__PURE__ */ s(
2249
- "tr",
2250
- {
2251
- "data-row-id": e.id || t,
2252
- style: {
2253
- borderBottom: "1px solid #e6e6e6",
2254
- cursor: f ? "pointer" : "default",
2255
- transition: "background 0.15s ease"
2256
- },
2257
- onClick: f ? (r) => {
2258
- r.stopPropagation(), f(e, t);
2259
- } : void 0,
2260
- onMouseEnter: (r) => {
2261
- r.currentTarget.style.background = "#E6E6E6";
2262
- },
2263
- onMouseLeave: (r) => {
2264
- r.currentTarget.style.background = "transparent";
2341
+ ) }) : !O && We.length > 0 ? We.map((e, t) => {
2342
+ const s = bt(e, t), i = X && De.has(s);
2343
+ return /* @__PURE__ */ p(
2344
+ "tr",
2345
+ {
2346
+ "data-row-id": e.id || t,
2347
+ style: {
2348
+ borderBottom: "1px solid #e6e6e6",
2349
+ cursor: f ? "pointer" : "default",
2350
+ transition: "background 0.15s ease",
2351
+ background: i ? "#F2F4F7" : "transparent"
2352
+ },
2353
+ onClick: f ? (n) => {
2354
+ n.stopPropagation(), f(e, t);
2355
+ } : void 0,
2356
+ onMouseEnter: (n) => {
2357
+ n.currentTarget.style.background = "#E6E6E6";
2358
+ },
2359
+ onMouseLeave: (n) => {
2360
+ n.currentTarget.style.background = i ? "#F2F4F7" : "transparent";
2361
+ },
2362
+ children: [
2363
+ X && /* @__PURE__ */ o(
2364
+ "td",
2365
+ {
2366
+ onClick: (n) => n.stopPropagation(),
2367
+ style: {
2368
+ width: dt,
2369
+ minWidth: dt,
2370
+ padding: "10px 8px",
2371
+ textAlign: "center",
2372
+ verticalAlign: "middle",
2373
+ borderRight: "1px solid #e6e6e6",
2374
+ boxSizing: "border-box"
2375
+ },
2376
+ children: /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", lineHeight: 0 }, children: /* @__PURE__ */ o(
2377
+ Ot,
2378
+ {
2379
+ checked: i,
2380
+ onToggle: () => sn(s),
2381
+ ariaLabel: "Select row"
2382
+ }
2383
+ ) })
2384
+ }
2385
+ ),
2386
+ Oe.map((n) => {
2387
+ const u = J(n), c = At(u, n.width), x = e[u], N = n.render ? n.render(x, e) : x, K = c && c !== "auto", Ge = typeof N == "string" && N.trim() !== "", Te = K && Ge, Le = Te ? /* @__PURE__ */ o(fe, { content: N, children: N }) : N;
2388
+ return /* @__PURE__ */ o(
2389
+ "td",
2390
+ {
2391
+ style: {
2392
+ padding: "10px 14px",
2393
+ color: "rgba(30, 33, 37, 0.78)",
2394
+ fontSize: "13px",
2395
+ borderRight: "1px solid #e6e6e6",
2396
+ boxSizing: "border-box",
2397
+ width: c,
2398
+ fontFamily: "var(--font-sans)",
2399
+ ...Te && { maxWidth: c || "200px" }
2400
+ },
2401
+ children: Le
2402
+ },
2403
+ u
2404
+ );
2405
+ })
2406
+ ]
2265
2407
  },
2266
- children: Be.map((r) => {
2267
- const i = J(r), o = Dt(i, r.width), u = e[i], c = r.render ? r.render(u, e) : u, x = o && o !== "auto", j = typeof c == "string" && c.trim() !== "", _ = x && j, Ke = _ ? /* @__PURE__ */ s(oe, { content: c, children: c }) : c;
2268
- return /* @__PURE__ */ s(
2269
- "td",
2270
- {
2271
- style: {
2272
- padding: "10px 14px",
2273
- color: "rgba(30, 33, 37, 0.78)",
2274
- fontSize: "13px",
2275
- borderRight: "1px solid #e6e6e6",
2276
- boxSizing: "border-box",
2277
- width: o,
2278
- fontFamily: "var(--font-sans)",
2279
- ..._ && { maxWidth: o || "200px" }
2280
- },
2281
- children: Ke
2282
- },
2283
- i
2284
- );
2285
- })
2286
- },
2287
- t
2288
- )) : null })
2408
+ t
2409
+ );
2410
+ }) : null })
2289
2411
  ] }) })
2290
2412
  ] }),
2291
- /* @__PURE__ */ s(gn, { children: Mt ? /* @__PURE__ */ s("div", { className: "bg-[var(--paper-high)] border border-[var(--border-strong)] rounded px-4 py-2 shadow-lg", children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
2292
- /* @__PURE__ */ s(yt, { size: 14, className: "text-[var(--text-faint)]" }),
2293
- /* @__PURE__ */ s("span", { className: "text-sm font-semibold text-[var(--text-ink)]", children: Mt.label })
2413
+ /* @__PURE__ */ o(En, { children: It ? /* @__PURE__ */ o("div", { className: "bg-[var(--paper-high)] border border-[var(--border-strong)] rounded px-4 py-2 shadow-lg", children: /* @__PURE__ */ p("div", { className: "flex items-center gap-2", children: [
2414
+ /* @__PURE__ */ o(Ft, { size: 14, className: "text-[var(--text-faint)]" }),
2415
+ /* @__PURE__ */ o("span", { className: "text-sm font-semibold text-[var(--text-ink)]", children: It.label })
2294
2416
  ] }) }) : null })
2295
2417
  ]
2296
2418
  }
2297
2419
  ) : null,
2298
2420
  (() => {
2299
- const e = !K && (Ce.trim() !== "" || Object.values(G).some((r) => Ue(r))), t = Z ? e ? _e.length : S : _e.length;
2300
- return t <= 0 ? null : /* @__PURE__ */ s(
2301
- Nn,
2421
+ const e = !L && (ve.trim() !== "" || Object.values(q).some((s) => Je(s))), t = ne ? e ? Ue.length : S : Ue.length;
2422
+ return t <= 0 ? null : /* @__PURE__ */ o(
2423
+ Gn,
2302
2424
  {
2303
- page: ne,
2425
+ page: ze,
2304
2426
  pageSizeOptions: [5, 10, 20, 50, 100],
2305
- pageSize: ce,
2427
+ pageSize: be,
2306
2428
  totalCount: t,
2307
- currentDataLength: tt.length,
2308
- onPageChange: ke,
2309
- onPageSizeChange: (r) => {
2310
- We(r), ke(1);
2429
+ currentDataLength: We.length,
2430
+ onPageChange: Be,
2431
+ onPageSizeChange: (s) => {
2432
+ qe(s), Be(1);
2311
2433
  },
2312
2434
  showPageSizeSelector: !0
2313
2435
  }
@@ -2316,7 +2438,7 @@ function rr({
2316
2438
  ] });
2317
2439
  }
2318
2440
  export {
2319
- rr as D,
2320
- Wn as a
2441
+ xr as D,
2442
+ Jn as a
2321
2443
  };
2322
2444
  //# sourceMappingURL=DataTable2.es.js.map