@luminix/mui-cms 0.1.0 → 0.1.1
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/bundle/mui-cms.bundle.iife.js +12 -12
- package/dist/mui-cms.js +380 -380
- package/package.json +1 -1
- package/types/dist.d.ts +1 -1
package/dist/mui-cms.js
CHANGED
|
@@ -2,18 +2,18 @@ var tr = Object.defineProperty;
|
|
|
2
2
|
var nr = (e, t, n) => t in e ? tr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var jt = (e, t, n) => nr(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import { jsx as i, jsxs as w, Fragment as B } from "react/jsx-runtime";
|
|
5
|
-
import { config as se, collect as W, app as T, model as ye, Model as Qe, Route as
|
|
6
|
-
import { Outlet as
|
|
7
|
-
import { useCollection as dn, PaginationProvider as
|
|
8
|
-
import { useMediaQuery as Be, Dialog as ht, DialogTitle as mt, DialogContent as gt, DialogContentText as
|
|
9
|
-
import h, { useContext as yn, useMemo as
|
|
10
|
-
import { useTranslation as L, initReactI18next as
|
|
11
|
-
import { Close as xt, ArrowDropDown as
|
|
12
|
-
import { useTheme as Et, styled as Z, createTheme as
|
|
13
|
-
import { Str as k, Obj as K, Query as Sn, DateTime as Wt, Func as
|
|
5
|
+
import { config as se, collect as W, app as T, model as ye, App as rr, Model as Qe, Route as sr, Config as re } from "@luminix/core";
|
|
6
|
+
import { Outlet as or, useParams as ar, useNavigate as ft, useSearchParams as Y, Link as De, Form as ir } from "react-router-dom";
|
|
7
|
+
import { useCollection as dn, PaginationProvider as lr, usePagination as Se, ModelForm as cr, useApplyReducers as pt, Forms as ur, LuminixProvider as dr } from "@luminix/react";
|
|
8
|
+
import { useMediaQuery as Be, Dialog as ht, DialogTitle as mt, DialogContent as gt, DialogContentText as fr, DialogActions as bt, Button as N, Snackbar as pr, Alert as hr, IconButton as q, AlertTitle as mr, Box as V, Unstable_Grid2 as Q, Fab as gr, SpeedDial as br, SpeedDialIcon as yr, SpeedDialAction as wr, ButtonGroup as Sr, Popper as xr, Grow as Ar, Paper as yt, ClickAwayListener as Cr, MenuList as Er, MenuItem as oe, AppBar as fn, Toolbar as kr, Typography as $, Avatar as Tr, Drawer as pn, Divider as Re, Autocomplete as Dr, TextField as xe, CircularProgress as Rr, Switch as Or, Stack as M, FormControl as et, InputLabel as tt, Select as Oe, Badge as wt, Popover as Pr, Link as nt, Collapse as hn, TableCell as ee, RadioGroup as Ut, FormControlLabel as qe, Radio as _e, TableContainer as vr, Table as Fr, TableHead as Br, TableRow as fe, Checkbox as St, TableSortLabel as Lr, Skeleton as qt, TableBody as Ir, TableFooter as Nr, Tabs as Mr, Tab as _t, Breadcrumbs as jr, List as Ur, ListItem as qr, ListItemButton as _r, ListItemIcon as mn, ListItemText as gn, Menu as bn, CssBaseline as Hr } from "@mui/material";
|
|
9
|
+
import h, { useContext as yn, useMemo as zr } from "react";
|
|
10
|
+
import { useTranslation as L, initReactI18next as Wr } from "react-i18next";
|
|
11
|
+
import { Close as xt, ArrowDropDown as Vr, ChevronLeft as At, ChevronRight as Ct, HighlightOffOutlined as Ht, AddCircleOutline as Kr, FilterList as $r, Menu as Yr, LastPage as Jr, FirstPage as Gr, Search as zt, SwapVert as Zr, ArrowUpward as Xr, ArrowDownward as Qr, MoreVert as wn, ExpandLess as es, ExpandMore as ts, PeopleOutlined as ns, CategoryOutlined as rs, DashboardOutlined as ss, Add as os } from "@mui/icons-material";
|
|
12
|
+
import { useTheme as Et, styled as Z, createTheme as as, ThemeProvider as is } from "@mui/material/styles";
|
|
13
|
+
import { Str as k, Obj as K, Query as Sn, DateTime as Wt, Func as ls, MakeFacade as cs, Reducible as xn, ServiceProvider as An } from "@luminix/support";
|
|
14
14
|
import Vt from "react-dom";
|
|
15
15
|
import G from "i18next";
|
|
16
|
-
const
|
|
16
|
+
const us = {
|
|
17
17
|
open: !1,
|
|
18
18
|
setOpen: () => {
|
|
19
19
|
},
|
|
@@ -28,7 +28,7 @@ const cs = {
|
|
|
28
28
|
showBackButton: !1,
|
|
29
29
|
setShowBackButton: () => {
|
|
30
30
|
}
|
|
31
|
-
}, X = h.createContext(
|
|
31
|
+
}, X = h.createContext(us), He = document.title, ds = ({ children: e }) => {
|
|
32
32
|
const [t, n] = h.useState(!1), [r, s] = h.useState(""), [o, a] = h.useState(!1), [l, d] = h.useState(!1), u = se("luminix.cms.layout", {}), c = Be((y) => y.breakpoints.up((u == null ? void 0 : u.breakpoint) || "md")), f = {
|
|
33
33
|
open: t,
|
|
34
34
|
setOpen: n,
|
|
@@ -53,14 +53,14 @@ const cs = {
|
|
|
53
53
|
},
|
|
54
54
|
current: void 0
|
|
55
55
|
});
|
|
56
|
-
function
|
|
56
|
+
function fs(e) {
|
|
57
57
|
const [t, n] = h.useState(e);
|
|
58
58
|
return h.useEffect(() => {
|
|
59
59
|
e && n(e);
|
|
60
60
|
}, [e]), e || t;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
const [{ current: n, resolve: r }, s] = h.useState({}), o =
|
|
62
|
+
function ps({ children: e, ...t }) {
|
|
63
|
+
const [{ current: n, resolve: r }, s] = h.useState({}), o = fs(n), a = h.useCallback((c) => new Promise((f) => {
|
|
64
64
|
s({
|
|
65
65
|
current: typeof c == "string" ? { message: c } : c,
|
|
66
66
|
resolve: f
|
|
@@ -87,7 +87,7 @@ function fs({ children: e, ...t }) {
|
|
|
87
87
|
...t,
|
|
88
88
|
children: [
|
|
89
89
|
(o == null ? void 0 : o.title) && /* @__PURE__ */ i(mt, { id: "alert-dialog-title", children: o.title }),
|
|
90
|
-
/* @__PURE__ */ i(gt, { children: /* @__PURE__ */ i(
|
|
90
|
+
/* @__PURE__ */ i(gt, { children: /* @__PURE__ */ i(fr, { id: "alert-dialog-description", children: o == null ? void 0 : o.message }) }),
|
|
91
91
|
/* @__PURE__ */ w(bt, { children: [
|
|
92
92
|
(o == null ? void 0 : o.type) === "confirm" && /* @__PURE__ */ w(B, { children: [
|
|
93
93
|
/* @__PURE__ */ i(N, { onClick: d, children: (o == null ? void 0 : o.cancelText) ?? l("No") }),
|
|
@@ -115,11 +115,11 @@ const kt = h.createContext({
|
|
|
115
115
|
displacement: "8px",
|
|
116
116
|
setDisplacement: () => {
|
|
117
117
|
}
|
|
118
|
-
}), rt = W([]),
|
|
118
|
+
}), rt = W([]), hs = (e) => {
|
|
119
119
|
rt.push(
|
|
120
120
|
typeof e == "string" ? { message: e } : e
|
|
121
121
|
);
|
|
122
|
-
},
|
|
122
|
+
}, ms = ({
|
|
123
123
|
children: e,
|
|
124
124
|
autoHideDuration: t = 6e3,
|
|
125
125
|
variant: n,
|
|
@@ -139,7 +139,7 @@ const kt = h.createContext({
|
|
|
139
139
|
}
|
|
140
140
|
}, [c, a]), /* @__PURE__ */ w(kt.Provider, { value: {
|
|
141
141
|
isOpen: !!c,
|
|
142
|
-
notify:
|
|
142
|
+
notify: hs,
|
|
143
143
|
dismissNotification: m,
|
|
144
144
|
notifications: a.all(),
|
|
145
145
|
current: c,
|
|
@@ -148,7 +148,7 @@ const kt = h.createContext({
|
|
|
148
148
|
}, children: [
|
|
149
149
|
e,
|
|
150
150
|
/* @__PURE__ */ i(
|
|
151
|
-
|
|
151
|
+
pr,
|
|
152
152
|
{
|
|
153
153
|
open: !!c,
|
|
154
154
|
autoHideDuration: t,
|
|
@@ -160,7 +160,7 @@ const kt = h.createContext({
|
|
|
160
160
|
},
|
|
161
161
|
...o,
|
|
162
162
|
children: c && /* @__PURE__ */ w(
|
|
163
|
-
|
|
163
|
+
hr,
|
|
164
164
|
{
|
|
165
165
|
onClose: m,
|
|
166
166
|
severity: c.severity,
|
|
@@ -180,7 +180,7 @@ const kt = h.createContext({
|
|
|
180
180
|
/* @__PURE__ */ i(q, { "aria-label": "close", color: "inherit", size: "small", onClick: m, children: /* @__PURE__ */ i(xt, {}) }, "close")
|
|
181
181
|
],
|
|
182
182
|
children: [
|
|
183
|
-
c.title && /* @__PURE__ */ i(
|
|
183
|
+
c.title && /* @__PURE__ */ i(mr, { children: c.title }),
|
|
184
184
|
c.message
|
|
185
185
|
]
|
|
186
186
|
}
|
|
@@ -188,17 +188,17 @@ const kt = h.createContext({
|
|
|
188
188
|
}
|
|
189
189
|
)
|
|
190
190
|
] });
|
|
191
|
-
},
|
|
191
|
+
}, gs = ({ children: e }) => {
|
|
192
192
|
const t = Be("(prefers-color-scheme: dark)");
|
|
193
193
|
return /* @__PURE__ */ i(
|
|
194
|
-
|
|
194
|
+
ms,
|
|
195
195
|
{
|
|
196
196
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
197
197
|
variant: t ? "standard" : "filled",
|
|
198
|
-
children: /* @__PURE__ */ i(
|
|
198
|
+
children: /* @__PURE__ */ i(ps, { children: /* @__PURE__ */ i(ds, { children: e }) })
|
|
199
199
|
}
|
|
200
200
|
);
|
|
201
|
-
},
|
|
201
|
+
}, bs = (e, {
|
|
202
202
|
Layout: t,
|
|
203
203
|
Dashboard: n,
|
|
204
204
|
ModelIndex: r,
|
|
@@ -206,7 +206,7 @@ const kt = h.createContext({
|
|
|
206
206
|
/* Error */
|
|
207
207
|
}, o) => [
|
|
208
208
|
{
|
|
209
|
-
element: /* @__PURE__ */ i(
|
|
209
|
+
element: /* @__PURE__ */ i(gs, { children: /* @__PURE__ */ i(t, { children: /* @__PURE__ */ i(or, {}) }) }),
|
|
210
210
|
// errorElement: (
|
|
211
211
|
// <Error />
|
|
212
212
|
// ),
|
|
@@ -220,7 +220,7 @@ const kt = h.createContext({
|
|
|
220
220
|
{
|
|
221
221
|
path: "/" + k.kebab(l.plural()),
|
|
222
222
|
name: `luminix.cms.${a}.index`,
|
|
223
|
-
element: /* @__PURE__ */ i(ze, { Model: l, children: /* @__PURE__ */ i(
|
|
223
|
+
element: /* @__PURE__ */ i(ze, { Model: l, children: /* @__PURE__ */ i(lr, { factory: l.query, children: /* @__PURE__ */ i(r, {}) }) })
|
|
224
224
|
},
|
|
225
225
|
{
|
|
226
226
|
path: "/" + k.kebab(l.plural()) + "/create",
|
|
@@ -242,10 +242,10 @@ function Tt(e) {
|
|
|
242
242
|
t("");
|
|
243
243
|
}), [e, t]);
|
|
244
244
|
}
|
|
245
|
-
const
|
|
245
|
+
const ys = () => {
|
|
246
246
|
const { t: e } = L();
|
|
247
247
|
return Tt(e("Dashboard")), /* @__PURE__ */ i(B, { children: "Dashboard" });
|
|
248
|
-
},
|
|
248
|
+
}, ws = ({ error: e }) => /* @__PURE__ */ w("div", { children: [
|
|
249
249
|
/* @__PURE__ */ i("h1", { children: "Ops..." }),
|
|
250
250
|
/* @__PURE__ */ i("p", { children: "Something went wrong" }),
|
|
251
251
|
T().hasDebugModeEnabled() && e && /* @__PURE__ */ i(B, { children: /* @__PURE__ */ w("pre", { style: { whiteSpace: "pre-wrap" }, children: [
|
|
@@ -256,13 +256,13 @@ const bs = () => {
|
|
|
256
256
|
] });
|
|
257
257
|
function H(e, t) {
|
|
258
258
|
const { layout: n } = yn(X);
|
|
259
|
-
return
|
|
259
|
+
return zr(() => K.get(n, e, t), [n, e, t]);
|
|
260
260
|
}
|
|
261
|
-
const
|
|
261
|
+
const Ss = Z("div")(({ theme: e }) => ({
|
|
262
262
|
padding: e.spacing(0, 1),
|
|
263
263
|
// necessary for content to be below app bar
|
|
264
264
|
...e.mixins.toolbar
|
|
265
|
-
})),
|
|
265
|
+
})), xs = ({ children: e, slotProps: t, ...n }) => {
|
|
266
266
|
const {
|
|
267
267
|
DesktopPageTitle: r,
|
|
268
268
|
["Layout.AppBar"]: s,
|
|
@@ -291,7 +291,7 @@ const ws = Z("div")(({ theme: e }) => ({
|
|
|
291
291
|
},
|
|
292
292
|
...u,
|
|
293
293
|
children: [
|
|
294
|
-
/* @__PURE__ */ i(
|
|
294
|
+
/* @__PURE__ */ i(Ss, { style: { height: a } }),
|
|
295
295
|
/* @__PURE__ */ i(r, {}),
|
|
296
296
|
/* @__PURE__ */ i(V, { sx: { p: { xs: 1, sm: 2, md: 3 } }, children: e })
|
|
297
297
|
]
|
|
@@ -299,7 +299,7 @@ const ws = Z("div")(({ theme: e }) => ({
|
|
|
299
299
|
)
|
|
300
300
|
] });
|
|
301
301
|
};
|
|
302
|
-
function
|
|
302
|
+
function As() {
|
|
303
303
|
const { setShowSearch: e } = h.useContext(X);
|
|
304
304
|
h.useEffect(() => (e(!0), () => {
|
|
305
305
|
e(!1);
|
|
@@ -309,13 +309,13 @@ function te() {
|
|
|
309
309
|
const { Model: e } = h.useContext(Cn);
|
|
310
310
|
return e;
|
|
311
311
|
}
|
|
312
|
-
const
|
|
312
|
+
const Cs = () => {
|
|
313
313
|
const e = te(), {
|
|
314
314
|
data: t,
|
|
315
315
|
error: n,
|
|
316
316
|
loading: r
|
|
317
317
|
} = Se();
|
|
318
|
-
Tt(e.plural()),
|
|
318
|
+
Tt(e.plural()), As();
|
|
319
319
|
const s = v(), {
|
|
320
320
|
Breadcrumbs: o,
|
|
321
321
|
["ModelIndex.Pagination"]: a,
|
|
@@ -366,7 +366,7 @@ const As = () => {
|
|
|
366
366
|
) })
|
|
367
367
|
] });
|
|
368
368
|
};
|
|
369
|
-
function
|
|
369
|
+
function Es() {
|
|
370
370
|
const { setShowBackButton: e } = h.useContext(X);
|
|
371
371
|
h.useEffect(() => (e(!0), () => {
|
|
372
372
|
e(!1);
|
|
@@ -377,28 +377,28 @@ function kn(e, t) {
|
|
|
377
377
|
return e.apply(t, arguments);
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
|
-
const { toString:
|
|
381
|
-
const n =
|
|
380
|
+
const { toString: ks } = Object.prototype, { getPrototypeOf: Dt } = Object, Le = /* @__PURE__ */ ((e) => (t) => {
|
|
381
|
+
const n = ks.call(t);
|
|
382
382
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
383
383
|
})(/* @__PURE__ */ Object.create(null)), J = (e) => (e = e.toLowerCase(), (t) => Le(t) === e), Ie = (e) => (t) => typeof t === e, { isArray: pe } = Array, we = Ie("undefined");
|
|
384
|
-
function
|
|
384
|
+
function Ts(e) {
|
|
385
385
|
return e !== null && !we(e) && e.constructor !== null && !we(e.constructor) && _(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
386
386
|
}
|
|
387
387
|
const Tn = J("ArrayBuffer");
|
|
388
|
-
function
|
|
388
|
+
function Ds(e) {
|
|
389
389
|
let t;
|
|
390
390
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Tn(e.buffer), t;
|
|
391
391
|
}
|
|
392
|
-
const
|
|
392
|
+
const Rs = Ie("string"), _ = Ie("function"), Dn = Ie("number"), Ne = (e) => e !== null && typeof e == "object", Os = (e) => e === !0 || e === !1, ke = (e) => {
|
|
393
393
|
if (Le(e) !== "object")
|
|
394
394
|
return !1;
|
|
395
395
|
const t = Dt(e);
|
|
396
396
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
397
|
-
},
|
|
397
|
+
}, Ps = J("Date"), vs = J("File"), Fs = J("Blob"), Bs = J("FileList"), Ls = (e) => Ne(e) && _(e.pipe), Is = (e) => {
|
|
398
398
|
let t;
|
|
399
399
|
return e && (typeof FormData == "function" && e instanceof FormData || _(e.append) && ((t = Le(e)) === "formdata" || // detect form-data instance
|
|
400
400
|
t === "object" && _(e.toString) && e.toString() === "[object FormData]"));
|
|
401
|
-
},
|
|
401
|
+
}, Ns = J("URLSearchParams"), [Ms, js, Us, qs] = ["ReadableStream", "Request", "Response", "Headers"].map(J), _s = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
402
402
|
function Ae(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
403
403
|
if (e === null || typeof e > "u")
|
|
404
404
|
return;
|
|
@@ -432,13 +432,13 @@ function st() {
|
|
|
432
432
|
arguments[r] && Ae(arguments[r], n);
|
|
433
433
|
return t;
|
|
434
434
|
}
|
|
435
|
-
const
|
|
435
|
+
const Hs = (e, t, n, { allOwnKeys: r } = {}) => (Ae(t, (s, o) => {
|
|
436
436
|
n && _(s) ? e[o] = kn(s, n) : e[o] = s;
|
|
437
|
-
}, { allOwnKeys: r }), e),
|
|
437
|
+
}, { allOwnKeys: r }), e), zs = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ws = (e, t, n, r) => {
|
|
438
438
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
439
439
|
value: t.prototype
|
|
440
440
|
}), n && Object.assign(e.prototype, n);
|
|
441
|
-
},
|
|
441
|
+
}, Vs = (e, t, n, r) => {
|
|
442
442
|
let s, o, a;
|
|
443
443
|
const l = {};
|
|
444
444
|
if (t = t || {}, e == null) return t;
|
|
@@ -448,11 +448,11 @@ const _s = (e, t, n, { allOwnKeys: r } = {}) => (Ae(t, (s, o) => {
|
|
|
448
448
|
e = n !== !1 && Dt(e);
|
|
449
449
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
450
450
|
return t;
|
|
451
|
-
},
|
|
451
|
+
}, Ks = (e, t, n) => {
|
|
452
452
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
453
453
|
const r = e.indexOf(t, n);
|
|
454
454
|
return r !== -1 && r === n;
|
|
455
|
-
},
|
|
455
|
+
}, $s = (e) => {
|
|
456
456
|
if (!e) return null;
|
|
457
457
|
if (pe(e)) return e;
|
|
458
458
|
let t = e.length;
|
|
@@ -461,31 +461,31 @@ const _s = (e, t, n, { allOwnKeys: r } = {}) => (Ae(t, (s, o) => {
|
|
|
461
461
|
for (; t-- > 0; )
|
|
462
462
|
n[t] = e[t];
|
|
463
463
|
return n;
|
|
464
|
-
},
|
|
464
|
+
}, Ys = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Dt(Uint8Array)), Js = (e, t) => {
|
|
465
465
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
466
466
|
let s;
|
|
467
467
|
for (; (s = r.next()) && !s.done; ) {
|
|
468
468
|
const o = s.value;
|
|
469
469
|
t.call(e, o[0], o[1]);
|
|
470
470
|
}
|
|
471
|
-
},
|
|
471
|
+
}, Gs = (e, t) => {
|
|
472
472
|
let n;
|
|
473
473
|
const r = [];
|
|
474
474
|
for (; (n = e.exec(t)) !== null; )
|
|
475
475
|
r.push(n);
|
|
476
476
|
return r;
|
|
477
|
-
},
|
|
477
|
+
}, Zs = J("HTMLFormElement"), Xs = (e) => e.toLowerCase().replace(
|
|
478
478
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
479
479
|
function(n, r, s) {
|
|
480
480
|
return r.toUpperCase() + s;
|
|
481
481
|
}
|
|
482
|
-
), Kt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype),
|
|
482
|
+
), Kt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Qs = J("RegExp"), Pn = (e, t) => {
|
|
483
483
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
484
484
|
Ae(n, (s, o) => {
|
|
485
485
|
let a;
|
|
486
486
|
(a = t(s, o, e)) !== !1 && (r[o] = a || s);
|
|
487
487
|
}), Object.defineProperties(e, r);
|
|
488
|
-
},
|
|
488
|
+
}, eo = (e) => {
|
|
489
489
|
Pn(e, (t, n) => {
|
|
490
490
|
if (_(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
491
491
|
return !1;
|
|
@@ -500,29 +500,29 @@ const _s = (e, t, n, { allOwnKeys: r } = {}) => (Ae(t, (s, o) => {
|
|
|
500
500
|
});
|
|
501
501
|
}
|
|
502
502
|
});
|
|
503
|
-
},
|
|
503
|
+
}, to = (e, t) => {
|
|
504
504
|
const n = {}, r = (s) => {
|
|
505
505
|
s.forEach((o) => {
|
|
506
506
|
n[o] = !0;
|
|
507
507
|
});
|
|
508
508
|
};
|
|
509
509
|
return pe(e) ? r(e) : r(String(e).split(t)), n;
|
|
510
|
-
},
|
|
511
|
-
},
|
|
510
|
+
}, no = () => {
|
|
511
|
+
}, ro = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, We = "abcdefghijklmnopqrstuvwxyz", $t = "0123456789", vn = {
|
|
512
512
|
DIGIT: $t,
|
|
513
513
|
ALPHA: We,
|
|
514
514
|
ALPHA_DIGIT: We + We.toUpperCase() + $t
|
|
515
|
-
},
|
|
515
|
+
}, so = (e = 16, t = vn.ALPHA_DIGIT) => {
|
|
516
516
|
let n = "";
|
|
517
517
|
const { length: r } = t;
|
|
518
518
|
for (; e--; )
|
|
519
519
|
n += t[Math.random() * r | 0];
|
|
520
520
|
return n;
|
|
521
521
|
};
|
|
522
|
-
function
|
|
522
|
+
function oo(e) {
|
|
523
523
|
return !!(e && _(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
524
524
|
}
|
|
525
|
-
const
|
|
525
|
+
const ao = (e) => {
|
|
526
526
|
const t = new Array(10), n = (r, s) => {
|
|
527
527
|
if (Ne(r)) {
|
|
528
528
|
if (t.indexOf(r) >= 0)
|
|
@@ -539,72 +539,72 @@ const oo = (e) => {
|
|
|
539
539
|
return r;
|
|
540
540
|
};
|
|
541
541
|
return n(e, 0);
|
|
542
|
-
},
|
|
542
|
+
}, io = J("AsyncFunction"), lo = (e) => e && (Ne(e) || _(e)) && _(e.then) && _(e.catch), Fn = ((e, t) => e ? setImmediate : t ? ((n, r) => (ie.addEventListener("message", ({ source: s, data: o }) => {
|
|
543
543
|
s === ie && o === n && r.length && r.shift()();
|
|
544
544
|
}, !1), (s) => {
|
|
545
545
|
r.push(s), ie.postMessage(n, "*");
|
|
546
546
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
547
547
|
typeof setImmediate == "function",
|
|
548
548
|
_(ie.postMessage)
|
|
549
|
-
),
|
|
549
|
+
), co = typeof queueMicrotask < "u" ? queueMicrotask.bind(ie) : typeof process < "u" && process.nextTick || Fn, p = {
|
|
550
550
|
isArray: pe,
|
|
551
551
|
isArrayBuffer: Tn,
|
|
552
|
-
isBuffer:
|
|
553
|
-
isFormData:
|
|
554
|
-
isArrayBufferView:
|
|
555
|
-
isString:
|
|
552
|
+
isBuffer: Ts,
|
|
553
|
+
isFormData: Is,
|
|
554
|
+
isArrayBufferView: Ds,
|
|
555
|
+
isString: Rs,
|
|
556
556
|
isNumber: Dn,
|
|
557
|
-
isBoolean:
|
|
557
|
+
isBoolean: Os,
|
|
558
558
|
isObject: Ne,
|
|
559
559
|
isPlainObject: ke,
|
|
560
|
-
isReadableStream:
|
|
561
|
-
isRequest:
|
|
562
|
-
isResponse:
|
|
563
|
-
isHeaders:
|
|
560
|
+
isReadableStream: Ms,
|
|
561
|
+
isRequest: js,
|
|
562
|
+
isResponse: Us,
|
|
563
|
+
isHeaders: qs,
|
|
564
564
|
isUndefined: we,
|
|
565
|
-
isDate:
|
|
566
|
-
isFile:
|
|
567
|
-
isBlob:
|
|
568
|
-
isRegExp:
|
|
565
|
+
isDate: Ps,
|
|
566
|
+
isFile: vs,
|
|
567
|
+
isBlob: Fs,
|
|
568
|
+
isRegExp: Qs,
|
|
569
569
|
isFunction: _,
|
|
570
|
-
isStream:
|
|
571
|
-
isURLSearchParams:
|
|
572
|
-
isTypedArray:
|
|
573
|
-
isFileList:
|
|
570
|
+
isStream: Ls,
|
|
571
|
+
isURLSearchParams: Ns,
|
|
572
|
+
isTypedArray: Ys,
|
|
573
|
+
isFileList: Bs,
|
|
574
574
|
forEach: Ae,
|
|
575
575
|
merge: st,
|
|
576
|
-
extend:
|
|
577
|
-
trim:
|
|
578
|
-
stripBOM:
|
|
579
|
-
inherits:
|
|
580
|
-
toFlatObject:
|
|
576
|
+
extend: Hs,
|
|
577
|
+
trim: _s,
|
|
578
|
+
stripBOM: zs,
|
|
579
|
+
inherits: Ws,
|
|
580
|
+
toFlatObject: Vs,
|
|
581
581
|
kindOf: Le,
|
|
582
582
|
kindOfTest: J,
|
|
583
|
-
endsWith:
|
|
584
|
-
toArray:
|
|
585
|
-
forEachEntry:
|
|
586
|
-
matchAll:
|
|
587
|
-
isHTMLForm:
|
|
583
|
+
endsWith: Ks,
|
|
584
|
+
toArray: $s,
|
|
585
|
+
forEachEntry: Js,
|
|
586
|
+
matchAll: Gs,
|
|
587
|
+
isHTMLForm: Zs,
|
|
588
588
|
hasOwnProperty: Kt,
|
|
589
589
|
hasOwnProp: Kt,
|
|
590
590
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
591
591
|
reduceDescriptors: Pn,
|
|
592
|
-
freezeMethods:
|
|
593
|
-
toObjectSet:
|
|
594
|
-
toCamelCase:
|
|
595
|
-
noop:
|
|
596
|
-
toFiniteNumber:
|
|
592
|
+
freezeMethods: eo,
|
|
593
|
+
toObjectSet: to,
|
|
594
|
+
toCamelCase: Xs,
|
|
595
|
+
noop: no,
|
|
596
|
+
toFiniteNumber: ro,
|
|
597
597
|
findKey: Rn,
|
|
598
598
|
global: ie,
|
|
599
599
|
isContextDefined: On,
|
|
600
600
|
ALPHABET: vn,
|
|
601
|
-
generateString:
|
|
602
|
-
isSpecCompliantForm:
|
|
603
|
-
toJSONObject:
|
|
604
|
-
isAsyncFn:
|
|
605
|
-
isThenable:
|
|
601
|
+
generateString: so,
|
|
602
|
+
isSpecCompliantForm: oo,
|
|
603
|
+
toJSONObject: ao,
|
|
604
|
+
isAsyncFn: io,
|
|
605
|
+
isThenable: lo,
|
|
606
606
|
setImmediate: Fn,
|
|
607
|
-
asap:
|
|
607
|
+
asap: co
|
|
608
608
|
};
|
|
609
609
|
function C(e, t, n, r, s) {
|
|
610
610
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
@@ -656,7 +656,7 @@ C.from = (e, t, n, r, s, o) => {
|
|
|
656
656
|
return d !== Error.prototype;
|
|
657
657
|
}, (l) => l !== "isAxiosError"), C.call(a, e.message, t, n, r, s), a.cause = e, a.name = e.name, o && Object.assign(a, o), a;
|
|
658
658
|
};
|
|
659
|
-
const
|
|
659
|
+
const uo = null;
|
|
660
660
|
function ot(e) {
|
|
661
661
|
return p.isPlainObject(e) || p.isArray(e);
|
|
662
662
|
}
|
|
@@ -668,10 +668,10 @@ function Yt(e, t, n) {
|
|
|
668
668
|
return s = In(s), !n && o ? "[" + s + "]" : s;
|
|
669
669
|
}).join(n ? "." : "") : t;
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function fo(e) {
|
|
672
672
|
return p.isArray(e) && !e.some(ot);
|
|
673
673
|
}
|
|
674
|
-
const
|
|
674
|
+
const po = p.toFlatObject(p, {}, null, function(t) {
|
|
675
675
|
return /^is[A-Z]/.test(t);
|
|
676
676
|
});
|
|
677
677
|
function Me(e, t, n) {
|
|
@@ -700,7 +700,7 @@ function Me(e, t, n) {
|
|
|
700
700
|
if (b && !g && typeof b == "object") {
|
|
701
701
|
if (p.endsWith(m, "{}"))
|
|
702
702
|
m = r ? m : m.slice(0, -2), b = JSON.stringify(b);
|
|
703
|
-
else if (p.isArray(b) &&
|
|
703
|
+
else if (p.isArray(b) && fo(b) || (p.isFileList(b) || p.endsWith(m, "[]")) && (A = p.toArray(b)))
|
|
704
704
|
return m = In(m), A.forEach(function(E, P) {
|
|
705
705
|
!(p.isUndefined(E) || E === null) && t.append(
|
|
706
706
|
// eslint-disable-next-line no-nested-ternary
|
|
@@ -711,7 +711,7 @@ function Me(e, t, n) {
|
|
|
711
711
|
}
|
|
712
712
|
return ot(b) ? !0 : (t.append(Yt(g, m, o), u(b)), !1);
|
|
713
713
|
}
|
|
714
|
-
const f = [], y = Object.assign(
|
|
714
|
+
const f = [], y = Object.assign(po, {
|
|
715
715
|
defaultVisitor: c,
|
|
716
716
|
convertValue: u,
|
|
717
717
|
isVisitable: ot
|
|
@@ -764,13 +764,13 @@ Nn.toString = function(t) {
|
|
|
764
764
|
return n(s[0]) + "=" + n(s[1]);
|
|
765
765
|
}, "").join("&");
|
|
766
766
|
};
|
|
767
|
-
function
|
|
767
|
+
function ho(e) {
|
|
768
768
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
769
769
|
}
|
|
770
770
|
function Mn(e, t, n) {
|
|
771
771
|
if (!t)
|
|
772
772
|
return e;
|
|
773
|
-
const r = n && n.encode ||
|
|
773
|
+
const r = n && n.encode || ho, s = n && n.serialize;
|
|
774
774
|
let o;
|
|
775
775
|
if (s ? o = s(t, n) : o = p.isURLSearchParams(t) ? t.toString() : new Rt(t, n).toString(r), o) {
|
|
776
776
|
const a = e.indexOf("#");
|
|
@@ -836,37 +836,37 @@ const jn = {
|
|
|
836
836
|
silentJSONParsing: !0,
|
|
837
837
|
forcedJSONParsing: !0,
|
|
838
838
|
clarifyTimeoutError: !1
|
|
839
|
-
},
|
|
839
|
+
}, mo = typeof URLSearchParams < "u" ? URLSearchParams : Rt, go = typeof FormData < "u" ? FormData : null, bo = typeof Blob < "u" ? Blob : null, yo = {
|
|
840
840
|
isBrowser: !0,
|
|
841
841
|
classes: {
|
|
842
|
-
URLSearchParams:
|
|
843
|
-
FormData:
|
|
844
|
-
Blob:
|
|
842
|
+
URLSearchParams: mo,
|
|
843
|
+
FormData: go,
|
|
844
|
+
Blob: bo
|
|
845
845
|
},
|
|
846
846
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
847
|
-
}, Ot = typeof window < "u" && typeof document < "u", at = typeof navigator == "object" && navigator || void 0,
|
|
848
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
847
|
+
}, Ot = typeof window < "u" && typeof document < "u", at = typeof navigator == "object" && navigator || void 0, wo = Ot && (!at || ["ReactNative", "NativeScript", "NS"].indexOf(at.product) < 0), So = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
848
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", xo = Ot && window.location.href || "http://localhost", Ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
849
849
|
__proto__: null,
|
|
850
850
|
hasBrowserEnv: Ot,
|
|
851
|
-
hasStandardBrowserEnv:
|
|
852
|
-
hasStandardBrowserWebWorkerEnv:
|
|
851
|
+
hasStandardBrowserEnv: wo,
|
|
852
|
+
hasStandardBrowserWebWorkerEnv: So,
|
|
853
853
|
navigator: at,
|
|
854
|
-
origin:
|
|
854
|
+
origin: xo
|
|
855
855
|
}, Symbol.toStringTag, { value: "Module" })), j = {
|
|
856
|
-
...
|
|
857
|
-
...
|
|
856
|
+
...Ao,
|
|
857
|
+
...yo
|
|
858
858
|
};
|
|
859
|
-
function
|
|
859
|
+
function Co(e, t) {
|
|
860
860
|
return Me(e, new j.classes.URLSearchParams(), Object.assign({
|
|
861
861
|
visitor: function(n, r, s, o) {
|
|
862
862
|
return j.isNode && p.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
863
863
|
}
|
|
864
864
|
}, t));
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function Eo(e) {
|
|
867
867
|
return p.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
868
868
|
}
|
|
869
|
-
function
|
|
869
|
+
function ko(e) {
|
|
870
870
|
const t = {}, n = Object.keys(e);
|
|
871
871
|
let r;
|
|
872
872
|
const s = n.length;
|
|
@@ -880,17 +880,17 @@ function Un(e) {
|
|
|
880
880
|
let a = n[o++];
|
|
881
881
|
if (a === "__proto__") return !0;
|
|
882
882
|
const l = Number.isFinite(+a), d = o >= n.length;
|
|
883
|
-
return a = !a && p.isArray(s) ? s.length : a, d ? (p.hasOwnProp(s, a) ? s[a] = [s[a], r] : s[a] = r, !l) : ((!s[a] || !p.isObject(s[a])) && (s[a] = []), t(n, r, s[a], o) && p.isArray(s[a]) && (s[a] =
|
|
883
|
+
return a = !a && p.isArray(s) ? s.length : a, d ? (p.hasOwnProp(s, a) ? s[a] = [s[a], r] : s[a] = r, !l) : ((!s[a] || !p.isObject(s[a])) && (s[a] = []), t(n, r, s[a], o) && p.isArray(s[a]) && (s[a] = ko(s[a])), !l);
|
|
884
884
|
}
|
|
885
885
|
if (p.isFormData(e) && p.isFunction(e.entries)) {
|
|
886
886
|
const n = {};
|
|
887
887
|
return p.forEachEntry(e, (r, s) => {
|
|
888
|
-
t(
|
|
888
|
+
t(Eo(r), s, n, 0);
|
|
889
889
|
}), n;
|
|
890
890
|
}
|
|
891
891
|
return null;
|
|
892
892
|
}
|
|
893
|
-
function
|
|
893
|
+
function To(e, t, n) {
|
|
894
894
|
if (p.isString(e))
|
|
895
895
|
try {
|
|
896
896
|
return (t || JSON.parse)(e), p.trim(e);
|
|
@@ -916,7 +916,7 @@ const Ce = {
|
|
|
916
916
|
let l;
|
|
917
917
|
if (o) {
|
|
918
918
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
919
|
-
return
|
|
919
|
+
return Co(t, this.formSerializer).toString();
|
|
920
920
|
if ((l = p.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
921
921
|
const d = this.env && this.env.FormData;
|
|
922
922
|
return Me(
|
|
@@ -926,7 +926,7 @@ const Ce = {
|
|
|
926
926
|
);
|
|
927
927
|
}
|
|
928
928
|
}
|
|
929
|
-
return o || s ? (n.setContentType("application/json", !1),
|
|
929
|
+
return o || s ? (n.setContentType("application/json", !1), To(t)) : t;
|
|
930
930
|
}],
|
|
931
931
|
transformResponse: [function(t) {
|
|
932
932
|
const n = this.transitional || Ce.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -969,7 +969,7 @@ const Ce = {
|
|
|
969
969
|
p.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
970
970
|
Ce.headers[e] = {};
|
|
971
971
|
});
|
|
972
|
-
const
|
|
972
|
+
const Do = p.toObjectSet([
|
|
973
973
|
"age",
|
|
974
974
|
"authorization",
|
|
975
975
|
"content-length",
|
|
@@ -987,12 +987,12 @@ const To = p.toObjectSet([
|
|
|
987
987
|
"referer",
|
|
988
988
|
"retry-after",
|
|
989
989
|
"user-agent"
|
|
990
|
-
]),
|
|
990
|
+
]), Ro = (e) => {
|
|
991
991
|
const t = {};
|
|
992
992
|
let n, r, s;
|
|
993
993
|
return e && e.split(`
|
|
994
994
|
`).forEach(function(a) {
|
|
995
|
-
s = a.indexOf(":"), n = a.substring(0, s).trim().toLowerCase(), r = a.substring(s + 1).trim(), !(!n || t[n] &&
|
|
995
|
+
s = a.indexOf(":"), n = a.substring(0, s).trim().toLowerCase(), r = a.substring(s + 1).trim(), !(!n || t[n] && Do[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
996
996
|
}), t;
|
|
997
997
|
}, Zt = Symbol("internals");
|
|
998
998
|
function ge(e) {
|
|
@@ -1001,14 +1001,14 @@ function ge(e) {
|
|
|
1001
1001
|
function Te(e) {
|
|
1002
1002
|
return e === !1 || e == null ? e : p.isArray(e) ? e.map(Te) : String(e);
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1004
|
+
function Oo(e) {
|
|
1005
1005
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
1006
1006
|
let r;
|
|
1007
1007
|
for (; r = n.exec(e); )
|
|
1008
1008
|
t[r[1]] = r[2];
|
|
1009
1009
|
return t;
|
|
1010
1010
|
}
|
|
1011
|
-
const
|
|
1011
|
+
const Po = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
1012
1012
|
function Ve(e, t, n, r, s) {
|
|
1013
1013
|
if (p.isFunction(r))
|
|
1014
1014
|
return r.call(this, t, n);
|
|
@@ -1019,10 +1019,10 @@ function Ve(e, t, n, r, s) {
|
|
|
1019
1019
|
return r.test(t);
|
|
1020
1020
|
}
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1022
|
+
function vo(e) {
|
|
1023
1023
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
1024
1024
|
}
|
|
1025
|
-
function
|
|
1025
|
+
function Fo(e, t) {
|
|
1026
1026
|
const n = p.toCamelCase(" " + t);
|
|
1027
1027
|
["get", "set", "has"].forEach((r) => {
|
|
1028
1028
|
Object.defineProperty(e, r + n, {
|
|
@@ -1049,8 +1049,8 @@ let U = class {
|
|
|
1049
1049
|
const a = (l, d) => p.forEach(l, (u, c) => o(u, c, d));
|
|
1050
1050
|
if (p.isPlainObject(t) || t instanceof this.constructor)
|
|
1051
1051
|
a(t, n);
|
|
1052
|
-
else if (p.isString(t) && (t = t.trim()) && !
|
|
1053
|
-
a(
|
|
1052
|
+
else if (p.isString(t) && (t = t.trim()) && !Po(t))
|
|
1053
|
+
a(Ro(t), n);
|
|
1054
1054
|
else if (p.isHeaders(t))
|
|
1055
1055
|
for (const [l, d] of t.entries())
|
|
1056
1056
|
o(d, l, r);
|
|
@@ -1066,7 +1066,7 @@ let U = class {
|
|
|
1066
1066
|
if (!n)
|
|
1067
1067
|
return s;
|
|
1068
1068
|
if (n === !0)
|
|
1069
|
-
return
|
|
1069
|
+
return Oo(s);
|
|
1070
1070
|
if (p.isFunction(n))
|
|
1071
1071
|
return n.call(this, s, r);
|
|
1072
1072
|
if (p.isRegExp(n))
|
|
@@ -1110,7 +1110,7 @@ let U = class {
|
|
|
1110
1110
|
n[a] = Te(s), delete n[o];
|
|
1111
1111
|
return;
|
|
1112
1112
|
}
|
|
1113
|
-
const l = t ?
|
|
1113
|
+
const l = t ? vo(o) : String(o).trim();
|
|
1114
1114
|
l !== o && delete n[o], n[l] = Te(s), r[l] = !0;
|
|
1115
1115
|
}), this;
|
|
1116
1116
|
}
|
|
@@ -1146,7 +1146,7 @@ let U = class {
|
|
|
1146
1146
|
}).accessors, s = this.prototype;
|
|
1147
1147
|
function o(a) {
|
|
1148
1148
|
const l = ge(a);
|
|
1149
|
-
r[l] || (
|
|
1149
|
+
r[l] || (Fo(s, a), r[l] = !0);
|
|
1150
1150
|
}
|
|
1151
1151
|
return p.isArray(t) ? t.forEach(o) : o(t), this;
|
|
1152
1152
|
}
|
|
@@ -1188,11 +1188,11 @@ function _n(e, t, n) {
|
|
|
1188
1188
|
n
|
|
1189
1189
|
));
|
|
1190
1190
|
}
|
|
1191
|
-
function
|
|
1191
|
+
function Bo(e) {
|
|
1192
1192
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1193
1193
|
return t && t[1] || "";
|
|
1194
1194
|
}
|
|
1195
|
-
function
|
|
1195
|
+
function Lo(e, t) {
|
|
1196
1196
|
e = e || 10;
|
|
1197
1197
|
const n = new Array(e), r = new Array(e);
|
|
1198
1198
|
let s = 0, o = 0, a;
|
|
@@ -1208,7 +1208,7 @@ function Bo(e, t) {
|
|
|
1208
1208
|
return S ? Math.round(y * 1e3 / S) : void 0;
|
|
1209
1209
|
};
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1211
|
+
function Io(e, t) {
|
|
1212
1212
|
let n = 0, r = 1e3 / t, s, o;
|
|
1213
1213
|
const a = (u, c = Date.now()) => {
|
|
1214
1214
|
n = c, s = null, o && (clearTimeout(o), o = null), e.apply(null, u);
|
|
@@ -1222,8 +1222,8 @@ function Lo(e, t) {
|
|
|
1222
1222
|
}
|
|
1223
1223
|
const Pe = (e, t, n = 3) => {
|
|
1224
1224
|
let r = 0;
|
|
1225
|
-
const s =
|
|
1226
|
-
return
|
|
1225
|
+
const s = Lo(50, 250);
|
|
1226
|
+
return Io((o) => {
|
|
1227
1227
|
const a = o.loaded, l = o.lengthComputable ? o.total : void 0, d = a - r, u = s(d), c = a <= l;
|
|
1228
1228
|
r = a;
|
|
1229
1229
|
const f = {
|
|
@@ -1246,7 +1246,7 @@ const Pe = (e, t, n = 3) => {
|
|
|
1246
1246
|
total: e,
|
|
1247
1247
|
loaded: r
|
|
1248
1248
|
}), t[1]];
|
|
1249
|
-
}, Qt = (e) => (...t) => p.asap(() => e(...t)),
|
|
1249
|
+
}, Qt = (e) => (...t) => p.asap(() => e(...t)), No = j.hasStandardBrowserEnv ? (
|
|
1250
1250
|
// Standard browser envs have full support of the APIs needed to test
|
|
1251
1251
|
// whether the request URL is of the same origin as current location.
|
|
1252
1252
|
function() {
|
|
@@ -1277,7 +1277,7 @@ const Pe = (e, t, n = 3) => {
|
|
|
1277
1277
|
return !0;
|
|
1278
1278
|
};
|
|
1279
1279
|
}()
|
|
1280
|
-
),
|
|
1280
|
+
), Mo = j.hasStandardBrowserEnv ? (
|
|
1281
1281
|
// Standard browser envs support document.cookie
|
|
1282
1282
|
{
|
|
1283
1283
|
write(e, t, n, r, s, o) {
|
|
@@ -1304,14 +1304,14 @@ const Pe = (e, t, n = 3) => {
|
|
|
1304
1304
|
}
|
|
1305
1305
|
}
|
|
1306
1306
|
);
|
|
1307
|
-
function
|
|
1307
|
+
function jo(e) {
|
|
1308
1308
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1309
1309
|
}
|
|
1310
|
-
function
|
|
1310
|
+
function Uo(e, t) {
|
|
1311
1311
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1312
1312
|
}
|
|
1313
1313
|
function Hn(e, t) {
|
|
1314
|
-
return e && !
|
|
1314
|
+
return e && !jo(t) ? Uo(e, t) : t;
|
|
1315
1315
|
}
|
|
1316
1316
|
const en = (e) => e instanceof U ? { ...e } : e;
|
|
1317
1317
|
function ue(e, t) {
|
|
@@ -1394,12 +1394,12 @@ const zn = (e) => {
|
|
|
1394
1394
|
a.setContentType([u || "multipart/form-data", ...c].join("; "));
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
1397
|
-
if (j.hasStandardBrowserEnv && (r && p.isFunction(r) && (r = r(t)), r || r !== !1 &&
|
|
1398
|
-
const u = s && o &&
|
|
1397
|
+
if (j.hasStandardBrowserEnv && (r && p.isFunction(r) && (r = r(t)), r || r !== !1 && No(t.url))) {
|
|
1398
|
+
const u = s && o && Mo.read(o);
|
|
1399
1399
|
u && a.set(s, u);
|
|
1400
1400
|
}
|
|
1401
1401
|
return t;
|
|
1402
|
-
},
|
|
1402
|
+
}, qo = typeof XMLHttpRequest < "u", _o = qo && function(e) {
|
|
1403
1403
|
return new Promise(function(n, r) {
|
|
1404
1404
|
const s = zn(e);
|
|
1405
1405
|
let o = s.data;
|
|
@@ -1449,14 +1449,14 @@ const zn = (e) => {
|
|
|
1449
1449
|
}), p.isUndefined(s.withCredentials) || (g.withCredentials = !!s.withCredentials), l && l !== "json" && (g.responseType = s.responseType), u && ([y, b] = Pe(u, !0), g.addEventListener("progress", y)), d && g.upload && ([f, S] = Pe(d), g.upload.addEventListener("progress", f), g.upload.addEventListener("loadend", S)), (s.cancelToken || s.signal) && (c = (E) => {
|
|
1450
1450
|
g && (r(!E || E.type ? new he(null, e, g) : E), g.abort(), g = null);
|
|
1451
1451
|
}, s.cancelToken && s.cancelToken.subscribe(c), s.signal && (s.signal.aborted ? c() : s.signal.addEventListener("abort", c)));
|
|
1452
|
-
const x =
|
|
1452
|
+
const x = Bo(s.url);
|
|
1453
1453
|
if (x && j.protocols.indexOf(x) === -1) {
|
|
1454
1454
|
r(new C("Unsupported protocol " + x + ":", C.ERR_BAD_REQUEST, e));
|
|
1455
1455
|
return;
|
|
1456
1456
|
}
|
|
1457
1457
|
g.send(o || null);
|
|
1458
1458
|
});
|
|
1459
|
-
},
|
|
1459
|
+
}, Ho = (e, t) => {
|
|
1460
1460
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1461
1461
|
if (t || n) {
|
|
1462
1462
|
let r = new AbortController(), s;
|
|
@@ -1479,7 +1479,7 @@ const zn = (e) => {
|
|
|
1479
1479
|
const { signal: d } = r;
|
|
1480
1480
|
return d.unsubscribe = () => p.asap(l), d;
|
|
1481
1481
|
}
|
|
1482
|
-
},
|
|
1482
|
+
}, zo = function* (e, t) {
|
|
1483
1483
|
let n = e.byteLength;
|
|
1484
1484
|
if (n < t) {
|
|
1485
1485
|
yield e;
|
|
@@ -1488,10 +1488,10 @@ const zn = (e) => {
|
|
|
1488
1488
|
let r = 0, s;
|
|
1489
1489
|
for (; r < n; )
|
|
1490
1490
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1491
|
-
},
|
|
1492
|
-
for await (const n of
|
|
1493
|
-
yield*
|
|
1494
|
-
},
|
|
1491
|
+
}, Wo = async function* (e, t) {
|
|
1492
|
+
for await (const n of Vo(e))
|
|
1493
|
+
yield* zo(n, t);
|
|
1494
|
+
}, Vo = async function* (e) {
|
|
1495
1495
|
if (e[Symbol.asyncIterator]) {
|
|
1496
1496
|
yield* e;
|
|
1497
1497
|
return;
|
|
@@ -1508,7 +1508,7 @@ const zn = (e) => {
|
|
|
1508
1508
|
await t.cancel();
|
|
1509
1509
|
}
|
|
1510
1510
|
}, tn = (e, t, n, r) => {
|
|
1511
|
-
const s =
|
|
1511
|
+
const s = Wo(e, t);
|
|
1512
1512
|
let o = 0, a, l = (d) => {
|
|
1513
1513
|
a || (a = !0, r && r(d));
|
|
1514
1514
|
};
|
|
@@ -1536,13 +1536,13 @@ const zn = (e) => {
|
|
|
1536
1536
|
}, {
|
|
1537
1537
|
highWaterMark: 2
|
|
1538
1538
|
});
|
|
1539
|
-
}, je = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Wn = je && typeof ReadableStream == "function",
|
|
1539
|
+
}, je = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Wn = je && typeof ReadableStream == "function", Ko = je && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Vn = (e, ...t) => {
|
|
1540
1540
|
try {
|
|
1541
1541
|
return !!e(...t);
|
|
1542
1542
|
} catch {
|
|
1543
1543
|
return !1;
|
|
1544
1544
|
}
|
|
1545
|
-
},
|
|
1545
|
+
}, $o = Wn && Vn(() => {
|
|
1546
1546
|
let e = !1;
|
|
1547
1547
|
const t = new Request(j.origin, {
|
|
1548
1548
|
body: new ReadableStream(),
|
|
@@ -1562,7 +1562,7 @@ je && ((e) => {
|
|
|
1562
1562
|
});
|
|
1563
1563
|
});
|
|
1564
1564
|
})(new Response());
|
|
1565
|
-
const
|
|
1565
|
+
const Yo = async (e) => {
|
|
1566
1566
|
if (e == null)
|
|
1567
1567
|
return 0;
|
|
1568
1568
|
if (p.isBlob(e))
|
|
@@ -1575,11 +1575,11 @@ const $o = async (e) => {
|
|
|
1575
1575
|
if (p.isArrayBufferView(e) || p.isArrayBuffer(e))
|
|
1576
1576
|
return e.byteLength;
|
|
1577
1577
|
if (p.isURLSearchParams(e) && (e = e + ""), p.isString(e))
|
|
1578
|
-
return (await
|
|
1579
|
-
},
|
|
1578
|
+
return (await Ko(e)).byteLength;
|
|
1579
|
+
}, Jo = async (e, t) => {
|
|
1580
1580
|
const n = p.toFiniteNumber(e.getContentLength());
|
|
1581
|
-
return n ??
|
|
1582
|
-
},
|
|
1581
|
+
return n ?? Yo(t);
|
|
1582
|
+
}, Go = je && (async (e) => {
|
|
1583
1583
|
let {
|
|
1584
1584
|
url: t,
|
|
1585
1585
|
method: n,
|
|
@@ -1595,13 +1595,13 @@ const $o = async (e) => {
|
|
|
1595
1595
|
fetchOptions: y
|
|
1596
1596
|
} = zn(e);
|
|
1597
1597
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1598
|
-
let S =
|
|
1598
|
+
let S = Ho([s, o && o.toAbortSignal()], a), b;
|
|
1599
1599
|
const m = S && S.unsubscribe && (() => {
|
|
1600
1600
|
S.unsubscribe();
|
|
1601
1601
|
});
|
|
1602
1602
|
let g;
|
|
1603
1603
|
try {
|
|
1604
|
-
if (d &&
|
|
1604
|
+
if (d && $o && n !== "get" && n !== "head" && (g = await Jo(c, r)) !== 0) {
|
|
1605
1605
|
let R = new Request(t, {
|
|
1606
1606
|
method: "POST",
|
|
1607
1607
|
body: r,
|
|
@@ -1665,9 +1665,9 @@ const $o = async (e) => {
|
|
|
1665
1665
|
) : C.from(A, A && A.code, e, b);
|
|
1666
1666
|
}
|
|
1667
1667
|
}), lt = {
|
|
1668
|
-
http:
|
|
1669
|
-
xhr:
|
|
1670
|
-
fetch:
|
|
1668
|
+
http: uo,
|
|
1669
|
+
xhr: _o,
|
|
1670
|
+
fetch: Go
|
|
1671
1671
|
};
|
|
1672
1672
|
p.forEach(lt, (e, t) => {
|
|
1673
1673
|
if (e) {
|
|
@@ -1678,7 +1678,7 @@ p.forEach(lt, (e, t) => {
|
|
|
1678
1678
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1679
1679
|
}
|
|
1680
1680
|
});
|
|
1681
|
-
const rn = (e) => `- ${e}`,
|
|
1681
|
+
const rn = (e) => `- ${e}`, Zo = (e) => p.isFunction(e) || e === null || e === !1, Kn = {
|
|
1682
1682
|
getAdapter: (e) => {
|
|
1683
1683
|
e = p.isArray(e) ? e : [e];
|
|
1684
1684
|
const { length: t } = e;
|
|
@@ -1687,7 +1687,7 @@ const rn = (e) => `- ${e}`, Go = (e) => p.isFunction(e) || e === null || e === !
|
|
|
1687
1687
|
for (let o = 0; o < t; o++) {
|
|
1688
1688
|
n = e[o];
|
|
1689
1689
|
let a;
|
|
1690
|
-
if (r = n, !
|
|
1690
|
+
if (r = n, !Zo(n) && (r = lt[(a = String(n)).toLowerCase()], r === void 0))
|
|
1691
1691
|
throw new C(`Unknown adapter '${a}'`);
|
|
1692
1692
|
if (r)
|
|
1693
1693
|
break;
|
|
@@ -1756,7 +1756,7 @@ Pt.transitional = function(t, n, r) {
|
|
|
1756
1756
|
)), t ? t(o, a, l) : !0;
|
|
1757
1757
|
};
|
|
1758
1758
|
};
|
|
1759
|
-
function
|
|
1759
|
+
function Xo(e, t, n) {
|
|
1760
1760
|
if (typeof e != "object")
|
|
1761
1761
|
throw new C("options must be an object", C.ERR_BAD_OPTION_VALUE);
|
|
1762
1762
|
const r = Object.keys(e);
|
|
@@ -1774,7 +1774,7 @@ function Zo(e, t, n) {
|
|
|
1774
1774
|
}
|
|
1775
1775
|
}
|
|
1776
1776
|
const ct = {
|
|
1777
|
-
assertOptions:
|
|
1777
|
+
assertOptions: Xo,
|
|
1778
1778
|
validators: Pt
|
|
1779
1779
|
}, ne = ct.validators;
|
|
1780
1780
|
let le = class {
|
|
@@ -1898,7 +1898,7 @@ p.forEach(["post", "put", "patch"], function(t) {
|
|
|
1898
1898
|
}
|
|
1899
1899
|
le.prototype[t] = n(), le.prototype[t + "Form"] = n(!0);
|
|
1900
1900
|
});
|
|
1901
|
-
let
|
|
1901
|
+
let Qo = class Yn {
|
|
1902
1902
|
constructor(t) {
|
|
1903
1903
|
if (typeof t != "function")
|
|
1904
1904
|
throw new TypeError("executor must be a function.");
|
|
@@ -1971,12 +1971,12 @@ let Xo = class Yn {
|
|
|
1971
1971
|
};
|
|
1972
1972
|
}
|
|
1973
1973
|
};
|
|
1974
|
-
function
|
|
1974
|
+
function ea(e) {
|
|
1975
1975
|
return function(n) {
|
|
1976
1976
|
return e.apply(null, n);
|
|
1977
1977
|
};
|
|
1978
1978
|
}
|
|
1979
|
-
function
|
|
1979
|
+
function ta(e) {
|
|
1980
1980
|
return p.isObject(e) && e.isAxiosError === !0;
|
|
1981
1981
|
}
|
|
1982
1982
|
const ut = {
|
|
@@ -2056,7 +2056,7 @@ function Jn(e) {
|
|
|
2056
2056
|
const F = Jn(Ce);
|
|
2057
2057
|
F.Axios = le;
|
|
2058
2058
|
F.CanceledError = he;
|
|
2059
|
-
F.CancelToken =
|
|
2059
|
+
F.CancelToken = Qo;
|
|
2060
2060
|
F.isCancel = qn;
|
|
2061
2061
|
F.VERSION = $n;
|
|
2062
2062
|
F.toFormData = Me;
|
|
@@ -2065,8 +2065,8 @@ F.Cancel = F.CanceledError;
|
|
|
2065
2065
|
F.all = function(t) {
|
|
2066
2066
|
return Promise.all(t);
|
|
2067
2067
|
};
|
|
2068
|
-
F.spread =
|
|
2069
|
-
F.isAxiosError =
|
|
2068
|
+
F.spread = ea;
|
|
2069
|
+
F.isAxiosError = ta;
|
|
2070
2070
|
F.mergeConfig = ue;
|
|
2071
2071
|
F.AxiosHeaders = U;
|
|
2072
2072
|
F.formToJSON = (e) => Un(p.isHTMLForm(e) ? new FormData(e) : e);
|
|
@@ -2074,22 +2074,22 @@ F.getAdapter = Kn.getAdapter;
|
|
|
2074
2074
|
F.HttpStatusCode = ut;
|
|
2075
2075
|
F.default = F;
|
|
2076
2076
|
const {
|
|
2077
|
-
Axios:
|
|
2078
|
-
AxiosError:
|
|
2079
|
-
CanceledError:
|
|
2080
|
-
isCancel:
|
|
2081
|
-
CancelToken:
|
|
2082
|
-
VERSION:
|
|
2083
|
-
all:
|
|
2084
|
-
Cancel:
|
|
2085
|
-
isAxiosError:
|
|
2086
|
-
spread:
|
|
2087
|
-
toFormData:
|
|
2088
|
-
AxiosHeaders:
|
|
2089
|
-
HttpStatusCode:
|
|
2090
|
-
formToJSON:
|
|
2091
|
-
getAdapter:
|
|
2092
|
-
mergeConfig:
|
|
2077
|
+
Axios: Ri,
|
|
2078
|
+
AxiosError: Oi,
|
|
2079
|
+
CanceledError: Pi,
|
|
2080
|
+
isCancel: vi,
|
|
2081
|
+
CancelToken: Fi,
|
|
2082
|
+
VERSION: Bi,
|
|
2083
|
+
all: Li,
|
|
2084
|
+
Cancel: Ii,
|
|
2085
|
+
isAxiosError: na,
|
|
2086
|
+
spread: Ni,
|
|
2087
|
+
toFormData: Mi,
|
|
2088
|
+
AxiosHeaders: ji,
|
|
2089
|
+
HttpStatusCode: Ui,
|
|
2090
|
+
formToJSON: qi,
|
|
2091
|
+
getAdapter: _i,
|
|
2092
|
+
mergeConfig: Hi
|
|
2093
2093
|
} = F;
|
|
2094
2094
|
function ce(e) {
|
|
2095
2095
|
return (t) => {
|
|
@@ -2097,7 +2097,7 @@ function ce(e) {
|
|
|
2097
2097
|
if (!(t instanceof Error))
|
|
2098
2098
|
throw t;
|
|
2099
2099
|
e({
|
|
2100
|
-
message:
|
|
2100
|
+
message: na(t) ? ((n = t.response) == null ? void 0 : n.data.message) ?? t.message : t.message,
|
|
2101
2101
|
severity: "error"
|
|
2102
2102
|
});
|
|
2103
2103
|
};
|
|
@@ -2105,24 +2105,24 @@ function ce(e) {
|
|
|
2105
2105
|
function vt() {
|
|
2106
2106
|
return h.useContext(kt).notify;
|
|
2107
2107
|
}
|
|
2108
|
-
function
|
|
2108
|
+
function ra() {
|
|
2109
2109
|
const e = vt();
|
|
2110
2110
|
return h.useCallback((t) => {
|
|
2111
2111
|
ce(e)(t);
|
|
2112
2112
|
}, [e]);
|
|
2113
2113
|
}
|
|
2114
|
-
const
|
|
2115
|
-
const [t, n] = h.useState(), { id: r } =
|
|
2114
|
+
const sa = ({ create: e = !1 }) => {
|
|
2115
|
+
const [t, n] = h.useState(), { id: r } = ar(), { t: s } = L(), o = vt(), a = ft(), l = te(), d = H("breakpoint", "md");
|
|
2116
2116
|
Tt(
|
|
2117
2117
|
t != null && t.exists ? s("Edit :model “:label“", { model: l.singular(), label: (t == null ? void 0 : t.getLabel()) || "..." }) : s("Create :model", { model: l.singular() })
|
|
2118
|
-
),
|
|
2118
|
+
), Es();
|
|
2119
2119
|
const u = T("cms").getComponent("Breadcrumbs");
|
|
2120
2120
|
h.useEffect(() => {
|
|
2121
2121
|
e ? n(new l()) : l.find(r).then((S) => n(S ?? void 0));
|
|
2122
2122
|
}, [r, l, e]);
|
|
2123
2123
|
const c = h.useCallback(() => {
|
|
2124
2124
|
o(s(":model saved successfully", { model: l.singular() })), t != null && t.wasRecentlyCreated && a(`/${k.kebab(l.plural())}/${t.getKey()}`);
|
|
2125
|
-
}, [o, a, l, t, s]), f =
|
|
2125
|
+
}, [o, a, l, t, s]), f = ra(), y = h.useMemo(() => T("cms").getModelFormProps(t), [t]);
|
|
2126
2126
|
return t ? /* @__PURE__ */ w(Q, { container: !0, children: [
|
|
2127
2127
|
/* @__PURE__ */ i(Q, { xs: 12, children: /* @__PURE__ */ i(
|
|
2128
2128
|
u,
|
|
@@ -2139,7 +2139,7 @@ const ra = ({ create: e = !1 }) => {
|
|
|
2139
2139
|
xs: 12,
|
|
2140
2140
|
[d]: 6,
|
|
2141
2141
|
children: /* @__PURE__ */ i(
|
|
2142
|
-
|
|
2142
|
+
cr,
|
|
2143
2143
|
{
|
|
2144
2144
|
submitText: "Save",
|
|
2145
2145
|
...y,
|
|
@@ -2152,7 +2152,7 @@ const ra = ({ create: e = !1 }) => {
|
|
|
2152
2152
|
)
|
|
2153
2153
|
] }) : null;
|
|
2154
2154
|
};
|
|
2155
|
-
function
|
|
2155
|
+
function oa(e) {
|
|
2156
2156
|
const {
|
|
2157
2157
|
setDisplacement: t
|
|
2158
2158
|
} = h.useContext(kt), n = Et(), r = v(), s = n.spacing(r ? 3 : 1), o = e === !1 ? s : n.spacing(e);
|
|
@@ -2160,24 +2160,24 @@ function sa(e) {
|
|
|
2160
2160
|
t(s);
|
|
2161
2161
|
}), [o, s, t]);
|
|
2162
2162
|
}
|
|
2163
|
-
function
|
|
2163
|
+
function aa() {
|
|
2164
2164
|
return h.useContext(En).dialog;
|
|
2165
2165
|
}
|
|
2166
2166
|
function Ft() {
|
|
2167
|
-
const e = ft(), t = vt(), n =
|
|
2167
|
+
const e = ft(), t = vt(), n = aa(), { t: r } = L(), { refresh: s } = Se();
|
|
2168
2168
|
return { navigate: e, notify: t, dialog: n, t: r, refresh: s };
|
|
2169
2169
|
}
|
|
2170
|
-
const
|
|
2170
|
+
const ia = Z(gr)(({ theme: e }) => ({
|
|
2171
2171
|
position: "fixed",
|
|
2172
2172
|
bottom: e.spacing(2),
|
|
2173
2173
|
right: e.spacing(2)
|
|
2174
|
-
})),
|
|
2174
|
+
})), la = Z(br)(({ theme: e }) => ({
|
|
2175
2175
|
position: "fixed",
|
|
2176
2176
|
bottom: e.spacing(2),
|
|
2177
2177
|
right: e.spacing(2)
|
|
2178
|
-
})),
|
|
2178
|
+
})), ca = ({ variant: e = "default" }) => {
|
|
2179
2179
|
const t = te(), n = v(), [r] = Y(), s = r.get("tab") ?? "all", [o, a] = h.useState(!1), l = h.useRef(null), [d, u] = h.useState(0), c = Ft(), f = h.useMemo(() => T("cms").getStaticActions(t, s), [t, s]);
|
|
2180
|
-
if (
|
|
2180
|
+
if (oa(
|
|
2181
2181
|
e === "fab" && f.length > 0 ? n ? 12 : 10 : !1
|
|
2182
2182
|
), f.length === 0)
|
|
2183
2183
|
return null;
|
|
@@ -2190,7 +2190,7 @@ const aa = Z(mr)(({ theme: e }) => ({
|
|
|
2190
2190
|
};
|
|
2191
2191
|
return e === "fab" ? f.length === 1 ? Vt.createPortal(
|
|
2192
2192
|
/* @__PURE__ */ i(
|
|
2193
|
-
|
|
2193
|
+
ia,
|
|
2194
2194
|
{
|
|
2195
2195
|
color: "primary",
|
|
2196
2196
|
onClick: () => f[0].callback(c),
|
|
@@ -2200,16 +2200,16 @@ const aa = Z(mr)(({ theme: e }) => ({
|
|
|
2200
2200
|
document.body
|
|
2201
2201
|
) : Vt.createPortal(
|
|
2202
2202
|
/* @__PURE__ */ i(
|
|
2203
|
-
|
|
2203
|
+
la,
|
|
2204
2204
|
{
|
|
2205
2205
|
ariaLabel: `actions for ${t.singular()}`,
|
|
2206
|
-
icon: /* @__PURE__ */ i(
|
|
2206
|
+
icon: /* @__PURE__ */ i(yr, {}),
|
|
2207
2207
|
color: "primary",
|
|
2208
2208
|
onClose: () => a(!1),
|
|
2209
2209
|
onOpen: () => a(!0),
|
|
2210
2210
|
open: o,
|
|
2211
2211
|
children: f.map((m) => /* @__PURE__ */ i(
|
|
2212
|
-
|
|
2212
|
+
wr,
|
|
2213
2213
|
{
|
|
2214
2214
|
icon: m.icon || m.label.charAt(0).toUpperCase(),
|
|
2215
2215
|
tooltipTitle: m.label,
|
|
@@ -2222,7 +2222,7 @@ const aa = Z(mr)(({ theme: e }) => ({
|
|
|
2222
2222
|
document.body
|
|
2223
2223
|
) : /* @__PURE__ */ w(B, { children: [
|
|
2224
2224
|
/* @__PURE__ */ w(
|
|
2225
|
-
|
|
2225
|
+
Sr,
|
|
2226
2226
|
{
|
|
2227
2227
|
variant: "contained",
|
|
2228
2228
|
ref: l,
|
|
@@ -2239,27 +2239,27 @@ const aa = Z(mr)(({ theme: e }) => ({
|
|
|
2239
2239
|
"aria-label": `select ${t.singular()} actions`,
|
|
2240
2240
|
"aria-haspopup": "menu",
|
|
2241
2241
|
onClick: S,
|
|
2242
|
-
children: /* @__PURE__ */ i(
|
|
2242
|
+
children: /* @__PURE__ */ i(Vr, {})
|
|
2243
2243
|
}
|
|
2244
2244
|
)
|
|
2245
2245
|
]
|
|
2246
2246
|
}
|
|
2247
2247
|
),
|
|
2248
2248
|
/* @__PURE__ */ i(
|
|
2249
|
-
|
|
2249
|
+
xr,
|
|
2250
2250
|
{
|
|
2251
2251
|
open: o,
|
|
2252
2252
|
anchorEl: l.current,
|
|
2253
2253
|
role: void 0,
|
|
2254
2254
|
transition: !0,
|
|
2255
2255
|
children: ({ TransitionProps: m, placement: g }) => /* @__PURE__ */ i(
|
|
2256
|
-
|
|
2256
|
+
Ar,
|
|
2257
2257
|
{
|
|
2258
2258
|
...m,
|
|
2259
2259
|
style: {
|
|
2260
2260
|
transformOrigin: g === "bottom" ? "center top" : "center bottom"
|
|
2261
2261
|
},
|
|
2262
|
-
children: /* @__PURE__ */ i(yt, { children: /* @__PURE__ */ i(
|
|
2262
|
+
children: /* @__PURE__ */ i(yt, { children: /* @__PURE__ */ i(Cr, { onClickAway: b, children: /* @__PURE__ */ i(Er, { id: "split-button-menu", children: f.map((A, x) => /* @__PURE__ */ i(
|
|
2263
2263
|
oe,
|
|
2264
2264
|
{
|
|
2265
2265
|
selected: x === d,
|
|
@@ -2293,16 +2293,16 @@ function Gn() {
|
|
|
2293
2293
|
const { currentPage: e } = h.useContext(X);
|
|
2294
2294
|
return e;
|
|
2295
2295
|
}
|
|
2296
|
-
function
|
|
2296
|
+
function ua() {
|
|
2297
2297
|
const { showSearch: e } = h.useContext(X);
|
|
2298
2298
|
return e;
|
|
2299
2299
|
}
|
|
2300
|
-
const
|
|
2300
|
+
const da = "data:image/png;base64,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", fa = "data:image/png;base64,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";
|
|
2301
2301
|
function Zn() {
|
|
2302
2302
|
const { showBackButton: e } = h.useContext(X);
|
|
2303
2303
|
return e;
|
|
2304
2304
|
}
|
|
2305
|
-
const
|
|
2305
|
+
const pa = Z(
|
|
2306
2306
|
fn,
|
|
2307
2307
|
{ shouldForwardProp: (e) => !["open", "drawerWidth", "height"].includes(String(e)) }
|
|
2308
2308
|
)(({ theme: e, open: t, drawerWidth: n, height: r }) => ({
|
|
@@ -2320,15 +2320,15 @@ const fa = Z(
|
|
|
2320
2320
|
duration: e.transitions.duration.enteringScreen
|
|
2321
2321
|
})
|
|
2322
2322
|
}
|
|
2323
|
-
})),
|
|
2323
|
+
})), ha = Z(
|
|
2324
2324
|
fn,
|
|
2325
2325
|
{ shouldForwardProp: (e) => !["open", "drawerWidth", "height"].includes(String(e)) }
|
|
2326
|
-
)(({ height: e }) => ({ height: e })),
|
|
2327
|
-
const n = v(), r = Be("(prefers-color-scheme: dark)"), s = n ?
|
|
2326
|
+
)(({ height: e }) => ({ height: e })), ma = ({ slots: e = {}, ...t }) => {
|
|
2327
|
+
const n = v(), r = Be("(prefers-color-scheme: dark)"), s = n ? pa : ha, {
|
|
2328
2328
|
["Layout.AppBar.MenuButton"]: o,
|
|
2329
2329
|
["Layout.SearchBar"]: a,
|
|
2330
2330
|
["Layout.BackButton"]: l
|
|
2331
|
-
} = T("cms").getComponents(), { open: d } = Bt(), u =
|
|
2331
|
+
} = T("cms").getComponents(), { open: d } = Bt(), u = ua(), c = Zn(), f = H("appBar.height"), y = H("drawer.width", 280), {
|
|
2332
2332
|
start: S = null,
|
|
2333
2333
|
//: title = config('app.name', document.title),
|
|
2334
2334
|
end: b = null
|
|
@@ -2340,7 +2340,7 @@ const fa = Z(
|
|
|
2340
2340
|
height: f,
|
|
2341
2341
|
drawerWidth: y,
|
|
2342
2342
|
...t,
|
|
2343
|
-
children: /* @__PURE__ */ w(
|
|
2343
|
+
children: /* @__PURE__ */ w(kr, { children: [
|
|
2344
2344
|
(n && !d || !n && !c) && /* @__PURE__ */ i(o, {}),
|
|
2345
2345
|
!n && c && /* @__PURE__ */ i(l, {}),
|
|
2346
2346
|
n ? null : S,
|
|
@@ -2363,9 +2363,9 @@ const fa = Z(
|
|
|
2363
2363
|
children: [
|
|
2364
2364
|
u && /* @__PURE__ */ i(a, {}),
|
|
2365
2365
|
b || /* @__PURE__ */ i(
|
|
2366
|
-
|
|
2366
|
+
Tr,
|
|
2367
2367
|
{
|
|
2368
|
-
src: r ?
|
|
2368
|
+
src: r ? da : fa,
|
|
2369
2369
|
alt: "Luminix",
|
|
2370
2370
|
variant: "square",
|
|
2371
2371
|
sx: {
|
|
@@ -2382,7 +2382,7 @@ const fa = Z(
|
|
|
2382
2382
|
}
|
|
2383
2383
|
);
|
|
2384
2384
|
};
|
|
2385
|
-
function
|
|
2385
|
+
function ga(e) {
|
|
2386
2386
|
return /* @__PURE__ */ i(
|
|
2387
2387
|
q,
|
|
2388
2388
|
{
|
|
@@ -2411,7 +2411,7 @@ const an = (e, t) => ({
|
|
|
2411
2411
|
overflowX: "hidden",
|
|
2412
2412
|
width: `calc(${e.spacing(9)} + 1px)`,
|
|
2413
2413
|
[e.breakpoints.up("sm")]: { width: `calc(${e.spacing(10)} + 1px)` }
|
|
2414
|
-
}),
|
|
2414
|
+
}), ba = Z(
|
|
2415
2415
|
pn,
|
|
2416
2416
|
{ shouldForwardProp: (e) => !["open", "width"].includes(String(e)) }
|
|
2417
2417
|
)(({ theme: e, open: t, width: n }) => ({
|
|
@@ -2426,18 +2426,18 @@ const an = (e, t) => ({
|
|
|
2426
2426
|
...ln(e),
|
|
2427
2427
|
"& .MuiDrawer-paper": ln(e)
|
|
2428
2428
|
}
|
|
2429
|
-
})),
|
|
2429
|
+
})), ya = Z(
|
|
2430
2430
|
pn,
|
|
2431
2431
|
{ shouldForwardProp: (e) => e !== "width" }
|
|
2432
|
-
)(() => ({})),
|
|
2432
|
+
)(() => ({})), wa = Z("div")(({ theme: e }) => ({
|
|
2433
2433
|
display: "flex",
|
|
2434
2434
|
alignItems: "center",
|
|
2435
2435
|
justifyContent: "space-between",
|
|
2436
2436
|
padding: e.spacing(0, 1),
|
|
2437
2437
|
// necessary for content to be below app bar
|
|
2438
2438
|
...e.mixins.toolbar
|
|
2439
|
-
})),
|
|
2440
|
-
const t = Et(), n = v(), { open: r, handleDrawerClose: s } = Bt(), o = n ?
|
|
2439
|
+
})), Sa = (e) => {
|
|
2440
|
+
const t = Et(), n = v(), { open: r, handleDrawerClose: s } = Bt(), o = n ? ba : ya, a = H("drawer.width", 280), l = H("appBar.height"), d = T("cms").getComponent("RecursiveList"), u = T("cms").getMenuItems();
|
|
2441
2441
|
return /* @__PURE__ */ w(
|
|
2442
2442
|
o,
|
|
2443
2443
|
{
|
|
@@ -2454,7 +2454,7 @@ const an = (e, t) => ({
|
|
|
2454
2454
|
},
|
|
2455
2455
|
...e,
|
|
2456
2456
|
children: [
|
|
2457
|
-
/* @__PURE__ */ i(
|
|
2457
|
+
/* @__PURE__ */ i(wa, { style: { height: l }, children: /* @__PURE__ */ i(q, { onClick: s, children: t.direction === "ltr" ? /* @__PURE__ */ i(At, {}) : /* @__PURE__ */ i(Ct, {}) }) }),
|
|
2458
2458
|
/* @__PURE__ */ i(Re, {}),
|
|
2459
2459
|
/* @__PURE__ */ i(V, { sx: { flexGrow: 1, overflowY: "auto", overflowX: "hidden" }, children: /* @__PURE__ */ i(
|
|
2460
2460
|
d,
|
|
@@ -2467,7 +2467,7 @@ const an = (e, t) => ({
|
|
|
2467
2467
|
]
|
|
2468
2468
|
}
|
|
2469
2469
|
);
|
|
2470
|
-
},
|
|
2470
|
+
}, xa = () => {
|
|
2471
2471
|
const e = Gn(), t = H("breakpoint", "md"), n = Zn(), {
|
|
2472
2472
|
["Layout.BackButton"]: r
|
|
2473
2473
|
} = T("cms").getComponents();
|
|
@@ -2522,17 +2522,17 @@ const an = (e, t) => ({
|
|
|
2522
2522
|
},
|
|
2523
2523
|
setIsRelation: () => {
|
|
2524
2524
|
}
|
|
2525
|
-
}),
|
|
2525
|
+
}), Aa = (e) => {
|
|
2526
2526
|
if (!Array.isArray(e))
|
|
2527
2527
|
return e;
|
|
2528
2528
|
let t;
|
|
2529
2529
|
return K.isEmpty(e) ? t = "" : t = e[0], t;
|
|
2530
|
-
},
|
|
2530
|
+
}, Ca = (e) => {
|
|
2531
2531
|
if (Array.isArray(e))
|
|
2532
2532
|
return e;
|
|
2533
2533
|
let t;
|
|
2534
2534
|
return K.isEmpty(e) ? t = [] : t = [e, ""], t;
|
|
2535
|
-
},
|
|
2535
|
+
}, Ea = async (e, t, n) => {
|
|
2536
2536
|
const r = e.getSchema().relations[t], s = ye().make(r.model), o = s.getSchema().primaryKey, a = [];
|
|
2537
2537
|
for (const l of n) {
|
|
2538
2538
|
const { data: d } = await s.where(o, l).get();
|
|
@@ -2540,7 +2540,7 @@ const an = (e, t) => ({
|
|
|
2540
2540
|
}
|
|
2541
2541
|
return a;
|
|
2542
2542
|
};
|
|
2543
|
-
function
|
|
2543
|
+
function ka(e, t) {
|
|
2544
2544
|
const n = T("filter"), { Model: r, setColumnsFilter: s } = h.useContext(Lt), [o, a] = h.useState(t.key), [l, d] = h.useState(t.operator), [u, c] = h.useState(t.type), [f, y] = h.useState(t.value), [S, b] = h.useState(t.nullable), [m, g] = h.useState(t.is_relation), A = h.useMemo(() => n.getFilterableColumns(r), [r]), x = (R) => () => {
|
|
2545
2545
|
s((O) => O.filter((D, z) => z !== R));
|
|
2546
2546
|
}, E = async (R) => {
|
|
@@ -2563,12 +2563,12 @@ function Ea(e, t) {
|
|
|
2563
2563
|
switch (O) {
|
|
2564
2564
|
case "between":
|
|
2565
2565
|
case "notBetween":
|
|
2566
|
-
return
|
|
2566
|
+
return Ca(D);
|
|
2567
2567
|
case "null":
|
|
2568
2568
|
case "notNull":
|
|
2569
2569
|
return "1";
|
|
2570
2570
|
default:
|
|
2571
|
-
return
|
|
2571
|
+
return Aa(D);
|
|
2572
2572
|
}
|
|
2573
2573
|
}), d(O);
|
|
2574
2574
|
};
|
|
@@ -2604,10 +2604,10 @@ function Ea(e, t) {
|
|
|
2604
2604
|
const cn = async (e, t, n) => {
|
|
2605
2605
|
const r = e.getSchema().relations[t].model, { data: s } = await ye().make(r).get(), o = s.all().filter((u) => !n.find((c) => c.getKey() === u.getKey())), a = o.length, l = n.length, d = 15;
|
|
2606
2606
|
return a + l > d ? W([...n, ...o.slice(0, d - l)]) : W([...n, ...o]);
|
|
2607
|
-
},
|
|
2607
|
+
}, Ta = async (e, t, n = "", r) => {
|
|
2608
2608
|
const s = e.getSchema().relations[t], o = ye().make(s.model), a = o.getSchema().primaryKey, { data: l } = await o.searchBy(n).get();
|
|
2609
2609
|
return W([...r, ...l]).unique(a);
|
|
2610
|
-
},
|
|
2610
|
+
}, Da = () => {
|
|
2611
2611
|
const e = v(), t = te(), {
|
|
2612
2612
|
key: n,
|
|
2613
2613
|
value: r,
|
|
@@ -2616,10 +2616,10 @@ const cn = async (e, t, n) => {
|
|
|
2616
2616
|
() => o && u.count() === 0,
|
|
2617
2617
|
[o, u]
|
|
2618
2618
|
), b = async (m, g) => {
|
|
2619
|
-
d(g), K.isEmpty(g) || c(await
|
|
2619
|
+
d(g), K.isEmpty(g) || c(await Ta(t, n, g, W(f)));
|
|
2620
2620
|
};
|
|
2621
2621
|
return h.useEffect(() => {
|
|
2622
|
-
r.length > 0 && (async () => y(await
|
|
2622
|
+
r.length > 0 && (async () => y(await Ea(t, n, r)))();
|
|
2623
2623
|
}, []), h.useEffect(() => {
|
|
2624
2624
|
let m = !0;
|
|
2625
2625
|
if (S)
|
|
@@ -2629,7 +2629,7 @@ const cn = async (e, t, n) => {
|
|
|
2629
2629
|
}, [S]), h.useEffect(() => {
|
|
2630
2630
|
s(f.map((m) => m.getKey())), K.isEmpty(l) ? (async () => c(await cn(t, n, f)))() : c(W([]));
|
|
2631
2631
|
}, [f]), /* @__PURE__ */ i(
|
|
2632
|
-
|
|
2632
|
+
Dr,
|
|
2633
2633
|
{
|
|
2634
2634
|
sx: { width: e ? 377 : "100%" },
|
|
2635
2635
|
open: o,
|
|
@@ -2650,7 +2650,7 @@ const cn = async (e, t, n) => {
|
|
|
2650
2650
|
isOptionEqualToValue: (m, g) => m.getKey() === g.getKey(),
|
|
2651
2651
|
filterOptions: (m) => m,
|
|
2652
2652
|
renderInput: (m) => /* @__PURE__ */ i(
|
|
2653
|
-
|
|
2653
|
+
Ra,
|
|
2654
2654
|
{
|
|
2655
2655
|
params: m,
|
|
2656
2656
|
loading: S
|
|
@@ -2663,7 +2663,7 @@ const cn = async (e, t, n) => {
|
|
|
2663
2663
|
multiple: !0
|
|
2664
2664
|
}
|
|
2665
2665
|
);
|
|
2666
|
-
},
|
|
2666
|
+
}, Ra = ({ params: e, loading: t }) => {
|
|
2667
2667
|
const { t: n } = L();
|
|
2668
2668
|
return /* @__PURE__ */ i(
|
|
2669
2669
|
xe,
|
|
@@ -2673,7 +2673,7 @@ const cn = async (e, t, n) => {
|
|
|
2673
2673
|
InputProps: {
|
|
2674
2674
|
...e.InputProps,
|
|
2675
2675
|
endAdornment: /* @__PURE__ */ w(h.Fragment, { children: [
|
|
2676
|
-
t ? /* @__PURE__ */ i(
|
|
2676
|
+
t ? /* @__PURE__ */ i(Rr, { color: "inherit", size: 20 }) : null,
|
|
2677
2677
|
e.InputProps.endAdornment
|
|
2678
2678
|
] })
|
|
2679
2679
|
}
|
|
@@ -2704,11 +2704,11 @@ const cn = async (e, t, n) => {
|
|
|
2704
2704
|
sx: { width: n ? d : "100%" }
|
|
2705
2705
|
}
|
|
2706
2706
|
);
|
|
2707
|
-
},
|
|
2707
|
+
}, Oa = () => {
|
|
2708
2708
|
const e = v(), { value: t, setValue: n } = h.useContext(me);
|
|
2709
2709
|
return /* @__PURE__ */ w(B, { children: [
|
|
2710
2710
|
/* @__PURE__ */ i(
|
|
2711
|
-
|
|
2711
|
+
Or,
|
|
2712
2712
|
{
|
|
2713
2713
|
checked: t,
|
|
2714
2714
|
onChange: (s) => {
|
|
@@ -2772,13 +2772,13 @@ const cn = async (e, t, n) => {
|
|
|
2772
2772
|
case "datetime-local":
|
|
2773
2773
|
return /* @__PURE__ */ i(Ye, {});
|
|
2774
2774
|
case "autocomplete":
|
|
2775
|
-
return /* @__PURE__ */ i(
|
|
2775
|
+
return /* @__PURE__ */ i(Da, {});
|
|
2776
2776
|
case "boolean":
|
|
2777
|
-
return /* @__PURE__ */ i(
|
|
2777
|
+
return /* @__PURE__ */ i(Oa, {});
|
|
2778
2778
|
default:
|
|
2779
2779
|
return /* @__PURE__ */ i(Je, {});
|
|
2780
2780
|
}
|
|
2781
|
-
},
|
|
2781
|
+
}, Pa = ({ index: e, column: t }) => {
|
|
2782
2782
|
const { t: n } = L(), r = v(), s = H("breakpoint", "md"), o = T("filter"), a = h.useMemo(() => o.getMatchingOperators(t), [t]), {
|
|
2783
2783
|
columns: l,
|
|
2784
2784
|
key: d,
|
|
@@ -2794,7 +2794,7 @@ const cn = async (e, t, n) => {
|
|
|
2794
2794
|
handleKey: x,
|
|
2795
2795
|
handleOperator: E,
|
|
2796
2796
|
handleRemoveColumn: P
|
|
2797
|
-
} =
|
|
2797
|
+
} = ka(e, t), R = ["boolean"].includes(o.getInputType(y));
|
|
2798
2798
|
return /* @__PURE__ */ i(
|
|
2799
2799
|
me.Provider,
|
|
2800
2800
|
{
|
|
@@ -2981,7 +2981,7 @@ const cn = async (e, t, n) => {
|
|
|
2981
2981
|
const S = f == y.length - 1;
|
|
2982
2982
|
return /* @__PURE__ */ w(B, { children: [
|
|
2983
2983
|
/* @__PURE__ */ i(
|
|
2984
|
-
|
|
2984
|
+
Pa,
|
|
2985
2985
|
{
|
|
2986
2986
|
index: f,
|
|
2987
2987
|
column: c
|
|
@@ -3018,7 +3018,7 @@ const cn = async (e, t, n) => {
|
|
|
3018
3018
|
onClick: u,
|
|
3019
3019
|
color: "primary",
|
|
3020
3020
|
sx: { fontSize: 32 },
|
|
3021
|
-
children: /* @__PURE__ */ i(
|
|
3021
|
+
children: /* @__PURE__ */ i(Kr, { fontSize: "inherit" })
|
|
3022
3022
|
}
|
|
3023
3023
|
)
|
|
3024
3024
|
}
|
|
@@ -3046,7 +3046,7 @@ const cn = async (e, t, n) => {
|
|
|
3046
3046
|
]
|
|
3047
3047
|
}
|
|
3048
3048
|
);
|
|
3049
|
-
},
|
|
3049
|
+
}, va = (e, t) => {
|
|
3050
3050
|
const n = T("filter"), r = Sn.toObject(t), s = Object.keys(r).reduce((a, l) => (["where"].includes(l) && (a[l] = r[l]), a), {}), o = [];
|
|
3051
3051
|
return Object.entries(s).forEach(([, a]) => {
|
|
3052
3052
|
Object.entries(a).forEach(([l, d]) => {
|
|
@@ -3088,7 +3088,7 @@ const cn = async (e, t, n) => {
|
|
|
3088
3088
|
});
|
|
3089
3089
|
});
|
|
3090
3090
|
}), o;
|
|
3091
|
-
},
|
|
3091
|
+
}, Fa = (e) => {
|
|
3092
3092
|
const t = T("filter"), n = new URLSearchParams();
|
|
3093
3093
|
return e.forEach((r) => {
|
|
3094
3094
|
const { key: s, operator: o, value: a, type: l } = r;
|
|
@@ -3115,7 +3115,7 @@ const cn = async (e, t, n) => {
|
|
|
3115
3115
|
n.set(`where[${k.camel(s)}${d}]`, u);
|
|
3116
3116
|
}
|
|
3117
3117
|
}), n;
|
|
3118
|
-
},
|
|
3118
|
+
}, Ba = () => {
|
|
3119
3119
|
const { t: e } = L(), t = T("filter"), n = v(), r = te(), [s, o] = Y(), a = h.useMemo(() => "where" in Sn.toObject(s), [s]), [l, d] = h.useState(null), [u, c] = h.useState([]), f = !!l, y = h.useMemo(() => t.getFilterableColumns(r), [r]), S = (x) => {
|
|
3120
3120
|
d(x.currentTarget);
|
|
3121
3121
|
}, b = () => {
|
|
@@ -3124,7 +3124,7 @@ const cn = async (e, t, n) => {
|
|
|
3124
3124
|
}, 300);
|
|
3125
3125
|
}, m = () => {
|
|
3126
3126
|
g();
|
|
3127
|
-
const x =
|
|
3127
|
+
const x = Fa(u);
|
|
3128
3128
|
o(x, { replace: !0 }), b();
|
|
3129
3129
|
}, g = () => {
|
|
3130
3130
|
o((x) => {
|
|
@@ -3139,7 +3139,7 @@ const cn = async (e, t, n) => {
|
|
|
3139
3139
|
}, 300);
|
|
3140
3140
|
};
|
|
3141
3141
|
return h.useEffect(() => {
|
|
3142
|
-
const x =
|
|
3142
|
+
const x = va(y, s);
|
|
3143
3143
|
c(x);
|
|
3144
3144
|
}, [y, s, l]), /* @__PURE__ */ w(
|
|
3145
3145
|
Lt.Provider,
|
|
@@ -3169,13 +3169,13 @@ const cn = async (e, t, n) => {
|
|
|
3169
3169
|
color: "secondary",
|
|
3170
3170
|
variant: "dot",
|
|
3171
3171
|
invisible: !a,
|
|
3172
|
-
children: /* @__PURE__ */ i(
|
|
3172
|
+
children: /* @__PURE__ */ i($r, {})
|
|
3173
3173
|
}
|
|
3174
3174
|
)
|
|
3175
3175
|
}
|
|
3176
3176
|
),
|
|
3177
3177
|
n ? /* @__PURE__ */ i(
|
|
3178
|
-
|
|
3178
|
+
Pr,
|
|
3179
3179
|
{
|
|
3180
3180
|
id: "model-filter-popover",
|
|
3181
3181
|
open: f,
|
|
@@ -3275,7 +3275,7 @@ function Nt() {
|
|
|
3275
3275
|
function ae() {
|
|
3276
3276
|
return h.useContext(It);
|
|
3277
3277
|
}
|
|
3278
|
-
function
|
|
3278
|
+
function La(e) {
|
|
3279
3279
|
const [t, n] = h.useState(""), { selected: r } = Nt(), { t: s } = L(), o = Ft(), { massActions: a } = ae(), l = (u) => {
|
|
3280
3280
|
n(u.target.value);
|
|
3281
3281
|
};
|
|
@@ -3342,7 +3342,7 @@ function Ba(e) {
|
|
|
3342
3342
|
}
|
|
3343
3343
|
);
|
|
3344
3344
|
}
|
|
3345
|
-
const
|
|
3345
|
+
const Ia = () => {
|
|
3346
3346
|
const { handleDrawerOpen: e } = Bt();
|
|
3347
3347
|
return /* @__PURE__ */ i(
|
|
3348
3348
|
q,
|
|
@@ -3352,7 +3352,7 @@ const La = () => {
|
|
|
3352
3352
|
edge: "start",
|
|
3353
3353
|
onClick: e,
|
|
3354
3354
|
sx: { mr: { md: 2 } },
|
|
3355
|
-
children: /* @__PURE__ */ i(
|
|
3355
|
+
children: /* @__PURE__ */ i(Yr, {})
|
|
3356
3356
|
}
|
|
3357
3357
|
);
|
|
3358
3358
|
}, Ue = h.forwardRef(({ to: e, children: t, ...n }, r) => /* @__PURE__ */ i(
|
|
@@ -3367,12 +3367,12 @@ const La = () => {
|
|
|
3367
3367
|
}
|
|
3368
3368
|
));
|
|
3369
3369
|
Ue.displayName = "Link";
|
|
3370
|
-
const
|
|
3370
|
+
const Na = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */ i(B, { children: {
|
|
3371
3371
|
"« Previous": /* @__PURE__ */ i(At, {}),
|
|
3372
3372
|
"Next »": /* @__PURE__ */ i(Ct, {}),
|
|
3373
|
-
"Last »": /* @__PURE__ */ i(
|
|
3374
|
-
"« First": /* @__PURE__ */ i(
|
|
3375
|
-
}[e] || e }) : /* @__PURE__ */ i(B, { children: e }),
|
|
3373
|
+
"Last »": /* @__PURE__ */ i(Jr, {}),
|
|
3374
|
+
"« First": /* @__PURE__ */ i(Gr, {})
|
|
3375
|
+
}[e] || e }) : /* @__PURE__ */ i(B, { children: e }), Ma = ({ variant: e = "default", ...t }) => {
|
|
3376
3376
|
const n = e === "default", [r, s] = Y(), [o, a] = h.useState(r.get("page") || "1"), {
|
|
3377
3377
|
links: l,
|
|
3378
3378
|
meta: {
|
|
@@ -3392,7 +3392,7 @@ const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3392
3392
|
{ url: y, label: "« Previous", active: !1 },
|
|
3393
3393
|
{
|
|
3394
3394
|
element: /* @__PURE__ */ i(
|
|
3395
|
-
|
|
3395
|
+
ir,
|
|
3396
3396
|
{
|
|
3397
3397
|
onSubmit: m,
|
|
3398
3398
|
preventScrollReset: !0,
|
|
@@ -3457,13 +3457,13 @@ const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3457
3457
|
disabled: !A.url,
|
|
3458
3458
|
component: Ue,
|
|
3459
3459
|
to: A.url,
|
|
3460
|
-
children: /* @__PURE__ */ i(
|
|
3460
|
+
children: /* @__PURE__ */ i(Na, { label: A.label })
|
|
3461
3461
|
},
|
|
3462
3462
|
x
|
|
3463
3463
|
))
|
|
3464
3464
|
}
|
|
3465
3465
|
);
|
|
3466
|
-
},
|
|
3466
|
+
}, ja = () => {
|
|
3467
3467
|
const { t: e } = L(), {
|
|
3468
3468
|
meta: {
|
|
3469
3469
|
total: t = 0,
|
|
@@ -3476,7 +3476,7 @@ const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3476
3476
|
to: r,
|
|
3477
3477
|
total: t
|
|
3478
3478
|
}) });
|
|
3479
|
-
},
|
|
3479
|
+
}, Ua = () => {
|
|
3480
3480
|
const { t: e } = L(), {
|
|
3481
3481
|
meta: {
|
|
3482
3482
|
per_page: t = 15
|
|
@@ -3535,7 +3535,7 @@ const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3535
3535
|
}
|
|
3536
3536
|
);
|
|
3537
3537
|
};
|
|
3538
|
-
function
|
|
3538
|
+
function qa(e, t) {
|
|
3539
3539
|
const [n, r] = h.useState(!1);
|
|
3540
3540
|
return h.useEffect(() => {
|
|
3541
3541
|
const s = /* @__PURE__ */ new Set(), o = (l) => {
|
|
@@ -3548,25 +3548,25 @@ function Ua(e, t) {
|
|
|
3548
3548
|
};
|
|
3549
3549
|
}, [e, t]), n;
|
|
3550
3550
|
}
|
|
3551
|
-
const
|
|
3551
|
+
const _a = Z(xe)(({ theme: e }) => ({
|
|
3552
3552
|
"& .MuiInputBase-root": {
|
|
3553
3553
|
backgroundColor: e.palette.background.paper
|
|
3554
3554
|
}
|
|
3555
3555
|
// transition: 'width 250ms ease-in-out',
|
|
3556
|
-
})),
|
|
3556
|
+
})), Ha = ls.throttle((e, t) => {
|
|
3557
3557
|
t((n) => {
|
|
3558
3558
|
const r = new URLSearchParams(n);
|
|
3559
3559
|
return e ? r.set("q", e) : r.delete("q"), r;
|
|
3560
3560
|
});
|
|
3561
|
-
}, 500),
|
|
3561
|
+
}, 500), za = () => {
|
|
3562
3562
|
const [e, t] = Y(), n = e.get("q") || "", [r, s] = h.useState(n), [o, a] = h.useState(!1), l = h.useRef(null), { t: d } = L();
|
|
3563
3563
|
h.useEffect(() => {
|
|
3564
3564
|
s(n);
|
|
3565
3565
|
}, [n]);
|
|
3566
3566
|
const u = (y) => {
|
|
3567
|
-
s(y.target.value),
|
|
3567
|
+
s(y.target.value), Ha(y.target.value, t);
|
|
3568
3568
|
}, c = v();
|
|
3569
|
-
|
|
3569
|
+
qa(["Control", "/"], () => {
|
|
3570
3570
|
l.current.focus();
|
|
3571
3571
|
});
|
|
3572
3572
|
const f = c ? 300 : "calc(100vw - 58px)";
|
|
@@ -3595,7 +3595,7 @@ const qa = Z(xe)(({ theme: e }) => ({
|
|
|
3595
3595
|
},
|
|
3596
3596
|
unmountOnExit: !1,
|
|
3597
3597
|
children: /* @__PURE__ */ i(
|
|
3598
|
-
|
|
3598
|
+
_a,
|
|
3599
3599
|
{
|
|
3600
3600
|
placeholder: c ? `(Ctrl + /) ${d("Search...")}` : `${d("Search...")}`,
|
|
3601
3601
|
value: r,
|
|
@@ -3614,7 +3614,7 @@ const qa = Z(xe)(({ theme: e }) => ({
|
|
|
3614
3614
|
}
|
|
3615
3615
|
)
|
|
3616
3616
|
] });
|
|
3617
|
-
},
|
|
3617
|
+
}, Wa = ({ children: e, ...t }) => /* @__PURE__ */ i(
|
|
3618
3618
|
ee,
|
|
3619
3619
|
{
|
|
3620
3620
|
sx: { width: "1px" },
|
|
@@ -3622,7 +3622,7 @@ const qa = Z(xe)(({ theme: e }) => ({
|
|
|
3622
3622
|
...t,
|
|
3623
3623
|
children: e
|
|
3624
3624
|
}
|
|
3625
|
-
),
|
|
3625
|
+
), Va = () => {
|
|
3626
3626
|
const { t: e } = L(), [t, n] = Y(), {
|
|
3627
3627
|
columns: r,
|
|
3628
3628
|
Model: s
|
|
@@ -3652,7 +3652,7 @@ const qa = Z(xe)(({ theme: e }) => ({
|
|
|
3652
3652
|
color: "secondary",
|
|
3653
3653
|
variant: "dot",
|
|
3654
3654
|
invisible: !a,
|
|
3655
|
-
children: /* @__PURE__ */ i(
|
|
3655
|
+
children: /* @__PURE__ */ i(Zr, {})
|
|
3656
3656
|
}
|
|
3657
3657
|
) }),
|
|
3658
3658
|
/* @__PURE__ */ w(ht, { open: y, onClose: m, fullWidth: !0, children: [
|
|
@@ -3705,7 +3705,7 @@ const qa = Z(xe)(({ theme: e }) => ({
|
|
|
3705
3705
|
control: /* @__PURE__ */ i(_e, {}),
|
|
3706
3706
|
label: /* @__PURE__ */ w(B, { children: [
|
|
3707
3707
|
e("Ascending"),
|
|
3708
|
-
/* @__PURE__ */ i(
|
|
3708
|
+
/* @__PURE__ */ i(Xr, {})
|
|
3709
3709
|
] })
|
|
3710
3710
|
}
|
|
3711
3711
|
),
|
|
@@ -3716,7 +3716,7 @@ const qa = Z(xe)(({ theme: e }) => ({
|
|
|
3716
3716
|
control: /* @__PURE__ */ i(_e, {}),
|
|
3717
3717
|
label: /* @__PURE__ */ w(B, { children: [
|
|
3718
3718
|
e("Descending"),
|
|
3719
|
-
/* @__PURE__ */ i(
|
|
3719
|
+
/* @__PURE__ */ i(Qr, {})
|
|
3720
3720
|
] })
|
|
3721
3721
|
}
|
|
3722
3722
|
)
|
|
@@ -3730,7 +3730,7 @@ const qa = Z(xe)(({ theme: e }) => ({
|
|
|
3730
3730
|
] })
|
|
3731
3731
|
] })
|
|
3732
3732
|
] });
|
|
3733
|
-
},
|
|
3733
|
+
}, Ka = ({ items: e, loading: t, children: n, error: r }) => {
|
|
3734
3734
|
const s = te(), o = h.useMemo(() => W([]), [s, e]), [a] = Y(), l = a.get("tab") ?? "all", d = h.useMemo(() => [
|
|
3735
3735
|
{
|
|
3736
3736
|
key: s.getSchema().labeledBy,
|
|
@@ -3751,21 +3751,21 @@ const qa = Z(xe)(({ theme: e }) => ({
|
|
|
3751
3751
|
Model: s
|
|
3752
3752
|
};
|
|
3753
3753
|
return /* @__PURE__ */ i(It.Provider, { value: b, children: n });
|
|
3754
|
-
},
|
|
3754
|
+
}, $a = ({
|
|
3755
3755
|
items: e,
|
|
3756
3756
|
loading: t,
|
|
3757
3757
|
error: n,
|
|
3758
3758
|
children: r,
|
|
3759
3759
|
...s
|
|
3760
3760
|
}) => /* @__PURE__ */ i(
|
|
3761
|
-
|
|
3761
|
+
Ka,
|
|
3762
3762
|
{
|
|
3763
3763
|
items: e,
|
|
3764
3764
|
loading: t,
|
|
3765
3765
|
error: n,
|
|
3766
|
-
children: /* @__PURE__ */ i(
|
|
3766
|
+
children: /* @__PURE__ */ i(vr, { component: yt, children: /* @__PURE__ */ i(Fr, { ...s, children: r }) })
|
|
3767
3767
|
}
|
|
3768
|
-
),
|
|
3768
|
+
), Ya = ({ children: e, ...t }) => {
|
|
3769
3769
|
const {
|
|
3770
3770
|
massActions: n,
|
|
3771
3771
|
columns: r,
|
|
@@ -3785,7 +3785,7 @@ const qa = Z(xe)(({ theme: e }) => ({
|
|
|
3785
3785
|
return x.set("order_by", `${g}:asc`), x;
|
|
3786
3786
|
});
|
|
3787
3787
|
};
|
|
3788
|
-
return /* @__PURE__ */ w(
|
|
3788
|
+
return /* @__PURE__ */ w(Br, { ...t, children: [
|
|
3789
3789
|
e,
|
|
3790
3790
|
o && /* @__PURE__ */ w(fe, { children: [
|
|
3791
3791
|
n.length > 0 && /* @__PURE__ */ i(f, { children: /* @__PURE__ */ i(
|
|
@@ -3803,7 +3803,7 @@ const qa = Z(xe)(({ theme: e }) => ({
|
|
|
3803
3803
|
sortDirection: x && S === g && b || !1,
|
|
3804
3804
|
...E,
|
|
3805
3805
|
children: /* @__PURE__ */ w(
|
|
3806
|
-
|
|
3806
|
+
Lr,
|
|
3807
3807
|
{
|
|
3808
3808
|
active: x && S === g,
|
|
3809
3809
|
direction: b,
|
|
@@ -3820,7 +3820,7 @@ const qa = Z(xe)(({ theme: e }) => ({
|
|
|
3820
3820
|
/* @__PURE__ */ i(f, {})
|
|
3821
3821
|
] })
|
|
3822
3822
|
] });
|
|
3823
|
-
},
|
|
3823
|
+
}, Ja = () => {
|
|
3824
3824
|
const {
|
|
3825
3825
|
massActions: e,
|
|
3826
3826
|
columns: t
|
|
@@ -3847,7 +3847,7 @@ const qa = Z(xe)(({ theme: e }) => ({
|
|
|
3847
3847
|
)) }),
|
|
3848
3848
|
/* @__PURE__ */ i(r, { children: /* @__PURE__ */ i(q, { children: /* @__PURE__ */ i(wn, {}) }) })
|
|
3849
3849
|
] }, l)) });
|
|
3850
|
-
},
|
|
3850
|
+
}, Ga = ({ children: e, ...t }) => {
|
|
3851
3851
|
const n = te(), { t: r } = L(), {
|
|
3852
3852
|
items: s,
|
|
3853
3853
|
loading: o,
|
|
@@ -3855,8 +3855,8 @@ const qa = Z(xe)(({ theme: e }) => ({
|
|
|
3855
3855
|
} = ae(), {
|
|
3856
3856
|
["ModelIndex.StaticActions"]: l
|
|
3857
3857
|
} = T("cms").getComponents(), d = h.isValidElement(e) ? e : (s || W([])).map(e);
|
|
3858
|
-
return /* @__PURE__ */ w(
|
|
3859
|
-
o && /* @__PURE__ */ i(
|
|
3858
|
+
return /* @__PURE__ */ w(Ir, { ...t, children: [
|
|
3859
|
+
o && /* @__PURE__ */ i(Ja, {}),
|
|
3860
3860
|
d,
|
|
3861
3861
|
s && !s.count() && /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ w(ee, { colSpan: a, sx: { textAlign: "center", py: 10 }, children: [
|
|
3862
3862
|
/* @__PURE__ */ i($, { children: r("No :model found", {
|
|
@@ -3867,19 +3867,19 @@ const qa = Z(xe)(({ theme: e }) => ({
|
|
|
3867
3867
|
] }) })
|
|
3868
3868
|
] });
|
|
3869
3869
|
};
|
|
3870
|
-
class
|
|
3870
|
+
class Za {
|
|
3871
3871
|
getFacadeAccessor() {
|
|
3872
3872
|
return "cms";
|
|
3873
3873
|
}
|
|
3874
3874
|
}
|
|
3875
|
-
const I =
|
|
3875
|
+
const I = cs(Za, rr), de = Z($)(() => ({
|
|
3876
3876
|
whiteSpace: "nowrap",
|
|
3877
3877
|
overflow: "hidden",
|
|
3878
3878
|
textOverflow: "ellipsis",
|
|
3879
3879
|
"& label": {
|
|
3880
3880
|
fontWeight: "bold"
|
|
3881
3881
|
}
|
|
3882
|
-
})),
|
|
3882
|
+
})), Xa = ({ content: e }) => ["string", "number"].includes(typeof e) ? /* @__PURE__ */ i(de, { children: e }) : e instanceof Date ? /* @__PURE__ */ i(de, { children: e.toLocaleString(se("app.locale", "en")) }) : typeof e == "object" && !h.isValidElement(e) ? /* @__PURE__ */ i(de, { children: JSON.stringify(e) }) : /* @__PURE__ */ i(h.Fragment, { children: e }), Qa = ({ label: e, content: t }) => ["string", "number"].includes(typeof t) ? /* @__PURE__ */ w(de, { children: [
|
|
3883
3883
|
/* @__PURE__ */ w("label", { children: [
|
|
3884
3884
|
e,
|
|
3885
3885
|
":"
|
|
@@ -3906,7 +3906,7 @@ const I = ls(Ga), de = Z($)(() => ({
|
|
|
3906
3906
|
] }) }),
|
|
3907
3907
|
" ",
|
|
3908
3908
|
t
|
|
3909
|
-
] }),
|
|
3909
|
+
] }), ei = ({ item: e, ...t }) => {
|
|
3910
3910
|
const n = v(), r = ft(), s = te(), { massActions: o, columns: a } = ae(), l = h.useMemo(() => a.map((y) => ({
|
|
3911
3911
|
...y,
|
|
3912
3912
|
content: I[`model${k.studly(e.getType())}Get${k.studly(y.key)}Content`](e.getAttribute(y.key), e)
|
|
@@ -3940,7 +3940,7 @@ const I = ls(Ga), de = Z($)(() => ({
|
|
|
3940
3940
|
e.deletedAt || r(`/${k.kebab(s.plural())}/${e.getKey()}`);
|
|
3941
3941
|
},
|
|
3942
3942
|
children: /* @__PURE__ */ i(
|
|
3943
|
-
|
|
3943
|
+
Xa,
|
|
3944
3944
|
{
|
|
3945
3945
|
label: S,
|
|
3946
3946
|
content: m
|
|
@@ -3956,14 +3956,14 @@ const I = ls(Ga), de = Z($)(() => ({
|
|
|
3956
3956
|
onClick: () => {
|
|
3957
3957
|
e.deletedAt || r(`/${k.kebab(s.plural())}/${e.getKey()}`);
|
|
3958
3958
|
},
|
|
3959
|
-
children: l.map(({ key: y, ...S }) => /* @__PURE__ */ i(
|
|
3959
|
+
children: l.map(({ key: y, ...S }) => /* @__PURE__ */ i(Qa, { ...S }, y))
|
|
3960
3960
|
}
|
|
3961
3961
|
),
|
|
3962
3962
|
/* @__PURE__ */ i(d, { children: /* @__PURE__ */ i(u, { item: e }) })
|
|
3963
3963
|
]
|
|
3964
3964
|
}
|
|
3965
3965
|
);
|
|
3966
|
-
},
|
|
3966
|
+
}, ti = ({ children: e, ...t }) => {
|
|
3967
3967
|
const {
|
|
3968
3968
|
columnCount: n
|
|
3969
3969
|
} = ae(), r = v(), s = H("breakpoint", "md"), {
|
|
@@ -3971,7 +3971,7 @@ const I = ls(Ga), de = Z($)(() => ({
|
|
|
3971
3971
|
["ModelIndex.PaginationDetails"]: a,
|
|
3972
3972
|
["ModelIndex.PerPageSwitch"]: l
|
|
3973
3973
|
} = T("cms").getComponents();
|
|
3974
|
-
return /* @__PURE__ */ w(
|
|
3974
|
+
return /* @__PURE__ */ w(Nr, { ...t, children: [
|
|
3975
3975
|
/* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(ee, { colSpan: n, children: /* @__PURE__ */ w(
|
|
3976
3976
|
M,
|
|
3977
3977
|
{
|
|
@@ -4006,7 +4006,7 @@ const I = ls(Ga), de = Z($)(() => ({
|
|
|
4006
4006
|
) }) }),
|
|
4007
4007
|
e
|
|
4008
4008
|
] });
|
|
4009
|
-
},
|
|
4009
|
+
}, ni = () => {
|
|
4010
4010
|
const {
|
|
4011
4011
|
columnCount: e
|
|
4012
4012
|
} = ae(), {
|
|
@@ -4056,7 +4056,7 @@ const I = ls(Ga), de = Z($)(() => ({
|
|
|
4056
4056
|
}
|
|
4057
4057
|
) }) });
|
|
4058
4058
|
};
|
|
4059
|
-
function
|
|
4059
|
+
function ri() {
|
|
4060
4060
|
const e = te(), { t } = L(), [n, r] = Y(), s = n.get("tab") || "all", o = (d, u) => {
|
|
4061
4061
|
r(() => {
|
|
4062
4062
|
const c = new URLSearchParams();
|
|
@@ -4068,7 +4068,7 @@ function ni() {
|
|
|
4068
4068
|
a
|
|
4069
4069
|
);
|
|
4070
4070
|
return l.length === 0 ? null : /* @__PURE__ */ i(V, { sx: { maxWidth: { xs: 320, sm: 480 }, bgcolor: "background.paper" }, children: /* @__PURE__ */ w(
|
|
4071
|
-
|
|
4071
|
+
Mr,
|
|
4072
4072
|
{
|
|
4073
4073
|
value: s,
|
|
4074
4074
|
onChange: o,
|
|
@@ -4096,13 +4096,13 @@ function ni() {
|
|
|
4096
4096
|
}
|
|
4097
4097
|
) });
|
|
4098
4098
|
}
|
|
4099
|
-
function
|
|
4099
|
+
function si(e) {
|
|
4100
4100
|
const {
|
|
4101
4101
|
parts: t,
|
|
4102
4102
|
...n
|
|
4103
4103
|
} = e;
|
|
4104
4104
|
return /* @__PURE__ */ w(
|
|
4105
|
-
|
|
4105
|
+
jr,
|
|
4106
4106
|
{
|
|
4107
4107
|
"aria-label": "breadcrumb",
|
|
4108
4108
|
...n,
|
|
@@ -4146,7 +4146,7 @@ const Xn = ({
|
|
|
4146
4146
|
...r
|
|
4147
4147
|
}) => {
|
|
4148
4148
|
const [s, o] = h.useState(null), [a, l] = h.useState(null), [d, u] = h.useState({}), c = H("drawer.width", 280), f = T("cms").getComponent("RecursiveMenu");
|
|
4149
|
-
return /* @__PURE__ */ w(
|
|
4149
|
+
return /* @__PURE__ */ w(Ur, { ...r, children: [
|
|
4150
4150
|
t.map((y) => {
|
|
4151
4151
|
const {
|
|
4152
4152
|
text: S,
|
|
@@ -4158,13 +4158,13 @@ const Xn = ({
|
|
|
4158
4158
|
onClick: E
|
|
4159
4159
|
} = y;
|
|
4160
4160
|
return m || /* @__PURE__ */ w(
|
|
4161
|
-
|
|
4161
|
+
qr,
|
|
4162
4162
|
{
|
|
4163
4163
|
disablePadding: !0,
|
|
4164
4164
|
sx: { display: "block" },
|
|
4165
4165
|
children: [
|
|
4166
4166
|
/* @__PURE__ */ w(
|
|
4167
|
-
|
|
4167
|
+
_r,
|
|
4168
4168
|
{
|
|
4169
4169
|
sx: {
|
|
4170
4170
|
minHeight: 48,
|
|
@@ -4212,7 +4212,7 @@ const Xn = ({
|
|
|
4212
4212
|
}
|
|
4213
4213
|
),
|
|
4214
4214
|
!e && /* @__PURE__ */ i(gn, { primary: S }),
|
|
4215
|
-
!e && A && (d[g] ? /* @__PURE__ */ i(
|
|
4215
|
+
!e && A && (d[g] ? /* @__PURE__ */ i(es, {}) : /* @__PURE__ */ i(ts, {}))
|
|
4216
4216
|
]
|
|
4217
4217
|
}
|
|
4218
4218
|
),
|
|
@@ -4442,11 +4442,11 @@ const Xn = ({
|
|
|
4442
4442
|
ce(n)(l);
|
|
4443
4443
|
}
|
|
4444
4444
|
}
|
|
4445
|
-
},
|
|
4445
|
+
}, oi = {
|
|
4446
4446
|
create: (e) => ({ navigate: t }) => {
|
|
4447
4447
|
t(`/${k.kebab(e.plural())}/create`);
|
|
4448
4448
|
}
|
|
4449
|
-
},
|
|
4449
|
+
}, ai = ({ item: e }) => {
|
|
4450
4450
|
const t = Ft(), [n] = Y(), r = n.get("tab") ?? "all", s = h.useMemo(() => T("cms").getInstanceActions(e.constructor, r), [e, r]), [o, a] = h.useState(null), l = !!o, d = (c) => {
|
|
4451
4451
|
a(c.currentTarget);
|
|
4452
4452
|
}, u = () => {
|
|
@@ -4493,7 +4493,7 @@ const Xn = ({
|
|
|
4493
4493
|
)
|
|
4494
4494
|
] });
|
|
4495
4495
|
};
|
|
4496
|
-
class
|
|
4496
|
+
class ii {
|
|
4497
4497
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4498
4498
|
getComponents() {
|
|
4499
4499
|
return this.componentMap({});
|
|
@@ -4533,8 +4533,8 @@ class ai {
|
|
|
4533
4533
|
);
|
|
4534
4534
|
}
|
|
4535
4535
|
}
|
|
4536
|
-
const
|
|
4537
|
-
class
|
|
4536
|
+
const li = xn(ii), be = (e) => !(typeof e > "u" || e === null || K.isEmpty(e));
|
|
4537
|
+
class ci {
|
|
4538
4538
|
getInputType(t) {
|
|
4539
4539
|
switch (t) {
|
|
4540
4540
|
case "int":
|
|
@@ -4636,9 +4636,9 @@ class li {
|
|
|
4636
4636
|
}).includes(!0));
|
|
4637
4637
|
}
|
|
4638
4638
|
}
|
|
4639
|
-
const
|
|
4639
|
+
const ui = xn(ci), Fe = class Fe extends An {
|
|
4640
4640
|
register() {
|
|
4641
|
-
this.app.singleton("cms", () => new
|
|
4641
|
+
this.app.singleton("cms", () => new li()), this.app.singleton("filter", () => new ui()), this.app.once("booting", () => {
|
|
4642
4642
|
this.bootModels();
|
|
4643
4643
|
});
|
|
4644
4644
|
}
|
|
@@ -4650,50 +4650,50 @@ const ci = xn(li), Fe = class Fe extends An {
|
|
|
4650
4650
|
"model",
|
|
4651
4651
|
(t, n) => class extends t {
|
|
4652
4652
|
static icon() {
|
|
4653
|
-
return n === "user" ? /* @__PURE__ */ i(
|
|
4653
|
+
return n === "user" ? /* @__PURE__ */ i(ns, {}) : /* @__PURE__ */ i(rs, {});
|
|
4654
4654
|
}
|
|
4655
4655
|
},
|
|
4656
4656
|
0
|
|
4657
4657
|
);
|
|
4658
4658
|
}
|
|
4659
4659
|
bootRoutes() {
|
|
4660
|
-
I.reducer("cmsRoutes",
|
|
4660
|
+
I.reducer("cmsRoutes", bs, 0), sr.reducer("domRouterOptions", (t) => ({
|
|
4661
4661
|
...t,
|
|
4662
4662
|
basename: re.get("luminix.admin.url", "/admin")
|
|
4663
4663
|
}));
|
|
4664
4664
|
}
|
|
4665
4665
|
bootComponents() {
|
|
4666
4666
|
I.reducer("componentMap", () => ({
|
|
4667
|
-
Layout:
|
|
4668
|
-
Dashboard:
|
|
4669
|
-
ModelIndex:
|
|
4670
|
-
ModelItem:
|
|
4671
|
-
Error:
|
|
4672
|
-
DesktopPageTitle:
|
|
4667
|
+
Layout: xs,
|
|
4668
|
+
Dashboard: ys,
|
|
4669
|
+
ModelIndex: Cs,
|
|
4670
|
+
ModelItem: sa,
|
|
4671
|
+
Error: ws,
|
|
4672
|
+
DesktopPageTitle: xa,
|
|
4673
4673
|
RecursiveList: Xn,
|
|
4674
4674
|
RecursiveMenu: Qn,
|
|
4675
|
-
Breadcrumbs:
|
|
4676
|
-
"Layout.AppBar":
|
|
4677
|
-
"Layout.Drawer":
|
|
4678
|
-
"Layout.AppBar.MenuButton":
|
|
4679
|
-
"Layout.SearchBar":
|
|
4680
|
-
"Layout.BackButton":
|
|
4681
|
-
"ModelIndex.Filter":
|
|
4682
|
-
"ModelIndex.InstanceActions":
|
|
4683
|
-
"ModelIndex.MassActions":
|
|
4684
|
-
"ModelIndex.Pagination":
|
|
4685
|
-
"ModelIndex.PaginationDetails":
|
|
4686
|
-
"ModelIndex.PerPageSwitch":
|
|
4687
|
-
"ModelIndex.Sort":
|
|
4688
|
-
"ModelIndex.StaticActions":
|
|
4689
|
-
"ModelIndex.Table":
|
|
4690
|
-
"ModelIndex.Table.TableHead":
|
|
4691
|
-
"ModelIndex.Table.TableBody":
|
|
4692
|
-
"ModelIndex.Table.TableFooter":
|
|
4693
|
-
"ModelIndex.Table.TableToolbar":
|
|
4694
|
-
"ModelIndex.Table.TableBody.TableRow":
|
|
4695
|
-
"ModelIndex.Table.ShrinkedCell":
|
|
4696
|
-
"ModelIndex.Tabs":
|
|
4675
|
+
Breadcrumbs: si,
|
|
4676
|
+
"Layout.AppBar": ma,
|
|
4677
|
+
"Layout.Drawer": Sa,
|
|
4678
|
+
"Layout.AppBar.MenuButton": Ia,
|
|
4679
|
+
"Layout.SearchBar": za,
|
|
4680
|
+
"Layout.BackButton": ga,
|
|
4681
|
+
"ModelIndex.Filter": Ba,
|
|
4682
|
+
"ModelIndex.InstanceActions": ai,
|
|
4683
|
+
"ModelIndex.MassActions": La,
|
|
4684
|
+
"ModelIndex.Pagination": Ma,
|
|
4685
|
+
"ModelIndex.PaginationDetails": ja,
|
|
4686
|
+
"ModelIndex.PerPageSwitch": Ua,
|
|
4687
|
+
"ModelIndex.Sort": Va,
|
|
4688
|
+
"ModelIndex.StaticActions": ca,
|
|
4689
|
+
"ModelIndex.Table": $a,
|
|
4690
|
+
"ModelIndex.Table.TableHead": Ya,
|
|
4691
|
+
"ModelIndex.Table.TableBody": Ga,
|
|
4692
|
+
"ModelIndex.Table.TableFooter": ti,
|
|
4693
|
+
"ModelIndex.Table.TableToolbar": ni,
|
|
4694
|
+
"ModelIndex.Table.TableBody.TableRow": ei,
|
|
4695
|
+
"ModelIndex.Table.ShrinkedCell": Wa,
|
|
4696
|
+
"ModelIndex.Tabs": ri
|
|
4697
4697
|
}), 0);
|
|
4698
4698
|
}
|
|
4699
4699
|
bootMenu() {
|
|
@@ -4703,7 +4703,7 @@ const ci = xn(li), Fe = class Fe extends An {
|
|
|
4703
4703
|
key: "dashboard",
|
|
4704
4704
|
text: "Dashboard",
|
|
4705
4705
|
to: "/",
|
|
4706
|
-
icon: /* @__PURE__ */ i(
|
|
4706
|
+
icon: /* @__PURE__ */ i(ss, {})
|
|
4707
4707
|
},
|
|
4708
4708
|
...Object.entries(n).sort(([r], [s]) => r.localeCompare(s)).map(([r, s]) => ({
|
|
4709
4709
|
key: r,
|
|
@@ -4784,15 +4784,15 @@ const ci = xn(li), Fe = class Fe extends An {
|
|
|
4784
4784
|
{
|
|
4785
4785
|
key: "create",
|
|
4786
4786
|
label: `Create ${n.singular()}`,
|
|
4787
|
-
callback:
|
|
4788
|
-
icon: /* @__PURE__ */ i(
|
|
4787
|
+
callback: oi.create(n),
|
|
4788
|
+
icon: /* @__PURE__ */ i(os, {})
|
|
4789
4789
|
}
|
|
4790
4790
|
], 0);
|
|
4791
4791
|
}
|
|
4792
4792
|
};
|
|
4793
4793
|
jt(Fe, "applyUserDefaults", !0);
|
|
4794
4794
|
let dt = Fe;
|
|
4795
|
-
class
|
|
4795
|
+
class di extends An {
|
|
4796
4796
|
register() {
|
|
4797
4797
|
this.app.once("booting", () => {
|
|
4798
4798
|
this.initI18Next(), this.translateModelNames();
|
|
@@ -4802,7 +4802,7 @@ class ui extends An {
|
|
|
4802
4802
|
this.translateModelColumns(), this.translateMenuEntries(), this.translateInstanceActions(), this.translateMassActions(), this.translateFormLabels(), this.translateStaticActions();
|
|
4803
4803
|
}
|
|
4804
4804
|
initI18Next() {
|
|
4805
|
-
G.use(
|
|
4805
|
+
G.use(Wr).init({
|
|
4806
4806
|
lng: re.get("app.locale", "en"),
|
|
4807
4807
|
fallbackLng: re.get("app.fallback_locale", "en"),
|
|
4808
4808
|
resources: {
|
|
@@ -4890,7 +4890,7 @@ class ui extends An {
|
|
|
4890
4890
|
);
|
|
4891
4891
|
}
|
|
4892
4892
|
translateFormLabels() {
|
|
4893
|
-
|
|
4893
|
+
ur.reducer(
|
|
4894
4894
|
"getDefaultInputProps",
|
|
4895
4895
|
(t) => (Array.isArray(t) ? t.map((n) => {
|
|
4896
4896
|
n != null && n.label && (n.label = G.t(n.label));
|
|
@@ -4899,7 +4899,7 @@ class ui extends An {
|
|
|
4899
4899
|
);
|
|
4900
4900
|
}
|
|
4901
4901
|
}
|
|
4902
|
-
const
|
|
4902
|
+
const fi = {
|
|
4903
4903
|
palette: {
|
|
4904
4904
|
primary: {
|
|
4905
4905
|
main: "#1d9798"
|
|
@@ -4908,27 +4908,27 @@ const di = {
|
|
|
4908
4908
|
main: "#fa510c"
|
|
4909
4909
|
}
|
|
4910
4910
|
}
|
|
4911
|
-
},
|
|
4912
|
-
theme: e =
|
|
4911
|
+
}, zi = ({
|
|
4912
|
+
theme: e = fi,
|
|
4913
4913
|
providers: t = [],
|
|
4914
4914
|
...n
|
|
4915
4915
|
}) => {
|
|
4916
|
-
const r = Be("(prefers-color-scheme: dark)"), s = h.useMemo(() =>
|
|
4916
|
+
const r = Be("(prefers-color-scheme: dark)"), s = h.useMemo(() => as({
|
|
4917
4917
|
...e,
|
|
4918
4918
|
palette: {
|
|
4919
4919
|
...e.palette,
|
|
4920
4920
|
mode: r ? "dark" : "light"
|
|
4921
4921
|
}
|
|
4922
4922
|
}), [e, r]);
|
|
4923
|
-
return /* @__PURE__ */ w(
|
|
4924
|
-
/* @__PURE__ */ i(
|
|
4923
|
+
return /* @__PURE__ */ w(is, { theme: s, children: [
|
|
4924
|
+
/* @__PURE__ */ i(Hr, {}),
|
|
4925
4925
|
/* @__PURE__ */ i(
|
|
4926
|
-
|
|
4926
|
+
dr,
|
|
4927
4927
|
{
|
|
4928
4928
|
routes: (o) => o.make("cms").getRoutes(),
|
|
4929
4929
|
providers: [
|
|
4930
4930
|
dt,
|
|
4931
|
-
|
|
4931
|
+
di,
|
|
4932
4932
|
...t
|
|
4933
4933
|
],
|
|
4934
4934
|
...n
|
|
@@ -4937,26 +4937,26 @@ const di = {
|
|
|
4937
4937
|
] });
|
|
4938
4938
|
};
|
|
4939
4939
|
export {
|
|
4940
|
-
dt as
|
|
4941
|
-
|
|
4942
|
-
|
|
4940
|
+
dt as CmsServiceProvider,
|
|
4941
|
+
ps as DialogProvider,
|
|
4942
|
+
ds as LayoutProvider,
|
|
4943
4943
|
Ue as Link,
|
|
4944
|
-
|
|
4944
|
+
zi as LuminixCms,
|
|
4945
4945
|
ze as ModelProvider,
|
|
4946
|
-
|
|
4946
|
+
ms as NotificationProvider,
|
|
4947
4947
|
Ft as useActionEvent,
|
|
4948
|
-
|
|
4948
|
+
Es as useBackButton,
|
|
4949
4949
|
te as useCurrentModel,
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4950
|
+
aa as useDialog,
|
|
4951
|
+
oa as useDisplaceNotifications,
|
|
4952
|
+
ra as useHandleError,
|
|
4953
|
+
ua as useHasSearch,
|
|
4954
4954
|
v as useIsDesktopMode,
|
|
4955
4955
|
H as useLayoutConfig,
|
|
4956
4956
|
Bt as useMenu,
|
|
4957
4957
|
vt as useNotify,
|
|
4958
4958
|
Gn as usePageTitle,
|
|
4959
|
-
|
|
4959
|
+
As as useSearch,
|
|
4960
4960
|
Nt as useSelection,
|
|
4961
4961
|
Tt as useSetPageTitle,
|
|
4962
4962
|
ae as useTable
|