ding-react-admin 2.2.0 → 2.2.2

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
@@ -1342,93 +1342,100 @@ function zn({ title: e }) {
1342
1342
  }
1343
1343
  //#endregion
1344
1344
  //#region src/components/AppHub.tsx
1345
- function Bn({ apps: e, menuItems: t, onAppClick: n, onMenuClick: r, menuSearchPlaceholder: i = "Search menus across apps…", className: a, maxWidth: o = 960 }) {
1346
- let s = v(), { token: c } = G.useToken(), [u, f] = d(""), p = (e) => {
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 } = K.useToken(), [f, p] = d(""), m = (e) => {
1347
1347
  if (n) {
1348
1348
  n(e);
1349
1349
  return;
1350
1350
  }
1351
- s(e.path);
1352
- }, m = (e) => {
1351
+ c(e.path);
1352
+ }, h = (e) => {
1353
1353
  if (r) {
1354
1354
  r(e);
1355
1355
  return;
1356
1356
  }
1357
- s(e.path);
1358
- }, h = u.trim(), g = l(() => t && h ? bt(t, h) : [], [t, h]), _ = !!(t && h);
1359
- return /* @__PURE__ */ J("div", {
1357
+ c(e.path);
1358
+ }, g = f.trim(), _ = l(() => t && g ? bt(t, g) : [], [t, g]), y = !!(t && g);
1359
+ return /* @__PURE__ */ Y("div", {
1360
1360
  className: a,
1361
1361
  style: {
1362
1362
  width: "100%",
1363
1363
  maxWidth: o,
1364
1364
  marginInline: "auto",
1365
- paddingInline: c.paddingMD
1365
+ paddingInline: u.paddingMD
1366
1366
  },
1367
- children: [t?.length ? /* @__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, {
1373
- value: u,
1374
- onChange: f,
1372
+ children: /* @__PURE__ */ J(rt, {
1373
+ value: f,
1374
+ onChange: p,
1375
1375
  placeholder: i,
1376
1376
  variant: "app"
1377
1377
  })
1378
- }) : null, _ ? /* @__PURE__ */ q(te, {
1378
+ }) : null, s ? /* @__PURE__ */ J("div", {
1379
+ style: {
1380
+ display: "flex",
1381
+ justifyContent: "center",
1382
+ padding: u.paddingXL
1383
+ },
1384
+ children: /* @__PURE__ */ J(ae, { size: "large" })
1385
+ }) : y ? /* @__PURE__ */ J(ee, {
1379
1386
  bordered: !0,
1380
- dataSource: g,
1387
+ dataSource: _,
1381
1388
  locale: { emptyText: "No menus match your search." },
1382
1389
  style: {
1383
- background: c.colorBgContainer,
1384
- borderRadius: c.borderRadiusLG
1390
+ background: u.colorBgContainer,
1391
+ borderRadius: u.borderRadiusLG
1385
1392
  },
1386
1393
  renderItem: (e) => {
1387
1394
  let t = e.Icon;
1388
- return /* @__PURE__ */ q(te.Item, {
1395
+ return /* @__PURE__ */ J(ee.Item, {
1389
1396
  style: { cursor: "pointer" },
1390
- onClick: () => m(e),
1391
- children: /* @__PURE__ */ q(te.Item.Meta, {
1392
- avatar: t ? /* @__PURE__ */ q("span", {
1397
+ onClick: () => h(e),
1398
+ children: /* @__PURE__ */ J(ee.Item.Meta, {
1399
+ avatar: t ? /* @__PURE__ */ J("span", {
1393
1400
  style: {
1394
1401
  fontSize: 20,
1395
1402
  lineHeight: 1
1396
1403
  },
1397
- children: /* @__PURE__ */ q(t, {})
1404
+ children: /* @__PURE__ */ J(t, {})
1398
1405
  }) : void 0,
1399
1406
  title: _t(e),
1400
1407
  description: e.group
1401
1408
  })
1402
1409
  });
1403
1410
  }
1404
- }) : /* @__PURE__ */ q(R, {
1411
+ }) : /* @__PURE__ */ J(z, {
1405
1412
  gutter: [16, 16],
1406
1413
  justify: "center",
1407
1414
  children: e.map((e) => {
1408
1415
  let t = e.Icon;
1409
- return /* @__PURE__ */ q(E, {
1416
+ return /* @__PURE__ */ J(E, {
1410
1417
  xs: 12,
1411
1418
  sm: 8,
1412
1419
  md: 6,
1413
1420
  lg: 4,
1414
1421
  style: { maxWidth: 200 },
1415
- children: /* @__PURE__ */ q(T, {
1422
+ children: /* @__PURE__ */ J(T, {
1416
1423
  hoverable: !0,
1417
- onClick: () => p(e),
1424
+ onClick: () => m(e),
1418
1425
  styles: { body: {
1419
1426
  textAlign: "center",
1420
- padding: c.paddingLG
1427
+ padding: u.paddingLG
1421
1428
  } },
1422
- children: /* @__PURE__ */ J(B, {
1429
+ children: /* @__PURE__ */ Y(V, {
1423
1430
  orientation: "vertical",
1424
1431
  size: "middle",
1425
- children: [t ? /* @__PURE__ */ q("span", {
1432
+ children: [t ? /* @__PURE__ */ J("span", {
1426
1433
  style: {
1427
1434
  fontSize: 40,
1428
1435
  lineHeight: 1
1429
1436
  },
1430
- children: /* @__PURE__ */ q(t, {})
1431
- }) : null, /* @__PURE__ */ q(W.Text, {
1437
+ children: /* @__PURE__ */ J(t, {})
1438
+ }) : null, /* @__PURE__ */ J(G.Text, {
1432
1439
  strong: !0,
1433
1440
  children: e.label
1434
1441
  })]
@@ -1443,9 +1450,9 @@ function Bn({ apps: e, menuItems: t, onAppClick: n, onMenuClick: r, menuSearchPl
1443
1450
  //#region src/components/AppLauncherButton.tsx
1444
1451
  function Vn({ hubPath: e = "/", label: t = "Apps", onClick: n }) {
1445
1452
  let r = v();
1446
- return /* @__PURE__ */ q(w, {
1453
+ return /* @__PURE__ */ J(w, {
1447
1454
  type: "text",
1448
- icon: /* @__PURE__ */ q(ue, {}),
1455
+ icon: /* @__PURE__ */ J(le, {}),
1449
1456
  onClick: () => {
1450
1457
  if (n) {
1451
1458
  n();
@@ -1515,7 +1522,7 @@ function Kn({ children: e, toggleSort: t, sort: n }) {
1515
1522
  c,
1516
1523
  u
1517
1524
  ]);
1518
- return /* @__PURE__ */ q(Gn.Provider, {
1525
+ return /* @__PURE__ */ J(Gn.Provider, {
1519
1526
  value: f,
1520
1527
  children: e
1521
1528
  });
@@ -1562,7 +1569,7 @@ function Qn({ value: e, onChange: t, placeholder: n, debounceMs: r }) {
1562
1569
  r,
1563
1570
  t,
1564
1571
  e
1565
- ]), /* @__PURE__ */ q(P, {
1572
+ ]), /* @__PURE__ */ J(F, {
1566
1573
  allowClear: !0,
1567
1574
  placeholder: n,
1568
1575
  value: i,
@@ -1579,7 +1586,7 @@ function $n({ source: e, label: t, placeholder: n, debounceMs: r }) {
1579
1586
  key: e,
1580
1587
  source: e,
1581
1588
  label: t,
1582
- render: ({ value: r, onChange: i }) => /* @__PURE__ */ q(Qn, {
1589
+ render: ({ value: r, onChange: i }) => /* @__PURE__ */ J(Qn, {
1583
1590
  value: r,
1584
1591
  onChange: i,
1585
1592
  placeholder: n ?? t ?? e,
@@ -1617,7 +1624,7 @@ function tr({ children: e, values: t, setFilterValue: n, textFilterDebounceMs: r
1617
1624
  s,
1618
1625
  r
1619
1626
  ]);
1620
- return /* @__PURE__ */ q(er.Provider, {
1627
+ return /* @__PURE__ */ J(er.Provider, {
1621
1628
  value: c,
1622
1629
  children: e
1623
1630
  });
@@ -1635,7 +1642,7 @@ function rr(e) {
1635
1642
  //#region src/crud/context/FormContext.tsx
1636
1643
  var ir = t(null);
1637
1644
  function ar({ children: e, resource: t, isNew: n, disabled: r }) {
1638
- return /* @__PURE__ */ q(ir.Provider, {
1645
+ return /* @__PURE__ */ J(ir.Provider, {
1639
1646
  value: {
1640
1647
  resource: t,
1641
1648
  isNew: n,
@@ -1651,7 +1658,7 @@ function or() {
1651
1658
  //#region src/crud/context/FormSectionContext.tsx
1652
1659
  var sr = t(null);
1653
1660
  function cr({ sourcesRef: e, children: t }) {
1654
- return /* @__PURE__ */ q(sr.Provider, {
1661
+ return /* @__PURE__ */ J(sr.Provider, {
1655
1662
  value: e,
1656
1663
  children: t
1657
1664
  });
@@ -1663,7 +1670,7 @@ function lr() {
1663
1670
  //#region src/crud/context/PayloadFieldsContext.tsx
1664
1671
  var ur = t(null);
1665
1672
  function dr({ children: e, fieldsRef: t }) {
1666
- return /* @__PURE__ */ q(ur.Provider, {
1673
+ return /* @__PURE__ */ J(ur.Provider, {
1667
1674
  value: t,
1668
1675
  children: e
1669
1676
  });
@@ -1699,7 +1706,7 @@ function mr(e, t = !0) {
1699
1706
  //#region src/crud/context/InlineFieldsRegistry.tsx
1700
1707
  var hr = t(null);
1701
1708
  function gr({ children: e, registryRef: t }) {
1702
- return /* @__PURE__ */ q(hr.Provider, {
1709
+ return /* @__PURE__ */ J(hr.Provider, {
1703
1710
  value: t,
1704
1711
  children: e
1705
1712
  });
@@ -1730,22 +1737,22 @@ function vr(e, t, n, r, i = !0) {
1730
1737
  //#endregion
1731
1738
  //#region src/crud/FormGlobalErrorsAlert.tsx
1732
1739
  function yr({ errors: e }) {
1733
- return e.length ? e.length === 1 ? /* @__PURE__ */ q(x, {
1740
+ return e.length ? e.length === 1 ? /* @__PURE__ */ J(x, {
1734
1741
  type: "error",
1735
1742
  title: e[0],
1736
1743
  showIcon: !0,
1737
1744
  style: { marginBottom: 16 }
1738
- }) : /* @__PURE__ */ q(x, {
1745
+ }) : /* @__PURE__ */ J(x, {
1739
1746
  type: "error",
1740
1747
  title: "Could not save",
1741
1748
  showIcon: !0,
1742
1749
  style: { marginBottom: 16 },
1743
- description: /* @__PURE__ */ q("ul", {
1750
+ description: /* @__PURE__ */ J("ul", {
1744
1751
  style: {
1745
1752
  margin: 0,
1746
1753
  paddingLeft: 20
1747
1754
  },
1748
- children: e.map((e) => /* @__PURE__ */ q("li", { children: e }, e))
1755
+ children: e.map((e) => /* @__PURE__ */ J("li", { children: e }, e))
1749
1756
  })
1750
1757
  }) : null;
1751
1758
  }
@@ -2024,7 +2031,7 @@ function Vr({ dp: e, resource: t, id: n, isNew: r, form: i, message: o, payloadF
2024
2031
  //#endregion
2025
2032
  //#region src/crud/ResourceRecordForm.tsx
2026
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" }) {
2027
- 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({
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 = Ae({ defaultValues: i }), { loading: T, formVersion: E } = Br({
2028
2035
  dp: g,
2029
2036
  resource: e,
2030
2037
  id: h,
@@ -2048,20 +2055,20 @@ function Hr({ resource: e, id: t, children: r, defaultValues: i, enabled: a = !0
2048
2055
  C.handleSubmit(D, () => {
2049
2056
  _.warning("Please fix the errors below.");
2050
2057
  })();
2051
- }, j = /* @__PURE__ */ q(w, {
2058
+ }, j = /* @__PURE__ */ J(w, {
2052
2059
  disabled: k,
2053
2060
  onClick: c ? void 0 : s,
2054
2061
  children: "Cancel"
2055
- }), ee = /* @__PURE__ */ q(ar, {
2062
+ }), N = /* @__PURE__ */ J(ar, {
2056
2063
  resource: e,
2057
2064
  isNew: m,
2058
- children: /* @__PURE__ */ q(dr, {
2065
+ children: /* @__PURE__ */ J(dr, {
2059
2066
  fieldsRef: v,
2060
- children: /* @__PURE__ */ q(gr, {
2067
+ children: /* @__PURE__ */ J(gr, {
2061
2068
  registryRef: y,
2062
- children: /* @__PURE__ */ J("div", {
2069
+ children: /* @__PURE__ */ Y("div", {
2063
2070
  style: { position: "relative" },
2064
- children: [k && p === "overlay" ? /* @__PURE__ */ q("div", {
2071
+ children: [k && p === "overlay" ? /* @__PURE__ */ J("div", {
2065
2072
  style: {
2066
2073
  position: "absolute",
2067
2074
  inset: 0,
@@ -2070,11 +2077,11 @@ function Hr({ resource: e, id: t, children: r, defaultValues: i, enabled: a = !0
2070
2077
  justifyContent: "center",
2071
2078
  zIndex: 1
2072
2079
  },
2073
- children: /* @__PURE__ */ q(oe, {})
2074
- }) : null, /* @__PURE__ */ n(ke, {
2080
+ children: /* @__PURE__ */ J(ae, {})
2081
+ }) : null, /* @__PURE__ */ n(Oe, {
2075
2082
  ...C,
2076
2083
  key: E
2077
- }, /* @__PURE__ */ J(M, {
2084
+ }, /* @__PURE__ */ Y(M, {
2078
2085
  layout: "vertical",
2079
2086
  onFinish: A,
2080
2087
  style: p === "overlay" ? {
@@ -2082,20 +2089,20 @@ function Hr({ resource: e, id: t, children: r, defaultValues: i, enabled: a = !0
2082
2089
  pointerEvents: k ? "none" : void 0
2083
2090
  } : void 0,
2084
2091
  children: [
2085
- /* @__PURE__ */ q(yr, { errors: b }),
2092
+ /* @__PURE__ */ J(yr, { errors: b }),
2086
2093
  r,
2087
- /* @__PURE__ */ q(M.Item, {
2094
+ /* @__PURE__ */ J(M.Item, {
2088
2095
  style: {
2089
2096
  marginTop: 16,
2090
2097
  marginBottom: 0
2091
2098
  },
2092
- children: /* @__PURE__ */ J(B, { children: [/* @__PURE__ */ q(w, {
2099
+ children: /* @__PURE__ */ Y(V, { children: [/* @__PURE__ */ J(w, {
2093
2100
  type: "primary",
2094
2101
  htmlType: "submit",
2095
2102
  loading: O,
2096
2103
  disabled: k || !o,
2097
2104
  children: "Save"
2098
- }), c ? /* @__PURE__ */ q(f, {
2105
+ }), c ? /* @__PURE__ */ J(f, {
2099
2106
  to: c,
2100
2107
  children: j
2101
2108
  }) : j] })
@@ -2106,13 +2113,13 @@ function Hr({ resource: e, id: t, children: r, defaultValues: i, enabled: a = !0
2106
2113
  })
2107
2114
  })
2108
2115
  });
2109
- return T && !O && p === "replace" ? /* @__PURE__ */ q(oe, {}) : ee;
2116
+ return T && !O && p === "replace" ? /* @__PURE__ */ J(ae, {}) : N;
2110
2117
  }
2111
2118
  //#endregion
2112
2119
  //#region src/crud/ResourceFormModal.tsx
2113
2120
  function Ur({ resource: e, editId: t, onClose: n, children: r, title: i, permissions: a, defaultValues: o, width: s = 560, onSuccess: c }) {
2114
- 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;
2115
- return /* @__PURE__ */ q(ne, {
2121
+ 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;
2122
+ return /* @__PURE__ */ J(te, {
2116
2123
  open: u,
2117
2124
  title: f,
2118
2125
  onCancel: n,
@@ -2120,7 +2127,7 @@ function Ur({ resource: e, editId: t, onClose: n, children: r, title: i, permiss
2120
2127
  destroyOnHidden: !0,
2121
2128
  width: s,
2122
2129
  maskClosable: !1,
2123
- children: /* @__PURE__ */ q(S, { children: /* @__PURE__ */ q(Hr, {
2130
+ children: /* @__PURE__ */ J(S, { children: /* @__PURE__ */ J(Hr, {
2124
2131
  resource: e,
2125
2132
  id: t ?? void 0,
2126
2133
  enabled: u,
@@ -2151,7 +2158,7 @@ function Wr({ selectedCount: e, total: t, allPageSelected: n, allMatchingSelecte
2151
2158
  e,
2152
2159
  u
2153
2160
  ]), _ = n && !r && t > e;
2154
- return /* @__PURE__ */ J(B, {
2161
+ return /* @__PURE__ */ Y(V, {
2155
2162
  wrap: !0,
2156
2163
  style: {
2157
2164
  marginBottom: 16,
@@ -2159,7 +2166,7 @@ function Wr({ selectedCount: e, total: t, allPageSelected: n, allMatchingSelecte
2159
2166
  },
2160
2167
  align: "center",
2161
2168
  children: [
2162
- /* @__PURE__ */ J(W.Text, {
2169
+ /* @__PURE__ */ Y(G.Text, {
2163
2170
  type: "secondary",
2164
2171
  children: [
2165
2172
  e,
@@ -2168,17 +2175,17 @@ function Wr({ selectedCount: e, total: t, allPageSelected: n, allMatchingSelecte
2168
2175
  " selected"
2169
2176
  ]
2170
2177
  }),
2171
- e > 0 ? /* @__PURE__ */ q(w, {
2178
+ e > 0 ? /* @__PURE__ */ J(w, {
2172
2179
  type: "link",
2173
2180
  size: "small",
2174
2181
  onClick: o,
2175
2182
  style: { padding: 0 },
2176
2183
  children: "Clear selection"
2177
2184
  }) : null,
2178
- _ ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(W.Text, {
2185
+ _ ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(G.Text, {
2179
2186
  type: "secondary",
2180
2187
  children: "·"
2181
- }), /* @__PURE__ */ J(w, {
2188
+ }), /* @__PURE__ */ Y(w, {
2182
2189
  type: "link",
2183
2190
  size: "small",
2184
2191
  onClick: i,
@@ -2189,10 +2196,10 @@ function Wr({ selectedCount: e, total: t, allPageSelected: n, allMatchingSelecte
2189
2196
  " items matching filter"
2190
2197
  ]
2191
2198
  })] }) : null,
2192
- r && t > 0 ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(W.Text, {
2199
+ r && t > 0 ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(G.Text, {
2193
2200
  type: "secondary",
2194
2201
  children: "·"
2195
- }), /* @__PURE__ */ J(W.Text, {
2202
+ }), /* @__PURE__ */ Y(G.Text, {
2196
2203
  type: "success",
2197
2204
  children: [
2198
2205
  "All ",
@@ -2200,7 +2207,7 @@ function Wr({ selectedCount: e, total: t, allPageSelected: n, allMatchingSelecte
2200
2207
  " items selected"
2201
2208
  ]
2202
2209
  })] }) : null,
2203
- /* @__PURE__ */ q(z, {
2210
+ /* @__PURE__ */ J(B, {
2204
2211
  placeholder: "Action",
2205
2212
  style: { minWidth: 200 },
2206
2213
  options: h,
@@ -2209,7 +2216,7 @@ function Wr({ selectedCount: e, total: t, allPageSelected: n, allMatchingSelecte
2209
2216
  disabled: e === 0 || f,
2210
2217
  allowClear: !0
2211
2218
  }),
2212
- /* @__PURE__ */ q(w, {
2219
+ /* @__PURE__ */ J(w, {
2213
2220
  type: "primary",
2214
2221
  onClick: () => void g(),
2215
2222
  disabled: !p || e === 0 || f,
@@ -2342,11 +2349,11 @@ function ei(e, t) {
2342
2349
  ...n,
2343
2350
  render: (e, n, r) => {
2344
2351
  let a = i ? i(e, n, r) : $r(e);
2345
- return t.showEdit ? /* @__PURE__ */ q(f, {
2352
+ return t.showEdit ? /* @__PURE__ */ J(f, {
2346
2353
  to: `${t.pathPrefix}/${String(n.id)}`,
2347
2354
  className: "ding-admin-row-edit-link",
2348
2355
  children: a
2349
- }) : /* @__PURE__ */ q(w, {
2356
+ }) : /* @__PURE__ */ J(w, {
2350
2357
  type: "link",
2351
2358
  size: "small",
2352
2359
  className: "ding-admin-row-edit-link",
@@ -2362,12 +2369,12 @@ function ei(e, t) {
2362
2369
  }, ...r];
2363
2370
  }
2364
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 }) {
2365
- 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(() => {
2366
- R(/* @__PURE__ */ new Set());
2367
- }, []), he = l(() => {
2372
+ 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(() => {
2373
+ z(/* @__PURE__ */ new Set());
2374
+ }, []), me = l(() => {
2368
2375
  if (!_) return [];
2369
2376
  let t = [];
2370
- return g && H && t.push({
2377
+ return g && U && t.push({
2371
2378
  key: "__delete",
2372
2379
  label: "Delete selected",
2373
2380
  confirm: (e) => `Delete ${e.length} selected item(s)? This cannot be undone.`,
@@ -2378,12 +2385,12 @@ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2378
2385
  }, [
2379
2386
  _,
2380
2387
  g,
2381
- H,
2388
+ U,
2382
2389
  h,
2383
2390
  x,
2384
2391
  e,
2385
2392
  E
2386
- ]), ge = he.length > 0, _e = ie.size;
2393
+ ]), he = me.length > 0, ge = re.size;
2387
2394
  c(() => {
2388
2395
  let e = M.current;
2389
2396
  if (!e) return;
@@ -2392,7 +2399,7 @@ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2392
2399
  let n = () => {
2393
2400
  if (e.clientHeight <= 0) return;
2394
2401
  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));
2395
- N((e) => e === c ? e : c);
2402
+ P((e) => e === c ? e : c);
2396
2403
  };
2397
2404
  n();
2398
2405
  let r = new ResizeObserver(() => n());
@@ -2400,45 +2407,45 @@ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2400
2407
  t?.classList.remove("ding-admin-resource-list-scroll"), r.disconnect(), window.removeEventListener("resize", n);
2401
2408
  };
2402
2409
  }, [
2410
+ he,
2403
2411
  ge,
2404
- _e,
2405
- L,
2406
- P
2412
+ R,
2413
+ F
2407
2414
  ]);
2408
- 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) => {
2409
- R((t) => {
2410
- let n = new Set(t), r = I.map((e) => e.id);
2415
+ 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) => {
2416
+ z((t) => {
2417
+ let n = new Set(t), r = L.map((e) => e.id);
2411
2418
  for (let t of r) e.includes(t) || n.delete(t);
2412
2419
  for (let t of e) n.add(t);
2413
2420
  return n;
2414
2421
  });
2415
- }, [I]), Se = a(async () => {
2416
- if (!(L <= 0)) {
2417
- z(!0);
2422
+ }, [L]), xe = a(async () => {
2423
+ if (!(R <= 0)) {
2424
+ B(!0);
2418
2425
  try {
2419
2426
  let t = y.sort.length === 0 ? void 0 : y.sort.length === 1 ? y.sort[0] : y.sort, n = await x.getList(e, {
2420
2427
  pagination: {
2421
2428
  page: 1,
2422
- perPage: L
2429
+ perPage: R
2423
2430
  },
2424
2431
  sort: t,
2425
2432
  filter: y.filter
2426
2433
  });
2427
- R(new Set(n.data.map((e) => e.id)));
2434
+ z(new Set(n.data.map((e) => e.id)));
2428
2435
  } catch (e) {
2429
2436
  E.error(e instanceof Error ? e.message : "Load failed");
2430
2437
  } finally {
2431
- z(!1);
2438
+ B(!1);
2432
2439
  }
2433
2440
  }
2434
2441
  }, [
2435
2442
  x,
2436
2443
  e,
2437
- L,
2444
+ R,
2438
2445
  y.sort,
2439
2446
  y.filter,
2440
2447
  E
2441
- ]), Ce = a((e) => {
2448
+ ]), Se = a((e) => {
2442
2449
  let t = (e) => {
2443
2450
  let t = e?.columnKey ?? e?.field;
2444
2451
  return t == null ? null : String(Array.isArray(t) ? t[0] : t);
@@ -2459,7 +2466,7 @@ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2459
2466
  return;
2460
2467
  }
2461
2468
  !e?.order && y.sort.length > 0 && b.setSort([]);
2462
- }, [b, y.sort.length]), we = l(() => {
2469
+ }, [b, y.sort.length]), Ce = l(() => {
2463
2470
  let e = y.sort.length === 0 ? void 0 : y.sort.length === 1 ? y.sort[0] : y.sort;
2464
2471
  return {
2465
2472
  pagination: {
@@ -2469,33 +2476,33 @@ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2469
2476
  sort: e,
2470
2477
  filter: y.filter
2471
2478
  };
2472
- }, [y]), Y = a(async (t) => {
2473
- F(!0);
2479
+ }, [y]), X = a(async (t) => {
2480
+ I(!0);
2474
2481
  try {
2475
2482
  let n = await x.getList(e, {
2476
- ...we,
2483
+ ...Ce,
2477
2484
  signal: t
2478
2485
  });
2479
2486
  if (t?.aborted) return;
2480
- te(n.data), ne(n.total);
2487
+ ee(n.data), te(n.total);
2481
2488
  } catch (e) {
2482
2489
  $t(e) || E.error(e instanceof Error ? e.message : "Load failed");
2483
2490
  } finally {
2484
- t?.aborted || F(!1);
2491
+ t?.aborted || I(!1);
2485
2492
  }
2486
2493
  }, [
2487
2494
  x,
2488
2495
  e,
2489
- we,
2496
+ Ce,
2490
2497
  E
2491
2498
  ]);
2492
- zr((e) => Y(e), [Y]);
2493
- let Te = l(() => ({
2494
- reload: () => void Y(),
2495
- clearSelection: me
2496
- }), [Y, me]), Ee = a(async (e, t) => {
2499
+ zr((e) => X(e), [X]);
2500
+ let we = l(() => ({
2501
+ reload: () => void X(),
2502
+ clearSelection: pe
2503
+ }), [X, pe]), Te = a(async (e, t) => {
2497
2504
  if (e.confirm) {
2498
- let n = typeof e.confirm == "function" ? await e.confirm(t, Te) : e.confirm;
2505
+ let n = typeof e.confirm == "function" ? await e.confirm(t, we) : e.confirm;
2499
2506
  if (n === !1 || !await new Promise((t) => {
2500
2507
  D.confirm({
2501
2508
  title: n,
@@ -2505,35 +2512,35 @@ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2505
2512
  });
2506
2513
  })) return;
2507
2514
  }
2508
- z(!0);
2515
+ B(!0);
2509
2516
  try {
2510
- await e.execute(t, Te);
2517
+ await e.execute(t, we);
2511
2518
  } catch (e) {
2512
2519
  E.error(e instanceof Error ? e.message : "Action failed");
2513
2520
  } finally {
2514
- z(!1);
2521
+ B(!1);
2515
2522
  }
2516
2523
  }, [
2517
- Te,
2524
+ we,
2518
2525
  D,
2519
2526
  E
2520
- ]), De = a(async (t) => {
2521
- if (H) try {
2522
- await x.delete(e, t.id), E.success("Deleted"), Y();
2527
+ ]), Ee = a(async (t) => {
2528
+ if (U) try {
2529
+ await x.delete(e, t.id), E.success("Deleted"), X();
2523
2530
  } catch (e) {
2524
2531
  E.error(e instanceof Error ? e.message : "Delete failed");
2525
2532
  }
2526
2533
  }, [
2527
- H,
2534
+ U,
2528
2535
  x,
2529
2536
  e,
2530
- Y,
2537
+ X,
2531
2538
  E
2532
- ]), Oe = l(() => {
2539
+ ]), De = l(() => {
2533
2540
  let e = k.map((e) => {
2534
2541
  let t = e.buildColumn();
2535
2542
  if (e.sortable) {
2536
- 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", {
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__ */ Y("span", {
2537
2544
  style: {
2538
2545
  display: "inline-flex",
2539
2546
  alignItems: "center",
@@ -2541,7 +2548,7 @@ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2541
2548
  marginInlineStart: 4,
2542
2549
  color: "var(--ant-color-primary)"
2543
2550
  },
2544
- children: [r == null ? null : /* @__PURE__ */ q("span", {
2551
+ children: [r == null ? null : /* @__PURE__ */ J("span", {
2545
2552
  style: {
2546
2553
  fontSize: 11,
2547
2554
  fontWeight: 600,
@@ -2550,7 +2557,7 @@ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2550
2557
  textAlign: "center"
2551
2558
  },
2552
2559
  children: r
2553
- }), q(i === "ascend" ? pe : fe, { style: { fontSize: 11 } })]
2560
+ }), J(i === "ascend" ? fe : de, { style: { fontSize: 11 } })]
2554
2561
  });
2555
2562
  return {
2556
2563
  ...t,
@@ -2561,39 +2568,39 @@ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2561
2568
  }
2562
2569
  return t;
2563
2570
  });
2564
- if (!de) return ei(e, {
2565
- showEdit: le,
2566
- showQuickEdit: U,
2571
+ if (!ue) return ei(e, {
2572
+ showEdit: ce,
2573
+ showQuickEdit: W,
2567
2574
  pathPrefix: n,
2568
2575
  openEditModal: b.openEditModal
2569
2576
  });
2570
2577
  let t = {
2571
- reload: () => void Y(),
2578
+ reload: () => void X(),
2572
2579
  openEditModal: b.openEditModal
2573
2580
  }, r = {
2574
2581
  title: "Actions",
2575
2582
  key: "__actions",
2576
2583
  width: i === "both" ? 200 : 160,
2577
- render: (e, r) => /* @__PURE__ */ J(B, {
2584
+ render: (e, r) => /* @__PURE__ */ Y(V, {
2578
2585
  size: "small",
2579
2586
  wrap: !0,
2580
2587
  children: [
2581
- le ? /* @__PURE__ */ q(f, {
2588
+ ce ? /* @__PURE__ */ J(f, {
2582
2589
  to: `${n}/${String(r.id)}`,
2583
2590
  children: "Edit"
2584
2591
  }) : null,
2585
- U ? /* @__PURE__ */ q(w, {
2592
+ W ? /* @__PURE__ */ J(w, {
2586
2593
  type: "link",
2587
2594
  size: "small",
2588
2595
  style: { padding: 0 },
2589
2596
  onClick: () => b.openEditModal(r.id),
2590
2597
  children: i === "both" ? "Quick edit" : "Edit"
2591
2598
  }) : null,
2592
- ue ? /* @__PURE__ */ q(w, {
2599
+ le ? /* @__PURE__ */ J(w, {
2593
2600
  type: "link",
2594
2601
  danger: !0,
2595
2602
  size: "small",
2596
- onClick: () => void De(r),
2603
+ onClick: () => void Ee(r),
2597
2604
  style: { padding: 0 },
2598
2605
  children: "Delete"
2599
2606
  }) : null,
@@ -2602,26 +2609,26 @@ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2602
2609
  })
2603
2610
  };
2604
2611
  return ei([...e, r], {
2605
- showEdit: le,
2606
- showQuickEdit: U,
2612
+ showEdit: ce,
2613
+ showQuickEdit: W,
2607
2614
  pathPrefix: n,
2608
2615
  openEditModal: b.openEditModal
2609
2616
  });
2610
2617
  }, [
2611
2618
  k,
2612
- de,
2613
- le,
2614
- U,
2615
2619
  ue,
2620
+ ce,
2621
+ W,
2622
+ le,
2616
2623
  i,
2617
2624
  n,
2618
- De,
2625
+ Ee,
2619
2626
  A,
2620
2627
  j,
2621
2628
  b,
2622
2629
  p,
2623
- Y
2624
- ]), ke = a((e, t) => {
2630
+ X
2631
+ ]), Oe = a((e, t) => {
2625
2632
  if (t !== y.perPage) {
2626
2633
  b.setPerPage(t);
2627
2634
  return;
@@ -2631,79 +2638,79 @@ function ti({ resource: e, title: t, pathPrefix: n, newPath: r, editMode: i = "p
2631
2638
  b,
2632
2639
  y.page,
2633
2640
  y.perPage
2634
- ]), Ae = o && (y.createModal || y.editId != null) && (i === "modal" || i === "both");
2635
- return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ J(T, {
2636
- title: /* @__PURE__ */ q(W.Title, {
2641
+ ]), ke = o && (y.createModal || y.editId != null) && (i === "modal" || i === "both");
2642
+ return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ Y(T, {
2643
+ title: /* @__PURE__ */ J(G.Title, {
2637
2644
  level: 5,
2638
2645
  style: { margin: 0 },
2639
2646
  children: t
2640
2647
  }),
2641
- extra: m || V ? /* @__PURE__ */ J(B, { children: [m, V ? i === "modal" || i === "both" ? /* @__PURE__ */ J(K, { children: [i === "both" ? /* @__PURE__ */ q(f, {
2642
- to: oe,
2643
- children: /* @__PURE__ */ q(w, { children: "New page" })
2644
- }) : null, /* @__PURE__ */ q(w, {
2648
+ extra: m || H ? /* @__PURE__ */ Y(V, { children: [m, H ? i === "modal" || i === "both" ? /* @__PURE__ */ Y(q, { children: [i === "both" ? /* @__PURE__ */ J(f, {
2649
+ to: ae,
2650
+ children: /* @__PURE__ */ J(w, { children: "New page" })
2651
+ }) : null, /* @__PURE__ */ J(w, {
2645
2652
  type: "primary",
2646
2653
  onClick: () => b.openCreateModal(),
2647
2654
  children: "New"
2648
- })] }) : /* @__PURE__ */ q(f, {
2649
- to: oe,
2650
- children: /* @__PURE__ */ q(w, {
2655
+ })] }) : /* @__PURE__ */ J(f, {
2656
+ to: ae,
2657
+ children: /* @__PURE__ */ J(w, {
2651
2658
  type: "primary",
2652
2659
  children: "New"
2653
2660
  })
2654
2661
  }) : null] }) : null,
2655
- children: [ge ? /* @__PURE__ */ q(Wr, {
2656
- selectedCount: _e,
2657
- total: L,
2658
- allPageSelected: ve,
2659
- allMatchingSelected: ye,
2660
- onSelectAllMatching: () => void Se(),
2661
- onClearSelection: me,
2662
- actions: he,
2663
- onExecute: Ee,
2664
- selectedIds: [...ie],
2665
- running: ae || P
2666
- }) : null, /* @__PURE__ */ J("div", {
2662
+ children: [he ? /* @__PURE__ */ J(Wr, {
2663
+ selectedCount: ge,
2664
+ total: R,
2665
+ allPageSelected: _e,
2666
+ allMatchingSelected: ve,
2667
+ onSelectAllMatching: () => void xe(),
2668
+ onClearSelection: pe,
2669
+ actions: me,
2670
+ onExecute: Te,
2671
+ selectedIds: [...re],
2672
+ running: ie || F
2673
+ }) : null, /* @__PURE__ */ Y("div", {
2667
2674
  ref: M,
2668
2675
  className: "ding-admin-resource-list-table",
2669
2676
  style: {
2670
2677
  "--ding-scroll-thumb": O.colorTextQuaternary,
2671
2678
  "--ding-scroll-thumb-hover": O.colorTextTertiary
2672
2679
  },
2673
- children: [/* @__PURE__ */ q(ce, {
2680
+ children: [/* @__PURE__ */ J(se, {
2674
2681
  rowKey: "id",
2675
- loading: P,
2676
- columns: Oe,
2677
- dataSource: I,
2682
+ loading: F,
2683
+ columns: De,
2684
+ dataSource: L,
2678
2685
  scroll: {
2679
2686
  x: "max-content",
2680
- ...ee ? { y: ee } : {}
2687
+ ...N ? { y: N } : {}
2681
2688
  },
2682
- rowSelection: ge ? {
2683
- selectedRowKeys: be,
2684
- onChange: xe,
2689
+ rowSelection: he ? {
2690
+ selectedRowKeys: ye,
2691
+ onChange: be,
2685
2692
  preserveSelectedRowKeys: !0
2686
2693
  } : void 0,
2687
2694
  pagination: !1,
2688
2695
  onChange: (e, t, n) => {
2689
- Ce(n);
2696
+ Se(n);
2690
2697
  }
2691
- }), /* @__PURE__ */ q("div", {
2698
+ }), /* @__PURE__ */ J("div", {
2692
2699
  className: "ding-admin-resource-list-pagination",
2693
- children: /* @__PURE__ */ q(re, {
2700
+ children: /* @__PURE__ */ J(ne, {
2694
2701
  current: y.page,
2695
2702
  pageSize: y.perPage,
2696
- total: L,
2703
+ total: R,
2697
2704
  showSizeChanger: !0,
2698
- onChange: ke
2705
+ onChange: Oe
2699
2706
  })
2700
2707
  })]
2701
2708
  })]
2702
- }), Ae ? /* @__PURE__ */ q(Ur, {
2709
+ }), ke ? /* @__PURE__ */ J(Ur, {
2703
2710
  resource: e,
2704
2711
  editId: y.createModal ? "new" : y.editId,
2705
2712
  onClose: () => {
2706
- b.closeModal(), Y();
2713
+ b.closeModal(), X();
2707
2714
  },
2708
2715
  children: o
2709
2716
  }) : null] });
@@ -2724,18 +2731,18 @@ function ni({ resource: e, title: t, pathPrefix: n, newPath: r, staticFilter: i,
2724
2731
  filterValues: x,
2725
2732
  setFilterValue: S
2726
2733
  }), [x, S]);
2727
- return /* @__PURE__ */ q(Zr.Provider, {
2734
+ return /* @__PURE__ */ J(Zr.Provider, {
2728
2735
  value: C,
2729
- children: /* @__PURE__ */ q(tr, {
2736
+ children: /* @__PURE__ */ J(tr, {
2730
2737
  values: x,
2731
2738
  setFilterValue: S,
2732
2739
  textFilterDebounceMs: o,
2733
- children: /* @__PURE__ */ q(Kn, {
2740
+ children: /* @__PURE__ */ J(Kn, {
2734
2741
  toggleSort: b.toggleSort,
2735
2742
  sort: y.sort,
2736
- children: /* @__PURE__ */ J("div", {
2743
+ children: /* @__PURE__ */ Y("div", {
2737
2744
  className: "ding-admin-resource-list-root",
2738
- children: [u, /* @__PURE__ */ q(ti, {
2745
+ children: [u, /* @__PURE__ */ J(ti, {
2739
2746
  resource: e,
2740
2747
  title: t,
2741
2748
  pathPrefix: n,
@@ -2761,14 +2768,14 @@ function ni({ resource: e, title: t, pathPrefix: n, newPath: r, staticFilter: i,
2761
2768
  //#region src/crud/FilterBar.tsx
2762
2769
  function ri() {
2763
2770
  let e = nr();
2764
- return !e || e.filters.length === 0 ? null : /* @__PURE__ */ q(B, {
2771
+ return !e || e.filters.length === 0 ? null : /* @__PURE__ */ J(V, {
2765
2772
  wrap: !0,
2766
2773
  size: "middle",
2767
2774
  style: { marginBottom: 16 },
2768
- children: e.filters.map((t) => /* @__PURE__ */ J(B, {
2775
+ children: e.filters.map((t) => /* @__PURE__ */ Y(V, {
2769
2776
  orientation: "vertical",
2770
2777
  size: 2,
2771
- children: [t.label ? /* @__PURE__ */ q(W.Text, {
2778
+ children: [t.label ? /* @__PURE__ */ J(G.Text, {
2772
2779
  type: "secondary",
2773
2780
  style: { fontSize: 12 },
2774
2781
  children: t.label
@@ -2780,12 +2787,12 @@ function ri() {
2780
2787
  });
2781
2788
  }
2782
2789
  function ii({ children: e }) {
2783
- return /* @__PURE__ */ J(K, { children: [e, /* @__PURE__ */ q(ri, {})] });
2790
+ return /* @__PURE__ */ Y(q, { children: [e, /* @__PURE__ */ J(ri, {})] });
2784
2791
  }
2785
2792
  //#endregion
2786
2793
  //#region src/crud/ResourceForm.tsx
2787
2794
  function ai({ resource: e, title: t, listPath: n, children: r, defaultValues: i, onSaved: a, stayOnPage: o, permissions: c }) {
2788
- let { id: l } = y(), u = l === "new" || !l, d = X(), p = v(), { token: m } = G.useToken();
2795
+ let { id: l } = y(), u = l === "new" || !l, d = mt(), p = v(), { token: m } = K.useToken();
2789
2796
  s(() => {
2790
2797
  c && (Z(d, c, u ? "add" : "change") || p(n, { replace: !0 }));
2791
2798
  }, [
@@ -2796,17 +2803,17 @@ function ai({ resource: e, title: t, listPath: n, children: r, defaultValues: i,
2796
2803
  n
2797
2804
  ]);
2798
2805
  let h = c ? Z(d, c, u ? "add" : "change") : !0;
2799
- return /* @__PURE__ */ q(T, {
2800
- title: /* @__PURE__ */ J(B, { children: [/* @__PURE__ */ J(f, {
2806
+ return /* @__PURE__ */ J(T, {
2807
+ title: /* @__PURE__ */ Y(V, { children: [/* @__PURE__ */ Y(f, {
2801
2808
  to: n,
2802
2809
  style: { color: m.colorText },
2803
- children: [/* @__PURE__ */ q(de, {}), " Back"]
2804
- }), /* @__PURE__ */ q(W.Title, {
2810
+ children: [/* @__PURE__ */ J(ue, {}), " Back"]
2811
+ }), /* @__PURE__ */ J(G.Title, {
2805
2812
  level: 5,
2806
2813
  style: { margin: 0 },
2807
2814
  children: t
2808
2815
  })] }),
2809
- children: /* @__PURE__ */ q(Hr, {
2816
+ children: /* @__PURE__ */ J(Hr, {
2810
2817
  resource: e,
2811
2818
  id: l,
2812
2819
  defaultValues: i,
@@ -2833,7 +2840,7 @@ function si(e, t) {
2833
2840
  return n;
2834
2841
  }
2835
2842
  function ci(e, t, n) {
2836
- let { control: r } = Me(), { fields: i, append: a, remove: o } = Ae({
2843
+ let { control: r } = je(), { fields: i, append: a, remove: o } = ke({
2837
2844
  control: r,
2838
2845
  name: e,
2839
2846
  keyName: "rowKey"
@@ -2859,14 +2866,14 @@ function li({ field: e, label: t, payloadKey: n, transformRows: r, columns: i, d
2859
2866
  field: e
2860
2867
  })
2861
2868
  })), [i, e]);
2862
- return /* @__PURE__ */ J("div", {
2869
+ return /* @__PURE__ */ Y("div", {
2863
2870
  style: { marginTop: 24 },
2864
2871
  children: [
2865
- /* @__PURE__ */ q(W.Title, {
2872
+ /* @__PURE__ */ J(G.Title, {
2866
2873
  level: 5,
2867
2874
  children: t ?? "Related items"
2868
2875
  }),
2869
- /* @__PURE__ */ q(ce, {
2876
+ /* @__PURE__ */ J(se, {
2870
2877
  size: "small",
2871
2878
  pagination: !1,
2872
2879
  scroll: { x: "max-content" },
@@ -2878,7 +2885,7 @@ function li({ field: e, label: t, payloadKey: n, transformRows: r, columns: i, d
2878
2885
  title: "",
2879
2886
  key: "__remove",
2880
2887
  width: 80,
2881
- render: (e, t, n) => /* @__PURE__ */ q(w, {
2888
+ render: (e, t, n) => /* @__PURE__ */ J(w, {
2882
2889
  type: "link",
2883
2890
  danger: !0,
2884
2891
  size: "small",
@@ -2887,7 +2894,7 @@ function li({ field: e, label: t, payloadKey: n, transformRows: r, columns: i, d
2887
2894
  })
2888
2895
  }]
2889
2896
  }),
2890
- /* @__PURE__ */ q(w, {
2897
+ /* @__PURE__ */ J(w, {
2891
2898
  type: "dashed",
2892
2899
  style: { marginTop: 8 },
2893
2900
  onClick: u,
@@ -2898,14 +2905,14 @@ function li({ field: e, label: t, payloadKey: n, transformRows: r, columns: i, d
2898
2905
  }
2899
2906
  function ui({ field: e, label: t, payloadKey: n, transformRows: r, sources: i, renderRow: a, getCardTitle: o, footer: s, defaultRow: c }) {
2900
2907
  let { fields: l, remove: u, appendEmpty: d } = ci(e, i, c);
2901
- return pr(e), vr(e, i, n, r), /* @__PURE__ */ J("div", {
2908
+ return pr(e), vr(e, i, n, r), /* @__PURE__ */ Y("div", {
2902
2909
  style: { marginTop: 24 },
2903
2910
  children: [
2904
- /* @__PURE__ */ q(W.Title, {
2911
+ /* @__PURE__ */ J(G.Title, {
2905
2912
  level: 5,
2906
2913
  children: t ?? "Related items"
2907
2914
  }),
2908
- /* @__PURE__ */ q(B, {
2915
+ /* @__PURE__ */ J(V, {
2909
2916
  orientation: "vertical",
2910
2917
  size: "middle",
2911
2918
  style: { width: "100%" },
@@ -2915,10 +2922,10 @@ function ui({ field: e, label: t, payloadKey: n, transformRows: r, sources: i, r
2915
2922
  index: n,
2916
2923
  name: (t) => oi(e, n, t)
2917
2924
  };
2918
- return /* @__PURE__ */ q(T, {
2925
+ return /* @__PURE__ */ J(T, {
2919
2926
  size: "small",
2920
2927
  title: o?.(r) ?? `Item ${n + 1}`,
2921
- extra: /* @__PURE__ */ q(w, {
2928
+ extra: /* @__PURE__ */ J(w, {
2922
2929
  type: "link",
2923
2930
  danger: !0,
2924
2931
  size: "small",
@@ -2929,7 +2936,7 @@ function ui({ field: e, label: t, payloadKey: n, transformRows: r, sources: i, r
2929
2936
  }, t.rowKey);
2930
2937
  })
2931
2938
  }),
2932
- /* @__PURE__ */ q(w, {
2939
+ /* @__PURE__ */ J(w, {
2933
2940
  type: "dashed",
2934
2941
  style: { marginTop: 8 },
2935
2942
  onClick: d,
@@ -2951,7 +2958,7 @@ function fi(e) {
2951
2958
  return t.current.length > e && (t.current.length = e), t.current;
2952
2959
  }
2953
2960
  function pi(e, t) {
2954
- let { control: n, getFieldState: r, setFocus: i } = Me(), a = Ne({ control: n }), o = u(0), c = u(0);
2961
+ let { control: n, getFieldState: r, setFocus: i } = je(), a = Me({ control: n }), o = u(0), c = u(0);
2955
2962
  s(() => {
2956
2963
  if (a.submitCount === 0) return;
2957
2964
  let n = Object.keys(a.errors).length, s = a.submitCount !== o.current, l = !s && n > 0 && c.current === 0;
@@ -2982,7 +2989,7 @@ function hi(e) {
2982
2989
  return i(e) && e.type === mi;
2983
2990
  }
2984
2991
  function gi({ children: t, defaultActiveKey: n, activeKey: r, onChange: i, ...o }) {
2985
- let { token: s } = G.useToken(), c = l(() => e.toArray(t).filter(hi).map((e, t) => ({
2992
+ let { token: s } = K.useToken(), c = l(() => e.toArray(t).filter(hi).map((e, t) => ({
2986
2993
  key: e.key ?? String(t),
2987
2994
  label: e.props.label,
2988
2995
  disabled: e.props.disabled,
@@ -2994,19 +3001,19 @@ function gi({ children: t, defaultActiveKey: n, activeKey: r, onChange: i, ...o
2994
3001
  let t = c[e]?.key;
2995
3002
  t != null && g(t);
2996
3003
  }, [g, c]));
2997
- let { control: _, getFieldState: v } = Me(), y = Ne({ control: _ });
2998
- return /* @__PURE__ */ q(H, {
3004
+ let { control: _, getFieldState: v } = je(), y = Me({ control: _ });
3005
+ return /* @__PURE__ */ J(U, {
2999
3006
  destroyOnHidden: !1,
3000
3007
  items: l(() => c.map((e, t) => {
3001
3008
  let n = di(u[t].current, v, y);
3002
3009
  return {
3003
3010
  key: e.key,
3004
- label: n ? /* @__PURE__ */ q("span", {
3011
+ label: n ? /* @__PURE__ */ J("span", {
3005
3012
  style: { color: s.colorError },
3006
3013
  children: e.label
3007
3014
  }) : e.label,
3008
3015
  disabled: e.disabled,
3009
- children: /* @__PURE__ */ q(cr, {
3016
+ children: /* @__PURE__ */ J(cr, {
3010
3017
  sourcesRef: u[t],
3011
3018
  children: e.children
3012
3019
  })
@@ -3034,7 +3041,7 @@ function vi(e) {
3034
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 }) {
3035
3042
  let m = l(() => e.toArray(t).filter(vi), [t]), h = fi(m.length), [g, _] = d(n), v = m.length - 1;
3036
3043
  pi(h, _);
3037
- let { control: y, getFieldState: b } = Me(), x = Ne({ control: y }), S = l(() => m.map((e, t) => {
3044
+ let { control: y, getFieldState: b } = je(), x = Me({ control: y }), S = l(() => m.map((e, t) => {
3038
3045
  let n = di(h[t].current, b, x);
3039
3046
  return {
3040
3047
  title: e.props.title,
@@ -3049,8 +3056,8 @@ function yi({ children: t, initialStep: n = 0, showNavigation: r = !0, allowStep
3049
3056
  ]), C = a((e) => {
3050
3057
  _(e);
3051
3058
  }, []);
3052
- return /* @__PURE__ */ J(K, { children: [
3053
- /* @__PURE__ */ q(V, {
3059
+ return /* @__PURE__ */ Y(q, { children: [
3060
+ /* @__PURE__ */ J(H, {
3054
3061
  current: g,
3055
3062
  items: S,
3056
3063
  style: {
@@ -3063,23 +3070,23 @@ function yi({ children: t, initialStep: n = 0, showNavigation: r = !0, allowStep
3063
3070
  type: f,
3064
3071
  status: p
3065
3072
  }),
3066
- m.map((e, t) => /* @__PURE__ */ q("div", {
3073
+ m.map((e, t) => /* @__PURE__ */ J("div", {
3067
3074
  style: { display: g === t ? void 0 : "none" },
3068
- children: /* @__PURE__ */ q(cr, {
3075
+ children: /* @__PURE__ */ J(cr, {
3069
3076
  sourcesRef: h[t],
3070
3077
  children: e.props.children
3071
3078
  })
3072
3079
  }, e.key ?? String(t))),
3073
- r && m.length > 1 ? /* @__PURE__ */ J(B, {
3080
+ r && m.length > 1 ? /* @__PURE__ */ Y(V, {
3074
3081
  style: {
3075
3082
  marginTop: 16,
3076
3083
  ...s
3077
3084
  },
3078
- children: [/* @__PURE__ */ q(w, {
3085
+ children: [/* @__PURE__ */ J(w, {
3079
3086
  disabled: g === 0,
3080
3087
  onClick: () => _((e) => e - 1),
3081
3088
  children: "Previous"
3082
- }), /* @__PURE__ */ q(w, {
3089
+ }), /* @__PURE__ */ J(w, {
3083
3090
  type: "primary",
3084
3091
  disabled: g === v,
3085
3092
  onClick: () => _((e) => e + 1),
@@ -3091,15 +3098,15 @@ function yi({ children: t, initialStep: n = 0, showNavigation: r = !0, allowStep
3091
3098
  //#endregion
3092
3099
  //#region src/crud/fields/FieldWrapper.tsx
3093
3100
  function $({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, children: o }) {
3094
- let s = t ?? e, c = !s.includes("."), { control: l } = Me(), u = or(), d = a ? void 0 : n ?? e, f = n ?? e;
3095
- return pr(e, c), mr(e, c), /* @__PURE__ */ q(Oe, {
3101
+ let s = t ?? e, c = !s.includes("."), { control: l } = je(), u = or(), d = a ? void 0 : n ?? e, f = n ?? e;
3102
+ return pr(e, c), mr(e, c), /* @__PURE__ */ J(De, {
3096
3103
  name: s,
3097
3104
  control: l,
3098
3105
  rules: {
3099
3106
  required: r ? `${f} is required` : !1,
3100
3107
  ...i
3101
3108
  },
3102
- render: ({ field: e, fieldState: t }) => /* @__PURE__ */ q(M.Item, {
3109
+ render: ({ field: e, fieldState: t }) => /* @__PURE__ */ J(M.Item, {
3103
3110
  label: d,
3104
3111
  validateStatus: t.error ? "error" : void 0,
3105
3112
  help: t.error?.message,
@@ -3118,14 +3125,14 @@ function $({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a,
3118
3125
  //#endregion
3119
3126
  //#region src/crud/fields/TextField.tsx
3120
3127
  function bi({ source: e, name: t, label: n, required: r, rules: i, placeholder: a, inputStyle: o, hideLabel: s }) {
3121
- return /* @__PURE__ */ q($, {
3128
+ return /* @__PURE__ */ J($, {
3122
3129
  source: e,
3123
3130
  name: t,
3124
3131
  label: n,
3125
3132
  required: r,
3126
3133
  rules: i,
3127
3134
  hideLabel: s,
3128
- children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(P, {
3135
+ children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ J(F, {
3129
3136
  value: e,
3130
3137
  onChange: (e) => t(e.target.value),
3131
3138
  onBlur: n,
@@ -3138,14 +3145,14 @@ function bi({ source: e, name: t, label: n, required: r, rules: i, placeholder:
3138
3145
  //#endregion
3139
3146
  //#region src/crud/fields/TextAreaField.tsx
3140
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 }) {
3141
- return /* @__PURE__ */ q($, {
3148
+ return /* @__PURE__ */ J($, {
3142
3149
  source: e,
3143
3150
  name: t,
3144
3151
  label: n,
3145
3152
  required: r,
3146
3153
  rules: i,
3147
3154
  hideLabel: s,
3148
- children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(P.TextArea, {
3155
+ children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ J(F.TextArea, {
3149
3156
  value: e,
3150
3157
  onChange: (e) => t(e.target.value),
3151
3158
  onBlur: n,
@@ -3162,14 +3169,14 @@ function xi({ source: e, name: t, label: n, required: r, rules: i, placeholder:
3162
3169
  //#endregion
3163
3170
  //#region src/crud/fields/NumberField.tsx
3164
3171
  function Si({ source: e, name: t, label: n, required: r, rules: i, min: a, max: o, step: s, inputStyle: c, hideLabel: l }) {
3165
- return /* @__PURE__ */ q($, {
3172
+ return /* @__PURE__ */ J($, {
3166
3173
  source: e,
3167
3174
  name: t,
3168
3175
  label: n,
3169
3176
  required: r,
3170
3177
  rules: i,
3171
3178
  hideLabel: l,
3172
- children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(F, {
3179
+ children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ J(I, {
3173
3180
  value: e,
3174
3181
  onChange: (e) => t(e),
3175
3182
  onBlur: n,
@@ -3187,14 +3194,14 @@ function Si({ source: e, name: t, label: n, required: r, rules: i, min: a, max:
3187
3194
  //#endregion
3188
3195
  //#region src/crud/fields/BooleanField.tsx
3189
3196
  function Ci({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, disabled: o }) {
3190
- return /* @__PURE__ */ q($, {
3197
+ return /* @__PURE__ */ J($, {
3191
3198
  source: e,
3192
3199
  name: t,
3193
3200
  label: n,
3194
3201
  required: r,
3195
3202
  rules: i,
3196
3203
  hideLabel: a,
3197
- children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ q(se, {
3204
+ children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ J(oe, {
3198
3205
  checked: !!e,
3199
3206
  onChange: t,
3200
3207
  disabled: n || o
@@ -3203,7 +3210,7 @@ function Ci({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a,
3203
3210
  }
3204
3211
  //#endregion
3205
3212
  //#region src/crud/utils/parseDayjsValue.ts
3206
- var wi = /* @__PURE__ */ We((/* @__PURE__ */ He(((e, t) => {
3213
+ var wi = /* @__PURE__ */ Ue((/* @__PURE__ */ Ve(((e, t) => {
3207
3214
  (function(n, r) {
3208
3215
  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();
3209
3216
  })(e, (function() {
@@ -3360,12 +3367,12 @@ var wi = /* @__PURE__ */ We((/* @__PURE__ */ He(((e, t) => {
3360
3367
  };
3361
3368
  }));
3362
3369
  })))(), 1);
3363
- Fe.extend(wi.default);
3370
+ Pe.extend(wi.default);
3364
3371
  function Ti(e, t) {
3365
3372
  if (e == null || e === "") return null;
3366
- if (Fe.isDayjs(e)) return e;
3367
- let n = Fe(String(e), t, !0);
3368
- return n.isValid() ? n : Fe(String(e)).isValid() ? Fe(String(e)) : null;
3373
+ if (Pe.isDayjs(e)) return e;
3374
+ let n = Pe(String(e), t, !0);
3375
+ return n.isValid() ? n : Pe(String(e)).isValid() ? Pe(String(e)) : null;
3369
3376
  }
3370
3377
  //#endregion
3371
3378
  //#region src/crud/fields/DateField.tsx
@@ -3376,14 +3383,14 @@ var Ei = "YYYY-MM-DD", Di = `${Ei} HH:mm:ss`, Oi = [
3376
3383
  "YYYY-MM-DDTHH:mm:ssZ"
3377
3384
  ];
3378
3385
  function ki({ source: e, name: t, label: n, required: r, rules: i, showTime: a, hideLabel: o }) {
3379
- return /* @__PURE__ */ q($, {
3386
+ return /* @__PURE__ */ J($, {
3380
3387
  source: e,
3381
3388
  name: t,
3382
3389
  label: n,
3383
3390
  required: r,
3384
3391
  rules: i,
3385
3392
  hideLabel: o,
3386
- children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(O, {
3393
+ children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ J(O, {
3387
3394
  value: Ti(e, a ? [...Oi, Di] : Oi),
3388
3395
  onChange: (e) => t(e ? e.format(a ? Di : Ei) : null),
3389
3396
  onBlur: n,
@@ -3397,7 +3404,7 @@ function ki({ source: e, name: t, label: n, required: r, rules: i, showTime: a,
3397
3404
  //#endregion
3398
3405
  //#region src/crud/fields/DateTimeField.tsx
3399
3406
  function Ai(e) {
3400
- return /* @__PURE__ */ q(ki, {
3407
+ return /* @__PURE__ */ J(ki, {
3401
3408
  showTime: !0,
3402
3409
  ...e
3403
3410
  });
@@ -3411,14 +3418,14 @@ var ji = "HH:mm:ss", Mi = [
3411
3418
  "H:mm"
3412
3419
  ];
3413
3420
  function Ni({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, format: o = ji }) {
3414
- return /* @__PURE__ */ q($, {
3421
+ return /* @__PURE__ */ J($, {
3415
3422
  source: e,
3416
3423
  name: t,
3417
3424
  label: n,
3418
3425
  required: r,
3419
3426
  rules: i,
3420
3427
  hideLabel: a,
3421
- children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(le, {
3428
+ children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ J(ce, {
3422
3429
  value: Ti(e, Mi),
3423
3430
  onChange: (e) => t(e ? e.format(o) : null),
3424
3431
  onBlur: n,
@@ -3431,14 +3438,14 @@ function Ni({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a,
3431
3438
  //#endregion
3432
3439
  //#region src/crud/fields/SelectField.tsx
3433
3440
  function Pi({ source: e, name: t, label: n, required: r, rules: i, choices: a, mode: o, allowClear: s, hideLabel: c }) {
3434
- return /* @__PURE__ */ q($, {
3441
+ return /* @__PURE__ */ J($, {
3435
3442
  source: e,
3436
3443
  name: t,
3437
3444
  label: n,
3438
3445
  required: r,
3439
3446
  rules: i,
3440
3447
  hideLabel: c,
3441
- children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ q(z, {
3448
+ children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ J(B, {
3442
3449
  value: e,
3443
3450
  onChange: t,
3444
3451
  options: a,
@@ -3452,14 +3459,14 @@ function Pi({ source: e, name: t, label: n, required: r, rules: i, choices: a, m
3452
3459
  //#endregion
3453
3460
  //#region src/crud/fields/PasswordField.tsx
3454
3461
  function Fi({ source: e, name: t, label: n, required: r, rules: i, autoComplete: a, hideLabel: o }) {
3455
- return /* @__PURE__ */ q($, {
3462
+ return /* @__PURE__ */ J($, {
3456
3463
  source: e,
3457
3464
  name: t,
3458
3465
  label: n,
3459
3466
  required: r,
3460
3467
  rules: i,
3461
3468
  hideLabel: o,
3462
- children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ q(P.Password, {
3469
+ children: ({ value: e, onChange: t, onBlur: n, disabled: r }) => /* @__PURE__ */ J(F.Password, {
3463
3470
  value: e,
3464
3471
  onChange: (e) => t(e.target.value),
3465
3472
  onBlur: n,
@@ -3469,11 +3476,11 @@ function Fi({ source: e, name: t, label: n, required: r, rules: i, autoComplete:
3469
3476
  });
3470
3477
  }
3471
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 }) {
3472
- let l = Pe({
3479
+ let l = Ne({
3473
3480
  name: t ?? e,
3474
3481
  disabled: !a
3475
3482
  });
3476
- return a ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Fi, {
3483
+ return a ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(Fi, {
3477
3484
  source: e,
3478
3485
  name: t,
3479
3486
  label: n,
@@ -3481,14 +3488,14 @@ function Ii({ source: e, name: t, label: n, required: r, rules: i, confirmSource
3481
3488
  rules: i,
3482
3489
  autoComplete: s,
3483
3490
  hideLabel: c
3484
- }), /* @__PURE__ */ q(Fi, {
3491
+ }), /* @__PURE__ */ J(Fi, {
3485
3492
  source: a,
3486
3493
  label: o,
3487
3494
  required: r,
3488
3495
  autoComplete: s,
3489
3496
  hideLabel: c,
3490
3497
  rules: { validate: (e) => !l || e === l || "Passwords do not match" }
3491
- })] }) : /* @__PURE__ */ q(Fi, {
3498
+ })] }) : /* @__PURE__ */ J(Fi, {
3492
3499
  source: e,
3493
3500
  name: t,
3494
3501
  label: n,
@@ -3541,7 +3548,13 @@ function Wi(e, t) {
3541
3548
  for (let e of t) n.set(e.value, e);
3542
3549
  return Array.from(n.values());
3543
3550
  }
3544
- function Gi(e = {}) {
3551
+ function Gi(e, t) {
3552
+ return e.filter((e) => !t.some((t) => t.value === e));
3553
+ }
3554
+ function Ki(e, t, n = []) {
3555
+ return Wi(n, e.filter((e) => t.some((t) => e.value === t)));
3556
+ }
3557
+ function qi(e = {}) {
3545
3558
  let t = e.popupMatchSelectWidth ?? !1;
3546
3559
  return t === !1 ? {
3547
3560
  popupMatchSelectWidth: !1,
@@ -3550,16 +3563,27 @@ function Gi(e = {}) {
3550
3563
  }
3551
3564
  //#endregion
3552
3565
  //#region src/crud/utils/referenceSelectNotFoundContent.tsx
3553
- function Ki(e) {
3554
- return e ? /* @__PURE__ */ q(oe, { size: "small" }) : void 0;
3566
+ function Ji(e) {
3567
+ return e ? /* @__PURE__ */ J(ae, { size: "small" }) : void 0;
3568
+ }
3569
+ //#endregion
3570
+ //#region src/crud/utils/referenceSelectSelectedProps.ts
3571
+ function Yi(e, t, n) {
3572
+ return {
3573
+ loading: e || t,
3574
+ disabled: !!(n || t)
3575
+ };
3576
+ }
3577
+ function Xi(e, t, n) {
3578
+ return e ? n : t;
3555
3579
  }
3556
3580
  //#endregion
3557
3581
  //#region src/crud/utils/useChoices.ts
3558
- var qi = /* @__PURE__ */ new Map(), Ji = /* @__PURE__ */ new Map();
3559
- function Yi(e, t) {
3582
+ var Zi = /* @__PURE__ */ new Map(), Qi = /* @__PURE__ */ new Map();
3583
+ function $i(e, t) {
3560
3584
  return typeof e == "function" ? `fn:${t ?? ""}` : Array.isArray(e) ? `static:${e.length}` : `res:${e.resource}:${JSON.stringify(e.filter ?? {})}:${t ?? ""}`;
3561
3585
  }
3562
- async function Xi(e, t, n, r, i) {
3586
+ async function ea(e, t, n, r, i) {
3563
3587
  return typeof e == "function" ? e({
3564
3588
  dataProvider: t,
3565
3589
  search: i
@@ -3578,21 +3602,21 @@ async function Xi(e, t, n, r, i) {
3578
3602
  record: e
3579
3603
  }));
3580
3604
  }
3581
- function Zi(e, t, n, r, i, a) {
3582
- let o = Yi(e, i);
3605
+ function ta(e, t, n, r, i, a) {
3606
+ let o = $i(e, i);
3583
3607
  if (a) {
3584
- let e = qi.get(o);
3608
+ let e = Zi.get(o);
3585
3609
  if (e && !i) return Promise.resolve(e);
3586
3610
  }
3587
- let s = Ji.get(o);
3611
+ let s = Qi.get(o);
3588
3612
  if (s) return s;
3589
- let c = Xi(e, t, n, r, i).then((e) => (a && !i && qi.set(o, e), e)).finally(() => {
3590
- Ji.delete(o);
3613
+ let c = ea(e, t, n, r, i).then((e) => (a && !i && Zi.set(o, e), e)).finally(() => {
3614
+ Qi.delete(o);
3591
3615
  });
3592
- return Ji.set(o, c), c;
3616
+ return Qi.set(o, c), c;
3593
3617
  }
3594
- function Qi(e, t, n = "name", r = "id", i, o = {}) {
3595
- let { lazy: c = !1, active: u = !1, selectedValues: f, selectedRecords: p, fetchSelected: m = !0, cache: h } = o, g = h ?? !c, _ = Yt(), v = l(() => {
3618
+ function na(e, t, n = "name", r = "id", i, o = {}) {
3619
+ let { lazy: c = !1, active: f = !1, selectedValues: p, selectedRecords: m, fetchSelected: h = !0, cache: g } = o, _ = g ?? !c, v = Yt(), y = l(() => {
3596
3620
  if (e) return e;
3597
3621
  if (t) return {
3598
3622
  resource: t,
@@ -3602,65 +3626,75 @@ function Qi(e, t, n = "name", r = "id", i, o = {}) {
3602
3626
  e,
3603
3627
  t,
3604
3628
  i
3605
- ]), y = v ? Yi(v, i) : void 0, b = l(() => Bi(f, r), [f, r]), x = l(() => Ui(Vi(f, p, r), n, r), [
3606
- f,
3629
+ ]), b = y ? $i(y, i) : void 0, x = l(() => Bi(p, r), [p, r]), S = l(() => Ui(Vi(p, m, r), n, r), [
3607
3630
  p,
3631
+ m,
3608
3632
  n,
3609
3633
  r
3610
- ]), 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);
3611
- s(() => {
3612
- x.length && w((e) => Wi(e, x));
3613
- }, [x]);
3614
- let D = a(async () => {
3615
- if (!v || !S) {
3616
- v || w(x), E(!1);
3634
+ ]), C = !!(y && (!c || f || Array.isArray(y))), [w, T] = d(() => S.length ? S : !b || i || c || !_ ? [] : Zi.get(b) ?? []), [E, D] = d(() => C ? !_ || !b || i ? !!y : !Zi.has(b) : !1), [O, k] = d(() => !!(h && t && Gi(x, S).length)), A = u(w);
3635
+ A.current = w;
3636
+ let j = u(x);
3637
+ j.current = x, s(() => {
3638
+ S.length && T((e) => Wi(e, S));
3639
+ }, [S]);
3640
+ let M = a(async () => {
3641
+ if (!y || !C) {
3642
+ y || T(S), D(!1);
3617
3643
  return;
3618
3644
  }
3619
- if (g) {
3620
- let e = Yi(v, i), t = qi.get(e);
3645
+ if (_) {
3646
+ let e = $i(y, i), t = Zi.get(e);
3621
3647
  if (t && !i) {
3622
- w(Wi(x, t)), E(!1);
3648
+ T((e) => Wi(Ki(e, j.current, S), t)), D(!1);
3623
3649
  return;
3624
3650
  }
3625
3651
  }
3626
- E(!0), c && w(x);
3652
+ D(!0), c && T((e) => Ki(e, j.current, S));
3627
3653
  try {
3628
- w(Wi(x, await Zi(v, _, n, r, i, g)));
3654
+ let e = await ta(y, v, n, r, i, _);
3655
+ T((t) => Wi(Ki(t, j.current, S), e));
3629
3656
  } catch {
3630
- !b.length && !x.length ? w([]) : c && w(x);
3657
+ !x.length && !S.length ? T([]) : c && T((e) => Ki(e, j.current, S));
3631
3658
  } finally {
3632
- E(!1);
3659
+ D(!1);
3633
3660
  }
3634
3661
  }, [
3635
- v,
3636
- S,
3637
- g,
3662
+ y,
3663
+ C,
3638
3664
  _,
3665
+ v,
3639
3666
  n,
3640
3667
  r,
3641
3668
  i,
3642
3669
  c,
3643
- b.length,
3644
- x
3670
+ x.length,
3671
+ S
3645
3672
  ]);
3646
3673
  s(() => {
3647
- D();
3648
- }, [D]), s(() => {
3649
- c && !u && !i && (w(x), E(!1));
3674
+ M();
3675
+ }, [M]), s(() => {
3676
+ c && !f && !i && (T((e) => Ki(e, x, S)), D(!1));
3650
3677
  }, [
3651
3678
  c,
3652
- u,
3679
+ f,
3653
3680
  i,
3681
+ S,
3654
3682
  x
3655
3683
  ]), s(() => {
3656
- if (!m || !t || !b.length) return;
3657
- let e = b.filter((e) => !x.some((t) => t.value === e));
3658
- if (!e.length) return;
3684
+ if (!h || !t || !x.length) {
3685
+ k(!1);
3686
+ return;
3687
+ }
3688
+ let e = Gi(x, Wi(S, A.current));
3689
+ if (!e.length) {
3690
+ k(!1);
3691
+ return;
3692
+ }
3659
3693
  let i = !1;
3660
- return (async () => {
3694
+ return k(!0), (async () => {
3661
3695
  let a = [];
3662
3696
  for (let i of e) try {
3663
- let e = (await _.getOne(t, i)).data;
3697
+ let e = (await v.getOne(t, i)).data;
3664
3698
  a.push({
3665
3699
  label: Hi(e, n),
3666
3700
  value: e[r],
@@ -3672,58 +3706,59 @@ function Qi(e, t, n = "name", r = "id", i, o = {}) {
3672
3706
  value: i
3673
3707
  });
3674
3708
  }
3675
- i || !a.length || w((e) => {
3709
+ i || (a.length && T((e) => {
3676
3710
  let t = a.filter((t) => !e.some((e) => e.value === t.value));
3677
3711
  return t.length ? Wi(e, t) : e;
3678
- });
3712
+ }), k(!1));
3679
3713
  })(), () => {
3680
3714
  i = !0;
3681
3715
  };
3682
3716
  }, [
3683
- m,
3717
+ h,
3684
3718
  t,
3685
- _,
3719
+ v,
3686
3720
  n,
3687
3721
  r,
3688
- b,
3689
- x
3722
+ x,
3723
+ S
3690
3724
  ]);
3691
- let O = a((e) => C.find((t) => t.value === e)?.label ?? String(e ?? "—"), [C]);
3725
+ let N = a((e) => w.find((t) => t.value === e)?.label ?? String(e ?? "—"), [w]);
3692
3726
  return {
3693
- options: C,
3694
- loading: T,
3695
- labelForValue: O,
3696
- labelsForValues: a((e) => e?.length ? e.map((e) => O(e)).join(", ") : "—", [O]),
3697
- optionForValue: a((e) => C.find((t) => t.value === e), [C]),
3698
- reload: D
3727
+ options: w,
3728
+ loading: E,
3729
+ selectedLoading: O,
3730
+ labelForValue: N,
3731
+ labelsForValues: a((e) => e?.length ? e.map((e) => N(e)).join(", ") : "—", [N]),
3732
+ optionForValue: a((e) => w.find((t) => t.value === e), [w]),
3733
+ reload: M
3699
3734
  };
3700
3735
  }
3701
3736
  //#endregion
3702
3737
  //#region src/crud/fields/ReferenceInputActions.tsx
3703
- function $i({ reference: e, referenceForm: t, referencePermissions: n, referenceTitle: r, referenceDefaultValues: i, referenceModalWidth: a, selectedId: o, disabled: s, onCreated: c, onUpdated: l }) {
3704
- 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);
3705
- return !p && !m ? null : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ J(B, {
3738
+ function ra({ reference: e, referenceForm: t, referencePermissions: n, referenceTitle: r, referenceDefaultValues: i, referenceModalWidth: a, selectedId: o, disabled: s, onCreated: c, onUpdated: l }) {
3739
+ 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);
3740
+ return !p && !m ? null : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ Y(V, {
3706
3741
  size: 4,
3707
- children: [p ? /* @__PURE__ */ q(U, {
3742
+ children: [p ? /* @__PURE__ */ J(W, {
3708
3743
  title: `Add ${f ?? "record"}`,
3709
- children: /* @__PURE__ */ q(w, {
3744
+ children: /* @__PURE__ */ J(w, {
3710
3745
  type: "default",
3711
- icon: /* @__PURE__ */ q(Ce, {}),
3746
+ icon: /* @__PURE__ */ J(Se, {}),
3712
3747
  disabled: s,
3713
3748
  "aria-label": `Add ${f ?? "record"}`,
3714
3749
  onClick: () => g("new")
3715
3750
  })
3716
- }) : null, m ? /* @__PURE__ */ q(U, {
3751
+ }) : null, m ? /* @__PURE__ */ J(W, {
3717
3752
  title: `Edit ${f ?? "record"}`,
3718
- children: /* @__PURE__ */ q(w, {
3753
+ children: /* @__PURE__ */ J(w, {
3719
3754
  type: "default",
3720
- icon: /* @__PURE__ */ q(_e, {}),
3755
+ icon: /* @__PURE__ */ J(ge, {}),
3721
3756
  disabled: s,
3722
3757
  "aria-label": `Edit ${f ?? "record"}`,
3723
3758
  onClick: () => g(String(o))
3724
3759
  })
3725
3760
  }) : null]
3726
- }), e && t && h != null ? /* @__PURE__ */ q(Ur, {
3761
+ }), e && t && h != null ? /* @__PURE__ */ J(Ur, {
3727
3762
  resource: e,
3728
3763
  editId: h,
3729
3764
  onClose: () => g(null),
@@ -3740,35 +3775,35 @@ function $i({ reference: e, referenceForm: t, referencePermissions: n, reference
3740
3775
  }
3741
3776
  //#endregion
3742
3777
  //#region src/crud/fields/ReferenceField.tsx
3743
- 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 }) {
3744
- 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, {
3778
+ function ia({ 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 }) {
3779
+ let [T, E] = d(), [D, O] = d(!1), k = D || !!T, A = Ri(p, r), { options: j, loading: M, selectedLoading: N, optionForValue: P, reload: F } = na(t, e, n, r, i ? T : void 0, {
3745
3780
  lazy: u,
3746
3781
  active: k,
3747
3782
  selectedValues: p,
3748
3783
  selectedRecords: g,
3749
3784
  fetchSelected: f
3750
- }), P = l(() => j.map((e) => ({
3785
+ }), I = Yi(M, N, o), L = l(() => j.map((e) => ({
3751
3786
  label: e.label,
3752
3787
  value: e.value
3753
- })), [j]), F = (e) => {
3788
+ })), [j]), ee = (e) => {
3754
3789
  let t = e[r];
3755
3790
  m(t), c?.(t, {
3756
3791
  label: Hi(e, n),
3757
3792
  value: t,
3758
3793
  record: e
3759
- }, { name: h }), N();
3760
- }, I = /* @__PURE__ */ q(z, {
3761
- ...Gi({
3794
+ }, { name: h }), F();
3795
+ }, R = /* @__PURE__ */ J(B, {
3796
+ ...qi({
3762
3797
  popupMatchSelectWidth: C,
3763
3798
  popupMinWidth: w
3764
3799
  }),
3765
- value: A,
3800
+ value: Xi(N, A, void 0),
3766
3801
  onChange: (e) => {
3767
- m(e), c?.(e, ee(e), { name: h });
3802
+ m(e), c?.(e, P(e), { name: h });
3768
3803
  },
3769
- options: P,
3770
- loading: M,
3771
- notFoundContent: Ki(M),
3804
+ options: L,
3805
+ loading: I.loading,
3806
+ notFoundContent: Ji(I.loading),
3772
3807
  showSearch: i,
3773
3808
  filterOption: i ? !1 : void 0,
3774
3809
  onSearch: i ? E : void 0,
@@ -3776,7 +3811,7 @@ function ea({ reference: e, choices: t, optionLabel: n = "name", optionValue: r
3776
3811
  O(e), e || E(void 0);
3777
3812
  },
3778
3813
  allowClear: a,
3779
- disabled: o,
3814
+ disabled: I.disabled,
3780
3815
  optionFilterProp: "label",
3781
3816
  style: {
3782
3817
  width: "100%",
@@ -3784,20 +3819,20 @@ function ea({ reference: e, choices: t, optionLabel: n = "name", optionValue: r
3784
3819
  ...s
3785
3820
  }
3786
3821
  });
3787
- return S ? /* @__PURE__ */ J("div", {
3822
+ return S ? /* @__PURE__ */ Y("div", {
3788
3823
  style: {
3789
3824
  display: "flex",
3790
3825
  gap: 8,
3791
3826
  width: "100%",
3792
3827
  alignItems: "flex-start"
3793
3828
  },
3794
- children: [/* @__PURE__ */ q("div", {
3829
+ children: [/* @__PURE__ */ J("div", {
3795
3830
  style: {
3796
3831
  flex: 1,
3797
3832
  minWidth: 0
3798
3833
  },
3799
- children: I
3800
- }), /* @__PURE__ */ q($i, {
3834
+ children: R
3835
+ }), /* @__PURE__ */ J(ra, {
3801
3836
  reference: e,
3802
3837
  referenceForm: _,
3803
3838
  referencePermissions: v,
@@ -3805,25 +3840,25 @@ function ea({ reference: e, choices: t, optionLabel: n = "name", optionValue: r
3805
3840
  referenceDefaultValues: b,
3806
3841
  referenceModalWidth: x,
3807
3842
  selectedId: A,
3808
- disabled: o,
3809
- onCreated: F,
3810
- onUpdated: () => void N()
3843
+ disabled: I.disabled,
3844
+ onCreated: ee,
3845
+ onUpdated: () => void F()
3811
3846
  })]
3812
- }) : I;
3847
+ }) : R;
3813
3848
  }
3814
- 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 }) {
3815
- let E = Pe({
3849
+ function aa({ 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 }) {
3850
+ let E = Ne({
3816
3851
  name: g ?? "",
3817
3852
  disabled: !g
3818
3853
  });
3819
- return /* @__PURE__ */ q($, {
3854
+ return /* @__PURE__ */ J($, {
3820
3855
  source: e,
3821
3856
  name: t,
3822
3857
  label: n,
3823
3858
  required: s,
3824
3859
  rules: c,
3825
3860
  hideLabel: f,
3826
- children: ({ value: e, onChange: t, disabled: n, name: s }) => /* @__PURE__ */ q(ea, {
3861
+ children: ({ value: e, onChange: t, disabled: n, name: s }) => /* @__PURE__ */ J(ia, {
3827
3862
  reference: r,
3828
3863
  choices: i,
3829
3864
  optionLabel: a,
@@ -3852,27 +3887,27 @@ function ta({ source: e, name: t, label: n, reference: r, choices: i, optionLabe
3852
3887
  }
3853
3888
  //#endregion
3854
3889
  //#region src/crud/fields/ReferenceManyField.tsx
3855
- 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 }) {
3856
- 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, {
3890
+ function oa({ 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 }) {
3891
+ let [S, C] = d(), [w, T] = d(!1), E = w || !!S, D = zi(c, r), { options: O, loading: k, selectedLoading: A, reload: j } = na(t, e, n, r, i ? S : void 0, {
3857
3892
  lazy: o,
3858
3893
  active: E,
3859
3894
  selectedValues: c,
3860
3895
  selectedRecords: p,
3861
3896
  fetchSelected: s
3862
- }), j = l(() => O.map((e) => ({
3897
+ }), M = Yi(k, A, f), N = l(() => O.map((e) => ({
3863
3898
  label: e.label,
3864
3899
  value: e.value
3865
- })), [O]), M = /* @__PURE__ */ q(z, {
3866
- ...Gi({
3900
+ })), [O]), P = /* @__PURE__ */ J(B, {
3901
+ ...qi({
3867
3902
  popupMatchSelectWidth: b,
3868
3903
  popupMinWidth: x
3869
3904
  }),
3870
3905
  mode: "multiple",
3871
- value: D,
3906
+ value: Xi(A, D, []),
3872
3907
  onChange: u,
3873
- options: j,
3874
- loading: k,
3875
- notFoundContent: Ki(k),
3908
+ options: N,
3909
+ loading: M.loading,
3910
+ notFoundContent: Ji(M.loading),
3876
3911
  showSearch: i,
3877
3912
  filterOption: i ? !1 : void 0,
3878
3913
  onSearch: i ? C : void 0,
@@ -3880,55 +3915,55 @@ function na({ reference: e, choices: t, optionLabel: n = "name", optionValue: r
3880
3915
  T(e), e || C(void 0);
3881
3916
  },
3882
3917
  allowClear: a,
3883
- disabled: f,
3918
+ disabled: M.disabled,
3884
3919
  optionFilterProp: "label",
3885
3920
  style: { width: "100%" }
3886
3921
  });
3887
- return y ? /* @__PURE__ */ J("div", {
3922
+ return y ? /* @__PURE__ */ Y("div", {
3888
3923
  style: {
3889
3924
  display: "flex",
3890
3925
  gap: 8,
3891
3926
  width: "100%",
3892
3927
  alignItems: "flex-start"
3893
3928
  },
3894
- children: [/* @__PURE__ */ q("div", {
3929
+ children: [/* @__PURE__ */ J("div", {
3895
3930
  style: {
3896
3931
  flex: 1,
3897
3932
  minWidth: 0
3898
3933
  },
3899
- children: M
3900
- }), /* @__PURE__ */ q($i, {
3934
+ children: P
3935
+ }), /* @__PURE__ */ J(ra, {
3901
3936
  reference: e,
3902
3937
  referenceForm: m,
3903
3938
  referencePermissions: h,
3904
3939
  referenceTitle: g,
3905
3940
  referenceDefaultValues: _,
3906
3941
  referenceModalWidth: v,
3907
- disabled: f,
3942
+ disabled: M.disabled,
3908
3943
  onCreated: (e) => {
3909
3944
  let t = e[r], n = Array.isArray(D) ? D : [];
3910
3945
  if (n.some((e) => e === t)) {
3911
- A();
3946
+ j();
3912
3947
  return;
3913
3948
  }
3914
- u([...n, t]), A();
3949
+ u([...n, t]), j();
3915
3950
  }
3916
3951
  })]
3917
- }) : M;
3952
+ }) : P;
3918
3953
  }
3919
- 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 }) {
3920
- let w = Pe({
3954
+ function sa({ 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 }) {
3955
+ let w = Ne({
3921
3956
  name: m ?? "",
3922
3957
  disabled: !m
3923
3958
  });
3924
- return /* @__PURE__ */ q($, {
3959
+ return /* @__PURE__ */ J($, {
3925
3960
  source: e,
3926
3961
  name: t,
3927
3962
  label: n,
3928
3963
  required: s,
3929
3964
  rules: c,
3930
3965
  hideLabel: d,
3931
- children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ q(na, {
3966
+ children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ J(oa, {
3932
3967
  reference: r,
3933
3968
  choices: i,
3934
3969
  optionLabel: a,
@@ -3954,10 +3989,10 @@ function ra({ source: e, name: t, label: n, reference: r, choices: i, optionLabe
3954
3989
  }
3955
3990
  //#endregion
3956
3991
  //#region src/crud/fields/uploadFieldUtils.ts
3957
- function ia(e) {
3992
+ function ca(e) {
3958
3993
  return e instanceof File ? !0 : typeof e == "string" && e.length > 0;
3959
3994
  }
3960
- function aa(e) {
3995
+ function la(e) {
3961
3996
  if (e instanceof File) return e.name;
3962
3997
  if (typeof e == "string" && e.length > 0) try {
3963
3998
  return new URL(e, "http://local").pathname.split("/").filter(Boolean).pop() || e;
@@ -3967,7 +4002,7 @@ function aa(e) {
3967
4002
  }
3968
4003
  //#endregion
3969
4004
  //#region src/crud/fields/useUploadPreviewUrl.ts
3970
- function oa(e) {
4005
+ function ua(e) {
3971
4006
  let [t, n] = d();
3972
4007
  if (s(() => {
3973
4008
  if (e instanceof File) {
@@ -3980,14 +4015,14 @@ function oa(e) {
3980
4015
  }
3981
4016
  //#endregion
3982
4017
  //#region src/crud/fields/ImageField.tsx
3983
- function sa({ value: e, onChange: t, disabled: n, clearable: r, accept: i = "image/*", previewWidth: a = 200 }) {
3984
- let o = u(null), s = oa(e), c = r && ia(e);
3985
- return /* @__PURE__ */ J(B, {
4018
+ function da({ value: e, onChange: t, disabled: n, clearable: r, accept: i = "image/*", previewWidth: a = 200 }) {
4019
+ let o = u(null), s = ua(e), c = r && ca(e);
4020
+ return /* @__PURE__ */ Y(V, {
3986
4021
  direction: "vertical",
3987
4022
  size: "middle",
3988
4023
  style: { width: "100%" },
3989
4024
  children: [
3990
- s ? /* @__PURE__ */ q(N, {
4025
+ s ? /* @__PURE__ */ J(P, {
3991
4026
  src: s,
3992
4027
  alt: "",
3993
4028
  style: {
@@ -3996,15 +4031,15 @@ function sa({ value: e, onChange: t, disabled: n, clearable: r, accept: i = "ima
3996
4031
  objectFit: "contain"
3997
4032
  }
3998
4033
  }) : null,
3999
- /* @__PURE__ */ J(B, {
4034
+ /* @__PURE__ */ Y(V, {
4000
4035
  wrap: !0,
4001
- children: [/* @__PURE__ */ q(w, {
4002
- icon: /* @__PURE__ */ q(Ee, {}),
4036
+ children: [/* @__PURE__ */ J(w, {
4037
+ icon: /* @__PURE__ */ J(Te, {}),
4003
4038
  disabled: n,
4004
4039
  onClick: () => o.current?.click(),
4005
4040
  children: "Choose image"
4006
- }), c ? /* @__PURE__ */ q(w, {
4007
- icon: /* @__PURE__ */ q(he, {}),
4041
+ }), c ? /* @__PURE__ */ J(w, {
4042
+ icon: /* @__PURE__ */ J(me, {}),
4008
4043
  disabled: n,
4009
4044
  onClick: () => {
4010
4045
  t(null), o.current && (o.current.value = "");
@@ -4012,7 +4047,7 @@ function sa({ value: e, onChange: t, disabled: n, clearable: r, accept: i = "ima
4012
4047
  children: "Clear"
4013
4048
  }) : null]
4014
4049
  }),
4015
- /* @__PURE__ */ q("input", {
4050
+ /* @__PURE__ */ J("input", {
4016
4051
  ref: o,
4017
4052
  type: "file",
4018
4053
  accept: i,
@@ -4028,15 +4063,15 @@ function sa({ value: e, onChange: t, disabled: n, clearable: r, accept: i = "ima
4028
4063
  ]
4029
4064
  });
4030
4065
  }
4031
- function ca({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, clearable: o, accept: s, previewWidth: c }) {
4032
- return /* @__PURE__ */ q($, {
4066
+ function fa({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, clearable: o, accept: s, previewWidth: c }) {
4067
+ return /* @__PURE__ */ J($, {
4033
4068
  source: e,
4034
4069
  name: t,
4035
4070
  label: n,
4036
4071
  required: r,
4037
4072
  rules: i,
4038
4073
  hideLabel: a,
4039
- children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ q(sa, {
4074
+ children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ J(da, {
4040
4075
  value: e,
4041
4076
  onChange: t,
4042
4077
  disabled: n,
@@ -4048,28 +4083,28 @@ function ca({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a,
4048
4083
  }
4049
4084
  //#endregion
4050
4085
  //#region src/crud/fields/FileField.tsx
4051
- function la({ value: e, onChange: t, disabled: n, clearable: r, accept: i }) {
4052
- let a = u(null), o = aa(e), s = typeof e == "string" && e.length > 0 ? e : void 0, c = r && ia(e);
4053
- return /* @__PURE__ */ J(B, {
4086
+ function pa({ value: e, onChange: t, disabled: n, clearable: r, accept: i }) {
4087
+ let a = u(null), o = la(e), s = typeof e == "string" && e.length > 0 ? e : void 0, c = r && ca(e);
4088
+ return /* @__PURE__ */ Y(V, {
4054
4089
  direction: "vertical",
4055
4090
  size: "middle",
4056
4091
  style: { width: "100%" },
4057
4092
  children: [
4058
- o ? /* @__PURE__ */ J(B, { children: [/* @__PURE__ */ q(Se, {}), s ? /* @__PURE__ */ q(W.Link, {
4093
+ o ? /* @__PURE__ */ Y(V, { children: [/* @__PURE__ */ J(xe, {}), s ? /* @__PURE__ */ J(G.Link, {
4059
4094
  href: s,
4060
4095
  target: "_blank",
4061
4096
  rel: "noopener noreferrer",
4062
4097
  children: o
4063
- }) : /* @__PURE__ */ q(W.Text, { children: o })] }) : null,
4064
- /* @__PURE__ */ J(B, {
4098
+ }) : /* @__PURE__ */ J(G.Text, { children: o })] }) : null,
4099
+ /* @__PURE__ */ Y(V, {
4065
4100
  wrap: !0,
4066
- children: [/* @__PURE__ */ q(w, {
4067
- icon: /* @__PURE__ */ q(Ee, {}),
4101
+ children: [/* @__PURE__ */ J(w, {
4102
+ icon: /* @__PURE__ */ J(Te, {}),
4068
4103
  disabled: n,
4069
4104
  onClick: () => a.current?.click(),
4070
4105
  children: "Choose file"
4071
- }), c ? /* @__PURE__ */ q(w, {
4072
- icon: /* @__PURE__ */ q(he, {}),
4106
+ }), c ? /* @__PURE__ */ J(w, {
4107
+ icon: /* @__PURE__ */ J(me, {}),
4073
4108
  disabled: n,
4074
4109
  onClick: () => {
4075
4110
  t(null), a.current && (a.current.value = "");
@@ -4077,7 +4112,7 @@ function la({ value: e, onChange: t, disabled: n, clearable: r, accept: i }) {
4077
4112
  children: "Clear"
4078
4113
  }) : null]
4079
4114
  }),
4080
- /* @__PURE__ */ q("input", {
4115
+ /* @__PURE__ */ J("input", {
4081
4116
  ref: a,
4082
4117
  type: "file",
4083
4118
  accept: i,
@@ -4093,15 +4128,15 @@ function la({ value: e, onChange: t, disabled: n, clearable: r, accept: i }) {
4093
4128
  ]
4094
4129
  });
4095
4130
  }
4096
- function ua({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, clearable: o, accept: s }) {
4097
- return /* @__PURE__ */ q($, {
4131
+ function ma({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a, clearable: o, accept: s }) {
4132
+ return /* @__PURE__ */ J($, {
4098
4133
  source: e,
4099
4134
  name: t,
4100
4135
  label: n,
4101
4136
  required: r,
4102
4137
  rules: i,
4103
4138
  hideLabel: a,
4104
- children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ q(la, {
4139
+ children: ({ value: e, onChange: t, disabled: n }) => /* @__PURE__ */ J(pa, {
4105
4140
  value: e,
4106
4141
  onChange: t,
4107
4142
  disabled: n,
@@ -4112,7 +4147,7 @@ function ua({ source: e, name: t, label: n, required: r, rules: i, hideLabel: a,
4112
4147
  }
4113
4148
  //#endregion
4114
4149
  //#region src/crud/columns/TextColumn.tsx
4115
- function da({ source: e, label: t, sortable: n = !0 }) {
4150
+ function ha({ source: e, label: t, sortable: n = !0 }) {
4116
4151
  return Jn(l(() => ({
4117
4152
  key: e,
4118
4153
  source: e,
@@ -4130,12 +4165,12 @@ function da({ source: e, label: t, sortable: n = !0 }) {
4130
4165
  n
4131
4166
  ])), null;
4132
4167
  }
4133
- function fa(e, t, n) {
4168
+ function ga(e, t, n) {
4134
4169
  return typeof n == "function" ? n(e) : n ? br(e, n) : e[t];
4135
4170
  }
4136
4171
  //#endregion
4137
4172
  //#region src/crud/columns/NumberColumn.tsx
4138
- function pa({ source: e, label: t, sortable: n = !0 }) {
4173
+ function _a({ source: e, label: t, sortable: n = !0 }) {
4139
4174
  return Jn(l(() => ({
4140
4175
  key: e,
4141
4176
  source: e,
@@ -4155,7 +4190,7 @@ function pa({ source: e, label: t, sortable: n = !0 }) {
4155
4190
  }
4156
4191
  //#endregion
4157
4192
  //#region src/crud/columns/BooleanColumn.tsx
4158
- function ma({ source: e, label: t, sortable: n = !0 }) {
4193
+ function va({ source: e, label: t, sortable: n = !0 }) {
4159
4194
  return Jn(l(() => ({
4160
4195
  key: e,
4161
4196
  source: e,
@@ -4176,7 +4211,7 @@ function ma({ source: e, label: t, sortable: n = !0 }) {
4176
4211
  }
4177
4212
  //#endregion
4178
4213
  //#region src/crud/columns/DateColumn.tsx
4179
- function ha({ source: e, label: t, sortable: n = !0 }) {
4214
+ function ya({ source: e, label: t, sortable: n = !0 }) {
4180
4215
  return Jn(l(() => ({
4181
4216
  key: e,
4182
4217
  source: e,
@@ -4197,16 +4232,16 @@ function ha({ source: e, label: t, sortable: n = !0 }) {
4197
4232
  }
4198
4233
  //#endregion
4199
4234
  //#region src/crud/columns/ReferenceColumn.tsx
4200
- function ga({ record: e, source: t, display: n, reference: r, choices: i, optionLabel: a, optionValue: o }) {
4201
- let { labelForValue: s } = Qi(i, r, a, o), c = e[t];
4202
- if (typeof n == "function") return /* @__PURE__ */ q(K, { children: n(e) });
4235
+ function ba({ record: e, source: t, display: n, reference: r, choices: i, optionLabel: a, optionValue: o }) {
4236
+ let { labelForValue: s } = na(i, r, a, o), c = e[t];
4237
+ if (typeof n == "function") return /* @__PURE__ */ J(q, { children: n(e) });
4203
4238
  if (n && n !== t) {
4204
- let r = fa(e, t, n);
4205
- return /* @__PURE__ */ q(K, { children: r == null ? "—" : String(r) });
4239
+ let r = ga(e, t, n);
4240
+ return /* @__PURE__ */ J(q, { children: r == null ? "—" : String(r) });
4206
4241
  }
4207
- return /* @__PURE__ */ q(K, { children: s(c) });
4242
+ return /* @__PURE__ */ J(q, { children: s(c) });
4208
4243
  }
4209
- function _a({ source: e, label: t, reference: n, choices: r, optionLabel: i = "name", optionValue: a = "id", display: o, sortable: s = !0 }) {
4244
+ function xa({ source: e, label: t, reference: n, choices: r, optionLabel: i = "name", optionValue: a = "id", display: o, sortable: s = !0 }) {
4210
4245
  return Jn(l(() => ({
4211
4246
  key: e,
4212
4247
  source: e,
@@ -4217,7 +4252,7 @@ function _a({ source: e, label: t, reference: n, choices: r, optionLabel: i = "n
4217
4252
  dataIndex: e,
4218
4253
  key: e,
4219
4254
  sorter: s ? !0 : void 0,
4220
- render: (s, c) => /* @__PURE__ */ q(ga, {
4255
+ render: (s, c) => /* @__PURE__ */ J(ba, {
4221
4256
  record: c,
4222
4257
  source: e,
4223
4258
  label: t,
@@ -4241,11 +4276,11 @@ function _a({ source: e, label: t, reference: n, choices: r, optionLabel: i = "n
4241
4276
  }
4242
4277
  //#endregion
4243
4278
  //#region src/crud/columns/ReferenceManyColumn.tsx
4244
- function va({ record: e, source: t, reference: n, choices: r, optionLabel: i, optionValue: a }) {
4245
- let { labelsForValues: o } = Qi(r, n, i, a), s = e[t];
4246
- return /* @__PURE__ */ q(K, { children: o(Array.isArray(s) ? s : []) });
4279
+ function Sa({ record: e, source: t, reference: n, choices: r, optionLabel: i, optionValue: a }) {
4280
+ let { labelsForValues: o } = na(r, n, i, a), s = e[t];
4281
+ return /* @__PURE__ */ J(q, { children: o(Array.isArray(s) ? s : []) });
4247
4282
  }
4248
- function ya({ source: e, label: t, reference: n, choices: r, optionLabel: i = "name", optionValue: a = "id", sortable: o = !1 }) {
4283
+ function Ca({ source: e, label: t, reference: n, choices: r, optionLabel: i = "name", optionValue: a = "id", sortable: o = !1 }) {
4249
4284
  return Jn(l(() => ({
4250
4285
  key: e,
4251
4286
  source: e,
@@ -4256,7 +4291,7 @@ function ya({ source: e, label: t, reference: n, choices: r, optionLabel: i = "n
4256
4291
  dataIndex: e,
4257
4292
  key: e,
4258
4293
  sorter: o ? !0 : void 0,
4259
- render: (t, o) => /* @__PURE__ */ q(va, {
4294
+ render: (t, o) => /* @__PURE__ */ J(Sa, {
4260
4295
  record: o,
4261
4296
  source: e,
4262
4297
  reference: n,
@@ -4277,7 +4312,7 @@ function ya({ source: e, label: t, reference: n, choices: r, optionLabel: i = "n
4277
4312
  }
4278
4313
  //#endregion
4279
4314
  //#region src/crud/columns/ImageColumn.tsx
4280
- function ba({ source: e, label: t, sortable: n = !1, width: r = 40, height: i = 40, objectFit: a = "cover", borderRadius: o = 4, alt: s = "" }) {
4315
+ function wa({ source: e, label: t, sortable: n = !1, width: r = 40, height: i = 40, objectFit: a = "cover", borderRadius: o = 4, alt: s = "" }) {
4281
4316
  return Jn(l(() => ({
4282
4317
  key: e,
4283
4318
  source: e,
@@ -4288,7 +4323,7 @@ function ba({ source: e, label: t, sortable: n = !1, width: r = 40, height: i =
4288
4323
  dataIndex: e,
4289
4324
  key: e,
4290
4325
  sorter: n ? !0 : void 0,
4291
- render: (e) => e == null || e === "" ? null : /* @__PURE__ */ q("img", {
4326
+ render: (e) => e == null || e === "" ? null : /* @__PURE__ */ J("img", {
4292
4327
  src: String(e),
4293
4328
  alt: s,
4294
4329
  style: {
@@ -4312,7 +4347,7 @@ function ba({ source: e, label: t, sortable: n = !1, width: r = 40, height: i =
4312
4347
  }
4313
4348
  //#endregion
4314
4349
  //#region src/crud/columns/CustomColumn.tsx
4315
- function xa({ source: e, label: t, sortable: n = !1, render: r }) {
4350
+ function Ta({ source: e, label: t, sortable: n = !1, render: r }) {
4316
4351
  return Jn(l(() => ({
4317
4352
  key: e,
4318
4353
  source: e,
@@ -4332,12 +4367,12 @@ function xa({ source: e, label: t, sortable: n = !1, render: r }) {
4332
4367
  }
4333
4368
  //#endregion
4334
4369
  //#region src/crud/filters/NumberFilter.tsx
4335
- function Sa({ source: e, label: t }) {
4370
+ function Ea({ source: e, label: t }) {
4336
4371
  return rr(l(() => ({
4337
4372
  key: e,
4338
4373
  source: e,
4339
4374
  label: t,
4340
- render: ({ value: n, onChange: r }) => /* @__PURE__ */ q(F, {
4375
+ render: ({ value: n, onChange: r }) => /* @__PURE__ */ J(I, {
4341
4376
  placeholder: t ?? e,
4342
4377
  value: n,
4343
4378
  onChange: (e) => r(e ?? void 0),
@@ -4347,12 +4382,12 @@ function Sa({ source: e, label: t }) {
4347
4382
  }
4348
4383
  //#endregion
4349
4384
  //#region src/crud/filters/BooleanFilter.tsx
4350
- function Ca({ source: e, label: t }) {
4385
+ function Da({ source: e, label: t }) {
4351
4386
  return rr(l(() => ({
4352
4387
  key: e,
4353
4388
  source: e,
4354
4389
  label: t,
4355
- render: ({ value: n, onChange: r }) => /* @__PURE__ */ q(z, {
4390
+ render: ({ value: n, onChange: r }) => /* @__PURE__ */ J(B, {
4356
4391
  allowClear: !0,
4357
4392
  placeholder: t ?? e,
4358
4393
  value: n,
@@ -4370,15 +4405,15 @@ function Ca({ source: e, label: t }) {
4370
4405
  }
4371
4406
  //#endregion
4372
4407
  //#region src/crud/filters/DateFilter.tsx
4373
- function wa({ source: e, label: t }) {
4408
+ function Oa({ source: e, label: t }) {
4374
4409
  return rr(l(() => ({
4375
4410
  key: e,
4376
4411
  source: e,
4377
4412
  label: t,
4378
- render: ({ value: n, onChange: r }) => /* @__PURE__ */ q(O, {
4413
+ render: ({ value: n, onChange: r }) => /* @__PURE__ */ J(O, {
4379
4414
  allowClear: !0,
4380
4415
  placeholder: t ?? e,
4381
- value: n ? Fe(String(n)) : null,
4416
+ value: n ? Pe(String(n)) : null,
4382
4417
  onChange: (e) => r(e ? e.format("YYYY-MM-DD") : void 0),
4383
4418
  style: { minWidth: 160 }
4384
4419
  })
@@ -4386,12 +4421,12 @@ function wa({ source: e, label: t }) {
4386
4421
  }
4387
4422
  //#endregion
4388
4423
  //#region src/crud/filters/SelectFilter.tsx
4389
- function Ta({ source: e, label: t, choices: n, multiple: r }) {
4424
+ function ka({ source: e, label: t, choices: n, multiple: r }) {
4390
4425
  return rr(l(() => ({
4391
4426
  key: e,
4392
4427
  source: e,
4393
4428
  label: t,
4394
- render: ({ value: i, onChange: a }) => /* @__PURE__ */ q(z, {
4429
+ render: ({ value: i, onChange: a }) => /* @__PURE__ */ J(B, {
4395
4430
  allowClear: !0,
4396
4431
  mode: r ? "multiple" : void 0,
4397
4432
  placeholder: t ?? e,
@@ -4409,29 +4444,30 @@ function Ta({ source: e, label: t, choices: n, multiple: r }) {
4409
4444
  }
4410
4445
  //#endregion
4411
4446
  //#region src/crud/filters/ReferenceFilter.tsx
4412
- 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 }) {
4413
- let [h, g] = d(), [_, v] = d(!1), { options: y, loading: b } = Qi(r, n, i, a, s ? h : void 0, {
4447
+ function Aa({ 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 }) {
4448
+ let [h, g] = d(), [_, v] = d(!1), { options: y, loading: b, selectedLoading: x } = na(r, n, i, a, s ? h : void 0, {
4414
4449
  lazy: c,
4415
4450
  active: _ || !!h,
4416
4451
  selectedValues: p,
4417
4452
  fetchSelected: l
4418
- });
4419
- return /* @__PURE__ */ q(z, {
4420
- ...Gi({
4453
+ }), S = Yi(b, x), C = p;
4454
+ return /* @__PURE__ */ J(B, {
4455
+ ...qi({
4421
4456
  popupMatchSelectWidth: u,
4422
4457
  popupMinWidth: f
4423
4458
  }),
4424
4459
  allowClear: !0,
4425
4460
  mode: o ? "multiple" : void 0,
4426
4461
  placeholder: t ?? e,
4427
- value: p,
4462
+ value: Xi(x, C, o ? [] : void 0),
4428
4463
  onChange: m,
4429
4464
  options: y.map((e) => ({
4430
4465
  label: e.label,
4431
4466
  value: e.value
4432
4467
  })),
4433
- loading: b,
4434
- notFoundContent: Ki(b),
4468
+ loading: S.loading,
4469
+ disabled: S.disabled,
4470
+ notFoundContent: Ji(S.loading),
4435
4471
  showSearch: s,
4436
4472
  filterOption: s ? !1 : void 0,
4437
4473
  onSearch: s ? g : void 0,
@@ -4442,12 +4478,12 @@ function Ea({ source: e, label: t, reference: n, choices: r, optionLabel: i, opt
4442
4478
  style: { minWidth: 180 }
4443
4479
  });
4444
4480
  }
4445
- 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 }) {
4481
+ function ja({ 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 }) {
4446
4482
  return rr(l(() => ({
4447
4483
  key: e,
4448
4484
  source: e,
4449
4485
  label: t,
4450
- render: ({ value: l, onChange: p }) => /* @__PURE__ */ q(Ea, {
4486
+ render: ({ value: l, onChange: p }) => /* @__PURE__ */ J(Aa, {
4451
4487
  source: e,
4452
4488
  label: t,
4453
4489
  reference: n,
@@ -4478,11 +4514,11 @@ function Da({ source: e, label: t, reference: n, choices: r, optionLabel: i = "n
4478
4514
  f
4479
4515
  ])), null;
4480
4516
  }
4481
- function Oa(e) {
4482
- return /* @__PURE__ */ q(Da, {
4517
+ function Ma(e) {
4518
+ return /* @__PURE__ */ J(ja, {
4483
4519
  ...e,
4484
4520
  multiple: !0
4485
4521
  });
4486
4522
  }
4487
4523
  //#endregion
4488
- 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 };
4524
+ 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, va as BooleanColumn, Ci as BooleanField, Da as BooleanFilter, Ta as CustomColumn, Xn as DEFAULT_TEXT_FILTER_DEBOUNCE_MS, Jt as DataProvider, ya as DateColumn, ki as DateField, Oa as DateFilter, Ai as DateTimeField, $e as DensitySwitch, en as EXPECTED_VALIDATION_BODY_HINT, $ as FieldWrapper, ma as FileField, ii as FilterBar, _i as FormStep, yi as FormSteps, mi as FormTab, gi as FormTabs, Ft as Guard, Lt as GuestOnly, wa as ImageColumn, fa as ImageField, li as InlineFormSet, ui as InlineFormSetStacked, Rn as LoginPage, _a as NumberColumn, Si as NumberField, Ea as NumberFilter, Ii as PasswordField, pt as PermissionsProvider, zn as PlaceholderPage, It as Protected, xa as ReferenceColumn, aa as ReferenceField, ja as ReferenceFilter, Ca as ReferenceManyColumn, sa as ReferenceManyField, Ma as ReferenceManyFilter, Rt as RequirePermission, ai as ResourceForm, Ur as ResourceFormModal, ni as ResourceList, Pi as SelectField, ka as SelectFilter, xi as TextAreaField, ha as TextColumn, bi as TextField, $n as TextFilter, tt as ThemeSwitch, nt 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, 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, 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, lt as useAuth, gt as useCan, na as useChoices, Yt as useDataProvider, Xr as useListQueryState, mt as usePermissions, pr as useRegisterPayloadField, mr as useRegisterSectionField, Qr as useResourceListContext, Ze as useThemeMode };