@espresso-lab/mantine-data-table 2.2.2 → 2.2.3

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.es.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import * as e from "react";
2
2
  import t, { Fragment as n, createContext as r, createElement as i, useCallback as a, useContext as o, useEffect as s, useLayoutEffect as c, useMemo as l, useRef as u, useState as d } from "react";
3
3
  import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
4
- import { Accordion as h, ActionIcon as g, Alert as _, Box as v, Button as y, Center as b, Checkbox as x, Collapse as S, Divider as C, Flex as w, Group as T, Indicator as E, Loader as D, Menu as O, MenuDropdown as k, MenuItem as A, MenuTarget as j, Modal as M, NumberInput as N, Pagination as P, Popover as F, PopoverDropdown as ee, PopoverTarget as I, ScrollArea as L, Select as R, Skeleton as te, Stack as z, Stepper as ne, Table as re, TableTd as ie, TableTfoot as ae, TableTh as oe, TableThead as se, TableTr as ce, Tabs as le, Text as B, TextInput as ue, Textarea as de, Title as fe, createSafeContext as pe, parseThemeColor as me, rem as he, useDirection as ge, useMantineTheme as _e } from "@mantine/core";
5
- import { DateInput as ve } from "@mantine/dates";
6
- import { useForm as ye } from "@mantine/form";
7
- import { IconCaretDownFilled as be, IconChevronRight as xe, IconDotsVertical as Se, IconFilter as Ce, IconInfoCircle as we, IconPencil as Te, IconRefresh as Ee, IconSortAscending as De, IconSortDescending as Oe, IconTrash as ke } from "@tabler/icons-react";
8
- import { useClickOutside as Ae, useDisclosure as je, useLocalStorage as V, useMediaQuery as Me, useMergedRef as Ne, useTimeout as Pe } from "@mantine/hooks";
4
+ import { Accordion as h, ActionIcon as g, Alert as _, Box as v, Button as y, Center as b, Checkbox as x, Collapse as S, Divider as C, Flex as w, Group as T, Indicator as E, Loader as D, Menu as O, MenuDropdown as k, MenuItem as A, MenuTarget as j, Modal as M, NumberInput as N, Pagination as P, Popover as F, PopoverDropdown as ee, PopoverTarget as I, ScrollArea as L, Select as R, Skeleton as z, Stack as B, Stepper as te, Table as ne, TableTd as re, TableTfoot as ie, TableTh as ae, TableThead as oe, TableTr as se, Tabs as ce, Text as V, TextInput as le, Textarea as ue, Title as de, createSafeContext as fe, parseThemeColor as pe, rem as me, useDirection as he, useMantineTheme as ge } from "@mantine/core";
5
+ import { DateInput as _e } from "@mantine/dates";
6
+ import { useForm as ve } from "@mantine/form";
7
+ import { IconCaretDownFilled as ye, IconChevronRight as be, IconDotsVertical as xe, IconFilter as Se, IconInfoCircle as Ce, IconPencil as we, IconRefresh as Te, IconSortAscending as Ee, IconSortDescending as De, IconTrash as Oe } from "@tabler/icons-react";
8
+ import { useClickOutside as ke, useDisclosure as Ae, useLocalStorage as H, useMediaQuery as je, useMergedRef as Me, useTimeout as Ne } from "@mantine/hooks";
9
9
  //#region node_modules/@tanstack/query-core/build/modern/subscribable.js
