@espresso-lab/mantine-data-table 2.2.5 → 2.2.6

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,14 +1,13 @@
1
- import { c as e } from "react/compiler-runtime";
2
- import * as t from "react";
3
- import n, { Fragment as r, createContext as i, createElement as a, useCallback as o, useContext as s, useEffect as c, useLayoutEffect as l, useMemo as u, useRef as d, useState as f } from "react";
4
- import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
5
- import { Accordion as g, ActionIcon as _, Alert as v, Box as y, Button as b, Center as x, Checkbox as S, Collapse as C, Divider as w, Flex as T, Group as E, Indicator as D, Loader as O, Menu as k, MenuDropdown as A, MenuItem as j, MenuTarget as M, Modal as N, NumberInput as P, Pagination as F, Popover as I, PopoverDropdown as L, PopoverTarget as R, ScrollArea as z, Select as ee, Skeleton as B, Stack as te, Stepper as ne, Table as V, TableTd as re, TableTfoot as ie, TableTh as ae, TableThead as H, TableTr as U, Tabs as oe, Text as W, TextInput as se, Textarea as ce, Title as le, createSafeContext as ue, parseThemeColor as de, rem as fe, useDirection as pe, useMantineTheme as me } from "@mantine/core";
6
- import { DateInput as he } from "@mantine/dates";
7
- import { useForm as ge } from "@mantine/form";
8
- import { IconCaretDownFilled as _e, IconChevronRight as ve, IconDotsVertical as ye, IconFilter as be, IconInfoCircle as xe, IconPencil as Se, IconRefresh as Ce, IconSortAscending as we, IconSortDescending as Te, IconTrash as Ee } from "@tabler/icons-react";
9
- import { useClickOutside as De, useDisclosure as Oe, useLocalStorage as G, useMediaQuery as ke, useMergedRef as Ae, useTimeout as je } from "@mantine/hooks";
1
+ import * as e from "react";
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
+ 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 ee, Popover as P, PopoverDropdown as F, PopoverTarget as te, ScrollArea as I, Select as L, Skeleton as ne, Stack as R, Stepper as re, Table as ie, TableTd as z, TableTfoot as ae, TableTh as oe, TableThead as se, TableTr as B, Tabs as ce, Text as V, TextInput as le, Textarea as ue, Title as de, createSafeContext as fe, parseThemeColor as pe, rem as H, useDirection as me, useMantineTheme as he } from "@mantine/core";
5
+ import { DateInput as ge } from "@mantine/dates";
6
+ import { useForm as _e } from "@mantine/form";
7
+ import { IconCaretDownFilled as ve, IconChevronRight as ye, IconDotsVertical as be, IconFilter as xe, IconInfoCircle as Se, IconPencil as Ce, IconRefresh as we, IconSortAscending as Te, IconSortDescending as Ee, IconTrash as De } from "@tabler/icons-react";
8
+ import { useClickOutside as Oe, useDisclosure as ke, useLocalStorage as Ae, useMediaQuery as je, useMergedRef as Me, useTimeout as Ne } from "@mantine/hooks";
10
9
  //#region node_modules/@tanstack/query-core/build/modern/subscribable.js
