ding-react-admin 2.2.1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,41 +1,41 @@
1
1
  import { Children as e, createContext as t, createElement as n, forwardRef as r, isValidElement 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";
2
2
  import { Link as f, Navigate as p, Outlet as m, RouterProvider as h, createBrowserRouter as g, useLocation as _, useNavigate as v, useParams as y, useSearchParams as b } from "react-router-dom";
3
- import { Alert as x, App as S, Avatar as C, Button as w, Card as T, Col as E, ConfigProvider as D, DatePicker as O, Drawer as k, Dropdown as A, Flex as j, Form as M, Grid as ee, Image as N, Input as P, InputNumber as F, Layout as I, List as te, Menu as L, Modal as ne, Pagination as re, Popover as ie, Row as R, Segmented as ae, Select as z, Space as B, Spin as oe, Steps as V, Switch as se, Table as ce, Tabs as H, TimePicker as le, Tooltip as U, Typography as W, theme as G } from "antd";
4
- import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
5
- import { AppstoreOutlined as ue, ArrowLeftOutlined as de, CaretDownOutlined as fe, CaretUpOutlined as pe, ColumnHeightOutlined as me, DeleteOutlined as he, DesktopOutlined as ge, EditOutlined as _e, LayoutOutlined as ve, LogoutOutlined as ye, MenuOutlined as be, MoonOutlined as xe, PaperClipOutlined as Se, PlusOutlined as Ce, SearchOutlined as we, SettingOutlined as Y, SunOutlined as Te, UploadOutlined as Ee, UserOutlined as De } from "@ant-design/icons";
6
- import { Controller as Oe, FormProvider as ke, useFieldArray as Ae, useForm as je, useFormContext as Me, useFormState as Ne, useWatch as Pe } from "react-hook-form";
7
- import Fe from "dayjs";
3
+ import { Alert as x, App as S, Avatar as C, Button as w, Card as T, Col as E, ConfigProvider as D, DatePicker as O, Drawer as k, Dropdown as A, Flex as j, Form as M, Grid as N, Image as P, Input as F, InputNumber as I, Layout as L, List as ee, Menu as R, Modal as te, Pagination as ne, Popover as re, Row as z, Segmented as ie, Select as B, Space as V, Spin as ae, Steps as H, Switch as oe, Table as se, Tabs as U, TimePicker as ce, Tooltip as W, Typography as G, theme as K } from "antd";
4
+ import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
5
+ import { AppstoreOutlined as le, ArrowLeftOutlined as ue, CaretDownOutlined as de, CaretUpOutlined as fe, ColumnHeightOutlined as pe, DeleteOutlined as me, DesktopOutlined as he, EditOutlined as ge, LayoutOutlined as _e, LogoutOutlined as ve, MenuOutlined as ye, MoonOutlined as be, PaperClipOutlined as xe, PlusOutlined as Se, SearchOutlined as Ce, SettingOutlined as X, SunOutlined as we, UploadOutlined as Te, UserOutlined as Ee } from "@ant-design/icons";
6
+ import { Controller as De, FormProvider as Oe, useFieldArray as ke, useForm as Ae, useFormContext as je, useFormState as Me, useWatch as Ne } from "react-hook-form";
7
+ import Pe from "dayjs";
8
8
  import './index.css';//#region \0rolldown/runtime.js
9
- var Ie = Object.create, Le = Object.defineProperty, Re = Object.getOwnPropertyDescriptor, ze = Object.getOwnPropertyNames, Be = Object.getPrototypeOf, Ve = Object.prototype.hasOwnProperty, He = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), Ue = (e, t, n, r) => {
10
- if (t && typeof t == "object" || typeof t == "function") for (var i = ze(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !Ve.call(e, s) && s !== n && Le(e, s, {
9
+ var Fe = Object.create, Ie = Object.defineProperty, Le = Object.getOwnPropertyDescriptor, Re = Object.getOwnPropertyNames, ze = Object.getPrototypeOf, Be = Object.prototype.hasOwnProperty, Ve = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), He = (e, t, n, r) => {
10
+ if (t && typeof t == "object" || typeof t == "function") for (var i = Re(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !Be.call(e, s) && s !== n && Ie(e, s, {
11
11
  get: ((e) => t[e]).bind(null, s),
12
- enumerable: !(r = Re(t, s)) || r.enumerable
12
+ enumerable: !(r = Le(t, s)) || r.enumerable
13
13
  });
14
14
  return e;
15
- }, We = (e, t, n) => (n = e == null ? {} : Ie(Be(e)), Ue(t || !e || !e.__esModule ? Le(n, "default", {
15
+ }, Ue = (e, t, n) => (n = e == null ? {} : Fe(ze(e)), He(t || !e || !e.__esModule ? Ie(n, "default", {
16
16
  value: e,
17
17
  enumerable: !0
18
- }) : n, e)), Ge = t(null);
19
- function Ke(e) {
18
+ }) : n, e)), We = t(null);
19
+ function Ge(e) {
20
20
  try {
21
21
  let t = localStorage.getItem(e);
22
22
  if (t === "light" || t === "dark" || t === "system") return t;
23
23
  } catch {}
24
24
  return "system";
25
25
  }
26
- function qe() {
26
+ function Ke() {
27
27
  return window.matchMedia("(prefers-color-scheme: dark)").matches;
28
28
  }
29
- function Je(e) {
29
+ function qe(e) {
30
30
  try {
31
31
  let t = localStorage.getItem(e);
32
32
  if (t === "comfortable" || t === "compact") return t;
33
33
  } catch {}
34
34
  return "compact";
35
35
  }
36
- var Ye = "ding-react-admin-theme-mode", Xe = "ding-react-admin-theme-density";
37
- function Ze({ children: e, modeStorageKey: t = Ye, densityStorageKey: n = Xe }) {
38
- let [r, i] = d(() => Ke(t)), [a, o] = d(() => Je(n)), [c, u] = d(qe);
36
+ var Je = "ding-react-admin-theme-mode", Ye = "ding-react-admin-theme-density";
37
+ function Xe({ children: e, modeStorageKey: t = Je, densityStorageKey: n = Ye }) {
38
+ let [r, i] = d(() => Ge(t)), [a, o] = d(() => qe(n)), [c, u] = d(Ke);
39
39
  s(() => {
40
40
  if (r !== "system") return;
41
41
  let e = window.matchMedia("(prefers-color-scheme: dark)"), t = () => u(e.matches);
@@ -52,8 +52,8 @@ function Ze({ children: e, modeStorageKey: t = Ye, densityStorageKey: n = Xe })
52
52
  localStorage.setItem(n, e);
53
53
  } catch {}
54
54
  }, m = r === "system" ? c ? "dark" : "light" : r, h = l(() => {
55
- let e = m === "dark" ? G.darkAlgorithm : G.defaultAlgorithm;
56
- return { algorithm: a === "compact" ? [e, G.compactAlgorithm] : e };
55
+ let e = m === "dark" ? K.darkAlgorithm : K.defaultAlgorithm;
56
+ return { algorithm: a === "compact" ? [e, K.compactAlgorithm] : e };
57
57
  }, [m, a]), g = l(() => ({
58
58
  mode: r,
59
59
  setMode: f,
@@ -67,104 +67,104 @@ function Ze({ children: e, modeStorageKey: t = Ye, densityStorageKey: n = Xe })
67
67
  f,
68
68
  p
69
69
  ]);
70
- return /* @__PURE__ */ q(Ge.Provider, {
70
+ return /* @__PURE__ */ J(We.Provider, {
71
71
  value: g,
72
- children: /* @__PURE__ */ q(D, {
72
+ children: /* @__PURE__ */ J(D, {
73
73
  theme: h,
74
74
  children: e
75
75
  })
76
76
  });
77
77
  }
78
- function Qe() {
79
- let e = o(Ge);
78
+ function Ze() {
79
+ let e = o(We);
80
80
  if (!e) throw Error("useThemeMode must be used within AppThemeProvider");
81
81
  return e;
82
82
  }
83
83
  //#endregion
84
84
  //#region src/components/DensitySwitch.tsx
85
- var $e = [{
85
+ var Qe = [{
86
86
  label: "Comfortable",
87
87
  value: "comfortable",
88
- icon: /* @__PURE__ */ q(ve, {})
88
+ icon: /* @__PURE__ */ J(_e, {})
89
89
  }, {
90
90
  label: "Compact",
91
91
  value: "compact",
92
- icon: /* @__PURE__ */ q(me, {})
92
+ icon: /* @__PURE__ */ J(pe, {})
93
93
  }];
94
- function et() {
95
- let { density: e, setDensity: t } = Qe();
96
- return /* @__PURE__ */ q(ae, {
94
+ function $e() {
95
+ let { density: e, setDensity: t } = Ze();
96
+ return /* @__PURE__ */ J(ie, {
97
97
  size: "small",
98
98
  value: e,
99
- options: $e,
99
+ options: Qe,
100
100
  onChange: (e) => t(e)
101
101
  });
102
102
  }
103
103
  //#endregion
104
104
  //#region src/components/ThemeSwitch.tsx
105
- var tt = [
105
+ var et = [
106
106
  {
107
107
  label: "Light",
108
108
  value: "light",
109
- icon: /* @__PURE__ */ q(Te, {})
109
+ icon: /* @__PURE__ */ J(we, {})
110
110
  },
111
111
  {
112
112
  label: "Dark",
113
113
  value: "dark",
114
- icon: /* @__PURE__ */ q(xe, {})
114
+ icon: /* @__PURE__ */ J(be, {})
115
115
  },
116
116
  {
117
117
  label: "Auto",
118
118
  value: "system",
119
- icon: /* @__PURE__ */ q(ge, {})
119
+ icon: /* @__PURE__ */ J(he, {})
120
120
  }
121
121
  ];
122
- function nt() {
123
- let { mode: e, setMode: t } = Qe();
124
- return /* @__PURE__ */ q(ae, {
122
+ function tt() {
123
+ let { mode: e, setMode: t } = Ze();
124
+ return /* @__PURE__ */ J(ie, {
125
125
  size: "small",
126
126
  value: e,
127
- options: tt,
127
+ options: et,
128
128
  onChange: (e) => t(e)
129
129
  });
130
130
  }
131
131
  //#endregion
132
132
  //#region src/components/ThemeToolbar.tsx
133
- function rt() {
134
- let { token: e } = G.useToken();
135
- return /* @__PURE__ */ q(ie, {
136
- placement: ee.useBreakpoint().lg ? "bottomRight" : "bottom",
133
+ function nt() {
134
+ let { token: e } = K.useToken();
135
+ return /* @__PURE__ */ J(re, {
136
+ placement: N.useBreakpoint().lg ? "bottomRight" : "bottom",
137
137
  trigger: "click",
138
- content: /* @__PURE__ */ J(B, {
138
+ content: /* @__PURE__ */ Y(V, {
139
139
  orientation: "vertical",
140
140
  size: "middle",
141
141
  style: {
142
142
  minWidth: 240,
143
143
  maxWidth: "min(92vw, 320px)"
144
144
  },
145
- children: [/* @__PURE__ */ q(nt, {}), /* @__PURE__ */ q(et, {})]
145
+ children: [/* @__PURE__ */ J(tt, {}), /* @__PURE__ */ J($e, {})]
146
146
  }),
147
147
  styles: { content: { padding: e.paddingSM } },
148
- children: /* @__PURE__ */ q(w, {
148
+ children: /* @__PURE__ */ J(w, {
149
149
  type: "default",
150
- icon: /* @__PURE__ */ q(Y, {}),
150
+ icon: /* @__PURE__ */ J(X, {}),
151
151
  "aria-label": "Display and theme settings"
152
152
  })
153
153
  });
154
154
  }
155
155
  //#endregion
156
156
  //#region src/components/NavMenuSearch.tsx
157
- function it({ value: e, onChange: t, placeholder: n = "Search menu…", variant: r = "on-dark" }) {
158
- let { token: i } = G.useToken(), a = r === "on-dark";
159
- return /* @__PURE__ */ q("div", {
157
+ function rt({ value: e, onChange: t, placeholder: n = "Search menu…", variant: r = "on-dark" }) {
158
+ let { token: i } = K.useToken(), a = r === "on-dark";
159
+ return /* @__PURE__ */ J("div", {
160
160
  style: {
161
161
  flexShrink: 0,
162
162
  paddingInline: i.paddingSM,
163
163
  paddingBlock: i.paddingXS
164
164
  },
165
- children: /* @__PURE__ */ q(D, {
165
+ children: /* @__PURE__ */ J(D, {
166
166
  theme: a ? { token: { colorTextPlaceholder: "rgba(255, 255, 255, 0.45)" } } : void 0,
167
- children: /* @__PURE__ */ q(P, {
167
+ children: /* @__PURE__ */ J(F, {
168
168
  allowClear: !0,
169
169
  size: "small",
170
170
  value: e,
@@ -172,7 +172,7 @@ function it({ value: e, onChange: t, placeholder: n = "Search menu…", variant:
172
172
  t(e.target.value);
173
173
  },
174
174
  placeholder: n,
175
- prefix: /* @__PURE__ */ q(we, { style: { color: a ? "rgba(255, 255, 255, 0.45)" : i.colorTextDescription } }),
175
+ prefix: /* @__PURE__ */ J(Ce, { style: { color: a ? "rgba(255, 255, 255, 0.45)" : i.colorTextDescription } }),
176
176
  "aria-label": n,
177
177
  styles: {
178
178
  input: a ? { color: "rgba(255, 255, 255, 0.88)" } : void 0,
@@ -189,9 +189,9 @@ function it({ value: e, onChange: t, placeholder: n = "Search menu…", variant:
189
189
  }
190
190
  //#endregion
191
191
  //#region src/components/ScrollableArea.tsx
192
- var at = r(function({ children: e, className: t, style: n, variant: r = "default" }, i) {
193
- let { token: a } = G.useToken(), o = r === "on-dark" ? "rgba(255, 255, 255, 0.22)" : a.colorTextQuaternary, s = r === "on-dark" ? "rgba(255, 255, 255, 0.38)" : a.colorTextTertiary;
194
- return /* @__PURE__ */ q("div", {
192
+ var it = r(function({ children: e, className: t, style: n, variant: r = "default" }, i) {
193
+ let { token: a } = K.useToken(), o = r === "on-dark" ? "rgba(255, 255, 255, 0.22)" : a.colorTextQuaternary, s = r === "on-dark" ? "rgba(255, 255, 255, 0.38)" : a.colorTextTertiary;
194
+ return /* @__PURE__ */ J("div", {
195
195
  ref: i,
196
196
  className: ["ding-admin-scroll", t].filter(Boolean).join(" "),
197
197
  style: {
@@ -202,15 +202,15 @@ var at = r(function({ children: e, className: t, style: n, variant: r = "default
202
202
  },
203
203
  children: e
204
204
  });
205
- }), ot = t(null), st = "User";
206
- function ct(e) {
207
- return e.getUserLabel?.() ?? st;
205
+ }), at = t(null), ot = "User";
206
+ function st(e) {
207
+ return e.getUserLabel?.() ?? ot;
208
208
  }
209
- function lt({ children: e, adapter: t }) {
210
- let [n, r] = d(() => t.getToken()), [i, o] = d(() => ct(t)), s = a(async (e) => {
211
- await t.login(e), r(t.getToken()), o(ct(t));
209
+ function ct({ children: e, adapter: t }) {
210
+ let [n, r] = d(() => t.getToken()), [i, o] = d(() => st(t)), s = a(async (e) => {
211
+ await t.login(e), r(t.getToken()), o(st(t));
212
212
  }, [t]), c = a(() => {
213
- t.logout(), r(t.getToken()), o(ct(t));
213
+ t.logout(), r(t.getToken()), o(st(t));
214
214
  }, [t]), u = l(() => ({
215
215
  isAuthenticated: !!n,
216
216
  userLabel: i,
@@ -222,18 +222,18 @@ function lt({ children: e, adapter: t }) {
222
222
  s,
223
223
  c
224
224
  ]);
225
- return /* @__PURE__ */ q(ot.Provider, {
225
+ return /* @__PURE__ */ J(at.Provider, {
226
226
  value: u,
227
227
  children: e
228
228
  });
229
229
  }
230
- function ut() {
231
- let e = o(ot);
230
+ function lt() {
231
+ let e = o(at);
232
232
  if (!e) throw Error("useAuth must be used within AuthProvider");
233
233
  return e;
234
234
  }
235
- var dt = "ding-react-admin-auth";
236
- function ft(e = dt) {
235
+ var ut = "ding-react-admin-auth";
236
+ function dt(e = ut) {
237
237
  return {
238
238
  async login({ username: t, password: n }) {
239
239
  if (!t.trim() || !n) throw Error("Invalid credentials");
@@ -249,16 +249,16 @@ function ft(e = dt) {
249
249
  }
250
250
  //#endregion
251
251
  //#region src/context/PermissionsProvider.tsx
252
- var pt = t(null);
253
- function mt({ children: e, can: t }) {
252
+ var ft = t(null);
253
+ function pt({ children: e, can: t }) {
254
254
  let n = l(() => t, [t]);
255
- return /* @__PURE__ */ q(pt.Provider, {
255
+ return /* @__PURE__ */ J(ft.Provider, {
256
256
  value: n,
257
257
  children: e
258
258
  });
259
259
  }
260
- function X() {
261
- let e = o(pt);
260
+ function mt() {
261
+ let e = o(ft);
262
262
  if (!e) throw Error("usePermissions must be used within PermissionsProvider");
263
263
  return e;
264
264
  }
@@ -266,7 +266,7 @@ function ht(e) {
266
266
  return (t) => e()?.includes(t) ?? !1;
267
267
  }
268
268
  function gt(e) {
269
- let t = X();
269
+ let t = mt();
270
270
  return a(() => t(e), [t, e]);
271
271
  }
272
272
  //#endregion
@@ -323,16 +323,16 @@ function xt(e) {
323
323
  //#endregion
324
324
  //#region src/components/NavMenuLabel.tsx
325
325
  function St({ label: e, title: t }) {
326
- return t ? /* @__PURE__ */ q(U, {
326
+ return t ? /* @__PURE__ */ J(W, {
327
327
  title: t,
328
328
  placement: "right",
329
329
  mouseEnterDelay: 0,
330
330
  destroyOnHidden: !0,
331
- children: /* @__PURE__ */ q("span", {
331
+ children: /* @__PURE__ */ J("span", {
332
332
  className: "ding-admin-menu-label",
333
333
  children: e
334
334
  })
335
- }) : /* @__PURE__ */ q("span", {
335
+ }) : /* @__PURE__ */ J("span", {
336
336
  className: "ding-admin-menu-label",
337
337
  children: e
338
338
  });
@@ -342,10 +342,10 @@ function St({ label: e, title: t }) {
342
342
  function Ct(e, t) {
343
343
  let n = t?.showLabelTooltip !== !1, r = t?.wrapLabels === !0, i = t?.collapsed === !0;
344
344
  return e.map((e) => {
345
- let a = e.Icon, o = a ? /* @__PURE__ */ q(a, {}) : void 0, s = _t(e), c = s && n ? /* @__PURE__ */ q(St, {
345
+ let a = e.Icon, o = a ? /* @__PURE__ */ J(a, {}) : void 0, s = _t(e), c = s && n ? /* @__PURE__ */ J(St, {
346
346
  label: e.label,
347
347
  title: s
348
- }) : r ? /* @__PURE__ */ q(St, {
348
+ }) : r ? /* @__PURE__ */ J(St, {
349
349
  label: e.label,
350
350
  title: ""
351
351
  }) : e.label, l = i && s ? { title: s } : {};
@@ -393,7 +393,7 @@ function Dt(e) {
393
393
  }
394
394
  }
395
395
  function Ot() {
396
- return ee.useBreakpoint().lg !== !0;
396
+ return N.useBreakpoint().lg !== !0;
397
397
  }
398
398
  function kt(e) {
399
399
  let t = /* @__PURE__ */ new Set();
@@ -417,12 +417,12 @@ function jt({ wrapLabels: e, itemDivider: t = "none" }) {
417
417
  return e && n.push("ding-admin-nav-menu--wrap-labels"), t === "full" ? n.push("ding-admin-nav-menu--item-divider-full") : t === "inset" && n.push("ding-admin-nav-menu--item-divider-inset"), n.join(" ");
418
418
  }
419
419
  function Mt({ menuItems: e, selectedKeys: t, inlineCollapsed: n, openKeys: r, onOpenChange: i, onNavigate: a, navQuery: o, onNavQueryChange: s, showNavSearch: c, navSearchPlaceholder: l, scrollVariant: u, searchVariant: d, wrapLabels: f, itemDivider: p }) {
420
- return /* @__PURE__ */ J(K, { children: [c && !n ? /* @__PURE__ */ q(it, {
420
+ return /* @__PURE__ */ Y(q, { children: [c && !n ? /* @__PURE__ */ J(rt, {
421
421
  value: o,
422
422
  onChange: s,
423
423
  placeholder: l,
424
424
  variant: d
425
- }) : null, /* @__PURE__ */ q(at, {
425
+ }) : null, /* @__PURE__ */ J(it, {
426
426
  variant: u,
427
427
  style: {
428
428
  flex: 1,
@@ -430,7 +430,7 @@ function Mt({ menuItems: e, selectedKeys: t, inlineCollapsed: n, openKeys: r, on
430
430
  overflowY: "auto",
431
431
  overflowX: "hidden"
432
432
  },
433
- children: /* @__PURE__ */ q(Nt, {
433
+ children: /* @__PURE__ */ J(Nt, {
434
434
  menuItems: e,
435
435
  selectedKeys: t,
436
436
  inlineCollapsed: n,
@@ -443,7 +443,7 @@ function Mt({ menuItems: e, selectedKeys: t, inlineCollapsed: n, openKeys: r, on
443
443
  })] });
444
444
  }
445
445
  function Nt({ menuItems: e, selectedKeys: t, inlineCollapsed: n, openKeys: r, onOpenChange: i, onNavigate: a, wrapLabels: o, itemDivider: s }) {
446
- return /* @__PURE__ */ q(L, {
446
+ return /* @__PURE__ */ J(R, {
447
447
  className: jt({
448
448
  wrapLabels: o,
449
449
  itemDivider: s
@@ -469,87 +469,87 @@ function Nt({ menuItems: e, selectedKeys: t, inlineCollapsed: n, openKeys: r, on
469
469
  });
470
470
  }
471
471
  function Pt({ navItems: e, brand: t = "Admin", collapsedBrand: n = "A", mobileDrawerTitle: r, headerExtras: i, userMenuItems: o, onUserMenuClick: c, loginPath: f = "/login", siderCollapsedStorageKey: p = Et, navSearch: h = !0, navMenu: g, hideSider: y = !1 }) {
472
- let b = v(), x = _(), { resolved: S } = Qe(), T = S === "dark", { logout: E, userLabel: D } = ut(), O = X(), [j, M] = d(() => Dt(p)), [ee, N] = d(!1), P = Ot(), { token: F } = G.useToken(), te = u(null), [L, ne] = d(""), re = h !== !1, ie = typeof h == "object" ? h.placeholder : void 0, R = g?.wrapLabels !== !1, ae = g?.itemDivider ?? "inset", z = r ?? t, B = () => {
472
+ let b = v(), x = _(), { resolved: S } = Ze(), T = S === "dark", { logout: E, userLabel: D } = lt(), O = mt(), [j, M] = d(() => Dt(p)), [N, P] = d(!1), F = Ot(), { token: I } = K.useToken(), ee = u(null), [R, te] = d(""), ne = h !== !1, re = typeof h == "object" ? h.placeholder : void 0, z = g?.wrapLabels !== !1, ie = g?.itemDivider ?? "inset", B = r ?? t, V = () => {
473
473
  E(), b(f, { replace: !0 });
474
- }, oe = a((e) => {
474
+ }, ae = a((e) => {
475
475
  M(e);
476
476
  try {
477
477
  localStorage.setItem(p, e ? "1" : "0");
478
478
  } catch {}
479
479
  }, [p]);
480
480
  s(() => {
481
- P || N(!1);
482
- }, [P]), s(() => {
483
- N(!1);
481
+ F || P(!1);
482
+ }, [F]), s(() => {
483
+ P(!1);
484
484
  }, [x.pathname]), s(() => {
485
- te.current?.scrollTo({
485
+ ee.current?.scrollTo({
486
486
  top: 0,
487
487
  left: 0
488
488
  });
489
489
  }, [x.pathname]), s(() => {
490
- j && ne("");
490
+ j && te("");
491
491
  }, [j]);
492
- let V = l(() => wt(e, O), [e, O]), se = L.trim(), ce = se.length > 0, H = l(() => ce ? vt(V, se) : V, [
493
- V,
494
- se,
495
- ce
496
- ]), le = l(() => kt(H), [H]), U = l(() => Ct(H, {
497
- showLabelTooltip: !j && !R,
498
- wrapLabels: R && !j,
492
+ let H = l(() => wt(e, O), [e, O]), oe = R.trim(), se = oe.length > 0, U = l(() => se ? vt(H, oe) : H, [
493
+ H,
494
+ oe,
495
+ se
496
+ ]), ce = l(() => kt(U), [U]), W = l(() => Ct(U, {
497
+ showLabelTooltip: !j && !z,
498
+ wrapLabels: z && !j,
499
499
  collapsed: j
500
500
  }), [
501
- H,
501
+ U,
502
502
  j,
503
- R
504
- ]), K = l(() => xt(H), [H]), ue = l(() => At(V, x.pathname), [V, x.pathname]), [de, fe] = d(() => At(V, x.pathname));
503
+ z
504
+ ]), q = l(() => xt(U), [U]), le = l(() => At(H, x.pathname), [H, x.pathname]), [ue, de] = d(() => At(H, x.pathname));
505
505
  s(() => {
506
- fe((e) => [...new Set([...e, ...ue])]);
507
- }, [ue]);
508
- let pe = a((e) => {
509
- fe(e);
510
- }, []), me = ce ? K : de, he = a((e) => {
511
- ne(e);
512
- }, []), ge = l(() => [{
506
+ de((e) => [...new Set([...e, ...le])]);
507
+ }, [le]);
508
+ let fe = a((e) => {
509
+ de(e);
510
+ }, []), pe = se ? q : ue, me = a((e) => {
511
+ te(e);
512
+ }, []), he = l(() => [{
513
513
  key: "logout",
514
- icon: /* @__PURE__ */ q(ye, {}),
514
+ icon: /* @__PURE__ */ J(ve, {}),
515
515
  label: "Log out",
516
516
  danger: !0
517
- }], []), _e = o ?? ge, ve = (e) => {
517
+ }], []), ge = o ?? he, _e = (e) => {
518
518
  if (c) {
519
519
  c(e);
520
520
  return;
521
521
  }
522
- e.key === "logout" && B();
523
- }, xe = T ? F.colorBgContainer : Tt, Se = T ? "default" : "on-dark", Ce = T ? "app" : "on-dark", we = [x.pathname], Y = (e) => {
524
- le.has(e) && (b(e), P && N(!1));
522
+ e.key === "logout" && V();
523
+ }, be = T ? I.colorBgContainer : Tt, xe = T ? "default" : "on-dark", Se = T ? "app" : "on-dark", Ce = [x.pathname], X = (e) => {
524
+ ce.has(e) && (b(e), F && P(!1));
525
525
  };
526
- return /* @__PURE__ */ J(I, {
526
+ return /* @__PURE__ */ Y(L, {
527
527
  style: {
528
528
  height: "100vh",
529
529
  width: "100%",
530
530
  overflow: "hidden",
531
- background: F.colorBgLayout
531
+ background: I.colorBgLayout
532
532
  },
533
533
  children: [
534
- !y && !P && /* @__PURE__ */ q(I.Sider, {
534
+ !y && !F && /* @__PURE__ */ J(L.Sider, {
535
535
  collapsible: !0,
536
536
  collapsed: j,
537
- onCollapse: oe,
537
+ onCollapse: ae,
538
538
  collapsedWidth: 64,
539
539
  style: {
540
- background: xe,
540
+ background: be,
541
541
  height: "100vh",
542
542
  overflow: "hidden",
543
- borderInlineEnd: T ? `1px solid ${F.colorSplit}` : void 0
543
+ borderInlineEnd: T ? `1px solid ${I.colorSplit}` : void 0
544
544
  },
545
- children: /* @__PURE__ */ J("div", {
545
+ children: /* @__PURE__ */ Y("div", {
546
546
  style: {
547
547
  display: "flex",
548
548
  flexDirection: "column",
549
549
  height: "100%",
550
550
  overflow: "hidden"
551
551
  },
552
- children: [/* @__PURE__ */ q("div", {
552
+ children: [/* @__PURE__ */ J("div", {
553
553
  style: {
554
554
  height: 64,
555
555
  flexShrink: 0,
@@ -558,76 +558,76 @@ function Pt({ navItems: e, brand: t = "Admin", collapsedBrand: n = "A", mobileDr
558
558
  justifyContent: "center",
559
559
  fontWeight: 600
560
560
  },
561
- children: /* @__PURE__ */ q(W.Text, {
561
+ children: /* @__PURE__ */ J(G.Text, {
562
562
  strong: !0,
563
- style: { color: F.colorTextLightSolid },
563
+ style: { color: I.colorTextLightSolid },
564
564
  children: j ? n : t
565
565
  })
566
- }), /* @__PURE__ */ q(Mt, {
567
- menuItems: U,
568
- selectedKeys: we,
566
+ }), /* @__PURE__ */ J(Mt, {
567
+ menuItems: W,
568
+ selectedKeys: Ce,
569
569
  inlineCollapsed: j,
570
- openKeys: me,
571
- onOpenChange: pe,
572
- onNavigate: Y,
573
- navQuery: L,
574
- onNavQueryChange: he,
575
- showNavSearch: re,
576
- navSearchPlaceholder: ie,
577
- scrollVariant: Se,
578
- searchVariant: Ce,
579
- wrapLabels: R,
580
- itemDivider: ae
570
+ openKeys: pe,
571
+ onOpenChange: fe,
572
+ onNavigate: X,
573
+ navQuery: R,
574
+ onNavQueryChange: me,
575
+ showNavSearch: ne,
576
+ navSearchPlaceholder: re,
577
+ scrollVariant: xe,
578
+ searchVariant: Se,
579
+ wrapLabels: z,
580
+ itemDivider: ie
581
581
  })]
582
582
  })
583
583
  }),
584
- !y && P && /* @__PURE__ */ q(k, {
585
- title: /* @__PURE__ */ q(W.Text, {
584
+ !y && F && /* @__PURE__ */ J(k, {
585
+ title: /* @__PURE__ */ J(G.Text, {
586
586
  strong: !0,
587
- style: { color: F.colorTextLightSolid },
588
- children: z
587
+ style: { color: I.colorTextLightSolid },
588
+ children: B
589
589
  }),
590
590
  placement: "left",
591
591
  size: 280,
592
- onClose: () => N(!1),
593
- open: ee,
592
+ onClose: () => P(!1),
593
+ open: N,
594
594
  styles: {
595
595
  header: {
596
- background: xe,
597
- borderBottom: `1px solid ${F.colorSplit}`
596
+ background: be,
597
+ borderBottom: `1px solid ${I.colorSplit}`
598
598
  },
599
599
  body: {
600
600
  padding: 0,
601
- background: xe
601
+ background: be
602
602
  }
603
603
  },
604
604
  destroyOnHidden: !0,
605
- children: /* @__PURE__ */ q("div", {
605
+ children: /* @__PURE__ */ J("div", {
606
606
  style: {
607
607
  display: "flex",
608
608
  flexDirection: "column",
609
609
  height: "100%",
610
610
  overflow: "hidden"
611
611
  },
612
- children: /* @__PURE__ */ q(Mt, {
613
- menuItems: U,
614
- selectedKeys: we,
612
+ children: /* @__PURE__ */ J(Mt, {
613
+ menuItems: W,
614
+ selectedKeys: Ce,
615
615
  inlineCollapsed: !1,
616
- openKeys: me,
617
- onOpenChange: pe,
618
- onNavigate: Y,
619
- navQuery: L,
620
- onNavQueryChange: he,
621
- showNavSearch: re,
622
- navSearchPlaceholder: ie,
623
- scrollVariant: Se,
624
- searchVariant: Ce,
625
- wrapLabels: R,
626
- itemDivider: ae
616
+ openKeys: pe,
617
+ onOpenChange: fe,
618
+ onNavigate: X,
619
+ navQuery: R,
620
+ onNavQueryChange: me,
621
+ showNavSearch: ne,
622
+ navSearchPlaceholder: re,
623
+ scrollVariant: xe,
624
+ searchVariant: Se,
625
+ wrapLabels: z,
626
+ itemDivider: ie
627
627
  })
628
628
  })
629
629
  }),
630
- /* @__PURE__ */ J(I, {
630
+ /* @__PURE__ */ Y(L, {
631
631
  style: {
632
632
  minWidth: 0,
633
633
  flex: 1,
@@ -636,49 +636,49 @@ function Pt({ navItems: e, brand: t = "Admin", collapsedBrand: n = "A", mobileDr
636
636
  display: "flex",
637
637
  flexDirection: "column"
638
638
  },
639
- children: [/* @__PURE__ */ J(I.Header, {
639
+ children: [/* @__PURE__ */ Y(L.Header, {
640
640
  style: {
641
- background: F.colorBgContainer,
642
- paddingInline: F.paddingLG,
641
+ background: I.colorBgContainer,
642
+ paddingInline: I.paddingLG,
643
643
  display: "flex",
644
644
  alignItems: "center",
645
- gap: F.marginSM,
645
+ gap: I.marginSM,
646
646
  lineHeight: "normal",
647
647
  flexShrink: 0
648
648
  },
649
649
  children: [
650
- !y && P && /* @__PURE__ */ q(w, {
650
+ !y && F && /* @__PURE__ */ J(w, {
651
651
  type: "text",
652
- icon: /* @__PURE__ */ q(be, {}),
653
- onClick: () => N(!0),
652
+ icon: /* @__PURE__ */ J(ye, {}),
653
+ onClick: () => P(!0),
654
654
  "aria-label": "Open navigation"
655
655
  }),
656
- /* @__PURE__ */ q("div", { style: {
656
+ /* @__PURE__ */ J("div", { style: {
657
657
  flex: 1,
658
658
  minWidth: 0
659
659
  } }),
660
660
  i,
661
- /* @__PURE__ */ q(rt, {}),
662
- /* @__PURE__ */ q(A, {
661
+ /* @__PURE__ */ J(nt, {}),
662
+ /* @__PURE__ */ J(A, {
663
663
  menu: {
664
- items: _e,
665
- onClick: ve
664
+ items: ge,
665
+ onClick: _e
666
666
  },
667
667
  trigger: ["click"],
668
- children: /* @__PURE__ */ J(w, {
668
+ children: /* @__PURE__ */ Y(w, {
669
669
  type: "text",
670
670
  style: {
671
671
  display: "inline-flex",
672
672
  alignItems: "center",
673
- gap: F.marginXS,
674
- maxWidth: P ? 44 : void 0,
675
- paddingInline: P ? F.paddingXS : void 0
673
+ gap: I.marginXS,
674
+ maxWidth: F ? 44 : void 0,
675
+ paddingInline: F ? I.paddingXS : void 0
676
676
  },
677
677
  "aria-label": "Account menu",
678
- children: [/* @__PURE__ */ q(C, {
678
+ children: [/* @__PURE__ */ J(C, {
679
679
  size: "small",
680
- icon: /* @__PURE__ */ q(De, {})
681
- }), !P && /* @__PURE__ */ q(W.Text, {
680
+ icon: /* @__PURE__ */ J(Ee, {})
681
+ }), !F && /* @__PURE__ */ J(G.Text, {
682
682
  type: "secondary",
683
683
  ellipsis: !0,
684
684
  style: { maxWidth: 160 },
@@ -687,7 +687,7 @@ function Pt({ navItems: e, brand: t = "Admin", collapsedBrand: n = "A", mobileDr
687
687
  })
688
688
  })
689
689
  ]
690
- }), /* @__PURE__ */ q(I.Content, {
690
+ }), /* @__PURE__ */ J(L.Content, {
691
691
  style: {
692
692
  minWidth: 0,
693
693
  flex: 1,
@@ -695,15 +695,15 @@ function Pt({ navItems: e, brand: t = "Admin", collapsedBrand: n = "A", mobileDr
695
695
  display: "flex",
696
696
  flexDirection: "column"
697
697
  },
698
- children: /* @__PURE__ */ q(at, {
699
- ref: te,
698
+ children: /* @__PURE__ */ J(it, {
699
+ ref: ee,
700
700
  style: {
701
- margin: P ? F.marginSM : F.marginLG,
701
+ margin: F ? I.marginSM : I.marginLG,
702
702
  flex: 1,
703
703
  minHeight: 0,
704
704
  overflow: "auto"
705
705
  },
706
- children: /* @__PURE__ */ q(m, {})
706
+ children: /* @__PURE__ */ J(m, {})
707
707
  })
708
708
  })]
709
709
  })
@@ -713,30 +713,30 @@ function Pt({ navItems: e, brand: t = "Admin", collapsedBrand: n = "A", mobileDr
713
713
  //#endregion
714
714
  //#region src/router/guards.tsx
715
715
  function Ft({ when: e, redirect: t, children: n }) {
716
- return e ? n : /* @__PURE__ */ q(p, {
716
+ return e ? n : /* @__PURE__ */ J(p, {
717
717
  to: t,
718
718
  replace: !0
719
719
  });
720
720
  }
721
721
  function It({ children: e, redirectTo: t = "/login" }) {
722
- let { isAuthenticated: n } = ut();
723
- return /* @__PURE__ */ q(Ft, {
722
+ let { isAuthenticated: n } = lt();
723
+ return /* @__PURE__ */ J(Ft, {
724
724
  when: n,
725
725
  redirect: t,
726
726
  children: e
727
727
  });
728
728
  }
729
729
  function Lt({ children: e, redirectTo: t = "/" }) {
730
- let { isAuthenticated: n } = ut();
731
- return /* @__PURE__ */ q(Ft, {
730
+ let { isAuthenticated: n } = lt();
731
+ return /* @__PURE__ */ J(Ft, {
732
732
  when: !n,
733
733
  redirect: t,
734
734
  children: e
735
735
  });
736
736
  }
737
737
  function Rt({ permission: e, redirect: t, children: n }) {
738
- return /* @__PURE__ */ q(Ft, {
739
- when: X()(e),
738
+ return /* @__PURE__ */ J(Ft, {
739
+ when: mt()(e),
740
740
  redirect: t,
741
741
  children: n
742
742
  });
@@ -790,7 +790,7 @@ function Gt({ navItems: e, children: t, layoutProps: n, redirects: r }) {
790
790
  let { loginPath: i, homePath: a } = Ut(t, r), { guest: o, public: s, protected: c } = Bt(t), l = [];
791
791
  for (let e of o) !("path" in e) || !e.path || l.push({
792
792
  path: Vt(e.path),
793
- element: /* @__PURE__ */ q(Lt, {
793
+ element: /* @__PURE__ */ J(Lt, {
794
794
  redirectTo: a,
795
795
  children: e.element
796
796
  })
@@ -801,9 +801,9 @@ function Gt({ navItems: e, children: t, layoutProps: n, redirects: r }) {
801
801
  });
802
802
  return c.length > 0 && l.push({
803
803
  path: "/",
804
- element: /* @__PURE__ */ q(It, {
804
+ element: /* @__PURE__ */ J(It, {
805
805
  redirectTo: i,
806
- children: /* @__PURE__ */ q(Pt, {
806
+ children: /* @__PURE__ */ J(Pt, {
807
807
  navItems: e,
808
808
  loginPath: i,
809
809
  ...n
@@ -812,7 +812,7 @@ function Gt({ navItems: e, children: t, layoutProps: n, redirects: r }) {
812
812
  children: c.map(Wt)
813
813
  }), l.push({
814
814
  path: "*",
815
- element: /* @__PURE__ */ q(p, {
815
+ element: /* @__PURE__ */ J(p, {
816
816
  to: a,
817
817
  replace: !0
818
818
  })
@@ -832,9 +832,9 @@ function Kt({ navItems: e, routes: t, authRedirects: n, layoutProps: r, theme: i
832
832
  r,
833
833
  n
834
834
  ]);
835
- return /* @__PURE__ */ q(Ze, {
835
+ return /* @__PURE__ */ J(Xe, {
836
836
  ...i,
837
- children: /* @__PURE__ */ q(h, { router: a })
837
+ children: /* @__PURE__ */ J(h, { router: a })
838
838
  });
839
839
  }
840
840
  //#endregion
@@ -842,7 +842,7 @@ function Kt({ navItems: e, routes: t, authRedirects: n, layoutProps: r, theme: i
842
842
  var qt = t(null);
843
843
  function Jt({ children: e, value: t }) {
844
844
  let n = l(() => t, [t]);
845
- return /* @__PURE__ */ q(qt.Provider, {
845
+ return /* @__PURE__ */ J(qt.Provider, {
846
846
  value: n,
847
847
  children: e
848
848
  });
@@ -1188,7 +1188,7 @@ function Fn(e) {
1188
1188
  //#endregion
1189
1189
  //#region src/components/AuthAlternateLink.tsx
1190
1190
  function In({ prompt: e, linkText: t, to: n }) {
1191
- return /* @__PURE__ */ J(W.Paragraph, {
1191
+ return /* @__PURE__ */ Y(G.Paragraph, {
1192
1192
  type: "secondary",
1193
1193
  style: {
1194
1194
  textAlign: "center",
@@ -1197,7 +1197,7 @@ function In({ prompt: e, linkText: t, to: n }) {
1197
1197
  children: [
1198
1198
  e,
1199
1199
  " ",
1200
- /* @__PURE__ */ q(f, {
1200
+ /* @__PURE__ */ J(f, {
1201
1201
  to: n,
1202
1202
  children: t
1203
1203
  })
@@ -1207,8 +1207,8 @@ function In({ prompt: e, linkText: t, to: n }) {
1207
1207
  //#endregion
1208
1208
  //#region src/layouts/AuthPageLayout.tsx
1209
1209
  function Ln({ children: e, brand: t, footer: n, showThemeToolbar: r = !0 }) {
1210
- let { token: i } = G.useToken();
1211
- return /* @__PURE__ */ J(j, {
1210
+ let { token: i } = K.useToken();
1211
+ return /* @__PURE__ */ Y(j, {
1212
1212
  vertical: !0,
1213
1213
  align: "stretch",
1214
1214
  style: {
@@ -1219,7 +1219,7 @@ function Ln({ children: e, brand: t, footer: n, showThemeToolbar: r = !0 }) {
1219
1219
  background: i.colorBgLayout
1220
1220
  },
1221
1221
  children: [
1222
- r ? /* @__PURE__ */ q(j, {
1222
+ r ? /* @__PURE__ */ J(j, {
1223
1223
  justify: "flex-end",
1224
1224
  style: {
1225
1225
  flexShrink: 0,
@@ -1227,9 +1227,9 @@ function Ln({ children: e, brand: t, footer: n, showThemeToolbar: r = !0 }) {
1227
1227
  padding: 16,
1228
1228
  background: i.colorBgLayout
1229
1229
  },
1230
- children: /* @__PURE__ */ q(rt, {})
1230
+ children: /* @__PURE__ */ J(nt, {})
1231
1231
  }) : null,
1232
- t ? /* @__PURE__ */ q("div", {
1232
+ t ? /* @__PURE__ */ J("div", {
1233
1233
  style: {
1234
1234
  flexShrink: 0,
1235
1235
  textAlign: "center",
@@ -1237,14 +1237,14 @@ function Ln({ children: e, brand: t, footer: n, showThemeToolbar: r = !0 }) {
1237
1237
  },
1238
1238
  children: t
1239
1239
  }) : null,
1240
- /* @__PURE__ */ q(at, {
1240
+ /* @__PURE__ */ J(it, {
1241
1241
  style: {
1242
1242
  flex: 1,
1243
1243
  minHeight: 0,
1244
1244
  width: "100%",
1245
1245
  background: i.colorBgLayout
1246
1246
  },
1247
- children: /* @__PURE__ */ J(j, {
1247
+ children: /* @__PURE__ */ Y(j, {
1248
1248
  vertical: !0,
1249
1249
  align: "center",
1250
1250
  justify: "flex-start",
@@ -1253,7 +1253,7 @@ function Ln({ children: e, brand: t, footer: n, showThemeToolbar: r = !0 }) {
1253
1253
  minHeight: "100%",
1254
1254
  padding: "0 24px 24px"
1255
1255
  },
1256
- children: [e, n ? /* @__PURE__ */ q("div", {
1256
+ children: [e, n ? /* @__PURE__ */ J("div", {
1257
1257
  style: {
1258
1258
  marginTop: 16,
1259
1259
  width: "100%",
@@ -1269,26 +1269,26 @@ function Ln({ children: e, brand: t, footer: n, showThemeToolbar: r = !0 }) {
1269
1269
  //#endregion
1270
1270
  //#region src/pages/LoginPage.tsx
1271
1271
  function Rn({ title: e = "Sign in", description: t = "Use any username and password to continue.", logo: n, brand: r, extraFields: i, showThemeToolbar: a = !0, afterLoginPath: o = "/", alternateAuth: s, footer: c }) {
1272
- let { login: l } = ut(), u = v();
1273
- return /* @__PURE__ */ q(Ln, {
1272
+ let { login: l } = lt(), u = v();
1273
+ return /* @__PURE__ */ J(Ln, {
1274
1274
  brand: r ?? n,
1275
- footer: c ?? (s ? /* @__PURE__ */ q(In, {
1275
+ footer: c ?? (s ? /* @__PURE__ */ J(In, {
1276
1276
  prompt: s.prompt ?? "Don't have an account?",
1277
1277
  linkText: s.linkText,
1278
1278
  to: s.to
1279
1279
  }) : null),
1280
1280
  showThemeToolbar: a,
1281
- children: /* @__PURE__ */ J(T, {
1281
+ children: /* @__PURE__ */ Y(T, {
1282
1282
  style: {
1283
1283
  width: "100%",
1284
1284
  maxWidth: 360
1285
1285
  },
1286
1286
  title: e,
1287
- children: [t ? /* @__PURE__ */ q(W.Paragraph, {
1287
+ children: [t ? /* @__PURE__ */ J(G.Paragraph, {
1288
1288
  type: "secondary",
1289
1289
  style: { marginTop: 0 },
1290
1290
  children: t
1291
- }) : null, /* @__PURE__ */ J(M, {
1291
+ }) : null, /* @__PURE__ */ Y(M, {
1292
1292
  layout: "vertical",
1293
1293
  onFinish: async (e) => {
1294
1294
  await l({
@@ -1298,28 +1298,28 @@ function Rn({ title: e = "Sign in", description: t = "Use any username and passw
1298
1298
  }), u(o, { replace: !0 });
1299
1299
  },
1300
1300
  children: [
1301
- /* @__PURE__ */ q(M.Item, {
1301
+ /* @__PURE__ */ J(M.Item, {
1302
1302
  name: "username",
1303
1303
  label: "Username",
1304
1304
  rules: [{
1305
1305
  required: !0,
1306
1306
  message: "Required"
1307
1307
  }],
1308
- children: /* @__PURE__ */ q(P, { autoComplete: "username" })
1308
+ children: /* @__PURE__ */ J(F, { autoComplete: "username" })
1309
1309
  }),
1310
- /* @__PURE__ */ q(M.Item, {
1310
+ /* @__PURE__ */ J(M.Item, {
1311
1311
  name: "password",
1312
1312
  label: "Password",
1313
1313
  rules: [{
1314
1314
  required: !0,
1315
1315
  message: "Required"
1316
1316
  }],
1317
- children: /* @__PURE__ */ q(P.Password, { autoComplete: "current-password" })
1317
+ children: /* @__PURE__ */ J(F.Password, { autoComplete: "current-password" })
1318
1318
  }),
1319
1319
  i,
1320
- /* @__PURE__ */ q(M.Item, {
1320
+ /* @__PURE__ */ J(M.Item, {
1321
1321
  style: { marginBottom: 0 },
1322
- children: /* @__PURE__ */ q(w, {
1322
+ children: /* @__PURE__ */ J(w, {
1323
1323
  type: "primary",
1324
1324
  htmlType: "submit",
1325
1325
  block: !0,
@@ -1334,7 +1334,7 @@ function Rn({ title: e = "Sign in", description: t = "Use any username and passw
1334
1334
  //#endregion
1335
1335
  //#region src/pages/PlaceholderPage.tsx
1336
1336
  function zn({ title: e }) {
1337
- return /* @__PURE__ */ q(W.Title, {
1337
+ return /* @__PURE__ */ J(G.Title, {
1338
1338
  level: 3,
1339
1339
  style: { marginTop: 0 },
1340
1340
  children: e
@@ -1343,7 +1343,7 @@ function zn({ title: e }) {
1343
1343
  //#endregion
1344
1344
  //#region src/components/AppHub.tsx
1345
1345
  function Bn({ apps: e, menuItems: t, onAppClick: n, onMenuClick: r, menuSearchPlaceholder: i = "Search menus across apps…", className: a, maxWidth: o = 960, loading: s = !1 }) {
1346
- let c = v(), { token: u } = G.useToken(), [f, p] = d(""), m = (e) => {
1346
+ let c = v(), { token: u } = K.useToken(), [f, p] = d(""), m = (e) => {
1347
1347
  if (n) {
1348
1348
  n(e);
1349
1349
  return;
@@ -1356,7 +1356,7 @@ function Bn({ apps: e, menuItems: t, onAppClick: n, onMenuClick: r, menuSearchPl
1356
1356
  }
1357
1357
  c(e.path);
1358
1358
  }, g = f.trim(), _ = l(() => t && g ? bt(t, g) : [], [t, g]), y = !!(t && g);
1359
- return /* @__PURE__ */ J("div", {
1359
+ return /* @__PURE__ */ Y("div", {
1360
1360
  className: a,
1361
1361
  style: {
1362
1362
  width: "100%",
@@ -1364,25 +1364,25 @@ function Bn({ apps: e, menuItems: t, onAppClick: n, onMenuClick: r, menuSearchPl
1364
1364
  marginInline: "auto",
1365
1365
  paddingInline: u.paddingMD
1366
1366
  },
1367
- children: [t?.length && !s ? /* @__PURE__ */ q("div", {
1367
+ children: [t?.length && !s ? /* @__PURE__ */ J("div", {
1368
1368
  style: {
1369
1369
  maxWidth: 480,
1370
1370
  margin: "0 auto 24px"
1371
1371
  },
1372
- children: /* @__PURE__ */ q(it, {
1372
+ children: /* @__PURE__ */ J(rt, {
1373
1373
  value: f,
1374
1374
  onChange: p,
1375
1375
  placeholder: i,
1376
1376
  variant: "app"
1377
1377
  })
1378
- }) : null, s ? /* @__PURE__ */ q("div", {
1378
+ }) : null, s ? /* @__PURE__ */ J("div", {
1379
1379
  style: {
1380
1380
  display: "flex",
1381
1381
  justifyContent: "center",
1382
1382
  padding: u.paddingXL
1383
1383
  },
1384
- children: /* @__PURE__ */ q(oe, { size: "large" })
1385
- }) : y ? /* @__PURE__ */ q(te, {
1384
+ children: /* @__PURE__ */ J(ae, { size: "large" })
1385
+ }) : y ? /* @__PURE__ */ J(ee, {
1386
1386
  bordered: !0,
1387
1387
  dataSource: _,
1388
1388
  locale: { emptyText: "No menus match your search." },
@@ -1392,50 +1392,50 @@ function Bn({ apps: e, menuItems: t, onAppClick: n, onMenuClick: r, menuSearchPl
1392
1392
  },
1393
1393
  renderItem: (e) => {
1394
1394
  let t = e.Icon;
1395
- return /* @__PURE__ */ q(te.Item, {
1395
+ return /* @__PURE__ */ J(ee.Item, {
1396
1396
  style: { cursor: "pointer" },
1397
1397
  onClick: () => h(e),
1398
- children: /* @__PURE__ */ q(te.Item.Meta, {
1399
- avatar: t ? /* @__PURE__ */ q("span", {
1398
+ children: /* @__PURE__ */ J(ee.Item.Meta, {
1399
+ avatar: t ? /* @__PURE__ */ J("span", {
1400
1400
  style: {
1401
1401
  fontSize: 20,
1402
1402
  lineHeight: 1
1403
1403
  },
1404
- children: /* @__PURE__ */ q(t, {})
1404
+ children: /* @__PURE__ */ J(t, {})
1405
1405
  }) : void 0,
1406
1406
  title: _t(e),
1407
1407
  description: e.group
1408
1408
  })
1409
1409
  });
1410
1410
  }
1411
- }) : /* @__PURE__ */ q(R, {
1411
+ }) : /* @__PURE__ */ J(z, {
1412
1412
  gutter: [16, 16],
1413
1413
  justify: "center",
1414
1414
  children: e.map((e) => {
1415
1415
  let t = e.Icon;
1416
- return /* @__PURE__ */ q(E, {
1416
+ return /* @__PURE__ */ J(E, {
1417
1417
  xs: 12,
1418
1418
  sm: 8,
1419
1419
  md: 6,
1420
1420
  lg: 4,
1421
1421
  style: { maxWidth: 200 },
1422
- children: /* @__PURE__ */ q(T, {
1422
+ children: /* @__PURE__ */ J(T, {
1423
1423
  hoverable: !0,
1424
1424
  onClick: () => m(e),
1425
1425
  styles: { body: {
1426
1426
  textAlign: "center",
1427
1427
  padding: u.paddingLG
1428
1428
  } },
1429
- children: /* @__PURE__ */ J(B, {
1429
+ children: /* @__PURE__ */ Y(V, {
1430
1430
  orientation: "vertical",
1431
1431
  size: "middle",
1432
- children: [t ? /* @__PURE__ */ q("span", {
1432
+ children: [t ? /* @__PURE__ */ J("span", {
1433
1433
  style: {
1434
1434
  fontSize: 40,
1435
1435
  lineHeight: 1
1436
1436
  },
1437
- children: /* @__PURE__ */ q(t, {})
1438
- }) : null, /* @__PURE__ */ q(W.Text, {
1437
+ children: /* @__PURE__ */ J(t, {})
1438
+ }) : null, /* @__PURE__ */ J(G.Text, {
1439
1439
  strong: !0,
1440
1440
  children: e.label
1441
1441
  })]
@@ -1450,9 +1450,9 @@ function Bn({ apps: e, menuItems: t, onAppClick: n, onMenuClick: r, menuSearchPl
1450
1450
  //#region src/components/AppLauncherButton.tsx
1451
1451
  function Vn({ hubPath: e = "/", label: t = "Apps", onClick: n }) {
1452
1452
  let r = v();
1453
- return /* @__PURE__ */ q(w, {
1453
+ return /* @__PURE__ */ J(w, {
1454
1454
  type: "text",
1455
- icon: /* @__PURE__ */ q(ue, {}),
1455
+ icon: /* @__PURE__ */ J(le, {}),
1456
1456
  onClick: () => {
1457
1457
  if (n) {
1458
1458
  n();
@@ -1522,7 +1522,7 @@ function Kn({ children: e, toggleSort: t, sort: n }) {
1522
1522
  c,
1523
1523
  u
1524
1524
  ]);
1525
- return /* @__PURE__ */ q(Gn.Provider, {
1525
+ return /* @__PURE__ */ J(Gn.Provider, {
1526
1526
  value: f,
1527
1527
  children: e
1528
1528
  });
@@ -1569,7 +1569,7 @@ function Qn({ value: e, onChange: t, placeholder: n, debounceMs: r }) {
1569
1569
  r,
1570
1570
  t,
1571
1571
  e
1572
- ]), /* @__PURE__ */ q(P, {
1572
+ ]), /* @__PURE__ */ J(F, {
1573
1573
  allowClear: !0,
1574
1574
  placeholder: n,
1575
1575
  value: i,
@@ -1586,7 +1586,7 @@ function $n({ source: e, label: t, placeholder: n, debounceMs: r }) {
1586
1586
  key: e,
1587
1587
  source: e,
1588
1588
  label: t,
1589
- render: ({ value: r, onChange: i }) => /* @__PURE__ */ q(Qn, {
1589
+ render: ({ value: r, onChange: i }) => /* @__PURE__ */ J(Qn, {
1590
1590
  value: r,
1591
1591
  onChange: i,
1592
1592
  placeholder: n ?? t ?? e,
@@ -1624,7 +1624,7 @@ function tr({ children: e, values: t, setFilterValue: n, textFilterDebounceMs: r
1624
1624
  s,
1625
1625
  r
1626
1626
  ]);
1627
- return /* @__PURE__ */ q(er.Provider, {
1627
+ return /* @__PURE__ */ J(er.Provider, {
1628
1628
  value: c,
1629
1629
  children: e
1630
1630
  });
@@ -1642,7 +1642,7 @@ function rr(e) {
1642
1642
  //#region src/crud/context/FormContext.tsx
1643
1643
  var ir = t(null);
1644
1644
  function ar({ children: e, resource: t, isNew: n, disabled: r }) {
1645
- return /* @__PURE__ */ q(ir.Provider, {
1645
+ return /* @__PURE__ */ J(ir.Provider, {
1646
1646
  value: {
1647
1647
  resource: t,
1648
1648
  isNew: n,
@@ -1658,7 +1658,7 @@ function or() {
1658
1658
  //#region src/crud/context/FormSectionContext.tsx
1659
1659
  var sr = t(null);
1660
1660
  function cr({ sourcesRef: e, children: t }) {
1661
- return /* @__PURE__ */ q(sr.Provider, {
1661
+ return /* @__PURE__ */ J(sr.Provider, {
1662
1662
  value: e,
1663
1663
  children: t
1664
1664
  });
@@ -1670,7 +1670,7 @@ function lr() {
1670
1670
  //#region src/crud/context/PayloadFieldsContext.tsx
1671
1671
  var ur = t(null);
1672
1672
  function dr({ children: e, fieldsRef: t }) {
1673
- return /* @__PURE__ */ q(ur.Provider, {
1673
+ return /* @__PURE__ */ J(ur.Provider, {
1674
1674
  value: t,
1675
1675
  children: e
1676
1676
  });
@@ -1706,7 +1706,7 @@ function mr(e, t = !0) {
1706
1706
  //#region src/crud/context/InlineFieldsRegistry.tsx
1707
1707
  var hr = t(null);
1708
1708
  function gr({ children: e, registryRef: t }) {
1709
- return /* @__PURE__ */ q(hr.Provider, {
1709
+ return /* @__PURE__ */ J(hr.Provider, {
1710
1710
  value: t,
1711
1711
  children: e
1712
1712
  });
@@ -1737,22 +1737,22 @@ function vr(e, t, n, r, i = !0) {
1737
1737
  //#endregion
1738
1738
  //#region src/crud/FormGlobalErrorsAlert.tsx
1739
1739
  function yr({ errors: e }) {
1740
- return e.length ? e.length === 1 ? /* @__PURE__ */ q(x, {
1740
+ return e.length ? e.length === 1 ? /* @__PURE__ */ J(x, {
1741
1741
  type: "error",
1742
1742
  title: e[0],
1743
1743
  showIcon: !0,
1744
1744
  style: { marginBottom: 16 }
1745
- }) : /* @__PURE__ */ q(x, {
1745
+ }) : /* @__PURE__ */ J(x, {
1746
1746
  type: "error",
1747
1747
  title: "Could not save",
1748
1748
  showIcon: !0,
1749
1749
  style: { marginBottom: 16 },
1750
- description: /* @__PURE__ */ q("ul", {
1750
+ description: /* @__PURE__ */ J("ul", {
1751
1751
  style: {
1752
1752
  margin: 0,
1753
1753
  paddingLeft: 20
1754
1754
  },
1755
- children: e.map((e) => /* @__PURE__ */ q("li", { children: e }, e))
1755
+ children: e.map((e) => /* @__PURE__ */ J("li", { children: e }, e))
1756
1756
  })
1757
1757
  }) : null;
1758
1758
  }
@@ -1832,7 +1832,10 @@ function Dr(e, t = !0) {
1832
1832
  }
1833
1833
  //#endregion
1834
1834
  //#region src/crud/utils/toFormData.ts
1835
- function Or(e, t, n, r) {
1835
+ function Or(e, t) {
1836
+ return /\[[0-9]+\]$/.test(e) ? `${e}${t}` : `${e}.${t}`;
1837
+ }
1838
+ function kr(e, t, n, r) {
1836
1839
  if (n !== void 0) {
1837
1840
  if (n === null) {
1838
1841
  e.append(t, "");
@@ -1853,80 +1856,80 @@ function Or(e, t, n, r) {
1853
1856
  }
1854
1857
  if (Array.isArray(n)) {
1855
1858
  n.forEach((n, i) => {
1856
- Or(e, `${t}[${i}]`, n, r);
1859
+ kr(e, `${t}[${i}]`, n, r);
1857
1860
  });
1858
1861
  return;
1859
1862
  }
1860
1863
  if (typeof n == "object") {
1861
- for (let [i, a] of Object.entries(n)) Or(e, `${t}[${i}]`, a, r);
1864
+ for (let [i, a] of Object.entries(n)) kr(e, Or(t, i), a, r);
1862
1865
  return;
1863
1866
  }
1864
1867
  e.append(t, String(n));
1865
1868
  }
1866
1869
  }
1867
- function kr(e, t) {
1870
+ function Ar(e, t) {
1868
1871
  let n = { skipExistingUploadUrls: t?.skipExistingUploadUrls ?? !0 }, r = new FormData();
1869
- for (let [t, i] of Object.entries(e)) Or(r, t, i, n);
1872
+ for (let [t, i] of Object.entries(e)) kr(r, t, i, n);
1870
1873
  return r;
1871
1874
  }
1872
1875
  //#endregion
1873
1876
  //#region src/crud/utils/prepareFormSubmitBody.ts
1874
- function Ar(e, t) {
1877
+ function jr(e, t) {
1875
1878
  let n = t?.skipExistingUploadUrls ?? !0;
1876
- return wr(e) ? kr(e, t) : Dr(e, n);
1879
+ return wr(e) ? Ar(e, t) : Dr(e, n);
1877
1880
  }
1878
1881
  //#endregion
1879
1882
  //#region src/crud/utils/buildResourceFormSubmitBody.ts
1880
- function jr(e, t, n, r) {
1883
+ function Mr(e, t, n, r) {
1881
1884
  let i = Sr(e, t);
1882
1885
  if (n) for (let t of n) {
1883
1886
  let n = e[t.field], r = t.payloadKey ?? t.field;
1884
1887
  i[r] = Cr(n, t.sources, { transformRows: t.transformRows });
1885
1888
  }
1886
- return Ar(i, r);
1889
+ return jr(i, r);
1887
1890
  }
1888
1891
  //#endregion
1889
1892
  //#region src/crud/utils/formErrors.ts
1890
- function Mr(e) {
1893
+ function Nr(e) {
1891
1894
  return e ? Array.isArray(e) ? e : [e] : [];
1892
1895
  }
1893
- function Nr(e) {
1896
+ function Pr(e) {
1894
1897
  return Array.isArray(e) ? e.join(", ") : e;
1895
1898
  }
1896
- function Pr(e, t, n) {
1899
+ function Fr(e, t, n) {
1897
1900
  if (t.has(e)) return !0;
1898
1901
  let r = e.match(/^([^.]+)\.(\d+)\.([^.]+)$/);
1899
1902
  if (!r) return !1;
1900
1903
  let [, i, , a] = r;
1901
1904
  return n.get(i)?.sources.includes(a) ?? !1;
1902
1905
  }
1903
- function Fr(e, t, n) {
1904
- let r = {}, i = [...Mr(e.global)];
1905
- for (let [a, o] of Object.entries(e.fields ?? {})) Pr(a, t, n) ? r[a] = o : i.push(Nr(o));
1906
+ function Ir(e, t, n) {
1907
+ let r = {}, i = [...Nr(e.global)];
1908
+ for (let [a, o] of Object.entries(e.fields ?? {})) Fr(a, t, n) ? r[a] = o : i.push(Pr(o));
1906
1909
  return {
1907
1910
  fieldErrors: r,
1908
1911
  globalErrors: i
1909
1912
  };
1910
1913
  }
1911
- function Ir(e, t) {
1914
+ function Lr(e, t) {
1912
1915
  for (let [n, r] of Object.entries(t)) e.setError(n, {
1913
1916
  type: "server",
1914
- message: Nr(r)
1917
+ message: Pr(r)
1915
1918
  });
1916
1919
  }
1917
- function Lr(e) {
1920
+ function Rr(e) {
1918
1921
  let t = ln(e);
1919
1922
  if (t && !/application\/json/i.test(t)) return `non-JSON response (Content-Type: ${t})`;
1920
1923
  }
1921
- async function Rr(e, t, n, r, i) {
1924
+ async function zr(e, t, n, r, i) {
1922
1925
  let a = await fn(n);
1923
1926
  if (a != null) {
1924
1927
  let n = e.parseFormError?.({ body: a }, r);
1925
1928
  if (n) {
1926
1929
  let e = new Set(i.payloadFields), r = /* @__PURE__ */ new Map();
1927
1930
  for (let e of i.inlineRegistry) r.set(e.field, e);
1928
- let { fieldErrors: a, globalErrors: o } = Fr(n, e, r);
1929
- if (Object.keys(a).length || o.length) return Ir(t, a), {
1931
+ let { fieldErrors: a, globalErrors: o } = Ir(n, e, r);
1932
+ if (Object.keys(a).length || o.length) return Lr(t, a), {
1930
1933
  handled: !0,
1931
1934
  globalErrors: o
1932
1935
  };
@@ -1941,12 +1944,12 @@ async function Rr(e, t, n, r, i) {
1941
1944
  globalErrors: []
1942
1945
  } : {
1943
1946
  handled: !0,
1944
- globalErrors: [sn(null, { hint: Lr(n) })]
1947
+ globalErrors: [sn(null, { hint: Rr(n) })]
1945
1948
  };
1946
1949
  }
1947
1950
  //#endregion
1948
1951
  //#region src/crud/utils/useAbortableEffect.ts
1949
- function zr(e, t) {
1952
+ function Br(e, t) {
1950
1953
  s(() => {
1951
1954
  let t = new AbortController();
1952
1955
  return e(t.signal), () => t.abort();
@@ -1954,7 +1957,7 @@ function zr(e, t) {
1954
1957
  }
1955
1958
  //#endregion
1956
1959
  //#region src/crud/utils/useFormRecord.ts
1957
- function Br({ dp: e, resource: t, id: n, isNew: r, form: i, message: o, defaultValues: s, enabled: c = !0 }) {
1960
+ function Vr({ dp: e, resource: t, id: n, isNew: r, form: i, message: o, defaultValues: s, enabled: c = !0 }) {
1958
1961
  let [l, u] = d(!r), [f, p] = d(0), m = a(async (a) => {
1959
1962
  if (r || !n) {
1960
1963
  s ? i.reset({ ...s }) : i.reset({}), u(!1);
@@ -1979,20 +1982,20 @@ function Br({ dp: e, resource: t, id: n, isNew: r, form: i, message: o, defaultV
1979
1982
  o,
1980
1983
  s
1981
1984
  ]);
1982
- return zr((e) => {
1985
+ return Br((e) => {
1983
1986
  if (c) return m(e);
1984
1987
  }, [c, m]), {
1985
1988
  loading: l,
1986
1989
  formVersion: f
1987
1990
  };
1988
1991
  }
1989
- function Vr({ dp: e, resource: t, id: n, isNew: r, form: i, message: o, payloadFieldsRef: s, inlineRegistryRef: c, setGlobalErrors: l, onSuccess: u }) {
1992
+ function Hr({ dp: e, resource: t, id: n, isNew: r, form: i, message: o, payloadFieldsRef: s, inlineRegistryRef: c, setGlobalErrors: l, onSuccess: u }) {
1990
1993
  let [f, p] = d(!1);
1991
1994
  return {
1992
1995
  onSubmit: a(async (a) => {
1993
1996
  l([]), p(!0);
1994
1997
  try {
1995
- let i = jr(a, Array.from(s.current), c.current.values()), l;
1998
+ let i = Mr(a, Array.from(s.current), c.current.values()), l;
1996
1999
  if (r) l = (await e.create(t, i)).data, o.success("Created");
1997
2000
  else if (n) l = (await e.update(t, {
1998
2001
  id: n,
@@ -2001,7 +2004,7 @@ function Vr({ dp: e, resource: t, id: n, isNew: r, form: i, message: o, payloadF
2001
2004
  else return;
2002
2005
  u?.(l);
2003
2006
  } catch (n) {
2004
- let { handled: a, globalErrors: u } = await Rr(e, i, n, {
2007
+ let { handled: a, globalErrors: u } = await zr(e, i, n, {
2005
2008
  resource: t,
2006
2009
  mutation: r ? "create" : "update",
2007
2010
  inlineFieldPaths: Array.from(c.current.keys())
@@ -2030,8 +2033,8 @@ function Vr({ dp: e, resource: t, id: n, isNew: r, form: i, message: o, payloadF
2030
2033
  }
2031
2034
  //#endregion
2032
2035
  //#region src/crud/ResourceRecordForm.tsx
2033
- function Hr({ resource: e, id: t, children: r, defaultValues: i, enabled: a = !0, canSave: o = !0, onCancel: s, cancelHref: c, onSuccess: l, loadingMode: p = "overlay" }) {
2034
- let m = t === "new" || !t, h = m ? void 0 : t, g = Yt(), { message: _ } = S.useApp(), v = u(/* @__PURE__ */ new Set()), y = u(/* @__PURE__ */ new Map()), [b, x] = d([]), C = je({ defaultValues: i }), { loading: T, formVersion: E } = Br({
2036
+ function Ur({ resource: e, id: t, children: r, defaultValues: i, enabled: a = !0, canSave: o = !0, onCancel: s, cancelHref: c, onSuccess: l, loadingMode: p = "overlay" }) {
2037
+ let m = t === "new" || !t, h = m ? void 0 : t, g = Yt(), { message: _ } = S.useApp(), v = u(/* @__PURE__ */ new Set()), y = u(/* @__PURE__ */ new Map()), [b, x] = d([]), C = Ae({ defaultValues: i }), { loading: T, formVersion: E } = Vr({
2035
2038
  dp: g,
2036
2039
  resource: e,
2037
2040
  id: h,
@@ -2040,7 +2043,7 @@ function Hr({ resource: e, id: t, children: r, defaultValues: i, enabled: a = !0
2040
2043
  message: _,
2041
2044
  defaultValues: i,
2042
2045
  enabled: a
2043
- }), { onSubmit: D, saving: O } = Vr({
2046
+ }), { onSubmit: D, saving: O } = Hr({
2044
2047
  dp: g,
2045
2048
  resource: e,
2046
2049
  id: h,
@@ -2055,20 +2058,20 @@ function Hr({ resource: e, id: t, children: r, defaultValues: i, enabled: a = !0
2055
2058
  C.handleSubmit(D, () => {
2056
2059
  _.warning("Please fix the errors below.");
2057
2060
  })();
2058
- }, j = /* @__PURE__ */ q(w, {
2061
+ }, j = /* @__PURE__ */ J(w, {
2059
2062
  disabled: k,
2060
2063
  onClick: c ? void 0 : s,
2061
2064
  children: "Cancel"
2062
- }), ee = /* @__PURE__ */ q(ar, {
2065
+ }), N = /* @__PURE__ */ J(ar, {
2063
2066
  resource: e,
2064
2067
  isNew: m,
2065
- children: /* @__PURE__ */ q(dr, {
2068
+ children: /* @__PURE__ */ J(dr, {
2066
2069
  fieldsRef: v,
2067
- children: /* @__PURE__ */ q(gr, {
2070
+ children: /* @__PURE__ */ J(gr, {
2068
2071
  registryRef: y,
2069
- children: /* @__PURE__ */ J("div", {
2072
+ children: /* @__PURE__ */ Y("div", {
2070
2073
  style: { position: "relative" },
2071
- children: [k && p === "overlay" ? /* @__PURE__ */ q("div", {
2074
+ children: [k && p === "overlay" ? /* @__PURE__ */ J("div", {
2072
2075
  style: {
2073
2076
  position: "absolute",
2074
2077
  inset: 0,
@@ -2077,11 +2080,11 @@ function Hr({ resource: e, id: t, children: r, defaultValues: i, enabled: a = !0
2077
2080
  justifyContent: "center",
2078
2081
  zIndex: 1
2079
2082
  },
2080
- children: /* @__PURE__ */ q(oe, {})
2081
- }) : null, /* @__PURE__ */ n(ke, {
2083
+ children: /* @__PURE__ */ J(ae, {})
2084
+ }) : null, /* @__PURE__ */ n(Oe, {
2082
2085
  ...C,
2083
2086
  key: E
2084
- }, /* @__PURE__ */ J(M, {
2087
+ }, /* @__PURE__ */ Y(M, {
2085
2088
  layout: "vertical",
2086
2089
  onFinish: A,
2087
2090
  style: p === "overlay" ? {
@@ -2089,20 +2092,20 @@ function Hr({ resource: e, id: t, children: r, defaultValues: i, enabled: a = !0
2089
2092
  pointerEvents: k ? "none" : void 0
2090
2093
  } : void 0,
2091
2094
  children: [
2092
- /* @__PURE__ */ q(yr, { errors: b }),
2095
+ /* @__PURE__ */ J(yr, { errors: b }),
2093
2096
  r,
2094
- /* @__PURE__ */ q(M.Item, {
2097
+ /* @__PURE__ */ J(M.Item, {
2095
2098
  style: {
2096
2099
  marginTop: 16,
2097
2100
  marginBottom: 0
2098
2101
  },
2099
- children: /* @__PURE__ */ J(B, { children: [/* @__PURE__ */ q(w, {
2102
+ children: /* @__PURE__ */ Y(V, { children: [/* @__PURE__ */ J(w, {
2100
2103
  type: "primary",
2101
2104
  htmlType: "submit",
2102
2105
  loading: O,
2103
2106
  disabled: k || !o,
2104
2107
  children: "Save"
2105
- }), c ? /* @__PURE__ */ q(f, {
2108
+ }), c ? /* @__PURE__ */ J(f, {
2106
2109
  to: c,
2107
2110
  children: j
2108
2111
  }) : j] })
@@ -2113,13 +2116,13 @@ function Hr({ resource: e, id: t, children: r, defaultValues: i, enabled: a = !0
2113
2116
  })
2114
2117
  })
2115
2118
  });
2116
- return T && !O && p === "replace" ? /* @__PURE__ */ q(oe, {}) : ee;
2119
+ return T && !O && p === "replace" ? /* @__PURE__ */ J(ae, {}) : N;
2117
2120
  }
2118
2121
  //#endregion
2119
2122
  //#region src/crud/ResourceFormModal.tsx
2120
- function Ur({ resource: e, editId: t, onClose: n, children: r, title: i, permissions: a, defaultValues: o, width: s = 560, onSuccess: c }) {
2121
- let l = t === "new", u = t != null, d = X(), f = i ?? (l ? `New ${e}` : `Edit ${e}`), p = a ? Z(d, a, l ? "add" : "change") : !0;
2122
- return /* @__PURE__ */ q(ne, {
2123
+ function Wr({ resource: e, editId: t, onClose: n, children: r, title: i, permissions: a, defaultValues: o, width: s = 560, onSuccess: c }) {
2124
+ let l = t === "new", u = t != null, d = mt(), f = i ?? (l ? `New ${e}` : `Edit ${e}`), p = a ? Z(d, a, l ? "add" : "change") : !0;
2125
+ return /* @__PURE__ */ J(te, {
2123
2126
  open: u,
2124
2127
  title: f,
2125
2128
  onCancel: n,
@@ -2127,7 +2130,7 @@ function Ur({ resource: e, editId: t, onClose: n, children: r, title: i, permiss
2127
2130
  destroyOnHidden: !0,
2128
2131
  width: s,
2129
2132
  maskClosable: !1,
2130
- children: /* @__PURE__ */ q(S, { children: /* @__PURE__ */ q(Hr, {
2133
+ children: /* @__PURE__ */ J(S, { children: /* @__PURE__ */ J(Ur, {
2131
2134
  resource: e,
2132
2135
  id: t ?? void 0,
2133
2136
  enabled: u,
@@ -2144,7 +2147,7 @@ function Ur({ resource: e, editId: t, onClose: n, children: r, title: i, permiss
2144
2147
  }
2145
2148
  //#endregion
2146
2149
  //#region src/crud/ListActionsBar.tsx
2147
- function Wr({ selectedCount: e, total: t, allPageSelected: n, allMatchingSelected: r, onSelectAllMatching: i, onClearSelection: o, actions: s, onExecute: c, selectedIds: u, running: f = !1 }) {
2150
+ function Gr({ selectedCount: e, total: t, allPageSelected: n, allMatchingSelected: r, onSelectAllMatching: i, onClearSelection: o, actions: s, onExecute: c, selectedIds: u, running: f = !1 }) {
2148
2151
  let [p, m] = d(), h = l(() => s.map((e) => ({
2149
2152
  value: e.key,
2150
2153
  label: e.label
@@ -2158,7 +2161,7 @@ function Wr({ selectedCount: e, total: t, allPageSelected: n, allMatchingSelecte
2158
2161
  e,
2159
2162
  u
2160
2163
  ]), _ = n && !r && t > e;
2161
- return /* @__PURE__ */ J(B, {
2164
+ return /* @__PURE__ */ Y(V, {
2162
2165
  wrap: !0,
2163
2166
  style: {
2164
2167
  marginBottom: 16,
@@ -2166,7 +2169,7 @@ function Wr({ selectedCount: e, total: t, allPageSelected: n, allMatchingSelecte
2166
2169
  },
2167
2170
  align: "center",
2168
2171
  children: [
2169
- /* @__PURE__ */ J(W.Text, {
2172
+ /* @__PURE__ */ Y(G.Text, {
2170
2173
  type: "secondary",
2171
2174
  children: [
2172
2175
  e,
@@ -2175,17 +2178,17 @@ function Wr({ selectedCount: e, total: t, allPageSelected: n, allMatchingSelecte
2175
2178
  " selected"
2176
2179
  ]
2177
2180
  }),
2178
- e > 0 ? /* @__PURE__ */ q(w, {
2181
+ e > 0 ? /* @__PURE__ */ J(w, {
2179
2182
  type: "link",
2180
2183
  size: "small",
2181
2184
  onClick: o,
2182
2185
  style: { padding: 0 },
2183
2186
  children: "Clear selection"
2184
2187
  }) : null,
2185
- _ ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(W.Text, {
2188
+ _ ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(G.Text, {
2186
2189
  type: "secondary",
2187
2190
  children: "·"
2188
- }), /* @__PURE__ */ J(w, {
2191
+ }), /* @__PURE__ */ Y(w, {
2189
2192
  type: "link",
2190
2193
  size: "small",
2191
2194
  onClick: i,
@@ -2196,10 +2199,10 @@ function Wr({ selectedCount: e, total: t, allPageSelected: n, allMatchingSelecte
2196
2199
  " items matching filter"
2197
2200
  ]
2198
2201
  })] }) : null,
2199
- r && t > 0 ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(W.Text, {
2202
+ r && t > 0 ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(G.Text, {
2200
2203
  type: "secondary",
2201
2204
  children: "·"
2202
- }), /* @__PURE__ */ J(W.Text, {
2205
+ }), /* @__PURE__ */ Y(G.Text, {
2203
2206
  type: "success",
2204
2207
  children: [
2205
2208
  "All ",
@@ -2207,7 +2210,7 @@ function Wr({ selectedCount: e, total: t, allPageSelected: n, allMatchingSelecte
2207
2210
  " items selected"
2208
2211
  ]
2209
2212
  })] }) : null,
2210
- /* @__PURE__ */ q(z, {
2213
+ /* @__PURE__ */ J(B, {
2211
2214
  placeholder: "Action",
2212
2215
  style: { minWidth: 200 },
2213
2216
  options: h,
@@ -2216,7 +2219,7 @@ function Wr({ selectedCount: e, total: t, allPageSelected: n, allMatchingSelecte
2216
2219
  disabled: e === 0 || f,
2217
2220
  allowClear: !0
2218
2221
  }),
2219
- /* @__PURE__ */ q(w, {
2222
+ /* @__PURE__ */ J(w, {
2220
2223
  type: "primary",
2221
2224
  onClick: () => void g(),
2222
2225
  disabled: !p || e === 0 || f,
@@ -2228,14 +2231,14 @@ function Wr({ selectedCount: e, total: t, allPageSelected: n, allMatchingSelecte
2228
2231
  }
2229
2232
  //#endregion
2230
2233
  //#region src/crud/types.ts
2231
- var Gr = new Set([
2234
+ var Kr = new Set([
2232
2235
  "page",
2233
2236
  "perPage",
2234
2237
  "sort",
2235
2238
  "create",
2236
2239
  "edit"
2237
- ]), Kr = 1, qr = 10;
2238
- function Jr(e) {
2240
+ ]), qr = 1, Jr = 10;
2241
+ function Yr(e) {
2239
2242
  if (e.includes(",")) {
2240
2243
  let t = e.split(",").map((e) => e.trim()), n = t.map(Number);
2241
2244
  return n.every((e) => Number.isFinite(e)) ? n : t;
@@ -2243,16 +2246,16 @@ function Jr(e) {
2243
2246
  let t = Number(e);
2244
2247
  return e !== "" && Number.isFinite(t) && String(t) === e ? t : e === "true" ? !0 : e === "false" ? !1 : e;
2245
2248
  }
2246
- function Yr(e) {
2249
+ function Xr(e) {
2247
2250
  return e == null || e === "" ? null : Array.isArray(e) ? e.length === 0 ? null : e.map(String).join(",") : String(e);
2248
2251
  }
2249
- function Xr(e) {
2252
+ function Zr(e) {
2250
2253
  let [t, n] = b(), r = l(() => {
2251
- let n = t.get("page"), r = t.get("perPage"), i = n ? Math.max(1, Number(n) || Kr) : Kr, a = r ? Math.max(1, Number(r) || qr) : qr, o = t.getAll("sort"), s = o.length > 0 ? o.flatMap((e) => Hn(e)) : Hn(t.get("sort")), c = { ...e };
2254
+ let n = t.get("page"), r = t.get("perPage"), i = n ? Math.max(1, Number(n) || qr) : qr, a = r ? Math.max(1, Number(r) || Jr) : Jr, o = t.getAll("sort"), s = o.length > 0 ? o.flatMap((e) => Hn(e)) : Hn(t.get("sort")), c = { ...e };
2252
2255
  return t.forEach((e, n) => {
2253
- if (Gr.has(n)) return;
2256
+ if (Kr.has(n)) return;
2254
2257
  let r = c[n];
2255
- r === void 0 ? t.getAll(n).length > 1 ? c[n] = t.getAll(n).map(Jr) : c[n] = Jr(e) : c[n] = [...Array.isArray(r) ? r : [r], Jr(e)];
2258
+ r === void 0 ? t.getAll(n).length > 1 ? c[n] = t.getAll(n).map(Yr) : c[n] = Yr(e) : c[n] = [...Array.isArray(r) ? r : [r], Yr(e)];
2256
2259
  }), {
2257
2260
  page: i,
2258
2261
  perPage: a,
@@ -2275,7 +2278,7 @@ function Xr(e) {
2275
2278
  },
2276
2279
  setPerPage: (e) => {
2277
2280
  i((t) => {
2278
- e === qr ? t.delete("perPage") : t.set("perPage", String(e)), t.delete("page");
2281
+ e === Jr ? t.delete("perPage") : t.set("perPage", String(e)), t.delete("page");
2279
2282
  });
2280
2283
  },
2281
2284
  setSort: (e) => {
@@ -2302,15 +2305,15 @@ function Xr(e) {
2302
2305
  setFilter: (e, t) => {
2303
2306
  i((n) => {
2304
2307
  n.delete(e);
2305
- let r = Yr(t);
2308
+ let r = Xr(t);
2306
2309
  r != null && n.set(e, r), n.delete("page");
2307
2310
  });
2308
2311
  },
2309
2312
  setFilters: (e) => {
2310
2313
  i((t) => {
2311
- for (let e of [...t.keys()]) Gr.has(e) || t.delete(e);
2314
+ for (let e of [...t.keys()]) Kr.has(e) || t.delete(e);
2312
2315
  for (let [n, r] of Object.entries(e)) {
2313
- let e = Yr(r);
2316
+ let e = Xr(r);
2314
2317
  e != null && t.set(n, e);
2315
2318
  }
2316
2319
  t.delete("page");
@@ -2335,25 +2338,25 @@ function Xr(e) {
2335
2338
  }
2336
2339
  //#endregion
2337
2340
  //#region src/crud/ResourceList.tsx
2338
- var Zr = t(null);
2339
- function Qr() {
2340
- return o(Zr);
2341
+ var Qr = t(null);
2342
+ function $r() {
2343
+ return o(Qr);
2341
2344
  }
2342
- function $r(e) {
2345
+ function ei(e) {
2343
2346
  return e == null || e === "" ? "—" : String(e);
2344
2347
  }
2345
- function ei(e, t) {
2348
+ function ti(e, t) {
2346
2349
  if (e.length === 0 || !t.showEdit && !t.showQuickEdit) return e;
2347
2350
  let [n, ...r] = e, i = n.render;
2348
2351
  return [{
2349
2352
  ...n,
2350
2353
  render: (e, n, r) => {
2351
- let a = i ? i(e, n, r) : $r(e);
2352
- return t.showEdit ? /* @__PURE__ */ q(f, {
2354
+ let a = i ? i(e, n, r) : ei(e);
2355
+ return t.showEdit ? /* @__PURE__ */ J(f, {
2353
2356
  to: `${t.pathPrefix}/${String(n.id)}`,
2354
2357
  className: "ding-admin-row-edit-link",
2355
2358
  children: a
2356
- }) : /* @__PURE__ */ q(w, {
2359
+ }) : /* @__PURE__ */ J(w, {
2357
2360
  type: "link",
2358
2361
  size: "small",
2359
2362
  className: "ding-admin-row-edit-link",
@@ -2368,13 +2371,13 @@ function ei(e, t) {
2368
2371
  }
2369
2372
  }, ...r];
2370
2373
  }
2371
- function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "page", formChildren: o, actions: s, rowActions: p, headerExtra: m, bulkActions: h, bulkDelete: g = !0, bulkActionsEnabled: _ = !0, permissions: v, queryState: y, queryActions: b }) {
2372
- let x = Yt(), C = X(), { message: E, modal: D } = S.useApp(), { token: O } = G.useToken(), { columns: k, sortOrders: A, sortPriorities: j } = qn(), M = u(null), [ee, N] = d(), [P, F] = d(!1), [I, te] = d([]), [L, ne] = d(0), [ie, R] = d(() => /* @__PURE__ */ new Set()), [ae, z] = d(!1), oe = r ?? `${n}/new`, V = Z(C, v, "add"), se = Z(C, v, "change"), H = Z(C, v, "delete"), le = se && (i === "page" || i === "both") && s?.edit !== !1, U = se && (i === "modal" || i === "both") && s?.quickEdit !== !1, ue = H && s?.delete !== !1, de = le || U || ue || p, me = a(() => {
2373
- R(/* @__PURE__ */ new Set());
2374
- }, []), he = l(() => {
2374
+ function ni({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "page", formChildren: o, actions: s, rowActions: p, headerExtra: m, bulkActions: h, bulkDelete: g = !0, bulkActionsEnabled: _ = !0, permissions: v, queryState: y, queryActions: b }) {
2375
+ let x = Yt(), C = mt(), { message: E, modal: D } = S.useApp(), { token: O } = K.useToken(), { columns: k, sortOrders: A, sortPriorities: j } = qn(), M = u(null), [N, P] = d(), [F, I] = d(!1), [L, ee] = d([]), [R, te] = d(0), [re, z] = d(() => /* @__PURE__ */ new Set()), [ie, B] = d(!1), ae = r ?? `${n}/new`, H = Z(C, v, "add"), oe = Z(C, v, "change"), U = Z(C, v, "delete"), ce = oe && (i === "page" || i === "both") && s?.edit !== !1, W = oe && (i === "modal" || i === "both") && s?.quickEdit !== !1, le = U && s?.delete !== !1, ue = ce || W || le || p, pe = a(() => {
2376
+ z(/* @__PURE__ */ new Set());
2377
+ }, []), me = l(() => {
2375
2378
  if (!_) return [];
2376
2379
  let t = [];
2377
- return g && H && t.push({
2380
+ return g && U && t.push({
2378
2381
  key: "__delete",
2379
2382
  label: "Delete selected",
2380
2383
  confirm: (e) => `Delete ${e.length} selected item(s)? This cannot be undone.`,
@@ -2385,12 +2388,12 @@ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2385
2388
  }, [
2386
2389
  _,
2387
2390
  g,
2388
- H,
2391
+ U,
2389
2392
  h,
2390
2393
  x,
2391
2394
  e,
2392
2395
  E
2393
- ]), ge = he.length > 0, _e = ie.size;
2396
+ ]), he = me.length > 0, ge = re.size;
2394
2397
  c(() => {
2395
2398
  let e = M.current;
2396
2399
  if (!e) return;
@@ -2399,7 +2402,7 @@ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2399
2402
  let n = () => {
2400
2403
  if (e.clientHeight <= 0) return;
2401
2404
  let t = e.querySelector(".ding-admin-resource-list-pagination"), n = e.querySelector(".ant-table-header"), r = t?.offsetHeight ?? 0, i = t ? parseFloat(getComputedStyle(t).marginTop) + parseFloat(getComputedStyle(t).marginBottom) : 0, a = n?.offsetHeight ?? 0, o = e.querySelector(".ant-table-body"), s = o && o.scrollWidth > o.clientWidth ? o.offsetHeight - o.clientHeight : 0, c = Math.max(120, Math.floor(e.clientHeight - a - r - i - s - 8));
2402
- N((e) => e === c ? e : c);
2405
+ P((e) => e === c ? e : c);
2403
2406
  };
2404
2407
  n();
2405
2408
  let r = new ResizeObserver(() => n());
@@ -2407,45 +2410,45 @@ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2407
2410
  t?.classList.remove("ding-admin-resource-list-scroll"), r.disconnect(), window.removeEventListener("resize", n);
2408
2411
  };
2409
2412
  }, [
2413
+ he,
2410
2414
  ge,
2411
- _e,
2412
- L,
2413
- P
2415
+ R,
2416
+ F
2414
2417
  ]);
2415
- let ve = I.length > 0 && I.every((e) => ie.has(e.id)), ye = L > 0 && _e >= L, be = l(() => I.filter((e) => ie.has(e.id)).map((e) => e.id), [I, ie]), xe = a((e) => {
2416
- R((t) => {
2417
- let n = new Set(t), r = I.map((e) => e.id);
2418
+ let _e = L.length > 0 && L.every((e) => re.has(e.id)), ve = R > 0 && ge >= R, ye = l(() => L.filter((e) => re.has(e.id)).map((e) => e.id), [L, re]), be = a((e) => {
2419
+ z((t) => {
2420
+ let n = new Set(t), r = L.map((e) => e.id);
2418
2421
  for (let t of r) e.includes(t) || n.delete(t);
2419
2422
  for (let t of e) n.add(t);
2420
2423
  return n;
2421
2424
  });
2422
- }, [I]), Se = a(async () => {
2423
- if (!(L <= 0)) {
2424
- z(!0);
2425
+ }, [L]), xe = a(async () => {
2426
+ if (!(R <= 0)) {
2427
+ B(!0);
2425
2428
  try {
2426
2429
  let t = y.sort.length === 0 ? void 0 : y.sort.length === 1 ? y.sort[0] : y.sort, n = await x.getList(e, {
2427
2430
  pagination: {
2428
2431
  page: 1,
2429
- perPage: L
2432
+ perPage: R
2430
2433
  },
2431
2434
  sort: t,
2432
2435
  filter: y.filter
2433
2436
  });
2434
- R(new Set(n.data.map((e) => e.id)));
2437
+ z(new Set(n.data.map((e) => e.id)));
2435
2438
  } catch (e) {
2436
2439
  E.error(e instanceof Error ? e.message : "Load failed");
2437
2440
  } finally {
2438
- z(!1);
2441
+ B(!1);
2439
2442
  }
2440
2443
  }
2441
2444
  }, [
2442
2445
  x,
2443
2446
  e,
2444
- L,
2447
+ R,
2445
2448
  y.sort,
2446
2449
  y.filter,
2447
2450
  E
2448
- ]), Ce = a((e) => {
2451
+ ]), Se = a((e) => {
2449
2452
  let t = (e) => {
2450
2453
  let t = e?.columnKey ?? e?.field;
2451
2454
  return t == null ? null : String(Array.isArray(t) ? t[0] : t);
@@ -2466,7 +2469,7 @@ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2466
2469
  return;
2467
2470
  }
2468
2471
  !e?.order && y.sort.length > 0 && b.setSort([]);
2469
- }, [b, y.sort.length]), we = l(() => {
2472
+ }, [b, y.sort.length]), Ce = l(() => {
2470
2473
  let e = y.sort.length === 0 ? void 0 : y.sort.length === 1 ? y.sort[0] : y.sort;
2471
2474
  return {
2472
2475
  pagination: {
@@ -2476,33 +2479,33 @@ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2476
2479
  sort: e,
2477
2480
  filter: y.filter
2478
2481
  };
2479
- }, [y]), Y = a(async (t) => {
2480
- F(!0);
2482
+ }, [y]), X = a(async (t) => {
2483
+ I(!0);
2481
2484
  try {
2482
2485
  let n = await x.getList(e, {
2483
- ...we,
2486
+ ...Ce,
2484
2487
  signal: t
2485
2488
  });
2486
2489
  if (t?.aborted) return;
2487
- te(n.data), ne(n.total);
2490
+ ee(n.data), te(n.total);
2488
2491
  } catch (e) {
2489
2492
  $t(e) || E.error(e instanceof Error ? e.message : "Load failed");
2490
2493
  } finally {
2491
- t?.aborted || F(!1);
2494
+ t?.aborted || I(!1);
2492
2495
  }
2493
2496
  }, [
2494
2497
  x,
2495
2498
  e,
2496
- we,
2499
+ Ce,
2497
2500
  E
2498
2501
  ]);
2499
- zr((e) => Y(e), [Y]);
2500
- let Te = l(() => ({
2501
- reload: () => void Y(),
2502
- clearSelection: me
2503
- }), [Y, me]), Ee = a(async (e, t) => {
2502
+ Br((e) => X(e), [X]);
2503
+ let we = l(() => ({
2504
+ reload: () => void X(),
2505
+ clearSelection: pe
2506
+ }), [X, pe]), Te = a(async (e, t) => {
2504
2507
  if (e.confirm) {
2505
- let n = typeof e.confirm == "function" ? await e.confirm(t, Te) : e.confirm;
2508
+ let n = typeof e.confirm == "function" ? await e.confirm(t, we) : e.confirm;
2506
2509
  if (n === !1 || !await new Promise((t) => {
2507
2510
  D.confirm({
2508
2511
  title: n,
@@ -2512,35 +2515,35 @@ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2512
2515
  });
2513
2516
  })) return;
2514
2517
  }
2515
- z(!0);
2518
+ B(!0);
2516
2519
  try {
2517
- await e.execute(t, Te);
2520
+ await e.execute(t, we);
2518
2521
  } catch (e) {
2519
2522
  E.error(e instanceof Error ? e.message : "Action failed");
2520
2523
  } finally {
2521
- z(!1);
2524
+ B(!1);
2522
2525
  }
2523
2526
  }, [
2524
- Te,
2527
+ we,
2525
2528
  D,
2526
2529
  E
2527
- ]), De = a(async (t) => {
2528
- if (H) try {
2529
- await x.delete(e, t.id), E.success("Deleted"), Y();
2530
+ ]), Ee = a(async (t) => {
2531
+ if (U) try {
2532
+ await x.delete(e, t.id), E.success("Deleted"), X();
2530
2533
  } catch (e) {
2531
2534
  E.error(e instanceof Error ? e.message : "Delete failed");
2532
2535
  }
2533
2536
  }, [
2534
- H,
2537
+ U,
2535
2538
  x,
2536
2539
  e,
2537
- Y,
2540
+ X,
2538
2541
  E
2539
- ]), Oe = l(() => {
2542
+ ]), De = l(() => {
2540
2543
  let e = k.map((e) => {
2541
2544
  let t = e.buildColumn();
2542
2545
  if (e.sortable) {
2543
- let n = A.get(e.source), r = j.get(e.source), i = n === "ASC" ? "ascend" : n === "DESC" ? "descend" : void 0, a = i == null ? void 0 : /* @__PURE__ */ J("span", {
2546
+ let n = A.get(e.source), r = j.get(e.source), i = n === "ASC" ? "ascend" : n === "DESC" ? "descend" : void 0, a = i == null ? void 0 : /* @__PURE__ */ Y("span", {
2544
2547
  style: {
2545
2548
  display: "inline-flex",
2546
2549
  alignItems: "center",
@@ -2548,7 +2551,7 @@ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2548
2551
  marginInlineStart: 4,
2549
2552
  color: "var(--ant-color-primary)"
2550
2553
  },
2551
- children: [r == null ? null : /* @__PURE__ */ q("span", {
2554
+ children: [r == null ? null : /* @__PURE__ */ J("span", {
2552
2555
  style: {
2553
2556
  fontSize: 11,
2554
2557
  fontWeight: 600,
@@ -2557,7 +2560,7 @@ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2557
2560
  textAlign: "center"
2558
2561
  },
2559
2562
  children: r
2560
- }), q(i === "ascend" ? pe : fe, { style: { fontSize: 11 } })]
2563
+ }), J(i === "ascend" ? fe : de, { style: { fontSize: 11 } })]
2561
2564
  });
2562
2565
  return {
2563
2566
  ...t,
@@ -2568,39 +2571,39 @@ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2568
2571
  }
2569
2572
  return t;
2570
2573
  });
2571
- if (!de) return ei(e, {
2572
- showEdit: le,
2573
- showQuickEdit: U,
2574
+ if (!ue) return ti(e, {
2575
+ showEdit: ce,
2576
+ showQuickEdit: W,
2574
2577
  pathPrefix: n,
2575
2578
  openEditModal: b.openEditModal
2576
2579
  });
2577
2580
  let t = {
2578
- reload: () => void Y(),
2581
+ reload: () => void X(),
2579
2582
  openEditModal: b.openEditModal
2580
2583
  }, r = {
2581
2584
  title: "Actions",
2582
2585
  key: "__actions",
2583
2586
  width: i === "both" ? 200 : 160,
2584
- render: (e, r) => /* @__PURE__ */ J(B, {
2587
+ render: (e, r) => /* @__PURE__ */ Y(V, {
2585
2588
  size: "small",
2586
2589
  wrap: !0,
2587
2590
  children: [
2588
- le ? /* @__PURE__ */ q(f, {
2591
+ ce ? /* @__PURE__ */ J(f, {
2589
2592
  to: `${n}/${String(r.id)}`,
2590
2593
  children: "Edit"
2591
2594
  }) : null,
2592
- U ? /* @__PURE__ */ q(w, {
2595
+ W ? /* @__PURE__ */ J(w, {
2593
2596
  type: "link",
2594
2597
  size: "small",
2595
2598
  style: { padding: 0 },
2596
2599
  onClick: () => b.openEditModal(r.id),
2597
2600
  children: i === "both" ? "Quick edit" : "Edit"
2598
2601
  }) : null,
2599
- ue ? /* @__PURE__ */ q(w, {
2602
+ le ? /* @__PURE__ */ J(w, {
2600
2603
  type: "link",
2601
2604
  danger: !0,
2602
2605
  size: "small",
2603
- onClick: () => void De(r),
2606
+ onClick: () => void Ee(r),
2604
2607
  style: { padding: 0 },
2605
2608
  children: "Delete"
2606
2609
  }) : null,
@@ -2608,27 +2611,27 @@ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2608
2611
  ]
2609
2612
  })
2610
2613
  };
2611
- return ei([...e, r], {
2612
- showEdit: le,
2613
- showQuickEdit: U,
2614
+ return ti([...e, r], {
2615
+ showEdit: ce,
2616
+ showQuickEdit: W,
2614
2617
  pathPrefix: n,
2615
2618
  openEditModal: b.openEditModal
2616
2619
  });
2617
2620
  }, [
2618
2621
  k,
2619
- de,
2620
- le,
2621
- U,
2622
2622
  ue,
2623
+ ce,
2624
+ W,
2625
+ le,
2623
2626
  i,
2624
2627
  n,
2625
- De,
2628
+ Ee,
2626
2629
  A,
2627
2630
  j,
2628
2631
  b,
2629
2632
  p,
2630
- Y
2631
- ]), ke = a((e, t) => {
2633
+ X
2634
+ ]), Oe = a((e, t) => {
2632
2635
  if (t !== y.perPage) {
2633
2636
  b.setPerPage(t);
2634
2637
  return;
@@ -2638,85 +2641,85 @@ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2638
2641
  b,
2639
2642
  y.page,
2640
2643
  y.perPage
2641
- ]), Ae = o && (y.createModal || y.editId != null) && (i === "modal" || i === "both");
2642
- return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ J(T, {
2643
- title: /* @__PURE__ */ q(W.Title, {
2644
+ ]), ke = o && (y.createModal || y.editId != null) && (i === "modal" || i === "both");
2645
+ return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ Y(T, {
2646
+ title: /* @__PURE__ */ J(G.Title, {
2644
2647
  level: 5,
2645
2648
  style: { margin: 0 },
2646
2649
  children: t
2647
2650
  }),
2648
- extra: m || V ? /* @__PURE__ */ J(B, { children: [m, V ? i === "modal" || i === "both" ? /* @__PURE__ */ J(K, { children: [i === "both" ? /* @__PURE__ */ q(f, {
2649
- to: oe,
2650
- children: /* @__PURE__ */ q(w, { children: "New page" })
2651
- }) : null, /* @__PURE__ */ q(w, {
2651
+ extra: m || H ? /* @__PURE__ */ Y(V, { children: [m, H ? i === "modal" || i === "both" ? /* @__PURE__ */ Y(q, { children: [i === "both" ? /* @__PURE__ */ J(f, {
2652
+ to: ae,
2653
+ children: /* @__PURE__ */ J(w, { children: "New page" })
2654
+ }) : null, /* @__PURE__ */ J(w, {
2652
2655
  type: "primary",
2653
2656
  onClick: () => b.openCreateModal(),
2654
2657
  children: "New"
2655
- })] }) : /* @__PURE__ */ q(f, {
2656
- to: oe,
2657
- children: /* @__PURE__ */ q(w, {
2658
+ })] }) : /* @__PURE__ */ J(f, {
2659
+ to: ae,
2660
+ children: /* @__PURE__ */ J(w, {
2658
2661
  type: "primary",
2659
2662
  children: "New"
2660
2663
  })
2661
2664
  }) : null] }) : null,
2662
- children: [ge ? /* @__PURE__ */ q(Wr, {
2663
- selectedCount: _e,
2664
- total: L,
2665
- allPageSelected: ve,
2666
- allMatchingSelected: ye,
2667
- onSelectAllMatching: () => void Se(),
2668
- onClearSelection: me,
2669
- actions: he,
2670
- onExecute: Ee,
2671
- selectedIds: [...ie],
2672
- running: ae || P
2673
- }) : null, /* @__PURE__ */ J("div", {
2665
+ children: [he ? /* @__PURE__ */ J(Gr, {
2666
+ selectedCount: ge,
2667
+ total: R,
2668
+ allPageSelected: _e,
2669
+ allMatchingSelected: ve,
2670
+ onSelectAllMatching: () => void xe(),
2671
+ onClearSelection: pe,
2672
+ actions: me,
2673
+ onExecute: Te,
2674
+ selectedIds: [...re],
2675
+ running: ie || F
2676
+ }) : null, /* @__PURE__ */ Y("div", {
2674
2677
  ref: M,
2675
2678
  className: "ding-admin-resource-list-table",
2676
2679
  style: {
2677
2680
  "--ding-scroll-thumb": O.colorTextQuaternary,
2678
2681
  "--ding-scroll-thumb-hover": O.colorTextTertiary
2679
2682
  },
2680
- children: [/* @__PURE__ */ q(ce, {
2683
+ children: [/* @__PURE__ */ J(se, {
2681
2684
  rowKey: "id",
2682
- loading: P,
2683
- columns: Oe,
2684
- dataSource: I,
2685
+ loading: F,
2686
+ columns: De,
2687
+ dataSource: L,
2685
2688
  scroll: {
2686
2689
  x: "max-content",
2687
- ...ee ? { y: ee } : {}
2690
+ ...N ? { y: N } : {}
2688
2691
  },
2689
- rowSelection: ge ? {
2690
- selectedRowKeys: be,
2691
- onChange: xe,
2692
+ rowSelection: he ? {
2693
+ selectedRowKeys: ye,
2694
+ onChange: be,
2692
2695
  preserveSelectedRowKeys: !0
2693
2696
  } : void 0,
2694
2697
  pagination: !1,
2695
2698
  onChange: (e, t, n) => {
2696
- Ce(n);
2699
+ Se(n);
2697
2700
  }
2698
- }), /* @__PURE__ */ q("div", {
2701
+ }), /* @__PURE__ */ J("div", {
2699
2702
  className: "ding-admin-resource-list-pagination",
2700
- children: /* @__PURE__ */ q(re, {
2703
+ children: /* @__PURE__ */ J(ne, {
2701
2704
  current: y.page,
2702
2705
  pageSize: y.perPage,
2703
- total: L,
2706
+ total: R,
2704
2707
  showSizeChanger: !0,
2705
- onChange: ke
2708
+ onChange: Oe
2706
2709
  })
2707
2710
  })]
2708
2711
  })]
2709
- }), Ae ? /* @__PURE__ */ q(Ur, {
2712
+ }), ke ? /* @__PURE__ */ J(Wr, {
2710
2713
  resource: e,
2711
2714
  editId: y.createModal ? "new" : y.editId,
2712
2715
  onClose: () => {
2713
- b.closeModal(), Y();
2716
+ b.closeModal(), X();
2714
2717
  },
2715
2718
  children: o
2716
2719
  }) : null] });
2717
2720
  }
2718
- function ni({ resource: e, title: t, pathPrefix: n, newPath: r, staticFilter: i, textFilterDebounceMs: o, editMode: s = "page", syncQueryParams: c = !0, children: u, formChildren: d, actions: f, rowActions: p, headerExtra: m, bulkActions: h, bulkDelete: g, bulkActionsEnabled: _, permissions: v }) {
2719
- let [y, b] = Xr(i), x = l(() => {
2721
+ function ri({ resource: e, title: t, pathPrefix: n, newPath: r, staticFilter: i, textFilterDebounceMs: o, editMode: s = "page", syncQueryParams: c = !0, children: u, formChildren: d, actions: f, rowActions: p, headerExtra: m, bulkActions: h, bulkDelete: g, bulkActionsEnabled: _, permissions: v }) {
2722
+ let [y, b] = Zr(i), x = l(() => {
2720
2723
  if (!c) return i ?? {};
2721
2724
  let e = {};
2722
2725
  for (let [t, n] of Object.entries(y.filter)) i && t in i || (e[t] = n);
@@ -2731,18 +2734,18 @@ function ni({ resource: e, title: t, pathPrefix: n, newPath: r, staticFilter: i,
2731
2734
  filterValues: x,
2732
2735
  setFilterValue: S
2733
2736
  }), [x, S]);
2734
- return /* @__PURE__ */ q(Zr.Provider, {
2737
+ return /* @__PURE__ */ J(Qr.Provider, {
2735
2738
  value: C,
2736
- children: /* @__PURE__ */ q(tr, {
2739
+ children: /* @__PURE__ */ J(tr, {
2737
2740
  values: x,
2738
2741
  setFilterValue: S,
2739
2742
  textFilterDebounceMs: o,
2740
- children: /* @__PURE__ */ q(Kn, {
2743
+ children: /* @__PURE__ */ J(Kn, {
2741
2744
  toggleSort: b.toggleSort,
2742
2745
  sort: y.sort,
2743
- children: /* @__PURE__ */ J("div", {
2746
+ children: /* @__PURE__ */ Y("div", {
2744
2747
  className: "ding-admin-resource-list-root",
2745
- children: [u, /* @__PURE__ */ q(ti, {
2748
+ children: [u, /* @__PURE__ */ J(ni, {
2746
2749
  resource: e,
2747
2750
  title: t,
2748
2751
  pathPrefix: n,
@@ -2766,16 +2769,16 @@ function ni({ resource: e, title: t, pathPrefix: n, newPath: r, staticFilter: i,
2766
2769
  }
2767
2770
  //#endregion
2768
2771
  //#region src/crud/FilterBar.tsx
2769
- function ri() {
2772
+ function ii() {
2770
2773
  let e = nr();
2771
- return !e || e.filters.length === 0 ? null : /* @__PURE__ */ q(B, {
2774
+ return !e || e.filters.length === 0 ? null : /* @__PURE__ */ J(V, {
2772
2775
  wrap: !0,
2773
2776
  size: "middle",
2774
2777
  style: { marginBottom: 16 },
2775
- children: e.filters.map((t) => /* @__PURE__ */ J(B, {
2778
+ children: e.filters.map((t) => /* @__PURE__ */ Y(V, {
2776
2779
  orientation: "vertical",
2777
2780
  size: 2,
2778
- children: [t.label ? /* @__PURE__ */ q(W.Text, {
2781
+ children: [t.label ? /* @__PURE__ */ J(G.Text, {
2779
2782
  type: "secondary",
2780
2783
  style: { fontSize: 12 },
2781
2784
  children: t.label
@@ -2786,13 +2789,13 @@ function ri() {
2786
2789
  }, t.key))
2787
2790
  });
2788
2791
  }
2789
- function ii({ children: e }) {
2790
- return /* @__PURE__ */ J(K, { children: [e, /* @__PURE__ */ q(ri, {})] });
2792
+ function ai({ children: e }) {
2793
+ return /* @__PURE__ */ Y(q, { children: [e, /* @__PURE__ */ J(ii, {})] });
2791
2794
  }
2792
2795
  //#endregion
2793
2796
  //#region src/crud/ResourceForm.tsx
2794
- function ai({ resource: e, title: t, listPath: n, children: r, defaultValues: i, onSaved: a, stayOnPage: o, permissions: c }) {
2795
- let { id: l } = y(), u = l === "new" || !l, d = X(), p = v(), { token: m } = G.useToken();
2797
+ function oi({ resource: e, title: t, listPath: n, children: r, defaultValues: i, onSaved: a, stayOnPage: o, permissions: c }) {
2798
+ let { id: l } = y(), u = l === "new" || !l, d = mt(), p = v(), { token: m } = K.useToken();
2796
2799
  s(() => {
2797
2800
  c && (Z(d, c, u ? "add" : "change") || p(n, { replace: !0 }));
2798
2801
  }, [
@@ -2803,17 +2806,17 @@ function ai({ resource: e, title: t, listPath: n, children: r, defaultValues: i,
2803
2806
  n
2804
2807
  ]);
2805
2808
  let h = c ? Z(d, c, u ? "add" : "change") : !0;
2806
- return /* @__PURE__ */ q(T, {
2807
- title: /* @__PURE__ */ J(B, { children: [/* @__PURE__ */ J(f, {
2809
+ return /* @__PURE__ */ J(T, {
2810
+ title: /* @__PURE__ */ Y(V, { children: [/* @__PURE__ */ Y(f, {
2808
2811
  to: n,
2809
2812
  style: { color: m.colorText },
2810
- children: [/* @__PURE__ */ q(de, {}), " Back"]
2811
- }), /* @__PURE__ */ q(W.Title, {
2813
+ children: [/* @__PURE__ */ J(ue, {}), " Back"]
2814
+ }), /* @__PURE__ */ J(G.Title, {
2812
2815
  level: 5,
2813
2816
  style: { margin: 0 },
2814
2817
  children: t
2815
2818
  })] }),
2816
- children: /* @__PURE__ */ q(Hr, {
2819
+ children: /* @__PURE__ */ J(Ur, {
2817
2820
  resource: e,
2818
2821
  id: l,
2819
2822
  defaultValues: i,
@@ -2829,18 +2832,18 @@ function ai({ resource: e, title: t, listPath: n, children: r, defaultValues: i,
2829
2832
  }
2830
2833
  //#endregion
2831
2834
  //#region src/crud/utils/nestedFieldPath.ts
2832
- function oi(e, t, n) {
2835
+ function si(e, t, n) {
2833
2836
  return `${e}.${t}.${n}`;
2834
2837
  }
2835
2838
  //#endregion
2836
2839
  //#region src/crud/InlineFormSet.tsx
2837
- function si(e, t) {
2840
+ function ci(e, t) {
2838
2841
  let n = {};
2839
2842
  for (let r of e) n[r] = t?.[r] ?? void 0;
2840
2843
  return n;
2841
2844
  }
2842
- function ci(e, t, n) {
2843
- let { control: r } = Me(), { fields: i, append: a, remove: o } = Ae({
2845
+ function li(e, t, n) {
2846
+ let { control: r } = je(), { fields: i, append: a, remove: o } = ke({
2844
2847
  control: r,
2845
2848
  name: e,
2846
2849
  keyName: "rowKey"
@@ -2848,11 +2851,11 @@ function ci(e, t, n) {
2848
2851
  return {
2849
2852
  fields: i,
2850
2853
  remove: o,
2851
- appendEmpty: () => a(si(t, n))
2854
+ appendEmpty: () => a(ci(t, n))
2852
2855
  };
2853
2856
  }
2854
- function li({ field: e, label: t, payloadKey: n, transformRows: r, columns: i, defaultRow: a }) {
2855
- let o = l(() => i.map((e) => e.source), [i]), { fields: s, remove: c, appendEmpty: u } = ci(e, o, a);
2857
+ function ui({ field: e, label: t, payloadKey: n, transformRows: r, columns: i, defaultRow: a }) {
2858
+ let o = l(() => i.map((e) => e.source), [i]), { fields: s, remove: c, appendEmpty: u } = li(e, o, a);
2856
2859
  pr(e), vr(e, o, n, r);
2857
2860
  let d = l(() => i.map((t) => ({
2858
2861
  title: t.label ?? t.source,
@@ -2861,19 +2864,19 @@ function li({ field: e, label: t, payloadKey: n, transformRows: r, columns: i, d
2861
2864
  onHeaderCell: () => t.minWidth == null ? {} : { style: { minWidth: t.minWidth } },
2862
2865
  onCell: () => t.minWidth == null ? {} : { style: { minWidth: t.minWidth } },
2863
2866
  render: (n, r, i) => t.cell({
2864
- name: oi(e, i, t.source),
2867
+ name: si(e, i, t.source),
2865
2868
  index: i,
2866
2869
  field: e
2867
2870
  })
2868
2871
  })), [i, e]);
2869
- return /* @__PURE__ */ J("div", {
2872
+ return /* @__PURE__ */ Y("div", {
2870
2873
  style: { marginTop: 24 },
2871
2874
  children: [
2872
- /* @__PURE__ */ q(W.Title, {
2875
+ /* @__PURE__ */ J(G.Title, {
2873
2876
  level: 5,
2874
2877
  children: t ?? "Related items"
2875
2878
  }),
2876
- /* @__PURE__ */ q(ce, {
2879
+ /* @__PURE__ */ J(se, {
2877
2880
  size: "small",
2878
2881
  pagination: !1,
2879
2882
  scroll: { x: "max-content" },
@@ -2885,7 +2888,7 @@ function li({ field: e, label: t, payloadKey: n, transformRows: r, columns: i, d
2885
2888
  title: "",
2886
2889
  key: "__remove",
2887
2890
  width: 80,
2888
- render: (e, t, n) => /* @__PURE__ */ q(w, {
2891
+ render: (e, t, n) => /* @__PURE__ */ J(w, {
2889
2892
  type: "link",
2890
2893
  danger: !0,
2891
2894
  size: "small",
@@ -2894,7 +2897,7 @@ function li({ field: e, label: t, payloadKey: n, transformRows: r, columns: i, d
2894
2897
  })
2895
2898
  }]
2896
2899
  }),
2897
- /* @__PURE__ */ q(w, {
2900
+ /* @__PURE__ */ J(w, {
2898
2901
  type: "dashed",
2899
2902
  style: { marginTop: 8 },
2900
2903
  onClick: u,
@@ -2903,16 +2906,16 @@ function li({ field: e, label: t, payloadKey: n, transformRows: r, columns: i, d
2903
2906
  ]
2904
2907
  });
2905
2908
  }
2906
- function ui({ field: e, label: t, payloadKey: n, transformRows: r, sources: i, renderRow: a, getCardTitle: o, footer: s, defaultRow: c }) {
2907
- let { fields: l, remove: u, appendEmpty: d } = ci(e, i, c);
2908
- return pr(e), vr(e, i, n, r), /* @__PURE__ */ J("div", {
2909
+ function di({ field: e, label: t, payloadKey: n, transformRows: r, sources: i, renderRow: a, getCardTitle: o, footer: s, defaultRow: c }) {
2910
+ let { fields: l, remove: u, appendEmpty: d } = li(e, i, c);
2911
+ return pr(e), vr(e, i, n, r), /* @__PURE__ */ Y("div", {
2909
2912
  style: { marginTop: 24 },
2910
2913
  children: [
2911
- /* @__PURE__ */ q(W.Title, {
2914
+ /* @__PURE__ */ J(G.Title, {
2912
2915
  level: 5,
2913
2916
  children: t ?? "Related items"
2914
2917
  }),
2915
- /* @__PURE__ */ q(B, {
2918
+ /* @__PURE__ */ J(V, {
2916
2919
  orientation: "vertical",
2917
2920
  size: "middle",
2918
2921
  style: { width: "100%" },
@@ -2920,12 +2923,12 @@ function ui({ field: e, label: t, payloadKey: n, transformRows: r, sources: i, r
2920
2923
  let r = {
2921
2924
  field: e,
2922
2925
  index: n,
2923
- name: (t) => oi(e, n, t)
2926
+ name: (t) => si(e, n, t)
2924
2927
  };
2925
- return /* @__PURE__ */ q(T, {
2928
+ return /* @__PURE__ */ J(T, {
2926
2929
  size: "small",
2927
2930
  title: o?.(r) ?? `Item ${n + 1}`,
2928
- extra: /* @__PURE__ */ q(w, {
2931
+ extra: /* @__PURE__ */ J(w, {
2929
2932
  type: "link",
2930
2933
  danger: !0,
2931
2934
  size: "small",
@@ -2936,7 +2939,7 @@ function ui({ field: e, label: t, payloadKey: n, transformRows: r, sources: i, r
2936
2939
  }, t.rowKey);
2937
2940
  })
2938
2941
  }),
2939
- /* @__PURE__ */ q(w, {
2942
+ /* @__PURE__ */ J(w, {
2940
2943
  type: "dashed",
2941
2944
  style: { marginTop: 8 },
2942
2945
  onClick: d,
@@ -2948,22 +2951,22 @@ function ui({ field: e, label: t, payloadKey: n, transformRows: r, sources: i, r
2948
2951
  }
2949
2952
  //#endregion
2950
2953
  //#region src/crud/utils/formSectionErrors.ts
2951
- function di(e, t, n) {
2954
+ function fi(e, t, n) {
2952
2955
  for (let r of e) if (t(r, n).invalid) return !0;
2953
2956
  return !1;
2954
2957
  }
2955
- function fi(e) {
2958
+ function pi(e) {
2956
2959
  let t = u([]);
2957
2960
  for (; t.current.length < e;) t.current.push({ current: /* @__PURE__ */ new Set() });
2958
2961
  return t.current.length > e && (t.current.length = e), t.current;
2959
2962
  }
2960
- function pi(e, t) {
2961
- let { control: n, getFieldState: r, setFocus: i } = Me(), a = Ne({ control: n }), o = u(0), c = u(0);
2963
+ function mi(e, t) {
2964
+ let { control: n, getFieldState: r, setFocus: i } = je(), a = Me({ control: n }), o = u(0), c = u(0);
2962
2965
  s(() => {
2963
2966
  if (a.submitCount === 0) return;
2964
2967
  let n = Object.keys(a.errors).length, s = a.submitCount !== o.current, l = !s && n > 0 && c.current === 0;
2965
2968
  if (o.current = a.submitCount, c.current = n, !s && !l || n === 0) return;
2966
- let u = e.findIndex((e) => di(e.current, r, a));
2969
+ let u = e.findIndex((e) => fi(e.current, r, a));
2967
2970
  if (u < 0) return;
2968
2971
  t(u);
2969
2972
  let d = [...e[u].current].find((e) => r(e, a).invalid);
@@ -2982,38 +2985,38 @@ function pi(e, t) {
2982
2985
  }
2983
2986
  //#endregion
2984
2987
  //#region src/crud/FormTabs.tsx
2985
- function mi(e) {
2988
+ function hi(e) {
2986
2989
  return null;
2987
2990
  }
2988
- function hi(e) {
2989
- return i(e) && e.type === mi;
2991
+ function gi(e) {
2992
+ return i(e) && e.type === hi;
2990
2993
  }
2991
- function gi({ children: t, defaultActiveKey: n, activeKey: r, onChange: i, ...o }) {
2992
- let { token: s } = G.useToken(), c = l(() => e.toArray(t).filter(hi).map((e, t) => ({
2994
+ function _i({ children: t, defaultActiveKey: n, activeKey: r, onChange: i, ...o }) {
2995
+ let { token: s } = K.useToken(), c = l(() => e.toArray(t).filter(gi).map((e, t) => ({
2993
2996
  key: e.key ?? String(t),
2994
2997
  label: e.props.label,
2995
2998
  disabled: e.props.disabled,
2996
2999
  children: e.props.children
2997
- })), [t]), u = fi(c.length), f = r !== void 0, [p, m] = d(() => n ?? c[0]?.key ?? "0"), h = f ? r : p, g = a((e) => {
3000
+ })), [t]), u = pi(c.length), f = r !== void 0, [p, m] = d(() => n ?? c[0]?.key ?? "0"), h = f ? r : p, g = a((e) => {
2998
3001
  f || m(e), i?.(e);
2999
3002
  }, [f, i]);
3000
- pi(u, a((e) => {
3003
+ mi(u, a((e) => {
3001
3004
  let t = c[e]?.key;
3002
3005
  t != null && g(t);
3003
3006
  }, [g, c]));
3004
- let { control: _, getFieldState: v } = Me(), y = Ne({ control: _ });
3005
- return /* @__PURE__ */ q(H, {
3007
+ let { control: _, getFieldState: v } = je(), y = Me({ control: _ });
3008
+ return /* @__PURE__ */ J(U, {
3006
3009
  destroyOnHidden: !1,
3007
3010
  items: l(() => c.map((e, t) => {
3008
- let n = di(u[t].current, v, y);
3011
+ let n = fi(u[t].current, v, y);
3009
3012
  return {
3010
3013
  key: e.key,
3011
- label: n ? /* @__PURE__ */ q("span", {
3014
+ label: n ? /* @__PURE__ */ J("span", {
3012
3015
  style: { color: s.colorError },
3013
3016
  children: e.label
3014
3017
  }) : e.label,
3015
3018
  disabled: e.disabled,
3016
- children: /* @__PURE__ */ q(cr, {
3019
+ children: /* @__PURE__ */ J(cr, {
3017
3020
  sourcesRef: u[t],
3018
3021
  children: e.children
3019
3022
  })
@@ -3032,17 +3035,17 @@ function gi({ children: t, defaultActiveKey: n, activeKey: r, onChange: i, ...o
3032
3035
  }
3033
3036
  //#endregion
3034
3037
  //#region src/crud/FormSteps.tsx
3035
- function _i(e) {
3038
+ function vi(e) {
3036
3039
  return null;
3037
3040
  }
3038
- function vi(e) {
3039
- return i(e) && e.type === _i;
3041
+ function yi(e) {
3042
+ return i(e) && e.type === vi;
3040
3043
  }
3041
- function yi({ children: t, initialStep: n = 0, showNavigation: r = !0, allowStepSelect: i = !1, stepsStyle: o, navigationStyle: s, size: c, direction: u, type: f, status: p }) {
3042
- let m = l(() => e.toArray(t).filter(vi), [t]), h = fi(m.length), [g, _] = d(n), v = m.length - 1;
3043
- pi(h, _);
3044
- let { control: y, getFieldState: b } = Me(), x = Ne({ control: y }), S = l(() => m.map((e, t) => {
3045
- let n = di(h[t].current, b, x);
3044
+ function bi({ children: t, initialStep: n = 0, showNavigation: r = !0, allowStepSelect: i = !1, stepsStyle: o, navigationStyle: s, size: c, direction: u, type: f, status: p }) {
3045
+ let m = l(() => e.toArray(t).filter(yi), [t]), h = pi(m.length), [g, _] = d(n), v = m.length - 1;
3046
+ mi(h, _);
3047
+ let { control: y, getFieldState: b } = je(), x = Me({ control: y }), S = l(() => m.map((e, t) => {
3048
+ let n = fi(h[t].current, b, x);
3046
3049
  return {
3047
3050
  title: e.props.title,
3048
3051
  description: e.props.description,
@@ -3056,8 +3059,8 @@ function yi({ children: t, initialStep: n = 0, showNavigation: r = !0, allowStep
3056
3059
  ]), C = a((e) => {
3057
3060
  _(e);
3058
3061
  }, []);
3059
- return /* @__PURE__ */ J(K, { children: [
3060
- /* @__PURE__ */ q(V, {
3062
+ return /* @__PURE__ */ Y(q, { children: [
3063
+ /* @__PURE__ */ J(H, {
3061
3064
  current: g,
3062
3065
  items: S,
3063
3066
  style: {
@@ -3070,23 +3073,23 @@ function yi({ children: t, initialStep: n = 0, showNavigation: r = !0, allowStep
3070
3073
  type: f,
3071
3074
  status: p
3072
3075
  }),
3073
- m.map((e, t) => /* @__PURE__ */ q("div", {
3076
+ m.map((e, t) => /* @__PURE__ */ J("div", {
3074
3077
  style: { display: g === t ? void 0 : "none" },
3075
- children: /* @__PURE__ */ q(cr, {
3078
+ children: /* @__PURE__ */ J(cr, {
3076
3079
  sourcesRef: h[t],
3077
3080
  children: e.props.children
3078
3081
  })
3079
3082
  }, e.key ?? String(t))),
3080
- r && m.length > 1 ? /* @__PURE__ */ J(B, {
3083
+ r && m.length > 1 ? /* @__PURE__ */ Y(V, {
3081
3084
  style: {
3082
3085
  marginTop: 16,
3083
3086
  ...s
3084
3087
  },
3085
- children: [/* @__PURE__ */ q(w, {
3088
+ children: [/* @__PURE__ */ J(w, {
3086
3089
  disabled: g === 0,
3087
3090
  onClick: () => _((e) => e - 1),
3088
3091
  children: "Previous"
3089
- }), /* @__PURE__ */ q(w, {
3092
+ }), /* @__PURE__ */ J(w, {
3090
3093
  type: "primary",
3091
3094
  disabled: g === v,
3092
3095
  onClick: () => _((e) => e + 1),
@@ -3098,15 +3101,15 @@ function yi({ children: t, initialStep: n = 0, showNavigation: r = !0, allowStep
3098
3101
  //#endregion
3099
3102
  //#region src/crud/fields/FieldWrapper.tsx
3100
3103
  function $({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, children: o }) {
3101
- let s = t ?? e, c = !s.includes("."), { control: l } = Me(), u = or(), d = a ? void 0 : n ?? e, f = n ?? e;
3102
- return pr(e, c), mr(e, c), /* @__PURE__ */ q(Oe, {
3104
+ let s = t ?? e, c = !s.includes("."), { control: l } = je(), u = or(), d = a ? void 0 : n ?? e, f = n ?? e;
3105
+ return pr(e, c), mr(e, c), /* @__PURE__ */ J(De, {
3103
3106
  name: s,
3104
3107
  control: l,
3105
3108
  rules: {
3106
3109
  required: r ? `${f} is required` : !1,
3107
3110
  ...i
3108
3111
  },
3109
- render: ({ field: e, fieldState: t }) => /* @__PURE__ */ q(M.Item, {
3112
+ render: ({ field: e, fieldState: t }) => /* @__PURE__ */ J(M.Item, {
3110
3113
  label: d,
3111
3114
  validateStatus: t.error ? "error" : void 0,
3112
3115
  help: t.error?.message,
@@ -3124,15 +3127,15 @@ function $({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a,
3124
3127
  }
3125
3128
  //#endregion
3126
3129
  //#region src/crud/fields/TextField.tsx
3127
- function bi({ source: e, name: t, label: n, required: r, rules: i, placeholder: a, inputStyle: o, hideLabel: s }) {
3128
- return /* @__PURE__ */ q($, {
3130
+ function xi({ source: e, name: t, label: n, required: r, rules: i, placeholder: a, inputStyle: o, hideLabel: s }) {
3131
+ return /* @__PURE__ */ J($, {
3129
3132
  source: e,
3130
3133
  name: t,
3131
3134
  label: n,
3132
3135
  required: r,
3133
3136
  rules: i,
3134
3137
  hideLabel: s,
3135
- children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(P, {
3138
+ children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ J(F, {
3136
3139
  value: e,
3137
3140
  onChange: (e) => t(e.target.value),
3138
3141
  onBlur: n,
@@ -3144,15 +3147,15 @@ function bi({ source: e, name: t, label: n, required: r, rules: i, placeholder:
3144
3147
  }
3145
3148
  //#endregion
3146
3149
  //#region src/crud/fields/TextAreaField.tsx
3147
- function xi({ source: e, name: t, label: n, required: r, rules: i, placeholder: a, inputStyle: o, hideLabel: s, rows: c = 4, maxLength: l, showCount: u, autoSize: d }) {
3148
- return /* @__PURE__ */ q($, {
3150
+ function Si({ source: e, name: t, label: n, required: r, rules: i, placeholder: a, inputStyle: o, hideLabel: s, rows: c = 4, maxLength: l, showCount: u, autoSize: d }) {
3151
+ return /* @__PURE__ */ J($, {
3149
3152
  source: e,
3150
3153
  name: t,
3151
3154
  label: n,
3152
3155
  required: r,
3153
3156
  rules: i,
3154
3157
  hideLabel: s,
3155
- children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(P.TextArea, {
3158
+ children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ J(F.TextArea, {
3156
3159
  value: e,
3157
3160
  onChange: (e) => t(e.target.value),
3158
3161
  onBlur: n,
@@ -3168,15 +3171,15 @@ function xi({ source: e, name: t, label: n, required: r, rules: i, placeholder:
3168
3171
  }
3169
3172
  //#endregion
3170
3173
  //#region src/crud/fields/NumberField.tsx
3171
- function Si({ source: e, name: t, label: n, required: r, rules: i, min: a, max: o, step: s, inputStyle: c, hideLabel: l }) {
3172
- return /* @__PURE__ */ q($, {
3174
+ function Ci({ source: e, name: t, label: n, required: r, rules: i, min: a, max: o, step: s, inputStyle: c, hideLabel: l }) {
3175
+ return /* @__PURE__ */ J($, {
3173
3176
  source: e,
3174
3177
  name: t,
3175
3178
  label: n,
3176
3179
  required: r,
3177
3180
  rules: i,
3178
3181
  hideLabel: l,
3179
- children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(F, {
3182
+ children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ J(I, {
3180
3183
  value: e,
3181
3184
  onChange: (e) => t(e),
3182
3185
  onBlur: n,
@@ -3193,15 +3196,15 @@ function Si({ source: e, name: t, label: n, required: r, rules: i, min: a, max:
3193
3196
  }
3194
3197
  //#endregion
3195
3198
  //#region src/crud/fields/BooleanField.tsx
3196
- function Ci({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, disabled: o }) {
3197
- return /* @__PURE__ */ q($, {
3199
+ function wi({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, disabled: o }) {
3200
+ return /* @__PURE__ */ J($, {
3198
3201
  source: e,
3199
3202
  name: t,
3200
3203
  label: n,
3201
3204
  required: r,
3202
3205
  rules: i,
3203
3206
  hideLabel: a,
3204
- children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ q(se, {
3207
+ children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ J(oe, {
3205
3208
  checked: !!e,
3206
3209
  onChange: t,
3207
3210
  disabled: n || o
@@ -3210,7 +3213,7 @@ function Ci({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a,
3210
3213
  }
3211
3214
  //#endregion
3212
3215
  //#region src/crud/utils/parseDayjsValue.ts
3213
- var wi = /* @__PURE__ */ We((/* @__PURE__ */ He(((e, t) => {
3216
+ var Ti = /* @__PURE__ */ Ue((/* @__PURE__ */ Ve(((e, t) => {
3214
3217
  (function(n, r) {
3215
3218
  typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_customParseFormat = r();
3216
3219
  })(e, (function() {
@@ -3367,66 +3370,66 @@ var wi = /* @__PURE__ */ We((/* @__PURE__ */ He(((e, t) => {
3367
3370
  };
3368
3371
  }));
3369
3372
  })))(), 1);
3370
- Fe.extend(wi.default);
3371
- function Ti(e, t) {
3373
+ Pe.extend(Ti.default);
3374
+ function Ei(e, t) {
3372
3375
  if (e == null || e === "") return null;
3373
- if (Fe.isDayjs(e)) return e;
3374
- let n = Fe(String(e), t, !0);
3375
- return n.isValid() ? n : Fe(String(e)).isValid() ? Fe(String(e)) : null;
3376
+ if (Pe.isDayjs(e)) return e;
3377
+ let n = Pe(String(e), t, !0);
3378
+ return n.isValid() ? n : Pe(String(e)).isValid() ? Pe(String(e)) : null;
3376
3379
  }
3377
3380
  //#endregion
3378
3381
  //#region src/crud/fields/DateField.tsx
3379
- var Ei = "YYYY-MM-DD", Di = `${Ei} HH:mm:ss`, Oi = [
3380
- Ei,
3382
+ var Di = "YYYY-MM-DD", Oi = `${Di} HH:mm:ss`, ki = [
3381
3383
  Di,
3384
+ Oi,
3382
3385
  "YYYY-MM-DDTHH:mm:ss",
3383
3386
  "YYYY-MM-DDTHH:mm:ssZ"
3384
3387
  ];
3385
- function ki({ source: e, name: t, label: n, required: r, rules: i, showTime: a, hideLabel: o }) {
3386
- return /* @__PURE__ */ q($, {
3388
+ function Ai({ source: e, name: t, label: n, required: r, rules: i, showTime: a, hideLabel: o }) {
3389
+ return /* @__PURE__ */ J($, {
3387
3390
  source: e,
3388
3391
  name: t,
3389
3392
  label: n,
3390
3393
  required: r,
3391
3394
  rules: i,
3392
3395
  hideLabel: o,
3393
- children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(O, {
3394
- value: Ti(e, a ? [...Oi, Di] : Oi),
3395
- onChange: (e) => t(e ? e.format(a ? Di : Ei) : null),
3396
+ children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ J(O, {
3397
+ value: Ei(e, a ? [...ki, Oi] : ki),
3398
+ onChange: (e) => t(e ? e.format(a ? Oi : Di) : null),
3396
3399
  onBlur: n,
3397
3400
  showTime: a,
3398
3401
  disabled: r,
3399
- format: a ? Di : Ei,
3402
+ format: a ? Oi : Di,
3400
3403
  style: { width: "100%" }
3401
3404
  })
3402
3405
  });
3403
3406
  }
3404
3407
  //#endregion
3405
3408
  //#region src/crud/fields/DateTimeField.tsx
3406
- function Ai(e) {
3407
- return /* @__PURE__ */ q(ki, {
3409
+ function ji(e) {
3410
+ return /* @__PURE__ */ J(Ai, {
3408
3411
  showTime: !0,
3409
3412
  ...e
3410
3413
  });
3411
3414
  }
3412
3415
  //#endregion
3413
3416
  //#region src/crud/fields/TimeField.tsx
3414
- var ji = "HH:mm:ss", Mi = [
3415
- ji,
3417
+ var Mi = "HH:mm:ss", Ni = [
3418
+ Mi,
3416
3419
  "HH:mm",
3417
3420
  "H:mm:ss",
3418
3421
  "H:mm"
3419
3422
  ];
3420
- function Ni({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, format: o = ji }) {
3421
- return /* @__PURE__ */ q($, {
3423
+ function Pi({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, format: o = Mi }) {
3424
+ return /* @__PURE__ */ J($, {
3422
3425
  source: e,
3423
3426
  name: t,
3424
3427
  label: n,
3425
3428
  required: r,
3426
3429
  rules: i,
3427
3430
  hideLabel: a,
3428
- children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(le, {
3429
- value: Ti(e, Mi),
3431
+ children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ J(ce, {
3432
+ value: Ei(e, Ni),
3430
3433
  onChange: (e) => t(e ? e.format(o) : null),
3431
3434
  onBlur: n,
3432
3435
  disabled: r,
@@ -3437,15 +3440,15 @@ function Ni({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a,
3437
3440
  }
3438
3441
  //#endregion
3439
3442
  //#region src/crud/fields/SelectField.tsx
3440
- function Pi({ source: e, name: t, label: n, required: r, rules: i, choices: a, mode: o, allowClear: s, hideLabel: c }) {
3441
- return /* @__PURE__ */ q($, {
3443
+ function Fi({ source: e, name: t, label: n, required: r, rules: i, choices: a, mode: o, allowClear: s, hideLabel: c }) {
3444
+ return /* @__PURE__ */ J($, {
3442
3445
  source: e,
3443
3446
  name: t,
3444
3447
  label: n,
3445
3448
  required: r,
3446
3449
  rules: i,
3447
3450
  hideLabel: c,
3448
- children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ q(z, {
3451
+ children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ J(B, {
3449
3452
  value: e,
3450
3453
  onChange: t,
3451
3454
  options: a,
@@ -3458,15 +3461,15 @@ function Pi({ source: e, name: t, label: n, required: r, rules: i, choices: a, m
3458
3461
  }
3459
3462
  //#endregion
3460
3463
  //#region src/crud/fields/PasswordField.tsx
3461
- function Fi({ source: e, name: t, label: n, required: r, rules: i, autoComplete: a, hideLabel: o }) {
3462
- return /* @__PURE__ */ q($, {
3464
+ function Ii({ source: e, name: t, label: n, required: r, rules: i, autoComplete: a, hideLabel: o }) {
3465
+ return /* @__PURE__ */ J($, {
3463
3466
  source: e,
3464
3467
  name: t,
3465
3468
  label: n,
3466
3469
  required: r,
3467
3470
  rules: i,
3468
3471
  hideLabel: o,
3469
- children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(P.Password, {
3472
+ children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ J(F.Password, {
3470
3473
  value: e,
3471
3474
  onChange: (e) => t(e.target.value),
3472
3475
  onBlur: n,
@@ -3475,12 +3478,12 @@ function Fi({ source: e, name: t, label: n, required: r, rules: i, autoComplete:
3475
3478
  })
3476
3479
  });
3477
3480
  }
3478
- function Ii({ source: e, name: t, label: n, required: r, rules: i, confirmSource: a, confirmLabel: o = "Confirm password", autoComplete: s = "new-password", hideLabel: c }) {
3479
- let l = Pe({
3481
+ function Li({ source: e, name: t, label: n, required: r, rules: i, confirmSource: a, confirmLabel: o = "Confirm password", autoComplete: s = "new-password", hideLabel: c }) {
3482
+ let l = Ne({
3480
3483
  name: t ?? e,
3481
3484
  disabled: !a
3482
3485
  });
3483
- return a ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Fi, {
3486
+ return a ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(Ii, {
3484
3487
  source: e,
3485
3488
  name: t,
3486
3489
  label: n,
@@ -3488,14 +3491,14 @@ function Ii({ source: e, name: t, label: n, required: r, rules: i, confirmSource
3488
3491
  rules: i,
3489
3492
  autoComplete: s,
3490
3493
  hideLabel: c
3491
- }), /* @__PURE__ */ q(Fi, {
3494
+ }), /* @__PURE__ */ J(Ii, {
3492
3495
  source: a,
3493
3496
  label: o,
3494
3497
  required: r,
3495
3498
  autoComplete: s,
3496
3499
  hideLabel: c,
3497
3500
  rules: { validate: (e) => !l || e === l || "Passwords do not match" }
3498
- })] }) : /* @__PURE__ */ q(Fi, {
3501
+ })] }) : /* @__PURE__ */ J(Ii, {
3499
3502
  source: e,
3500
3503
  name: t,
3501
3504
  label: n,
@@ -3507,48 +3510,54 @@ function Ii({ source: e, name: t, label: n, required: r, rules: i, confirmSource
3507
3510
  }
3508
3511
  //#endregion
3509
3512
  //#region src/crud/utils/choiceSelectionUtils.ts
3510
- function Li(e, t) {
3513
+ function Ri(e, t) {
3511
3514
  return typeof e == "object" && !!e && !Array.isArray(e) && t in e;
3512
3515
  }
3513
- function Ri(e, t) {
3516
+ function zi(e, t) {
3514
3517
  if (!(e == null || e === "")) {
3515
- if (Li(e, t)) {
3518
+ if (Ri(e, t)) {
3516
3519
  let n = e[t];
3517
3520
  return typeof n == "string" || typeof n == "number" ? n : void 0;
3518
3521
  }
3519
3522
  if (typeof e == "string" || typeof e == "number") return e;
3520
3523
  }
3521
3524
  }
3522
- function zi(e, t) {
3523
- return Array.isArray(e) ? e.map((e) => Ri(e, t)).filter((e) => e != null) : [];
3524
- }
3525
3525
  function Bi(e, t) {
3526
- return e == null ? [] : (Array.isArray(e) ? e : [e]).filter((e) => e != null && e !== "").map((e) => Li(e, t) ? e[t] : e);
3526
+ return Array.isArray(e) ? e.map((e) => zi(e, t)).filter((e) => e != null) : [];
3527
+ }
3528
+ function Vi(e, t) {
3529
+ return e == null ? [] : (Array.isArray(e) ? e : [e]).filter((e) => e != null && e !== "").map((e) => Ri(e, t) ? e[t] : e);
3527
3530
  }
3528
- function Vi(e, t, n) {
3531
+ function Hi(e, t, n) {
3529
3532
  let r = [];
3530
- if (t != null && (Array.isArray(t) ? r.push(...t.filter((e) => Li(e, n))) : Li(t, n) && r.push(t)), e == null) return r;
3533
+ if (t != null && (Array.isArray(t) ? r.push(...t.filter((e) => Ri(e, n))) : Ri(t, n) && r.push(t)), e == null) return r;
3531
3534
  let i = Array.isArray(e) ? e : [e];
3532
- for (let e of i) Li(e, n) && r.push(e);
3535
+ for (let e of i) Ri(e, n) && r.push(e);
3533
3536
  return r;
3534
3537
  }
3535
- function Hi(e, t) {
3538
+ function Ui(e, t) {
3536
3539
  return typeof t == "function" ? t(e) : String(e[t] ?? "");
3537
3540
  }
3538
- function Ui(e, t, n) {
3541
+ function Wi(e, t, n) {
3539
3542
  return e.map((e) => ({
3540
- label: Hi(e, t),
3543
+ label: Ui(e, t),
3541
3544
  value: e[n],
3542
3545
  record: e
3543
3546
  }));
3544
3547
  }
3545
- function Wi(e, t) {
3548
+ function Gi(e, t) {
3546
3549
  let n = /* @__PURE__ */ new Map();
3547
3550
  for (let t of e) n.set(t.value, t);
3548
3551
  for (let e of t) n.set(e.value, e);
3549
3552
  return Array.from(n.values());
3550
3553
  }
3551
- function Gi(e = {}) {
3554
+ function Ki(e, t) {
3555
+ return e.filter((e) => !t.some((t) => t.value === e));
3556
+ }
3557
+ function qi(e, t, n = []) {
3558
+ return Gi(n, e.filter((e) => t.some((t) => e.value === t)));
3559
+ }
3560
+ function Ji(e = {}) {
3552
3561
  let t = e.popupMatchSelectWidth ?? !1;
3553
3562
  return t === !1 ? {
3554
3563
  popupMatchSelectWidth: !1,
@@ -3557,16 +3566,27 @@ function Gi(e = {}) {
3557
3566
  }
3558
3567
  //#endregion
3559
3568
  //#region src/crud/utils/referenceSelectNotFoundContent.tsx
3560
- function Ki(e) {
3561
- return e ? /* @__PURE__ */ q(oe, { size: "small" }) : void 0;
3569
+ function Yi(e) {
3570
+ return e ? /* @__PURE__ */ J(ae, { size: "small" }) : void 0;
3571
+ }
3572
+ //#endregion
3573
+ //#region src/crud/utils/referenceSelectSelectedProps.ts
3574
+ function Xi(e, t, n) {
3575
+ return {
3576
+ loading: e || t,
3577
+ disabled: !!(n || t)
3578
+ };
3579
+ }
3580
+ function Zi(e, t, n) {
3581
+ return e ? n : t;
3562
3582
  }
3563
3583
  //#endregion
3564
3584
  //#region src/crud/utils/useChoices.ts
3565
- var qi = /* @__PURE__ */ new Map(), Ji = /* @__PURE__ */ new Map();
3566
- function Yi(e, t) {
3585
+ var Qi = /* @__PURE__ */ new Map(), $i = /* @__PURE__ */ new Map();
3586
+ function ea(e, t) {
3567
3587
  return typeof e == "function" ? `fn:${t ?? ""}` : Array.isArray(e) ? `static:${e.length}` : `res:${e.resource}:${JSON.stringify(e.filter ?? {})}:${t ?? ""}`;
3568
3588
  }
3569
- async function Xi(e, t, n, r, i) {
3589
+ async function ta(e, t, n, r, i) {
3570
3590
  return typeof e == "function" ? e({
3571
3591
  dataProvider: t,
3572
3592
  search: i
@@ -3580,26 +3600,26 @@ async function Xi(e, t, n, r, i) {
3580
3600
  perPage: 500
3581
3601
  }
3582
3602
  })).data.map((e) => ({
3583
- label: Hi(e, n),
3603
+ label: Ui(e, n),
3584
3604
  value: e[r],
3585
3605
  record: e
3586
3606
  }));
3587
3607
  }
3588
- function Zi(e, t, n, r, i, a) {
3589
- let o = Yi(e, i);
3608
+ function na(e, t, n, r, i, a) {
3609
+ let o = ea(e, i);
3590
3610
  if (a) {
3591
- let e = qi.get(o);
3611
+ let e = Qi.get(o);
3592
3612
  if (e && !i) return Promise.resolve(e);
3593
3613
  }
3594
- let s = Ji.get(o);
3614
+ let s = $i.get(o);
3595
3615
  if (s) return s;
3596
- let c = Xi(e, t, n, r, i).then((e) => (a && !i && qi.set(o, e), e)).finally(() => {
3597
- Ji.delete(o);
3616
+ let c = ta(e, t, n, r, i).then((e) => (a && !i && Qi.set(o, e), e)).finally(() => {
3617
+ $i.delete(o);
3598
3618
  });
3599
- return Ji.set(o, c), c;
3619
+ return $i.set(o, c), c;
3600
3620
  }
3601
- function Qi(e, t, n = "name", r = "id", i, o = {}) {
3602
- let { lazy: c = !1, active: u = !1, selectedValues: f, selectedRecords: p, fetchSelected: m = !0, cache: h } = o, g = h ?? !c, _ = Yt(), v = l(() => {
3621
+ function ra(e, t, n = "name", r = "id", i, o = {}) {
3622
+ let { lazy: c = !1, active: f = !1, selectedValues: p, selectedRecords: m, fetchSelected: h = !0, cache: g } = o, _ = g ?? !c, v = Yt(), y = l(() => {
3603
3623
  if (e) return e;
3604
3624
  if (t) return {
3605
3625
  resource: t,
@@ -3609,67 +3629,77 @@ function Qi(e, t, n = "name", r = "id", i, o = {}) {
3609
3629
  e,
3610
3630
  t,
3611
3631
  i
3612
- ]), y = v ? Yi(v, i) : void 0, b = l(() => Bi(f, r), [f, r]), x = l(() => Ui(Vi(f, p, r), n, r), [
3613
- f,
3632
+ ]), b = y ? ea(y, i) : void 0, x = l(() => Vi(p, r), [p, r]), S = l(() => Wi(Hi(p, m, r), n, r), [
3614
3633
  p,
3634
+ m,
3615
3635
  n,
3616
3636
  r
3617
- ]), S = !!(v && (!c || u || Array.isArray(v))), [C, w] = d(() => x.length ? x : !y || i || c || !g ? [] : qi.get(y) ?? []), [T, E] = d(() => S ? !g || !y || i ? !!v : !qi.has(y) : !1);
3618
- s(() => {
3619
- x.length && w((e) => Wi(e, x));
3620
- }, [x]);
3621
- let D = a(async () => {
3622
- if (!v || !S) {
3623
- v || w(x), E(!1);
3637
+ ]), C = !!(y && (!c || f || Array.isArray(y))), [w, T] = d(() => S.length ? S : !b || i || c || !_ ? [] : Qi.get(b) ?? []), [E, D] = d(() => C ? !_ || !b || i ? !!y : !Qi.has(b) : !1), [O, k] = d(() => !!(h && t && Ki(x, S).length)), A = u(w);
3638
+ A.current = w;
3639
+ let j = u(x);
3640
+ j.current = x, s(() => {
3641
+ S.length && T((e) => Gi(e, S));
3642
+ }, [S]);
3643
+ let M = a(async () => {
3644
+ if (!y || !C) {
3645
+ y || T(S), D(!1);
3624
3646
  return;
3625
3647
  }
3626
- if (g) {
3627
- let e = Yi(v, i), t = qi.get(e);
3648
+ if (_) {
3649
+ let e = ea(y, i), t = Qi.get(e);
3628
3650
  if (t && !i) {
3629
- w(Wi(x, t)), E(!1);
3651
+ T((e) => Gi(qi(e, j.current, S), t)), D(!1);
3630
3652
  return;
3631
3653
  }
3632
3654
  }
3633
- E(!0), c && w(x);
3655
+ D(!0), c && T((e) => qi(e, j.current, S));
3634
3656
  try {
3635
- w(Wi(x, await Zi(v, _, n, r, i, g)));
3657
+ let e = await na(y, v, n, r, i, _);
3658
+ T((t) => Gi(qi(t, j.current, S), e));
3636
3659
  } catch {
3637
- !b.length && !x.length ? w([]) : c && w(x);
3660
+ !x.length && !S.length ? T([]) : c && T((e) => qi(e, j.current, S));
3638
3661
  } finally {
3639
- E(!1);
3662
+ D(!1);
3640
3663
  }
3641
3664
  }, [
3642
- v,
3643
- S,
3644
- g,
3665
+ y,
3666
+ C,
3645
3667
  _,
3668
+ v,
3646
3669
  n,
3647
3670
  r,
3648
3671
  i,
3649
3672
  c,
3650
- b.length,
3651
- x
3673
+ x.length,
3674
+ S
3652
3675
  ]);
3653
3676
  s(() => {
3654
- D();
3655
- }, [D]), s(() => {
3656
- c && !u && !i && (w(x), E(!1));
3677
+ M();
3678
+ }, [M]), s(() => {
3679
+ c && !f && !i && (T((e) => qi(e, x, S)), D(!1));
3657
3680
  }, [
3658
3681
  c,
3659
- u,
3682
+ f,
3660
3683
  i,
3684
+ S,
3661
3685
  x
3662
3686
  ]), s(() => {
3663
- if (!m || !t || !b.length) return;
3664
- let e = b.filter((e) => !x.some((t) => t.value === e));
3665
- if (!e.length) return;
3687
+ if (!h || !t || !x.length) {
3688
+ k(!1);
3689
+ return;
3690
+ }
3691
+ let e = Ki(x, Gi(S, A.current));
3692
+ if (!e.length) {
3693
+ k(!1);
3694
+ return;
3695
+ }
3666
3696
  let i = !1;
3667
- return (async () => {
3697
+ return k(!0), (async () => {
3668
3698
  let a = [];
3669
3699
  for (let i of e) try {
3670
- let e = (await _.getOne(t, i)).data;
3700
+ let e = (await v.getOne(t, i)).data;
3671
3701
  a.push({
3672
- label: Hi(e, n),
3702
+ label: Ui(e, n),
3673
3703
  value: e[r],
3674
3704
  record: e
3675
3705
  });
@@ -3679,58 +3709,59 @@ function Qi(e, t, n = "name", r = "id", i, o = {}) {
3679
3709
  value: i
3680
3710
  });
3681
3711
  }
3682
- i || !a.length || w((e) => {
3712
+ i || (a.length && T((e) => {
3683
3713
  let t = a.filter((t) => !e.some((e) => e.value === t.value));
3684
- return t.length ? Wi(e, t) : e;
3685
- });
3714
+ return t.length ? Gi(e, t) : e;
3715
+ }), k(!1));
3686
3716
  })(), () => {
3687
3717
  i = !0;
3688
3718
  };
3689
3719
  }, [
3690
- m,
3720
+ h,
3691
3721
  t,
3692
- _,
3722
+ v,
3693
3723
  n,
3694
3724
  r,
3695
- b,
3696
- x
3725
+ x,
3726
+ S
3697
3727
  ]);
3698
- let O = a((e) => C.find((t) => t.value === e)?.label ?? String(e ?? "—"), [C]);
3728
+ let N = a((e) => w.find((t) => t.value === e)?.label ?? String(e ?? "—"), [w]);
3699
3729
  return {
3700
- options: C,
3701
- loading: T,
3702
- labelForValue: O,
3703
- labelsForValues: a((e) => e?.length ? e.map((e) => O(e)).join(", ") : "—", [O]),
3704
- optionForValue: a((e) => C.find((t) => t.value === e), [C]),
3705
- reload: D
3730
+ options: w,
3731
+ loading: E,
3732
+ selectedLoading: O,
3733
+ labelForValue: N,
3734
+ labelsForValues: a((e) => e?.length ? e.map((e) => N(e)).join(", ") : "—", [N]),
3735
+ optionForValue: a((e) => w.find((t) => t.value === e), [w]),
3736
+ reload: M
3706
3737
  };
3707
3738
  }
3708
3739
  //#endregion
3709
3740
  //#region src/crud/fields/ReferenceInputActions.tsx
3710
- function $i({ reference: e, referenceForm: t, referencePermissions: n, referenceTitle: r, referenceDefaultValues: i, referenceModalWidth: a, selectedId: o, disabled: s, onCreated: c, onUpdated: l }) {
3711
- let u = X(), f = r ?? e, p = !!(e && t) && Z(u, n, "add"), m = !!(e && t && o != null && o !== "") && Z(u, n, "change"), [h, g] = d(null);
3712
- return !p && !m ? null : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ J(B, {
3741
+ function ia({ reference: e, referenceForm: t, referencePermissions: n, referenceTitle: r, referenceDefaultValues: i, referenceModalWidth: a, selectedId: o, disabled: s, onCreated: c, onUpdated: l }) {
3742
+ let u = mt(), f = r ?? e, p = !!(e && t) && Z(u, n, "add"), m = !!(e && t && o != null && o !== "") && Z(u, n, "change"), [h, g] = d(null);
3743
+ return !p && !m ? null : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ Y(V, {
3713
3744
  size: 4,
3714
- children: [p ? /* @__PURE__ */ q(U, {
3745
+ children: [p ? /* @__PURE__ */ J(W, {
3715
3746
  title: `Add ${f ?? "record"}`,
3716
- children: /* @__PURE__ */ q(w, {
3747
+ children: /* @__PURE__ */ J(w, {
3717
3748
  type: "default",
3718
- icon: /* @__PURE__ */ q(Ce, {}),
3749
+ icon: /* @__PURE__ */ J(Se, {}),
3719
3750
  disabled: s,
3720
3751
  "aria-label": `Add ${f ?? "record"}`,
3721
3752
  onClick: () => g("new")
3722
3753
  })
3723
- }) : null, m ? /* @__PURE__ */ q(U, {
3754
+ }) : null, m ? /* @__PURE__ */ J(W, {
3724
3755
  title: `Edit ${f ?? "record"}`,
3725
- children: /* @__PURE__ */ q(w, {
3756
+ children: /* @__PURE__ */ J(w, {
3726
3757
  type: "default",
3727
- icon: /* @__PURE__ */ q(_e, {}),
3758
+ icon: /* @__PURE__ */ J(ge, {}),
3728
3759
  disabled: s,
3729
3760
  "aria-label": `Edit ${f ?? "record"}`,
3730
3761
  onClick: () => g(String(o))
3731
3762
  })
3732
3763
  }) : null]
3733
- }), e && t && h != null ? /* @__PURE__ */ q(Ur, {
3764
+ }), e && t && h != null ? /* @__PURE__ */ J(Wr, {
3734
3765
  resource: e,
3735
3766
  editId: h,
3736
3767
  onClose: () => g(null),
@@ -3747,35 +3778,35 @@ function $i({ reference: e, referenceForm: t, referencePermissions: n, reference
3747
3778
  }
3748
3779
  //#endregion
3749
3780
  //#region src/crud/fields/ReferenceField.tsx
3750
- function ea({ reference: e, choices: t, optionLabel: n = "name", optionValue: r = "id", search: i, allowClear: a, disabled: o, inputStyle: s, onValueChange: c, lazy: u = !0, fetchSelected: f = !0, value: p, onChange: m, fieldName: h, selectedRecords: g, referenceForm: _, referencePermissions: v, referenceTitle: y, referenceDefaultValues: b, referenceModalWidth: x, referenceActions: S = !0, popupMatchSelectWidth: C, popupMinWidth: w }) {
3751
- let [T, E] = d(), [D, O] = d(!1), k = D || !!T, A = Ri(p, r), { options: j, loading: M, optionForValue: ee, reload: N } = Qi(t, e, n, r, i ? T : void 0, {
3781
+ function aa({ reference: e, choices: t, optionLabel: n = "name", optionValue: r = "id", search: i, allowClear: a, disabled: o, inputStyle: s, onValueChange: c, lazy: u = !0, fetchSelected: f = !0, value: p, onChange: m, fieldName: h, selectedRecords: g, referenceForm: _, referencePermissions: v, referenceTitle: y, referenceDefaultValues: b, referenceModalWidth: x, referenceActions: S = !0, popupMatchSelectWidth: C, popupMinWidth: w }) {
3782
+ let [T, E] = d(), [D, O] = d(!1), k = D || !!T, A = zi(p, r), { options: j, loading: M, selectedLoading: N, optionForValue: P, reload: F } = ra(t, e, n, r, i ? T : void 0, {
3752
3783
  lazy: u,
3753
3784
  active: k,
3754
3785
  selectedValues: p,
3755
3786
  selectedRecords: g,
3756
3787
  fetchSelected: f
3757
- }), P = l(() => j.map((e) => ({
3788
+ }), I = Xi(M, N, o), L = l(() => j.map((e) => ({
3758
3789
  label: e.label,
3759
3790
  value: e.value
3760
- })), [j]), F = (e) => {
3791
+ })), [j]), ee = (e) => {
3761
3792
  let t = e[r];
3762
3793
  m(t), c?.(t, {
3763
- label: Hi(e, n),
3794
+ label: Ui(e, n),
3764
3795
  value: t,
3765
3796
  record: e
3766
- }, { name: h }), N();
3767
- }, I = /* @__PURE__ */ q(z, {
3768
- ...Gi({
3797
+ }, { name: h }), F();
3798
+ }, R = /* @__PURE__ */ J(B, {
3799
+ ...Ji({
3769
3800
  popupMatchSelectWidth: C,
3770
3801
  popupMinWidth: w
3771
3802
  }),
3772
- value: A,
3803
+ value: Zi(N, A, void 0),
3773
3804
  onChange: (e) => {
3774
- m(e), c?.(e, ee(e), { name: h });
3805
+ m(e), c?.(e, P(e), { name: h });
3775
3806
  },
3776
- options: P,
3777
- loading: M,
3778
- notFoundContent: Ki(M),
3807
+ options: L,
3808
+ loading: I.loading,
3809
+ notFoundContent: Yi(I.loading),
3779
3810
  showSearch: i,
3780
3811
  filterOption: i ? !1 : void 0,
3781
3812
  onSearch: i ? E : void 0,
@@ -3783,7 +3814,7 @@ function ea({ reference: e, choices: t, optionLabel: n = "name", optionValue: r
3783
3814
  O(e), e || E(void 0);
3784
3815
  },
3785
3816
  allowClear: a,
3786
- disabled: o,
3817
+ disabled: I.disabled,
3787
3818
  optionFilterProp: "label",
3788
3819
  style: {
3789
3820
  width: "100%",
@@ -3791,20 +3822,20 @@ function ea({ reference: e, choices: t, optionLabel: n = "name", optionValue: r
3791
3822
  ...s
3792
3823
  }
3793
3824
  });
3794
- return S ? /* @__PURE__ */ J("div", {
3825
+ return S ? /* @__PURE__ */ Y("div", {
3795
3826
  style: {
3796
3827
  display: "flex",
3797
3828
  gap: 8,
3798
3829
  width: "100%",
3799
3830
  alignItems: "flex-start"
3800
3831
  },
3801
- children: [/* @__PURE__ */ q("div", {
3832
+ children: [/* @__PURE__ */ J("div", {
3802
3833
  style: {
3803
3834
  flex: 1,
3804
3835
  minWidth: 0
3805
3836
  },
3806
- children: I
3807
- }), /* @__PURE__ */ q($i, {
3837
+ children: R
3838
+ }), /* @__PURE__ */ J(ia, {
3808
3839
  reference: e,
3809
3840
  referenceForm: _,
3810
3841
  referencePermissions: v,
@@ -3812,25 +3843,25 @@ function ea({ reference: e, choices: t, optionLabel: n = "name", optionValue: r
3812
3843
  referenceDefaultValues: b,
3813
3844
  referenceModalWidth: x,
3814
3845
  selectedId: A,
3815
- disabled: o,
3816
- onCreated: F,
3817
- onUpdated: () => void N()
3846
+ disabled: I.disabled,
3847
+ onCreated: ee,
3848
+ onUpdated: () => void F()
3818
3849
  })]
3819
- }) : I;
3850
+ }) : R;
3820
3851
  }
3821
- function ta({ source: e, name: t, label: n, reference: r, choices: i, optionLabel: a = "name", optionValue: o = "id", required: s, rules: c, search: l, allowClear: u, disabled: d, hideLabel: f, inputStyle: p, onValueChange: m, lazy: h = !0, recordSource: g, fetchSelected: _ = !0, referenceForm: v, referencePermissions: y, referenceTitle: b, referenceDefaultValues: x, referenceModalWidth: S, referenceActions: C = !0, popupMatchSelectWidth: w, popupMinWidth: T }) {
3822
- let E = Pe({
3852
+ function oa({ source: e, name: t, label: n, reference: r, choices: i, optionLabel: a = "name", optionValue: o = "id", required: s, rules: c, search: l, allowClear: u, disabled: d, hideLabel: f, inputStyle: p, onValueChange: m, lazy: h = !0, recordSource: g, fetchSelected: _ = !0, referenceForm: v, referencePermissions: y, referenceTitle: b, referenceDefaultValues: x, referenceModalWidth: S, referenceActions: C = !0, popupMatchSelectWidth: w, popupMinWidth: T }) {
3853
+ let E = Ne({
3823
3854
  name: g ?? "",
3824
3855
  disabled: !g
3825
3856
  });
3826
- return /* @__PURE__ */ q($, {
3857
+ return /* @__PURE__ */ J($, {
3827
3858
  source: e,
3828
3859
  name: t,
3829
3860
  label: n,
3830
3861
  required: s,
3831
3862
  rules: c,
3832
3863
  hideLabel: f,
3833
- children: ({ value: e, onChange: t, disabled: n, name: s }) => /* @__PURE__ */ q(ea, {
3864
+ children: ({ value: e, onChange: t, disabled: n, name: s }) => /* @__PURE__ */ J(aa, {
3834
3865
  reference: r,
3835
3866
  choices: i,
3836
3867
  optionLabel: a,
@@ -3859,27 +3890,27 @@ function ta({ source: e, name: t, label: n, reference: r, choices: i, optionLabe
3859
3890
  }
3860
3891
  //#endregion
3861
3892
  //#region src/crud/fields/ReferenceManyField.tsx
3862
- function na({ reference: e, choices: t, optionLabel: n = "name", optionValue: r = "id", search: i, allowClear: a = !0, lazy: o = !0, fetchSelected: s = !0, value: c, onChange: u, disabled: f, selectedRecords: p, referenceForm: m, referencePermissions: h, referenceTitle: g, referenceDefaultValues: _, referenceModalWidth: v, referenceActions: y = !0, popupMatchSelectWidth: b, popupMinWidth: x }) {
3863
- let [S, C] = d(), [w, T] = d(!1), E = w || !!S, D = zi(c, r), { options: O, loading: k, reload: A } = Qi(t, e, n, r, i ? S : void 0, {
3893
+ function sa({ reference: e, choices: t, optionLabel: n = "name", optionValue: r = "id", search: i, allowClear: a = !0, lazy: o = !0, fetchSelected: s = !0, value: c, onChange: u, disabled: f, selectedRecords: p, referenceForm: m, referencePermissions: h, referenceTitle: g, referenceDefaultValues: _, referenceModalWidth: v, referenceActions: y = !0, popupMatchSelectWidth: b, popupMinWidth: x }) {
3894
+ let [S, C] = d(), [w, T] = d(!1), E = w || !!S, D = Bi(c, r), { options: O, loading: k, selectedLoading: A, reload: j } = ra(t, e, n, r, i ? S : void 0, {
3864
3895
  lazy: o,
3865
3896
  active: E,
3866
3897
  selectedValues: c,
3867
3898
  selectedRecords: p,
3868
3899
  fetchSelected: s
3869
- }), j = l(() => O.map((e) => ({
3900
+ }), M = Xi(k, A, f), N = l(() => O.map((e) => ({
3870
3901
  label: e.label,
3871
3902
  value: e.value
3872
- })), [O]), M = /* @__PURE__ */ q(z, {
3873
- ...Gi({
3903
+ })), [O]), P = /* @__PURE__ */ J(B, {
3904
+ ...Ji({
3874
3905
  popupMatchSelectWidth: b,
3875
3906
  popupMinWidth: x
3876
3907
  }),
3877
3908
  mode: "multiple",
3878
- value: D,
3909
+ value: Zi(A, D, []),
3879
3910
  onChange: u,
3880
- options: j,
3881
- loading: k,
3882
- notFoundContent: Ki(k),
3911
+ options: N,
3912
+ loading: M.loading,
3913
+ notFoundContent: Yi(M.loading),
3883
3914
  showSearch: i,
3884
3915
  filterOption: i ? !1 : void 0,
3885
3916
  onSearch: i ? C : void 0,
@@ -3887,55 +3918,55 @@ function na({ reference: e, choices: t, optionLabel: n = "name", optionValue: r
3887
3918
  T(e), e || C(void 0);
3888
3919
  },
3889
3920
  allowClear: a,
3890
- disabled: f,
3921
+ disabled: M.disabled,
3891
3922
  optionFilterProp: "label",
3892
3923
  style: { width: "100%" }
3893
3924
  });
3894
- return y ? /* @__PURE__ */ J("div", {
3925
+ return y ? /* @__PURE__ */ Y("div", {
3895
3926
  style: {
3896
3927
  display: "flex",
3897
3928
  gap: 8,
3898
3929
  width: "100%",
3899
3930
  alignItems: "flex-start"
3900
3931
  },
3901
- children: [/* @__PURE__ */ q("div", {
3932
+ children: [/* @__PURE__ */ J("div", {
3902
3933
  style: {
3903
3934
  flex: 1,
3904
3935
  minWidth: 0
3905
3936
  },
3906
- children: M
3907
- }), /* @__PURE__ */ q($i, {
3937
+ children: P
3938
+ }), /* @__PURE__ */ J(ia, {
3908
3939
  reference: e,
3909
3940
  referenceForm: m,
3910
3941
  referencePermissions: h,
3911
3942
  referenceTitle: g,
3912
3943
  referenceDefaultValues: _,
3913
3944
  referenceModalWidth: v,
3914
- disabled: f,
3945
+ disabled: M.disabled,
3915
3946
  onCreated: (e) => {
3916
3947
  let t = e[r], n = Array.isArray(D) ? D : [];
3917
3948
  if (n.some((e) => e === t)) {
3918
- A();
3949
+ j();
3919
3950
  return;
3920
3951
  }
3921
- u([...n, t]), A();
3952
+ u([...n, t]), j();
3922
3953
  }
3923
3954
  })]
3924
- }) : M;
3955
+ }) : P;
3925
3956
  }
3926
- function ra({ source: e, name: t, label: n, reference: r, choices: i, optionLabel: a = "name", optionValue: o = "id", required: s, rules: c, search: l, allowClear: u = !0, hideLabel: d, disabled: f, lazy: p = !0, recordSource: m, fetchSelected: h = !0, referenceForm: g, referencePermissions: _, referenceTitle: v, referenceDefaultValues: y, referenceModalWidth: b, referenceActions: x = !0, popupMatchSelectWidth: S, popupMinWidth: C }) {
3927
- let w = Pe({
3957
+ function ca({ source: e, name: t, label: n, reference: r, choices: i, optionLabel: a = "name", optionValue: o = "id", required: s, rules: c, search: l, allowClear: u = !0, hideLabel: d, disabled: f, lazy: p = !0, recordSource: m, fetchSelected: h = !0, referenceForm: g, referencePermissions: _, referenceTitle: v, referenceDefaultValues: y, referenceModalWidth: b, referenceActions: x = !0, popupMatchSelectWidth: S, popupMinWidth: C }) {
3958
+ let w = Ne({
3928
3959
  name: m ?? "",
3929
3960
  disabled: !m
3930
3961
  });
3931
- return /* @__PURE__ */ q($, {
3962
+ return /* @__PURE__ */ J($, {
3932
3963
  source: e,
3933
3964
  name: t,
3934
3965
  label: n,
3935
3966
  required: s,
3936
3967
  rules: c,
3937
3968
  hideLabel: d,
3938
- children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ q(na, {
3969
+ children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ J(sa, {
3939
3970
  reference: r,
3940
3971
  choices: i,
3941
3972
  optionLabel: a,
@@ -3961,10 +3992,10 @@ function ra({ source: e, name: t, label: n, reference: r, choices: i, optionLabe
3961
3992
  }
3962
3993
  //#endregion
3963
3994
  //#region src/crud/fields/uploadFieldUtils.ts
3964
- function ia(e) {
3995
+ function la(e) {
3965
3996
  return e instanceof File ? !0 : typeof e == "string" && e.length > 0;
3966
3997
  }
3967
- function aa(e) {
3998
+ function ua(e) {
3968
3999
  if (e instanceof File) return e.name;
3969
4000
  if (typeof e == "string" && e.length > 0) try {
3970
4001
  return new URL(e, "http://local").pathname.split("/").filter(Boolean).pop() || e;
@@ -3974,7 +4005,7 @@ function aa(e) {
3974
4005
  }
3975
4006
  //#endregion
3976
4007
  //#region src/crud/fields/useUploadPreviewUrl.ts
3977
- function oa(e) {
4008
+ function da(e) {
3978
4009
  let [t, n] = d();
3979
4010
  if (s(() => {
3980
4011
  if (e instanceof File) {
@@ -3987,14 +4018,14 @@ function oa(e) {
3987
4018
  }
3988
4019
  //#endregion
3989
4020
  //#region src/crud/fields/ImageField.tsx
3990
- function sa({ value: e, onChange: t, disabled: n, clearable: r, accept: i = "image/*", previewWidth: a = 200 }) {
3991
- let o = u(null), s = oa(e), c = r && ia(e);
3992
- return /* @__PURE__ */ J(B, {
4021
+ function fa({ value: e, onChange: t, disabled: n, clearable: r, accept: i = "image/*", previewWidth: a = 200 }) {
4022
+ let o = u(null), s = da(e), c = r && la(e);
4023
+ return /* @__PURE__ */ Y(V, {
3993
4024
  direction: "vertical",
3994
4025
  size: "middle",
3995
4026
  style: { width: "100%" },
3996
4027
  children: [
3997
- s ? /* @__PURE__ */ q(N, {
4028
+ s ? /* @__PURE__ */ J(P, {
3998
4029
  src: s,
3999
4030
  alt: "",
4000
4031
  style: {
@@ -4003,15 +4034,15 @@ function sa({ value: e, onChange: t, disabled: n, clearable: r, accept: i = "ima
4003
4034
  objectFit: "contain"
4004
4035
  }
4005
4036
  }) : null,
4006
- /* @__PURE__ */ J(B, {
4037
+ /* @__PURE__ */ Y(V, {
4007
4038
  wrap: !0,
4008
- children: [/* @__PURE__ */ q(w, {
4009
- icon: /* @__PURE__ */ q(Ee, {}),
4039
+ children: [/* @__PURE__ */ J(w, {
4040
+ icon: /* @__PURE__ */ J(Te, {}),
4010
4041
  disabled: n,
4011
4042
  onClick: () => o.current?.click(),
4012
4043
  children: "Choose image"
4013
- }), c ? /* @__PURE__ */ q(w, {
4014
- icon: /* @__PURE__ */ q(he, {}),
4044
+ }), c ? /* @__PURE__ */ J(w, {
4045
+ icon: /* @__PURE__ */ J(me, {}),
4015
4046
  disabled: n,
4016
4047
  onClick: () => {
4017
4048
  t(null), o.current && (o.current.value = "");
@@ -4019,7 +4050,7 @@ function sa({ value: e, onChange: t, disabled: n, clearable: r, accept: i = "ima
4019
4050
  children: "Clear"
4020
4051
  }) : null]
4021
4052
  }),
4022
- /* @__PURE__ */ q("input", {
4053
+ /* @__PURE__ */ J("input", {
4023
4054
  ref: o,
4024
4055
  type: "file",
4025
4056
  accept: i,
@@ -4035,15 +4066,15 @@ function sa({ value: e, onChange: t, disabled: n, clearable: r, accept: i = "ima
4035
4066
  ]
4036
4067
  });
4037
4068
  }
4038
- function ca({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, clearable: o, accept: s, previewWidth: c }) {
4039
- return /* @__PURE__ */ q($, {
4069
+ function pa({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, clearable: o, accept: s, previewWidth: c }) {
4070
+ return /* @__PURE__ */ J($, {
4040
4071
  source: e,
4041
4072
  name: t,
4042
4073
  label: n,
4043
4074
  required: r,
4044
4075
  rules: i,
4045
4076
  hideLabel: a,
4046
- children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ q(sa, {
4077
+ children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ J(fa, {
4047
4078
  value: e,
4048
4079
  onChange: t,
4049
4080
  disabled: n,
@@ -4055,28 +4086,28 @@ function ca({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a,
4055
4086
  }
4056
4087
  //#endregion
4057
4088
  //#region src/crud/fields/FileField.tsx
4058
- function la({ value: e, onChange: t, disabled: n, clearable: r, accept: i }) {
4059
- let a = u(null), o = aa(e), s = typeof e == "string" && e.length > 0 ? e : void 0, c = r && ia(e);
4060
- return /* @__PURE__ */ J(B, {
4089
+ function ma({ value: e, onChange: t, disabled: n, clearable: r, accept: i }) {
4090
+ let a = u(null), o = ua(e), s = typeof e == "string" && e.length > 0 ? e : void 0, c = r && la(e);
4091
+ return /* @__PURE__ */ Y(V, {
4061
4092
  direction: "vertical",
4062
4093
  size: "middle",
4063
4094
  style: { width: "100%" },
4064
4095
  children: [
4065
- o ? /* @__PURE__ */ J(B, { children: [/* @__PURE__ */ q(Se, {}), s ? /* @__PURE__ */ q(W.Link, {
4096
+ o ? /* @__PURE__ */ Y(V, { children: [/* @__PURE__ */ J(xe, {}), s ? /* @__PURE__ */ J(G.Link, {
4066
4097
  href: s,
4067
4098
  target: "_blank",
4068
4099
  rel: "noopener noreferrer",
4069
4100
  children: o
4070
- }) : /* @__PURE__ */ q(W.Text, { children: o })] }) : null,
4071
- /* @__PURE__ */ J(B, {
4101
+ }) : /* @__PURE__ */ J(G.Text, { children: o })] }) : null,
4102
+ /* @__PURE__ */ Y(V, {
4072
4103
  wrap: !0,
4073
- children: [/* @__PURE__ */ q(w, {
4074
- icon: /* @__PURE__ */ q(Ee, {}),
4104
+ children: [/* @__PURE__ */ J(w, {
4105
+ icon: /* @__PURE__ */ J(Te, {}),
4075
4106
  disabled: n,
4076
4107
  onClick: () => a.current?.click(),
4077
4108
  children: "Choose file"
4078
- }), c ? /* @__PURE__ */ q(w, {
4079
- icon: /* @__PURE__ */ q(he, {}),
4109
+ }), c ? /* @__PURE__ */ J(w, {
4110
+ icon: /* @__PURE__ */ J(me, {}),
4080
4111
  disabled: n,
4081
4112
  onClick: () => {
4082
4113
  t(null), a.current && (a.current.value = "");
@@ -4084,7 +4115,7 @@ function la({ value: e, onChange: t, disabled: n, clearable: r, accept: i }) {
4084
4115
  children: "Clear"
4085
4116
  }) : null]
4086
4117
  }),
4087
- /* @__PURE__ */ q("input", {
4118
+ /* @__PURE__ */ J("input", {
4088
4119
  ref: a,
4089
4120
  type: "file",
4090
4121
  accept: i,
@@ -4100,15 +4131,15 @@ function la({ value: e, onChange: t, disabled: n, clearable: r, accept: i }) {
4100
4131
  ]
4101
4132
  });
4102
4133
  }
4103
- function ua({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, clearable: o, accept: s }) {
4104
- return /* @__PURE__ */ q($, {
4134
+ function ha({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, clearable: o, accept: s }) {
4135
+ return /* @__PURE__ */ J($, {
4105
4136
  source: e,
4106
4137
  name: t,
4107
4138
  label: n,
4108
4139
  required: r,
4109
4140
  rules: i,
4110
4141
  hideLabel: a,
4111
- children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ q(la, {
4142
+ children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ J(ma, {
4112
4143
  value: e,
4113
4144
  onChange: t,
4114
4145
  disabled: n,
@@ -4119,7 +4150,7 @@ function ua({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a,
4119
4150
  }
4120
4151
  //#endregion
4121
4152
  //#region src/crud/columns/TextColumn.tsx
4122
- function da({ source: e, label: t, sortable: n = !0 }) {
4153
+ function ga({ source: e, label: t, sortable: n = !0 }) {
4123
4154
  return Jn(l(() => ({
4124
4155
  key: e,
4125
4156
  source: e,
@@ -4137,12 +4168,12 @@ function da({ source: e, label: t, sortable: n = !0 }) {
4137
4168
  n
4138
4169
  ])), null;
4139
4170
  }
4140
- function fa(e, t, n) {
4171
+ function _a(e, t, n) {
4141
4172
  return typeof n == "function" ? n(e) : n ? br(e, n) : e[t];
4142
4173
  }
4143
4174
  //#endregion
4144
4175
  //#region src/crud/columns/NumberColumn.tsx
4145
- function pa({ source: e, label: t, sortable: n = !0 }) {
4176
+ function va({ source: e, label: t, sortable: n = !0 }) {
4146
4177
  return Jn(l(() => ({
4147
4178
  key: e,
4148
4179
  source: e,
@@ -4162,7 +4193,7 @@ function pa({ source: e, label: t, sortable: n = !0 }) {
4162
4193
  }
4163
4194
  //#endregion
4164
4195
  //#region src/crud/columns/BooleanColumn.tsx
4165
- function ma({ source: e, label: t, sortable: n = !0 }) {
4196
+ function ya({ source: e, label: t, sortable: n = !0 }) {
4166
4197
  return Jn(l(() => ({
4167
4198
  key: e,
4168
4199
  source: e,
@@ -4183,7 +4214,7 @@ function ma({ source: e, label: t, sortable: n = !0 }) {
4183
4214
  }
4184
4215
  //#endregion
4185
4216
  //#region src/crud/columns/DateColumn.tsx
4186
- function ha({ source: e, label: t, sortable: n = !0 }) {
4217
+ function ba({ source: e, label: t, sortable: n = !0 }) {
4187
4218
  return Jn(l(() => ({
4188
4219
  key: e,
4189
4220
  source: e,
@@ -4204,16 +4235,16 @@ function ha({ source: e, label: t, sortable: n = !0 }) {
4204
4235
  }
4205
4236
  //#endregion
4206
4237
  //#region src/crud/columns/ReferenceColumn.tsx
4207
- function ga({ record: e, source: t, display: n, reference: r, choices: i, optionLabel: a, optionValue: o }) {
4208
- let { labelForValue: s } = Qi(i, r, a, o), c = e[t];
4209
- if (typeof n == "function") return /* @__PURE__ */ q(K, { children: n(e) });
4238
+ function xa({ record: e, source: t, display: n, reference: r, choices: i, optionLabel: a, optionValue: o }) {
4239
+ let { labelForValue: s } = ra(i, r, a, o), c = e[t];
4240
+ if (typeof n == "function") return /* @__PURE__ */ J(q, { children: n(e) });
4210
4241
  if (n && n !== t) {
4211
- let r = fa(e, t, n);
4212
- return /* @__PURE__ */ q(K, { children: r == null ? "—" : String(r) });
4242
+ let r = _a(e, t, n);
4243
+ return /* @__PURE__ */ J(q, { children: r == null ? "—" : String(r) });
4213
4244
  }
4214
- return /* @__PURE__ */ q(K, { children: s(c) });
4245
+ return /* @__PURE__ */ J(q, { children: s(c) });
4215
4246
  }
4216
- function _a({ source: e, label: t, reference: n, choices: r, optionLabel: i = "name", optionValue: a = "id", display: o, sortable: s = !0 }) {
4247
+ function Sa({ source: e, label: t, reference: n, choices: r, optionLabel: i = "name", optionValue: a = "id", display: o, sortable: s = !0 }) {
4217
4248
  return Jn(l(() => ({
4218
4249
  key: e,
4219
4250
  source: e,
@@ -4224,7 +4255,7 @@ function _a({ source: e, label: t, reference: n, choices: r, optionLabel: i = "n
4224
4255
  dataIndex: e,
4225
4256
  key: e,
4226
4257
  sorter: s ? !0 : void 0,
4227
- render: (s, c) => /* @__PURE__ */ q(ga, {
4258
+ render: (s, c) => /* @__PURE__ */ J(xa, {
4228
4259
  record: c,
4229
4260
  source: e,
4230
4261
  label: t,
@@ -4248,11 +4279,11 @@ function _a({ source: e, label: t, reference: n, choices: r, optionLabel: i = "n
4248
4279
  }
4249
4280
  //#endregion
4250
4281
  //#region src/crud/columns/ReferenceManyColumn.tsx
4251
- function va({ record: e, source: t, reference: n, choices: r, optionLabel: i, optionValue: a }) {
4252
- let { labelsForValues: o } = Qi(r, n, i, a), s = e[t];
4253
- return /* @__PURE__ */ q(K, { children: o(Array.isArray(s) ? s : []) });
4282
+ function Ca({ record: e, source: t, reference: n, choices: r, optionLabel: i, optionValue: a }) {
4283
+ let { labelsForValues: o } = ra(r, n, i, a), s = e[t];
4284
+ return /* @__PURE__ */ J(q, { children: o(Array.isArray(s) ? s : []) });
4254
4285
  }
4255
- function ya({ source: e, label: t, reference: n, choices: r, optionLabel: i = "name", optionValue: a = "id", sortable: o = !1 }) {
4286
+ function wa({ source: e, label: t, reference: n, choices: r, optionLabel: i = "name", optionValue: a = "id", sortable: o = !1 }) {
4256
4287
  return Jn(l(() => ({
4257
4288
  key: e,
4258
4289
  source: e,
@@ -4263,7 +4294,7 @@ function ya({ source: e, label: t, reference: n, choices: r, optionLabel: i = "n
4263
4294
  dataIndex: e,
4264
4295
  key: e,
4265
4296
  sorter: o ? !0 : void 0,
4266
- render: (t, o) => /* @__PURE__ */ q(va, {
4297
+ render: (t, o) => /* @__PURE__ */ J(Ca, {
4267
4298
  record: o,
4268
4299
  source: e,
4269
4300
  reference: n,
@@ -4284,7 +4315,7 @@ function ya({ source: e, label: t, reference: n, choices: r, optionLabel: i = "n
4284
4315
  }
4285
4316
  //#endregion
4286
4317
  //#region src/crud/columns/ImageColumn.tsx
4287
- function ba({ source: e, label: t, sortable: n = !1, width: r = 40, height: i = 40, objectFit: a = "cover", borderRadius: o = 4, alt: s = "" }) {
4318
+ function Ta({ source: e, label: t, sortable: n = !1, width: r = 40, height: i = 40, objectFit: a = "cover", borderRadius: o = 4, alt: s = "" }) {
4288
4319
  return Jn(l(() => ({
4289
4320
  key: e,
4290
4321
  source: e,
@@ -4295,7 +4326,7 @@ function ba({ source: e, label: t, sortable: n = !1, width: r = 40, height: i =
4295
4326
  dataIndex: e,
4296
4327
  key: e,
4297
4328
  sorter: n ? !0 : void 0,
4298
- render: (e) => e == null || e === "" ? null : /* @__PURE__ */ q("img", {
4329
+ render: (e) => e == null || e === "" ? null : /* @__PURE__ */ J("img", {
4299
4330
  src: String(e),
4300
4331
  alt: s,
4301
4332
  style: {
@@ -4319,7 +4350,7 @@ function ba({ source: e, label: t, sortable: n = !1, width: r = 40, height: i =
4319
4350
  }
4320
4351
  //#endregion
4321
4352
  //#region src/crud/columns/CustomColumn.tsx
4322
- function xa({ source: e, label: t, sortable: n = !1, render: r }) {
4353
+ function Ea({ source: e, label: t, sortable: n = !1, render: r }) {
4323
4354
  return Jn(l(() => ({
4324
4355
  key: e,
4325
4356
  source: e,
@@ -4339,12 +4370,12 @@ function xa({ source: e, label: t, sortable: n = !1, render: r }) {
4339
4370
  }
4340
4371
  //#endregion
4341
4372
  //#region src/crud/filters/NumberFilter.tsx
4342
- function Sa({ source: e, label: t }) {
4373
+ function Da({ source: e, label: t }) {
4343
4374
  return rr(l(() => ({
4344
4375
  key: e,
4345
4376
  source: e,
4346
4377
  label: t,
4347
- render: ({ value: n, onChange: r }) => /* @__PURE__ */ q(F, {
4378
+ render: ({ value: n, onChange: r }) => /* @__PURE__ */ J(I, {
4348
4379
  placeholder: t ?? e,
4349
4380
  value: n,
4350
4381
  onChange: (e) => r(e ?? void 0),
@@ -4354,12 +4385,12 @@ function Sa({ source: e, label: t }) {
4354
4385
  }
4355
4386
  //#endregion
4356
4387
  //#region src/crud/filters/BooleanFilter.tsx
4357
- function Ca({ source: e, label: t }) {
4388
+ function Oa({ source: e, label: t }) {
4358
4389
  return rr(l(() => ({
4359
4390
  key: e,
4360
4391
  source: e,
4361
4392
  label: t,
4362
- render: ({ value: n, onChange: r }) => /* @__PURE__ */ q(z, {
4393
+ render: ({ value: n, onChange: r }) => /* @__PURE__ */ J(B, {
4363
4394
  allowClear: !0,
4364
4395
  placeholder: t ?? e,
4365
4396
  value: n,
@@ -4377,15 +4408,15 @@ function Ca({ source: e, label: t }) {
4377
4408
  }
4378
4409
  //#endregion
4379
4410
  //#region src/crud/filters/DateFilter.tsx
4380
- function wa({ source: e, label: t }) {
4411
+ function ka({ source: e, label: t }) {
4381
4412
  return rr(l(() => ({
4382
4413
  key: e,
4383
4414
  source: e,
4384
4415
  label: t,
4385
- render: ({ value: n, onChange: r }) => /* @__PURE__ */ q(O, {
4416
+ render: ({ value: n, onChange: r }) => /* @__PURE__ */ J(O, {
4386
4417
  allowClear: !0,
4387
4418
  placeholder: t ?? e,
4388
- value: n ? Fe(String(n)) : null,
4419
+ value: n ? Pe(String(n)) : null,
4389
4420
  onChange: (e) => r(e ? e.format("YYYY-MM-DD") : void 0),
4390
4421
  style: { minWidth: 160 }
4391
4422
  })
@@ -4393,12 +4424,12 @@ function wa({ source: e, label: t }) {
4393
4424
  }
4394
4425
  //#endregion
4395
4426
  //#region src/crud/filters/SelectFilter.tsx
4396
- function Ta({ source: e, label: t, choices: n, multiple: r }) {
4427
+ function Aa({ source: e, label: t, choices: n, multiple: r }) {
4397
4428
  return rr(l(() => ({
4398
4429
  key: e,
4399
4430
  source: e,
4400
4431
  label: t,
4401
- render: ({ value: i, onChange: a }) => /* @__PURE__ */ q(z, {
4432
+ render: ({ value: i, onChange: a }) => /* @__PURE__ */ J(B, {
4402
4433
  allowClear: !0,
4403
4434
  mode: r ? "multiple" : void 0,
4404
4435
  placeholder: t ?? e,
@@ -4416,29 +4447,30 @@ function Ta({ source: e, label: t, choices: n, multiple: r }) {
4416
4447
  }
4417
4448
  //#endregion
4418
4449
  //#region src/crud/filters/ReferenceFilter.tsx
4419
- function Ea({ source: e, label: t, reference: n, choices: r, optionLabel: i, optionValue: a, multiple: o, search: s, lazy: c = !0, fetchSelected: l = !0, popupMatchSelectWidth: u, popupMinWidth: f, value: p, onChange: m }) {
4420
- let [h, g] = d(), [_, v] = d(!1), { options: y, loading: b } = Qi(r, n, i, a, s ? h : void 0, {
4450
+ function ja({ source: e, label: t, reference: n, choices: r, optionLabel: i, optionValue: a, multiple: o, search: s, lazy: c = !0, fetchSelected: l = !0, popupMatchSelectWidth: u, popupMinWidth: f, value: p, onChange: m }) {
4451
+ let [h, g] = d(), [_, v] = d(!1), { options: y, loading: b, selectedLoading: x } = ra(r, n, i, a, s ? h : void 0, {
4421
4452
  lazy: c,
4422
4453
  active: _ || !!h,
4423
4454
  selectedValues: p,
4424
4455
  fetchSelected: l
4425
- });
4426
- return /* @__PURE__ */ q(z, {
4427
- ...Gi({
4456
+ }), S = Xi(b, x), C = p;
4457
+ return /* @__PURE__ */ J(B, {
4458
+ ...Ji({
4428
4459
  popupMatchSelectWidth: u,
4429
4460
  popupMinWidth: f
4430
4461
  }),
4431
4462
  allowClear: !0,
4432
4463
  mode: o ? "multiple" : void 0,
4433
4464
  placeholder: t ?? e,
4434
- value: p,
4465
+ value: Zi(x, C, o ? [] : void 0),
4435
4466
  onChange: m,
4436
4467
  options: y.map((e) => ({
4437
4468
  label: e.label,
4438
4469
  value: e.value
4439
4470
  })),
4440
- loading: b,
4441
- notFoundContent: Ki(b),
4471
+ loading: S.loading,
4472
+ disabled: S.disabled,
4473
+ notFoundContent: Yi(S.loading),
4442
4474
  showSearch: s,
4443
4475
  filterOption: s ? !1 : void 0,
4444
4476
  onSearch: s ? g : void 0,
@@ -4449,12 +4481,12 @@ function Ea({ source: e, label: t, reference: n, choices: r, optionLabel: i, opt
4449
4481
  style: { minWidth: 180 }
4450
4482
  });
4451
4483
  }
4452
- function Da({ source: e, label: t, reference: n, choices: r, optionLabel: i = "name", optionValue: a = "id", multiple: o, search: s, lazy: c = !0, fetchSelected: u = !0, popupMatchSelectWidth: d, popupMinWidth: f }) {
4484
+ function Ma({ source: e, label: t, reference: n, choices: r, optionLabel: i = "name", optionValue: a = "id", multiple: o, search: s, lazy: c = !0, fetchSelected: u = !0, popupMatchSelectWidth: d, popupMinWidth: f }) {
4453
4485
  return rr(l(() => ({
4454
4486
  key: e,
4455
4487
  source: e,
4456
4488
  label: t,
4457
- render: ({ value: l, onChange: p }) => /* @__PURE__ */ q(Ea, {
4489
+ render: ({ value: l, onChange: p }) => /* @__PURE__ */ J(ja, {
4458
4490
  source: e,
4459
4491
  label: t,
4460
4492
  reference: n,
@@ -4485,11 +4517,11 @@ function Da({ source: e, label: t, reference: n, choices: r, optionLabel: i = "n
4485
4517
  f
4486
4518
  ])), null;
4487
4519
  }
4488
- function Oa(e) {
4489
- return /* @__PURE__ */ q(Da, {
4520
+ function Na(e) {
4521
+ return /* @__PURE__ */ J(Ma, {
4490
4522
  ...e,
4491
4523
  multiple: !0
4492
4524
  });
4493
4525
  }
4494
4526
  //#endregion
4495
- export { Kt as AdminApp, Pt as AdminLayout, Bn as AppHub, Vn as AppLauncherButton, Ze as AppThemeProvider, In as AuthAlternateLink, Ln as AuthPageLayout, lt as AuthProvider, ma as BooleanColumn, Ci as BooleanField, Ca as BooleanFilter, xa as CustomColumn, Xn as DEFAULT_TEXT_FILTER_DEBOUNCE_MS, Jt as DataProvider, ha as DateColumn, ki as DateField, wa as DateFilter, Ai as DateTimeField, et as DensitySwitch, en as EXPECTED_VALIDATION_BODY_HINT, $ as FieldWrapper, ua as FileField, ii as FilterBar, _i as FormStep, yi as FormSteps, mi as FormTab, gi as FormTabs, Ft as Guard, Lt as GuestOnly, ba as ImageColumn, ca as ImageField, li as InlineFormSet, ui as InlineFormSetStacked, Rn as LoginPage, pa as NumberColumn, Si as NumberField, Sa as NumberFilter, Ii as PasswordField, mt as PermissionsProvider, zn as PlaceholderPage, It as Protected, _a as ReferenceColumn, ta as ReferenceField, Da as ReferenceFilter, ya as ReferenceManyColumn, ra as ReferenceManyField, Oa as ReferenceManyFilter, Rt as RequirePermission, ai as ResourceForm, Ur as ResourceFormModal, ni as ResourceList, Pi as SelectField, Ta as SelectFilter, xi as TextAreaField, da as TextColumn, bi as TextField, $n as TextFilter, nt as ThemeSwitch, rt as ThemeToolbar, Ni as TimeField, kn as applyInMemoryListParams, Q as asStringMessages, Sr as buildFormPayload, Cr as buildInlineRowsPayload, jr as buildResourceFormSubmitBody, Qt as combineResourceHandlers, Gt as createAdminRouter, An as createMemoryResourceHandlers, ht as createPermissionsChecker, jn as createRestResourceHandlers, ft as createSessionStorageAuthAdapter, Ut as deriveAuthPaths, sn as describeNonStandardValidationBody, bt as filterFlatNavItems, wt as filterNavByPermission, vt as filterNavItems, Dn as filterRows, hn as finalizeFormErrors, yt as flattenNavLeaves, mn as flattenNestedArrayErrors, un as getErrorBody, br as getFormValue, _t as getNavItemLabel, zt as getRouteAccess, wn as getRowById, wr as hasUploadValues, $t as isAbortError, oi as nestedFieldPath, vn as parseDjangoDRFFormErrors, yn as parseDotNetFormErrors, bn as parseNodeFormErrors, Bt as partitionAdminRoutes, Ar as prepareFormSubmitBody, fn as resolveErrorBody, xr as setFormValue, Nn as toDjangoRestOrdering, kr as toFormData, Fn as toJsonApiSort, Pn as toODataOrderBy, zr as useAbortableEffect, ut as useAuth, gt as useCan, Qi as useChoices, Yt as useDataProvider, Xr as useListQueryState, X as usePermissions, pr as useRegisterPayloadField, mr as useRegisterSectionField, Qr as useResourceListContext, Qe as useThemeMode };
4527
+ export { Kt as AdminApp, Pt as AdminLayout, Bn as AppHub, Vn as AppLauncherButton, Xe as AppThemeProvider, In as AuthAlternateLink, Ln as AuthPageLayout, ct as AuthProvider, ya as BooleanColumn, wi as BooleanField, Oa as BooleanFilter, Ea as CustomColumn, Xn as DEFAULT_TEXT_FILTER_DEBOUNCE_MS, Jt as DataProvider, ba as DateColumn, Ai as DateField, ka as DateFilter, ji as DateTimeField, $e as DensitySwitch, en as EXPECTED_VALIDATION_BODY_HINT, $ as FieldWrapper, ha as FileField, ai as FilterBar, vi as FormStep, bi as FormSteps, hi as FormTab, _i as FormTabs, Ft as Guard, Lt as GuestOnly, Ta as ImageColumn, pa as ImageField, ui as InlineFormSet, di as InlineFormSetStacked, Rn as LoginPage, va as NumberColumn, Ci as NumberField, Da as NumberFilter, Li as PasswordField, pt as PermissionsProvider, zn as PlaceholderPage, It as Protected, Sa as ReferenceColumn, oa as ReferenceField, Ma as ReferenceFilter, wa as ReferenceManyColumn, ca as ReferenceManyField, Na as ReferenceManyFilter, Rt as RequirePermission, oi as ResourceForm, Wr as ResourceFormModal, ri as ResourceList, Fi as SelectField, Aa as SelectFilter, Si as TextAreaField, ga as TextColumn, xi as TextField, $n as TextFilter, tt as ThemeSwitch, nt as ThemeToolbar, Pi as TimeField, kn as applyInMemoryListParams, Q as asStringMessages, Sr as buildFormPayload, Cr as buildInlineRowsPayload, Mr as buildResourceFormSubmitBody, Qt as combineResourceHandlers, Gt as createAdminRouter, An as createMemoryResourceHandlers, ht as createPermissionsChecker, jn as createRestResourceHandlers, dt as createSessionStorageAuthAdapter, Ut as deriveAuthPaths, sn as describeNonStandardValidationBody, bt as filterFlatNavItems, wt as filterNavByPermission, vt as filterNavItems, Dn as filterRows, hn as finalizeFormErrors, yt as flattenNavLeaves, mn as flattenNestedArrayErrors, un as getErrorBody, br as getFormValue, _t as getNavItemLabel, zt as getRouteAccess, wn as getRowById, wr as hasUploadValues, $t as isAbortError, si as nestedFieldPath, vn as parseDjangoDRFFormErrors, yn as parseDotNetFormErrors, bn as parseNodeFormErrors, Bt as partitionAdminRoutes, jr as prepareFormSubmitBody, fn as resolveErrorBody, xr as setFormValue, Nn as toDjangoRestOrdering, Ar as toFormData, Fn as toJsonApiSort, Pn as toODataOrderBy, Br as useAbortableEffect, lt as useAuth, gt as useCan, ra as useChoices, Yt as useDataProvider, Zr as useListQueryState, mt as usePermissions, pr as useRegisterPayloadField, mr as useRegisterSectionField, $r as useResourceListContext, Ze as useThemeMode };