10
- var Fe = class {
10
+ var Pe = class {
11
11
  constructor() {
12
12
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
13
13
  }
@@ -21,7 +21,7 @@ var Fe = class {
21
21
  }
22
22
  onSubscribe() {}
23
23
  onUnsubscribe() {}
24
- }, Ie = new class extends Fe {
24
+ }, Fe = new class extends Pe {
25
25
  #e;
26
26
  #t;
27
27
  #n;
@@ -58,13 +58,13 @@ var Fe = class {
58
58
  isFocused() {
59
59
  return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
60
60
  }
61
- }(), Le = {
61
+ }(), Ie = {
62
62
  setTimeout: (e, t) => setTimeout(e, t),
63
63
  clearTimeout: (e) => clearTimeout(e),
64
64
  setInterval: (e, t) => setInterval(e, t),
65
65
  clearInterval: (e) => clearInterval(e)
66
- }, Re = new class {
67
- #e = Le;
66
+ }, Le = new class {
67
+ #e = Ie;
68
68
  #t = !1;
69
69
  setTimeoutProvider(e) {
70
70
  process.env.NODE_ENV !== "production" && this.#t && e !== this.#e && console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.", {
@@ -85,87 +85,87 @@ var Fe = class {
85
85
  this.#e.clearInterval(e);
86
86
  }
87
87
  }();
88
- function ze(e) {
88
+ function Re(e) {
89
89
  setTimeout(e, 0);
90
90
  }
91
91
  //#endregion
92
92
  //#region node_modules/@tanstack/query-core/build/modern/utils.js
93
- var Be = typeof window > "u" || "Deno" in globalThis;
94
- function Ve() {}
95
- function He(e) {
93
+ var ze = typeof window > "u" || "Deno" in globalThis;
94
+ function Be() {}
95
+ function Ve(e) {
96
96
  return typeof e == "number" && e >= 0 && e !== Infinity;
97
97
  }
98
- function Ue(e, t) {
98
+ function He(e, t) {
99
99
  return Math.max(e + (t || 0) - Date.now(), 0);
100
100
  }
101
- function H(e, t) {
101
+ function U(e, t) {
102
102
  return typeof e == "function" ? e(t) : e;
103
103
  }
104
- function U(e, t) {
104
+ function W(e, t) {
105
105
  return typeof e == "function" ? e(t) : e;
106
106
  }
107
- function We(e) {
108
- return JSON.stringify(e, (e, t) => Je(t) ? Object.keys(t).sort().reduce((e, n) => (e[n] = t[n], e), {}) : t);
107
+ function Ue(e) {
108
+ return JSON.stringify(e, (e, t) => qe(t) ? Object.keys(t).sort().reduce((e, n) => (e[n] = t[n], e), {}) : t);
109
109
  }
110
- var Ge = Object.prototype.hasOwnProperty;
111
- function Ke(e, t, n = 0) {
110
+ var We = Object.prototype.hasOwnProperty;
111
+ function Ge(e, t, n = 0) {
112
112
  if (e === t) return e;
113
113
  if (n > 500) return t;
114
- let r = qe(e) && qe(t);
115
- if (!r && !(Je(e) && Je(t))) return t;
114
+ let r = Ke(e) && Ke(t);
115
+ if (!r && !(qe(e) && qe(t))) return t;
116
116
  let i = (r ? e : Object.keys(e)).length, a = r ? t : Object.keys(t), o = a.length, s = r ? Array(o) : {}, c = 0;
117
117
  for (let l = 0; l < o; l++) {
118
118
  let o = r ? l : a[l], u = e[o], d = t[o];
119
119
  if (u === d) {
120
- s[o] = u, (r ? l < i : Ge.call(e, o)) && c++;
120
+ s[o] = u, (r ? l < i : We.call(e, o)) && c++;
121
121
  continue;
122
122
  }
123
123
  if (u === null || d === null || typeof u != "object" || typeof d != "object") {
124
124
  s[o] = d;
125
125
  continue;
126
126
  }
127
- let f = Ke(u, d, n + 1);
127
+ let f = Ge(u, d, n + 1);
128
128
  s[o] = f, f === u && c++;
129
129
  }
130
130
  return i === o && c === i ? e : s;
131
131
  }
132
- function W(e, t) {
132
+ function G(e, t) {
133
133
  if (!t || Object.keys(e).length !== Object.keys(t).length) return !1;
134
134
  for (let n in e) if (e[n] !== t[n]) return !1;
135
135
  return !0;
136
136
  }
137
- function qe(e) {
137
+ function Ke(e) {
138
138
  return Array.isArray(e) && e.length === Object.keys(e).length;
139
139
  }
140
- function Je(e) {
141
- if (!Ye(e)) return !1;
140
+ function qe(e) {
141
+ if (!Je(e)) return !1;
142
142
  let t = e.constructor;
143
143
  if (t === void 0) return !0;
144
144
  let n = t.prototype;
145
- return !(!Ye(n) || !n.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
145
+ return !(!Je(n) || !n.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
146
146
  }
147
- function Ye(e) {
147
+ function Je(e) {
148
148
  return Object.prototype.toString.call(e) === "[object Object]";
149
149
  }
150
- function Xe(e, t, n) {
150
+ function Ye(e, t, n) {
151
151
  if (typeof n.structuralSharing == "function") return n.structuralSharing(e, t);
152
152
  if (n.structuralSharing !== !1) {
153
153
  if (process.env.NODE_ENV !== "production") try {
154
- return Ke(e, t);
154
+ return Ge(e, t);
155
155
  } catch (e) {
156
156
  throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${e}`), e;
157
157
  }
158
- return Ke(e, t);
158
+ return Ge(e, t);
159
159
  }
160
160
  return t;
161
161
  }
162
- function G(e, t) {
162
+ function Xe(e, t) {
163
163
  return typeof e == "function" ? e(...t) : !!e;
164
164
  }
165
165
  //#endregion
166
166
  //#region node_modules/@tanstack/query-core/build/modern/environmentManager.js
167
167
  var Ze = /* @__PURE__ */ (() => {
168
- let e = () => Be;
168
+ let e = () => ze;
169
169
  return {
170
170
  isServer() {
171
171
  return e();
@@ -199,7 +199,7 @@ function Qe() {
199
199
  }
200
200
  //#endregion
201
201
  //#region node_modules/@tanstack/query-core/build/modern/notifyManager.js
202
- var $e = ze;
202
+ var $e = Re;
203
203
  function et() {
204
204
  let e = [], t = 0, n = (e) => {
205
205
  e();
@@ -247,7 +247,7 @@ function et() {
247
247
  }
248
248
  };
249
249
  }
250
- var tt = et(), nt = new class extends Fe {
250
+ var tt = et(), nt = new class extends Pe {
251
251
  #e = !0;
252
252
  #t;
253
253
  #n;
@@ -299,7 +299,7 @@ function it(e, t) {
299
299
  }
300
300
  //#endregion
301
301
  //#region node_modules/@tanstack/query-core/build/modern/queryObserver.js
302
- var at = class extends Fe {
302
+ var at = class extends Pe {
303
303
  constructor(e, t) {
304
304
  super(), this.options = t, this.#e = e, this.#s = null, this.#o = Qe(), this.bindMethods(), this.setOptions(t);
305
305
  }
@@ -338,16 +338,16 @@ var at = class extends Fe {
338
338
  }
339
339
  setOptions(e) {
340
340
  let t = this.options, n = this.#t;
341
- if (this.options = this.#e.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof U(this.options.enabled, this.#t) != "boolean") throw Error("Expected enabled to be a boolean or a callback that returns a boolean");
342
- this.#S(), this.#t.setOptions(this.options), t._defaulted && !W(this.options, t) && this.#e.getQueryCache().notify({
341
+ if (this.options = this.#e.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof W(this.options.enabled, this.#t) != "boolean") throw Error("Expected enabled to be a boolean or a callback that returns a boolean");
342
+ this.#S(), this.#t.setOptions(this.options), t._defaulted && !G(this.options, t) && this.#e.getQueryCache().notify({
343
343
  type: "observerOptionsUpdated",
344
344
  query: this.#t,
345
345
  observer: this
346
346
  });
347
347
  let r = this.hasListeners();
348
- r && lt(this.#t, n, this.options, t) && this.#h(), this.updateResult(), r && (this.#t !== n || U(this.options.enabled, this.#t) !== U(t.enabled, this.#t) || H(this.options.staleTime, this.#t) !== H(t.staleTime, this.#t)) && this.#g();
348
+ r && lt(this.#t, n, this.options, t) && this.#h(), this.updateResult(), r && (this.#t !== n || W(this.options.enabled, this.#t) !== W(t.enabled, this.#t) || U(this.options.staleTime, this.#t) !== U(t.staleTime, this.#t)) && this.#g();
349
349
  let i = this.#_();
350
- r && (this.#t !== n || U(this.options.enabled, this.#t) !== U(t.enabled, this.#t) || i !== this.#p) && this.#v(i);
350
+ r && (this.#t !== n || W(this.options.enabled, this.#t) !== W(t.enabled, this.#t) || i !== this.#p) && this.#v(i);
351
351
  }
352
352
  getOptimisticResult(e) {
353
353
  let t = this.#e.getQueryCache().build(this.#e, e), n = this.createResult(t, e);
@@ -381,14 +381,14 @@ var at = class extends Fe {
381
381
  #h(e) {
382
382
  this.#S();
383
383
  let t = this.#t.fetch(this.options, e);
384
- return e?.throwOnError || (t = t.catch(Ve)), t;
384
+ return e?.throwOnError || (t = t.catch(Be)), t;
385
385
  }
386
386
  #g() {
387
387
  this.#b();
388
- let e = H(this.options.staleTime, this.#t);
389
- if (Ze.isServer() || this.#r.isStale || !He(e)) return;
390
- let t = Ue(this.#r.dataUpdatedAt, e) + 1;
391
- this.#d = Re.setTimeout(() => {
388
+ let e = U(this.options.staleTime, this.#t);
389
+ if (Ze.isServer() || this.#r.isStale || !Ve(e)) return;
390
+ let t = He(this.#r.dataUpdatedAt, e) + 1;
391
+ this.#d = Le.setTimeout(() => {
392
392
  this.#r.isStale || this.updateResult();
393
393
  }, t);
394
394
  }
@@ -396,18 +396,18 @@ var at = class extends Fe {
396
396
  return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
397
397
  }
398
398
  #v(e) {
399
- this.#x(), this.#p = e, !(Ze.isServer() || U(this.options.enabled, this.#t) === !1 || !He(this.#p) || this.#p === 0) && (this.#f = Re.setInterval(() => {
400
- (this.options.refetchIntervalInBackground || Ie.isFocused()) && this.#h();
399
+ this.#x(), this.#p = e, !(Ze.isServer() || W(this.options.enabled, this.#t) === !1 || !Ve(this.#p) || this.#p === 0) && (this.#f = Le.setInterval(() => {
400
+ (this.options.refetchIntervalInBackground || Fe.isFocused()) && this.#h();
401
401
  }, this.#p));
402
402
  }
403
403
  #y() {
404
404
  this.#g(), this.#v(this.#_());
405
405
  }
406
406
  #b() {
407
- this.#d !== void 0 && (Re.clearTimeout(this.#d), this.#d = void 0);
407
+ this.#d !== void 0 && (Le.clearTimeout(this.#d), this.#d = void 0);
408
408
  }
409
409
  #x() {
410
- this.#f !== void 0 && (Re.clearInterval(this.#f), this.#f = void 0);
410
+ this.#f !== void 0 && (Le.clearInterval(this.#f), this.#f = void 0);
411
411
  }
412
412
  createResult(e, t) {
413
413
  let n = this.#t, r = this.options, i = this.#r, a = this.#i, o = this.#a, s = e === n ? this.#n : e.state, { state: c } = e, l = { ...c }, u = !1, d;
@@ -423,11 +423,11 @@ var at = class extends Fe {
423
423
  let h = !1;
424
424
  if (t.placeholderData !== void 0 && d === void 0 && m === "pending") {
425
425
  let e;
426
- i?.isPlaceholderData && t.placeholderData === o?.placeholderData ? (e = i.data, h = !0) : e = typeof t.placeholderData == "function" ? t.placeholderData(this.#u?.state.data, this.#u) : t.placeholderData, e !== void 0 && (m = "success", d = Xe(i?.data, e, t), u = !0);
426
+ i?.isPlaceholderData && t.placeholderData === o?.placeholderData ? (e = i.data, h = !0) : e = typeof t.placeholderData == "function" ? t.placeholderData(this.#u?.state.data, this.#u) : t.placeholderData, e !== void 0 && (m = "success", d = Ye(i?.data, e, t), u = !0);
427
427
  }
428
428
  if (t.select && d !== void 0 && !h) if (i && d === a?.data && t.select === this.#c) d = this.#l;
429
429
  else try {
430
- this.#c = t.select, d = t.select(d), d = Xe(i?.data, d, t), this.#l = d, this.#s = null;
430
+ this.#c = t.select, d = t.select(d), d = Ye(i?.data, d, t), this.#l = d, this.#s = null;
431
431
  } catch (e) {
432
432
  this.#s = e;
433
433
  }
@@ -458,7 +458,7 @@ var at = class extends Fe {
458
458
  isStale: ut(e, t),
459
459
  refetch: this.refetch,
460
460
  promise: this.#o,
461
- isEnabled: U(t.enabled, e) !== !1
461
+ isEnabled: W(t.enabled, e) !== !1
462
462
  };
463
463
  if (this.options.experimental_prefetchInRender) {
464
464
  let t = x.data !== void 0, r = x.status === "error" && !t, i = (e) => {
@@ -482,7 +482,7 @@ var at = class extends Fe {
482
482
  }
483
483
  updateResult() {
484
484
  let e = this.#r, t = this.createResult(this.#t, this.options);
485
- this.#i = this.#t.state, this.#a = this.options, this.#i.data !== void 0 && (this.#u = this.#t), !W(t, e) && (this.#r = t, this.#C({ listeners: (() => {
485
+ this.#i = this.#t.state, this.#a = this.options, this.#i.data !== void 0 && (this.#u = this.#t), !G(t, e) && (this.#r = t, this.#C({ listeners: (() => {
486
486
  if (!e) return !0;
487
487
  let { notifyOnChangeProps: t } = this.options, n = typeof t == "function" ? t() : t;
488
488
  if (n === "all" || !n && !this.#m.size) return !0;
@@ -514,26 +514,26 @@ var at = class extends Fe {
514
514
  }
515
515
  };
516
516
  function ot(e, t) {
517
- return U(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && U(t.retryOnMount, e) === !1);
517
+ return W(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && W(t.retryOnMount, e) === !1);
518
518
  }
519
519
  function st(e, t) {
520
520
  return ot(e, t) || e.state.data !== void 0 && ct(e, t, t.refetchOnMount);
521
521
  }
522
522
  function ct(e, t, n) {
523
- if (U(t.enabled, e) !== !1 && H(t.staleTime, e) !== "static") {
523
+ if (W(t.enabled, e) !== !1 && U(t.staleTime, e) !== "static") {
524
524
  let r = typeof n == "function" ? n(e) : n;
525
525
  return r === "always" || r !== !1 && ut(e, t);
526
526
  }
527
527
  return !1;
528
528
  }
529
529
  function lt(e, t, n, r) {
530
- return (e !== t || U(r.enabled, e) === !1) && (!n.suspense || e.state.status !== "error") && ut(e, n);
530
+ return (e !== t || W(r.enabled, e) === !1) && (!n.suspense || e.state.status !== "error") && ut(e, n);
531
531
  }
532
532
  function ut(e, t) {
533
- return U(t.enabled, e) !== !1 && e.isStaleByTime(H(t.staleTime, e));
533
+ return W(t.enabled, e) !== !1 && e.isStaleByTime(U(t.staleTime, e));
534
534
  }
535
535
  function dt(e, t) {
536
- return !W(e.getCurrentResult(), t);
536
+ return !G(e.getCurrentResult(), t);
537
537
  }
538
538
  //#endregion
539
539
  //#region node_modules/@tanstack/query-core/build/modern/mutation.js
@@ -552,7 +552,7 @@ function K() {
552
552
  }
553
553
  //#endregion
554
554
  //#region node_modules/@tanstack/query-core/build/modern/mutationObserver.js
555
- var ft = class extends Fe {
555
+ var ft = class extends Pe {
556
556
  #e;
557
557
  #t = void 0;
558
558
  #n;
@@ -565,11 +565,11 @@ var ft = class extends Fe {
565
565
  }
566
566
  setOptions(e) {
567
567
  let t = this.options;
568
- this.options = this.#e.defaultMutationOptions(e), W(this.options, t) || this.#e.getMutationCache().notify({
568
+ this.options = this.#e.defaultMutationOptions(e), G(this.options, t) || this.#e.getMutationCache().notify({
569
569
  type: "observerOptionsUpdated",
570
570
  mutation: this.#n,
571
571
  observer: this
572
- }), t?.mutationKey && this.options.mutationKey && We(t.mutationKey) !== We(this.options.mutationKey) ? this.reset() : this.#n?.state.status === "pending" && this.#n.setOptions(this.options);
572
+ }), t?.mutationKey && this.options.mutationKey && Ue(t.mutationKey) !== Ue(this.options.mutationKey) ? this.reset() : this.#n?.state.status === "pending" && this.#n.setOptions(this.options);
573
573
  }
574
574
  onUnsubscribe() {
575
575
  this.hasListeners() || this.#n?.removeObserver(this);
@@ -662,13 +662,13 @@ function _t() {
662
662
  };
663
663
  }
664
664
  var vt = e.createContext(_t()), yt = () => e.useContext(vt), bt = (e, t, n) => {
665
- let r = n?.state.error && typeof e.throwOnError == "function" ? G(e.throwOnError, [n.state.error, n]) : e.throwOnError;
665
+ let r = n?.state.error && typeof e.throwOnError == "function" ? Xe(e.throwOnError, [n.state.error, n]) : e.throwOnError;
666
666
  (e.suspense || e.experimental_prefetchInRender || r) && (t.isReset() || (e.retryOnMount = !1));
667
667
  }, xt = (t) => {
668
668
  e.useEffect(() => {
669
669
  t.clearReset();
670
670
  }, [t]);
671
- }, St = ({ result: e, errorResetBoundary: t, throwOnError: n, query: r, suspense: i }) => e.isError && !t.isReset() && !e.isFetching && r && (i && e.data === void 0 || G(n, [e.error, r])), Ct = (e) => {
671
+ }, St = ({ result: e, errorResetBoundary: t, throwOnError: n, query: r, suspense: i }) => e.isError && !t.isReset() && !e.isFetching && r && (i && e.data === void 0 || Xe(n, [e.error, r])), Ct = (e) => {
672
672
  if (e.suspense) {
673
673
  let t = 1e3, n = (e) => e === "static" ? e : Math.max(e ?? t, t), r = e.staleTime;
674
674
  e.staleTime = typeof r == "function" ? (...e) => n(r(...e)) : n(r), typeof e.gcTime == "number" && (e.gcTime = Math.max(e.gcTime, t));
@@ -688,7 +688,7 @@ function Dt(t, n, r) {
688
688
  s._optimisticResults = i ? "isRestoring" : l ? "optimistic" : void 0, Ct(s), bt(s, a, c), xt(a);
689
689
  let u = !o.getQueryCache().get(s.queryHash), [d] = e.useState(() => new n(o, s)), f = d.getOptimisticResult(s), p = !i && l;
690
690
  if (e.useSyncExternalStore(e.useCallback((e) => {
691
- let t = p ? d.subscribe(tt.batchCalls(e)) : Ve;
691
+ let t = p ? d.subscribe(tt.batchCalls(e)) : Be;
692
692
  return d.updateResult(), t;
693
693
  }, [d, p]), () => d.getCurrentResult(), () => d.getCurrentResult()), e.useEffect(() => {
694
694
  d.setOptions(s);
@@ -700,7 +700,7 @@ function Dt(t, n, r) {
700
700
  query: c,
701
701
  suspense: s.suspense
702
702
  })) throw f.error;
703
- return o.getDefaultOptions().queries?._experimental_afterQuery?.(s, f), s.experimental_prefetchInRender && !Ze.isServer() && wt(f, i) && (u ? Et(s, d, a) : c?.promise)?.catch(Ve).finally(() => {
703
+ return o.getDefaultOptions().queries?._experimental_afterQuery?.(s, f), s.experimental_prefetchInRender && !Ze.isServer() && wt(f, i) && (u ? Et(s, d, a) : c?.promise)?.catch(Be).finally(() => {
704
704
  d.updateResult();
705
705
  }), s.notifyOnChangeProps ? f : d.trackResult(f);
706
706
  }
@@ -717,9 +717,9 @@ function kt(t, n) {
717
717
  i.setOptions(t);
718
718
  }, [i, t]);
719
719
  let a = e.useSyncExternalStore(e.useCallback((e) => i.subscribe(tt.batchCalls(e)), [i]), () => i.getCurrentResult(), () => i.getCurrentResult()), o = e.useCallback((e, t) => {
720
- i.mutate(e, t).catch(Ve);
720
+ i.mutate(e, t).catch(Be);
721
721
  }, [i]);
722
- if (a.error && G(i.options.throwOnError, [a.error])) throw a.error;
722
+ if (a.error && Xe(i.options.throwOnError, [a.error])) throw a.error;
723
723
  return {
724
724
  ...a,
725
725
  mutate: o,
@@ -898,7 +898,7 @@ function tn(e, t) {
898
898
  return r.length > 0 ? r.map((e) => e.message).join(", ") : void 0;
899
899
  }
900
900
  function nn({ fields: e, steps: t, record: r, recordId: i, submitting: a, error: o, onPersist: c, onClose: l }) {
901
- let [u, h] = d(0), [g, v] = d(!1), b = ye({
901
+ let [u, h] = d(0), [g, v] = d(!1), b = ve({
902
902
  mode: "uncontrolled",
903
903
  initialValues: Yt(e),
904
904
  validate: Xt(e)
@@ -923,7 +923,7 @@ function nn({ fields: e, steps: t, record: r, recordId: i, submitting: a, error:
923
923
  required: n,
924
924
  ...r
925
925
  }, b.key(e.id));
926
- case "date": return /* @__PURE__ */ p(ve, {
926
+ case "date": return /* @__PURE__ */ p(_e, {
927
927
  valueFormat: "DD.MM.YYYY",
928
928
  clearable: !0,
929
929
  label: e.column.title,
@@ -937,7 +937,7 @@ function nn({ fields: e, steps: t, record: r, recordId: i, submitting: a, error:
937
937
  required: n,
938
938
  ...b.getInputProps(e.id, { type: "checkbox" })
939
939
  }, b.key(e.id));
940
- case "textarea": return /* @__PURE__ */ p(de, {
940
+ case "textarea": return /* @__PURE__ */ p(ue, {
941
941
  minRows: 3,
942
942
  autosize: !0,
943
943
  label: e.column.title,
@@ -952,7 +952,7 @@ function nn({ fields: e, steps: t, record: r, recordId: i, submitting: a, error:
952
952
  error: r.error,
953
953
  required: n
954
954
  });
955
- default: return /* @__PURE__ */ p(ue, {
955
+ default: return /* @__PURE__ */ p(le, {
956
956
  type: e.id.includes("email") ? "email" : void 0,
957
957
  label: e.column.title,
958
958
  placeholder: e.placeholder ?? "",
@@ -980,10 +980,10 @@ function nn({ fields: e, steps: t, record: r, recordId: i, submitting: a, error:
980
980
  }
981
981
  E && !D ? h((e) => e + 1) : (b.setInitialValues(t), b.reset(), l());
982
982
  }),
983
- children: [E ? /* @__PURE__ */ p(ne, {
983
+ children: [E ? /* @__PURE__ */ p(te, {
984
984
  active: u,
985
985
  size: "sm",
986
- children: w.map((e) => /* @__PURE__ */ p(ne.Step, {
986
+ children: w.map((e) => /* @__PURE__ */ p(te.Step, {
987
987
  ...t?.[e - 1] ? { label: t[e - 1].label } : {},
988
988
  children: k(e)
989
989
  }, e))
@@ -1043,7 +1043,7 @@ function X() {
1043
1043
  //#endregion
1044
1044
  //#region node_modules/mantine-datatable/dist/index.mjs
1045
1045
  function Z(e, t, n) {
1046
- return e ? me({
1046
+ return e ? pe({
1047
1047
  color: typeof e == "object" ? e[n] : e,
1048
1048
  theme: t
1049
1049
  }).value : void 0;
@@ -1080,7 +1080,7 @@ function cn({ theme: e, color: t, backgroundColor: n }) {
1080
1080
  "--mantine-datatable-row-background-color-dark": Z(n, e, "dark")
1081
1081
  };
1082
1082
  }
1083
- var [ln, un] = pe("useDataTableColumnsContext must be used within DataTableColumnProvider"), dn = (e) => {
1083
+ var [ln, un] = fe("useDataTableColumnsContext must be used within DataTableColumnProvider"), dn = (e) => {
1084
1084
  let { children: t, columnsOrder: n, setColumnsOrder: r, columnsToggle: i, setColumnsToggle: a, columnsPinning: o, setColumnsPinning: s, resetColumnsOrder: c, resetColumnsToggle: l, resetColumnsPinning: u, setColumnWidth: f, setMultipleColumnWidths: m, resetColumnsWidth: h, beginResize: g, endResize: _, pinnedMap: v } = e, [y, b] = d(""), [x, S] = d("");
1085
1085
  return p(ln, {
1086
1086
  value: {
@@ -1150,7 +1150,7 @@ function mn({ icon: e, text: t, active: n, children: r }) {
1150
1150
  children: r || m(f, { children: [e || p("div", {
1151
1151
  className: "mantine-datatable-empty-state-icon",
1152
1152
  children: p(pn, {})
1153
- }), p(B, {
1153
+ }), p(V, {
1154
1154
  component: "div",
1155
1155
  size: "sm",
1156
1156
  c: "dimmed",
@@ -1158,17 +1158,59 @@ function mn({ icon: e, text: t, active: n, children: r }) {
1158
1158
  })] })
1159
1159
  });
1160
1160
  }
1161
- function hn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1161
+ function hn(e) {
1162
+ let t = e.replace(/([a-z\d])([A-Z]+)/g, "$1 $2").replace(/\W|_/g, " ").trim().toLowerCase();
1163
+ return `${t.charAt(0).toUpperCase()}${t.slice(1)}`;
1164
+ }
1165
+ function gn(e, t, n) {
1166
+ return !Array.isArray(e) || n && !e.every(n) ? t : e;
1167
+ }
1168
+ function _n(e) {
1169
+ return typeof e == "object" && !!e && typeof e.accessor == "string";
1170
+ }
1171
+ function vn(e, t, n) {
1172
+ return e.filter((e) => !t.map(n).includes(n(e)));
1173
+ }
1174
+ function yn(e, t) {
1175
+ return e.filter((e, n, r) => n === r.findIndex((n) => t(e) === t(n)));
1176
+ }
1177
+ function bn(e, t) {
1178
+ return t ? t.match(/([^[.\]])+/g).reduce((e, t) => e && e[t], e) : void 0;
1179
+ }
1180
+ function Q(e, t) {
1181
+ return typeof t == "string" ? bn(e, t) : t(e);
1182
+ }
1183
+ function xn(e) {
1184
+ return !e || e.length === 0 ? 0 : Math.max(...e.map((e) => e.groups && e.groups.length > 0 ? 1 + xn(e.groups) : 1));
1185
+ }
1186
+ function Sn(e) {
1187
+ let t = [];
1188
+ for (let n of e) n.columns && n.columns.length > 0 ? t.push(...n.columns.filter((e) => e != null)) : n.groups && n.groups.length > 0 && t.push(...Sn(n.groups));
1189
+ return t.filter((e) => e != null);
1190
+ }
1191
+ function Cn(e, t) {
1192
+ return e.columns && e.columns.length > 0 ? e.columns.filter((e, n) => e.hidden ? !1 : t ? t[n] !== !1 : !0).length : e.groups && e.groups.length > 0 ? e.groups.reduce((e, n) => e + Cn(n, t), 0) : 0;
1193
+ }
1194
+ function wn(e, t, n = 0) {
1195
+ if (n === t) return [...e];
1196
+ let r = [];
1197
+ for (let i of e) i.groups && i.groups.length > 0 && r.push(...wn(i.groups, t, n + 1));
1198
+ return r;
1199
+ }
1200
+ function Tn(e, t, n) {
1201
+ return n ? !e || t : !1;
1202
+ }
1203
+ function En({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1162
1204
  let r = l(() => t.map((e) => ({
1163
1205
  accessor: e.accessor,
1164
1206
  defaultPinned: e.pinned,
1165
1207
  pinnable: !!e.pinnable,
1166
1208
  pinned: e.pinned
1167
- })), [t]), [i, a] = V({
1209
+ })), [t]), [i, a] = H({
1168
1210
  key: e ? `${e}-columns-pinning` : "",
1169
1211
  defaultValue: e ? r : void 0,
1170
1212
  getInitialValueInEffect: n
1171
- }), o = i ?? r;
1213
+ }), o = gn(i, r, _n);
1172
1214
  function c(t) {
1173
1215
  e && a(typeof t == "function" ? (e) => t(e ?? r) : t);
1174
1216
  }
@@ -1211,12 +1253,12 @@ function hn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1211
1253
  resetColumnsPinning: d
1212
1254
  };
1213
1255
  }
1214
- function gn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1215
- let r = l(() => t ? t.map((e) => e.accessor) : [], [t]), [i, a] = V({
1256
+ function Dn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1257
+ let r = l(() => t ? t.map((e) => e.accessor) : [], [t]), [i, a] = H({
1216
1258
  key: e ? `${e}-columns-order` : "",
1217
1259
  defaultValue: e ? r : void 0,
1218
1260
  getInitialValueInEffect: n
1219
- }), o = i ?? r;
1261
+ }), o = gn(i, r, (e) => typeof e == "string");
1220
1262
  function c(t) {
1221
1263
  e && a(t);
1222
1264
  }
@@ -1254,16 +1296,16 @@ function gn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1254
1296
  resetColumnsOrder: d
1255
1297
  };
1256
1298
  }
1257
- function _n({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef: r }) {
1258
- let i = l(() => t.some((e) => e.resizable && !e.hidden && e.accessor !== "__selection__"), [t]), o = a(() => t.filter((e) => e.accessor !== "__selection__").map((e) => ({ [e.accessor]: e.width ?? "auto" })), [t]), [c, f] = V({
1299
+ function On({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef: r }) {
1300
+ let i = l(() => t.some((e) => e.resizable && !e.hidden && e.accessor !== "__selection__"), [t]), o = a(() => t.filter((e) => e.accessor !== "__selection__").map((e) => ({ [e.accessor]: e.width ?? "auto" })), [t]), [c, f] = H({
1259
1301
  key: e ? `${e}-columns-width` : "",
1260
1302
  defaultValue: e ? o() : void 0,
1261
1303
  getInitialValueInEffect: n
1262
- }), [p, m] = d(() => e && c && c.length > 0 ? c : o()), [h, g] = d(!1), _ = u(!1);
1304
+ }), p = gn(c, [], (e) => typeof e == "object" && !!e), [m, h] = d(() => e && p.length > 0 ? p : o()), [g, _] = d(!1), v = u(!1);
1263
1305
  s(() => {
1264
- e && (!c || c.length === 0 || m(c));
1265
- }, [e, c]), s(() => {
1266
- m((e) => {
1306
+ e && (!p || p.length === 0 || h(p));
1307
+ }, [e, p]), s(() => {
1308
+ h((e) => {
1267
1309
  let n = new Set(t.filter((e) => e.accessor !== "__selection__").map((e) => String(e.accessor))), r = e.filter((e) => n.has(Object.keys(e)[0])), i = new Set(r.map((e) => Object.keys(e)[0])), a = !1;
1268
1310
  for (let e of t) {
1269
1311
  if (e.accessor === "__selection__") continue;
@@ -1273,30 +1315,30 @@ function _n({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRe
1273
1315
  return r.length !== e.length || a ? r : e;
1274
1316
  });
1275
1317
  }, [t]);
1276
- let v = a((e) => {
1318
+ let y = a((e) => {
1277
1319
  let t = e.filter((e) => e.accessor !== "__selection__");
1278
- t.length !== 0 && (_.current = !0, m((e) => e.map((e) => {
1320
+ t.length !== 0 && (v.current = !0, h((e) => e.map((e) => {
1279
1321
  let n = Object.keys(e)[0], r = t.find((e) => e.accessor === n);
1280
1322
  return r ? { [n]: r.width } : e;
1281
1323
  })));
1282
1324
  }, []);
1283
1325
  s(() => {
1284
- !e || !_.current || h || (_.current = !1, f(p));
1326
+ !e || !v.current || g || (v.current = !1, f(m));
1285
1327
  }, [
1286
1328
  e,
1287
- p,
1288
- h,
1329
+ m,
1330
+ g,
1289
1331
  f
1290
1332
  ]);
1291
- let y = a((e, t) => {
1292
- v([{
1333
+ let b = a((e, t) => {
1334
+ y([{
1293
1335
  accessor: e,
1294
1336
  width: t
1295
1337
  }]);
1296
- }, [v]), b = a((e) => {
1297
- v(e);
1298
- }, [v]), x = a(() => {
1299
- g(!0);
1338
+ }, [y]), x = a((e) => {
1339
+ y(e);
1340
+ }, [y]), S = a(() => {
1341
+ _(!0);
1300
1342
  let e = r?.current;
1301
1343
  if (!e) return;
1302
1344
  let t = Array.from(e.querySelectorAll("th[data-accessor]"));
@@ -1308,24 +1350,24 @@ function _n({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRe
1308
1350
  let r = Math.round(e.getBoundingClientRect().width);
1309
1351
  n.push({ [t]: `${r}px` });
1310
1352
  }
1311
- _.current = !0, m(n);
1312
- }, [r]), S = a(() => {
1313
- g(!1);
1353
+ v.current = !0, h(n);
1354
+ }, [r]), C = a(() => {
1355
+ _(!1);
1314
1356
  }, []);
1315
1357
  return {
1316
- columnsWidth: p,
1317
- setColumnsWidth: v,
1318
- setColumnWidth: y,
1319
- setMultipleColumnWidths: b,
1358
+ columnsWidth: m,
1359
+ setColumnsWidth: y,
1360
+ setColumnWidth: b,
1361
+ setMultipleColumnWidths: x,
1320
1362
  resetColumnsWidth: a(() => {
1321
1363
  let e = o();
1322
- _.current = !0, m(e), g(!1);
1364
+ v.current = !0, h(e), _(!1);
1323
1365
  }, [o]),
1324
1366
  hasResizableColumns: i,
1325
1367
  allResizableWidthsInitial: l(() => {
1326
1368
  if (!i) return !1;
1327
1369
  let e = t.filter((e) => e.resizable && !e.hidden && e.accessor !== "__selection__");
1328
- return p.filter((t) => {
1370
+ return m.filter((t) => {
1329
1371
  let n = Object.keys(t)[0];
1330
1372
  return e.some((e) => e.accessor === n);
1331
1373
  }).every((e) => {
@@ -1335,25 +1377,25 @@ function _n({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRe
1335
1377
  }, [
1336
1378
  i,
1337
1379
  t,
1338
- p
1380
+ m
1339
1381
  ]),
1340
1382
  measureAndSetColumnWidths: a(() => {}, []),
1341
- isResizing: h,
1342
- beginResize: x,
1343
- endResize: S
1383
+ isResizing: g,
1384
+ beginResize: S,
1385
+ endResize: C
1344
1386
  };
1345
1387
  }
1346
- function vn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1388
+ function kn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1347
1389
  let r = l(() => t?.map((e) => ({
1348
1390
  accessor: e.accessor,
1349
1391
  defaultToggle: e.defaultToggle || !0,
1350
1392
  toggleable: e.toggleable,
1351
1393
  toggled: e.defaultToggle === void 0 ? !0 : e.defaultToggle
1352
- })), [t]), [i, a] = V({
1394
+ })), [t]), [i, a] = H({
1353
1395
  key: e ? `${e}-columns-toggle` : "",
1354
1396
  defaultValue: e ? r : void 0,
1355
1397
  getInitialValueInEffect: n
1356
- }), o = i ?? r;
1398
+ }), o = gn(i, r, _n);
1357
1399
  function c(t) {
1358
1400
  e && a(t);
1359
1401
  }
@@ -1396,20 +1438,20 @@ function vn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1396
1438
  resetColumnsToggle: d
1397
1439
  };
1398
1440
  }
1399
- var yn = ({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef: r, scrollViewportRef: i }) => {
1400
- let { columnsOrder: a, setColumnsOrder: o, resetColumnsOrder: s } = gn({
1441
+ var An = ({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef: r, scrollViewportRef: i }) => {
1442
+ let { columnsOrder: a, setColumnsOrder: o, resetColumnsOrder: s } = Dn({
1401
1443
  key: e,
1402
1444
  columns: t,
1403
1445
  getInitialValueInEffect: n
1404
- }), { columnsToggle: c, setColumnsToggle: u, resetColumnsToggle: d } = vn({
1446
+ }), { columnsToggle: c, setColumnsToggle: u, resetColumnsToggle: d } = kn({
1405
1447
  key: e,
1406
1448
  columns: t,
1407
1449
  getInitialValueInEffect: n
1408
- }), { columnsPinning: f, setColumnsPinning: p, resetColumnsPinning: m } = hn({
1450
+ }), { columnsPinning: f, setColumnsPinning: p, resetColumnsPinning: m } = En({
1409
1451
  key: e,
1410
1452
  columns: t,
1411
1453
  getInitialValueInEffect: n
1412
- }), { columnsWidth: h, setColumnsWidth: g, setColumnWidth: _, setMultipleColumnWidths: v, resetColumnsWidth: y, hasResizableColumns: b, allResizableWidthsInitial: x, measureAndSetColumnWidths: S, isResizing: C, beginResize: w, endResize: T } = _n({
1454
+ }), { columnsWidth: h, setColumnsWidth: g, setColumnWidth: _, setMultipleColumnWidths: v, resetColumnsWidth: y, hasResizableColumns: b, allResizableWidthsInitial: x, measureAndSetColumnWidths: S, isResizing: C, beginResize: w, endResize: T } = On({
1413
1455
  key: e,
1414
1456
  columns: t,
1415
1457
  getInitialValueInEffect: n,
@@ -1486,16 +1528,16 @@ var yn = ({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef:
1486
1528
  beginResize: w,
1487
1529
  endResize: T
1488
1530
  };
1489
- }, bn = typeof window < "u" ? c : s;
1490
- function xn(e) {
1531
+ }, jn = typeof window < "u" ? c : s;
1532
+ function Mn(e) {
1491
1533
  let t = u(e);
1492
1534
  return t.current = e, t;
1493
1535
  }
1494
- var Sn = "--mantine-datatable-header-height", Cn = "--mantine-datatable-footer-height", wn = "--mantine-datatable-selection-column-width", Tn = "--mantine-datatable-last-row-border-bottom";
1495
- function Q(e, t, n) {
1536
+ var Nn = "--mantine-datatable-header-height", Pn = "--mantine-datatable-footer-height", Fn = "--mantine-datatable-selection-column-width", In = "--mantine-datatable-last-row-border-bottom";
1537
+ function $(e, t, n) {
1496
1538
  e?.style.setProperty(t, n);
1497
1539
  }
1498
- function En(e) {
1540
+ function Ln(e) {
1499
1541
  let t = e.borderBoxSize?.[0] || e.contentBoxSize?.[0];
1500
1542
  return t ? {
1501
1543
  width: t.inlineSize,
@@ -1505,18 +1547,18 @@ function En(e) {
1505
1547
  height: e.contentRect.height
1506
1548
  };
1507
1549
  }
1508
- function Dn(e, t, n) {
1550
+ function Rn(e, t, n) {
1509
1551
  if (e) {
1510
1552
  let r = new ResizeObserver((e) => {
1511
1553
  let n = e[0];
1512
- n && t(En(n));
1554
+ n && t(Ln(n));
1513
1555
  });
1514
1556
  return r.observe(e), () => {
1515
1557
  r.disconnect(), n();
1516
1558
  };
1517
1559
  }
1518
1560
  }
1519
- function On({ scrollCallbacks: e, withRowBorders: t }) {
1561
+ function zn({ scrollCallbacks: e, withRowBorders: t }) {
1520
1562
  let n = {
1521
1563
  root: u(null),
1522
1564
  table: u(null),
@@ -1524,16 +1566,16 @@ function On({ scrollCallbacks: e, withRowBorders: t }) {
1524
1566
  header: u(null),
1525
1567
  footer: u(null),
1526
1568
  selectionColumnHeader: u(null)
1527
- }, { root: r, table: i, scrollViewport: o, header: c, footer: l, selectionColumnHeader: d } = n, f = xn({ withRowBorders: t }), p = xn(e), m = u(() => {}), h = u(() => {}), g = a((e) => {
1569
+ }, { root: r, table: i, scrollViewport: o, header: c, footer: l, selectionColumnHeader: d } = n, f = Mn({ withRowBorders: t }), p = Mn(e), m = u(() => {}), h = u(() => {}), g = a((e) => {
1528
1570
  p.current.onScroll?.(e), m.current();
1529
1571
  }, []);
1530
- return s(() => Dn(c.current, (e) => {
1531
- Q(r.current, Sn, `${e.height}px`);
1532
- }, () => Q(r.current, Sn, "0")), [c.current]), s(() => Dn(l.current, (e) => {
1533
- Q(r.current, Cn, `${e.height}px`);
1534
- }, () => Q(r.current, Cn, "0")), [l.current]), s(() => Dn(d.current, (e) => {
1535
- Q(r.current, wn, `${e.width}px`);
1536
- }, () => Q(r.current, wn, "0")), [d.current]), bn(() => {
1572
+ return s(() => Rn(c.current, (e) => {
1573
+ $(r.current, Nn, `${e.height}px`);
1574
+ }, () => $(r.current, Nn, "0")), [c.current]), s(() => Rn(l.current, (e) => {
1575
+ $(r.current, Pn, `${e.height}px`);
1576
+ }, () => $(r.current, Pn, "0")), [l.current]), s(() => Rn(d.current, (e) => {
1577
+ $(r.current, Fn, `${e.width}px`);
1578
+ }, () => $(r.current, Fn, "0")), [d.current]), jn(() => {
1537
1579
  if (typeof window > "u") return;
1538
1580
  let e = {
1539
1581
  top: !0,
@@ -1549,14 +1591,14 @@ function On({ scrollCallbacks: e, withRowBorders: t }) {
1549
1591
  };
1550
1592
  function a(t, n) {
1551
1593
  let i = e[t];
1552
- return e[t] = n, Q(r.current, `--mantine-datatable-${t}-shadow-opacity`, n ? "0" : "1"), i;
1594
+ return e[t] = n, $(r.current, `--mantine-datatable-${t}-shadow-opacity`, n ? "0" : "1"), i;
1553
1595
  }
1554
1596
  function s() {
1555
1597
  let e = t.height - n.height, i = e < 0;
1556
- Q(r.current, "--mantine-datatable-footer-position", i ? "relative" : "sticky"), Q(r.current, "--mantine-datatable-footer-bottom", i ? `${e}px` : "0");
1598
+ $(r.current, "--mantine-datatable-footer-position", i ? "relative" : "sticky"), $(r.current, "--mantine-datatable-footer-bottom", i ? `${e}px` : "0");
1557
1599
  }
1558
1600
  function c() {
1559
- f.current.withRowBorders && t.height < n.height ? Q(r.current, Tn, `${he("1px")} solid var(--mantine-datatable-border-color)`) : Q(r.current, Tn, "unset");
1601
+ f.current.withRowBorders && t.height < n.height ? $(r.current, In, `${me("1px")} solid var(--mantine-datatable-border-color)`) : $(r.current, In, "unset");
1560
1602
  }
1561
1603
  h.current = c;
1562
1604
  function l() {
@@ -1574,10 +1616,10 @@ function On({ scrollCallbacks: e, withRowBorders: t }) {
1574
1616
  let u = new ResizeObserver((e) => {
1575
1617
  for (let r of e) switch (r.target.tagName) {
1576
1618
  case "TABLE":
1577
- t = En(r);
1619
+ t = Ln(r);
1578
1620
  break;
1579
1621
  case "DIV":
1580
- n = En(r);
1622
+ n = Ln(r);
1581
1623
  break;
1582
1624
  }
1583
1625
  l(), s(), c();
@@ -1585,14 +1627,14 @@ function On({ scrollCallbacks: e, withRowBorders: t }) {
1585
1627
  return u.observe(i.current), u.observe(o.current), () => {
1586
1628
  u.disconnect();
1587
1629
  };
1588
- }, []), bn(() => {
1630
+ }, []), jn(() => {
1589
1631
  h.current();
1590
1632
  }, [t]), {
1591
1633
  refs: n,
1592
1634
  onScroll: g
1593
1635
  };
1594
1636
  }
1595
- function kn({ columns: e, theadRef: t, tbodyRef: n, selectionColumnHeaderRef: r, selectionVisible: i, pinFirstColumn: o, pinLastColumn: c }) {
1637
+ function Bn({ columns: e, theadRef: t, tbodyRef: n, selectionColumnHeaderRef: r, selectionVisible: i, pinFirstColumn: o, pinLastColumn: c }) {
1596
1638
  let [l, u] = d(/* @__PURE__ */ new Map()), f = a(() => {
1597
1639
  if (!o && !c && !e.some((e) => e.pinned)) return;
1598
1640
  let a = t.current ?? n.current;
@@ -1674,13 +1716,13 @@ function kn({ columns: e, theadRef: t, tbodyRef: n, selectionColumnHeaderRef: r,
1674
1716
  t,
1675
1717
  n,
1676
1718
  f
1677
- ]), bn(f, [f]), {
1719
+ ]), jn(f, [f]), {
1678
1720
  pinnedMap: l,
1679
1721
  hasLeftPinned: [...l.values()].some((e) => e.logicalSide === "left"),
1680
1722
  hasRightPinned: [...l.values()].some((e) => e.logicalSide === "right")
1681
1723
  };
1682
1724
  }
1683
- function An(e) {
1725
+ function Vn(e) {
1684
1726
  let [t, n] = d(null);
1685
1727
  return s(() => {
1686
1728
  n(null);
@@ -1689,7 +1731,7 @@ function An(e) {
1689
1731
  setLastSelectionChangeIndex: n
1690
1732
  };
1691
1733
  }
1692
- function jn(e, t) {
1734
+ function Hn(e, t) {
1693
1735
  let n = () => {
1694
1736
  t(e.map((e) => e.matches));
1695
1737
  }, r = e.map((e) => {
@@ -1705,84 +1747,48 @@ function jn(e, t) {
1705
1747
  });
1706
1748
  };
1707
1749
  }
1708
- function Mn(e, t) {
1750
+ function Un(e, t) {
1709
1751
  return t || (typeof window < "u" && "matchMedia" in window ? e.map((e) => window.matchMedia(e).matches) : e.map(() => !1));
1710
1752
  }
1711
- function Nn(e, t, { getInitialValueInEffect: n } = { getInitialValueInEffect: !0 }) {
1712
- let [r, i] = d(n ? t : Mn(e, t)), a = u(null);
1753
+ function Wn(e, t, { getInitialValueInEffect: n } = { getInitialValueInEffect: !0 }) {
1754
+ let [r, i] = d(n ? t : Un(e, t)), a = u(null);
1713
1755
  return s(() => {
1714
- if ("matchMedia" in window) return a.current = e.map((e) => window.matchMedia(e)), i(a.current.map((e) => e.matches)), jn(a.current, (e) => {
1756
+ if ("matchMedia" in window) return a.current = e.map((e) => window.matchMedia(e)), i(a.current.map((e) => e.matches)), Hn(a.current, (e) => {
1715
1757
  i(e);
1716
1758
  });
1717
1759
  }, [e]), r;
1718
1760
  }
1719
- function Pn(e) {
1720
- let t = _e();
1721
- return Nn(l(() => e.map((e) => (typeof e == "function" ? e(t) : e) ?? ""), [e, t]), l(() => e.map(() => !0), [e]));
1722
- }
1723
- function Fn(e) {
1724
- let t = _e();
1725
- return Me((typeof e == "function" ? e(t) : e) || "", !0);
1726
- }
1727
- function In(e) {
1728
- let t = e.replace(/([a-z\d])([A-Z]+)/g, "$1 $2").replace(/\W|_/g, " ").trim().toLowerCase();
1729
- return `${t.charAt(0).toUpperCase()}${t.slice(1)}`;
1730
- }
1731
- function Ln(e, t, n) {
1732
- return e.filter((e) => !t.map(n).includes(n(e)));
1733
- }
1734
- function Rn(e, t) {
1735
- return e.filter((e, n, r) => n === r.findIndex((n) => t(e) === t(n)));
1736
- }
1737
- function zn(e, t) {
1738
- return t ? t.match(/([^[.\]])+/g).reduce((e, t) => e && e[t], e) : void 0;
1739
- }
1740
- function $(e, t) {
1741
- return typeof t == "string" ? zn(e, t) : t(e);
1742
- }
1743
- function Bn(e) {
1744
- return !e || e.length === 0 ? 0 : Math.max(...e.map((e) => e.groups && e.groups.length > 0 ? 1 + Bn(e.groups) : 1));
1745
- }
1746
- function Vn(e) {
1747
- let t = [];
1748
- for (let n of e) n.columns && n.columns.length > 0 ? t.push(...n.columns.filter((e) => e != null)) : n.groups && n.groups.length > 0 && t.push(...Vn(n.groups));
1749
- return t.filter((e) => e != null);
1761
+ function Gn(e) {
1762
+ let t = ge();
1763
+ return Wn(l(() => e.map((e) => (typeof e == "function" ? e(t) : e) ?? ""), [e, t]), l(() => e.map(() => !0), [e]));
1750
1764
  }
1751
- function Hn(e, t) {
1752
- return e.columns && e.columns.length > 0 ? e.columns.filter((e, n) => e.hidden ? !1 : t ? t[n] !== !1 : !0).length : e.groups && e.groups.length > 0 ? e.groups.reduce((e, n) => e + Hn(n, t), 0) : 0;
1765
+ function Kn(e) {
1766
+ let t = ge();
1767
+ return je((typeof e == "function" ? e(t) : e) || "", !0);
1753
1768
  }
1754
- function Un(e, t, n = 0) {
1755
- if (n === t) return [...e];
1756
- let r = [];
1757
- for (let i of e) i.groups && i.groups.length > 0 && r.push(...Un(i.groups, t, n + 1));
1758
- return r;
1759
- }
1760
- function Wn(e, t, n) {
1761
- return n ? !e || t : !1;
1762
- }
1763
- function Gn({ rowExpansion: e, records: t, idAccessor: n }) {
1769
+ function qn({ rowExpansion: e, records: t, idAccessor: n }) {
1764
1770
  let r = [];
1765
1771
  if (e && t) {
1766
1772
  let { trigger: i, allowMultiple: a, initiallyExpanded: o } = e;
1767
- t && i === "always" ? r = t.map((e) => $(e, n)) : o && (r = t.filter((e, t) => o({
1773
+ t && i === "always" ? r = t.map((e) => Q(e, n)) : o && (r = t.filter((e, t) => o({
1768
1774
  record: e,
1769
1775
  index: t
1770
- })).map((e) => $(e, n)), a || (r = [r[0]]));
1776
+ })).map((e) => Q(e, n)), a || (r = [r[0]]));
1771
1777
  }
1772
1778
  let i, a, o = d(r);
1773
1779
  if (e) {
1774
1780
  let { expandable: t, trigger: r, allowMultiple: s, collapseProps: c, content: l } = e;
1775
1781
  e.expanded ? {recordIds: i, onRecordIdsChange: a} = e.expanded : [i, a] = o;
1776
- let u = (e) => a?.(i.filter((t) => t !== $(e, n)));
1782
+ let u = (e) => a?.(i.filter((t) => t !== Q(e, n)));
1777
1783
  return {
1778
1784
  expandOnClick: r !== "always" && r !== "never",
1779
- isRowExpanded: (e) => r === "always" ? !0 : i.includes($(e, n)),
1785
+ isRowExpanded: (e) => r === "always" ? !0 : i.includes(Q(e, n)),
1780
1786
  isExpandable: ({ record: e, index: n }) => t ? t({
1781
1787
  record: e,
1782
1788
  index: n
1783
1789
  }) : !0,
1784
1790
  expandRow: (e) => {
1785
- let t = $(e, n);
1791
+ let t = Q(e, n);
1786
1792
  a?.(s ? [...i, t] : [t]);
1787
1793
  },
1788
1794
  collapseRow: u,
@@ -1795,8 +1801,8 @@ function Gn({ rowExpansion: e, records: t, idAccessor: n }) {
1795
1801
  };
1796
1802
  }
1797
1803
  }
1798
- function Kn(e, t) {
1799
- let [n, r] = d(e), [i, a] = d(e), o = Pe(() => r(!0), 0), c = Pe(() => a(!1), t || 200);
1804
+ function Jn(e, t) {
1805
+ let [n, r] = d(e), [i, a] = d(e), o = Ne(() => r(!0), 0), c = Ne(() => a(!1), t || 200);
1800
1806
  return s(() => {
1801
1807
  e ? (c.clear(), a(!0), o.start()) : (o.clear(), r(!1), c.start());
1802
1808
  }, [
@@ -1808,17 +1814,17 @@ function Kn(e, t) {
1808
1814
  visible: i
1809
1815
  };
1810
1816
  }
1811
- var qn = "mantine-datatable-nowrap", Jn = "mantine-datatable-ellipsis", Yn = "mantine-datatable-pointer-cursor", Xn = "mantine-datatable-context-menu-cursor", Zn = "mantine-datatable-text-selection-disabled", Qn = "mantine-datatable-text-align-left", $n = "mantine-datatable-text-align-center", er = "mantine-datatable-text-align-right";
1812
- function tr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, title: i, noWrap: a, ellipsis: o, textAlign: s, width: c }) {
1813
- return Fn(r) ? p(oe, {
1817
+ var Yn = "mantine-datatable-nowrap", Xn = "mantine-datatable-ellipsis", Zn = "mantine-datatable-pointer-cursor", Qn = "mantine-datatable-context-menu-cursor", $n = "mantine-datatable-text-selection-disabled", er = "mantine-datatable-text-align-left", tr = "mantine-datatable-text-align-center", nr = "mantine-datatable-text-align-right";
1818
+ function rr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, title: i, noWrap: a, ellipsis: o, textAlign: s, width: c }) {
1819
+ return Kn(r) ? p(ae, {
1814
1820
  "data-pinned": n?.position,
1815
1821
  "data-pinned-shadow": n?.isBoundary ? n.position : void 0,
1816
1822
  className: X({
1817
- [qn]: a || o,
1818
- [Jn]: o,
1819
- [Qn]: s === "left",
1820
- [$n]: s === "center",
1821
- [er]: s === "right"
1823
+ [Yn]: a || o,
1824
+ [Xn]: o,
1825
+ [er]: s === "left",
1826
+ [tr]: s === "center",
1827
+ [nr]: s === "right"
1822
1828
  }, e),
1823
1829
  style: [
1824
1830
  {
@@ -1836,24 +1842,24 @@ function tr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, title
1836
1842
  children: i
1837
1843
  }) : null;
1838
1844
  }
1839
- function nr({ shadowVisible: e }) {
1840
- return p(oe, {
1845
+ function ir({ shadowVisible: e }) {
1846
+ return p(ae, {
1841
1847
  className: "mantine-datatable-footer-selector-placeholder-cell",
1842
1848
  "data-shadow-visible": e || void 0
1843
1849
  });
1844
1850
  }
1845
- function rr({ className: e, style: t, columns: n, defaultColumnProps: r, pinnedMap: i, selectionVisible: a, selectorCellShadowVisible: o, ref: s }) {
1846
- return p(ae, {
1851
+ function ar({ className: e, style: t, columns: n, defaultColumnProps: r, pinnedMap: i, selectionVisible: a, selectorCellShadowVisible: o, ref: s }) {
1852
+ return p(ie, {
1847
1853
  ref: s,
1848
1854
  className: X("mantine-datatable-footer", e),
1849
1855
  style: t,
1850
- children: m(ce, { children: [a && p(nr, { shadowVisible: o }), n.map(({ hidden: e, ...t }) => {
1856
+ children: m(se, { children: [a && p(ir, { shadowVisible: o }), n.map(({ hidden: e, ...t }) => {
1851
1857
  if (e) return null;
1852
1858
  let { accessor: n, visibleMediaQuery: a, textAlign: o, width: s, footer: c, footerClassName: l, footerStyle: u, noWrap: d, ellipsis: f } = {
1853
1859
  ...r,
1854
1860
  ...t
1855
1861
  };
1856
- return p(tr, {
1862
+ return p(rr, {
1857
1863
  pinnedInfo: i.get(String(n)),
1858
1864
  className: l,
1859
1865
  style: u,
@@ -1867,8 +1873,8 @@ function rr({ className: e, style: t, columns: n, defaultColumnProps: r, pinnedM
1867
1873
  })] })
1868
1874
  });
1869
1875
  }
1870
- function ir({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, className: a, style: o }, pinnedInfo: s, maxDepth: c, currentDepth: u, previousGroups: d, isLastGroup: f, withColumnBorders: m = !1, totalTableColumns: h }) {
1871
- let g = l(() => t && t.length > 0 ? t : n && n.length > 0 ? Vn([{
1876
+ function or({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, className: a, style: o }, pinnedInfo: s, maxDepth: c, currentDepth: u, previousGroups: d, isLastGroup: f, withColumnBorders: m = !1, totalTableColumns: h }) {
1877
+ let g = l(() => t && t.length > 0 ? t : n && n.length > 0 ? Sn([{
1872
1878
  id: e,
1873
1879
  columns: t,
1874
1880
  groups: n
@@ -1876,7 +1882,7 @@ function ir({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, cla
1876
1882
  t,
1877
1883
  n,
1878
1884
  e
1879
- ]), _ = Pn(l(() => g.map(({ visibleMediaQuery: e }) => e), [g])), v = l(() => Hn({
1885
+ ]), _ = Gn(l(() => g.map(({ visibleMediaQuery: e }) => e), [g])), v = l(() => Cn({
1880
1886
  id: e,
1881
1887
  columns: t,
1882
1888
  groups: n
@@ -1885,16 +1891,16 @@ function ir({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, cla
1885
1891
  t,
1886
1892
  n,
1887
1893
  _
1888
- ]), y = l(() => d.reduce((e, t) => e + Hn(t, _), 0), [d, _]), b = n && n.length > 0 ? 1 : c - u, x = Wn(f, y + v < h, m);
1889
- return v > 0 ? p(oe, {
1894
+ ]), y = l(() => d.reduce((e, t) => e + Cn(t, _), 0), [d, _]), b = n && n.length > 0 ? 1 : c - u, x = Tn(f, y + v < h, m);
1895
+ return v > 0 ? p(ae, {
1890
1896
  colSpan: v,
1891
1897
  rowSpan: b > 1 ? b : void 0,
1892
1898
  "data-pinned": s?.position,
1893
1899
  "data-pinned-shadow": s?.isBoundary ? s.position : void 0,
1894
1900
  className: X("mantine-datatable-column-group-header-cell", {
1895
- [Qn]: i === "left",
1896
- [$n]: i === "center",
1897
- [er]: i === "right",
1901
+ [er]: i === "left",
1902
+ [tr]: i === "center",
1903
+ [nr]: i === "right",
1898
1904
  "mantine-datatable-column-group-header-cell--needs-border": x
1899
1905
  }, a),
1900
1906
  style: [o, s && {
@@ -1902,10 +1908,10 @@ function ir({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, cla
1902
1908
  [s.position]: s.offset,
1903
1909
  overflow: "visible"
1904
1910
  }],
1905
- children: r ?? In(e)
1911
+ children: r ?? hn(e)
1906
1912
  }) : null;
1907
1913
  }
1908
- function ar() {
1914
+ function sr() {
1909
1915
  return m("svg", {
1910
1916
  width: "14",
1911
1917
  height: "14",
@@ -1922,7 +1928,7 @@ function ar() {
1922
1928
  }), p("path", { d: "M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" })]
1923
1929
  });
1924
1930
  }
1925
- function or() {
1931
+ function cr() {
1926
1932
  return m("svg", {
1927
1933
  width: "14",
1928
1934
  height: "14",
@@ -1943,8 +1949,8 @@ function or() {
1943
1949
  })]
1944
1950
  });
1945
1951
  }
1946
- function sr({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisableClickOutside: r }) {
1947
- let [i, { close: a, toggle: o }] = je(!1), s = t ? or : ar, c = Ae(a);
1952
+ function lr({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisableClickOutside: r }) {
1953
+ let [i, { close: a, toggle: o }] = Ae(!1), s = t ? cr : sr, c = ke(a);
1948
1954
  return r && (c = void 0), m(F, {
1949
1955
  withArrow: !0,
1950
1956
  shadow: "md",
@@ -1971,7 +1977,7 @@ function sr({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisa
1971
1977
  })]
1972
1978
  });
1973
1979
  }
1974
- function cr() {
1980
+ function ur() {
1975
1981
  return m("svg", {
1976
1982
  width: "14",
1977
1983
  height: "14",
@@ -1993,7 +1999,7 @@ function cr() {
1993
1999
  ]
1994
2000
  });
1995
2001
  }
1996
- function lr() {
2002
+ function dr() {
1997
2003
  return m("svg", {
1998
2004
  width: "14",
1999
2005
  height: "14",
@@ -2015,7 +2021,7 @@ function lr() {
2015
2021
  ]
2016
2022
  });
2017
2023
  }
2018
- function ur() {
2024
+ function fr() {
2019
2025
  return m("svg", {
2020
2026
  width: "14",
2021
2027
  height: "14",
@@ -2037,7 +2043,7 @@ function ur() {
2037
2043
  ]
2038
2044
  });
2039
2045
  }
2040
- function dr() {
2046
+ function pr() {
2041
2047
  return m("svg", {
2042
2048
  width: "14",
2043
2049
  height: "14",
@@ -2058,14 +2064,14 @@ function dr() {
2058
2064
  ]
2059
2065
  });
2060
2066
  }
2061
- function fr({ currentPinned: e, onPinChange: t }) {
2067
+ function mr({ currentPinned: e, onPinChange: t }) {
2062
2068
  let [n, r] = d(!1), i = u(null), [o, c] = d(!1), l = a(() => {
2063
2069
  if (i.current) {
2064
2070
  let e = getComputedStyle(i.current).direction;
2065
2071
  c(e === "rtl");
2066
2072
  }
2067
2073
  }, []);
2068
- bn(() => {
2074
+ jn(() => {
2069
2075
  l();
2070
2076
  }, [l]), s(() => {
2071
2077
  n && l();
@@ -2088,7 +2094,7 @@ function fr({ currentPinned: e, onPinChange: t }) {
2088
2094
  size: "xs",
2089
2095
  variant: "light",
2090
2096
  onClick: (e) => e.stopPropagation(),
2091
- children: p(ur, {})
2097
+ children: p(fr, {})
2092
2098
  })
2093
2099
  }) }), p(F.Dropdown, {
2094
2100
  onClick: (e) => e.stopPropagation(),
@@ -2103,14 +2109,14 @@ function fr({ currentPinned: e, onPinChange: t }) {
2103
2109
  variant: _ ? "filled" : "light",
2104
2110
  onClick: () => t(_ ? void 0 : f),
2105
2111
  "aria-label": "Pin left",
2106
- children: p(cr, {})
2112
+ children: p(ur, {})
2107
2113
  }),
2108
2114
  p(g, {
2109
2115
  size: "sm",
2110
2116
  variant: v ? "filled" : "light",
2111
2117
  onClick: () => t(v ? void 0 : h),
2112
2118
  "aria-label": "Pin right",
2113
- children: p(lr, {})
2119
+ children: p(dr, {})
2114
2120
  }),
2115
2121
  e && p(g, {
2116
2122
  size: "sm",
@@ -2118,18 +2124,18 @@ function fr({ currentPinned: e, onPinChange: t }) {
2118
2124
  color: "red",
2119
2125
  onClick: () => t(void 0),
2120
2126
  "aria-label": "Unpin",
2121
- children: p(dr, {})
2127
+ children: p(pr, {})
2122
2128
  })
2123
2129
  ]
2124
2130
  })
2125
2131
  })]
2126
2132
  });
2127
2133
  }
2128
- var pr = 50, mr = (e) => {
2134
+ var hr = 50, gr = (e) => {
2129
2135
  let { accessor: t, columnRef: n } = e, [r, i] = d(!1), o = u(0), s = u({
2130
2136
  current: 0,
2131
2137
  next: 0
2132
- }), { dir: c } = ge(), l = c === "rtl", { setMultipleColumnWidths: f, beginResize: m, endResize: h } = un(), g = a((e) => {
2138
+ }), { dir: c } = he(), l = c === "rtl", { setMultipleColumnWidths: f, beginResize: m, endResize: h } = un(), g = a((e) => {
2133
2139
  if (e.preventDefault(), e.stopPropagation(), !n.current) return;
2134
2140
  let r = n.current, a = r.nextElementSibling;
2135
2141
  for (; a;) {
@@ -2148,7 +2154,7 @@ var pr = 50, mr = (e) => {
2148
2154
  let p = (e) => {
2149
2155
  let n = e.clientX - o.current;
2150
2156
  l && (n = -n);
2151
- let r = s.current.current - pr, i = s.current.next - pr, a = Math.max(-r, Math.min(n, i)), u = s.current.current + a, d = s.current.next - a;
2157
+ let r = s.current.current - hr, i = s.current.next - hr, a = Math.max(-r, Math.min(n, i)), u = s.current.current + a, d = s.current.next - a;
2152
2158
  f([{
2153
2159
  accessor: t,
2154
2160
  width: `${u}px`
@@ -2195,7 +2201,7 @@ var pr = 50, mr = (e) => {
2195
2201
  title: "Drag to resize column, double-click to reset"
2196
2202
  });
2197
2203
  };
2198
- function hr() {
2204
+ function _r() {
2199
2205
  return m("svg", {
2200
2206
  width: "14",
2201
2207
  height: "14",
@@ -2217,7 +2223,7 @@ function hr() {
2217
2223
  ]
2218
2224
  });
2219
2225
  }
2220
- function gr() {
2226
+ function vr() {
2221
2227
  return m("svg", {
2222
2228
  width: "14",
2223
2229
  height: "14",
@@ -2239,7 +2245,7 @@ function gr() {
2239
2245
  ]
2240
2246
  });
2241
2247
  }
2242
- function _r() {
2248
+ function yr() {
2243
2249
  return m("svg", {
2244
2250
  width: "14",
2245
2251
  height: "14",
@@ -2264,37 +2270,37 @@ function _r() {
2264
2270
  ]
2265
2271
  });
2266
2272
  }
2267
- function vr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQuery: i, title: a, sortable: o, draggable: s, toggleable: c, pinnable: l, resizable: f, sortIcons: h, textAlign: _, width: y, sortStatus: x, onSortStatusChange: S, filter: C, filterPopoverProps: E, filterPopoverDisableClickOutside: D, filtering: O, sortKey: k }) {
2268
- let { setSourceColumn: A, setTargetColumn: j, swapColumns: M, columnsToggle: N, setColumnsToggle: P, columnsPinning: F, setColumnsPinning: ee } = un(), [I, L] = d(!1), R = u(null), te = F?.find((e) => e.accessor === r)?.pinned;
2269
- if (!Fn(i)) return null;
2270
- let z = a ?? In(r), ne = typeof z == "string" ? z : void 0, re = o && S ? (e) => {
2273
+ function br({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQuery: i, title: a, sortable: o, draggable: s, toggleable: c, pinnable: l, resizable: f, sortIcons: h, textAlign: _, width: y, sortStatus: x, onSortStatusChange: S, filter: C, filterPopoverProps: E, filterPopoverDisableClickOutside: D, filtering: O, sortKey: k }) {
2274
+ let { setSourceColumn: A, setTargetColumn: j, swapColumns: M, columnsToggle: N, setColumnsToggle: P, columnsPinning: F, setColumnsPinning: ee } = un(), [I, L] = d(!1), R = u(null), z = F?.find((e) => e.accessor === r)?.pinned;
2275
+ if (!Kn(i)) return null;
2276
+ let B = a ?? hn(r), te = typeof B == "string" ? B : void 0, ne = o && S ? (e) => {
2271
2277
  e?.defaultPrevented || S({
2272
2278
  sortKey: k,
2273
2279
  columnAccessor: r,
2274
2280
  direction: x?.columnAccessor === r ? x.direction === "asc" ? "desc" : "asc" : x?.direction ?? "asc"
2275
2281
  });
2276
- } : void 0, ie = (e) => {
2282
+ } : void 0, re = (e) => {
2277
2283
  e.stopPropagation(), A(r), L(!1);
2278
- }, ae = (e) => {
2284
+ }, ie = (e) => {
2279
2285
  e.preventDefault(), j(r), L(!0);
2280
- }, se = () => {
2286
+ }, oe = () => {
2281
2287
  j(r), L(!1), M();
2282
- }, ce = () => {
2288
+ }, se = () => {
2283
2289
  L(!0);
2284
- }, le = () => {
2290
+ }, ce = () => {
2285
2291
  L(!1);
2286
- }, B = (e) => {
2292
+ }, V = (e) => {
2287
2293
  e.stopPropagation(), P(N.map((e) => e.accessor === r ? {
2288
2294
  ...e,
2289
2295
  toggled: !1
2290
2296
  } : e));
2291
- }, ue = (e) => {
2297
+ }, le = (e) => {
2292
2298
  ee((t) => t.map((t) => t.accessor === r ? {
2293
2299
  ...t,
2294
2300
  pinned: e
2295
2301
  } : t));
2296
2302
  };
2297
- return m(oe, {
2303
+ return m(ae, {
2298
2304
  "data-accessor": r,
2299
2305
  "data-pinned": n?.position,
2300
2306
  "data-pinned-shadow": n?.isBoundary ? n.position : void 0,
@@ -2321,8 +2327,8 @@ function vr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2321
2327
  ],
2322
2328
  role: o ? "button" : void 0,
2323
2329
  tabIndex: o ? 0 : void 0,
2324
- onClick: re,
2325
- onKeyDown: (e) => e.key === "Enter" && re?.(),
2330
+ onClick: ne,
2331
+ onKeyDown: (e) => e.key === "Enter" && ne?.(),
2326
2332
  ref: R,
2327
2333
  children: [m(T, {
2328
2334
  className: "mantine-datatable-header-cell-sortable-group",
@@ -2337,11 +2343,11 @@ function vr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2337
2343
  "mantine-datatable-header-cell-drag-over": I
2338
2344
  }),
2339
2345
  draggable: s,
2340
- onDragStart: s ? ie : void 0,
2341
- onDragEnter: s ? ce : void 0,
2342
- onDragOver: s ? ae : void 0,
2343
- onDrop: s ? se : void 0,
2344
- onDragLeave: s ? le : void 0,
2346
+ onDragStart: s ? re : void 0,
2347
+ onDragEnter: s ? se : void 0,
2348
+ onDragOver: s ? ie : void 0,
2349
+ onDrop: s ? oe : void 0,
2350
+ onDragLeave: s ? ce : void 0,
2345
2351
  children: [s ? p(b, {
2346
2352
  role: "img",
2347
2353
  "aria-label": "Drag column",
@@ -2352,21 +2358,21 @@ function vr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2352
2358
  onClick: (e) => {
2353
2359
  e.stopPropagation();
2354
2360
  },
2355
- children: p(_r, {})
2361
+ children: p(yr, {})
2356
2362
  })
2357
2363
  }) : null, p(v, {
2358
2364
  className: X("mantine-datatable-header-cell-sortable-text", {
2359
- [Qn]: _ === "left",
2360
- [$n]: _ === "center",
2361
- [er]: _ === "right"
2362
- }, qn, Jn),
2363
- title: ne,
2364
- children: z
2365
+ [er]: _ === "left",
2366
+ [tr]: _ === "center",
2367
+ [nr]: _ === "right"
2368
+ }, Yn, Xn),
2369
+ title: te,
2370
+ children: B
2365
2371
  })]
2366
2372
  }),
2367
- l ? p(fr, {
2368
- currentPinned: te,
2369
- onPinChange: ue
2373
+ l ? p(mr, {
2374
+ currentPinned: z,
2375
+ onPinChange: le
2370
2376
  }) : null,
2371
2377
  c ? p(b, {
2372
2378
  className: "mantine-datatable-header-cell-toggleable-icon",
@@ -2375,46 +2381,46 @@ function vr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2375
2381
  children: p(g, {
2376
2382
  size: "xs",
2377
2383
  variant: "light",
2378
- onClick: B,
2379
- children: p(dr, {})
2384
+ onClick: V,
2385
+ children: p(pr, {})
2380
2386
  })
2381
2387
  }) : null,
2382
2388
  o || x?.columnAccessor === r ? x?.columnAccessor === r ? p(b, {
2383
2389
  className: X("mantine-datatable-header-cell-sortable-icon", { "mantine-datatable-header-cell-sortable-icon-reversed": x.direction === "desc" }),
2384
2390
  role: "img",
2385
2391
  "aria-label": `Sorted ${x.direction === "desc" ? "descending" : "ascending"}`,
2386
- children: h?.sorted || p(gr, {})
2392
+ children: h?.sorted || p(vr, {})
2387
2393
  }) : p(b, {
2388
2394
  className: "mantine-datatable-header-cell-sortable-unsorted-icon",
2389
2395
  role: "img",
2390
2396
  "aria-label": "Not sorted",
2391
- children: h?.unsorted || p(hr, {})
2397
+ children: h?.unsorted || p(_r, {})
2392
2398
  }) : null,
2393
- C ? p(sr, {
2399
+ C ? p(lr, {
2394
2400
  filterPopoverProps: E,
2395
2401
  isActive: !!O,
2396
2402
  filterPopoverDisableClickOutside: D,
2397
2403
  children: C
2398
2404
  }) : null
2399
2405
  ]
2400
- }), f && r !== "__selection__" ? p(mr, {
2406
+ }), f && r !== "__selection__" ? p(gr, {
2401
2407
  accessor: r,
2402
2408
  columnRef: R
2403
2409
  }) : null]
2404
2410
  });
2405
2411
  }
2406
- function yr({ className: e, style: t, trigger: n, shadowVisible: r, checked: i, indeterminate: a, checkboxProps: o, onChange: s, rowSpan: c, ref: l }) {
2412
+ function xr({ className: e, style: t, trigger: n, shadowVisible: r, checked: i, indeterminate: a, checkboxProps: o, onChange: s, rowSpan: c, ref: l }) {
2407
2413
  let u = !o.disabled;
2408
- return p(oe, {
2414
+ return p(ae, {
2409
2415
  ref: l,
2410
- className: X("mantine-datatable-header-selector-cell", { [Yn]: n === "cell" && u }, e),
2416
+ className: X("mantine-datatable-header-selector-cell", { [Zn]: n === "cell" && u }, e),
2411
2417
  style: t,
2412
2418
  rowSpan: c,
2413
2419
  "data-shadow-visible": r || void 0,
2414
2420
  "data-accessor": "__selection__",
2415
2421
  onClick: n === "cell" && u ? s : void 0,
2416
2422
  children: p(x, {
2417
- classNames: u ? { input: Yn } : void 0,
2423
+ classNames: u ? { input: Zn } : void 0,
2418
2424
  checked: i,
2419
2425
  indeterminate: a,
2420
2426
  onChange: s,
@@ -2423,7 +2429,7 @@ function yr({ className: e, style: t, trigger: n, shadowVisible: r, checked: i,
2423
2429
  })
2424
2430
  });
2425
2431
  }
2426
- function br(e, t) {
2432
+ function Sr(e, t) {
2427
2433
  let n = (e.columns ?? []).filter((e) => !e.hidden).map((e) => String(e.accessor)), r = n.map((e) => t.get(e)).filter(Boolean);
2428
2434
  if (r.length === 0 || r.length !== n.length) return;
2429
2435
  let i = new Set(r.map((e) => e.logicalSide));
@@ -2436,8 +2442,8 @@ function br(e, t) {
2436
2442
  isBoundary: l?.isBoundary ?? !1
2437
2443
  };
2438
2444
  }
2439
- function xr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r, sortIcons: i, onSortStatusChange: a, columns: o, defaultColumnProps: s, groups: c, pinnedMap: l, selectionTrigger: u, selectionVisible: f, selectionChecked: h, selectionIndeterminate: g, onSelectionChange: _, selectionCheckboxProps: v, selectorCellShadowVisible: y, selectionColumnClassName: b, selectionColumnStyle: S, withColumnBorders: C = !1, ref: w }) {
2440
- let E = c ? Bn(c) : 0, D = E > 0 ? E + 1 : 1, O = f ? p(yr, {
2445
+ function Cr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r, sortIcons: i, onSortStatusChange: a, columns: o, defaultColumnProps: s, groups: c, pinnedMap: l, selectionTrigger: u, selectionVisible: f, selectionChecked: h, selectionIndeterminate: g, onSelectionChange: _, selectionCheckboxProps: v, selectorCellShadowVisible: y, selectionColumnClassName: b, selectionColumnStyle: S, withColumnBorders: C = !1, ref: w }) {
2446
+ let E = c ? xn(c) : 0, D = E > 0 ? E + 1 : 1, O = f ? p(xr, {
2441
2447
  ref: e,
2442
2448
  className: b,
2443
2449
  style: S,
@@ -2448,7 +2454,7 @@ function xr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2448
2454
  checkboxProps: v,
2449
2455
  onChange: _,
2450
2456
  rowSpan: c ? D : void 0
2451
- }) : null, { columnsToggle: k, setColumnsToggle: A } = un(), [j, M] = d(!1), N = o.some((e) => e.toggleable), P = N ? Object.fromEntries(o.map(({ accessor: e, title: t }) => [e, t ?? In(String(e))])) : void 0, L = m(se, {
2457
+ }) : null, { columnsToggle: k, setColumnsToggle: A } = un(), [j, M] = d(!1), N = o.some((e) => e.toggleable), P = N ? Object.fromEntries(o.map(({ accessor: e, title: t }) => [e, t ?? hn(String(e))])) : void 0, L = m(oe, {
2452
2458
  className: X("mantine-datatable-header", t),
2453
2459
  style: n,
2454
2460
  ref: w,
@@ -2456,10 +2462,10 @@ function xr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2456
2462
  e.preventDefault(), M((e) => !e);
2457
2463
  } : void 0,
2458
2464
  children: [c && Array.from({ length: E }, (e, t) => {
2459
- let n = Un(c, t);
2460
- return m(ce, { children: [t === 0 && O, n.map((e, r) => p(ir, {
2465
+ let n = wn(c, t);
2466
+ return m(se, { children: [t === 0 && O, n.map((e, r) => p(or, {
2461
2467
  group: e,
2462
- pinnedInfo: br(e, l),
2468
+ pinnedInfo: Sr(e, l),
2463
2469
  maxDepth: E,
2464
2470
  currentDepth: t,
2465
2471
  previousGroups: n.slice(0, r),
@@ -2467,13 +2473,13 @@ function xr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2467
2473
  withColumnBorders: C,
2468
2474
  totalTableColumns: o.length
2469
2475
  }, e.id))] }, `group-depth-${t}`);
2470
- }), m(ce, { children: [!c && O, o.map(({ hidden: e, ...t }, n) => {
2476
+ }), m(se, { children: [!c && O, o.map(({ hidden: e, ...t }, n) => {
2471
2477
  if (e) return null;
2472
2478
  let { accessor: c, visibleMediaQuery: u, textAlign: d, width: f, title: m, sortable: h, draggable: g, toggleable: _, pinnable: v, resizable: y, titleClassName: b, titleStyle: x, filter: S, filterPopoverProps: C, filterPopoverDisableClickOutside: w, filtering: T, sortKey: E } = {
2473
2479
  ...s,
2474
2480
  ...t
2475
2481
  };
2476
- return p(vr, {
2482
+ return p(br, {
2477
2483
  accessor: c,
2478
2484
  pinnedInfo: l.get(String(c)),
2479
2485
  className: b,
@@ -2504,7 +2510,7 @@ function xr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2504
2510
  shadow: "md",
2505
2511
  opened: j,
2506
2512
  onChange: M,
2507
- children: [p(I, { children: L }), p(ee, { children: p(z, { children: k.filter((e) => e.toggleable).map((e) => p(T, { children: p(x, {
2513
+ children: [p(I, { children: L }), p(ee, { children: p(B, { children: k.filter((e) => e.toggleable).map((e) => p(T, { children: p(x, {
2508
2514
  classNames: { label: "mantine-datatable-header-column-toggle-checkbox-label" },
2509
2515
  size: "xs",
2510
2516
  label: P[e.accessor],
@@ -2518,7 +2524,7 @@ function xr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2518
2524
  }) }, e.accessor)) }) })]
2519
2525
  }) : L;
2520
2526
  }
2521
- function Sr({ fetching: e, customContent: t, backgroundBlur: n, size: r, type: i, color: a }) {
2527
+ function wr({ fetching: e, customContent: t, backgroundBlur: n, size: r, type: i, color: a }) {
2522
2528
  return p(b, {
2523
2529
  className: X("mantine-datatable-loader", { "mantine-datatable-loader-fetching": e }),
2524
2530
  style: [{ backdropFilter: n ? `blur(${n}px)` : void 0 }],
@@ -2529,7 +2535,7 @@ function Sr({ fetching: e, customContent: t, backgroundBlur: n, size: r, type: i
2529
2535
  }))
2530
2536
  });
2531
2537
  }
2532
- function Cr() {
2538
+ function Tr() {
2533
2539
  return m("svg", {
2534
2540
  width: "14",
2535
2541
  height: "14",
@@ -2550,17 +2556,17 @@ function Cr() {
2550
2556
  ]
2551
2557
  });
2552
2558
  }
2553
- var wr = {
2554
- xs: he(22),
2555
- sm: he(26),
2556
- md: he(32),
2557
- lg: he(38),
2558
- xl: he(44)
2559
+ var Er = {
2560
+ xs: me(22),
2561
+ sm: me(26),
2562
+ md: me(32),
2563
+ lg: me(38),
2564
+ xl: me(44)
2559
2565
  };
2560
- function Tr({ size: e, label: t, values: n, value: r, activeTextColor: i, activeBackgroundColor: a, onChange: o }) {
2566
+ function Dr({ size: e, label: t, values: n, value: r, activeTextColor: i, activeBackgroundColor: a, onChange: o }) {
2561
2567
  return m(T, {
2562
2568
  gap: "xs",
2563
- children: [p(B, {
2569
+ children: [p(V, {
2564
2570
  component: "div",
2565
2571
  size: e,
2566
2572
  children: t
@@ -2573,9 +2579,9 @@ function Tr({ size: e, label: t, values: n, value: r, activeTextColor: i, active
2573
2579
  size: e,
2574
2580
  variant: "default",
2575
2581
  classNames: { section: "mantine-datatable-page-size-selector-button-icon" },
2576
- rightSection: p(Cr, {}),
2582
+ rightSection: p(Tr, {}),
2577
2583
  style: [{ fontWeight: "normal" }, (t) => ({
2578
- height: wr[e],
2584
+ height: Er[e],
2579
2585
  paddingLeft: t.spacing[e],
2580
2586
  paddingRight: t.spacing[e]
2581
2587
  })],
@@ -2584,14 +2590,14 @@ function Tr({ size: e, label: t, values: n, value: r, activeTextColor: i, active
2584
2590
  let n = t === r;
2585
2591
  return p(A, {
2586
2592
  className: X({ "mantine-datatable-page-size-selector-active": n }),
2587
- style: [{ height: wr[e] }, n && (i || a) ? (e) => sn({
2593
+ style: [{ height: Er[e] }, n && (i || a) ? (e) => sn({
2588
2594
  theme: e,
2589
2595
  paginationActiveTextColor: i,
2590
2596
  paginationActiveBackgroundColor: a
2591
2597
  }) : void 0],
2592
2598
  disabled: n,
2593
2599
  onClick: () => o(t),
2594
- children: p(B, {
2600
+ children: p(V, {
2595
2601
  component: "div",
2596
2602
  size: e,
2597
2603
  children: t
@@ -2601,7 +2607,7 @@ function Tr({ size: e, label: t, values: n, value: r, activeTextColor: i, active
2601
2607
  })]
2602
2608
  });
2603
2609
  }
2604
- function Er({ className: e, style: t, fetching: n, page: r, onPageChange: i, paginationWithEdges: a, paginationWithControls: o, paginationActiveTextColor: s, paginationActiveBackgroundColor: c, paginationSize: l, loadingText: u, noRecordsText: d, paginationText: h, totalRecords: g, recordsPerPage: _, onRecordsPerPageChange: y, recordsPerPageLabel: b, recordsPerPageOptions: x, recordsLength: S, horizontalSpacing: C, paginationWrapBreakpoint: w, getPaginationControlProps: T, getPaginationItemProps: E, renderPagination: D }) {
2610
+ function Or({ className: e, style: t, fetching: n, page: r, onPageChange: i, paginationWithEdges: a, paginationWithControls: o, paginationActiveTextColor: s, paginationActiveBackgroundColor: c, paginationSize: l, loadingText: u, noRecordsText: d, paginationText: h, totalRecords: g, recordsPerPage: _, onRecordsPerPageChange: y, recordsPerPageLabel: b, recordsPerPageOptions: x, recordsLength: S, horizontalSpacing: C, paginationWrapBreakpoint: w, getPaginationControlProps: T, getPaginationItemProps: E, renderPagination: D }) {
2605
2611
  let O;
2606
2612
  if (g) {
2607
2613
  let e = (r - 1) * _ + 1;
@@ -2611,15 +2617,15 @@ function Er({ className: e, style: t, fetching: n, page: r, onPageChange: i, pag
2611
2617
  totalRecords: g
2612
2618
  });
2613
2619
  } else O = n ? u : d;
2614
- let k = g && _ ? Math.max(1, Math.ceil(g / _)) : 1, A = g ? (r - 1) * (_ ?? 0) + 1 : void 0, j = g ? (A ?? 1) + (S ?? 0) - 1 : void 0, M = !Fn(({ breakpoints: e }) => `(min-width: ${typeof w == "number" ? `${he(w)}rem` : e[w] || w})`), N = {
2615
- Text: (e) => p(B, {
2620
+ let k = g && _ ? Math.max(1, Math.ceil(g / _)) : 1, A = g ? (r - 1) * (_ ?? 0) + 1 : void 0, j = g ? (A ?? 1) + (S ?? 0) - 1 : void 0, M = !Kn(({ breakpoints: e }) => `(min-width: ${typeof w == "number" ? `${me(w)}rem` : e[w] || w})`), N = {
2621
+ Text: (e) => p(V, {
2616
2622
  component: "div",
2617
2623
  className: "mantine-datatable-pagination-text",
2618
2624
  size: l,
2619
2625
  ...e,
2620
2626
  children: O
2621
2627
  }),
2622
- PageSizeSelector: (e) => x ? p(Tr, {
2628
+ PageSizeSelector: (e) => x ? p(Dr, {
2623
2629
  activeTextColor: s,
2624
2630
  activeBackgroundColor: c,
2625
2631
  size: l,
@@ -2680,18 +2686,18 @@ function Er({ className: e, style: t, fetching: n, page: r, onPageChange: i, pag
2680
2686
  ] })
2681
2687
  });
2682
2688
  }
2683
- function Dr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, record: i, index: a, onClick: o, onDoubleClick: s, onContextMenu: c, noWrap: l, ellipsis: u, textAlign: d, width: f, accessor: m, render: h, defaultRender: g, customCellAttributes: _ }) {
2684
- return Fn(r) ? p(ie, {
2689
+ function kr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, record: i, index: a, onClick: o, onDoubleClick: s, onContextMenu: c, noWrap: l, ellipsis: u, textAlign: d, width: f, accessor: m, render: h, defaultRender: g, customCellAttributes: _ }) {
2690
+ return Kn(r) ? p(re, {
2685
2691
  "data-pinned": n?.position,
2686
2692
  "data-pinned-shadow": n?.isBoundary ? n.position : void 0,
2687
2693
  className: X({
2688
- [qn]: l || u,
2689
- [Jn]: u,
2690
- [Yn]: o || s,
2691
- [Xn]: c,
2692
- [Qn]: d === "left",
2693
- [$n]: d === "center",
2694
- [er]: d === "right"
2694
+ [Yn]: l || u,
2695
+ [Xn]: u,
2696
+ [Zn]: o || s,
2697
+ [Qn]: c,
2698
+ [er]: d === "left",
2699
+ [tr]: d === "center",
2700
+ [nr]: d === "right"
2695
2701
  }, e),
2696
2702
  style: [
2697
2703
  {
@@ -2710,12 +2716,12 @@ function Dr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, recor
2710
2716
  onDoubleClick: s,
2711
2717
  onContextMenu: c,
2712
2718
  ..._?.(i, a),
2713
- children: h ? h(i, a) : g ? g(i, a, m) : zn(i, m)
2719
+ children: h ? h(i, a) : g ? g(i, a, m) : bn(i, m)
2714
2720
  }) : null;
2715
2721
  }
2716
- function Or({ open: e, colSpan: t, content: n, collapseProps: r }) {
2717
- let { expanded: i, visible: a } = Kn(e, r?.transitionDuration);
2718
- return a ? m(f, { children: [p(ce, {}), p(ce, { children: p(ie, {
2722
+ function Ar({ open: e, colSpan: t, content: n, collapseProps: r }) {
2723
+ let { expanded: i, visible: a } = Jn(e, r?.transitionDuration);
2724
+ return a ? m(f, { children: [p(se, {}), p(se, { children: p(re, {
2719
2725
  className: "mantine-datatable-row-expansion-cell",
2720
2726
  colSpan: t,
2721
2727
  children: p(S, {
@@ -2728,28 +2734,28 @@ function Or({ open: e, colSpan: t, content: n, collapseProps: r }) {
2728
2734
  })
2729
2735
  }) })] }) : null;
2730
2736
  }
2731
- function kr({ className: e, style: t, record: n, index: r, trigger: i, onChange: a, withRightShadow: o, checkboxProps: s, getCheckboxProps: c, ...l }) {
2737
+ function jr({ className: e, style: t, record: n, index: r, trigger: i, onChange: a, withRightShadow: o, checkboxProps: s, getCheckboxProps: c, ...l }) {
2732
2738
  let u = {
2733
2739
  ...s,
2734
2740
  ...c(n, r)
2735
2741
  }, d = !l.disabled && !u.disabled, f = (e) => {
2736
2742
  e.stopPropagation(), i === "cell" && d && a?.(e);
2737
2743
  };
2738
- return p(ie, {
2739
- className: X("mantine-datatable-row-selector-cell", { [Yn]: i === "cell" && d }, e),
2744
+ return p(re, {
2745
+ className: X("mantine-datatable-row-selector-cell", { [Zn]: i === "cell" && d }, e),
2740
2746
  style: t,
2741
2747
  "data-shadow-visible": o || void 0,
2742
2748
  onClick: f,
2743
2749
  children: p(x, {
2744
- classNames: d ? { input: Yn } : void 0,
2750
+ classNames: d ? { input: Zn } : void 0,
2745
2751
  onChange: a,
2746
2752
  ...l,
2747
2753
  ...u
2748
2754
  })
2749
2755
  });
2750
2756
  }
2751
- function Ar({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap: i, defaultColumnRender: a, selectionTrigger: o, selectionVisible: s, selectionChecked: c, onSelectionChange: l, isRecordSelectable: u, selectionCheckboxProps: d, getSelectionCheckboxProps: h, onClick: g, onDoubleClick: _, onContextMenu: v, onCellClick: y, onCellDoubleClick: b, onCellContextMenu: x, expansion: S, customAttributes: C, color: w, backgroundColor: T, className: E, style: D, selectorCellShadowVisible: O, selectionColumnClassName: k, selectionColumnStyle: A, rowFactory: j }) {
2752
- let M = m(f, { children: [s && p(kr, {
2757
+ function Mr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap: i, defaultColumnRender: a, selectionTrigger: o, selectionVisible: s, selectionChecked: c, onSelectionChange: l, isRecordSelectable: u, selectionCheckboxProps: d, getSelectionCheckboxProps: h, onClick: g, onDoubleClick: _, onContextMenu: v, onCellClick: y, onCellDoubleClick: b, onCellContextMenu: x, expansion: S, customAttributes: C, color: w, backgroundColor: T, className: E, style: D, selectorCellShadowVisible: O, selectionColumnClassName: k, selectionColumnStyle: A, rowFactory: j }) {
2758
+ let M = m(f, { children: [s && p(jr, {
2753
2759
  className: k,
2754
2760
  style: A,
2755
2761
  record: e,
@@ -2767,7 +2773,7 @@ function Ar({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
2767
2773
  ...r,
2768
2774
  ...s
2769
2775
  };
2770
- return p(Dr, {
2776
+ return p(kr, {
2771
2777
  pinnedInfo: i.get(String(l)),
2772
2778
  className: typeof _ == "function" ? _(e, t) : _,
2773
2779
  style: v?.(e, t),
@@ -2804,7 +2810,7 @@ function Ar({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
2804
2810
  defaultRender: a,
2805
2811
  customCellAttributes: S
2806
2812
  }, l);
2807
- })] }), N = S && p(Or, {
2813
+ })] }), N = S && p(Ar, {
2808
2814
  colSpan: n.filter(({ hidden: e }) => !e).length + +!!s,
2809
2815
  open: S.isRowExpanded(e),
2810
2816
  content: S.content({
@@ -2812,7 +2818,7 @@ function Ar({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
2812
2818
  index: t
2813
2819
  }),
2814
2820
  collapseProps: S.collapseProps
2815
- }), P = jr({
2821
+ }), P = Nr({
2816
2822
  record: e,
2817
2823
  index: t,
2818
2824
  selectionChecked: c,
@@ -2832,17 +2838,17 @@ function Ar({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
2832
2838
  rowProps: P,
2833
2839
  children: M,
2834
2840
  expandedElement: N
2835
- }) : m(f, { children: [p(ce, {
2841
+ }) : m(f, { children: [p(se, {
2836
2842
  ...P,
2837
2843
  children: M
2838
2844
  }), N] });
2839
2845
  }
2840
- function jr({ record: e, index: t, selectionChecked: n, onClick: r, onDoubleClick: i, onContextMenu: a, expansion: o, customAttributes: s, color: c, backgroundColor: l, className: u, style: d }) {
2846
+ function Nr({ record: e, index: t, selectionChecked: n, onClick: r, onDoubleClick: i, onContextMenu: a, expansion: o, customAttributes: s, color: c, backgroundColor: l, className: u, style: d }) {
2841
2847
  return {
2842
- className: X("mantine-datatable-row", { [Yn]: r || i || o?.isExpandable({
2848
+ className: X("mantine-datatable-row", { [Zn]: r || i || o?.isExpandable({
2843
2849
  record: e,
2844
2850
  index: t
2845
- }) && o?.expandOnClick }, { [Xn]: a }, typeof u == "function" ? u(e, t) : u),
2851
+ }) && o?.expandOnClick }, { [Qn]: a }, typeof u == "function" ? u(e, t) : u),
2846
2852
  "data-selected": n || void 0,
2847
2853
  onClick: (n) => {
2848
2854
  if (o) {
@@ -2879,7 +2885,7 @@ function jr({ record: e, index: t, selectionChecked: n, onClick: r, onDoubleClic
2879
2885
  ...s?.(e, t) ?? {}
2880
2886
  };
2881
2887
  }
2882
- function Mr({ leftShadowBehind: e, rightShadowBehind: t, onScrollPositionChange: n, children: r, viewportRef: i, scrollAreaProps: a }) {
2888
+ function Pr({ leftShadowBehind: e, rightShadowBehind: t, onScrollPositionChange: n, children: r, viewportRef: i, scrollAreaProps: a }) {
2883
2889
  return m(L, {
2884
2890
  ...a,
2885
2891
  viewportRef: i,
@@ -2899,26 +2905,26 @@ function Mr({ leftShadowBehind: e, rightShadowBehind: t, onScrollPositionChange:
2899
2905
  ]
2900
2906
  });
2901
2907
  }
2902
- function Nr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, height: r = "100%", minHeight: i, maxHeight: o, shadow: d, verticalAlign: f = "center", fetching: h, columns: g, storeColumnsKey: _, groups: y, pinFirstColumn: b, pinLastColumn: x, defaultColumnProps: S, defaultColumnRender: C, idAccessor: w = "id", records: T, selectionTrigger: E = "checkbox", selectedRecords: D, onSelectedRecordsChange: O, selectionColumnClassName: k, selectionColumnStyle: A, isRecordSelectable: j, selectionCheckboxProps: M, allRecordsSelectionCheckboxProps: N = { "aria-label": "Select all records" }, getRecordSelectionCheckboxProps: P = (e, t) => ({ "aria-label": `Select record ${t + 1}` }), sortStatus: F, sortIcons: ee, onSortStatusChange: I, horizontalSpacing: L, page: R, onPageChange: te, totalRecords: z, recordsPerPage: ne, onRecordsPerPageChange: ie, recordsPerPageOptions: ae, recordsPerPageLabel: oe = "Records per page", paginationWithEdges: se, paginationWithControls: ce, paginationActiveTextColor: le, paginationActiveBackgroundColor: B, paginationSize: ue = "sm", paginationText: de = ({ from: e, to: t, totalRecords: n }) => `${e} - ${t} / ${n}`, paginationWrapBreakpoint: fe = "sm", getPaginationControlProps: pe = (e) => e === "previous" ? { "aria-label": "Previous page" } : e === "next" ? { "aria-label": "Next page" } : {}, getPaginationItemProps: me, renderPagination: he, loaderBackgroundBlur: ge, customLoader: _e, loaderSize: ve, loaderType: ye, loaderColor: be, loadingText: xe = "...", emptyState: Se, noRecordsText: Ce = "No records", noRecordsIcon: we, highlightOnHover: Te, striped: Ee, noHeader: De, onRowClick: Oe, onRowDoubleClick: ke, onRowContextMenu: Ae, onCellClick: je, onCellDoubleClick: V, onCellContextMenu: Me, onScroll: Pe, onScrollToTop: Fe, onScrollToBottom: Ie, onScrollToLeft: Le, onScrollToRight: Re, c: ze, backgroundColor: Be, borderColor: Ve, rowBorderColor: He, stripedColor: Ue, highlightOnHoverColor: H, rowColor: U, rowBackgroundColor: We, rowExpansion: Ge, rowClassName: Ke, rowStyle: W, customRowAttributes: qe, scrollViewportRef: Je, scrollAreaProps: Ye, tableRef: Xe, bodyRef: G, m: Ze, my: Qe, mx: $e, mt: et, mb: tt, ml: nt, mr: rt, className: it, classNames: at, style: ot, styles: st, rowFactory: ct, tableWrapper: lt, ...ut }) {
2903
- let dt = l(() => y ? Vn(y) : g, [g, y]), { refs: K, onScroll: ft } = On({
2908
+ function Fr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, height: r = "100%", minHeight: i, maxHeight: o, shadow: d, verticalAlign: f = "center", fetching: h, columns: g, storeColumnsKey: _, groups: y, pinFirstColumn: b, pinLastColumn: x, defaultColumnProps: S, defaultColumnRender: C, idAccessor: w = "id", records: T, selectionTrigger: E = "checkbox", selectedRecords: D, onSelectedRecordsChange: O, selectionColumnClassName: k, selectionColumnStyle: A, isRecordSelectable: j, selectionCheckboxProps: M, allRecordsSelectionCheckboxProps: N = { "aria-label": "Select all records" }, getRecordSelectionCheckboxProps: P = (e, t) => ({ "aria-label": `Select record ${t + 1}` }), sortStatus: F, sortIcons: ee, onSortStatusChange: I, horizontalSpacing: L, page: R, onPageChange: z, totalRecords: B, recordsPerPage: te, onRecordsPerPageChange: re, recordsPerPageOptions: ie, recordsPerPageLabel: ae = "Records per page", paginationWithEdges: oe, paginationWithControls: se, paginationActiveTextColor: ce, paginationActiveBackgroundColor: V, paginationSize: le = "sm", paginationText: ue = ({ from: e, to: t, totalRecords: n }) => `${e} - ${t} / ${n}`, paginationWrapBreakpoint: de = "sm", getPaginationControlProps: fe = (e) => e === "previous" ? { "aria-label": "Previous page" } : e === "next" ? { "aria-label": "Next page" } : {}, getPaginationItemProps: pe, renderPagination: me, loaderBackgroundBlur: he, customLoader: ge, loaderSize: _e, loaderType: ve, loaderColor: ye, loadingText: be = "...", emptyState: xe, noRecordsText: Se = "No records", noRecordsIcon: Ce, highlightOnHover: we, striped: Te, noHeader: Ee, onRowClick: De, onRowDoubleClick: Oe, onRowContextMenu: ke, onCellClick: Ae, onCellDoubleClick: H, onCellContextMenu: je, onScroll: Ne, onScrollToTop: Pe, onScrollToBottom: Fe, onScrollToLeft: Ie, onScrollToRight: Le, c: Re, backgroundColor: ze, borderColor: Be, rowBorderColor: Ve, stripedColor: He, highlightOnHoverColor: U, rowColor: W, rowBackgroundColor: Ue, rowExpansion: We, rowClassName: Ge, rowStyle: G, customRowAttributes: Ke, scrollViewportRef: qe, scrollAreaProps: Je, tableRef: Ye, bodyRef: Xe, m: Ze, my: Qe, mx: $e, mt: et, mb: tt, ml: nt, mr: rt, className: it, classNames: at, style: ot, styles: st, rowFactory: ct, tableWrapper: lt, ...ut }) {
2909
+ let dt = l(() => y ? Sn(y) : g, [g, y]), { refs: K, onScroll: ft } = zn({
2904
2910
  scrollCallbacks: {
2905
- onScroll: Pe,
2906
- onScrollToTop: Fe,
2907
- onScrollToBottom: Ie,
2908
- onScrollToLeft: Le,
2909
- onScrollToRight: Re
2911
+ onScroll: Ne,
2912
+ onScrollToTop: Pe,
2913
+ onScrollToBottom: Fe,
2914
+ onScrollToLeft: Ie,
2915
+ onScrollToRight: Le
2910
2916
  },
2911
2917
  withRowBorders: ut.withRowBorders
2912
- }), q = yn({
2918
+ }), q = An({
2913
2919
  key: _,
2914
2920
  columns: dt,
2915
2921
  headerRef: K.header,
2916
2922
  scrollViewportRef: K.scrollViewport
2917
- }), pt = q.effectiveColumns, mt = Ne(K.table, Xe), ht = Ne(K.scrollViewport, Je), gt = u(null), _t = Ne(gt, G), vt = Gn({
2918
- rowExpansion: Ge,
2923
+ }), pt = q.effectiveColumns, mt = Me(K.table, Ye), ht = Me(K.scrollViewport, qe), gt = u(null), _t = Me(gt, Xe), vt = qn({
2924
+ rowExpansion: We,
2919
2925
  records: T,
2920
2926
  idAccessor: w
2921
- }), { pinnedMap: yt, hasLeftPinned: bt, hasRightPinned: xt } = kn({
2927
+ }), { pinnedMap: yt, hasLeftPinned: bt, hasRightPinned: xt } = Bn({
2922
2928
  columns: pt,
2923
2929
  theadRef: K.header,
2924
2930
  tbodyRef: gt,
@@ -2927,8 +2933,8 @@ function Nr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
2927
2933
  pinFirstColumn: b,
2928
2934
  pinLastColumn: x
2929
2935
  }), St = u(!1), Ct = u(R), wt = u(T), Tt = a((e) => {
2930
- St.current = !0, wt.current = T, te(e);
2931
- }, [te, T]);
2936
+ St.current = !0, wt.current = T, z(e);
2937
+ }, [z, T]);
2932
2938
  s(() => {
2933
2939
  Ct.current !== R && (St.current = !0, wt.current = T, Ct.current = R);
2934
2940
  }, [R, T]);
@@ -2949,8 +2955,8 @@ function Nr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
2949
2955
  T,
2950
2956
  K.scrollViewport
2951
2957
  ]);
2952
- let Dt = T?.map((e) => $(e, w)), Ot = !!D, kt = D?.map((e) => $(e, w)), At = Dt !== void 0 && kt !== void 0 && kt.length > 0, jt = j ? T?.filter(j) : T, Mt = jt?.map((e) => $(e, w)), J = At && Mt.every((e) => kt.includes(e)), Nt = At && Mt.some((e) => kt.includes(e)), Pt = a(() => {
2953
- D && O && O(J ? D.filter((e) => !Mt.includes($(e, w))) : Rn([...D, ...jt], (e) => $(e, w)));
2958
+ let Dt = T?.map((e) => Q(e, w)), Ot = !!D, kt = D?.map((e) => Q(e, w)), At = Dt !== void 0 && kt !== void 0 && kt.length > 0, jt = j ? T?.filter(j) : T, Mt = jt?.map((e) => Q(e, w)), J = At && Mt.every((e) => kt.includes(e)), Nt = At && Mt.some((e) => kt.includes(e)), Pt = a(() => {
2959
+ D && O && O(J ? D.filter((e) => !Mt.includes(Q(e, w))) : yn([...D, ...jt], (e) => Q(e, w)));
2954
2960
  }, [
2955
2961
  J,
2956
2962
  w,
@@ -2958,7 +2964,7 @@ function Nr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
2958
2964
  Mt,
2959
2965
  jt,
2960
2966
  D
2961
- ]), { lastSelectionChangeIndex: Y, setLastSelectionChangeIndex: Ft } = An(Dt), It = Ot && !bt, Lt = {
2967
+ ]), { lastSelectionChangeIndex: Y, setLastSelectionChangeIndex: Ft } = Vn(Dt), It = Ot && !bt, Lt = {
2962
2968
  m: Ze,
2963
2969
  my: Qe,
2964
2970
  mx: $e,
@@ -2978,12 +2984,12 @@ function Nr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
2978
2984
  (e) => ({
2979
2985
  ...on({
2980
2986
  theme: e,
2981
- c: ze,
2982
- backgroundColor: Be,
2983
- borderColor: Ve,
2984
- rowBorderColor: He,
2985
- stripedColor: Ue,
2986
- highlightOnHoverColor: H
2987
+ c: Re,
2988
+ backgroundColor: ze,
2989
+ borderColor: Be,
2990
+ rowBorderColor: Ve,
2991
+ stripedColor: He,
2992
+ highlightOnHoverColor: U
2987
2993
  }),
2988
2994
  borderRadius: e.radius[t] || t,
2989
2995
  boxShadow: e.shadows[d] || d,
@@ -2996,17 +3002,17 @@ function Nr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
2996
3002
  { position: "relative" }
2997
3003
  ],
2998
3004
  children: [
2999
- p(Mr, {
3005
+ p(Pr, {
3000
3006
  viewportRef: ht,
3001
3007
  leftShadowBehind: Ot || bt,
3002
3008
  rightShadowBehind: xt,
3003
3009
  onScrollPositionChange: ft,
3004
- scrollAreaProps: Ye,
3005
- children: p(Rt, { children: m(re, {
3010
+ scrollAreaProps: Je,
3011
+ children: p(Rt, { children: m(ne, {
3006
3012
  ref: mt,
3007
3013
  horizontalSpacing: L,
3008
3014
  className: X("mantine-datatable-table", {
3009
- [Zn]: n,
3015
+ [$n]: n,
3010
3016
  "mantine-datatable-vertical-align-top": f === "top",
3011
3017
  "mantine-datatable-vertical-align-bottom": f === "bottom",
3012
3018
  "mantine-datatable-selection-column-visible": Ot,
@@ -3019,14 +3025,14 @@ function Nr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3019
3025
  ...q.isLocked ? { tableLayout: "fixed" } : null,
3020
3026
  ...q.tableWidth == null ? null : { width: `${q.tableWidth}px` }
3021
3027
  },
3022
- "data-striped": Et && Ee || void 0,
3023
- "data-highlight-on-hover": Te || void 0,
3028
+ "data-striped": Et && Te || void 0,
3029
+ "data-highlight-on-hover": we || void 0,
3024
3030
  ...ut,
3025
3031
  children: [
3026
- De ? null : p(dn, {
3032
+ Ee ? null : p(dn, {
3027
3033
  ...q,
3028
3034
  pinnedMap: yt,
3029
- children: p(xr, {
3035
+ children: p(Cr, {
3030
3036
  ref: K.header,
3031
3037
  selectionColumnHeaderRef: K.selectionColumnHeader,
3032
3038
  className: at?.header,
@@ -3056,14 +3062,14 @@ function Nr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3056
3062
  p("tbody", {
3057
3063
  ref: _t,
3058
3064
  children: Et ? T.map((e, t) => {
3059
- let n = $(e, w), r = kt?.includes(n) || !1, i;
3065
+ let n = Q(e, w), r = kt?.includes(n) || !1, i;
3060
3066
  return O && D && (i = (i) => {
3061
3067
  if (i.nativeEvent.shiftKey && Y !== null) {
3062
3068
  let e = T.filter(t > Y ? (e, n) => n >= Y && n <= t && (j ? j(e, n) : !0) : (e, n) => n >= t && n <= Y && (j ? j(e, n) : !0));
3063
- O(r ? Ln(D, e, (e) => $(e, w)) : Rn([...D, ...e], (e) => $(e, w)));
3064
- } else O(r ? D.filter((e) => $(e, w) !== n) : Rn([...D, e], (e) => $(e, w)));
3069
+ O(r ? vn(D, e, (e) => Q(e, w)) : yn([...D, ...e], (e) => Q(e, w)));
3070
+ } else O(r ? D.filter((e) => Q(e, w) !== n) : yn([...D, e], (e) => Q(e, w)));
3065
3071
  Ft(t);
3066
- }), p(Ar, {
3072
+ }), p(Mr, {
3067
3073
  record: e,
3068
3074
  index: t,
3069
3075
  columns: pt,
@@ -3077,18 +3083,18 @@ function Nr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3077
3083
  isRecordSelectable: j,
3078
3084
  selectionCheckboxProps: M,
3079
3085
  getSelectionCheckboxProps: P,
3080
- onClick: Oe,
3081
- onDoubleClick: ke,
3082
- onCellClick: je,
3083
- onCellDoubleClick: V,
3084
- onContextMenu: Ae,
3085
- onCellContextMenu: Me,
3086
+ onClick: De,
3087
+ onDoubleClick: Oe,
3088
+ onCellClick: Ae,
3089
+ onCellDoubleClick: H,
3090
+ onContextMenu: ke,
3091
+ onCellContextMenu: je,
3086
3092
  expansion: vt,
3087
- color: U,
3088
- backgroundColor: We,
3089
- className: Ke,
3090
- style: W,
3091
- customAttributes: qe,
3093
+ color: W,
3094
+ backgroundColor: Ue,
3095
+ className: Ge,
3096
+ style: G,
3097
+ customAttributes: Ke,
3092
3098
  selectorCellShadowVisible: It,
3093
3099
  selectionColumnClassName: k,
3094
3100
  selectionColumnStyle: A,
@@ -3097,7 +3103,7 @@ function Nr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3097
3103
  }, n);
3098
3104
  }) : p(fn, {})
3099
3105
  }),
3100
- pt.some(({ footer: e }) => e) && p(rr, {
3106
+ pt.some(({ footer: e }) => e) && p(ar, {
3101
3107
  ref: K.footer,
3102
3108
  className: at?.footer,
3103
3109
  style: st?.footer,
@@ -3110,45 +3116,45 @@ function Nr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3110
3116
  ]
3111
3117
  }) })
3112
3118
  }),
3113
- !!(R && Et) && p(Er, {
3119
+ !!(R && Et) && p(Or, {
3114
3120
  className: at?.pagination,
3115
3121
  style: st?.pagination,
3116
3122
  horizontalSpacing: L,
3117
3123
  fetching: h,
3118
3124
  page: R,
3119
3125
  onPageChange: Tt,
3120
- totalRecords: z,
3121
- recordsPerPage: ne,
3122
- onRecordsPerPageChange: ie,
3123
- recordsPerPageOptions: ae,
3124
- recordsPerPageLabel: oe,
3125
- paginationWithEdges: se,
3126
- paginationWithControls: ce,
3127
- paginationActiveTextColor: le,
3128
- paginationActiveBackgroundColor: B,
3129
- paginationSize: ue,
3130
- paginationText: de,
3131
- paginationWrapBreakpoint: fe,
3132
- getPaginationControlProps: pe,
3133
- getPaginationItemProps: me,
3134
- noRecordsText: Ce,
3135
- loadingText: xe,
3126
+ totalRecords: B,
3127
+ recordsPerPage: te,
3128
+ onRecordsPerPageChange: re,
3129
+ recordsPerPageOptions: ie,
3130
+ recordsPerPageLabel: ae,
3131
+ paginationWithEdges: oe,
3132
+ paginationWithControls: se,
3133
+ paginationActiveTextColor: ce,
3134
+ paginationActiveBackgroundColor: V,
3135
+ paginationSize: le,
3136
+ paginationText: ue,
3137
+ paginationWrapBreakpoint: de,
3138
+ getPaginationControlProps: fe,
3139
+ getPaginationItemProps: pe,
3140
+ noRecordsText: Se,
3141
+ loadingText: be,
3136
3142
  recordsLength: Et,
3137
- renderPagination: he
3143
+ renderPagination: me
3138
3144
  }),
3139
- p(Sr, {
3145
+ p(wr, {
3140
3146
  fetching: h,
3141
- backgroundBlur: ge,
3142
- customContent: _e,
3143
- size: ve,
3144
- type: ye,
3145
- color: be
3147
+ backgroundBlur: he,
3148
+ customContent: ge,
3149
+ size: _e,
3150
+ type: ve,
3151
+ color: ye
3146
3152
  }),
3147
3153
  p(mn, {
3148
- icon: we,
3149
- text: Ce,
3154
+ icon: Ce,
3155
+ text: Se,
3150
3156
  active: !h && !Et,
3151
- children: Se
3157
+ children: xe
3152
3158
  })
3153
3159
  ]
3154
3160
  })
@@ -3156,20 +3162,20 @@ function Nr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3156
3162
  }
3157
3163
  //#endregion
3158
3164
  //#region src/DataTable/UpdateModal.tsx
3159
- function Pr({ fields: e, onClose: t, queryKey: n, connectedQueryKeys: r, apiPath: i, id: a, steps: o }) {
3165
+ function Ir({ fields: e, onClose: t, queryKey: n, connectedQueryKeys: r, apiPath: i, id: a, steps: o }) {
3160
3166
  let { data: s, isLoading: c } = Ht(i, n, a), { mutateAsync: l, isPending: u, error: d } = Kt(i, n, r);
3161
- return c || !s ? /* @__PURE__ */ m(z, {
3167
+ return c || !s ? /* @__PURE__ */ m(B, {
3162
3168
  gap: "md",
3163
3169
  children: [
3164
- /* @__PURE__ */ p(te, { height: 40 }),
3165
- Array.from({ length: e.length }).map((e, t) => /* @__PURE__ */ p(te, { height: 35 }, t)),
3170
+ /* @__PURE__ */ p(z, { height: 40 }),
3171
+ Array.from({ length: e.length }).map((e, t) => /* @__PURE__ */ p(z, { height: 35 }, t)),
3166
3172
  /* @__PURE__ */ m(T, {
3167
3173
  mt: "md",
3168
3174
  justify: "end",
3169
- children: [/* @__PURE__ */ p(te, {
3175
+ children: [/* @__PURE__ */ p(z, {
3170
3176
  width: 100,
3171
3177
  height: 36
3172
- }), /* @__PURE__ */ p(te, {
3178
+ }), /* @__PURE__ */ p(z, {
3173
3179
  width: 100,
3174
3180
  height: 36
3175
3181
  })]
@@ -3193,7 +3199,7 @@ function Pr({ fields: e, onClose: t, queryKey: n, connectedQueryKeys: r, apiPath
3193
3199
  }
3194
3200
  //#endregion
3195
3201
  //#region src/DataTable/DeleteModal.tsx
3196
- function Fr({ queryKey: e, connectedQueryKeys: t, apiPath: n, onClose: r, selectedRecords: i, confirmMessage: a }) {
3202
+ function Lr({ queryKey: e, connectedQueryKeys: t, apiPath: n, onClose: r, selectedRecords: i, confirmMessage: a }) {
3197
3203
  let { mutateAsync: o, isError: c, error: l, isPending: u } = qt(n, e, t), [h, g] = d(i), [v, b] = d(!1), x = v || u;
3198
3204
  return s(() => {
3199
3205
  h.length || r();
@@ -3204,7 +3210,7 @@ function Fr({ queryKey: e, connectedQueryKeys: t, apiPath: n, onClose: r, select
3204
3210
  title: l.name,
3205
3211
  children: l.message
3206
3212
  }),
3207
- /* @__PURE__ */ p(B, { children: a ? a(h) : h.length === 1 ? `Soll ${h.length} Eintrag wirklich gelöscht werden?` : `Sollen ${h.length} Einträge wirklich gelöscht werden?` }),
3213
+ /* @__PURE__ */ p(V, { children: a ? a(h) : h.length === 1 ? `Soll ${h.length} Eintrag wirklich gelöscht werden?` : `Sollen ${h.length} Einträge wirklich gelöscht werden?` }),
3208
3214
  /* @__PURE__ */ m(T, {
3209
3215
  mt: "md",
3210
3216
  justify: "end",
@@ -3231,7 +3237,7 @@ function Fr({ queryKey: e, connectedQueryKeys: t, apiPath: n, onClose: r, select
3231
3237
  }
3232
3238
  //#endregion
3233
3239
  //#region src/Hooks/usePersistentState.ts
3234
- function Ir(e, t) {
3240
+ function Rr(e, t) {
3235
3241
  let n = `use_persistent_storage_${t}`, [r, i] = d(() => {
3236
3242
  try {
3237
3243
  let t = localStorage.getItem(n);
@@ -3249,12 +3255,12 @@ function Ir(e, t) {
3249
3255
  }
3250
3256
  //#endregion
3251
3257
  //#region src/utils/sort.ts
3252
- var Lr = [
3258
+ var zr = [
3253
3259
  /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/,
3254
3260
  /^\d{4}-\d{2}-\d{2}$/,
3255
3261
  /^\d{1,2}\/\d{1,2}\/\d{4}$/,
3256
3262
  /^\d{1,2}\.\d{1,2}\.\d{4}$/
3257
- ], Rr = (e, t) => {
3263
+ ], Br = (e, t) => {
3258
3264
  let n = e.map((e) => e[t]).filter((e) => e != null && e !== "");
3259
3265
  if (n.length === 0) return "string";
3260
3266
  let r = n.slice(0, 100), i = {
@@ -3270,7 +3276,7 @@ var Lr = [
3270
3276
  i.number++;
3271
3277
  return;
3272
3278
  }
3273
- if (Lr.some((e) => e.test(t))) {
3279
+ if (zr.some((e) => e.test(t))) {
3274
3280
  let e = new Date(t);
3275
3281
  if (!isNaN(e.getTime())) {
3276
3282
  i.date++;
@@ -3283,7 +3289,7 @@ var Lr = [
3283
3289
  let a = i.string + i.number + i.date;
3284
3290
  return i.date / a >= .6 ? "date" : i.number / a >= .6 ? "number" : i.string / a >= .6 ? "string" : "mixed";
3285
3291
  };
3286
- function zr(e, t) {
3292
+ function Vr(e, t) {
3287
3293
  switch (t) {
3288
3294
  case "date":
3289
3295
  if (typeof e == "string") {
@@ -3299,54 +3305,54 @@ function zr(e, t) {
3299
3305
  default: return String(e).toLowerCase().trim();
3300
3306
  }
3301
3307
  }
3302
- var Br = (e, t, n = "asc") => {
3308
+ var Hr = (e, t, n = "asc") => {
3303
3309
  if (!e || e.length === 0) return [];
3304
- let r = Rr(e, t);
3310
+ let r = Br(e, t);
3305
3311
  return [...e].sort((e, i) => {
3306
3312
  let a = e[t], o = i[t], s = a == null || a === "", c = o == null || o === "";
3307
3313
  if (s && c) return 0;
3308
3314
  if (s) return n === "asc" ? -1 : 1;
3309
3315
  if (c) return n === "asc" ? 1 : -1;
3310
- let l = zr(a, r), u = zr(o, r);
3316
+ let l = Vr(a, r), u = Vr(o, r);
3311
3317
  return l === null && u === null ? 0 : l === null ? n === "asc" ? 1 : -1 : u === null || l < u ? n === "asc" ? -1 : 1 : l > u ? n === "asc" ? 1 : -1 : 0;
3312
3318
  });
3313
3319
  };
3314
3320
  //#endregion
3315
3321
  //#region src/utils/filter.ts
3316
- function Vr(e) {
3322
+ function Ur(e) {
3317
3323
  return !!e && typeof e == "object" && "id" in e;
3318
3324
  }
3319
- function Hr(e, t) {
3325
+ function Wr(e, t) {
3320
3326
  if (typeof e == "string" || typeof e == "number") return t.includes(String(e));
3321
3327
  if (e && typeof e == "object") {
3322
3328
  let n = e;
3323
- return Vr(n) && t.includes(n.id) ? !0 : Object.values(n).some((e) => typeof e == "string" && t.includes(e) || Vr(e) && t.includes(e.id));
3329
+ return Ur(n) && t.includes(n.id) ? !0 : Object.values(n).some((e) => typeof e == "string" && t.includes(e) || Ur(e) && t.includes(e.id));
3324
3330
  }
3325
3331
  return !1;
3326
3332
  }
3327
- function Ur(e, t) {
3328
- return Array.isArray(t) ? Array.isArray(e) ? e.some((e) => Hr(e, t)) : Vr(e) ? t.includes(e.id) : !1 : typeof e == "string" && e.includes(t);
3333
+ function Gr(e, t) {
3334
+ return Array.isArray(t) ? Array.isArray(e) ? e.some((e) => Wr(e, t)) : Ur(e) ? t.includes(e.id) : !1 : typeof e == "string" && e.includes(t);
3329
3335
  }
3330
- function Wr(e, [t, n]) {
3336
+ function Kr(e, [t, n]) {
3331
3337
  if (!t && !n || typeof e != "string") return !0;
3332
3338
  let r = e.split(" ")[0];
3333
3339
  return t && n ? r >= t && r <= n : t ? r >= t : r <= n;
3334
3340
  }
3335
- function Gr(e, t) {
3341
+ function qr(e, t) {
3336
3342
  if (t.value === void 0) return !0;
3337
3343
  let n = e[t.id];
3338
3344
  switch (t.type) {
3339
- case "query": return Ur(n, t.value);
3340
- case "date": return Wr(n, t.value);
3345
+ case "query": return Gr(n, t.value);
3346
+ case "date": return Kr(n, t.value);
3341
3347
  case "boolean": return n === t.value;
3342
3348
  }
3343
3349
  }
3344
- function Kr(e, t) {
3345
- return !t || t.length === 0 ? e : e.filter((e) => t.every((t) => Gr(e, t)));
3350
+ function Jr(e, t) {
3351
+ return !t || t.length === 0 ? e : e.filter((e) => t.every((t) => qr(e, t)));
3346
3352
  }
3347
3353
  //#endregion
3348
3354
  //#region src/DataTable/FieldCard.tsx
3349
- function qr({ rows: e }) {
3355
+ function Yr({ rows: e }) {
3350
3356
  return /* @__PURE__ */ p(f, { children: e.map((e, t) => /* @__PURE__ */ m(v, { children: [t > 0 && /* @__PURE__ */ p(C, {}), /* @__PURE__ */ m(T, {
3351
3357
  wrap: "nowrap",
3352
3358
  justify: "space-between",
@@ -3354,7 +3360,7 @@ function qr({ rows: e }) {
3354
3360
  gap: "md",
3355
3361
  py: "xs",
3356
3362
  px: "sm",
3357
- children: [/* @__PURE__ */ p(B, {
3363
+ children: [/* @__PURE__ */ p(V, {
3358
3364
  fw: 700,
3359
3365
  fz: "sm",
3360
3366
  style: { flexShrink: 0 },
@@ -3367,39 +3373,39 @@ function qr({ rows: e }) {
3367
3373
  })]
3368
3374
  })] }, typeof e.label == "string" ? e.label : t)) });
3369
3375
  }
3370
- function Jr({ rows: e }) {
3376
+ function Xr({ rows: e }) {
3371
3377
  return /* @__PURE__ */ p(v, {
3372
3378
  bg: "var(--mantine-color-gray-light)",
3373
3379
  style: {
3374
3380
  borderRadius: "var(--mantine-radius-md)",
3375
3381
  overflow: "hidden"
3376
3382
  },
3377
- children: /* @__PURE__ */ p(qr, { rows: e })
3383
+ children: /* @__PURE__ */ p(Yr, { rows: e })
3378
3384
  });
3379
3385
  }
3380
3386
  //#endregion
3381
3387
  //#region src/DataTable/MobileCardList.tsx
3382
- function Yr(e, t) {
3388
+ function Zr(e, t) {
3383
3389
  return t.split(".").reduce((e, t) => {
3384
3390
  if (e && typeof e == "object" && t in e) return e[t];
3385
3391
  }, e);
3386
3392
  }
3387
- function Xr(e, t) {
3393
+ function Qr(e, t) {
3388
3394
  let n = t.column;
3389
3395
  if (n.render) return n.render(e, 0);
3390
- let r = Yr(e, n.accessor ?? t.id);
3391
- return r == null ? /* @__PURE__ */ p(B, {
3396
+ let r = Zr(e, n.accessor ?? t.id);
3397
+ return r == null ? /* @__PURE__ */ p(V, {
3392
3398
  c: "dimmed",
3393
3399
  children: "–"
3394
- }) : typeof r == "boolean" ? /* @__PURE__ */ p(B, {
3400
+ }) : typeof r == "boolean" ? /* @__PURE__ */ p(V, {
3395
3401
  fz: "sm",
3396
3402
  children: r ? "Ja" : "Nein"
3397
- }) : /* @__PURE__ */ p(B, {
3403
+ }) : /* @__PURE__ */ p(V, {
3398
3404
  fz: "sm",
3399
3405
  children: String(r)
3400
3406
  });
3401
3407
  }
3402
- function Zr({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, canDelete: o, pagination: s, sort: c, rowExpansion: l }) {
3408
+ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, canDelete: o, pagination: s, sort: c, rowExpansion: l }) {
3403
3409
  let [u, _] = d(/* @__PURE__ */ new Set()), y = l?.expanded, b = (e) => y ? y.recordIds.includes(e) : u.has(e), x = (e) => {
3404
3410
  if (y) {
3405
3411
  let { recordIds: t, onRecordIdsChange: n } = y;
@@ -3421,7 +3427,7 @@ function Zr({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3421
3427
  event: n
3422
3428
  });
3423
3429
  };
3424
- return /* @__PURE__ */ m(z, {
3430
+ return /* @__PURE__ */ m(B, {
3425
3431
  gap: "sm",
3426
3432
  my: "md",
3427
3433
  children: [
@@ -3439,7 +3445,7 @@ function Zr({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3439
3445
  variant: "filled",
3440
3446
  size: "input-sm",
3441
3447
  onClick: () => c.onSortChange(c.field, c.direction === "asc" ? "desc" : "asc"),
3442
- children: c.direction === "asc" ? /* @__PURE__ */ p(De, { size: 18 }) : /* @__PURE__ */ p(Oe, { size: 18 })
3448
+ children: c.direction === "asc" ? /* @__PURE__ */ p(Ee, { size: 18 }) : /* @__PURE__ */ p(De, { size: 18 })
3443
3449
  })] }), D.length > 0 && /* @__PURE__ */ m(F, {
3444
3450
  opened: M,
3445
3451
  onChange: N,
@@ -3457,7 +3463,7 @@ function Zr({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3457
3463
  size: "input-sm",
3458
3464
  onClick: () => N((e) => !e),
3459
3465
  "aria-label": "Filter",
3460
- children: /* @__PURE__ */ p(Ce, { size: 18 })
3466
+ children: /* @__PURE__ */ p(Se, { size: 18 })
3461
3467
  })
3462
3468
  }) }), /* @__PURE__ */ p(F.Dropdown, {
3463
3469
  p: 0,
@@ -3472,7 +3478,7 @@ function Zr({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3472
3478
  value: e.id,
3473
3479
  children: [/* @__PURE__ */ p(h.Control, { children: /* @__PURE__ */ m(T, {
3474
3480
  gap: "xs",
3475
- children: [/* @__PURE__ */ p(B, {
3481
+ children: [/* @__PURE__ */ p(V, {
3476
3482
  fw: 600,
3477
3483
  fz: "sm",
3478
3484
  children: e.column.title ?? e.id
@@ -3488,7 +3494,7 @@ function Zr({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3488
3494
  })]
3489
3495
  })]
3490
3496
  }),
3491
- e.length === 0 && /* @__PURE__ */ p(B, {
3497
+ e.length === 0 && /* @__PURE__ */ p(V, {
3492
3498
  c: "dimmed",
3493
3499
  ta: "center",
3494
3500
  py: "xl",
@@ -3523,7 +3529,7 @@ function Zr({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3523
3529
  color: "gray",
3524
3530
  size: "sm",
3525
3531
  onClick: (e) => e.stopPropagation(),
3526
- children: /* @__PURE__ */ p(Se, { size: 16 })
3532
+ children: /* @__PURE__ */ p(xe, { size: 16 })
3527
3533
  }) }), /* @__PURE__ */ p(O.Dropdown, { children: t.map((t, n) => /* @__PURE__ */ p(O.Item, {
3528
3534
  leftSection: t.icon,
3529
3535
  onClick: (n) => {
@@ -3533,9 +3539,9 @@ function Zr({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3533
3539
  }, `card_action_${n}`)) })]
3534
3540
  });
3535
3541
  })()
3536
- }), /* @__PURE__ */ p(qr, { rows: w.map((t) => ({
3542
+ }), /* @__PURE__ */ p(Yr, { rows: w.map((t) => ({
3537
3543
  label: t.column.title ?? t.id,
3538
- value: Xr(e, t)
3544
+ value: Qr(e, t)
3539
3545
  })) })]
3540
3546
  }), c && /* @__PURE__ */ m(S, {
3541
3547
  expanded: u,
@@ -3547,7 +3553,7 @@ function Zr({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3547
3553
  })]
3548
3554
  }) }, s);
3549
3555
  }),
3550
- s && s.totalRecords > s.recordsPerPage && /* @__PURE__ */ m(z, {
3556
+ s && s.totalRecords > s.recordsPerPage && /* @__PURE__ */ m(B, {
3551
3557
  gap: "xs",
3552
3558
  mt: "sm",
3553
3559
  children: [/* @__PURE__ */ p(T, {
@@ -3561,7 +3567,7 @@ function Zr({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3561
3567
  }), s.recordsPerPageOptions && s.onRecordsPerPageChange && /* @__PURE__ */ m(T, {
3562
3568
  justify: "center",
3563
3569
  gap: "xs",
3564
- children: [/* @__PURE__ */ p(B, {
3570
+ children: [/* @__PURE__ */ p(V, {
3565
3571
  fz: "xs",
3566
3572
  c: "dimmed",
3567
3573
  children: "Einträge pro Seite:"
@@ -3583,28 +3589,28 @@ function Zr({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3583
3589
  }
3584
3590
  //#endregion
3585
3591
  //#region src/DataTable/DataTable.tsx
3586
- var Qr = [
3592
+ var ei = [
3587
3593
  10,
3588
3594
  15,
3589
3595
  50,
3590
3596
  100,
3591
3597
  500
3592
3598
  ];
3593
- function $r({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutationApiPath: a, buttons: o, fields: c, selection: l, pagination: u, filters: h, actions: b, steps: x, defaultSort: S, onSortChange: C, createButtonText: E, queryParams: D, tabs: k, defaultTab: A, activeTab: j, onActiveTabChange: N, canUpdate: P, canDelete: F, showRefresh: ee = !0, rowExpansion: I, onRowClick: L, mobileCards: R = !1, deleteConfirmMessage: ne, editRecordId: re, onEditRecordIdChange: ie }) {
3594
- let [ae, oe] = d(A || (k && k.length > 0 ? k[0].value : null)), se = j === void 0 ? ae : j, ce = (e) => {
3595
- j === void 0 && oe(e), N && N(e);
3596
- }, B = k?.find((e) => e.value === se), ue = B?.queryParams || {}, de = B?.apiPath ?? r, pe = B?.mutationApiPath ?? a ?? de, me = {
3599
+ function ti({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutationApiPath: a, buttons: o, fields: c, selection: l, pagination: u, filters: h, actions: b, steps: x, defaultSort: S, onSortChange: C, createButtonText: E, queryParams: D, tabs: k, defaultTab: A, activeTab: j, onActiveTabChange: N, canUpdate: P, canDelete: F, showRefresh: ee = !0, rowExpansion: I, onRowClick: L, mobileCards: R = !1, deleteConfirmMessage: te, editRecordId: ne, onEditRecordIdChange: re }) {
3600
+ let [ie, ae] = d(A || (k && k.length > 0 ? k[0].value : null)), oe = j === void 0 ? ie : j, se = (e) => {
3601
+ j === void 0 && ae(e), N && N(e);
3602
+ }, V = k?.find((e) => e.value === oe), le = V?.queryParams || {}, ue = V?.apiPath ?? r, fe = V?.mutationApiPath ?? a ?? ue, pe = {
3597
3603
  ...D,
3598
- ...ue
3599
- }, he = me ? "?" + Object.entries(me).filter(([, e]) => e != null).map(([e, t]) => `${e}=${encodeURIComponent(t ?? "")}`).join("&") : "", ge = se ? [...t, se] : t, { data: _e, isLoading: ve, isError: ye, isRefetching: Se, refetch: Ce } = Ut(de + he, ge), De = Kr(Array.isArray(_e) ? _e : [], h), [Oe, Ae] = d({
3604
+ ...le
3605
+ }, me = pe ? "?" + Object.entries(pe).filter(([, e]) => e != null).map(([e, t]) => `${e}=${encodeURIComponent(t ?? "")}`).join("&") : "", he = oe ? [...t, oe] : t, { data: ge, isLoading: _e, isError: ve, isRefetching: xe, refetch: Se } = Ut(ue + me, he), Ee = Jr(Array.isArray(ge) ? ge : [], h), [De, ke] = d({
3600
3606
  columnAccessor: S?.field ?? c[0].id,
3601
3607
  direction: S?.direction ?? "desc"
3602
- }), je = (e) => {
3603
- Ae(e), C && C(String(e.columnAccessor), e.direction);
3604
- }, V = Br(De, Oe.columnAccessor, Oe.direction), [Me, Ne] = Ir(Qr[1], "mantine-table-page-size"), [Pe, Fe] = d(1), Ie = u ? V.slice((Pe - 1) * Me, Pe * Me) : V, [Le, Re] = d([]), ze = I?.expanded?.recordIds ?? Le, Be = I?.expanded?.onRecordIdsChange ?? Re, Ve = (e) => {
3605
- ze.includes(e) ? Be(ze.filter((t) => t !== e)) : Be(I?.allowMultiple ? [...ze, e] : [e]);
3606
- }, He = c.findIndex((e) => e.list && e.column && !e.column.hidden), Ue = I && He >= 0 ? c.map((e, t) => {
3607
- if (t !== He) return e;
3608
+ }), Ae = (e) => {
3609
+ ke(e), C && C(String(e.columnAccessor), e.direction);
3610
+ }, H = Hr(Ee, De.columnAccessor, De.direction), [je, Me] = Rr(ei[1], "mantine-table-page-size"), [Ne, Pe] = d(1), Fe = u ? H.slice((Ne - 1) * je, Ne * je) : H, [Ie, Le] = d([]), Re = I?.expanded?.recordIds ?? Ie, ze = I?.expanded?.onRecordIdsChange ?? Le, Be = (e) => {
3611
+ Re.includes(e) ? ze(Re.filter((t) => t !== e)) : ze(I?.allowMultiple ? [...Re, e] : [e]);
3612
+ }, Ve = c.findIndex((e) => e.list && e.column && !e.column.hidden), He = I && Ve >= 0 ? c.map((e, t) => {
3613
+ if (t !== Ve) return e;
3608
3614
  let n = e.column.render;
3609
3615
  return {
3610
3616
  ...e,
@@ -3618,51 +3624,51 @@ function $r({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3618
3624
  component: "span",
3619
3625
  "aria-label": "Aufklappen",
3620
3626
  onClick: (e) => {
3621
- e.stopPropagation(), Ve(t.id);
3627
+ e.stopPropagation(), Be(t.id);
3622
3628
  },
3623
3629
  style: {
3624
3630
  display: "inline-flex",
3625
3631
  flexShrink: 0,
3626
3632
  cursor: "pointer"
3627
3633
  },
3628
- children: /* @__PURE__ */ p(xe, {
3634
+ children: /* @__PURE__ */ p(be, {
3629
3635
  size: 16,
3630
3636
  style: {
3631
3637
  color: "var(--mantine-primary-color-filled)",
3632
- transform: ze.includes(t.id) ? "rotate(90deg)" : void 0,
3638
+ transform: Re.includes(t.id) ? "rotate(90deg)" : void 0,
3633
3639
  transition: "transform 200ms ease"
3634
3640
  }
3635
3641
  })
3636
3642
  }) : /* @__PURE__ */ p(v, {
3637
3643
  w: 16,
3638
3644
  style: { flexShrink: 0 }
3639
- }), n ? n(t, r) : String(zn(t, e.column.accessor) ?? "")]
3645
+ }), n ? n(t, r) : String(bn(t, e.column.accessor) ?? "")]
3640
3646
  })
3641
3647
  }
3642
3648
  };
3643
- }) : c, [H, U] = d([]);
3649
+ }) : c, [U, W] = d([]);
3644
3650
  s(() => {
3645
- U([]);
3646
- }, [se]);
3647
- let [We, Ge] = d(!1), [Ke, W] = d(!1), [qe, Je] = d(!1);
3651
+ W([]);
3652
+ }, [oe]);
3653
+ let [Ue, We] = d(!1), [Ge, G] = d(!1), [Ke, qe] = d(!1);
3648
3654
  s(() => {
3649
- if (re && V.length > 0) {
3650
- let e = V.find((e) => e.id === re);
3651
- e && (U([e]), W(!0), ie?.(null));
3655
+ if (ne && H.length > 0) {
3656
+ let e = H.find((e) => e.id === ne);
3657
+ e && (W([e]), G(!0), re?.(null));
3652
3658
  }
3653
- }, [re, V]);
3654
- let Ye = c.some((e) => e.update), Xe = c.some((e) => e.delete), G = [];
3655
- return Ye && G.push({
3656
- icon: /* @__PURE__ */ p(Te, { size: 14 }),
3659
+ }, [ne, H]);
3660
+ let Je = c.some((e) => e.update), Ye = c.some((e) => e.delete), Xe = [];
3661
+ return Je && Xe.push({
3662
+ icon: /* @__PURE__ */ p(we, { size: 14 }),
3657
3663
  label: "Bearbeiten",
3658
3664
  onClick: (e) => {
3659
- U(e), W(!0);
3665
+ W(e), G(!0);
3660
3666
  }
3661
- }), b && G.push(...b), Xe && G.push({
3662
- icon: /* @__PURE__ */ p(ke, { size: 14 }),
3667
+ }), b && Xe.push(...b), Ye && Xe.push({
3668
+ icon: /* @__PURE__ */ p(Oe, { size: 14 }),
3663
3669
  label: "Löschen",
3664
3670
  onClick: (e) => {
3665
- U(e), Je(!0);
3671
+ W(e), qe(!0);
3666
3672
  }
3667
3673
  }), /* @__PURE__ */ m(f, { children: [
3668
3674
  /* @__PURE__ */ m(w, {
@@ -3677,7 +3683,7 @@ function $r({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3677
3683
  },
3678
3684
  justify: e ? "space-between" : "flex-end",
3679
3685
  wrap: "wrap",
3680
- children: [e && (typeof e == "string" ? /* @__PURE__ */ p(fe, {
3686
+ children: [e && (typeof e == "string" ? /* @__PURE__ */ p(de, {
3681
3687
  order: 4,
3682
3688
  children: e
3683
3689
  }) : e), /* @__PURE__ */ m(w, {
@@ -3702,37 +3708,37 @@ function $r({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3702
3708
  children: [
3703
3709
  ee && /* @__PURE__ */ p(g, {
3704
3710
  variant: "subtle",
3705
- onClick: () => Ce(),
3711
+ onClick: () => Se(),
3706
3712
  "aria-label": "Neuladen",
3707
- children: /* @__PURE__ */ p(Ee, {})
3713
+ children: /* @__PURE__ */ p(Te, {})
3708
3714
  }),
3709
3715
  (c.some((e) => e.update) || l) && (() => {
3710
- let e = c.find((e) => e.update) && (!P || H.length > 0 && P(H[0])), t = c.find((e) => e.delete) && (!F || H.length > 0 && F(H[0])), n = (b ?? []).length > 0, r = e || t || n;
3716
+ let e = c.find((e) => e.update) && (!P || U.length > 0 && P(U[0])), t = c.find((e) => e.delete) && (!F || U.length > 0 && F(U[0])), n = (b ?? []).length > 0, r = e || t || n;
3711
3717
  return /* @__PURE__ */ p(v, {
3712
3718
  ...R ? { visibleFrom: "sm" } : {},
3713
3719
  children: /* @__PURE__ */ m(O, {
3714
3720
  shadow: "md",
3715
3721
  children: [/* @__PURE__ */ p(O.Target, { children: /* @__PURE__ */ p(y, {
3716
3722
  variant: "outline",
3717
- rightSection: /* @__PURE__ */ p(be, { size: 14 }),
3718
- disabled: !H.length || !r,
3723
+ rightSection: /* @__PURE__ */ p(ye, { size: 14 }),
3724
+ disabled: !U.length || !r,
3719
3725
  children: "Aktionen"
3720
3726
  }) }), /* @__PURE__ */ m(O.Dropdown, { children: [
3721
3727
  e && /* @__PURE__ */ p(O.Item, {
3722
- leftSection: /* @__PURE__ */ p(Te, { size: 14 }),
3723
- onClick: () => W(!0),
3724
- disabled: H.length !== 1,
3728
+ leftSection: /* @__PURE__ */ p(we, { size: 14 }),
3729
+ onClick: () => G(!0),
3730
+ disabled: U.length !== 1,
3725
3731
  children: "Bearbeiten"
3726
3732
  }),
3727
3733
  (b ?? []).map((e, t) => /* @__PURE__ */ i(O.Item, {
3728
3734
  ...e.icon && { leftSection: e.icon },
3729
3735
  key: `custom_action_${t}`,
3730
- onClick: () => e.onClick(H),
3731
- disabled: e.disabled?.(H) ?? !1
3736
+ onClick: () => e.onClick(U),
3737
+ disabled: e.disabled?.(U) ?? !1
3732
3738
  }, e.label)),
3733
3739
  t && /* @__PURE__ */ p(O.Item, {
3734
- leftSection: /* @__PURE__ */ p(ke, { size: 14 }),
3735
- onClick: () => Je(!0),
3740
+ leftSection: /* @__PURE__ */ p(Oe, { size: 14 }),
3741
+ onClick: () => qe(!0),
3736
3742
  color: "red",
3737
3743
  children: "Löschen"
3738
3744
  })
@@ -3741,64 +3747,64 @@ function $r({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3741
3747
  });
3742
3748
  })(),
3743
3749
  c.find((e) => e.create) && /* @__PURE__ */ p(y, {
3744
- onClick: () => Ge(!0),
3745
- disabled: ve,
3750
+ onClick: () => We(!0),
3751
+ disabled: _e,
3746
3752
  children: E ?? "Erstellen"
3747
3753
  }),
3748
3754
  o
3749
3755
  ]
3750
3756
  })]
3751
3757
  }),
3752
- k && k.length > 0 && /* @__PURE__ */ p(le, {
3753
- value: se,
3754
- onChange: ce,
3758
+ k && k.length > 0 && /* @__PURE__ */ p(ce, {
3759
+ value: oe,
3760
+ onChange: se,
3755
3761
  mt: "md",
3756
- children: /* @__PURE__ */ p(le.List, { children: k.map((e) => /* @__PURE__ */ p(le.Tab, {
3762
+ children: /* @__PURE__ */ p(ce.List, { children: k.map((e) => /* @__PURE__ */ p(ce.Tab, {
3757
3763
  value: e.value,
3758
3764
  leftSection: e.icon,
3759
3765
  children: e.label
3760
3766
  }, e.value)) })
3761
3767
  }),
3762
- ye && /* @__PURE__ */ p(_, {
3768
+ ve && /* @__PURE__ */ p(_, {
3763
3769
  mt: "md",
3764
3770
  variant: "light",
3765
3771
  color: "red",
3766
3772
  title: "Es ist ein Fehler aufgetreten.",
3767
- icon: /* @__PURE__ */ p(we, {}),
3773
+ icon: /* @__PURE__ */ p(Ce, {}),
3768
3774
  children: "Bitte versuche es später erneut oder sende eine Nachricht an unseren Support."
3769
3775
  }),
3770
- (ve || Se) && /* @__PURE__ */ m(z, {
3776
+ (_e || xe) && /* @__PURE__ */ m(B, {
3771
3777
  my: "md",
3772
- children: [/* @__PURE__ */ p(te, { height: 40 }), [
3778
+ children: [/* @__PURE__ */ p(z, { height: 40 }), [
3773
3779
  ,
3774
3780
  ,
3775
3781
  ,
3776
3782
  ,
3777
3783
  ,
3778
- ].fill(0).map((e, t) => /* @__PURE__ */ p(te, { height: 35 }, `skeleton-${t}`))]
3784
+ ].fill(0).map((e, t) => /* @__PURE__ */ p(z, { height: 35 }, `skeleton-${t}`))]
3779
3785
  }),
3780
- !ve && !Se && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(v, {
3786
+ !_e && !xe && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(v, {
3781
3787
  ...R ? { visibleFrom: "sm" } : {},
3782
- children: /* @__PURE__ */ p(Nr, {
3788
+ children: /* @__PURE__ */ p(Fr, {
3783
3789
  my: "md",
3784
3790
  striped: !0,
3785
3791
  highlightOnHover: !0,
3786
3792
  minHeight: 150,
3787
- fetching: ye,
3788
- records: Ie,
3789
- sortStatus: Oe,
3790
- onSortStatusChange: je,
3793
+ fetching: ve,
3794
+ records: Fe,
3795
+ sortStatus: De,
3796
+ onSortStatusChange: Ae,
3791
3797
  ...l && {
3792
- selectedRecords: H,
3793
- onSelectedRecordsChange: U
3798
+ selectedRecords: U,
3799
+ onSelectedRecordsChange: W
3794
3800
  },
3795
- ...u && Ie.length && {
3796
- totalRecords: V.length,
3797
- recordsPerPage: Me,
3798
- onPageChange: Fe,
3799
- page: Pe,
3800
- recordsPerPageOptions: Qr,
3801
- onRecordsPerPageChange: Ne,
3801
+ ...u && Fe.length && {
3802
+ totalRecords: H.length,
3803
+ recordsPerPage: je,
3804
+ onPageChange: Pe,
3805
+ page: Ne,
3806
+ recordsPerPageOptions: ei,
3807
+ onRecordsPerPageChange: Me,
3802
3808
  recordsPerPageLabel: "Einträge pro Seite"
3803
3809
  },
3804
3810
  ...I && { rowExpansion: {
@@ -3806,104 +3812,104 @@ function $r({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3806
3812
  trigger: L ? "never" : "click",
3807
3813
  content: ({ record: e }) => I.content(e, !1),
3808
3814
  expanded: {
3809
- recordIds: ze,
3810
- onRecordIdsChange: Be
3815
+ recordIds: Re,
3816
+ onRecordIdsChange: ze
3811
3817
  },
3812
3818
  ...I.expandable && { expandable: ({ record: e }) => I.expandable(e) }
3813
3819
  } },
3814
- columns: Ue.map((e) => e.column),
3820
+ columns: He.map((e) => e.column),
3815
3821
  noRecordsText: "Keine Einträge gefunden",
3816
3822
  onRowClick: L,
3817
3823
  ...L && { style: { cursor: "pointer" } }
3818
3824
  })
3819
3825
  }), R && /* @__PURE__ */ p(v, {
3820
3826
  hiddenFrom: "sm",
3821
- children: /* @__PURE__ */ p(Zr, {
3822
- records: Ie,
3823
- fields: Ue,
3827
+ children: /* @__PURE__ */ p($r, {
3828
+ records: Fe,
3829
+ fields: He,
3824
3830
  onRowClick: L,
3825
3831
  sort: {
3826
- field: String(Oe.columnAccessor),
3827
- direction: Oe.direction,
3832
+ field: String(De.columnAccessor),
3833
+ direction: De.direction,
3828
3834
  onSortChange: (e, t) => {
3829
- je({
3835
+ Ae({
3830
3836
  columnAccessor: e,
3831
3837
  direction: t
3832
3838
  });
3833
3839
  }
3834
3840
  },
3835
- ...u && Ie.length && { pagination: {
3836
- totalRecords: V.length,
3837
- recordsPerPage: Me,
3838
- page: Pe,
3839
- onPageChange: Fe,
3840
- recordsPerPageOptions: Qr,
3841
+ ...u && Fe.length && { pagination: {
3842
+ totalRecords: H.length,
3843
+ recordsPerPage: je,
3844
+ page: Ne,
3845
+ onPageChange: Pe,
3846
+ recordsPerPageOptions: ei,
3841
3847
  onRecordsPerPageChange: (e) => {
3842
- Ne(e), Fe(1);
3848
+ Me(e), Pe(1);
3843
3849
  }
3844
3850
  } },
3845
3851
  ...I && { rowExpansion: {
3846
3852
  content: I.content,
3847
3853
  expanded: {
3848
- recordIds: ze,
3849
- onRecordIdsChange: Be
3854
+ recordIds: Re,
3855
+ onRecordIdsChange: ze
3850
3856
  },
3851
3857
  ...I.expandable && { expandable: I.expandable }
3852
3858
  } },
3853
- ...G.length > 0 && {
3854
- actions: G,
3859
+ ...Xe.length > 0 && {
3860
+ actions: Xe,
3855
3861
  canUpdate: P,
3856
3862
  canDelete: F
3857
3863
  }
3858
3864
  })
3859
3865
  })] }),
3860
3866
  /* @__PURE__ */ p(M, {
3861
- opened: Ke,
3867
+ opened: Ge,
3862
3868
  onClose: () => {
3863
- W(!1), U([]);
3869
+ G(!1), W([]);
3864
3870
  },
3865
3871
  title: e ?? "Bearbeiten",
3866
- children: H.length > 0 && /* @__PURE__ */ p(Pr, {
3872
+ children: U.length > 0 && /* @__PURE__ */ p(Ir, {
3867
3873
  fields: c.filter((e) => e.update),
3868
3874
  queryKey: t,
3869
3875
  connectedQueryKeys: n,
3870
- apiPath: pe,
3871
- id: H[0].id,
3876
+ apiPath: fe,
3877
+ id: U[0].id,
3872
3878
  onClose: () => {
3873
- W(!1), U([]);
3879
+ G(!1), W([]);
3874
3880
  },
3875
3881
  steps: x
3876
3882
  })
3877
3883
  }),
3878
- H.length > 0 && /* @__PURE__ */ p(M, {
3879
- opened: qe,
3884
+ U.length > 0 && /* @__PURE__ */ p(M, {
3885
+ opened: Ke,
3880
3886
  onClose: () => {
3881
- Je(!1), U([]);
3887
+ qe(!1), W([]);
3882
3888
  },
3883
3889
  title: e ?? "Löschen",
3884
- children: /* @__PURE__ */ p(Fr, {
3890
+ children: /* @__PURE__ */ p(Lr, {
3885
3891
  onClose: () => {
3886
- Je(!1), U([]);
3892
+ qe(!1), W([]);
3887
3893
  },
3888
3894
  queryKey: t,
3889
3895
  connectedQueryKeys: n,
3890
- apiPath: pe,
3891
- selectedRecords: H,
3892
- confirmMessage: ne
3896
+ apiPath: fe,
3897
+ selectedRecords: U,
3898
+ confirmMessage: te
3893
3899
  })
3894
3900
  }),
3895
3901
  /* @__PURE__ */ p(M, {
3896
- opened: We,
3902
+ opened: Ue,
3897
3903
  onClose: () => {
3898
- Ge(!1);
3904
+ We(!1);
3899
3905
  },
3900
3906
  title: e ?? "Anlegen",
3901
3907
  children: /* @__PURE__ */ p(rn, {
3902
3908
  queryKey: t,
3903
3909
  connectedQueryKeys: n,
3904
- apiPath: pe,
3910
+ apiPath: fe,
3905
3911
  onClose: () => {
3906
- Ge(!1);
3912
+ We(!1);
3907
3913
  },
3908
3914
  fields: c.filter((e) => e.create),
3909
3915
  steps: x
@@ -3913,23 +3919,23 @@ function $r({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3913
3919
  }
3914
3920
  //#endregion
3915
3921
  //#region src/DataTable/SubTable.tsx
3916
- function ei({ mobile: e, columns: t, ...n }) {
3917
- return e ? /* @__PURE__ */ p(z, {
3922
+ function ni({ mobile: e, columns: t, ...n }) {
3923
+ return e ? /* @__PURE__ */ p(B, {
3918
3924
  gap: "sm",
3919
3925
  style: { fontVariantNumeric: "tabular-nums" },
3920
3926
  children: (n.records ?? []).map((e, r) => {
3921
3927
  let i = t.filter((t) => !t.hidden && !t.hideOnMobile?.(e)).map((t) => ({
3922
- label: t.title ?? In(String(t.accessor)),
3923
- value: t.render ? t.render(e, r) : zn(e, t.accessor)
3924
- })), a = n.idAccessor ? $(e, n.idAccessor) : r;
3925
- return /* @__PURE__ */ p(Jr, { rows: i }, a);
3928
+ label: t.title ?? hn(String(t.accessor)),
3929
+ value: t.render ? t.render(e, r) : bn(e, t.accessor)
3930
+ })), a = n.idAccessor ? Q(e, n.idAccessor) : r;
3931
+ return /* @__PURE__ */ p(Xr, { rows: i }, a);
3926
3932
  })
3927
- }) : /* @__PURE__ */ p(Nr, {
3933
+ }) : /* @__PURE__ */ p(Fr, {
3928
3934
  columns: t,
3929
3935
  ...n
3930
3936
  });
3931
3937
  }
3932
3938
  //#endregion
3933
- export { rn as CreateModal, $r as DataTable, Mt as DataTableProvider, Fr as DeleteModal, Jr as FieldCard, Zr as MobileCardList, ei as SubTable, Pr as UpdateModal, Bt as api, zt as createOne, Rt as deleteOne, It as getAll, Lt as getOne, Br as sortData, Vt as updateOne, Gt as useAddOne, J as useDataTable, qt as useDeleteOne, Ut as useGetAll, Ht as useGetOne, Ir as usePersistentState, Kt as useUpdateOne };
3939
+ export { rn as CreateModal, ti as DataTable, Mt as DataTableProvider, Lr as DeleteModal, Xr as FieldCard, $r as MobileCardList, ni as SubTable, Ir as UpdateModal, Bt as api, zt as createOne, Rt as deleteOne, It as getAll, Lt as getOne, Hr as sortData, Vt as updateOne, Gt as useAddOne, J as useDataTable, qt as useDeleteOne, Ut as useGetAll, Ht as useGetOne, Rr as usePersistentState, Kt as useUpdateOne };
3934
3940
 
3935
3941
  //# sourceMappingURL=index.es.js.map