11
- var Me = class {
10
+ var U = class {
12
11
  constructor() {
13
12
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
14
13
  }
@@ -22,7 +21,7 @@ var Me = class {
22
21
  }
23
22
  onSubscribe() {}
24
23
  onUnsubscribe() {}
25
- }, Ne = new class extends Me {
24
+ }, Pe = new class extends U {
26
25
  #e;
27
26
  #t;
28
27
  #n;
@@ -59,13 +58,13 @@ var Me = class {
59
58
  isFocused() {
60
59
  return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
61
60
  }
62
- }(), Pe = {
61
+ }(), Fe = {
63
62
  setTimeout: (e, t) => setTimeout(e, t),
64
63
  clearTimeout: (e) => clearTimeout(e),
65
64
  setInterval: (e, t) => setInterval(e, t),
66
65
  clearInterval: (e) => clearInterval(e)
67
- }, Fe = new class {
68
- #e = Pe;
66
+ }, Ie = new class {
67
+ #e = Fe;
69
68
  #t = !1;
70
69
  setTimeoutProvider(e) {
71
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.", {
@@ -86,87 +85,87 @@ var Me = class {
86
85
  this.#e.clearInterval(e);
87
86
  }
88
87
  }();
89
- function Ie(e) {
88
+ function Le(e) {
90
89
  setTimeout(e, 0);
91
90
  }
92
91
  //#endregion
93
92
  //#region node_modules/@tanstack/query-core/build/modern/utils.js
94
- var Le = typeof window > "u" || "Deno" in globalThis;
95
- function Re() {}
96
- function ze(e) {
93
+ var Re = typeof window > "u" || "Deno" in globalThis;
94
+ function ze() {}
95
+ function Be(e) {
97
96
  return typeof e == "number" && e >= 0 && e !== Infinity;
98
97
  }
99
- function Be(e, t) {
98
+ function Ve(e, t) {
100
99
  return Math.max(e + (t || 0) - Date.now(), 0);
101
100
  }
102
- function K(e, t) {
101
+ function He(e, t) {
103
102
  return typeof e == "function" ? e(t) : e;
104
103
  }
105
- function q(e, t) {
104
+ function W(e, t) {
106
105
  return typeof e == "function" ? e(t) : e;
107
106
  }
108
- function Ve(e) {
109
- return JSON.stringify(e, (e, t) => Ke(t) ? Object.keys(t).sort().reduce((e, n) => (e[n] = t[n], e), {}) : t);
107
+ function G(e) {
108
+ return JSON.stringify(e, (e, t) => qe(t) ? Object.keys(t).sort().reduce((e, n) => (e[n] = t[n], e), {}) : t);
110
109
  }
111
- var He = Object.prototype.hasOwnProperty;
112
- function Ue(e, t, n = 0) {
110
+ var Ue = Object.prototype.hasOwnProperty;
111
+ function We(e, t, n = 0) {
113
112
  if (e === t) return e;
114
113
  if (n > 500) return t;
115
- let r = Ge(e) && Ge(t);
116
- if (!r && !(Ke(e) && Ke(t))) return t;
114
+ let r = Ke(e) && Ke(t);
115
+ if (!r && !(qe(e) && qe(t))) return t;
117
116
  let i = (r ? e : Object.keys(e)).length, a = r ? t : Object.keys(t), o = a.length, s = r ? Array(o) : {}, c = 0;
118
117
  for (let l = 0; l < o; l++) {
119
118
  let o = r ? l : a[l], u = e[o], d = t[o];
120
119
  if (u === d) {
121
- s[o] = u, (r ? l < i : He.call(e, o)) && c++;
120
+ s[o] = u, (r ? l < i : Ue.call(e, o)) && c++;
122
121
  continue;
123
122
  }
124
123
  if (u === null || d === null || typeof u != "object" || typeof d != "object") {
125
124
  s[o] = d;
126
125
  continue;
127
126
  }
128
- let f = Ue(u, d, n + 1);
127
+ let f = We(u, d, n + 1);
129
128
  s[o] = f, f === u && c++;
130
129
  }
131
130
  return i === o && c === i ? e : s;
132
131
  }
133
- function We(e, t) {
132
+ function Ge(e, t) {
134
133
  if (!t || Object.keys(e).length !== Object.keys(t).length) return !1;
135
134
  for (let n in e) if (e[n] !== t[n]) return !1;
136
135
  return !0;
137
136
  }
138
- function Ge(e) {
137
+ function Ke(e) {
139
138
  return Array.isArray(e) && e.length === Object.keys(e).length;
140
139
  }
141
- function Ke(e) {
142
- if (!qe(e)) return !1;
140
+ function qe(e) {
141
+ if (!Je(e)) return !1;
143
142
  let t = e.constructor;
144
143
  if (t === void 0) return !0;
145
144
  let n = t.prototype;
146
- return !(!qe(n) || !n.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
145
+ return !(!Je(n) || !n.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
147
146
  }
148
- function qe(e) {
147
+ function Je(e) {
149
148
  return Object.prototype.toString.call(e) === "[object Object]";
150
149
  }
151
- function Je(e, t, n) {
150
+ function Ye(e, t, n) {
152
151
  if (typeof n.structuralSharing == "function") return n.structuralSharing(e, t);
153
152
  if (n.structuralSharing !== !1) {
154
153
  if (process.env.NODE_ENV !== "production") try {
155
- return Ue(e, t);
154
+ return We(e, t);
156
155
  } catch (e) {
157
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;
158
157
  }
159
- return Ue(e, t);
158
+ return We(e, t);
160
159
  }
161
160
  return t;
162
161
  }
163
- function Ye(e, t) {
162
+ function Xe(e, t) {
164
163
  return typeof e == "function" ? e(...t) : !!e;
165
164
  }
166
165
  //#endregion
167
166
  //#region node_modules/@tanstack/query-core/build/modern/environmentManager.js
168
- var Xe = /* @__PURE__ */ (() => {
169
- let e = () => Le;
167
+ var Ze = /* @__PURE__ */ (() => {
168
+ let e = () => Re;
170
169
  return {
171
170
  isServer() {
172
171
  return e();
@@ -178,7 +177,7 @@ var Xe = /* @__PURE__ */ (() => {
178
177
  })();
179
178
  //#endregion
180
179
  //#region node_modules/@tanstack/query-core/build/modern/thenable.js
181
- function Ze() {
180
+ function Qe() {
182
181
  let e, t, n = new Promise((n, r) => {
183
182
  e = n, t = r;
184
183
  });
@@ -200,13 +199,13 @@ function Ze() {
200
199
  }
201
200
  //#endregion
202
201
  //#region node_modules/@tanstack/query-core/build/modern/notifyManager.js
203
- var Qe = Ie;
204
- function $e() {
202
+ var $e = Le;
203
+ function et() {
205
204
  let e = [], t = 0, n = (e) => {
206
205
  e();
207
206
  }, r = (e) => {
208
207
  e();
209
- }, i = Qe, a = (r) => {
208
+ }, i = $e, a = (r) => {
210
209
  t ? e.push(r) : i(() => {
211
210
  n(r);
212
211
  });
@@ -248,7 +247,7 @@ function $e() {
248
247
  }
249
248
  };
250
249
  }
251
- var et = $e(), tt = new class extends Me {
250
+ var tt = et(), nt = new class extends U {
252
251
  #e = !0;
253
252
  #t;
254
253
  #n;
@@ -282,16 +281,16 @@ var et = $e(), tt = new class extends Me {
282
281
  }();
283
282
  //#endregion
284
283
  //#region node_modules/@tanstack/query-core/build/modern/retryer.js
285
- function nt(e) {
286
- return (e ?? "online") === "online" ? tt.isOnline() : !0;
284
+ function rt(e) {
285
+ return (e ?? "online") === "online" ? nt.isOnline() : !0;
287
286
  }
288
287
  //#endregion
289
288
  //#region node_modules/@tanstack/query-core/build/modern/query.js
290
- function rt(e, t) {
289
+ function it(e, t) {
291
290
  return {
292
291
  fetchFailureCount: 0,
293
292
  fetchFailureReason: null,
294
- fetchStatus: nt(t.networkMode) ? "fetching" : "paused",
293
+ fetchStatus: rt(t.networkMode) ? "fetching" : "paused",
295
294
  ...e === void 0 && {
296
295
  error: null,
297
296
  status: "pending"
@@ -300,9 +299,9 @@ function rt(e, t) {
300
299
  }
301
300
  //#endregion
302
301
  //#region node_modules/@tanstack/query-core/build/modern/queryObserver.js
303
- var it = class extends Me {
302
+ var at = class extends U {
304
303
  constructor(e, t) {
305
- super(), this.options = t, this.#e = e, this.#s = null, this.#o = Ze(), this.bindMethods(), this.setOptions(t);
304
+ super(), this.options = t, this.#e = e, this.#s = null, this.#o = Qe(), this.bindMethods(), this.setOptions(t);
306
305
  }
307
306
  #e;
308
307
  #t = void 0;
@@ -323,36 +322,36 @@ var it = class extends Me {
323
322
  this.refetch = this.refetch.bind(this);
324
323
  }
325
324
  onSubscribe() {
326
- this.listeners.size === 1 && (this.#t.addObserver(this), ot(this.#t, this.options) ? this.#h() : this.updateResult(), this.#y());
325
+ this.listeners.size === 1 && (this.#t.addObserver(this), st(this.#t, this.options) ? this.#h() : this.updateResult(), this.#y());
327
326
  }
328
327
  onUnsubscribe() {
329
328
  this.hasListeners() || this.destroy();
330
329
  }
331
330
  shouldFetchOnReconnect() {
332
- return st(this.#t, this.options, this.options.refetchOnReconnect);
331
+ return ct(this.#t, this.options, this.options.refetchOnReconnect);
333
332
  }
334
333
  shouldFetchOnWindowFocus() {
335
- return st(this.#t, this.options, this.options.refetchOnWindowFocus);
334
+ return ct(this.#t, this.options, this.options.refetchOnWindowFocus);
336
335
  }
337
336
  destroy() {
338
337
  this.listeners = /* @__PURE__ */ new Set(), this.#b(), this.#x(), this.#t.removeObserver(this);
339
338
  }
340
339
  setOptions(e) {
341
340
  let t = this.options, n = this.#t;
342
- if (this.options = this.#e.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof q(this.options.enabled, this.#t) != "boolean") throw Error("Expected enabled to be a boolean or a callback that returns a boolean");
343
- this.#S(), this.#t.setOptions(this.options), t._defaulted && !We(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 && !Ge(this.options, t) && this.#e.getQueryCache().notify({
344
343
  type: "observerOptionsUpdated",
345
344
  query: this.#t,
346
345
  observer: this
347
346
  });
348
347
  let r = this.hasListeners();
349
- r && ct(this.#t, n, this.options, t) && this.#h(), this.updateResult(), r && (this.#t !== n || q(this.options.enabled, this.#t) !== q(t.enabled, this.#t) || K(this.options.staleTime, this.#t) !== K(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) || He(this.options.staleTime, this.#t) !== He(t.staleTime, this.#t)) && this.#g();
350
349
  let i = this.#_();
351
- r && (this.#t !== n || q(this.options.enabled, this.#t) !== q(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);
352
351
  }
353
352
  getOptimisticResult(e) {
354
353
  let t = this.#e.getQueryCache().build(this.#e, e), n = this.createResult(t, e);
355
- return J(this, n) && (this.#r = n, this.#a = this.options, this.#i = this.#t.state), n;
354
+ return dt(this, n) && (this.#r = n, this.#a = this.options, this.#i = this.#t.state), n;
356
355
  }
357
356
  getCurrentResult() {
358
357
  return this.#r;
@@ -382,14 +381,14 @@ var it = class extends Me {
382
381
  #h(e) {
383
382
  this.#S();
384
383
  let t = this.#t.fetch(this.options, e);
385
- return e?.throwOnError || (t = t.catch(Re)), t;
384
+ return e?.throwOnError || (t = t.catch(ze)), t;
386
385
  }
387
386
  #g() {
388
387
  this.#b();
389
- let e = K(this.options.staleTime, this.#t);
390
- if (Xe.isServer() || this.#r.isStale || !ze(e)) return;
391
- let t = Be(this.#r.dataUpdatedAt, e) + 1;
392
- this.#d = Fe.setTimeout(() => {
388
+ let e = He(this.options.staleTime, this.#t);
389
+ if (Ze.isServer() || this.#r.isStale || !Be(e)) return;
390
+ let t = Ve(this.#r.dataUpdatedAt, e) + 1;
391
+ this.#d = Ie.setTimeout(() => {
393
392
  this.#r.isStale || this.updateResult();
394
393
  }, t);
395
394
  }
@@ -397,26 +396,26 @@ var it = class extends Me {
397
396
  return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
398
397
  }
399
398
  #v(e) {
400
- this.#x(), this.#p = e, !(Xe.isServer() || q(this.options.enabled, this.#t) === !1 || !ze(this.#p) || this.#p === 0) && (this.#f = Fe.setInterval(() => {
401
- (this.options.refetchIntervalInBackground || Ne.isFocused()) && this.#h();
399
+ this.#x(), this.#p = e, !(Ze.isServer() || W(this.options.enabled, this.#t) === !1 || !Be(this.#p) || this.#p === 0) && (this.#f = Ie.setInterval(() => {
400
+ (this.options.refetchIntervalInBackground || Pe.isFocused()) && this.#h();
402
401
  }, this.#p));
403
402
  }
404
403
  #y() {
405
404
  this.#g(), this.#v(this.#_());
406
405
  }
407
406
  #b() {
408
- this.#d !== void 0 && (Fe.clearTimeout(this.#d), this.#d = void 0);
407
+ this.#d !== void 0 && (Ie.clearTimeout(this.#d), this.#d = void 0);
409
408
  }
410
409
  #x() {
411
- this.#f !== void 0 && (Fe.clearInterval(this.#f), this.#f = void 0);
410
+ this.#f !== void 0 && (Ie.clearInterval(this.#f), this.#f = void 0);
412
411
  }
413
412
  createResult(e, t) {
414
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;
415
414
  if (t._optimisticResults) {
416
- let i = this.hasListeners(), a = !i && ot(e, t), o = i && ct(e, n, t, r);
415
+ let i = this.hasListeners(), a = !i && st(e, t), o = i && lt(e, n, t, r);
417
416
  (a || o) && (l = {
418
417
  ...l,
419
- ...rt(c.data, e.options)
418
+ ...it(c.data, e.options)
420
419
  }), t._optimisticResults === "isRestoring" && (l.fetchStatus = "idle");
421
420
  }
422
421
  let { error: f, errorUpdatedAt: p, status: m } = l;
@@ -424,11 +423,11 @@ var it = class extends Me {
424
423
  let h = !1;
425
424
  if (t.placeholderData !== void 0 && d === void 0 && m === "pending") {
426
425
  let e;
427
- 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 = Je(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);
428
427
  }
429
428
  if (t.select && d !== void 0 && !h) if (i && d === a?.data && t.select === this.#c) d = this.#l;
430
429
  else try {
431
- this.#c = t.select, d = t.select(d), d = Je(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;
432
431
  } catch (e) {
433
432
  this.#s = e;
434
433
  }
@@ -456,16 +455,16 @@ var it = class extends Me {
456
455
  isPaused: l.fetchStatus === "paused",
457
456
  isPlaceholderData: u,
458
457
  isRefetchError: v && b,
459
- isStale: lt(e, t),
458
+ isStale: ut(e, t),
460
459
  refetch: this.refetch,
461
460
  promise: this.#o,
462
- isEnabled: q(t.enabled, e) !== !1
461
+ isEnabled: W(t.enabled, e) !== !1
463
462
  };
464
463
  if (this.options.experimental_prefetchInRender) {
465
464
  let t = x.data !== void 0, r = x.status === "error" && !t, i = (e) => {
466
465
  r ? e.reject(x.error) : t && e.resolve(x.data);
467
466
  }, a = () => {
468
- i(this.#o = x.promise = Ze());
467
+ i(this.#o = x.promise = Qe());
469
468
  }, o = this.#o;
470
469
  switch (o.status) {
471
470
  case "pending":
@@ -483,7 +482,7 @@ var it = class extends Me {
483
482
  }
484
483
  updateResult() {
485
484
  let e = this.#r, t = this.createResult(this.#t, this.options);
486
- this.#i = this.#t.state, this.#a = this.options, this.#i.data !== void 0 && (this.#u = this.#t), !We(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), !Ge(t, e) && (this.#r = t, this.#C({ listeners: (() => {
487
486
  if (!e) return !0;
488
487
  let { notifyOnChangeProps: t } = this.options, n = typeof t == "function" ? t() : t;
489
488
  if (n === "all" || !n && !this.#m.size) return !0;
@@ -504,7 +503,7 @@ var it = class extends Me {
504
503
  this.updateResult(), this.hasListeners() && this.#y();
505
504
  }
506
505
  #C(e) {
507
- et.batch(() => {
506
+ tt.batch(() => {
508
507
  e.listeners && this.listeners.forEach((e) => {
509
508
  e(this.#r);
510
509
  }), this.#e.getQueryCache().notify({
@@ -514,31 +513,31 @@ var it = class extends Me {
514
513
  });
515
514
  }
516
515
  };
517
- function at(e, t) {
518
- return q(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && q(t.retryOnMount, e) === !1);
519
- }
520
516
  function ot(e, t) {
521
- return at(e, t) || e.state.data !== void 0 && st(e, t, t.refetchOnMount);
517
+ return W(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && W(t.retryOnMount, e) === !1);
518
+ }
519
+ function st(e, t) {
520
+ return ot(e, t) || e.state.data !== void 0 && ct(e, t, t.refetchOnMount);
522
521
  }
523
- function st(e, t, n) {
524
- if (q(t.enabled, e) !== !1 && K(t.staleTime, e) !== "static") {
522
+ function ct(e, t, n) {
523
+ if (W(t.enabled, e) !== !1 && He(t.staleTime, e) !== "static") {
525
524
  let r = typeof n == "function" ? n(e) : n;
526
- return r === "always" || r !== !1 && lt(e, t);
525
+ return r === "always" || r !== !1 && ut(e, t);
527
526
  }
528
527
  return !1;
529
528
  }
530
- function ct(e, t, n, r) {
531
- return (e !== t || q(r.enabled, e) === !1) && (!n.suspense || e.state.status !== "error") && lt(e, n);
529
+ function lt(e, t, n, r) {
530
+ return (e !== t || W(r.enabled, e) === !1) && (!n.suspense || e.state.status !== "error") && ut(e, n);
532
531
  }
533
- function lt(e, t) {
534
- return q(t.enabled, e) !== !1 && e.isStaleByTime(K(t.staleTime, e));
532
+ function ut(e, t) {
533
+ return W(t.enabled, e) !== !1 && e.isStaleByTime(He(t.staleTime, e));
535
534
  }
536
- function J(e, t) {
537
- return !We(e.getCurrentResult(), t);
535
+ function dt(e, t) {
536
+ return !Ge(e.getCurrentResult(), t);
538
537
  }
539
538
  //#endregion
540
539
  //#region node_modules/@tanstack/query-core/build/modern/mutation.js
541
- function ut() {
540
+ function K() {
542
541
  return {
543
542
  context: void 0,
544
543
  data: void 0,
@@ -553,7 +552,7 @@ function ut() {
553
552
  }
554
553
  //#endregion
555
554
  //#region node_modules/@tanstack/query-core/build/modern/mutationObserver.js
556
- var Y = class extends Me {
555
+ var ft = class extends U {
557
556
  #e;
558
557
  #t = void 0;
559
558
  #n;
@@ -566,11 +565,11 @@ var Y = class extends Me {
566
565
  }
567
566
  setOptions(e) {
568
567
  let t = this.options;
569
- this.options = this.#e.defaultMutationOptions(e), We(this.options, t) || this.#e.getMutationCache().notify({
568
+ this.options = this.#e.defaultMutationOptions(e), Ge(this.options, t) || this.#e.getMutationCache().notify({
570
569
  type: "observerOptionsUpdated",
571
570
  mutation: this.#n,
572
571
  observer: this
573
- }), t?.mutationKey && this.options.mutationKey && Ve(t.mutationKey) !== Ve(this.options.mutationKey) ? this.reset() : this.#n?.state.status === "pending" && this.#n.setOptions(this.options);
572
+ }), t?.mutationKey && this.options.mutationKey && G(t.mutationKey) !== G(this.options.mutationKey) ? this.reset() : this.#n?.state.status === "pending" && this.#n.setOptions(this.options);
574
573
  }
575
574
  onUnsubscribe() {
576
575
  this.hasListeners() || this.#n?.removeObserver(this);
@@ -588,7 +587,7 @@ var Y = class extends Me {
588
587
  return this.#r = t, this.#n?.removeObserver(this), this.#n = this.#e.getMutationCache().build(this.#e, this.options), this.#n.addObserver(this), this.#n.execute(e);
589
588
  }
590
589
  #i() {
591
- let e = this.#n?.state ?? ut();
590
+ let e = this.#n?.state ?? K();
592
591
  this.#t = {
593
592
  ...e,
594
593
  isPending: e.status === "pending",
@@ -600,7 +599,7 @@ var Y = class extends Me {
600
599
  };
601
600
  }
602
601
  #a(e) {
603
- et.batch(() => {
602
+ tt.batch(() => {
604
603
  if (this.#r && this.hasListeners()) {
605
604
  let t = this.#t.variables, n = this.#t.context, r = {
606
605
  client: this.#e,
@@ -636,21 +635,21 @@ var Y = class extends Me {
636
635
  });
637
636
  });
638
637
  }
639
- }, dt = t.createContext(void 0), ft = (e) => {
640
- let n = t.useContext(dt);
641
- if (e) return e;
638
+ }, q = e.createContext(void 0), pt = (t) => {
639
+ let n = e.useContext(q);
640
+ if (t) return t;
642
641
  if (!n) throw Error("No QueryClient set, use QueryClientProvider to set one");
643
642
  return n;
644
- }, pt = ({ client: e, children: n }) => (t.useEffect(() => (e.mount(), () => {
645
- e.unmount();
646
- }), [e]), /* @__PURE__ */ m(dt.Provider, {
647
- value: e,
643
+ }, mt = ({ client: t, children: n }) => (e.useEffect(() => (t.mount(), () => {
644
+ t.unmount();
645
+ }), [t]), /* @__PURE__ */ p(q.Provider, {
646
+ value: t,
648
647
  children: n
649
- })), mt = t.createContext(!1), ht = () => t.useContext(mt);
650
- mt.Provider;
648
+ })), ht = e.createContext(!1), gt = () => e.useContext(ht);
649
+ ht.Provider;
651
650
  //#endregion
652
651
  //#region node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
653
- function gt() {
652
+ function _t() {
654
653
  let e = !1;
655
654
  return {
656
655
  clearReset: () => {
@@ -662,65 +661,65 @@ function gt() {
662
661
  isReset: () => e
663
662
  };
664
663
  }
665
- var _t = t.createContext(gt()), vt = () => t.useContext(_t), yt = (e, t, n) => {
666
- let r = n?.state.error && typeof e.throwOnError == "function" ? Ye(e.throwOnError, [n.state.error, n]) : e.throwOnError;
664
+ var vt = e.createContext(_t()), yt = () => e.useContext(vt), bt = (e, t, n) => {
665
+ let r = n?.state.error && typeof e.throwOnError == "function" ? Xe(e.throwOnError, [n.state.error, n]) : e.throwOnError;
667
666
  (e.suspense || e.experimental_prefetchInRender || r) && (t.isReset() || (e.retryOnMount = !1));
668
- }, bt = (e) => {
669
- t.useEffect(() => {
670
- e.clearReset();
671
- }, [e]);
672
- }, xt = ({ result: e, errorResetBoundary: t, throwOnError: n, query: r, suspense: i }) => e.isError && !t.isReset() && !e.isFetching && r && (i && e.data === void 0 || Ye(n, [e.error, r])), St = (e) => {
667
+ }, xt = (t) => {
668
+ e.useEffect(() => {
669
+ t.clearReset();
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 || Xe(n, [e.error, r])), Ct = (e) => {
673
672
  if (e.suspense) {
674
673
  let t = 1e3, n = (e) => e === "static" ? e : Math.max(e ?? t, t), r = e.staleTime;
675
674
  e.staleTime = typeof r == "function" ? (...e) => n(r(...e)) : n(r), typeof e.gcTime == "number" && (e.gcTime = Math.max(e.gcTime, t));
676
675
  }
677
- }, Ct = (e, t) => e.isLoading && e.isFetching && !t, wt = (e, t) => e?.suspense && t.isPending, Tt = (e, t, n) => t.fetchOptimistic(e).catch(() => {
676
+ }, wt = (e, t) => e.isLoading && e.isFetching && !t, Tt = (e, t) => e?.suspense && t.isPending, Et = (e, t, n) => t.fetchOptimistic(e).catch(() => {
678
677
  n.clearReset();
679
678
  });
680
679
  //#endregion
681
680
  //#region node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
682
- function Et(e, n, r) {
683
- if (process.env.NODE_ENV !== "production" && (typeof e != "object" || Array.isArray(e))) throw Error("Bad argument type. Starting with v5, only the \"Object\" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object");
684
- let i = ht(), a = vt(), o = ft(r), s = o.defaultQueryOptions(e);
681
+ function Dt(t, n, r) {
682
+ if (process.env.NODE_ENV !== "production" && (typeof t != "object" || Array.isArray(t))) throw Error("Bad argument type. Starting with v5, only the \"Object\" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object");
683
+ let i = gt(), a = yt(), o = pt(r), s = o.defaultQueryOptions(t);
685
684
  o.getDefaultOptions().queries?._experimental_beforeQuery?.(s);
686
685
  let c = o.getQueryCache().get(s.queryHash);
687
686
  process.env.NODE_ENV !== "production" && (s.queryFn || console.error(`[${s.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`));
688
- let l = e.subscribed !== !1;
689
- s._optimisticResults = i ? "isRestoring" : l ? "optimistic" : void 0, St(s), yt(s, a, c), bt(a);
690
- let u = !o.getQueryCache().get(s.queryHash), [d] = t.useState(() => new n(o, s)), f = d.getOptimisticResult(s), p = !i && l;
691
- if (t.useSyncExternalStore(t.useCallback((e) => {
692
- let t = p ? d.subscribe(et.batchCalls(e)) : Re;
687
+ let l = t.subscribed !== !1;
688
+ s._optimisticResults = i ? "isRestoring" : l ? "optimistic" : void 0, Ct(s), bt(s, a, c), xt(a);
689
+ let u = !o.getQueryCache().get(s.queryHash), [d] = e.useState(() => new n(o, s)), f = d.getOptimisticResult(s), p = !i && l;
690
+ if (e.useSyncExternalStore(e.useCallback((e) => {
691
+ let t = p ? d.subscribe(tt.batchCalls(e)) : ze;
693
692
  return d.updateResult(), t;
694
- }, [d, p]), () => d.getCurrentResult(), () => d.getCurrentResult()), t.useEffect(() => {
693
+ }, [d, p]), () => d.getCurrentResult(), () => d.getCurrentResult()), e.useEffect(() => {
695
694
  d.setOptions(s);
696
- }, [s, d]), wt(s, f)) throw Tt(s, d, a);
697
- if (xt({
695
+ }, [s, d]), Tt(s, f)) throw Et(s, d, a);
696
+ if (St({
698
697
  result: f,
699
698
  errorResetBoundary: a,
700
699
  throwOnError: s.throwOnError,
701
700
  query: c,
702
701
  suspense: s.suspense
703
702
  })) throw f.error;
704
- return o.getDefaultOptions().queries?._experimental_afterQuery?.(s, f), s.experimental_prefetchInRender && !Xe.isServer() && Ct(f, i) && (u ? Tt(s, d, a) : c?.promise)?.catch(Re).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(ze).finally(() => {
705
704
  d.updateResult();
706
705
  }), s.notifyOnChangeProps ? f : d.trackResult(f);
707
706
  }
708
707
  //#endregion
709
708
  //#region node_modules/@tanstack/react-query/build/modern/useQuery.js
710
- function Dt(e, t) {
711
- return Et(e, it, t);
709
+ function Ot(e, t) {
710
+ return Dt(e, at, t);
712
711
  }
713
712
  //#endregion
714
713
  //#region node_modules/@tanstack/react-query/build/modern/useMutation.js
715
- function Ot(e, n) {
716
- let r = ft(n), [i] = t.useState(() => new Y(r, e));
717
- t.useEffect(() => {
718
- i.setOptions(e);
719
- }, [i, e]);
720
- let a = t.useSyncExternalStore(t.useCallback((e) => i.subscribe(et.batchCalls(e)), [i]), () => i.getCurrentResult(), () => i.getCurrentResult()), o = t.useCallback((e, t) => {
721
- i.mutate(e, t).catch(Re);
714
+ function kt(t, n) {
715
+ let r = pt(n), [i] = e.useState(() => new ft(r, t));
716
+ e.useEffect(() => {
717
+ i.setOptions(t);
718
+ }, [i, t]);
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(ze);
722
721
  }, [i]);
723
- if (a.error && Ye(i.options.throwOnError, [a.error])) throw a.error;
722
+ if (a.error && Xe(i.options.throwOnError, [a.error])) throw a.error;
724
723
  return {
725
724
  ...a,
726
725
  mutate: o,
@@ -729,15 +728,15 @@ function Ot(e, n) {
729
728
  }
730
729
  //#endregion
731
730
  //#region src/Context/DataTableContext.tsx
732
- var kt = i(void 0), At = async () => ({ "Content-Type": "application/json" });
733
- function jt({ children: e, baseUrl: t, queryClient: n, getHeaders: r = At }) {
734
- return /* @__PURE__ */ m(kt.Provider, {
731
+ var At = r(void 0), jt = async () => ({ "Content-Type": "application/json" });
732
+ function Mt({ children: e, baseUrl: t, queryClient: n, getHeaders: r = jt }) {
733
+ return /* @__PURE__ */ p(At.Provider, {
735
734
  value: {
736
735
  baseUrl: t,
737
736
  queryClient: n,
738
737
  getHeaders: r
739
738
  },
740
- children: /* @__PURE__ */ m(pt, {
739
+ children: /* @__PURE__ */ p(mt, {
741
740
  client: n,
742
741
  children: e
743
742
  })
@@ -745,8 +744,8 @@ function jt({ children: e, baseUrl: t, queryClient: n, getHeaders: r = At }) {
745
744
  }
746
745
  //#endregion
747
746
  //#region src/Hooks/useDataTable.ts
748
- function Mt() {
749
- let e = s(kt);
747
+ function J() {
748
+ let e = o(At);
750
749
  if (!e) throw Error("useDataTable must be used within a DataTableProvider");
751
750
  return e;
752
751
  }
@@ -762,7 +761,7 @@ var Nt = class extends Error {
762
761
  function Pt(e) {
763
762
  return e instanceof Nt ? e.violations : void 0;
764
763
  }
765
- async function Ft(e, t) {
764
+ async function Y(e, t) {
766
765
  let n = await fetch(e, t);
767
766
  if (n.status >= 400) {
768
767
  let e = await n.text();
@@ -781,342 +780,275 @@ async function Ft(e, t) {
781
780
  }
782
781
  return n;
783
782
  }
784
- var It = (e) => e.map((e) => e.toString());
785
- async function Lt(e, t) {
786
- return (await Ft(e, {
783
+ var Ft = (e) => e.map((e) => e.toString());
784
+ async function It(e, t) {
785
+ return (await Y(e, {
787
786
  method: "GET",
788
787
  headers: await t()
789
788
  })).json();
790
789
  }
791
- async function Rt(e, t, n) {
792
- return (await Ft(`${e}/${t}`, {
790
+ async function Lt(e, t, n) {
791
+ return (await Y(`${e}/${t}`, {
793
792
  method: "GET",
794
793
  headers: await n()
795
794
  })).json();
796
795
  }
797
- async function zt(e, t, n) {
798
- await Ft(`${e}/${t}`, {
796
+ async function Rt(e, t, n) {
797
+ await Y(`${e}/${t}`, {
799
798
  method: "DELETE",
800
799
  headers: await n()
801
800
  });
802
801
  }
803
- async function Bt(e, t, n) {
804
- let r = await Ft(e, {
802
+ async function zt(e, t, n) {
803
+ let r = await Y(e, {
805
804
  method: "POST",
806
805
  headers: await n(),
807
806
  body: JSON.stringify(t)
808
807
  });
809
808
  return r.status === 204 ? t : r.json();
810
809
  }
811
- async function Vt(e, t, n, r) {
812
- let i = await Ft(t, {
810
+ async function Bt(e, t, n, r) {
811
+ let i = await Y(t, {
813
812
  method: e,
814
813
  headers: await n(),
815
814
  body: r ? JSON.stringify(r) : void 0
816
815
  });
817
816
  if (i.status !== 204) return i.json();
818
817
  }
819
- async function Ht(e, t, n) {
820
- let r = await Ft(`${e}/${t.id}`, {
818
+ async function Vt(e, t, n) {
819
+ let r = await Y(`${e}/${t.id}`, {
821
820
  method: "PUT",
822
821
  headers: await n(),
823
822
  body: JSON.stringify(t)
824
823
  });
825
824
  return r.status === 204 ? t : r.json();
826
825
  }
827
- function Ut(t, n, r) {
828
- let i = e(14), { baseUrl: a, getHeaders: o } = Mt(), s;
829
- if (i[0] !== r || i[1] !== n) {
830
- let e;
831
- i[3] === r ? e = i[4] : (e = r?.toString(), i[3] = r, i[4] = e), s = [...It(n), String(e)], i[0] = r, i[1] = n, i[2] = s;
832
- } else s = i[2];
833
- let c;
834
- i[5] !== t || i[6] !== a || i[7] !== o || i[8] !== r ? (c = () => Rt(`${a}${t}`, r, o), i[5] = t, i[6] = a, i[7] = o, i[8] = r, i[9] = c) : c = i[9];
835
- let l = !!r, u;
836
- return i[10] !== s || i[11] !== c || i[12] !== l ? (u = {
837
- queryKey: s,
838
- queryFn: c,
839
- enabled: l
840
- }, i[10] = s, i[11] = c, i[12] = l, i[13] = u) : u = i[13], Dt(u);
841
- }
842
- function Wt(t, n, r) {
843
- let i = e(10), a = r === void 0 ? !0 : r, { baseUrl: o, getHeaders: s } = Mt(), c;
844
- i[0] === n ? c = i[1] : (c = It(n), i[0] = n, i[1] = c);
845
- let l;
846
- i[2] !== t || i[3] !== o || i[4] !== s ? (l = () => Lt(`${o}${t}`, s), i[2] = t, i[3] = o, i[4] = s, i[5] = l) : l = i[5];
847
- let u;
848
- return i[6] !== a || i[7] !== c || i[8] !== l ? (u = {
849
- queryKey: c,
850
- queryFn: l,
851
- enabled: a
852
- }, i[6] = a, i[7] = c, i[8] = l, i[9] = u) : u = i[9], Dt(u);
826
+ function Ht(e, t, n) {
827
+ let { baseUrl: r, getHeaders: i } = J();
828
+ return Ot({
829
+ queryKey: [...Ft(t), String(n?.toString())],
830
+ queryFn: () => Lt(`${r}${e}`, n, i),
831
+ enabled: !!n
832
+ });
833
+ }
834
+ function Ut(e, t, n = !0) {
835
+ let { baseUrl: r, getHeaders: i } = J();
836
+ return Ot({
837
+ queryKey: Ft(t),
838
+ queryFn: () => It(`${r}${e}`, i),
839
+ enabled: n
840
+ });
841
+ }
842
+ function Wt(e, t, n) {
843
+ return Promise.all([e.invalidateQueries({ queryKey: Ft(t) }), ...(n ?? []).map((t) => e.invalidateQueries({ queryKey: t }))]);
853
844
  }
854
845
  function Gt(e, t, n) {
855
- return Promise.all([e.invalidateQueries({ queryKey: It(t) }), ...(n ?? []).map((t) => e.invalidateQueries({ queryKey: t }))]);
856
- }
857
- function Kt(t, n, r) {
858
- let i = e(14), { baseUrl: a, queryClient: o, getHeaders: s } = Mt(), c;
859
- i[0] === n ? c = i[1] : (c = It(n), i[0] = n, i[1] = c);
860
- let l;
861
- i[2] !== t || i[3] !== a || i[4] !== s ? (l = (e) => Bt(`${a}${t}`, e, s), i[2] = t, i[3] = a, i[4] = s, i[5] = l) : l = i[5];
862
- let u;
863
- i[6] !== r || i[7] !== o || i[8] !== n ? (u = () => Gt(o, n, r), i[6] = r, i[7] = o, i[8] = n, i[9] = u) : u = i[9];
864
- let d;
865
- return i[10] !== c || i[11] !== l || i[12] !== u ? (d = {
866
- mutationKey: c,
867
- mutationFn: l,
868
- onSettled: u
869
- }, i[10] = c, i[11] = l, i[12] = u, i[13] = d) : d = i[13], Ot(d);
870
- }
871
- function qt(t, n, r) {
872
- let i = e(14), { baseUrl: a, queryClient: o, getHeaders: s } = Mt(), c;
873
- i[0] === n ? c = i[1] : (c = It(n), i[0] = n, i[1] = c);
874
- let l;
875
- i[2] !== t || i[3] !== a || i[4] !== s ? (l = (e) => Ht(`${a}${t}`, e, s), i[2] = t, i[3] = a, i[4] = s, i[5] = l) : l = i[5];
876
- let u;
877
- i[6] !== r || i[7] !== o || i[8] !== n ? (u = () => Gt(o, n, r), i[6] = r, i[7] = o, i[8] = n, i[9] = u) : u = i[9];
878
- let d;
879
- return i[10] !== c || i[11] !== l || i[12] !== u ? (d = {
880
- mutationKey: c,
881
- mutationFn: l,
882
- onSettled: u
883
- }, i[10] = c, i[11] = l, i[12] = u, i[13] = d) : d = i[13], Ot(d);
884
- }
885
- function Jt(t, n, r) {
886
- let i = e(14), { baseUrl: a, queryClient: o, getHeaders: s } = Mt(), c;
887
- i[0] === n ? c = i[1] : (c = It(n), i[0] = n, i[1] = c);
888
- let l;
889
- i[2] !== t || i[3] !== a || i[4] !== s ? (l = (e) => zt(`${a}${t}`, e, s), i[2] = t, i[3] = a, i[4] = s, i[5] = l) : l = i[5];
890
- let u;
891
- i[6] !== r || i[7] !== o || i[8] !== n ? (u = () => Gt(o, n, r), i[6] = r, i[7] = o, i[8] = n, i[9] = u) : u = i[9];
892
- let d;
893
- return i[10] !== c || i[11] !== l || i[12] !== u ? (d = {
894
- mutationKey: c,
895
- mutationFn: l,
896
- onSettled: u
897
- }, i[10] = c, i[11] = l, i[12] = u, i[13] = d) : d = i[13], Ot(d);
846
+ let { baseUrl: r, queryClient: i, getHeaders: a } = J();
847
+ return kt({
848
+ mutationKey: Ft(t),
849
+ mutationFn: (t) => zt(`${r}${e}`, t, a),
850
+ onSettled: () => Wt(i, t, n)
851
+ });
852
+ }
853
+ function Kt(e, t, n) {
854
+ let { baseUrl: r, queryClient: i, getHeaders: a } = J();
855
+ return kt({
856
+ mutationKey: Ft(t),
857
+ mutationFn: (t) => Vt(`${r}${e}`, t, a),
858
+ onSettled: () => Wt(i, t, n)
859
+ });
860
+ }
861
+ function qt(e, t, n) {
862
+ let { baseUrl: r, queryClient: i, getHeaders: a } = J();
863
+ return kt({
864
+ mutationKey: Ft(t),
865
+ mutationFn: (t) => Rt(`${r}${e}`, t, a),
866
+ onSettled: () => Wt(i, t, n)
867
+ });
898
868
  }
899
869
  //#endregion
900
870
  //#region src/DataTable/EntityForm.tsx
901
- function Yt(e, t) {
871
+ function Jt(e, t) {
902
872
  return typeof e.required == "function" ? e.required(t) : !!e.required;
903
873
  }
904
- function Xt(e) {
874
+ function Yt(e) {
905
875
  return e.reduce((e, t) => (e[t.id] = t.type === "boolean" ? t.defaultValue ?? !1 : t.defaultValue ?? "", e), {});
906
876
  }
907
- function Zt(e) {
908
- return e.filter((e) => e.required).reduce((e, t) => (e[t.id] = (e, n) => t.conditional && !t.conditional(n) || !Yt(t, n) || e ? null : "Pflichtfeld", e), {});
877
+ function Xt(e) {
878
+ return e.filter((e) => e.required).reduce((e, t) => (e[t.id] = (e, n) => t.conditional && !t.conditional(n) || !Jt(t, n) || e ? null : "Pflichtfeld", e), {});
909
879
  }
910
- function Qt(e) {
880
+ function Zt(e) {
911
881
  return Object.fromEntries(Object.entries(e).map(([e, t]) => [e, t === "" ? void 0 : t]));
912
882
  }
913
- function $t(e, t) {
883
+ function Qt(e, t) {
914
884
  let n = { ...e };
915
885
  return t.forEach((e) => {
916
886
  let t = e.id;
917
887
  e.type === "boolean" && n[t] === null ? n[t] = !1 : e.type === "date" && n[t] ? n[t] = new Date(n[t]) : n[t] === null && (n[t] = "");
918
888
  }), n;
919
889
  }
920
- var en = (e) => e.split(".").pop() ?? e;
921
- function tn(e, t) {
922
- return Object.fromEntries((Pt(e) ?? []).filter((e) => t.has(en(e.field))).map((e) => [en(e.field), e.message]));
890
+ var $t = (e) => e.split(".").pop() ?? e;
891
+ function en(e, t) {
892
+ return Object.fromEntries((Pt(e) ?? []).filter((e) => t.has($t(e.field))).map((e) => [$t(e.field), e.message]));
923
893
  }
924
- function nn(e, t) {
894
+ function tn(e, t) {
925
895
  let n = Pt(e);
926
896
  if (!n) return e?.message;
927
- let r = n.filter((e) => !t.has(en(e.field)));
897
+ let r = n.filter((e) => !t.has($t(e.field)));
928
898
  return r.length > 0 ? r.map((e) => e.message).join(", ") : void 0;
929
899
  }
930
- function rn(t) {
931
- let n = e(46), { fields: i, steps: a, record: o, recordId: s, submitting: l, error: u, onPersist: d, onClose: g } = t, [_, y] = f(0), [x, C] = f(!1), w;
932
- n[0] === i ? w = n[1] : (w = Xt(i), n[0] = i, n[1] = w);
933
- let T;
934
- n[2] === i ? T = n[3] : (T = Zt(i), n[2] = i, n[3] = T);
935
- let D;
936
- n[4] !== w || n[5] !== T ? (D = {
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 = _e({
937
902
  mode: "uncontrolled",
938
- initialValues: w,
939
- validate: T
940
- }, n[4] = w, n[5] = T, n[6] = D) : D = n[6];
941
- let O = ge(D), k;
942
- n[7] !== i || n[8] !== O || n[9] !== o ? (k = () => {
943
- if (o) {
944
- let e = $t(o, i);
945
- O.initialize(e), O.setValues(e);
903
+ initialValues: Yt(e),
904
+ validate: Xt(e)
905
+ });
906
+ s(() => {
907
+ if (r) {
908
+ let t = Qt(r, e);
909
+ b.initialize(t), b.setValues(t);
946
910
  }
947
- }, n[7] = i, n[8] = O, n[9] = o, n[10] = k) : k = n[10];
948
- let A;
949
- n[11] === o ? A = n[12] : (A = [o], n[11] = o, n[12] = A), c(k, A);
950
- let j, M, N, F, I;
951
- if (n[13] !== _ || n[14] !== u || n[15] !== i || n[16] !== O || n[17] !== g || n[18] !== d || n[19] !== s || n[20] !== a) {
952
- let e = new Set(i.map(ln)), t = nn(u, e), o = [...new Set(i.filter(cn).map(sn))];
953
- j = o.length > 0, M = _ === o.length - 1;
954
- let c;
955
- n[26] !== O || n[27] !== s ? (c = function(e) {
956
- let t = O.getValues();
957
- if (e.conditional && !e.conditional(t)) return null;
958
- let n = Yt(e, t), r = O.getInputProps(e.id);
959
- switch (e.type) {
960
- case "number": return /* @__PURE__ */ m(P, {
961
- decimalSeparator: ",",
962
- thousandSeparator: ".",
963
- label: e.column.title,
964
- placeholder: e.placeholder ?? "",
965
- required: n,
966
- ...r
967
- }, O.key(e.id));
968
- case "date": return /* @__PURE__ */ m(he, {
969
- valueFormat: "DD.MM.YYYY",
970
- clearable: !0,
971
- label: e.column.title,
972
- placeholder: e.placeholder ?? "",
973
- required: n,
974
- ...r
975
- }, O.key(e.id));
976
- case "boolean": return /* @__PURE__ */ m(S, {
977
- mt: "md",
978
- label: e.column.title,
979
- required: n,
980
- ...O.getInputProps(e.id, { type: "checkbox" })
981
- }, O.key(e.id));
982
- case "textarea": return /* @__PURE__ */ m(ce, {
983
- minRows: 3,
984
- autosize: !0,
985
- label: e.column.title,
986
- placeholder: e.placeholder ?? "",
987
- required: n,
988
- ...r
989
- }, O.key(e.id));
990
- case "custom": return e.render?.({
991
- ...t,
992
- ...s != null && { id: s }
993
- }, O.setValues, C, {
994
- error: r.error,
995
- required: n
996
- });
997
- default: return /* @__PURE__ */ m(se, {
998
- type: e.id.includes("email") ? "email" : void 0,
999
- label: e.column.title,
1000
- placeholder: e.placeholder ?? "",
1001
- required: n,
1002
- ...r
1003
- }, O.key(e.id));
1004
- }
1005
- }, n[26] = O, n[27] = s, n[28] = c) : c = n[28];
1006
- let l = c, f;
1007
- n[29] !== i || n[30] !== l ? (f = (e) => (e === void 0 ? i : i.filter((t) => t.step === e)).map((e) => /* @__PURE__ */ m(r, { children: l(e) }, e.id)), n[29] = i, n[30] = l, n[31] = f) : f = n[31];
1008
- let p = f;
1009
- I = t && /* @__PURE__ */ m(v, {
1010
- variant: "outline",
1011
- color: "red",
1012
- title: "Fehler aufgetreten",
1013
- mb: "lg",
1014
- children: t
1015
- }), N = O.onSubmit(async (t) => {
1016
- let n = Qt(t);
911
+ }, [r]);
912
+ let S = new Set(e.map((e) => String(e.id))), C = tn(o, S), w = [...new Set(e.filter((e) => typeof e.step == "number").map((e) => e.step))], E = w.length > 0, D = u === w.length - 1;
913
+ function O(e) {
914
+ let t = b.getValues();
915
+ if (e.conditional && !e.conditional(t)) return null;
916
+ let n = Jt(e, t), r = b.getInputProps(e.id);
917
+ switch (e.type) {
918
+ case "number": return /* @__PURE__ */ p(N, {
919
+ decimalSeparator: ",",
920
+ thousandSeparator: ".",
921
+ label: e.column.title,
922
+ placeholder: e.placeholder ?? "",
923
+ required: n,
924
+ ...r
925
+ }, b.key(e.id));
926
+ case "date": return /* @__PURE__ */ p(ge, {
927
+ valueFormat: "DD.MM.YYYY",
928
+ clearable: !0,
929
+ label: e.column.title,
930
+ placeholder: e.placeholder ?? "",
931
+ required: n,
932
+ ...r
933
+ }, b.key(e.id));
934
+ case "boolean": return /* @__PURE__ */ p(x, {
935
+ mt: "md",
936
+ label: e.column.title,
937
+ required: n,
938
+ ...b.getInputProps(e.id, { type: "checkbox" })
939
+ }, b.key(e.id));
940
+ case "textarea": return /* @__PURE__ */ p(ue, {
941
+ minRows: 3,
942
+ autosize: !0,
943
+ label: e.column.title,
944
+ placeholder: e.placeholder ?? "",
945
+ required: n,
946
+ ...r
947
+ }, b.key(e.id));
948
+ case "custom": return e.render?.({
949
+ ...t,
950
+ ...i != null && { id: i }
951
+ }, b.setValues, v, {
952
+ error: r.error,
953
+ required: n
954
+ });
955
+ default: return /* @__PURE__ */ p(le, {
956
+ type: e.id.includes("email") ? "email" : void 0,
957
+ label: e.column.title,
958
+ placeholder: e.placeholder ?? "",
959
+ required: n,
960
+ ...r
961
+ }, b.key(e.id));
962
+ }
963
+ }
964
+ let k = (t) => (t === void 0 ? e : e.filter((e) => e.step === t)).map((e) => /* @__PURE__ */ p(n, { children: O(e) }, e.id));
965
+ return /* @__PURE__ */ m(f, { children: [C && /* @__PURE__ */ p(_, {
966
+ variant: "outline",
967
+ color: "red",
968
+ title: "Fehler aufgetreten",
969
+ mb: "lg",
970
+ children: C
971
+ }), /* @__PURE__ */ m("form", {
972
+ onSubmit: b.onSubmit(async (e) => {
973
+ let t = Zt(e);
1017
974
  try {
1018
- await d(n);
1019
- } catch (t) {
1020
- let n = tn(t, e);
1021
- Object.keys(n).length > 0 && O.setErrors(n);
975
+ await c(t);
976
+ } catch (e) {
977
+ let t = en(e, S);
978
+ Object.keys(t).length > 0 && b.setErrors(t);
1022
979
  return;
1023
980
  }
1024
- j && !M ? y(on) : (O.setInitialValues(n), O.reset(), g());
1025
- }), F = j ? /* @__PURE__ */ m(ne, {
1026
- active: _,
981
+ E && !D ? h((e) => e + 1) : (b.setInitialValues(t), b.reset(), l());
982
+ }),
983
+ children: [E ? /* @__PURE__ */ p(re, {
984
+ active: u,
1027
985
  size: "sm",
1028
- children: o.map((e) => /* @__PURE__ */ m(ne.Step, {
1029
- ...a?.[e - 1] ? { label: a[e - 1].label } : {},
1030
- children: p(e)
986
+ children: w.map((e) => /* @__PURE__ */ p(re.Step, {
987
+ ...t?.[e - 1] ? { label: t[e - 1].label } : {},
988
+ children: k(e)
1031
989
  }, e))
1032
- }) : p(), n[13] = _, n[14] = u, n[15] = i, n[16] = O, n[17] = g, n[18] = d, n[19] = s, n[20] = a, n[21] = j, n[22] = M, n[23] = N, n[24] = F, n[25] = I;
1033
- } else j = n[21], M = n[22], N = n[23], F = n[24], I = n[25];
1034
- let L;
1035
- n[32] !== _ || n[33] !== j || n[34] !== x || n[35] !== M || n[36] !== g || n[37] !== l ? (L = !x && /* @__PURE__ */ h(E, {
1036
- mt: "md",
1037
- justify: "end",
1038
- children: [/* @__PURE__ */ m(b, {
1039
- variant: "outline",
1040
- onClick: () => j && _ > 0 ? y(an) : g(),
1041
- children: j && _ > 0 ? "Zurück" : "Abbrechen"
1042
- }), /* @__PURE__ */ m(b, {
1043
- type: "submit",
1044
- loading: l,
1045
- children: j && !M ? "Weiter" : "Speichern"
990
+ }) : k(), !g && /* @__PURE__ */ m(T, {
991
+ mt: "md",
992
+ justify: "end",
993
+ children: [/* @__PURE__ */ p(y, {
994
+ variant: "outline",
995
+ onClick: () => E && u > 0 ? h((e) => e - 1) : l(),
996
+ children: E && u > 0 ? "Zurück" : "Abbrechen"
997
+ }), /* @__PURE__ */ p(y, {
998
+ type: "submit",
999
+ loading: a,
1000
+ children: E && !D ? "Weiter" : "Speichern"
1001
+ })]
1046
1002
  })]
1047
- }), n[32] = _, n[33] = j, n[34] = x, n[35] = M, n[36] = g, n[37] = l, n[38] = L) : L = n[38];
1048
- let R;
1049
- n[39] !== N || n[40] !== F || n[41] !== L ? (R = /* @__PURE__ */ h("form", {
1050
- onSubmit: N,
1051
- children: [F, L]
1052
- }), n[39] = N, n[40] = F, n[41] = L, n[42] = R) : R = n[42];
1053
- let z;
1054
- return n[43] !== R || n[44] !== I ? (z = /* @__PURE__ */ h(p, { children: [I, R] }), n[43] = R, n[44] = I, n[45] = z) : z = n[45], z;
1055
- }
1056
- function an(e) {
1057
- return e - 1;
1058
- }
1059
- function on(e) {
1060
- return e + 1;
1061
- }
1062
- function sn(e) {
1063
- return e.step;
1064
- }
1065
- function cn(e) {
1066
- return typeof e.step == "number";
1067
- }
1068
- function ln(e) {
1069
- return String(e.id);
1003
+ })] });
1070
1004
  }
1071
1005
  //#endregion
1072
1006
  //#region src/DataTable/CreateModal.tsx
1073
- function un(t) {
1074
- let n = e(13), { fields: r, onClose: i, queryKey: a, connectedQueryKeys: o, apiPath: s, steps: c, onCreated: l } = t, [u, d] = f(), { mutateAsync: p, isPending: h, error: g } = Kt(s, a, o), { mutateAsync: _, isPending: v, error: y } = qt(s, a, o), b;
1075
- n[0] !== p || n[1] !== l || n[2] !== u || n[3] !== _ ? (b = async (e) => {
1076
- if (u != null) await _({
1077
- ...e,
1078
- id: u
1079
- });
1080
- else {
1081
- let t = await p(e);
1082
- d(t.id), l?.(t.id);
1083
- }
1084
- }, n[0] = p, n[1] = l, n[2] = u, n[3] = _, n[4] = b) : b = n[4];
1085
- let x = b, S = h || v, C = g ?? y, w;
1086
- return n[5] !== r || n[6] !== i || n[7] !== x || n[8] !== u || n[9] !== c || n[10] !== S || n[11] !== C ? (w = /* @__PURE__ */ m(rn, {
1087
- fields: r,
1088
- steps: c,
1089
- recordId: u,
1090
- submitting: S,
1091
- error: C,
1092
- onPersist: x,
1093
- onClose: i
1094
- }), n[5] = r, n[6] = i, n[7] = x, n[8] = u, n[9] = c, n[10] = S, n[11] = C, n[12] = w) : w = n[12], w;
1007
+ function rn({ fields: e, onClose: t, queryKey: n, connectedQueryKeys: r, apiPath: i, steps: a, onCreated: o }) {
1008
+ let [s, c] = d(), { mutateAsync: l, isPending: u, error: f } = Gt(i, n, r), { mutateAsync: m, isPending: h, error: g } = Kt(i, n, r);
1009
+ return /* @__PURE__ */ p(nn, {
1010
+ fields: e,
1011
+ steps: a,
1012
+ recordId: s,
1013
+ submitting: u || h,
1014
+ error: f ?? g,
1015
+ onPersist: async (e) => {
1016
+ if (s != null) await m({
1017
+ ...e,
1018
+ id: s
1019
+ });
1020
+ else {
1021
+ let t = await l(e);
1022
+ c(t.id), o?.(t.id);
1023
+ }
1024
+ },
1025
+ onClose: t
1026
+ });
1095
1027
  }
1096
1028
  //#endregion
1097
1029
  //#region node_modules/clsx/dist/clsx.mjs
1098
- function dn(e) {
1030
+ function an(e) {
1099
1031
  var t, n, r = "";
1100
1032
  if (typeof e == "string" || typeof e == "number") r += e;
1101
1033
  else if (typeof e == "object") if (Array.isArray(e)) {
1102
1034
  var i = e.length;
1103
- for (t = 0; t < i; t++) e[t] && (n = dn(e[t])) && (r && (r += " "), r += n);
1035
+ for (t = 0; t < i; t++) e[t] && (n = an(e[t])) && (r && (r += " "), r += n);
1104
1036
  } else for (n in e) e[n] && (r && (r += " "), r += n);
1105
1037
  return r;
1106
1038
  }
1107
1039
  function X() {
1108
- for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = dn(e)) && (r && (r += " "), r += t);
1040
+ for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = an(e)) && (r && (r += " "), r += t);
1109
1041
  return r;
1110
1042
  }
1111
1043
  //#endregion
1112
1044
  //#region node_modules/mantine-datatable/dist/index.mjs
1113
1045
  function Z(e, t, n) {
1114
- return e ? de({
1046
+ return e ? pe({
1115
1047
  color: typeof e == "object" ? e[n] : e,
1116
1048
  theme: t
1117
1049
  }).value : void 0;
1118
1050
  }
1119
- function fn({ theme: e, c: t, backgroundColor: n, borderColor: r, rowBorderColor: i, stripedColor: a, highlightOnHoverColor: o }) {
1051
+ function on({ theme: e, c: t, backgroundColor: n, borderColor: r, rowBorderColor: i, stripedColor: a, highlightOnHoverColor: o }) {
1120
1052
  return {
1121
1053
  "--mantine-datatable-color-light": Z(t, e, "light"),
1122
1054
  "--mantine-datatable-color-dark": Z(t, e, "dark"),
@@ -1132,7 +1064,7 @@ function fn({ theme: e, c: t, backgroundColor: n, borderColor: r, rowBorderColor
1132
1064
  "--mantine-datatable-highlight-on-hover-color-dark": Z(o, e, "dark")
1133
1065
  };
1134
1066
  }
1135
- function pn({ theme: e, paginationActiveTextColor: t, paginationActiveBackgroundColor: n }) {
1067
+ function sn({ theme: e, paginationActiveTextColor: t, paginationActiveBackgroundColor: n }) {
1136
1068
  return {
1137
1069
  "--mantine-datatable-pagination-active-text-color-light": Z(t, e, "light"),
1138
1070
  "--mantine-datatable-pagination-active-text-color-dark": Z(t, e, "dark"),
@@ -1140,7 +1072,7 @@ function pn({ theme: e, paginationActiveTextColor: t, paginationActiveBackground
1140
1072
  "--mantine-datatable-pagination-active-background-color-dark": Z(n, e, "dark")
1141
1073
  };
1142
1074
  }
1143
- function mn({ theme: e, color: t, backgroundColor: n }) {
1075
+ function cn({ theme: e, color: t, backgroundColor: n }) {
1144
1076
  return {
1145
1077
  "--mantine-datatable-row-color-light": Z(t, e, "light"),
1146
1078
  "--mantine-datatable-row-color-dark": Z(t, e, "dark"),
@@ -1148,9 +1080,9 @@ function mn({ theme: e, color: t, backgroundColor: n }) {
1148
1080
  "--mantine-datatable-row-background-color-dark": Z(n, e, "dark")
1149
1081
  };
1150
1082
  }
1151
- var [hn, gn] = ue("useDataTableColumnsContext must be used within DataTableColumnProvider"), _n = (e) => {
1152
- let { children: t, columnsOrder: n, setColumnsOrder: r, columnsToggle: i, setColumnsToggle: a, columnsPinning: o, setColumnsPinning: s, resetColumnsOrder: c, resetColumnsToggle: l, resetColumnsPinning: u, setColumnWidth: d, setMultipleColumnWidths: p, resetColumnsWidth: h, beginResize: g, endResize: _, pinnedMap: v } = e, [y, b] = f(""), [x, S] = f("");
1153
- return m(hn, {
1083
+ var [ln, un] = fe("useDataTableColumnsContext must be used within DataTableColumnProvider"), dn = (e) => {
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
+ return p(ln, {
1154
1086
  value: {
1155
1087
  sourceColumn: y,
1156
1088
  setSourceColumn: b,
@@ -1173,8 +1105,8 @@ var [hn, gn] = ue("useDataTableColumnsContext must be used within DataTableColum
1173
1105
  resetColumnsOrder: c,
1174
1106
  resetColumnsToggle: l,
1175
1107
  resetColumnsPinning: u,
1176
- setColumnWidth: d,
1177
- setMultipleColumnWidths: p,
1108
+ setColumnWidth: f,
1109
+ setMultipleColumnWidths: m,
1178
1110
  resetColumnsWidth: h,
1179
1111
  beginResize: g,
1180
1112
  endResize: _
@@ -1182,14 +1114,14 @@ var [hn, gn] = ue("useDataTableColumnsContext must be used within DataTableColum
1182
1114
  children: t
1183
1115
  });
1184
1116
  };
1185
- function vn() {
1186
- return m("tr", {
1117
+ function fn() {
1118
+ return p("tr", {
1187
1119
  className: "mantine-datatable-empty-row",
1188
- children: m("td", {})
1120
+ children: p("td", {})
1189
1121
  });
1190
1122
  }
1191
- function yn() {
1192
- return h("svg", {
1123
+ function pn() {
1124
+ return m("svg", {
1193
1125
  width: "24",
1194
1126
  height: "24",
1195
1127
  viewBox: "0 0 24 24",
@@ -1199,26 +1131,26 @@ function yn() {
1199
1131
  strokeLinecap: "round",
1200
1132
  strokeLinejoin: "round",
1201
1133
  children: [
1202
- m("path", {
1134
+ p("path", {
1203
1135
  stroke: "none",
1204
1136
  d: "M0 0h24v24H0z",
1205
1137
  fill: "none"
1206
1138
  }),
1207
- m("path", { d: "M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74" }),
1208
- m("path", { d: "M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6" }),
1209
- m("path", { d: "M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4" }),
1210
- m("path", { d: "M3 3l18 18" })
1139
+ p("path", { d: "M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74" }),
1140
+ p("path", { d: "M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6" }),
1141
+ p("path", { d: "M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4" }),
1142
+ p("path", { d: "M3 3l18 18" })
1211
1143
  ]
1212
1144
  });
1213
1145
  }
1214
- function bn({ icon: e, text: t, active: n, children: r }) {
1215
- return m(x, {
1146
+ function mn({ icon: e, text: t, active: n, children: r }) {
1147
+ return p(b, {
1216
1148
  className: "mantine-datatable-empty-state",
1217
1149
  "data-active": n || void 0,
1218
- children: r || h(p, { children: [e || m("div", {
1150
+ children: r || m(f, { children: [e || p("div", {
1219
1151
  className: "mantine-datatable-empty-state-icon",
1220
- children: m(yn, {})
1221
- }), m(W, {
1152
+ children: p(pn, {})
1153
+ }), p(V, {
1222
1154
  component: "div",
1223
1155
  size: "sm",
1224
1156
  c: "dimmed",
@@ -1226,63 +1158,63 @@ function bn({ icon: e, text: t, active: n, children: r }) {
1226
1158
  })] })
1227
1159
  });
1228
1160
  }
1229
- function xn(e) {
1161
+ function hn(e) {
1230
1162
  let t = e.replace(/([a-z\d])([A-Z]+)/g, "$1 $2").replace(/\W|_/g, " ").trim().toLowerCase();
1231
1163
  return `${t.charAt(0).toUpperCase()}${t.slice(1)}`;
1232
1164
  }
1233
- function Sn(e, t, n) {
1165
+ function gn(e, t, n) {
1234
1166
  return !Array.isArray(e) || n && !e.every(n) ? t : e;
1235
1167
  }
1236
- function Cn(e) {
1168
+ function _n(e) {
1237
1169
  return typeof e == "object" && !!e && typeof e.accessor == "string";
1238
1170
  }
1239
- function wn(e, t, n) {
1171
+ function vn(e, t, n) {
1240
1172
  return e.filter((e) => !t.map(n).includes(n(e)));
1241
1173
  }
1242
- function Tn(e, t) {
1174
+ function yn(e, t) {
1243
1175
  return e.filter((e, n, r) => n === r.findIndex((n) => t(e) === t(n)));
1244
1176
  }
1245
- function En(e, t) {
1177
+ function bn(e, t) {
1246
1178
  return t ? t.match(/([^[.\]])+/g).reduce((e, t) => e && e[t], e) : void 0;
1247
1179
  }
1248
1180
  function Q(e, t) {
1249
- return typeof t == "string" ? En(e, t) : t(e);
1181
+ return typeof t == "string" ? bn(e, t) : t(e);
1250
1182
  }
1251
- function Dn(e) {
1252
- return !e || e.length === 0 ? 0 : Math.max(...e.map((e) => e.groups && e.groups.length > 0 ? 1 + Dn(e.groups) : 1));
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));
1253
1185
  }
1254
- function On(e) {
1186
+ function Sn(e) {
1255
1187
  let t = [];
1256
- 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(...On(n.groups));
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));
1257
1189
  return t.filter((e) => e != null);
1258
1190
  }
1259
- function kn(e, t) {
1260
- 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 + kn(n, t), 0) : 0;
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;
1261
1193
  }
1262
- function An(e, t, n = 0) {
1194
+ function wn(e, t, n = 0) {
1263
1195
  if (n === t) return [...e];
1264
1196
  let r = [];
1265
- for (let i of e) i.groups && i.groups.length > 0 && r.push(...An(i.groups, t, n + 1));
1197
+ for (let i of e) i.groups && i.groups.length > 0 && r.push(...wn(i.groups, t, n + 1));
1266
1198
  return r;
1267
1199
  }
1268
- function jn(e, t, n) {
1200
+ function Tn(e, t, n) {
1269
1201
  return n ? !e || t : !1;
1270
1202
  }
1271
- function Mn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1272
- let r = u(() => t.map((e) => ({
1203
+ function En({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1204
+ let r = l(() => t.map((e) => ({
1273
1205
  accessor: e.accessor,
1274
1206
  defaultPinned: e.pinned,
1275
1207
  pinnable: !!e.pinnable,
1276
1208
  pinned: e.pinned
1277
- })), [t]), [i, a] = G({
1209
+ })), [t]), [i, a] = Ae({
1278
1210
  key: e ? `${e}-columns-pinning` : "",
1279
1211
  defaultValue: e ? r : void 0,
1280
1212
  getInitialValueInEffect: n
1281
- }), o = Sn(i, r, Cn);
1282
- function s(t) {
1213
+ }), o = gn(i, r, _n);
1214
+ function c(t) {
1283
1215
  e && a(typeof t == "function" ? (e) => t(e ?? r) : t);
1284
1216
  }
1285
- let l = u(() => {
1217
+ let u = l(() => {
1286
1218
  if (!o) return r;
1287
1219
  let e = [];
1288
1220
  return o.forEach((n) => {
@@ -1300,37 +1232,37 @@ function Mn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1300
1232
  t,
1301
1233
  r
1302
1234
  ]);
1303
- c(() => {
1304
- e && o && JSON.stringify(l) !== JSON.stringify(o) && a(l);
1235
+ s(() => {
1236
+ e && o && JSON.stringify(u) !== JSON.stringify(o) && a(u);
1305
1237
  }, [
1306
1238
  e,
1307
- l,
1239
+ u,
1308
1240
  o,
1309
1241
  a
1310
1242
  ]);
1311
1243
  let d = () => {
1312
- s(r);
1244
+ c(r);
1313
1245
  };
1314
1246
  return e ? {
1315
- columnsPinning: l,
1316
- setColumnsPinning: s,
1247
+ columnsPinning: u,
1248
+ setColumnsPinning: c,
1317
1249
  resetColumnsPinning: d
1318
1250
  } : {
1319
1251
  columnsPinning: r,
1320
- setColumnsPinning: s,
1252
+ setColumnsPinning: c,
1321
1253
  resetColumnsPinning: d
1322
1254
  };
1323
1255
  }
1324
- function Nn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1325
- let r = u(() => t ? t.map((e) => e.accessor) : [], [t]), [i, a] = G({
1256
+ function Dn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1257
+ let r = l(() => t ? t.map((e) => e.accessor) : [], [t]), [i, a] = Ae({
1326
1258
  key: e ? `${e}-columns-order` : "",
1327
1259
  defaultValue: e ? r : void 0,
1328
1260
  getInitialValueInEffect: n
1329
- }), o = Sn(i, r, (e) => typeof e == "string");
1330
- function s(t) {
1261
+ }), o = gn(i, r, (e) => typeof e == "string");
1262
+ function c(t) {
1331
1263
  e && a(t);
1332
1264
  }
1333
- let l = u(() => {
1265
+ let u = l(() => {
1334
1266
  if (!o) return r;
1335
1267
  let e = [];
1336
1268
  return o.forEach((n) => {
@@ -1343,36 +1275,36 @@ function Nn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1343
1275
  t,
1344
1276
  r
1345
1277
  ]);
1346
- c(() => {
1347
- e && o && JSON.stringify(l) !== JSON.stringify(o) && a(l);
1278
+ s(() => {
1279
+ e && o && JSON.stringify(u) !== JSON.stringify(o) && a(u);
1348
1280
  }, [
1349
1281
  e,
1350
- l,
1282
+ u,
1351
1283
  o,
1352
1284
  a
1353
1285
  ]);
1354
1286
  let d = () => {
1355
- s(r);
1287
+ c(r);
1356
1288
  };
1357
1289
  return e ? {
1358
- columnsOrder: l,
1359
- setColumnsOrder: s,
1290
+ columnsOrder: u,
1291
+ setColumnsOrder: c,
1360
1292
  resetColumnsOrder: d
1361
1293
  } : {
1362
1294
  columnsOrder: o,
1363
- setColumnsOrder: s,
1295
+ setColumnsOrder: c,
1364
1296
  resetColumnsOrder: d
1365
1297
  };
1366
1298
  }
1367
- function Pn({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef: r }) {
1368
- let i = u(() => t.some((e) => e.resizable && !e.hidden && e.accessor !== "__selection__"), [t]), a = o(() => t.filter((e) => e.accessor !== "__selection__").map((e) => ({ [e.accessor]: e.width ?? "auto" })), [t]), [s, l] = G({
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] = Ae({
1369
1301
  key: e ? `${e}-columns-width` : "",
1370
- defaultValue: e ? a() : void 0,
1302
+ defaultValue: e ? o() : void 0,
1371
1303
  getInitialValueInEffect: n
1372
- }), p = Sn(s, [], (e) => typeof e == "object" && !!e), [m, h] = f(() => e && p.length > 0 ? p : a()), [g, _] = f(!1), v = d(!1);
1373
- c(() => {
1304
+ }), p = gn(c, [], (e) => typeof e == "object" && !!e), [m, h] = d(() => e && p.length > 0 ? p : o()), [g, _] = d(!1), v = u(!1);
1305
+ s(() => {
1374
1306
  e && (!p || p.length === 0 || h(p));
1375
- }, [e, p]), c(() => {
1307
+ }, [e, p]), s(() => {
1376
1308
  h((e) => {
1377
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;
1378
1310
  for (let e of t) {
@@ -1383,29 +1315,29 @@ function Pn({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRe
1383
1315
  return r.length !== e.length || a ? r : e;
1384
1316
  });
1385
1317
  }, [t]);
1386
- let y = o((e) => {
1318
+ let y = a((e) => {
1387
1319
  let t = e.filter((e) => e.accessor !== "__selection__");
1388
1320
  t.length !== 0 && (v.current = !0, h((e) => e.map((e) => {
1389
1321
  let n = Object.keys(e)[0], r = t.find((e) => e.accessor === n);
1390
1322
  return r ? { [n]: r.width } : e;
1391
1323
  })));
1392
1324
  }, []);
1393
- c(() => {
1394
- !e || !v.current || g || (v.current = !1, l(m));
1325
+ s(() => {
1326
+ !e || !v.current || g || (v.current = !1, f(m));
1395
1327
  }, [
1396
1328
  e,
1397
1329
  m,
1398
1330
  g,
1399
- l
1331
+ f
1400
1332
  ]);
1401
- let b = o((e, t) => {
1333
+ let b = a((e, t) => {
1402
1334
  y([{
1403
1335
  accessor: e,
1404
1336
  width: t
1405
1337
  }]);
1406
- }, [y]), x = o((e) => {
1338
+ }, [y]), x = a((e) => {
1407
1339
  y(e);
1408
- }, [y]), S = o(() => {
1340
+ }, [y]), S = a(() => {
1409
1341
  _(!0);
1410
1342
  let e = r?.current;
1411
1343
  if (!e) return;
@@ -1419,7 +1351,7 @@ function Pn({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRe
1419
1351
  n.push({ [t]: `${r}px` });
1420
1352
  }
1421
1353
  v.current = !0, h(n);
1422
- }, [r]), C = o(() => {
1354
+ }, [r]), C = a(() => {
1423
1355
  _(!1);
1424
1356
  }, []);
1425
1357
  return {
@@ -1427,12 +1359,12 @@ function Pn({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRe
1427
1359
  setColumnsWidth: y,
1428
1360
  setColumnWidth: b,
1429
1361
  setMultipleColumnWidths: x,
1430
- resetColumnsWidth: o(() => {
1431
- let e = a();
1362
+ resetColumnsWidth: a(() => {
1363
+ let e = o();
1432
1364
  v.current = !0, h(e), _(!1);
1433
- }, [a]),
1365
+ }, [o]),
1434
1366
  hasResizableColumns: i,
1435
- allResizableWidthsInitial: u(() => {
1367
+ allResizableWidthsInitial: l(() => {
1436
1368
  if (!i) return !1;
1437
1369
  let e = t.filter((e) => e.resizable && !e.hidden && e.accessor !== "__selection__");
1438
1370
  return m.filter((t) => {
@@ -1447,27 +1379,27 @@ function Pn({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRe
1447
1379
  t,
1448
1380
  m
1449
1381
  ]),
1450
- measureAndSetColumnWidths: o(() => {}, []),
1382
+ measureAndSetColumnWidths: a(() => {}, []),
1451
1383
  isResizing: g,
1452
1384
  beginResize: S,
1453
1385
  endResize: C
1454
1386
  };
1455
1387
  }
1456
- function Fn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1457
- let r = u(() => t?.map((e) => ({
1388
+ function kn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1389
+ let r = l(() => t?.map((e) => ({
1458
1390
  accessor: e.accessor,
1459
1391
  defaultToggle: e.defaultToggle || !0,
1460
1392
  toggleable: e.toggleable,
1461
1393
  toggled: e.defaultToggle === void 0 ? !0 : e.defaultToggle
1462
- })), [t]), [i, a] = G({
1394
+ })), [t]), [i, a] = Ae({
1463
1395
  key: e ? `${e}-columns-toggle` : "",
1464
1396
  defaultValue: e ? r : void 0,
1465
1397
  getInitialValueInEffect: n
1466
- }), o = Sn(i, r, Cn);
1467
- function s(t) {
1398
+ }), o = gn(i, r, _n);
1399
+ function c(t) {
1468
1400
  e && a(t);
1469
1401
  }
1470
- let l = u(() => {
1402
+ let u = l(() => {
1471
1403
  if (!o) return r;
1472
1404
  let e = [];
1473
1405
  return o.forEach((n) => {
@@ -1485,47 +1417,47 @@ function Fn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1485
1417
  t,
1486
1418
  r
1487
1419
  ]);
1488
- c(() => {
1489
- e && o && JSON.stringify(l) !== JSON.stringify(o) && a(l);
1420
+ s(() => {
1421
+ e && o && JSON.stringify(u) !== JSON.stringify(o) && a(u);
1490
1422
  }, [
1491
1423
  e,
1492
- l,
1424
+ u,
1493
1425
  o,
1494
1426
  a
1495
1427
  ]);
1496
1428
  let d = () => {
1497
- s(r);
1429
+ c(r);
1498
1430
  };
1499
1431
  return e ? {
1500
- columnsToggle: l,
1501
- setColumnsToggle: s,
1432
+ columnsToggle: u,
1433
+ setColumnsToggle: c,
1502
1434
  resetColumnsToggle: d
1503
1435
  } : {
1504
1436
  columnsToggle: o,
1505
- setColumnsToggle: s,
1437
+ setColumnsToggle: c,
1506
1438
  resetColumnsToggle: d
1507
1439
  };
1508
1440
  }
1509
- var In = ({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef: r, scrollViewportRef: i }) => {
1510
- let { columnsOrder: a, setColumnsOrder: o, resetColumnsOrder: s } = Nn({
1441
+ var An = ({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef: r, scrollViewportRef: i }) => {
1442
+ let { columnsOrder: a, setColumnsOrder: o, resetColumnsOrder: s } = Dn({
1511
1443
  key: e,
1512
1444
  columns: t,
1513
1445
  getInitialValueInEffect: n
1514
- }), { columnsToggle: c, setColumnsToggle: l, resetColumnsToggle: d } = Fn({
1446
+ }), { columnsToggle: c, setColumnsToggle: u, resetColumnsToggle: d } = kn({
1515
1447
  key: e,
1516
1448
  columns: t,
1517
1449
  getInitialValueInEffect: n
1518
- }), { columnsPinning: f, setColumnsPinning: p, resetColumnsPinning: m } = Mn({
1450
+ }), { columnsPinning: f, setColumnsPinning: p, resetColumnsPinning: m } = En({
1519
1451
  key: e,
1520
1452
  columns: t,
1521
1453
  getInitialValueInEffect: n
1522
- }), { columnsWidth: h, setColumnsWidth: g, setColumnWidth: _, setMultipleColumnWidths: v, resetColumnsWidth: y, hasResizableColumns: b, allResizableWidthsInitial: x, measureAndSetColumnWidths: S, isResizing: C, beginResize: w, endResize: T } = Pn({
1454
+ }), { columnsWidth: h, setColumnsWidth: g, setColumnWidth: _, setMultipleColumnWidths: v, resetColumnsWidth: y, hasResizableColumns: b, allResizableWidthsInitial: x, measureAndSetColumnWidths: S, isResizing: C, beginResize: w, endResize: T } = On({
1523
1455
  key: e,
1524
1456
  columns: t,
1525
1457
  getInitialValueInEffect: n,
1526
1458
  headerRef: r,
1527
1459
  scrollViewportRef: i
1528
- }), E = u(() => {
1460
+ }), E = l(() => {
1529
1461
  let e;
1530
1462
  e = a ? a.map((e) => t.find((t) => t.accessor === e)).map((e) => {
1531
1463
  let t = f.find((t) => t.accessor === e?.accessor), n = e?.pinnable ? t?.pinned : e?.pinned;
@@ -1556,7 +1488,7 @@ var In = ({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef:
1556
1488
  c,
1557
1489
  f,
1558
1490
  h
1559
- ]), D = u(() => {
1491
+ ]), D = l(() => {
1560
1492
  let e = E.filter((e) => !e.hidden && e.accessor !== "__selection__");
1561
1493
  return e.length === 0 ? !1 : e.every((e) => typeof e.width == "string" && /px$/.test(e.width));
1562
1494
  }, [E]);
@@ -1566,7 +1498,7 @@ var In = ({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef:
1566
1498
  columnsOrder: a,
1567
1499
  resetColumnsOrder: s,
1568
1500
  columnsToggle: c,
1569
- setColumnsToggle: l,
1501
+ setColumnsToggle: u,
1570
1502
  resetColumnsToggle: d,
1571
1503
  columnsPinning: f,
1572
1504
  setColumnsPinning: p,
@@ -1581,7 +1513,7 @@ var In = ({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef:
1581
1513
  measureAndSetColumnWidths: S,
1582
1514
  isResizing: C,
1583
1515
  isLocked: D,
1584
- tableWidth: u(() => {
1516
+ tableWidth: l(() => {
1585
1517
  if (!D) return null;
1586
1518
  let e = 0;
1587
1519
  for (let t of E) {
@@ -1596,16 +1528,16 @@ var In = ({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef:
1596
1528
  beginResize: w,
1597
1529
  endResize: T
1598
1530
  };
1599
- }, Ln = typeof window < "u" ? l : c;
1600
- function Rn(e) {
1601
- let t = d(e);
1531
+ }, jn = typeof window < "u" ? c : s;
1532
+ function Mn(e) {
1533
+ let t = u(e);
1602
1534
  return t.current = e, t;
1603
1535
  }
1604
- var zn = "--mantine-datatable-header-height", Bn = "--mantine-datatable-footer-height", Vn = "--mantine-datatable-selection-column-width", Hn = "--mantine-datatable-last-row-border-bottom";
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";
1605
1537
  function $(e, t, n) {
1606
1538
  e?.style.setProperty(t, n);
1607
1539
  }
1608
- function Un(e) {
1540
+ function Ln(e) {
1609
1541
  let t = e.borderBoxSize?.[0] || e.contentBoxSize?.[0];
1610
1542
  return t ? {
1611
1543
  width: t.inlineSize,
@@ -1615,35 +1547,35 @@ function Un(e) {
1615
1547
  height: e.contentRect.height
1616
1548
  };
1617
1549
  }
1618
- function Wn(e, t, n) {
1550
+ function Rn(e, t, n) {
1619
1551
  if (e) {
1620
1552
  let r = new ResizeObserver((e) => {
1621
1553
  let n = e[0];
1622
- n && t(Un(n));
1554
+ n && t(Ln(n));
1623
1555
  });
1624
1556
  return r.observe(e), () => {
1625
1557
  r.disconnect(), n();
1626
1558
  };
1627
1559
  }
1628
1560
  }
1629
- function Gn({ scrollCallbacks: e, withRowBorders: t }) {
1561
+ function zn({ scrollCallbacks: e, withRowBorders: t }) {
1630
1562
  let n = {
1631
- root: d(null),
1632
- table: d(null),
1633
- scrollViewport: d(null),
1634
- header: d(null),
1635
- footer: d(null),
1636
- selectionColumnHeader: d(null)
1637
- }, { root: r, table: i, scrollViewport: a, header: s, footer: l, selectionColumnHeader: u } = n, f = Rn({ withRowBorders: t }), p = Rn(e), m = d(() => {}), h = d(() => {}), g = o((e) => {
1563
+ root: u(null),
1564
+ table: u(null),
1565
+ scrollViewport: u(null),
1566
+ header: u(null),
1567
+ footer: u(null),
1568
+ selectionColumnHeader: u(null)
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) => {
1638
1570
  p.current.onScroll?.(e), m.current();
1639
1571
  }, []);
1640
- return c(() => Wn(s.current, (e) => {
1641
- $(r.current, zn, `${e.height}px`);
1642
- }, () => $(r.current, zn, "0")), [s.current]), c(() => Wn(l.current, (e) => {
1643
- $(r.current, Bn, `${e.height}px`);
1644
- }, () => $(r.current, Bn, "0")), [l.current]), c(() => Wn(u.current, (e) => {
1645
- $(r.current, Vn, `${e.width}px`);
1646
- }, () => $(r.current, Vn, "0")), [u.current]), Ln(() => {
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(() => {
1647
1579
  if (typeof window > "u") return;
1648
1580
  let e = {
1649
1581
  top: !0,
@@ -1657,7 +1589,7 @@ function Gn({ scrollCallbacks: e, withRowBorders: t }) {
1657
1589
  width: 0,
1658
1590
  height: 0
1659
1591
  };
1660
- function o(t, n) {
1592
+ function a(t, n) {
1661
1593
  let i = e[t];
1662
1594
  return e[t] = n, $(r.current, `--mantine-datatable-${t}-shadow-opacity`, n ? "0" : "1"), i;
1663
1595
  }
@@ -1666,51 +1598,51 @@ function Gn({ scrollCallbacks: e, withRowBorders: t }) {
1666
1598
  $(r.current, "--mantine-datatable-footer-position", i ? "relative" : "sticky"), $(r.current, "--mantine-datatable-footer-bottom", i ? `${e}px` : "0");
1667
1599
  }
1668
1600
  function c() {
1669
- f.current.withRowBorders && t.height < n.height ? $(r.current, Hn, `${fe("1px")} solid var(--mantine-datatable-border-color)`) : $(r.current, Hn, "unset");
1601
+ f.current.withRowBorders && t.height < n.height ? $(r.current, In, `${H("1px")} solid var(--mantine-datatable-border-color)`) : $(r.current, In, "unset");
1670
1602
  }
1671
1603
  h.current = c;
1672
1604
  function l() {
1673
- let e = p.current, r = a.current, i = r?.scrollTop ?? 0, s = r?.scrollLeft ?? 0, c = i === 0, l = t.height - i - n.height < 1, u = o("top", c), d = o("bottom", l);
1605
+ let e = p.current, r = o.current, i = r?.scrollTop ?? 0, s = r?.scrollLeft ?? 0, c = i === 0, l = t.height - i - n.height < 1, u = a("top", c), d = a("bottom", l);
1674
1606
  c && c !== u && e.onScrollToTop?.(), l && l !== d && e.onScrollToBottom?.();
1675
1607
  let f = r ? getComputedStyle(r).direction === "rtl" : !1, m = (r?.scrollWidth ?? 0) - n.width, h, g;
1676
1608
  if (f) {
1677
1609
  let e = Math.abs(s);
1678
1610
  g = e < 1, h = m - e < 1;
1679
1611
  } else h = s < 1, g = t.width - s - n.width < 1;
1680
- let _ = o("left", h), v = o("right", g);
1612
+ let _ = a("left", h), v = a("right", g);
1681
1613
  h && h !== _ && e.onScrollToLeft?.(), g && g !== v && e.onScrollToRight?.();
1682
1614
  }
1683
1615
  m.current = l;
1684
1616
  let u = new ResizeObserver((e) => {
1685
1617
  for (let r of e) switch (r.target.tagName) {
1686
1618
  case "TABLE":
1687
- t = Un(r);
1619
+ t = Ln(r);
1688
1620
  break;
1689
1621
  case "DIV":
1690
- n = Un(r);
1622
+ n = Ln(r);
1691
1623
  break;
1692
1624
  }
1693
1625
  l(), s(), c();
1694
1626
  });
1695
- return u.observe(i.current), u.observe(a.current), () => {
1627
+ return u.observe(i.current), u.observe(o.current), () => {
1696
1628
  u.disconnect();
1697
1629
  };
1698
- }, []), Ln(() => {
1630
+ }, []), jn(() => {
1699
1631
  h.current();
1700
1632
  }, [t]), {
1701
1633
  refs: n,
1702
1634
  onScroll: g
1703
1635
  };
1704
1636
  }
1705
- function Kn({ columns: e, theadRef: t, tbodyRef: n, selectionColumnHeaderRef: r, selectionVisible: i, pinFirstColumn: a, pinLastColumn: s }) {
1706
- let [l, u] = f(/* @__PURE__ */ new Map()), d = o(() => {
1707
- if (!a && !s && !e.some((e) => e.pinned)) return;
1708
- let o = t.current ?? n.current;
1709
- if (!o) return;
1710
- let c = !!t.current, l = c ? o.querySelector("tr:last-of-type") : o.querySelector("tr:first-of-type");
1637
+ function Bn({ columns: e, theadRef: t, tbodyRef: n, selectionColumnHeaderRef: r, selectionVisible: i, pinFirstColumn: o, pinLastColumn: c }) {
1638
+ let [l, u] = d(/* @__PURE__ */ new Map()), f = a(() => {
1639
+ if (!o && !c && !e.some((e) => e.pinned)) return;
1640
+ let a = t.current ?? n.current;
1641
+ if (!a) return;
1642
+ let s = !!t.current, l = s ? a.querySelector("tr:last-of-type") : a.querySelector("tr:first-of-type");
1711
1643
  if (!l) return;
1712
- let d = getComputedStyle(o).direction === "rtl", f = /* @__PURE__ */ new Map();
1713
- if (c) l.querySelectorAll("th[data-accessor]").forEach((e) => {
1644
+ let d = getComputedStyle(a).direction === "rtl", f = /* @__PURE__ */ new Map();
1645
+ if (s) l.querySelectorAll("th[data-accessor]").forEach((e) => {
1714
1646
  let t = e.dataset.accessor;
1715
1647
  if (t) {
1716
1648
  let n = e.getBoundingClientRect().width;
@@ -1728,13 +1660,13 @@ function Kn({ columns: e, theadRef: t, tbodyRef: n, selectionColumnHeaderRef: r,
1728
1660
  }
1729
1661
  let p = 0;
1730
1662
  if (i) {
1731
- let e = r.current ?? o.querySelector(c ? ".mantine-datatable-header-selector-cell" : ".mantine-datatable-row-selector-cell");
1663
+ let e = r.current ?? a.querySelector(s ? ".mantine-datatable-header-selector-cell" : ".mantine-datatable-row-selector-cell");
1732
1664
  e && (p = e.getBoundingClientRect().width);
1733
1665
  }
1734
1666
  let m = e.filter((e) => !e.hidden && f.has(String(e.accessor))).map((e) => String(e.accessor)), h = /* @__PURE__ */ new Map();
1735
1667
  for (let t of e) {
1736
1668
  let e = String(t.accessor);
1737
- m.includes(e) && (t.pinned ? h.set(e, t.pinned) : a && e === m[0] && !h.has(e) ? h.set(e, "left") : s && e === m[m.length - 1] && !h.has(e) && h.set(e, "right"));
1669
+ m.includes(e) && (t.pinned ? h.set(e, t.pinned) : o && e === m[0] && !h.has(e) ? h.set(e, "left") : c && e === m[m.length - 1] && !h.has(e) && h.set(e, "right"));
1738
1670
  }
1739
1671
  let g = m.filter((e) => h.get(e) === "left"), _ = m.filter((e) => h.get(e) === "right"), v = /* @__PURE__ */ new Map(), y = p;
1740
1672
  g.forEach((e, t) => {
@@ -1767,39 +1699,39 @@ function Kn({ columns: e, theadRef: t, tbodyRef: n, selectionColumnHeaderRef: r,
1767
1699
  t,
1768
1700
  n,
1769
1701
  r,
1770
- a,
1771
- s
1702
+ o,
1703
+ c
1772
1704
  ]);
1773
- return c(() => {
1774
- if (!a && !s && !e.some((e) => e.pinned)) return;
1705
+ return s(() => {
1706
+ if (!o && !c && !e.some((e) => e.pinned)) return;
1775
1707
  let r = t.current ?? n.current;
1776
1708
  if (!r) return;
1777
- let i = !!t.current, o = i ? r.querySelector("tr:last-of-type") : r.querySelector("tr:first-of-type");
1778
- if (!o) return;
1779
- let c = new ResizeObserver(d);
1780
- return o.querySelectorAll(i ? "th" : "td").forEach((e) => {
1781
- c.observe(e);
1782
- }), () => c.disconnect();
1709
+ let i = !!t.current, a = i ? r.querySelector("tr:last-of-type") : r.querySelector("tr:first-of-type");
1710
+ if (!a) return;
1711
+ let s = new ResizeObserver(f);
1712
+ return a.querySelectorAll(i ? "th" : "td").forEach((e) => {
1713
+ s.observe(e);
1714
+ }), () => s.disconnect();
1783
1715
  }, [
1784
1716
  t,
1785
1717
  n,
1786
- d
1787
- ]), Ln(d, [d]), {
1718
+ f
1719
+ ]), jn(f, [f]), {
1788
1720
  pinnedMap: l,
1789
1721
  hasLeftPinned: [...l.values()].some((e) => e.logicalSide === "left"),
1790
1722
  hasRightPinned: [...l.values()].some((e) => e.logicalSide === "right")
1791
1723
  };
1792
1724
  }
1793
- function qn(e) {
1794
- let [t, n] = f(null);
1795
- return c(() => {
1725
+ function Vn(e) {
1726
+ let [t, n] = d(null);
1727
+ return s(() => {
1796
1728
  n(null);
1797
1729
  }, [e?.join(":") || ""]), {
1798
1730
  lastSelectionChangeIndex: t,
1799
1731
  setLastSelectionChangeIndex: n
1800
1732
  };
1801
1733
  }
1802
- function Jn(e, t) {
1734
+ function Hn(e, t) {
1803
1735
  let n = () => {
1804
1736
  t(e.map((e) => e.matches));
1805
1737
  }, r = e.map((e) => {
@@ -1815,26 +1747,26 @@ function Jn(e, t) {
1815
1747
  });
1816
1748
  };
1817
1749
  }
1818
- function Yn(e, t) {
1750
+ function Un(e, t) {
1819
1751
  return t || (typeof window < "u" && "matchMedia" in window ? e.map((e) => window.matchMedia(e).matches) : e.map(() => !1));
1820
1752
  }
1821
- function Xn(e, t, { getInitialValueInEffect: n } = { getInitialValueInEffect: !0 }) {
1822
- let [r, i] = f(n ? t : Yn(e, t)), a = d(null);
1823
- return c(() => {
1824
- if ("matchMedia" in window) return a.current = e.map((e) => window.matchMedia(e)), i(a.current.map((e) => e.matches)), Jn(a.current, (e) => {
1753
+ function Wn(e, t, { getInitialValueInEffect: n } = { getInitialValueInEffect: !0 }) {
1754
+ let [r, i] = d(n ? t : Un(e, t)), a = u(null);
1755
+ return s(() => {
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) => {
1825
1757
  i(e);
1826
1758
  });
1827
1759
  }, [e]), r;
1828
1760
  }
1829
- function Zn(e) {
1830
- let t = me();
1831
- return Xn(u(() => e.map((e) => (typeof e == "function" ? e(t) : e) ?? ""), [e, t]), u(() => e.map(() => !0), [e]));
1761
+ function Gn(e) {
1762
+ let t = he();
1763
+ return Wn(l(() => e.map((e) => (typeof e == "function" ? e(t) : e) ?? ""), [e, t]), l(() => e.map(() => !0), [e]));
1832
1764
  }
1833
- function Qn(e) {
1834
- let t = me();
1835
- return ke((typeof e == "function" ? e(t) : e) || "", !0);
1765
+ function Kn(e) {
1766
+ let t = he();
1767
+ return je((typeof e == "function" ? e(t) : e) || "", !0);
1836
1768
  }
1837
- function $n({ rowExpansion: e, records: t, idAccessor: n }) {
1769
+ function qn({ rowExpansion: e, records: t, idAccessor: n }) {
1838
1770
  let r = [];
1839
1771
  if (e && t) {
1840
1772
  let { trigger: i, allowMultiple: a, initiallyExpanded: o } = e;
@@ -1843,7 +1775,7 @@ function $n({ rowExpansion: e, records: t, idAccessor: n }) {
1843
1775
  index: t
1844
1776
  })).map((e) => Q(e, n)), a || (r = [r[0]]));
1845
1777
  }
1846
- let i, a, o = f(r);
1778
+ let i, a, o = d(r);
1847
1779
  if (e) {
1848
1780
  let { expandable: t, trigger: r, allowMultiple: s, collapseProps: c, content: l } = e;
1849
1781
  e.expanded ? {recordIds: i, onRecordIdsChange: a} = e.expanded : [i, a] = o;
@@ -1869,30 +1801,30 @@ function $n({ rowExpansion: e, records: t, idAccessor: n }) {
1869
1801
  };
1870
1802
  }
1871
1803
  }
1872
- function er(e, t) {
1873
- let [n, r] = f(e), [i, a] = f(e), o = je(() => r(!0), 0), s = je(() => a(!1), t || 200);
1874
- return c(() => {
1875
- e ? (s.clear(), a(!0), o.start()) : (o.clear(), r(!1), s.start());
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);
1806
+ return s(() => {
1807
+ e ? (c.clear(), a(!0), o.start()) : (o.clear(), r(!1), c.start());
1876
1808
  }, [
1877
1809
  o,
1878
- s,
1810
+ c,
1879
1811
  e
1880
1812
  ]), {
1881
1813
  expanded: n,
1882
1814
  visible: i
1883
1815
  };
1884
1816
  }
1885
- var tr = "mantine-datatable-nowrap", nr = "mantine-datatable-ellipsis", rr = "mantine-datatable-pointer-cursor", ir = "mantine-datatable-context-menu-cursor", ar = "mantine-datatable-text-selection-disabled", or = "mantine-datatable-text-align-left", sr = "mantine-datatable-text-align-center", cr = "mantine-datatable-text-align-right";
1886
- function lr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, title: i, noWrap: a, ellipsis: o, textAlign: s, width: c }) {
1887
- return Qn(r) ? m(ae, {
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(oe, {
1888
1820
  "data-pinned": n?.position,
1889
1821
  "data-pinned-shadow": n?.isBoundary ? n.position : void 0,
1890
1822
  className: X({
1891
- [tr]: a || o,
1892
- [nr]: o,
1893
- [or]: s === "left",
1894
- [sr]: s === "center",
1895
- [cr]: s === "right"
1823
+ [Yn]: a || o,
1824
+ [Xn]: o,
1825
+ [er]: s === "left",
1826
+ [tr]: s === "center",
1827
+ [nr]: s === "right"
1896
1828
  }, e),
1897
1829
  style: [
1898
1830
  {
@@ -1910,24 +1842,24 @@ function lr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, title
1910
1842
  children: i
1911
1843
  }) : null;
1912
1844
  }
1913
- function ur({ shadowVisible: e }) {
1914
- return m(ae, {
1845
+ function ir({ shadowVisible: e }) {
1846
+ return p(oe, {
1915
1847
  className: "mantine-datatable-footer-selector-placeholder-cell",
1916
1848
  "data-shadow-visible": e || void 0
1917
1849
  });
1918
1850
  }
1919
- function dr({ className: e, style: t, columns: n, defaultColumnProps: r, pinnedMap: i, selectionVisible: a, selectorCellShadowVisible: o, ref: s }) {
1920
- return m(ie, {
1851
+ function ar({ className: e, style: t, columns: n, defaultColumnProps: r, pinnedMap: i, selectionVisible: a, selectorCellShadowVisible: o, ref: s }) {
1852
+ return p(ae, {
1921
1853
  ref: s,
1922
1854
  className: X("mantine-datatable-footer", e),
1923
1855
  style: t,
1924
- children: h(U, { children: [a && m(ur, { shadowVisible: o }), n.map(({ hidden: e, ...t }) => {
1856
+ children: m(B, { children: [a && p(ir, { shadowVisible: o }), n.map(({ hidden: e, ...t }) => {
1925
1857
  if (e) return null;
1926
1858
  let { accessor: n, visibleMediaQuery: a, textAlign: o, width: s, footer: c, footerClassName: l, footerStyle: u, noWrap: d, ellipsis: f } = {
1927
1859
  ...r,
1928
1860
  ...t
1929
1861
  };
1930
- return m(lr, {
1862
+ return p(rr, {
1931
1863
  pinnedInfo: i.get(String(n)),
1932
1864
  className: l,
1933
1865
  style: u,
@@ -1941,8 +1873,8 @@ function dr({ className: e, style: t, columns: n, defaultColumnProps: r, pinnedM
1941
1873
  })] })
1942
1874
  });
1943
1875
  }
1944
- function fr({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, className: a, style: o }, pinnedInfo: s, maxDepth: c, currentDepth: l, previousGroups: d, isLastGroup: f, withColumnBorders: p = !1, totalTableColumns: h }) {
1945
- let g = u(() => t && t.length > 0 ? t : n && n.length > 0 ? On([{
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([{
1946
1878
  id: e,
1947
1879
  columns: t,
1948
1880
  groups: n
@@ -1950,7 +1882,7 @@ function fr({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, cla
1950
1882
  t,
1951
1883
  n,
1952
1884
  e
1953
- ]), _ = Zn(u(() => g.map(({ visibleMediaQuery: e }) => e), [g])), v = u(() => kn({
1885
+ ]), _ = Gn(l(() => g.map(({ visibleMediaQuery: e }) => e), [g])), v = l(() => Cn({
1954
1886
  id: e,
1955
1887
  columns: t,
1956
1888
  groups: n
@@ -1959,16 +1891,16 @@ function fr({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, cla
1959
1891
  t,
1960
1892
  n,
1961
1893
  _
1962
- ]), y = u(() => d.reduce((e, t) => e + kn(t, _), 0), [d, _]), b = n && n.length > 0 ? 1 : c - l, x = jn(f, y + v < h, p);
1963
- return v > 0 ? m(ae, {
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(oe, {
1964
1896
  colSpan: v,
1965
1897
  rowSpan: b > 1 ? b : void 0,
1966
1898
  "data-pinned": s?.position,
1967
1899
  "data-pinned-shadow": s?.isBoundary ? s.position : void 0,
1968
1900
  className: X("mantine-datatable-column-group-header-cell", {
1969
- [or]: i === "left",
1970
- [sr]: i === "center",
1971
- [cr]: i === "right",
1901
+ [er]: i === "left",
1902
+ [tr]: i === "center",
1903
+ [nr]: i === "right",
1972
1904
  "mantine-datatable-column-group-header-cell--needs-border": x
1973
1905
  }, a),
1974
1906
  style: [o, s && {
@@ -1976,11 +1908,11 @@ function fr({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, cla
1976
1908
  [s.position]: s.offset,
1977
1909
  overflow: "visible"
1978
1910
  }],
1979
- children: r ?? xn(e)
1911
+ children: r ?? hn(e)
1980
1912
  }) : null;
1981
1913
  }
1982
- function pr() {
1983
- return h("svg", {
1914
+ function sr() {
1915
+ return m("svg", {
1984
1916
  width: "14",
1985
1917
  height: "14",
1986
1918
  viewBox: "0 0 24 24",
@@ -1989,15 +1921,15 @@ function pr() {
1989
1921
  fill: "none",
1990
1922
  strokeLinecap: "round",
1991
1923
  strokeLinejoin: "round",
1992
- children: [m("path", {
1924
+ children: [p("path", {
1993
1925
  stroke: "none",
1994
1926
  d: "M0 0h24v24H0z",
1995
1927
  fill: "none"
1996
- }), m("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" })]
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" })]
1997
1929
  });
1998
1930
  }
1999
- function mr() {
2000
- return h("svg", {
1931
+ function cr() {
1932
+ return m("svg", {
2001
1933
  width: "14",
2002
1934
  height: "14",
2003
1935
  viewBox: "0 0 24 24",
@@ -2006,20 +1938,20 @@ function mr() {
2006
1938
  fill: "none",
2007
1939
  strokeLinecap: "round",
2008
1940
  strokeLinejoin: "round",
2009
- children: [m("path", {
1941
+ children: [p("path", {
2010
1942
  stroke: "none",
2011
1943
  d: "M0 0h24v24H0z",
2012
1944
  fill: "none"
2013
- }), m("path", {
1945
+ }), p("path", {
2014
1946
  d: "M20 3h-16a1 1 0 0 0 -1 1v2.227l.008 .223a3 3 0 0 0 .772 1.795l4.22 4.641v8.114a1 1 0 0 0 1.316 .949l6 -2l.108 -.043a1 1 0 0 0 .576 -.906v-6.586l4.121 -4.12a3 3 0 0 0 .879 -2.123v-2.171a1 1 0 0 0 -1 -1z",
2015
1947
  strokeWidth: "0",
2016
1948
  fill: "currentColor"
2017
1949
  })]
2018
1950
  });
2019
1951
  }
2020
- function hr({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisableClickOutside: r }) {
2021
- let [i, { close: a, toggle: o }] = Oe(!1), s = t ? mr : pr, c = De(a);
2022
- return r && (c = void 0), h(I, {
1952
+ function lr({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisableClickOutside: r }) {
1953
+ let [i, { close: a, toggle: o }] = ke(!1), s = t ? cr : sr, c = Oe(a);
1954
+ return r && (c = void 0), m(P, {
2023
1955
  withArrow: !0,
2024
1956
  shadow: "md",
2025
1957
  trapFocus: !0,
@@ -2027,7 +1959,7 @@ function hr({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisa
2027
1959
  opened: i,
2028
1960
  onClose: a,
2029
1961
  onDismiss: a,
2030
- children: [m(R, { children: m(_, {
1962
+ children: [p(te, { children: p(g, {
2031
1963
  className: "mantine-datatable-header-cell-filter-action-icon",
2032
1964
  "data-active": t || void 0,
2033
1965
  size: "sm",
@@ -2036,8 +1968,8 @@ function hr({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisa
2036
1968
  e.preventDefault(), o();
2037
1969
  },
2038
1970
  onKeyDown: (e) => e.stopPropagation(),
2039
- children: m(s, {})
2040
- }) }), m(L, {
1971
+ children: p(s, {})
1972
+ }) }), p(F, {
2041
1973
  ref: c,
2042
1974
  onClick: (e) => e.stopPropagation(),
2043
1975
  onKeyDown: (e) => e.stopPropagation(),
@@ -2045,8 +1977,8 @@ function hr({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisa
2045
1977
  })]
2046
1978
  });
2047
1979
  }
2048
- function gr() {
2049
- return h("svg", {
1980
+ function ur() {
1981
+ return m("svg", {
2050
1982
  width: "14",
2051
1983
  height: "14",
2052
1984
  viewBox: "0 0 24 24",
@@ -2056,19 +1988,19 @@ function gr() {
2056
1988
  strokeLinecap: "round",
2057
1989
  strokeLinejoin: "round",
2058
1990
  children: [
2059
- m("path", {
1991
+ p("path", {
2060
1992
  stroke: "none",
2061
1993
  d: "M0 0h24v24H0z",
2062
1994
  fill: "none"
2063
1995
  }),
2064
- m("path", { d: "M5 12l14 0" }),
2065
- m("path", { d: "M5 12l6 6" }),
2066
- m("path", { d: "M5 12l6 -6" })
1996
+ p("path", { d: "M5 12l14 0" }),
1997
+ p("path", { d: "M5 12l6 6" }),
1998
+ p("path", { d: "M5 12l6 -6" })
2067
1999
  ]
2068
2000
  });
2069
2001
  }
2070
- function _r() {
2071
- return h("svg", {
2002
+ function dr() {
2003
+ return m("svg", {
2072
2004
  width: "14",
2073
2005
  height: "14",
2074
2006
  viewBox: "0 0 24 24",
@@ -2078,19 +2010,19 @@ function _r() {
2078
2010
  strokeLinecap: "round",
2079
2011
  strokeLinejoin: "round",
2080
2012
  children: [
2081
- m("path", {
2013
+ p("path", {
2082
2014
  stroke: "none",
2083
2015
  d: "M0 0h24v24H0z",
2084
2016
  fill: "none"
2085
2017
  }),
2086
- m("path", { d: "M5 12l14 0" }),
2087
- m("path", { d: "M19 12l-6 6" }),
2088
- m("path", { d: "M19 12l-6 -6" })
2018
+ p("path", { d: "M5 12l14 0" }),
2019
+ p("path", { d: "M19 12l-6 6" }),
2020
+ p("path", { d: "M19 12l-6 -6" })
2089
2021
  ]
2090
2022
  });
2091
2023
  }
2092
- function vr() {
2093
- return h("svg", {
2024
+ function fr() {
2025
+ return m("svg", {
2094
2026
  width: "14",
2095
2027
  height: "14",
2096
2028
  viewBox: "0 0 24 24",
@@ -2100,19 +2032,19 @@ function vr() {
2100
2032
  strokeLinecap: "round",
2101
2033
  strokeLinejoin: "round",
2102
2034
  children: [
2103
- m("path", {
2035
+ p("path", {
2104
2036
  stroke: "none",
2105
2037
  d: "M0 0h24v24H0z",
2106
2038
  fill: "none"
2107
2039
  }),
2108
- m("path", { d: "M9 4v6l-2 4v2h10v-2l-2-4v-6" }),
2109
- m("path", { d: "M12 16v5" }),
2110
- m("path", { d: "M8 4h8" })
2040
+ p("path", { d: "M9 4v6l-2 4v2h10v-2l-2-4v-6" }),
2041
+ p("path", { d: "M12 16v5" }),
2042
+ p("path", { d: "M8 4h8" })
2111
2043
  ]
2112
2044
  });
2113
2045
  }
2114
- function yr() {
2115
- return h("svg", {
2046
+ function pr() {
2047
+ return m("svg", {
2116
2048
  width: "14",
2117
2049
  height: "14",
2118
2050
  viewBox: "0 0 24 24",
@@ -2122,126 +2054,126 @@ function yr() {
2122
2054
  strokeLinecap: "round",
2123
2055
  strokeLinejoin: "round",
2124
2056
  children: [
2125
- m("path", {
2057
+ p("path", {
2126
2058
  stroke: "none",
2127
2059
  d: "M0 0h24v24H0z",
2128
2060
  fill: "none"
2129
2061
  }),
2130
- m("path", { d: "M18 6l-12 12" }),
2131
- m("path", { d: "M6 6l12 12" })
2062
+ p("path", { d: "M18 6l-12 12" }),
2063
+ p("path", { d: "M6 6l12 12" })
2132
2064
  ]
2133
2065
  });
2134
2066
  }
2135
- function br({ currentPinned: e, onPinChange: t }) {
2136
- let [n, r] = f(!1), i = d(null), [a, s] = f(!1), l = o(() => {
2067
+ function mr({ currentPinned: e, onPinChange: t }) {
2068
+ let [n, r] = d(!1), i = u(null), [o, c] = d(!1), l = a(() => {
2137
2069
  if (i.current) {
2138
2070
  let e = getComputedStyle(i.current).direction;
2139
- s(e === "rtl");
2071
+ c(e === "rtl");
2140
2072
  }
2141
2073
  }, []);
2142
- Ln(() => {
2074
+ jn(() => {
2143
2075
  l();
2144
- }, [l]), c(() => {
2076
+ }, [l]), s(() => {
2145
2077
  n && l();
2146
2078
  }, [n, l]);
2147
- let u = a ? "right" : "left", p = a ? "left" : "right", g = e === u, v = e === p;
2148
- return h(I, {
2079
+ let f = o ? "right" : "left", h = o ? "left" : "right", _ = e === f, v = e === h;
2080
+ return m(P, {
2149
2081
  opened: n,
2150
2082
  onChange: r,
2151
2083
  position: "bottom",
2152
2084
  withArrow: !0,
2153
2085
  shadow: "sm",
2154
- children: [m(I.Target, { children: m(x, {
2086
+ children: [p(P.Target, { children: p(b, {
2155
2087
  ref: i,
2156
2088
  className: "mantine-datatable-header-cell-pinnable-icon",
2157
2089
  role: "button",
2158
2090
  "aria-label": "Pin column",
2159
2091
  onMouseEnter: () => r(!0),
2160
2092
  onMouseLeave: () => r(!1),
2161
- children: m(_, {
2093
+ children: p(g, {
2162
2094
  size: "xs",
2163
2095
  variant: "light",
2164
2096
  onClick: (e) => e.stopPropagation(),
2165
- children: m(vr, {})
2097
+ children: p(fr, {})
2166
2098
  })
2167
- }) }), m(I.Dropdown, {
2099
+ }) }), p(P.Dropdown, {
2168
2100
  onClick: (e) => e.stopPropagation(),
2169
2101
  onMouseEnter: () => r(!0),
2170
2102
  onMouseLeave: () => r(!1),
2171
2103
  className: "mantine-datatable-pinnable-dropdown",
2172
- children: h(E, {
2104
+ children: m(T, {
2173
2105
  gap: 4,
2174
2106
  children: [
2175
- m(_, {
2107
+ p(g, {
2176
2108
  size: "sm",
2177
- variant: g ? "filled" : "light",
2178
- onClick: () => t(g ? void 0 : u),
2109
+ variant: _ ? "filled" : "light",
2110
+ onClick: () => t(_ ? void 0 : f),
2179
2111
  "aria-label": "Pin left",
2180
- children: m(gr, {})
2112
+ children: p(ur, {})
2181
2113
  }),
2182
- m(_, {
2114
+ p(g, {
2183
2115
  size: "sm",
2184
2116
  variant: v ? "filled" : "light",
2185
- onClick: () => t(v ? void 0 : p),
2117
+ onClick: () => t(v ? void 0 : h),
2186
2118
  "aria-label": "Pin right",
2187
- children: m(_r, {})
2119
+ children: p(dr, {})
2188
2120
  }),
2189
- e && m(_, {
2121
+ e && p(g, {
2190
2122
  size: "sm",
2191
2123
  variant: "light",
2192
2124
  color: "red",
2193
2125
  onClick: () => t(void 0),
2194
2126
  "aria-label": "Unpin",
2195
- children: m(yr, {})
2127
+ children: p(pr, {})
2196
2128
  })
2197
2129
  ]
2198
2130
  })
2199
2131
  })]
2200
2132
  });
2201
2133
  }
2202
- var xr = 50, Sr = (e) => {
2203
- let { accessor: t, columnRef: n } = e, [r, i] = f(!1), a = d(0), s = d({
2134
+ var hr = 50, gr = (e) => {
2135
+ let { accessor: t, columnRef: n } = e, [r, i] = d(!1), o = u(0), s = u({
2204
2136
  current: 0,
2205
2137
  next: 0
2206
- }), { dir: c } = pe(), l = c === "rtl", { setMultipleColumnWidths: u, beginResize: p, endResize: h } = gn(), g = o((e) => {
2138
+ }), { dir: c } = me(), l = c === "rtl", { setMultipleColumnWidths: f, beginResize: m, endResize: h } = un(), g = a((e) => {
2207
2139
  if (e.preventDefault(), e.stopPropagation(), !n.current) return;
2208
- let r = n.current, o = r.nextElementSibling;
2209
- for (; o;) {
2210
- let e = o.getAttribute("data-accessor");
2140
+ let r = n.current, a = r.nextElementSibling;
2141
+ for (; a;) {
2142
+ let e = a.getAttribute("data-accessor");
2211
2143
  if (e && e !== "__selection__") break;
2212
- o = o.nextElementSibling;
2144
+ a = a.nextElementSibling;
2213
2145
  }
2214
- if (!o) return;
2215
- let c = o.getAttribute("data-accessor");
2146
+ if (!a) return;
2147
+ let c = a.getAttribute("data-accessor");
2216
2148
  if (!c) return;
2217
- let d = r.offsetWidth, f = o.offsetWidth;
2218
- p(), i(!0), a.current = e.clientX, s.current = {
2219
- current: d,
2220
- next: f
2149
+ let u = r.offsetWidth, d = a.offsetWidth;
2150
+ m(), i(!0), o.current = e.clientX, s.current = {
2151
+ current: u,
2152
+ next: d
2221
2153
  };
2222
- let m = (e) => {
2223
- let n = e.clientX - a.current;
2154
+ let p = (e) => {
2155
+ let n = e.clientX - o.current;
2224
2156
  l && (n = -n);
2225
- let r = s.current.current - xr, i = s.current.next - xr, o = Math.max(-r, Math.min(n, i)), d = s.current.current + o, f = s.current.next - o;
2226
- u([{
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;
2158
+ f([{
2227
2159
  accessor: t,
2228
- width: `${d}px`
2160
+ width: `${u}px`
2229
2161
  }, {
2230
2162
  accessor: c,
2231
- width: `${f}px`
2163
+ width: `${d}px`
2232
2164
  }]);
2233
2165
  }, g = () => {
2234
- i(!1), document.body.style.cursor = "initial", document.body.style.userSelect = "initial", h(), document.removeEventListener("mousemove", m), document.removeEventListener("mouseup", g);
2166
+ i(!1), document.body.style.cursor = "initial", document.body.style.userSelect = "initial", h(), document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", g);
2235
2167
  };
2236
- document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", m), document.addEventListener("mouseup", g);
2168
+ document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", p), document.addEventListener("mouseup", g);
2237
2169
  }, [
2238
2170
  t,
2239
2171
  n,
2240
2172
  l,
2241
- u,
2242
- p,
2173
+ f,
2174
+ m,
2243
2175
  h
2244
- ]), _ = o(() => {
2176
+ ]), _ = a(() => {
2245
2177
  if (!n.current) return;
2246
2178
  let e = n.current.nextElementSibling, r = [{
2247
2179
  accessor: t,
@@ -2254,13 +2186,13 @@ var xr = 50, Sr = (e) => {
2254
2186
  width: "auto"
2255
2187
  });
2256
2188
  }
2257
- u(r);
2189
+ f(r);
2258
2190
  }, [
2259
2191
  t,
2260
2192
  n,
2261
- u
2193
+ f
2262
2194
  ]);
2263
- return m("div", {
2195
+ return p("div", {
2264
2196
  className: "mantine-datatable-header-resizable-handle",
2265
2197
  style: { cursor: r ? "col-resize" : void 0 },
2266
2198
  onMouseDown: g,
@@ -2269,8 +2201,8 @@ var xr = 50, Sr = (e) => {
2269
2201
  title: "Drag to resize column, double-click to reset"
2270
2202
  });
2271
2203
  };
2272
- function Cr() {
2273
- return h("svg", {
2204
+ function _r() {
2205
+ return m("svg", {
2274
2206
  width: "14",
2275
2207
  height: "14",
2276
2208
  viewBox: "0 0 24 24",
@@ -2280,19 +2212,19 @@ function Cr() {
2280
2212
  strokeLinecap: "round",
2281
2213
  strokeLinejoin: "round",
2282
2214
  children: [
2283
- m("path", {
2215
+ p("path", {
2284
2216
  stroke: "none",
2285
2217
  d: "M0 0h24v24H0z",
2286
2218
  fill: "none"
2287
2219
  }),
2288
- m("path", { d: "M8 7l4 -4l4 4" }),
2289
- m("path", { d: "M8 17l4 4l4 -4" }),
2290
- m("path", { d: "M12 3l0 18" })
2220
+ p("path", { d: "M8 7l4 -4l4 4" }),
2221
+ p("path", { d: "M8 17l4 4l4 -4" }),
2222
+ p("path", { d: "M12 3l0 18" })
2291
2223
  ]
2292
2224
  });
2293
2225
  }
2294
- function wr() {
2295
- return h("svg", {
2226
+ function vr() {
2227
+ return m("svg", {
2296
2228
  width: "14",
2297
2229
  height: "14",
2298
2230
  viewBox: "0 0 24 24",
@@ -2302,19 +2234,19 @@ function wr() {
2302
2234
  strokeLinecap: "round",
2303
2235
  strokeLinejoin: "round",
2304
2236
  children: [
2305
- m("path", {
2237
+ p("path", {
2306
2238
  stroke: "none",
2307
2239
  d: "M0 0h24v24H0z",
2308
2240
  fill: "none"
2309
2241
  }),
2310
- m("path", { d: "M12 5l0 14" }),
2311
- m("path", { d: "M16 9l-4 -4" }),
2312
- m("path", { d: "M8 9l4 -4" })
2242
+ p("path", { d: "M12 5l0 14" }),
2243
+ p("path", { d: "M16 9l-4 -4" }),
2244
+ p("path", { d: "M8 9l4 -4" })
2313
2245
  ]
2314
2246
  });
2315
2247
  }
2316
- function Tr() {
2317
- return h("svg", {
2248
+ function yr() {
2249
+ return m("svg", {
2318
2250
  width: "14",
2319
2251
  height: "14",
2320
2252
  viewBox: "0 0 24 24",
@@ -2324,51 +2256,51 @@ function Tr() {
2324
2256
  strokeLinecap: "round",
2325
2257
  strokeLinejoin: "round",
2326
2258
  children: [
2327
- m("path", {
2259
+ p("path", {
2328
2260
  stroke: "none",
2329
2261
  d: "M0 0h24v24H0z",
2330
2262
  fill: "none"
2331
2263
  }),
2332
- m("path", { d: "M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }),
2333
- m("path", { d: "M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }),
2334
- m("path", { d: "M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }),
2335
- m("path", { d: "M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }),
2336
- m("path", { d: "M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }),
2337
- m("path", { d: "M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" })
2264
+ p("path", { d: "M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }),
2265
+ p("path", { d: "M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }),
2266
+ p("path", { d: "M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }),
2267
+ p("path", { d: "M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }),
2268
+ p("path", { d: "M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }),
2269
+ p("path", { d: "M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" })
2338
2270
  ]
2339
2271
  });
2340
2272
  }
2341
- function Er({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQuery: i, title: a, sortable: o, draggable: s, toggleable: c, pinnable: l, resizable: u, sortIcons: p, textAlign: g, width: v, sortStatus: b, onSortStatusChange: S, filter: C, filterPopoverProps: w, filterPopoverDisableClickOutside: D, filtering: O, sortKey: k }) {
2342
- let { setSourceColumn: A, setTargetColumn: j, swapColumns: M, columnsToggle: N, setColumnsToggle: P, columnsPinning: F, setColumnsPinning: I } = gn(), [L, R] = f(!1), z = d(null), ee = F?.find((e) => e.accessor === r)?.pinned;
2343
- if (!Qn(i)) return null;
2344
- let B = a ?? xn(r), te = typeof B == "string" ? B : void 0, ne = 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: ee, columnsPinning: P, setColumnsPinning: F } = un(), [te, I] = d(!1), L = u(null), ne = P?.find((e) => e.accessor === r)?.pinned;
2275
+ if (!Kn(i)) return null;
2276
+ let R = a ?? hn(r), re = typeof R == "string" ? R : void 0, ie = o && S ? (e) => {
2345
2277
  e?.defaultPrevented || S({
2346
2278
  sortKey: k,
2347
2279
  columnAccessor: r,
2348
- direction: b?.columnAccessor === r ? b.direction === "asc" ? "desc" : "asc" : b?.direction ?? "asc"
2280
+ direction: x?.columnAccessor === r ? x.direction === "asc" ? "desc" : "asc" : x?.direction ?? "asc"
2349
2281
  });
2350
- } : void 0, V = (e) => {
2351
- e.stopPropagation(), A(r), R(!1);
2352
- }, re = (e) => {
2353
- e.preventDefault(), j(r), R(!0);
2354
- }, ie = () => {
2355
- j(r), R(!1), M();
2356
- }, H = () => {
2357
- R(!0);
2358
- }, U = () => {
2359
- R(!1);
2360
- }, oe = (e) => {
2361
- e.stopPropagation(), P(N.map((e) => e.accessor === r ? {
2282
+ } : void 0, z = (e) => {
2283
+ e.stopPropagation(), A(r), I(!1);
2284
+ }, ae = (e) => {
2285
+ e.preventDefault(), j(r), I(!0);
2286
+ }, se = () => {
2287
+ j(r), I(!1), M();
2288
+ }, B = () => {
2289
+ I(!0);
2290
+ }, ce = () => {
2291
+ I(!1);
2292
+ }, V = (e) => {
2293
+ e.stopPropagation(), ee(N.map((e) => e.accessor === r ? {
2362
2294
  ...e,
2363
2295
  toggled: !1
2364
2296
  } : e));
2365
- }, W = (e) => {
2366
- I((t) => t.map((t) => t.accessor === r ? {
2297
+ }, le = (e) => {
2298
+ F((t) => t.map((t) => t.accessor === r ? {
2367
2299
  ...t,
2368
2300
  pinned: e
2369
2301
  } : t));
2370
2302
  };
2371
- return h(ae, {
2303
+ return m(oe, {
2372
2304
  "data-accessor": r,
2373
2305
  "data-pinned": n?.position,
2374
2306
  "data-pinned-shadow": n?.isBoundary ? n.position : void 0,
@@ -2376,14 +2308,14 @@ function Er({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2376
2308
  "mantine-datatable-header-cell-sortable": o,
2377
2309
  "mantine-datatable-header-cell-toggleable": c,
2378
2310
  "mantine-datatable-header-cell-pinnable": l,
2379
- "mantine-datatable-header-cell-resizable": u
2311
+ "mantine-datatable-header-cell-resizable": f
2380
2312
  }, e),
2381
2313
  style: [
2382
2314
  {
2383
- width: v,
2384
- ...u ? {} : {
2385
- minWidth: v,
2386
- maxWidth: v
2315
+ width: y,
2316
+ ...f ? {} : {
2317
+ minWidth: y,
2318
+ maxWidth: y
2387
2319
  }
2388
2320
  },
2389
2321
  t,
@@ -2395,100 +2327,100 @@ function Er({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2395
2327
  ],
2396
2328
  role: o ? "button" : void 0,
2397
2329
  tabIndex: o ? 0 : void 0,
2398
- onClick: ne,
2399
- onKeyDown: (e) => e.key === "Enter" && ne?.(),
2400
- ref: z,
2401
- children: [h(E, {
2330
+ onClick: ie,
2331
+ onKeyDown: (e) => e.key === "Enter" && ie?.(),
2332
+ ref: L,
2333
+ children: [m(T, {
2402
2334
  className: "mantine-datatable-header-cell-sortable-group",
2403
2335
  justify: "space-between",
2404
2336
  wrap: "nowrap",
2405
2337
  children: [
2406
- h(T, {
2338
+ m(w, {
2407
2339
  align: "center",
2408
2340
  w: "100%",
2409
2341
  className: X({
2410
2342
  "mantine-datatable-header-cell-draggable": s,
2411
- "mantine-datatable-header-cell-drag-over": L
2343
+ "mantine-datatable-header-cell-drag-over": te
2412
2344
  }),
2413
2345
  draggable: s,
2414
- onDragStart: s ? V : void 0,
2415
- onDragEnter: s ? H : void 0,
2416
- onDragOver: s ? re : void 0,
2417
- onDrop: s ? ie : void 0,
2418
- onDragLeave: s ? U : void 0,
2419
- children: [s ? m(x, {
2346
+ onDragStart: s ? z : void 0,
2347
+ onDragEnter: s ? B : void 0,
2348
+ onDragOver: s ? ae : void 0,
2349
+ onDrop: s ? se : void 0,
2350
+ onDragLeave: s ? ce : void 0,
2351
+ children: [s ? p(b, {
2420
2352
  role: "img",
2421
2353
  "aria-label": "Drag column",
2422
- children: m(_, {
2354
+ children: p(g, {
2423
2355
  className: "mantine-datatable-header-cell-draggable-action-icon",
2424
2356
  variant: "subtle",
2425
2357
  size: "xs",
2426
2358
  onClick: (e) => {
2427
2359
  e.stopPropagation();
2428
2360
  },
2429
- children: m(Tr, {})
2361
+ children: p(yr, {})
2430
2362
  })
2431
- }) : null, m(y, {
2363
+ }) : null, p(v, {
2432
2364
  className: X("mantine-datatable-header-cell-sortable-text", {
2433
- [or]: g === "left",
2434
- [sr]: g === "center",
2435
- [cr]: g === "right"
2436
- }, tr, nr),
2437
- title: te,
2438
- children: B
2365
+ [er]: _ === "left",
2366
+ [tr]: _ === "center",
2367
+ [nr]: _ === "right"
2368
+ }, Yn, Xn),
2369
+ title: re,
2370
+ children: R
2439
2371
  })]
2440
2372
  }),
2441
- l ? m(br, {
2442
- currentPinned: ee,
2443
- onPinChange: W
2373
+ l ? p(mr, {
2374
+ currentPinned: ne,
2375
+ onPinChange: le
2444
2376
  }) : null,
2445
- c ? m(x, {
2377
+ c ? p(b, {
2446
2378
  className: "mantine-datatable-header-cell-toggleable-icon",
2447
2379
  role: "img",
2448
2380
  "aria-label": "Toggle column",
2449
- children: m(_, {
2381
+ children: p(g, {
2450
2382
  size: "xs",
2451
2383
  variant: "light",
2452
- onClick: oe,
2453
- children: m(yr, {})
2384
+ onClick: V,
2385
+ children: p(pr, {})
2454
2386
  })
2455
2387
  }) : null,
2456
- o || b?.columnAccessor === r ? b?.columnAccessor === r ? m(x, {
2457
- className: X("mantine-datatable-header-cell-sortable-icon", { "mantine-datatable-header-cell-sortable-icon-reversed": b.direction === "desc" }),
2388
+ o || x?.columnAccessor === r ? x?.columnAccessor === r ? p(b, {
2389
+ className: X("mantine-datatable-header-cell-sortable-icon", { "mantine-datatable-header-cell-sortable-icon-reversed": x.direction === "desc" }),
2458
2390
  role: "img",
2459
- "aria-label": `Sorted ${b.direction === "desc" ? "descending" : "ascending"}`,
2460
- children: p?.sorted || m(wr, {})
2461
- }) : m(x, {
2391
+ "aria-label": `Sorted ${x.direction === "desc" ? "descending" : "ascending"}`,
2392
+ children: h?.sorted || p(vr, {})
2393
+ }) : p(b, {
2462
2394
  className: "mantine-datatable-header-cell-sortable-unsorted-icon",
2463
2395
  role: "img",
2464
2396
  "aria-label": "Not sorted",
2465
- children: p?.unsorted || m(Cr, {})
2397
+ children: h?.unsorted || p(_r, {})
2466
2398
  }) : null,
2467
- C ? m(hr, {
2468
- filterPopoverProps: w,
2399
+ C ? p(lr, {
2400
+ filterPopoverProps: E,
2469
2401
  isActive: !!O,
2470
2402
  filterPopoverDisableClickOutside: D,
2471
2403
  children: C
2472
2404
  }) : null
2473
2405
  ]
2474
- }), u && r !== "__selection__" ? m(Sr, {
2406
+ }), f && r !== "__selection__" ? p(gr, {
2475
2407
  accessor: r,
2476
- columnRef: z
2408
+ columnRef: L
2477
2409
  }) : null]
2478
2410
  });
2479
2411
  }
2480
- function Dr({ 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 }) {
2481
2413
  let u = !o.disabled;
2482
- return m(ae, {
2414
+ return p(oe, {
2483
2415
  ref: l,
2484
- className: X("mantine-datatable-header-selector-cell", { [rr]: n === "cell" && u }, e),
2416
+ className: X("mantine-datatable-header-selector-cell", { [Zn]: n === "cell" && u }, e),
2485
2417
  style: t,
2486
2418
  rowSpan: c,
2487
2419
  "data-shadow-visible": r || void 0,
2488
2420
  "data-accessor": "__selection__",
2489
2421
  onClick: n === "cell" && u ? s : void 0,
2490
- children: m(S, {
2491
- classNames: u ? { input: rr } : void 0,
2422
+ children: p(x, {
2423
+ classNames: u ? { input: Zn } : void 0,
2492
2424
  checked: i,
2493
2425
  indeterminate: a,
2494
2426
  onChange: s,
@@ -2497,7 +2429,7 @@ function Dr({ className: e, style: t, trigger: n, shadowVisible: r, checked: i,
2497
2429
  })
2498
2430
  });
2499
2431
  }
2500
- function Or(e, t) {
2432
+ function Sr(e, t) {
2501
2433
  let n = (e.columns ?? []).filter((e) => !e.hidden).map((e) => String(e.accessor)), r = n.map((e) => t.get(e)).filter(Boolean);
2502
2434
  if (r.length === 0 || r.length !== n.length) return;
2503
2435
  let i = new Set(r.map((e) => e.logicalSide));
@@ -2510,44 +2442,44 @@ function Or(e, t) {
2510
2442
  isBoundary: l?.isBoundary ?? !1
2511
2443
  };
2512
2444
  }
2513
- function kr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r, sortIcons: i, onSortStatusChange: a, columns: o, defaultColumnProps: s, groups: c, pinnedMap: l, selectionTrigger: u, selectionVisible: d, selectionChecked: p, selectionIndeterminate: g, onSelectionChange: _, selectionCheckboxProps: v, selectorCellShadowVisible: y, selectionColumnClassName: b, selectionColumnStyle: x, withColumnBorders: C = !1, ref: w }) {
2514
- let T = c ? Dn(c) : 0, D = T > 0 ? T + 1 : 1, O = d ? m(Dr, {
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, {
2515
2447
  ref: e,
2516
2448
  className: b,
2517
- style: x,
2449
+ style: S,
2518
2450
  trigger: u,
2519
2451
  shadowVisible: y,
2520
- checked: p,
2452
+ checked: h,
2521
2453
  indeterminate: g,
2522
2454
  checkboxProps: v,
2523
2455
  onChange: _,
2524
2456
  rowSpan: c ? D : void 0
2525
- }) : null, { columnsToggle: k, setColumnsToggle: A } = gn(), [j, M] = f(!1), N = o.some((e) => e.toggleable), P = N ? Object.fromEntries(o.map(({ accessor: e, title: t }) => [e, t ?? xn(String(e))])) : void 0, F = h(H, {
2457
+ }) : null, { columnsToggle: k, setColumnsToggle: A } = un(), [j, M] = d(!1), N = o.some((e) => e.toggleable), ee = N ? Object.fromEntries(o.map(({ accessor: e, title: t }) => [e, t ?? hn(String(e))])) : void 0, I = m(se, {
2526
2458
  className: X("mantine-datatable-header", t),
2527
2459
  style: n,
2528
2460
  ref: w,
2529
2461
  onContextMenu: N ? (e) => {
2530
2462
  e.preventDefault(), M((e) => !e);
2531
2463
  } : void 0,
2532
- children: [c && Array.from({ length: T }, (e, t) => {
2533
- let n = An(c, t);
2534
- return h(U, { children: [t === 0 && O, n.map((e, r) => m(fr, {
2464
+ children: [c && Array.from({ length: E }, (e, t) => {
2465
+ let n = wn(c, t);
2466
+ return m(B, { children: [t === 0 && O, n.map((e, r) => p(or, {
2535
2467
  group: e,
2536
- pinnedInfo: Or(e, l),
2537
- maxDepth: T,
2468
+ pinnedInfo: Sr(e, l),
2469
+ maxDepth: E,
2538
2470
  currentDepth: t,
2539
2471
  previousGroups: n.slice(0, r),
2540
2472
  isLastGroup: r === n.length - 1,
2541
2473
  withColumnBorders: C,
2542
2474
  totalTableColumns: o.length
2543
2475
  }, e.id))] }, `group-depth-${t}`);
2544
- }), h(U, { children: [!c && O, o.map(({ hidden: e, ...t }, n) => {
2476
+ }), m(B, { children: [!c && O, o.map(({ hidden: e, ...t }, n) => {
2545
2477
  if (e) return null;
2546
- let { accessor: c, visibleMediaQuery: u, textAlign: d, width: f, title: p, sortable: h, draggable: g, toggleable: _, pinnable: v, resizable: y, titleClassName: b, titleStyle: x, filter: S, filterPopoverProps: C, filterPopoverDisableClickOutside: w, filtering: T, sortKey: E } = {
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 } = {
2547
2479
  ...s,
2548
2480
  ...t
2549
2481
  };
2550
- return m(Er, {
2482
+ return p(br, {
2551
2483
  accessor: c,
2552
2484
  pinnedInfo: l.get(String(c)),
2553
2485
  className: b,
@@ -2555,7 +2487,7 @@ function kr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2555
2487
  visibleMediaQuery: u,
2556
2488
  textAlign: d,
2557
2489
  width: f,
2558
- title: p,
2490
+ title: m,
2559
2491
  sortable: h,
2560
2492
  draggable: g,
2561
2493
  toggleable: _,
@@ -2572,16 +2504,16 @@ function kr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2572
2504
  }, c);
2573
2505
  })] })]
2574
2506
  });
2575
- return N ? h(I, {
2507
+ return N ? m(P, {
2576
2508
  position: "bottom",
2577
2509
  withArrow: !0,
2578
2510
  shadow: "md",
2579
2511
  opened: j,
2580
2512
  onChange: M,
2581
- children: [m(R, { children: F }), m(L, { children: m(te, { children: k.filter((e) => e.toggleable).map((e) => m(E, { children: m(S, {
2513
+ children: [p(te, { children: I }), p(F, { children: p(R, { children: k.filter((e) => e.toggleable).map((e) => p(T, { children: p(x, {
2582
2514
  classNames: { label: "mantine-datatable-header-column-toggle-checkbox-label" },
2583
2515
  size: "xs",
2584
- label: P[e.accessor],
2516
+ label: ee[e.accessor],
2585
2517
  checked: e.toggled,
2586
2518
  onChange: (t) => {
2587
2519
  A(k.map((n) => n.accessor === e.accessor ? {
@@ -2590,21 +2522,21 @@ function kr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2590
2522
  } : n));
2591
2523
  }
2592
2524
  }) }, e.accessor)) }) })]
2593
- }) : F;
2525
+ }) : I;
2594
2526
  }
2595
- function Ar({ fetching: e, customContent: t, backgroundBlur: n, size: r, type: i, color: a }) {
2596
- return m(x, {
2527
+ function wr({ fetching: e, customContent: t, backgroundBlur: n, size: r, type: i, color: a }) {
2528
+ return p(b, {
2597
2529
  className: X("mantine-datatable-loader", { "mantine-datatable-loader-fetching": e }),
2598
2530
  style: [{ backdropFilter: n ? `blur(${n}px)` : void 0 }],
2599
- children: e && (t || m(O, {
2531
+ children: e && (t || p(D, {
2600
2532
  size: r,
2601
2533
  type: i,
2602
2534
  color: a
2603
2535
  }))
2604
2536
  });
2605
2537
  }
2606
- function jr() {
2607
- return h("svg", {
2538
+ function Tr() {
2539
+ return m("svg", {
2608
2540
  width: "14",
2609
2541
  height: "14",
2610
2542
  viewBox: "0 0 24 24",
@@ -2614,58 +2546,58 @@ function jr() {
2614
2546
  strokeLinecap: "round",
2615
2547
  strokeLinejoin: "round",
2616
2548
  children: [
2617
- m("path", {
2549
+ p("path", {
2618
2550
  stroke: "none",
2619
2551
  d: "M0 0h24v24H0z",
2620
2552
  fill: "none"
2621
2553
  }),
2622
- m("path", { d: "M8 9l4 -4l4 4" }),
2623
- m("path", { d: "M16 15l-4 4l-4 -4" })
2554
+ p("path", { d: "M8 9l4 -4l4 4" }),
2555
+ p("path", { d: "M16 15l-4 4l-4 -4" })
2624
2556
  ]
2625
2557
  });
2626
2558
  }
2627
- var Mr = {
2628
- xs: fe(22),
2629
- sm: fe(26),
2630
- md: fe(32),
2631
- lg: fe(38),
2632
- xl: fe(44)
2559
+ var Er = {
2560
+ xs: H(22),
2561
+ sm: H(26),
2562
+ md: H(32),
2563
+ lg: H(38),
2564
+ xl: H(44)
2633
2565
  };
2634
- function Nr({ size: e, label: t, values: n, value: r, activeTextColor: i, activeBackgroundColor: a, onChange: o }) {
2635
- return h(E, {
2566
+ function Dr({ size: e, label: t, values: n, value: r, activeTextColor: i, activeBackgroundColor: a, onChange: o }) {
2567
+ return m(T, {
2636
2568
  gap: "xs",
2637
- children: [m(W, {
2569
+ children: [p(V, {
2638
2570
  component: "div",
2639
2571
  size: e,
2640
2572
  children: t
2641
- }), h(k, {
2573
+ }), m(O, {
2642
2574
  withinPortal: !0,
2643
2575
  withArrow: !0,
2644
2576
  offset: 2,
2645
2577
  classNames: { arrow: "mantine-datatable-page-size-selector-menu-arrow" },
2646
- children: [m(M, { children: m(b, {
2578
+ children: [p(j, { children: p(y, {
2647
2579
  size: e,
2648
2580
  variant: "default",
2649
2581
  classNames: { section: "mantine-datatable-page-size-selector-button-icon" },
2650
- rightSection: m(jr, {}),
2582
+ rightSection: p(Tr, {}),
2651
2583
  style: [{ fontWeight: "normal" }, (t) => ({
2652
- height: Mr[e],
2584
+ height: Er[e],
2653
2585
  paddingLeft: t.spacing[e],
2654
2586
  paddingRight: t.spacing[e]
2655
2587
  })],
2656
2588
  children: r
2657
- }) }), m(A, { children: n.map((t) => {
2589
+ }) }), p(k, { children: n.map((t) => {
2658
2590
  let n = t === r;
2659
- return m(j, {
2591
+ return p(A, {
2660
2592
  className: X({ "mantine-datatable-page-size-selector-active": n }),
2661
- style: [{ height: Mr[e] }, n && (i || a) ? (e) => pn({
2593
+ style: [{ height: Er[e] }, n && (i || a) ? (e) => sn({
2662
2594
  theme: e,
2663
2595
  paginationActiveTextColor: i,
2664
2596
  paginationActiveBackgroundColor: a
2665
2597
  }) : void 0],
2666
2598
  disabled: n,
2667
2599
  onClick: () => o(t),
2668
- children: m(W, {
2600
+ children: p(V, {
2669
2601
  component: "div",
2670
2602
  size: e,
2671
2603
  children: t
@@ -2675,40 +2607,40 @@ function Nr({ size: e, label: t, values: n, value: r, activeTextColor: i, active
2675
2607
  })]
2676
2608
  });
2677
2609
  }
2678
- function Pr({ 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: f, totalRecords: g, recordsPerPage: _, onRecordsPerPageChange: v, 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 }) {
2679
2611
  let O;
2680
2612
  if (g) {
2681
2613
  let e = (r - 1) * _ + 1;
2682
- O = f({
2614
+ O = h({
2683
2615
  from: e,
2684
2616
  to: e + (S || 0) - 1,
2685
2617
  totalRecords: g
2686
2618
  });
2687
2619
  } else O = n ? u : d;
2688
- 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 = !Qn(({ breakpoints: e }) => `(min-width: ${typeof w == "number" ? `${fe(w)}rem` : e[w] || w})`), N = {
2689
- Text: (e) => m(W, {
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" ? `${H(w)}rem` : e[w] || w})`), N = {
2621
+ Text: (e) => p(V, {
2690
2622
  component: "div",
2691
2623
  className: "mantine-datatable-pagination-text",
2692
2624
  size: l,
2693
2625
  ...e,
2694
2626
  children: O
2695
2627
  }),
2696
- PageSizeSelector: (e) => x ? m(Nr, {
2628
+ PageSizeSelector: (e) => x ? p(Dr, {
2697
2629
  activeTextColor: s,
2698
2630
  activeBackgroundColor: c,
2699
2631
  size: l,
2700
2632
  label: b,
2701
2633
  values: x,
2702
2634
  value: _,
2703
- onChange: v,
2635
+ onChange: y,
2704
2636
  ...e
2705
2637
  }) : null,
2706
- Pagination: (e) => m(F, {
2638
+ Pagination: (e) => p(ee, {
2707
2639
  classNames: {
2708
2640
  root: X("mantine-datatable-pagination-pages", { "mantine-datatable-pagination-pages-fetching": n || !S }),
2709
2641
  control: "mantine-datatable-pagination-pages-control"
2710
2642
  },
2711
- style: s || c ? (e) => pn({
2643
+ style: s || c ? (e) => sn({
2712
2644
  theme: e,
2713
2645
  paginationActiveTextColor: s,
2714
2646
  paginationActiveBackgroundColor: c
@@ -2738,34 +2670,34 @@ function Pr({ className: e, style: t, fetching: n, page: r, onPageChange: i, pag
2738
2670
  },
2739
2671
  actions: {
2740
2672
  setPage: (e) => i?.(e),
2741
- setRecordsPerPage: v ? (e) => v(e) : void 0
2673
+ setRecordsPerPage: y ? (e) => y(e) : void 0
2742
2674
  },
2743
2675
  Controls: N
2744
2676
  };
2745
- return m(y, {
2677
+ return p(v, {
2746
2678
  px: C ?? "xs",
2747
2679
  py: "xs",
2748
2680
  className: X("mantine-datatable-pagination", e),
2749
2681
  style: [{ flexDirection: M ? "column" : "row" }, t],
2750
- children: typeof D == "function" ? D(P) : h(p, { children: [
2751
- m(N.Text, {}),
2752
- m(N.PageSizeSelector, {}),
2753
- m(N.Pagination, {})
2682
+ children: typeof D == "function" ? D(P) : m(f, { children: [
2683
+ p(N.Text, {}),
2684
+ p(N.PageSizeSelector, {}),
2685
+ p(N.Pagination, {})
2754
2686
  ] })
2755
2687
  });
2756
2688
  }
2757
- function Fr({ 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: p, render: h, defaultRender: g, customCellAttributes: _ }) {
2758
- return Qn(r) ? m(re, {
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(z, {
2759
2691
  "data-pinned": n?.position,
2760
2692
  "data-pinned-shadow": n?.isBoundary ? n.position : void 0,
2761
2693
  className: X({
2762
- [tr]: l || u,
2763
- [nr]: u,
2764
- [rr]: o || s,
2765
- [ir]: c,
2766
- [or]: d === "left",
2767
- [sr]: d === "center",
2768
- [cr]: 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"
2769
2701
  }, e),
2770
2702
  style: [
2771
2703
  {
@@ -2784,46 +2716,46 @@ function Fr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, recor
2784
2716
  onDoubleClick: s,
2785
2717
  onContextMenu: c,
2786
2718
  ..._?.(i, a),
2787
- children: h ? h(i, a) : g ? g(i, a, p) : En(i, p)
2719
+ children: h ? h(i, a) : g ? g(i, a, m) : bn(i, m)
2788
2720
  }) : null;
2789
2721
  }
2790
- function Ir({ open: e, colSpan: t, content: n, collapseProps: r }) {
2791
- let { expanded: i, visible: a } = er(e, r?.transitionDuration);
2792
- return a ? h(p, { children: [m(U, {}), m(U, { children: m(re, {
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(B, {}), p(B, { children: p(z, {
2793
2725
  className: "mantine-datatable-row-expansion-cell",
2794
2726
  colSpan: t,
2795
- children: m(C, {
2727
+ children: p(S, {
2796
2728
  expanded: i,
2797
2729
  ...r,
2798
- children: m("div", {
2730
+ children: p("div", {
2799
2731
  className: "mantine-datatable-row-expansion-cell-content",
2800
2732
  children: n()
2801
2733
  })
2802
2734
  })
2803
2735
  }) })] }) : null;
2804
2736
  }
2805
- function Lr({ 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 }) {
2806
2738
  let u = {
2807
2739
  ...s,
2808
2740
  ...c(n, r)
2809
2741
  }, d = !l.disabled && !u.disabled, f = (e) => {
2810
2742
  e.stopPropagation(), i === "cell" && d && a?.(e);
2811
2743
  };
2812
- return m(re, {
2813
- className: X("mantine-datatable-row-selector-cell", { [rr]: i === "cell" && d }, e),
2744
+ return p(z, {
2745
+ className: X("mantine-datatable-row-selector-cell", { [Zn]: i === "cell" && d }, e),
2814
2746
  style: t,
2815
2747
  "data-shadow-visible": o || void 0,
2816
2748
  onClick: f,
2817
- children: m(S, {
2818
- classNames: d ? { input: rr } : void 0,
2749
+ children: p(x, {
2750
+ classNames: d ? { input: Zn } : void 0,
2819
2751
  onChange: a,
2820
2752
  ...l,
2821
2753
  ...u
2822
2754
  })
2823
2755
  });
2824
2756
  }
2825
- function Rr({ 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: f, 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 }) {
2826
- let M = h(p, { children: [s && m(Lr, {
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, {
2827
2759
  className: k,
2828
2760
  style: A,
2829
2761
  record: e,
@@ -2834,14 +2766,14 @@ function Rr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
2834
2766
  disabled: !l || (u ? !u(e, t) : !1),
2835
2767
  onChange: l,
2836
2768
  checkboxProps: d,
2837
- getCheckboxProps: f
2769
+ getCheckboxProps: h
2838
2770
  }), n.map(({ hidden: n, hiddenContent: o, ...s }, c) => {
2839
2771
  if (n || o) return null;
2840
- let { accessor: l, visibleMediaQuery: u, textAlign: d, noWrap: f, ellipsis: p, width: h, render: g, cellsClassName: _, cellsStyle: v, customCellAttributes: S } = {
2772
+ let { accessor: l, visibleMediaQuery: u, textAlign: d, noWrap: f, ellipsis: m, width: h, render: g, cellsClassName: _, cellsStyle: v, customCellAttributes: S } = {
2841
2773
  ...r,
2842
2774
  ...s
2843
2775
  };
2844
- return m(Fr, {
2776
+ return p(kr, {
2845
2777
  pinnedInfo: i.get(String(l)),
2846
2778
  className: typeof _ == "function" ? _(e, t) : _,
2847
2779
  style: v?.(e, t),
@@ -2872,13 +2804,13 @@ function Rr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
2872
2804
  accessor: l,
2873
2805
  textAlign: d,
2874
2806
  noWrap: f,
2875
- ellipsis: p,
2807
+ ellipsis: m,
2876
2808
  width: h,
2877
2809
  render: g,
2878
2810
  defaultRender: a,
2879
2811
  customCellAttributes: S
2880
2812
  }, l);
2881
- })] }), N = S && m(Ir, {
2813
+ })] }), N = S && p(Ar, {
2882
2814
  colSpan: n.filter(({ hidden: e }) => !e).length + +!!s,
2883
2815
  open: S.isRowExpanded(e),
2884
2816
  content: S.content({
@@ -2886,7 +2818,7 @@ function Rr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
2886
2818
  index: t
2887
2819
  }),
2888
2820
  collapseProps: S.collapseProps
2889
- }), P = zr({
2821
+ }), ee = Nr({
2890
2822
  record: e,
2891
2823
  index: t,
2892
2824
  selectionChecked: c,
@@ -2903,20 +2835,20 @@ function Rr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
2903
2835
  return j ? j({
2904
2836
  record: e,
2905
2837
  index: t,
2906
- rowProps: P,
2838
+ rowProps: ee,
2907
2839
  children: M,
2908
2840
  expandedElement: N
2909
- }) : h(p, { children: [m(U, {
2910
- ...P,
2841
+ }) : m(f, { children: [p(B, {
2842
+ ...ee,
2911
2843
  children: M
2912
2844
  }), N] });
2913
2845
  }
2914
- function zr({ 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 }) {
2915
2847
  return {
2916
- className: X("mantine-datatable-row", { [rr]: r || i || o?.isExpandable({
2848
+ className: X("mantine-datatable-row", { [Zn]: r || i || o?.isExpandable({
2917
2849
  record: e,
2918
2850
  index: t
2919
- }) && o?.expandOnClick }, { [ir]: a }, typeof u == "function" ? u(e, t) : u),
2851
+ }) && o?.expandOnClick }, { [Qn]: a }, typeof u == "function" ? u(e, t) : u),
2920
2852
  "data-selected": n || void 0,
2921
2853
  onClick: (n) => {
2922
2854
  if (o) {
@@ -2944,7 +2876,7 @@ function zr({ record: e, index: t, selectionChecked: n, onClick: r, onDoubleClic
2944
2876
  }) : void 0,
2945
2877
  style: [c || l ? (n) => {
2946
2878
  let r = c?.(e, t), i = l?.(e, t);
2947
- return mn({
2879
+ return cn({
2948
2880
  theme: n,
2949
2881
  color: r,
2950
2882
  backgroundColor: i
@@ -2953,8 +2885,8 @@ function zr({ record: e, index: t, selectionChecked: n, onClick: r, onDoubleClic
2953
2885
  ...s?.(e, t) ?? {}
2954
2886
  };
2955
2887
  }
2956
- function Br({ leftShadowBehind: e, rightShadowBehind: t, onScrollPositionChange: n, children: r, viewportRef: i, scrollAreaProps: a }) {
2957
- return h(z, {
2888
+ function Pr({ leftShadowBehind: e, rightShadowBehind: t, onScrollPositionChange: n, children: r, viewportRef: i, scrollAreaProps: a }) {
2889
+ return m(I, {
2958
2890
  ...a,
2959
2891
  viewportRef: i,
2960
2892
  classNames: {
@@ -2966,157 +2898,157 @@ function Br({ leftShadowBehind: e, rightShadowBehind: t, onScrollPositionChange:
2966
2898
  onScrollPositionChange: n,
2967
2899
  children: [
2968
2900
  r,
2969
- m(y, { className: X("mantine-datatable-scroll-area-shadow", "mantine-datatable-scroll-area-top-shadow") }),
2970
- m("div", { className: X("mantine-datatable-scroll-area-shadow", "mantine-datatable-scroll-area-left-shadow", { "mantine-datatable-scroll-area-shadow-behind": e }) }),
2971
- m("div", { className: X("mantine-datatable-scroll-area-shadow", "mantine-datatable-scroll-area-right-shadow", { "mantine-datatable-scroll-area-shadow-behind": t }) }),
2972
- m(y, { className: X("mantine-datatable-scroll-area-shadow", "mantine-datatable-scroll-area-bottom-shadow") })
2901
+ p(v, { className: X("mantine-datatable-scroll-area-shadow", "mantine-datatable-scroll-area-top-shadow") }),
2902
+ p("div", { className: X("mantine-datatable-scroll-area-shadow", "mantine-datatable-scroll-area-left-shadow", { "mantine-datatable-scroll-area-shadow-behind": e }) }),
2903
+ p("div", { className: X("mantine-datatable-scroll-area-shadow", "mantine-datatable-scroll-area-right-shadow", { "mantine-datatable-scroll-area-shadow-behind": t }) }),
2904
+ p(v, { className: X("mantine-datatable-scroll-area-shadow", "mantine-datatable-scroll-area-bottom-shadow") })
2973
2905
  ]
2974
2906
  });
2975
2907
  }
2976
- function Vr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, height: r = "100%", minHeight: i, maxHeight: a, shadow: s, verticalAlign: f = "center", fetching: p, columns: g, storeColumnsKey: _, groups: v, 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: I, onSortStatusChange: L, horizontalSpacing: R, page: z, onPageChange: ee, totalRecords: B, recordsPerPage: te, onRecordsPerPageChange: ne, recordsPerPageOptions: re, recordsPerPageLabel: ie = "Records per page", paginationWithEdges: ae, paginationWithControls: H, paginationActiveTextColor: U, paginationActiveBackgroundColor: oe, paginationSize: W = "sm", paginationText: se = ({ from: e, to: t, totalRecords: n }) => `${e} - ${t} / ${n}`, paginationWrapBreakpoint: ce = "sm", getPaginationControlProps: le = (e) => e === "previous" ? { "aria-label": "Previous page" } : e === "next" ? { "aria-label": "Next page" } : {}, getPaginationItemProps: ue, renderPagination: de, loaderBackgroundBlur: fe, customLoader: pe, loaderSize: me, loaderType: he, loaderColor: ge, loadingText: _e = "...", emptyState: ve, noRecordsText: ye = "No records", noRecordsIcon: be, highlightOnHover: xe, striped: Se, noHeader: Ce, onRowClick: we, onRowDoubleClick: Te, onRowContextMenu: Ee, onCellClick: De, onCellDoubleClick: Oe, onCellContextMenu: G, onScroll: ke, onScrollToTop: je, onScrollToBottom: Me, onScrollToLeft: Ne, onScrollToRight: Pe, c: Fe, backgroundColor: Ie, borderColor: Le, rowBorderColor: Re, stripedColor: ze, highlightOnHoverColor: Be, rowColor: K, rowBackgroundColor: q, rowExpansion: Ve, rowClassName: He, rowStyle: Ue, customRowAttributes: We, scrollViewportRef: Ge, scrollAreaProps: Ke, tableRef: qe, bodyRef: Je, m: Ye, my: Xe, mx: Ze, mt: Qe, mb: $e, ml: et, mr: tt, className: nt, classNames: rt, style: it, styles: at, rowFactory: ot, tableWrapper: st, ...ct }) {
2977
- let lt = u(() => v ? On(v) : g, [g, v]), { refs: J, onScroll: ut } = Gn({
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: ee = (e, t) => ({ "aria-label": `Select record ${t + 1}` }), sortStatus: P, sortIcons: F, onSortStatusChange: te, horizontalSpacing: I, page: L, onPageChange: ne, totalRecords: R, recordsPerPage: re, onRecordsPerPageChange: z, recordsPerPageOptions: ae, recordsPerPageLabel: oe = "Records per page", paginationWithEdges: se, paginationWithControls: B, 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: H, loaderBackgroundBlur: me, customLoader: he, loaderSize: ge, loaderType: _e, loaderColor: ve, loadingText: ye = "...", emptyState: be, noRecordsText: xe = "No records", noRecordsIcon: Se, highlightOnHover: Ce, striped: we, noHeader: Te, onRowClick: Ee, onRowDoubleClick: De, onRowContextMenu: Oe, onCellClick: ke, onCellDoubleClick: Ae, onCellContextMenu: je, onScroll: Ne, onScrollToTop: U, onScrollToBottom: Pe, onScrollToLeft: Fe, onScrollToRight: Ie, c: Le, backgroundColor: Re, borderColor: ze, rowBorderColor: Be, stripedColor: Ve, highlightOnHoverColor: He, rowColor: W, rowBackgroundColor: G, rowExpansion: Ue, rowClassName: We, rowStyle: Ge, 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({
2978
2910
  scrollCallbacks: {
2979
- onScroll: ke,
2980
- onScrollToTop: je,
2981
- onScrollToBottom: Me,
2982
- onScrollToLeft: Ne,
2983
- onScrollToRight: Pe
2911
+ onScroll: Ne,
2912
+ onScrollToTop: U,
2913
+ onScrollToBottom: Pe,
2914
+ onScrollToLeft: Fe,
2915
+ onScrollToRight: Ie
2984
2916
  },
2985
- withRowBorders: ct.withRowBorders
2986
- }), Y = In({
2917
+ withRowBorders: ut.withRowBorders
2918
+ }), q = An({
2987
2919
  key: _,
2988
- columns: lt,
2989
- headerRef: J.header,
2990
- scrollViewportRef: J.scrollViewport
2991
- }), dt = Y.effectiveColumns, ft = Ae(J.table, qe), pt = Ae(J.scrollViewport, Ge), mt = d(null), ht = Ae(mt, Je), gt = $n({
2992
- rowExpansion: Ve,
2920
+ columns: dt,
2921
+ headerRef: K.header,
2922
+ scrollViewportRef: K.scrollViewport
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: Ue,
2993
2925
  records: T,
2994
2926
  idAccessor: w
2995
- }), { pinnedMap: _t, hasLeftPinned: vt, hasRightPinned: yt } = Kn({
2996
- columns: dt,
2997
- theadRef: J.header,
2998
- tbodyRef: mt,
2999
- selectionColumnHeaderRef: J.selectionColumnHeader,
2927
+ }), { pinnedMap: yt, hasLeftPinned: bt, hasRightPinned: xt } = Bn({
2928
+ columns: pt,
2929
+ theadRef: K.header,
2930
+ tbodyRef: gt,
2931
+ selectionColumnHeaderRef: K.selectionColumnHeader,
3000
2932
  selectionVisible: !!D,
3001
2933
  pinFirstColumn: b,
3002
2934
  pinLastColumn: x
3003
- }), bt = d(!1), xt = d(z), St = d(T), Ct = o((e) => {
3004
- bt.current = !0, St.current = T, ee(e);
3005
- }, [ee, T]);
2935
+ }), St = u(!1), Ct = u(L), wt = u(T), Tt = a((e) => {
2936
+ St.current = !0, wt.current = T, ne(e);
2937
+ }, [ne, T]);
2938
+ s(() => {
2939
+ Ct.current !== L && (St.current = !0, wt.current = T, Ct.current = L);
2940
+ }, [L, T]);
2941
+ let Et = T?.length;
3006
2942
  c(() => {
3007
- xt.current !== z && (bt.current = !0, St.current = T, xt.current = z);
3008
- }, [z, T]);
3009
- let wt = T?.length;
3010
- l(() => {
3011
- if (!bt.current || p || T === St.current) return;
3012
- let e = J.scrollViewport.current;
2943
+ if (!St.current || h || T === wt.current) return;
2944
+ let e = K.scrollViewport.current;
3013
2945
  if (!e) return;
3014
2946
  let t = requestAnimationFrame(() => {
3015
2947
  e.scrollTo({
3016
2948
  top: 0,
3017
2949
  left: 0
3018
- }), bt.current = !1;
2950
+ }), St.current = !1;
3019
2951
  });
3020
2952
  return () => cancelAnimationFrame(t);
3021
2953
  }, [
3022
- p,
2954
+ h,
3023
2955
  T,
3024
- J.scrollViewport
2956
+ K.scrollViewport
3025
2957
  ]);
3026
- let Tt = T?.map((e) => Q(e, w)), Et = !!D, Dt = D?.map((e) => Q(e, w)), Ot = Tt !== void 0 && Dt !== void 0 && Dt.length > 0, kt = j ? T?.filter(j) : T, At = kt?.map((e) => Q(e, w)), jt = Ot && At.every((e) => Dt.includes(e)), Mt = Ot && At.some((e) => Dt.includes(e)), Nt = o(() => {
3027
- D && O && O(jt ? D.filter((e) => !At.includes(Q(e, w))) : Tn([...D, ...kt], (e) => Q(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)));
3028
2960
  }, [
3029
- jt,
2961
+ J,
3030
2962
  w,
3031
2963
  O,
3032
- At,
3033
- kt,
2964
+ Mt,
2965
+ jt,
3034
2966
  D
3035
- ]), { lastSelectionChangeIndex: Pt, setLastSelectionChangeIndex: Ft } = qn(Tt), It = Et && !vt, Lt = {
3036
- m: Ye,
3037
- my: Xe,
3038
- mx: Ze,
3039
- mt: Qe,
3040
- mb: $e,
3041
- ml: et,
3042
- mr: tt
3043
- }, Rt = o(({ children: e }) => st ? st({ children: e }) : e, [st]);
3044
- return m(_n, {
3045
- ...Y,
3046
- pinnedMap: _t,
3047
- children: h(y, {
3048
- ref: J.root,
2967
+ ]), { lastSelectionChangeIndex: Y, setLastSelectionChangeIndex: Ft } = Vn(Dt), It = Ot && !bt, Lt = {
2968
+ m: Ze,
2969
+ my: Qe,
2970
+ mx: $e,
2971
+ mt: et,
2972
+ mb: tt,
2973
+ ml: nt,
2974
+ mr: rt
2975
+ }, Rt = a(({ children: e }) => lt ? lt({ children: e }) : e, [lt]);
2976
+ return p(dn, {
2977
+ ...q,
2978
+ pinnedMap: yt,
2979
+ children: m(v, {
2980
+ ref: K.root,
3049
2981
  ...Lt,
3050
- className: X("mantine-datatable", { "mantine-datatable-with-border": e }, nt, rt?.root),
2982
+ className: X("mantine-datatable", { "mantine-datatable-with-border": e }, it, at?.root),
3051
2983
  style: [
3052
2984
  (e) => ({
3053
- ...fn({
2985
+ ...on({
3054
2986
  theme: e,
3055
- c: Fe,
3056
- backgroundColor: Ie,
3057
- borderColor: Le,
3058
- rowBorderColor: Re,
3059
- stripedColor: ze,
3060
- highlightOnHoverColor: Be
2987
+ c: Le,
2988
+ backgroundColor: Re,
2989
+ borderColor: ze,
2990
+ rowBorderColor: Be,
2991
+ stripedColor: Ve,
2992
+ highlightOnHoverColor: He
3061
2993
  }),
3062
2994
  borderRadius: e.radius[t] || t,
3063
- boxShadow: e.shadows[s] || s,
2995
+ boxShadow: e.shadows[d] || d,
3064
2996
  height: r,
3065
2997
  minHeight: i,
3066
- maxHeight: a
2998
+ maxHeight: o
3067
2999
  }),
3068
- it,
3069
- at?.root,
3000
+ ot,
3001
+ st?.root,
3070
3002
  { position: "relative" }
3071
3003
  ],
3072
3004
  children: [
3073
- m(Br, {
3074
- viewportRef: pt,
3075
- leftShadowBehind: Et || vt,
3076
- rightShadowBehind: yt,
3077
- onScrollPositionChange: ut,
3078
- scrollAreaProps: Ke,
3079
- children: m(Rt, { children: h(V, {
3080
- ref: ft,
3081
- horizontalSpacing: R,
3005
+ p(Pr, {
3006
+ viewportRef: ht,
3007
+ leftShadowBehind: Ot || bt,
3008
+ rightShadowBehind: xt,
3009
+ onScrollPositionChange: ft,
3010
+ scrollAreaProps: Je,
3011
+ children: p(Rt, { children: m(ie, {
3012
+ ref: mt,
3013
+ horizontalSpacing: I,
3082
3014
  className: X("mantine-datatable-table", {
3083
- [ar]: n,
3015
+ [$n]: n,
3084
3016
  "mantine-datatable-vertical-align-top": f === "top",
3085
3017
  "mantine-datatable-vertical-align-bottom": f === "bottom",
3086
- "mantine-datatable-selection-column-visible": Et,
3087
- "mantine-datatable-resizable-columns": Y.hasResizableColumns,
3088
- "mantine-datatable-resize-locked": Y.isLocked,
3089
- "mantine-datatable-resizing": Y.isResizing
3090
- }, rt?.table),
3018
+ "mantine-datatable-selection-column-visible": Ot,
3019
+ "mantine-datatable-resizable-columns": q.hasResizableColumns,
3020
+ "mantine-datatable-resize-locked": q.isLocked,
3021
+ "mantine-datatable-resizing": q.isResizing
3022
+ }, at?.table),
3091
3023
  style: {
3092
- ...at?.table,
3093
- ...Y.isLocked ? { tableLayout: "fixed" } : null,
3094
- ...Y.tableWidth == null ? null : { width: `${Y.tableWidth}px` }
3024
+ ...st?.table,
3025
+ ...q.isLocked ? { tableLayout: "fixed" } : null,
3026
+ ...q.tableWidth == null ? null : { width: `${q.tableWidth}px` }
3095
3027
  },
3096
- "data-striped": wt && Se || void 0,
3097
- "data-highlight-on-hover": xe || void 0,
3098
- ...ct,
3028
+ "data-striped": Et && we || void 0,
3029
+ "data-highlight-on-hover": Ce || void 0,
3030
+ ...ut,
3099
3031
  children: [
3100
- Ce ? null : m(_n, {
3101
- ...Y,
3102
- pinnedMap: _t,
3103
- children: m(kr, {
3104
- ref: J.header,
3105
- selectionColumnHeaderRef: J.selectionColumnHeader,
3106
- className: rt?.header,
3107
- style: at?.header,
3108
- columns: dt,
3032
+ Te ? null : p(dn, {
3033
+ ...q,
3034
+ pinnedMap: yt,
3035
+ children: p(Cr, {
3036
+ ref: K.header,
3037
+ selectionColumnHeaderRef: K.selectionColumnHeader,
3038
+ className: at?.header,
3039
+ style: st?.header,
3040
+ columns: pt,
3109
3041
  defaultColumnProps: S,
3110
- groups: v,
3111
- pinnedMap: _t,
3112
- sortStatus: F,
3113
- sortIcons: I,
3114
- onSortStatusChange: L,
3042
+ groups: y,
3043
+ pinnedMap: yt,
3044
+ sortStatus: P,
3045
+ sortIcons: F,
3046
+ onSortStatusChange: te,
3115
3047
  selectionTrigger: E,
3116
- selectionVisible: Et,
3117
- selectionChecked: jt,
3118
- selectionIndeterminate: Mt && !jt,
3119
- onSelectionChange: Nt,
3048
+ selectionVisible: Ot,
3049
+ selectionChecked: J,
3050
+ selectionIndeterminate: Nt && !J,
3051
+ onSelectionChange: Pt,
3120
3052
  selectionCheckboxProps: {
3121
3053
  ...M,
3122
3054
  ...N
@@ -3124,105 +3056,105 @@ function Vr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3124
3056
  selectorCellShadowVisible: It,
3125
3057
  selectionColumnClassName: k,
3126
3058
  selectionColumnStyle: A,
3127
- withColumnBorders: ct.withColumnBorders
3059
+ withColumnBorders: ut.withColumnBorders
3128
3060
  })
3129
3061
  }),
3130
- m("tbody", {
3131
- ref: ht,
3132
- children: wt ? T.map((e, t) => {
3133
- let n = Q(e, w), r = Dt?.includes(n) || !1, i;
3062
+ p("tbody", {
3063
+ ref: _t,
3064
+ children: Et ? T.map((e, t) => {
3065
+ let n = Q(e, w), r = kt?.includes(n) || !1, i;
3134
3066
  return O && D && (i = (i) => {
3135
- if (i.nativeEvent.shiftKey && Pt !== null) {
3136
- let e = T.filter(t > Pt ? (e, n) => n >= Pt && n <= t && (j ? j(e, n) : !0) : (e, n) => n >= t && n <= Pt && (j ? j(e, n) : !0));
3137
- O(r ? wn(D, e, (e) => Q(e, w)) : Tn([...D, ...e], (e) => Q(e, w)));
3138
- } else O(r ? D.filter((e) => Q(e, w) !== n) : Tn([...D, e], (e) => Q(e, w)));
3067
+ if (i.nativeEvent.shiftKey && Y !== null) {
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));
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)));
3139
3071
  Ft(t);
3140
- }), m(Rr, {
3072
+ }), p(Mr, {
3141
3073
  record: e,
3142
3074
  index: t,
3143
- columns: dt,
3075
+ columns: pt,
3144
3076
  defaultColumnProps: S,
3145
- pinnedMap: _t,
3077
+ pinnedMap: yt,
3146
3078
  defaultColumnRender: C,
3147
3079
  selectionTrigger: E,
3148
- selectionVisible: Et,
3080
+ selectionVisible: Ot,
3149
3081
  selectionChecked: r,
3150
3082
  onSelectionChange: i,
3151
3083
  isRecordSelectable: j,
3152
3084
  selectionCheckboxProps: M,
3153
- getSelectionCheckboxProps: P,
3154
- onClick: we,
3155
- onDoubleClick: Te,
3156
- onCellClick: De,
3157
- onCellDoubleClick: Oe,
3158
- onContextMenu: Ee,
3159
- onCellContextMenu: G,
3160
- expansion: gt,
3161
- color: K,
3162
- backgroundColor: q,
3163
- className: He,
3164
- style: Ue,
3165
- customAttributes: We,
3085
+ getSelectionCheckboxProps: ee,
3086
+ onClick: Ee,
3087
+ onDoubleClick: De,
3088
+ onCellClick: ke,
3089
+ onCellDoubleClick: Ae,
3090
+ onContextMenu: Oe,
3091
+ onCellContextMenu: je,
3092
+ expansion: vt,
3093
+ color: W,
3094
+ backgroundColor: G,
3095
+ className: We,
3096
+ style: Ge,
3097
+ customAttributes: Ke,
3166
3098
  selectorCellShadowVisible: It,
3167
3099
  selectionColumnClassName: k,
3168
3100
  selectionColumnStyle: A,
3169
3101
  idAccessor: w,
3170
- rowFactory: ot
3102
+ rowFactory: ct
3171
3103
  }, n);
3172
- }) : m(vn, {})
3104
+ }) : p(fn, {})
3173
3105
  }),
3174
- dt.some(({ footer: e }) => e) && m(dr, {
3175
- ref: J.footer,
3176
- className: rt?.footer,
3177
- style: at?.footer,
3178
- columns: dt,
3106
+ pt.some(({ footer: e }) => e) && p(ar, {
3107
+ ref: K.footer,
3108
+ className: at?.footer,
3109
+ style: st?.footer,
3110
+ columns: pt,
3179
3111
  defaultColumnProps: S,
3180
- pinnedMap: _t,
3181
- selectionVisible: Et,
3112
+ pinnedMap: yt,
3113
+ selectionVisible: Ot,
3182
3114
  selectorCellShadowVisible: It
3183
3115
  })
3184
3116
  ]
3185
3117
  }) })
3186
3118
  }),
3187
- !!(z && wt) && m(Pr, {
3188
- className: rt?.pagination,
3189
- style: at?.pagination,
3190
- horizontalSpacing: R,
3191
- fetching: p,
3192
- page: z,
3193
- onPageChange: Ct,
3194
- totalRecords: B,
3195
- recordsPerPage: te,
3196
- onRecordsPerPageChange: ne,
3197
- recordsPerPageOptions: re,
3198
- recordsPerPageLabel: ie,
3199
- paginationWithEdges: ae,
3200
- paginationWithControls: H,
3201
- paginationActiveTextColor: U,
3202
- paginationActiveBackgroundColor: oe,
3203
- paginationSize: W,
3204
- paginationText: se,
3205
- paginationWrapBreakpoint: ce,
3206
- getPaginationControlProps: le,
3207
- getPaginationItemProps: ue,
3208
- noRecordsText: ye,
3209
- loadingText: _e,
3210
- recordsLength: wt,
3211
- renderPagination: de
3119
+ !!(L && Et) && p(Or, {
3120
+ className: at?.pagination,
3121
+ style: st?.pagination,
3122
+ horizontalSpacing: I,
3123
+ fetching: h,
3124
+ page: L,
3125
+ onPageChange: Tt,
3126
+ totalRecords: R,
3127
+ recordsPerPage: re,
3128
+ onRecordsPerPageChange: z,
3129
+ recordsPerPageOptions: ae,
3130
+ recordsPerPageLabel: oe,
3131
+ paginationWithEdges: se,
3132
+ paginationWithControls: B,
3133
+ paginationActiveTextColor: ce,
3134
+ paginationActiveBackgroundColor: V,
3135
+ paginationSize: le,
3136
+ paginationText: ue,
3137
+ paginationWrapBreakpoint: de,
3138
+ getPaginationControlProps: fe,
3139
+ getPaginationItemProps: pe,
3140
+ noRecordsText: xe,
3141
+ loadingText: ye,
3142
+ recordsLength: Et,
3143
+ renderPagination: H
3212
3144
  }),
3213
- m(Ar, {
3214
- fetching: p,
3215
- backgroundBlur: fe,
3216
- customContent: pe,
3217
- size: me,
3218
- type: he,
3219
- color: ge
3145
+ p(wr, {
3146
+ fetching: h,
3147
+ backgroundBlur: me,
3148
+ customContent: he,
3149
+ size: ge,
3150
+ type: _e,
3151
+ color: ve
3220
3152
  }),
3221
- m(bn, {
3222
- icon: be,
3223
- text: ye,
3224
- active: !p && !wt,
3225
- children: ve
3153
+ p(mn, {
3154
+ icon: Se,
3155
+ text: xe,
3156
+ active: !h && !Et,
3157
+ children: be
3226
3158
  })
3227
3159
  ]
3228
3160
  })
@@ -3230,99 +3162,83 @@ function Vr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3230
3162
  }
3231
3163
  //#endregion
3232
3164
  //#region src/DataTable/UpdateModal.tsx
3233
- function Hr(t) {
3234
- let n = e(18), { fields: r, onClose: i, queryKey: a, connectedQueryKeys: o, apiPath: s, id: c, steps: l } = t, { data: u, isLoading: d } = Ut(s, a, c), { mutateAsync: f, isPending: p, error: g } = qt(s, a, o);
3235
- if (d || !u) {
3236
- let e;
3237
- n[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ m(B, { height: 40 }), n[0] = e) : e = n[0];
3238
- let t;
3239
- n[1] === r.length ? t = n[2] : (t = Array.from({ length: r.length }).map(Ur), n[1] = r.length, n[2] = t);
3240
- let i;
3241
- n[3] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ h(E, {
3242
- mt: "md",
3243
- justify: "end",
3244
- children: [/* @__PURE__ */ m(B, {
3245
- width: 100,
3246
- height: 36
3247
- }), /* @__PURE__ */ m(B, {
3248
- width: 100,
3249
- height: 36
3250
- })]
3251
- }), n[3] = i) : i = n[3];
3252
- let a;
3253
- return n[4] === t ? a = n[5] : (a = /* @__PURE__ */ h(te, {
3254
- gap: "md",
3255
- children: [
3256
- e,
3257
- t,
3258
- i
3259
- ]
3260
- }), n[4] = t, n[5] = a), a;
3261
- }
3262
- let _;
3263
- n[6] !== c || n[7] !== f ? (_ = async (e) => {
3264
- await f({
3265
- ...e,
3266
- id: c
3267
- });
3268
- }, n[6] = c, n[7] = f, n[8] = _) : _ = n[8];
3269
- let v = _, y;
3270
- return n[9] !== u || n[10] !== g || n[11] !== r || n[12] !== c || n[13] !== p || n[14] !== i || n[15] !== v || n[16] !== l ? (y = /* @__PURE__ */ m(rn, {
3271
- fields: r,
3272
- steps: l,
3273
- record: u,
3274
- recordId: c,
3275
- submitting: p,
3276
- error: g,
3277
- onPersist: v,
3278
- onClose: i
3279
- }), n[9] = u, n[10] = g, n[11] = r, n[12] = c, n[13] = p, n[14] = i, n[15] = v, n[16] = l, n[17] = y) : y = n[17], y;
3280
- }
3281
- function Ur(e, t) {
3282
- return /* @__PURE__ */ m(B, { height: 35 }, t);
3165
+ function Ir({ fields: e, onClose: t, queryKey: n, connectedQueryKeys: r, apiPath: i, id: a, steps: o }) {
3166
+ let { data: s, isLoading: c } = Ht(i, n, a), { mutateAsync: l, isPending: u, error: d } = Kt(i, n, r);
3167
+ return c || !s ? /* @__PURE__ */ m(R, {
3168
+ gap: "md",
3169
+ children: [
3170
+ /* @__PURE__ */ p(ne, { height: 40 }),
3171
+ Array.from({ length: e.length }).map((e, t) => /* @__PURE__ */ p(ne, { height: 35 }, t)),
3172
+ /* @__PURE__ */ m(T, {
3173
+ mt: "md",
3174
+ justify: "end",
3175
+ children: [/* @__PURE__ */ p(ne, {
3176
+ width: 100,
3177
+ height: 36
3178
+ }), /* @__PURE__ */ p(ne, {
3179
+ width: 100,
3180
+ height: 36
3181
+ })]
3182
+ })
3183
+ ]
3184
+ }) : /* @__PURE__ */ p(nn, {
3185
+ fields: e,
3186
+ steps: o,
3187
+ record: s,
3188
+ recordId: a,
3189
+ submitting: u,
3190
+ error: d,
3191
+ onPersist: async (e) => {
3192
+ await l({
3193
+ ...e,
3194
+ id: a
3195
+ });
3196
+ },
3197
+ onClose: t
3198
+ });
3283
3199
  }
3284
3200
  //#endregion
3285
3201
  //#region src/DataTable/DeleteModal.tsx
3286
- function Wr({ queryKey: e, connectedQueryKeys: t, apiPath: n, onClose: r, selectedRecords: i, confirmMessage: a }) {
3287
- let { mutateAsync: o, isError: s, error: l, isPending: u } = Jt(n, e, t), [d, g] = f(i), [_, y] = f(!1), x = _ || u;
3288
- return c(() => {
3289
- d.length || r();
3290
- }, [r, d]), d.length ? /* @__PURE__ */ h(p, { children: [
3291
- s && l.message && /* @__PURE__ */ m(v, {
3202
+ function Lr({ queryKey: e, connectedQueryKeys: t, apiPath: n, onClose: r, selectedRecords: i, confirmMessage: a }) {
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;
3204
+ return s(() => {
3205
+ h.length || r();
3206
+ }, [r, h]), h.length ? /* @__PURE__ */ m(f, { children: [
3207
+ c && l.message && /* @__PURE__ */ p(_, {
3292
3208
  variant: "outline",
3293
3209
  color: "red",
3294
3210
  title: l.name,
3295
3211
  children: l.message
3296
3212
  }),
3297
- /* @__PURE__ */ m(W, { children: a ? a(d) : d.length === 1 ? `Soll ${d.length} Eintrag wirklich gelöscht werden?` : `Sollen ${d.length} Einträge wirklich gelöscht werden?` }),
3298
- /* @__PURE__ */ h(E, {
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?` }),
3214
+ /* @__PURE__ */ m(T, {
3299
3215
  mt: "md",
3300
3216
  justify: "end",
3301
- children: [/* @__PURE__ */ m(b, {
3217
+ children: [/* @__PURE__ */ p(y, {
3302
3218
  onClick: r,
3303
3219
  variant: "outline",
3304
3220
  disabled: x,
3305
3221
  children: "Abbrechen"
3306
- }), /* @__PURE__ */ m(b, {
3222
+ }), /* @__PURE__ */ p(y, {
3307
3223
  color: "red",
3308
3224
  loading: x,
3309
3225
  onClick: async () => {
3310
- y(!0);
3226
+ b(!0);
3311
3227
  try {
3312
- await Promise.all(d.map((e) => o(e.id))), g([]);
3228
+ await Promise.all(h.map((e) => o(e.id))), g([]);
3313
3229
  } finally {
3314
- y(!1);
3230
+ b(!1);
3315
3231
  }
3316
3232
  },
3317
3233
  children: "Löschen"
3318
3234
  })]
3319
3235
  })
3320
- ] }) : /* @__PURE__ */ m(p, {});
3236
+ ] }) : /* @__PURE__ */ p(f, {});
3321
3237
  }
3322
3238
  //#endregion
3323
3239
  //#region src/Hooks/usePersistentState.ts
3324
- function Gr(e, t) {
3325
- let n = `use_persistent_storage_${t}`, [r, i] = f(() => {
3240
+ function Rr(e, t) {
3241
+ let n = `use_persistent_storage_${t}`, [r, i] = d(() => {
3326
3242
  try {
3327
3243
  let t = localStorage.getItem(n);
3328
3244
  return t ? JSON.parse(t) : e;
@@ -3339,12 +3255,12 @@ function Gr(e, t) {
3339
3255
  }
3340
3256
  //#endregion
3341
3257
  //#region src/utils/sort.ts
3342
- var Kr = [
3258
+ var zr = [
3343
3259
  /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/,
3344
3260
  /^\d{4}-\d{2}-\d{2}$/,
3345
3261
  /^\d{1,2}\/\d{1,2}\/\d{4}$/,
3346
3262
  /^\d{1,2}\.\d{1,2}\.\d{4}$/
3347
- ], qr = (e, t) => {
3263
+ ], Br = (e, t) => {
3348
3264
  let n = e.map((e) => e[t]).filter((e) => e != null && e !== "");
3349
3265
  if (n.length === 0) return "string";
3350
3266
  let r = n.slice(0, 100), i = {
@@ -3360,7 +3276,7 @@ var Kr = [
3360
3276
  i.number++;
3361
3277
  return;
3362
3278
  }
3363
- if (Kr.some((e) => e.test(t))) {
3279
+ if (zr.some((e) => e.test(t))) {
3364
3280
  let e = new Date(t);
3365
3281
  if (!isNaN(e.getTime())) {
3366
3282
  i.date++;
@@ -3373,7 +3289,7 @@ var Kr = [
3373
3289
  let a = i.string + i.number + i.date;
3374
3290
  return i.date / a >= .6 ? "date" : i.number / a >= .6 ? "number" : i.string / a >= .6 ? "string" : "mixed";
3375
3291
  };
3376
- function Jr(e, t) {
3292
+ function Vr(e, t) {
3377
3293
  switch (t) {
3378
3294
  case "date":
3379
3295
  if (typeof e == "string") {
@@ -3389,425 +3305,376 @@ function Jr(e, t) {
3389
3305
  default: return String(e).toLowerCase().trim();
3390
3306
  }
3391
3307
  }
3392
- var Yr = (e, t, n = "asc") => {
3308
+ var Hr = (e, t, n = "asc") => {
3393
3309
  if (!e || e.length === 0) return [];
3394
- let r = qr(e, t);
3310
+ let r = Br(e, t);
3395
3311
  return [...e].sort((e, i) => {
3396
3312
  let a = e[t], o = i[t], s = a == null || a === "", c = o == null || o === "";
3397
3313
  if (s && c) return 0;
3398
3314
  if (s) return n === "asc" ? -1 : 1;
3399
3315
  if (c) return n === "asc" ? 1 : -1;
3400
- let l = Jr(a, r), u = Jr(o, r);
3316
+ let l = Vr(a, r), u = Vr(o, r);
3401
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;
3402
3318
  });
3403
3319
  };
3404
3320
  //#endregion
3405
3321
  //#region src/utils/filter.ts
3406
- function Xr(e) {
3322
+ function Ur(e) {
3407
3323
  return !!e && typeof e == "object" && "id" in e;
3408
3324
  }
3409
- function Zr(e, t) {
3325
+ function Wr(e, t) {
3410
3326
  if (typeof e == "string" || typeof e == "number") return t.includes(String(e));
3411
3327
  if (e && typeof e == "object") {
3412
3328
  let n = e;
3413
- return Xr(n) && t.includes(n.id) ? !0 : Object.values(n).some((e) => typeof e == "string" && t.includes(e) || Xr(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));
3414
3330
  }
3415
3331
  return !1;
3416
3332
  }
3417
- function Qr(e, t) {
3418
- return Array.isArray(t) ? Array.isArray(e) ? e.some((e) => Zr(e, t)) : Xr(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);
3419
3335
  }
3420
- function $r(e, [t, n]) {
3336
+ function Kr(e, [t, n]) {
3421
3337
  if (!t && !n || typeof e != "string") return !0;
3422
3338
  let r = e.split(" ")[0];
3423
3339
  return t && n ? r >= t && r <= n : t ? r >= t : r <= n;
3424
3340
  }
3425
- function ei(e, t) {
3341
+ function qr(e, t) {
3426
3342
  if (t.value === void 0) return !0;
3427
3343
  let n = e[t.id];
3428
3344
  switch (t.type) {
3429
- case "query": return Qr(n, t.value);
3430
- case "date": return $r(n, t.value);
3345
+ case "query": return Gr(n, t.value);
3346
+ case "date": return Kr(n, t.value);
3431
3347
  case "boolean": return n === t.value;
3432
3348
  }
3433
3349
  }
3434
- function ti(e, t) {
3435
- return !t || t.length === 0 ? e : e.filter((e) => t.every((t) => ei(e, t)));
3350
+ function Jr(e, t) {
3351
+ return !t || t.length === 0 ? e : e.filter((e) => t.every((t) => qr(e, t)));
3436
3352
  }
3437
3353
  //#endregion
3438
3354
  //#region src/DataTable/FieldCard.tsx
3439
- function ni(t) {
3440
- let n = e(4), { rows: r } = t, i;
3441
- n[0] === r ? i = n[1] : (i = r.map(ri), n[0] = r, n[1] = i);
3442
- let a;
3443
- return n[2] === i ? a = n[3] : (a = /* @__PURE__ */ m(p, { children: i }), n[2] = i, n[3] = a), a;
3444
- }
3445
- function ri(e, t) {
3446
- return /* @__PURE__ */ h(y, { children: [t > 0 && /* @__PURE__ */ m(w, {}), /* @__PURE__ */ h(E, {
3355
+ function Yr({ rows: e }) {
3356
+ return /* @__PURE__ */ p(f, { children: e.map((e, t) => /* @__PURE__ */ m(v, { children: [t > 0 && /* @__PURE__ */ p(C, {}), /* @__PURE__ */ m(T, {
3447
3357
  wrap: "nowrap",
3448
3358
  justify: "space-between",
3449
3359
  align: "flex-start",
3450
3360
  gap: "md",
3451
3361
  py: "xs",
3452
3362
  px: "sm",
3453
- children: [/* @__PURE__ */ m(W, {
3363
+ children: [/* @__PURE__ */ p(V, {
3454
3364
  fw: 700,
3455
3365
  fz: "sm",
3456
3366
  style: { flexShrink: 0 },
3457
3367
  children: e.label
3458
- }), /* @__PURE__ */ m(y, {
3368
+ }), /* @__PURE__ */ p(v, {
3459
3369
  ta: "right",
3460
3370
  fz: "sm",
3461
3371
  style: { minWidth: 0 },
3462
3372
  children: e.value
3463
3373
  })]
3464
- })] }, typeof e.label == "string" ? e.label : t);
3465
- }
3466
- function ii(t) {
3467
- let n = e(3), { rows: r } = t, i;
3468
- n[0] === Symbol.for("react.memo_cache_sentinel") ? (i = {
3469
- borderRadius: "var(--mantine-radius-md)",
3470
- overflow: "hidden"
3471
- }, n[0] = i) : i = n[0];
3472
- let a;
3473
- return n[1] === r ? a = n[2] : (a = /* @__PURE__ */ m(y, {
3374
+ })] }, typeof e.label == "string" ? e.label : t)) });
3375
+ }
3376
+ function Xr({ rows: e }) {
3377
+ return /* @__PURE__ */ p(v, {
3474
3378
  bg: "var(--mantine-color-gray-light)",
3475
- style: i,
3476
- children: /* @__PURE__ */ m(ni, { rows: r })
3477
- }), n[1] = r, n[2] = a), a;
3379
+ style: {
3380
+ borderRadius: "var(--mantine-radius-md)",
3381
+ overflow: "hidden"
3382
+ },
3383
+ children: /* @__PURE__ */ p(Yr, { rows: e })
3384
+ });
3478
3385
  }
3479
3386
  //#endregion
3480
3387
  //#region src/DataTable/MobileCardList.tsx
3481
- function ai(e, t) {
3388
+ function Zr(e, t) {
3482
3389
  return t.split(".").reduce((e, t) => {
3483
3390
  if (e && typeof e == "object" && t in e) return e[t];
3484
3391
  }, e);
3485
3392
  }
3486
- function oi(e, t) {
3393
+ function Qr(e, t) {
3487
3394
  let n = t.column;
3488
3395
  if (n.render) return n.render(e, 0);
3489
- let r = ai(e, n.accessor ?? t.id);
3490
- return r == null ? /* @__PURE__ */ m(W, {
3396
+ let r = Zr(e, n.accessor ?? t.id);
3397
+ return r == null ? /* @__PURE__ */ p(V, {
3491
3398
  c: "dimmed",
3492
3399
  children: "–"
3493
- }) : typeof r == "boolean" ? /* @__PURE__ */ m(W, {
3400
+ }) : typeof r == "boolean" ? /* @__PURE__ */ p(V, {
3494
3401
  fz: "sm",
3495
3402
  children: r ? "Ja" : "Nein"
3496
- }) : /* @__PURE__ */ m(W, {
3403
+ }) : /* @__PURE__ */ p(V, {
3497
3404
  fz: "sm",
3498
3405
  children: String(r)
3499
3406
  });
3500
3407
  }
3501
- function si(t) {
3502
- let r = e(18), { records: i, fields: a, onRowClick: o, actions: s, canUpdate: c, canDelete: l, pagination: u, sort: d, rowExpansion: v } = t, b;
3503
- r[0] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ new Set(), r[0] = b) : b = r[0];
3504
- let [x, S] = f(b), T = v?.expanded, O;
3505
- r[1] !== T || r[2] !== x ? (O = (e) => T ? T.recordIds.includes(e) : x.has(e), r[1] = T, r[2] = x, r[3] = O) : O = r[3];
3506
- let A = O, j;
3507
- r[4] === T ? j = r[5] : (j = (e) => {
3508
- if (T) {
3509
- let { recordIds: t, onRecordIdsChange: n } = T;
3408
+ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, canDelete: o, pagination: s, sort: c, rowExpansion: l }) {
3409
+ let [u, _] = d(/* @__PURE__ */ new Set()), y = l?.expanded, b = (e) => y ? y.recordIds.includes(e) : u.has(e), x = (e) => {
3410
+ if (y) {
3411
+ let { recordIds: t, onRecordIdsChange: n } = y;
3510
3412
  n(t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
3511
- } else S((t) => {
3413
+ } else _((t) => {
3512
3414
  let n = new Set(t);
3513
3415
  return n.has(e) ? n.delete(e) : n.add(e), n;
3514
3416
  });
3515
- }, r[4] = T, r[5] = j);
3516
- let M = j, N = a.filter(_i), P = a.filter(gi), L = P.filter(hi).map(mi), R = L.length > 0, z = R ? L : P.slice(0, 1).map(pi), [B, ne] = f(!1), V = N.filter(fi).reduce(di, []), re;
3517
- r[6] === o ? re = r[7] : (re = (e, t, n) => {
3518
- o?.({
3417
+ }, w = n.filter((e) => e.list && e.column && !e.column.hidden), D = n.filter((e) => e.column && e.column.filter != null), k = D.filter((e) => e.column.filtering).map((e) => e.id), A = k.length > 0, j = A ? k : D.slice(0, 1).map((e) => e.id), [M, N] = d(!1), F = w.filter((e) => e.column.sortable !== !1).reduce((e, t) => {
3418
+ let n = t.column.accessor ?? t.id;
3419
+ return e.some((e) => e.value === n) || e.push({
3420
+ value: n,
3421
+ label: t.column.title ?? t.id
3422
+ }), e;
3423
+ }, []), te = (e, t, n) => {
3424
+ r?.({
3519
3425
  record: e,
3520
3426
  index: t,
3521
3427
  event: n
3522
3428
  });
3523
- }, r[6] = o, r[7] = re);
3524
- let ie = re, ae = te, H = (d && V.length > 0 || P.length > 0) && /* @__PURE__ */ h(E, {
3525
- gap: "xs",
3526
- wrap: "nowrap",
3527
- justify: "flex-end",
3528
- children: [d && V.length > 0 && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(ee, {
3529
- data: V,
3530
- value: d.field,
3531
- onChange: (e) => e && d.onSortChange(e, d.direction),
3532
- allowDeselect: !1,
3533
- style: { flex: 1 }
3534
- }), /* @__PURE__ */ m(_, {
3535
- variant: "filled",
3536
- size: "input-sm",
3537
- onClick: () => d.onSortChange(d.field, d.direction === "asc" ? "desc" : "asc"),
3538
- children: d.direction === "asc" ? /* @__PURE__ */ m(we, { size: 18 }) : /* @__PURE__ */ m(Te, { size: 18 })
3539
- })] }), P.length > 0 && /* @__PURE__ */ h(I, {
3540
- opened: B,
3541
- onChange: ne,
3542
- position: "bottom-end",
3543
- withArrow: !0,
3544
- shadow: "md",
3545
- trapFocus: !0,
3546
- children: [/* @__PURE__ */ m(I.Target, { children: /* @__PURE__ */ m(D, {
3547
- inline: !0,
3548
- disabled: !R,
3549
- color: "green",
3550
- withBorder: !0,
3551
- children: /* @__PURE__ */ m(_, {
3552
- variant: R ? "filled" : "default",
3429
+ };
3430
+ return /* @__PURE__ */ m(R, {
3431
+ gap: "sm",
3432
+ my: "md",
3433
+ children: [
3434
+ (c && F.length > 0 || D.length > 0) && /* @__PURE__ */ m(T, {
3435
+ gap: "xs",
3436
+ wrap: "nowrap",
3437
+ justify: "flex-end",
3438
+ children: [c && F.length > 0 && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(L, {
3439
+ data: F,
3440
+ value: c.field,
3441
+ onChange: (e) => e && c.onSortChange(e, c.direction),
3442
+ allowDeselect: !1,
3443
+ style: { flex: 1 }
3444
+ }), /* @__PURE__ */ p(g, {
3445
+ variant: "filled",
3553
3446
  size: "input-sm",
3554
- onClick: () => ne(ui),
3555
- "aria-label": "Filter",
3556
- children: /* @__PURE__ */ m(be, { size: 18 })
3557
- })
3558
- }) }), /* @__PURE__ */ m(I.Dropdown, {
3559
- p: 0,
3560
- children: /* @__PURE__ */ m(g, {
3561
- multiple: !0,
3562
- defaultValue: z,
3447
+ onClick: () => c.onSortChange(c.field, c.direction === "asc" ? "desc" : "asc"),
3448
+ children: c.direction === "asc" ? /* @__PURE__ */ p(Te, { size: 18 }) : /* @__PURE__ */ p(Ee, { size: 18 })
3449
+ })] }), D.length > 0 && /* @__PURE__ */ m(P, {
3450
+ opened: M,
3451
+ onChange: N,
3452
+ position: "bottom-end",
3453
+ withArrow: !0,
3454
+ shadow: "md",
3455
+ trapFocus: !0,
3456
+ children: [/* @__PURE__ */ p(P.Target, { children: /* @__PURE__ */ p(E, {
3457
+ inline: !0,
3458
+ disabled: !A,
3459
+ color: "green",
3460
+ withBorder: !0,
3461
+ children: /* @__PURE__ */ p(g, {
3462
+ variant: A ? "filled" : "default",
3463
+ size: "input-sm",
3464
+ onClick: () => N((e) => !e),
3465
+ "aria-label": "Filter",
3466
+ children: /* @__PURE__ */ p(xe, { size: 18 })
3467
+ })
3468
+ }) }), /* @__PURE__ */ p(P.Dropdown, {
3469
+ p: 0,
3470
+ children: /* @__PURE__ */ p(h, {
3471
+ multiple: !0,
3472
+ defaultValue: j,
3473
+ style: {
3474
+ minWidth: 260,
3475
+ maxWidth: 320
3476
+ },
3477
+ children: D.map((e) => /* @__PURE__ */ m(h.Item, {
3478
+ value: e.id,
3479
+ children: [/* @__PURE__ */ p(h.Control, { children: /* @__PURE__ */ m(T, {
3480
+ gap: "xs",
3481
+ children: [/* @__PURE__ */ p(V, {
3482
+ fw: 600,
3483
+ fz: "sm",
3484
+ children: e.column.title ?? e.id
3485
+ }), e.column.filtering && /* @__PURE__ */ p(v, {
3486
+ w: 8,
3487
+ h: 8,
3488
+ bg: "green",
3489
+ style: { borderRadius: "50%" }
3490
+ })]
3491
+ }) }), /* @__PURE__ */ p(h.Panel, { children: typeof e.column.filter == "function" ? e.column.filter({ close: () => N(!1) }) : e.column.filter })]
3492
+ }, e.id))
3493
+ })
3494
+ })]
3495
+ })]
3496
+ }),
3497
+ e.length === 0 && /* @__PURE__ */ p(V, {
3498
+ c: "dimmed",
3499
+ ta: "center",
3500
+ py: "xl",
3501
+ children: "Keine Einträge gefunden"
3502
+ }),
3503
+ e.map((e, n) => {
3504
+ let s = e.id ?? n, c = !!l && (!l.expandable || l.expandable(e)), u = c && b(s);
3505
+ return /* @__PURE__ */ p(t.Fragment, { children: /* @__PURE__ */ m(v, {
3506
+ bg: "var(--mantine-color-body)",
3507
+ bd: "1px solid var(--mantine-color-default-border)",
3563
3508
  style: {
3564
- minWidth: 260,
3565
- maxWidth: 320
3509
+ borderRadius: "var(--mantine-radius-md)",
3510
+ overflow: "hidden"
3566
3511
  },
3567
- children: P.map((e) => /* @__PURE__ */ h(g.Item, {
3568
- value: e.id,
3569
- children: [/* @__PURE__ */ m(g.Control, { children: /* @__PURE__ */ h(E, {
3570
- gap: "xs",
3571
- children: [/* @__PURE__ */ m(W, {
3572
- fw: 600,
3573
- fz: "sm",
3574
- children: e.column.title ?? e.id
3575
- }), e.column.filtering && /* @__PURE__ */ m(y, {
3576
- w: 8,
3577
- h: 8,
3578
- bg: "green",
3579
- style: { borderRadius: "50%" }
3580
- })]
3581
- }) }), /* @__PURE__ */ m(g.Panel, { children: typeof e.column.filter == "function" ? e.column.filter({ close: () => ne(!1) }) : e.column.filter })]
3582
- }, e.id))
3583
- })
3584
- })]
3585
- })]
3586
- }), U;
3587
- r[8] === i.length ? U = r[9] : (U = i.length === 0 && /* @__PURE__ */ m(W, {
3588
- c: "dimmed",
3589
- ta: "center",
3590
- py: "xl",
3591
- children: "Keine Einträge gefunden"
3592
- }), r[8] = i.length, r[9] = U);
3593
- let oe = i.map((e, t) => {
3594
- let r = e.id ?? t, i = !!v && (!v.expandable || v.expandable(e)), a = i && A(r);
3595
- return /* @__PURE__ */ m(n.Fragment, { children: /* @__PURE__ */ h(y, {
3596
- bg: "var(--mantine-color-body)",
3597
- bd: "1px solid var(--mantine-color-default-border)",
3598
- style: {
3599
- borderRadius: "var(--mantine-radius-md)",
3600
- overflow: "hidden"
3601
- },
3602
- children: [/* @__PURE__ */ h(y, {
3603
- w: "100%",
3604
- style: { cursor: o || i ? "pointer" : "default" },
3605
- onClick: (n) => {
3606
- i && !o ? M(r) : ie(e, t, n);
3607
- },
3608
- children: [s && s.length > 0 && /* @__PURE__ */ m(E, {
3609
- px: "sm",
3610
- pt: "sm",
3611
- justify: "flex-end",
3612
- children: (() => {
3613
- let t = s.filter((t) => !(t.label === "Bearbeiten" && c && !c(e) || t.label === "Löschen" && l && !l(e)));
3614
- return t.length === 0 ? null : /* @__PURE__ */ h(k, {
3615
- shadow: "md",
3616
- position: "bottom-end",
3617
- children: [/* @__PURE__ */ m(k.Target, { children: /* @__PURE__ */ m(_, {
3618
- variant: "subtle",
3619
- color: "gray",
3620
- size: "sm",
3621
- onClick: li,
3622
- children: /* @__PURE__ */ m(ye, { size: 16 })
3623
- }) }), /* @__PURE__ */ m(k.Dropdown, { children: t.map((t, n) => /* @__PURE__ */ m(k.Item, {
3624
- leftSection: t.icon,
3625
- onClick: (n) => {
3626
- n.stopPropagation(), t.onClick([e]);
3627
- },
3628
- children: t.label
3629
- }, `card_action_${n}`)) })]
3630
- });
3631
- })()
3632
- }), /* @__PURE__ */ m(ni, { rows: N.map((t) => ({
3633
- label: t.column.title ?? t.id,
3634
- value: oi(e, t)
3635
- })) })]
3636
- }), i && /* @__PURE__ */ h(C, {
3637
- expanded: a,
3638
- children: [/* @__PURE__ */ m(w, {}), /* @__PURE__ */ m(y, {
3639
- px: "sm",
3640
- py: "sm",
3641
- children: v.content(e, !0)
3512
+ children: [/* @__PURE__ */ m(v, {
3513
+ w: "100%",
3514
+ style: { cursor: r || c ? "pointer" : "default" },
3515
+ onClick: (t) => {
3516
+ c && !r ? x(s) : te(e, n, t);
3517
+ },
3518
+ children: [i && i.length > 0 && /* @__PURE__ */ p(T, {
3519
+ px: "sm",
3520
+ pt: "sm",
3521
+ justify: "flex-end",
3522
+ children: (() => {
3523
+ let t = i.filter((t) => !(t.label === "Bearbeiten" && a && !a(e) || t.label === "Löschen" && o && !o(e)));
3524
+ return t.length === 0 ? null : /* @__PURE__ */ m(O, {
3525
+ shadow: "md",
3526
+ position: "bottom-end",
3527
+ children: [/* @__PURE__ */ p(O.Target, { children: /* @__PURE__ */ p(g, {
3528
+ variant: "subtle",
3529
+ color: "gray",
3530
+ size: "sm",
3531
+ onClick: (e) => e.stopPropagation(),
3532
+ children: /* @__PURE__ */ p(be, { size: 16 })
3533
+ }) }), /* @__PURE__ */ p(O.Dropdown, { children: t.map((t, n) => /* @__PURE__ */ p(O.Item, {
3534
+ leftSection: t.icon,
3535
+ onClick: (n) => {
3536
+ n.stopPropagation(), t.onClick([e]);
3537
+ },
3538
+ children: t.label
3539
+ }, `card_action_${n}`)) })]
3540
+ });
3541
+ })()
3542
+ }), /* @__PURE__ */ p(Yr, { rows: w.map((t) => ({
3543
+ label: t.column.title ?? t.id,
3544
+ value: Qr(e, t)
3545
+ })) })]
3546
+ }), c && /* @__PURE__ */ m(S, {
3547
+ expanded: u,
3548
+ children: [/* @__PURE__ */ p(C, {}), /* @__PURE__ */ p(v, {
3549
+ px: "sm",
3550
+ py: "sm",
3551
+ children: l.content(e, !0)
3552
+ })]
3553
+ })]
3554
+ }) }, s);
3555
+ }),
3556
+ s && s.totalRecords > s.recordsPerPage && /* @__PURE__ */ m(R, {
3557
+ gap: "xs",
3558
+ mt: "sm",
3559
+ children: [/* @__PURE__ */ p(T, {
3560
+ justify: "center",
3561
+ children: /* @__PURE__ */ p(ee, {
3562
+ total: Math.ceil(s.totalRecords / s.recordsPerPage),
3563
+ value: s.page,
3564
+ onChange: s.onPageChange,
3565
+ size: "sm"
3566
+ })
3567
+ }), s.recordsPerPageOptions && s.onRecordsPerPageChange && /* @__PURE__ */ m(T, {
3568
+ justify: "center",
3569
+ gap: "xs",
3570
+ children: [/* @__PURE__ */ p(V, {
3571
+ fz: "xs",
3572
+ c: "dimmed",
3573
+ children: "Einträge pro Seite:"
3574
+ }), /* @__PURE__ */ p(L, {
3575
+ data: s.recordsPerPageOptions.map((e) => ({
3576
+ value: String(e),
3577
+ label: String(e)
3578
+ })),
3579
+ value: String(s.recordsPerPage),
3580
+ onChange: (e) => e && s.onRecordsPerPageChange(Number(e)),
3581
+ allowDeselect: !1,
3582
+ size: "xs",
3583
+ w: 70
3584
+ })]
3642
3585
  })]
3643
- })]
3644
- }) }, r);
3645
- }), se;
3646
- r[10] === u ? se = r[11] : (se = u && u.totalRecords > u.recordsPerPage && /* @__PURE__ */ h(te, {
3647
- gap: "xs",
3648
- mt: "sm",
3649
- children: [/* @__PURE__ */ m(E, {
3650
- justify: "center",
3651
- children: /* @__PURE__ */ m(F, {
3652
- total: Math.ceil(u.totalRecords / u.recordsPerPage),
3653
- value: u.page,
3654
- onChange: u.onPageChange,
3655
- size: "sm"
3656
3586
  })
3657
- }), u.recordsPerPageOptions && u.onRecordsPerPageChange && /* @__PURE__ */ h(E, {
3658
- justify: "center",
3659
- gap: "xs",
3660
- children: [/* @__PURE__ */ m(W, {
3661
- fz: "xs",
3662
- c: "dimmed",
3663
- children: "Einträge pro Seite:"
3664
- }), /* @__PURE__ */ m(ee, {
3665
- data: u.recordsPerPageOptions.map(ci),
3666
- value: String(u.recordsPerPage),
3667
- onChange: (e) => e && u.onRecordsPerPageChange(Number(e)),
3668
- allowDeselect: !1,
3669
- size: "xs",
3670
- w: 70
3671
- })]
3672
- })]
3673
- }), r[10] = u, r[11] = se);
3674
- let ce;
3675
- return r[12] !== ae || r[13] !== se || r[14] !== H || r[15] !== U || r[16] !== oe ? (ce = /* @__PURE__ */ h(ae, {
3676
- gap: "sm",
3677
- my: "md",
3678
- children: [
3679
- H,
3680
- U,
3681
- oe,
3682
- se
3683
3587
  ]
3684
- }), r[12] = ae, r[13] = se, r[14] = H, r[15] = U, r[16] = oe, r[17] = ce) : ce = r[17], ce;
3685
- }
3686
- function ci(e) {
3687
- return {
3688
- value: String(e),
3689
- label: String(e)
3690
- };
3691
- }
3692
- function li(e) {
3693
- return e.stopPropagation();
3694
- }
3695
- function ui(e) {
3696
- return !e;
3697
- }
3698
- function di(e, t) {
3699
- let n = t.column.accessor ?? t.id;
3700
- return e.some((e) => e.value === n) || e.push({
3701
- value: n,
3702
- label: t.column.title ?? t.id
3703
- }), e;
3704
- }
3705
- function fi(e) {
3706
- return e.column.sortable !== !1;
3707
- }
3708
- function pi(e) {
3709
- return e.id;
3710
- }
3711
- function mi(e) {
3712
- return e.id;
3713
- }
3714
- function hi(e) {
3715
- return e.column.filtering;
3716
- }
3717
- function gi(e) {
3718
- return e.column && e.column.filter != null;
3719
- }
3720
- function _i(e) {
3721
- return e.list && e.column && !e.column.hidden;
3588
+ });
3722
3589
  }
3723
3590
  //#endregion
3724
3591
  //#region src/DataTable/DataTable.tsx
3725
- var vi = [
3592
+ var ei = [
3726
3593
  10,
3727
3594
  15,
3728
3595
  50,
3729
3596
  100,
3730
3597
  500
3731
3598
  ];
3732
- function yi({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutationApiPath: i, buttons: o, fields: s, selection: l, pagination: u, filters: g, actions: x, steps: S, defaultSort: C, onSortChange: w, createButtonText: D, queryParams: O, tabs: A, defaultTab: j, activeTab: M, onActiveTabChange: P, canUpdate: F, canDelete: I, showRefresh: L = !0, rowExpansion: R, onRowClick: z, mobileCards: ee = !1, deleteConfirmMessage: ne, editRecordId: V, onEditRecordIdChange: re }) {
3733
- let [ie, ae] = f(j || (A && A.length > 0 ? A[0].value : null)), H = M === void 0 ? ie : M, U = (e) => {
3734
- M === void 0 && ae(e), P && P(e);
3735
- }, W = A?.find((e) => e.value === H), se = W?.queryParams || {}, ce = W?.apiPath ?? r, ue = W?.mutationApiPath ?? i ?? ce, de = {
3736
- ...O,
3737
- ...se
3738
- }, fe = de ? "?" + Object.entries(de).filter(([, e]) => e != null).map(([e, t]) => `${e}=${encodeURIComponent(t ?? "")}`).join("&") : "", pe = H ? [...t, H] : t, { data: me, isLoading: he, isError: ge, isRefetching: ye, refetch: be } = Wt(ce + fe, pe), we = ti(Array.isArray(me) ? me : [], g), [Te, De] = f({
3739
- columnAccessor: C?.field ?? s[0].id,
3599
+ function ti({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutationApiPath: a, buttons: o, fields: c, selection: l, pagination: h, filters: b, actions: x, steps: S, defaultSort: C, onSortChange: E, createButtonText: D, queryParams: k, tabs: A, defaultTab: j, activeTab: N, onActiveTabChange: ee, canUpdate: P, canDelete: F, showRefresh: te = !0, rowExpansion: I, onRowClick: L, mobileCards: re = !1, deleteConfirmMessage: ie, editRecordId: z, onEditRecordIdChange: ae }) {
3600
+ let [oe, se] = d(j || (A && A.length > 0 ? A[0].value : null)), B = N === void 0 ? oe : N, V = (e) => {
3601
+ N === void 0 && se(e), ee && ee(e);
3602
+ }, le = A?.find((e) => e.value === B), ue = le?.queryParams || {}, fe = le?.apiPath ?? r, pe = le?.mutationApiPath ?? a ?? fe, H = {
3603
+ ...k,
3604
+ ...ue
3605
+ }, me = H ? "?" + Object.entries(H).filter(([, e]) => e != null).map(([e, t]) => `${e}=${encodeURIComponent(t ?? "")}`).join("&") : "", he = B ? [...t, B] : t, { data: ge, isLoading: _e, isError: be, isRefetching: xe, refetch: Te } = Ut(fe + me, he), Ee = Jr(Array.isArray(ge) ? ge : [], b), [Oe, ke] = d({
3606
+ columnAccessor: C?.field ?? c[0].id,
3740
3607
  direction: C?.direction ?? "desc"
3741
- }), Oe = (e) => {
3742
- De(e), w && w(String(e.columnAccessor), e.direction);
3743
- }, G = Yr(we, Te.columnAccessor, Te.direction), [ke, Ae] = Gr(vi[1], "mantine-table-page-size"), [je, Me] = f(1), Ne = u ? G.slice((je - 1) * ke, je * ke) : G, [Pe, Fe] = f([]), Ie = R?.expanded?.recordIds ?? Pe, Le = R?.expanded?.onRecordIdsChange ?? Fe, Re = (e) => {
3744
- Ie.includes(e) ? Le(Ie.filter((t) => t !== e)) : Le(R?.allowMultiple ? [...Ie, e] : [e]);
3745
- }, ze = s.findIndex((e) => e.list && e.column && !e.column.hidden), Be = R && ze >= 0 ? s.map((e, t) => {
3746
- if (t !== ze) return e;
3608
+ }), Ae = (e) => {
3609
+ ke(e), E && E(String(e.columnAccessor), e.direction);
3610
+ }, je = Hr(Ee, Oe.columnAccessor, Oe.direction), [Me, Ne] = Rr(ei[1], "mantine-table-page-size"), [U, Pe] = d(1), Fe = h ? je.slice((U - 1) * Me, U * Me) : je, [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;
3747
3614
  let n = e.column.render;
3748
3615
  return {
3749
3616
  ...e,
3750
3617
  column: {
3751
3618
  ...e.column,
3752
- render: (t, r) => /* @__PURE__ */ h(E, {
3619
+ render: (t, r) => /* @__PURE__ */ m(T, {
3753
3620
  gap: "xs",
3754
3621
  wrap: "nowrap",
3755
3622
  align: "center",
3756
- children: [!R.expandable || R.expandable(t) ? /* @__PURE__ */ m(y, {
3623
+ children: [!I.expandable || I.expandable(t) ? /* @__PURE__ */ p(v, {
3757
3624
  component: "span",
3758
3625
  "aria-label": "Aufklappen",
3759
3626
  onClick: (e) => {
3760
- e.stopPropagation(), Re(t.id);
3627
+ e.stopPropagation(), Be(t.id);
3761
3628
  },
3762
3629
  style: {
3763
3630
  display: "inline-flex",
3764
3631
  flexShrink: 0,
3765
3632
  cursor: "pointer"
3766
3633
  },
3767
- children: /* @__PURE__ */ m(ve, {
3634
+ children: /* @__PURE__ */ p(ye, {
3768
3635
  size: 16,
3769
3636
  style: {
3770
3637
  color: "var(--mantine-primary-color-filled)",
3771
- transform: Ie.includes(t.id) ? "rotate(90deg)" : void 0,
3638
+ transform: Re.includes(t.id) ? "rotate(90deg)" : void 0,
3772
3639
  transition: "transform 200ms ease"
3773
3640
  }
3774
3641
  })
3775
- }) : /* @__PURE__ */ m(y, {
3642
+ }) : /* @__PURE__ */ p(v, {
3776
3643
  w: 16,
3777
3644
  style: { flexShrink: 0 }
3778
- }), n ? n(t, r) : String(En(t, e.column.accessor) ?? "")]
3645
+ }), n ? n(t, r) : String(bn(t, e.column.accessor) ?? "")]
3779
3646
  })
3780
3647
  }
3781
3648
  };
3782
- }) : s, [K, q] = f([]);
3783
- c(() => {
3784
- q([]);
3785
- }, [H]);
3786
- let [Ve, He] = f(!1), [Ue, We] = f(!1), [Ge, Ke] = f(!1), qe = d(null);
3787
- c(() => {
3788
- if (!V) {
3789
- qe.current = null;
3649
+ }) : c, [W, G] = d([]);
3650
+ s(() => {
3651
+ G([]);
3652
+ }, [B]);
3653
+ let [Ue, We] = d(!1), [Ge, Ke] = d(!1), [qe, Je] = d(!1), Ye = u(null);
3654
+ s(() => {
3655
+ if (!z) {
3656
+ Ye.current = null;
3790
3657
  return;
3791
3658
  }
3792
- if (qe.current === V) return;
3793
- let e = G.find((e) => e.id === V);
3794
- e && (qe.current = V, q([e]), We(!0), re?.(null));
3795
- }, [V, G]);
3796
- let Je = s.some((e) => e.update), Ye = s.some((e) => e.delete), Xe = [];
3797
- return Je && Xe.push({
3798
- icon: /* @__PURE__ */ m(Se, { size: 14 }),
3659
+ if (Ye.current === z) return;
3660
+ let e = je.find((e) => e.id === z);
3661
+ e && (Ye.current = z, G([e]), Ke(!0), ae?.(null));
3662
+ }, [z, je]);
3663
+ let Xe = c.some((e) => e.update), Ze = c.some((e) => e.delete), Qe = [];
3664
+ return Xe && Qe.push({
3665
+ icon: /* @__PURE__ */ p(Ce, { size: 14 }),
3799
3666
  label: "Bearbeiten",
3800
3667
  onClick: (e) => {
3801
- q(e), We(!0);
3668
+ G(e), Ke(!0);
3802
3669
  }
3803
- }), x && Xe.push(...x), Ye && Xe.push({
3804
- icon: /* @__PURE__ */ m(Ee, { size: 14 }),
3670
+ }), x && Qe.push(...x), Ze && Qe.push({
3671
+ icon: /* @__PURE__ */ p(De, { size: 14 }),
3805
3672
  label: "Löschen",
3806
3673
  onClick: (e) => {
3807
- q(e), Ke(!0);
3674
+ G(e), Je(!0);
3808
3675
  }
3809
- }), /* @__PURE__ */ h(p, { children: [
3810
- /* @__PURE__ */ h(T, {
3676
+ }), /* @__PURE__ */ m(f, { children: [
3677
+ /* @__PURE__ */ m(w, {
3811
3678
  gap: "xs",
3812
3679
  align: {
3813
3680
  base: "stretch",
@@ -3819,10 +3686,10 @@ function yi({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3819
3686
  },
3820
3687
  justify: e ? "space-between" : "flex-end",
3821
3688
  wrap: "wrap",
3822
- children: [e && (typeof e == "string" ? /* @__PURE__ */ m(le, {
3689
+ children: [e && (typeof e == "string" ? /* @__PURE__ */ p(de, {
3823
3690
  order: 4,
3824
3691
  children: e
3825
- }) : e), /* @__PURE__ */ h(T, {
3692
+ }) : e), /* @__PURE__ */ m(w, {
3826
3693
  align: {
3827
3694
  base: "stretch",
3828
3695
  sm: "center"
@@ -3842,39 +3709,39 @@ function yi({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3842
3709
  sm: "auto"
3843
3710
  },
3844
3711
  children: [
3845
- L && /* @__PURE__ */ m(_, {
3712
+ te && /* @__PURE__ */ p(g, {
3846
3713
  variant: "subtle",
3847
- onClick: () => be(),
3714
+ onClick: () => Te(),
3848
3715
  "aria-label": "Neuladen",
3849
- children: /* @__PURE__ */ m(Ce, {})
3716
+ children: /* @__PURE__ */ p(we, {})
3850
3717
  }),
3851
- (s.some((e) => e.update) || l) && (() => {
3852
- let e = s.find((e) => e.update) && (!F || K.length > 0 && F(K[0])), t = s.find((e) => e.delete) && (!I || K.length > 0 && I(K[0])), n = (x ?? []).length > 0, r = e || t || n;
3853
- return /* @__PURE__ */ m(y, {
3854
- ...ee ? { visibleFrom: "sm" } : {},
3855
- children: /* @__PURE__ */ h(k, {
3718
+ (c.some((e) => e.update) || l) && (() => {
3719
+ let e = c.find((e) => e.update) && (!P || W.length > 0 && P(W[0])), t = c.find((e) => e.delete) && (!F || W.length > 0 && F(W[0])), n = (x ?? []).length > 0, r = e || t || n;
3720
+ return /* @__PURE__ */ p(v, {
3721
+ ...re ? { visibleFrom: "sm" } : {},
3722
+ children: /* @__PURE__ */ m(O, {
3856
3723
  shadow: "md",
3857
- children: [/* @__PURE__ */ m(k.Target, { children: /* @__PURE__ */ m(b, {
3724
+ children: [/* @__PURE__ */ p(O.Target, { children: /* @__PURE__ */ p(y, {
3858
3725
  variant: "outline",
3859
- rightSection: /* @__PURE__ */ m(_e, { size: 14 }),
3860
- disabled: !K.length || !r,
3726
+ rightSection: /* @__PURE__ */ p(ve, { size: 14 }),
3727
+ disabled: !W.length || !r,
3861
3728
  children: "Aktionen"
3862
- }) }), /* @__PURE__ */ h(k.Dropdown, { children: [
3863
- e && /* @__PURE__ */ m(k.Item, {
3864
- leftSection: /* @__PURE__ */ m(Se, { size: 14 }),
3865
- onClick: () => We(!0),
3866
- disabled: K.length !== 1,
3729
+ }) }), /* @__PURE__ */ m(O.Dropdown, { children: [
3730
+ e && /* @__PURE__ */ p(O.Item, {
3731
+ leftSection: /* @__PURE__ */ p(Ce, { size: 14 }),
3732
+ onClick: () => Ke(!0),
3733
+ disabled: W.length !== 1,
3867
3734
  children: "Bearbeiten"
3868
3735
  }),
3869
- (x ?? []).map((e, t) => /* @__PURE__ */ a(k.Item, {
3736
+ (x ?? []).map((e, t) => /* @__PURE__ */ i(O.Item, {
3870
3737
  ...e.icon && { leftSection: e.icon },
3871
3738
  key: `custom_action_${t}`,
3872
- onClick: () => e.onClick(K),
3873
- disabled: e.disabled?.(K) ?? !1
3739
+ onClick: () => e.onClick(W),
3740
+ disabled: e.disabled?.(W) ?? !1
3874
3741
  }, e.label)),
3875
- t && /* @__PURE__ */ m(k.Item, {
3876
- leftSection: /* @__PURE__ */ m(Ee, { size: 14 }),
3877
- onClick: () => Ke(!0),
3742
+ t && /* @__PURE__ */ p(O.Item, {
3743
+ leftSection: /* @__PURE__ */ p(De, { size: 14 }),
3744
+ onClick: () => Je(!0),
3878
3745
  color: "red",
3879
3746
  children: "Löschen"
3880
3747
  })
@@ -3882,172 +3749,172 @@ function yi({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3882
3749
  })
3883
3750
  });
3884
3751
  })(),
3885
- s.find((e) => e.create) && /* @__PURE__ */ m(b, {
3886
- onClick: () => He(!0),
3887
- disabled: he,
3752
+ c.find((e) => e.create) && /* @__PURE__ */ p(y, {
3753
+ onClick: () => We(!0),
3754
+ disabled: _e,
3888
3755
  children: D ?? "Erstellen"
3889
3756
  }),
3890
3757
  o
3891
3758
  ]
3892
3759
  })]
3893
3760
  }),
3894
- A && A.length > 0 && /* @__PURE__ */ m(oe, {
3895
- value: H,
3896
- onChange: U,
3761
+ A && A.length > 0 && /* @__PURE__ */ p(ce, {
3762
+ value: B,
3763
+ onChange: V,
3897
3764
  mt: "md",
3898
- children: /* @__PURE__ */ m(oe.List, { children: A.map((e) => /* @__PURE__ */ m(oe.Tab, {
3765
+ children: /* @__PURE__ */ p(ce.List, { children: A.map((e) => /* @__PURE__ */ p(ce.Tab, {
3899
3766
  value: e.value,
3900
3767
  leftSection: e.icon,
3901
3768
  children: e.label
3902
3769
  }, e.value)) })
3903
3770
  }),
3904
- ge && /* @__PURE__ */ m(v, {
3771
+ be && /* @__PURE__ */ p(_, {
3905
3772
  mt: "md",
3906
3773
  variant: "light",
3907
3774
  color: "red",
3908
3775
  title: "Es ist ein Fehler aufgetreten.",
3909
- icon: /* @__PURE__ */ m(xe, {}),
3776
+ icon: /* @__PURE__ */ p(Se, {}),
3910
3777
  children: "Bitte versuche es später erneut oder sende eine Nachricht an unseren Support."
3911
3778
  }),
3912
- (he || ye) && /* @__PURE__ */ h(te, {
3779
+ (_e || xe) && /* @__PURE__ */ m(R, {
3913
3780
  my: "md",
3914
- children: [/* @__PURE__ */ m(B, { height: 40 }), [
3781
+ children: [/* @__PURE__ */ p(ne, { height: 40 }), [
3915
3782
  ,
3916
3783
  ,
3917
3784
  ,
3918
3785
  ,
3919
3786
  ,
3920
- ].fill(0).map((e, t) => /* @__PURE__ */ m(B, { height: 35 }, `skeleton-${t}`))]
3787
+ ].fill(0).map((e, t) => /* @__PURE__ */ p(ne, { height: 35 }, `skeleton-${t}`))]
3921
3788
  }),
3922
- !he && !ye && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(y, {
3923
- ...ee ? { visibleFrom: "sm" } : {},
3924
- children: /* @__PURE__ */ m(Vr, {
3789
+ !_e && !xe && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(v, {
3790
+ ...re ? { visibleFrom: "sm" } : {},
3791
+ children: /* @__PURE__ */ p(Fr, {
3925
3792
  my: "md",
3926
3793
  striped: !0,
3927
3794
  highlightOnHover: !0,
3928
3795
  minHeight: 150,
3929
- fetching: ge,
3930
- records: Ne,
3931
- sortStatus: Te,
3932
- onSortStatusChange: Oe,
3796
+ fetching: be,
3797
+ records: Fe,
3798
+ sortStatus: Oe,
3799
+ onSortStatusChange: Ae,
3933
3800
  ...l && {
3934
- selectedRecords: K,
3935
- onSelectedRecordsChange: q
3801
+ selectedRecords: W,
3802
+ onSelectedRecordsChange: G
3936
3803
  },
3937
- ...u && Ne.length && {
3938
- totalRecords: G.length,
3939
- recordsPerPage: ke,
3940
- onPageChange: Me,
3941
- page: je,
3942
- recordsPerPageOptions: vi,
3943
- onRecordsPerPageChange: Ae,
3804
+ ...h && Fe.length && {
3805
+ totalRecords: je.length,
3806
+ recordsPerPage: Me,
3807
+ onPageChange: Pe,
3808
+ page: U,
3809
+ recordsPerPageOptions: ei,
3810
+ onRecordsPerPageChange: Ne,
3944
3811
  recordsPerPageLabel: "Einträge pro Seite"
3945
3812
  },
3946
- ...R && { rowExpansion: {
3947
- allowMultiple: R.allowMultiple ?? !1,
3948
- trigger: z ? "never" : "click",
3949
- content: ({ record: e }) => R.content(e, !1),
3813
+ ...I && { rowExpansion: {
3814
+ allowMultiple: I.allowMultiple ?? !1,
3815
+ trigger: L ? "never" : "click",
3816
+ content: ({ record: e }) => I.content(e, !1),
3950
3817
  expanded: {
3951
- recordIds: Ie,
3952
- onRecordIdsChange: Le
3818
+ recordIds: Re,
3819
+ onRecordIdsChange: ze
3953
3820
  },
3954
- ...R.expandable && { expandable: ({ record: e }) => R.expandable(e) }
3821
+ ...I.expandable && { expandable: ({ record: e }) => I.expandable(e) }
3955
3822
  } },
3956
- columns: Be.map((e) => e.column),
3823
+ columns: He.map((e) => e.column),
3957
3824
  noRecordsText: "Keine Einträge gefunden",
3958
- onRowClick: z,
3959
- ...z && { style: { cursor: "pointer" } }
3825
+ onRowClick: L,
3826
+ ...L && { style: { cursor: "pointer" } }
3960
3827
  })
3961
- }), ee && /* @__PURE__ */ m(y, {
3828
+ }), re && /* @__PURE__ */ p(v, {
3962
3829
  hiddenFrom: "sm",
3963
- children: /* @__PURE__ */ m(si, {
3964
- records: Ne,
3965
- fields: Be,
3966
- onRowClick: z,
3830
+ children: /* @__PURE__ */ p($r, {
3831
+ records: Fe,
3832
+ fields: He,
3833
+ onRowClick: L,
3967
3834
  sort: {
3968
- field: String(Te.columnAccessor),
3969
- direction: Te.direction,
3835
+ field: String(Oe.columnAccessor),
3836
+ direction: Oe.direction,
3970
3837
  onSortChange: (e, t) => {
3971
- Oe({
3838
+ Ae({
3972
3839
  columnAccessor: e,
3973
3840
  direction: t
3974
3841
  });
3975
3842
  }
3976
3843
  },
3977
- ...u && Ne.length && { pagination: {
3978
- totalRecords: G.length,
3979
- recordsPerPage: ke,
3980
- page: je,
3981
- onPageChange: Me,
3982
- recordsPerPageOptions: vi,
3844
+ ...h && Fe.length && { pagination: {
3845
+ totalRecords: je.length,
3846
+ recordsPerPage: Me,
3847
+ page: U,
3848
+ onPageChange: Pe,
3849
+ recordsPerPageOptions: ei,
3983
3850
  onRecordsPerPageChange: (e) => {
3984
- Ae(e), Me(1);
3851
+ Ne(e), Pe(1);
3985
3852
  }
3986
3853
  } },
3987
- ...R && { rowExpansion: {
3988
- content: R.content,
3854
+ ...I && { rowExpansion: {
3855
+ content: I.content,
3989
3856
  expanded: {
3990
- recordIds: Ie,
3991
- onRecordIdsChange: Le
3857
+ recordIds: Re,
3858
+ onRecordIdsChange: ze
3992
3859
  },
3993
- ...R.expandable && { expandable: R.expandable }
3860
+ ...I.expandable && { expandable: I.expandable }
3994
3861
  } },
3995
- ...Xe.length > 0 && {
3996
- actions: Xe,
3997
- canUpdate: F,
3998
- canDelete: I
3862
+ ...Qe.length > 0 && {
3863
+ actions: Qe,
3864
+ canUpdate: P,
3865
+ canDelete: F
3999
3866
  }
4000
3867
  })
4001
3868
  })] }),
4002
- /* @__PURE__ */ m(N, {
4003
- opened: Ue,
3869
+ /* @__PURE__ */ p(M, {
3870
+ opened: Ge,
4004
3871
  onClose: () => {
4005
- We(!1), q([]);
3872
+ Ke(!1), G([]);
4006
3873
  },
4007
3874
  title: e ?? "Bearbeiten",
4008
- children: K.length > 0 && /* @__PURE__ */ m(Hr, {
4009
- fields: s.filter((e) => e.update),
3875
+ children: W.length > 0 && /* @__PURE__ */ p(Ir, {
3876
+ fields: c.filter((e) => e.update),
4010
3877
  queryKey: t,
4011
3878
  connectedQueryKeys: n,
4012
- apiPath: ue,
4013
- id: K[0].id,
3879
+ apiPath: pe,
3880
+ id: W[0].id,
4014
3881
  onClose: () => {
4015
- We(!1), q([]);
3882
+ Ke(!1), G([]);
4016
3883
  },
4017
3884
  steps: S
4018
3885
  })
4019
3886
  }),
4020
- K.length > 0 && /* @__PURE__ */ m(N, {
4021
- opened: Ge,
3887
+ W.length > 0 && /* @__PURE__ */ p(M, {
3888
+ opened: qe,
4022
3889
  onClose: () => {
4023
- Ke(!1), q([]);
3890
+ Je(!1), G([]);
4024
3891
  },
4025
3892
  title: e ?? "Löschen",
4026
- children: /* @__PURE__ */ m(Wr, {
3893
+ children: /* @__PURE__ */ p(Lr, {
4027
3894
  onClose: () => {
4028
- Ke(!1), q([]);
3895
+ Je(!1), G([]);
4029
3896
  },
4030
3897
  queryKey: t,
4031
3898
  connectedQueryKeys: n,
4032
- apiPath: ue,
4033
- selectedRecords: K,
4034
- confirmMessage: ne
3899
+ apiPath: pe,
3900
+ selectedRecords: W,
3901
+ confirmMessage: ie
4035
3902
  })
4036
3903
  }),
4037
- /* @__PURE__ */ m(N, {
4038
- opened: Ve,
3904
+ /* @__PURE__ */ p(M, {
3905
+ opened: Ue,
4039
3906
  onClose: () => {
4040
- He(!1);
3907
+ We(!1);
4041
3908
  },
4042
3909
  title: e ?? "Anlegen",
4043
- children: /* @__PURE__ */ m(un, {
3910
+ children: /* @__PURE__ */ p(rn, {
4044
3911
  queryKey: t,
4045
3912
  connectedQueryKeys: n,
4046
- apiPath: ue,
3913
+ apiPath: pe,
4047
3914
  onClose: () => {
4048
- He(!1);
3915
+ We(!1);
4049
3916
  },
4050
- fields: s.filter((e) => e.create),
3917
+ fields: c.filter((e) => e.create),
4051
3918
  steps: S
4052
3919
  })
4053
3920
  })
@@ -4055,38 +3922,23 @@ function yi({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
4055
3922
  }
4056
3923
  //#endregion
4057
3924
  //#region src/DataTable/SubTable.tsx
4058
- function bi(t) {
4059
- let n = e(8), r, i, a;
4060
- if (n[0] !== t) {
4061
- a = Symbol.for("react.early_return_sentinel");
4062
- bb0: {
4063
- let { mobile: e, columns: o, ...s } = t;
4064
- if (r = o, i = s, e) {
4065
- let e = i.records ?? [], t;
4066
- n[4] === Symbol.for("react.memo_cache_sentinel") ? (t = { fontVariantNumeric: "tabular-nums" }, n[4] = t) : t = n[4], a = /* @__PURE__ */ m(te, {
4067
- gap: "sm",
4068
- style: t,
4069
- children: e.map((e, t) => {
4070
- let n = r.filter((t) => !t.hidden && !t.hideOnMobile?.(e)).map((n) => ({
4071
- label: n.title ?? xn(String(n.accessor)),
4072
- value: n.render ? n.render(e, t) : En(e, n.accessor)
4073
- })), a = i.idAccessor ? Q(e, i.idAccessor) : t;
4074
- return /* @__PURE__ */ m(ii, { rows: n }, a);
4075
- })
4076
- });
4077
- break bb0;
4078
- }
4079
- }
4080
- n[0] = t, n[1] = r, n[2] = i, n[3] = a;
4081
- } else r = n[1], i = n[2], a = n[3];
4082
- if (a !== Symbol.for("react.early_return_sentinel")) return a;
4083
- let o;
4084
- return n[5] !== r || n[6] !== i ? (o = /* @__PURE__ */ m(Vr, {
4085
- columns: r,
4086
- ...i
4087
- }), n[5] = r, n[6] = i, n[7] = o) : o = n[7], o;
3925
+ function ni({ mobile: e, columns: t, ...n }) {
3926
+ return e ? /* @__PURE__ */ p(R, {
3927
+ gap: "sm",
3928
+ style: { fontVariantNumeric: "tabular-nums" },
3929
+ children: (n.records ?? []).map((e, r) => {
3930
+ let i = t.filter((t) => !t.hidden && !t.hideOnMobile?.(e)).map((t) => ({
3931
+ label: t.title ?? hn(String(t.accessor)),
3932
+ value: t.render ? t.render(e, r) : bn(e, t.accessor)
3933
+ })), a = n.idAccessor ? Q(e, n.idAccessor) : r;
3934
+ return /* @__PURE__ */ p(Xr, { rows: i }, a);
3935
+ })
3936
+ }) : /* @__PURE__ */ p(Fr, {
3937
+ columns: t,
3938
+ ...n
3939
+ });
4088
3940
  }
4089
3941
  //#endregion
4090
- export { un as CreateModal, yi as DataTable, jt as DataTableProvider, Wr as DeleteModal, ii as FieldCard, si as MobileCardList, bi as SubTable, Hr as UpdateModal, Vt as api, Bt as createOne, zt as deleteOne, Lt as getAll, Rt as getOne, Yr as sortData, Ht as updateOne, Kt as useAddOne, Mt as useDataTable, Jt as useDeleteOne, Wt as useGetAll, Ut as useGetOne, Gr as usePersistentState, qt as useUpdateOne };
3942
+ 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 };
4091
3943
 
4092
3944
  //# sourceMappingURL=index.es.js.map