ezux 1.1.11 → 1.1.13

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.
Files changed (103) hide show
  1. package/dist/{EzContextMenu-C3eDRS7E.cjs → EzContextMenu-B6HBUjWv.cjs} +1 -1
  2. package/dist/{EzContextMenu-BsHdOgtL.js → EzContextMenu-BSA_B6Pr.js} +1 -1
  3. package/dist/{EzEventModal-FP2rs1pp.js → EzEventModal-BUMp_BFi.js} +6 -6
  4. package/dist/{EzEventModal-DkowH9rh.cjs → EzEventModal-xzHfzi0O.cjs} +1 -1
  5. package/dist/{EzGroupingPanel-DuKrZuqq.js → EzGroupingPanel-BUsIYDRi.js} +5 -5
  6. package/dist/EzGroupingPanel-D0HdSomF.cjs +1 -0
  7. package/dist/{EzSchedulerQuickAdd-s2jtG8vH.js → EzSchedulerQuickAdd-C653LTGh.js} +5 -5
  8. package/dist/{EzSchedulerQuickAdd-BLF22CDh.cjs → EzSchedulerQuickAdd-UnOWCpJd.cjs} +1 -1
  9. package/dist/{EzSchedulerToolbar-CaVVmnjt.cjs → EzSchedulerToolbar-C-5OdRY6.cjs} +1 -1
  10. package/dist/{EzSchedulerToolbar-tz6h80GC.js → EzSchedulerToolbar-CO5jjDQg.js} +15 -15
  11. package/dist/{EzSignature-CPoQLAyS.cjs → EzSignature-BaNesxwC.cjs} +1 -1
  12. package/dist/{EzSignature-D7134EQo.js → EzSignature-D4EYwo9W.js} +2 -2
  13. package/dist/{EzTableEditDialog-3eU6i9cv.js → EzTableEditDialog-Cd948V1C.js} +3 -3
  14. package/dist/{EzTableEditDialog-ftpeOKI_.cjs → EzTableEditDialog-NiOubaMT.cjs} +1 -1
  15. package/dist/{EzTableFooter-BiyI1m1O.cjs → EzTableFooter-CWjfGCjL.cjs} +1 -1
  16. package/dist/{EzTableFooter-DuAaOcLd.js → EzTableFooter-DveD12RC.js} +1 -1
  17. package/dist/{EzTableToolbar-DmAb94U-.js → EzTableToolbar-Bz8UWv6j.js} +50 -54
  18. package/dist/EzTableToolbar-DHE7Bb1R.cjs +1 -0
  19. package/dist/{HighlightText-C0sUEoCH.js → HighlightText-8D6KEyBw.js} +9 -11
  20. package/dist/HighlightText-LtZmzCle.cjs +1 -0
  21. package/dist/{NotificationPanel-xjIHKnlE.js → NotificationPanel-D2Y-_ahk.js} +3 -3
  22. package/dist/NotificationPanel-zLxrtTGf.cjs +1 -0
  23. package/dist/{TooltipWrapper-Bv7F-Gk4.js → TooltipWrapper-BrRTi5EJ.js} +1 -1
  24. package/dist/{TooltipWrapper-CgYlx0Jq.cjs → TooltipWrapper-DWts4bAI.cjs} +1 -1
  25. package/dist/{avatar-BkA_3sri.js → avatar-BeK0E4mn.js} +1 -1
  26. package/dist/{avatar-CJH7L2Or.cjs → avatar-DZAaTK2f.cjs} +1 -1
  27. package/dist/bell-DAz8P0BR.js +14 -0
  28. package/dist/bell-DOX2y38e.cjs +1 -0
  29. package/dist/{calendar-ChRJyGvt.cjs → calendar-BMZ8ddOf.cjs} +1 -1
  30. package/dist/{calendar-CCxXqG5a.js → calendar-Dy3rVMW2.js} +4 -4
  31. package/dist/{checkbox-_Uxyw6xN.cjs → checkbox-B0lGHUyy.cjs} +1 -1
  32. package/dist/{checkbox-DTLp-Oqj.js → checkbox-boJRxICT.js} +1 -1
  33. package/dist/circle-x-Cv7bfIC_.js +9 -0
  34. package/dist/circle-x-DwVXxhXr.cjs +1 -0
  35. package/dist/{date-time-picker-BPwpIWxg.cjs → date-time-picker-DTxHdPgQ.cjs} +1 -1
  36. package/dist/{date-time-picker-B9QBboUX.js → date-time-picker-Dj2eftJI.js} +6 -6
  37. package/dist/ezux.css +1 -1
  38. package/dist/grip-vertical-CSyDKBul.js +12 -0
  39. package/dist/grip-vertical-DZNBW1Dn.cjs +1 -0
  40. package/dist/{index-BmjgUrNF.cjs → index-B3ipEEhH.cjs} +2 -2
  41. package/dist/index-BPPb7bcs.js +3220 -0
  42. package/dist/{index-pr_yrvsV.js → index-BQKw_Vho.js} +4026 -1904
  43. package/dist/{index-B7foCkRR.js → index-C5STgBSy.js} +678 -677
  44. package/dist/{index-CpEN0z3t.js → index-C6NfgycP.js} +357 -357
  45. package/dist/index-D4f2ZdrG.cjs +2 -0
  46. package/dist/index-DUY1SqMo.cjs +1 -0
  47. package/dist/index-c1Zg--dt.cjs +7 -0
  48. package/dist/index.cjs +2 -2
  49. package/dist/index.d.ts +67 -14
  50. package/dist/index.es.js +136 -135
  51. package/dist/{input-D1zXv4Kl.cjs → input-BgM_la4k.cjs} +1 -1
  52. package/dist/{input-DG8ycH6m.js → input-jYQ5VKNR.js} +1 -1
  53. package/dist/{isBefore-DdLSsf0_.js → isBefore-C3Y_wbk3.js} +1 -1
  54. package/dist/{isBefore-BAixcVtb.cjs → isBefore-Cp1ttk6q.cjs} +1 -1
  55. package/dist/kanban.cjs +1 -1
  56. package/dist/kanban.es.js +4 -4
  57. package/dist/{label-Ch1wkGGP.js → label-ClOW9UCt.js} +2 -2
  58. package/dist/{label-DrUloKDN.cjs → label-Dx6oDB-X.cjs} +1 -1
  59. package/dist/layout.cjs +1 -1
  60. package/dist/layout.d.ts +29 -1
  61. package/dist/layout.es.js +3 -3
  62. package/dist/{popover-4Ng-GmwM.cjs → popover-BJq1CKmi.cjs} +1 -1
  63. package/dist/{popover-DstiJFa3.js → popover-Cmlb7w3R.js} +1 -1
  64. package/dist/scheduler.cjs +1 -1
  65. package/dist/scheduler.es.js +5 -5
  66. package/dist/{scroll-area-mGPAChYm.js → scroll-area-9fwpVNxT.js} +1 -1
  67. package/dist/{scroll-area-B_yufXtG.cjs → scroll-area-CwwZSSA4.cjs} +1 -1
  68. package/dist/select-GxA46anr.cjs +1 -0
  69. package/dist/select-mDCun_IR.js +35 -0
  70. package/dist/{settings-HCrwja-A.js → settings-CvyjK75A.js} +14 -14
  71. package/dist/settings-DKPknrt8.cjs +1 -0
  72. package/dist/signature.cjs +1 -1
  73. package/dist/signature.es.js +1 -1
  74. package/dist/{sortable.esm-DDmDbyCC.cjs → sortable.esm-CsRPuXyD.cjs} +1 -1
  75. package/dist/{sortable.esm-eBjUK76c.js → sortable.esm-CzMCDPet.js} +1 -1
  76. package/dist/table.cjs +1 -1
  77. package/dist/table.d.ts +18 -0
  78. package/dist/table.es.js +10 -9
  79. package/dist/theme-vars.css +2 -2
  80. package/dist/{tooltip-CDLAzCi8.cjs → tooltip-B41iztKT.cjs} +1 -1
  81. package/dist/{tooltip-C216fkmP.js → tooltip-BCtrEe0z.js} +1 -1
  82. package/dist/treeview.cjs +1 -2
  83. package/dist/treeview.es.js +558 -543
  84. package/dist/{useInitCoreServices-DSudhSFo.cjs → useInitCoreServices-CwXv2p4S.cjs} +1 -1
  85. package/dist/{useInitCoreServices-BC7QMeLn.js → useInitCoreServices-D1WaWlaI.js} +4 -3
  86. package/dist/{useService-DBnjCLOu.cjs → useService-8OoezWr8.cjs} +1 -1
  87. package/dist/{useService-BKWyN7jJ.js → useService-BUi3uAqE.js} +1 -1
  88. package/dist/{useServiceState-MlrHzngO.cjs → useServiceState-BjpCjUn2.cjs} +1 -1
  89. package/dist/{useServiceState-DWb3cncq.js → useServiceState-VE-viK8b.js} +1 -1
  90. package/package.json +21 -20
  91. package/dist/EzGroupingPanel-Dw4bbefz.cjs +0 -1
  92. package/dist/EzTableToolbar-qlNVxvsL.cjs +0 -1
  93. package/dist/HighlightText-BDclEh_K.cjs +0 -1
  94. package/dist/NotificationPanel-juBrjjOY.cjs +0 -1
  95. package/dist/index-BKsqtcvu.cjs +0 -2
  96. package/dist/index-D2HX-sbl.js +0 -3092
  97. package/dist/index-DEIRrhVY.cjs +0 -1
  98. package/dist/index-DGhcUfqi.cjs +0 -7
  99. package/dist/info-BY2cfl1l.cjs +0 -1
  100. package/dist/info-BuURqzhx.js +0 -14
  101. package/dist/select-BxcAKVaB.cjs +0 -1
  102. package/dist/select-BxiFqo8j.js +0 -35
  103. package/dist/settings-BuS8Pqjb.cjs +0 -1
@@ -1,21 +1,22 @@
1
1
  import { jsx as r, Fragment as ye, jsxs as b } from "react/jsx-runtime";
2
2
  import * as x from "react";
3
- import j, { useRef as Re, useLayoutEffect as jr, useEffect as ue, useCallback as V, useState as H, useMemo as W, useContext as fn, createContext as Ot, useTransition as Hr, memo as Ze } from "react";
4
- import { c as qr, d as Wr, e as Ur, f as Kr, g as Yr, u as Qr, h as Xr, a as Nt, T as Zr, Q as Jr, b as eo } from "./TooltipWrapper-Bv7F-Gk4.js";
5
- import { j as Qe, h as Pt, c as _, u as hn, a as to, b as no } from "./useInitCoreServices-BC7QMeLn.js";
3
+ import j, { useRef as Re, useLayoutEffect as jr, useEffect as ue, useCallback as V, useState as H, useMemo as W, useContext as gn, createContext as Ot, useTransition as Hr, memo as Ze } from "react";
4
+ import { c as qr, d as Wr, e as Ur, f as Kr, g as Yr, u as Qr, h as Xr, a as Nt, T as Zr, Q as Jr, b as eo } from "./TooltipWrapper-BrRTi5EJ.js";
5
+ import { j as Qe, h as Dt, c as O, u as fn, a as to, b as no } from "./useInitCoreServices-D1WaWlaI.js";
6
6
  import { useReactTable as ro, getFacetedMinMaxValues as oo, getFacetedUniqueValues as ao, getExpandedRowModel as io, getGroupedRowModel as so, getPaginationRowModel as lo, getFilteredRowModel as co, getSortedRowModel as uo, getCoreRowModel as mo, flexRender as Xe } from "@tanstack/react-table";
7
7
  import { u as go } from "./useComponentState-C87xXa5d.js";
8
- import { c as pn, a as fo, H as bn, M as Ft } from "./HighlightText-C0sUEoCH.js";
9
- import { S as Je, a as et, b as tt, c as nt, d as Ie, e as Vt } from "./select-BxiFqo8j.js";
10
- import { c as fe, u as Te, i as Lt, P as re, e as Ee, Q as vn, d as ft, x as $t, a as ho, U as po, V as bo, W as xn, b as ht, y as vo, k as $e, j as ke, X as xo, Y as wo, Z as yo, _ as Co, $ as So, F as No, a0 as Ro, K as Eo, T as ko, M as Do, C as pt, z as Po, N as Fo } from "./EzErrorBoundary-D4NBadES.js";
11
- import { L as ze } from "./label-Ch1wkGGP.js";
12
- import { C as rt, P as Io, F as Mo } from "./checkbox-DTLp-Oqj.js";
13
- import { useVirtualizer as wn } from "@tanstack/react-virtual";
14
- import { b as yn, d as Cn, e as Sn, B as ge, X as Gt, T as Nn } from "./tooltip-C216fkmP.js";
15
- import { P as Bt, a as jt, b as Ht } from "./popover-DstiJFa3.js";
16
- import { I as Me } from "./input-DG8ycH6m.js";
17
- import { k as Ao, l as To, P as zo, o as _o, p as Oo, I as Vo, r as Lo, v as ut, A as tn, d as $o, c as Go, E as Bo, D as jo, L as nn, J as Ho } from "./EzContextMenu-BsHdOgtL.js";
18
- import { u as qo } from "./useServiceState-DWb3cncq.js";
8
+ import { c as hn, a as fo, H as pn } from "./HighlightText-8D6KEyBw.js";
9
+ import { S as Je, a as et, b as tt, c as nt, d as Ie, e as _t } from "./select-mDCun_IR.js";
10
+ import { c as fe, u as Te, i as Vt, P as re, e as Ee, Q as bn, d as ft, x as Lt, a as ho, U as po, V as bo, W as vn, b as ht, y as vo, k as $e, j as ke, X as xo, Y as wo, Z as yo, _ as Co, $ as So, F as No, a0 as Ro, K as Eo, T as ko, M as Do, C as pt, z as Po, N as Fo } from "./EzErrorBoundary-D4NBadES.js";
11
+ import { L as ze } from "./label-ClOW9UCt.js";
12
+ import { C as rt, P as Io, F as Mo } from "./checkbox-boJRxICT.js";
13
+ import { useVirtualizer as xn } from "@tanstack/react-virtual";
14
+ import { b as wn, d as yn, e as Cn, B as ge, X as $t, T as Sn } from "./tooltip-BCtrEe0z.js";
15
+ import { P as Gt, a as Bt, b as jt } from "./popover-Cmlb7w3R.js";
16
+ import { I as Me } from "./input-jYQ5VKNR.js";
17
+ import { k as Ao, l as To, P as zo, o as Oo, p as _o, I as Vo, r as Lo, v as ut, A as en, d as $o, c as Go, E as Bo, D as jo, L as tn, J as Ho } from "./EzContextMenu-BSA_B6Pr.js";
18
+ import { u as qo } from "./useServiceState-VE-viK8b.js";
19
+ import { G as Nn } from "./grip-vertical-CSyDKBul.js";
19
20
  import { C as Rn } from "./chevron-down-C3s8jU6B.js";
20
21
  import { C as En } from "./chevron-left-BFr8XZyF.js";
21
22
  import { useStore as Wo } from "@tanstack/react-store";
@@ -46,32 +47,25 @@ const aa = [
46
47
  ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
47
48
  ], ia = fe("copy", aa);
