sera-components 1.6.10 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2,16 +2,16 @@ var Dn = Object.defineProperty;
2
2
  var Vn = (e, n, t) => n in e ? Dn(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
3
  var ee = (e, n, t) => Vn(e, typeof n != "symbol" ? n + "" : n, t);
4
4
  import * as Xe from "react";
5
- import An, { createContext as be, useContext as B, useMemo as _, useState as $, useEffect as De } from "react";
6
- import { Paper as ie, Image as Tn, Text as P, Menu as ae, Button as H, Container as Nn, Alert as lt, Stack as W, Flex as q, Loader as Ee, NavLink as jt, Checkbox as de, Group as L, Input as X, useCombobox as qt, Combobox as O, Grid as A, InputBase as kn, PasswordInput as Bt, Select as Ln, CloseButton as On, Divider as zn, Tooltip as Ut, Fieldset as Kt, Table as Yt, rem as ge, Pagination as Gn, MenuTarget as Hn, MenuDropdown as qn, MenuItem as Bn, TextInput as _t, Popover as Oe, ActionIcon as Ft, Tabs as Re } from "@mantine/core";
7
- import { IconCheck as Un, IconInfoCircle as at, IconChevronRight as Kn, IconSearch as ut, IconCalendar as $e, IconHelpCircle as Wt, IconPlus as Yn, IconPencil as Wn, IconReload as Xn, IconDatabaseImport as Jn, IconDownload as Qn, IconDatabaseOff as Zn, IconSelector as eo, IconCircleX as to, IconAdjustmentsHorizontal as no, IconKeyboard as oo } from "@tabler/icons-react";
5
+ import Tn, { createContext as De, useContext as U, useMemo as _, useState as M, useEffect as Ve } from "react";
6
+ import { Paper as ie, Image as An, Text as E, Menu as ae, Button as z, Container as Nn, Alert as lt, Stack as Y, Flex as B, Loader as $e, NavLink as yt, Popover as de, Group as O, Checkbox as ce, Input as J, useCombobox as qt, Combobox as G, Grid as N, InputBase as kn, PasswordInput as Bt, Select as Ln, CloseButton as On, Divider as zn, Tooltip as Ut, Fieldset as Yt, Table as Kt, rem as fe, Pagination as Gn, MenuTarget as Hn, MenuDropdown as qn, MenuItem as Bn, TextInput as _t, ActionIcon as Ft, Tabs as je } from "@mantine/core";
7
+ import { IconCheck as Un, IconInfoCircle as at, IconChevronRight as Yn, IconSearch as ut, IconCalendar as Me, IconHelpCircle as Wt, IconPlus as Kn, IconPencil as Wn, IconTrash as Xn, IconReload as Jn, IconDatabaseImport as Qn, IconDownload as Zn, IconDatabaseOff as eo, IconSelector as to, IconCircleX as no, IconAdjustmentsHorizontal as oo, IconKeyboard as ro } from "@tabler/icons-react";
8
8
  import { observer as oe } from "mobx-react-lite";
9
- import { isNestedProperty as Xt, NestedProperty as K, isObjectProperty as se, DynamicMultiLingualString as ro, isDraftRecord as Jt, I18NStore as io, validators as It } from "sera-db";
10
- import { IMaskInput as so } from "react-imask";
11
- import Q from "dayjs";
9
+ import { isNestedProperty as Xt, NestedProperty as W, isObjectProperty as se, DynamicMultiLingualString as io, isDraftRecord as Jt, I18NStore as so, validators as It } from "sera-db";
10
+ import { IMaskInput as lo } from "react-imask";
11
+ import Z from "dayjs";
12
12
  import { DatePickerInput as Je, DateTimePicker as Pt } from "@mantine/dates";
13
- import { debounce as lo } from "throttle-debounce";
14
- var ye = { exports: {} }, fe = {};
13
+ import { debounce as ao } from "throttle-debounce";
14
+ var ye = { exports: {} }, me = {};
15
15
  /**
16
16
  * @license React
17
17
  * react-jsx-runtime.production.js
@@ -22,8 +22,8 @@ var ye = { exports: {} }, fe = {};
22
22
  * LICENSE file in the root directory of this source tree.
23
23
  */
24
24
  var Et;
25
- function ao() {
26
- if (Et) return fe;
25
+ function uo() {
26
+ if (Et) return me;
27
27
  Et = 1;
28
28
  var e = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
29
29
  function t(o, r, i) {
@@ -41,9 +41,9 @@ function ao() {
41
41
  props: i
42
42
  };
43
43
  }
44
- return fe.Fragment = n, fe.jsx = t, fe.jsxs = t, fe;
44
+ return me.Fragment = n, me.jsx = t, me.jsxs = t, me;
45
45
  }
46
- var me = {};
46
+ var pe = {};
47
47
  /**
48
48
  * @license React
49
49
  * react-jsx-runtime.development.js
@@ -54,242 +54,242 @@ var me = {};
54
54
  * LICENSE file in the root directory of this source tree.
55
55
  */
56
56
  var $t;
57
- function uo() {
57
+ function co() {
58
58
  return $t || ($t = 1, process.env.NODE_ENV !== "production" && (function() {
59
- function e(S) {
60
- if (S == null) return null;
61
- if (typeof S == "function")
62
- return S.$$typeof === we ? null : S.displayName || S.name || null;
63
- if (typeof S == "string") return S;
64
- switch (S) {
59
+ function e(C) {
60
+ if (C == null) return null;
61
+ if (typeof C == "function")
62
+ return C.$$typeof === xe ? null : C.displayName || C.name || null;
63
+ if (typeof C == "string") return C;
64
+ switch (C) {
65
65
  case v:
66
66
  return "Fragment";
67
- case y:
67
+ case R:
68
68
  return "Profiler";
69
- case C:
69
+ case S:
70
70
  return "StrictMode";
71
- case Z:
71
+ case k:
72
72
  return "Suspense";
73
- case I:
73
+ case F:
74
74
  return "SuspenseList";
75
75
  case Ae:
76
76
  return "Activity";
77
77
  }
78
- if (typeof S == "object")
79
- switch (typeof S.tag == "number" && console.error(
78
+ if (typeof C == "object")
79
+ switch (typeof C.tag == "number" && console.error(
80
80
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
81
- ), S.$$typeof) {
81
+ ), C.$$typeof) {
82
82
  case h:
83
83
  return "Portal";
84
- case F:
85
- return S.displayName || "Context";
86
- case w:
87
- return (S._context.displayName || "Context") + ".Consumer";
88
- case N:
89
- var j = S.render;
90
- return S = S.displayName, S || (S = j.displayName || j.name || "", S = S !== "" ? "ForwardRef(" + S + ")" : "ForwardRef"), S;
91
- case D:
92
- return j = S.displayName || null, j !== null ? j : e(S.type) || "Memo";
93
- case z:
94
- j = S._payload, S = S._init;
84
+ case I:
85
+ return C.displayName || "Context";
86
+ case y:
87
+ return (C._context.displayName || "Context") + ".Consumer";
88
+ case P:
89
+ var j = C.render;
90
+ return C = C.displayName, C || (C = j.displayName || j.name || "", C = C !== "" ? "ForwardRef(" + C + ")" : "ForwardRef"), C;
91
+ case T:
92
+ return j = C.displayName || null, j !== null ? j : e(C.type) || "Memo";
93
+ case H:
94
+ j = C._payload, C = C._init;
95
95
  try {
96
- return e(S(j));
96
+ return e(C(j));
97
97
  } catch {
98
98
  }
99
99
  }
100
100
  return null;
101
101
  }
102
- function n(S) {
103
- return "" + S;
102
+ function n(C) {
103
+ return "" + C;
104
104
  }
105
- function t(S) {
105
+ function t(C) {
106
106
  try {
107
- n(S);
107
+ n(C);
108
108
  var j = !1;
109
109
  } catch {
110
110
  j = !0;
111
111
  }
112
112
  if (j) {
113
113
  j = console;
114
- var E = j.error, M = typeof Symbol == "function" && Symbol.toStringTag && S[Symbol.toStringTag] || S.constructor.name || "Object";
115
- return E.call(
114
+ var $ = j.error, D = typeof Symbol == "function" && Symbol.toStringTag && C[Symbol.toStringTag] || C.constructor.name || "Object";
115
+ return $.call(
116
116
  j,
117
117
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
118
- M
119
- ), n(S);
118
+ D
119
+ ), n(C);
120
120
  }
121
121
  }
122
- function o(S) {
123
- if (S === v) return "<>";
124
- if (typeof S == "object" && S !== null && S.$$typeof === z)
122
+ function o(C) {
123
+ if (C === v) return "<>";
124
+ if (typeof C == "object" && C !== null && C.$$typeof === H)
125
125
  return "<...>";
126
126
  try {
127
- var j = e(S);
127
+ var j = e(C);
128
128
  return j ? "<" + j + ">" : "<...>";
129
129
  } catch {
130
130
  return "<...>";
131
131
  }
132
132
  }
133
133
  function r() {
134
- var S = Te.A;
135
- return S === null ? null : S.getOwner();
134
+ var C = Ne.A;
135
+ return C === null ? null : C.getOwner();
136
136
  }
137
137
  function i() {
138
138
  return Error("react-stack-top-frame");
139
139
  }
140
- function s(S) {
141
- if (vt.call(S, "key")) {
142
- var j = Object.getOwnPropertyDescriptor(S, "key").get;
140
+ function s(C) {
141
+ if (vt.call(C, "key")) {
142
+ var j = Object.getOwnPropertyDescriptor(C, "key").get;
143
143
  if (j && j.isReactWarning) return !1;
144
144
  }
145
- return S.key !== void 0;
145
+ return C.key !== void 0;
146
146
  }
147
- function a(S, j) {
148
- function E() {
147
+ function a(C, j) {
148
+ function $() {
149
149
  Ct || (Ct = !0, console.error(
150
150
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
151
151
  j
152
152
  ));
153
153
  }
154
- E.isReactWarning = !0, Object.defineProperty(S, "key", {
155
- get: E,
154
+ $.isReactWarning = !0, Object.defineProperty(C, "key", {
155
+ get: $,
156
156
  configurable: !0
157
157
  });
158
158
  }
159
159
  function u() {
160
- var S = e(this.type);
161
- return wt[S] || (wt[S] = !0, console.error(
160
+ var C = e(this.type);
161
+ return wt[C] || (wt[C] = !0, console.error(
162
162
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
163
- )), S = this.props.ref, S !== void 0 ? S : null;
163
+ )), C = this.props.ref, C !== void 0 ? C : null;
164
164
  }
165
- function c(S, j, E, M, xe, ke) {
166
- var b = E.ref;
167
- return S = {
168
- $$typeof: g,
169
- type: S,
165
+ function d(C, j, $, D, Re, Le) {
166
+ var V = $.ref;
167
+ return C = {
168
+ $$typeof: f,
169
+ type: C,
170
170
  key: j,
171
- props: E,
172
- _owner: M
173
- }, (b !== void 0 ? b : null) !== null ? Object.defineProperty(S, "ref", {
171
+ props: $,
172
+ _owner: D
173
+ }, (V !== void 0 ? V : null) !== null ? Object.defineProperty(C, "ref", {
174
174
  enumerable: !1,
175
175
  get: u
176
- }) : Object.defineProperty(S, "ref", { enumerable: !1, value: null }), S._store = {}, Object.defineProperty(S._store, "validated", {
176
+ }) : Object.defineProperty(C, "ref", { enumerable: !1, value: null }), C._store = {}, Object.defineProperty(C._store, "validated", {
177
177
  configurable: !1,
178
178
  enumerable: !1,
179
179
  writable: !0,
180
180
  value: 0
181
- }), Object.defineProperty(S, "_debugInfo", {
181
+ }), Object.defineProperty(C, "_debugInfo", {
182
182
  configurable: !1,
183
183
  enumerable: !1,
184
184
  writable: !0,
185
185
  value: null
186
- }), Object.defineProperty(S, "_debugStack", {
186
+ }), Object.defineProperty(C, "_debugStack", {
187
187
  configurable: !1,
188
188
  enumerable: !1,
189
189
  writable: !0,
190
- value: xe
191
- }), Object.defineProperty(S, "_debugTask", {
190
+ value: Re
191
+ }), Object.defineProperty(C, "_debugTask", {
192
192
  configurable: !1,
193
193
  enumerable: !1,
194
194
  writable: !0,
195
- value: ke
196
- }), Object.freeze && (Object.freeze(S.props), Object.freeze(S)), S;
195
+ value: Le
196
+ }), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
197
197
  }
198
- function f(S, j, E, M, xe, ke) {
199
- var b = j.children;
200
- if (b !== void 0)
201
- if (M)
202
- if (Mn(b)) {
203
- for (M = 0; M < b.length; M++)
204
- m(b[M]);
205
- Object.freeze && Object.freeze(b);
198
+ function g(C, j, $, D, Re, Le) {
199
+ var V = j.children;
200
+ if (V !== void 0)
201
+ if (D)
202
+ if (Mn(V)) {
203
+ for (D = 0; D < V.length; D++)
204
+ m(V[D]);
205
+ Object.freeze && Object.freeze(V);
206
206
  } else
207
207
  console.error(
208
208
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
209
209
  );
210
- else m(b);
210
+ else m(V);
211
211
  if (vt.call(j, "key")) {
212
- b = e(S);
212
+ V = e(C);
213
213
  var le = Object.keys(j).filter(function(bn) {
214
214
  return bn !== "key";
215
215
  });
216
- M = 0 < le.length ? "{key: someKey, " + le.join(": ..., ") + ": ...}" : "{key: someKey}", yt[b + M] || (le = 0 < le.length ? "{" + le.join(": ..., ") + ": ...}" : "{}", console.error(
216
+ D = 0 < le.length ? "{key: someKey, " + le.join(": ..., ") + ": ...}" : "{key: someKey}", jt[V + D] || (le = 0 < le.length ? "{" + le.join(": ..., ") + ": ...}" : "{}", console.error(
217
217
  `A props object containing a "key" prop is being spread into JSX:
218
218
  let props = %s;
219
219
  <%s {...props} />
220
220
  React keys must be passed directly to JSX without using spread:
221
221
  let props = %s;
222
222
  <%s key={someKey} {...props} />`,
223
- M,
224
- b,
223
+ D,
224
+ V,
225
225
  le,
226
- b
227
- ), yt[b + M] = !0);
226
+ V
227
+ ), jt[V + D] = !0);
228
228
  }
229
- if (b = null, E !== void 0 && (t(E), b = "" + E), s(j) && (t(j.key), b = "" + j.key), "key" in j) {
230
- E = {};
231
- for (var Le in j)
232
- Le !== "key" && (E[Le] = j[Le]);
233
- } else E = j;
234
- return b && a(
235
- E,
236
- typeof S == "function" ? S.displayName || S.name || "Unknown" : S
237
- ), c(
238
- S,
239
- b,
240
- E,
229
+ if (V = null, $ !== void 0 && (t($), V = "" + $), s(j) && (t(j.key), V = "" + j.key), "key" in j) {
230
+ $ = {};
231
+ for (var Oe in j)
232
+ Oe !== "key" && ($[Oe] = j[Oe]);
233
+ } else $ = j;
234
+ return V && a(
235
+ $,
236
+ typeof C == "function" ? C.displayName || C.name || "Unknown" : C
237
+ ), d(
238
+ C,
239
+ V,
240
+ $,
241
241
  r(),
242
- xe,
243
- ke
242
+ Re,
243
+ Le
244
244
  );
245
245
  }
246
- function m(S) {
247
- p(S) ? S._store && (S._store.validated = 1) : typeof S == "object" && S !== null && S.$$typeof === z && (S._payload.status === "fulfilled" ? p(S._payload.value) && S._payload.value._store && (S._payload.value._store.validated = 1) : S._store && (S._store.validated = 1));
246
+ function m(C) {
247
+ p(C) ? C._store && (C._store.validated = 1) : typeof C == "object" && C !== null && C.$$typeof === H && (C._payload.status === "fulfilled" ? p(C._payload.value) && C._payload.value._store && (C._payload.value._store.validated = 1) : C._store && (C._store.validated = 1));
248
248
  }
249
- function p(S) {
250
- return typeof S == "object" && S !== null && S.$$typeof === g;
249
+ function p(C) {
250
+ return typeof C == "object" && C !== null && C.$$typeof === f;
251
251
  }
252
- var d = An, g = Symbol.for("react.transitional.element"), h = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), F = Symbol.for("react.context"), N = Symbol.for("react.forward_ref"), Z = Symbol.for("react.suspense"), I = Symbol.for("react.suspense_list"), D = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), Ae = Symbol.for("react.activity"), we = Symbol.for("react.client.reference"), Te = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, vt = Object.prototype.hasOwnProperty, Mn = Array.isArray, Ne = console.createTask ? console.createTask : function() {
252
+ var c = Tn, f = Symbol.for("react.transitional.element"), h = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), y = Symbol.for("react.consumer"), I = Symbol.for("react.context"), P = Symbol.for("react.forward_ref"), k = Symbol.for("react.suspense"), F = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), H = Symbol.for("react.lazy"), Ae = Symbol.for("react.activity"), xe = Symbol.for("react.client.reference"), Ne = c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, vt = Object.prototype.hasOwnProperty, Mn = Array.isArray, ke = console.createTask ? console.createTask : function() {
253
253
  return null;
254
254
  };
255
- d = {
256
- react_stack_bottom_frame: function(S) {
257
- return S();
255
+ c = {
256
+ react_stack_bottom_frame: function(C) {
257
+ return C();
258
258
  }
259
259
  };
260
- var Ct, wt = {}, xt = d.react_stack_bottom_frame.bind(
261
- d,
260
+ var Ct, wt = {}, xt = c.react_stack_bottom_frame.bind(
261
+ c,
262
262
  i
263
- )(), Rt = Ne(o(i)), yt = {};
264
- me.Fragment = v, me.jsx = function(S, j, E) {
265
- var M = 1e4 > Te.recentlyCreatedOwnerStacks++;
266
- return f(
267
- S,
263
+ )(), Rt = ke(o(i)), jt = {};
264
+ pe.Fragment = v, pe.jsx = function(C, j, $) {
265
+ var D = 1e4 > Ne.recentlyCreatedOwnerStacks++;
266
+ return g(
267
+ C,
268
268
  j,
269
- E,
269
+ $,
270
270
  !1,
271
- M ? Error("react-stack-top-frame") : xt,
272
- M ? Ne(o(S)) : Rt
271
+ D ? Error("react-stack-top-frame") : xt,
272
+ D ? ke(o(C)) : Rt
273
273
  );
274
- }, me.jsxs = function(S, j, E) {
275
- var M = 1e4 > Te.recentlyCreatedOwnerStacks++;
276
- return f(
277
- S,
274
+ }, pe.jsxs = function(C, j, $) {
275
+ var D = 1e4 > Ne.recentlyCreatedOwnerStacks++;
276
+ return g(
277
+ C,
278
278
  j,
279
- E,
279
+ $,
280
280
  !0,
281
- M ? Error("react-stack-top-frame") : xt,
282
- M ? Ne(o(S)) : Rt
281
+ D ? Error("react-stack-top-frame") : xt,
282
+ D ? ke(o(C)) : Rt
283
283
  );
284
284
  };
285
- })()), me;
285
+ })()), pe;
286
286
  }
287
287
  var Mt;
288
- function co() {
289
- return Mt || (Mt = 1, process.env.NODE_ENV === "production" ? ye.exports = ao() : ye.exports = uo()), ye.exports;
288
+ function go() {
289
+ return Mt || (Mt = 1, process.env.NODE_ENV === "production" ? ye.exports = uo() : ye.exports = co()), ye.exports;
290
290
  }
291
- var l = co();
292
- const V = {
291
+ var l = go();
292
+ const A = {
293
293
  UK: {
294
294
  svgFlag: "https://flagcdn.com/gb.svg",
295
295
  emojiFlag: "🇬🇧"
@@ -354,76 +354,76 @@ const V = {
354
354
  svgFlag: "https://flagcdn.com/kh.svg",
355
355
  emojiFlag: "🇰🇭"
356
356
  }
357
- }, go = ({ flag: e }) => /* @__PURE__ */ l.jsx(ie, { shadow: "xs", w: 20, h: 14, children: /* @__PURE__ */ l.jsx(Tn, { src: e.svgFlag, w: 20, h: 14, fit: "cover" }) }), fo = ({ flag: e }) => /* @__PURE__ */ l.jsx(
358
- P,
357
+ }, fo = ({ flag: e }) => /* @__PURE__ */ l.jsx(ie, { shadow: "xs", w: 20, h: 14, children: /* @__PURE__ */ l.jsx(An, { src: e.svgFlag, w: 20, h: 14, fit: "cover" }) }), mo = ({ flag: e }) => /* @__PURE__ */ l.jsx(
358
+ E,
359
359
  {
360
360
  component: "span",
361
361
  style: (n) => ({ textShadow: n.shadows.xs }),
362
362
  children: e.emojiFlag
363
363
  }
364
- ), Qe = navigator.userAgent.includes("Windows") ? go : fo, re = be(new Intl.Locale("en-US")), hi = oe(
364
+ ), Qe = navigator.userAgent.includes("Windows") ? fo : mo, re = De(new Intl.Locale("en-US")), xi = oe(
365
365
  ({
366
366
  value: e,
367
367
  children: n
368
368
  }) => /* @__PURE__ */ l.jsx(re.Provider, { value: e.locale, children: n })
369
- ), mo = {
369
+ ), po = {
370
370
  lang2value: {
371
371
  en: "Choose Language",
372
372
  vi: "Chọn ngôn ngữ"
373
373
  }
374
- }, je = {
374
+ }, _e = {
375
375
  en: {
376
376
  name: "English",
377
- flag: V.US,
377
+ flag: A.US,
378
378
  locale: new Intl.Locale("en-US")
379
379
  },
380
380
  vi: {
381
381
  name: "Tiếng Việt",
382
- flag: V.VN,
382
+ flag: A.VN,
383
383
  locale: new Intl.Locale("vi-VN")
384
384
  }
385
- }, Si = ({
385
+ }, Ri = ({
386
386
  locale: e,
387
387
  setLocale: n
388
388
  }) => {
389
- const t = _(() => Object.entries(je).map(
389
+ const t = _(() => Object.entries(_e).map(
390
390
  ([o, { flag: r, name: i, locale: s }]) => /* @__PURE__ */ l.jsx(
391
391
  ae.Item,
392
392
  {
393
393
  onClick: () => n(s),
394
394
  leftSection: /* @__PURE__ */ l.jsx(Qe, { flag: r }),
395
395
  rightSection: e.language === o && /* @__PURE__ */ l.jsx(Un, { size: "15", color: "#2986cc", stroke: 2 }),
396
- children: /* @__PURE__ */ l.jsx(P, { size: "sm", children: i })
396
+ children: /* @__PURE__ */ l.jsx(E, { size: "sm", children: i })
397
397
  },
398
398
  o
399
399
  )
400
- ), [je, e]);
400
+ ), [_e, e]);
401
401
  return /* @__PURE__ */ l.jsxs(ae, { width: 170, children: [
402
402
  /* @__PURE__ */ l.jsx(ae.Target, { children: /* @__PURE__ */ l.jsx(
403
- H,
403
+ z,
404
404
  {
405
405
  variant: "subtle",
406
406
  size: "sm",
407
- leftSection: /* @__PURE__ */ l.jsx(Qe, { flag: je[e.language].flag }),
408
- children: /* @__PURE__ */ l.jsx(P, { size: "sm", children: je[e.language].name })
407
+ leftSection: /* @__PURE__ */ l.jsx(Qe, { flag: _e[e.language].flag }),
408
+ children: /* @__PURE__ */ l.jsx(E, { size: "sm", children: _e[e.language].name })
409
409
  }
410
410
  ) }),
411
411
  /* @__PURE__ */ l.jsxs(ae.Dropdown, { children: [
412
- /* @__PURE__ */ l.jsx(ae.Label, { children: /* @__PURE__ */ l.jsx(P, { size: "sm", children: mo.lang2value[e.language] }) }),
412
+ /* @__PURE__ */ l.jsx(ae.Label, { children: /* @__PURE__ */ l.jsx(E, { size: "sm", children: po.lang2value[e.language] }) }),
413
413
  t
414
414
  ] })
415
415
  ] });
416
- }, T = ({ value: e }) => {
417
- const n = B(re);
416
+ }, b = ({ value: e }) => {
417
+ const n = U(re);
418
418
  return e.lang2value[n.language] || e.lang2value[e.lang];
419
- }, vi = (e) => {
420
- const n = B(re);
419
+ }, ji = (e) => {
420
+ const n = U(re);
421
421
  return e.lang2value[n.language] || e.lang2value[e.lang];
422
422
  };
423
- function he(e, n) {
423
+ function Se(e, n) {
424
424
  return n.lang2value[e.language] || n.lang2value[n.lang];
425
425
  }
426
- const Ci = ({
426
+ const yi = ({
427
427
  message: e,
428
428
  navigate: n
429
429
  }) => /* @__PURE__ */ l.jsx(
@@ -443,14 +443,14 @@ const Ci = ({
443
443
  title: "Not Found",
444
444
  variant: "404 - Not Found",
445
445
  icon: /* @__PURE__ */ l.jsx(at, { size: 12, stroke: 1.5 }),
446
- children: /* @__PURE__ */ l.jsxs(W, { align: "flex-start", children: [
446
+ children: /* @__PURE__ */ l.jsxs(Y, { align: "flex-start", children: [
447
447
  e || "Sorry, the page you are looking for does not exist.",
448
- /* @__PURE__ */ l.jsx(H, { variant: "filled", onClick: () => n("/"), size: "xs", children: "Back Home" })
448
+ /* @__PURE__ */ l.jsx(z, { variant: "filled", onClick: () => n("/"), size: "xs", children: "Back Home" })
449
449
  ] })
450
450
  }
451
451
  )
452
452
  }
453
- ), wi = ({ message: e }) => /* @__PURE__ */ l.jsx(
453
+ ), _i = ({ message: e }) => /* @__PURE__ */ l.jsx(
454
454
  lt,
455
455
  {
456
456
  color: "red",
@@ -459,8 +459,8 @@ const Ci = ({
459
459
  icon: /* @__PURE__ */ l.jsx(at, { size: 12, stroke: 1.5 }),
460
460
  children: e || "Sorry, the page you are looking for does not exist."
461
461
  }
462
- ), Qt = ({ message: e }) => /* @__PURE__ */ l.jsx(P, { c: "red", size: "sm", children: e || "Not Found" }), xi = ({ tip: e }) => e === void 0 ? /* @__PURE__ */ l.jsx(q, { justify: "center", align: "center", children: /* @__PURE__ */ l.jsx(Ee, { color: "blue", size: "md" }) }) : /* @__PURE__ */ l.jsxs(
463
- q,
462
+ ), Qt = ({ message: e }) => /* @__PURE__ */ l.jsx(E, { c: "red", size: "sm", children: e || "Not Found" }), Fi = ({ tip: e }) => e === void 0 ? /* @__PURE__ */ l.jsx(B, { justify: "center", align: "center", children: /* @__PURE__ */ l.jsx($e, { color: "blue", size: "md" }) }) : /* @__PURE__ */ l.jsxs(
463
+ B,
464
464
  {
465
465
  gap: "md",
466
466
  direction: "column",
@@ -468,14 +468,14 @@ const Ci = ({
468
468
  align: "center",
469
469
  style: { height: "100%" },
470
470
  children: [
471
- /* @__PURE__ */ l.jsx(Ee, { color: "blue", size: "md" }),
471
+ /* @__PURE__ */ l.jsx($e, { color: "blue", size: "md" }),
472
472
  e
473
473
  ]
474
474
  }
475
- ), Ri = ({ tip: e }) => e === void 0 ? /* @__PURE__ */ l.jsx(Ee, { color: "blue", size: "xs" }) : /* @__PURE__ */ l.jsxs(q, { gap: "md", direction: "column", justify: "center", align: "center", children: [
476
- /* @__PURE__ */ l.jsx(Ee, { color: "blue", size: "xs" }),
475
+ ), Ii = ({ tip: e }) => e === void 0 ? /* @__PURE__ */ l.jsx($e, { color: "blue", size: "xs" }) : /* @__PURE__ */ l.jsxs(B, { gap: "md", direction: "column", justify: "center", align: "center", children: [
476
+ /* @__PURE__ */ l.jsx($e, { color: "blue", size: "xs" }),
477
477
  e
478
- ] }), yi = ({ message: e }) => /* @__PURE__ */ l.jsx(
478
+ ] }), Pi = ({ message: e }) => /* @__PURE__ */ l.jsx(
479
479
  lt,
480
480
  {
481
481
  color: "red",
@@ -485,13 +485,13 @@ const Ci = ({
485
485
  children: e || "Sorry, you are not authorized to access this page."
486
486
  }
487
487
  );
488
- function ji(e, n) {
488
+ function Ei(e, n) {
489
489
  return e.reduce((t, o) => {
490
490
  const r = n(o);
491
491
  return t[r] || (t[r] = []), t[r].push(o), t;
492
492
  }, {});
493
493
  }
494
- function _i(e, n) {
494
+ function $i(e, n) {
495
495
  const t = [];
496
496
  let o;
497
497
  return e.reduce((r, i) => {
@@ -499,14 +499,14 @@ function _i(e, n) {
499
499
  return s === void 0 ? (o === void 0 && (o = t.length, t.push([])), t[o].push(i)) : (r[s] === void 0 && (r[s] = t.length, t.push([])), t[r[s]].push(i)), r;
500
500
  }, {}), t;
501
501
  }
502
- function Fi(e, n) {
502
+ function Mi(e, n) {
503
503
  const t = /* @__PURE__ */ new Set();
504
504
  return e.filter((o) => {
505
505
  const r = n(o);
506
506
  return t.has(r) ? !1 : (t.add(r), !0);
507
507
  });
508
508
  }
509
- class Ii {
509
+ class bi {
510
510
  constructor() {
511
511
  ee(this, "items", []);
512
512
  ee(this, "seen", /* @__PURE__ */ new Set());
@@ -571,19 +571,19 @@ function dt(e, n) {
571
571
  function Ze(e, n, t) {
572
572
  Xt(n) ? n.setValue(e, t) : e[n.updateFuncName](t);
573
573
  }
574
- const ct = be(!1), Pi = ct.Provider;
575
- function Ei(e) {
576
- return B(ct) ? { "data-testid": e } : {};
574
+ const ct = De(!1), Di = ct.Provider;
575
+ function Vi(e) {
576
+ return U(ct) ? { "data-testid": e } : {};
577
577
  }
578
- function $i(e, n) {
578
+ function Ti(e, n) {
579
579
  return n ? { "data-testid": e } : {};
580
580
  }
581
- function Y(e, n = "") {
582
- const t = B(ct), o = _(() => (n !== "" && (n = `_${n}`), e instanceof K ? `${e.allProperties.map((r) => r.name).join(".")}${n}` : `${e.name}${n}`), [e, n]);
581
+ function X(e, n = "") {
582
+ const t = U(ct), o = _(() => (n !== "" && (n = `_${n}`), e instanceof W ? `${e.allProperties.map((r) => r.name).join(".")}${n}` : `${e.name}${n}`), [e, n]);
583
583
  return t ? { "data-testid": o } : {};
584
584
  }
585
585
  var et = /* @__PURE__ */ ((e) => (e[e.Allow = 0] = "Allow", e[e.Denied = 1] = "Denied", e[e.Pending = 2] = "Pending", e))(et || {});
586
- function po(e) {
586
+ function ho(e) {
587
587
  const n = {}, t = {}, o = {}, r = (i, s = []) => {
588
588
  i.forEach((a) => {
589
589
  const u = [...s, a.key];
@@ -592,8 +592,8 @@ function po(e) {
592
592
  };
593
593
  return r(e), { key2item: n, key2fullpath: t, key2route: o };
594
594
  }
595
- function ho(e) {
596
- const n = new vo(), t = (o) => {
595
+ function So(e) {
596
+ const n = new Co(), t = (o) => {
597
597
  o.forEach((r) => {
598
598
  if (r.route !== void 0) {
599
599
  const i = r.route.path.pathDef;
@@ -604,7 +604,7 @@ function ho(e) {
604
604
  };
605
605
  return t(e), n;
606
606
  }
607
- function So(e, n) {
607
+ function vo(e, n) {
608
608
  return e.map((t) => {
609
609
  if (t.route !== void 0)
610
610
  return n(t.route.role) === et.Allow ? t : null;
@@ -615,98 +615,98 @@ function So(e, n) {
615
615
  return t;
616
616
  }).filter((t) => t !== null);
617
617
  }
618
- const Mi = (e) => {
619
- const [n, t] = $(/* @__PURE__ */ new Set()), [o, r] = $(/* @__PURE__ */ new Set()), [i, s] = $(), a = _(() => So(e.items, e.checkPermission), [e.items, e.checkPermission]), u = _(() => ho(e.items), [e.items]), { key2fullpath: c, key2route: f } = _(
620
- () => po(a),
618
+ const Ai = (e) => {
619
+ const [n, t] = M(/* @__PURE__ */ new Set()), [o, r] = M(/* @__PURE__ */ new Set()), [i, s] = M(), a = _(() => vo(e.items, e.checkPermission), [e.items, e.checkPermission]), u = _(() => So(e.items), [e.items]), { key2fullpath: d, key2route: g } = _(
620
+ () => ho(a),
621
621
  [a]
622
622
  );
623
- De(() => {
624
- const p = window.location.pathname, d = u.findMatchingKey(p);
625
- d !== void 0 && (r(new Set(c[d])), s(d));
626
- }, [window.location.pathname, f]);
623
+ Ve(() => {
624
+ const p = window.location.pathname, c = u.findMatchingKey(p);
625
+ c !== void 0 && (r(new Set(d[c])), s(c));
626
+ }, [window.location.pathname, g]);
627
627
  const m = _(() => {
628
- function p(d, g) {
628
+ function p(c, f) {
629
629
  var v;
630
- const h = d.children !== void 0 && d.children.length > 0;
630
+ const h = c.children !== void 0 && c.children.length > 0;
631
631
  return h ? /* @__PURE__ */ l.jsxs(
632
632
  "div",
633
633
  {
634
634
  onMouseEnter: () => {
635
- o.has(d.key) || t((C) => {
636
- const y = new Set(C);
637
- return y.add(d.key), y;
635
+ o.has(c.key) || t((S) => {
636
+ const R = new Set(S);
637
+ return R.add(c.key), R;
638
638
  });
639
639
  },
640
640
  onMouseLeave: () => {
641
- o.has(d.key) || t((C) => {
642
- const y = new Set(C);
643
- return y.delete(d.key), y;
641
+ o.has(c.key) || t((S) => {
642
+ const R = new Set(S);
643
+ return R.delete(c.key), R;
644
644
  });
645
645
  },
646
646
  children: [
647
647
  /* @__PURE__ */ l.jsx(
648
- jt,
648
+ yt,
649
649
  {
650
- active: i === d.key,
651
- label: d.label,
652
- leftSection: d.icon,
650
+ active: i === c.key,
651
+ label: c.label,
652
+ leftSection: c.icon,
653
653
  styles: {
654
654
  label: { fontSize: "md" },
655
655
  root: {
656
656
  borderRadius: "var(--mantine-radius-sm)"
657
657
  }
658
658
  },
659
- ml: g === 0 ? void 0 : g === 1 ? "md" : `calc(var(--mantine-spacing-md) * ${g})`,
659
+ ml: f === 0 ? void 0 : f === 1 ? "md" : `calc(var(--mantine-spacing-md) * ${f})`,
660
660
  w: "unset",
661
661
  rightSection: h ? /* @__PURE__ */ l.jsx(
662
- Kn,
662
+ Yn,
663
663
  {
664
664
  size: 12,
665
665
  stroke: 1.5,
666
666
  className: "mantine-rotate-rtl"
667
667
  }
668
668
  ) : void 0,
669
- opened: n.has(d.key) || o.has(d.key),
670
- onClick: (C) => {
671
- C.preventDefault(), r((y) => {
672
- const w = new Set(y);
673
- return y.has(d.key) ? w.delete(d.key) : w.add(d.key), w;
669
+ opened: n.has(c.key) || o.has(c.key),
670
+ onClick: (S) => {
671
+ S.preventDefault(), r((R) => {
672
+ const y = new Set(R);
673
+ return R.has(c.key) ? y.delete(c.key) : y.add(c.key), y;
674
674
  });
675
675
  }
676
676
  },
677
- d.key
677
+ c.key
678
678
  ),
679
- (o.has(d.key) || n.has(d.key)) && d.children.map((C) => p(C, g + 1))
679
+ (o.has(c.key) || n.has(c.key)) && c.children.map((S) => p(S, f + 1))
680
680
  ]
681
681
  },
682
- `container-${d.key}`
682
+ `container-${c.key}`
683
683
  ) : /* @__PURE__ */ l.jsx(
684
- jt,
684
+ yt,
685
685
  {
686
- active: i === d.key,
687
- href: (v = d.route) == null ? void 0 : v.path.getURL({ queryArgs: d.route.defaultPathArgs }),
688
- label: d.label,
689
- leftSection: d.icon,
686
+ active: i === c.key,
687
+ href: (v = c.route) == null ? void 0 : v.path.getURL(c.route.defaultPathArgs ?? {}),
688
+ label: c.label,
689
+ leftSection: c.icon,
690
690
  styles: {
691
691
  label: { fontSize: "md" },
692
692
  root: {
693
693
  borderRadius: "var(--mantine-radius-sm)"
694
694
  }
695
695
  },
696
- ml: g === 0 ? void 0 : g === 1 ? "md" : `calc(var(--mantine-spacing-md) * ${g})`,
696
+ ml: f === 0 ? void 0 : f === 1 ? "md" : `calc(var(--mantine-spacing-md) * ${f})`,
697
697
  w: "unset",
698
- onClick: (C) => {
699
- C.ctrlKey || C.metaKey || (C.preventDefault(), d.route != null && d.route.path.path({ queryArgs: d.route.defaultPathArgs }).open(e.navigate));
698
+ onClick: (S) => {
699
+ S.ctrlKey || S.metaKey || (S.preventDefault(), c.route != null && c.route.path.path(c.route.defaultPathArgs ?? {}).open(e.navigate));
700
700
  }
701
701
  },
702
- d.key
702
+ c.key
703
703
  );
704
704
  }
705
- return a.map((d) => p(d, 0));
705
+ return a.map((c) => p(c, 0));
706
706
  }, [a, i, o, n, e.navigate]);
707
707
  return /* @__PURE__ */ l.jsx(l.Fragment, { children: m });
708
708
  };
709
- class vo extends Zt {
709
+ class Co extends Zt {
710
710
  constructor() {
711
711
  super(...arguments);
712
712
  ee(this, "pathToKey", /* @__PURE__ */ new Map());
@@ -742,7 +742,7 @@ class vo extends Zt {
742
742
  return this.pathToKey.get(r.match);
743
743
  }
744
744
  }
745
- const ze = 12, en = be({ gap: "sm" }), tn = ({
745
+ const ze = 12, en = De({ gap: "sm" }), tn = ({
746
746
  children: e,
747
747
  gap: n = "sm",
748
748
  align: t = "flex-start",
@@ -769,17 +769,17 @@ const ze = 12, en = be({ gap: "sm" }), tn = ({
769
769
  className: o,
770
770
  style: r
771
771
  }) => {
772
- const { gap: i } = B(en);
772
+ const { gap: i } = U(en);
773
773
  let s = {
774
774
  minWidth: 0,
775
775
  ...r
776
776
  };
777
777
  if (n !== void 0) {
778
- const a = n / ze * 100, u = `var(--mantine-spacing-${i})`, c = (ze - n) / ze, f = `calc(${a}% - ${c} * ${u})`;
778
+ const a = n / ze * 100, u = `var(--mantine-spacing-${i})`, d = (ze - n) / ze, g = `calc(${a}% - ${d} * ${u})`;
779
779
  s = {
780
780
  ...s,
781
- flex: `0 0 ${f}`,
782
- maxWidth: f
781
+ flex: `0 0 ${g}`,
782
+ maxWidth: g
783
783
  };
784
784
  } else
785
785
  s = {
@@ -787,8 +787,66 @@ const ze = 12, en = be({ gap: "sm" }), tn = ({
787
787
  flex: `${t ?? 1} 1 0px`
788
788
  };
789
789
  return /* @__PURE__ */ l.jsx("div", { className: o, style: s, children: e });
790
- }, _e = ({ value: e }) => /* @__PURE__ */ l.jsx(P, { size: "sm", children: e });
791
- function Ce(e, n) {
790
+ }, wo = {
791
+ lang: "en",
792
+ lang2value: {
793
+ en: "Confirm",
794
+ vi: "Xác nhận"
795
+ }
796
+ }, xo = {
797
+ lang: "en",
798
+ lang2value: {
799
+ en: "Cancel",
800
+ vi: "Hủy"
801
+ }
802
+ }, Ro = ({
803
+ children: e,
804
+ title: n,
805
+ onConfirm: t,
806
+ onCancel: o,
807
+ confirmLabel: r = wo,
808
+ cancelLabel: i = xo,
809
+ confirmProps: s,
810
+ cancelProps: a,
811
+ popoverProps: u,
812
+ disabled: d = !1
813
+ }) => {
814
+ const [g, m] = M(!1), p = () => {
815
+ m(!1), t();
816
+ }, c = () => {
817
+ m(!1), o == null || o();
818
+ };
819
+ return /* @__PURE__ */ l.jsxs(
820
+ de,
821
+ {
822
+ opened: g,
823
+ onClose: () => m(!1),
824
+ position: "bottom",
825
+ withArrow: !0,
826
+ shadow: "md",
827
+ ...u,
828
+ children: [
829
+ /* @__PURE__ */ l.jsx(de.Target, { children: /* @__PURE__ */ l.jsx(
830
+ "span",
831
+ {
832
+ onClick: (f) => {
833
+ d || (f.stopPropagation(), m(!0));
834
+ },
835
+ children: e
836
+ }
837
+ ) }),
838
+ /* @__PURE__ */ l.jsx(de.Dropdown, { children: /* @__PURE__ */ l.jsxs(Y, { gap: "xs", children: [
839
+ typeof n == "string" ? /* @__PURE__ */ l.jsx(E, { size: "sm", children: n }) : n,
840
+ /* @__PURE__ */ l.jsxs(O, { gap: "xs", justify: "flex-end", children: [
841
+ /* @__PURE__ */ l.jsx(z, { size: "xs", variant: "default", onClick: c, ...a, children: /* @__PURE__ */ l.jsx(b, { value: i }) }),
842
+ /* @__PURE__ */ l.jsx(z, { size: "xs", onClick: p, ...s, children: /* @__PURE__ */ l.jsx(b, { value: r }) })
843
+ ] })
844
+ ] }) })
845
+ ]
846
+ }
847
+ );
848
+ }, Fe = ({ value: e }) => /* @__PURE__ */ l.jsx(E, { size: "sm", children: e });
849
+ function we(e, n) {
792
850
  return n.toLocaleDateString(e.baseName, {
793
851
  year: "numeric",
794
852
  month: "short",
@@ -797,24 +855,24 @@ function Ce(e, n) {
797
855
  }
798
856
  function on(e, n, t = !0) {
799
857
  const o = n.getHours().toString().padStart(2, "0"), r = n.getMinutes().toString().padStart(2, "0"), i = n.getSeconds().toString().padStart(2, "0");
800
- return t ? Ce(e, n) + ` ${o}:${r}:${i}` : Ce(e, n) + ` ${o}:${r}`;
858
+ return t ? we(e, n) + ` ${o}:${r}:${i}` : we(e, n) + ` ${o}:${r}`;
801
859
  }
802
- const Co = ({ value: e }) => {
803
- const n = B(re), t = _(
860
+ const jo = ({ value: e }) => {
861
+ const n = U(re), t = _(
804
862
  () => on(n, e),
805
863
  [n, e]
806
864
  );
807
- return /* @__PURE__ */ l.jsx(P, { size: "sm", children: t });
808
- }, wo = ({ value: e }) => {
809
- const n = B(re), t = _(() => Ce(n, e), [n, e]);
810
- return /* @__PURE__ */ l.jsx(P, { size: "sm", children: t });
811
- }, bi = ({ value: e }) => {
812
- const n = B(re), [t, o] = _(() => {
813
- const r = Ce(n, e), i = e.getHours().toString().padStart(2, "0"), s = e.getMinutes().toString().padStart(2, "0"), a = e.getSeconds().toString().padStart(2, "0");
865
+ return /* @__PURE__ */ l.jsx(E, { size: "sm", children: t });
866
+ }, yo = ({ value: e }) => {
867
+ const n = U(re), t = _(() => we(n, e), [n, e]);
868
+ return /* @__PURE__ */ l.jsx(E, { size: "sm", children: t });
869
+ }, Ni = ({ value: e }) => {
870
+ const n = U(re), [t, o] = _(() => {
871
+ const r = we(n, e), i = e.getHours().toString().padStart(2, "0"), s = e.getMinutes().toString().padStart(2, "0"), a = e.getSeconds().toString().padStart(2, "0");
814
872
  return [r, `${i}:${s}:${a}`];
815
873
  }, [n, e]);
816
- return /* @__PURE__ */ l.jsx(P, { size: "sm", title: o, children: t });
817
- }, xo = {
874
+ return /* @__PURE__ */ l.jsx(E, { size: "sm", title: o, children: t });
875
+ }, _o = {
818
876
  yes: {
819
877
  lang2value: {
820
878
  en: "Yes",
@@ -829,28 +887,27 @@ const Co = ({ value: e }) => {
829
887
  },
830
888
  lang: "en"
831
889
  }
832
- }, Ro = ({ value: e }) => /* @__PURE__ */ l.jsx(
833
- de,
890
+ }, Fo = ({ value: e }) => /* @__PURE__ */ l.jsx(
891
+ ce,
834
892
  {
835
893
  checked: e,
836
- label: /* @__PURE__ */ l.jsx(T, { value: xo[e ? "yes" : "no"] }),
894
+ label: /* @__PURE__ */ l.jsx(b, { value: _o[e ? "yes" : "no"] }),
837
895
  readOnly: !0
838
896
  }
839
- ), yo = ({ property: e, value: n }) => {
840
- const t = e;
841
- if (se(t) || t.enumType === void 0)
897
+ ), Io = ({ property: e, value: n }) => {
898
+ if (se(e) || e.enumType === void 0)
842
899
  throw new Error(
843
900
  "Invalid usage of EnumDisplay. Expect a property of type enum"
844
901
  );
845
- return /* @__PURE__ */ l.jsx(P, { size: "sm", children: /* @__PURE__ */ l.jsx(T, { value: t.enumType.label[n] }) });
846
- }, gt = be({ link: () => null, entityRoutes: {} }), Di = ({
847
- link: e,
902
+ return /* @__PURE__ */ l.jsx(E, { size: "sm", children: /* @__PURE__ */ l.jsx(b, { value: e.enumType.label[n] }) });
903
+ }, gt = De({ EntityLink: () => null, entityRoutes: {} }), ki = ({
904
+ EntityLink: e,
848
905
  entityRoutes: n,
849
906
  children: t
850
- }) => /* @__PURE__ */ l.jsx(gt.Provider, { value: { link: e, entityRoutes: n }, children: t });
907
+ }) => /* @__PURE__ */ l.jsx(gt.Provider, { value: { EntityLink: e, entityRoutes: n }, children: t });
851
908
  function rn(e, n, t, o) {
852
909
  const r = e.getByName(n.targetClass), i = o[n.targetClass];
853
- De(() => {
910
+ Ve(() => {
854
911
  r.fetchByIds(t);
855
912
  }, [t]);
856
913
  const s = {};
@@ -864,19 +921,18 @@ const ft = oe(
864
921
  property: n,
865
922
  value: t
866
923
  }) => {
867
- const { link: o, entityRoutes: r } = B(gt), i = _(() => [t], [t]), [s, a] = rn(
924
+ const { EntityLink: o, entityRoutes: r } = U(gt), i = _(() => [t], [t]), [s, a] = rn(
868
925
  e,
869
926
  n,
870
927
  i,
871
928
  r
872
929
  ), u = s[t];
873
- return u === void 0 ? /* @__PURE__ */ l.jsx(P, { size: "sm", children: t }) : u === null ? /* @__PURE__ */ l.jsx(Qt, {}) : a === void 0 ? /* @__PURE__ */ l.jsx(P, { size: "sm", children: u.name }) : /* @__PURE__ */ l.jsx(
930
+ return u === void 0 ? /* @__PURE__ */ l.jsx(E, { size: "sm", children: t }) : u === null ? /* @__PURE__ */ l.jsx(Qt, {}) : a === void 0 ? /* @__PURE__ */ l.jsx(E, { size: "sm", children: u.name }) : /* @__PURE__ */ l.jsx(
874
931
  o,
875
932
  {
876
933
  path: a,
877
934
  openInNewPage: !1,
878
- urlArgs: { id: u.id },
879
- queryArgs: {},
935
+ args: { id: u.id },
880
936
  children: u.name
881
937
  }
882
938
  );
@@ -887,45 +943,44 @@ const ft = oe(
887
943
  property: n,
888
944
  value: t
889
945
  }) => {
890
- const { link: o, entityRoutes: r } = B(gt), [i, s] = rn(
946
+ const { EntityLink: o, entityRoutes: r } = U(gt), [i, s] = rn(
891
947
  e,
892
948
  n,
893
949
  t,
894
950
  r
895
951
  );
896
- return /* @__PURE__ */ l.jsx(L, { gap: "xs", children: t.map((a, u) => {
897
- const c = i[a];
898
- return c === void 0 ? /* @__PURE__ */ l.jsx(P, { size: "sm", children: t }, a) : c === null ? /* @__PURE__ */ l.jsx(Qt, {}, a) : s === void 0 ? /* @__PURE__ */ l.jsx(P, { size: "sm", children: c.name }, u) : /* @__PURE__ */ l.jsx(
952
+ return /* @__PURE__ */ l.jsx(O, { gap: "xs", children: t.map((a, u) => {
953
+ const d = i[a];
954
+ return d === void 0 ? /* @__PURE__ */ l.jsx(E, { size: "sm", children: t }, a) : d === null ? /* @__PURE__ */ l.jsx(Qt, {}, a) : s === void 0 ? /* @__PURE__ */ l.jsx(E, { size: "sm", children: d.name }, u) : /* @__PURE__ */ l.jsx(
899
955
  o,
900
956
  {
901
957
  path: s,
902
958
  openInNewPage: !1,
903
- urlArgs: { id: c.id },
904
- queryArgs: {},
905
- children: c.name
959
+ args: { id: d.id },
960
+ children: d.name
906
961
  },
907
962
  u
908
963
  );
909
964
  }) });
910
965
  }
911
- ), ce = {
912
- string: _e,
913
- integer: _e,
914
- float: _e,
915
- boolean: Ro,
916
- "string[]": _e,
917
- enum: yo,
918
- datetime: Co,
919
- date: wo
966
+ ), ge = {
967
+ string: Fe,
968
+ integer: Fe,
969
+ float: Fe,
970
+ boolean: Fo,
971
+ "string[]": Fe,
972
+ enum: Io,
973
+ datetime: jo,
974
+ date: yo
920
975
  }, sn = ({
921
976
  property: e,
922
977
  value: n,
923
978
  onChange: t,
924
979
  freeze: o = !1
925
980
  }) => {
926
- const r = Y(e);
981
+ const r = X(e);
927
982
  return /* @__PURE__ */ l.jsx(
928
- de,
983
+ ce,
929
984
  {
930
985
  ...r,
931
986
  id: e.name,
@@ -937,15 +992,15 @@ const ft = oe(
937
992
  disabled: o
938
993
  }
939
994
  );
940
- }, Me = ({
995
+ }, be = ({
941
996
  property: e,
942
997
  value: n,
943
998
  onChange: t,
944
999
  freeze: o = !1
945
1000
  }) => {
946
- const r = Y(e);
1001
+ const r = X(e);
947
1002
  return /* @__PURE__ */ l.jsx(
948
- X,
1003
+ J,
949
1004
  {
950
1005
  ...r,
951
1006
  id: e.name,
@@ -958,13 +1013,13 @@ const ft = oe(
958
1013
  disabled: o
959
1014
  }
960
1015
  );
961
- }, jo = {
1016
+ }, Po = {
962
1017
  lang2value: {
963
1018
  en: "The leading zero is not necessary in international phone number format. For example, if your phone number is 0123456789, you should enter it as 123-456-789.",
964
1019
  vi: "Số 0 đầu tiên không cần thiết trong định dạng điện thoại quốc tế. Ví dụ, nếu số điện thoại của bạn là 0123456789, bạn nên nhập nó là 123-456-789."
965
1020
  },
966
1021
  lang: "en"
967
- }, _o = {
1022
+ }, Eo = {
968
1023
  lang2value: {
969
1024
  en: "No valid country code found.",
970
1025
  vi: "Không tìm thấy mã quốc gia hợp lệ. "
@@ -973,65 +1028,65 @@ const ft = oe(
973
1028
  }, ue = {
974
1029
  84: {
975
1030
  name: "Vietnam",
976
- flags: [V.VN]
1031
+ flags: [A.VN]
977
1032
  },
978
1033
  1: {
979
1034
  name: "US, Canada",
980
- flags: [V.US, V.CA]
1035
+ flags: [A.US, A.CA]
981
1036
  },
982
1037
  61: {
983
1038
  name: "Australia",
984
- flags: [V.AU]
1039
+ flags: [A.AU]
985
1040
  },
986
1041
  81: {
987
1042
  name: "Japan",
988
- flags: [V.JP]
1043
+ flags: [A.JP]
989
1044
  },
990
1045
  44: {
991
1046
  name: "UK",
992
- flags: [V.UK]
1047
+ flags: [A.UK]
993
1048
  },
994
1049
  33: {
995
1050
  name: "France",
996
- flags: [V.FR]
1051
+ flags: [A.FR]
997
1052
  },
998
1053
  49: {
999
1054
  name: "Germany",
1000
- flags: [V.DE]
1055
+ flags: [A.DE]
1001
1056
  },
1002
1057
  91: {
1003
1058
  name: "India",
1004
- flags: [V.IN]
1059
+ flags: [A.IN]
1005
1060
  },
1006
1061
  55: {
1007
1062
  name: "Brazil",
1008
- flags: [V.BR]
1063
+ flags: [A.BR]
1009
1064
  },
1010
1065
  34: {
1011
1066
  name: "Spain",
1012
- flags: [V.ES]
1067
+ flags: [A.ES]
1013
1068
  },
1014
1069
  39: {
1015
1070
  name: "Italy",
1016
- flags: [V.IT]
1071
+ flags: [A.IT]
1017
1072
  },
1018
1073
  64: {
1019
1074
  name: "New Zealand",
1020
- flags: [V.NZ]
1075
+ flags: [A.NZ]
1021
1076
  },
1022
1077
  52: {
1023
1078
  name: "Mexico",
1024
- flags: [V.MX]
1079
+ flags: [A.MX]
1025
1080
  },
1026
1081
  86: {
1027
1082
  name: "China",
1028
- flags: [V.CN]
1083
+ flags: [A.CN]
1029
1084
  },
1030
1085
  855: {
1031
1086
  name: "Cambodia",
1032
- flags: [V.CAM]
1087
+ flags: [A.CAM]
1033
1088
  }
1034
- }, Fo = (e, n) => {
1089
+ }, $o = (e, n) => {
1035
1090
  if (e === "" || e === void 0)
1036
1091
  return { match: "84", remaining: "" };
1037
1092
  const t = e.replace(/[^\d]/g, ""), o = n.findLongestPrefix(t);
@@ -1041,14 +1096,14 @@ const ft = oe(
1041
1096
  }, Dt = ({ value: e }) => {
1042
1097
  const n = ue[e];
1043
1098
  if (n !== void 0)
1044
- return /* @__PURE__ */ l.jsxs(L, { gap: "xs", wrap: "nowrap", align: "center", children: [
1045
- /* @__PURE__ */ l.jsxs(P, { size: "sm", children: [
1099
+ return /* @__PURE__ */ l.jsxs(O, { gap: "xs", wrap: "nowrap", align: "center", children: [
1100
+ /* @__PURE__ */ l.jsxs(E, { size: "sm", children: [
1046
1101
  "+",
1047
1102
  e
1048
1103
  ] }),
1049
- /* @__PURE__ */ l.jsx(L, { gap: "xs", wrap: "nowrap", children: n.flags.map((t, o) => /* @__PURE__ */ l.jsx(Qe, { flag: t }, o)) })
1104
+ /* @__PURE__ */ l.jsx(O, { gap: "xs", wrap: "nowrap", children: n.flags.map((t, o) => /* @__PURE__ */ l.jsx(Qe, { flag: t }, o)) })
1050
1105
  ] });
1051
- }, Io = ({
1106
+ }, Mo = ({
1052
1107
  value: e,
1053
1108
  onChange: n,
1054
1109
  error: t,
@@ -1058,112 +1113,112 @@ const ft = oe(
1058
1113
  }) => {
1059
1114
  let s = {}, a = {};
1060
1115
  i !== void 0 && (s = { "data-testid": `${i}_country_code` }, a = { "data-testid": i });
1061
- const [u, c] = $(""), [f, m] = $(!1), [p, d] = $(""), [g, h] = $(!1), v = _(() => {
1062
- const I = new Zt();
1063
- return Object.keys(ue).forEach((D) => {
1064
- I.insert(D);
1065
- }), I;
1066
- }, [ue]), { rawInput: C } = _(() => {
1116
+ const [u, d] = M(""), [g, m] = M(!1), [p, c] = M(""), [f, h] = M(!1), v = _(() => {
1117
+ const F = new Zt();
1118
+ return Object.keys(ue).forEach((T) => {
1119
+ F.insert(T);
1120
+ }), F;
1121
+ }, [ue]), { rawInput: S } = _(() => {
1067
1122
  try {
1068
- const { match: I, remaining: D } = Fo(
1123
+ const { match: F, remaining: T } = $o(
1069
1124
  e,
1070
1125
  v
1071
1126
  );
1072
- return d(I), h(!1), {
1073
- rawInput: D
1127
+ return c(F), h(!1), {
1128
+ rawInput: T
1074
1129
  };
1075
1130
  } catch {
1076
- return h(!0), d(""), {
1131
+ return h(!0), c(""), {
1077
1132
  rawInput: e
1078
1133
  };
1079
1134
  }
1080
- }, [e]), y = qt({
1135
+ }, [e]), R = qt({
1081
1136
  onDropdownClose: () => {
1082
- y.resetSelectedOption(), c("");
1137
+ R.resetSelectedOption(), d("");
1083
1138
  },
1084
1139
  onDropdownOpen: () => {
1085
- y.updateSelectedOptionIndex("active");
1140
+ R.updateSelectedOptionIndex("active");
1086
1141
  }
1087
- }), w = _(() => Object.keys(ue), [ue]), F = (I, D) => {
1088
- if (I === void 0)
1089
- return `+${D}`;
1090
- const z = I.replace(/[^\d]/g, "");
1091
- return z.length === 0 ? `+${D}` : z.startsWith("0") ? (m(!0), `+${D}${z}`) : (m(!1), `+${D}${z}`);
1092
- }, N = _(() => w.filter((I) => ue[I].name.toLowerCase().includes(u.toLowerCase()) || I.includes(u)), [u, w]), Z = _(() => N.map((I, D) => /* @__PURE__ */ l.jsx(O.Option, { value: I, children: /* @__PURE__ */ l.jsx(Dt, { value: I }) }, D)), [N]);
1142
+ }), y = _(() => Object.keys(ue), [ue]), I = (F, T) => {
1143
+ if (F === void 0)
1144
+ return `+${T}`;
1145
+ const H = F.replace(/[^\d]/g, "");
1146
+ return H.length === 0 ? `+${T}` : H.startsWith("0") ? (m(!0), `+${T}${H}`) : (m(!1), `+${T}${H}`);
1147
+ }, P = _(() => y.filter((F) => ue[F].name.toLowerCase().includes(u.toLowerCase()) || F.includes(u)), [u, y]), k = _(() => P.map((F, T) => /* @__PURE__ */ l.jsx(G.Option, { value: F, children: /* @__PURE__ */ l.jsx(Dt, { value: F }) }, T)), [P]);
1093
1148
  return /* @__PURE__ */ l.jsxs("div", { children: [
1094
- /* @__PURE__ */ l.jsx(A, { gutter: "xs", children: /* @__PURE__ */ l.jsx(A.Col, { children: /* @__PURE__ */ l.jsxs(L, { gap: 5, children: [
1149
+ /* @__PURE__ */ l.jsx(N, { gutter: "xs", children: /* @__PURE__ */ l.jsx(N.Col, { children: /* @__PURE__ */ l.jsxs(O, { gap: 5, children: [
1095
1150
  /* @__PURE__ */ l.jsxs(
1096
- O,
1151
+ G,
1097
1152
  {
1098
- store: y,
1153
+ store: R,
1099
1154
  position: "top-start",
1100
- onOptionSubmit: (I) => {
1101
- c(""), y.closeDropdown(), n({
1102
- target: { value: F(C, I) }
1155
+ onOptionSubmit: (F) => {
1156
+ d(""), R.closeDropdown(), n({
1157
+ target: { value: I(S, F) }
1103
1158
  });
1104
1159
  },
1105
1160
  disabled: r,
1106
1161
  children: [
1107
- /* @__PURE__ */ l.jsx(O.Target, { children: /* @__PURE__ */ l.jsx(
1162
+ /* @__PURE__ */ l.jsx(G.Target, { children: /* @__PURE__ */ l.jsx(
1108
1163
  kn,
1109
1164
  {
1110
1165
  ...s,
1111
1166
  component: "button",
1112
1167
  type: "button",
1113
1168
  pointer: !0,
1114
- rightSection: /* @__PURE__ */ l.jsx(O.Chevron, {}),
1115
- onClick: () => y.toggleDropdown(),
1169
+ rightSection: /* @__PURE__ */ l.jsx(G.Chevron, {}),
1170
+ onClick: () => R.toggleDropdown(),
1116
1171
  rightSectionPointerEvents: "none",
1117
1172
  disabled: r,
1118
1173
  children: /* @__PURE__ */ l.jsx(Dt, { value: p })
1119
1174
  }
1120
1175
  ) }),
1121
- /* @__PURE__ */ l.jsxs(O.Dropdown, { children: [
1176
+ /* @__PURE__ */ l.jsxs(G.Dropdown, { children: [
1122
1177
  /* @__PURE__ */ l.jsx(
1123
- O.Search,
1178
+ G.Search,
1124
1179
  {
1125
1180
  leftSection: /* @__PURE__ */ l.jsx(ut, { size: 14, stroke: 1.5 }),
1126
1181
  placeholder: ".....",
1127
1182
  value: u,
1128
- onChange: (I) => {
1129
- c(I.currentTarget.value);
1183
+ onChange: (F) => {
1184
+ d(F.currentTarget.value);
1130
1185
  },
1131
1186
  disabled: r
1132
1187
  }
1133
1188
  ),
1134
- /* @__PURE__ */ l.jsx(O.Options, { children: Z.length > 0 ? Z : /* @__PURE__ */ l.jsx(O.Empty, { children: /* @__PURE__ */ l.jsx(P, { size: "sm", children: "Nothing found" }) }) })
1189
+ /* @__PURE__ */ l.jsx(G.Options, { children: k.length > 0 ? k : /* @__PURE__ */ l.jsx(G.Empty, { children: /* @__PURE__ */ l.jsx(E, { size: "sm", children: "Nothing found" }) }) })
1135
1190
  ] })
1136
1191
  ]
1137
1192
  }
1138
1193
  ),
1139
1194
  p === "" ? /* @__PURE__ */ l.jsx(
1140
- X,
1195
+ J,
1141
1196
  {
1142
1197
  ...a,
1143
1198
  id: o,
1144
- value: C,
1199
+ value: S,
1145
1200
  type: "phone_number",
1146
- onChange: (I) => {
1147
- n({ target: { value: I.target.value } });
1201
+ onChange: (F) => {
1202
+ n({ target: { value: F.target.value } });
1148
1203
  },
1149
1204
  error: t,
1150
1205
  flex: 1,
1151
1206
  disabled: r
1152
1207
  }
1153
1208
  ) : /* @__PURE__ */ l.jsx(
1154
- X,
1209
+ J,
1155
1210
  {
1156
1211
  ...a,
1157
1212
  id: o,
1158
- value: C,
1213
+ value: S,
1159
1214
  type: "phone_number",
1160
- onAccept: (I) => {
1161
- const D = I.replace(/[^\d]/g, ""), z = F(D, p);
1162
- z !== e && n({
1163
- target: { value: z }
1215
+ onAccept: (F) => {
1216
+ const T = F.replace(/[^\d]/g, ""), H = I(T, p);
1217
+ H !== e && n({
1218
+ target: { value: H }
1164
1219
  });
1165
1220
  },
1166
- component: so,
1221
+ component: lo,
1167
1222
  mask: "000-000-0000",
1168
1223
  error: t,
1169
1224
  flex: 1,
@@ -1171,16 +1226,16 @@ const ft = oe(
1171
1226
  }
1172
1227
  )
1173
1228
  ] }) }) }),
1174
- (f || g || t && typeof t == "string") && /* @__PURE__ */ l.jsx(A, { gutter: "xs", children: /* @__PURE__ */ l.jsx(A.Col, { children: /* @__PURE__ */ l.jsx(X.Error, { children: f ? /* @__PURE__ */ l.jsx(T, { value: jo }) : g ? /* @__PURE__ */ l.jsx(T, { value: _o }) : t }) }) })
1229
+ (g || f || t && typeof t == "string") && /* @__PURE__ */ l.jsx(N, { gutter: "xs", children: /* @__PURE__ */ l.jsx(N.Col, { children: /* @__PURE__ */ l.jsx(J.Error, { children: g ? /* @__PURE__ */ l.jsx(b, { value: Po }) : f ? /* @__PURE__ */ l.jsx(b, { value: Eo }) : t }) }) })
1175
1230
  ] });
1176
- }, Se = ({
1231
+ }, ve = ({
1177
1232
  property: e,
1178
1233
  error: n,
1179
1234
  value: t,
1180
1235
  onChange: o,
1181
1236
  freeze: r = !1
1182
1237
  }) => {
1183
- const i = Y(e), [s, a] = _(() => e.constraints.includes("password") ? ["password", Bt] : e.constraints.includes("phone_number") ? ["phone_number", Io] : [e.constraints.includes("email") ? "email" : e.constraints.includes("url") ? "url" : "text", X], [e.constraints]);
1238
+ const i = X(e), [s, a] = _(() => e.constraints.includes("password") ? ["password", Bt] : e.constraints.includes("phone_number") ? ["phone_number", Mo] : [e.constraints.includes("email") ? "email" : e.constraints.includes("url") ? "url" : "text", J], [e.constraints]);
1184
1239
  return /* @__PURE__ */ l.jsx(
1185
1240
  a,
1186
1241
  {
@@ -1193,13 +1248,13 @@ const ft = oe(
1193
1248
  disabled: r
1194
1249
  }
1195
1250
  );
1196
- }, Po = ({
1251
+ }, bo = ({
1197
1252
  property: e,
1198
1253
  value: n,
1199
1254
  onChange: t,
1200
1255
  freeze: o = !1
1201
1256
  }) => {
1202
- const r = Y(e);
1257
+ const r = X(e);
1203
1258
  return /* @__PURE__ */ l.jsx(
1204
1259
  Je,
1205
1260
  {
@@ -1208,7 +1263,7 @@ const ft = oe(
1208
1263
  value: n || null,
1209
1264
  onChange: (i) => {
1210
1265
  t(
1211
- i === null ? void 0 : Q(i).startOf("day").toDate()
1266
+ i === null ? void 0 : Z(i).startOf("day").toDate()
1212
1267
  );
1213
1268
  },
1214
1269
  valueFormat: "YYYY MMM DD",
@@ -1219,28 +1274,28 @@ const ft = oe(
1219
1274
  disabled: o
1220
1275
  }
1221
1276
  );
1222
- }, Eo = ({
1277
+ }, Do = ({
1223
1278
  property: e,
1224
1279
  value: n,
1225
1280
  onChange: t,
1226
1281
  freeze: o = !1
1227
1282
  }) => {
1228
- const r = B(re), i = Y(e);
1283
+ const r = U(re), i = X(e);
1229
1284
  if (se(e) || e.enumType === void 0)
1230
1285
  throw new Error(
1231
1286
  "Invalid usage of EnumInput. Expect a property of type enum"
1232
1287
  );
1233
1288
  const s = e.enumType, [a, u] = _(() => {
1234
- const c = {}, f = Object.entries(s.label).map(
1289
+ const d = {}, g = Object.entries(s.label).map(
1235
1290
  ([m, p]) => {
1236
- const d = isNaN(Number(m)) ? m : Number(m);
1237
- return c[m] = d, {
1291
+ const c = isNaN(Number(m)) ? m : Number(m);
1292
+ return d[m] = c, {
1238
1293
  value: m,
1239
- label: he(r, p)
1294
+ label: Se(r, p)
1240
1295
  };
1241
1296
  }
1242
1297
  );
1243
- return [c, f];
1298
+ return [d, g];
1244
1299
  }, [r, s]);
1245
1300
  return /* @__PURE__ */ l.jsx(
1246
1301
  Ln,
@@ -1248,58 +1303,58 @@ const ft = oe(
1248
1303
  ...i,
1249
1304
  data: u,
1250
1305
  value: n === void 0 ? null : String(n),
1251
- onChange: (c) => {
1252
- if (c === null) {
1306
+ onChange: (d) => {
1307
+ if (d === null) {
1253
1308
  t(void 0);
1254
1309
  return;
1255
1310
  }
1256
- t(a[c]);
1311
+ t(a[d]);
1257
1312
  },
1258
1313
  disabled: o,
1259
1314
  allowDeselect: !e.isRequired
1260
1315
  }
1261
1316
  );
1262
- }, $o = {
1317
+ }, Vo = {
1263
1318
  lang2value: {
1264
1319
  en: "Confirm",
1265
1320
  vi: "Xác Nhận"
1266
1321
  },
1267
1322
  lang: "en"
1268
- }, Mo = new ro(
1323
+ }, To = new io(
1269
1324
  "confirmation.valuesDoNotMatch"
1270
- ), Vi = ({ property: e }) => /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
1271
- /* @__PURE__ */ l.jsx(T, { value: $o }),
1325
+ ), Li = ({ property: e }) => /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
1326
+ /* @__PURE__ */ l.jsx(b, { value: Vo }),
1272
1327
  " ",
1273
- /* @__PURE__ */ l.jsx(T, { value: e.label })
1274
- ] }), Ai = ({
1328
+ /* @__PURE__ */ l.jsx(b, { value: e.label })
1329
+ ] }), Oi = ({
1275
1330
  property: e,
1276
1331
  error: n,
1277
1332
  value: t,
1278
1333
  onChange: o,
1279
1334
  freeze: r = !1
1280
1335
  }) => {
1281
- const i = Y(e, "confirm"), [s, a] = $(""), [u, c] = $(!1), [f, m] = _(() => e.constraints.includes("password") ? ["password", Bt] : ["text", X], [e.constraints]), p = _(() => {
1336
+ const i = X(e, "confirm"), [s, a] = M(""), [u, d] = M(!1), [g, m] = _(() => e.constraints.includes("password") ? ["password", Bt] : ["text", J], [e.constraints]), p = _(() => {
1282
1337
  if (u && s !== t)
1283
- return Mo.t({ args: { name: e.label } });
1284
- }, [u, s, t, e.label]), d = n || p;
1338
+ return To.t({ args: { name: e.label } });
1339
+ }, [u, s, t, e.label]), c = n || p;
1285
1340
  return /* @__PURE__ */ l.jsx(
1286
1341
  m,
1287
1342
  {
1288
1343
  ...i,
1289
1344
  id: `${e.name}-confirm`,
1290
1345
  value: s,
1291
- type: f,
1292
- onChange: (g) => {
1293
- const h = g.target.value;
1294
- a(h), c(!0), o(h);
1346
+ type: g,
1347
+ onChange: (f) => {
1348
+ const h = f.target.value;
1349
+ a(h), d(!0), o(h);
1295
1350
  },
1296
- error: d,
1351
+ error: c,
1297
1352
  disabled: r
1298
1353
  }
1299
1354
  );
1300
1355
  };
1301
- function bo(e, n) {
1302
- const [t, o] = $(""), [r, i] = $([]);
1356
+ function Ao(e, n) {
1357
+ const [t, o] = M(""), [r, i] = M([]);
1303
1358
  return {
1304
1359
  data: r,
1305
1360
  query: t,
@@ -1317,7 +1372,7 @@ function bo(e, n) {
1317
1372
  table: e.getByName(n.targetClass)
1318
1373
  };
1319
1374
  }
1320
- const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", children: e.name }), ln = oe(
1375
+ const No = (e) => e.name, ko = (e) => /* @__PURE__ */ l.jsx(E, { size: "sm", children: e.name }), ln = oe(
1321
1376
  (e) => /* @__PURE__ */ l.jsx("h1", { children: "SingleForeignKey" })
1322
1377
  ), an = oe(
1323
1378
  ({
@@ -1327,40 +1382,40 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1327
1382
  onChange: o,
1328
1383
  freeze: r = !1
1329
1384
  }) => {
1330
- const { table: i, data: s, query: a, setQuery: u } = bo(
1385
+ const { table: i, data: s, query: a, setQuery: u } = Ao(
1331
1386
  e,
1332
1387
  n
1333
1388
  );
1334
- return /* @__PURE__ */ l.jsxs(W, { gap: "sm", children: [
1389
+ return /* @__PURE__ */ l.jsxs(Y, { gap: "sm", children: [
1335
1390
  /* @__PURE__ */ l.jsx(
1336
- Ao,
1391
+ Lo,
1337
1392
  {
1338
1393
  property: n,
1339
1394
  query: a,
1340
1395
  setQuery: u,
1341
1396
  data: s,
1342
- onSelect: (c) => {
1343
- t.includes(c) || o([...t, c]);
1397
+ onSelect: (d) => {
1398
+ t.includes(d) || o([...t, d]);
1344
1399
  },
1345
- renderOption: Do,
1400
+ renderOption: No,
1346
1401
  isIdInteger: n.datatype === "integer",
1347
1402
  freeze: r
1348
1403
  }
1349
1404
  ),
1350
1405
  /* @__PURE__ */ l.jsx(
1351
- To,
1406
+ Oo,
1352
1407
  {
1353
- items: t.map((c) => i.get(c)).filter((c) => c != null),
1354
- onDelete: (c) => {
1355
- o(t.filter((f) => f !== c.id));
1408
+ items: t.map((d) => i.get(d)).filter((d) => d != null),
1409
+ onDelete: (d) => {
1410
+ o(t.filter((g) => g !== d.id));
1356
1411
  },
1357
- render: Vo,
1412
+ render: ko,
1358
1413
  freeze: r
1359
1414
  }
1360
1415
  )
1361
1416
  ] });
1362
1417
  }
1363
- ), Ao = ({
1418
+ ), Lo = ({
1364
1419
  property: e,
1365
1420
  data: n,
1366
1421
  onSelect: t,
@@ -1370,43 +1425,43 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1370
1425
  setQuery: s,
1371
1426
  freeze: a = !1
1372
1427
  }) => {
1373
- const u = Y(e), c = qt({
1374
- onDropdownClose: () => c.resetSelectedOption()
1375
- }), f = _(() => n.map((m) => (
1428
+ const u = X(e), d = qt({
1429
+ onDropdownClose: () => d.resetSelectedOption()
1430
+ }), g = _(() => n.map((m) => (
1376
1431
  // value has to be a string
1377
- /* @__PURE__ */ l.jsx(O.Option, { value: m.id.toString(), children: o(m) }, m.id)
1432
+ /* @__PURE__ */ l.jsx(G.Option, { value: m.id.toString(), children: o(m) }, m.id)
1378
1433
  )), [n]);
1379
1434
  return /* @__PURE__ */ l.jsxs(
1380
- O,
1435
+ G,
1381
1436
  {
1382
- store: c,
1437
+ store: d,
1383
1438
  onOptionSubmit: (m) => {
1384
- t(r ? parseInt(m) : m), s(""), c.closeDropdown();
1439
+ t(r ? parseInt(m) : m), s(""), d.closeDropdown();
1385
1440
  },
1386
1441
  offset: 4,
1387
1442
  shadow: "sm",
1388
1443
  disabled: a,
1389
1444
  children: [
1390
- /* @__PURE__ */ l.jsx(O.Target, { children: /* @__PURE__ */ l.jsx(
1391
- X,
1445
+ /* @__PURE__ */ l.jsx(G.Target, { children: /* @__PURE__ */ l.jsx(
1446
+ J,
1392
1447
  {
1393
1448
  ...u,
1394
1449
  id: e.name,
1395
1450
  pointer: !a,
1396
1451
  rightSection: /* @__PURE__ */ l.jsx(ut, { size: 16, stroke: 1.5 }),
1397
1452
  rightSectionPointerEvents: "none",
1398
- onClick: () => c.toggleDropdown(),
1453
+ onClick: () => d.toggleDropdown(),
1399
1454
  placeholder: "Type to search...",
1400
1455
  value: i,
1401
1456
  onChange: (m) => s(m.currentTarget.value),
1402
1457
  disabled: a
1403
1458
  }
1404
1459
  ) }),
1405
- /* @__PURE__ */ l.jsx(O.Dropdown, { children: /* @__PURE__ */ l.jsx(O.Options, { children: f.length === 0 ? /* @__PURE__ */ l.jsx(O.Empty, { children: "Nothing found" }) : f }) })
1460
+ /* @__PURE__ */ l.jsx(G.Dropdown, { children: /* @__PURE__ */ l.jsx(G.Options, { children: g.length === 0 ? /* @__PURE__ */ l.jsx(G.Empty, { children: "Nothing found" }) : g }) })
1406
1461
  ]
1407
1462
  }
1408
1463
  );
1409
- }, To = ({
1464
+ }, Oo = ({
1410
1465
  items: e,
1411
1466
  onDelete: n,
1412
1467
  render: t,
@@ -1417,7 +1472,7 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1417
1472
  for (let s = 0; s < e.length; s++) {
1418
1473
  const a = e[s];
1419
1474
  i.push(
1420
- /* @__PURE__ */ l.jsxs(L, { justify: "space-between", p: "sm", children: [
1475
+ /* @__PURE__ */ l.jsxs(O, { justify: "space-between", p: "sm", children: [
1421
1476
  t(a),
1422
1477
  !o && /* @__PURE__ */ l.jsx(On, { size: "sm", onClick: () => n(a) })
1423
1478
  ] }, s)
@@ -1427,9 +1482,9 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1427
1482
  }, [e, o]);
1428
1483
  if (r.length !== 0)
1429
1484
  return /* @__PURE__ */ l.jsx(ie, { bd: "1px solid #ddd", children: r });
1430
- }, No = ({ property: e, value: n, onChange: t, freeze: o = !1 }) => {
1431
- const r = Y(e, "start"), i = Y(e, "end");
1432
- return /* @__PURE__ */ l.jsxs(q, { gap: "sm", justify: "space-between", direction: "row", align: "center", children: [
1485
+ }, zo = ({ property: e, value: n, onChange: t, freeze: o = !1 }) => {
1486
+ const r = X(e, "start"), i = X(e, "end");
1487
+ return /* @__PURE__ */ l.jsxs(B, { gap: "sm", justify: "space-between", direction: "row", align: "center", children: [
1433
1488
  /* @__PURE__ */ l.jsx(
1434
1489
  Je,
1435
1490
  {
@@ -1438,7 +1493,7 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1438
1493
  value: (n == null ? void 0 : n.start) || null,
1439
1494
  onChange: (s) => {
1440
1495
  t({
1441
- start: s === null ? void 0 : Q(s).startOf("day").toDate(),
1496
+ start: s === null ? void 0 : Z(s).startOf("day").toDate(),
1442
1497
  end: n == null ? void 0 : n.end
1443
1498
  });
1444
1499
  },
@@ -1448,7 +1503,7 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1448
1503
  disabled: o,
1449
1504
  popoverProps: { withinPortal: !1 },
1450
1505
  flex: 1,
1451
- leftSection: /* @__PURE__ */ l.jsx($e, { size: 16, stroke: 1.5 })
1506
+ leftSection: /* @__PURE__ */ l.jsx(Me, { size: 16, stroke: 1.5 })
1452
1507
  }
1453
1508
  ),
1454
1509
  /* @__PURE__ */ l.jsx("span", { style: { flexGrow: 0 }, children: "–" }),
@@ -1461,7 +1516,7 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1461
1516
  onChange: (s) => {
1462
1517
  t({
1463
1518
  start: n == null ? void 0 : n.start,
1464
- end: s === null ? void 0 : Q(s).startOf("day").toDate()
1519
+ end: s === null ? void 0 : Z(s).startOf("day").toDate()
1465
1520
  });
1466
1521
  },
1467
1522
  valueFormat: "YYYY MMM DD",
@@ -1470,13 +1525,13 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1470
1525
  disabled: o,
1471
1526
  popoverProps: { withinPortal: !1 },
1472
1527
  flex: 1,
1473
- leftSection: /* @__PURE__ */ l.jsx($e, { size: 16, stroke: 1.5 })
1528
+ leftSection: /* @__PURE__ */ l.jsx(Me, { size: 16, stroke: 1.5 })
1474
1529
  }
1475
1530
  )
1476
1531
  ] });
1477
- }, ko = ({ property: e, value: n, onChange: t, freeze: o = !1 }) => {
1478
- const r = Y(e, "start"), i = Y(e, "end");
1479
- return /* @__PURE__ */ l.jsxs(q, { gap: "sm", justify: "space-between", direction: "row", align: "center", children: [
1532
+ }, Go = ({ property: e, value: n, onChange: t, freeze: o = !1 }) => {
1533
+ const r = X(e, "start"), i = X(e, "end");
1534
+ return /* @__PURE__ */ l.jsxs(B, { gap: "sm", justify: "space-between", direction: "row", align: "center", children: [
1480
1535
  /* @__PURE__ */ l.jsx(
1481
1536
  Pt,
1482
1537
  {
@@ -1485,7 +1540,7 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1485
1540
  value: (n == null ? void 0 : n.start) || null,
1486
1541
  onChange: (s) => {
1487
1542
  t({
1488
- start: s === null ? void 0 : Q(s).toDate(),
1543
+ start: s === null ? void 0 : Z(s).toDate(),
1489
1544
  end: n == null ? void 0 : n.end
1490
1545
  });
1491
1546
  },
@@ -1496,7 +1551,7 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1496
1551
  popoverProps: { withinPortal: !1 },
1497
1552
  flex: 1,
1498
1553
  withSeconds: !1,
1499
- leftSection: /* @__PURE__ */ l.jsx($e, { size: 16, stroke: 1.5 })
1554
+ leftSection: /* @__PURE__ */ l.jsx(Me, { size: 16, stroke: 1.5 })
1500
1555
  }
1501
1556
  ),
1502
1557
  /* @__PURE__ */ l.jsx("span", { style: { flexGrow: 0 }, children: "–" }),
@@ -1509,7 +1564,7 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1509
1564
  onChange: (s) => {
1510
1565
  t({
1511
1566
  start: n == null ? void 0 : n.start,
1512
- end: s === null ? void 0 : Q(s).toDate()
1567
+ end: s === null ? void 0 : Z(s).toDate()
1513
1568
  });
1514
1569
  },
1515
1570
  valueFormat: "YYYY MMM DD HH:mm",
@@ -1519,21 +1574,21 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1519
1574
  popoverProps: { withinPortal: !1 },
1520
1575
  flex: 1,
1521
1576
  withSeconds: !1,
1522
- leftSection: /* @__PURE__ */ l.jsx($e, { size: 16, stroke: 1.5 })
1577
+ leftSection: /* @__PURE__ */ l.jsx(Me, { size: 16, stroke: 1.5 })
1523
1578
  }
1524
1579
  )
1525
1580
  ] });
1526
1581
  }, Vt = {
1527
- integer: Me,
1528
- float: Me,
1529
- string: Se,
1582
+ integer: be,
1583
+ float: be,
1584
+ string: ve,
1530
1585
  boolean: sn,
1531
- "string[]": Se,
1532
- enum: Eo,
1533
- date: Po
1534
- }, Lo = "_requiredLabelLeft_l5p83_1", Oo = "_requiredLabelRight_l5p83_11", At = {
1535
- requiredLabelLeft: Lo,
1536
- requiredLabelRight: Oo
1586
+ "string[]": ve,
1587
+ enum: Do,
1588
+ date: bo
1589
+ }, Ho = "_requiredLabelLeft_l5p83_1", qo = "_requiredLabelRight_l5p83_11", Tt = {
1590
+ requiredLabelLeft: Ho,
1591
+ requiredLabelRight: qo
1537
1592
  }, un = ({
1538
1593
  label: e,
1539
1594
  name: n,
@@ -1542,9 +1597,9 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1542
1597
  style: r,
1543
1598
  align: i = "left"
1544
1599
  }) => {
1545
- const s = t ? i === "left" ? At.requiredLabelRight : At.requiredLabelLeft : "";
1546
- return /* @__PURE__ */ l.jsx(q, { align: "center", h: 36, children: /* @__PURE__ */ l.jsx("label", { htmlFor: n, style: r, children: /* @__PURE__ */ l.jsxs(L, { gap: 4, children: [
1547
- /* @__PURE__ */ l.jsx(P, { size: "sm", className: s, children: e }),
1600
+ const s = t ? i === "left" ? Tt.requiredLabelRight : Tt.requiredLabelLeft : "";
1601
+ return /* @__PURE__ */ l.jsx(B, { align: "center", h: 36, children: /* @__PURE__ */ l.jsx("label", { htmlFor: n, style: r, children: /* @__PURE__ */ l.jsxs(O, { gap: 4, children: [
1602
+ /* @__PURE__ */ l.jsx(E, { size: "sm", className: s, children: e }),
1548
1603
  o !== void 0 && /* @__PURE__ */ l.jsx(Ut, { label: o, withArrow: !0, children: /* @__PURE__ */ l.jsx(
1549
1604
  Wt,
1550
1605
  {
@@ -1557,7 +1612,7 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1557
1612
  }, dn = {
1558
1613
  type: "vertical",
1559
1614
  helpAlwaysVisible: !1
1560
- }, zo = oe(
1615
+ }, Bo = oe(
1561
1616
  ({
1562
1617
  store: e,
1563
1618
  record: n,
@@ -1569,21 +1624,21 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1569
1624
  onChange: a,
1570
1625
  visible: u
1571
1626
  }) => {
1572
- const [c, f] = $(void 0);
1627
+ const [d, g] = M(void 0);
1573
1628
  if (u !== void 0 && !u(n))
1574
1629
  return /* @__PURE__ */ l.jsx("div", {});
1575
1630
  const m = dt(n, t);
1576
1631
  return a === void 0 && (a = (p) => {
1577
- var g;
1632
+ var f;
1578
1633
  if (Jt(n))
1579
1634
  Ze(n, t, p);
1580
1635
  else {
1581
1636
  const h = n.toDraft();
1582
1637
  Ze(h, t, p), e.setDraft(h);
1583
1638
  }
1584
- const d = t.validator(p);
1585
- d.isValid ? f(void 0) : f(
1586
- (g = d.errorMessage) == null ? void 0 : g.t({ args: { name: t.label } })
1639
+ const c = t.validator(p);
1640
+ c.isValid ? g(void 0) : g(
1641
+ (f = c.errorMessage) == null ? void 0 : f.t({ args: { name: t.label } })
1587
1642
  );
1588
1643
  }), /* @__PURE__ */ l.jsx(
1589
1644
  cn,
@@ -1594,7 +1649,7 @@ const Do = (e) => e.name, Vo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1594
1649
  InputComponent: r,
1595
1650
  freeze: i,
1596
1651
  value: m,
1597
- error: c,
1652
+ error: d,
1598
1653
  label: s,
1599
1654
  onChange: a
1600
1655
  }
@@ -1612,10 +1667,10 @@ function cn({
1612
1667
  label: a,
1613
1668
  onChange: u
1614
1669
  }) {
1615
- return Go(n) ? /* @__PURE__ */ l.jsxs(W, { gap: 5, children: [
1616
- /* @__PURE__ */ l.jsxs(A, { gutter: "sm", children: [
1670
+ return Uo(n) ? /* @__PURE__ */ l.jsxs(Y, { gap: 5, children: [
1671
+ /* @__PURE__ */ l.jsxs(N, { gutter: "sm", children: [
1617
1672
  /* @__PURE__ */ l.jsx(
1618
- A.Col,
1673
+ N.Col,
1619
1674
  {
1620
1675
  span: n.labelCol,
1621
1676
  style: {
@@ -1625,16 +1680,16 @@ function cn({
1625
1680
  children: /* @__PURE__ */ l.jsx(
1626
1681
  un,
1627
1682
  {
1628
- label: /* @__PURE__ */ l.jsx(T, { value: t.label }),
1683
+ label: /* @__PURE__ */ l.jsx(b, { value: t.label }),
1629
1684
  name: t.name,
1630
1685
  required: t.isRequired,
1631
- tooltip: t.description !== void 0 ? /* @__PURE__ */ l.jsx(T, { value: t.description }) : void 0,
1686
+ tooltip: t.description !== void 0 ? /* @__PURE__ */ l.jsx(b, { value: t.description }) : void 0,
1632
1687
  align: n.align
1633
1688
  }
1634
1689
  )
1635
1690
  }
1636
1691
  ),
1637
- /* @__PURE__ */ l.jsx(A.Col, { span: n.itemCol, children: /* @__PURE__ */ l.jsx(
1692
+ /* @__PURE__ */ l.jsx(N.Col, { span: n.itemCol, children: /* @__PURE__ */ l.jsx(
1638
1693
  o,
1639
1694
  {
1640
1695
  db: e,
@@ -1646,16 +1701,16 @@ function cn({
1646
1701
  }
1647
1702
  ) })
1648
1703
  ] }),
1649
- s !== void 0 && /* @__PURE__ */ l.jsxs(A, { gutter: "sm", children: [
1650
- /* @__PURE__ */ l.jsx(A.Col, { span: n.labelCol }),
1651
- /* @__PURE__ */ l.jsx(A.Col, { span: n.itemCol, children: /* @__PURE__ */ l.jsx(X.Error, { children: s }) })
1704
+ s !== void 0 && /* @__PURE__ */ l.jsxs(N, { gutter: "sm", children: [
1705
+ /* @__PURE__ */ l.jsx(N.Col, { span: n.labelCol }),
1706
+ /* @__PURE__ */ l.jsx(N.Col, { span: n.itemCol, children: /* @__PURE__ */ l.jsx(J.Error, { children: s }) })
1652
1707
  ] })
1653
- ] }) : (a === void 0 && (a = /* @__PURE__ */ l.jsx(T, { value: t.label })), !n.helpAlwaysVisible && t.description !== void 0 && (a = /* @__PURE__ */ l.jsxs(L, { gap: 4, style: { display: "inline-flex" }, children: [
1708
+ ] }) : (a === void 0 && (a = /* @__PURE__ */ l.jsx(b, { value: t.label })), !n.helpAlwaysVisible && t.description !== void 0 && (a = /* @__PURE__ */ l.jsxs(O, { gap: 4, style: { display: "inline-flex" }, children: [
1654
1709
  a,
1655
1710
  /* @__PURE__ */ l.jsx(
1656
1711
  Ut,
1657
1712
  {
1658
- label: /* @__PURE__ */ l.jsx(T, { value: t.description }),
1713
+ label: /* @__PURE__ */ l.jsx(b, { value: t.description }),
1659
1714
  withArrow: !0,
1660
1715
  children: /* @__PURE__ */ l.jsx(
1661
1716
  Wt,
@@ -1668,10 +1723,10 @@ function cn({
1668
1723
  }
1669
1724
  )
1670
1725
  ] })), /* @__PURE__ */ l.jsx(
1671
- X.Wrapper,
1726
+ J.Wrapper,
1672
1727
  {
1673
1728
  label: a,
1674
- description: n.helpAlwaysVisible && t.description !== void 0 ? /* @__PURE__ */ l.jsx(T, { value: t.description }) : void 0,
1729
+ description: n.helpAlwaysVisible && t.description !== void 0 ? /* @__PURE__ */ l.jsx(b, { value: t.description }) : void 0,
1675
1730
  required: t.isRequired,
1676
1731
  children: /* @__PURE__ */ l.jsx(
1677
1732
  o,
@@ -1687,11 +1742,11 @@ function cn({
1687
1742
  }
1688
1743
  ));
1689
1744
  }
1690
- function Go(e) {
1745
+ function Uo(e) {
1691
1746
  return e.type === "horizontal";
1692
1747
  }
1693
- const Ti = 12, Ni = (e) => {
1694
- const n = e.schema, t = _(() => e.fieldGroups.map((o, r) => Ho(
1748
+ const zi = 12, Gi = (e) => {
1749
+ const n = e.schema, t = _(() => e.fieldGroups.map((o, r) => Yo(
1695
1750
  n,
1696
1751
  e.store,
1697
1752
  e.record,
@@ -1705,10 +1760,10 @@ const Ti = 12, Ni = (e) => {
1705
1760
  onSubmit: e.onSubmit === void 0 ? void 0 : (o) => {
1706
1761
  o.preventDefault(), e.onSubmit !== void 0 && Jt(e.record) && e.record.stale && e.record.isValid() && e.onSubmit(e.record);
1707
1762
  },
1708
- children: /* @__PURE__ */ l.jsxs(W, { gap: "sm", className: e.className, style: e.styles, children: [
1763
+ children: /* @__PURE__ */ l.jsxs(Y, { gap: "sm", className: e.className, style: e.styles, children: [
1709
1764
  t,
1710
- /* @__PURE__ */ l.jsx(L, { gap: "sm", justify: e.actionsAlign, children: e.actions.map((o, r) => /* @__PURE__ */ l.jsx(
1711
- H,
1765
+ /* @__PURE__ */ l.jsx(O, { gap: "sm", justify: e.actionsAlign, children: e.actions.map((o, r) => /* @__PURE__ */ l.jsx(
1766
+ z,
1712
1767
  {
1713
1768
  variant: o.variant,
1714
1769
  onClick: () => {
@@ -1723,26 +1778,26 @@ const Ti = 12, Ni = (e) => {
1723
1778
  }
1724
1779
  );
1725
1780
  };
1726
- function Ho(e, n, t, o, r, i) {
1727
- var c, f;
1781
+ function Yo(e, n, t, o, r, i) {
1782
+ var d, g;
1728
1783
  const s = r.fields, a = [];
1729
1784
  for (let m = 0; m < s.length; m++) {
1730
1785
  const p = [];
1731
- for (let d = 0; d < s[m].length; d++) {
1732
- const g = s[m][d];
1786
+ for (let c = 0; c < s[m].length; c++) {
1787
+ const f = s[m][c];
1733
1788
  let h, v = {};
1734
- if (typeof g == "function")
1735
- h = g(n, t);
1789
+ if (typeof f == "function")
1790
+ h = f(n, t);
1736
1791
  else {
1737
- let C;
1738
- typeof g == "object" && "prop" in g ? (C = g.prop instanceof K ? g.prop : e.allProperties[g.prop], g.args !== void 0 && (v = g.args)) : C = g instanceof K ? g : e.allProperties[g], h = /* @__PURE__ */ l.jsx(
1739
- zo,
1792
+ let S;
1793
+ typeof f == "object" && "prop" in f ? (S = f.prop instanceof W ? f.prop : e.allProperties[f.prop], f.args !== void 0 && (v = f.args)) : S = f instanceof W ? f : e.allProperties[f], h = /* @__PURE__ */ l.jsx(
1794
+ Bo,
1740
1795
  {
1741
1796
  store: n,
1742
1797
  record: t,
1743
- property: C,
1798
+ property: S,
1744
1799
  layout: i,
1745
- InputComponent: gn(C, v.input),
1800
+ InputComponent: gn(S, v.input),
1746
1801
  freeze: v.freeze ?? !1,
1747
1802
  visible: v.visible,
1748
1803
  label: v.label,
@@ -1754,11 +1809,11 @@ function Ho(e, n, t, o, r, i) {
1754
1809
  /* @__PURE__ */ l.jsx(
1755
1810
  nn,
1756
1811
  {
1757
- span: (c = v.colsize) == null ? void 0 : c.span,
1758
- grow: (f = v.colsize) == null ? void 0 : f.grow,
1812
+ span: (d = v.colsize) == null ? void 0 : d.span,
1813
+ grow: (g = v.colsize) == null ? void 0 : g.grow,
1759
1814
  children: h
1760
1815
  },
1761
- `${m}-${d}`
1816
+ `${m}-${c}`
1762
1817
  )
1763
1818
  );
1764
1819
  }
@@ -1766,13 +1821,13 @@ function Ho(e, n, t, o, r, i) {
1766
1821
  /* @__PURE__ */ l.jsx(tn, { children: p }, m)
1767
1822
  );
1768
1823
  }
1769
- const u = /* @__PURE__ */ l.jsx(W, { gap: "sm", children: a }, o);
1770
- return r.name !== void 0 ? /* @__PURE__ */ l.jsx(Kt, { legend: r.name, children: u }, o) : u;
1824
+ const u = /* @__PURE__ */ l.jsx(Y, { gap: "sm", children: a }, o);
1825
+ return r.name !== void 0 ? /* @__PURE__ */ l.jsx(Yt, { legend: r.name, children: u }, o) : u;
1771
1826
  }
1772
1827
  function gn(e, n) {
1773
1828
  if (n !== void 0)
1774
1829
  return n;
1775
- const t = e instanceof K ? e.leafProperty : e;
1830
+ const t = e instanceof W ? e.leafProperty : e;
1776
1831
  if (se(t))
1777
1832
  return t.cardinality === "N:N" || t.cardinality === "1:N" ? an : ln;
1778
1833
  if (Vt[t.datatype] === void 0)
@@ -1781,7 +1836,7 @@ function gn(e, n) {
1781
1836
  );
1782
1837
  return Vt[t.datatype];
1783
1838
  }
1784
- const qo = oe(
1839
+ const Ko = oe(
1785
1840
  ({
1786
1841
  db: e,
1787
1842
  record: n,
@@ -1793,16 +1848,16 @@ const qo = oe(
1793
1848
  onChange: a,
1794
1849
  visible: u
1795
1850
  }) => {
1796
- const [c, f] = $(void 0);
1851
+ const [d, g] = M(void 0);
1797
1852
  if (u !== void 0 && !u(n))
1798
1853
  return /* @__PURE__ */ l.jsx("div", {});
1799
1854
  const m = dt(n, t);
1800
1855
  return a === void 0 && (a = (p) => {
1801
- var g;
1856
+ var f;
1802
1857
  Ze(n, t, p);
1803
- const d = t.validator(p);
1804
- d.isValid ? f(void 0) : f(
1805
- (g = d.errorMessage) == null ? void 0 : g.t({ args: { name: t.label } })
1858
+ const c = t.validator(p);
1859
+ c.isValid ? g(void 0) : g(
1860
+ (f = c.errorMessage) == null ? void 0 : f.t({ args: { name: t.label } })
1806
1861
  );
1807
1862
  }), /* @__PURE__ */ l.jsx(
1808
1863
  cn,
@@ -1813,14 +1868,14 @@ const qo = oe(
1813
1868
  InputComponent: r,
1814
1869
  freeze: i,
1815
1870
  value: m,
1816
- error: c,
1871
+ error: d,
1817
1872
  label: s,
1818
1873
  onChange: a
1819
1874
  }
1820
1875
  );
1821
1876
  }
1822
- ), ki = (e) => {
1823
- const n = e.schema, t = _(() => e.fieldGroups.map((o, r) => Bo(
1877
+ ), Hi = (e) => {
1878
+ const n = e.schema, t = _(() => e.fieldGroups.map((o, r) => Wo(
1824
1879
  n,
1825
1880
  e.record,
1826
1881
  r,
@@ -1834,10 +1889,10 @@ const qo = oe(
1834
1889
  onSubmit: e.onSubmit === void 0 ? void 0 : (o) => {
1835
1890
  o.preventDefault(), e.onSubmit !== void 0 && e.record.stale && e.record.isValid() && e.onSubmit(e.record);
1836
1891
  },
1837
- children: /* @__PURE__ */ l.jsxs(W, { gap: "sm", className: e.className, style: e.styles, children: [
1892
+ children: /* @__PURE__ */ l.jsxs(Y, { gap: "sm", className: e.className, style: e.styles, children: [
1838
1893
  t,
1839
- e.actions && e.actions.length > 0 && /* @__PURE__ */ l.jsx(L, { gap: "sm", justify: e.actionsAlign, children: e.actions.map((o, r) => /* @__PURE__ */ l.jsx(
1840
- H,
1894
+ e.actions && e.actions.length > 0 && /* @__PURE__ */ l.jsx(O, { gap: "sm", justify: e.actionsAlign, children: e.actions.map((o, r) => /* @__PURE__ */ l.jsx(
1895
+ z,
1841
1896
  {
1842
1897
  variant: o.variant,
1843
1898
  onClick: () => {
@@ -1852,26 +1907,26 @@ const qo = oe(
1852
1907
  }
1853
1908
  );
1854
1909
  };
1855
- function Bo(e, n, t, o, r, i) {
1856
- var c, f;
1910
+ function Wo(e, n, t, o, r, i) {
1911
+ var d, g;
1857
1912
  const s = o.fields, a = [];
1858
1913
  for (let m = 0; m < s.length; m++) {
1859
1914
  const p = [];
1860
- for (let d = 0; d < s[m].length; d++) {
1861
- const g = s[m][d];
1915
+ for (let c = 0; c < s[m].length; c++) {
1916
+ const f = s[m][c];
1862
1917
  let h, v = {};
1863
- if (typeof g == "function")
1864
- h = g(n);
1918
+ if (typeof f == "function")
1919
+ h = f(n);
1865
1920
  else {
1866
- let C;
1867
- typeof g == "object" && "prop" in g ? (C = g.prop instanceof K ? g.prop : e.allProperties[g.prop], g.args !== void 0 && (v = g.args)) : C = g instanceof K ? g : e.allProperties[g], h = /* @__PURE__ */ l.jsx(
1868
- qo,
1921
+ let S;
1922
+ typeof f == "object" && "prop" in f ? (S = f.prop instanceof W ? f.prop : e.allProperties[f.prop], f.args !== void 0 && (v = f.args)) : S = f instanceof W ? f : e.allProperties[f], h = /* @__PURE__ */ l.jsx(
1923
+ Ko,
1869
1924
  {
1870
1925
  db: i,
1871
1926
  record: n,
1872
- property: C,
1927
+ property: S,
1873
1928
  layout: r,
1874
- InputComponent: gn(C, v.input),
1929
+ InputComponent: gn(S, v.input),
1875
1930
  freeze: v.freeze ?? !1,
1876
1931
  visible: v.visible,
1877
1932
  label: v.label,
@@ -1883,11 +1938,11 @@ function Bo(e, n, t, o, r, i) {
1883
1938
  /* @__PURE__ */ l.jsx(
1884
1939
  nn,
1885
1940
  {
1886
- span: (c = v.colsize) == null ? void 0 : c.span,
1887
- grow: (f = v.colsize) == null ? void 0 : f.grow,
1941
+ span: (d = v.colsize) == null ? void 0 : d.span,
1942
+ grow: (g = v.colsize) == null ? void 0 : g.grow,
1888
1943
  children: h
1889
1944
  },
1890
- `${m}-${d}`
1945
+ `${m}-${c}`
1891
1946
  )
1892
1947
  );
1893
1948
  }
@@ -1895,8 +1950,8 @@ function Bo(e, n, t, o, r, i) {
1895
1950
  /* @__PURE__ */ l.jsx(tn, { children: p }, m)
1896
1951
  );
1897
1952
  }
1898
- const u = /* @__PURE__ */ l.jsx(W, { gap: "sm", children: a }, t);
1899
- return o.name !== void 0 ? /* @__PURE__ */ l.jsx(Kt, { legend: o.name, children: u }, t) : u;
1953
+ const u = /* @__PURE__ */ l.jsx(Y, { gap: "sm", children: a }, t);
1954
+ return o.name !== void 0 ? /* @__PURE__ */ l.jsx(Yt, { legend: o.name, children: u }, t) : u;
1900
1955
  }
1901
1956
  /**
1902
1957
  * table-core
@@ -1911,7 +1966,7 @@ function Bo(e, n, t, o, r, i) {
1911
1966
  function te(e, n) {
1912
1967
  return typeof e == "function" ? e(n) : e;
1913
1968
  }
1914
- function G(e, n) {
1969
+ function q(e, n) {
1915
1970
  return (t) => {
1916
1971
  n.setState((o) => ({
1917
1972
  ...o,
@@ -1919,13 +1974,13 @@ function G(e, n) {
1919
1974
  }));
1920
1975
  };
1921
1976
  }
1922
- function Ve(e) {
1977
+ function Te(e) {
1923
1978
  return e instanceof Function;
1924
1979
  }
1925
- function Uo(e) {
1980
+ function Xo(e) {
1926
1981
  return Array.isArray(e) && e.every((n) => typeof n == "number");
1927
1982
  }
1928
- function Ko(e, n) {
1983
+ function Jo(e, n) {
1929
1984
  const t = [], o = (r) => {
1930
1985
  r.forEach((i) => {
1931
1986
  t.push(i);
@@ -1935,23 +1990,23 @@ function Ko(e, n) {
1935
1990
  };
1936
1991
  return o(e), t;
1937
1992
  }
1938
- function x(e, n, t) {
1993
+ function w(e, n, t) {
1939
1994
  let o = [], r;
1940
1995
  return (i) => {
1941
1996
  let s;
1942
1997
  t.key && t.debug && (s = Date.now());
1943
1998
  const a = e(i);
1944
- if (!(a.length !== o.length || a.some((f, m) => o[m] !== f)))
1999
+ if (!(a.length !== o.length || a.some((g, m) => o[m] !== g)))
1945
2000
  return r;
1946
2001
  o = a;
1947
- let c;
1948
- if (t.key && t.debug && (c = Date.now()), r = n(...a), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
1949
- const f = Math.round((Date.now() - s) * 100) / 100, m = Math.round((Date.now() - c) * 100) / 100, p = m / 16, d = (g, h) => {
1950
- for (g = String(g); g.length < h; )
1951
- g = " " + g;
1952
- return g;
2002
+ let d;
2003
+ if (t.key && t.debug && (d = Date.now()), r = n(...a), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
2004
+ const g = Math.round((Date.now() - s) * 100) / 100, m = Math.round((Date.now() - d) * 100) / 100, p = m / 16, c = (f, h) => {
2005
+ for (f = String(f); f.length < h; )
2006
+ f = " " + f;
2007
+ return f;
1953
2008
  };
1954
- console.info(`%c⏱ ${d(m, 5)} /${d(f, 5)} ms`, `
2009
+ console.info(`%c⏱ ${c(m, 5)} /${c(g, 5)} ms`, `
1955
2010
  font-size: .6rem;
1956
2011
  font-weight: bold;
1957
2012
  color: hsl(${Math.max(0, Math.min(120 - 120 * p, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
@@ -1959,7 +2014,7 @@ function x(e, n, t) {
1959
2014
  return r;
1960
2015
  };
1961
2016
  }
1962
- function R(e, n, t, o) {
2017
+ function x(e, n, t, o) {
1963
2018
  return {
1964
2019
  debug: () => {
1965
2020
  var r;
@@ -1969,7 +2024,7 @@ function R(e, n, t, o) {
1969
2024
  onChange: o
1970
2025
  };
1971
2026
  }
1972
- function Yo(e, n, t, o) {
2027
+ function Qo(e, n, t, o) {
1973
2028
  const r = () => {
1974
2029
  var s;
1975
2030
  return (s = i.getValue()) != null ? s : e.options.renderFallbackValue;
@@ -1979,61 +2034,61 @@ function Yo(e, n, t, o) {
1979
2034
  column: t,
1980
2035
  getValue: () => n.getValue(o),
1981
2036
  renderValue: r,
1982
- getContext: x(() => [e, t, n, i], (s, a, u, c) => ({
2037
+ getContext: w(() => [e, t, n, i], (s, a, u, d) => ({
1983
2038
  table: s,
1984
2039
  column: a,
1985
2040
  row: u,
1986
- cell: c,
1987
- getValue: c.getValue,
1988
- renderValue: c.renderValue
1989
- }), R(e.options, "debugCells", "cell.getContext"))
2041
+ cell: d,
2042
+ getValue: d.getValue,
2043
+ renderValue: d.renderValue
2044
+ }), x(e.options, "debugCells", "cell.getContext"))
1990
2045
  };
1991
2046
  return e._features.forEach((s) => {
1992
2047
  s.createCell == null || s.createCell(i, t, n, e);
1993
2048
  }, {}), i;
1994
2049
  }
1995
- function Wo(e, n, t, o) {
2050
+ function Zo(e, n, t, o) {
1996
2051
  var r, i;
1997
2052
  const a = {
1998
2053
  ...e._getDefaultColumnDef(),
1999
2054
  ...n
2000
2055
  }, u = a.accessorKey;
2001
- let c = (r = (i = a.id) != null ? i : u ? typeof String.prototype.replaceAll == "function" ? u.replaceAll(".", "_") : u.replace(/\./g, "_") : void 0) != null ? r : typeof a.header == "string" ? a.header : void 0, f;
2002
- if (a.accessorFn ? f = a.accessorFn : u && (u.includes(".") ? f = (p) => {
2003
- let d = p;
2056
+ let d = (r = (i = a.id) != null ? i : u ? typeof String.prototype.replaceAll == "function" ? u.replaceAll(".", "_") : u.replace(/\./g, "_") : void 0) != null ? r : typeof a.header == "string" ? a.header : void 0, g;
2057
+ if (a.accessorFn ? g = a.accessorFn : u && (u.includes(".") ? g = (p) => {
2058
+ let c = p;
2004
2059
  for (const h of u.split(".")) {
2005
- var g;
2006
- d = (g = d) == null ? void 0 : g[h], process.env.NODE_ENV !== "production" && d === void 0 && console.warn(`"${h}" in deeply nested key "${u}" returned undefined.`);
2060
+ var f;
2061
+ c = (f = c) == null ? void 0 : f[h], process.env.NODE_ENV !== "production" && c === void 0 && console.warn(`"${h}" in deeply nested key "${u}" returned undefined.`);
2007
2062
  }
2008
- return d;
2009
- } : f = (p) => p[a.accessorKey]), !c)
2063
+ return c;
2064
+ } : g = (p) => p[a.accessorKey]), !d)
2010
2065
  throw process.env.NODE_ENV !== "production" ? new Error(a.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
2011
2066
  let m = {
2012
- id: `${String(c)}`,
2013
- accessorFn: f,
2067
+ id: `${String(d)}`,
2068
+ accessorFn: g,
2014
2069
  parent: o,
2015
2070
  depth: t,
2016
2071
  columnDef: a,
2017
2072
  columns: [],
2018
- getFlatColumns: x(() => [!0], () => {
2073
+ getFlatColumns: w(() => [!0], () => {
2019
2074
  var p;
2020
- return [m, ...(p = m.columns) == null ? void 0 : p.flatMap((d) => d.getFlatColumns())];
2021
- }, R(e.options, "debugColumns", "column.getFlatColumns")),
2022
- getLeafColumns: x(() => [e._getOrderColumnsFn()], (p) => {
2023
- var d;
2024
- if ((d = m.columns) != null && d.length) {
2025
- let g = m.columns.flatMap((h) => h.getLeafColumns());
2026
- return p(g);
2075
+ return [m, ...(p = m.columns) == null ? void 0 : p.flatMap((c) => c.getFlatColumns())];
2076
+ }, x(e.options, "debugColumns", "column.getFlatColumns")),
2077
+ getLeafColumns: w(() => [e._getOrderColumnsFn()], (p) => {
2078
+ var c;
2079
+ if ((c = m.columns) != null && c.length) {
2080
+ let f = m.columns.flatMap((h) => h.getLeafColumns());
2081
+ return p(f);
2027
2082
  }
2028
2083
  return [m];
2029
- }, R(e.options, "debugColumns", "column.getLeafColumns"))
2084
+ }, x(e.options, "debugColumns", "column.getLeafColumns"))
2030
2085
  };
2031
2086
  for (const p of e._features)
2032
2087
  p.createColumn == null || p.createColumn(m, e);
2033
2088
  return m;
2034
2089
  }
2035
- const k = "debugHeaders";
2036
- function Tt(e, n, t) {
2090
+ const L = "debugHeaders";
2091
+ function At(e, n, t) {
2037
2092
  var o;
2038
2093
  let i = {
2039
2094
  id: (o = t.id) != null ? o : n.id,
@@ -2062,92 +2117,92 @@ function Tt(e, n, t) {
2062
2117
  s.createHeader == null || s.createHeader(i, e);
2063
2118
  }), i;
2064
2119
  }
2065
- const Xo = {
2120
+ const er = {
2066
2121
  createTable: (e) => {
2067
- e.getHeaderGroups = x(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o, r) => {
2122
+ e.getHeaderGroups = w(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o, r) => {
2068
2123
  var i, s;
2069
- const a = (i = o == null ? void 0 : o.map((m) => t.find((p) => p.id === m)).filter(Boolean)) != null ? i : [], u = (s = r == null ? void 0 : r.map((m) => t.find((p) => p.id === m)).filter(Boolean)) != null ? s : [], c = t.filter((m) => !(o != null && o.includes(m.id)) && !(r != null && r.includes(m.id)));
2070
- return Fe(n, [...a, ...c, ...u], e);
2071
- }, R(e.options, k, "getHeaderGroups")), e.getCenterHeaderGroups = x(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o, r) => (t = t.filter((i) => !(o != null && o.includes(i.id)) && !(r != null && r.includes(i.id))), Fe(n, t, e, "center")), R(e.options, k, "getCenterHeaderGroups")), e.getLeftHeaderGroups = x(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (n, t, o) => {
2124
+ const a = (i = o == null ? void 0 : o.map((m) => t.find((p) => p.id === m)).filter(Boolean)) != null ? i : [], u = (s = r == null ? void 0 : r.map((m) => t.find((p) => p.id === m)).filter(Boolean)) != null ? s : [], d = t.filter((m) => !(o != null && o.includes(m.id)) && !(r != null && r.includes(m.id)));
2125
+ return Ie(n, [...a, ...d, ...u], e);
2126
+ }, x(e.options, L, "getHeaderGroups")), e.getCenterHeaderGroups = w(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o, r) => (t = t.filter((i) => !(o != null && o.includes(i.id)) && !(r != null && r.includes(i.id))), Ie(n, t, e, "center")), x(e.options, L, "getCenterHeaderGroups")), e.getLeftHeaderGroups = w(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (n, t, o) => {
2072
2127
  var r;
2073
2128
  const i = (r = o == null ? void 0 : o.map((s) => t.find((a) => a.id === s)).filter(Boolean)) != null ? r : [];
2074
- return Fe(n, i, e, "left");
2075
- }, R(e.options, k, "getLeftHeaderGroups")), e.getRightHeaderGroups = x(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (n, t, o) => {
2129
+ return Ie(n, i, e, "left");
2130
+ }, x(e.options, L, "getLeftHeaderGroups")), e.getRightHeaderGroups = w(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (n, t, o) => {
2076
2131
  var r;
2077
2132
  const i = (r = o == null ? void 0 : o.map((s) => t.find((a) => a.id === s)).filter(Boolean)) != null ? r : [];
2078
- return Fe(n, i, e, "right");
2079
- }, R(e.options, k, "getRightHeaderGroups")), e.getFooterGroups = x(() => [e.getHeaderGroups()], (n) => [...n].reverse(), R(e.options, k, "getFooterGroups")), e.getLeftFooterGroups = x(() => [e.getLeftHeaderGroups()], (n) => [...n].reverse(), R(e.options, k, "getLeftFooterGroups")), e.getCenterFooterGroups = x(() => [e.getCenterHeaderGroups()], (n) => [...n].reverse(), R(e.options, k, "getCenterFooterGroups")), e.getRightFooterGroups = x(() => [e.getRightHeaderGroups()], (n) => [...n].reverse(), R(e.options, k, "getRightFooterGroups")), e.getFlatHeaders = x(() => [e.getHeaderGroups()], (n) => n.map((t) => t.headers).flat(), R(e.options, k, "getFlatHeaders")), e.getLeftFlatHeaders = x(() => [e.getLeftHeaderGroups()], (n) => n.map((t) => t.headers).flat(), R(e.options, k, "getLeftFlatHeaders")), e.getCenterFlatHeaders = x(() => [e.getCenterHeaderGroups()], (n) => n.map((t) => t.headers).flat(), R(e.options, k, "getCenterFlatHeaders")), e.getRightFlatHeaders = x(() => [e.getRightHeaderGroups()], (n) => n.map((t) => t.headers).flat(), R(e.options, k, "getRightFlatHeaders")), e.getCenterLeafHeaders = x(() => [e.getCenterFlatHeaders()], (n) => n.filter((t) => {
2133
+ return Ie(n, i, e, "right");
2134
+ }, x(e.options, L, "getRightHeaderGroups")), e.getFooterGroups = w(() => [e.getHeaderGroups()], (n) => [...n].reverse(), x(e.options, L, "getFooterGroups")), e.getLeftFooterGroups = w(() => [e.getLeftHeaderGroups()], (n) => [...n].reverse(), x(e.options, L, "getLeftFooterGroups")), e.getCenterFooterGroups = w(() => [e.getCenterHeaderGroups()], (n) => [...n].reverse(), x(e.options, L, "getCenterFooterGroups")), e.getRightFooterGroups = w(() => [e.getRightHeaderGroups()], (n) => [...n].reverse(), x(e.options, L, "getRightFooterGroups")), e.getFlatHeaders = w(() => [e.getHeaderGroups()], (n) => n.map((t) => t.headers).flat(), x(e.options, L, "getFlatHeaders")), e.getLeftFlatHeaders = w(() => [e.getLeftHeaderGroups()], (n) => n.map((t) => t.headers).flat(), x(e.options, L, "getLeftFlatHeaders")), e.getCenterFlatHeaders = w(() => [e.getCenterHeaderGroups()], (n) => n.map((t) => t.headers).flat(), x(e.options, L, "getCenterFlatHeaders")), e.getRightFlatHeaders = w(() => [e.getRightHeaderGroups()], (n) => n.map((t) => t.headers).flat(), x(e.options, L, "getRightFlatHeaders")), e.getCenterLeafHeaders = w(() => [e.getCenterFlatHeaders()], (n) => n.filter((t) => {
2080
2135
  var o;
2081
2136
  return !((o = t.subHeaders) != null && o.length);
2082
- }), R(e.options, k, "getCenterLeafHeaders")), e.getLeftLeafHeaders = x(() => [e.getLeftFlatHeaders()], (n) => n.filter((t) => {
2137
+ }), x(e.options, L, "getCenterLeafHeaders")), e.getLeftLeafHeaders = w(() => [e.getLeftFlatHeaders()], (n) => n.filter((t) => {
2083
2138
  var o;
2084
2139
  return !((o = t.subHeaders) != null && o.length);
2085
- }), R(e.options, k, "getLeftLeafHeaders")), e.getRightLeafHeaders = x(() => [e.getRightFlatHeaders()], (n) => n.filter((t) => {
2140
+ }), x(e.options, L, "getLeftLeafHeaders")), e.getRightLeafHeaders = w(() => [e.getRightFlatHeaders()], (n) => n.filter((t) => {
2086
2141
  var o;
2087
2142
  return !((o = t.subHeaders) != null && o.length);
2088
- }), R(e.options, k, "getRightLeafHeaders")), e.getLeafHeaders = x(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (n, t, o) => {
2089
- var r, i, s, a, u, c;
2090
- return [...(r = (i = n[0]) == null ? void 0 : i.headers) != null ? r : [], ...(s = (a = t[0]) == null ? void 0 : a.headers) != null ? s : [], ...(u = (c = o[0]) == null ? void 0 : c.headers) != null ? u : []].map((f) => f.getLeafHeaders()).flat();
2091
- }, R(e.options, k, "getLeafHeaders"));
2143
+ }), x(e.options, L, "getRightLeafHeaders")), e.getLeafHeaders = w(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (n, t, o) => {
2144
+ var r, i, s, a, u, d;
2145
+ return [...(r = (i = n[0]) == null ? void 0 : i.headers) != null ? r : [], ...(s = (a = t[0]) == null ? void 0 : a.headers) != null ? s : [], ...(u = (d = o[0]) == null ? void 0 : d.headers) != null ? u : []].map((g) => g.getLeafHeaders()).flat();
2146
+ }, x(e.options, L, "getLeafHeaders"));
2092
2147
  }
2093
2148
  };
2094
- function Fe(e, n, t, o) {
2149
+ function Ie(e, n, t, o) {
2095
2150
  var r, i;
2096
2151
  let s = 0;
2097
- const a = function(p, d) {
2098
- d === void 0 && (d = 1), s = Math.max(s, d), p.filter((g) => g.getIsVisible()).forEach((g) => {
2152
+ const a = function(p, c) {
2153
+ c === void 0 && (c = 1), s = Math.max(s, c), p.filter((f) => f.getIsVisible()).forEach((f) => {
2099
2154
  var h;
2100
- (h = g.columns) != null && h.length && a(g.columns, d + 1);
2155
+ (h = f.columns) != null && h.length && a(f.columns, c + 1);
2101
2156
  }, 0);
2102
2157
  };
2103
2158
  a(e);
2104
2159
  let u = [];
2105
- const c = (p, d) => {
2106
- const g = {
2107
- depth: d,
2108
- id: [o, `${d}`].filter(Boolean).join("_"),
2160
+ const d = (p, c) => {
2161
+ const f = {
2162
+ depth: c,
2163
+ id: [o, `${c}`].filter(Boolean).join("_"),
2109
2164
  headers: []
2110
2165
  }, h = [];
2111
2166
  p.forEach((v) => {
2112
- const C = [...h].reverse()[0], y = v.column.depth === g.depth;
2113
- let w, F = !1;
2114
- if (y && v.column.parent ? w = v.column.parent : (w = v.column, F = !0), C && (C == null ? void 0 : C.column) === w)
2115
- C.subHeaders.push(v);
2167
+ const S = [...h].reverse()[0], R = v.column.depth === f.depth;
2168
+ let y, I = !1;
2169
+ if (R && v.column.parent ? y = v.column.parent : (y = v.column, I = !0), S && (S == null ? void 0 : S.column) === y)
2170
+ S.subHeaders.push(v);
2116
2171
  else {
2117
- const N = Tt(t, w, {
2118
- id: [o, d, w.id, v == null ? void 0 : v.id].filter(Boolean).join("_"),
2119
- isPlaceholder: F,
2120
- placeholderId: F ? `${h.filter((Z) => Z.column === w).length}` : void 0,
2121
- depth: d,
2172
+ const P = At(t, y, {
2173
+ id: [o, c, y.id, v == null ? void 0 : v.id].filter(Boolean).join("_"),
2174
+ isPlaceholder: I,
2175
+ placeholderId: I ? `${h.filter((k) => k.column === y).length}` : void 0,
2176
+ depth: c,
2122
2177
  index: h.length
2123
2178
  });
2124
- N.subHeaders.push(v), h.push(N);
2179
+ P.subHeaders.push(v), h.push(P);
2125
2180
  }
2126
- g.headers.push(v), v.headerGroup = g;
2127
- }), u.push(g), d > 0 && c(h, d - 1);
2128
- }, f = n.map((p, d) => Tt(t, p, {
2181
+ f.headers.push(v), v.headerGroup = f;
2182
+ }), u.push(f), c > 0 && d(h, c - 1);
2183
+ }, g = n.map((p, c) => At(t, p, {
2129
2184
  depth: s,
2130
- index: d
2185
+ index: c
2131
2186
  }));
2132
- c(f, s - 1), u.reverse();
2133
- const m = (p) => p.filter((g) => g.column.getIsVisible()).map((g) => {
2134
- let h = 0, v = 0, C = [0];
2135
- g.subHeaders && g.subHeaders.length ? (C = [], m(g.subHeaders).forEach((w) => {
2187
+ d(g, s - 1), u.reverse();
2188
+ const m = (p) => p.filter((f) => f.column.getIsVisible()).map((f) => {
2189
+ let h = 0, v = 0, S = [0];
2190
+ f.subHeaders && f.subHeaders.length ? (S = [], m(f.subHeaders).forEach((y) => {
2136
2191
  let {
2137
- colSpan: F,
2138
- rowSpan: N
2139
- } = w;
2140
- h += F, C.push(N);
2192
+ colSpan: I,
2193
+ rowSpan: P
2194
+ } = y;
2195
+ h += I, S.push(P);
2141
2196
  })) : h = 1;
2142
- const y = Math.min(...C);
2143
- return v = v + y, g.colSpan = h, g.rowSpan = v, {
2197
+ const R = Math.min(...S);
2198
+ return v = v + R, f.colSpan = h, f.rowSpan = v, {
2144
2199
  colSpan: h,
2145
2200
  rowSpan: v
2146
2201
  };
2147
2202
  });
2148
2203
  return m((r = (i = u[0]) == null ? void 0 : i.headers) != null ? r : []), u;
2149
2204
  }
2150
- const Jo = (e, n, t, o, r, i, s) => {
2205
+ const tr = (e, n, t, o, r, i, s) => {
2151
2206
  let a = {
2152
2207
  id: n,
2153
2208
  index: o,
@@ -2159,42 +2214,42 @@ const Jo = (e, n, t, o, r, i, s) => {
2159
2214
  getValue: (u) => {
2160
2215
  if (a._valuesCache.hasOwnProperty(u))
2161
2216
  return a._valuesCache[u];
2162
- const c = e.getColumn(u);
2163
- if (c != null && c.accessorFn)
2164
- return a._valuesCache[u] = c.accessorFn(a.original, o), a._valuesCache[u];
2217
+ const d = e.getColumn(u);
2218
+ if (d != null && d.accessorFn)
2219
+ return a._valuesCache[u] = d.accessorFn(a.original, o), a._valuesCache[u];
2165
2220
  },
2166
2221
  getUniqueValues: (u) => {
2167
2222
  if (a._uniqueValuesCache.hasOwnProperty(u))
2168
2223
  return a._uniqueValuesCache[u];
2169
- const c = e.getColumn(u);
2170
- if (c != null && c.accessorFn)
2171
- return c.columnDef.getUniqueValues ? (a._uniqueValuesCache[u] = c.columnDef.getUniqueValues(a.original, o), a._uniqueValuesCache[u]) : (a._uniqueValuesCache[u] = [a.getValue(u)], a._uniqueValuesCache[u]);
2224
+ const d = e.getColumn(u);
2225
+ if (d != null && d.accessorFn)
2226
+ return d.columnDef.getUniqueValues ? (a._uniqueValuesCache[u] = d.columnDef.getUniqueValues(a.original, o), a._uniqueValuesCache[u]) : (a._uniqueValuesCache[u] = [a.getValue(u)], a._uniqueValuesCache[u]);
2172
2227
  },
2173
2228
  renderValue: (u) => {
2174
- var c;
2175
- return (c = a.getValue(u)) != null ? c : e.options.renderFallbackValue;
2229
+ var d;
2230
+ return (d = a.getValue(u)) != null ? d : e.options.renderFallbackValue;
2176
2231
  },
2177
2232
  subRows: [],
2178
- getLeafRows: () => Ko(a.subRows, (u) => u.subRows),
2233
+ getLeafRows: () => Jo(a.subRows, (u) => u.subRows),
2179
2234
  getParentRow: () => a.parentId ? e.getRow(a.parentId, !0) : void 0,
2180
2235
  getParentRows: () => {
2181
- let u = [], c = a;
2236
+ let u = [], d = a;
2182
2237
  for (; ; ) {
2183
- const f = c.getParentRow();
2184
- if (!f) break;
2185
- u.push(f), c = f;
2238
+ const g = d.getParentRow();
2239
+ if (!g) break;
2240
+ u.push(g), d = g;
2186
2241
  }
2187
2242
  return u.reverse();
2188
2243
  },
2189
- getAllCells: x(() => [e.getAllLeafColumns()], (u) => u.map((c) => Yo(e, a, c, c.id)), R(e.options, "debugRows", "getAllCells")),
2190
- _getAllCellsByColumnId: x(() => [a.getAllCells()], (u) => u.reduce((c, f) => (c[f.column.id] = f, c), {}), R(e.options, "debugRows", "getAllCellsByColumnId"))
2244
+ getAllCells: w(() => [e.getAllLeafColumns()], (u) => u.map((d) => Qo(e, a, d, d.id)), x(e.options, "debugRows", "getAllCells")),
2245
+ _getAllCellsByColumnId: w(() => [a.getAllCells()], (u) => u.reduce((d, g) => (d[g.column.id] = g, d), {}), x(e.options, "debugRows", "getAllCellsByColumnId"))
2191
2246
  };
2192
2247
  for (let u = 0; u < e._features.length; u++) {
2193
- const c = e._features[u];
2194
- c == null || c.createRow == null || c.createRow(a, e);
2248
+ const d = e._features[u];
2249
+ d == null || d.createRow == null || d.createRow(a, e);
2195
2250
  }
2196
2251
  return a;
2197
- }, Qo = {
2252
+ }, nr = {
2198
2253
  createColumn: (e, n) => {
2199
2254
  e._getFacetedRowModel = n.options.getFacetedRowModel && n.options.getFacetedRowModel(n, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : n.getPreFilteredRowModel(), e._getFacetedUniqueValues = n.options.getFacetedUniqueValues && n.options.getFacetedUniqueValues(n, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = n.options.getFacetedMinMaxValues && n.options.getFacetedMinMaxValues(n, e.id), e.getFacetedMinMaxValues = () => {
2200
2255
  if (e._getFacetedMinMaxValues)
@@ -2206,36 +2261,36 @@ const Jo = (e, n, t, o, r, i, s) => {
2206
2261
  const i = t == null || (o = t.toString()) == null ? void 0 : o.toLowerCase();
2207
2262
  return !!(!((r = e.getValue(n)) == null || (r = r.toString()) == null || (r = r.toLowerCase()) == null) && r.includes(i));
2208
2263
  };
2209
- fn.autoRemove = (e) => U(e);
2264
+ fn.autoRemove = (e) => K(e);
2210
2265
  const mn = (e, n, t) => {
2211
2266
  var o;
2212
2267
  return !!(!((o = e.getValue(n)) == null || (o = o.toString()) == null) && o.includes(t));
2213
2268
  };
2214
- mn.autoRemove = (e) => U(e);
2269
+ mn.autoRemove = (e) => K(e);
2215
2270
  const pn = (e, n, t) => {
2216
2271
  var o;
2217
2272
  return ((o = e.getValue(n)) == null || (o = o.toString()) == null ? void 0 : o.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
2218
2273
  };
2219
- pn.autoRemove = (e) => U(e);
2274
+ pn.autoRemove = (e) => K(e);
2220
2275
  const hn = (e, n, t) => {
2221
2276
  var o;
2222
2277
  return (o = e.getValue(n)) == null ? void 0 : o.includes(t);
2223
2278
  };
2224
- hn.autoRemove = (e) => U(e);
2279
+ hn.autoRemove = (e) => K(e);
2225
2280
  const Sn = (e, n, t) => !t.some((o) => {
2226
2281
  var r;
2227
2282
  return !((r = e.getValue(n)) != null && r.includes(o));
2228
2283
  });
2229
- Sn.autoRemove = (e) => U(e) || !(e != null && e.length);
2284
+ Sn.autoRemove = (e) => K(e) || !(e != null && e.length);
2230
2285
  const vn = (e, n, t) => t.some((o) => {
2231
2286
  var r;
2232
2287
  return (r = e.getValue(n)) == null ? void 0 : r.includes(o);
2233
2288
  });
2234
- vn.autoRemove = (e) => U(e) || !(e != null && e.length);
2289
+ vn.autoRemove = (e) => K(e) || !(e != null && e.length);
2235
2290
  const Cn = (e, n, t) => e.getValue(n) === t;
2236
- Cn.autoRemove = (e) => U(e);
2291
+ Cn.autoRemove = (e) => K(e);
2237
2292
  const wn = (e, n, t) => e.getValue(n) == t;
2238
- wn.autoRemove = (e) => U(e);
2293
+ wn.autoRemove = (e) => K(e);
2239
2294
  const pt = (e, n, t) => {
2240
2295
  let [o, r] = t;
2241
2296
  const i = e.getValue(n);
@@ -2249,8 +2304,8 @@ pt.resolveFilterValue = (e) => {
2249
2304
  }
2250
2305
  return [i, s];
2251
2306
  };
2252
- pt.autoRemove = (e) => U(e) || U(e[0]) && U(e[1]);
2253
- const J = {
2307
+ pt.autoRemove = (e) => K(e) || K(e[0]) && K(e[1]);
2308
+ const Q = {
2254
2309
  includesString: fn,
2255
2310
  includesStringSensitive: mn,
2256
2311
  equalsString: pn,
@@ -2261,10 +2316,10 @@ const J = {
2261
2316
  weakEquals: wn,
2262
2317
  inNumberRange: pt
2263
2318
  };
2264
- function U(e) {
2319
+ function K(e) {
2265
2320
  return e == null || e === "";
2266
2321
  }
2267
- const Zo = {
2322
+ const or = {
2268
2323
  getDefaultColumnDef: () => ({
2269
2324
  filterFn: "auto"
2270
2325
  }),
@@ -2273,19 +2328,19 @@ const Zo = {
2273
2328
  ...e
2274
2329
  }),
2275
2330
  getDefaultOptions: (e) => ({
2276
- onColumnFiltersChange: G("columnFilters", e),
2331
+ onColumnFiltersChange: q("columnFilters", e),
2277
2332
  filterFromLeafRows: !1,
2278
2333
  maxLeafRowFilterDepth: 100
2279
2334
  }),
2280
2335
  createColumn: (e, n) => {
2281
2336
  e.getAutoFilterFn = () => {
2282
2337
  const t = n.getCoreRowModel().flatRows[0], o = t == null ? void 0 : t.getValue(e.id);
2283
- return typeof o == "string" ? J.includesString : typeof o == "number" ? J.inNumberRange : typeof o == "boolean" || o !== null && typeof o == "object" ? J.equals : Array.isArray(o) ? J.arrIncludes : J.weakEquals;
2338
+ return typeof o == "string" ? Q.includesString : typeof o == "number" ? Q.inNumberRange : typeof o == "boolean" || o !== null && typeof o == "object" ? Q.equals : Array.isArray(o) ? Q.arrIncludes : Q.weakEquals;
2284
2339
  }, e.getFilterFn = () => {
2285
2340
  var t, o;
2286
- return Ve(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
2341
+ return Te(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
2287
2342
  // @ts-ignore
2288
- (t = (o = n.options.filterFns) == null ? void 0 : o[e.columnDef.filterFn]) != null ? t : J[e.columnDef.filterFn]
2343
+ (t = (o = n.options.filterFns) == null ? void 0 : o[e.columnDef.filterFn]) != null ? t : Q[e.columnDef.filterFn]
2289
2344
  );
2290
2345
  }, e.getCanFilter = () => {
2291
2346
  var t, o, r;
@@ -2298,18 +2353,18 @@ const Zo = {
2298
2353
  return (t = (o = n.getState().columnFilters) == null ? void 0 : o.findIndex((r) => r.id === e.id)) != null ? t : -1;
2299
2354
  }, e.setFilterValue = (t) => {
2300
2355
  n.setColumnFilters((o) => {
2301
- const r = e.getFilterFn(), i = o == null ? void 0 : o.find((f) => f.id === e.id), s = te(t, i ? i.value : void 0);
2356
+ const r = e.getFilterFn(), i = o == null ? void 0 : o.find((g) => g.id === e.id), s = te(t, i ? i.value : void 0);
2302
2357
  if (Nt(r, s, e)) {
2303
2358
  var a;
2304
- return (a = o == null ? void 0 : o.filter((f) => f.id !== e.id)) != null ? a : [];
2359
+ return (a = o == null ? void 0 : o.filter((g) => g.id !== e.id)) != null ? a : [];
2305
2360
  }
2306
2361
  const u = {
2307
2362
  id: e.id,
2308
2363
  value: s
2309
2364
  };
2310
2365
  if (i) {
2311
- var c;
2312
- return (c = o == null ? void 0 : o.map((f) => f.id === e.id ? u : f)) != null ? c : [];
2366
+ var d;
2367
+ return (d = o == null ? void 0 : o.map((g) => g.id === e.id ? u : g)) != null ? d : [];
2313
2368
  }
2314
2369
  return o != null && o.length ? [...o, u] : [u];
2315
2370
  });
@@ -2342,54 +2397,54 @@ const Zo = {
2342
2397
  function Nt(e, n, t) {
2343
2398
  return (e && e.autoRemove ? e.autoRemove(n, t) : !1) || typeof n > "u" || typeof n == "string" && !n;
2344
2399
  }
2345
- const er = (e, n, t) => t.reduce((o, r) => {
2400
+ const rr = (e, n, t) => t.reduce((o, r) => {
2346
2401
  const i = r.getValue(e);
2347
2402
  return o + (typeof i == "number" ? i : 0);
2348
- }, 0), tr = (e, n, t) => {
2403
+ }, 0), ir = (e, n, t) => {
2349
2404
  let o;
2350
2405
  return t.forEach((r) => {
2351
2406
  const i = r.getValue(e);
2352
2407
  i != null && (o > i || o === void 0 && i >= i) && (o = i);
2353
2408
  }), o;
2354
- }, nr = (e, n, t) => {
2409
+ }, sr = (e, n, t) => {
2355
2410
  let o;
2356
2411
  return t.forEach((r) => {
2357
2412
  const i = r.getValue(e);
2358
2413
  i != null && (o < i || o === void 0 && i >= i) && (o = i);
2359
2414
  }), o;
2360
- }, or = (e, n, t) => {
2415
+ }, lr = (e, n, t) => {
2361
2416
  let o, r;
2362
2417
  return t.forEach((i) => {
2363
2418
  const s = i.getValue(e);
2364
2419
  s != null && (o === void 0 ? s >= s && (o = r = s) : (o > s && (o = s), r < s && (r = s)));
2365
2420
  }), [o, r];
2366
- }, rr = (e, n) => {
2421
+ }, ar = (e, n) => {
2367
2422
  let t = 0, o = 0;
2368
2423
  if (n.forEach((r) => {
2369
2424
  let i = r.getValue(e);
2370
2425
  i != null && (i = +i) >= i && (++t, o += i);
2371
2426
  }), t) return o / t;
2372
- }, ir = (e, n) => {
2427
+ }, ur = (e, n) => {
2373
2428
  if (!n.length)
2374
2429
  return;
2375
2430
  const t = n.map((i) => i.getValue(e));
2376
- if (!Uo(t))
2431
+ if (!Xo(t))
2377
2432
  return;
2378
2433
  if (t.length === 1)
2379
2434
  return t[0];
2380
2435
  const o = Math.floor(t.length / 2), r = t.sort((i, s) => i - s);
2381
2436
  return t.length % 2 !== 0 ? r[o] : (r[o - 1] + r[o]) / 2;
2382
- }, sr = (e, n) => Array.from(new Set(n.map((t) => t.getValue(e))).values()), lr = (e, n) => new Set(n.map((t) => t.getValue(e))).size, ar = (e, n) => n.length, Ge = {
2383
- sum: er,
2384
- min: tr,
2385
- max: nr,
2386
- extent: or,
2387
- mean: rr,
2388
- median: ir,
2389
- unique: sr,
2390
- uniqueCount: lr,
2391
- count: ar
2392
- }, ur = {
2437
+ }, dr = (e, n) => Array.from(new Set(n.map((t) => t.getValue(e))).values()), cr = (e, n) => new Set(n.map((t) => t.getValue(e))).size, gr = (e, n) => n.length, Ge = {
2438
+ sum: rr,
2439
+ min: ir,
2440
+ max: sr,
2441
+ extent: lr,
2442
+ mean: ar,
2443
+ median: ur,
2444
+ unique: dr,
2445
+ uniqueCount: cr,
2446
+ count: gr
2447
+ }, fr = {
2393
2448
  getDefaultColumnDef: () => ({
2394
2449
  aggregatedCell: (e) => {
2395
2450
  var n, t;
@@ -2402,7 +2457,7 @@ const er = (e, n, t) => t.reduce((o, r) => {
2402
2457
  ...e
2403
2458
  }),
2404
2459
  getDefaultOptions: (e) => ({
2405
- onGroupingChange: G("grouping", e),
2460
+ onGroupingChange: q("grouping", e),
2406
2461
  groupedColumnMode: "reorder"
2407
2462
  }),
2408
2463
  createColumn: (e, n) => {
@@ -2432,7 +2487,7 @@ const er = (e, n, t) => t.reduce((o, r) => {
2432
2487
  var t, o;
2433
2488
  if (!e)
2434
2489
  throw new Error();
2435
- return Ve(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (o = n.options.aggregationFns) == null ? void 0 : o[e.columnDef.aggregationFn]) != null ? t : Ge[e.columnDef.aggregationFn];
2490
+ return Te(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (o = n.options.aggregationFns) == null ? void 0 : o[e.columnDef.aggregationFn]) != null ? t : Ge[e.columnDef.aggregationFn];
2436
2491
  };
2437
2492
  },
2438
2493
  createTable: (e) => {
@@ -2456,27 +2511,27 @@ const er = (e, n, t) => t.reduce((o, r) => {
2456
2511
  };
2457
2512
  }
2458
2513
  };
2459
- function dr(e, n, t) {
2514
+ function mr(e, n, t) {
2460
2515
  if (!(n != null && n.length) || !t)
2461
2516
  return e;
2462
2517
  const o = e.filter((i) => !n.includes(i.id));
2463
2518
  return t === "remove" ? o : [...n.map((i) => e.find((s) => s.id === i)).filter(Boolean), ...o];
2464
2519
  }
2465
- const cr = {
2520
+ const pr = {
2466
2521
  getInitialState: (e) => ({
2467
2522
  columnOrder: [],
2468
2523
  ...e
2469
2524
  }),
2470
2525
  getDefaultOptions: (e) => ({
2471
- onColumnOrderChange: G("columnOrder", e)
2526
+ onColumnOrderChange: q("columnOrder", e)
2472
2527
  }),
2473
2528
  createColumn: (e, n) => {
2474
- e.getIndex = x((t) => [ve(n, t)], (t) => t.findIndex((o) => o.id === e.id), R(n.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
2529
+ e.getIndex = w((t) => [Ce(n, t)], (t) => t.findIndex((o) => o.id === e.id), x(n.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
2475
2530
  var o;
2476
- return ((o = ve(n, t)[0]) == null ? void 0 : o.id) === e.id;
2531
+ return ((o = Ce(n, t)[0]) == null ? void 0 : o.id) === e.id;
2477
2532
  }, e.getIsLastColumn = (t) => {
2478
2533
  var o;
2479
- const r = ve(n, t);
2534
+ const r = Ce(n, t);
2480
2535
  return ((o = r[r.length - 1]) == null ? void 0 : o.id) === e.id;
2481
2536
  };
2482
2537
  },
@@ -2484,31 +2539,31 @@ const cr = {
2484
2539
  e.setColumnOrder = (n) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(n), e.resetColumnOrder = (n) => {
2485
2540
  var t;
2486
2541
  e.setColumnOrder(n ? [] : (t = e.initialState.columnOrder) != null ? t : []);
2487
- }, e._getOrderColumnsFn = x(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (n, t, o) => (r) => {
2542
+ }, e._getOrderColumnsFn = w(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (n, t, o) => (r) => {
2488
2543
  let i = [];
2489
2544
  if (!(n != null && n.length))
2490
2545
  i = r;
2491
2546
  else {
2492
2547
  const s = [...n], a = [...r];
2493
2548
  for (; a.length && s.length; ) {
2494
- const u = s.shift(), c = a.findIndex((f) => f.id === u);
2495
- c > -1 && i.push(a.splice(c, 1)[0]);
2549
+ const u = s.shift(), d = a.findIndex((g) => g.id === u);
2550
+ d > -1 && i.push(a.splice(d, 1)[0]);
2496
2551
  }
2497
2552
  i = [...i, ...a];
2498
2553
  }
2499
- return dr(i, t, o);
2500
- }, R(e.options, "debugTable", "_getOrderColumnsFn"));
2554
+ return mr(i, t, o);
2555
+ }, x(e.options, "debugTable", "_getOrderColumnsFn"));
2501
2556
  }
2502
2557
  }, He = () => ({
2503
2558
  left: [],
2504
2559
  right: []
2505
- }), gr = {
2560
+ }), hr = {
2506
2561
  getInitialState: (e) => ({
2507
2562
  columnPinning: He(),
2508
2563
  ...e
2509
2564
  }),
2510
2565
  getDefaultOptions: (e) => ({
2511
- onColumnPinningChange: G("columnPinning", e)
2566
+ onColumnPinningChange: q("columnPinning", e)
2512
2567
  }),
2513
2568
  createColumn: (e, n) => {
2514
2569
  e.pin = (t) => {
@@ -2523,10 +2578,10 @@ const cr = {
2523
2578
  };
2524
2579
  }
2525
2580
  if (t === "left") {
2526
- var c, f;
2581
+ var d, g;
2527
2582
  return {
2528
- left: [...((c = r == null ? void 0 : r.left) != null ? c : []).filter((m) => !(o != null && o.includes(m))), ...o],
2529
- right: ((f = r == null ? void 0 : r.right) != null ? f : []).filter((m) => !(o != null && o.includes(m)))
2583
+ left: [...((d = r == null ? void 0 : r.left) != null ? d : []).filter((m) => !(o != null && o.includes(m))), ...o],
2584
+ right: ((g = r == null ? void 0 : r.right) != null ? g : []).filter((m) => !(o != null && o.includes(m)))
2530
2585
  };
2531
2586
  }
2532
2587
  return {
@@ -2550,16 +2605,16 @@ const cr = {
2550
2605
  };
2551
2606
  },
2552
2607
  createRow: (e, n) => {
2553
- e.getCenterVisibleCells = x(() => [e._getAllVisibleCells(), n.getState().columnPinning.left, n.getState().columnPinning.right], (t, o, r) => {
2608
+ e.getCenterVisibleCells = w(() => [e._getAllVisibleCells(), n.getState().columnPinning.left, n.getState().columnPinning.right], (t, o, r) => {
2554
2609
  const i = [...o ?? [], ...r ?? []];
2555
2610
  return t.filter((s) => !i.includes(s.column.id));
2556
- }, R(n.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = x(() => [e._getAllVisibleCells(), n.getState().columnPinning.left], (t, o) => (o ?? []).map((i) => t.find((s) => s.column.id === i)).filter(Boolean).map((i) => ({
2611
+ }, x(n.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = w(() => [e._getAllVisibleCells(), n.getState().columnPinning.left], (t, o) => (o ?? []).map((i) => t.find((s) => s.column.id === i)).filter(Boolean).map((i) => ({
2557
2612
  ...i,
2558
2613
  position: "left"
2559
- })), R(n.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = x(() => [e._getAllVisibleCells(), n.getState().columnPinning.right], (t, o) => (o ?? []).map((i) => t.find((s) => s.column.id === i)).filter(Boolean).map((i) => ({
2614
+ })), x(n.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = w(() => [e._getAllVisibleCells(), n.getState().columnPinning.right], (t, o) => (o ?? []).map((i) => t.find((s) => s.column.id === i)).filter(Boolean).map((i) => ({
2560
2615
  ...i,
2561
2616
  position: "right"
2562
- })), R(n.options, "debugRows", "getRightVisibleCells"));
2617
+ })), x(n.options, "debugRows", "getRightVisibleCells"));
2563
2618
  },
2564
2619
  createTable: (e) => {
2565
2620
  e.setColumnPinning = (n) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(n), e.resetColumnPinning = (n) => {
@@ -2573,16 +2628,16 @@ const cr = {
2573
2628
  return !!((r = o.left) != null && r.length || (i = o.right) != null && i.length);
2574
2629
  }
2575
2630
  return !!((t = o[n]) != null && t.length);
2576
- }, e.getLeftLeafColumns = x(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (n, t) => (t ?? []).map((o) => n.find((r) => r.id === o)).filter(Boolean), R(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = x(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (n, t) => (t ?? []).map((o) => n.find((r) => r.id === o)).filter(Boolean), R(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = x(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o) => {
2631
+ }, e.getLeftLeafColumns = w(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (n, t) => (t ?? []).map((o) => n.find((r) => r.id === o)).filter(Boolean), x(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = w(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (n, t) => (t ?? []).map((o) => n.find((r) => r.id === o)).filter(Boolean), x(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = w(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o) => {
2577
2632
  const r = [...t ?? [], ...o ?? []];
2578
2633
  return n.filter((i) => !r.includes(i.id));
2579
- }, R(e.options, "debugColumns", "getCenterLeafColumns"));
2634
+ }, x(e.options, "debugColumns", "getCenterLeafColumns"));
2580
2635
  }
2581
2636
  };
2582
- function fr(e) {
2637
+ function Sr(e) {
2583
2638
  return e || (typeof document < "u" ? document : null);
2584
2639
  }
2585
- const Ie = {
2640
+ const Pe = {
2586
2641
  size: 150,
2587
2642
  minSize: 20,
2588
2643
  maxSize: Number.MAX_SAFE_INTEGER
@@ -2593,8 +2648,8 @@ const Ie = {
2593
2648
  deltaPercentage: null,
2594
2649
  isResizingColumn: !1,
2595
2650
  columnSizingStart: []
2596
- }), mr = {
2597
- getDefaultColumnDef: () => Ie,
2651
+ }), vr = {
2652
+ getDefaultColumnDef: () => Pe,
2598
2653
  getInitialState: (e) => ({
2599
2654
  columnSizing: {},
2600
2655
  columnSizingInfo: qe(),
@@ -2603,15 +2658,15 @@ const Ie = {
2603
2658
  getDefaultOptions: (e) => ({
2604
2659
  columnResizeMode: "onEnd",
2605
2660
  columnResizeDirection: "ltr",
2606
- onColumnSizingChange: G("columnSizing", e),
2607
- onColumnSizingInfoChange: G("columnSizingInfo", e)
2661
+ onColumnSizingChange: q("columnSizing", e),
2662
+ onColumnSizingInfoChange: q("columnSizingInfo", e)
2608
2663
  }),
2609
2664
  createColumn: (e, n) => {
2610
2665
  e.getSize = () => {
2611
2666
  var t, o, r;
2612
2667
  const i = n.getState().columnSizing[e.id];
2613
- return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : Ie.minSize, (o = i ?? e.columnDef.size) != null ? o : Ie.size), (r = e.columnDef.maxSize) != null ? r : Ie.maxSize);
2614
- }, e.getStart = x((t) => [t, ve(n, t), n.getState().columnSizing], (t, o) => o.slice(0, e.getIndex(t)).reduce((r, i) => r + i.getSize(), 0), R(n.options, "debugColumns", "getStart")), e.getAfter = x((t) => [t, ve(n, t), n.getState().columnSizing], (t, o) => o.slice(e.getIndex(t) + 1).reduce((r, i) => r + i.getSize(), 0), R(n.options, "debugColumns", "getAfter")), e.resetSize = () => {
2668
+ return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : Pe.minSize, (o = i ?? e.columnDef.size) != null ? o : Pe.size), (r = e.columnDef.maxSize) != null ? r : Pe.maxSize);
2669
+ }, e.getStart = w((t) => [t, Ce(n, t), n.getState().columnSizing], (t, o) => o.slice(0, e.getIndex(t)).reduce((r, i) => r + i.getSize(), 0), x(n.options, "debugColumns", "getStart")), e.getAfter = w((t) => [t, Ce(n, t), n.getState().columnSizing], (t, o) => o.slice(e.getIndex(t) + 1).reduce((r, i) => r + i.getSize(), 0), x(n.options, "debugColumns", "getAfter")), e.resetSize = () => {
2615
2670
  n.setColumnSizing((t) => {
2616
2671
  let {
2617
2672
  [e.id]: o,
@@ -2647,25 +2702,25 @@ const Ie = {
2647
2702
  return (i) => {
2648
2703
  if (!o || !r || (i.persist == null || i.persist(), Be(i) && i.touches && i.touches.length > 1))
2649
2704
  return;
2650
- const s = e.getSize(), a = e ? e.getLeafHeaders().map((C) => [C.column.id, C.column.getSize()]) : [[o.id, o.getSize()]], u = Be(i) ? Math.round(i.touches[0].clientX) : i.clientX, c = {}, f = (C, y) => {
2651
- typeof y == "number" && (n.setColumnSizingInfo((w) => {
2652
- var F, N;
2653
- const Z = n.options.columnResizeDirection === "rtl" ? -1 : 1, I = (y - ((F = w == null ? void 0 : w.startOffset) != null ? F : 0)) * Z, D = Math.max(I / ((N = w == null ? void 0 : w.startSize) != null ? N : 0), -0.999999);
2654
- return w.columnSizingStart.forEach((z) => {
2655
- let [Ae, we] = z;
2656
- c[Ae] = Math.round(Math.max(we + we * D, 0) * 100) / 100;
2705
+ const s = e.getSize(), a = e ? e.getLeafHeaders().map((S) => [S.column.id, S.column.getSize()]) : [[o.id, o.getSize()]], u = Be(i) ? Math.round(i.touches[0].clientX) : i.clientX, d = {}, g = (S, R) => {
2706
+ typeof R == "number" && (n.setColumnSizingInfo((y) => {
2707
+ var I, P;
2708
+ const k = n.options.columnResizeDirection === "rtl" ? -1 : 1, F = (R - ((I = y == null ? void 0 : y.startOffset) != null ? I : 0)) * k, T = Math.max(F / ((P = y == null ? void 0 : y.startSize) != null ? P : 0), -0.999999);
2709
+ return y.columnSizingStart.forEach((H) => {
2710
+ let [Ae, xe] = H;
2711
+ d[Ae] = Math.round(Math.max(xe + xe * T, 0) * 100) / 100;
2657
2712
  }), {
2658
- ...w,
2659
- deltaOffset: I,
2660
- deltaPercentage: D
2713
+ ...y,
2714
+ deltaOffset: F,
2715
+ deltaPercentage: T
2661
2716
  };
2662
- }), (n.options.columnResizeMode === "onChange" || C === "end") && n.setColumnSizing((w) => ({
2663
- ...w,
2664
- ...c
2665
- })));
2666
- }, m = (C) => f("move", C), p = (C) => {
2667
- f("end", C), n.setColumnSizingInfo((y) => ({
2717
+ }), (n.options.columnResizeMode === "onChange" || S === "end") && n.setColumnSizing((y) => ({
2668
2718
  ...y,
2719
+ ...d
2720
+ })));
2721
+ }, m = (S) => g("move", S), p = (S) => {
2722
+ g("end", S), n.setColumnSizingInfo((R) => ({
2723
+ ...R,
2669
2724
  isResizingColumn: !1,
2670
2725
  startOffset: null,
2671
2726
  startSize: null,
@@ -2673,22 +2728,22 @@ const Ie = {
2673
2728
  deltaPercentage: null,
2674
2729
  columnSizingStart: []
2675
2730
  }));
2676
- }, d = fr(t), g = {
2677
- moveHandler: (C) => m(C.clientX),
2678
- upHandler: (C) => {
2679
- d == null || d.removeEventListener("mousemove", g.moveHandler), d == null || d.removeEventListener("mouseup", g.upHandler), p(C.clientX);
2731
+ }, c = Sr(t), f = {
2732
+ moveHandler: (S) => m(S.clientX),
2733
+ upHandler: (S) => {
2734
+ c == null || c.removeEventListener("mousemove", f.moveHandler), c == null || c.removeEventListener("mouseup", f.upHandler), p(S.clientX);
2680
2735
  }
2681
2736
  }, h = {
2682
- moveHandler: (C) => (C.cancelable && (C.preventDefault(), C.stopPropagation()), m(C.touches[0].clientX), !1),
2683
- upHandler: (C) => {
2684
- var y;
2685
- d == null || d.removeEventListener("touchmove", h.moveHandler), d == null || d.removeEventListener("touchend", h.upHandler), C.cancelable && (C.preventDefault(), C.stopPropagation()), p((y = C.touches[0]) == null ? void 0 : y.clientX);
2737
+ moveHandler: (S) => (S.cancelable && (S.preventDefault(), S.stopPropagation()), m(S.touches[0].clientX), !1),
2738
+ upHandler: (S) => {
2739
+ var R;
2740
+ c == null || c.removeEventListener("touchmove", h.moveHandler), c == null || c.removeEventListener("touchend", h.upHandler), S.cancelable && (S.preventDefault(), S.stopPropagation()), p((R = S.touches[0]) == null ? void 0 : R.clientX);
2686
2741
  }
2687
- }, v = pr() ? {
2742
+ }, v = Cr() ? {
2688
2743
  passive: !1
2689
2744
  } : !1;
2690
- Be(i) ? (d == null || d.addEventListener("touchmove", h.moveHandler, v), d == null || d.addEventListener("touchend", h.upHandler, v)) : (d == null || d.addEventListener("mousemove", g.moveHandler, v), d == null || d.addEventListener("mouseup", g.upHandler, v)), n.setColumnSizingInfo((C) => ({
2691
- ...C,
2745
+ Be(i) ? (c == null || c.addEventListener("touchmove", h.moveHandler, v), c == null || c.addEventListener("touchend", h.upHandler, v)) : (c == null || c.addEventListener("mousemove", f.moveHandler, v), c == null || c.addEventListener("mouseup", f.upHandler, v)), n.setColumnSizingInfo((S) => ({
2746
+ ...S,
2692
2747
  startOffset: u,
2693
2748
  startSize: s,
2694
2749
  deltaOffset: 0,
@@ -2721,9 +2776,9 @@ const Ie = {
2721
2776
  };
2722
2777
  }
2723
2778
  };
2724
- let Pe = null;
2725
- function pr() {
2726
- if (typeof Pe == "boolean") return Pe;
2779
+ let Ee = null;
2780
+ function Cr() {
2781
+ if (typeof Ee == "boolean") return Ee;
2727
2782
  let e = !1;
2728
2783
  try {
2729
2784
  const n = {
@@ -2736,18 +2791,18 @@ function pr() {
2736
2791
  } catch {
2737
2792
  e = !1;
2738
2793
  }
2739
- return Pe = e, Pe;
2794
+ return Ee = e, Ee;
2740
2795
  }
2741
2796
  function Be(e) {
2742
2797
  return e.type === "touchstart";
2743
2798
  }
2744
- const hr = {
2799
+ const wr = {
2745
2800
  getInitialState: (e) => ({
2746
2801
  columnVisibility: {},
2747
2802
  ...e
2748
2803
  }),
2749
2804
  getDefaultOptions: (e) => ({
2750
- onColumnVisibilityChange: G("columnVisibility", e)
2805
+ onColumnVisibilityChange: q("columnVisibility", e)
2751
2806
  }),
2752
2807
  createColumn: (e, n) => {
2753
2808
  e.toggleVisibility = (t) => {
@@ -2767,10 +2822,10 @@ const hr = {
2767
2822
  };
2768
2823
  },
2769
2824
  createRow: (e, n) => {
2770
- e._getAllVisibleCells = x(() => [e.getAllCells(), n.getState().columnVisibility], (t) => t.filter((o) => o.column.getIsVisible()), R(n.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = x(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, o, r) => [...t, ...o, ...r], R(n.options, "debugRows", "getVisibleCells"));
2825
+ e._getAllVisibleCells = w(() => [e.getAllCells(), n.getState().columnVisibility], (t) => t.filter((o) => o.column.getIsVisible()), x(n.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = w(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, o, r) => [...t, ...o, ...r], x(n.options, "debugRows", "getVisibleCells"));
2771
2826
  },
2772
2827
  createTable: (e) => {
2773
- const n = (t, o) => x(() => [o(), o().filter((r) => r.getIsVisible()).map((r) => r.id).join("_")], (r) => r.filter((i) => i.getIsVisible == null ? void 0 : i.getIsVisible()), R(e.options, "debugColumns", t));
2828
+ const n = (t, o) => w(() => [o(), o().filter((r) => r.getIsVisible()).map((r) => r.id).join("_")], (r) => r.filter((i) => i.getIsVisible == null ? void 0 : i.getIsVisible()), x(e.options, "debugColumns", t));
2774
2829
  e.getVisibleFlatColumns = n("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = n("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = n("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = n("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = n("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (t) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(t), e.resetColumnVisibility = (t) => {
2775
2830
  var o;
2776
2831
  e.setColumnVisibility(t ? {} : (o = e.initialState.columnVisibility) != null ? o : {});
@@ -2786,23 +2841,23 @@ const hr = {
2786
2841
  };
2787
2842
  }
2788
2843
  };
2789
- function ve(e, n) {
2844
+ function Ce(e, n) {
2790
2845
  return n ? n === "center" ? e.getCenterVisibleLeafColumns() : n === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
2791
2846
  }
2792
- const Sr = {
2847
+ const xr = {
2793
2848
  createTable: (e) => {
2794
2849
  e._getGlobalFacetedRowModel = e.options.getFacetedRowModel && e.options.getFacetedRowModel(e, "__global__"), e.getGlobalFacetedRowModel = () => e.options.manualFiltering || !e._getGlobalFacetedRowModel ? e.getPreFilteredRowModel() : e._getGlobalFacetedRowModel(), e._getGlobalFacetedUniqueValues = e.options.getFacetedUniqueValues && e.options.getFacetedUniqueValues(e, "__global__"), e.getGlobalFacetedUniqueValues = () => e._getGlobalFacetedUniqueValues ? e._getGlobalFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getGlobalFacetedMinMaxValues = e.options.getFacetedMinMaxValues && e.options.getFacetedMinMaxValues(e, "__global__"), e.getGlobalFacetedMinMaxValues = () => {
2795
2850
  if (e._getGlobalFacetedMinMaxValues)
2796
2851
  return e._getGlobalFacetedMinMaxValues();
2797
2852
  };
2798
2853
  }
2799
- }, vr = {
2854
+ }, Rr = {
2800
2855
  getInitialState: (e) => ({
2801
2856
  globalFilter: void 0,
2802
2857
  ...e
2803
2858
  }),
2804
2859
  getDefaultOptions: (e) => ({
2805
- onGlobalFilterChange: G("globalFilter", e),
2860
+ onGlobalFilterChange: q("globalFilter", e),
2806
2861
  globalFilterFn: "auto",
2807
2862
  getColumnCanGlobalFilter: (n) => {
2808
2863
  var t;
@@ -2817,25 +2872,25 @@ const Sr = {
2817
2872
  };
2818
2873
  },
2819
2874
  createTable: (e) => {
2820
- e.getGlobalAutoFilterFn = () => J.includesString, e.getGlobalFilterFn = () => {
2875
+ e.getGlobalAutoFilterFn = () => Q.includesString, e.getGlobalFilterFn = () => {
2821
2876
  var n, t;
2822
2877
  const {
2823
2878
  globalFilterFn: o
2824
2879
  } = e.options;
2825
- return Ve(o) ? o : o === "auto" ? e.getGlobalAutoFilterFn() : (n = (t = e.options.filterFns) == null ? void 0 : t[o]) != null ? n : J[o];
2880
+ return Te(o) ? o : o === "auto" ? e.getGlobalAutoFilterFn() : (n = (t = e.options.filterFns) == null ? void 0 : t[o]) != null ? n : Q[o];
2826
2881
  }, e.setGlobalFilter = (n) => {
2827
2882
  e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(n);
2828
2883
  }, e.resetGlobalFilter = (n) => {
2829
2884
  e.setGlobalFilter(n ? void 0 : e.initialState.globalFilter);
2830
2885
  };
2831
2886
  }
2832
- }, Cr = {
2887
+ }, jr = {
2833
2888
  getInitialState: (e) => ({
2834
2889
  expanded: {},
2835
2890
  ...e
2836
2891
  }),
2837
2892
  getDefaultOptions: (e) => ({
2838
- onExpandedChange: G("expanded", e),
2893
+ onExpandedChange: q("expanded", e),
2839
2894
  paginateExpandedRows: !0
2840
2895
  }),
2841
2896
  createTable: (e) => {
@@ -2919,7 +2974,7 @@ const Sr = {
2919
2974
  }, tt = 0, nt = 10, Ue = () => ({
2920
2975
  pageIndex: tt,
2921
2976
  pageSize: nt
2922
- }), wr = {
2977
+ }), yr = {
2923
2978
  getInitialState: (e) => ({
2924
2979
  ...e,
2925
2980
  pagination: {
@@ -2928,7 +2983,7 @@ const Sr = {
2928
2983
  }
2929
2984
  }),
2930
2985
  getDefaultOptions: (e) => ({
2931
- onPaginationChange: G("pagination", e)
2986
+ onPaginationChange: q("pagination", e)
2932
2987
  }),
2933
2988
  createTable: (e) => {
2934
2989
  let n = !1, t = !1;
@@ -2983,10 +3038,10 @@ const Sr = {
2983
3038
  ...r,
2984
3039
  pageCount: s
2985
3040
  };
2986
- }), e.getPageOptions = x(() => [e.getPageCount()], (o) => {
3041
+ }), e.getPageOptions = w(() => [e.getPageCount()], (o) => {
2987
3042
  let r = [];
2988
3043
  return o && o > 0 && (r = [...new Array(o)].fill(null).map((i, s) => s)), r;
2989
- }, R(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
3044
+ }, x(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
2990
3045
  const {
2991
3046
  pageIndex: o
2992
3047
  } = e.getState().pagination, r = e.getPageCount();
@@ -2999,32 +3054,32 @@ const Sr = {
2999
3054
  return (o = e.options.rowCount) != null ? o : e.getPrePaginationRowModel().rows.length;
3000
3055
  };
3001
3056
  }
3002
- }, Ke = () => ({
3057
+ }, Ye = () => ({
3003
3058
  top: [],
3004
3059
  bottom: []
3005
- }), xr = {
3060
+ }), _r = {
3006
3061
  getInitialState: (e) => ({
3007
- rowPinning: Ke(),
3062
+ rowPinning: Ye(),
3008
3063
  ...e
3009
3064
  }),
3010
3065
  getDefaultOptions: (e) => ({
3011
- onRowPinningChange: G("rowPinning", e)
3066
+ onRowPinningChange: q("rowPinning", e)
3012
3067
  }),
3013
3068
  createRow: (e, n) => {
3014
3069
  e.pin = (t, o, r) => {
3015
3070
  const i = o ? e.getLeafRows().map((u) => {
3016
3071
  let {
3017
- id: c
3072
+ id: d
3018
3073
  } = u;
3019
- return c;
3074
+ return d;
3020
3075
  }) : [], s = r ? e.getParentRows().map((u) => {
3021
3076
  let {
3022
- id: c
3077
+ id: d
3023
3078
  } = u;
3024
- return c;
3079
+ return d;
3025
3080
  }) : [], a = /* @__PURE__ */ new Set([...s, e.id, ...i]);
3026
3081
  n.setRowPinning((u) => {
3027
- var c, f;
3082
+ var d, g;
3028
3083
  if (t === "bottom") {
3029
3084
  var m, p;
3030
3085
  return {
@@ -3033,15 +3088,15 @@ const Sr = {
3033
3088
  };
3034
3089
  }
3035
3090
  if (t === "top") {
3036
- var d, g;
3091
+ var c, f;
3037
3092
  return {
3038
- top: [...((d = u == null ? void 0 : u.top) != null ? d : []).filter((h) => !(a != null && a.has(h))), ...Array.from(a)],
3039
- bottom: ((g = u == null ? void 0 : u.bottom) != null ? g : []).filter((h) => !(a != null && a.has(h)))
3093
+ top: [...((c = u == null ? void 0 : u.top) != null ? c : []).filter((h) => !(a != null && a.has(h))), ...Array.from(a)],
3094
+ bottom: ((f = u == null ? void 0 : u.bottom) != null ? f : []).filter((h) => !(a != null && a.has(h)))
3040
3095
  };
3041
3096
  }
3042
3097
  return {
3043
- top: ((c = u == null ? void 0 : u.top) != null ? c : []).filter((h) => !(a != null && a.has(h))),
3044
- bottom: ((f = u == null ? void 0 : u.bottom) != null ? f : []).filter((h) => !(a != null && a.has(h)))
3098
+ top: ((d = u == null ? void 0 : u.top) != null ? d : []).filter((h) => !(a != null && a.has(h))),
3099
+ bottom: ((g = u == null ? void 0 : u.bottom) != null ? g : []).filter((h) => !(a != null && a.has(h)))
3045
3100
  };
3046
3101
  });
3047
3102
  }, e.getCanPin = () => {
@@ -3073,7 +3128,7 @@ const Sr = {
3073
3128
  createTable: (e) => {
3074
3129
  e.setRowPinning = (n) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(n), e.resetRowPinning = (n) => {
3075
3130
  var t, o;
3076
- return e.setRowPinning(n ? Ke() : (t = (o = e.initialState) == null ? void 0 : o.rowPinning) != null ? t : Ke());
3131
+ return e.setRowPinning(n ? Ye() : (t = (o = e.initialState) == null ? void 0 : o.rowPinning) != null ? t : Ye());
3077
3132
  }, e.getIsSomeRowsPinned = (n) => {
3078
3133
  var t;
3079
3134
  const o = e.getState().rowPinning;
@@ -3098,18 +3153,18 @@ const Sr = {
3098
3153
  ...s,
3099
3154
  position: o
3100
3155
  }));
3101
- }, e.getTopRows = x(() => [e.getRowModel().rows, e.getState().rowPinning.top], (n, t) => e._getPinnedRows(n, t, "top"), R(e.options, "debugRows", "getTopRows")), e.getBottomRows = x(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (n, t) => e._getPinnedRows(n, t, "bottom"), R(e.options, "debugRows", "getBottomRows")), e.getCenterRows = x(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (n, t, o) => {
3156
+ }, e.getTopRows = w(() => [e.getRowModel().rows, e.getState().rowPinning.top], (n, t) => e._getPinnedRows(n, t, "top"), x(e.options, "debugRows", "getTopRows")), e.getBottomRows = w(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (n, t) => e._getPinnedRows(n, t, "bottom"), x(e.options, "debugRows", "getBottomRows")), e.getCenterRows = w(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (n, t, o) => {
3102
3157
  const r = /* @__PURE__ */ new Set([...t ?? [], ...o ?? []]);
3103
3158
  return n.filter((i) => !r.has(i.id));
3104
- }, R(e.options, "debugRows", "getCenterRows"));
3159
+ }, x(e.options, "debugRows", "getCenterRows"));
3105
3160
  }
3106
- }, Rr = {
3161
+ }, Fr = {
3107
3162
  getInitialState: (e) => ({
3108
3163
  rowSelection: {},
3109
3164
  ...e
3110
3165
  }),
3111
3166
  getDefaultOptions: (e) => ({
3112
- onRowSelectionChange: G("rowSelection", e),
3167
+ onRowSelectionChange: q("rowSelection", e),
3113
3168
  enableRowSelection: !0,
3114
3169
  enableMultiRowSelection: !0,
3115
3170
  enableSubRowSelection: !0
@@ -3140,19 +3195,19 @@ const Sr = {
3140
3195
  return e.getRowModel().rows.forEach((i) => {
3141
3196
  ot(r, i.id, o, !0, e);
3142
3197
  }), r;
3143
- }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = x(() => [e.getState().rowSelection, e.getCoreRowModel()], (n, t) => Object.keys(n).length ? Ye(e, t) : {
3198
+ }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = w(() => [e.getState().rowSelection, e.getCoreRowModel()], (n, t) => Object.keys(n).length ? Ke(e, t) : {
3144
3199
  rows: [],
3145
3200
  flatRows: [],
3146
3201
  rowsById: {}
3147
- }, R(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = x(() => [e.getState().rowSelection, e.getFilteredRowModel()], (n, t) => Object.keys(n).length ? Ye(e, t) : {
3202
+ }, x(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = w(() => [e.getState().rowSelection, e.getFilteredRowModel()], (n, t) => Object.keys(n).length ? Ke(e, t) : {
3148
3203
  rows: [],
3149
3204
  flatRows: [],
3150
3205
  rowsById: {}
3151
- }, R(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = x(() => [e.getState().rowSelection, e.getSortedRowModel()], (n, t) => Object.keys(n).length ? Ye(e, t) : {
3206
+ }, x(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = w(() => [e.getState().rowSelection, e.getSortedRowModel()], (n, t) => Object.keys(n).length ? Ke(e, t) : {
3152
3207
  rows: [],
3153
3208
  flatRows: [],
3154
3209
  rowsById: {}
3155
- }, R(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
3210
+ }, x(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
3156
3211
  const n = e.getFilteredRowModel().flatRows, {
3157
3212
  rowSelection: t
3158
3213
  } = e.getState();
@@ -3226,15 +3281,15 @@ const Sr = {
3226
3281
  const s = r.getRow(n, !0);
3227
3282
  t ? (s.getCanMultiSelect() || Object.keys(e).forEach((a) => delete e[a]), s.getCanSelect() && (e[n] = !0)) : delete e[n], o && (i = s.subRows) != null && i.length && s.getCanSelectSubRows() && s.subRows.forEach((a) => ot(e, a.id, t, o, r));
3228
3283
  };
3229
- function Ye(e, n) {
3284
+ function Ke(e, n) {
3230
3285
  const t = e.getState().rowSelection, o = [], r = {}, i = function(s, a) {
3231
3286
  return s.map((u) => {
3232
- var c;
3233
- const f = ht(u, t);
3234
- if (f && (o.push(u), r[u.id] = u), (c = u.subRows) != null && c.length && (u = {
3287
+ var d;
3288
+ const g = ht(u, t);
3289
+ if (g && (o.push(u), r[u.id] = u), (d = u.subRows) != null && d.length && (u = {
3235
3290
  ...u,
3236
3291
  subRows: i(u.subRows)
3237
- }), f)
3292
+ }), g)
3238
3293
  return u;
3239
3294
  }).filter(Boolean);
3240
3295
  };
@@ -3259,10 +3314,10 @@ function rt(e, n, t) {
3259
3314
  }
3260
3315
  }), r ? "all" : i ? "some" : !1;
3261
3316
  }
3262
- const it = /([0-9]+)/gm, yr = (e, n, t) => xn(ne(e.getValue(t)).toLowerCase(), ne(n.getValue(t)).toLowerCase()), jr = (e, n, t) => xn(ne(e.getValue(t)), ne(n.getValue(t))), _r = (e, n, t) => St(ne(e.getValue(t)).toLowerCase(), ne(n.getValue(t)).toLowerCase()), Fr = (e, n, t) => St(ne(e.getValue(t)), ne(n.getValue(t))), Ir = (e, n, t) => {
3317
+ const it = /([0-9]+)/gm, Ir = (e, n, t) => xn(ne(e.getValue(t)).toLowerCase(), ne(n.getValue(t)).toLowerCase()), Pr = (e, n, t) => xn(ne(e.getValue(t)), ne(n.getValue(t))), Er = (e, n, t) => St(ne(e.getValue(t)).toLowerCase(), ne(n.getValue(t)).toLowerCase()), $r = (e, n, t) => St(ne(e.getValue(t)), ne(n.getValue(t))), Mr = (e, n, t) => {
3263
3318
  const o = e.getValue(t), r = n.getValue(t);
3264
3319
  return o > r ? 1 : o < r ? -1 : 0;
3265
- }, Pr = (e, n, t) => St(e.getValue(t), n.getValue(t));
3320
+ }, br = (e, n, t) => St(e.getValue(t), n.getValue(t));
3266
3321
  function St(e, n) {
3267
3322
  return e === n ? 0 : e > n ? 1 : -1;
3268
3323
  }
@@ -3289,14 +3344,14 @@ function xn(e, n) {
3289
3344
  }
3290
3345
  return t.length - o.length;
3291
3346
  }
3292
- const pe = {
3293
- alphanumeric: yr,
3294
- alphanumericCaseSensitive: jr,
3295
- text: _r,
3296
- textCaseSensitive: Fr,
3297
- datetime: Ir,
3298
- basic: Pr
3299
- }, Er = {
3347
+ const he = {
3348
+ alphanumeric: Ir,
3349
+ alphanumericCaseSensitive: Pr,
3350
+ text: Er,
3351
+ textCaseSensitive: $r,
3352
+ datetime: Mr,
3353
+ basic: br
3354
+ }, Dr = {
3300
3355
  getInitialState: (e) => ({
3301
3356
  sorting: [],
3302
3357
  ...e
@@ -3306,7 +3361,7 @@ const pe = {
3306
3361
  sortUndefined: 1
3307
3362
  }),
3308
3363
  getDefaultOptions: (e) => ({
3309
- onSortingChange: G("sorting", e),
3364
+ onSortingChange: q("sorting", e),
3310
3365
  isMultiSortEvent: (n) => n.shiftKey
3311
3366
  }),
3312
3367
  createColumn: (e, n) => {
@@ -3316,11 +3371,11 @@ const pe = {
3316
3371
  for (const r of t) {
3317
3372
  const i = r == null ? void 0 : r.getValue(e.id);
3318
3373
  if (Object.prototype.toString.call(i) === "[object Date]")
3319
- return pe.datetime;
3374
+ return he.datetime;
3320
3375
  if (typeof i == "string" && (o = !0, i.split(it).length > 1))
3321
- return pe.alphanumeric;
3376
+ return he.alphanumeric;
3322
3377
  }
3323
- return o ? pe.text : pe.basic;
3378
+ return o ? he.text : he.basic;
3324
3379
  }, e.getAutoSortDir = () => {
3325
3380
  const t = n.getFilteredRowModel().flatRows[0];
3326
3381
  return typeof (t == null ? void 0 : t.getValue(e.id)) == "string" ? "asc" : "desc";
@@ -3328,26 +3383,26 @@ const pe = {
3328
3383
  var t, o;
3329
3384
  if (!e)
3330
3385
  throw new Error();
3331
- return Ve(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (o = n.options.sortingFns) == null ? void 0 : o[e.columnDef.sortingFn]) != null ? t : pe[e.columnDef.sortingFn];
3386
+ return Te(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (o = n.options.sortingFns) == null ? void 0 : o[e.columnDef.sortingFn]) != null ? t : he[e.columnDef.sortingFn];
3332
3387
  }, e.toggleSorting = (t, o) => {
3333
3388
  const r = e.getNextSortingOrder(), i = typeof t < "u" && t !== null;
3334
3389
  n.setSorting((s) => {
3335
- const a = s == null ? void 0 : s.find((d) => d.id === e.id), u = s == null ? void 0 : s.findIndex((d) => d.id === e.id);
3336
- let c = [], f, m = i ? t : r === "desc";
3337
- if (s != null && s.length && e.getCanMultiSort() && o ? a ? f = "toggle" : f = "add" : s != null && s.length && u !== s.length - 1 ? f = "replace" : a ? f = "toggle" : f = "replace", f === "toggle" && (i || r || (f = "remove")), f === "add") {
3390
+ const a = s == null ? void 0 : s.find((c) => c.id === e.id), u = s == null ? void 0 : s.findIndex((c) => c.id === e.id);
3391
+ let d = [], g, m = i ? t : r === "desc";
3392
+ if (s != null && s.length && e.getCanMultiSort() && o ? a ? g = "toggle" : g = "add" : s != null && s.length && u !== s.length - 1 ? g = "replace" : a ? g = "toggle" : g = "replace", g === "toggle" && (i || r || (g = "remove")), g === "add") {
3338
3393
  var p;
3339
- c = [...s, {
3394
+ d = [...s, {
3340
3395
  id: e.id,
3341
3396
  desc: m
3342
- }], c.splice(0, c.length - ((p = n.options.maxMultiSortColCount) != null ? p : Number.MAX_SAFE_INTEGER));
3343
- } else f === "toggle" ? c = s.map((d) => d.id === e.id ? {
3344
- ...d,
3397
+ }], d.splice(0, d.length - ((p = n.options.maxMultiSortColCount) != null ? p : Number.MAX_SAFE_INTEGER));
3398
+ } else g === "toggle" ? d = s.map((c) => c.id === e.id ? {
3399
+ ...c,
3345
3400
  desc: m
3346
- } : d) : f === "remove" ? c = s.filter((d) => d.id !== e.id) : c = [{
3401
+ } : c) : g === "remove" ? d = s.filter((c) => c.id !== e.id) : d = [{
3347
3402
  id: e.id,
3348
3403
  desc: m
3349
3404
  }];
3350
- return c;
3405
+ return d;
3351
3406
  });
3352
3407
  }, e.getFirstSortDir = () => {
3353
3408
  var t, o;
@@ -3385,34 +3440,34 @@ const pe = {
3385
3440
  e.setSorting(n ? [] : (t = (o = e.initialState) == null ? void 0 : o.sorting) != null ? t : []);
3386
3441
  }, e.getPreSortedRowModel = () => e.getGroupedRowModel(), e.getSortedRowModel = () => (!e._getSortedRowModel && e.options.getSortedRowModel && (e._getSortedRowModel = e.options.getSortedRowModel(e)), e.options.manualSorting || !e._getSortedRowModel ? e.getPreSortedRowModel() : e._getSortedRowModel());
3387
3442
  }
3388
- }, $r = [
3389
- Xo,
3443
+ }, Vr = [
3444
+ er,
3445
+ wr,
3446
+ pr,
3390
3447
  hr,
3391
- cr,
3392
- gr,
3393
- Qo,
3394
- Zo,
3395
- Sr,
3448
+ nr,
3449
+ or,
3450
+ xr,
3396
3451
  //depends on ColumnFaceting
3397
- vr,
3452
+ Rr,
3398
3453
  //depends on ColumnFiltering
3399
- Er,
3400
- ur,
3454
+ Dr,
3455
+ fr,
3401
3456
  //depends on RowSorting
3402
- Cr,
3403
- wr,
3404
- xr,
3405
- Rr,
3406
- mr
3457
+ jr,
3458
+ yr,
3459
+ _r,
3460
+ Fr,
3461
+ vr
3407
3462
  ];
3408
- function Mr(e) {
3463
+ function Tr(e) {
3409
3464
  var n, t;
3410
3465
  process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
3411
- const o = [...$r, ...(n = e._features) != null ? n : []];
3466
+ const o = [...Vr, ...(n = e._features) != null ? n : []];
3412
3467
  let r = {
3413
3468
  _features: o
3414
3469
  };
3415
- const i = r._features.reduce((p, d) => Object.assign(p, d.getDefaultOptions == null ? void 0 : d.getDefaultOptions(r)), {}), s = (p) => r.options.mergeOptions ? r.options.mergeOptions(i, p) : {
3470
+ const i = r._features.reduce((p, c) => Object.assign(p, c.getDefaultOptions == null ? void 0 : c.getDefaultOptions(r)), {}), s = (p) => r.options.mergeOptions ? r.options.mergeOptions(i, p) : {
3416
3471
  ...i,
3417
3472
  ...p
3418
3473
  };
@@ -3421,11 +3476,11 @@ function Mr(e) {
3421
3476
  ...(t = e.initialState) != null ? t : {}
3422
3477
  };
3423
3478
  r._features.forEach((p) => {
3424
- var d;
3425
- u = (d = p.getInitialState == null ? void 0 : p.getInitialState(u)) != null ? d : u;
3479
+ var c;
3480
+ u = (c = p.getInitialState == null ? void 0 : p.getInitialState(u)) != null ? c : u;
3426
3481
  });
3427
- const c = [];
3428
- let f = !1;
3482
+ const d = [];
3483
+ let g = !1;
3429
3484
  const m = {
3430
3485
  _features: o,
3431
3486
  options: {
@@ -3434,86 +3489,86 @@ function Mr(e) {
3434
3489
  },
3435
3490
  initialState: u,
3436
3491
  _queue: (p) => {
3437
- c.push(p), f || (f = !0, Promise.resolve().then(() => {
3438
- for (; c.length; )
3439
- c.shift()();
3440
- f = !1;
3441
- }).catch((d) => setTimeout(() => {
3442
- throw d;
3492
+ d.push(p), g || (g = !0, Promise.resolve().then(() => {
3493
+ for (; d.length; )
3494
+ d.shift()();
3495
+ g = !1;
3496
+ }).catch((c) => setTimeout(() => {
3497
+ throw c;
3443
3498
  })));
3444
3499
  },
3445
3500
  reset: () => {
3446
3501
  r.setState(r.initialState);
3447
3502
  },
3448
3503
  setOptions: (p) => {
3449
- const d = te(p, r.options);
3450
- r.options = s(d);
3504
+ const c = te(p, r.options);
3505
+ r.options = s(c);
3451
3506
  },
3452
3507
  getState: () => r.options.state,
3453
3508
  setState: (p) => {
3454
3509
  r.options.onStateChange == null || r.options.onStateChange(p);
3455
3510
  },
3456
- _getRowId: (p, d, g) => {
3511
+ _getRowId: (p, c, f) => {
3457
3512
  var h;
3458
- return (h = r.options.getRowId == null ? void 0 : r.options.getRowId(p, d, g)) != null ? h : `${g ? [g.id, d].join(".") : d}`;
3513
+ return (h = r.options.getRowId == null ? void 0 : r.options.getRowId(p, c, f)) != null ? h : `${f ? [f.id, c].join(".") : c}`;
3459
3514
  },
3460
3515
  getCoreRowModel: () => (r._getCoreRowModel || (r._getCoreRowModel = r.options.getCoreRowModel(r)), r._getCoreRowModel()),
3461
3516
  // The final calls start at the bottom of the model,
3462
3517
  // expanded rows, which then work their way up
3463
3518
  getRowModel: () => r.getPaginationRowModel(),
3464
3519
  //in next version, we should just pass in the row model as the optional 2nd arg
3465
- getRow: (p, d) => {
3466
- let g = (d ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[p];
3467
- if (!g && (g = r.getCoreRowModel().rowsById[p], !g))
3520
+ getRow: (p, c) => {
3521
+ let f = (c ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[p];
3522
+ if (!f && (f = r.getCoreRowModel().rowsById[p], !f))
3468
3523
  throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${p}`) : new Error();
3469
- return g;
3524
+ return f;
3470
3525
  },
3471
- _getDefaultColumnDef: x(() => [r.options.defaultColumn], (p) => {
3472
- var d;
3473
- return p = (d = p) != null ? d : {}, {
3474
- header: (g) => {
3475
- const h = g.header.column.columnDef;
3526
+ _getDefaultColumnDef: w(() => [r.options.defaultColumn], (p) => {
3527
+ var c;
3528
+ return p = (c = p) != null ? c : {}, {
3529
+ header: (f) => {
3530
+ const h = f.header.column.columnDef;
3476
3531
  return h.accessorKey ? h.accessorKey : h.accessorFn ? h.id : null;
3477
3532
  },
3478
3533
  // footer: props => props.header.column.id,
3479
- cell: (g) => {
3534
+ cell: (f) => {
3480
3535
  var h, v;
3481
- return (h = (v = g.renderValue()) == null || v.toString == null ? void 0 : v.toString()) != null ? h : null;
3536
+ return (h = (v = f.renderValue()) == null || v.toString == null ? void 0 : v.toString()) != null ? h : null;
3482
3537
  },
3483
- ...r._features.reduce((g, h) => Object.assign(g, h.getDefaultColumnDef == null ? void 0 : h.getDefaultColumnDef()), {}),
3538
+ ...r._features.reduce((f, h) => Object.assign(f, h.getDefaultColumnDef == null ? void 0 : h.getDefaultColumnDef()), {}),
3484
3539
  ...p
3485
3540
  };
3486
- }, R(e, "debugColumns", "_getDefaultColumnDef")),
3541
+ }, x(e, "debugColumns", "_getDefaultColumnDef")),
3487
3542
  _getColumnDefs: () => r.options.columns,
3488
- getAllColumns: x(() => [r._getColumnDefs()], (p) => {
3489
- const d = function(g, h, v) {
3490
- return v === void 0 && (v = 0), g.map((C) => {
3491
- const y = Wo(r, C, v, h), w = C;
3492
- return y.columns = w.columns ? d(w.columns, y, v + 1) : [], y;
3543
+ getAllColumns: w(() => [r._getColumnDefs()], (p) => {
3544
+ const c = function(f, h, v) {
3545
+ return v === void 0 && (v = 0), f.map((S) => {
3546
+ const R = Zo(r, S, v, h), y = S;
3547
+ return R.columns = y.columns ? c(y.columns, R, v + 1) : [], R;
3493
3548
  });
3494
3549
  };
3495
- return d(p);
3496
- }, R(e, "debugColumns", "getAllColumns")),
3497
- getAllFlatColumns: x(() => [r.getAllColumns()], (p) => p.flatMap((d) => d.getFlatColumns()), R(e, "debugColumns", "getAllFlatColumns")),
3498
- _getAllFlatColumnsById: x(() => [r.getAllFlatColumns()], (p) => p.reduce((d, g) => (d[g.id] = g, d), {}), R(e, "debugColumns", "getAllFlatColumnsById")),
3499
- getAllLeafColumns: x(() => [r.getAllColumns(), r._getOrderColumnsFn()], (p, d) => {
3500
- let g = p.flatMap((h) => h.getLeafColumns());
3501
- return d(g);
3502
- }, R(e, "debugColumns", "getAllLeafColumns")),
3550
+ return c(p);
3551
+ }, x(e, "debugColumns", "getAllColumns")),
3552
+ getAllFlatColumns: w(() => [r.getAllColumns()], (p) => p.flatMap((c) => c.getFlatColumns()), x(e, "debugColumns", "getAllFlatColumns")),
3553
+ _getAllFlatColumnsById: w(() => [r.getAllFlatColumns()], (p) => p.reduce((c, f) => (c[f.id] = f, c), {}), x(e, "debugColumns", "getAllFlatColumnsById")),
3554
+ getAllLeafColumns: w(() => [r.getAllColumns(), r._getOrderColumnsFn()], (p, c) => {
3555
+ let f = p.flatMap((h) => h.getLeafColumns());
3556
+ return c(f);
3557
+ }, x(e, "debugColumns", "getAllLeafColumns")),
3503
3558
  getColumn: (p) => {
3504
- const d = r._getAllFlatColumnsById()[p];
3505
- return process.env.NODE_ENV !== "production" && !d && console.error(`[Table] Column with id '${p}' does not exist.`), d;
3559
+ const c = r._getAllFlatColumnsById()[p];
3560
+ return process.env.NODE_ENV !== "production" && !c && console.error(`[Table] Column with id '${p}' does not exist.`), c;
3506
3561
  }
3507
3562
  };
3508
3563
  Object.assign(r, m);
3509
3564
  for (let p = 0; p < r._features.length; p++) {
3510
- const d = r._features[p];
3511
- d == null || d.createTable == null || d.createTable(r);
3565
+ const c = r._features[p];
3566
+ c == null || c.createTable == null || c.createTable(r);
3512
3567
  }
3513
3568
  return r;
3514
3569
  }
3515
3570
  function Rn() {
3516
- return (e) => x(() => [e.options.data], (n) => {
3571
+ return (e) => w(() => [e.options.data], (n) => {
3517
3572
  const t = {
3518
3573
  rows: [],
3519
3574
  flatRows: [],
@@ -3521,19 +3576,19 @@ function Rn() {
3521
3576
  }, o = function(r, i, s) {
3522
3577
  i === void 0 && (i = 0);
3523
3578
  const a = [];
3524
- for (let c = 0; c < r.length; c++) {
3525
- const f = Jo(e, e._getRowId(r[c], c, s), r[c], c, i, void 0, s == null ? void 0 : s.id);
3526
- if (t.flatRows.push(f), t.rowsById[f.id] = f, a.push(f), e.options.getSubRows) {
3579
+ for (let d = 0; d < r.length; d++) {
3580
+ const g = tr(e, e._getRowId(r[d], d, s), r[d], d, i, void 0, s == null ? void 0 : s.id);
3581
+ if (t.flatRows.push(g), t.rowsById[g.id] = g, a.push(g), e.options.getSubRows) {
3527
3582
  var u;
3528
- f.originalSubRows = e.options.getSubRows(r[c], c), (u = f.originalSubRows) != null && u.length && (f.subRows = o(f.originalSubRows, i + 1, f));
3583
+ g.originalSubRows = e.options.getSubRows(r[d], d), (u = g.originalSubRows) != null && u.length && (g.subRows = o(g.originalSubRows, i + 1, g));
3529
3584
  }
3530
3585
  }
3531
3586
  return a;
3532
3587
  };
3533
3588
  return t.rows = o(n), t;
3534
- }, R(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
3589
+ }, x(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
3535
3590
  }
3536
- function br(e) {
3591
+ function Ar(e) {
3537
3592
  const n = [], t = (o) => {
3538
3593
  var r;
3539
3594
  n.push(o), (r = o.subRows) != null && r.length && o.getIsExpanded() && o.subRows.forEach(t);
@@ -3544,8 +3599,8 @@ function br(e) {
3544
3599
  rowsById: e.rowsById
3545
3600
  };
3546
3601
  }
3547
- function Dr(e) {
3548
- return (n) => x(() => [n.getState().pagination, n.getPrePaginationRowModel(), n.options.paginateExpandedRows ? void 0 : n.getState().expanded], (t, o) => {
3602
+ function Nr(e) {
3603
+ return (n) => w(() => [n.getState().pagination, n.getPrePaginationRowModel(), n.options.paginateExpandedRows ? void 0 : n.getState().expanded], (t, o) => {
3549
3604
  if (!o.rows.length)
3550
3605
  return o;
3551
3606
  const {
@@ -3557,23 +3612,23 @@ function Dr(e) {
3557
3612
  flatRows: a,
3558
3613
  rowsById: u
3559
3614
  } = o;
3560
- const c = r * i, f = c + r;
3561
- s = s.slice(c, f);
3615
+ const d = r * i, g = d + r;
3616
+ s = s.slice(d, g);
3562
3617
  let m;
3563
3618
  n.options.paginateExpandedRows ? m = {
3564
3619
  rows: s,
3565
3620
  flatRows: a,
3566
3621
  rowsById: u
3567
- } : m = br({
3622
+ } : m = Ar({
3568
3623
  rows: s,
3569
3624
  flatRows: a,
3570
3625
  rowsById: u
3571
3626
  }), m.flatRows = [];
3572
- const p = (d) => {
3573
- m.flatRows.push(d), d.subRows.length && d.subRows.forEach(p);
3627
+ const p = (c) => {
3628
+ m.flatRows.push(c), c.subRows.length && c.subRows.forEach(p);
3574
3629
  };
3575
3630
  return m.rows.forEach(p), m;
3576
- }, R(n.options, "debugTable", "getPaginationRowModel"));
3631
+ }, x(n.options, "debugTable", "getPaginationRowModel"));
3577
3632
  }
3578
3633
  /**
3579
3634
  * react-table
@@ -3586,21 +3641,21 @@ function Dr(e) {
3586
3641
  * @license MIT
3587
3642
  */
3588
3643
  function kt(e, n) {
3589
- return e ? Vr(e) ? /* @__PURE__ */ Xe.createElement(e, n) : e : null;
3644
+ return e ? kr(e) ? /* @__PURE__ */ Xe.createElement(e, n) : e : null;
3590
3645
  }
3591
- function Vr(e) {
3592
- return Ar(e) || typeof e == "function" || Tr(e);
3646
+ function kr(e) {
3647
+ return Lr(e) || typeof e == "function" || Or(e);
3593
3648
  }
3594
- function Ar(e) {
3649
+ function Lr(e) {
3595
3650
  return typeof e == "function" && (() => {
3596
3651
  const n = Object.getPrototypeOf(e);
3597
3652
  return n.prototype && n.prototype.isReactComponent;
3598
3653
  })();
3599
3654
  }
3600
- function Tr(e) {
3655
+ function Or(e) {
3601
3656
  return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
3602
3657
  }
3603
- function yn(e) {
3658
+ function jn(e) {
3604
3659
  const n = {
3605
3660
  state: {},
3606
3661
  // Dummy state
@@ -3610,7 +3665,7 @@ function yn(e) {
3610
3665
  renderFallbackValue: null,
3611
3666
  ...e
3612
3667
  }, [t] = Xe.useState(() => ({
3613
- current: Mr(n)
3668
+ current: Tr(n)
3614
3669
  })), [o, r] = Xe.useState(() => t.current.initialState);
3615
3670
  return t.current.setOptions((i) => ({
3616
3671
  ...i,
@@ -3626,24 +3681,24 @@ function yn(e) {
3626
3681
  }
3627
3682
  })), t.current;
3628
3683
  }
3629
- const jn = ({
3684
+ const yn = ({
3630
3685
  actions: e,
3631
3686
  reloadData: n,
3632
3687
  selectedRowKeys: t,
3633
3688
  size: o = "xs"
3634
- }) => /* @__PURE__ */ l.jsxs(L, { gap: o, children: [
3689
+ }) => /* @__PURE__ */ l.jsxs(O, { gap: o, children: [
3635
3690
  (e == null ? void 0 : e.add) && /* @__PURE__ */ l.jsx(
3636
- H,
3691
+ z,
3637
3692
  {
3638
3693
  variant: "light",
3639
- leftSection: /* @__PURE__ */ l.jsx(Yn, { size: 16, stroke: 1.5 }),
3694
+ leftSection: /* @__PURE__ */ l.jsx(Kn, { size: 16, stroke: 1.5 }),
3640
3695
  size: o,
3641
3696
  onClick: e.add,
3642
3697
  children: "Add"
3643
3698
  }
3644
3699
  ),
3645
3700
  (e == null ? void 0 : e.edit) && /* @__PURE__ */ l.jsx(
3646
- H,
3701
+ z,
3647
3702
  {
3648
3703
  leftSection: /* @__PURE__ */ l.jsx(Wn, { size: 16, stroke: 1.5 }),
3649
3704
  size: o,
@@ -3653,10 +3708,33 @@ const jn = ({
3653
3708
  children: "Edit"
3654
3709
  }
3655
3710
  ),
3711
+ (e == null ? void 0 : e.delete) && /* @__PURE__ */ l.jsx(
3712
+ Ro,
3713
+ {
3714
+ title: `Delete ${t.length} item${t.length > 1 ? "s" : ""}?`,
3715
+ onConfirm: () => {
3716
+ var r;
3717
+ return (r = e.delete) == null ? void 0 : r.call(e, t);
3718
+ },
3719
+ confirmProps: { color: "red" },
3720
+ disabled: t.length === 0,
3721
+ children: /* @__PURE__ */ l.jsx(
3722
+ z,
3723
+ {
3724
+ leftSection: /* @__PURE__ */ l.jsx(Xn, { size: 16, stroke: 1.5 }),
3725
+ size: o,
3726
+ variant: "light",
3727
+ color: "red",
3728
+ disabled: t.length === 0,
3729
+ children: "Delete"
3730
+ }
3731
+ )
3732
+ }
3733
+ ),
3656
3734
  (e == null ? void 0 : e.reload) && /* @__PURE__ */ l.jsx(
3657
- H,
3735
+ z,
3658
3736
  {
3659
- leftSection: /* @__PURE__ */ l.jsx(Xn, { size: 16, stroke: 1.5 }),
3737
+ leftSection: /* @__PURE__ */ l.jsx(Jn, { size: 16, stroke: 1.5 }),
3660
3738
  size: o,
3661
3739
  onClick: n,
3662
3740
  variant: "light",
@@ -3664,9 +3742,9 @@ const jn = ({
3664
3742
  }
3665
3743
  ),
3666
3744
  (e == null ? void 0 : e.import) && /* @__PURE__ */ l.jsx(
3667
- H,
3745
+ z,
3668
3746
  {
3669
- leftSection: /* @__PURE__ */ l.jsx(Jn, { size: 16, stroke: 1.5 }),
3747
+ leftSection: /* @__PURE__ */ l.jsx(Qn, { size: 16, stroke: 1.5 }),
3670
3748
  size: o,
3671
3749
  variant: "light",
3672
3750
  onClick: e.import,
@@ -3674,34 +3752,34 @@ const jn = ({
3674
3752
  }
3675
3753
  ),
3676
3754
  (e == null ? void 0 : e.export) && /* @__PURE__ */ l.jsx(
3677
- H,
3755
+ z,
3678
3756
  {
3679
- leftSection: /* @__PURE__ */ l.jsx(Qn, { size: 16, stroke: 1.5 }),
3757
+ leftSection: /* @__PURE__ */ l.jsx(Zn, { size: 16, stroke: 1.5 }),
3680
3758
  size: o,
3681
3759
  variant: "light",
3682
3760
  onClick: e.export,
3683
3761
  children: "Export"
3684
3762
  }
3685
3763
  )
3686
- ] }), _n = (e) => e !== void 0 && (e.add !== void 0 || e.edit !== void 0 || e.delete !== void 0 || e.export !== void 0 || e.reload === !0 || e.import !== void 0), Fn = (e) => e !== void 0 && (e.add !== void 0 || e.edit !== void 0 || e.delete !== void 0 || e.export !== void 0), Nr = "__selectcol__", { Thead: kr, Tr: We, Th: Lr, Tbody: Or, Td: Lt } = Yt, In = (e) => {
3764
+ ] }), _n = (e) => e !== void 0 && (e.add !== void 0 || e.edit !== void 0 || e.delete !== void 0 || e.export !== void 0 || e.reload === !0 || e.import !== void 0), Fn = (e) => e !== void 0 && (e.add !== void 0 || e.edit !== void 0 || e.delete !== void 0 || e.export !== void 0), zr = "__selectcol__", { Thead: Gr, Tr: We, Th: Hr, Tbody: qr, Td: Lt } = Kt, In = (e) => {
3687
3765
  let n;
3688
- e.table.getRowCount() === 0 ? n = /* @__PURE__ */ l.jsx(We, { children: /* @__PURE__ */ l.jsx(Lt, { colSpan: e.table.getVisibleLeafColumns().length, children: /* @__PURE__ */ l.jsxs(W, { justify: "center", align: "center", gap: "xs", children: [
3689
- /* @__PURE__ */ l.jsx(Zn, { color: "var(--mantine-color-dimmed)" }),
3690
- /* @__PURE__ */ l.jsx(P, { c: "dimmed", fz: "sm", children: "No records found." })
3766
+ e.table.getRowCount() === 0 ? n = /* @__PURE__ */ l.jsx(We, { children: /* @__PURE__ */ l.jsx(Lt, { colSpan: e.table.getVisibleLeafColumns().length, children: /* @__PURE__ */ l.jsxs(Y, { justify: "center", align: "center", gap: "xs", children: [
3767
+ /* @__PURE__ */ l.jsx(eo, { color: "var(--mantine-color-dimmed)" }),
3768
+ /* @__PURE__ */ l.jsx(E, { c: "dimmed", fz: "sm", children: "No records found." })
3691
3769
  ] }) }) }, "empty-row") : n = e.table.getRowModel().rows.map((i, s) => {
3692
- var u, c;
3770
+ var u, d;
3693
3771
  const a = [];
3694
- for (const f of i.getVisibleCells()) {
3695
- const m = f.column.columnDef.meta, p = (u = m == null ? void 0 : m.rowSpan) == null ? void 0 : u.call(m, i.original, s), d = (c = m == null ? void 0 : m.colSpan) == null ? void 0 : c.call(m, i.original, s);
3696
- p === 0 || d === 0 || a.push(
3772
+ for (const g of i.getVisibleCells()) {
3773
+ const m = g.column.columnDef.meta, p = (u = m == null ? void 0 : m.rowSpan) == null ? void 0 : u.call(m, i.original, s), c = (d = m == null ? void 0 : m.colSpan) == null ? void 0 : d.call(m, i.original, s);
3774
+ p === 0 || c === 0 || a.push(
3697
3775
  /* @__PURE__ */ l.jsx(
3698
3776
  Lt,
3699
3777
  {
3700
3778
  rowSpan: p,
3701
- colSpan: d,
3702
- children: kt(f.column.columnDef.cell, f.getContext())
3779
+ colSpan: c,
3780
+ children: kt(g.column.columnDef.cell, g.getContext())
3703
3781
  },
3704
- f.id
3782
+ g.id
3705
3783
  )
3706
3784
  );
3707
3785
  }
@@ -3715,17 +3793,17 @@ const jn = ({
3715
3793
  );
3716
3794
  });
3717
3795
  const t = /* @__PURE__ */ l.jsxs(
3718
- Yt,
3796
+ Kt,
3719
3797
  {
3720
3798
  striped: e.striped ?? !0,
3721
3799
  highlightOnHover: !0,
3722
3800
  verticalSpacing: "xs",
3723
3801
  tabularNums: !0,
3724
3802
  children: [
3725
- /* @__PURE__ */ l.jsx(kr, { children: e.table.getHeaderGroups().map((r) => /* @__PURE__ */ l.jsx(We, { children: r.headers.map((i) => /* @__PURE__ */ l.jsx(
3726
- Lr,
3803
+ /* @__PURE__ */ l.jsx(Gr, { children: e.table.getHeaderGroups().map((r) => /* @__PURE__ */ l.jsx(We, { children: r.headers.map((i) => /* @__PURE__ */ l.jsx(
3804
+ Hr,
3727
3805
  {
3728
- w: i.id === Nr ? "1%" : void 0,
3806
+ w: i.id === zr ? "1%" : void 0,
3729
3807
  children: i.isPlaceholder ? null : kt(
3730
3808
  i.column.columnDef.header,
3731
3809
  i.getContext()
@@ -3733,56 +3811,57 @@ const jn = ({
3733
3811
  },
3734
3812
  i.id
3735
3813
  )) }, r.id)) }),
3736
- /* @__PURE__ */ l.jsx(Or, { pos: "relative", children: n })
3814
+ /* @__PURE__ */ l.jsx(qr, { pos: "relative", children: n })
3737
3815
  ]
3738
3816
  }
3739
3817
  );
3740
3818
  if (!e.bordered) return t;
3741
3819
  const o = {};
3742
3820
  return e.hasTopSection && (o.borderTopLeftRadius = 0, o.borderTopRightRadius = 0), e.hasBottomSection && (o.borderBottomLeftRadius = 0, o.borderBottomRightRadius = 0), /* @__PURE__ */ l.jsx(ie, { withBorder: !0, p: 0, style: o, children: t });
3743
- }, zr = "_pageSizeSelectorActive_1wv6j_1", Gr = {
3744
- pageSizeSelectorActive: zr
3745
- }, Pn = ({
3821
+ }, Br = "_pageSizeSelectorActive_1wv6j_1", Ur = {
3822
+ pageSizeSelectorActive: Br
3823
+ }, Yr = ["10", "20", "50", "100"], Pn = ({
3746
3824
  total: e,
3747
3825
  pageIndex: n,
3748
3826
  pageSize: t,
3749
3827
  allowPageSizeChange: o = !0,
3750
- onUpdatePagination: r
3828
+ pageSizeOptions: r = Yr,
3829
+ onUpdatePagination: i
3751
3830
  }) => {
3752
- const i = /* @__PURE__ */ l.jsx(
3831
+ const s = /* @__PURE__ */ l.jsx(
3753
3832
  Gn,
3754
3833
  {
3755
3834
  size: "sm",
3756
3835
  total: e,
3757
3836
  value: n + 1,
3758
- onChange: (s) => r(s - 1, t)
3837
+ onChange: (a) => i(a - 1, t)
3759
3838
  }
3760
3839
  );
3761
- return o ? /* @__PURE__ */ l.jsxs(L, { gap: "sm", children: [
3840
+ return o ? /* @__PURE__ */ l.jsxs(O, { gap: "sm", children: [
3762
3841
  /* @__PURE__ */ l.jsxs("div", { children: [
3763
- /* @__PURE__ */ l.jsx(P, { size: "sm", component: "span", pr: "xs", c: "dimmed", children: "Records per page" }),
3842
+ /* @__PURE__ */ l.jsx(E, { size: "sm", component: "span", pr: "xs", c: "dimmed", children: "Records per page" }),
3764
3843
  /* @__PURE__ */ l.jsx(
3765
- Hr,
3844
+ Kr,
3766
3845
  {
3767
3846
  size: "sm",
3768
- values: ["10", "20", "50", "100"],
3847
+ values: r,
3769
3848
  value: t.toString(),
3770
- onChange: (s) => {
3771
- r(0, parseInt(s, 10));
3849
+ onChange: (a) => {
3850
+ i(0, parseInt(a, 10));
3772
3851
  }
3773
3852
  }
3774
3853
  )
3775
3854
  ] }),
3776
- i
3777
- ] }) : i;
3855
+ s
3856
+ ] }) : s;
3778
3857
  }, Ot = {
3779
- xs: ge(22),
3780
- sm: ge(26),
3781
- md: ge(32),
3782
- lg: ge(38),
3783
- xl: ge(44)
3858
+ xs: fe(22),
3859
+ sm: fe(26),
3860
+ md: fe(32),
3861
+ lg: fe(38),
3862
+ xl: fe(44)
3784
3863
  };
3785
- function Hr({
3864
+ function Kr({
3786
3865
  size: e,
3787
3866
  values: n,
3788
3867
  value: t,
@@ -3790,11 +3869,11 @@ function Hr({
3790
3869
  }) {
3791
3870
  return /* @__PURE__ */ l.jsxs(ae, { withinPortal: !0, withArrow: !0, offset: 2, children: [
3792
3871
  /* @__PURE__ */ l.jsx(Hn, { children: /* @__PURE__ */ l.jsx(
3793
- H,
3872
+ z,
3794
3873
  {
3795
3874
  size: e,
3796
3875
  variant: "default",
3797
- rightSection: /* @__PURE__ */ l.jsx(eo, { size: 16, stroke: 1.5 }),
3876
+ rightSection: /* @__PURE__ */ l.jsx(to, { size: 16, stroke: 1.5 }),
3798
3877
  style: [
3799
3878
  { fontWeight: "normal" },
3800
3879
  (r) => ({
@@ -3816,7 +3895,7 @@ function Hr({
3816
3895
  return /* @__PURE__ */ l.jsx(
3817
3896
  Bn,
3818
3897
  {
3819
- className: i ? Gr.pageSizeSelectorActive : void 0,
3898
+ className: i ? Ur.pageSizeSelectorActive : void 0,
3820
3899
  style: [
3821
3900
  { height: Ot[e] }
3822
3901
  // isCurrent
@@ -3829,105 +3908,106 @@ function Hr({
3829
3908
  ],
3830
3909
  disabled: i,
3831
3910
  onClick: () => o(r),
3832
- children: /* @__PURE__ */ l.jsx(P, { component: "div", size: e, children: r })
3911
+ children: /* @__PURE__ */ l.jsx(E, { component: "div", size: e, children: r })
3833
3912
  },
3834
3913
  r
3835
3914
  );
3836
3915
  }) })
3837
3916
  ] });
3838
3917
  }
3839
- const qr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Li = (e) => {
3840
- var C, y;
3841
- const [n, t] = $({
3918
+ const Wr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), qi = (e) => {
3919
+ var S, R, y, I;
3920
+ const [n, t] = M({
3842
3921
  records: [],
3843
3922
  total: 0
3844
- }), [o, r] = $(!1), [i, s] = $(
3923
+ }), [o, r] = M(!1), [i, s] = M(
3845
3924
  {}
3846
- ), a = (w) => {
3847
- r(!0), e.getData(w).then((F) => {
3848
- t(F), r(!1);
3925
+ ), a = (P) => {
3926
+ r(!0), e.getData(P).then((k) => {
3927
+ t(k), r(!1);
3849
3928
  });
3850
- }, u = (w, F) => {
3851
- const N = {
3929
+ }, u = (P, k) => {
3930
+ const F = {
3852
3931
  ...e.query.query,
3853
- limit: F,
3854
- offset: w * F
3932
+ limit: k,
3933
+ offset: P * k
3855
3934
  };
3856
- e.query.update(N);
3857
- }, [c, f, m] = _(() => {
3858
- const w = e.query.query.limit, F = Math.floor(
3935
+ e.query.update(F);
3936
+ }, [d, g, m] = _(() => {
3937
+ const P = e.query.query.limit, k = Math.floor(
3859
3938
  (e.query.query.offset || 0) / e.query.query.limit
3860
- ), N = Math.ceil(n.total / e.query.query.limit);
3861
- return [w, F, N];
3939
+ ), F = Math.ceil(n.total / e.query.query.limit);
3940
+ return [P, k, F];
3862
3941
  }, [e.query.query.limit, e.query.query.offset, n.total]);
3863
- De(() => (n.total == 0 && a(e.query.query), e.query.subscribe(a)), [e.query]);
3864
- const p = _(() => Object.keys(i).filter((w) => i[w]).map((w) => e.normalizeRowId(w)), [i]);
3865
- let d, g;
3866
- _n(e.actions) && (d = /* @__PURE__ */ l.jsx(
3867
- jn,
3942
+ Ve(() => (n.total == 0 && a(e.query.query), e.query.subscribe(a)), [e.query]);
3943
+ const p = _(() => Object.keys(i).filter((P) => i[P]).map((P) => e.normalizeRowId(P)), [i]);
3944
+ let c, f;
3945
+ _n(e.actions) && (c = /* @__PURE__ */ l.jsx(
3946
+ yn,
3868
3947
  {
3869
3948
  actions: e.actions,
3870
3949
  reloadData: () => a(e.query.query),
3871
3950
  selectedRowKeys: p
3872
3951
  }
3873
3952
  ));
3874
- const h = ((C = e.pagination) == null ? void 0 : C.positions) || qr;
3953
+ const h = ((S = e.pagination) == null ? void 0 : S.positions) || Wr;
3875
3954
  if (h.size > 0) {
3876
- const w = /* @__PURE__ */ l.jsx(
3955
+ const P = /* @__PURE__ */ l.jsx(
3877
3956
  Pn,
3878
3957
  {
3879
3958
  total: m,
3880
- pageIndex: f,
3881
- pageSize: c,
3959
+ pageIndex: g,
3960
+ pageSize: d,
3882
3961
  onUpdatePagination: u,
3883
- allowPageSizeChange: (y = e.pagination) == null ? void 0 : y.showSizeChanger
3962
+ allowPageSizeChange: (R = e.pagination) == null ? void 0 : R.showSizeChanger,
3963
+ pageSizeOptions: (I = (y = e.pagination) == null ? void 0 : y.pageSizeOptions) == null ? void 0 : I.map((k) => k.toString())
3884
3964
  }
3885
3965
  );
3886
- h.has("topRight") && (d !== void 0 ? d = /* @__PURE__ */ l.jsxs(L, { justify: "space-between", gap: "sm", children: [
3887
- d,
3888
- w
3889
- ] }) : d = /* @__PURE__ */ l.jsx(q, { justify: "flex-end", children: w })), (h.has("bottomRight") || h.has("bottomLeft") || h.has("bottomCenter")) && (h.has("bottomLeft") ? g = /* @__PURE__ */ l.jsxs(q, { justify: "space-between", align: "center", children: [
3890
- w,
3891
- /* @__PURE__ */ l.jsxs(P, { size: "sm", c: "dimmed", children: [
3966
+ h.has("topRight") && (c !== void 0 ? c = /* @__PURE__ */ l.jsxs(O, { justify: "space-between", gap: "sm", children: [
3967
+ c,
3968
+ P
3969
+ ] }) : c = /* @__PURE__ */ l.jsx(B, { justify: "flex-end", children: P })), (h.has("bottomRight") || h.has("bottomLeft") || h.has("bottomCenter")) && (h.has("bottomLeft") ? f = /* @__PURE__ */ l.jsxs(B, { justify: "space-between", align: "center", children: [
3970
+ P,
3971
+ /* @__PURE__ */ l.jsxs(E, { size: "sm", c: "dimmed", children: [
3892
3972
  "Showing ",
3893
- Math.min(f * c + 1, n.total),
3973
+ Math.min(g * d + 1, n.total),
3894
3974
  " to",
3895
3975
  " ",
3896
- Math.min((f + 1) * c, n.total),
3976
+ Math.min((g + 1) * d, n.total),
3897
3977
  " of ",
3898
3978
  n.total,
3899
3979
  " ",
3900
3980
  "records"
3901
3981
  ] })
3902
- ] }) : g = /* @__PURE__ */ l.jsxs(q, { justify: "space-between", align: "center", children: [
3903
- /* @__PURE__ */ l.jsxs(P, { size: "sm", c: "dimmed", children: [
3982
+ ] }) : f = /* @__PURE__ */ l.jsxs(B, { justify: "space-between", align: "center", children: [
3983
+ /* @__PURE__ */ l.jsxs(E, { size: "sm", c: "dimmed", children: [
3904
3984
  "Showing ",
3905
- Math.min(f * c + 1, n.total),
3985
+ Math.min(g * d + 1, n.total),
3906
3986
  " to",
3907
3987
  " ",
3908
- Math.min((f + 1) * c, n.total),
3988
+ Math.min((g + 1) * d, n.total),
3909
3989
  " of ",
3910
3990
  n.total,
3911
3991
  " ",
3912
3992
  "records"
3913
3993
  ] }),
3914
- w
3994
+ P
3915
3995
  ] }));
3916
3996
  }
3917
3997
  const v = _(() => {
3918
- const w = e.selectable ?? Fn(e.actions);
3998
+ const P = e.selectable ?? Fn(e.actions);
3919
3999
  return /* @__PURE__ */ l.jsx(
3920
- Br,
4000
+ Xr,
3921
4001
  {
3922
4002
  data: n,
3923
4003
  loading: o,
3924
4004
  columns: e.columns,
3925
- isSelectable: w,
4005
+ isSelectable: P,
3926
4006
  getRowId: e.getRowId,
3927
4007
  selectedRowKeys: i,
3928
4008
  setSelectedRowKeys: s,
3929
- hasTopSection: d !== void 0,
3930
- hasBottomSection: g !== void 0
4009
+ hasTopSection: c !== void 0,
4010
+ hasBottomSection: f !== void 0
3931
4011
  }
3932
4012
  );
3933
4013
  }, [
@@ -3938,11 +4018,11 @@ const qr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Li = (e) => {
3938
4018
  e.getRowId,
3939
4019
  i,
3940
4020
  s,
3941
- d !== void 0,
3942
- g !== void 0
4021
+ c !== void 0,
4022
+ f !== void 0
3943
4023
  ]);
3944
- return d === void 0 || g === void 0 ? v : /* @__PURE__ */ l.jsxs("div", { children: [
3945
- d !== void 0 && /* @__PURE__ */ l.jsx(
4024
+ return c === void 0 || f === void 0 ? v : /* @__PURE__ */ l.jsxs("div", { children: [
4025
+ c !== void 0 && /* @__PURE__ */ l.jsx(
3946
4026
  ie,
3947
4027
  {
3948
4028
  withBorder: !0,
@@ -3952,11 +4032,11 @@ const qr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Li = (e) => {
3952
4032
  borderBottomRightRadius: 0,
3953
4033
  borderBottom: "none"
3954
4034
  },
3955
- children: d
4035
+ children: c
3956
4036
  }
3957
4037
  ),
3958
4038
  v,
3959
- g !== void 0 && /* @__PURE__ */ l.jsx(
4039
+ f !== void 0 && /* @__PURE__ */ l.jsx(
3960
4040
  ie,
3961
4041
  {
3962
4042
  withBorder: !0,
@@ -3966,17 +4046,17 @@ const qr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Li = (e) => {
3966
4046
  borderTopRightRadius: 0,
3967
4047
  borderTop: "none"
3968
4048
  },
3969
- children: g
4049
+ children: f
3970
4050
  }
3971
4051
  )
3972
4052
  ] });
3973
- }, Br = (e) => {
4053
+ }, Xr = (e) => {
3974
4054
  const n = _(() => {
3975
4055
  const o = [];
3976
4056
  e.isSelectable && o.push({
3977
4057
  id: "selection",
3978
4058
  header: ({ table: r }) => /* @__PURE__ */ l.jsx(
3979
- de,
4059
+ ce,
3980
4060
  {
3981
4061
  checked: r.getIsAllRowsSelected(),
3982
4062
  indeterminate: r.getIsSomeRowsSelected(),
@@ -3984,7 +4064,7 @@ const qr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Li = (e) => {
3984
4064
  }
3985
4065
  ),
3986
4066
  cell: ({ row: r }) => /* @__PURE__ */ l.jsx(
3987
- de,
4067
+ ce,
3988
4068
  {
3989
4069
  checked: r.getIsSelected(),
3990
4070
  disabled: !r.getCanSelect(),
@@ -4000,7 +4080,7 @@ const qr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Li = (e) => {
4000
4080
  cell: ({ row: i }) => r.render(i.original)
4001
4081
  });
4002
4082
  return o;
4003
- }, [e.columns, e.isSelectable]), t = yn({
4083
+ }, [e.columns, e.isSelectable]), t = jn({
4004
4084
  data: e.data.records,
4005
4085
  columns: n,
4006
4086
  enableRowSelection: e.isSelectable,
@@ -4027,35 +4107,39 @@ const qr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Li = (e) => {
4027
4107
  function En(e, n, {
4028
4108
  title: t,
4029
4109
  nestedKey: o,
4030
- component: r
4110
+ component: r,
4111
+ rowSpan: i,
4112
+ colSpan: s
4031
4113
  } = {}) {
4032
- let i;
4114
+ let a;
4033
4115
  if (r !== void 0)
4034
- i = r;
4116
+ a = r;
4035
4117
  else if (se(n))
4036
- n.cardinality === "1:N" || n.cardinality === "N:N" ? i = mt : i = ft;
4118
+ n.cardinality === "1:N" || n.cardinality === "N:N" ? a = mt : a = ft;
4037
4119
  else {
4038
- if (ce[n.datatype] === void 0)
4120
+ if (ge[n.datatype] === void 0)
4039
4121
  throw new Error(
4040
4122
  `No display component found for datatype ${n.datatype}`
4041
4123
  );
4042
- i = ce[n.datatype];
4124
+ a = ge[n.datatype];
4043
4125
  }
4044
- const s = {
4126
+ const u = {
4045
4127
  key: n.name,
4046
- title: t || /* @__PURE__ */ l.jsx(T, { value: n.label }),
4047
- accessorFn: (a) => a[n.tsName],
4048
- render: (a) => {
4049
- const u = a[n.tsName];
4050
- return /* @__PURE__ */ l.jsx(i, { db: e, property: n, value: u });
4051
- }
4128
+ title: t || /* @__PURE__ */ l.jsx(b, { value: n.label }),
4129
+ accessorFn: (d) => d[n.tsName],
4130
+ render: (d) => {
4131
+ const g = d[n.tsName];
4132
+ return /* @__PURE__ */ l.jsx(a, { db: e, property: n, value: g });
4133
+ },
4134
+ rowSpan: i,
4135
+ colSpan: s
4052
4136
  };
4053
- return o !== void 0 && (s.accessorFn = (a) => a[o][n.tsName], s.render = (a) => {
4054
- const u = a[o][n.tsName];
4055
- return /* @__PURE__ */ l.jsx(i, { db: e, property: n, value: u });
4056
- }), s;
4137
+ return o !== void 0 && (u.accessorFn = (d) => d[o][n.tsName], u.render = (d) => {
4138
+ const g = d[o][n.tsName];
4139
+ return /* @__PURE__ */ l.jsx(a, { db: e, property: n, value: g });
4140
+ }), u;
4057
4141
  }
4058
- function Oi(e, n, t, {
4142
+ function Bi(e, n, t, {
4059
4143
  title: o,
4060
4144
  nestedKey: r,
4061
4145
  component: i
@@ -4066,115 +4150,122 @@ function Oi(e, n, t, {
4066
4150
  else if (se(t))
4067
4151
  t.cardinality === "1:N" || t.cardinality === "N:N" ? s = mt : s = ft;
4068
4152
  else {
4069
- if (ce[t.datatype] === void 0)
4153
+ if (ge[t.datatype] === void 0)
4070
4154
  throw new Error(
4071
4155
  `No display component found for datatype ${t.datatype}`
4072
4156
  );
4073
- s = ce[t.datatype];
4157
+ s = ge[t.datatype];
4074
4158
  }
4075
4159
  const a = {
4076
4160
  key: n + "." + t.name,
4077
- title: o || /* @__PURE__ */ l.jsx(T, { value: t.label }),
4161
+ title: o || /* @__PURE__ */ l.jsx(b, { value: t.label }),
4078
4162
  accessorFn: (u) => u[n.tsName][t.tsName],
4079
4163
  render: (u) => {
4080
- const c = u[n.tsName][t.tsName];
4081
- return /* @__PURE__ */ l.jsx(s, { db: e, property: t, value: c });
4164
+ const d = u[n.tsName][t.tsName];
4165
+ return /* @__PURE__ */ l.jsx(s, { db: e, property: t, value: d });
4082
4166
  }
4083
4167
  };
4084
4168
  return r !== void 0 && (a.accessorFn = (u) => u[r][n.tsName][t.tsName], a.render = (u) => {
4085
- const c = u[r][n.tsName][t.tsName];
4086
- return /* @__PURE__ */ l.jsx(s, { db: e, property: t, value: c });
4169
+ const d = u[r][n.tsName][t.tsName];
4170
+ return /* @__PURE__ */ l.jsx(s, { db: e, property: t, value: d });
4087
4171
  }), a;
4088
4172
  }
4089
- function zi(e, n, t, o = {}) {
4173
+ function Ui(e, n, t, o = {}) {
4090
4174
  return t.map((r) => $n(r) ? r : En(e, n.publicProperties[r], o));
4091
4175
  }
4092
- function Gi(e, n, t = [], o = {}) {
4176
+ function Yi(e, n, t = [], o = {}) {
4093
4177
  return t.map((r) => $n(r) ? r : En(e, n.publicProperties[r], o));
4094
4178
  }
4095
4179
  function $n(e) {
4096
4180
  return typeof e == "object" && "key" in e && "title" in e;
4097
4181
  }
4098
- const Ur = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Hi = (e) => {
4099
- var m, p;
4100
- const [n, t] = $(
4182
+ const Jr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ki = (e) => {
4183
+ var m, p, c, f, h;
4184
+ const [n, t] = M(
4101
4185
  {}
4102
4186
  ), o = e.selectable ?? Fn(e.actions), r = _(() => {
4103
- const d = [];
4104
- o && d.push({
4187
+ const v = [];
4188
+ o && v.push({
4105
4189
  id: "selection",
4106
- header: ({ table: g }) => /* @__PURE__ */ l.jsx(
4107
- de,
4190
+ header: ({ table: S }) => /* @__PURE__ */ l.jsx(
4191
+ ce,
4108
4192
  {
4109
- checked: g.getIsAllRowsSelected(),
4110
- indeterminate: g.getIsSomeRowsSelected(),
4111
- onChange: g.getToggleAllRowsSelectedHandler()
4193
+ checked: S.getIsAllRowsSelected(),
4194
+ indeterminate: S.getIsSomeRowsSelected(),
4195
+ onChange: S.getToggleAllRowsSelectedHandler()
4112
4196
  }
4113
4197
  ),
4114
- cell: ({ row: g }) => /* @__PURE__ */ l.jsx(
4115
- de,
4198
+ cell: ({ row: S }) => /* @__PURE__ */ l.jsx(
4199
+ ce,
4116
4200
  {
4117
- checked: g.getIsSelected(),
4118
- disabled: !g.getCanSelect(),
4119
- onChange: g.getToggleSelectedHandler()
4201
+ checked: S.getIsSelected(),
4202
+ disabled: !S.getCanSelect(),
4203
+ onChange: S.getToggleSelectedHandler()
4120
4204
  }
4121
4205
  )
4122
4206
  });
4123
- for (const g of e.columns)
4124
- d.push({
4125
- id: g.key,
4126
- header: g.title,
4127
- accessorFn: g.render,
4128
- cell: ({ row: h }) => g.render(h.original),
4207
+ for (const S of e.columns)
4208
+ v.push({
4209
+ id: S.key,
4210
+ header: S.title,
4211
+ accessorFn: S.render,
4212
+ cell: ({ row: R }) => S.render(R.original),
4129
4213
  meta: {
4130
- rowSpan: g.rowSpan,
4131
- colSpan: g.colSpan
4214
+ rowSpan: S.rowSpan,
4215
+ colSpan: S.colSpan
4132
4216
  }
4133
4217
  });
4134
- return d;
4135
- }, [e.columns, o]), i = yn({
4218
+ return v;
4219
+ }, [e.columns, o]), i = jn({
4136
4220
  data: e.data,
4137
4221
  columns: r,
4138
4222
  enableRowSelection: o,
4139
4223
  getCoreRowModel: Rn(),
4140
- getPaginationRowModel: Dr(),
4224
+ getPaginationRowModel: Nr(),
4225
+ initialState: {
4226
+ pagination: {
4227
+ pageSize: ((m = e.pagination) == null ? void 0 : m.pageSize) ?? 10,
4228
+ pageIndex: 0
4229
+ }
4230
+ },
4141
4231
  state: {
4142
4232
  rowSelection: n
4143
4233
  },
4144
4234
  onRowSelectionChange: t
4145
- }), s = _(() => Object.keys(n).filter((d) => n[d]).map(Number), [n]);
4235
+ }), s = _(() => Object.keys(n).filter((v) => n[v]).map(Number), [n]);
4146
4236
  let a, u;
4147
4237
  _n(e.actions) && (a = /* @__PURE__ */ l.jsx(
4148
- jn,
4238
+ yn,
4149
4239
  {
4150
4240
  actions: e.actions,
4151
4241
  selectedRowKeys: s
4152
4242
  }
4153
4243
  ));
4154
- const c = ((m = e.pagination) == null ? void 0 : m.positions) || Ur;
4155
- if (c.size > 0) {
4156
- const d = i.getState().pagination, g = /* @__PURE__ */ l.jsx(
4244
+ const d = ((p = e.pagination) == null ? void 0 : p.positions) || Jr;
4245
+ if (d.size > 0) {
4246
+ const v = i.getState().pagination, S = /* @__PURE__ */ l.jsx(
4157
4247
  Pn,
4158
4248
  {
4159
4249
  total: i.getPageCount(),
4160
- pageIndex: d.pageIndex,
4161
- pageSize: d.pageSize,
4162
- onUpdatePagination: (h, v) => i.setPagination({ pageIndex: h, pageSize: v }),
4163
- allowPageSizeChange: (p = e.pagination) == null ? void 0 : p.showSizeChanger
4250
+ pageIndex: v.pageIndex,
4251
+ pageSize: v.pageSize,
4252
+ onUpdatePagination: (R, y) => i.setPagination({ pageIndex: R, pageSize: y }),
4253
+ allowPageSizeChange: (c = e.pagination) == null ? void 0 : c.showSizeChanger,
4254
+ pageSizeOptions: (h = (f = e.pagination) == null ? void 0 : f.pageSizeOptions) == null ? void 0 : h.map((R) => R.toString())
4164
4255
  }
4165
4256
  );
4166
- c.has("topRight") && (a !== void 0 ? a = /* @__PURE__ */ l.jsxs(L, { justify: "space-between", gap: "sm", children: [
4257
+ d.has("topRight") && (a !== void 0 ? a = /* @__PURE__ */ l.jsxs(O, { justify: "space-between", gap: "sm", children: [
4167
4258
  a,
4168
- g
4169
- ] }) : a = /* @__PURE__ */ l.jsx(q, { justify: "flex-end", children: g })), (c.has("bottomRight") || c.has("bottomLeft") || c.has("bottomCenter")) && (c.has("bottomLeft") ? u = /* @__PURE__ */ l.jsxs(q, { justify: "space-between", align: "center", children: [
4170
- g,
4171
- /* @__PURE__ */ l.jsxs(P, { size: "sm", c: "dimmed", children: [
4259
+ S
4260
+ ] }) : a = /* @__PURE__ */ l.jsx(B, { justify: "flex-end", children: S })), (d.has("bottomRight") || d.has("bottomLeft") || d.has("bottomCenter")) && (d.has("bottomLeft") ? u = /* @__PURE__ */ l.jsxs(B, { justify: "space-between", align: "center", children: [
4261
+ S,
4262
+ /* @__PURE__ */ l.jsxs(E, { size: "sm", c: "dimmed", children: [
4172
4263
  "Showing ",
4173
- d.pageIndex * d.pageSize + 1,
4264
+ v.pageIndex * v.pageSize + 1,
4174
4265
  " to",
4175
4266
  " ",
4176
4267
  Math.min(
4177
- (d.pageIndex + 1) * d.pageSize,
4268
+ (v.pageIndex + 1) * v.pageSize,
4178
4269
  e.data.length
4179
4270
  ),
4180
4271
  " ",
@@ -4182,14 +4273,14 @@ const Ur = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Hi = (e) => {
4182
4273
  e.data.length,
4183
4274
  " records"
4184
4275
  ] })
4185
- ] }) : u = /* @__PURE__ */ l.jsxs(q, { justify: "space-between", align: "center", children: [
4186
- /* @__PURE__ */ l.jsxs(P, { size: "sm", c: "dimmed", children: [
4276
+ ] }) : u = /* @__PURE__ */ l.jsxs(B, { justify: "space-between", align: "center", children: [
4277
+ /* @__PURE__ */ l.jsxs(E, { size: "sm", c: "dimmed", children: [
4187
4278
  "Showing ",
4188
- d.pageIndex * d.pageSize + 1,
4279
+ v.pageIndex * v.pageSize + 1,
4189
4280
  " to",
4190
4281
  " ",
4191
4282
  Math.min(
4192
- (d.pageIndex + 1) * d.pageSize,
4283
+ (v.pageIndex + 1) * v.pageSize,
4193
4284
  e.data.length
4194
4285
  ),
4195
4286
  " ",
@@ -4197,10 +4288,10 @@ const Ur = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Hi = (e) => {
4197
4288
  e.data.length,
4198
4289
  " records"
4199
4290
  ] }),
4200
- g
4291
+ S
4201
4292
  ] }));
4202
4293
  }
4203
- const f = /* @__PURE__ */ l.jsx(
4294
+ const g = /* @__PURE__ */ l.jsx(
4204
4295
  In,
4205
4296
  {
4206
4297
  selectedRowKeys: n,
@@ -4211,7 +4302,7 @@ const Ur = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Hi = (e) => {
4211
4302
  striped: e.striped
4212
4303
  }
4213
4304
  );
4214
- return a === void 0 && u === void 0 ? f : /* @__PURE__ */ l.jsxs("div", { children: [
4305
+ return a === void 0 && u === void 0 ? g : /* @__PURE__ */ l.jsxs("div", { children: [
4215
4306
  a !== void 0 && /* @__PURE__ */ l.jsx(
4216
4307
  ie,
4217
4308
  {
@@ -4225,7 +4316,7 @@ const Ur = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Hi = (e) => {
4225
4316
  children: a
4226
4317
  }
4227
4318
  ),
4228
- f,
4319
+ g,
4229
4320
  u !== void 0 && /* @__PURE__ */ l.jsx(
4230
4321
  ie,
4231
4322
  {
@@ -4241,27 +4332,27 @@ const Ur = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Hi = (e) => {
4241
4332
  )
4242
4333
  ] });
4243
4334
  }, zt = {
4244
- integer: Me,
4245
- float: Me,
4246
- string: Se,
4335
+ integer: be,
4336
+ float: be,
4337
+ string: ve,
4247
4338
  boolean: sn,
4248
- "string[]": Se,
4249
- enum: Se,
4250
- date: No,
4251
- datetime: ko
4252
- }, Kr = {
4339
+ "string[]": ve,
4340
+ enum: ve,
4341
+ date: zo,
4342
+ datetime: Go
4343
+ }, Qr = {
4253
4344
  lang2value: {
4254
4345
  en: "Update",
4255
4346
  vi: "Cập Nhật"
4256
4347
  },
4257
4348
  lang: "en"
4258
- }, Yr = {
4349
+ }, Zr = {
4259
4350
  lang2value: {
4260
4351
  en: "Clear",
4261
4352
  vi: "Xóa"
4262
4353
  },
4263
4354
  lang: "en"
4264
- }, Wr = ({
4355
+ }, ei = ({
4265
4356
  db: e,
4266
4357
  property: n,
4267
4358
  InputComponent: t,
@@ -4283,13 +4374,13 @@ const Ur = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Hi = (e) => {
4283
4374
  t = zt[n.datatype];
4284
4375
  }
4285
4376
  const a = _(() => {
4286
- var c;
4287
- return r === void 0 || (c = r(i).errorMessage) == null ? void 0 : c.t({ args: { name: n.label } });
4377
+ var d;
4378
+ return r === void 0 || (d = r(i).errorMessage) == null ? void 0 : d.t({ args: { name: n.label } });
4288
4379
  }, [r, i, n.label]);
4289
- return /* @__PURE__ */ l.jsxs(W, { gap: 5, children: [
4290
- /* @__PURE__ */ l.jsxs(A, { gutter: "sm", children: [
4380
+ return /* @__PURE__ */ l.jsxs(Y, { gap: 5, children: [
4381
+ /* @__PURE__ */ l.jsxs(N, { gutter: "sm", children: [
4291
4382
  /* @__PURE__ */ l.jsx(
4292
- A.Col,
4383
+ N.Col,
4293
4384
  {
4294
4385
  span: o.labelCol,
4295
4386
  style: {
@@ -4299,16 +4390,16 @@ const Ur = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Hi = (e) => {
4299
4390
  children: /* @__PURE__ */ l.jsx(
4300
4391
  un,
4301
4392
  {
4302
- label: /* @__PURE__ */ l.jsx(T, { value: n.label }),
4393
+ label: /* @__PURE__ */ l.jsx(b, { value: n.label }),
4303
4394
  name: n.name,
4304
4395
  required: n.isRequired,
4305
- tooltip: n.description !== void 0 ? /* @__PURE__ */ l.jsx(T, { value: n.description }) : void 0,
4396
+ tooltip: n.description !== void 0 ? /* @__PURE__ */ l.jsx(b, { value: n.description }) : void 0,
4306
4397
  align: o.align
4307
4398
  }
4308
4399
  )
4309
4400
  }
4310
4401
  ),
4311
- /* @__PURE__ */ l.jsx(A.Col, { span: o.itemCol, children: /* @__PURE__ */ l.jsx(
4402
+ /* @__PURE__ */ l.jsx(N.Col, { span: o.itemCol, children: /* @__PURE__ */ l.jsx(
4312
4403
  t,
4313
4404
  {
4314
4405
  db: e,
@@ -4318,36 +4409,36 @@ const Ur = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Hi = (e) => {
4318
4409
  }
4319
4410
  ) })
4320
4411
  ] }),
4321
- a !== void 0 && /* @__PURE__ */ l.jsxs(A, { gutter: "sm", children: [
4322
- /* @__PURE__ */ l.jsx(A.Col, { span: o.labelCol }),
4323
- /* @__PURE__ */ l.jsx(A.Col, { span: o.itemCol, children: /* @__PURE__ */ l.jsx(X.Error, { children: a }) })
4412
+ a !== void 0 && /* @__PURE__ */ l.jsxs(N, { gutter: "sm", children: [
4413
+ /* @__PURE__ */ l.jsx(N.Col, { span: o.labelCol }),
4414
+ /* @__PURE__ */ l.jsx(N.Col, { span: o.itemCol, children: /* @__PURE__ */ l.jsx(J.Error, { children: a }) })
4324
4415
  ] })
4325
4416
  ] });
4326
4417
  };
4327
- function Xr({
4418
+ function ti({
4328
4419
  properties: e,
4329
4420
  queryConditions: n
4330
4421
  }) {
4331
4422
  return e.reduce((t, o) => n[o.property.tsName] === void 0 ? t : t + 1, 0);
4332
4423
  }
4333
- const Jr = (e, n) => on(e, n, !1);
4334
- function Qr({
4424
+ const ni = (e, n) => on(e, n, !1);
4425
+ function oi({
4335
4426
  properties: e,
4336
4427
  queryConditions: n
4337
4428
  }) {
4338
- const t = io.getInstance().getLocale(), o = [];
4429
+ const t = so.getInstance().getLocale(), o = [];
4339
4430
  for (const r of e) {
4340
4431
  const i = n[r.property.tsName];
4341
4432
  if (i !== void 0)
4342
4433
  if (o.length > 0 && o.push(" & "), r.property.datatype === "date" || r.property.datatype === "datetime") {
4343
- const s = r.property.datatype === "date" ? Ce : Jr;
4344
- i.op === "bti" ? (o.push(s(t, Q(i.value[0]).toDate())), o.push(" ≤ "), o.push(he(t, r.property.label)), o.push(" ≤ "), o.push(s(t, Q(i.value[1]).toDate()))) : i.op === "gte" ? (o.push(he(t, r.property.label)), o.push(" ≥ "), o.push(s(t, Q(i.value).toDate()))) : i.op === "lte" && (o.push(he(t, r.property.label)), o.push(" ≤ "), o.push(s(t, Q(i.value).toDate())));
4434
+ const s = r.property.datatype === "date" ? we : ni;
4435
+ i.op === "bti" ? (o.push(s(t, Z(i.value[0]).toDate())), o.push(" ≤ "), o.push(Se(t, r.property.label)), o.push(" ≤ "), o.push(s(t, Z(i.value[1]).toDate()))) : i.op === "gte" ? (o.push(Se(t, r.property.label)), o.push(" ≥ "), o.push(s(t, Z(i.value).toDate()))) : i.op === "lte" && (o.push(Se(t, r.property.label)), o.push(" ≤ "), o.push(s(t, Z(i.value).toDate())));
4345
4436
  } else
4346
- o.push(he(t, r.property.label)), i.op === "eq" ? o.push(" = ") : o.push(` ${i.op} `), o.push(i.value.toString());
4437
+ o.push(Se(t, r.property.label)), i.op === "eq" ? o.push(" = ") : o.push(` ${i.op} `), o.push(i.value.toString());
4347
4438
  }
4348
4439
  return o.join("");
4349
4440
  }
4350
- const Zr = ({
4441
+ const ri = ({
4351
4442
  db: e,
4352
4443
  properties: n,
4353
4444
  styles: t,
@@ -4356,74 +4447,74 @@ const Zr = ({
4356
4447
  onChange: i,
4357
4448
  queryConditions: s
4358
4449
  }) => {
4359
- const [a, u] = $({});
4360
- De(() => {
4361
- const g = {};
4450
+ const [a, u] = M({});
4451
+ Ve(() => {
4452
+ const f = {};
4362
4453
  for (const h of n) {
4363
4454
  const v = s[h.property.tsName];
4364
- v !== void 0 && (h.property.datatype === "date" || h.property.datatype === "datetime" ? v.op === "bti" ? g[h.property.tsName] = {
4455
+ v !== void 0 && (h.property.datatype === "date" || h.property.datatype === "datetime" ? v.op === "bti" ? f[h.property.tsName] = {
4365
4456
  start: v.value[0] ? new Date(v.value[0]) : void 0,
4366
4457
  end: v.value[1] ? new Date(v.value[1]) : void 0
4367
- } : v.op === "gte" ? g[h.property.tsName] = {
4458
+ } : v.op === "gte" ? f[h.property.tsName] = {
4368
4459
  start: v.value ? new Date(v.value) : void 0,
4369
4460
  end: void 0
4370
- } : v.op === "lte" && (g[h.property.tsName] = {
4461
+ } : v.op === "lte" && (f[h.property.tsName] = {
4371
4462
  start: void 0,
4372
4463
  end: v.value ? new Date(v.value) : void 0
4373
- }) : g[h.property.tsName] = v.value);
4464
+ }) : f[h.property.tsName] = v.value);
4374
4465
  }
4375
- u(g);
4466
+ u(f);
4376
4467
  }, [n, s]);
4377
- const [c, f, m] = _(() => {
4378
- const g = [], h = {}, v = {};
4379
- for (const C of n) {
4380
- let y, w = (F) => {
4381
- if (!It.isEmpty(F))
4382
- return { op: "eq", value: F };
4468
+ const [d, g, m] = _(() => {
4469
+ const f = [], h = {}, v = {};
4470
+ for (const S of n) {
4471
+ let R, y = (I) => {
4472
+ if (!It.isEmpty(I))
4473
+ return { op: "eq", value: I };
4383
4474
  };
4384
- (C.property.datatype === "date" || C.property.datatype === "datetime") && (y = It.validateTimeRange, w = (F) => F.start !== void 0 && F.end !== void 0 ? {
4475
+ (S.property.datatype === "date" || S.property.datatype === "datetime") && (R = It.validateTimeRange, y = (I) => I.start !== void 0 && I.end !== void 0 ? {
4385
4476
  op: "bti",
4386
- value: [F.start.toISOString(), F.end.toISOString()]
4387
- } : F.start !== void 0 ? { op: "gte", value: F.start.toISOString() } : F.end !== void 0 ? { op: "lte", value: F.end.toISOString() } : void 0), h[C.property.tsName] = w, v[C.property.tsName] = y, g.push(
4477
+ value: [I.start.toISOString(), I.end.toISOString()]
4478
+ } : I.start !== void 0 ? { op: "gte", value: I.start.toISOString() } : I.end !== void 0 ? { op: "lte", value: I.end.toISOString() } : void 0), h[S.property.tsName] = y, v[S.property.tsName] = R, f.push(
4388
4479
  /* @__PURE__ */ l.jsx(
4389
- Wr,
4480
+ ei,
4390
4481
  {
4391
4482
  db: e,
4392
- property: C.property,
4393
- InputComponent: C.InputComponent,
4394
- value: a[C.property.tsName],
4395
- onChange: (F) => {
4396
- u({ ...a, [C.property.tsName]: F });
4483
+ property: S.property,
4484
+ InputComponent: S.InputComponent,
4485
+ value: a[S.property.tsName],
4486
+ onChange: (I) => {
4487
+ u({ ...a, [S.property.tsName]: I });
4397
4488
  },
4398
4489
  layout: r,
4399
- validator: y
4490
+ validator: R
4400
4491
  },
4401
- C.property.name
4492
+ S.property.name
4402
4493
  )
4403
4494
  );
4404
4495
  }
4405
- return [g, h, v];
4406
- }, [n, a, u]), p = (g) => {
4496
+ return [f, h, v];
4497
+ }, [n, a, u]), p = (f) => {
4407
4498
  const h = {};
4408
4499
  for (const v of n) {
4409
- if (g[v.property.tsName] === void 0) continue;
4410
- const C = f[v.property.tsName](g[v.property.tsName]);
4411
- C !== void 0 && (h[v.property.tsName] = C);
4500
+ if (f[v.property.tsName] === void 0) continue;
4501
+ const S = g[v.property.tsName](f[v.property.tsName]);
4502
+ S !== void 0 && (h[v.property.tsName] = S);
4412
4503
  }
4413
4504
  i(h);
4414
- }, d = _(() => (g) => {
4505
+ }, c = _(() => (f) => {
4415
4506
  for (const h of n) {
4416
4507
  const v = m[h.property.tsName];
4417
- if (v !== void 0 && !v(g[h.property.tsName]).isValid)
4508
+ if (v !== void 0 && !v(f[h.property.tsName]).isValid)
4418
4509
  return !1;
4419
4510
  }
4420
4511
  return !0;
4421
4512
  }, [n, m]);
4422
- return /* @__PURE__ */ l.jsxs(W, { gap: "sm", className: o, style: t, children: [
4423
- c,
4424
- /* @__PURE__ */ l.jsxs(L, { gap: "sm", justify: "flex-end", children: [
4513
+ return /* @__PURE__ */ l.jsxs(Y, { gap: "sm", className: o, style: t, children: [
4514
+ d,
4515
+ /* @__PURE__ */ l.jsxs(O, { gap: "sm", justify: "flex-end", children: [
4425
4516
  /* @__PURE__ */ l.jsx(
4426
- H,
4517
+ z,
4427
4518
  {
4428
4519
  variant: "light",
4429
4520
  size: "xs",
@@ -4432,28 +4523,28 @@ const Zr = ({
4432
4523
  u({}), p({});
4433
4524
  },
4434
4525
  disabled: Object.keys(a).length === 0,
4435
- children: /* @__PURE__ */ l.jsx(T, { value: Yr })
4526
+ children: /* @__PURE__ */ l.jsx(b, { value: Zr })
4436
4527
  }
4437
4528
  ),
4438
4529
  /* @__PURE__ */ l.jsx(
4439
- H,
4530
+ z,
4440
4531
  {
4441
4532
  variant: "light",
4442
4533
  size: "xs",
4443
4534
  onClick: () => p(a),
4444
- disabled: !d(a),
4445
- children: /* @__PURE__ */ l.jsx(T, { value: Kr })
4535
+ disabled: !c(a),
4536
+ children: /* @__PURE__ */ l.jsx(b, { value: Qr })
4446
4537
  }
4447
4538
  )
4448
4539
  ] })
4449
4540
  ] });
4450
- }, Gt = /* @__PURE__ */ l.jsx(oo, { size: 16, stroke: 1.5 }), Ht = /* @__PURE__ */ l.jsx(ut, { size: 16, stroke: 1.5 }), ei = {
4541
+ }, Gt = /* @__PURE__ */ l.jsx(ro, { size: 16, stroke: 1.5 }), Ht = /* @__PURE__ */ l.jsx(ut, { size: 16, stroke: 1.5 }), ii = {
4451
4542
  lang2value: {
4452
4543
  en: "Search By",
4453
4544
  vi: "Tìm Kiếm Theo"
4454
4545
  },
4455
4546
  lang: "en"
4456
- }, qi = ({
4547
+ }, Wi = ({
4457
4548
  query: e,
4458
4549
  onChange: n,
4459
4550
  debounceTime: t = 250,
@@ -4461,16 +4552,16 @@ const Zr = ({
4461
4552
  searchField: r,
4462
4553
  advancedSearch: i
4463
4554
  }) => {
4464
- const s = B(re), [a, u] = $(e), [c, f] = $(!1), [m, p] = $([!1, Date.now()]), d = _(() => lo(
4555
+ const s = U(re), [a, u] = M(e), [d, g] = M(!1), [m, p] = M([!1, Date.now()]), c = _(() => ao(
4465
4556
  t,
4466
- (C) => {
4467
- f(!1), n(C);
4557
+ (S) => {
4558
+ g(!1), n(S);
4468
4559
  },
4469
4560
  { atBegin: !1 }
4470
- ), [t, n]), g = _(() => (C) => {
4471
- u(C.target.value), f(!0), d(C.target.value);
4472
- }, [u, f, d]);
4473
- o === void 0 && r !== void 0 && (o = ei);
4561
+ ), [t, n]), f = _(() => (S) => {
4562
+ u(S.target.value), g(!0), c(S.target.value);
4563
+ }, [u, g, c]);
4564
+ o === void 0 && r !== void 0 && (o = ii);
4474
4565
  let h = "";
4475
4566
  if (o !== void 0 && (h = o.lang2value[s.language] || o.lang2value[o.lang]), r !== void 0 && (h.length > 0 && (h += " "), h += r.lang2value[s.language] || r.lang2value[r.lang]), i === void 0)
4476
4567
  return /* @__PURE__ */ l.jsx(
@@ -4479,14 +4570,14 @@ const Zr = ({
4479
4570
  flex: 1,
4480
4571
  label: "Search",
4481
4572
  placeholder: h,
4482
- leftSection: c ? Gt : Ht,
4573
+ leftSection: d ? Gt : Ht,
4483
4574
  value: a,
4484
- onChange: g
4575
+ onChange: f
4485
4576
  }
4486
4577
  );
4487
- const v = Xr(i);
4578
+ const v = ti(i);
4488
4579
  return /* @__PURE__ */ l.jsxs(
4489
- Oe,
4580
+ de,
4490
4581
  {
4491
4582
  width: "target",
4492
4583
  trapFocus: !0,
@@ -4498,13 +4589,13 @@ const Zr = ({
4498
4589
  p([!1, Date.now()]);
4499
4590
  },
4500
4591
  children: [
4501
- /* @__PURE__ */ l.jsx(Oe.Target, { children: /* @__PURE__ */ l.jsx(
4592
+ /* @__PURE__ */ l.jsx(de.Target, { children: /* @__PURE__ */ l.jsx(
4502
4593
  _t,
4503
4594
  {
4504
4595
  flex: 1,
4505
4596
  label: "Search",
4506
4597
  placeholder: h,
4507
- leftSection: c ? Gt : Ht,
4598
+ leftSection: d ? Gt : Ht,
4508
4599
  rightSection: /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
4509
4600
  /* @__PURE__ */ l.jsx(
4510
4601
  Ft,
@@ -4514,7 +4605,7 @@ const Zr = ({
4514
4605
  onClick: () => {
4515
4606
  u(""), n("");
4516
4607
  },
4517
- children: /* @__PURE__ */ l.jsx(to, { size: 16, stroke: 1.5, cursor: "pointer" })
4608
+ children: /* @__PURE__ */ l.jsx(no, { size: 16, stroke: 1.5, cursor: "pointer" })
4518
4609
  }
4519
4610
  ),
4520
4611
  /* @__PURE__ */ l.jsx(
@@ -4527,7 +4618,7 @@ const Zr = ({
4527
4618
  m[1] + 200 >= Date.now() || p([!0, Date.now()]);
4528
4619
  },
4529
4620
  children: /* @__PURE__ */ l.jsx(
4530
- no,
4621
+ oo,
4531
4622
  {
4532
4623
  size: 16,
4533
4624
  stroke: v > 0 ? 2 : 1.5,
@@ -4542,13 +4633,13 @@ const Zr = ({
4542
4633
  ] }),
4543
4634
  rightSectionWidth: 68,
4544
4635
  value: a,
4545
- onChange: g,
4546
- description: Qr(i),
4636
+ onChange: f,
4637
+ description: oi(i),
4547
4638
  inputWrapperOrder: ["label", "input", "description", "error"]
4548
4639
  }
4549
4640
  ) }),
4550
- /* @__PURE__ */ l.jsx(Oe.Dropdown, { children: /* @__PURE__ */ l.jsx(
4551
- Zr,
4641
+ /* @__PURE__ */ l.jsx(de.Dropdown, { children: /* @__PURE__ */ l.jsx(
4642
+ ri,
4552
4643
  {
4553
4644
  db: i.db,
4554
4645
  properties: i.properties,
@@ -4562,7 +4653,7 @@ const Zr = ({
4562
4653
  ]
4563
4654
  }
4564
4655
  );
4565
- }, ti = oe(
4656
+ }, si = oe(
4566
4657
  ({
4567
4658
  store: e,
4568
4659
  record: n,
@@ -4574,40 +4665,40 @@ const Zr = ({
4574
4665
  return /* @__PURE__ */ l.jsx("div", {});
4575
4666
  const i = dt(n, t);
4576
4667
  return /* @__PURE__ */ l.jsxs("div", { children: [
4577
- /* @__PURE__ */ l.jsx(P, { size: "sm", fw: 550, children: /* @__PURE__ */ l.jsx(T, { value: t.label }) }),
4668
+ /* @__PURE__ */ l.jsx(E, { size: "sm", fw: 550, children: /* @__PURE__ */ l.jsx(b, { value: t.label }) }),
4578
4669
  i !== void 0 && /* @__PURE__ */ l.jsx(o, { db: e.db, property: t, value: i })
4579
4670
  ] });
4580
4671
  }
4581
- ), ni = 12, oi = (e) => {
4582
- const n = e.schema, t = _(() => e.fieldGroups.map((o, r) => ri(n, e.store, e.record, r, o)), [n, e.store, e.record, e.fieldGroups]);
4583
- return /* @__PURE__ */ l.jsx(W, { gap: "sm", className: e.className, style: e.styles, children: t });
4672
+ ), li = 12, ai = (e) => {
4673
+ const n = e.schema, t = _(() => e.fieldGroups.map((o, r) => ui(n, e.store, e.record, r, o)), [n, e.store, e.record, e.fieldGroups]);
4674
+ return /* @__PURE__ */ l.jsx(Y, { gap: "sm", className: e.className, style: e.styles, children: t });
4584
4675
  };
4585
- function ri(e, n, t, o, r) {
4676
+ function ui(e, n, t, o, r) {
4586
4677
  const i = r.fields, s = [];
4587
4678
  for (let a = 0; a < i.length; a++) {
4588
- const u = ni / i[a].length;
4679
+ const u = li / i[a].length;
4589
4680
  if (!Number.isInteger(u))
4590
4681
  throw new Error(`Span must be an integer, but got ${u} for row ${a}`);
4591
- for (let c = 0; c < i[a].length; c++) {
4592
- const f = i[a][c];
4682
+ for (let d = 0; d < i[a].length; d++) {
4683
+ const g = i[a][d];
4593
4684
  let m;
4594
- typeof f == "function" ? m = f(n, t) : typeof f == "object" && "prop" in f ? m = st(
4685
+ typeof g == "function" ? m = g(n, t) : typeof g == "object" && "prop" in g ? m = st(
4595
4686
  n,
4596
4687
  t,
4597
- f.prop instanceof K ? f.prop : e.allProperties[f.prop],
4598
- f.args
4688
+ g.prop instanceof W ? g.prop : e.allProperties[g.prop],
4689
+ g.args
4599
4690
  ) : m = st(
4600
4691
  n,
4601
4692
  t,
4602
- f instanceof K ? f : e.allProperties[f]
4693
+ g instanceof W ? g : e.allProperties[g]
4603
4694
  ), s.push(
4604
- /* @__PURE__ */ l.jsx(A.Col, { span: u, children: m }, `${a}-${c}`)
4695
+ /* @__PURE__ */ l.jsx(N.Col, { span: u, children: m }, `${a}-${d}`)
4605
4696
  );
4606
4697
  }
4607
4698
  }
4608
- return /* @__PURE__ */ l.jsx(A, { gutter: "sm", children: s }, o);
4699
+ return /* @__PURE__ */ l.jsx(N, { gutter: "sm", children: s }, o);
4609
4700
  }
4610
- function Bi(e, n, t = {}) {
4701
+ function Xi(e, n, t = {}) {
4611
4702
  return (o, r) => {
4612
4703
  if (t.visible !== void 0 && !t.visible(r))
4613
4704
  return /* @__PURE__ */ l.jsx("div", {});
@@ -4616,13 +4707,13 @@ function Bi(e, n, t = {}) {
4616
4707
  if (typeof s == "function")
4617
4708
  u = s(o, r);
4618
4709
  else {
4619
- let c, f = {};
4620
- typeof s == "object" && "prop" in s ? (c = s.prop instanceof K ? s.prop : e.allProperties[s.prop], s.args !== void 0 && (f = s.args)) : c = s instanceof K ? s : e.allProperties[s], u = st(o, r, c, f);
4710
+ let d, g = {};
4711
+ typeof s == "object" && "prop" in s ? (d = s.prop instanceof W ? s.prop : e.allProperties[s.prop], s.args !== void 0 && (g = s.args)) : d = s instanceof W ? s : e.allProperties[s], u = st(o, r, d, g);
4621
4712
  }
4622
4713
  return /* @__PURE__ */ l.jsx("div", { children: u }, a);
4623
4714
  });
4624
4715
  return /* @__PURE__ */ l.jsx(
4625
- L,
4716
+ O,
4626
4717
  {
4627
4718
  gap: t.flexGap,
4628
4719
  grow: t.flexGrow ?? !0,
@@ -4632,19 +4723,19 @@ function Bi(e, n, t = {}) {
4632
4723
  );
4633
4724
  };
4634
4725
  }
4635
- function ii(e) {
4726
+ function di(e) {
4636
4727
  if (se(e))
4637
4728
  return e.cardinality === "N:N" || e.cardinality === "1:N" ? mt : ft;
4638
- if (ce[e.datatype] === void 0)
4729
+ if (ge[e.datatype] === void 0)
4639
4730
  throw new Error(
4640
4731
  `No display component found for datatype ${e.datatype}`
4641
4732
  );
4642
- return ce[e.datatype];
4733
+ return ge[e.datatype];
4643
4734
  }
4644
4735
  function st(e, n, t, o = {}) {
4645
4736
  let r;
4646
- return o.display !== void 0 ? r = o.display : r = ii(t instanceof K ? t.leafProperty : t), /* @__PURE__ */ l.jsx(
4647
- ti,
4737
+ return o.display !== void 0 ? r = o.display : r = di(t instanceof W ? t.leafProperty : t), /* @__PURE__ */ l.jsx(
4738
+ si,
4648
4739
  {
4649
4740
  store: e,
4650
4741
  record: n,
@@ -4654,10 +4745,10 @@ function st(e, n, t, o = {}) {
4654
4745
  }
4655
4746
  );
4656
4747
  }
4657
- const Ui = (e) => /* @__PURE__ */ l.jsxs(Re, { defaultValue: e.fieldTabs[0].tabName, children: [
4658
- /* @__PURE__ */ l.jsx(Re.List, { children: e.fieldTabs.map((n, t) => /* @__PURE__ */ l.jsx(Re.Tab, { value: n.tabName, children: n.tabName }, t)) }),
4659
- e.fieldTabs.map((n, t) => /* @__PURE__ */ l.jsx(Re.Panel, { value: n.tabName, pt: "sm", children: /* @__PURE__ */ l.jsx(
4660
- oi,
4748
+ const Ji = (e) => /* @__PURE__ */ l.jsxs(je, { defaultValue: e.fieldTabs[0].tabName, children: [
4749
+ /* @__PURE__ */ l.jsx(je.List, { children: e.fieldTabs.map((n, t) => /* @__PURE__ */ l.jsx(je.Tab, { value: n.tabName, children: n.tabName }, t)) }),
4750
+ e.fieldTabs.map((n, t) => /* @__PURE__ */ l.jsx(je.Panel, { value: n.tabName, pt: "sm", children: /* @__PURE__ */ l.jsx(
4751
+ ai,
4661
4752
  {
4662
4753
  schema: e.schema,
4663
4754
  store: e.store,
@@ -4670,85 +4761,86 @@ const Ui = (e) => /* @__PURE__ */ l.jsxs(Re, { defaultValue: e.fieldTabs[0].tabN
4670
4761
  ] });
4671
4762
  export {
4672
4763
  sn as BooleanInput,
4673
- Ai as ConfirmationInput,
4674
- Vi as ConfirmationLabel,
4764
+ Oi as ConfirmationInput,
4765
+ Li as ConfirmationLabel,
4675
4766
  Qe as CountryFlagComponent,
4676
4767
  dn as DEFAULT_LAYOUT,
4677
- qr as DEFAULT_PAGINATION_POSITIONS,
4678
- ce as DataType2DisplayComponent,
4768
+ Wr as DEFAULT_PAGINATION_POSITIONS,
4769
+ ge as DataType2DisplayComponent,
4679
4770
  Vt as DataType2InputComponent,
4680
- wo as DateDisplay,
4681
- Po as DateInput,
4682
- No as DateRangeInput,
4683
- Co as DateTimeDisplay,
4684
- bi as DateTimeHideTimeDisplay,
4685
- ko as DateTimeRangeInput,
4686
- qo as EmbeddedFormItem,
4687
- fo as EmojiCountryFlag,
4688
- Eo as EnumInput,
4689
- zo as FormItem,
4771
+ yo as DateDisplay,
4772
+ bo as DateInput,
4773
+ zo as DateRangeInput,
4774
+ jo as DateTimeDisplay,
4775
+ Ni as DateTimeHideTimeDisplay,
4776
+ Go as DateTimeRangeInput,
4777
+ Ko as EmbeddedFormItem,
4778
+ mo as EmojiCountryFlag,
4779
+ Do as EnumInput,
4780
+ Bo as FormItem,
4690
4781
  cn as FormItemInner,
4691
4782
  un as FormItemLabel,
4692
- Si as LanguageSelector,
4693
- xi as Loading,
4694
- Ri as LoadingInline,
4783
+ Ri as LanguageSelector,
4784
+ Fi as Loading,
4785
+ Ii as LoadingInline,
4695
4786
  re as LocaleContext,
4696
- hi as LocaleProvider,
4697
- vo as MenuTrie,
4787
+ xi as LocaleProvider,
4788
+ Co as MenuTrie,
4698
4789
  mt as MultiForeignKeyDisplay,
4699
4790
  an as MultiForeignKeyInput,
4700
- T as MultiLingualString,
4701
- yi as NotAuthorized,
4702
- Ci as NotFound,
4791
+ b as MultiLingualString,
4792
+ Pi as NotAuthorized,
4793
+ yi as NotFound,
4703
4794
  Qt as NotFoundInline,
4704
- wi as NotFoundSubPage,
4705
- Me as NumberInput,
4706
- Ii as OrderedUniqueList,
4795
+ _i as NotFoundSubPage,
4796
+ be as NumberInput,
4797
+ bi as OrderedUniqueList,
4707
4798
  et as Permission,
4708
- Ti as SPAN_COL,
4709
- go as SVGCountryFlag,
4710
- Zr as SearchForm,
4711
- Wr as SearchFormItem,
4799
+ Ro as PopConfirm,
4800
+ zi as SPAN_COL,
4801
+ fo as SVGCountryFlag,
4802
+ ri as SearchForm,
4803
+ ei as SearchFormItem,
4712
4804
  nn as SeraCol,
4713
4805
  gt as SeraContext,
4714
- Di as SeraContextProvider,
4715
- ki as SeraEmbeddedForm,
4716
- Hi as SeraEmbeddedTable,
4717
- Ni as SeraForm,
4806
+ ki as SeraContextProvider,
4807
+ Hi as SeraEmbeddedForm,
4808
+ Ki as SeraEmbeddedTable,
4809
+ Gi as SeraForm,
4718
4810
  tn as SeraRow,
4719
- qi as SeraSearch,
4720
- Li as SeraTable,
4721
- Mi as SeraVerticalMenu,
4722
- oi as SeraView,
4723
- Ui as SeraViewTab,
4811
+ Wi as SeraSearch,
4812
+ qi as SeraTable,
4813
+ Ai as SeraVerticalMenu,
4814
+ ai as SeraView,
4815
+ Ji as SeraViewTab,
4724
4816
  ft as SingleForeignKeyDisplay,
4725
4817
  ln as SingleForeignKeyInput,
4726
4818
  ct as TestIdContext,
4727
- Pi as TestIdProvider,
4728
- Se as TextInput,
4819
+ Di as TestIdProvider,
4820
+ ve as TextInput,
4729
4821
  Zt as Trie,
4730
4822
  bt as TrieNode,
4731
- po as buildMenuItemIndex,
4732
- V as countryFlags,
4733
- So as filterAllowedItems,
4823
+ ho as buildMenuItemIndex,
4824
+ A as countryFlags,
4825
+ vo as filterAllowedItems,
4734
4826
  gn as getInputComponent,
4735
- Xr as getNumberOfFilters,
4827
+ ti as getNumberOfFilters,
4736
4828
  dt as getPropertyValue,
4737
- Qr as getReadableFilters,
4738
- $i as getTestIdProps,
4739
- ji as groupBy,
4740
- _i as groupByAsList,
4741
- Bi as groupFields,
4742
- Go as isHorizontalLayout,
4829
+ oi as getReadableFilters,
4830
+ Ti as getTestIdProps,
4831
+ Ei as groupBy,
4832
+ $i as groupByAsList,
4833
+ Xi as groupFields,
4834
+ Uo as isHorizontalLayout,
4743
4835
  $n as isSeraColumn,
4744
- Gi as makeEmbeddedTableColumns,
4836
+ Yi as makeEmbeddedTableColumns,
4745
4837
  En as makeTableColumn,
4746
- Oi as makeTableColumnFromNestedProperty,
4747
- zi as makeTableColumns,
4838
+ Bi as makeTableColumnFromNestedProperty,
4839
+ Ui as makeTableColumns,
4748
4840
  Ze as setPropertyValue,
4749
- he as translateMultiLingualString,
4750
- Fi as uniqueList,
4751
- vi as useMultiLingualString,
4752
- Y as usePropertyTestId,
4753
- Ei as useTestId
4841
+ Se as translateMultiLingualString,
4842
+ Mi as uniqueList,
4843
+ ji as useMultiLingualString,
4844
+ X as usePropertyTestId,
4845
+ Vi as useTestId
4754
4846
  };