48
49
  const sa = [
49
- ["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
50
- ["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
51
- ["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }],
52
- ["circle", { cx: "15", cy: "12", r: "1", key: "1tmaij" }],
53
- ["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
54
- ["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
55
- ], kn = fe("grip-vertical", sa);
56
- const la = [
57
50
  ["path", { d: "M3 7V5c0-1.1.9-2 2-2h2", key: "adw53z" }],
58
51
  ["path", { d: "M17 3h2c1.1 0 2 .9 2 2v2", key: "an4l38" }],
59
52
  ["path", { d: "M21 17v2c0 1.1-.9 2-2 2h-2", key: "144t0e" }],
60
53
  ["path", { d: "M7 21H5c-1.1 0-2-.9-2-2v-2", key: "rtnfgi" }],
61
54
  ["rect", { width: "7", height: "5", x: "7", y: "7", rx: "1", key: "1eyiv7" }],
62
55
  ["rect", { width: "7", height: "5", x: "10", y: "12", rx: "1", key: "1qlmkx" }]
63
- ], ca = fe("group", la);
64
- const da = [
56
+ ], la = fe("group", sa);
57
+ const ca = [
65
58
  ["path", { d: "M2 5h20", key: "1fs1ex" }],
66
59
  ["path", { d: "M6 12h12", key: "8npq4p" }],
67
60
  ["path", { d: "M9 19h6", key: "456am0" }]
68
- ], ua = fe("list-filter", da);
69
- const ma = [
61
+ ], da = fe("list-filter", ca);
62
+ const ua = [
70
63
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
71
64
  ["path", { d: "m21 3-7 7", key: "1l2asr" }],
72
65
  ["path", { d: "m3 21 7-7", key: "tjx5ai" }],
73
66
  ["path", { d: "M9 21H3v-6", key: "wtvkvv" }]
74
- ], ga = fe("maximize-2", ma);
67
+ ], ma = fe("maximize-2", ua);
68
+ const ga = [["path", { d: "M5 12h14", key: "1ays0h" }]], Pt = fe("minus", ga);
75
69
  const fa = [
76
70
  ["path", { d: "M12 17v5", key: "bb1du9" }],
77
71
  ["path", { d: "M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89", key: "znwnzq" }],
@@ -83,7 +77,7 @@ const fa = [
83
77
  key: "c9qhm2"
84
78
  }
85
79
  ]
86
- ], Dn = fe("pin-off", fa);
80
+ ], kn = fe("pin-off", fa);
87
81
  const ha = [
88
82
  ["path", { d: "M12 17v5", key: "bb1du9" }],
89
83
  [
@@ -93,7 +87,7 @@ const ha = [
93
87
  key: "1nkz8b"
94
88
  }
95
89
  ]
96
- ], It = fe("pin", ha);
90
+ ], Ft = fe("pin", ha);
97
91
  const pa = [
98
92
  ["rect", { width: "8", height: "6", x: "5", y: "4", rx: "1", key: "nzclkv" }],
99
93
  ["rect", { width: "8", height: "6", x: "11", y: "14", rx: "1", key: "4tytwb" }]
@@ -130,7 +124,7 @@ function xa(e) {
130
124
  e.onPointerMove?.(p);
131
125
  }, [e.onPointerMove]), m = V((p) => {
132
126
  e.onPointerUp?.(p);
133
- }, [e.onPointerUp]), h = V((p) => {
127
+ }, [e.onPointerUp]), f = V((p) => {
134
128
  e.onPointerLeave?.(p);
135
129
  }, [e.onPointerLeave]), y = V((p) => {
136
130
  e.onPointerEnter?.(p);
@@ -151,7 +145,7 @@ function xa(e) {
151
145
  handlePointerDown: d,
152
146
  handlePointerMove: g,
153
147
  handlePointerUp: m,
154
- handlePointerLeave: h,
148
+ handlePointerLeave: f,
155
149
  handlePointerEnter: y,
156
150
  handleFocus: u,
157
151
  handleBlur: S
@@ -204,12 +198,12 @@ const wa = (e) => ({
204
198
  };
205
199
  };
206
200
  function Ca(e = {}) {
207
- const [t, n] = H(!1), [o, a] = H(e.initialMode || "view"), [i, l] = H(e.initialData || {}), [c, s] = H({}), d = V((h, y, u) => {
208
- a(h), y !== void 0 ? l(y) : e.defaultData && l(e.defaultData), u !== void 0 && s(u), n(!0);
201
+ const [t, n] = H(!1), [o, a] = H(e.initialMode || "view"), [i, l] = H(e.initialData || {}), [c, s] = H({}), d = V((f, y, u) => {
202
+ a(f), y !== void 0 ? l(y) : e.defaultData && l(e.defaultData), u !== void 0 && s(u), n(!0);
209
203
  }, [e.defaultData]), g = V(() => {
210
204
  n(!1);
211
205
  }, []), m = V(() => {
212
- n((h) => !h);
206
+ n((f) => !f);
213
207
  }, []);
214
208
  return {
215
209
  isOpen: t,
@@ -246,41 +240,41 @@ const Sa = (e, t = "id") => {
246
240
  // but for now we keep it simple as this is used by imperative API too
247
241
  }));
248
242
  }, []), s = V((E, k, R) => {
249
- a((f) => {
250
- const C = f.data[E];
251
- if (!C) return f;
243
+ a((h) => {
244
+ const C = h.data[E];
245
+ if (!C) return h;
252
246
  const N = C[k];
253
- if (N === R) return f;
247
+ if (N === R) return h;
254
248
  const I = C[t];
255
249
  I !== void 0 && i.current.add(I);
256
250
  const z = {
257
251
  type: "EDIT_CELL",
258
252
  payload: { rowIndex: E, rowId: I, columnId: k, oldValue: N, newValue: R },
259
253
  timestamp: Date.now()
260
- }, L = [...f.data];
254
+ }, L = [...h.data];
261
255
  return L[E] = { ...C, [k]: R }, {
262
256
  data: L,
263
257
  history: {
264
- past: [...f.history.past, z],
258
+ past: [...h.history.past, z],
265
259
  future: []
266
260
  }
267
261
  };
268
262
  });
269
263
  }, [t]), d = V((E, k = 0) => {
270
264
  a((R) => {
271
- let f = { ...E };
272
- if (f[t] === void 0) {
265
+ let h = { ...E };
266
+ if (h[t] === void 0) {
273
267
  const z = `_temp_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
274
- f[t] = z;
268
+ h[t] = z;
275
269
  }
276
- const C = f[t];
270
+ const C = h[t];
277
271
  C !== void 0 && i.current.add(C);
278
272
  const N = {
279
273
  type: "ADD_ROW",
280
- payload: { rowIndex: k, rowId: C, row: f },
274
+ payload: { rowIndex: k, rowId: C, row: h },
281
275
  timestamp: Date.now()
282
276
  }, I = [...R.data];
283
- return I.splice(k, 0, f), {
277
+ return I.splice(k, 0, h), {
284
278
  data: I,
285
279
  history: {
286
280
  past: [...R.history.past, N],
@@ -290,12 +284,12 @@ const Sa = (e, t = "id") => {
290
284
  });
291
285
  }, [t]), g = V((E) => {
292
286
  a((k) => {
293
- const R = [...E].sort((N, I) => I - N), f = [...k.history.past], C = [...k.data];
287
+ const R = [...E].sort((N, I) => I - N), h = [...k.history.past], C = [...k.data];
294
288
  return R.forEach((N) => {
295
289
  const I = k.data[N];
296
290
  if (!I) return;
297
291
  const z = I[t];
298
- z !== void 0 && i.current.add(z), f.push({
292
+ z !== void 0 && i.current.add(z), h.push({
299
293
  type: "DELETE_ROW",
300
294
  payload: { rowIndex: N, rowId: z, row: I },
301
295
  timestamp: Date.now()
@@ -303,7 +297,7 @@ const Sa = (e, t = "id") => {
303
297
  }), {
304
298
  data: C,
305
299
  history: {
306
- past: f,
300
+ past: h,
307
301
  future: []
308
302
  }
309
303
  };
@@ -311,41 +305,41 @@ const Sa = (e, t = "id") => {
311
305
  }, [t]), m = V(() => {
312
306
  a((E) => {
313
307
  if (E.history.past.length === 0) return E;
314
- const k = E.history.past[E.history.past.length - 1], R = E.history.past.slice(0, -1), f = [...E.data];
308
+ const k = E.history.past[E.history.past.length - 1], R = E.history.past.slice(0, -1), h = [...E.data];
315
309
  if (k.type === "EDIT_CELL") {
316
- const { rowId: C, columnId: N, oldValue: I } = k.payload, z = f.findIndex((L) => L[t] === C);
317
- z !== -1 && N && (f[z] = { ...f[z], [N]: I });
310
+ const { rowId: C, columnId: N, oldValue: I } = k.payload, z = h.findIndex((L) => L[t] === C);
311
+ z !== -1 && N && (h[z] = { ...h[z], [N]: I });
318
312
  } else if (k.type === "ADD_ROW") {
319
- const { rowId: C } = k.payload, N = f.findIndex((I) => I[t] === C);
320
- N !== -1 && f.splice(N, 1);
313
+ const { rowId: C } = k.payload, N = h.findIndex((I) => I[t] === C);
314
+ N !== -1 && h.splice(N, 1);
321
315
  } else if (k.type === "DELETE_ROW") {
322
316
  const { rowIndex: C, row: N } = k.payload;
323
- N && C !== void 0 && f.splice(C, 0, N);
317
+ N && C !== void 0 && h.splice(C, 0, N);
324
318
  }
325
319
  return {
326
- data: f,
320
+ data: h,
327
321
  history: {
328
322
  past: R,
329
323
  future: [k, ...E.history.future]
330
324
  }
331
325
  };
332
326
  });
333
- }, [t]), h = V(() => {
327
+ }, [t]), f = V(() => {
334
328
  a((E) => {
335
329
  if (E.history.future.length === 0) return E;
336
- const k = E.history.future[0], R = E.history.future.slice(1), f = [...E.data];
330
+ const k = E.history.future[0], R = E.history.future.slice(1), h = [...E.data];
337
331
  if (k.type === "EDIT_CELL") {
338
- const { rowId: C, columnId: N, newValue: I } = k.payload, z = f.findIndex((L) => L[t] === C);
339
- z !== -1 && N && (f[z] = { ...f[z], [N]: I });
332
+ const { rowId: C, columnId: N, newValue: I } = k.payload, z = h.findIndex((L) => L[t] === C);
333
+ z !== -1 && N && (h[z] = { ...h[z], [N]: I });
340
334
  } else if (k.type === "ADD_ROW") {
341
335
  const { rowIndex: C, row: N } = k.payload;
342
- N && C !== void 0 && f.splice(C, 0, N);
336
+ N && C !== void 0 && h.splice(C, 0, N);
343
337
  } else if (k.type === "DELETE_ROW") {
344
- const { rowId: C } = k.payload, N = f.findIndex((I) => I[t] === C);
345
- N !== -1 && f.splice(N, 1);
338
+ const { rowId: C } = k.payload, N = h.findIndex((I) => I[t] === C);
339
+ N !== -1 && h.splice(N, 1);
346
340
  }
347
341
  return {
348
- data: f,
342
+ data: h,
349
343
  history: {
350
344
  past: [...E.history.past, k],
351
345
  future: R
@@ -360,7 +354,7 @@ const Sa = (e, t = "id") => {
360
354
  const N = C[t];
361
355
  N !== void 0 && E.set(N, C);
362
356
  });
363
- let k = 0, R = 0, f = 0;
357
+ let k = 0, R = 0, h = 0;
364
358
  return y.forEach((C) => {
365
359
  const N = C[t];
366
360
  if (N === void 0 || !n.has(N))
@@ -371,8 +365,8 @@ const Sa = (e, t = "id") => {
371
365
  Object.keys(C).some((L) => L.startsWith("_") ? !1 : C[L] !== I[L]) && R++;
372
366
  }
373
367
  }), n.forEach((C, N) => {
374
- E.has(N) || f++;
375
- }), { added: k, edited: R, deleted: f };
368
+ E.has(N) || h++;
369
+ }), { added: k, edited: R, deleted: h };
376
370
  }, [y, e, n, t]), P = W(() => {
377
371
  if (y === e)
378
372
  return { addedRecords: [], changedRecords: [], deletedRecords: [] };
@@ -381,7 +375,7 @@ const Sa = (e, t = "id") => {
381
375
  const N = C[t];
382
376
  N !== void 0 && E.set(N, C);
383
377
  });
384
- const k = [], R = [], f = [];
378
+ const k = [], R = [], h = [];
385
379
  return y.forEach((C) => {
386
380
  const N = C[t];
387
381
  if (N === void 0 || !n.has(N))
@@ -392,8 +386,8 @@ const Sa = (e, t = "id") => {
392
386
  Object.keys(C).some((L) => L.startsWith("_") ? !1 : C[L] !== I[L]) && R.push(C);
393
387
  }
394
388
  }), n.forEach((C, N) => {
395
- E.has(N) || f.push(C);
396
- }), { addedRecords: k, changedRecords: R, deletedRecords: f };
389
+ E.has(N) || h.push(C);
390
+ }), { addedRecords: k, changedRecords: R, deletedRecords: h };
397
391
  }, [y, e, n, t]), A = V(() => {
398
392
  i.current.clear(), a({ data: e, history: { past: [], future: [] } });
399
393
  }, [e]);
@@ -411,7 +405,7 @@ const Sa = (e, t = "id") => {
411
405
  /** Undo the last recorded action. @group Methods */
412
406
  undo: m,
413
407
  /** Redo the last undone action. @group Methods */
414
- redo: h,
408
+ redo: f,
415
409
  /** Whether undo is currently available. @group State */
416
410
  canUndo: u,
417
411
  /** Whether redo is currently available. @group State */
@@ -423,32 +417,39 @@ const Sa = (e, t = "id") => {
423
417
  /** Reset all changes back to the initial state. @group Methods */
424
418
  resetData: A
425
419
  };
426
- }, Rt = (e, t = "14px Inter, sans-serif") => {
420
+ }, Dn = (e, t = "14px Inter, sans-serif") => {
427
421
  if (typeof document > "u") return 0;
428
422
  const o = document.createElement("canvas").getContext("2d");
429
423
  return o ? (o.font = t, o.measureText(e).width) : 0;
430
- }, Na = (e) => ({ autoFitColumn: V((n) => {
424
+ }, Na = (e, t = {}) => {
425
+ const {
426
+ fontSize: n = "14px",
427
+ fontWeight: o = "600",
428
+ fontFamily: a = "Inter, sans-serif",
429
+ padding: i = 32,
430
+ // Left (16px) + Right (16px)
431
+ hasIcons: l = !0
432
+ } = t, c = `${o} ${n} ${a}`, s = Dn(e, c), d = l ? 70 : 0;
433
+ return Math.ceil(s + i + d);
434
+ }, Ra = (e) => ({ autoFitColumn: V((n) => {
431
435
  const o = e.getColumn(n);
432
436
  if (!o) return;
433
- const i = e.getRowModel().rows.slice(0, 50), l = "14px Inter, sans-serif", c = "600 14px Inter, sans-serif", s = o.columnDef.meta;
437
+ const i = e.getRowModel().rows.slice(0, 50), l = { fontSize: "14px", fontWeight: "400", fontFamily: "Inter, sans-serif" }, c = { fontSize: "14px", fontWeight: "600", fontFamily: "Inter, sans-serif" }, s = o.columnDef.meta;
434
438
  let d = 0;
435
439
  const g = typeof o.columnDef.header == "string" ? o.columnDef.header : n;
436
- d = Math.max(d, Rt(g, c)), i.forEach((h) => {
437
- let y = h.getValue(n);
438
- s?.columnType === "number" ? y = Qe(y, s.numberOptions) : s?.columnType === "date" ? y = Pt(y, s.dateOptions) : s?.columnType === "datetime" && (y = Pt(y, s.dateTimeOptions));
439
- const u = y != null ? String(y) : "";
440
- if (s?.columnType === "longtext" && s?.longTextOptions?.previewLength) {
441
- const S = u.length > s.longTextOptions.previewLength ? u.substring(0, s.longTextOptions.previewLength) + "..." : u;
442
- d = Math.max(d, Rt(S, l));
443
- } else
444
- d = Math.max(d, Rt(u, l));
445
- });
446
- const m = Math.ceil(d + 100);
447
- e.setColumnSizing((h) => ({
448
- ...h,
449
- [n]: m
440
+ d = Math.max(d, Na(g, { ...c })), i.forEach((m) => {
441
+ let f = m.getValue(n);
442
+ s?.columnType === "number" ? f = Qe(f, s.numberOptions) : s?.columnType === "date" ? f = Dt(f, s.dateOptions) : s?.columnType === "datetime" && (f = Dt(f, s.dateTimeOptions));
443
+ const y = f != null ? String(f) : "";
444
+ let u = y;
445
+ s?.columnType === "longtext" && s?.longTextOptions?.previewLength && (u = y.length > s.longTextOptions.previewLength ? y.substring(0, s.longTextOptions.previewLength) + "..." : y);
446
+ const S = Dn(u, `${l.fontWeight} ${l.fontSize} ${l.fontFamily}`);
447
+ d = Math.max(d, S + 32);
448
+ }), e.setColumnSizing((m) => ({
449
+ ...m,
450
+ [n]: d
450
451
  }));
451
- }, [e]) }), Ra = (e) => e?.kind === "group", Ea = (e, t, n) => {
452
+ }, [e]) }), Ea = (e) => e?.kind === "group", ka = (e, t, n) => {
452
453
  if (typeof n == "string") {
453
454
  if (!n) return !0;
454
455
  const i = n.toLowerCase();
@@ -465,8 +466,8 @@ const Sa = (e, t = "id") => {
465
466
  return String(s ?? "").toLowerCase().includes(i);
466
467
  })) return !1;
467
468
  }
468
- return !(a && !pn(a, (i) => e.getValue(i)));
469
- }, ka = (e, t, n) => {
469
+ return !(a && !hn(a, (i) => e.getValue(i)));
470
+ }, Da = (e, t, n) => {
470
471
  try {
471
472
  if (Array.isArray(n)) {
472
473
  if (n.length === 0) return !0;
@@ -474,8 +475,8 @@ const Sa = (e, t = "id") => {
474
475
  return n.includes(l);
475
476
  }
476
477
  if (typeof n == "object" && n !== null) {
477
- if (Ra(n))
478
- return pn(n, (l) => e.getValue(l || t));
478
+ if (Ea(n))
479
+ return hn(n, (l) => e.getValue(l || t));
479
480
  if ("operator" in n) {
480
481
  const l = {
481
482
  kind: "rule",
@@ -492,7 +493,7 @@ const Sa = (e, t = "id") => {
492
493
  } catch (o) {
493
494
  return console.error(`Error in smartColumnFilterFn for column ${t}:`, o), !0;
494
495
  }
495
- }, rn = ({
496
+ }, nn = ({
496
497
  value: e,
497
498
  className: t,
498
499
  title: n,
@@ -502,7 +503,7 @@ const Sa = (e, t = "id") => {
502
503
  }) => e == null ? /* @__PURE__ */ r(ye, { children: a }) : /* @__PURE__ */ r(
503
504
  "div",
504
505
  {
505
- className: _(
506
+ className: O(
506
507
  "text-sm",
507
508
  i === "center" && "text-center",
508
509
  i === "right" && "text-right",
@@ -521,20 +522,20 @@ const Sa = (e, t = "id") => {
521
522
  }) => {
522
523
  let l = e;
523
524
  if (e == null)
524
- return /* @__PURE__ */ r(rn, { value: e, align: a, className: o });
525
+ return /* @__PURE__ */ r(nn, { value: e, align: a, className: o });
525
526
  switch (t) {
526
527
  case "number":
527
528
  l = Qe(e, { ...n?.numberOptions });
528
529
  break;
529
530
  case "date":
530
531
  case "datetime":
531
- l = Pt(e, t === "datetime" ? n?.dateTimeOptions : n?.dateOptions);
532
+ l = Dt(e, t === "datetime" ? n?.dateTimeOptions : n?.dateOptions);
532
533
  break;
533
534
  case "longtext":
534
535
  const s = String(e);
535
536
  l = /* @__PURE__ */ b("div", { className: "flex items-start gap-1 group/longtext w-full overflow-hidden py-1.5", children: [
536
- /* @__PURE__ */ b(yn, { children: [
537
- /* @__PURE__ */ r(Cn, { asChild: !0, children: /* @__PURE__ */ r("div", { className: "flex-1 min-w-0 cursor-help", children: /* @__PURE__ */ r(
537
+ /* @__PURE__ */ b(wn, { children: [
538
+ /* @__PURE__ */ r(yn, { asChild: !0, children: /* @__PURE__ */ r("div", { className: "flex-1 min-w-0 cursor-help", children: /* @__PURE__ */ r(
538
539
  "span",
539
540
  {
540
541
  className: "block !whitespace-normal break-words text-xs leading-normal",
@@ -547,20 +548,20 @@ const Sa = (e, t = "id") => {
547
548
  children: s
548
549
  }
549
550
  ) }) }),
550
- /* @__PURE__ */ r(Sn, { className: "max-w-[300px] p-3 break-words text-xs leading-relaxed", children: s })
551
+ /* @__PURE__ */ r(Cn, { className: "max-w-[300px] p-3 break-words text-xs leading-relaxed", children: s })
551
552
  ] }),
552
- s.length > 20 && /* @__PURE__ */ b(Bt, { children: [
553
- /* @__PURE__ */ r(jt, { asChild: !0, children: /* @__PURE__ */ r(
553
+ s.length > 20 && /* @__PURE__ */ b(Gt, { children: [
554
+ /* @__PURE__ */ r(Bt, { asChild: !0, children: /* @__PURE__ */ r(
554
555
  ge,
555
556
  {
556
557
  variant: "ghost",
557
558
  size: "icon",
558
559
  className: "h-5 w-5 opacity-0 group-hover/longtext:opacity-100 transition-opacity shrink-0",
559
560
  onClick: (d) => d.stopPropagation(),
560
- children: /* @__PURE__ */ r(ga, { className: "h-3 w-3 text-muted-foreground hover:text-primary" })
561
+ children: /* @__PURE__ */ r(ma, { className: "h-3 w-3 text-muted-foreground hover:text-primary" })
561
562
  }
562
563
  ) }),
563
- /* @__PURE__ */ r(Ht, { className: "w-[400px] p-4 shadow-xl border-border bg-popover", align: "end", onClick: (d) => d.stopPropagation(), children: /* @__PURE__ */ b("div", { className: "space-y-3", children: [
564
+ /* @__PURE__ */ r(jt, { className: "w-[400px] p-4 shadow-xl border-border bg-popover", align: "end", onClick: (d) => d.stopPropagation(), children: /* @__PURE__ */ b("div", { className: "space-y-3", children: [
564
565
  /* @__PURE__ */ b("div", { className: "flex items-center justify-between border-b pb-2", children: [
565
566
  /* @__PURE__ */ r("h4", { className: "text-xs font-bold uppercase tracking-widest text-muted-foreground", children: "Detailed Description" }),
566
567
  /* @__PURE__ */ b(
@@ -587,16 +588,16 @@ const Sa = (e, t = "id") => {
587
588
  }
588
589
  if (i?.options.meta?.enableSearchHighlighting) {
589
590
  const s = i.getState().globalFilter, d = typeof s == "string" ? s : s?.quickSearch;
590
- d && (l = /* @__PURE__ */ r(bn, { text: l, highlight: d }));
591
+ d && (l = /* @__PURE__ */ r(pn, { text: l, highlight: d }));
591
592
  }
592
593
  const c = a || (t === "number" ? "right" : "left");
593
594
  return /* @__PURE__ */ r(
594
- rn,
595
+ nn,
595
596
  {
596
597
  value: e,
597
598
  align: c,
598
599
  title: t === "longtext" ? "" : void 0,
599
- className: _(
600
+ className: O(
600
601
  t === "number" && "font-mono tabular-nums",
601
602
  t === "number" && e < 0 && "text-rose-600 dark:text-rose-400",
602
603
  "px-3 min-h-full flex",
@@ -626,7 +627,7 @@ const Sa = (e, t = "id") => {
626
627
  const [g, m] = j.useState(() => e == null ? "" : o === "number" ? new Intl.NumberFormat("en-US", {
627
628
  minimumFractionDigits: 0,
628
629
  maximumFractionDigits: 20
629
- }).format(e) : String(e)), h = (S) => {
630
+ }).format(e) : String(e)), f = (S) => {
630
631
  let p = S.target.value;
631
632
  if (m(p), o === "number")
632
633
  if (p === "")
@@ -653,10 +654,10 @@ const Sa = (e, t = "id") => {
653
654
  ref: d,
654
655
  type: o === "date" ? "date" : "text",
655
656
  value: g,
656
- onChange: h,
657
+ onChange: f,
657
658
  onBlur: y,
658
659
  autoFocus: a,
659
- className: _(
660
+ className: O(
660
661
  "h-7 px-2 w-full border-0 shadow-none bg-transparent focus:ring-0 focus-visible:ring-0 focus-visible:ring-offset-0",
661
662
  u === "right" && "text-right",
662
663
  u === "center" && "text-center",
@@ -667,7 +668,7 @@ const Sa = (e, t = "id") => {
667
668
  onClick: (S) => S.stopPropagation()
668
669
  }
669
670
  );
670
- }, on = {
671
+ }, rn = {
671
672
  text: [
672
673
  { label: "Contains", value: "contains" },
673
674
  { label: "Does not contain", value: "doesNotContain" },
@@ -692,14 +693,14 @@ const Sa = (e, t = "id") => {
692
693
  { label: "On or before", value: "lte" },
693
694
  { label: "Between", value: "between" }
694
695
  ]
695
- }, al = ({
696
+ }, sl = ({
696
697
  columnType: e,
697
698
  value: t,
698
699
  valueTo: n,
699
700
  operator: o,
700
701
  onChange: a
701
702
  }) => {
702
- const l = on[e === "datetime" || e === "date" ? "date" : e === "number" ? "number" : "text"] || on.text, c = e === "number" ? "number" : e === "date" || e === "datetime" ? "date" : "text";
703
+ const l = rn[e === "datetime" || e === "date" ? "date" : e === "number" ? "number" : "text"] || rn.text, c = e === "number" ? "number" : e === "date" || e === "datetime" ? "date" : "text";
703
704
  return /* @__PURE__ */ b("div", { className: "p-3 space-y-3", children: [
704
705
  /* @__PURE__ */ b("div", { className: "space-y-1", children: [
705
706
  /* @__PURE__ */ r("label", { className: "text-xs font-medium text-muted-foreground ml-1", children: "Condition" }),
@@ -746,7 +747,7 @@ function Pn(e) {
746
747
  const t = x.useRef({ value: e, previous: e });
747
748
  return x.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
748
749
  }
749
- var bt = "Switch", [Da] = ft(bt), [Pa, Fa] = Da(bt), Fn = x.forwardRef(
750
+ var bt = "Switch", [Pa] = ft(bt), [Fa, Ia] = Pa(bt), Fn = x.forwardRef(
750
751
  (e, t) => {
751
752
  const {
752
753
  __scopeSwitch: n,
@@ -759,13 +760,13 @@ var bt = "Switch", [Da] = ft(bt), [Pa, Fa] = Da(bt), Fn = x.forwardRef(
759
760
  onCheckedChange: d,
760
761
  form: g,
761
762
  ...m
762
- } = e, [h, y] = x.useState(null), u = Te(t, (E) => y(E)), S = x.useRef(!1), p = h ? g || !!h.closest("form") : !0, [P, A] = Lt({
763
+ } = e, [f, y] = x.useState(null), u = Te(t, (E) => y(E)), S = x.useRef(!1), p = f ? g || !!f.closest("form") : !0, [P, A] = Vt({
763
764
  prop: a,
764
765
  defaultProp: i ?? !1,
765
766
  onChange: d,
766
767
  caller: bt
767
768
  });
768
- return /* @__PURE__ */ b(Pa, { scope: n, checked: P, disabled: c, children: [
769
+ return /* @__PURE__ */ b(Fa, { scope: n, checked: P, disabled: c, children: [
769
770
  /* @__PURE__ */ r(
770
771
  re.button,
771
772
  {
@@ -787,7 +788,7 @@ var bt = "Switch", [Da] = ft(bt), [Pa, Fa] = Da(bt), Fn = x.forwardRef(
787
788
  p && /* @__PURE__ */ r(
788
789
  An,
789
790
  {
790
- control: h,
791
+ control: f,
791
792
  bubbles: !S.current,
792
793
  name: o,
793
794
  value: s,
@@ -804,7 +805,7 @@ var bt = "Switch", [Da] = ft(bt), [Pa, Fa] = Da(bt), Fn = x.forwardRef(
804
805
  Fn.displayName = bt;
805
806
  var In = "SwitchThumb", Mn = x.forwardRef(
806
807
  (e, t) => {
807
- const { __scopeSwitch: n, ...o } = e, a = Fa(In, n);
808
+ const { __scopeSwitch: n, ...o } = e, a = Ia(In, n);
808
809
  return /* @__PURE__ */ r(
809
810
  re.span,
810
811
  {
@@ -817,7 +818,7 @@ var In = "SwitchThumb", Mn = x.forwardRef(
817
818
  }
818
819
  );
819
820
  Mn.displayName = In;
820
- var Ia = "SwitchBubbleInput", An = x.forwardRef(
821
+ var Ma = "SwitchBubbleInput", An = x.forwardRef(
821
822
  ({
822
823
  __scopeSwitch: e,
823
824
  control: t,
@@ -825,7 +826,7 @@ var Ia = "SwitchBubbleInput", An = x.forwardRef(
825
826
  bubbles: o = !0,
826
827
  ...a
827
828
  }, i) => {
828
- const l = x.useRef(null), c = Te(l, i), s = Pn(n), d = vn(t);
829
+ const l = x.useRef(null), c = Te(l, i), s = Pn(n), d = bn(t);
829
830
  return x.useEffect(() => {
830
831
  const g = l.current;
831
832
  if (!g) return;
@@ -858,32 +859,32 @@ var Ia = "SwitchBubbleInput", An = x.forwardRef(
858
859
  );
859
860
  }
860
861
  );
861
- An.displayName = Ia;
862
+ An.displayName = Ma;
862
863
  function Tn(e) {
863
864
  return e ? "checked" : "unchecked";
864
865
  }
865
- var zn = Fn, Ma = Mn;
866
- const qt = x.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
866
+ var zn = Fn, Aa = Mn;
867
+ const Ht = x.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
867
868
  zn,
868
869
  {
869
- className: _(
870
+ className: O(
870
871
  "peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
871
872
  e
872
873
  ),
873
874
  ...t,
874
875
  ref: n,
875
876
  children: /* @__PURE__ */ r(
876
- Ma,
877
+ Aa,
877
878
  {
878
- className: _(
879
+ className: O(
879
880
  "pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
880
881
  )
881
882
  }
882
883
  )
883
884
  }
884
885
  ));
885
- qt.displayName = zn.displayName;
886
- const Aa = ({
886
+ Ht.displayName = zn.displayName;
887
+ const Ta = ({
887
888
  value: e,
888
889
  trueLabel: t = "Yes",
889
890
  falseLabel: n = "No",
@@ -895,10 +896,10 @@ const Aa = ({
895
896
  disabled: s = !0,
896
897
  onChange: d
897
898
  }) => {
898
- const g = e === !0, m = e === !1, h = e == null;
899
- return l === "switch" ? /* @__PURE__ */ b("div", { className: _("flex items-center gap-2", c), children: [
899
+ const g = e === !0, m = e === !1, f = e == null;
900
+ return l === "switch" ? /* @__PURE__ */ b("div", { className: O("flex items-center gap-2", c), children: [
900
901
  /* @__PURE__ */ r(
901
- qt,
902
+ Ht,
902
903
  {
903
904
  checked: g,
904
905
  onCheckedChange: d,
@@ -907,21 +908,21 @@ const Aa = ({
907
908
  }
908
909
  ),
909
910
  i && /* @__PURE__ */ r("span", { className: "text-xs font-medium", children: g ? t : m ? n : o })
910
- ] }) : /* @__PURE__ */ b("div", { className: _(
911
+ ] }) : /* @__PURE__ */ b("div", { className: O(
911
912
  "inline-flex items-center gap-1.5 px-2 py-0.5 rounded-md transition-colors text-xs font-medium",
912
913
  g && "bg-emerald-50/50 text-emerald-700 dark:bg-emerald-900/20 dark:text-emerald-400",
913
914
  m && "bg-rose-50/50 text-rose-700 dark:bg-rose-900/20 dark:text-rose-400",
914
- h && "bg-muted/60 text-muted-foreground",
915
+ f && "bg-muted/60 text-muted-foreground",
915
916
  c
916
917
  ), children: [
917
918
  a && /* @__PURE__ */ b(ye, { children: [
918
- g && /* @__PURE__ */ r($t, { className: "w-3.5 h-3.5" }),
919
- m && /* @__PURE__ */ r(Gt, { className: "w-3.5 h-3.5" }),
920
- h && /* @__PURE__ */ r(Ft, { className: "w-3.5 h-3.5" })
919
+ g && /* @__PURE__ */ r(Lt, { className: "w-3.5 h-3.5" }),
920
+ m && /* @__PURE__ */ r($t, { className: "w-3.5 h-3.5" }),
921
+ f && /* @__PURE__ */ r(Pt, { className: "w-3.5 h-3.5" })
921
922
  ] }),
922
923
  i && /* @__PURE__ */ r("span", { className: "text-xs font-medium", children: g ? t : m ? n : o })
923
924
  ] });
924
- }, Ta = ({
925
+ }, za = ({
925
926
  value: e,
926
927
  onChange: t,
927
928
  trueLabel: n = "Yes",
@@ -931,9 +932,9 @@ const Aa = ({
931
932
  className: l
932
933
  }) => {
933
934
  const c = e === !0;
934
- return a === "switch" ? /* @__PURE__ */ b("div", { className: _("flex items-center gap-2 p-2", l), children: [
935
+ return a === "switch" ? /* @__PURE__ */ b("div", { className: O("flex items-center gap-2 p-2", l), children: [
935
936
  /* @__PURE__ */ r(
936
- qt,
937
+ Ht,
937
938
  {
938
939
  id: "boolean-switch",
939
940
  checked: c,
@@ -951,7 +952,7 @@ const Aa = ({
951
952
  children: c ? n : o
952
953
  }
953
954
  )
954
- ] }) : /* @__PURE__ */ b("div", { className: _("flex items-center gap-2 p-2", l), children: [
955
+ ] }) : /* @__PURE__ */ b("div", { className: O("flex items-center gap-2 p-2", l), children: [
955
956
  /* @__PURE__ */ r(
956
957
  rt,
957
958
  {
@@ -973,7 +974,7 @@ const Aa = ({
973
974
  }
974
975
  )
975
976
  ] });
976
- }, za = ({
977
+ }, Oa = ({
977
978
  value: e,
978
979
  onChange: t,
979
980
  trueLabel: n = "Yes",
@@ -982,27 +983,27 @@ const Aa = ({
982
983
  allLabel: i = "All",
983
984
  className: l
984
985
  }) => /* @__PURE__ */ b(Je, { value: e, onValueChange: t, children: [
985
- /* @__PURE__ */ r(et, { className: _("w-full h-8", l), children: /* @__PURE__ */ r(tt, { placeholder: "Filter..." }) }),
986
+ /* @__PURE__ */ r(et, { className: O("w-full h-8", l), children: /* @__PURE__ */ r(tt, { placeholder: "Filter..." }) }),
986
987
  /* @__PURE__ */ b(nt, { children: [
987
988
  /* @__PURE__ */ r(Ie, { value: "all", children: /* @__PURE__ */ b("div", { className: "flex items-center gap-2", children: [
988
- /* @__PURE__ */ r(Ft, { className: "w-4 h-4 text-muted-foreground" }),
989
+ /* @__PURE__ */ r(Pt, { className: "w-4 h-4 text-muted-foreground" }),
989
990
  /* @__PURE__ */ r("span", { children: i })
990
991
  ] }) }),
991
992
  /* @__PURE__ */ r(Ie, { value: "true", children: /* @__PURE__ */ b("div", { className: "flex items-center gap-2", children: [
992
- /* @__PURE__ */ r($t, { className: "w-4 h-4 text-emerald-600" }),
993
+ /* @__PURE__ */ r(Lt, { className: "w-4 h-4 text-emerald-600" }),
993
994
  /* @__PURE__ */ r("span", { children: n })
994
995
  ] }) }),
995
996
  /* @__PURE__ */ r(Ie, { value: "false", children: /* @__PURE__ */ b("div", { className: "flex items-center gap-2", children: [
996
- /* @__PURE__ */ r(Gt, { className: "w-4 h-4 text-rose-600" }),
997
+ /* @__PURE__ */ r($t, { className: "w-4 h-4 text-rose-600" }),
997
998
  /* @__PURE__ */ r("span", { children: o })
998
999
  ] }) }),
999
1000
  /* @__PURE__ */ r(Ie, { value: "null", children: /* @__PURE__ */ b("div", { className: "flex items-center gap-2", children: [
1000
- /* @__PURE__ */ r(Ft, { className: "w-4 h-4 text-muted-foreground" }),
1001
+ /* @__PURE__ */ r(Pt, { className: "w-4 h-4 text-muted-foreground" }),
1001
1002
  /* @__PURE__ */ r("span", { children: a })
1002
1003
  ] }) })
1003
1004
  ] })
1004
1005
  ] });
1005
- var Wt = "Radio", [_a, _n] = ft(Wt), [Oa, Va] = _a(Wt), On = x.forwardRef(
1006
+ var qt = "Radio", [_a, On] = ft(qt), [Va, La] = _a(qt), _n = x.forwardRef(
1006
1007
  (e, t) => {
1007
1008
  const {
1008
1009
  __scopeRadio: n,
@@ -1014,8 +1015,8 @@ var Wt = "Radio", [_a, _n] = ft(Wt), [Oa, Va] = _a(Wt), On = x.forwardRef(
1014
1015
  onCheck: s,
1015
1016
  form: d,
1016
1017
  ...g
1017
- } = e, [m, h] = x.useState(null), y = Te(t, (p) => h(p)), u = x.useRef(!1), S = m ? d || !!m.closest("form") : !0;
1018
- return /* @__PURE__ */ b(Oa, { scope: n, checked: a, disabled: l, children: [
1018
+ } = e, [m, f] = x.useState(null), y = Te(t, (p) => f(p)), u = x.useRef(!1), S = m ? d || !!m.closest("form") : !0;
1019
+ return /* @__PURE__ */ b(Va, { scope: n, checked: a, disabled: l, children: [
1019
1020
  /* @__PURE__ */ r(
1020
1021
  re.button,
1021
1022
  {
@@ -1050,10 +1051,10 @@ var Wt = "Radio", [_a, _n] = ft(Wt), [Oa, Va] = _a(Wt), On = x.forwardRef(
1050
1051
  ] });
1051
1052
  }
1052
1053
  );
1053
- On.displayName = Wt;
1054
+ _n.displayName = qt;
1054
1055
  var Vn = "RadioIndicator", Ln = x.forwardRef(
1055
1056
  (e, t) => {
1056
- const { __scopeRadio: n, forceMount: o, ...a } = e, i = Va(Vn, n);
1057
+ const { __scopeRadio: n, forceMount: o, ...a } = e, i = La(Vn, n);
1057
1058
  return /* @__PURE__ */ r(ht, { present: o || i.checked, children: /* @__PURE__ */ r(
1058
1059
  re.span,
1059
1060
  {
@@ -1066,7 +1067,7 @@ var Vn = "RadioIndicator", Ln = x.forwardRef(
1066
1067
  }
1067
1068
  );
1068
1069
  Ln.displayName = Vn;
1069
- var La = "RadioBubbleInput", $n = x.forwardRef(
1070
+ var $a = "RadioBubbleInput", $n = x.forwardRef(
1070
1071
  ({
1071
1072
  __scopeRadio: e,
1072
1073
  control: t,
@@ -1074,7 +1075,7 @@ var La = "RadioBubbleInput", $n = x.forwardRef(
1074
1075
  bubbles: o = !0,
1075
1076
  ...a
1076
1077
  }, i) => {
1077
- const l = x.useRef(null), c = Te(l, i), s = Pn(n), d = vn(t);
1078
+ const l = x.useRef(null), c = Te(l, i), s = Pn(n), d = bn(t);
1078
1079
  return x.useEffect(() => {
1079
1080
  const g = l.current;
1080
1081
  if (!g) return;
@@ -1107,14 +1108,14 @@ var La = "RadioBubbleInput", $n = x.forwardRef(
1107
1108
  );
1108
1109
  }
1109
1110
  );
1110
- $n.displayName = La;
1111
+ $n.displayName = $a;
1111
1112
  function Gn(e) {
1112
1113
  return e ? "checked" : "unchecked";
1113
1114
  }
1114
- var $a = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], vt = "RadioGroup", [Ga] = ft(vt, [
1115
- xn,
1116
- _n
1117
- ]), Bn = xn(), jn = _n(), [Ba, ja] = Ga(vt), Hn = x.forwardRef(
1115
+ var Ga = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], vt = "RadioGroup", [Ba] = ft(vt, [
1116
+ vn,
1117
+ On
1118
+ ]), Bn = vn(), jn = On(), [ja, Ha] = Ba(vt), Hn = x.forwardRef(
1118
1119
  (e, t) => {
1119
1120
  const {
1120
1121
  __scopeRadioGroup: n,
@@ -1127,15 +1128,15 @@ var $a = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], vt = "RadioGroup",
1127
1128
  dir: d,
1128
1129
  loop: g = !0,
1129
1130
  onValueChange: m,
1130
- ...h
1131
- } = e, y = Bn(n), u = ho(d), [S, p] = Lt({
1131
+ ...f
1132
+ } = e, y = Bn(n), u = ho(d), [S, p] = Vt({
1132
1133
  prop: i,
1133
1134
  defaultProp: a ?? null,
1134
1135
  onChange: m,
1135
1136
  caller: vt
1136
1137
  });
1137
1138
  return /* @__PURE__ */ r(
1138
- Ba,
1139
+ ja,
1139
1140
  {
1140
1141
  scope: n,
1141
1142
  name: o,
@@ -1159,7 +1160,7 @@ var $a = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], vt = "RadioGroup",
1159
1160
  "aria-orientation": s,
1160
1161
  "data-disabled": c ? "" : void 0,
1161
1162
  dir: u,
1162
- ...h,
1163
+ ...f,
1163
1164
  ref: t
1164
1165
  }
1165
1166
  )
@@ -1172,11 +1173,11 @@ var $a = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], vt = "RadioGroup",
1172
1173
  Hn.displayName = vt;
1173
1174
  var qn = "RadioGroupItem", Wn = x.forwardRef(
1174
1175
  (e, t) => {
1175
- const { __scopeRadioGroup: n, disabled: o, ...a } = e, i = ja(qn, n), l = i.disabled || o, c = Bn(n), s = jn(n), d = x.useRef(null), g = Te(t, d), m = i.value === a.value, h = x.useRef(!1);
1176
+ const { __scopeRadioGroup: n, disabled: o, ...a } = e, i = Ha(qn, n), l = i.disabled || o, c = Bn(n), s = jn(n), d = x.useRef(null), g = Te(t, d), m = i.value === a.value, f = x.useRef(!1);
1176
1177
  return x.useEffect(() => {
1177
1178
  const y = (S) => {
1178
- $a.includes(S.key) && (h.current = !0);
1179
- }, u = () => h.current = !1;
1179
+ Ga.includes(S.key) && (f.current = !0);
1180
+ }, u = () => f.current = !1;
1180
1181
  return document.addEventListener("keydown", y), document.addEventListener("keyup", u), () => {
1181
1182
  document.removeEventListener("keydown", y), document.removeEventListener("keyup", u);
1182
1183
  };
@@ -1188,7 +1189,7 @@ var qn = "RadioGroupItem", Wn = x.forwardRef(
1188
1189
  focusable: !l,
1189
1190
  active: m,
1190
1191
  children: /* @__PURE__ */ r(
1191
- On,
1192
+ _n,
1192
1193
  {
1193
1194
  disabled: l,
1194
1195
  required: i.required,
@@ -1202,7 +1203,7 @@ var qn = "RadioGroupItem", Wn = x.forwardRef(
1202
1203
  y.key === "Enter" && y.preventDefault();
1203
1204
  }),
1204
1205
  onFocus: Ee(a.onFocus, () => {
1205
- h.current && d.current?.click();
1206
+ f.current && d.current?.click();
1206
1207
  })
1207
1208
  }
1208
1209
  )
@@ -1211,54 +1212,54 @@ var qn = "RadioGroupItem", Wn = x.forwardRef(
1211
1212
  }
1212
1213
  );
1213
1214
  Wn.displayName = qn;
1214
- var Ha = "RadioGroupIndicator", Un = x.forwardRef(
1215
+ var qa = "RadioGroupIndicator", Un = x.forwardRef(
1215
1216
  (e, t) => {
1216
1217
  const { __scopeRadioGroup: n, ...o } = e, a = jn(n);
1217
1218
  return /* @__PURE__ */ r(Ln, { ...a, ...o, ref: t });
1218
1219
  }
1219
1220
  );
1220
- Un.displayName = Ha;
1221
- var Kn = Hn, Yn = Wn, qa = Un;
1222
- const Ut = x.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
1221
+ Un.displayName = qa;
1222
+ var Kn = Hn, Yn = Wn, Wa = Un;
1223
+ const Wt = x.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
1223
1224
  Kn,
1224
1225
  {
1225
- className: _("grid gap-2", e),
1226
+ className: O("grid gap-2", e),
1226
1227
  ...t,
1227
1228
  ref: n
1228
1229
  }
1229
1230
  ));
1230
- Ut.displayName = Kn.displayName;
1231
+ Wt.displayName = Kn.displayName;
1231
1232
  const mt = x.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
1232
1233
  Yn,
1233
1234
  {
1234
1235
  ref: n,
1235
- className: _(
1236
+ className: O(
1236
1237
  "aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary",
1237
1238
  e
1238
1239
  ),
1239
1240
  ...t,
1240
- children: /* @__PURE__ */ r(qa, { className: "flex items-center justify-center", children: /* @__PURE__ */ r(vo, { className: "h-1.5 w-1.5 fill-white text-white" }) })
1241
+ children: /* @__PURE__ */ r(Wa, { className: "flex items-center justify-center", children: /* @__PURE__ */ r(vo, { className: "h-1.5 w-1.5 fill-white text-white" }) })
1241
1242
  }
1242
1243
  ));
1243
1244
  mt.displayName = Yn.displayName;
1244
- var an = 1, Wa = 0.9, Ua = 0.8, Ka = 0.17, Et = 0.1, kt = 0.999, Ya = 0.9999, Qa = 0.99, Xa = /[\\\/_+.#"@\[\(\{&]/, Za = /[\\\/_+.#"@\[\(\{&]/g, Ja = /[\s-]/, Qn = /[\s-]/g;
1245
- function Mt(e, t, n, o, a, i, l) {
1246
- if (i === t.length) return a === e.length ? an : Qa;
1245
+ var on = 1, Ua = 0.9, Ka = 0.8, Ya = 0.17, Rt = 0.1, Et = 0.999, Qa = 0.9999, Xa = 0.99, Za = /[\\\/_+.#"@\[\(\{&]/, Ja = /[\\\/_+.#"@\[\(\{&]/g, ei = /[\s-]/, Qn = /[\s-]/g;
1246
+ function It(e, t, n, o, a, i, l) {
1247
+ if (i === t.length) return a === e.length ? on : Xa;
1247
1248
  var c = `${a},${i}`;
1248
1249
  if (l[c] !== void 0) return l[c];
1249
- for (var s = o.charAt(i), d = n.indexOf(s, a), g = 0, m, h, y, u; d >= 0; ) m = Mt(e, t, n, o, d + 1, i + 1, l), m > g && (d === a ? m *= an : Xa.test(e.charAt(d - 1)) ? (m *= Ua, y = e.slice(a, d - 1).match(Za), y && a > 0 && (m *= Math.pow(kt, y.length))) : Ja.test(e.charAt(d - 1)) ? (m *= Wa, u = e.slice(a, d - 1).match(Qn), u && a > 0 && (m *= Math.pow(kt, u.length))) : (m *= Ka, a > 0 && (m *= Math.pow(kt, d - a))), e.charAt(d) !== t.charAt(i) && (m *= Ya)), (m < Et && n.charAt(d - 1) === o.charAt(i + 1) || o.charAt(i + 1) === o.charAt(i) && n.charAt(d - 1) !== o.charAt(i)) && (h = Mt(e, t, n, o, d + 1, i + 2, l), h * Et > m && (m = h * Et)), m > g && (g = m), d = n.indexOf(s, d + 1);
1250
+ for (var s = o.charAt(i), d = n.indexOf(s, a), g = 0, m, f, y, u; d >= 0; ) m = It(e, t, n, o, d + 1, i + 1, l), m > g && (d === a ? m *= on : Za.test(e.charAt(d - 1)) ? (m *= Ka, y = e.slice(a, d - 1).match(Ja), y && a > 0 && (m *= Math.pow(Et, y.length))) : ei.test(e.charAt(d - 1)) ? (m *= Ua, u = e.slice(a, d - 1).match(Qn), u && a > 0 && (m *= Math.pow(Et, u.length))) : (m *= Ya, a > 0 && (m *= Math.pow(Et, d - a))), e.charAt(d) !== t.charAt(i) && (m *= Qa)), (m < Rt && n.charAt(d - 1) === o.charAt(i + 1) || o.charAt(i + 1) === o.charAt(i) && n.charAt(d - 1) !== o.charAt(i)) && (f = It(e, t, n, o, d + 1, i + 2, l), f * Rt > m && (m = f * Rt)), m > g && (g = m), d = n.indexOf(s, d + 1);
1250
1251
  return l[c] = g, g;
1251
1252
  }
1252
- function sn(e) {
1253
+ function an(e) {
1253
1254
  return e.toLowerCase().replace(Qn, " ");
1254
1255
  }
1255
- function ei(e, t, n) {
1256
- return e = n && n.length > 0 ? `${e + " " + n.join(" ")}` : e, Mt(e, t, sn(e), sn(t), 0, 0, {});
1256
+ function ti(e, t, n) {
1257
+ return e = n && n.length > 0 ? `${e + " " + n.join(" ")}` : e, It(e, t, an(e), an(t), 0, 0, {});
1257
1258
  }
1258
1259
  // @__NO_SIDE_EFFECTS__
1259
- function ti(e) {
1260
- const t = /* @__PURE__ */ ni(e), n = x.forwardRef((o, a) => {
1261
- const { children: i, ...l } = o, c = x.Children.toArray(i), s = c.find(oi);
1260
+ function ni(e) {
1261
+ const t = /* @__PURE__ */ ri(e), n = x.forwardRef((o, a) => {
1262
+ const { children: i, ...l } = o, c = x.Children.toArray(i), s = c.find(ai);
1262
1263
  if (s) {
1263
1264
  const d = s.props.children, g = c.map((m) => m === s ? x.Children.count(d) > 1 ? x.Children.only(null) : x.isValidElement(d) ? d.props.children : null : m);
1264
1265
  return /* @__PURE__ */ r(t, { ...l, ref: a, children: x.isValidElement(d) ? x.cloneElement(d, void 0, g) : null });
@@ -1268,22 +1269,22 @@ function ti(e) {
1268
1269
  return n.displayName = `${e}.Slot`, n;
1269
1270
  }
1270
1271
  // @__NO_SIDE_EFFECTS__
1271
- function ni(e) {
1272
+ function ri(e) {
1272
1273
  const t = x.forwardRef((n, o) => {
1273
1274
  const { children: a, ...i } = n;
1274
1275
  if (x.isValidElement(a)) {
1275
- const l = ii(a), c = ai(i, a.props);
1276
+ const l = si(a), c = ii(i, a.props);
1276
1277
  return a.type !== x.Fragment && (c.ref = o ? $e(o, l) : l), x.cloneElement(a, c);
1277
1278
  }
1278
1279
  return x.Children.count(a) > 1 ? x.Children.only(null) : null;
1279
1280
  });
1280
1281
  return t.displayName = `${e}.SlotClone`, t;
1281
1282
  }
1282
- var ri = /* @__PURE__ */ Symbol("radix.slottable");
1283
- function oi(e) {
1284
- return x.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === ri;
1283
+ var oi = /* @__PURE__ */ Symbol("radix.slottable");
1284
+ function ai(e) {
1285
+ return x.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === oi;
1285
1286
  }
1286
- function ai(e, t) {
1287
+ function ii(e, t) {
1287
1288
  const n = { ...t };
1288
1289
  for (const o in t) {
1289
1290
  const a = e[o], i = t[o];
@@ -1294,11 +1295,11 @@ function ai(e, t) {
1294
1295
  }
1295
1296
  return { ...e, ...n };
1296
1297
  }
1297
- function ii(e) {
1298
+ function si(e) {
1298
1299
  let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
1299
1300
  return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
1300
1301
  }
1301
- var xt = "Dialog", [Xn] = ft(xt), [si, Ce] = Xn(xt), Zn = (e) => {
1302
+ var xt = "Dialog", [Xn] = ft(xt), [li, Ce] = Xn(xt), Zn = (e) => {
1302
1303
  const {
1303
1304
  __scopeDialog: t,
1304
1305
  children: n,
@@ -1306,14 +1307,14 @@ var xt = "Dialog", [Xn] = ft(xt), [si, Ce] = Xn(xt), Zn = (e) => {
1306
1307
  defaultOpen: a,
1307
1308
  onOpenChange: i,
1308
1309
  modal: l = !0
1309
- } = e, c = x.useRef(null), s = x.useRef(null), [d, g] = Lt({
1310
+ } = e, c = x.useRef(null), s = x.useRef(null), [d, g] = Vt({
1310
1311
  prop: o,
1311
1312
  defaultProp: a ?? !1,
1312
1313
  onChange: i,
1313
1314
  caller: xt
1314
1315
  });
1315
1316
  return /* @__PURE__ */ r(
1316
- si,
1317
+ li,
1317
1318
  {
1318
1319
  scope: t,
1319
1320
  triggerRef: c,
@@ -1330,7 +1331,7 @@ var xt = "Dialog", [Xn] = ft(xt), [si, Ce] = Xn(xt), Zn = (e) => {
1330
1331
  );
1331
1332
  };
1332
1333
  Zn.displayName = xt;
1333
- var Jn = "DialogTrigger", li = x.forwardRef(
1334
+ var Jn = "DialogTrigger", ci = x.forwardRef(
1334
1335
  (e, t) => {
1335
1336
  const { __scopeDialog: n, ...o } = e, a = Ce(Jn, n), i = Te(t, a.triggerRef);
1336
1337
  return /* @__PURE__ */ r(
@@ -1340,7 +1341,7 @@ var Jn = "DialogTrigger", li = x.forwardRef(
1340
1341
  "aria-haspopup": "dialog",
1341
1342
  "aria-expanded": a.open,
1342
1343
  "aria-controls": a.contentId,
1343
- "data-state": Qt(a.open),
1344
+ "data-state": Yt(a.open),
1344
1345
  ...o,
1345
1346
  ref: i,
1346
1347
  onClick: Ee(e.onClick, a.onOpenToggle)
@@ -1348,31 +1349,31 @@ var Jn = "DialogTrigger", li = x.forwardRef(
1348
1349
  );
1349
1350
  }
1350
1351
  );
1351
- li.displayName = Jn;
1352
- var Kt = "DialogPortal", [ci, er] = Xn(Kt, {
1352
+ ci.displayName = Jn;
1353
+ var Ut = "DialogPortal", [di, er] = Xn(Ut, {
1353
1354
  forceMount: void 0
1354
1355
  }), tr = (e) => {
1355
- const { __scopeDialog: t, forceMount: n, children: o, container: a } = e, i = Ce(Kt, t);
1356
- return /* @__PURE__ */ r(ci, { scope: t, forceMount: n, children: x.Children.map(o, (l) => /* @__PURE__ */ r(ht, { present: n || i.open, children: /* @__PURE__ */ r(xo, { asChild: !0, container: a, children: l }) })) });
1356
+ const { __scopeDialog: t, forceMount: n, children: o, container: a } = e, i = Ce(Ut, t);
1357
+ return /* @__PURE__ */ r(di, { scope: t, forceMount: n, children: x.Children.map(o, (l) => /* @__PURE__ */ r(ht, { present: n || i.open, children: /* @__PURE__ */ r(xo, { asChild: !0, container: a, children: l }) })) });
1357
1358
  };
1358
- tr.displayName = Kt;
1359
+ tr.displayName = Ut;
1359
1360
  var gt = "DialogOverlay", nr = x.forwardRef(
1360
1361
  (e, t) => {
1361
1362
  const n = er(gt, e.__scopeDialog), { forceMount: o = n.forceMount, ...a } = e, i = Ce(gt, e.__scopeDialog);
1362
- return i.modal ? /* @__PURE__ */ r(ht, { present: o || i.open, children: /* @__PURE__ */ r(ui, { ...a, ref: t }) }) : null;
1363
+ return i.modal ? /* @__PURE__ */ r(ht, { present: o || i.open, children: /* @__PURE__ */ r(mi, { ...a, ref: t }) }) : null;
1363
1364
  }
1364
1365
  );
1365
1366
  nr.displayName = gt;
1366
- var di = /* @__PURE__ */ ti("DialogOverlay.RemoveScroll"), ui = x.forwardRef(
1367
+ var ui = /* @__PURE__ */ ni("DialogOverlay.RemoveScroll"), mi = x.forwardRef(
1367
1368
  (e, t) => {
1368
1369
  const { __scopeDialog: n, ...o } = e, a = Ce(gt, n);
1369
1370
  return (
1370
1371
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
1371
1372
  // ie. when `Overlay` and `Content` are siblings
1372
- /* @__PURE__ */ r(wo, { as: di, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ r(
1373
+ /* @__PURE__ */ r(wo, { as: ui, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ r(
1373
1374
  re.div,
1374
1375
  {
1375
- "data-state": Qt(a.open),
1376
+ "data-state": Yt(a.open),
1376
1377
  ...o,
1377
1378
  ref: t,
1378
1379
  style: { pointerEvents: "auto", ...o.style }
@@ -1380,16 +1381,16 @@ var di = /* @__PURE__ */ ti("DialogOverlay.RemoveScroll"), ui = x.forwardRef(
1380
1381
  ) })
1381
1382
  );
1382
1383
  }
1383
- ), _e = "DialogContent", rr = x.forwardRef(
1384
+ ), Oe = "DialogContent", rr = x.forwardRef(
1384
1385
  (e, t) => {
1385
- const n = er(_e, e.__scopeDialog), { forceMount: o = n.forceMount, ...a } = e, i = Ce(_e, e.__scopeDialog);
1386
- return /* @__PURE__ */ r(ht, { present: o || i.open, children: i.modal ? /* @__PURE__ */ r(mi, { ...a, ref: t }) : /* @__PURE__ */ r(gi, { ...a, ref: t }) });
1386
+ const n = er(Oe, e.__scopeDialog), { forceMount: o = n.forceMount, ...a } = e, i = Ce(Oe, e.__scopeDialog);
1387
+ return /* @__PURE__ */ r(ht, { present: o || i.open, children: i.modal ? /* @__PURE__ */ r(gi, { ...a, ref: t }) : /* @__PURE__ */ r(fi, { ...a, ref: t }) });
1387
1388
  }
1388
1389
  );
1389
- rr.displayName = _e;
1390
- var mi = x.forwardRef(
1390
+ rr.displayName = Oe;
1391
+ var gi = x.forwardRef(
1391
1392
  (e, t) => {
1392
- const n = Ce(_e, e.__scopeDialog), o = x.useRef(null), a = Te(t, n.contentRef, o);
1393
+ const n = Ce(Oe, e.__scopeDialog), o = x.useRef(null), a = Te(t, n.contentRef, o);
1393
1394
  return x.useEffect(() => {
1394
1395
  const i = o.current;
1395
1396
  if (i) return yo(i);
@@ -1414,9 +1415,9 @@ var mi = x.forwardRef(
1414
1415
  }
1415
1416
  );
1416
1417
  }
1417
- ), gi = x.forwardRef(
1418
+ ), fi = x.forwardRef(
1418
1419
  (e, t) => {
1419
- const n = Ce(_e, e.__scopeDialog), o = x.useRef(!1), a = x.useRef(!1);
1420
+ const n = Ce(Oe, e.__scopeDialog), o = x.useRef(!1), a = x.useRef(!1);
1420
1421
  return /* @__PURE__ */ r(
1421
1422
  or,
1422
1423
  {
@@ -1437,7 +1438,7 @@ var mi = x.forwardRef(
1437
1438
  }
1438
1439
  ), or = x.forwardRef(
1439
1440
  (e, t) => {
1440
- const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: i, ...l } = e, c = Ce(_e, n), s = x.useRef(null), d = Te(t, s);
1441
+ const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: i, ...l } = e, c = Ce(Oe, n), s = x.useRef(null), d = Te(t, s);
1441
1442
  return Co(), /* @__PURE__ */ b(ye, { children: [
1442
1443
  /* @__PURE__ */ r(
1443
1444
  So,
@@ -1454,7 +1455,7 @@ var mi = x.forwardRef(
1454
1455
  id: c.contentId,
1455
1456
  "aria-describedby": c.descriptionId,
1456
1457
  "aria-labelledby": c.titleId,
1457
- "data-state": Qt(c.open),
1458
+ "data-state": Yt(c.open),
1458
1459
  ...l,
1459
1460
  ref: d,
1460
1461
  onDismiss: () => c.onOpenChange(!1)
@@ -1463,26 +1464,26 @@ var mi = x.forwardRef(
1463
1464
  }
1464
1465
  ),
1465
1466
  /* @__PURE__ */ b(ye, { children: [
1466
- /* @__PURE__ */ r(bi, { titleId: c.titleId }),
1467
- /* @__PURE__ */ r(xi, { contentRef: s, descriptionId: c.descriptionId })
1467
+ /* @__PURE__ */ r(vi, { titleId: c.titleId }),
1468
+ /* @__PURE__ */ r(wi, { contentRef: s, descriptionId: c.descriptionId })
1468
1469
  ] })
1469
1470
  ] });
1470
1471
  }
1471
- ), Yt = "DialogTitle", fi = x.forwardRef(
1472
+ ), Kt = "DialogTitle", hi = x.forwardRef(
1472
1473
  (e, t) => {
1473
- const { __scopeDialog: n, ...o } = e, a = Ce(Yt, n);
1474
+ const { __scopeDialog: n, ...o } = e, a = Ce(Kt, n);
1474
1475
  return /* @__PURE__ */ r(re.h2, { id: a.titleId, ...o, ref: t });
1475
1476
  }
1476
1477
  );
1477
- fi.displayName = Yt;
1478
- var ar = "DialogDescription", hi = x.forwardRef(
1478
+ hi.displayName = Kt;
1479
+ var ar = "DialogDescription", pi = x.forwardRef(
1479
1480
  (e, t) => {
1480
1481
  const { __scopeDialog: n, ...o } = e, a = Ce(ar, n);
1481
1482
  return /* @__PURE__ */ r(re.p, { id: a.descriptionId, ...o, ref: t });
1482
1483
  }
1483
1484
  );
1484
- hi.displayName = ar;
1485
- var ir = "DialogClose", pi = x.forwardRef(
1485
+ pi.displayName = ar;
1486
+ var ir = "DialogClose", bi = x.forwardRef(
1486
1487
  (e, t) => {
1487
1488
  const { __scopeDialog: n, ...o } = e, a = Ce(ir, n);
1488
1489
  return /* @__PURE__ */ r(
@@ -1496,15 +1497,15 @@ var ir = "DialogClose", pi = x.forwardRef(
1496
1497
  );
1497
1498
  }
1498
1499
  );
1499
- pi.displayName = ir;
1500
- function Qt(e) {
1500
+ bi.displayName = ir;
1501
+ function Yt(e) {
1501
1502
  return e ? "open" : "closed";
1502
1503
  }
1503
- var sr = "DialogTitleWarning", [il, lr] = Ro(sr, {
1504
- contentName: _e,
1505
- titleName: Yt,
1504
+ var sr = "DialogTitleWarning", [ll, lr] = Ro(sr, {
1505
+ contentName: Oe,
1506
+ titleName: Kt,
1506
1507
  docsSlug: "dialog"
1507
- }), bi = ({ titleId: e }) => {
1508
+ }), vi = ({ titleId: e }) => {
1508
1509
  const t = lr(sr), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
1509
1510
 
1510
1511
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
@@ -1513,38 +1514,38 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
1513
1514
  return x.useEffect(() => {
1514
1515
  e && (document.getElementById(e) || console.error(n));
1515
1516
  }, [n, e]), null;
1516
- }, vi = "DialogDescriptionWarning", xi = ({ contentRef: e, descriptionId: t }) => {
1517
- const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${lr(vi).contentName}}.`;
1517
+ }, xi = "DialogDescriptionWarning", wi = ({ contentRef: e, descriptionId: t }) => {
1518
+ const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${lr(xi).contentName}}.`;
1518
1519
  return x.useEffect(() => {
1519
1520
  const a = e.current?.getAttribute("aria-describedby");
1520
1521
  t && a && (document.getElementById(t) || console.warn(o));
1521
1522
  }, [o, e, t]), null;
1522
- }, wi = Zn, yi = tr, Ci = nr, Si = rr, Ye = '[cmdk-group=""]', Dt = '[cmdk-group-items=""]', Ni = '[cmdk-group-heading=""]', cr = '[cmdk-item=""]', ln = `${cr}:not([aria-disabled="true"])`, At = "cmdk-item-select", Ve = "data-value", Ri = (e, t, n) => ei(e, t, n), dr = x.createContext(void 0), ot = () => x.useContext(dr), ur = x.createContext(void 0), Xt = () => x.useContext(ur), mr = x.createContext(void 0), gr = x.forwardRef((e, t) => {
1523
+ }, yi = Zn, Ci = tr, Si = nr, Ni = rr, Ye = '[cmdk-group=""]', kt = '[cmdk-group-items=""]', Ri = '[cmdk-group-heading=""]', cr = '[cmdk-item=""]', sn = `${cr}:not([aria-disabled="true"])`, Mt = "cmdk-item-select", Ve = "data-value", Ei = (e, t, n) => ti(e, t, n), dr = x.createContext(void 0), ot = () => x.useContext(dr), ur = x.createContext(void 0), Qt = () => x.useContext(ur), mr = x.createContext(void 0), gr = x.forwardRef((e, t) => {
1523
1524
  let n = Le(() => {
1524
1525
  var v, w;
1525
1526
  return { search: "", value: (w = (v = e.value) != null ? v : e.defaultValue) != null ? w : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
1526
- }), o = Le(() => /* @__PURE__ */ new Set()), a = Le(() => /* @__PURE__ */ new Map()), i = Le(() => /* @__PURE__ */ new Map()), l = Le(() => /* @__PURE__ */ new Set()), c = fr(e), { label: s, children: d, value: g, onValueChange: m, filter: h, shouldFilter: y, loop: u, disablePointerSelection: S = !1, vimBindings: p = !0, ...P } = e, A = ke(), E = ke(), k = ke(), R = x.useRef(null), f = _i();
1527
- Oe(() => {
1527
+ }), o = Le(() => /* @__PURE__ */ new Set()), a = Le(() => /* @__PURE__ */ new Map()), i = Le(() => /* @__PURE__ */ new Map()), l = Le(() => /* @__PURE__ */ new Set()), c = fr(e), { label: s, children: d, value: g, onValueChange: m, filter: f, shouldFilter: y, loop: u, disablePointerSelection: S = !1, vimBindings: p = !0, ...P } = e, A = ke(), E = ke(), k = ke(), R = x.useRef(null), h = _i();
1528
+ _e(() => {
1528
1529
  if (g !== void 0) {
1529
1530
  let v = g.trim();
1530
1531
  n.current.value = v, C.emit();
1531
1532
  }
1532
- }, [g]), Oe(() => {
1533
- f(6, se);
1533
+ }, [g]), _e(() => {
1534
+ h(6, se);
1534
1535
  }, []);
1535
1536
  let C = x.useMemo(() => ({ subscribe: (v) => (l.current.add(v), () => l.current.delete(v)), snapshot: () => n.current, setState: (v, w, M) => {
1536
1537
  var D, T, G, Y;
1537
1538
  if (!Object.is(n.current[v], w)) {
1538
- if (n.current[v] = w, v === "search") ne(), z(), f(1, L);
1539
+ if (n.current[v] = w, v === "search") ne(), z(), h(1, L);
1539
1540
  else if (v === "value") {
1540
1541
  if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
1541
1542
  let Q = document.getElementById(k);
1542
1543
  Q ? Q.focus() : (D = document.getElementById(A)) == null || D.focus();
1543
1544
  }
1544
- if (f(7, () => {
1545
+ if (h(7, () => {
1545
1546
  var Q;
1546
1547
  n.current.selectedItemId = (Q = K()) == null ? void 0 : Q.id, C.emit();
1547
- }), M || f(5, se), ((T = c.current) == null ? void 0 : T.value) !== void 0) {
1548
+ }), M || h(5, se), ((T = c.current) == null ? void 0 : T.value) !== void 0) {
1548
1549
  let Q = w ?? "";
1549
1550
  (Y = (G = c.current).onValueChange) == null || Y.call(G, Q);
1550
1551
  return;
@@ -1556,15 +1557,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
1556
1557
  l.current.forEach((v) => v());
1557
1558
  } }), []), N = x.useMemo(() => ({ value: (v, w, M) => {
1558
1559
  var D;
1559
- w !== ((D = i.current.get(v)) == null ? void 0 : D.value) && (i.current.set(v, { value: w, keywords: M }), n.current.filtered.items.set(v, I(w, M)), f(2, () => {
1560
+ w !== ((D = i.current.get(v)) == null ? void 0 : D.value) && (i.current.set(v, { value: w, keywords: M }), n.current.filtered.items.set(v, I(w, M)), h(2, () => {
1560
1561
  z(), C.emit();
1561
1562
  }));
1562
- }, item: (v, w) => (o.current.add(v), w && (a.current.has(w) ? a.current.get(w).add(v) : a.current.set(w, /* @__PURE__ */ new Set([v]))), f(3, () => {
1563
+ }, item: (v, w) => (o.current.add(v), w && (a.current.has(w) ? a.current.get(w).add(v) : a.current.set(w, /* @__PURE__ */ new Set([v]))), h(3, () => {
1563
1564
  ne(), z(), n.current.value || L(), C.emit();
1564
1565
  }), () => {
1565
1566
  i.current.delete(v), o.current.delete(v), n.current.filtered.items.delete(v);
1566
1567
  let M = K();
1567
- f(4, () => {
1568
+ h(4, () => {
1568
1569
  ne(), M?.getAttribute("id") === v && L(), C.emit();
1569
1570
  });
1570
1571
  }), group: (v) => (a.current.has(v) || a.current.set(v, /* @__PURE__ */ new Set()), () => {
@@ -1572,7 +1573,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
1572
1573
  }), filter: () => c.current.shouldFilter, label: s || e["aria-label"], getDisablePointerSelection: () => c.current.disablePointerSelection, listId: A, inputId: k, labelId: E, listInnerRef: R }), []);
1573
1574
  function I(v, w) {
1574
1575
  var M, D;
1575
- let T = (D = (M = c.current) == null ? void 0 : M.filter) != null ? D : Ri;
1576
+ let T = (D = (M = c.current) == null ? void 0 : M.filter) != null ? D : Ei;
1576
1577
  return v ? T(v, n.current.search, w) : 0;
1577
1578
  }
1578
1579
  function z() {
@@ -1591,8 +1592,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
1591
1592
  let Q = D.getAttribute("id"), te = T.getAttribute("id");
1592
1593
  return ((G = v.get(te)) != null ? G : 0) - ((Y = v.get(Q)) != null ? Y : 0);
1593
1594
  }).forEach((D) => {
1594
- let T = D.closest(Dt);
1595
- T ? T.appendChild(D.parentElement === T ? D : D.closest(`${Dt} > *`)) : M.appendChild(D.parentElement === M ? D : D.closest(`${Dt} > *`));
1595
+ let T = D.closest(kt);
1596
+ T ? T.appendChild(D.parentElement === T ? D : D.closest(`${kt} > *`)) : M.appendChild(D.parentElement === M ? D : D.closest(`${kt} > *`));
1596
1597
  }), w.sort((D, T) => T[1] - D[1]).forEach((D) => {
1597
1598
  var T;
1598
1599
  let G = (T = R.current) == null ? void 0 : T.querySelector(`${Ye}[${Ve}="${encodeURIComponent(D[0])}"]`);
@@ -1624,7 +1625,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
1624
1625
  function se() {
1625
1626
  var v, w, M;
1626
1627
  let D = K();
1627
- D && (((v = D.parentElement) == null ? void 0 : v.firstChild) === D && ((M = (w = D.closest(Ye)) == null ? void 0 : w.querySelector(Ni)) == null || M.scrollIntoView({ block: "nearest" })), D.scrollIntoView({ block: "nearest" }));
1628
+ D && (((v = D.parentElement) == null ? void 0 : v.firstChild) === D && ((M = (w = D.closest(Ye)) == null ? void 0 : w.querySelector(Ri)) == null || M.scrollIntoView({ block: "nearest" })), D.scrollIntoView({ block: "nearest" }));
1628
1629
  }
1629
1630
  function K() {
1630
1631
  var v;
@@ -1632,7 +1633,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
1632
1633
  }
1633
1634
  function oe() {
1634
1635
  var v;
1635
- return Array.from(((v = R.current) == null ? void 0 : v.querySelectorAll(ln)) || []);
1636
+ return Array.from(((v = R.current) == null ? void 0 : v.querySelectorAll(sn)) || []);
1636
1637
  }
1637
1638
  function le(v) {
1638
1639
  let w = oe()[v];
@@ -1645,7 +1646,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
1645
1646
  }
1646
1647
  function ce(v) {
1647
1648
  let w = K(), M = w?.closest(Ye), D;
1648
- for (; M && !D; ) M = v > 0 ? Ti(M, Ye) : zi(M, Ye), D = M?.querySelector(ln);
1649
+ for (; M && !D; ) M = v > 0 ? zi(M, Ye) : Oi(M, Ye), D = M?.querySelector(sn);
1649
1650
  D ? C.setState("value", D.getAttribute(Ve)) : ie(v);
1650
1651
  }
1651
1652
  let ee = () => le(oe().length - 1), F = (v) => {
@@ -1688,78 +1689,78 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
1688
1689
  v.preventDefault();
1689
1690
  let D = K();
1690
1691
  if (D) {
1691
- let T = new Event(At);
1692
+ let T = new Event(Mt);
1692
1693
  D.dispatchEvent(T);
1693
1694
  }
1694
1695
  }
1695
1696
  }
1696
- } }, x.createElement("label", { "cmdk-label": "", htmlFor: N.inputId, id: N.labelId, style: Vi }, s), wt(e, (v) => x.createElement(ur.Provider, { value: C }, x.createElement(dr.Provider, { value: N }, v))));
1697
- }), Ei = x.forwardRef((e, t) => {
1697
+ } }, x.createElement("label", { "cmdk-label": "", htmlFor: N.inputId, id: N.labelId, style: Li }, s), wt(e, (v) => x.createElement(ur.Provider, { value: C }, x.createElement(dr.Provider, { value: N }, v))));
1698
+ }), ki = x.forwardRef((e, t) => {
1698
1699
  var n, o;
1699
1700
  let a = ke(), i = x.useRef(null), l = x.useContext(mr), c = ot(), s = fr(e), d = (o = (n = s.current) == null ? void 0 : n.forceMount) != null ? o : l?.forceMount;
1700
- Oe(() => {
1701
+ _e(() => {
1701
1702
  if (!d) return c.item(a, l?.id);
1702
1703
  }, [d]);
1703
- let g = hr(a, i, [e.value, e.children, i], e.keywords), m = Xt(), h = Ae((f) => f.value && f.value === g.current), y = Ae((f) => d || c.filter() === !1 ? !0 : f.search ? f.filtered.items.get(a) > 0 : !0);
1704
+ let g = hr(a, i, [e.value, e.children, i], e.keywords), m = Qt(), f = Ae((h) => h.value && h.value === g.current), y = Ae((h) => d || c.filter() === !1 ? !0 : h.search ? h.filtered.items.get(a) > 0 : !0);
1704
1705
  x.useEffect(() => {
1705
- let f = i.current;
1706
- if (!(!f || e.disabled)) return f.addEventListener(At, u), () => f.removeEventListener(At, u);
1706
+ let h = i.current;
1707
+ if (!(!h || e.disabled)) return h.addEventListener(Mt, u), () => h.removeEventListener(Mt, u);
1707
1708
  }, [y, e.onSelect, e.disabled]);
1708
1709
  function u() {
1709
- var f, C;
1710
- S(), (C = (f = s.current).onSelect) == null || C.call(f, g.current);
1710
+ var h, C;
1711
+ S(), (C = (h = s.current).onSelect) == null || C.call(h, g.current);
1711
1712
  }
1712
1713
  function S() {
1713
1714
  m.setState("value", g.current, !0);
1714
1715
  }
1715
1716
  if (!y) return null;
1716
1717
  let { disabled: p, value: P, onSelect: A, forceMount: E, keywords: k, ...R } = e;
1717
- return x.createElement(re.div, { ref: $e(i, t), ...R, id: a, "cmdk-item": "", role: "option", "aria-disabled": !!p, "aria-selected": !!h, "data-disabled": !!p, "data-selected": !!h, onPointerMove: p || c.getDisablePointerSelection() ? void 0 : S, onClick: p ? void 0 : u }, e.children);
1718
- }), ki = x.forwardRef((e, t) => {
1719
- let { heading: n, children: o, forceMount: a, ...i } = e, l = ke(), c = x.useRef(null), s = x.useRef(null), d = ke(), g = ot(), m = Ae((y) => a || g.filter() === !1 ? !0 : y.search ? y.filtered.groups.has(l) : !0);
1720
- Oe(() => g.group(l), []), hr(l, c, [e.value, e.heading, s]);
1721
- let h = x.useMemo(() => ({ id: l, forceMount: a }), [a]);
1722
- return x.createElement(re.div, { ref: $e(c, t), ...i, "cmdk-group": "", role: "presentation", hidden: m ? void 0 : !0 }, n && x.createElement("div", { ref: s, "cmdk-group-heading": "", "aria-hidden": !0, id: d }, n), wt(e, (y) => x.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? d : void 0 }, x.createElement(mr.Provider, { value: h }, y))));
1718
+ return x.createElement(re.div, { ref: $e(i, t), ...R, id: a, "cmdk-item": "", role: "option", "aria-disabled": !!p, "aria-selected": !!f, "data-disabled": !!p, "data-selected": !!f, onPointerMove: p || c.getDisablePointerSelection() ? void 0 : S, onClick: p ? void 0 : u }, e.children);
1723
1719
  }), Di = x.forwardRef((e, t) => {
1720
+ let { heading: n, children: o, forceMount: a, ...i } = e, l = ke(), c = x.useRef(null), s = x.useRef(null), d = ke(), g = ot(), m = Ae((y) => a || g.filter() === !1 ? !0 : y.search ? y.filtered.groups.has(l) : !0);
1721
+ _e(() => g.group(l), []), hr(l, c, [e.value, e.heading, s]);
1722
+ let f = x.useMemo(() => ({ id: l, forceMount: a }), [a]);
1723
+ return x.createElement(re.div, { ref: $e(c, t), ...i, "cmdk-group": "", role: "presentation", hidden: m ? void 0 : !0 }, n && x.createElement("div", { ref: s, "cmdk-group-heading": "", "aria-hidden": !0, id: d }, n), wt(e, (y) => x.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? d : void 0 }, x.createElement(mr.Provider, { value: f }, y))));
1724
+ }), Pi = x.forwardRef((e, t) => {
1724
1725
  let { alwaysRender: n, ...o } = e, a = x.useRef(null), i = Ae((l) => !l.search);
1725
1726
  return !n && !i ? null : x.createElement(re.div, { ref: $e(a, t), ...o, "cmdk-separator": "", role: "separator" });
1726
- }), Pi = x.forwardRef((e, t) => {
1727
- let { onValueChange: n, ...o } = e, a = e.value != null, i = Xt(), l = Ae((d) => d.search), c = Ae((d) => d.selectedItemId), s = ot();
1727
+ }), Fi = x.forwardRef((e, t) => {
1728
+ let { onValueChange: n, ...o } = e, a = e.value != null, i = Qt(), l = Ae((d) => d.search), c = Ae((d) => d.selectedItemId), s = ot();
1728
1729
  return x.useEffect(() => {
1729
1730
  e.value != null && i.setState("search", e.value);
1730
1731
  }, [e.value]), x.createElement(re.input, { ref: t, ...o, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: !1, "aria-autocomplete": "list", role: "combobox", "aria-expanded": !0, "aria-controls": s.listId, "aria-labelledby": s.labelId, "aria-activedescendant": c, id: s.inputId, type: "text", value: a ? e.value : l, onChange: (d) => {
1731
1732
  a || i.setState("search", d.target.value), n?.(d.target.value);
1732
1733
  } });
1733
- }), Fi = x.forwardRef((e, t) => {
1734
+ }), Ii = x.forwardRef((e, t) => {
1734
1735
  let { children: n, label: o = "Suggestions", ...a } = e, i = x.useRef(null), l = x.useRef(null), c = Ae((d) => d.selectedItemId), s = ot();
1735
1736
  return x.useEffect(() => {
1736
1737
  if (l.current && i.current) {
1737
- let d = l.current, g = i.current, m, h = new ResizeObserver(() => {
1738
+ let d = l.current, g = i.current, m, f = new ResizeObserver(() => {
1738
1739
  m = requestAnimationFrame(() => {
1739
1740
  let y = d.offsetHeight;
1740
1741
  g.style.setProperty("--cmdk-list-height", y.toFixed(1) + "px");
1741
1742
  });
1742
1743
  });
1743
- return h.observe(d), () => {
1744
- cancelAnimationFrame(m), h.unobserve(d);
1744
+ return f.observe(d), () => {
1745
+ cancelAnimationFrame(m), f.unobserve(d);
1745
1746
  };
1746
1747
  }
1747
1748
  }, []), x.createElement(re.div, { ref: $e(i, t), ...a, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": c, "aria-label": o, id: s.listId }, wt(e, (d) => x.createElement("div", { ref: $e(l, s.listInnerRef), "cmdk-list-sizer": "" }, d)));
1748
- }), Ii = x.forwardRef((e, t) => {
1749
+ }), Mi = x.forwardRef((e, t) => {
1749
1750
  let { open: n, onOpenChange: o, overlayClassName: a, contentClassName: i, container: l, ...c } = e;
1750
- return x.createElement(wi, { open: n, onOpenChange: o }, x.createElement(yi, { container: l }, x.createElement(Ci, { "cmdk-overlay": "", className: a }), x.createElement(Si, { "aria-label": e.label, "cmdk-dialog": "", className: i }, x.createElement(gr, { ref: t, ...c }))));
1751
- }), Mi = x.forwardRef((e, t) => Ae((n) => n.filtered.count === 0) ? x.createElement(re.div, { ref: t, ...e, "cmdk-empty": "", role: "presentation" }) : null), Ai = x.forwardRef((e, t) => {
1751
+ return x.createElement(yi, { open: n, onOpenChange: o }, x.createElement(Ci, { container: l }, x.createElement(Si, { "cmdk-overlay": "", className: a }), x.createElement(Ni, { "aria-label": e.label, "cmdk-dialog": "", className: i }, x.createElement(gr, { ref: t, ...c }))));
1752
+ }), Ai = x.forwardRef((e, t) => Ae((n) => n.filtered.count === 0) ? x.createElement(re.div, { ref: t, ...e, "cmdk-empty": "", role: "presentation" }) : null), Ti = x.forwardRef((e, t) => {
1752
1753
  let { progress: n, children: o, label: a = "Loading...", ...i } = e;
1753
1754
  return x.createElement(re.div, { ref: t, ...i, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": a }, wt(e, (l) => x.createElement("div", { "aria-hidden": !0 }, l)));
1754
- }), me = Object.assign(gr, { List: Fi, Item: Ei, Input: Pi, Group: ki, Separator: Di, Dialog: Ii, Empty: Mi, Loading: Ai });
1755
- function Ti(e, t) {
1755
+ }), me = Object.assign(gr, { List: Ii, Item: ki, Input: Fi, Group: Di, Separator: Pi, Dialog: Mi, Empty: Ai, Loading: Ti });
1756
+ function zi(e, t) {
1756
1757
  let n = e.nextElementSibling;
1757
1758
  for (; n; ) {
1758
1759
  if (n.matches(t)) return n;
1759
1760
  n = n.nextElementSibling;
1760
1761
  }
1761
1762
  }
1762
- function zi(e, t) {
1763
+ function Oi(e, t) {
1763
1764
  let n = e.previousElementSibling;
1764
1765
  for (; n; ) {
1765
1766
  if (n.matches(t)) return n;
@@ -1768,22 +1769,22 @@ function zi(e, t) {
1768
1769
  }
1769
1770
  function fr(e) {
1770
1771
  let t = x.useRef(e);
1771
- return Oe(() => {
1772
+ return _e(() => {
1772
1773
  t.current = e;
1773
1774
  }), t;
1774
1775
  }
1775
- var Oe = typeof window > "u" ? x.useEffect : x.useLayoutEffect;
1776
+ var _e = typeof window > "u" ? x.useEffect : x.useLayoutEffect;
1776
1777
  function Le(e) {
1777
1778
  let t = x.useRef();
1778
1779
  return t.current === void 0 && (t.current = e()), t;
1779
1780
  }
1780
1781
  function Ae(e) {
1781
- let t = Xt(), n = () => e(t.snapshot());
1782
+ let t = Qt(), n = () => e(t.snapshot());
1782
1783
  return x.useSyncExternalStore(t.subscribe, n, n);
1783
1784
  }
1784
1785
  function hr(e, t, n, o = []) {
1785
1786
  let a = x.useRef(), i = ot();
1786
- return Oe(() => {
1787
+ return _e(() => {
1787
1788
  var l;
1788
1789
  let c = (() => {
1789
1790
  var d;
@@ -1797,25 +1798,25 @@ function hr(e, t, n, o = []) {
1797
1798
  }
1798
1799
  var _i = () => {
1799
1800
  let [e, t] = x.useState(), n = Le(() => /* @__PURE__ */ new Map());
1800
- return Oe(() => {
1801
+ return _e(() => {
1801
1802
  n.current.forEach((o) => o()), n.current = /* @__PURE__ */ new Map();
1802
1803
  }, [e]), (o, a) => {
1803
1804
  n.current.set(o, a), t({});
1804
1805
  };
1805
1806
  };
1806
- function Oi(e) {
1807
+ function Vi(e) {
1807
1808
  let t = e.type;
1808
1809
  return typeof t == "function" ? t(e.props) : "render" in t ? t.render(e.props) : e;
1809
1810
  }
1810
1811
  function wt({ asChild: e, children: t }, n) {
1811
- return e && x.isValidElement(t) ? x.cloneElement(Oi(t), { ref: t.ref }, n(t.props.children)) : n(t);
1812
+ return e && x.isValidElement(t) ? x.cloneElement(Vi(t), { ref: t.ref }, n(t.props.children)) : n(t);
1812
1813
  }
1813
- var Vi = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
1814
+ var Li = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
1814
1815
  const pr = x.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
1815
1816
  me,
1816
1817
  {
1817
1818
  ref: n,
1818
- className: _(
1819
+ className: O(
1819
1820
  "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
1820
1821
  e
1821
1822
  ),
@@ -1823,13 +1824,13 @@ const pr = x.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
1823
1824
  }
1824
1825
  ));
1825
1826
  pr.displayName = me.displayName;
1826
- const Li = x.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ b("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
1827
- /* @__PURE__ */ r(Vt, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
1827
+ const $i = x.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ b("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
1828
+ /* @__PURE__ */ r(_t, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
1828
1829
  /* @__PURE__ */ r(
1829
1830
  me.Input,
1830
1831
  {
1831
1832
  ref: n,
1832
- className: _(
1833
+ className: O(
1833
1834
  "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
1834
1835
  e
1835
1836
  ),
@@ -1837,12 +1838,12 @@ const Li = x.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ b("div",
1837
1838
  }
1838
1839
  )
1839
1840
  ] }));
1840
- Li.displayName = me.Input.displayName;
1841
+ $i.displayName = me.Input.displayName;
1841
1842
  const br = x.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
1842
1843
  me.List,
1843
1844
  {
1844
1845
  ref: n,
1845
- className: _("max-h-[300px] overflow-y-auto overflow-x-hidden", e),
1846
+ className: O("max-h-[300px] overflow-y-auto overflow-x-hidden", e),
1846
1847
  ...t
1847
1848
  }
1848
1849
  ));
@@ -1856,32 +1857,32 @@ const vr = x.forwardRef((e, t) => /* @__PURE__ */ r(
1856
1857
  }
1857
1858
  ));
1858
1859
  vr.displayName = me.Empty.displayName;
1859
- const $i = x.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
1860
+ const Gi = x.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
1860
1861
  me.Group,
1861
1862
  {
1862
1863
  ref: n,
1863
- className: _(
1864
+ className: O(
1864
1865
  "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
1865
1866
  e
1866
1867
  ),
1867
1868
  ...t
1868
1869
  }
1869
1870
  ));
1870
- $i.displayName = me.Group.displayName;
1871
- const Gi = x.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
1871
+ Gi.displayName = me.Group.displayName;
1872
+ const Bi = x.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
1872
1873
  me.Separator,
1873
1874
  {
1874
1875
  ref: n,
1875
- className: _("-mx-1 h-px bg-border", e),
1876
+ className: O("-mx-1 h-px bg-border", e),
1876
1877
  ...t
1877
1878
  }
1878
1879
  ));
1879
- Gi.displayName = me.Separator.displayName;
1880
+ Bi.displayName = me.Separator.displayName;
1880
1881
  const xr = x.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
1881
1882
  me.Item,
1882
1883
  {
1883
1884
  ref: n,
1884
- className: _(
1885
+ className: O(
1885
1886
  "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-[selected='true']:bg-accent aria-[selected='true']:text-accent-foreground data-[disabled='true']:pointer-events-none data-[disabled='true']:opacity-50",
1886
1887
  e
1887
1888
  ),
@@ -1889,21 +1890,21 @@ const xr = x.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
1889
1890
  }
1890
1891
  ));
1891
1892
  xr.displayName = me.Item.displayName;
1892
- const Bi = ({
1893
+ const ji = ({
1893
1894
  className: e,
1894
1895
  ...t
1895
1896
  }) => /* @__PURE__ */ r(
1896
1897
  "span",
1897
1898
  {
1898
- className: _(
1899
+ className: O(
1899
1900
  "ml-auto text-xs tracking-widest text-muted-foreground",
1900
1901
  e
1901
1902
  ),
1902
1903
  ...t
1903
1904
  }
1904
1905
  );
1905
- Bi.displayName = "CommandShortcut";
1906
- const ji = ({
1906
+ ji.displayName = "CommandShortcut";
1907
+ const Hi = ({
1907
1908
  value: e,
1908
1909
  onChange: t,
1909
1910
  options: n = [],
@@ -1918,21 +1919,21 @@ const ji = ({
1918
1919
  return n.filter(
1919
1920
  (S) => S.label.toLowerCase().includes(u) || S.value.toLowerCase().includes(u)
1920
1921
  );
1921
- }, [n, s]), [m, h] = H(null), y = wn({
1922
+ }, [n, s]), [m, f] = H(null), y = xn({
1922
1923
  count: g.length,
1923
1924
  getScrollElement: () => m,
1924
1925
  estimateSize: () => 35,
1925
1926
  // Average height of a command item
1926
1927
  overscan: 5
1927
1928
  });
1928
- return /* @__PURE__ */ b(Bt, { open: l, onOpenChange: c, children: [
1929
- /* @__PURE__ */ r(jt, { asChild: !0, children: /* @__PURE__ */ b(
1929
+ return /* @__PURE__ */ b(Gt, { open: l, onOpenChange: c, children: [
1930
+ /* @__PURE__ */ r(Bt, { asChild: !0, children: /* @__PURE__ */ b(
1930
1931
  ge,
1931
1932
  {
1932
1933
  variant: "outline",
1933
1934
  role: "combobox",
1934
1935
  "aria-expanded": l,
1935
- className: _("w-full justify-between h-8 px-2 font-normal text-xs", a),
1936
+ className: O("w-full justify-between h-8 px-2 font-normal text-xs", a),
1936
1937
  children: [
1937
1938
  /* @__PURE__ */ r("span", { className: "truncate", children: e ? n.find((u) => u.value === e)?.label || e : o }),
1938
1939
  /* @__PURE__ */ r(oa, { className: "ml-2 h-3 w-3 shrink-0 opacity-50" })
@@ -1940,7 +1941,7 @@ const ji = ({
1940
1941
  }
1941
1942
  ) }),
1942
1943
  /* @__PURE__ */ r(
1943
- Ht,
1944
+ jt,
1944
1945
  {
1945
1946
  className: "w-[var(--radix-popover-trigger-width)] p-0 max-h-[400px] overflow-hidden",
1946
1947
  align: "start",
@@ -1948,7 +1949,7 @@ const ji = ({
1948
1949
  collisionPadding: 10,
1949
1950
  children: /* @__PURE__ */ b(pr, { shouldFilter: !1, className: "h-full", children: [
1950
1951
  /* @__PURE__ */ b("div", { className: "flex items-center border-b px-3", children: [
1951
- /* @__PURE__ */ r(Vt, { className: "mr-2 h-3.5 w-3.5 shrink-0 opacity-50" }),
1952
+ /* @__PURE__ */ r(_t, { className: "mr-2 h-3.5 w-3.5 shrink-0 opacity-50" }),
1952
1953
  /* @__PURE__ */ r(
1953
1954
  "input",
1954
1955
  {
@@ -1962,7 +1963,7 @@ const ji = ({
1962
1963
  /* @__PURE__ */ b(
1963
1964
  br,
1964
1965
  {
1965
- ref: h,
1966
+ ref: f,
1966
1967
  className: "max-h-[300px] overflow-y-auto",
1967
1968
  style: { maxHeight: "300px" },
1968
1969
  children: [
@@ -1999,9 +2000,9 @@ const ji = ({
1999
2000
  children: [
2000
2001
  /* @__PURE__ */ r("span", { className: "truncate", children: S.label }),
2001
2002
  /* @__PURE__ */ r(
2002
- $t,
2003
+ Lt,
2003
2004
  {
2004
- className: _(
2005
+ className: O(
2005
2006
  "h-3 w-3",
2006
2007
  e === S.value ? "opacity-100" : "opacity-0"
2007
2008
  )
@@ -2023,7 +2024,7 @@ const ji = ({
2023
2024
  }
2024
2025
  )
2025
2026
  ] });
2026
- }, cn = ({
2027
+ }, ln = ({
2027
2028
  value: e,
2028
2029
  options: t = [],
2029
2030
  className: n,
@@ -2048,7 +2049,7 @@ const ji = ({
2048
2049
  isColored: !d
2049
2050
  };
2050
2051
  };
2051
- return /* @__PURE__ */ r("div", { className: _("inline-flex items-center gap-1.5 flex-wrap py-1", n), children: i.map((c, s) => {
2052
+ return /* @__PURE__ */ r("div", { className: O("inline-flex items-center gap-1.5 flex-wrap py-1", n), children: i.map((c, s) => {
2052
2053
  const d = l(c.color);
2053
2054
  return /* @__PURE__ */ b(
2054
2055
  "div",
@@ -2058,7 +2059,7 @@ const ji = ({
2058
2059
  children: [
2059
2060
  /* @__PURE__ */ r("span", { className: "w-1.5 h-1.5 rounded-full", style: d.dot }),
2060
2061
  o?.options.meta?.enableSearchHighlighting ? /* @__PURE__ */ r(
2061
- bn,
2062
+ pn,
2062
2063
  {
2063
2064
  text: c.label,
2064
2065
  highlight: typeof o.getState().globalFilter == "string" ? o.getState().globalFilter : o.getState().globalFilter?.quickSearch
@@ -2069,7 +2070,7 @@ const ji = ({
2069
2070
  `${c.value}-${s}`
2070
2071
  );
2071
2072
  }) });
2072
- }, dn = ({
2073
+ }, cn = ({
2073
2074
  value: e,
2074
2075
  onChange: t,
2075
2076
  options: n = [],
@@ -2083,11 +2084,11 @@ const ji = ({
2083
2084
  j.useEffect(() => {
2084
2085
  c && o === "dropdown" ? g.current || (d(!0), g.current = !0) : (d(!1), g.current = !1);
2085
2086
  }, [c, o]);
2086
- const m = (h) => {
2087
- ["Enter", " ", "ArrowUp", "ArrowDown"].includes(h.key) && h.stopPropagation();
2087
+ const m = (f) => {
2088
+ ["Enter", " ", "ArrowUp", "ArrowDown"].includes(f.key) && f.stopPropagation();
2088
2089
  };
2089
- return o === "combobox" ? /* @__PURE__ */ r("div", { className: _("w-full", i), children: /* @__PURE__ */ r(
2090
- ji,
2090
+ return o === "combobox" ? /* @__PURE__ */ r("div", { className: O("w-full", i), children: /* @__PURE__ */ r(
2091
+ Hi,
2091
2092
  {
2092
2093
  value: e,
2093
2094
  onChange: t,
@@ -2095,10 +2096,10 @@ const ji = ({
2095
2096
  placeholder: l,
2096
2097
  onBlur: a
2097
2098
  }
2098
- ) }) : o === "radio" ? /* @__PURE__ */ r("div", { className: _("w-full px-2 py-1", i), onBlur: a, children: /* @__PURE__ */ r(Ut, { value: e || "", onValueChange: t, children: n.map((h) => /* @__PURE__ */ b("div", { className: "flex items-center space-x-2", children: [
2099
- /* @__PURE__ */ r(mt, { value: h.value, id: `radio-${h.value}` }),
2100
- /* @__PURE__ */ r(ze, { htmlFor: `radio-${h.value}`, className: "text-xs font-medium cursor-pointer", children: h.label })
2101
- ] }, h.value)) }) }) : /* @__PURE__ */ r("div", { className: _("w-full -m-1 p-0.5", i), onBlur: a, onKeyDown: m, children: /* @__PURE__ */ b(
2099
+ ) }) : o === "radio" ? /* @__PURE__ */ r("div", { className: O("w-full px-2 py-1", i), onBlur: a, children: /* @__PURE__ */ r(Wt, { value: e || "", onValueChange: t, children: n.map((f) => /* @__PURE__ */ b("div", { className: "flex items-center space-x-2", children: [
2100
+ /* @__PURE__ */ r(mt, { value: f.value, id: `radio-${f.value}` }),
2101
+ /* @__PURE__ */ r(ze, { htmlFor: `radio-${f.value}`, className: "text-xs font-medium cursor-pointer", children: f.label })
2102
+ ] }, f.value)) }) }) : /* @__PURE__ */ r("div", { className: O("w-full -m-1 p-0.5", i), onBlur: a, onKeyDown: m, children: /* @__PURE__ */ b(
2102
2103
  Je,
2103
2104
  {
2104
2105
  value: e,
@@ -2107,11 +2108,11 @@ const ji = ({
2107
2108
  onOpenChange: d,
2108
2109
  children: [
2109
2110
  /* @__PURE__ */ r(et, { className: "h-7 py-0 border-0 shadow-none bg-transparent focus:ring-0 focus:ring-offset-0 focus-visible:ring-0 focus-visible:ring-offset-0 focus:outline-none", children: /* @__PURE__ */ r(tt, { placeholder: l }) }),
2110
- /* @__PURE__ */ r(nt, { children: n.map((h) => /* @__PURE__ */ r(Ie, { value: h.value, children: h.label }, h.value)) })
2111
+ /* @__PURE__ */ r(nt, { children: n.map((f) => /* @__PURE__ */ r(Ie, { value: f.value, children: f.label }, f.value)) })
2111
2112
  ]
2112
2113
  }
2113
2114
  ) });
2114
- }, Hi = ({
2115
+ }, qi = ({
2115
2116
  options: e = [],
2116
2117
  selectedValues: t = [],
2117
2118
  onChange: n,
@@ -2122,7 +2123,7 @@ const ji = ({
2122
2123
  }, i = () => {
2123
2124
  t.length === e.length ? n([]) : n(e.map((l) => l.value));
2124
2125
  };
2125
- return /* @__PURE__ */ b("div", { className: _("flex flex-col gap-2 p-2 min-w-[180px]", o), children: [
2126
+ return /* @__PURE__ */ b("div", { className: O("flex flex-col gap-2 p-2 min-w-[180px]", o), children: [
2126
2127
  /* @__PURE__ */ b("div", { className: "flex items-center justify-between border-b pb-2 mb-1", children: [
2127
2128
  /* @__PURE__ */ r("span", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: "Filter Options" }),
2128
2129
  /* @__PURE__ */ r(
@@ -2153,7 +2154,7 @@ const ji = ({
2153
2154
  )
2154
2155
  ] }, l.value)) }) })
2155
2156
  ] });
2156
- }, un = ({
2157
+ }, dn = ({
2157
2158
  value: e,
2158
2159
  showLabel: t = !0,
2159
2160
  color: n = "default",
@@ -2183,11 +2184,11 @@ const ji = ({
2183
2184
  return "h-2";
2184
2185
  }
2185
2186
  };
2186
- return /* @__PURE__ */ b("div", { className: _("flex items-center gap-2 w-full", a), children: [
2187
+ return /* @__PURE__ */ b("div", { className: O("flex items-center gap-2 w-full", a), children: [
2187
2188
  /* @__PURE__ */ r("div", { className: "flex-1 bg-muted rounded-full overflow-hidden min-w-[60px]", children: /* @__PURE__ */ r(
2188
2189
  "div",
2189
2190
  {
2190
- className: _(
2191
+ className: O(
2191
2192
  "transition-all duration-300 rounded-full",
2192
2193
  c(),
2193
2194
  l()
@@ -2200,7 +2201,7 @@ const ji = ({
2200
2201
  "%"
2201
2202
  ] })
2202
2203
  ] });
2203
- }, mn = ({
2204
+ }, un = ({
2204
2205
  value: e,
2205
2206
  values: t,
2206
2207
  color: n = "default",
@@ -2211,14 +2212,14 @@ const ji = ({
2211
2212
  }) => {
2212
2213
  const c = e || t || [], s = W(() => {
2213
2214
  if (!c || c.length === 0) return "";
2214
- const h = Math.max(...c), y = Math.min(...c), u = h - y || 1;
2215
+ const f = Math.max(...c), y = Math.min(...c), u = f - y || 1;
2215
2216
  return `M ${c.map((p, P) => {
2216
2217
  const A = P / (c.length - 1) * a, E = o - (p - y) / u * o;
2217
2218
  return `${A},${E}`;
2218
2219
  }).join(" L ")}`;
2219
2220
  }, [c, o, a]), d = W(() => {
2220
2221
  if (!c || c.length === 0 || !i) return [];
2221
- const h = Math.max(...c), y = Math.min(...c), u = h - y || 1;
2222
+ const f = Math.max(...c), y = Math.min(...c), u = f - y || 1;
2222
2223
  return c.map((S, p) => ({
2223
2224
  x: p / (c.length - 1) * a,
2224
2225
  y: o - (S - y) / u * o
@@ -2255,7 +2256,7 @@ const ji = ({
2255
2256
  {
2256
2257
  width: a,
2257
2258
  height: o,
2258
- className: _("inline-block", l),
2259
+ className: O("inline-block", l),
2259
2260
  viewBox: `0 0 ${a} ${o}`,
2260
2261
  children: [
2261
2262
  /* @__PURE__ */ r(
@@ -2263,58 +2264,58 @@ const ji = ({
2263
2264
  {
2264
2265
  d: s,
2265
2266
  fill: "none",
2266
- className: _("transition-colors", g()),
2267
+ className: O("transition-colors", g()),
2267
2268
  strokeWidth: "2",
2268
2269
  strokeLinecap: "round",
2269
2270
  strokeLinejoin: "round"
2270
2271
  }
2271
2272
  ),
2272
- i && d.map((h, y) => /* @__PURE__ */ r(
2273
+ i && d.map((f, y) => /* @__PURE__ */ r(
2273
2274
  "circle",
2274
2275
  {
2275
- cx: h.x,
2276
- cy: h.y,
2276
+ cx: f.x,
2277
+ cy: f.y,
2277
2278
  r: "2",
2278
- className: _("transition-colors", m())
2279
+ className: O("transition-colors", m())
2279
2280
  },
2280
2281
  y
2281
2282
  ))
2282
2283
  ]
2283
2284
  }
2284
2285
  );
2285
- }, qi = {
2286
+ }, Wi = {
2286
2287
  renderers: {
2287
2288
  text: { Cell: Ue, Editor: Ke },
2288
2289
  number: { Cell: Ue, Editor: Ke },
2289
2290
  date: { Cell: Ue, Editor: Ke },
2290
2291
  datetime: { Cell: Ue, Editor: Ke },
2291
2292
  longtext: { Cell: Ue, Editor: Ke },
2292
- boolean: { Cell: Aa, Editor: Ta },
2293
- select: { Cell: cn, Editor: dn },
2294
- multiselect: { Cell: cn, Editor: dn },
2295
- progress: { Cell: un },
2296
- sparkline: { Cell: mn },
2293
+ boolean: { Cell: Ta, Editor: za },
2294
+ select: { Cell: ln, Editor: cn },
2295
+ multiselect: { Cell: ln, Editor: cn },
2296
+ progress: { Cell: dn },
2297
+ sparkline: { Cell: un },
2297
2298
  chart: {
2298
2299
  Cell: (e) => {
2299
2300
  const t = e.value;
2300
- return Array.isArray(t) ? j.createElement(mn, { values: t, ...e }) : j.createElement(un, { value: t, ...e });
2301
+ return Array.isArray(t) ? j.createElement(un, { values: t, ...e }) : j.createElement(dn, { value: t, ...e });
2301
2302
  }
2302
2303
  }
2303
2304
  }
2304
- }, Wi = Ot(qi), Ui = () => fn(Wi), Ki = ({
2305
+ }, Ui = Ot(Wi), Ki = () => gn(Ui), Yi = ({
2305
2306
  getValue: e,
2306
2307
  row: t,
2307
2308
  column: n,
2308
2309
  table: o
2309
2310
  }) => {
2310
- const { renderers: a } = Ui(), i = e(), [l, c] = H(i), s = n.columnDef.meta, d = s?.columnType || "text", g = o.options.meta?.isRowEditable ? o.options.meta.isRowEditable(t.original) : !0, m = o.options.meta?.isCellEditable ? o.options.meta.isCellEditable(t.original, n.id) : !0, h = n.columnDef.enableEditing !== !1, y = o.options.meta?.enableEditing || !1, u = o.options.meta?.editingRows?.[t.index] || !1, S = y && u && g && m && h;
2311
+ const { renderers: a } = Ki(), i = e(), [l, c] = H(i), s = n.columnDef.meta, d = s?.columnType || "text", g = o.options.meta?.isRowEditable ? o.options.meta.isRowEditable(t.original) : !0, m = o.options.meta?.isCellEditable ? o.options.meta.isCellEditable(t.original, n.id) : !0, f = n.columnDef.enableEditing !== !1, y = o.options.meta?.enableEditing || !1, u = o.options.meta?.editingRows?.[t.index] || !1, S = y && u && g && m && f;
2311
2312
  ue(() => {
2312
2313
  c(i);
2313
2314
  }, [i]);
2314
2315
  const p = () => {
2315
2316
  o.options.meta?.updateData(t.index, n.id, l);
2316
- }, P = (f) => {
2317
- c(f), (d === "boolean" || d === "select") && o.options.meta?.updateData(t.index, n.id, f);
2317
+ }, P = (h) => {
2318
+ c(h), (d === "boolean" || d === "select") && o.options.meta?.updateData(t.index, n.id, h);
2318
2319
  }, A = W(() => ({
2319
2320
  getValue: e,
2320
2321
  row: t,
@@ -2326,16 +2327,16 @@ const ji = ({
2326
2327
  onBlur: p,
2327
2328
  columnType: d,
2328
2329
  meta: s,
2329
- isFocused: o.options.meta?.focusedCell?.r === t.index && o.options.meta?.focusedCell?.c === o.getVisibleLeafColumns().findIndex((f) => f.id === n.id)
2330
+ isFocused: o.options.meta?.focusedCell?.r === t.index && o.options.meta?.focusedCell?.c === o.getVisibleLeafColumns().findIndex((h) => h.id === n.id)
2330
2331
  }), [e, t, n, l, d, s, P, p, o.options.meta?.focusedCell, o.getVisibleLeafColumns]);
2331
2332
  if (S) {
2332
2333
  if (s?.Editor) {
2333
2334
  const C = s.Editor;
2334
2335
  return /* @__PURE__ */ r(C, { ...A });
2335
2336
  }
2336
- const f = a[d];
2337
- if (f?.Editor) {
2338
- const C = f.Editor, N = {
2337
+ const h = a[d];
2338
+ if (h?.Editor) {
2339
+ const C = h.Editor, N = {
2339
2340
  ...d === "boolean" ? s?.booleanOptions : {},
2340
2341
  ...d === "select" ? s?.selectOptions : {}
2341
2342
  };
@@ -2343,8 +2344,8 @@ const ji = ({
2343
2344
  }
2344
2345
  }
2345
2346
  if (s?.Cell) {
2346
- const f = s.Cell;
2347
- return /* @__PURE__ */ r(f, { ...A });
2347
+ const h = s.Cell;
2348
+ return /* @__PURE__ */ r(h, { ...A });
2348
2349
  }
2349
2350
  const k = (a[d] || a.text).Cell, R = {
2350
2351
  ...d === "boolean" ? s?.booleanOptions : {},
@@ -2356,7 +2357,7 @@ const ji = ({
2356
2357
  ...d === "progress" || d === "chart" || d === "sparkline" ? s?.chartOptions : {}
2357
2358
  };
2358
2359
  return /* @__PURE__ */ r(k, { ...A, ...R });
2359
- }, xe = (e, t) => typeof e == "function" ? e(t) : e, Yi = (e, t) => {
2360
+ }, xe = (e, t) => typeof e == "function" ? e(t) : e, Qi = (e, t) => {
2360
2361
  const {
2361
2362
  columns: n,
2362
2363
  rowCount: o,
@@ -2368,7 +2369,7 @@ const ji = ({
2368
2369
  enableGrouping: d,
2369
2370
  enableRowPinning: g,
2370
2371
  enableColumnPinning: m,
2371
- enableTreeData: h,
2372
+ enableTreeData: f,
2372
2373
  getSubRows: y,
2373
2374
  manualPagination: u,
2374
2375
  manualSorting: S,
@@ -2377,7 +2378,7 @@ const ji = ({
2377
2378
  persistenceKey: A,
2378
2379
  defaultGrouping: E = [],
2379
2380
  getRowId: k
2380
- } = e, R = !!e.service || !!e.serviceName, { state: f, setState: C } = go({
2381
+ } = e, R = !!e.service || !!e.serviceName, { state: h, setState: C } = go({
2381
2382
  initialState: {
2382
2383
  sorting: [],
2383
2384
  columnFilters: [],
@@ -2442,20 +2443,20 @@ const ji = ({
2442
2443
  rowCount: o,
2443
2444
  pageCount: a,
2444
2445
  state: W(() => ({
2445
- sorting: f.sorting,
2446
- columnFilters: f.columnFilters,
2447
- globalFilter: f.globalFilter,
2448
- columnSizing: f.columnSizing,
2449
- rowSelection: f.rowSelection,
2450
- pagination: f.pagination,
2451
- grouping: f.grouping,
2452
- expanded: f.expanded,
2453
- rowPinning: f.rowPinning,
2454
- columnPinning: f.columnPinning,
2455
- columnVisibility: f.columnVisibility,
2456
- columnOrder: f.columnOrder,
2446
+ sorting: h.sorting,
2447
+ columnFilters: h.columnFilters,
2448
+ globalFilter: h.globalFilter,
2449
+ columnSizing: h.columnSizing,
2450
+ rowSelection: h.rowSelection,
2451
+ pagination: h.pagination,
2452
+ grouping: h.grouping,
2453
+ expanded: h.expanded,
2454
+ rowPinning: h.rowPinning,
2455
+ columnPinning: h.columnPinning,
2456
+ columnVisibility: h.columnVisibility,
2457
+ columnOrder: h.columnOrder,
2457
2458
  ...e.state
2458
- }), [f, e.state]),
2459
+ }), [h, e.state]),
2459
2460
  onSortingChange: I,
2460
2461
  onColumnFiltersChange: ne,
2461
2462
  onGlobalFilterChange: se,
@@ -2469,8 +2470,8 @@ const ji = ({
2469
2470
  onColumnVisibilityChange: ee,
2470
2471
  onColumnOrderChange: F,
2471
2472
  // Handlers
2472
- globalFilterFn: Ea,
2473
- defaultColumn: { cell: Ki, filterFn: ka },
2473
+ globalFilterFn: ka,
2474
+ defaultColumn: { cell: Yi, filterFn: Da },
2474
2475
  // Options
2475
2476
  manualPagination: R || u,
2476
2477
  manualSorting: R || S,
@@ -2486,45 +2487,45 @@ const ji = ({
2486
2487
  aggregationFns: {
2487
2488
  uniqueCount: (v, w) => new Set(w.map((M) => M.getValue(v))).size
2488
2489
  },
2489
- getSubRows: h ? y : void 0,
2490
+ getSubRows: f ? y : void 0,
2490
2491
  // Models
2491
2492
  getCoreRowModel: mo(),
2492
2493
  getSortedRowModel: uo(),
2493
2494
  getFilteredRowModel: co(),
2494
2495
  getPaginationRowModel: i ? lo() : void 0,
2495
2496
  getGroupedRowModel: d ? so() : void 0,
2496
- getExpandedRowModel: d || h ? io() : void 0,
2497
+ getExpandedRowModel: d || f ? io() : void 0,
2497
2498
  getFacetedUniqueValues: ao(),
2498
2499
  getFacetedMinMaxValues: oo(),
2499
2500
  // Meta will be populated in the main hook to include extra context
2500
2501
  meta: {}
2501
2502
  }),
2502
2503
  states: {
2503
- sorting: f.sorting,
2504
+ sorting: h.sorting,
2504
2505
  setSorting: I,
2505
- columnFilters: f.columnFilters,
2506
+ columnFilters: h.columnFilters,
2506
2507
  setColumnFilters: ne,
2507
- globalFilter: f.globalFilter,
2508
+ globalFilter: h.globalFilter,
2508
2509
  setGlobalFilter: se,
2509
- rowSelection: f.rowSelection,
2510
+ rowSelection: h.rowSelection,
2510
2511
  setRowSelection: L,
2511
- paginationState: f.pagination,
2512
+ paginationState: h.pagination,
2512
2513
  setPaginationState: z,
2513
- grouping: f.grouping,
2514
+ grouping: h.grouping,
2514
2515
  setGrouping: oe,
2515
- expanded: f.expanded,
2516
+ expanded: h.expanded,
2516
2517
  setExpanded: le,
2517
- rowPinning: f.rowPinning,
2518
+ rowPinning: h.rowPinning,
2518
2519
  setRowPinning: ie,
2519
- columnPinning: f.columnPinning,
2520
+ columnPinning: h.columnPinning,
2520
2521
  setColumnPinning: ce,
2521
- columnVisibility: f.columnVisibility,
2522
+ columnVisibility: h.columnVisibility,
2522
2523
  setColumnVisibility: ee,
2523
- columnOrder: f.columnOrder,
2524
+ columnOrder: h.columnOrder,
2524
2525
  setColumnOrder: F
2525
2526
  }
2526
2527
  };
2527
- }, Qi = (e, t, n = "ltr") => {
2528
+ }, Xi = (e, t, n = "ltr") => {
2528
2529
  const {
2529
2530
  density: o = "standard",
2530
2531
  rowHeight: a,
@@ -2552,7 +2553,7 @@ const ji = ({
2552
2553
  default:
2553
2554
  return 48;
2554
2555
  }
2555
- }, [o]), g = _o({
2556
+ }, [o]), g = Oo({
2556
2557
  rowCount: c.length,
2557
2558
  rowHeight: s,
2558
2559
  // Increased overscan for smoother scrolling with large datasets (5K-100K rows)
@@ -2572,12 +2573,12 @@ const ji = ({
2572
2573
  scrollPaddingStart: e.enableStickyHeader ? e.scrollPaddingStart ?? d : e.scrollPaddingStart ?? 0,
2573
2574
  // Ensure the scroll container has proper sizing
2574
2575
  scrollMargin: 0
2575
- }), { parentRef: m, rowVirtualizer: h, columnVirtualizer: y, scrollToIndex: u, scrollToRow: S, scrollToColumn: p } = g;
2576
+ }), { parentRef: m, rowVirtualizer: f, columnVirtualizer: y, scrollToIndex: u, scrollToRow: S, scrollToColumn: p } = g;
2576
2577
  return {
2577
2578
  /** Reference to the scrollable container. @group Properties */
2578
2579
  parentRef: m,
2579
2580
  /** Row virtualizer instance. @group Properties */
2580
- rowVirtualizer: h,
2581
+ rowVirtualizer: f,
2581
2582
  /** Column virtualizer instance (if enabled). @group Properties */
2582
2583
  columnVirtualizer: y,
2583
2584
  /** Scroll to a specific item index. @group Methods */
@@ -2589,22 +2590,22 @@ const ji = ({
2589
2590
  /** Calculated row height based on density or props. @group Properties */
2590
2591
  effectiveRowHeight: s
2591
2592
  };
2592
- }, Xi = (e, t) => {
2593
- const { enableRangeSelection: n = !1 } = e, { rows: o } = t.getRowModel(), [a, i] = H(null), [l, c] = H(!1), s = V((m, h) => {
2593
+ }, Zi = (e, t) => {
2594
+ const { enableRangeSelection: n = !1 } = e, { rows: o } = t.getRowModel(), [a, i] = H(null), [l, c] = H(!1), s = V((m, f) => {
2594
2595
  n && (c(!0), i({
2595
- start: { r: m, c: h },
2596
- end: { r: m, c: h }
2596
+ start: { r: m, c: f },
2597
+ end: { r: m, c: f }
2597
2598
  }));
2598
- }, [n]), d = V((m, h) => {
2599
- !n || !l || i((y) => y ? { ...y, end: { r: m, c: h } } : null);
2599
+ }, [n]), d = V((m, f) => {
2600
+ !n || !l || i((y) => y ? { ...y, end: { r: m, c: f } } : null);
2600
2601
  }, [n, l]);
2601
2602
  ue(() => {
2602
2603
  if (!n) return;
2603
2604
  const m = () => c(!1);
2604
2605
  return window.addEventListener("mouseup", m), () => window.removeEventListener("mouseup", m);
2605
2606
  }, [n]);
2606
- const g = V((m, h) => {
2607
- const y = {}, [u, S] = [Math.min(m, h), Math.max(m, h)];
2607
+ const g = V((m, f) => {
2608
+ const y = {}, [u, S] = [Math.min(m, f), Math.max(m, f)];
2608
2609
  for (let p = u; p <= S; p++) {
2609
2610
  const P = o[p];
2610
2611
  P && (y[P.id] = !0);
@@ -2623,7 +2624,7 @@ const ji = ({
2623
2624
  /** Whether a selection operation is currently active. @group State */
2624
2625
  isSelecting: l
2625
2626
  };
2626
- }, Zi = (e, t) => {
2627
+ }, Ji = (e, t) => {
2627
2628
  const [n, o] = Hr(), a = V((l) => {
2628
2629
  o(() => {
2629
2630
  t.setColumnFilters((c) => {
@@ -2662,8 +2663,8 @@ const ji = ({
2662
2663
  /** Programmatically set the global filter. @group Methods */
2663
2664
  setGlobalFilter: t.setGlobalFilter
2664
2665
  };
2665
- }, Ji = (e, t, n, o, a, i = {}) => {
2666
- const l = hn(), { rows: c } = t.getRowModel(), s = W(() => {
2666
+ }, es = (e, t, n, o, a, i = {}) => {
2667
+ const l = fn(), { rows: c } = t.getRowModel(), s = W(() => {
2667
2668
  const d = qr(o.refresh, o.forceUpdate), g = Wr(o.showSpinner, o.hideSpinner), m = Yr(
2668
2669
  (u) => {
2669
2670
  const S = typeof u == "string" ? parseInt(u) : u, p = c[S];
@@ -2683,7 +2684,7 @@ const ji = ({
2683
2684
  const p = typeof u == "string" ? parseInt(u) : u;
2684
2685
  o.scrollToIndex(p);
2685
2686
  }
2686
- ), h = Ur(o.scrollToIndex, (u) => t.setPageIndex(u)), y = Kr(
2687
+ ), f = Ur(o.scrollToIndex, (u) => t.setPageIndex(u)), y = Kr(
2687
2688
  () => e.onExportCSV?.(t),
2688
2689
  () => e.onExportExcel?.(t),
2689
2690
  () => {
@@ -2718,9 +2719,9 @@ const ji = ({
2718
2719
  try {
2719
2720
  const k = await o.addMutation.mutateAsync(S);
2720
2721
  l.get("NotificationService")?.show({ type: "success", message: "Row Added Successfully!", duration: 3e3 }), setTimeout(() => {
2721
- const f = k[P] || A;
2722
- t.setRowSelection({ [f]: !0 });
2723
- const C = n.findIndex((N) => N[P] === f);
2722
+ const h = k[P] || A;
2723
+ t.setRowSelection({ [h]: !0 });
2724
+ const C = n.findIndex((N) => N[P] === h);
2724
2725
  C !== -1 && (o.toggleRowEditing(C, !0), o.scrollToIndex(C));
2725
2726
  }, 100);
2726
2727
  return;
@@ -2811,7 +2812,7 @@ const ji = ({
2811
2812
  clearRowSelection: () => t.resetRowSelection(),
2812
2813
  // Navigation
2813
2814
  /** Pagination and navigation methods. @group Methods */
2814
- ...h,
2815
+ ...f,
2815
2816
  // FilteringSorting
2816
2817
  /** Performs global search. @group Methods */
2817
2818
  search: (u) => t.setGlobalFilter(u),
@@ -2888,14 +2889,14 @@ const ji = ({
2888
2889
  };
2889
2890
  }, [e, t, n, c, o, i]);
2890
2891
  return Eo(a, s), s;
2891
- }, es = [], ts = (e, t, n = {}) => {
2892
+ }, ts = [], ns = (e, t, n = {}) => {
2892
2893
  const o = to(e), { api: a, serviceRegistry: i } = o, l = Qr(), {
2893
2894
  dataSource: c,
2894
2895
  data: s,
2895
2896
  onRefresh: d,
2896
2897
  onDataRequest: g,
2897
2898
  onDataLoad: m,
2898
- onError: h,
2899
+ onError: f,
2899
2900
  enableEditing: y,
2900
2901
  isRowEditable: u,
2901
2902
  isCellEditable: S,
@@ -2905,8 +2906,8 @@ const ji = ({
2905
2906
  enableStickyPagination: E = !1,
2906
2907
  enableChangeTracking: k = !1,
2907
2908
  density: R = "standard",
2908
- dir: f
2909
- } = e, C = qo("I18nService"), N = f === "auto" || !f ? C?.dir || "ltr" : f, I = c || s || es, z = W(() => {
2909
+ dir: h
2910
+ } = e, C = qo("I18nService"), N = h === "auto" || !h ? C?.dir || "ltr" : h, I = c || s || ts, z = W(() => {
2910
2911
  const $ = e.editSettings?.primaryKey;
2911
2912
  return $ ? Array.isArray($) ? $[0] : $ : "id";
2912
2913
  }, [e.editSettings?.primaryKey]), {
@@ -2922,7 +2923,7 @@ const ji = ({
2922
2923
  changes: F,
2923
2924
  batchChanges: he,
2924
2925
  resetData: v
2925
- } = Sa(I, z), [w, M] = H(void 0), D = W(() => e.service ? e.service : e.serviceName ? i.get(e.serviceName) : null, [e.service, e.serviceName]), { table: T, states: G } = Yi(e, L), Y = T.getState().pagination, Q = T.getState().sorting, te = T.getState().columnFilters, de = T.getState().globalFilter, De = W(() => [
2926
+ } = Sa(I, z), [w, M] = H(void 0), D = W(() => e.service ? e.service : e.serviceName ? i.get(e.serviceName) : null, [e.service, e.serviceName]), { table: T, states: G } = Qi(e, L), Y = T.getState().pagination, Q = T.getState().sorting, te = T.getState().columnFilters, de = T.getState().globalFilter, De = W(() => [
2926
2927
  "table-data",
2927
2928
  e.serviceName || "local",
2928
2929
  Y.pageIndex,
@@ -2962,17 +2963,17 @@ const ji = ({
2962
2963
  handleColumnFiltersChange: st,
2963
2964
  handleGlobalFilterChange: lt,
2964
2965
  setFilterModel: ct,
2965
- setGlobalFilter: O
2966
- } = Zi(e, T), {
2966
+ setGlobalFilter: _
2967
+ } = Ji(e, T), {
2967
2968
  parentRef: B,
2968
2969
  rowVirtualizer: U,
2969
2970
  columnVirtualizer: q,
2970
2971
  effectiveRowHeight: Z
2971
- } = Qi(e, T, N), {
2972
+ } = Xi(e, T, N), {
2972
2973
  rangeSelection: ae,
2973
2974
  onCellMouseDown: J,
2974
2975
  onCellMouseEnter: pe
2975
- } = Xi(e, T), [be, ve] = H(null), Or = V(($, we) => {
2976
+ } = Zi(e, T), [be, ve] = H(null), _r = V(($, we) => {
2976
2977
  ve((Se) => {
2977
2978
  if (!Se) return { r: 0, c: 0 };
2978
2979
  const Ne = T.getRowModel().rows.length, Gr = Math.max(0, Math.min(Ne - 1, Se.r + $)), Br = Math.max(0, Math.min(T.getVisibleLeafColumns().length - 1, Se.c + we));
@@ -2985,11 +2986,11 @@ const ji = ({
2985
2986
  // If editing is undefined, toggle. Otherwise set specific value.
2986
2987
  [$]: we !== void 0 ? we : !Ne[$]
2987
2988
  }), Se && ve((Ne) => ({ r: $, c: Ne?.c ?? 0 }));
2988
- }, [L, dt, e.onRowEditStart, e.editSettings?.mode, T]), Jt = V(($, we, Se) => {
2989
+ }, [L, dt, e.onRowEditStart, e.editSettings?.mode, T]), Zt = V(($, we, Se) => {
2989
2990
  if (!y) return;
2990
2991
  const Ne = L[$];
2991
2992
  u && !u(Ne) || S && !S(Ne, we) || se($, we, Se);
2992
- }, [y, se, L, u, S]), { autoFitColumn: en } = Na(T), Lr = V(async () => {
2993
+ }, [y, se, L, u, S]), { autoFitColumn: Jt } = Ra(T), Lr = V(async () => {
2993
2994
  if (D)
2994
2995
  await l.invalidateQueries({ queryKey: De });
2995
2996
  else if (g) {
@@ -2997,22 +2998,22 @@ const ji = ({
2997
2998
  try {
2998
2999
  g(T.getState());
2999
3000
  } catch ($) {
3000
- h && h($);
3001
+ f && f($);
3001
3002
  } finally {
3002
3003
  Pe(!1);
3003
3004
  }
3004
3005
  }
3005
3006
  T.reset(), d?.();
3006
- }, [g, T, d, h, D, l, De]);
3007
+ }, [g, T, d, f, D, l, De]);
3007
3008
  ue(() => {
3008
- Ge && h && h(Ge);
3009
- }, [Ge, h]), ue(() => {
3009
+ Ge && f && f(Ge);
3010
+ }, [Ge, f]), ue(() => {
3010
3011
  D && je !== void 0 && T.setOptions(($) => ({
3011
3012
  ...$,
3012
3013
  rowCount: je
3013
3014
  }));
3014
3015
  }, [je, T, D]);
3015
- const Fe = Ji(e, T, L, {
3016
+ const Fe = es(e, T, L, {
3016
3017
  refresh: Lr,
3017
3018
  setData: ne,
3018
3019
  performEdit: se,
@@ -3030,19 +3031,19 @@ const ji = ({
3030
3031
  addRow: K,
3031
3032
  deleteRows: oe,
3032
3033
  setFocusedCell: ve,
3033
- autoFitColumn: en,
3034
+ autoFitColumn: Jt,
3034
3035
  // Service mutations
3035
3036
  addMutation: Ct,
3036
3037
  updateMutation: He,
3037
3038
  deleteMutation: at,
3038
3039
  service: D
3039
3040
  }, t, n), $r = W(() => ({
3040
- updateData: Jt,
3041
+ updateData: Zt,
3041
3042
  editingRows: dt,
3042
3043
  toggleRowEditing: We,
3043
3044
  focusedCell: be,
3044
3045
  setFocusedCell: ve,
3045
- navigateFocus: Or,
3046
+ navigateFocus: _r,
3046
3047
  addRecord: Fe.addRecord,
3047
3048
  deleteRecord: Fe.deleteRecord,
3048
3049
  deleteRecords: Fe.deleteRecords,
@@ -3060,7 +3061,7 @@ const ji = ({
3060
3061
  dir: N,
3061
3062
  containerRef: B
3062
3063
  }), [
3063
- Jt,
3064
+ Zt,
3064
3065
  dt,
3065
3066
  We,
3066
3067
  be,
@@ -3109,7 +3110,7 @@ const ji = ({
3109
3110
  addRow: K,
3110
3111
  deleteRows: oe,
3111
3112
  toggleRowEditing: We,
3112
- autoFitColumn: en,
3113
+ autoFitColumn: Jt,
3113
3114
  onCellMouseDown: J,
3114
3115
  onCellMouseEnter: pe,
3115
3116
  onRowClick: e.onRowClick,
@@ -3117,7 +3118,7 @@ const ji = ({
3117
3118
  onCellFocus: e.onCellFocus,
3118
3119
  onToolbarItemClick: e.onToolbarItemClick,
3119
3120
  setFocusedCell: ve,
3120
- setGlobalFilter: O,
3121
+ setGlobalFilter: _,
3121
3122
  handleColumnFiltersChange: st,
3122
3123
  handleGlobalFilterChange: lt,
3123
3124
  setFilterModel: ct,
@@ -3188,13 +3189,13 @@ const ji = ({
3188
3189
  st,
3189
3190
  lt,
3190
3191
  ct,
3191
- O,
3192
+ _,
3192
3193
  w,
3193
3194
  be,
3194
3195
  ve,
3195
3196
  qe
3196
3197
  ]);
3197
- }, ns = ({
3198
+ }, rs = ({
3198
3199
  containerRef: e,
3199
3200
  containerSizeRef: t,
3200
3201
  resizeTimeoutRef: n,
@@ -3216,7 +3217,7 @@ const ji = ({
3216
3217
  l.disconnect(), n.current && clearTimeout(n.current);
3217
3218
  };
3218
3219
  }, a);
3219
- }, rs = ({
3220
+ }, os = ({
3220
3221
  table: e,
3221
3222
  editSettings: t,
3222
3223
  toggleRowEditing: n,
@@ -3228,8 +3229,8 @@ const ji = ({
3228
3229
  const c = V((s, d) => {
3229
3230
  const g = e.options.meta;
3230
3231
  if (g?.setFocusedCell) {
3231
- const h = s.colIndex ?? e.getVisibleLeafColumns().findIndex((y) => y.id === s.columnId);
3232
- h !== -1 && g.setFocusedCell({ r: s.rowIndex, c: h });
3232
+ const f = s.colIndex ?? e.getVisibleLeafColumns().findIndex((y) => y.id === s.columnId);
3233
+ f !== -1 && g.setFocusedCell({ r: s.rowIndex, c: f });
3233
3234
  }
3234
3235
  d === "dblclick" && t?.allowEditing && t?.allowEditOnDblClick !== !1 && n(s.rowIndex, !0), (d === "click" ? i ?? o : l ?? a)?.(s);
3235
3236
  }, [e, t, n, o, a]);
@@ -3239,7 +3240,7 @@ const ji = ({
3239
3240
  onCellClick: (s) => c(s, "click"),
3240
3241
  onCellDoubleClick: (s) => c(s, "dblclick")
3241
3242
  };
3242
- }, os = ({
3243
+ }, as = ({
3243
3244
  dialogState: e,
3244
3245
  isDialogMode: t,
3245
3246
  rows: n,
@@ -3253,7 +3254,7 @@ const ji = ({
3253
3254
  !isNaN(i) && n[i] && e.open("edit", n[i].original, { index: i });
3254
3255
  }
3255
3256
  }, [t, e, n, o]);
3256
- }, as = () => /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center min-h-screen p-4", children: /* @__PURE__ */ b("div", { className: "flex flex-col items-center gap-4 max-w-md w-full", children: [
3257
+ }, is = () => /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center min-h-screen p-4", children: /* @__PURE__ */ b("div", { className: "flex flex-col items-center gap-4 max-w-md w-full", children: [
3257
3258
  /* @__PURE__ */ r("div", { className: "flex items-center justify-center w-16 h-16 rounded-full bg-destructive/10", children: /* @__PURE__ */ r(ko, { className: "w-8 h-8 text-destructive" }) }),
3258
3259
  /* @__PURE__ */ b("div", { className: "flex flex-col items-center gap-2 text-center", children: [
3259
3260
  /* @__PURE__ */ r("h2", { className: "text-lg font-semibold", children: "Table Error" }),
@@ -3270,19 +3271,19 @@ const ji = ({
3270
3271
  ]
3271
3272
  }
3272
3273
  )
3273
- ] }) }), is = {
3274
+ ] }) }), ss = {
3274
3275
  compact: "py-1 text-xs",
3275
3276
  standard: "py-2 text-sm",
3276
3277
  comfortable: "py-4 text-base"
3277
- }, wr = (e = "standard") => is[e], yr = "flex flex-col", Tt = {
3278
+ }, wr = (e = "standard") => ss[e], yr = "flex flex-col", At = {
3278
3279
  default: "border border-border",
3279
3280
  bottom: "border-b border-border"
3280
- }, ss = ({ header: e, density: t }) => {
3281
+ }, ls = ({ header: e, density: t }) => {
3281
3282
  const n = e.column.columnDef.meta?.align || "left";
3282
3283
  return /* @__PURE__ */ r(
3283
3284
  "div",
3284
3285
  {
3285
- className: _(
3286
+ className: O(
3286
3287
  "relative h-full font-semibold text-foreground flex items-center select-none px-4",
3287
3288
  "bg-background/90 border border-border/50 shadow-lg rounded-md opacity-90 cursor-grabbing",
3288
3289
  "ring-2 ring-primary/20",
@@ -3295,19 +3296,19 @@ const ji = ({
3295
3296
  maxWidth: e.column.columnDef.maxSize,
3296
3297
  minWidth: e.column.columnDef.minSize
3297
3298
  },
3298
- children: /* @__PURE__ */ b("div", { className: _(
3299
+ children: /* @__PURE__ */ b("div", { className: O(
3299
3300
  "flex items-center w-full gap-2",
3300
3301
  n === "center" && "justify-center relative",
3301
3302
  n === "right" && "justify-end"
3302
3303
  ), children: [
3303
- /* @__PURE__ */ r("div", { className: "p-1 text-zinc-400", children: /* @__PURE__ */ r(kn, { className: "w-3.5 h-3.5" }) }),
3304
+ /* @__PURE__ */ r("div", { className: "p-1 text-zinc-400", children: /* @__PURE__ */ r(Nn, { className: "w-3.5 h-3.5" }) }),
3304
3305
  /* @__PURE__ */ r("span", { className: "truncate", children: Xe(e.column.columnDef.header, e.getContext()) })
3305
3306
  ] })
3306
3307
  }
3307
3308
  );
3308
3309
  }, Cr = Ze(({ table: e, totalRows: t, selectionInfo: n, rowSelection: o }) => {
3309
3310
  const a = t ?? (e.getPrePaginationRowModel().rows.length || e.options.rowCount || e.getRowModel().rows.length), i = typeof a == "number" ? a : 0, l = Object.keys(o || {}).length;
3310
- return /* @__PURE__ */ b("div", { className: _(
3311
+ return /* @__PURE__ */ b("div", { className: O(
3311
3312
  "flex border-t border-border p-2 text-xs text-muted-foreground justify-between bg-muted/30",
3312
3313
  "rounded-b-md"
3313
3314
  ), children: [
@@ -3330,7 +3331,7 @@ const ji = ({
3330
3331
  ] });
3331
3332
  });
3332
3333
  Cr.displayName = "EzTableStatusBar";
3333
- const ls = (e) => {
3334
+ const cs = (e) => {
3334
3335
  switch (e) {
3335
3336
  case "compact":
3336
3337
  return "min-h-[40px]";
@@ -3339,7 +3340,7 @@ const ls = (e) => {
3339
3340
  default:
3340
3341
  return "min-h-[48px]";
3341
3342
  }
3342
- }, cs = (e) => {
3343
+ }, ds = (e) => {
3343
3344
  switch (e) {
3344
3345
  case "compact":
3345
3346
  return "py-0 px-2";
@@ -3348,7 +3349,7 @@ const ls = (e) => {
3348
3349
  default:
3349
3350
  return "py-2 px-4";
3350
3351
  }
3351
- }, ds = (e) => {
3352
+ }, us = (e) => {
3352
3353
  switch (e) {
3353
3354
  case "compact":
3354
3355
  return "text-xs";
@@ -3357,10 +3358,10 @@ const ls = (e) => {
3357
3358
  default:
3358
3359
  return "text-sm";
3359
3360
  }
3360
- }, Sr = (e) => _(
3361
- ls(e),
3361
+ }, Sr = (e) => O(
3362
3362
  cs(e),
3363
- ds(e)
3363
+ ds(e),
3364
+ us(e)
3364
3365
  ), Nr = (e, t, n = "ltr") => e ? {
3365
3366
  position: "sticky",
3366
3367
  [n === "rtl" ? e === "left" ? "right" : "left" : e === "left" ? "left" : "right"]: `${t}px`,
@@ -3368,8 +3369,8 @@ const ls = (e) => {
3368
3369
  } : {}, Rr = (e, t = "ltr") => {
3369
3370
  if (!e) return "";
3370
3371
  const n = "bg-background", o = e === "left", a = t === "rtl";
3371
- return _(n, o && !a || !o && a ? "shadow-[2px_0_5px_-2px_rgba(0,0,0,0.1)] dark:shadow-[2px_0_5px_-2px_rgba(0,0,0,0.3)]" : "shadow-[-2px_0_5px_-2px_rgba(0,0,0,0.1)] dark:shadow-[-2px_0_5px_-2px_rgba(0,0,0,0.3)]");
3372
- }, us = (e, t = "ltr") => {
3372
+ return O(n, o && !a || !o && a ? "shadow-[2px_0_5px_-2px_rgba(0,0,0,0.1)] dark:shadow-[2px_0_5px_-2px_rgba(0,0,0,0.3)]" : "shadow-[-2px_0_5px_-2px_rgba(0,0,0,0.1)] dark:shadow-[-2px_0_5px_-2px_rgba(0,0,0,0.3)]");
3373
+ }, ms = (e, t = "ltr") => {
3373
3374
  switch (e) {
3374
3375
  case "center":
3375
3376
  return "justify-center text-center";
@@ -3380,10 +3381,10 @@ const ls = (e) => {
3380
3381
  default:
3381
3382
  return t === "rtl" ? "justify-end text-right" : "justify-start text-left";
3382
3383
  }
3383
- }, ms = (e, t) => _(
3384
+ }, gs = (e, t) => O(
3384
3385
  e && "bg-primary/10 ring-1 ring-inset ring-primary/30 z-[1]",
3385
3386
  t && "bg-primary/10 z-[10]"
3386
- ), gs = (e, t) => {
3387
+ ), fs = (e, t) => {
3387
3388
  switch (e) {
3388
3389
  case "wrap":
3389
3390
  return "whitespace-normal break-words";
@@ -3392,8 +3393,8 @@ const ls = (e) => {
3392
3393
  default:
3393
3394
  return "truncate";
3394
3395
  }
3395
- }, fs = (e, t, n = "ltr") => !e || e === "None" || e === "Horizontal" ? "" : n === "rtl" ? "border-l border-border/50" : "border-r border-border/50";
3396
- function hs(e) {
3396
+ }, hs = (e, t, n = "ltr") => !e || e === "None" || e === "Horizontal" ? "" : n === "rtl" ? "border-l border-border/50" : "border-r border-border/50";
3397
+ function ps(e) {
3397
3398
  if (!e || e.length === 0) return "text";
3398
3399
  const n = e.slice(0, 100).filter((s) => s != null && s !== "");
3399
3400
  if (n.length === 0) return "text";
@@ -3411,7 +3412,7 @@ function hs(e) {
3411
3412
  const l = new Set(n.map((s) => String(s)));
3412
3413
  return l.size > 0 && l.size <= Math.min(n.length * 0.2, 10) ? "select" : n.some((s) => typeof s == "string" && s.length > 100) ? "longtext" : "text";
3413
3414
  }
3414
- function ps(e, t) {
3415
+ function bs(e, t) {
3415
3416
  const [n, o] = H(() => Array.isArray(e) ? new Set(e) : null), a = n === null, i = V((d) => {
3416
3417
  o(d ? null : /* @__PURE__ */ new Set());
3417
3418
  }, []), l = V((d, g) => {
@@ -3421,16 +3422,16 @@ function ps(e, t) {
3421
3422
  const y = new Set(t);
3422
3423
  return y.delete(d), y;
3423
3424
  }
3424
- const h = new Set(m);
3425
+ const f = new Set(m);
3425
3426
  if (g) {
3426
- if (h.add(d), h.size === t.length) return null;
3427
+ if (f.add(d), f.size === t.length) return null;
3427
3428
  } else
3428
- h.delete(d);
3429
- return h;
3429
+ f.delete(d);
3430
+ return f;
3430
3431
  });
3431
3432
  }, [t]), c = V((d, g) => {
3432
3433
  o((m) => {
3433
- const h = m || new Set(t), y = new Set(h);
3434
+ const f = m || new Set(t), y = new Set(f);
3434
3435
  if (g) {
3435
3436
  if (d.forEach((u) => y.add(u)), y.size === t.length) return null;
3436
3437
  } else
@@ -3477,7 +3478,7 @@ const kr = j.memo(({ column: e }) => {
3477
3478
  return /* @__PURE__ */ b("div", { className: "p-3 space-y-3", children: [
3478
3479
  /* @__PURE__ */ r("div", { className: "text-sm font-medium", children: "Filter by value:" }),
3479
3480
  /* @__PURE__ */ r(
3480
- za,
3481
+ Oa,
3481
3482
  {
3482
3483
  value: e.getFilterValue() || "all",
3483
3484
  onChange: (n) => {
@@ -3495,7 +3496,7 @@ const Dr = j.memo(({
3495
3496
  column: e,
3496
3497
  allAvailableValues: t
3497
3498
  }) => /* @__PURE__ */ r("div", { className: "p-1", children: /* @__PURE__ */ r(
3498
- Hi,
3499
+ qi,
3499
3500
  {
3500
3501
  options: t.map((n) => ({ value: String(n), label: String(n) })),
3501
3502
  selectedValues: Array.isArray(e.getFilterValue()) ? e.getFilterValue() : [],
@@ -3511,7 +3512,7 @@ const Pr = j.memo(({
3511
3512
  handleSelect: n,
3512
3513
  formatter: o
3513
3514
  }) => {
3514
- const a = Re(null), i = wn({
3515
+ const a = Re(null), i = xn({
3515
3516
  count: e.length,
3516
3517
  getScrollElement: () => a.current,
3517
3518
  estimateSize: () => 32,
@@ -3535,7 +3536,7 @@ const Pr = j.memo(({
3535
3536
  }) }) });
3536
3537
  });
3537
3538
  Pr.displayName = "VirtualizedFilterList";
3538
- const zt = j.memo(({
3539
+ const Tt = j.memo(({
3539
3540
  onClear: e,
3540
3541
  onApply: t,
3541
3542
  onAddRule: n,
@@ -3554,11 +3555,11 @@ const zt = j.memo(({
3554
3555
  s && o && /* @__PURE__ */ r(ge, { variant: "ghost", size: "icon", className: "h-6 w-6", onClick: o, title: "Add Group", children: /* @__PURE__ */ r("span", { className: "font-bold text-xs", children: "( )" }) })
3555
3556
  ] }),
3556
3557
  /* @__PURE__ */ b("div", { className: "flex gap-2", children: [
3557
- d && a && /* @__PURE__ */ r(ge, { variant: "ghost", size: "icon", className: "h-6 w-6 text-red-500 hover:text-red-600", onClick: a, children: /* @__PURE__ */ r(Gt, { className: "w-4 h-4" }) }),
3558
+ d && a && /* @__PURE__ */ r(ge, { variant: "ghost", size: "icon", className: "h-6 w-6 text-red-500 hover:text-red-600", onClick: a, children: /* @__PURE__ */ r($t, { className: "w-4 h-4" }) }),
3558
3559
  l && t && /* @__PURE__ */ r(ge, { size: "sm", onClick: t, className: "min-w-[70px] h-8 text-xs font-semibold", children: "OK" })
3559
3560
  ] })
3560
3561
  ] }));
3561
- zt.displayName = "FilterActionButtons";
3562
+ Tt.displayName = "FilterActionButtons";
3562
3563
  function Fr({ node: e, selectedValues: t, onBulkSelect: n }) {
3563
3564
  const [o, a] = H(!1);
3564
3565
  let i = !1;
@@ -3611,7 +3612,7 @@ function Fr({ node: e, selectedValues: t, onBulkSelect: n }) {
3611
3612
  )) })
3612
3613
  ] });
3613
3614
  }
3614
- function bs({ uniqueValues: e, selectedValues: t, onBulkSelect: n }) {
3615
+ function vs({ uniqueValues: e, selectedValues: t, onBulkSelect: n }) {
3615
3616
  const o = W(() => {
3616
3617
  const a = [], i = Array.from(e.keys()).map((c) => {
3617
3618
  const s = c instanceof Date ? c : new Date(c);
@@ -3631,11 +3632,11 @@ function bs({ uniqueValues: e, selectedValues: t, onBulkSelect: n }) {
3631
3632
  children: []
3632
3633
  }, g = /* @__PURE__ */ new Map();
3633
3634
  c.forEach((m) => {
3634
- const h = m.date.getMonth();
3635
- g.has(h) || g.set(h, []), g.get(h).push(m);
3636
- }), g.forEach((m, h) => {
3637
- const y = new Date(s, h).toLocaleString("default", { month: "long" }), u = {
3638
- key: `${s}-${h}`,
3635
+ const f = m.date.getMonth();
3636
+ g.has(f) || g.set(f, []), g.get(f).push(m);
3637
+ }), g.forEach((m, f) => {
3638
+ const y = new Date(s, f).toLocaleString("default", { month: "long" }), u = {
3639
+ key: `${s}-${f}`,
3639
3640
  label: y,
3640
3641
  level: 1,
3641
3642
  fullValues: m.map((p) => p.original),
@@ -3646,7 +3647,7 @@ function bs({ uniqueValues: e, selectedValues: t, onBulkSelect: n }) {
3646
3647
  S.has(P) || S.set(P, []), S.get(P).push(p);
3647
3648
  }), S.forEach((p, P) => {
3648
3649
  const A = {
3649
- key: `${s}-${h}-${P}`,
3650
+ key: `${s}-${f}-${P}`,
3650
3651
  label: String(P),
3651
3652
  level: 2,
3652
3653
  fullValues: p.map((E) => E.original),
@@ -3670,7 +3671,7 @@ function bs({ uniqueValues: e, selectedValues: t, onBulkSelect: n }) {
3670
3671
  ))
3671
3672
  ] });
3672
3673
  }
3673
- const _t = j.memo(({
3674
+ const zt = j.memo(({
3674
3675
  value: e,
3675
3676
  onChange: t,
3676
3677
  options: n,
@@ -3680,8 +3681,8 @@ const _t = j.memo(({
3680
3681
  /* @__PURE__ */ r(et, { className: a, children: /* @__PURE__ */ r(tt, { placeholder: o }) }),
3681
3682
  /* @__PURE__ */ r(nt, { children: n.map((i) => /* @__PURE__ */ r(Ie, { value: i.value, children: i.label }, i.value)) })
3682
3683
  ] }));
3683
- _t.displayName = "FilterRuleSelect";
3684
- const gn = {
3684
+ zt.displayName = "FilterRuleSelect";
3685
+ const mn = {
3685
3686
  text: [
3686
3687
  { label: "Contains", value: "contains" },
3687
3688
  { label: "Does not contain", value: "doesNotContain" },
@@ -3706,25 +3707,25 @@ const gn = {
3706
3707
  { label: "On or before", value: "lte" },
3707
3708
  { label: "Between", value: "between" }
3708
3709
  ]
3709
- }, vs = ({
3710
+ }, xs = ({
3710
3711
  columnType: e,
3711
3712
  columnId: t,
3712
3713
  value: n,
3713
3714
  onChange: o
3714
3715
  }) => {
3715
- const i = gn[e === "datetime" || e === "date" ? "date" : e === "number" ? "number" : "text"] || gn.text, l = e === "number" ? "number" : e === "date" || e === "datetime" ? "date" : "text", c = n?.kind === "group", s = c ? n.filters[0] : n?.operator ? n : { operator: i[0].value, value: "" }, d = c ? n.filters[1] : { operator: i[0].value, value: "" }, g = c ? n.logic : "OR", m = c, [h, y] = H(s), [u, S] = H(d), [p, P] = H(g), [A, E] = H(m);
3716
+ const i = mn[e === "datetime" || e === "date" ? "date" : e === "number" ? "number" : "text"] || mn.text, l = e === "number" ? "number" : e === "date" || e === "datetime" ? "date" : "text", c = n?.kind === "group", s = c ? n.filters[0] : n?.operator ? n : { operator: i[0].value, value: "" }, d = c ? n.filters[1] : { operator: i[0].value, value: "" }, g = c ? n.logic : "OR", m = c, [f, y] = H(s), [u, S] = H(d), [p, P] = H(g), [A, E] = H(m);
3716
3717
  j.useEffect(() => {
3717
- const f = n?.kind === "group", C = f ? n.filters[0] : n?.operator ? n : { operator: i[0].value, value: "" }, N = f ? n.filters[1] : { operator: i[0].value, value: "" }, I = f ? n.logic : "OR";
3718
- y(C), S(N), P(I), E(f);
3718
+ const h = n?.kind === "group", C = h ? n.filters[0] : n?.operator ? n : { operator: i[0].value, value: "" }, N = h ? n.filters[1] : { operator: i[0].value, value: "" }, I = h ? n.logic : "OR";
3719
+ y(C), S(N), P(I), E(h);
3719
3720
  }, [n, i]);
3720
- const k = (f, C, N, I) => {
3721
+ const k = (h, C, N, I) => {
3721
3722
  if (!I) {
3722
3723
  o({
3723
3724
  kind: "rule",
3724
- operator: f.operator,
3725
- value: f.value,
3726
- field: f.field || t,
3727
- id: f.id || t
3725
+ operator: h.operator,
3726
+ value: h.value,
3727
+ field: h.field || t,
3728
+ id: h.id || t
3728
3729
  });
3729
3730
  return;
3730
3731
  }
@@ -3734,10 +3735,10 @@ const gn = {
3734
3735
  filters: [
3735
3736
  {
3736
3737
  kind: "rule",
3737
- operator: f.operator,
3738
- value: f.value,
3739
- field: f.field || t,
3740
- id: f.id || `${t}_1`
3738
+ operator: h.operator,
3739
+ value: h.value,
3740
+ field: h.field || t,
3741
+ id: h.id || `${t}_1`
3741
3742
  },
3742
3743
  {
3743
3744
  kind: "rule",
@@ -3748,20 +3749,20 @@ const gn = {
3748
3749
  }
3749
3750
  ]
3750
3751
  });
3751
- }, R = (f, C, N) => {
3752
+ }, R = (h, C, N) => {
3752
3753
  const I = (z) => {
3753
- const L = { ...f, value: z };
3754
+ const L = { ...h, value: z };
3754
3755
  C(L);
3755
3756
  const ne = A || N;
3756
3757
  N && !A && E(!0), k(
3757
- N ? h : L,
3758
+ N ? f : L,
3758
3759
  N ? L : u,
3759
3760
  p,
3760
3761
  ne
3761
3762
  );
3762
3763
  };
3763
- if (f.operator === "between") {
3764
- const z = Array.isArray(f.value) ? f.value : [f.value ?? "", ""];
3764
+ if (h.operator === "between") {
3765
+ const z = Array.isArray(h.value) ? h.value : [h.value ?? "", ""];
3765
3766
  return /* @__PURE__ */ b("div", { className: "flex gap-2", children: [
3766
3767
  /* @__PURE__ */ r(
3767
3768
  Me,
@@ -3789,7 +3790,7 @@ const gn = {
3789
3790
  Me,
3790
3791
  {
3791
3792
  type: l,
3792
- value: f.value ?? "",
3793
+ value: h.value ?? "",
3793
3794
  onChange: (z) => I(z.target.value),
3794
3795
  className: "h-8 shadow-none",
3795
3796
  placeholder: "Enter value..."
@@ -3801,27 +3802,27 @@ const gn = {
3801
3802
  /* @__PURE__ */ r(ze, { className: "text-xs font-medium text-muted-foreground uppercase", children: "Show rows where:" }),
3802
3803
  /* @__PURE__ */ b("div", { className: "space-y-2", children: [
3803
3804
  /* @__PURE__ */ r(
3804
- _t,
3805
+ zt,
3805
3806
  {
3806
- value: h.operator,
3807
+ value: f.operator,
3807
3808
  options: i,
3808
- onChange: (f) => {
3809
- const C = f, N = { ...h, operator: C, value: C === "between" ? ["", ""] : h.value };
3809
+ onChange: (h) => {
3810
+ const C = h, N = { ...f, operator: C, value: C === "between" ? ["", ""] : f.value };
3810
3811
  y(N), k(N, u, p, A);
3811
3812
  },
3812
3813
  placeholder: "Select operator",
3813
3814
  className: "h-8 shadow-none"
3814
3815
  }
3815
3816
  ),
3816
- R(h, y, !1)
3817
+ R(f, y, !1)
3817
3818
  ] })
3818
3819
  ] }),
3819
3820
  /* @__PURE__ */ r("div", { className: "flex justify-center", children: /* @__PURE__ */ b(
3820
- Ut,
3821
+ Wt,
3821
3822
  {
3822
3823
  value: p,
3823
- onValueChange: (f) => {
3824
- P(f), A || E(!0), k(h, u, f, !0);
3824
+ onValueChange: (h) => {
3825
+ P(h), A || E(!0), k(f, u, h, !0);
3825
3826
  },
3826
3827
  className: "flex gap-4",
3827
3828
  children: [
@@ -3838,13 +3839,13 @@ const gn = {
3838
3839
  ) }),
3839
3840
  /* @__PURE__ */ r("div", { className: `space-y-2 transition-opacity duration-200 ${A ? "" : "opacity-50"}`, children: /* @__PURE__ */ b("div", { className: "space-y-2", children: [
3840
3841
  /* @__PURE__ */ r(
3841
- _t,
3842
+ zt,
3842
3843
  {
3843
3844
  value: u.operator,
3844
3845
  options: i,
3845
- onChange: (f) => {
3846
- const C = f, N = { ...u, operator: C, value: C === "between" ? ["", ""] : u.value };
3847
- S(N), A || E(!0), k(h, N, p, !0);
3846
+ onChange: (h) => {
3847
+ const C = h, N = { ...u, operator: C, value: C === "between" ? ["", ""] : u.value };
3848
+ S(N), A || E(!0), k(f, N, p, !0);
3848
3849
  },
3849
3850
  placeholder: "Select operator",
3850
3851
  className: "h-8 shadow-none"
@@ -3855,27 +3856,27 @@ const gn = {
3855
3856
  !A && /* @__PURE__ */ r("div", { className: "text-[10px] text-muted-foreground italic text-center", children: "Select AND/OR or enter a second value to combine filters" })
3856
3857
  ] });
3857
3858
  };
3858
- function xs({ column: e, table: t }) {
3859
+ function ws({ column: e, table: t }) {
3859
3860
  const [n, o] = H(!1), i = t.options.meta?.containerRef;
3860
- return /* @__PURE__ */ b(Bt, { open: n, onOpenChange: o, children: [
3861
- /* @__PURE__ */ r(jt, { asChild: !0, children: /* @__PURE__ */ r(
3861
+ return /* @__PURE__ */ b(Gt, { open: n, onOpenChange: o, children: [
3862
+ /* @__PURE__ */ r(Bt, { asChild: !0, children: /* @__PURE__ */ r(
3862
3863
  "div",
3863
3864
  {
3864
- className: _(
3865
+ className: O(
3865
3866
  "ml-1 cursor-pointer p-1 rounded hover:bg-muted transition focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
3866
3867
  e.getIsFiltered() ? "bg-primary/10" : ""
3867
3868
  ),
3868
3869
  onClick: (l) => {
3869
3870
  l.stopPropagation();
3870
3871
  },
3871
- children: /* @__PURE__ */ r(ua, { className: _(
3872
+ children: /* @__PURE__ */ r(da, { className: O(
3872
3873
  "w-4 h-4",
3873
3874
  e.getIsFiltered() ? "text-primary fill-primary" : "text-muted-foreground"
3874
3875
  ) })
3875
3876
  }
3876
3877
  ) }),
3877
3878
  /* @__PURE__ */ r(
3878
- Ht,
3879
+ jt,
3879
3880
  {
3880
3881
  className: "w-[280px] p-0",
3881
3882
  align: "start",
@@ -3886,8 +3887,8 @@ function xs({ column: e, table: t }) {
3886
3887
  )
3887
3888
  ] });
3888
3889
  }
3889
- const ws = ["date", "datetime"], ys = ["boolean"], Cs = ["select"], Ir = j.memo(({ column: e, table: t, setIsOpen: n, filterValue: o }) => {
3890
- const [a, i] = H("list"), [l, c] = H(""), [s, d] = H(""), [g, m] = H(!0), [h, y] = H(/* @__PURE__ */ new Map()), [u, S] = H([]), E = (t.options.meta?.containerRef?.current || (typeof document < "u" ? document.getElementById("ez-table-default") : null))?.clientHeight ?? 500, k = Math.min(500, E > 100 ? E - 40 : 500);
3890
+ const ys = ["date", "datetime"], Cs = ["boolean"], Ss = ["select"], Ir = j.memo(({ column: e, table: t, setIsOpen: n, filterValue: o }) => {
3891
+ const [a, i] = H("list"), [l, c] = H(""), [s, d] = H(""), [g, m] = H(!0), [f, y] = H(/* @__PURE__ */ new Map()), [u, S] = H([]), E = (t.options.meta?.containerRef?.current || (typeof document < "u" ? document.getElementById("ez-table-default") : null))?.clientHeight ?? 500, k = Math.min(500, E > 100 ? E - 40 : 500);
3891
3892
  ue(() => {
3892
3893
  const w = setTimeout(() => d(l), 200), M = setTimeout(() => {
3893
3894
  const D = e.getFacetedUniqueValues();
@@ -3899,17 +3900,17 @@ const ws = ["date", "datetime"], ys = ["boolean"], Cs = ["select"], Ir = j.memo(
3899
3900
  }, [l, e]);
3900
3901
  const {
3901
3902
  selectedValues: R,
3902
- handleSelectAll: f,
3903
+ handleSelectAll: h,
3903
3904
  handleSelect: C,
3904
3905
  handleBulkSelect: N,
3905
3906
  clearSelection: I
3906
- } = ps(
3907
+ } = bs(
3907
3908
  o,
3908
3909
  u
3909
3910
  ), z = W(() => {
3910
3911
  const w = e.columnDef.meta;
3911
- return w?.columnType ? w.columnType : u.length === 0 ? "text" : hs(u);
3912
- }, [e.columnDef.meta, u]), L = ws.includes(z), ne = ys.includes(z), se = Cs.includes(z), K = W(() => {
3912
+ return w?.columnType ? w.columnType : u.length === 0 ? "text" : ps(u);
3913
+ }, [e.columnDef.meta, u]), L = ys.includes(z), ne = Cs.includes(z), se = Ss.includes(z), K = W(() => {
3913
3914
  const w = [...u].sort((D, T) => {
3914
3915
  if (D === T) return 0;
3915
3916
  if (D == null) return -1;
@@ -3936,7 +3937,7 @@ const ws = ["date", "datetime"], ys = ["boolean"], Cs = ["select"], Ir = j.memo(
3936
3937
  }, ie = o, ce = ie && typeof ie == "object" && !Array.isArray(ie), ee = (w) => {
3937
3938
  e.setFilterValue(w);
3938
3939
  }, F = W(() => R === null ? !0 : K.length > 0 && K.every((w) => R.has(w)), [R, K]), he = W(() => R === null ? K.length > 0 : K.some((w) => R.has(w)), [R, K]), v = (w) => {
3939
- s ? N(K, w) : f(w);
3940
+ s ? N(K, w) : h(w);
3940
3941
  };
3941
3942
  return g ? /* @__PURE__ */ b("div", { className: "h-[300px] flex flex-col items-center justify-center space-y-3 bg-popover text-popover-foreground", children: [
3942
3943
  /* @__PURE__ */ r(Po, { className: "h-8 w-8 animate-spin text-primary" }),
@@ -3950,7 +3951,7 @@ const ws = ["date", "datetime"], ys = ["boolean"], Cs = ["select"], Ir = j.memo(
3950
3951
  ] })
3951
3952
  ] }),
3952
3953
  /* @__PURE__ */ r("div", { className: "flex-1 overflow-y-auto min-h-0", children: /* @__PURE__ */ r(
3953
- vs,
3954
+ xs,
3954
3955
  {
3955
3956
  columnType: z,
3956
3957
  columnId: e.id,
@@ -3959,7 +3960,7 @@ const ws = ["date", "datetime"], ys = ["boolean"], Cs = ["select"], Ir = j.memo(
3959
3960
  }
3960
3961
  ) }),
3961
3962
  /* @__PURE__ */ r(
3962
- zt,
3963
+ Tt,
3963
3964
  {
3964
3965
  onClear: le,
3965
3966
  onApply: oe,
@@ -3971,14 +3972,14 @@ const ws = ["date", "datetime"], ys = ["boolean"], Cs = ["select"], Ir = j.memo(
3971
3972
  ["left", "right"].map((w) => e.getIsPinned() !== w && /* @__PURE__ */ b("div", { className: "flex items-center gap-2 px-2 py-1.5 text-xs font-medium cursor-pointer hover:bg-muted rounded", onClick: () => {
3972
3973
  e.pin(w), n(!1);
3973
3974
  }, children: [
3974
- /* @__PURE__ */ r(It, { className: _("w-3.5 h-3.5", w === "left" ? "rotate-[-45deg]" : "rotate-[45deg]") }),
3975
+ /* @__PURE__ */ r(Ft, { className: O("w-3.5 h-3.5", w === "left" ? "rotate-[-45deg]" : "rotate-[45deg]") }),
3975
3976
  " Pin to ",
3976
3977
  w.charAt(0).toUpperCase() + w.slice(1)
3977
3978
  ] }, w)),
3978
3979
  e.getIsPinned() && /* @__PURE__ */ b("div", { className: "flex items-center gap-2 px-2 py-1.5 text-xs font-medium text-red-500 cursor-pointer hover:bg-red-50 dark:hover:bg-red-900/20 rounded", onClick: () => {
3979
3980
  e.pin(!1), n(!1);
3980
3981
  }, children: [
3981
- /* @__PURE__ */ r(Dn, { className: "w-3.5 h-3.5" }),
3982
+ /* @__PURE__ */ r(kn, { className: "w-3.5 h-3.5" }),
3982
3983
  " Unpin Column"
3983
3984
  ] })
3984
3985
  ] }),
@@ -3992,7 +3993,7 @@ const ws = ["date", "datetime"], ys = ["boolean"], Cs = ["select"], Ir = j.memo(
3992
3993
  /* @__PURE__ */ r("div", { className: "flex flex-col flex-1 overflow-hidden min-h-0", children: ne ? /* @__PURE__ */ r(kr, { column: e }) : se ? /* @__PURE__ */ r(Dr, { column: e, allAvailableValues: u }) : /* @__PURE__ */ b("div", { className: "flex flex-col flex-1 min-h-0 pointer-events-auto", children: [
3993
3994
  /* @__PURE__ */ b("div", { className: "sticky top-0 bg-popover text-popover-foreground border-b z-20", children: [
3994
3995
  /* @__PURE__ */ r("div", { className: "p-2", children: /* @__PURE__ */ b("div", { className: "relative", children: [
3995
- /* @__PURE__ */ r(Vt, { className: "absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" }),
3996
+ /* @__PURE__ */ r(_t, { className: "absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" }),
3996
3997
  /* @__PURE__ */ r(
3997
3998
  Me,
3998
3999
  {
@@ -4014,7 +4015,7 @@ const ws = ["date", "datetime"], ys = ["boolean"], Cs = ["select"], Ir = j.memo(
4014
4015
  }
4015
4016
  )
4016
4017
  ] }),
4017
- L ? /* @__PURE__ */ r("div", { className: "flex-1 overflow-y-auto px-2 pb-2 min-h-0 pt-2", children: /* @__PURE__ */ r(bs, { uniqueValues: h, selectedValues: R, onBulkSelect: N }) }) : /* @__PURE__ */ r(
4018
+ L ? /* @__PURE__ */ r("div", { className: "flex-1 overflow-y-auto px-2 pb-2 min-h-0 pt-2", children: /* @__PURE__ */ r(vs, { uniqueValues: f, selectedValues: R, onBulkSelect: N }) }) : /* @__PURE__ */ r(
4018
4019
  Pr,
4019
4020
  {
4020
4021
  sortedUniqueValues: K,
@@ -4035,13 +4036,13 @@ const ws = ["date", "datetime"], ys = ["boolean"], Cs = ["select"], Ir = j.memo(
4035
4036
  }
4036
4037
  )
4037
4038
  ] }) }),
4038
- /* @__PURE__ */ r(zt, { onClear: le, onApply: oe })
4039
+ /* @__PURE__ */ r(Tt, { onClear: le, onApply: oe })
4039
4040
  ] }) });
4040
4041
  });
4041
4042
  Ir.displayName = "FilterContent";
4042
- function Ss({ header: e, children: t }) {
4043
+ function Ns({ header: e, children: t }) {
4043
4044
  const n = e.column, o = n.getIsPinned(), a = n.getCanGroup(), i = n.getIsGrouped();
4044
- return /* @__PURE__ */ b(Oo, { children: [
4045
+ return /* @__PURE__ */ b(_o, { children: [
4045
4046
  /* @__PURE__ */ r(Vo, { asChild: !0, children: t }),
4046
4047
  /* @__PURE__ */ b(Lo, { className: "w-48", children: [
4047
4048
  a && /* @__PURE__ */ b(ye, { children: [
@@ -4055,12 +4056,12 @@ function Ss({ header: e, children: t }) {
4055
4056
  "Ungroup ",
4056
4057
  n.id
4057
4058
  ] }) : /* @__PURE__ */ b(ye, { children: [
4058
- /* @__PURE__ */ r(ca, { className: "w-3.5 h-3.5 text-zinc-500/70" }),
4059
+ /* @__PURE__ */ r(la, { className: "w-3.5 h-3.5 text-zinc-500/70" }),
4059
4060
  "Group by column"
4060
4061
  ] })
4061
4062
  }
4062
4063
  ),
4063
- /* @__PURE__ */ r(tn, {})
4064
+ /* @__PURE__ */ r(en, {})
4064
4065
  ] }),
4065
4066
  /* @__PURE__ */ b(
4066
4067
  ut,
@@ -4069,7 +4070,7 @@ function Ss({ header: e, children: t }) {
4069
4070
  disabled: o === "left",
4070
4071
  className: "gap-2",
4071
4072
  children: [
4072
- /* @__PURE__ */ r(It, { className: "w-3.5 h-3.5 rotate-[-45deg]" }),
4073
+ /* @__PURE__ */ r(Ft, { className: "w-3.5 h-3.5 rotate-[-45deg]" }),
4073
4074
  "Pin to Left"
4074
4075
  ]
4075
4076
  }
@@ -4081,20 +4082,20 @@ function Ss({ header: e, children: t }) {
4081
4082
  disabled: o === "right",
4082
4083
  className: "gap-2",
4083
4084
  children: [
4084
- /* @__PURE__ */ r(It, { className: "w-3.5 h-3.5 rotate-[45deg]" }),
4085
+ /* @__PURE__ */ r(Ft, { className: "w-3.5 h-3.5 rotate-[45deg]" }),
4085
4086
  "Pin to Right"
4086
4087
  ]
4087
4088
  }
4088
4089
  ),
4089
4090
  o && /* @__PURE__ */ b(ye, { children: [
4090
- /* @__PURE__ */ r(tn, {}),
4091
+ /* @__PURE__ */ r(en, {}),
4091
4092
  /* @__PURE__ */ b(
4092
4093
  ut,
4093
4094
  {
4094
4095
  onClick: () => n.pin(!1),
4095
4096
  className: "text-red-600 focus:text-red-700 focus:bg-red-50 dark:focus:bg-red-900/20 gap-2",
4096
4097
  children: [
4097
- /* @__PURE__ */ r(Dn, { className: "w-3.5 h-3.5" }),
4098
+ /* @__PURE__ */ r(kn, { className: "w-3.5 h-3.5" }),
4098
4099
  "Unpin Column"
4099
4100
  ]
4100
4101
  }
@@ -4104,7 +4105,7 @@ function Ss({ header: e, children: t }) {
4104
4105
  ] });
4105
4106
  }
4106
4107
  const Mr = Ze(({ header: e, density: t, onAutoFit: n, columnPinning: o }) => {
4107
- const a = e.getContext().table.options.meta, i = e.id === "select" || e.id === "actions", l = e.column.columnDef.meta, c = e.column.columnDef, s = a?.enableColumnReorder !== !1 && !i && l?.allowReordering !== !1 && c?.allowReordering !== !1, g = !(e.column.getCanGroup() && !i) && !s || e.isPlaceholder, { attributes: m, listeners: h, setNodeRef: y, isDragging: u } = $o({
4108
+ const a = e.getContext().table.options.meta, i = e.id === "select" || e.id === "actions", l = e.column.columnDef.meta, c = e.column.columnDef, s = a?.enableColumnReorder !== !1 && !i && l?.allowReordering !== !1 && c?.allowReordering !== !1, g = !(e.column.getCanGroup() && !i) && !s || e.isPlaceholder, { attributes: m, listeners: f, setNodeRef: y, isDragging: u } = $o({
4108
4109
  id: e.column.id,
4109
4110
  disabled: g,
4110
4111
  data: {
@@ -4125,13 +4126,13 @@ const Mr = Ze(({ header: e, density: t, onAutoFit: n, columnPinning: o }) => {
4125
4126
  }, [P, e.column, o]), E = j.useRef(0), k = V((I) => {
4126
4127
  const z = Date.now();
4127
4128
  z - E.current < 300 && n?.(e.column.id), E.current = z, e.getResizeHandler()(I);
4128
- }, [e, n]), R = e.column.columnDef.meta?.align || "left", f = e.column.columnDef.meta?.gridLines || e.getContext().table.options.meta?.gridLines, C = a?.focusedCell?.c === e.index, N = /* @__PURE__ */ b(
4129
+ }, [e, n]), R = e.column.columnDef.meta?.align || "left", h = e.column.columnDef.meta?.gridLines || e.getContext().table.options.meta?.gridLines, C = a?.focusedCell?.c === e.index, N = /* @__PURE__ */ b(
4129
4130
  "div",
4130
4131
  {
4131
4132
  ref: (I) => {
4132
4133
  y(I), S(I);
4133
4134
  },
4134
- className: _(
4135
+ className: O(
4135
4136
  "relative h-full font-semibold text-foreground flex items-center select-none group/header transition-all flex-shrink-0 px-4",
4136
4137
  a?.dir === "rtl" ? "border-l border-border/50" : "border-r border-border/50",
4137
4138
  wr(t),
@@ -4145,7 +4146,7 @@ const Mr = Ze(({ header: e, density: t, onAutoFit: n, columnPinning: o }) => {
4145
4146
  // Pinned Classes (Shadows, background)
4146
4147
  Rr(P),
4147
4148
  // Grid Lines
4148
- (f === "Both" || f === "Vertical") && (a?.dir === "rtl" ? "border-l border-border" : "border-r border-border")
4149
+ (h === "Both" || h === "Vertical") && (a?.dir === "rtl" ? "border-l border-border" : "border-r border-border")
4149
4150
  ),
4150
4151
  style: {
4151
4152
  width: `calc(var(--header-${e.id}-size) * 1px)`,
@@ -4157,19 +4158,19 @@ const Mr = Ze(({ header: e, density: t, onAutoFit: n, columnPinning: o }) => {
4157
4158
  "aria-colindex": e.index + 1,
4158
4159
  "aria-sort": e.column.getIsSorted() === "asc" ? "ascending" : e.column.getIsSorted() === "desc" ? "descending" : "none",
4159
4160
  children: [
4160
- /* @__PURE__ */ b("div", { className: _(
4161
+ /* @__PURE__ */ b("div", { className: O(
4161
4162
  "flex items-center w-full h-full gap-2",
4162
4163
  R === "center" && "justify-center relative",
4163
4164
  R === "right" && "justify-end"
4164
4165
  ), children: [
4165
- !g && /* @__PURE__ */ r("div", { ...m, ...h, className: _(
4166
+ !g && /* @__PURE__ */ r("div", { ...m, ...f, className: O(
4166
4167
  "cursor-grab active:cursor-grabbing p-1 text-muted-foreground hover:text-foreground transition-colors z-50",
4167
4168
  R === "center" ? a?.dir === "rtl" ? "absolute right-1 top-1/2 -translate-y-1/2" : "absolute left-1 top-1/2 -translate-y-1/2" : a?.dir === "rtl" ? "-mr-2 ml-1" : "-ml-2 mr-1"
4168
- ), children: /* @__PURE__ */ r(kn, { className: "w-3.5 h-3.5" }) }),
4169
+ ), children: /* @__PURE__ */ r(Nn, { className: "w-3.5 h-3.5" }) }),
4169
4170
  /* @__PURE__ */ b(
4170
4171
  "div",
4171
4172
  {
4172
- className: _(
4173
+ className: O(
4173
4174
  "flex items-center min-w-0 gap-2 cursor-pointer group h-full select-none",
4174
4175
  R === "center" && "justify-center",
4175
4176
  R === "right" && "justify-end",
@@ -4188,17 +4189,17 @@ const Mr = Ze(({ header: e, density: t, onAutoFit: n, columnPinning: o }) => {
4188
4189
  ]
4189
4190
  }
4190
4191
  ),
4191
- !e.isPlaceholder && e.column.getCanFilter() && /* @__PURE__ */ r("div", { className: _(
4192
+ !e.isPlaceholder && e.column.getCanFilter() && /* @__PURE__ */ r("div", { className: O(
4192
4193
  a?.dir === "rtl" ? "ml-2" : "mr-2",
4193
4194
  R === "center" && (a?.dir === "rtl" ? "absolute left-1 top-1/2 -translate-y-1/2 ml-0" : "absolute right-1 top-1/2 -translate-y-1/2 mr-0")
4194
- ), children: /* @__PURE__ */ r(xs, { column: e.column, table: e.getContext().table }) })
4195
+ ), children: /* @__PURE__ */ r(ws, { column: e.column, table: e.getContext().table }) })
4195
4196
  ] }),
4196
4197
  e.column.getCanResize() && /* @__PURE__ */ r(
4197
4198
  "div",
4198
4199
  {
4199
4200
  onMouseDown: k,
4200
4201
  onTouchStart: e.getResizeHandler(),
4201
- className: _(
4202
+ className: O(
4202
4203
  "absolute top-0 h-full w-4 cursor-col-resize hover:bg-primary/10 touch-none select-none z-30 transition-colors",
4203
4204
  a?.dir === "rtl" ? "left-0" : "right-0",
4204
4205
  e.column.getIsResizing() ? "bg-primary w-1" : ""
@@ -4209,11 +4210,11 @@ const Mr = Ze(({ header: e, density: t, onAutoFit: n, columnPinning: o }) => {
4209
4210
  ]
4210
4211
  }
4211
4212
  );
4212
- return e.column.getCanPin() || e.column.getCanGroup() ? /* @__PURE__ */ r(Ss, { header: e, children: N }) : N;
4213
+ return e.column.getCanPin() || e.column.getCanGroup() ? /* @__PURE__ */ r(Ns, { header: e, children: N }) : N;
4213
4214
  });
4214
4215
  Mr.displayName = "EzDraggableHeader";
4215
- const Ns = j.memo(Rs);
4216
- function Rs({
4216
+ const Rs = j.memo(Es);
4217
+ function Es({
4217
4218
  table: e,
4218
4219
  enableStickyHeader: t,
4219
4220
  classNames: n,
@@ -4224,10 +4225,10 @@ function Rs({
4224
4225
  return /* @__PURE__ */ r(
4225
4226
  "div",
4226
4227
  {
4227
- className: _(
4228
+ className: O(
4228
4229
  yr,
4229
4230
  "w-full bg-background shadow-sm",
4230
- Tt.bottom,
4231
+ At.bottom,
4231
4232
  t && "sticky top-0 z-20",
4232
4233
  n?.header
4233
4234
  ),
@@ -4235,7 +4236,7 @@ function Rs({
4235
4236
  children: e.getHeaderGroups().map((l) => /* @__PURE__ */ r(
4236
4237
  "div",
4237
4238
  {
4238
- className: _("flex w-full border-border/50 last:border-0 h-full", Tt.bottom),
4239
+ className: O("flex w-full border-border/50 last:border-0 h-full", At.bottom),
4239
4240
  role: "row",
4240
4241
  children: i?.header ? /* @__PURE__ */ r("div", { className: "contents", children: (() => {
4241
4242
  const c = i.header;
@@ -4275,15 +4276,15 @@ const Ar = Ze(({ isLoading: e, rowCount: t, renderNoRowsOverlay: n, slots: o, lo
4275
4276
  return null;
4276
4277
  });
4277
4278
  Ar.displayName = "EzTableOverlays";
4278
- const Es = ({ children: e, text: t }) => {
4279
+ const ks = ({ children: e, text: t }) => {
4279
4280
  const n = Re(null), [o, a] = H(!1), i = () => n.current ? n.current.scrollWidth > n.current.clientWidth + 1 : !1;
4280
4281
  return ue(() => {
4281
4282
  if (i(), n.current) {
4282
4283
  const s = new ResizeObserver(i);
4283
4284
  return s.observe(n.current), () => s.disconnect();
4284
4285
  }
4285
- }, [e, t]), /* @__PURE__ */ r(Nn, { children: /* @__PURE__ */ b(yn, { delayDuration: 300, open: o, children: [
4286
- /* @__PURE__ */ r(Cn, { asChild: !0, children: /* @__PURE__ */ r(
4286
+ }, [e, t]), /* @__PURE__ */ r(Sn, { children: /* @__PURE__ */ b(wn, { delayDuration: 300, open: o, children: [
4287
+ /* @__PURE__ */ r(yn, { asChild: !0, children: /* @__PURE__ */ r(
4287
4288
  "div",
4288
4289
  {
4289
4290
  ref: n,
@@ -4297,7 +4298,7 @@ const Es = ({ children: e, text: t }) => {
4297
4298
  children: e
4298
4299
  }
4299
4300
  ) }),
4300
- /* @__PURE__ */ r(Sn, { children: /* @__PURE__ */ r("p", { className: "max-w-sm break-words", children: t || e }) })
4301
+ /* @__PURE__ */ r(Cn, { children: /* @__PURE__ */ r("p", { className: "max-w-sm break-words", children: t || e }) })
4301
4302
  ] }) });
4302
4303
  }, Tr = Ze(({
4303
4304
  cell: e,
@@ -4312,7 +4313,7 @@ const Es = ({ children: e, text: t }) => {
4312
4313
  onCellClick: d,
4313
4314
  onCellDoubleClick: g,
4314
4315
  tableMeta: m,
4315
- rowDepth: h,
4316
+ rowDepth: f,
4316
4317
  renderDetailPanel: y,
4317
4318
  isFirstColumn: u,
4318
4319
  columnPinning: S
@@ -4322,22 +4323,22 @@ const Es = ({ children: e, text: t }) => {
4322
4323
  minWidth: (e.column.columnDef.minSize ?? 0) > 0 ? e.column.columnDef.minSize : void 0,
4323
4324
  maxWidth: (e.column.columnDef.maxSize ?? 0) > 0 && e.column.columnDef.maxSize !== Number.MAX_SAFE_INTEGER ? e.column.columnDef.maxSize : void 0,
4324
4325
  ...Nr(o, o === "right" ? e.column.getAfter("right") : e.column.getStart("left"), m?.dir),
4325
- paddingLeft: m?.dir !== "rtl" && (e.column.id === "firstName" || e.column.id === "name" || e.column.id === "id") ? `${h * 20 + 16}px` : void 0,
4326
- paddingRight: m?.dir === "rtl" && (e.column.id === "firstName" || e.column.id === "name" || e.column.id === "id") ? `${h * 20 + 16}px` : void 0
4327
- }), [e.column.id, o, h, S]), P = /* @__PURE__ */ r(ye, { children: e.getIsGrouped() ? /* @__PURE__ */ b("span", { className: "font-semibold", children: [
4326
+ paddingLeft: m?.dir !== "rtl" && (e.column.id === "firstName" || e.column.id === "name" || e.column.id === "id") ? `${f * 20 + 16}px` : void 0,
4327
+ paddingRight: m?.dir === "rtl" && (e.column.id === "firstName" || e.column.id === "name" || e.column.id === "id") ? `${f * 20 + 16}px` : void 0
4328
+ }), [e.column.id, o, f, S]), P = /* @__PURE__ */ r(ye, { children: e.getIsGrouped() ? /* @__PURE__ */ b("span", { className: "font-semibold", children: [
4328
4329
  Xe(e.column.columnDef.cell, e.getContext()),
4329
4330
  /* @__PURE__ */ b("span", { className: "text-muted-foreground font-normal ml-1", children: [
4330
4331
  "(",
4331
4332
  e.row.subRows.length,
4332
4333
  ")"
4333
4334
  ] })
4334
- ] }) : e.getIsAggregated() ? /* @__PURE__ */ r("span", { className: _(
4335
+ ] }) : e.getIsAggregated() ? /* @__PURE__ */ r("span", { className: O(
4335
4336
  "font-medium tabular-nums",
4336
4337
  m?.enableGroupFooters && "text-primary/80 bg-primary/5 px-2 py-0.5 rounded"
4337
4338
  ), children: Xe(e.column.columnDef.aggregatedCell ?? e.column.columnDef.cell, e.getContext()) }) : e.getIsPlaceholder() ? null : Xe(e.column.columnDef.cell, e.getContext()) }), A = e.column.columnDef.meta?.clipMode, E = W(() => {
4338
4339
  if (!m?.validate || !m?.validationAttempted) return { isValid: !0 };
4339
- const R = e.column.id, f = e.getValue(), C = e.row.original;
4340
- return m.validate(R, f, C);
4340
+ const R = e.column.id, h = e.getValue(), C = e.row.original;
4341
+ return m.validate(R, h, C);
4341
4342
  }, [m, e, t, e.getValue()]), k = i ? {
4342
4343
  boxShadow: E.isValid ? "inset 0 0 0 2px hsl(var(--primary))" : "inset 0 0 0 2px hsl(var(--destructive))",
4343
4344
  zIndex: 20,
@@ -4354,7 +4355,7 @@ const Es = ({ children: e, text: t }) => {
4354
4355
  d?.({ row: e.row.original, columnId: e.column.id, cellValue: e.getValue(), event: R, rowIndex: t, colIndex: n }), i && m?.toggleRowEditing && !m?.editingRows?.[t] && m.toggleRowEditing(t, !0);
4355
4356
  },
4356
4357
  onDoubleClick: (R) => g?.({ row: e.row.original, columnId: e.column.id, cellValue: e.getValue(), event: R, rowIndex: t, colIndex: n }),
4357
- className: _(
4358
+ className: O(
4358
4359
  "px-4 text-sm text-foreground flex select-none min-h-full min-w-0 flex-shrink-0 relative",
4359
4360
  i && "z-20",
4360
4361
  i && E.isValid && "bg-primary/5",
@@ -4363,11 +4364,11 @@ const Es = ({ children: e, text: t }) => {
4363
4364
  !i && (m?.dir === "rtl" ? "border-l border-border/50" : "border-r border-border/50"),
4364
4365
  e.column.columnDef.meta?.wrapText ? "items-start pt-3" : "items-center",
4365
4366
  Sr(l),
4366
- ms(a, i),
4367
- us(e.column.columnDef.meta?.align, m?.dir),
4368
- gs(e.column.columnDef.meta?.wrapText ? "wrap" : A === "ellipsis-tooltip" ? "ellipsis" : "truncate", A === "ellipsis-tooltip"),
4367
+ gs(a, i),
4368
+ ms(e.column.columnDef.meta?.align, m?.dir),
4369
+ fs(e.column.columnDef.meta?.wrapText ? "wrap" : A === "ellipsis-tooltip" ? "ellipsis" : "truncate", A === "ellipsis-tooltip"),
4369
4370
  Rr(o, m?.dir),
4370
- !i && fs(e.column.columnDef.meta?.gridLines || m?.gridLines, void 0, m?.dir),
4371
+ !i && hs(e.column.columnDef.meta?.gridLines || m?.gridLines, void 0, m?.dir),
4371
4372
  typeof m?.classNames?.cell == "function" ? m.classNames.cell(e) : m?.classNames?.cell
4372
4373
  ),
4373
4374
  style: { ...p, ...k },
@@ -4377,7 +4378,7 @@ const Es = ({ children: e, text: t }) => {
4377
4378
  e.getIsGrouped() || e.row.getCanExpand() && u || y && u ? /* @__PURE__ */ r(
4378
4379
  "button",
4379
4380
  {
4380
- className: _(
4381
+ className: O(
4381
4382
  m?.dir === "rtl" ? "ml-2" : "mr-2",
4382
4383
  "p-1 hover:bg-muted rounded transition-transform",
4383
4384
  !e.row.getCanExpand() && !y && "invisible"
@@ -4388,7 +4389,7 @@ const Es = ({ children: e, text: t }) => {
4388
4389
  children: e.row.getIsExpanded() ? /* @__PURE__ */ r(Rn, { className: "w-4 h-4" }) : /* @__PURE__ */ r(pt, { className: "w-4 h-4" })
4389
4390
  }
4390
4391
  ) : null,
4391
- E.isValid ? A === "ellipsis-tooltip" ? /* @__PURE__ */ r("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ r(Es, { text: typeof e.getValue() == "string" ? e.getValue() : void 0, children: P }) }) : P : /* @__PURE__ */ r("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ r(
4392
+ E.isValid ? A === "ellipsis-tooltip" ? /* @__PURE__ */ r("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ r(ks, { text: typeof e.getValue() == "string" ? e.getValue() : void 0, children: P }) }) : P : /* @__PURE__ */ r("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ r(
4392
4393
  Zr,
4393
4394
  {
4394
4395
  enabled: !0,
@@ -4419,7 +4420,7 @@ const zr = Ze(({
4419
4420
  onCellClick: d,
4420
4421
  onCellDoubleClick: g,
4421
4422
  focusedCell: m,
4422
- renderDetailPanel: h,
4423
+ renderDetailPanel: f,
4423
4424
  measureElement: y,
4424
4425
  columnVirtualizer: u,
4425
4426
  onRowClick: S,
@@ -4428,7 +4429,7 @@ const zr = Ze(({
4428
4429
  onRowMouseLeave: A,
4429
4430
  columnPinning: E
4430
4431
  }) => {
4431
- const k = u?.getVirtualItems() || t.getVisibleCells().map((N, I) => ({ index: I })), R = t.getVisibleCells(), { paddingLeft: f, paddingRight: C } = W(() => !u || k.length === 0 ? { paddingLeft: 0, paddingRight: 0 } : {
4432
+ const k = u?.getVirtualItems() || t.getVisibleCells().map((N, I) => ({ index: I })), R = t.getVisibleCells(), { paddingLeft: h, paddingRight: C } = W(() => !u || k.length === 0 ? { paddingLeft: 0, paddingRight: 0 } : {
4432
4433
  paddingLeft: k[0]?.start || 0,
4433
4434
  paddingRight: u.getTotalSize() - (k[k.length - 1]?.end || 0)
4434
4435
  }, [u, k]);
@@ -4459,13 +4460,13 @@ const zr = Ze(({
4459
4460
  onMouseEnter: (N) => P?.(t.index, N),
4460
4461
  onMouseLeave: (N) => A?.(t.index, N),
4461
4462
  children: [
4462
- /* @__PURE__ */ b("div", { className: _(
4463
+ /* @__PURE__ */ b("div", { className: O(
4463
4464
  "flex items-stretch w-full min-w-max hover:bg-muted/50 transition-[background-color] duration-200",
4464
4465
  t.getIsSelected() && "bg-muted",
4465
4466
  Sr(o),
4466
4467
  typeof n.options.meta?.classNames?.row == "function" ? n.options.meta.classNames.row(t) : n.options.meta?.classNames?.row
4467
4468
  ), children: [
4468
- f > 0 && /* @__PURE__ */ r("div", { style: { flex: `0 0 ${f}px` } }),
4469
+ h > 0 && /* @__PURE__ */ r("div", { style: { flex: `0 0 ${h}px` } }),
4469
4470
  k.map((N) => {
4470
4471
  const I = R[N.index];
4471
4472
  return I ? /* @__PURE__ */ r(
@@ -4484,7 +4485,7 @@ const zr = Ze(({
4484
4485
  onCellDoubleClick: g,
4485
4486
  tableMeta: n.options.meta,
4486
4487
  rowDepth: t.depth,
4487
- renderDetailPanel: h,
4488
+ renderDetailPanel: f,
4488
4489
  isFirstColumn: N.index === 0,
4489
4490
  table: n,
4490
4491
  columnPinning: E
@@ -4494,7 +4495,7 @@ const zr = Ze(({
4494
4495
  }),
4495
4496
  C > 0 && /* @__PURE__ */ r("div", { style: { flex: `0 0 ${C}px` } })
4496
4497
  ] }),
4497
- t.getIsExpanded() && h && /* @__PURE__ */ r("div", { className: "w-full bg-muted/30 border-t border-border", children: h({ row: t }) })
4498
+ t.getIsExpanded() && f && /* @__PURE__ */ r("div", { className: "w-full bg-muted/30 border-t border-border", children: f({ row: t }) })
4498
4499
  ]
4499
4500
  }
4500
4501
  )
@@ -4502,7 +4503,7 @@ const zr = Ze(({
4502
4503
  );
4503
4504
  });
4504
4505
  zr.displayName = "EzTableRow";
4505
- function ks({
4506
+ function Ds({
4506
4507
  table: e,
4507
4508
  rows: t,
4508
4509
  rowVirtualizer: n,
@@ -4515,7 +4516,7 @@ function ks({
4515
4516
  renderNoRowsOverlay: d,
4516
4517
  slots: g,
4517
4518
  localization: m,
4518
- enableContextMenu: h,
4519
+ enableContextMenu: f,
4519
4520
  onContextMenuItemClick: y,
4520
4521
  isCellSelected: u,
4521
4522
  focusedCell: S,
@@ -4525,13 +4526,13 @@ function ks({
4525
4526
  onCellDoubleClick: E,
4526
4527
  renderDetailPanel: k,
4527
4528
  onRowClick: R,
4528
- onRowDoubleClick: f
4529
+ onRowDoubleClick: h
4529
4530
  }) {
4530
4531
  const C = !!((l || s) && !c);
4531
4532
  return /* @__PURE__ */ b(
4532
4533
  "div",
4533
4534
  {
4534
- className: _("relative w-full", i?.body),
4535
+ className: O("relative w-full", i?.body),
4535
4536
  style: {
4536
4537
  height: `${n?.getTotalSize() ?? 0}px`,
4537
4538
  minHeight: "0",
@@ -4557,7 +4558,7 @@ function ks({
4557
4558
  row: I,
4558
4559
  table: e,
4559
4560
  density: a,
4560
- enableContextMenu: !!h,
4561
+ enableContextMenu: !!f,
4561
4562
  onContextMenuItemClick: y,
4562
4563
  isCellSelected: u,
4563
4564
  focusedCell: S,
@@ -4569,7 +4570,7 @@ function ks({
4569
4570
  measureElement: n.measureElement,
4570
4571
  columnVirtualizer: o,
4571
4572
  onRowClick: R,
4572
- onRowDoubleClick: f,
4573
+ onRowDoubleClick: h,
4573
4574
  columnPinning: e.getState().columnPinning,
4574
4575
  tableMeta: e.options.meta
4575
4576
  },
@@ -4580,7 +4581,7 @@ function ks({
4580
4581
  }
4581
4582
  );
4582
4583
  }
4583
- const Ds = ({
4584
+ const Ps = ({
4584
4585
  pageIndex: e,
4585
4586
  pageSize: t,
4586
4587
  pageCount: n,
@@ -4686,8 +4687,8 @@ const Ds = ({
4686
4687
  onChange: (g) => {
4687
4688
  const m = g.target.value;
4688
4689
  if (m === "") return;
4689
- const h = Number(m) - 1;
4690
- h >= 0 && h < n && a(h);
4690
+ const f = Number(m) - 1;
4691
+ f >= 0 && f < n && a(f);
4691
4692
  },
4692
4693
  className: "h-6 w-10 p-0 text-center border-none bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 text-sm font-bold"
4693
4694
  }
@@ -4726,7 +4727,7 @@ const Ds = ({
4726
4727
  ] })
4727
4728
  ] })
4728
4729
  ] });
4729
- function Ps({
4730
+ function Fs({
4730
4731
  table: e,
4731
4732
  pagerMessage: t,
4732
4733
  enableStickyPagination: n,
@@ -4734,12 +4735,12 @@ function Ps({
4734
4735
  localization: a,
4735
4736
  changes: i
4736
4737
  }) {
4737
- return /* @__PURE__ */ r("div", { className: _(
4738
+ return /* @__PURE__ */ r("div", { className: O(
4738
4739
  "w-full bg-background border-t border-border z-30",
4739
4740
  n && "sticky bottom-0 shadow-[0_-4px_12px_rgba(0,0,0,0.1)] dark:shadow-[0_-4px_12px_rgba(0,0,0,0.3)]",
4740
4741
  o?.footer
4741
4742
  ), children: /* @__PURE__ */ r(
4742
- Ds,
4743
+ Ps,
4743
4744
  {
4744
4745
  pageIndex: e.getState().pagination.pageIndex,
4745
4746
  pageSize: e.getState().pagination.pageSize,
@@ -4754,7 +4755,7 @@ function Ps({
4754
4755
  }
4755
4756
  ) });
4756
4757
  }
4757
- const Fs = (e) => W(() => {
4758
+ const Is = (e) => W(() => {
4758
4759
  const t = e.getFlatHeaders(), n = {};
4759
4760
  for (let o = 0; o < t.length; o++) {
4760
4761
  const a = t[o];
@@ -4768,7 +4769,7 @@ const Fs = (e) => W(() => {
4768
4769
  // Added visibility dependency
4769
4770
  e.getFlatHeaders()
4770
4771
  // This changes when columns structure changes
4771
- ]), Is = (e = []) => new Uo({
4772
+ ]), Ms = (e = []) => new Uo({
4772
4773
  data: e,
4773
4774
  globalFilter: "",
4774
4775
  columnFilters: [],
@@ -4777,18 +4778,18 @@ const Fs = (e) => W(() => {
4777
4778
  rowSelection: {},
4778
4779
  columnVisibility: {},
4779
4780
  isPending: !1
4780
- }), _r = Ot(null), sl = Ot(null), ll = ({ data: e, children: t }) => {
4781
- const n = W(() => Is(e), []);
4781
+ }), Or = Ot(null), cl = Ot(null), dl = ({ data: e, children: t }) => {
4782
+ const n = W(() => Ms(e), []);
4782
4783
  return j.useEffect(() => {
4783
4784
  n.setState((o) => ({ ...o, data: e }));
4784
- }, [e, n]), /* @__PURE__ */ r(_r.Provider, { value: n, children: t });
4785
- }, cl = (e) => {
4786
- const t = fn(_r);
4785
+ }, [e, n]), /* @__PURE__ */ r(Or.Provider, { value: n, children: t });
4786
+ }, ul = (e) => {
4787
+ const t = gn(Or);
4787
4788
  if (!t) throw new Error("EzTable components must be wrapped in <EzTable.Root>");
4788
4789
  return Wo(t, e);
4789
- }, Ms = j.lazy(() => import("./EzGroupingPanel-DuKrZuqq.js").then((e) => ({ default: e.EzGroupingPanel }))), As = j.lazy(() => import("./EzTableEditDialog-3eU6i9cv.js").then((e) => ({ default: e.EzTableEditDialog }))), Ts = j.lazy(() => import("./EzTableToolbar-DmAb94U-.js").then((e) => ({ default: e.EzTableToolbar }))), zs = j.lazy(() => import("./EzTableFooter-DuAaOcLd.js").then((e) => ({ default: e.EzTableFooter }))), Zt = j.forwardRef((e, t) => {
4790
- const n = hn(), o = ts(e), a = Re(null), i = Re({ width: 0, height: 0 }), l = Re(null);
4791
- ns({
4790
+ }, As = j.lazy(() => import("./EzGroupingPanel-BUsIYDRi.js").then((e) => ({ default: e.EzGroupingPanel }))), Ts = j.lazy(() => import("./EzTableEditDialog-Cd948V1C.js").then((e) => ({ default: e.EzTableEditDialog }))), zs = j.lazy(() => import("./EzTableToolbar-Bz8UWv6j.js").then((e) => ({ default: e.EzTableToolbar }))), Os = j.lazy(() => import("./EzTableFooter-DveD12RC.js").then((e) => ({ default: e.EzTableFooter }))), Xt = j.forwardRef((e, t) => {
4791
+ const n = fn(), o = ns(e), a = Re(null), i = Re({ width: 0, height: 0 }), l = Re(null);
4792
+ rs({
4792
4793
  containerRef: a,
4793
4794
  containerSizeRef: i,
4794
4795
  resizeTimeoutRef: l,
@@ -4803,7 +4804,7 @@ const Fs = (e) => W(() => {
4803
4804
  canUndo: d,
4804
4805
  canRedo: g,
4805
4806
  changes: m,
4806
- batchChanges: h,
4807
+ batchChanges: f,
4807
4808
  density: y,
4808
4809
  isPending: u,
4809
4810
  focusedCell: S,
@@ -4815,7 +4816,7 @@ const Fs = (e) => W(() => {
4815
4816
  redo: E,
4816
4817
  resetData: k,
4817
4818
  toggleRowEditing: R,
4818
- autoFitColumn: f,
4819
+ autoFitColumn: h,
4819
4820
  onCellMouseDown: C,
4820
4821
  onCellMouseEnter: N,
4821
4822
  setGlobalFilter: I,
@@ -4852,36 +4853,36 @@ const Fs = (e) => W(() => {
4852
4853
  }, [m, ce]), ue(() => {
4853
4854
  e.onDataChange && e.onDataChange(m);
4854
4855
  }, [m, e.onDataChange]);
4855
- const { onRowClick: Y, onRowDoubleClick: Q, onCellClick: te, onCellDoubleClick: de } = rs({
4856
+ const { onRowClick: Y, onRowDoubleClick: Q, onCellClick: te, onCellDoubleClick: de } = os({
4856
4857
  table: F,
4857
4858
  editSettings: ee,
4858
4859
  toggleRowEditing: R,
4859
4860
  onRowClickProp: L,
4860
4861
  onRowDoubleClickProp: ne
4861
- }), De = Fs(F), X = Ca({ initialMode: "view" });
4862
- os({
4862
+ }), De = Is(F), X = Ca({ initialMode: "view" });
4863
+ as({
4863
4864
  dialogState: X,
4864
4865
  isDialogMode: ee?.mode === "Dialog",
4865
4866
  rows: c,
4866
4867
  table: F
4867
4868
  });
4868
- const yt = V((O) => {
4869
- X.mode === "create" ? v(O) : (w(X.meta.index, O), R(X.meta.index, !1)), X.close();
4869
+ const yt = V((_) => {
4870
+ X.mode === "create" ? v(_) : (w(X.meta.index, _), R(X.meta.index, !1)), X.close();
4870
4871
  }, [X, v, w, R]), Ge = V(() => {
4871
4872
  ee?.mode === "Dialog" ? X.open("create", {}) : v({});
4872
4873
  }, [ee?.mode, v]), Be = V(() => {
4873
4874
  if (e.onBatchSave) {
4874
- const O = [...h.addedRecords, ...h.changedRecords], U = F.getVisibleLeafColumns().map((Z) => Z.id).filter((Z) => Z !== "select" && Z !== "actions");
4875
- for (const Z of O)
4875
+ const _ = [...f.addedRecords, ...f.changedRecords], U = F.getVisibleLeafColumns().map((Z) => Z.id).filter((Z) => Z !== "select" && Z !== "actions");
4876
+ for (const Z of _)
4876
4877
  if (!D(Z, U).__form.isValid) {
4877
4878
  G(!0);
4878
4879
  return;
4879
4880
  }
4880
- e.onBatchSave(h);
4881
+ e.onBatchSave(f);
4881
4882
  const q = n.get("NotificationService");
4882
4883
  if (q && q.add({
4883
4884
  type: "success",
4884
- message: `Successfully saved ${h.addedRecords.length + h.changedRecords.length} changes.`,
4885
+ message: `Successfully saved ${f.addedRecords.length + f.changedRecords.length} changes.`,
4885
4886
  duration: 5e3
4886
4887
  }), k(), G(!1), F.options.meta?.toggleRowEditing) {
4887
4888
  const Z = F.options.meta.editingRows || {};
@@ -4890,17 +4891,17 @@ const Fs = (e) => W(() => {
4890
4891
  });
4891
4892
  }
4892
4893
  }
4893
- }, [e.onBatchSave, h, k, F.options.meta, D, F]), je = V(() => {
4894
+ }, [e.onBatchSave, f, k, F.options.meta, D, F]), je = V(() => {
4894
4895
  if (e.onBatchDiscard && e.onBatchDiscard(), k(), G(!1), F.options.meta?.toggleRowEditing) {
4895
- const O = F.options.meta.editingRows || {};
4896
- Object.keys(O).forEach((B) => {
4896
+ const _ = F.options.meta.editingRows || {};
4897
+ Object.keys(_).forEach((B) => {
4897
4898
  F.options.meta?.toggleRowEditing?.(parseInt(B), !1);
4898
4899
  });
4899
4900
  }
4900
4901
  }, [e.onBatchDiscard, k, F.options.meta]), Ct = j.useMemo(() => ({
4901
4902
  ...o.imperativeAPI,
4902
4903
  ...o.baseApi,
4903
- validateField: (O) => {
4904
+ validateField: (_) => {
4904
4905
  let B = {};
4905
4906
  if (ee?.mode === "Dialog" && X.isOpen)
4906
4907
  B = X.data;
@@ -4911,13 +4912,13 @@ const Fs = (e) => W(() => {
4911
4912
  J && J[ae] && (B = J[ae]);
4912
4913
  }
4913
4914
  }
4914
- const { isValid: U } = M(O, B[O], B);
4915
+ const { isValid: U } = M(_, B[_], B);
4915
4916
  return U;
4916
4917
  },
4917
4918
  validateEditForm: () => {
4918
- const O = F.getVisibleLeafColumns();
4919
+ const _ = F.getVisibleLeafColumns();
4919
4920
  let B = !0;
4920
- return O.forEach((U) => {
4921
+ return _.forEach((U) => {
4921
4922
  const q = U.id;
4922
4923
  let Z = {};
4923
4924
  if (ee?.mode === "Dialog" && X.isOpen)
@@ -4939,12 +4940,12 @@ const Fs = (e) => W(() => {
4939
4940
  // Expose validation state to cells
4940
4941
  }, Ko(t, Ct);
4941
4942
  const [He, at] = j.useState(null), { handleDragEnd: qe, handleKeyDown: Pe, handleDragStart: St } = xa({
4942
- onDragStart: (O) => {
4943
- at(O.active.id);
4943
+ onDragStart: (_) => {
4944
+ at(_.active.id);
4944
4945
  },
4945
- onDragEnd: (O) => {
4946
+ onDragEnd: (_) => {
4946
4947
  at(null);
4947
- const { active: B, over: U } = O;
4948
+ const { active: B, over: U } = _;
4948
4949
  if (!U) return;
4949
4950
  const q = B.id, Z = [...F.getState().grouping];
4950
4951
  if (U.id === "grouping-panel")
@@ -4967,47 +4968,47 @@ const Fs = (e) => W(() => {
4967
4968
  }
4968
4969
  }
4969
4970
  },
4970
- onKeyDown: (O) => {
4971
+ onKeyDown: (_) => {
4971
4972
  const B = F.options.meta;
4972
4973
  if (B?.navigateFocus) {
4973
- if (O.target.tagName === "INPUT") {
4974
- O.key === "Enter" && (O.preventDefault(), O.target.blur(), B.navigateFocus(1, 0)), O.key === "Tab" && (O.preventDefault(), O.target.blur(), B.navigateFocus(0, O.shiftKey ? -1 : 1));
4974
+ if (_.target.tagName === "INPUT") {
4975
+ _.key === "Enter" && (_.preventDefault(), _.target.blur(), B.navigateFocus(1, 0)), _.key === "Tab" && (_.preventDefault(), _.target.blur(), B.navigateFocus(0, _.shiftKey ? -1 : 1));
4975
4976
  return;
4976
4977
  }
4977
- switch (O.key) {
4978
+ switch (_.key) {
4978
4979
  case "ArrowUp":
4979
- O.preventDefault(), B.navigateFocus(-1, 0);
4980
+ _.preventDefault(), B.navigateFocus(-1, 0);
4980
4981
  break;
4981
4982
  case "ArrowDown":
4982
- O.preventDefault(), B.navigateFocus(1, 0);
4983
+ _.preventDefault(), B.navigateFocus(1, 0);
4983
4984
  break;
4984
4985
  case "ArrowLeft":
4985
- O.preventDefault(), B.navigateFocus(0, -1);
4986
+ _.preventDefault(), B.navigateFocus(0, -1);
4986
4987
  break;
4987
4988
  case "ArrowRight":
4988
- O.preventDefault(), B.navigateFocus(0, 1);
4989
+ _.preventDefault(), B.navigateFocus(0, 1);
4989
4990
  break;
4990
4991
  case "Tab":
4991
- O.preventDefault(), B.navigateFocus(0, O.shiftKey ? -1 : 1);
4992
+ _.preventDefault(), B.navigateFocus(0, _.shiftKey ? -1 : 1);
4992
4993
  break;
4993
4994
  case "Enter":
4994
- O.preventDefault(), B.navigateFocus(1, 0);
4995
+ _.preventDefault(), B.navigateFocus(1, 0);
4995
4996
  break;
4996
4997
  }
4997
4998
  }
4998
4999
  }
4999
- }), it = V((O, B) => {
5000
+ }), it = V((_, B) => {
5000
5001
  if (!s) return !1;
5001
5002
  const { start: U, end: q } = s;
5002
- return O >= Math.min(U.r, q.r) && O <= Math.max(U.r, q.r) && B >= Math.min(U.c, q.c) && B <= Math.max(U.c, q.c);
5003
+ return _ >= Math.min(U.r, q.r) && _ <= Math.max(U.r, q.r) && B >= Math.min(U.c, q.c) && B <= Math.max(U.c, q.c);
5003
5004
  }, [s]), { sensors: st, onDragEnd: lt, onDragStart: ct } = wa({
5004
5005
  onDragStart: St,
5005
5006
  onDragEnd: qe,
5006
- collisionDetection: nn,
5007
+ collisionDetection: tn,
5007
5008
  distance: 5
5008
5009
  });
5009
- return /* @__PURE__ */ r(Fo, { fallback: /* @__PURE__ */ r(as, {}), children: /* @__PURE__ */ r(Nn, { children: /* @__PURE__ */ r(jo, { sensors: st, onDragEnd: lt, onDragStart: ct, collisionDetection: nn, children: /* @__PURE__ */ b("div", { className: _(yr, "w-full min-h-0 gap-3", e.className, e.classNames?.root), dir: he, children: [
5010
- e.enableGrouping && /* @__PURE__ */ r(j.Suspense, { fallback: null, children: /* @__PURE__ */ r(Ms, { grouping: F.getState().grouping, onGroupingChange: F.setGrouping, columns: F.getAllColumns() }) }),
5010
+ return /* @__PURE__ */ r(Fo, { fallback: /* @__PURE__ */ r(is, {}), children: /* @__PURE__ */ r(Sn, { children: /* @__PURE__ */ r(jo, { sensors: st, onDragEnd: lt, onDragStart: ct, collisionDetection: tn, children: /* @__PURE__ */ b("div", { className: O(yr, "w-full min-h-0 gap-3", e.className, e.classNames?.root), dir: he, children: [
5011
+ e.enableGrouping && /* @__PURE__ */ r(j.Suspense, { fallback: null, children: /* @__PURE__ */ r(As, { grouping: F.getState().grouping, onGroupingChange: F.setGrouping, columns: F.getAllColumns() }) }),
5011
5012
  e.slots?.toolbar ? /* @__PURE__ */ r(
5012
5013
  e.slots.toolbar,
5013
5014
  {
@@ -5019,7 +5020,7 @@ const Fs = (e) => W(() => {
5019
5020
  ...e.slotProps?.toolbar || {}
5020
5021
  }
5021
5022
  ) : /* @__PURE__ */ r(j.Suspense, { fallback: /* @__PURE__ */ r("div", { className: "h-10 w-full animate-pulse bg-muted/20 rounded-md" }), children: /* @__PURE__ */ r(
5022
- Ts,
5023
+ zs,
5023
5024
  {
5024
5025
  globalFilter: p,
5025
5026
  setGlobalFilter: I,
@@ -5046,18 +5047,18 @@ const Fs = (e) => W(() => {
5046
5047
  /* @__PURE__ */ r(
5047
5048
  "div",
5048
5049
  {
5049
- ref: (O) => {
5050
- se.current = O, a.current = O;
5050
+ ref: (_) => {
5051
+ se.current = _, a.current = _;
5051
5052
  },
5052
5053
  id: e.id ? `ez-table-${e.id}` : "ez-table-default",
5053
- className: _(
5054
+ className: O(
5054
5055
  "flex-1 w-full overflow-auto rounded-md bg-background focus:outline-none focus:ring-1 focus:ring-primary/20",
5055
- Tt.default
5056
+ At.default
5056
5057
  ),
5057
5058
  dir: he,
5058
- onScroll: (O) => {
5059
+ onScroll: (_) => {
5059
5060
  if (e.enableInfiniteScroll) {
5060
- const { scrollTop: B, scrollHeight: U, clientHeight: q } = O.currentTarget;
5061
+ const { scrollTop: B, scrollHeight: U, clientHeight: q } = _.currentTarget;
5061
5062
  U - B - q < 50 && F.getCanNextPage() && !e.isLoading && F.nextPage();
5062
5063
  }
5063
5064
  },
@@ -5073,13 +5074,13 @@ const Fs = (e) => W(() => {
5073
5074
  onKeyDown: Pe,
5074
5075
  children: /* @__PURE__ */ b("div", { className: "flex flex-col relative w-full min-w-max flex-1", role: "presentation", style: { ...De, height: "100%" }, children: [
5075
5076
  /* @__PURE__ */ r(
5076
- Ns,
5077
+ Rs,
5077
5078
  {
5078
5079
  table: F,
5079
5080
  enableStickyHeader: le,
5080
5081
  classNames: e.classNames,
5081
5082
  density: y,
5082
- autoFitColumn: f,
5083
+ autoFitColumn: h,
5083
5084
  slots: e.slots,
5084
5085
  columnPinning: F.getState().columnPinning,
5085
5086
  columnSizing: F.getState().columnSizing,
@@ -5090,7 +5091,7 @@ const Fs = (e) => W(() => {
5090
5091
  }
5091
5092
  ),
5092
5093
  /* @__PURE__ */ r(
5093
- ks,
5094
+ Ds,
5094
5095
  {
5095
5096
  table: F,
5096
5097
  rows: c,
@@ -5117,12 +5118,12 @@ const Fs = (e) => W(() => {
5117
5118
  onRowDoubleClick: Q
5118
5119
  }
5119
5120
  ),
5120
- e.slots?.footer ? /* @__PURE__ */ r(e.slots.footer, { table: F, ...e.slotProps?.footer || {} }) : /* @__PURE__ */ r(j.Suspense, { fallback: null, children: /* @__PURE__ */ r(zs, { table: F, columnVirtualizer: oe, density: y }) })
5121
+ e.slots?.footer ? /* @__PURE__ */ r(e.slots.footer, { table: F, ...e.slotProps?.footer || {} }) : /* @__PURE__ */ r(j.Suspense, { fallback: null, children: /* @__PURE__ */ r(Os, { table: F, columnVirtualizer: oe, density: y }) })
5121
5122
  ] })
5122
5123
  }
5123
5124
  ),
5124
5125
  e.pagination && /* @__PURE__ */ r(
5125
- Ps,
5126
+ Fs,
5126
5127
  {
5127
5128
  table: F,
5128
5129
  pagerMessage: P,
@@ -5132,7 +5133,7 @@ const Fs = (e) => W(() => {
5132
5133
  changes: m
5133
5134
  }
5134
5135
  ),
5135
- /* @__PURE__ */ r(
5136
+ e.enableStatusBar !== !1 && /* @__PURE__ */ r(
5136
5137
  Cr,
5137
5138
  {
5138
5139
  table: F,
@@ -5142,7 +5143,7 @@ const Fs = (e) => W(() => {
5142
5143
  }
5143
5144
  ),
5144
5145
  ee?.mode === "Dialog" && /* @__PURE__ */ r(j.Suspense, { fallback: null, children: /* @__PURE__ */ r(
5145
- As,
5146
+ Ts,
5146
5147
  {
5147
5148
  open: X.isOpen,
5148
5149
  onClose: () => {
@@ -5156,47 +5157,47 @@ const Fs = (e) => W(() => {
5156
5157
  }
5157
5158
  ) }),
5158
5159
  /* @__PURE__ */ r(Ho, { dropAnimation: null, children: He ? /* @__PURE__ */ r(
5159
- ss,
5160
+ ls,
5160
5161
  {
5161
- header: F.getFlatHeaders().find((O) => O.id === He) || F.getLeafHeaders().find((O) => O.id === He),
5162
+ header: F.getFlatHeaders().find((_) => _.id === He) || F.getLeafHeaders().find((_) => _.id === He),
5162
5163
  density: y
5163
5164
  }
5164
5165
  ) : null })
5165
5166
  ] }) }) }) });
5166
5167
  });
5167
- Zt.displayName = "EzTableImpl";
5168
- const dl = Zt, _s = new Jr(), ul = j.forwardRef((e, t) => (no(), /* @__PURE__ */ r(eo, { client: _s, children: /* @__PURE__ */ r(Zt, { ...e, ref: t }) })));
5168
+ Xt.displayName = "EzTableImpl";
5169
+ const ml = Xt, _s = new Jr(), gl = j.forwardRef((e, t) => (no(), /* @__PURE__ */ r(eo, { client: _s, children: /* @__PURE__ */ r(Xt, { ...e, ref: t }) })));
5169
5170
  export {
5170
- rn as B,
5171
+ nn as B,
5171
5172
  pr as C,
5172
- ul as E,
5173
- kn as G,
5173
+ gl as E,
5174
5174
  Ue as P,
5175
- Ut as R,
5176
- ji as S,
5177
- sl as T,
5178
- Aa as a,
5179
- Ta as b,
5180
- za as c,
5175
+ Wt as R,
5176
+ Hi as S,
5177
+ cl as T,
5178
+ Ta as a,
5179
+ za as b,
5180
+ Oa as c,
5181
5181
  vr as d,
5182
- $i as e,
5183
- Li as f,
5182
+ Gi as e,
5183
+ $i as f,
5184
5184
  xr as g,
5185
5185
  br as h,
5186
- Gi as i,
5187
- Bi as j,
5188
- dl as k,
5186
+ Bi as i,
5187
+ ji as j,
5188
+ ml as k,
5189
5189
  Ke as l,
5190
- al as m,
5191
- un as n,
5190
+ sl as m,
5191
+ dn as n,
5192
5192
  mt as o,
5193
- cn as p,
5194
- dn as q,
5195
- Hi as r,
5196
- mn as s,
5197
- qt as t,
5198
- Ca as u,
5199
- ts as v,
5200
- ll as w,
5201
- cl as x
5193
+ ln as p,
5194
+ cn as q,
5195
+ qi as r,
5196
+ un as s,
5197
+ Ht as t,
5198
+ Na as u,
5199
+ Ca as v,
5200
+ ns as w,
5201
+ dl as x,
5202
+ ul as y
5202
5203
  };