@firecms/core 3.0.0-canary.71 → 3.0.0-canary.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,10 +1,10 @@
1
- import { jsx as n, jsxs as v, Fragment as M } from "react/jsx-runtime";
1
+ import { jsx as n, jsxs as v, Fragment as O } from "react/jsx-runtime";
2
2
  import * as kt from "react";
3
- import S, { useRef as ce, useEffect as O, useContext as $e, useCallback as x, useMemo as he, useState as P, createElement as xa, createRef as Ea, createContext as Ca, forwardRef as Ba, useLayoutEffect as Kr, useDeferredValue as Sa } from "react";
3
+ import S, { useRef as ce, useEffect as M, useContext as $e, useCallback as x, useMemo as he, useState as P, createElement as xa, createRef as Ea, createContext as Ca, forwardRef as Ba, useLayoutEffect as ei, useDeferredValue as Sa } from "react";
4
4
  import { SnackbarProvider as Ia, useSnackbar as Na } from "notistack";
5
5
  import Ji from "object-hash";
6
- import { useCreateFormex as Sn, Formex as In, setIn as ei, Field as Nn, getIn as jt, useFormex as pi } from "@firecms/formex";
7
- import { getColorSchemeForSeed as Fn, CHIP_COLORS as Fa, Tooltip as ke, ErrorIcon as Pn, Typography as L, CircleIcon as Qn, FunctionsIcon as Pa, iconKeys as fi, coolIconKeys as ti, Icon as hi, IconButton as de, ContentCopyIcon as vr, OpenInNewIcon as Ht, DescriptionIcon as Qa, Skeleton as Ue, Chip as gi, cls as U, defaultBorderMixin as Se, KeyboardTabIcon as Ai, Checkbox as Zt, Markdown as bi, TextareaAutosize as Da, MultiSelect as Dn, MultiSelectItem as Rn, Select as nt, SelectItem as ot, BooleanSwitch as Ra, DateTimeField as Xt, paperMixin as kr, ErrorOutlineIcon as Ta, EditIcon as Oa, Button as ge, RemoveCircleIcon as Ma, Menu as St, MoreVertIcon as Tn, MenuItem as Pe, CircularProgress as _t, SearchBar as yi, Badge as Hi, ArrowUpwardIcon as Vr, Popover as wi, FilterListIcon as za, AssignmentIcon as Va, CenteredView as sr, Label as vi, TextField as xt, ClearIcon as Yt, BooleanSwitchWithLabel as _r, useOutsideAlerter as On, Dialog as ki, DialogContent as _i, DialogActions as It, FileCopyIcon as Ga, ArchiveIcon as ja, DeleteIcon as ri, AddIcon as pt, ExpandablePanel as ft, Card as Ya, ArrowForwardIcon as Mn, cardMixin as La, cardClickableMixin as Ua, focusedMixin as ii, StarIcon as zn, StarBorderIcon as Vn, Collapse as Gn, Container as $a, FilterListOffIcon as qa, SearchIcon as Wa, LoadingButton as Ja, Avatar as Zi, DarkModeIcon as Ha, LightModeIcon as Za, LogoutIcon as Xa, fieldBackgroundHoverMixin as xr, HandleIcon as Ka, RemoveIcon as xi, debounce as es, InfoIcon as ts, CloseIcon as jn, fieldBackgroundMixin as pr, fieldBackgroundDisabledMixin as Yn, ArrowDropDownIcon as Ln, useInjectStyles as rs, ShortTextIcon as is, SubjectIcon as ns, FormatQuoteIcon as os, HttpIcon as as, EmailIcon as ss, FlagIcon as ls, ListIcon as cs, ListAltIcon as ds, NumbersIcon as us, FormatListNumberedIcon as Xi, UploadFileIcon as ms, DriveFolderUploadIcon as ps, LinkIcon as fs, AddLinkIcon as hs, ScheduleIcon as gs, BallotIcon as Ki, RepeatIcon as en, ViewStreamIcon as As, Tab as Gr, Tabs as bs, Alert as ys, Sheet as Un, useLocaleConfig as ws, MenuIcon as tn, ChevronLeftIcon as vs } from "@firecms/ui";
6
+ import { useCreateFormex as Sn, Formex as In, setIn as ti, Field as Nn, getIn as jt, useFormex as fi } from "@firecms/formex";
7
+ import { getColorSchemeForSeed as Fn, CHIP_COLORS as Fa, Tooltip as ke, ErrorIcon as Pn, Typography as Y, CircleIcon as Qn, FunctionsIcon as Pa, iconKeys as hi, coolIconKeys as ri, Icon as gi, IconButton as de, ContentCopyIcon as vr, OpenInNewIcon as Ht, DescriptionIcon as Qa, Skeleton as Ue, Chip as Ai, cls as U, defaultBorderMixin as Se, KeyboardTabIcon as bi, Checkbox as Zt, Markdown as yi, TextareaAutosize as Da, MultiSelect as Dn, MultiSelectItem as Rn, Select as nt, SelectItem as ot, BooleanSwitch as Ra, DateTimeField as Xt, paperMixin as kr, ErrorOutlineIcon as Ta, EditIcon as Oa, Button as ge, RemoveCircleIcon as Ma, Menu as St, MoreVertIcon as Tn, MenuItem as Pe, CircularProgress as _t, SearchBar as wi, Badge as Hi, ArrowUpwardIcon as Gr, Popover as vi, FilterListIcon as za, AssignmentIcon as Va, CenteredView as sr, Label as ki, TextField as xt, ClearIcon as Yt, BooleanSwitchWithLabel as _r, useOutsideAlerter as On, Dialog as _i, DialogContent as xi, DialogActions as It, FileCopyIcon as Ga, ArchiveIcon as ja, DeleteIcon as ii, AddIcon as pt, ExpandablePanel as ft, Card as Ya, ArrowForwardIcon as Mn, cardMixin as La, cardClickableMixin as Ua, focusedMixin as ni, StarIcon as zn, StarBorderIcon as Vn, Collapse as Gn, Container as $a, FilterListOffIcon as qa, SearchIcon as Wa, LoadingButton as Ja, Avatar as Zi, DarkModeIcon as Ha, LightModeIcon as Za, LogoutIcon as Xa, fieldBackgroundHoverMixin as xr, HandleIcon as Ka, RemoveIcon as Ei, debounce as es, InfoIcon as ts, CloseIcon as jn, fieldBackgroundMixin as pr, fieldBackgroundDisabledMixin as Yn, ArrowDropDownIcon as Ln, useInjectStyles as rs, ShortTextIcon as is, SubjectIcon as ns, FormatQuoteIcon as os, HttpIcon as as, EmailIcon as ss, FlagIcon as ls, ListIcon as cs, ListAltIcon as ds, NumbersIcon as us, FormatListNumberedIcon as Xi, UploadFileIcon as ms, DriveFolderUploadIcon as ps, LinkIcon as fs, AddLinkIcon as hs, ScheduleIcon as gs, BallotIcon as Ki, RepeatIcon as en, ViewStreamIcon as As, Tab as jr, Tabs as bs, Alert as ys, Sheet as Un, useLocaleConfig as ws, MenuIcon as tn, ChevronLeftIcon as vs } from "@firecms/ui";
8
8
  import J from "react-fast-compare";
9
9
  import { Link as Er, useNavigate as Kt, useLocation as Cr, UNSAFE_NavigationContext as ks, NavLink as _s, Route as lr, Routes as xs } from "react-router-dom";
10
10
  import { format as Es } from "date-fns";
@@ -17,7 +17,7 @@ import * as Zn from "js-search";
17
17
  import { FixedSizeList as Ss } from "react-window";
18
18
  import * as Oe from "yup";
19
19
  import Is from "markdown-it";
20
- import cr, { Plugins as jr } from "react-markdown-editor-lite";
20
+ import cr, { Plugins as Yr } from "react-markdown-editor-lite";
21
21
  import * as Ns from "@radix-ui/react-portal";
22
22
  const Mu = ({ children: e }) => /* @__PURE__ */ n(
23
23
  Ia,
@@ -60,7 +60,7 @@ function eo(e, t) {
60
60
  const a = t.find((s) => s.id === i[0]);
61
61
  let o;
62
62
  if (a && (o = a.path), i.length > 1) {
63
- const s = Ei(o ?? i[0], t);
63
+ const s = Ci(o ?? i[0], t);
64
64
  if (!s?.subcollections)
65
65
  return r;
66
66
  const l = r.split("/").slice(2).join("/");
@@ -68,11 +68,11 @@ function eo(e, t) {
68
68
  } else
69
69
  return o ?? r;
70
70
  }
71
- function Ei(e, t) {
71
+ function Ci(e, t) {
72
72
  const r = Ee(e).split("/");
73
73
  if (r.length % 2 === 0)
74
74
  throw Error(`getCollectionByPathOrId: Collection paths must have an odd number of segments: ${e}`);
75
- const i = Ci(r);
75
+ const i = Bi(r);
76
76
  let a;
77
77
  for (let o = 0; o < i.length; o++) {
78
78
  const s = i[o], l = t && t.sort((c, d) => (c.id ?? "").localeCompare(d.id ?? "")).find((c) => c.id === s || c.path === s);
@@ -81,7 +81,7 @@ function Ei(e, t) {
81
81
  a = l;
82
82
  else if (l.subcollections) {
83
83
  const c = e.replace(s, "").split("/").slice(2).join("/");
84
- c.length > 0 && (a = Ei(c, l.subcollections));
84
+ c.length > 0 && (a = Ci(c, l.subcollections));
85
85
  }
86
86
  }
87
87
  if (a)
@@ -89,7 +89,7 @@ function Ei(e, t) {
89
89
  }
90
90
  return a;
91
91
  }
92
- function Ci(e) {
92
+ function Bi(e) {
93
93
  const t = e.length > 0 && e.length % 2 === 0 ? e.splice(0, e.length - 1) : e, r = t.length, i = [];
94
94
  for (let a = r; a > 0; a = a - 2)
95
95
  i.push(t.slice(0, a).join("/"));
@@ -140,14 +140,14 @@ const Ds = (e, ...t) => ({
140
140
  [i]: e[i]
141
141
  }), {})
142
142
  });
143
- function Yr(e) {
143
+ function Lr(e) {
144
144
  return e && typeof e == "object" && !Array.isArray(e);
145
145
  }
146
146
  function He(e, t) {
147
- const r = Yr(e), i = r ? { ...e } : e;
148
- return r && Yr(t) && Object.keys(t).forEach((a) => {
147
+ const r = Lr(e), i = r ? { ...e } : e;
148
+ return r && Lr(t) && Object.keys(t).forEach((a) => {
149
149
  const o = t[a];
150
- Yr(o) ? a in e ? i[a] = He(e[a], o) : Object.assign(i, { [a]: o }) : Object.assign(i, { [a]: o });
150
+ Lr(o) ? a in e ? i[a] = He(e[a], o) : Object.assign(i, { [a]: o }) : Object.assign(i, { [a]: o });
151
151
  }), i;
152
152
  }
153
153
  function dt(e, t) {
@@ -218,7 +218,7 @@ const Lt = "type", fr = "value";
218
218
  function er(e) {
219
219
  return e.readOnly || e.dataType === "date" && e.autoValue ? !0 : e.dataType === "reference" ? !e.path : !1;
220
220
  }
221
- function Bi(e) {
221
+ function Si(e) {
222
222
  return typeof e.disabled == "object" && !!e.disabled.hidden;
223
223
  }
224
224
  function Qe(e) {
@@ -226,17 +226,17 @@ function Qe(e) {
226
226
  }
227
227
  function hr(e) {
228
228
  return e ? Object.entries(e).map(([t, r]) => {
229
- const i = Si(r);
229
+ const i = Br(r);
230
230
  return i === void 0 ? {} : { [t]: i };
231
231
  }).reduce((t, r) => ({ ...t, ...r }), {}) : {};
232
232
  }
233
- function Si(e) {
233
+ function Br(e) {
234
234
  if (!Qe(e))
235
235
  if (e.dataType === "map" && e.properties) {
236
236
  const t = hr(e.properties);
237
237
  return Object.keys(t).length === 0 ? void 0 : t;
238
238
  } else
239
- return e.defaultValue ? e.defaultValue : no(e.dataType);
239
+ return e.defaultValue || e.defaultValue === null ? e.defaultValue : no(e.dataType);
240
240
  }
241
241
  function no(e) {
242
242
  return e === "string" || e === "number" ? null : e === "boolean" ? !1 : e === "date" ? null : e === "array" ? [] : e === "map" ? {} : null;
@@ -271,7 +271,7 @@ function ut(e) {
271
271
  }
272
272
  function oo(e, t, r) {
273
273
  const i = Object.entries(t).map(([o, s]) => {
274
- const l = e && e[o], c = ni(l, s, r);
274
+ const l = e && e[o], c = oi(l, s, r);
275
275
  if (c === null)
276
276
  return null;
277
277
  if (c !== void 0)
@@ -280,13 +280,13 @@ function oo(e, t, r) {
280
280
  if (Object.keys(a).length !== 0)
281
281
  return a;
282
282
  }
283
- function ni(e, t, r) {
283
+ function oi(e, t, r) {
284
284
  let i;
285
285
  if (t.dataType === "map" && t.properties)
286
286
  i = oo(e, t.properties, r);
287
287
  else if (t.dataType === "array")
288
288
  if (t.of && Array.isArray(e))
289
- i = e.map((a) => ni(a, t.of, r));
289
+ i = e.map((a) => oi(a, t.of, r));
290
290
  else if (t.oneOf && Array.isArray(e)) {
291
291
  const a = t.oneOf?.typeField ?? Lt, o = t.oneOf?.valueField ?? fr;
292
292
  i = e.map((s) => {
@@ -297,7 +297,7 @@ function ni(e, t, r) {
297
297
  const l = s[a], c = t.oneOf?.properties[l];
298
298
  return !l || !c ? s : {
299
299
  [a]: l,
300
- [o]: ni(s[o], c, r)
300
+ [o]: oi(s[o], c, r)
301
301
  };
302
302
  });
303
303
  } else
@@ -362,14 +362,14 @@ function Ne({
362
362
  /* @__PURE__ */ n(Pn, { size: "small", color: "error" }),
363
363
  /* @__PURE__ */ v("div", { className: "pl-2", children: [
364
364
  e && /* @__PURE__ */ n(
365
- L,
365
+ Y,
366
366
  {
367
367
  variant: "body2",
368
368
  className: "font-medium",
369
369
  children: e
370
370
  }
371
371
  ),
372
- /* @__PURE__ */ n(L, { variant: "body2", children: i })
372
+ /* @__PURE__ */ n(Y, { variant: "body2", children: i })
373
373
  ] })
374
374
  ]
375
375
  }
@@ -415,7 +415,7 @@ function Ut(e = 5) {
415
415
  function Wu() {
416
416
  return Math.floor(Math.random() * 16777215).toString(16);
417
417
  }
418
- function oi(e, t = "_", r = !0) {
418
+ function ai(e, t = "_", r = !0) {
419
419
  if (!e)
420
420
  return "";
421
421
  const i = "ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;-", a = `aaaaaeeeeeiiiiooooouuuunc${t}${t}${t}${t}${t}${t}${t}`;
@@ -476,7 +476,7 @@ function $s(e, t) {
476
476
  function Xu(e) {
477
477
  return /* @__PURE__ */ n(Qn, { size: e });
478
478
  }
479
- function ai(e, t) {
479
+ function si(e, t) {
480
480
  const r = e?.Icon ?? Qn;
481
481
  return /* @__PURE__ */ n(r, { size: t });
482
482
  }
@@ -484,12 +484,12 @@ function De(e, t = "small", r = {}) {
484
484
  if (Qe(e))
485
485
  return /* @__PURE__ */ n(Pa, { size: t });
486
486
  {
487
- const i = Pr(e, r);
488
- return ai(i, t);
487
+ const i = Qr(e, r);
488
+ return si(i, t);
489
489
  }
490
490
  }
491
491
  function Ku(e, t) {
492
- return Qe(e) ? "#888" : Pr(e, t)?.color ?? "#666";
492
+ return Qe(e) ? "#888" : Qr(e, t)?.color ?? "#666";
493
493
  }
494
494
  function wt(e, t) {
495
495
  if (typeof e == "object") {
@@ -531,16 +531,16 @@ function qs(e, t) {
531
531
  function tm(e) {
532
532
  return e.propertiesOrder ? e.propertiesOrder : [...Object.keys(e.properties), ...(e.additionalFields ?? []).map((t) => t.key)];
533
533
  }
534
- const Br = {
534
+ const Sr = {
535
535
  read: !0,
536
536
  edit: !0,
537
537
  create: !0,
538
538
  delete: !0
539
539
  };
540
- function Sr(e, t, r, i) {
540
+ function Ir(e, t, r, i) {
541
541
  const a = e.permissions;
542
542
  if (a === void 0)
543
- return Br;
543
+ return Sr;
544
544
  if (typeof a == "object")
545
545
  return a;
546
546
  if (typeof a == "function") {
@@ -557,15 +557,15 @@ function Sr(e, t, r, i) {
557
557
  throw console.error("Permissions:", a), Error("New type of permission added and not mapped");
558
558
  }
559
559
  function mo(e, t, r, i) {
560
- return Sr(e, t, r, i)?.edit ?? Br.edit;
560
+ return Ir(e, t, r, i)?.edit ?? Sr.edit;
561
561
  }
562
562
  function $t(e, t, r, i) {
563
- return e.collectionGroup ? !1 : Sr(e, t, r, i)?.create ?? Br.create;
563
+ return e.collectionGroup ? !1 : Ir(e, t, r, i)?.create ?? Sr.create;
564
564
  }
565
565
  function Fi(e, t, r, i) {
566
- return Sr(e, t, r, i)?.delete ?? Br.delete;
566
+ return Ir(e, t, r, i)?.delete ?? Sr.delete;
567
567
  }
568
- const si = {
568
+ const li = {
569
569
  abc: "alphabet character font letter symbol text type",
570
570
  access_alarm: "clock time",
571
571
  access_alarms: "clock time",
@@ -2420,10 +2420,10 @@ const si = {
2420
2420
  zoom_out_map: "arrows destination location maps move place stop"
2421
2421
  }, Pi = new Zn.Search("key");
2422
2422
  Pi.addIndex("synonyms");
2423
- Pi.addDocuments(fi.map((e) => ({
2423
+ Pi.addDocuments(hi.map((e) => ({
2424
2424
  key: e,
2425
2425
  // @ts-ignore
2426
- synonyms: si[e] ?? []
2426
+ synonyms: li[e] ?? []
2427
2427
  })));
2428
2428
  function Ws(e) {
2429
2429
  let t = 0, r, i;
@@ -2432,23 +2432,23 @@ function Ws(e) {
2432
2432
  return Math.abs(t);
2433
2433
  }
2434
2434
  function Js(e, t) {
2435
- if (e && (e = oi(e), e in gr))
2436
- return e in gr ? /* @__PURE__ */ n(hi, { iconKey: e, size: "medium", className: t }) : void 0;
2435
+ if (e && (e = ai(e), e in gr))
2436
+ return e in gr ? /* @__PURE__ */ n(gi, { iconKey: e, size: "medium", className: t }) : void 0;
2437
2437
  }
2438
- const li = S.memo(
2438
+ const ci = S.memo(
2439
2439
  function({ collectionOrView: t, className: r }) {
2440
2440
  if (!t)
2441
- return /* @__PURE__ */ n(M, {});
2441
+ return /* @__PURE__ */ n(O, {});
2442
2442
  const i = Js(t.icon, r);
2443
2443
  if (t?.icon && i)
2444
2444
  return i;
2445
- let a = oi(("singularName" in t ? t.singularName : void 0) ?? t.name), o;
2446
- a in gr && (o = a), o || (a = oi(t.path), a in gr && (o = a));
2447
- const s = ti.length;
2448
- return o || (o = ti[Ws(t.path) % s]), /* @__PURE__ */ n(hi, { iconKey: o, size: "medium", className: r });
2445
+ let a = ai(("singularName" in t ? t.singularName : void 0) ?? t.name), o;
2446
+ a in gr && (o = a), o || (a = ai(t.path), a in gr && (o = a));
2447
+ const s = ri.length;
2448
+ return o || (o = ri[Ws(t.path) % s]), /* @__PURE__ */ n(gi, { iconKey: o, size: "medium", className: r });
2449
2449
  },
2450
2450
  (e, t) => J(e.collectionOrView?.icon, t.collectionOrView?.icon)
2451
- ), gr = fi.reduce((e, t) => (e[t] = t, e), {});
2451
+ ), gr = hi.reduce((e, t) => (e[t] = t, e), {});
2452
2452
  function rm(e, t) {
2453
2453
  if (t !== void 0 && t === 1)
2454
2454
  return e;
@@ -2616,7 +2616,7 @@ function po(e, t) {
2616
2616
  return e.titleProperty;
2617
2617
  for (const r in e.properties) {
2618
2618
  const i = e.properties[r];
2619
- if (!Qe(i) && Pr(i, t)?.key === "text_field")
2619
+ if (!Qe(i) && Qr(i, t)?.key === "text_field")
2620
2620
  return r;
2621
2621
  }
2622
2622
  }
@@ -2661,21 +2661,21 @@ function el(e) {
2661
2661
  return Qe(i) ? t[r] = i : t[r] = { ...i, editable: !1 }, t;
2662
2662
  }, {});
2663
2663
  }
2664
- function ci(e, t, r) {
2664
+ function di(e, t, r) {
2665
2665
  if (e) {
2666
2666
  const a = e({
2667
2667
  collection: t,
2668
2668
  parentPaths: r
2669
2669
  }) ?? t;
2670
- return a.subcollections && (a.subcollections = a.subcollections.map((o) => ci(e, o, [...r, t.path]))), a;
2670
+ return a.subcollections && (a.subcollections = a.subcollections.map((o) => di(e, o, [...r, t.path]))), a;
2671
2671
  } else
2672
2672
  return t;
2673
2673
  }
2674
2674
  function tl(e, t, r = [], i) {
2675
2675
  const a = (t ?? []).map((l) => {
2676
2676
  const c = e?.find((d) => d.id === l.id);
2677
- return c ? rl(c, l, r, i) : ci(i, l, r);
2678
- }), o = a.map((l) => l.id), s = e.filter((l) => !o.includes(l.id)).map((l) => i ? ci(i, l, r) : l);
2677
+ return c ? rl(c, l, r, i) : di(i, l, r);
2678
+ }), o = a.map((l) => l.id), s = e.filter((l) => !o.includes(l.id)).map((l) => i ? di(i, l, r) : l);
2679
2679
  return [...a, ...s];
2680
2680
  }
2681
2681
  function rl(e, t, r = [], i) {
@@ -2777,14 +2777,14 @@ function ho(e, t, r = "", i = 0, a = 10) {
2777
2777
  }
2778
2778
  function pm(e, t = 3) {
2779
2779
  const r = ce(e);
2780
- O(() => {
2780
+ M(() => {
2781
2781
  console.log("Changed props:"), ho(e, r.current, "", 0, t), r.current = e;
2782
2782
  });
2783
2783
  }
2784
2784
  const go = S.createContext({}), tt = (e) => {
2785
2785
  const t = $e(go);
2786
2786
  return e?.overrides?.dataSource ? e?.overrides.dataSource : t;
2787
- }, Ao = S.createContext({}), _e = () => $e(Ao), Nt = () => $e(Kn), bo = S.createContext({}), Ir = () => $e(bo), yo = S.createContext({}), Ft = () => $e(yo), wo = S.createContext({}), tr = (e) => {
2787
+ }, Ao = S.createContext({}), _e = () => $e(Ao), Nt = () => $e(Kn), bo = S.createContext({}), Nr = () => $e(bo), yo = S.createContext({}), Ft = () => $e(yo), wo = S.createContext({}), tr = (e) => {
2788
2788
  const t = $e(wo);
2789
2789
  return e?.overrides?.storageSource ? e.overrides.storageSource : t;
2790
2790
  }, gt = () => {
@@ -2841,7 +2841,7 @@ const go = S.createContext({}), tt = (e) => {
2841
2841
  ))
2842
2842
  ] });
2843
2843
  }, nl = () => $e(ko), _o = S.createContext({}), fe = () => $e(_o), xo = S.createContext({}), Qt = () => $e(xo), Re = () => {
2844
- const e = Nt(), t = Ir(), r = Ft(), i = _e(), a = tt(), o = tr(), s = gt(), l = Pt(), c = nl(), d = fe(), u = Qt(), f = S.useRef({
2844
+ const e = Nt(), t = Nr(), r = Ft(), i = _e(), a = tt(), o = tr(), s = gt(), l = Pt(), c = nl(), d = fe(), u = Qt(), f = S.useRef({
2845
2845
  authController: e,
2846
2846
  sideDialogsController: t,
2847
2847
  sideEntityController: r,
@@ -2854,7 +2854,7 @@ const go = S.createContext({}), tt = (e) => {
2854
2854
  customizationController: d,
2855
2855
  analyticsController: u
2856
2856
  });
2857
- return O(() => {
2857
+ return M(() => {
2858
2858
  f.current = {
2859
2859
  authController: e,
2860
2860
  sideDialogsController: t,
@@ -2879,7 +2879,7 @@ function fm({
2879
2879
  searchString: o
2880
2880
  }) {
2881
2881
  const s = tt(t), c = _e().resolveAliasesFrom(e), d = i ? i[0] : void 0, u = i ? i[1] : void 0, f = Re(), [m, p] = P([]), [h, A] = P(!1), [g, y] = P(), [w, b] = P(!1);
2882
- return O(() => {
2882
+ return M(() => {
2883
2883
  A(!0);
2884
2884
  const _ = async (E) => {
2885
2885
  if (t.callbacks?.onFetch)
@@ -2931,7 +2931,7 @@ function fm({
2931
2931
  noMoreToLoad: w
2932
2932
  };
2933
2933
  }
2934
- const Lr = {};
2934
+ const Ur = {};
2935
2935
  function Eo({
2936
2936
  path: e,
2937
2937
  entityId: t,
@@ -2939,7 +2939,7 @@ function Eo({
2939
2939
  useCache: i = !1
2940
2940
  }) {
2941
2941
  const a = tt(r), s = _e().resolveAliasesFrom(e), l = Re(), [c, d] = P(), [u, f] = P(!0), [m, p] = P();
2942
- return O(() => {
2942
+ return M(() => {
2943
2943
  f(!0);
2944
2944
  const h = async (g) => {
2945
2945
  if (r.callbacks?.onFetch && g)
@@ -2953,11 +2953,11 @@ function Eo({
2953
2953
  } catch (y) {
2954
2954
  console.error(y);
2955
2955
  }
2956
- Lr[`${s}/${t}`] = g, d(g), f(!1), p(void 0);
2956
+ Ur[`${s}/${t}`] = g, d(g), f(!1), p(void 0);
2957
2957
  }, A = (g) => {
2958
2958
  console.error("ERROR fetching entity", g), f(!1), d(void 0), p(g);
2959
2959
  };
2960
- return t && i && Lr[`${s}/${t}`] ? (d(Lr[`${s}/${t}`]), f(!1), p(void 0), () => {
2960
+ return t && i && Ur[`${s}/${t}`] ? (d(Ur[`${s}/${t}`]), f(!1), p(void 0), () => {
2961
2961
  }) : t && s && r ? a.listenEntity ? a.listenEntity({
2962
2962
  path: s,
2963
2963
  entityId: t,
@@ -3149,7 +3149,7 @@ function hm({
3149
3149
  path: e
3150
3150
  }) {
3151
3151
  const t = Re(), [r, i] = P(), [a, o] = P(!1), [s, l] = P();
3152
- return O(() => {
3152
+ return M(() => {
3153
3153
  t.navigation && (o(!0), l(void 0), al({ path: e, context: t }).then((d) => {
3154
3154
  i(d);
3155
3155
  }).catch((d) => l(d)).finally(() => o(!1)));
@@ -3157,7 +3157,7 @@ function hm({
3157
3157
  }
3158
3158
  const sl = () => $e(Xn), ll = (e) => {
3159
3159
  const { onSuccess: t, onError: r, disableClipboardAPI: i = !1, copiedDuration: a } = e || {}, o = ce(null), [s, l] = P(!1), [c, d] = P("");
3160
- O(() => {
3160
+ M(() => {
3161
3161
  a && setTimeout(() => l(!1), a);
3162
3162
  }, [s]);
3163
3163
  const u = () => navigator.clipboard !== void 0, f = x((w) => {
@@ -3208,7 +3208,7 @@ typeof window < "u" && window.addEventListener("resize", () => {
3208
3208
  });
3209
3209
  const Ze = () => {
3210
3210
  const [e, t] = P(qt);
3211
- return O(() => {
3211
+ return M(() => {
3212
3212
  const r = (i) => {
3213
3213
  t(i);
3214
3214
  };
@@ -3222,7 +3222,7 @@ function Bo(e = "lg") {
3222
3222
  return typeof window > "u" ? !1 : window.matchMedia(`(min-width: ${cl[e] + 1}px)`).matches;
3223
3223
  }
3224
3224
  function rr(e) {
3225
- const t = _e(), r = Ir(), i = x(() => {
3225
+ const t = _e(), r = Nr(), i = x(() => {
3226
3226
  if (e.path) {
3227
3227
  let o = e.collection;
3228
3228
  if (o || (o = t.getCollection(e.path)), !o)
@@ -3254,7 +3254,7 @@ function rr(e) {
3254
3254
  const ul = `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAASAAAAEgARslrPgAAB9pJREFUWMONl12obVUVx39jzLk+9j7nHq9y1QT1qpcbSIaXQFGs24PQl3HroSQyqHwJFJF6qaceCsqQoJdELHoIC6EeJCSKsi/TFLGozGsKXksljRLxnrP3WmvOOUYPa+19zsmPWpux5pxrzTX///Exx5hb+B/X1y+/nuIlVKF5m0v1YbQ55tIcKTQXFerNQkumOZ1oTiXCqUH8saR+74L8ZIWWux7+7JuuL2/04s5jJyhWQlXV71KtbhCtr1WtD6s0KlrjNBRaEi3JGzpv6bymQ0sn9mwv9otB7Ls7kn9Xo+U7D9z8/xG4+bz3cs35SjE/HEK8NWr8RBOrs+tQUUlEtAYaijRkbxmY0fuMzucsfcbSWnZQtiWxJL3Uid09iH0jIM8/1f+d3/zuS29M4PvHrmG+cZA8dMdjiLfNYrx6owrMVKlVUQkgkeI1iYbBJ3A2WPpKNtnx+UQisy29L0gPDGKfrwkPn2bJPfd/Zo0ZVp0fvOOdnLGxheX+A/Mq3nGwqS8/q645o4psxkgbhFqdSgqVJKIkghgqjuDoWh+dlm1AI0gUC3o4C9d04idbmZ06euQDPPHMj3YJ3HnkrZx98Fys2PFZ1dxxsJkdPbOecaBqmcWGqBVBIkEiKkoQJ5IJJBTbY8aRgBMwjxgVJoJJwDScnYUrOy2PBamfv/CS4zz9zE+IAIfPuQQzPzyrmq9u1e3RM+qWeaipNCCiE4DjbjgF94xZQj2htpjeK84ImqlIUpO9JllgEKgJDFpfOoh8paN8chbOeQ4g/OTq97PdLXSz3fjiVjO7/sx6g804ow41QWuCrjQPBB3bkZQgAkpBJOMojmIEjIgRKV6RpaYIZHGKQlK5OIv0L8bul8eOfsxjDJGD8613z6rmhq1qxkY1o9YKFUFEEED2xqoE1MNoWgPBwQZMl2SrSbQM9NQyUMlA5S3Rlcqd6E50RdRvPMvn9yE8qP9+9WWtQvXxzdic8xrwPaJrUYJGoq4sVBM1Ukuiln4UBipJVJrGoHUhrARB0XMQ/cizbSd61uaZlzUhXjuvWmqt9oOyAmUPEabnkSDV2j0Rp2YgksZdQpoCtRBwAiN4cKYdw4m3pNnbY9Tw4SZUh9tQEda+ld1WpmThgoivU8fYDbgEggRcleiZ6BOoFNRXLQQX1Eelggsgh8GPx6DhWB2iRgkj2OTuVX8dBzJtMx93BAKK4hIwUUSEID4BGspecWTfDwSCw+UxqByJoqPf9+xmYWQg7H3u+5Poyk3o5BZDxRBxxH29fdkF3YcBXKHgF+m+hLxn4OvbnnbPzMkjsm/+f5cXec2ye6ZfpO6+OX7pE8TqPj1zcN/7Zu8CDm44Bu6skrKjuOs0FlxWCJNMYxMOqLlR3DAvsAKaZo6t7+u7r6nhjN/5RKIQKESKhykhjeIINgJi+0m4Fiuns2WKZQybtJ2AfAWzGu/ayt0wz5gXimeKQyKSPI4kiCMhDxSgyLiOiY9kxnW2NVs+1ZeBbAmzhLmtgd0d8z1k1mIUTxQbKD5gnkmuDN6QvCF5TaIie0UmkIU1id3WcfwZHUo61eWB3gayDdOiZR+JXUuMWmcbyGWcny2RzOi8obeWwRsGrxm8JlGPBHCyOJmpJkwkHHs09pnfL1L60KLqtBKZtprhU+lVmSq9+xRsBfOMW6L4QLFM7zWdz+l8Ru8tA+10YKlJIiSxkcC6dQqlmJc/xaHIvTuZT7UpHalFUHEqL6iGsfKtM8FEzMdy7J4oXui9mk5CczpGErtEKgacQUZJE3gSwzw/i+dfx2G7e6IcOPALCXIkakGkYx4iwceyq+uENPp+RSI7DN7Q+5ylb7JgJLH0+XRGbOlRerWJwNgmnOwJ83Tvq/7KX2KZb1nJfnfp5YRoda7hFC/MQyGI7Mteow2E4pHkDT2zyfS758HV4bSjolOjF2PYS4KBbN2L5vmHZ7DpsWQnDsvfLj1+Lwufy9LSO2y5M1Mnik8OEJxAoSJRk7xhoKX3+URiztI3WPgGS2/p1OnE6CcSvRQGH+htQfH07dPSP7Lp9ajcNy+9DnG/oMT67qqZHz/QtGxVyjworQqVCIjiPiaaTD1ttZZ+fTIeCXQ+Y6HCQm0tO5LYpmfHlyy9/1nCPi3ICw/99JbxUHrdvxr6Q4depdhTfeGapVeH+imKxwhv6ZnR+5zeN0aNGU2+ZIPON0cX0LBQYSnGQgsLSSzoWdiCHVvQ2fLP2fMtwf2vDz50K6TpVPxj/sn7Ni5iu9l6Tof+yd78yoWFQ0uvWYvVLK1h6e34B8RnY9DZnIW3LAijxpLYkZ6Fd+z4km3bYcd2WNry8ezppsZ5ZMd2+MfTv3xtjbr9/PfwyoFDzPvtq7I2t+Vq/m6pt4hxThVaojao1CANRkORmkwkiTCI00thKYWOzJJR+6V1JE8/z2JfqGgfW9jLPPLg7a9Xe8frHs7j5MVXESxfmLS5KYXmxhQ3z/a4icQNRFtEGlwjJkoRIamTmIKNTE+it57kw0sF+1ah3CkSXkiPf42Htl+3WL/2+vIFJ6ishJ3QXD1o9dEhVCcGbS7ModUcakwrigaKChkoYmQK2XMp5L8V/F7DfuDePYrEcv8f7npdnDcksEvkg9RewquhuayTcHzQeCyJXpFVD2fRzSxCFtkuwqks8mjB/ujYr9y6k0gs9528503X/w/F3eUgyIBI4wAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0wNS0xMFQxOToyODozMyswMDowMEzeSx4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDUtMTBUMTk6Mjg6MzMrMDA6MDA9g/OiAAAARnRFWHRzb2Z0d2FyZQBJbWFnZU1hZ2ljayA2LjcuOC05IDIwMTQtMDUtMTIgUTE2IGh0dHA6Ly93d3cuaW1hZ2VtYWdpY2sub3Jn3IbtAAAAABh0RVh0VGh1bWI6OkRvY3VtZW50OjpQYWdlcwAxp/+7LwAAABh0RVh0VGh1bWI6OkltYWdlOjpoZWlnaHQAMTkyDwByhQAAABd0RVh0VGh1bWI6OkltYWdlOjpXaWR0aAAxOTLTrCEIAAAAGXRFWHRUaHVtYjo6TWltZXR5cGUAaW1hZ2UvcG5nP7JWTgAAABd0RVh0VGh1bWI6Ok1UaW1lADE2MjA2NzQ5MTMk8oswAAAAD3RFWHRUaHVtYjo6U2l6ZQAwQkKUoj7sAAAAVnRFWHRUaHVtYjo6VVJJAGZpbGU6Ly8vbW50bG9nL2Zhdmljb25zLzIwMjEtMDUtMTAvOGIxNDNhYjgwODhkMjBlZThkYmUzOTFhN2NkNmQ3NmQuaWNvLnBuZ9msgG0AAAAASUVORK5CYII=
3255
3255
  `;
3256
3256
  function gm(e, t) {
3257
- O(() => {
3257
+ M(() => {
3258
3258
  if (document) {
3259
3259
  document.title = `${e} - FireCMS`;
3260
3260
  let r = document.querySelector("link[rel~='icon']");
@@ -3267,7 +3267,7 @@ function So(e) {
3267
3267
  path: t,
3268
3268
  collections: r = [],
3269
3269
  currentFullPath: i
3270
- } = e, a = Ee(t).split("/"), o = Ci(a), s = [];
3270
+ } = e, a = Ee(t).split("/"), o = Bi(a), s = [];
3271
3271
  for (let l = 0; l < o.length; l++) {
3272
3272
  const c = o[l], d = r && r.find((u) => u.id === c || u.path === c);
3273
3273
  if (d) {
@@ -3379,14 +3379,14 @@ function Am(e) {
3379
3379
  $,
3380
3380
  f
3381
3381
  ]);
3382
- O(() => {
3382
+ M(() => {
3383
3383
  oe();
3384
3384
  }, [oe]);
3385
- const Y = x((T, ne = !1) => {
3385
+ const L = x((T, ne = !1) => {
3386
3386
  const K = m.current;
3387
3387
  if (!K)
3388
3388
  return;
3389
- const H = Ei(Ee(T), K), j = ne ? d?.getCollectionConfig(T) : void 0, G = H ? He(H, j ?? {}) : void 0;
3389
+ const H = Ci(Ee(T), K), j = ne ? d?.getCollectionConfig(T) : void 0, G = H ? He(H, j ?? {}) : void 0;
3390
3390
  let I = G;
3391
3391
  if (G) {
3392
3392
  const R = G.subcollections, me = G.callbacks, Ie = G.permissions;
@@ -3472,7 +3472,7 @@ function Am(e) {
3472
3472
  basePath: t,
3473
3473
  baseCollectionPath: r,
3474
3474
  initialised: A,
3475
- getCollection: Y,
3475
+ getCollection: L,
3476
3476
  getCollectionFromPaths: X,
3477
3477
  getCollectionFromIds: q,
3478
3478
  isUrlCollectionPath: V,
@@ -3495,7 +3495,7 @@ function nr(e) {
3495
3495
  return encodeURIComponent(Ee(e)).replaceAll("%2F", "/").replaceAll("%23", "#");
3496
3496
  }
3497
3497
  function Io(e, t) {
3498
- return e.filter((r) => r.permissions ? Sr(r, t, r.path, null)?.read !== !1 : !0).map((r) => r.subcollections ? {
3498
+ return e.filter((r) => r.permissions ? Ir(r, t, r.path, null)?.read !== !1 : !0).map((r) => r.subcollections ? {
3499
3499
  ...r,
3500
3500
  subcollections: Io(r.subcollections, t)
3501
3501
  } : r);
@@ -3549,7 +3549,7 @@ function ym() {
3549
3549
  const g = e.current[A], y = He(g ?? t(p), h);
3550
3550
  e.current[A] = He(e.current[A], y);
3551
3551
  }, [t]), [a, o] = P([]), [s, l] = P([]), [c, d] = P([]);
3552
- O(() => {
3552
+ M(() => {
3553
3553
  o(localStorage.getItem("recently_visited_paths") ? JSON.parse(localStorage.getItem("recently_visited_paths")) : []), l(localStorage.getItem("favourite_paths") ? JSON.parse(localStorage.getItem("favourite_paths")) : []), d(localStorage.getItem("collapsed_groups") ? JSON.parse(localStorage.getItem("collapsed_groups")) : []);
3554
3554
  }, []);
3555
3555
  const u = x((p) => {
@@ -3572,7 +3572,7 @@ function ym() {
3572
3572
  }
3573
3573
  function wm() {
3574
3574
  const e = x(() => typeof window > "u" ? !1 : window.matchMedia("(prefers-color-scheme: dark)").matches, []), r = (localStorage.getItem("prefers-dark-mode") != null ? localStorage.getItem("prefers-dark-mode") === "true" : null) ?? e, [i, a] = P(r ? "dark" : "light");
3575
- O(() => {
3575
+ M(() => {
3576
3576
  a(r ? "dark" : "light"), l(r ? "dark" : "light");
3577
3577
  }, [r]);
3578
3578
  const o = x(() => {
@@ -3599,7 +3599,7 @@ function vm({
3599
3599
  dataSourceDelegate: a
3600
3600
  }) {
3601
3601
  const o = !!r, [s, l] = P(o), [c, d] = P(!1), [u, f] = P(!o || !!t.loginSkipped), m = u && (!o || !!t.user || !!t.loginSkipped) && !c;
3602
- O(() => {
3602
+ M(() => {
3603
3603
  t.loginSkipped && f(!0);
3604
3604
  }, [t.loginSkipped]);
3605
3605
  const p = ce(), h = x(async () => {
@@ -3627,7 +3627,7 @@ function vm({
3627
3627
  l(!1);
3628
3628
  !t.initialLoading && !A && f(!0);
3629
3629
  }, [e, t, r, a, i]);
3630
- return O(() => {
3630
+ return M(() => {
3631
3631
  h();
3632
3632
  }, [h]), {
3633
3633
  canAccessMainView: m,
@@ -3710,7 +3710,7 @@ function yl({
3710
3710
  }
3711
3711
  }
3712
3712
  ),
3713
- r && /* @__PURE__ */ v(M, { children: [
3713
+ r && /* @__PURE__ */ v(O, { children: [
3714
3714
  navigator && /* @__PURE__ */ n(ke, { title: "Copy url to clipboard", children: /* @__PURE__ */ n(
3715
3715
  "div",
3716
3716
  {
@@ -3807,7 +3807,7 @@ function Ar({
3807
3807
  children: [
3808
3808
  /* @__PURE__ */ n(Qa, { className: "flex-grow" }),
3809
3809
  i && /* @__PURE__ */ n(ke, { title: i, children: /* @__PURE__ */ n(
3810
- L,
3810
+ Y,
3811
3811
  {
3812
3812
  className: "max-w-full truncate rtl text-left",
3813
3813
  variant: "caption",
@@ -3844,17 +3844,17 @@ function Ct({
3844
3844
  i.url ? r = El(i, t) : i.storage ? r = Fo(t) : r = ct();
3845
3845
  } else if (e.dataType === "array") {
3846
3846
  const i = e;
3847
- i.of && (Array.isArray(i.of) ? r = /* @__PURE__ */ v(M, { children: [
3848
- i.of.map((a, o) => Ur(a, o)),
3847
+ i.of && (Array.isArray(i.of) ? r = /* @__PURE__ */ v(O, { children: [
3848
+ i.of.map((a, o) => $r(a, o)),
3849
3849
  " "
3850
- ] }) : i.of.dataType === "map" && i.of.properties ? r = vl(i.of.properties, t, i.of.previewProperties) : i.of.dataType === "string" ? i.of.enumValues ? r = _l() : i.of.storage ? r = Ur(i.of) : r = kl() : r = Ur(i.of));
3850
+ ] }) : i.of.dataType === "map" && i.of.properties ? r = vl(i.of.properties, t, i.of.previewProperties) : i.of.dataType === "string" ? i.of.enumValues ? r = _l() : i.of.storage ? r = $r(i.of) : r = kl() : r = $r(i.of));
3851
3851
  } else
3852
3852
  e.dataType === "map" ? r = wl(e, t) : e.dataType === "date" ? r = ct() : e.dataType === "reference" ? r = xl() : (e.dataType, r = ct());
3853
3853
  return r || null;
3854
3854
  }
3855
3855
  function wl(e, t) {
3856
3856
  if (!e.properties)
3857
- return /* @__PURE__ */ n(M, {});
3857
+ return /* @__PURE__ */ n(O, {});
3858
3858
  let r;
3859
3859
  return t === "medium" ? r = Object.keys(e.properties) : (r = e.previewProperties || Object.keys(e.properties), t === "small" ? r = r.slice(0, 3) : t === "tiny" && (r = r.slice(0, 1))), t !== "medium" ? /* @__PURE__ */ n(
3860
3860
  "div",
@@ -3924,16 +3924,16 @@ function kl() {
3924
3924
  }
3925
3925
  function _l() {
3926
3926
  return /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: [0, 1].map(
3927
- (e, t) => /* @__PURE__ */ n(M, { children: ct(t) })
3927
+ (e, t) => /* @__PURE__ */ n(O, { children: ct(t) })
3928
3928
  ) });
3929
3929
  }
3930
- function Ur(e, t = 0) {
3930
+ function $r(e, t = 0) {
3931
3931
  return /* @__PURE__ */ n(
3932
3932
  "div",
3933
3933
  {
3934
3934
  className: "flex flex-col gap-2",
3935
3935
  children: [0, 1].map(
3936
- (r, i) => /* @__PURE__ */ n(M, { children: /* @__PURE__ */ n(
3936
+ (r, i) => /* @__PURE__ */ n(O, { children: /* @__PURE__ */ n(
3937
3937
  Ct,
3938
3938
  {
3939
3939
  property: e,
@@ -4001,7 +4001,7 @@ function Il({
4001
4001
  size: r
4002
4002
  }) {
4003
4003
  const [i, a] = S.useState(void 0), o = tr(), [s, l] = S.useState(un[t]);
4004
- if (O(() => {
4004
+ if (M(() => {
4005
4005
  if (!t)
4006
4006
  return;
4007
4007
  let u = !1;
@@ -4037,7 +4037,7 @@ function je({
4037
4037
  return null;
4038
4038
  const o = ht(e), s = t !== void 0 ? Ii(o, t) : void 0, l = Ms(s), c = Os(o, t);
4039
4039
  return /* @__PURE__ */ v(
4040
- gi,
4040
+ Ai,
4041
4041
  {
4042
4042
  className: i,
4043
4043
  colorScheme: c,
@@ -4070,7 +4070,7 @@ function Qo({
4070
4070
  } else if (r.previewAsTag) {
4071
4071
  const a = Fn(e ?? "");
4072
4072
  return /* @__PURE__ */ n(pe, { children: /* @__PURE__ */ n(
4073
- gi,
4073
+ Ai,
4074
4074
  {
4075
4075
  colorScheme: a,
4076
4076
  size: i,
@@ -4089,14 +4089,14 @@ function Qo({
4089
4089
  );
4090
4090
  {
4091
4091
  if (!t)
4092
- return /* @__PURE__ */ n(M, {});
4092
+ return /* @__PURE__ */ n(O, {});
4093
4093
  const a = t.split(`
4094
4094
  `);
4095
4095
  return t && t.includes(`
4096
4096
  `) ? /* @__PURE__ */ n("div", { className: U("overflow-x-scroll", i === "tiny" ? "text-sm" : ""), children: a.map((o, s) => /* @__PURE__ */ v(S.Fragment, { children: [
4097
4097
  /* @__PURE__ */ n("span", { children: o }),
4098
4098
  s !== a.length - 1 && /* @__PURE__ */ n("br", {})
4099
- ] }, `string_preview_${s}`)) }) : i === "tiny" ? /* @__PURE__ */ n("span", { className: "text-sm", children: t }) : /* @__PURE__ */ n(M, { children: t });
4099
+ ] }, `string_preview_${s}`)) }) : i === "tiny" ? /* @__PURE__ */ n("span", { className: "text-sm", children: t }) : /* @__PURE__ */ n(O, { children: t });
4100
4100
  }
4101
4101
  }
4102
4102
  }
@@ -4183,7 +4183,7 @@ function Fl({
4183
4183
  ) }),
4184
4184
  /* @__PURE__ */ v("div", { className: "flex flex-col flex-grow w-full m-1", children: [
4185
4185
  s !== "tiny" && l && (d ? /* @__PURE__ */ n("div", { className: `${s !== "medium" ? "block whitespace-nowrap overflow-hidden truncate" : ""}`, children: /* @__PURE__ */ n(
4186
- L,
4186
+ Y,
4187
4187
  {
4188
4188
  variant: "caption",
4189
4189
  color: "disabled",
@@ -4253,7 +4253,7 @@ function Fl({
4253
4253
  updateUrl: !0
4254
4254
  });
4255
4255
  },
4256
- children: /* @__PURE__ */ n(Ai, { size: "small" })
4256
+ children: /* @__PURE__ */ n(bi, { size: "small" })
4257
4257
  }
4258
4258
  )
4259
4259
  }
@@ -4653,7 +4653,7 @@ function zl({
4653
4653
  {
4654
4654
  className: "min-w-[140px] w-[25%] py-1",
4655
4655
  children: /* @__PURE__ */ n(
4656
- L,
4656
+ Y,
4657
4657
  {
4658
4658
  variant: "caption",
4659
4659
  className: "font-mono break-words",
@@ -4718,7 +4718,7 @@ function To({ value: e }) {
4718
4718
  {
4719
4719
  className: "min-w-[140px] w-[25%] py-1",
4720
4720
  children: /* @__PURE__ */ n(
4721
- L,
4721
+ Y,
4722
4722
  {
4723
4723
  variant: "caption",
4724
4724
  className: "font-mono break-words",
@@ -4733,7 +4733,7 @@ function To({ value: e }) {
4733
4733
  "div",
4734
4734
  {
4735
4735
  className: "flex-grow max-w-[75%]",
4736
- children: typeof r != "object" && /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(pe, { children: r && r.toString() }) })
4736
+ children: typeof r != "object" && /* @__PURE__ */ n(Y, { children: /* @__PURE__ */ n(pe, { children: r && r.toString() }) })
4737
4737
  }
4738
4738
  )
4739
4739
  ]
@@ -4751,7 +4751,7 @@ function Vl({
4751
4751
  date: e
4752
4752
  }) {
4753
4753
  const t = fe(), r = t?.locale ? Cs[t?.locale] : void 0, i = t?.dateTimeFormat ?? js, a = e ? Es(e, i, { locale: r }) : "";
4754
- return /* @__PURE__ */ n(M, { children: a });
4754
+ return /* @__PURE__ */ n(O, { children: a });
4755
4755
  }
4756
4756
  function Gl({
4757
4757
  value: e,
@@ -4791,9 +4791,9 @@ function jl({
4791
4791
  enumValues: a,
4792
4792
  size: r !== "medium" ? "small" : "medium"
4793
4793
  }
4794
- ) : /* @__PURE__ */ n(M, { children: e });
4794
+ ) : /* @__PURE__ */ n(O, { children: e });
4795
4795
  } else
4796
- return /* @__PURE__ */ n(M, { children: e });
4796
+ return /* @__PURE__ */ n(O, { children: e });
4797
4797
  }
4798
4798
  const Fe = S.memo(function(t) {
4799
4799
  const r = fe();
@@ -4851,7 +4851,7 @@ const Fe = S.memo(function(t) {
4851
4851
  size: t.size,
4852
4852
  storagePathOrDownloadUrl: s
4853
4853
  }
4854
- ) : f.markdown ? i = /* @__PURE__ */ n(bi, { source: s, size: "small" }) : i = /* @__PURE__ */ n(
4854
+ ) : f.markdown ? i = /* @__PURE__ */ n(yi, { source: s, size: "small" }) : i = /* @__PURE__ */ n(
4855
4855
  Qo,
4856
4856
  {
4857
4857
  ...t,
@@ -5013,7 +5013,7 @@ const xm = kt.memo(
5013
5013
  builder: t
5014
5014
  }) {
5015
5015
  const [r, i] = P(!0), [a, o] = P(null);
5016
- return O(() => {
5016
+ return M(() => {
5017
5017
  let s = !1;
5018
5018
  return t.then((l) => {
5019
5019
  s || (i(!1), o(l));
@@ -5103,13 +5103,13 @@ function Yl(e) {
5103
5103
  updateValue: o,
5104
5104
  focused: s
5105
5105
  } = e, l = ce(i), [c, d] = P(i), u = ce(!1);
5106
- O(() => {
5106
+ M(() => {
5107
5107
  l.current !== i && i !== c && d(i), l.current = i;
5108
5108
  }, [i]);
5109
5109
  const f = S.useCallback(() => {
5110
5110
  !i && !c || c !== i && (l.current = c, o(c));
5111
5111
  }, [c, o, i]);
5112
- return Ni(c, f, !s, 2e3), O(() => {
5112
+ return Ni(c, f, !s, 2e3), M(() => {
5113
5113
  t.current && s && !u.current ? (u.current = !0, t.current.focus({ preventScroll: !0 }), t.current.selectionStart = t.current.value.length, t.current.selectionEnd = t.current.value.length) : u.current = s;
5114
5114
  }, [s, t]), /* @__PURE__ */ n(
5115
5115
  Da,
@@ -5144,7 +5144,7 @@ function Yl(e) {
5144
5144
  }
5145
5145
  );
5146
5146
  }
5147
- function $r(e) {
5147
+ function qr(e) {
5148
5148
  const {
5149
5149
  name: t,
5150
5150
  enumValues: r,
@@ -5157,7 +5157,7 @@ function $r(e) {
5157
5157
  multiple: d,
5158
5158
  valueType: u
5159
5159
  } = e, f = Array.isArray(a) && d || !Array.isArray(a) && !d, m = S.useRef(null);
5160
- O(() => {
5160
+ M(() => {
5161
5161
  m.current && l && m.current?.focus({ preventScroll: !0 });
5162
5162
  }, [l, m]);
5163
5163
  const p = x((A) => {
@@ -5257,7 +5257,7 @@ function Ll(e) {
5257
5257
  updateValue: i,
5258
5258
  focused: a
5259
5259
  } = e, o = r && typeof r == "number" ? r.toString() : "", [s, l] = P(o), c = ce(r);
5260
- O(() => {
5260
+ M(() => {
5261
5261
  c.current !== r && String(r) !== s && l(r ? r.toString() : null), c.current = r;
5262
5262
  }, [r]);
5263
5263
  const d = S.useCallback(() => {
@@ -5270,14 +5270,14 @@ function Ll(e) {
5270
5270
  } else
5271
5271
  i(null);
5272
5272
  }, [s, r]);
5273
- Ni(s, d, !a, 2e3), O(
5273
+ Ni(s, d, !a, 2e3), M(
5274
5274
  () => {
5275
5275
  !a && o !== s && l(r != null ? r.toString() : null);
5276
5276
  },
5277
5277
  [r, a]
5278
5278
  );
5279
5279
  const u = S.useRef(null);
5280
- O(() => {
5280
+ M(() => {
5281
5281
  u.current && a && u.current.focus({ preventScroll: !0 });
5282
5282
  }, [a, u]);
5283
5283
  const f = /^-?[0-9]+[,.]?[0-9]*$/;
@@ -5303,7 +5303,7 @@ function Ul(e) {
5303
5303
  updateValue: r,
5304
5304
  focused: i
5305
5305
  } = e, a = S.useRef(null);
5306
- return O(() => {
5306
+ return M(() => {
5307
5307
  a.current && i && a.current.focus({ preventScroll: !0 });
5308
5308
  }, [i, a]), /* @__PURE__ */ n(
5309
5309
  Ra,
@@ -5354,7 +5354,7 @@ class pe extends S.Component {
5354
5354
  /* @__PURE__ */ n(Pn, { color: "error", size: "small" }),
5355
5355
  /* @__PURE__ */ n("div", { className: "ml-4", children: "Error" })
5356
5356
  ] }),
5357
- /* @__PURE__ */ n(L, { variant: "caption", children: this.state.error?.message ?? "See the error in the console" })
5357
+ /* @__PURE__ */ n(Y, { variant: "caption", children: this.state.error?.message ?? "See the error in the console" })
5358
5358
  ] }) : this.props.children;
5359
5359
  }
5360
5360
  }
@@ -5443,12 +5443,12 @@ function zo({
5443
5443
  if (!d)
5444
5444
  throw Error("Storage meta must be specified");
5445
5445
  const f = d?.metadata, m = u ? "small" : "medium", p = d?.imageCompression, h = (u ? i ?? [] : i ? [i] : []).map((C) => ({
5446
- id: qr(),
5446
+ id: Wr(),
5447
5447
  storagePathOrDownloadUrl: C,
5448
5448
  metadata: f,
5449
5449
  size: m
5450
5450
  })), [A, g] = P(i), [y, w] = P(h);
5451
- O(() => {
5451
+ M(() => {
5452
5452
  J(A, i) || (g(i), w(h));
5453
5453
  }, [h, i, A]);
5454
5454
  const b = x(async (C) => {
@@ -5495,8 +5495,8 @@ function zo({
5495
5495
  if (u)
5496
5496
  B = [
5497
5497
  ...y,
5498
- ...await Promise.all(C.map(async (Q) => (p && di(Q) && (Q = await An(Q, p)), {
5499
- id: qr(),
5498
+ ...await Promise.all(C.map(async (Q) => (p && ui(Q) && (Q = await An(Q, p)), {
5499
+ id: Wr(),
5500
5500
  file: Q,
5501
5501
  fileName: await b(Q),
5502
5502
  metadata: f,
@@ -5505,8 +5505,8 @@ function zo({
5505
5505
  ];
5506
5506
  else {
5507
5507
  let Q = C[0];
5508
- p && di(Q) && (Q = await An(Q, p)), B = [{
5509
- id: qr(),
5508
+ p && ui(Q) && (Q = await An(Q, p)), B = [{
5509
+ id: Wr(),
5510
5510
  file: Q,
5511
5511
  fileName: await b(Q),
5512
5512
  metadata: f,
@@ -5531,15 +5531,15 @@ function hn(e) {
5531
5531
  (t, r) => (e.map((i) => i.storagePathOrDownloadUrl).indexOf(t.storagePathOrDownloadUrl) === r || !t.storagePathOrDownloadUrl) && (e.map((i) => i.file).indexOf(t.file) === r || !t.file)
5532
5532
  );
5533
5533
  }
5534
- function qr() {
5534
+ function Wr() {
5535
5535
  return Math.floor(Math.random() * Math.floor(Number.MAX_SAFE_INTEGER));
5536
5536
  }
5537
5537
  const gn = {
5538
5538
  "image/jpeg": "JPEG",
5539
5539
  "image/png": "PNG",
5540
5540
  "image/webp": "WEBP"
5541
- }, di = (e) => gn[e.type] ? gn[e.type] : null, Jl = 100, An = (e, t) => new Promise((r) => {
5542
- const i = t.quality === void 0 ? Jl : t.quality, a = i >= 0 && i <= 100 ? i : 100, o = di(e);
5541
+ }, ui = (e) => gn[e.type] ? gn[e.type] : null, Jl = 100, An = (e, t) => new Promise((r) => {
5542
+ const i = t.quality === void 0 ? Jl : t.quality, a = i >= 0 && i <= 100 ? i : 100, o = ui(e);
5543
5543
  if (!o)
5544
5544
  throw Error("resizeAndCompressImage: Unsupported image format");
5545
5545
  Bs.imageFileResizer(
@@ -5602,9 +5602,9 @@ function Go({ showError: e, disabled: t, showExpandIcon: r, selected: i, openPop
5602
5602
  a(d);
5603
5603
  }
5604
5604
  }, []), c = ce();
5605
- return O(() => {
5605
+ return M(() => {
5606
5606
  c.current && i && c.current.focus({ preventScroll: !0 });
5607
- }, [i]), /* @__PURE__ */ n(M, { children: (e || !t && r) && /* @__PURE__ */ v("div", { ref: s, className: "absolute top-0.5 right-0.5 flex items-center", children: [
5607
+ }, [i]), /* @__PURE__ */ n(O, { children: (e || !t && r) && /* @__PURE__ */ v("div", { ref: s, className: "absolute top-0.5 right-0.5 flex items-center", children: [
5608
5608
  i && o,
5609
5609
  i && !t && r && /* @__PURE__ */ n(
5610
5610
  de,
@@ -5768,7 +5768,7 @@ function tc({
5768
5768
  });
5769
5769
  }
5770
5770
  }
5771
- ), { ...$ } = B(), oe = d ? "Drag 'n' drop some files here, or click here to edit" : "Drag 'n' drop a file here, or click here edit", Y = d ? e.of : e, X = he(() => Et(b), [b]), q = !f && l;
5771
+ ), { ...$ } = B(), oe = d ? "Drag 'n' drop some files here, or click here to edit" : "Drag 'n' drop a file here, or click here edit", L = d ? e.of : e, X = he(() => Et(b), [b]), q = !f && l;
5772
5772
  return /* @__PURE__ */ v(
5773
5773
  "div",
5774
5774
  {
@@ -5791,7 +5791,7 @@ function tc({
5791
5791
  return V.storagePathOrDownloadUrl ? te = /* @__PURE__ */ n(
5792
5792
  rc,
5793
5793
  {
5794
- property: Y,
5794
+ property: L,
5795
5795
  value: V.storagePathOrDownloadUrl,
5796
5796
  entity: o,
5797
5797
  size: b
@@ -5816,7 +5816,7 @@ function tc({
5816
5816
  className: "flex-grow m-2 max-w-[200px]",
5817
5817
  onClick: C,
5818
5818
  children: /* @__PURE__ */ n(
5819
- L,
5819
+ Y,
5820
5820
  {
5821
5821
  className: "text-gray-400 dark:text-gray-600",
5822
5822
  variant: "body2",
@@ -5931,7 +5931,7 @@ const ic = S.memo(
5931
5931
  size: lt(l),
5932
5932
  children: /* @__PURE__ */ n(Ne, { title: "Value is not a reference.", error: "Click to edit" })
5933
5933
  }
5934
- ), E = () => Array.isArray(i) ? /* @__PURE__ */ n(M, { children: i.map(
5934
+ ), E = () => Array.isArray(i) ? /* @__PURE__ */ n(O, { children: i.map(
5935
5935
  (C, B) => /* @__PURE__ */ n(
5936
5936
  "div",
5937
5937
  {
@@ -6214,7 +6214,7 @@ function mc({
6214
6214
  const s = e.validation;
6215
6215
  return s ? (o = s.required ? o.required(s?.requiredMessage ? s.requiredMessage : "Required").nullable(!0) : o.notRequired().nullable(!0), (s.min || s.min === 0) && (o = o.min(s.min, `${e.name} should be min ${s.min} entries long`)), s.max && (o = o.max(s.max, `${e.name} should be max ${s.max} entries long`))) : o = o.notRequired().nullable(!0), o;
6216
6216
  }
6217
- function Nr(e) {
6217
+ function Fr(e) {
6218
6218
  switch (e) {
6219
6219
  case "xl":
6220
6220
  return 400;
@@ -6273,8 +6273,8 @@ const pc = ({
6273
6273
  hideOverflow: A = !0,
6274
6274
  showExpandIcon: g = !0
6275
6275
  }) {
6276
- const [y, w] = $n(), b = ce(null), _ = he(() => Nr(i), [i]), [k, E] = P(!1), [C, B] = P(l), Q = !o && !!c;
6277
- O(() => {
6276
+ const [y, w] = $n(), b = ce(null), _ = he(() => Fr(i), [i]), [k, E] = P(!1), [C, B] = P(l), Q = !o && !!c;
6277
+ M(() => {
6278
6278
  l && B(!0);
6279
6279
  const Ae = setTimeout(() => {
6280
6280
  B(!1);
@@ -6317,7 +6317,7 @@ const pc = ({
6317
6317
  o ? p(void 0) : !a && Ae && p(Ae);
6318
6318
  }, [b, p, a, o]), $ = x((Ae) => {
6319
6319
  z(), Ae.stopPropagation();
6320
- }, [z]), oe = he(() => w ? w.height > _ : !1, [w, _]), Y = !Q && a, X = !o && u && oe, q = !o && !u && oe, V = x(() => E(!0), []), ae = x(() => E(!1), []), te = Q ? "border-red-500" : C ? "border-green-500" : Y ? "border-primary" : "border-transparent";
6320
+ }, [z]), oe = he(() => w ? w.height > _ : !1, [w, _]), L = !Q && a, X = !o && u && oe, q = !o && !u && oe, V = x(() => E(!0), []), ae = x(() => E(!1), []), te = Q ? "border-red-500" : C ? "border-green-500" : L ? "border-primary" : "border-transparent";
6321
6321
  return /* @__PURE__ */ v(
6322
6322
  "div",
6323
6323
  {
@@ -6327,7 +6327,7 @@ const pc = ({
6327
6327
  k && !o ? "bg-gray-50 dark:bg-gray-900" : "",
6328
6328
  l ? "bg-gray-100 bg-opacity-75 dark:bg-gray-800 dark:bg-opacity-75" : "",
6329
6329
  A ? "overflow-hidden" : "",
6330
- Y ? "bg-gray-50 dark:bg-gray-900" : "",
6330
+ L ? "bg-gray-50 dark:bg-gray-900" : "",
6331
6331
  te
6332
6332
  ),
6333
6333
  ref: b,
@@ -6382,7 +6382,7 @@ function qe({
6382
6382
  setValue: r
6383
6383
  }) {
6384
6384
  const i = ce(null);
6385
- O(() => {
6385
+ M(() => {
6386
6386
  typeof e.disabled == "object" && !!e.disabled.clearOnDisabled ? t != null && (i.current = t, r(null)) : i.current && (r(i.current), i.current = null);
6387
6387
  }, [e]);
6388
6388
  }
@@ -6414,13 +6414,13 @@ const gc = S.memo(
6414
6414
  F(!0), setTimeout(() => {
6415
6415
  F(!1);
6416
6416
  }, 100);
6417
- }, []), $ = !!a.Field, oe = !!a.Preview, Y = er(a), X = typeof a.disabled == "object" ? a.disabled.disabledMessage : void 0, q = u || f || !!a.disabled, V = he(() => Wt({
6417
+ }, []), $ = !!a.Field, oe = !!a.Preview, L = er(a), X = typeof a.disabled == "object" ? a.disabled.disabledMessage : void 0, q = u || f || !!a.disabled, V = he(() => Wt({
6418
6418
  property: a,
6419
6419
  entityId: d.id,
6420
6420
  customFieldValidator: r,
6421
6421
  name: t
6422
6422
  }), [d.id, a, t]);
6423
- O(
6423
+ M(
6424
6424
  () => {
6425
6425
  J(i, k.current) || (Q(void 0), _(i), k.current = i, z());
6426
6426
  },
@@ -6444,7 +6444,7 @@ const gc = S.memo(
6444
6444
  Q(R);
6445
6445
  }));
6446
6446
  };
6447
- O(() => {
6447
+ M(() => {
6448
6448
  V.validate(b).then(() => Q(void 0)).catch(Q);
6449
6449
  }, [b, V, t, a, d]);
6450
6450
  const te = (I) => {
@@ -6475,7 +6475,7 @@ const gc = S.memo(
6475
6475
  };
6476
6476
  let se, ee = !1, T = !1, ne = !0, K = !1, H = !1, j = !0;
6477
6477
  const G = !q && E;
6478
- if (u || Y)
6478
+ if (u || L)
6479
6479
  return /* @__PURE__ */ n(
6480
6480
  br,
6481
6481
  {
@@ -6485,13 +6485,13 @@ const gc = S.memo(
6485
6485
  value: b,
6486
6486
  align: o ?? "left",
6487
6487
  fullHeight: !1,
6488
- disabledTooltip: X ?? (Y ? "Read only" : void 0),
6488
+ disabledTooltip: X ?? (L ? "Read only" : void 0),
6489
6489
  disabled: !0,
6490
6490
  children: /* @__PURE__ */ n(
6491
6491
  Fe,
6492
6492
  {
6493
6493
  width: s,
6494
- height: Nr(h),
6494
+ height: Fr(h),
6495
6495
  propertyKey: t,
6496
6496
  property: a,
6497
6497
  value: b,
@@ -6523,7 +6523,7 @@ const gc = S.memo(
6523
6523
  else if (w && a.dataType === "number") {
6524
6524
  const R = a;
6525
6525
  R.enumValues ? (se = /* @__PURE__ */ n(
6526
- $r,
6526
+ qr,
6527
6527
  {
6528
6528
  name: t,
6529
6529
  multiple: !1,
@@ -6551,7 +6551,7 @@ const gc = S.memo(
6551
6551
  const R = a;
6552
6552
  if (R.enumValues)
6553
6553
  se = /* @__PURE__ */ n(
6554
- $r,
6554
+ qr,
6555
6555
  {
6556
6556
  name: t,
6557
6557
  multiple: !1,
@@ -6626,7 +6626,7 @@ const gc = S.memo(
6626
6626
  if (!R.of && !R.oneOf)
6627
6627
  throw Error(`You need to specify an 'of' or 'oneOf' prop (or specify a custom field) in your array property ${t}`);
6628
6628
  R.of && !Array.isArray(R.of) && (R.of.dataType === "string" || R.of.dataType === "number" ? w && R.of.enumValues && (se = /* @__PURE__ */ n(
6629
- $r,
6629
+ qr,
6630
6630
  {
6631
6631
  name: t,
6632
6632
  multiple: !0,
@@ -6658,7 +6658,7 @@ const gc = S.memo(
6658
6658
  )), ee = !1));
6659
6659
  }
6660
6660
  }
6661
- return se || (ee = !1, T = m && w && !se && !q && !Y, se = /* @__PURE__ */ n(
6661
+ return se || (ee = !1, T = m && w && !se && !q && !L, se = /* @__PURE__ */ n(
6662
6662
  Fe,
6663
6663
  {
6664
6664
  width: s,
@@ -6675,7 +6675,7 @@ const gc = S.memo(
6675
6675
  width: s,
6676
6676
  onSelect: Ae,
6677
6677
  selected: w,
6678
- disabled: q || Y,
6678
+ disabled: q || L,
6679
6679
  disabledTooltip: X ?? "Disabled",
6680
6680
  removePadding: K,
6681
6681
  fullHeight: H,
@@ -6806,7 +6806,7 @@ const Qi = function({
6806
6806
  ) })
6807
6807
  ] }),
6808
6808
  !p && c !== "xs" && /* @__PURE__ */ n("div", { className: "w-[138px] text-center overflow-hidden truncate", children: t ? /* @__PURE__ */ v(
6809
- L,
6809
+ Y,
6810
6810
  {
6811
6811
  onClick: (C) => {
6812
6812
  C.stopPropagation();
@@ -6837,7 +6837,7 @@ function bc({
6837
6837
  title: c
6838
6838
  }) {
6839
6839
  const d = S.useRef(null), u = Ze(), f = S.useRef(!1);
6840
- O(() => {
6840
+ M(() => {
6841
6841
  d.current && f.current && !l && d.current.focus(), f.current = l ?? !1;
6842
6842
  }, [l]);
6843
6843
  const m = /* @__PURE__ */ n(ke, { title: "Table row size", side: "right", sideOffset: 4, children: /* @__PURE__ */ n(
@@ -6864,7 +6864,7 @@ function bc({
6864
6864
  /* @__PURE__ */ v("div", { className: "flex items-center gap-2", children: [
6865
6865
  u && /* @__PURE__ */ n("div", { className: "w-[22px]", children: r && /* @__PURE__ */ n(_t, { size: "small" }) }),
6866
6866
  (a || o) && /* @__PURE__ */ n(
6867
- yi,
6867
+ wi,
6868
6868
  {
6869
6869
  inputRef: d,
6870
6870
  loading: l,
@@ -7001,7 +7001,7 @@ function yr({ text: e, ...t }) {
7001
7001
  children: /* @__PURE__ */ v("div", { className: "m-auto flex flex-col gap-2 items-center", children: [
7002
7002
  /* @__PURE__ */ n(_t, { ...t }),
7003
7003
  e && /* @__PURE__ */ n(
7004
- L,
7004
+ Y,
7005
7005
  {
7006
7006
  color: "secondary",
7007
7007
  variant: "caption",
@@ -7073,7 +7073,7 @@ const kc = S.memo(
7073
7073
  ]
7074
7074
  }
7075
7075
  ) }),
7076
- /* @__PURE__ */ v(M, { children: [
7076
+ /* @__PURE__ */ v(O, { children: [
7077
7077
  f && /* @__PURE__ */ n(f, { onHover: m || h }),
7078
7078
  c.sortable && (a || E || h) && /* @__PURE__ */ n(
7079
7079
  Hi,
@@ -7089,9 +7089,9 @@ const kc = S.memo(
7089
7089
  o(c.key);
7090
7090
  },
7091
7091
  children: [
7092
- !a && /* @__PURE__ */ n(Vr, {}),
7093
- a === "asc" && /* @__PURE__ */ n(Vr, {}),
7094
- a === "desc" && /* @__PURE__ */ n(Vr, { className: "rotate-180" })
7092
+ !a && /* @__PURE__ */ n(Gr, {}),
7093
+ a === "asc" && /* @__PURE__ */ n(Gr, {}),
7094
+ a === "desc" && /* @__PURE__ */ n(Gr, { className: "rotate-180" })
7095
7095
  ]
7096
7096
  }
7097
7097
  )
@@ -7104,7 +7104,7 @@ const kc = S.memo(
7104
7104
  color: "secondary",
7105
7105
  invisible: !l,
7106
7106
  children: /* @__PURE__ */ n(
7107
- wi,
7107
+ vi,
7108
7108
  {
7109
7109
  open: h,
7110
7110
  onOpenChange: A,
@@ -7162,7 +7162,7 @@ function _c({
7162
7162
  setHidden: s
7163
7163
  }) {
7164
7164
  const l = e.key, [c, d] = P(r);
7165
- if (O(() => {
7165
+ if (M(() => {
7166
7166
  d(r);
7167
7167
  }, [r]), !e.filter)
7168
7168
  return null;
@@ -7265,7 +7265,7 @@ const xc = ({
7265
7265
  }, [g, y]), b = x(() => {
7266
7266
  document.addEventListener("mousemove", g), document.addEventListener("mouseup", y);
7267
7267
  }, [g, y]);
7268
- O(() => (f >= 0 ? b() : w(), () => {
7268
+ M(() => (f >= 0 ? b() : w(), () => {
7269
7269
  w();
7270
7270
  }), [b, f, w]);
7271
7271
  const _ = x((k) => {
@@ -7355,14 +7355,14 @@ const xc = ({
7355
7355
  );
7356
7356
  },
7357
7357
  (e, t) => J(e.rowData, t.rowData) && J(e.column, t.column) && J(e.cellData, t.cellData) && J(e.rowIndex, t.rowIndex) && J(e.cellRenderer, t.cellRenderer) && J(e.columnIndex, t.columnIndex)
7358
- ), Fr = Ca({});
7359
- Fr.displayName = "VirtualListContext";
7358
+ ), Pr = Ca({});
7359
+ Pr.displayName = "VirtualListContext";
7360
7360
  const Bc = Ba(({
7361
7361
  children: e,
7362
7362
  ...t
7363
- }, r) => /* @__PURE__ */ n(Fr.Consumer, { children: (i) => {
7363
+ }, r) => /* @__PURE__ */ n(Pr.Consumer, { children: (i) => {
7364
7364
  const a = i.customView;
7365
- return /* @__PURE__ */ v(M, { children: [
7365
+ return /* @__PURE__ */ v(O, { children: [
7366
7366
  /* @__PURE__ */ n(
7367
7367
  "div",
7368
7368
  {
@@ -7425,15 +7425,15 @@ const Bc = Ba(({
7425
7425
  AddColumnComponent: C
7426
7426
  }) {
7427
7427
  const B = f ? f[0] : void 0, Q = f ? f[1] : void 0, [D, F] = P(o), z = ce(null), $ = ce(0);
7428
- O(() => {
7428
+ M(() => {
7429
7429
  F(o);
7430
7430
  }, [o]);
7431
- const [oe, Y] = $n(), X = x((j) => {
7431
+ const [oe, L] = $n(), X = x((j) => {
7432
7432
  F(D.map((G) => G.key === j.column.key ? j.column : G));
7433
7433
  }, [D]), q = x((j) => {
7434
7434
  F(D.map((G) => G.key === j.column.key ? j.column : G)), l && l(j);
7435
7435
  }, [D, l]), V = ce();
7436
- O(() => {
7436
+ M(() => {
7437
7437
  V.current = c;
7438
7438
  }, [c]);
7439
7439
  const ae = x(() => {
@@ -7445,7 +7445,7 @@ const Bc = Ba(({
7445
7445
  x(() => {
7446
7446
  $.current = 0, h && h(void 0);
7447
7447
  }, [h]);
7448
- const Ae = Math.max((t?.length ?? 0) * a - Y.height, 0), ue = x((j) => {
7448
+ const Ae = Math.max((t?.length ?? 0) * a - L.height, 0), ue = x((j) => {
7449
7449
  i && (t?.length ?? 0) > 0 && j > $.current + 600 && ($.current = j, i());
7450
7450
  }, [t?.length, i]), se = x(({
7451
7451
  scrollOffset: j,
@@ -7472,7 +7472,7 @@ const Bc = Ba(({
7472
7472
  maxWidth: "2xl",
7473
7473
  className: "flex flex-col gap-2",
7474
7474
  children: [
7475
- /* @__PURE__ */ n(L, { variant: "h6", children: "Error fetching data from the data source" }),
7475
+ /* @__PURE__ */ n(Y, { variant: "h6", children: "Error fetching data from the data source" }),
7476
7476
  m?.message && /* @__PURE__ */ n(Nc, { text: m.message })
7477
7477
  ]
7478
7478
  }
@@ -7503,15 +7503,15 @@ const Bc = Ba(({
7503
7503
  style: _,
7504
7504
  className: U("h-full w-full", k),
7505
7505
  children: /* @__PURE__ */ n(
7506
- Fr.Provider,
7506
+ Pr.Provider,
7507
7507
  {
7508
7508
  value: H,
7509
7509
  children: /* @__PURE__ */ n(
7510
7510
  Ic,
7511
7511
  {
7512
7512
  outerRef: z,
7513
- width: Y.width,
7514
- height: Y.height,
7513
+ width: L.width,
7514
+ height: L.height,
7515
7515
  itemCount: (t?.length ?? 0) + (E ? 1 : 0),
7516
7516
  onScroll: se,
7517
7517
  includeAddColumn: !!C,
@@ -7538,7 +7538,7 @@ function Ic({
7538
7538
  const l = x(({
7539
7539
  index: c,
7540
7540
  style: d
7541
- }) => /* @__PURE__ */ n(Fr.Consumer, { children: ({
7541
+ }) => /* @__PURE__ */ n(Pr.Consumer, { children: ({
7542
7542
  onRowClick: u,
7543
7543
  data: f,
7544
7544
  columns: m,
@@ -7624,7 +7624,7 @@ const Nc = ({ text: e }) => {
7624
7624
  "not-in": "Not in",
7625
7625
  "array-contains": "Contains",
7626
7626
  "array-contains-any": "Contains Any"
7627
- }, Wr = ["array-contains-any", "in", "not-in"];
7627
+ }, Jr = ["array-contains-any", "in", "not-in"];
7628
7628
  function Fc({
7629
7629
  name: e,
7630
7630
  value: t,
@@ -7640,19 +7640,19 @@ function Fc({
7640
7640
  i ? d.push("array-contains-any") : d.push("in", "not-in");
7641
7641
  const [u, f] = t || [d[0], void 0], [m, p] = P(u), [h, A] = P(f), g = h ? Array.isArray(h) ? h.map((D) => D?.isEntityReference && D?.isEntityReference() ? D.id : null).filter(Boolean) : [h.id] : [];
7642
7642
  function y(D, F) {
7643
- const z = Wr.includes(m), $ = Wr.includes(D);
7643
+ const z = Jr.includes(m), $ = Jr.includes(D);
7644
7644
  let oe = F;
7645
7645
  z !== $ && (oe = $ ? oe?.isEntityReference && oe?.isEntityReference() ? [oe] : [] : void 0), p(D), A(oe);
7646
- const Y = oe !== null && Array.isArray(oe) ? oe.length > 0 : oe !== void 0;
7646
+ const L = oe !== null && Array.isArray(oe) ? oe.length > 0 : oe !== void 0;
7647
7647
  r(
7648
- D && Y ? [D, oe] : void 0
7648
+ D && L ? [D, oe] : void 0
7649
7649
  );
7650
7650
  }
7651
7651
  const w = _e(), b = he(() => a ? w.getCollection(a) : void 0, [a]), _ = (D) => {
7652
7652
  y(m, ut(D));
7653
7653
  }, k = (D) => {
7654
7654
  y(m, D.map((F) => ut(F)));
7655
- }, E = Wr.includes(m), C = rr(
7655
+ }, E = Jr.includes(m), C = rr(
7656
7656
  {
7657
7657
  multiselect: E,
7658
7658
  path: a,
@@ -7705,7 +7705,7 @@ function Fc({
7705
7705
  }
7706
7706
  ),
7707
7707
  !i && /* @__PURE__ */ v(
7708
- vi,
7708
+ ki,
7709
7709
  {
7710
7710
  className: "border cursor-pointer rounded-md p-2 flex items-center gap-2 [&:has(:checked)]:bg-gray-100 dark:[&:has(:checked)]:bg-gray-800",
7711
7711
  htmlFor: "null-filter",
@@ -7739,7 +7739,7 @@ const wn = {
7739
7739
  "not-in": "Not in",
7740
7740
  "array-contains": "Contains",
7741
7741
  "array-contains-any": "Any"
7742
- }, Jr = ["array-contains-any", "in", "not-in"];
7742
+ }, Hr = ["array-contains-any", "in", "not-in"];
7743
7743
  function Pc({
7744
7744
  name: e,
7745
7745
  value: t,
@@ -7754,14 +7754,14 @@ function Pc({
7754
7754
  const [c, d] = t || [l[0], void 0], [u, f] = P(c), [m, p] = P(d);
7755
7755
  function h(g, y) {
7756
7756
  let w = y;
7757
- const b = Jr.includes(u), _ = Jr.includes(g);
7757
+ const b = Hr.includes(u), _ = Hr.includes(g);
7758
7758
  b !== _ && (w = _ ? typeof y == "string" || typeof y == "number" ? [y] : [] : void 0), typeof w == "number" && isNaN(w) && (w = void 0), f(g), p(w);
7759
7759
  const k = w !== null && Array.isArray(w) ? w.length > 0 : w !== void 0;
7760
7760
  r(
7761
7761
  g && k ? [g, w] : void 0
7762
7762
  );
7763
7763
  }
7764
- const A = Jr.includes(u);
7764
+ const A = Hr.includes(u);
7765
7765
  return /* @__PURE__ */ v("div", { className: "flex w-[440px]", children: [
7766
7766
  /* @__PURE__ */ n("div", { className: "w-[80px]", children: /* @__PURE__ */ n(
7767
7767
  nt,
@@ -7838,7 +7838,7 @@ function Pc({
7838
7838
  }
7839
7839
  ),
7840
7840
  !a && /* @__PURE__ */ v(
7841
- vi,
7841
+ ki,
7842
7842
  {
7843
7843
  className: "border cursor-pointer rounded-md p-2 flex items-center gap-2 [&:has(:checked)]:bg-gray-100 dark:[&:has(:checked)]:bg-gray-800",
7844
7844
  htmlFor: "null-filter",
@@ -7940,7 +7940,7 @@ function Dc({
7940
7940
  }
7941
7941
  ),
7942
7942
  /* @__PURE__ */ v(
7943
- vi,
7943
+ ki,
7944
7944
  {
7945
7945
  className: "border cursor-pointer rounded-md p-2 flex items-center gap-2 [&:has(:checked)]:bg-gray-100 dark:[&:has(:checked)]:bg-gray-800",
7946
7946
  htmlFor: "null-filter",
@@ -7998,7 +7998,7 @@ const Rc = S.memo(
7998
7998
  endAdornment: $,
7999
7999
  AddColumnComponent: oe
8000
8000
  }) {
8001
- const Y = ce(null), [X, q] = S.useState(void 0), V = () => {
8001
+ const L = ce(null), [X, q] = S.useState(void 0), V = () => {
8002
8002
  !k || d || u || w !== void 0 && b?.(w + _);
8003
8003
  }, ae = x(() => {
8004
8004
  b?.(_);
@@ -8007,12 +8007,12 @@ const Rc = S.memo(
8007
8007
  return i && i(ee);
8008
8008
  }, [i, l]);
8009
8009
  On(
8010
- Y,
8010
+ L,
8011
8011
  () => {
8012
8012
  X && ue();
8013
8013
  },
8014
8014
  !!X
8015
- ), O(() => {
8015
+ ), M(() => {
8016
8016
  const ee = (T) => {
8017
8017
  T.keyCode === 27 && ue();
8018
8018
  };
@@ -8041,7 +8041,7 @@ const Rc = S.memo(
8041
8041
  "div",
8042
8042
  {
8043
8043
  className: "h-full w-full flex flex-col bg-white dark:bg-gray-950",
8044
- ref: Y,
8044
+ ref: L,
8045
8045
  children: /* @__PURE__ */ n(
8046
8046
  Sc,
8047
8047
  {
@@ -8054,7 +8054,7 @@ const Rc = S.memo(
8054
8054
  error: f,
8055
8055
  paginationEnabled: k,
8056
8056
  onColumnResize: a,
8057
- rowHeight: Nr(s),
8057
+ rowHeight: Fr(s),
8058
8058
  loading: d,
8059
8059
  filter: m,
8060
8060
  onFilterUpdate: p ? se : void 0,
@@ -8178,7 +8178,7 @@ const Wo = function({
8178
8178
  AdditionalHeaderWidget: z,
8179
8179
  additionalIDHeaderWidget: $,
8180
8180
  emptyComponent: oe,
8181
- getIdColumnWidth: Y,
8181
+ getIdColumnWidth: L,
8182
8182
  onTextSearchClick: X,
8183
8183
  textSearchLoading: q,
8184
8184
  enablePopupIcon: V
@@ -8208,7 +8208,7 @@ const Wo = function({
8208
8208
  customFieldValidator: j,
8209
8209
  columnIndex: xe,
8210
8210
  width: ie.width,
8211
- height: Nr(se),
8211
+ height: Fr(se),
8212
8212
  entity: Ce,
8213
8213
  disabled: Ke,
8214
8214
  enablePopupIcon: V,
@@ -8224,7 +8224,7 @@ const Wo = function({
8224
8224
  const Te = xe, Ce = H[ie.key], We = Ce.dependencies ? Object.entries(Te.values).filter(([re, Be]) => Ce.dependencies.includes(re)).reduce((re, Be) => ({ ...re, ...Be }), {}) : Te, Ke = Ce.Builder;
8225
8225
  if (!Ke && !Ce.value)
8226
8226
  throw new Error("When using additional fields you need to provide a Builder or a value");
8227
- const rt = Ke ? /* @__PURE__ */ n(Ke, { entity: Te, context: ue }) : /* @__PURE__ */ n(M, { children: Ce.value?.({
8227
+ const rt = Ke ? /* @__PURE__ */ n(Ke, { entity: Te, context: ue }) : /* @__PURE__ */ n(O, { children: Ce.value?.({
8228
8228
  entity: Te,
8229
8229
  context: ue
8230
8230
  }) });
@@ -8261,7 +8261,7 @@ const Wo = function({
8261
8261
  })(), Ie = [
8262
8262
  {
8263
8263
  key: "id_ewcfedcswdf3",
8264
- width: Y?.() ?? (te ? 160 : 130),
8264
+ width: L?.() ?? (te ? 160 : 130),
8265
8265
  title: "ID",
8266
8266
  resizable: !1,
8267
8267
  frozen: te,
@@ -8395,10 +8395,10 @@ function Jo({
8395
8395
  }
8396
8396
  return s;
8397
8397
  }, [s, p]);
8398
- O(() => {
8398
+ M(() => {
8399
8399
  J(p, k) || E(p);
8400
8400
  }, [p]);
8401
- const [k, E] = S.useState(p ?? o ?? void 0), [C, B] = S.useState(_), Q = C ? C[0] : void 0, D = C ? C[1] : void 0, F = Re(), [z, $] = P([]), [oe, Y] = P(!1), [X, q] = P(), [V, ae] = P(!1), te = x((T, ne) => f.isFilterCombinationValid ? f.isFilterCombinationValid({
8401
+ const [k, E] = S.useState(p ?? o ?? void 0), [C, B] = S.useState(_), Q = C ? C[0] : void 0, D = C ? C[1] : void 0, F = Re(), [z, $] = P([]), [oe, L] = P(!1), [X, q] = P(), [V, ae] = P(!1), te = x((T, ne) => f.isFilterCombinationValid ? f.isFilterCombinationValid({
8402
8402
  path: m,
8403
8403
  collection: t,
8404
8404
  filterValues: T,
@@ -8410,8 +8410,8 @@ function Jo({
8410
8410
  }
8411
8411
  T && Object.keys(T).length === 0 ? E(void 0) : E(T);
8412
8412
  }, [p]);
8413
- O(() => {
8414
- Y(!0);
8413
+ M(() => {
8414
+ L(!0);
8415
8415
  const T = async (K) => {
8416
8416
  if (t.callbacks?.onFetch)
8417
8417
  try {
@@ -8426,12 +8426,12 @@ function Jo({
8426
8426
  } catch (H) {
8427
8427
  console.error(H);
8428
8428
  }
8429
- Y(!1), q(void 0), $(K.map((H) => ({
8429
+ L(!1), q(void 0), $(K.map((H) => ({
8430
8430
  ...H
8431
8431
  // values: sanitizeData(e.values, resolvedCollection.properties)
8432
8432
  }))), ae(!w || K.length < w);
8433
8433
  }, ne = (K) => {
8434
- console.error("ERROR", K), Y(!1), $([]), q(K);
8434
+ console.error("ERROR", K), L(!1), $([]), q(K);
8435
8435
  };
8436
8436
  return f.listenCollection ? f.listenCollection({
8437
8437
  path: m,
@@ -8606,7 +8606,7 @@ function Xo({
8606
8606
  }, [p, A, B, s, l, r, u, w.name, o]);
8607
8607
  let D;
8608
8608
  if (p && A)
8609
- D = /* @__PURE__ */ n(M, { children: "Multiple entities" });
8609
+ D = /* @__PURE__ */ n(O, { children: "Multiple entities" });
8610
8610
  else {
8611
8611
  const z = p;
8612
8612
  D = z ? /* @__PURE__ */ n(
@@ -8616,22 +8616,22 @@ function Xo({
8616
8616
  collection: t,
8617
8617
  path: l
8618
8618
  }
8619
- ) : /* @__PURE__ */ n(M, {});
8619
+ ) : /* @__PURE__ */ n(O, {});
8620
8620
  }
8621
- const F = A ? /* @__PURE__ */ v(M, { children: [
8621
+ const F = A ? /* @__PURE__ */ v(O, { children: [
8622
8622
  /* @__PURE__ */ n("b", { children: w.name }),
8623
8623
  ": Confirm multiple delete?"
8624
8624
  ] }) : `Would you like to delete this ${w.singularName ?? w.name}?`;
8625
8625
  return /* @__PURE__ */ v(
8626
- ki,
8626
+ _i,
8627
8627
  {
8628
8628
  maxWidth: A ? "lg" : "2xl",
8629
8629
  "aria-labelledby": "delete-dialog",
8630
8630
  open: i,
8631
8631
  onOpenChange: (z) => z ? void 0 : r(),
8632
8632
  children: [
8633
- /* @__PURE__ */ v(_i, { fullHeight: !0, children: [
8634
- /* @__PURE__ */ n(L, { variant: "subtitle2", className: "p-4", children: F }),
8633
+ /* @__PURE__ */ v(xi, { fullHeight: !0, children: [
8634
+ /* @__PURE__ */ n(Y, { variant: "subtitle2", className: "p-4", children: F }),
8635
8635
  !A && /* @__PURE__ */ n("div", { className: "p-4", children: D })
8636
8636
  ] }),
8637
8637
  /* @__PURE__ */ v(It, { children: [
@@ -8663,7 +8663,7 @@ function Xo({
8663
8663
  );
8664
8664
  }
8665
8665
  const Vc = {
8666
- icon: /* @__PURE__ */ n(Ai, {}),
8666
+ icon: /* @__PURE__ */ n(bi, {}),
8667
8667
  name: "Edit",
8668
8668
  collapsed: !1,
8669
8669
  onClick({
@@ -8732,7 +8732,7 @@ const Vc = {
8732
8732
  return window.open(`https://example.com/${e.id}`, "_blank"), Promise.resolve(void 0);
8733
8733
  }
8734
8734
  }, ea = {
8735
- icon: /* @__PURE__ */ n(ri, {}),
8735
+ icon: /* @__PURE__ */ n(ii, {}),
8736
8736
  name: "Delete",
8737
8737
  onClick({
8738
8738
  entity: e,
@@ -8797,7 +8797,7 @@ function Gc({
8797
8797
  b.setSelectedEntities(q), t && t(q);
8798
8798
  }
8799
8799
  }, b = Ho(w);
8800
- O(() => {
8800
+ M(() => {
8801
8801
  let X = !1;
8802
8802
  const q = o?.map((V) => V?.toString()).filter(Boolean);
8803
8803
  return q && i ? Promise.all(
@@ -8881,7 +8881,7 @@ function Gc({
8881
8881
  textSearchLoading: z,
8882
8882
  textSearchInitialised: $,
8883
8883
  onTextSearchClick: oe,
8884
- textSearchEnabled: Y
8884
+ textSearchEnabled: L
8885
8885
  } = (
8886
8886
  // eslint-disable-next-line react-hooks/rules-of-hooks
8887
8887
  Zo({
@@ -8895,13 +8895,13 @@ function Gc({
8895
8895
  {
8896
8896
  textSearchLoading: z,
8897
8897
  onTextSearchClick: $ ? void 0 : oe,
8898
- textSearchEnabled: Y,
8898
+ textSearchEnabled: L,
8899
8899
  displayedColumnIds: D,
8900
8900
  onEntityClick: k,
8901
8901
  tableController: F,
8902
8902
  enablePopupIcon: !1,
8903
8903
  tableRowActionsBuilder: C,
8904
- title: /* @__PURE__ */ n(L, { variant: "subtitle2", children: i.singularName ? `Select ${i.singularName}` : `Select from ${i.name}` }),
8904
+ title: /* @__PURE__ */ n(Y, { variant: "subtitle2", children: i.singularName ? `Select ${i.singularName}` : `Select from ${i.name}` }),
8905
8905
  defaultSize: i.defaultSize,
8906
8906
  properties: Q.properties,
8907
8907
  forceFilter: l,
@@ -8920,7 +8920,7 @@ function Gc({
8920
8920
  ) }),
8921
8921
  /* @__PURE__ */ v(It, { translucent: !1, children: [
8922
8922
  s && /* @__PURE__ */ n(
8923
- L,
8923
+ Y,
8924
8924
  {
8925
8925
  variant: "body2",
8926
8926
  className: "flex-grow text-left",
@@ -8968,7 +8968,7 @@ function jc({
8968
8968
  children: /* @__PURE__ */ n(pt, {})
8969
8969
  }
8970
8970
  ));
8971
- return /* @__PURE__ */ v(M, { children: [
8971
+ return /* @__PURE__ */ v(O, { children: [
8972
8972
  /* @__PURE__ */ n(
8973
8973
  ge,
8974
8974
  {
@@ -9006,7 +9006,7 @@ function _n({
9006
9006
  }
9007
9007
  },
9008
9008
  title: /* @__PURE__ */ n(
9009
- L,
9009
+ Y,
9010
9010
  {
9011
9011
  color: "secondary",
9012
9012
  className: "font-medium ml-1",
@@ -9057,7 +9057,7 @@ function Yc({
9057
9057
  }
9058
9058
  ),
9059
9059
  /* @__PURE__ */ n(
9060
- L,
9060
+ Y,
9061
9061
  {
9062
9062
  gutterBottom: !0,
9063
9063
  variant: "h5",
@@ -9066,12 +9066,12 @@ function Yc({
9066
9066
  }
9067
9067
  ),
9068
9068
  t && /* @__PURE__ */ n(
9069
- L,
9069
+ Y,
9070
9070
  {
9071
9071
  variant: "body2",
9072
9072
  color: "secondary",
9073
9073
  component: "div",
9074
- children: /* @__PURE__ */ n(bi, { source: t, size: "small" })
9074
+ children: /* @__PURE__ */ n(yi, { source: t, size: "small" })
9075
9075
  }
9076
9076
  )
9077
9077
  ]
@@ -9087,14 +9087,14 @@ function Lc({
9087
9087
  url: t,
9088
9088
  icon: r
9089
9089
  }) {
9090
- return /* @__PURE__ */ n(M, { children: /* @__PURE__ */ v(
9090
+ return /* @__PURE__ */ n(O, { children: /* @__PURE__ */ v(
9091
9091
  Er,
9092
9092
  {
9093
9093
  tabIndex: 0,
9094
9094
  className: U(
9095
9095
  La,
9096
9096
  Ua,
9097
- ii,
9097
+ ni,
9098
9098
  "cursor-pointer flex flex-row items-center px-4 py-2 text-inherit dark:text-inherit visited:text-inherit visited:dark:text-inherit hover:text-inherit hover:dark:text-inherit "
9099
9099
  ),
9100
9100
  to: t,
@@ -9102,7 +9102,7 @@ function Lc({
9102
9102
  /* @__PURE__ */ v("div", { className: "flex flex-row items-center flex-grow gap-2 ", children: [
9103
9103
  r,
9104
9104
  /* @__PURE__ */ n(
9105
- L,
9105
+ Y,
9106
9106
  {
9107
9107
  gutterBottom: !0,
9108
9108
  variant: "h5",
@@ -9127,7 +9127,7 @@ function Uc({
9127
9127
  onClick: s,
9128
9128
  type: l
9129
9129
  }) {
9130
- const c = Pt(), d = /* @__PURE__ */ n(li, { collectionOrView: t ?? r }), u = Kt(), f = Re(), m = fe(), p = (c?.favouritePaths ?? []).includes(e), h = c ? [
9130
+ const c = Pt(), d = /* @__PURE__ */ n(ci, { collectionOrView: t ?? r }), u = Kt(), f = Re(), m = fe(), p = (c?.favouritePaths ?? []).includes(e), h = c ? [
9131
9131
  /* @__PURE__ */ n(
9132
9132
  de,
9133
9133
  {
@@ -9172,7 +9172,7 @@ function Uc({
9172
9172
  ) : null
9173
9173
  ));
9174
9174
  }
9175
- const A = /* @__PURE__ */ n(M, { children: h });
9175
+ const A = /* @__PURE__ */ n(O, { children: h });
9176
9176
  return l === "admin" ? /* @__PURE__ */ n(
9177
9177
  Lc,
9178
9178
  {
@@ -9207,7 +9207,7 @@ function $c({ entry: e }) {
9207
9207
  );
9208
9208
  };
9209
9209
  return /* @__PURE__ */ n(
9210
- gi,
9210
+ Ai,
9211
9211
  {
9212
9212
  onClick: () => t(e.url),
9213
9213
  icon: i ? /* @__PURE__ */ n(
@@ -9243,21 +9243,21 @@ function qc({ hidden: e }) {
9243
9243
  a.path
9244
9244
  )) }) });
9245
9245
  }
9246
- const Hr = {};
9246
+ const Zr = {};
9247
9247
  function Wc() {
9248
9248
  const e = Cr(), t = S.useRef(null), [r, i] = S.useState(0), [a, o] = S.useState("down"), s = x(() => {
9249
- !t.current || !e.key || (Hr[e.key] = t.current.scrollTop, i(t.current.scrollTop), o(t.current.scrollTop > r ? "down" : "up"));
9249
+ !t.current || !e.key || (Zr[e.key] = t.current.scrollTop, i(t.current.scrollTop), o(t.current.scrollTop > r ? "down" : "up"));
9250
9250
  }, [t, e.key, r]);
9251
- return O(() => {
9251
+ return M(() => {
9252
9252
  const l = t.current;
9253
9253
  if (l)
9254
9254
  return l.addEventListener("scroll", s, { passive: !0 }), () => {
9255
9255
  l && l.removeEventListener("scroll", s);
9256
9256
  };
9257
- }, [t, s, e]), O(() => {
9258
- !t.current || !Hr[e.key] || t.current.scrollTo(
9257
+ }, [t, s, e]), M(() => {
9258
+ !t.current || !Zr[e.key] || t.current.scrollTo(
9259
9259
  {
9260
- top: Hr[e.key],
9260
+ top: Zr[e.key],
9261
9261
  behavior: "auto"
9262
9262
  }
9263
9263
  );
@@ -9288,7 +9288,7 @@ function Jc({
9288
9288
  navigationEntries: d,
9289
9289
  groups: u
9290
9290
  } = o.topLevelNavigation, [f, m] = P(null), p = f ? d.filter((b) => f.includes(b.url)) : d;
9291
- O(() => {
9291
+ M(() => {
9292
9292
  Bt.addDocuments(d);
9293
9293
  }, [d]);
9294
9294
  const h = x(
@@ -9308,7 +9308,7 @@ function Jc({
9308
9308
  const b = {
9309
9309
  context: i
9310
9310
  };
9311
- w = /* @__PURE__ */ n(M, { children: a.plugins.filter((_) => _.homePage?.includeSection).map((_, k) => {
9311
+ w = /* @__PURE__ */ n(O, { children: a.plugins.filter((_) => _.homePage?.includeSection).map((_, k) => {
9312
9312
  const E = _.homePage.includeSection(b);
9313
9313
  return /* @__PURE__ */ n(
9314
9314
  _n,
@@ -9334,7 +9334,7 @@ function Jc({
9334
9334
  style: { top: c === "down" ? -84 : 0 },
9335
9335
  children: [
9336
9336
  /* @__PURE__ */ n(
9337
- yi,
9337
+ wi,
9338
9338
  {
9339
9339
  onTextSearch: h,
9340
9340
  placeholder: "Search collections",
@@ -9429,7 +9429,7 @@ function Hc({
9429
9429
  {
9430
9430
  variant: "text",
9431
9431
  disabled: !A?.length || !y,
9432
- startIcon: /* @__PURE__ */ n(ri, {}),
9432
+ startIcon: /* @__PURE__ */ n(ii, {}),
9433
9433
  onClick: a,
9434
9434
  color: "primary",
9435
9435
  className: "lg:w-20",
@@ -9445,7 +9445,7 @@ function Hc({
9445
9445
  color: "primary",
9446
9446
  disabled: !A?.length || !y,
9447
9447
  onClick: a,
9448
- children: /* @__PURE__ */ n(ri, {})
9448
+ children: /* @__PURE__ */ n(ii, {})
9449
9449
  }
9450
9450
  );
9451
9451
  w = /* @__PURE__ */ n(
@@ -9468,7 +9468,7 @@ function Hc({
9468
9468
  }, _ = Jt(e.Actions).map((k, E) => /* @__PURE__ */ n(pe, { children: /* @__PURE__ */ n(k, { ...b }) }, `actions_${E}`));
9469
9469
  return m && m.forEach((k, E) => {
9470
9470
  k.collectionView?.CollectionActions && _.push(...Jt(k.collectionView?.CollectionActions).map((C, B) => /* @__PURE__ */ n(pe, { children: /* @__PURE__ */ n(C, { ...b, ...k.collectionView?.collectionActionsProps }) }, `plugin_actions_${E}_${B}`)));
9471
- }), /* @__PURE__ */ v(M, { children: [
9471
+ }), /* @__PURE__ */ v(O, { children: [
9472
9472
  _,
9473
9473
  w,
9474
9474
  g
@@ -9506,7 +9506,7 @@ function Zc({
9506
9506
  }, p = () => {
9507
9507
  e.current && (e.current.style.top = `${i}px`, e.current.style.left = `${r}px`);
9508
9508
  };
9509
- O(() => {
9509
+ M(() => {
9510
9510
  const h = e.current, A = t.current;
9511
9511
  if (!(!h || !A))
9512
9512
  return A && A.addEventListener("mousedown", d), h && h.addEventListener("mousedown", c), p(), () => {
@@ -9516,7 +9516,7 @@ function Zc({
9516
9516
  }
9517
9517
  function Xc() {
9518
9518
  const [e, t] = P({ width: 0, height: 0 });
9519
- return Kr(() => {
9519
+ return ei(() => {
9520
9520
  function r() {
9521
9521
  t({ width: window.innerWidth, height: window.innerHeight });
9522
9522
  }
@@ -9534,7 +9534,7 @@ const Kc = ({ onResize: e }) => {
9534
9534
  const s = r.current;
9535
9535
  s && s.contentDocument && s.contentDocument.defaultView && s.contentDocument.defaultView.addEventListener("resize", a);
9536
9536
  }, [a]);
9537
- return O(() => {
9537
+ return M(() => {
9538
9538
  const s = r.current;
9539
9539
  return () => {
9540
9540
  s && s.contentDocument && s.contentDocument.defaultView && s.contentDocument.defaultView.removeEventListener("resize", a);
@@ -9614,18 +9614,18 @@ function td({
9614
9614
  x: A?.x,
9615
9615
  y: A?.y,
9616
9616
  onMove: $
9617
- }), O(
9617
+ }), M(
9618
9618
  () => {
9619
9619
  D.current = !1;
9620
9620
  },
9621
9621
  [i, w]
9622
- ), Kr(
9622
+ ), ei(
9623
9623
  () => {
9624
9624
  const G = B.current?.getBoundingClientRect();
9625
9625
  !s || !G || D.current || ($(), D.current = !0);
9626
9626
  },
9627
9627
  [s, $, D.current]
9628
- ), Kr(
9628
+ ), ei(
9629
9629
  () => {
9630
9630
  $(A);
9631
9631
  },
@@ -9638,7 +9638,7 @@ function td({
9638
9638
  i && E.properties[i] ? { [i]: E.properties[i] } : {},
9639
9639
  r
9640
9640
  );
9641
- }, [E, y, i, r]), Y = x(() => $(A), [A, $]), X = async (G) => (h(null), a && w && d && i ? d({
9641
+ }, [E, y, i, r]), L = x(() => $(A), [A, $]), X = async (G) => (h(null), a && w && d && i ? d({
9642
9642
  value: G[i],
9643
9643
  propertyKey: i,
9644
9644
  data: w,
@@ -9647,7 +9647,7 @@ function td({
9647
9647
  }
9648
9648
  }) : Promise.resolve());
9649
9649
  if (!w)
9650
- return /* @__PURE__ */ n(M, {});
9650
+ return /* @__PURE__ */ n(O, {});
9651
9651
  const q = Sn({
9652
9652
  initialValues: w?.values ?? {},
9653
9653
  validation: (G) => oe?.validate(G, { abortEarly: !1 }).then(() => ({})).catch((I) => {
@@ -9661,7 +9661,7 @@ function td({
9661
9661
  X(G).then(() => c()).finally(() => I.setSubmitting(!1));
9662
9662
  }
9663
9663
  }), { values: V, isSubmitting: ae, setFieldValue: te, handleSubmit: Ae } = q;
9664
- if (O(() => {
9664
+ if (M(() => {
9665
9665
  J(V, _) || k(V);
9666
9666
  }, [V]), !w)
9667
9667
  return /* @__PURE__ */ n(
@@ -9671,7 +9671,7 @@ function td({
9671
9671
  }
9672
9672
  );
9673
9673
  if (!E)
9674
- return /* @__PURE__ */ n(M, {});
9674
+ return /* @__PURE__ */ n(O, {});
9675
9675
  const ue = ae, se = {
9676
9676
  collection: E,
9677
9677
  entityId: y,
@@ -9692,7 +9692,7 @@ function td({
9692
9692
  partOfBlock: !1,
9693
9693
  autoFocus: l
9694
9694
  } : void 0;
9695
- let ne = /* @__PURE__ */ n(M, { children: /* @__PURE__ */ n(
9695
+ let ne = /* @__PURE__ */ n(O, { children: /* @__PURE__ */ n(
9696
9696
  "div",
9697
9697
  {
9698
9698
  className: "w-[560px] max-w-full max-h-[85vh]",
@@ -9756,7 +9756,7 @@ function td({
9756
9756
  className: `text-gray-900 dark:text-white overflow-auto rounded rounded-md bg-white dark:bg-gray-950 ${l ? "" : "hidden"} cursor-grab max-w-[100vw]`,
9757
9757
  children: [
9758
9758
  ne,
9759
- p && /* @__PURE__ */ n(L, { color: "error", children: p.message })
9759
+ p && /* @__PURE__ */ n(Y, { color: "error", children: p.message })
9760
9760
  ]
9761
9761
  }
9762
9762
  ), j = /* @__PURE__ */ v(
@@ -9768,7 +9768,7 @@ function td({
9768
9768
  className: `inline-block fixed z-20 shadow-outline rounded-md bg-white dark:bg-gray-950 ${l ? "visible" : "invisible"} cursor-grab overflow-visible`,
9769
9769
  ref: B,
9770
9770
  children: [
9771
- /* @__PURE__ */ n(Kc, { onResize: Y }),
9771
+ /* @__PURE__ */ n(Kc, { onResize: L }),
9772
9772
  /* @__PURE__ */ v(
9773
9773
  "div",
9774
9774
  {
@@ -9875,7 +9875,7 @@ function id({
9875
9875
  ];
9876
9876
  return d && d.forEach((m, p) => {
9877
9877
  m.collectionView?.CollectionActionsStart && f.push(...Jt(m.collectionView?.CollectionActionsStart).map((h, A) => /* @__PURE__ */ n(pe, { children: /* @__PURE__ */ n(h, { ...u, ...m.collectionView?.collectionActionsStartProps }) }, `plugin_actions_${p}_${A}`)));
9878
- }), /* @__PURE__ */ n(M, { children: f });
9878
+ }), /* @__PURE__ */ n(O, { children: f });
9879
9879
  }
9880
9880
  const nd = "collectionGroupParent", ta = S.memo(
9881
9881
  function({
@@ -9889,7 +9889,7 @@ const nd = "collectionGroupParent", ta = S.memo(
9889
9889
  const W = m?.getCollectionConfig(l);
9890
9890
  return W ? He(o, W) : o;
9891
9891
  }, [o, l, m?.getCollectionConfig]), y = S.useRef(g);
9892
- O(() => {
9892
+ M(() => {
9893
9893
  y.current = g;
9894
9894
  }, [g]);
9895
9895
  const w = $t(g, f, l, null), [b, _] = P(void 0), [k, E] = S.useState(void 0), [C, B] = S.useState(0), [Q, D] = P(0), F = x(() => {
@@ -9900,12 +9900,12 @@ const nd = "collectionGroupParent", ta = S.memo(
9900
9900
  }, [b]), z = x((W) => {
9901
9901
  const le = y.current;
9902
9902
  return mo(le, f, l, W ?? null) ? le.inlineEditing === void 0 || le.inlineEditing : !1;
9903
- }, [f, l]), $ = g.selectionEnabled === void 0 || g.selectionEnabled, oe = !z(), [Y, X] = P(!1), q = Ho(), V = g.selectionController ?? q, {
9903
+ }, [f, l]), $ = g.selectionEnabled === void 0 || g.selectionEnabled, oe = !z(), [L, X] = P(!1), q = Ho(), V = g.selectionController ?? q, {
9904
9904
  selectedEntities: ae,
9905
9905
  isEntitySelected: te,
9906
9906
  setSelectedEntities: Ae
9907
9907
  } = V;
9908
- O(() => {
9908
+ M(() => {
9909
9909
  E(void 0);
9910
9910
  }, [ae]);
9911
9911
  const ue = Jo({
@@ -9983,7 +9983,7 @@ const nd = "collectionGroupParent", ta = S.memo(
9983
9983
  setError: ye,
9984
9984
  data: we
9985
9985
  }) => {
9986
- const Je = ei({ ...we.values }, le, W), st = {
9986
+ const Je = ti({ ...we.values }, le, W), st = {
9987
9987
  path: l,
9988
9988
  entityId: we.id,
9989
9989
  values: Je,
@@ -10031,7 +10031,7 @@ const nd = "collectionGroupParent", ta = S.memo(
10031
10031
  {
10032
10032
  color: "primary",
10033
10033
  variant: "outlined",
10034
- startIcon: /* @__PURE__ */ n(Ai, { size: "small" }),
10034
+ startIcon: /* @__PURE__ */ n(bi, { size: "small" }),
10035
10035
  onClick: (we) => {
10036
10036
  we.stopPropagation(), u.open({
10037
10037
  path: l,
@@ -10107,14 +10107,14 @@ const nd = "collectionGroupParent", ta = S.memo(
10107
10107
  }
10108
10108
  );
10109
10109
  }, at = /* @__PURE__ */ n(
10110
- wi,
10110
+ vi,
10111
10111
  {
10112
- open: Y,
10112
+ open: L,
10113
10113
  onOpenChange: X,
10114
10114
  enabled: !!g.description,
10115
10115
  trigger: /* @__PURE__ */ v("div", { className: "flex flex-col items-start", children: [
10116
10116
  /* @__PURE__ */ n(
10117
- L,
10117
+ Y,
10118
10118
  {
10119
10119
  variant: "subtitle1",
10120
10120
  className: `leading-none truncate max-w-[160px] lg:max-w-[240px] ${g.description ? "cursor-pointer" : "cursor-auto"}`,
@@ -10135,7 +10135,7 @@ const nd = "collectionGroupParent", ta = S.memo(
10135
10135
  }
10136
10136
  )
10137
10137
  ] }),
10138
- children: g.description && /* @__PURE__ */ n("div", { className: "m-4 text-gray-900 dark:text-white", children: /* @__PURE__ */ n(bi, { source: g.description }) })
10138
+ children: g.description && /* @__PURE__ */ n("div", { className: "m-4 text-gray-900 dark:text-white", children: /* @__PURE__ */ n(yi, { source: g.description }) })
10139
10139
  }
10140
10140
  ), Tt = x(({
10141
10141
  property: W,
@@ -10143,7 +10143,7 @@ const nd = "collectionGroupParent", ta = S.memo(
10143
10143
  onHover: be
10144
10144
  }) => {
10145
10145
  const ye = y.current;
10146
- return h.plugins ? /* @__PURE__ */ n(M, { children: h.plugins.filter((we) => we.collectionView?.HeaderAction).map((we, Je) => {
10146
+ return h.plugins ? /* @__PURE__ */ n(O, { children: h.plugins.filter((we) => we.collectionView?.HeaderAction).map((we, Je) => {
10147
10147
  const st = we.collectionView.HeaderAction;
10148
10148
  return /* @__PURE__ */ n(
10149
10149
  st,
@@ -10158,7 +10158,7 @@ const nd = "collectionGroupParent", ta = S.memo(
10158
10158
  `plugin_header_action_${Je}`
10159
10159
  );
10160
10160
  }) }) : null;
10161
- }, [h.plugins, l, r]), Qr = I ? function() {
10161
+ }, [h.plugins, l, r]), Dr = I ? function() {
10162
10162
  return typeof I == "function" ? /* @__PURE__ */ n(
10163
10163
  I,
10164
10164
  {
@@ -10168,10 +10168,10 @@ const nd = "collectionGroupParent", ta = S.memo(
10168
10168
  }
10169
10169
  ) : null;
10170
10170
  } : void 0, {
10171
- textSearchLoading: Dr,
10172
- textSearchInitialised: Rr,
10171
+ textSearchLoading: Rr,
10172
+ textSearchInitialised: Tr,
10173
10173
  onTextSearchClick: bt,
10174
- textSearchEnabled: Tr
10174
+ textSearchEnabled: Or
10175
10175
  } = Zo({
10176
10176
  collection: g,
10177
10177
  fullPath: Ve,
@@ -10202,9 +10202,9 @@ const nd = "collectionGroupParent", ta = S.memo(
10202
10202
  defaultSize: g.defaultSize,
10203
10203
  properties: Te.properties,
10204
10204
  getPropertyFor: Ce,
10205
- onTextSearchClick: Rr ? void 0 : bt,
10206
- textSearchLoading: Dr,
10207
- textSearchEnabled: Tr,
10205
+ onTextSearchClick: Tr ? void 0 : bt,
10206
+ textSearchLoading: Rr,
10207
+ textSearchEnabled: Or,
10208
10208
  actionsStart: /* @__PURE__ */ n(
10209
10209
  id,
10210
10210
  {
@@ -10233,7 +10233,7 @@ const nd = "collectionGroupParent", ta = S.memo(
10233
10233
  }
10234
10234
  ),
10235
10235
  emptyComponent: w && ue.filterValues === void 0 && ue.sortBy === void 0 ? /* @__PURE__ */ v("div", { className: "flex flex-col items-center justify-center", children: [
10236
- /* @__PURE__ */ n(L, { variant: "subtitle2", children: "So empty..." }),
10236
+ /* @__PURE__ */ n(Y, { variant: "subtitle2", children: "So empty..." }),
10237
10237
  /* @__PURE__ */ v(
10238
10238
  ge,
10239
10239
  {
@@ -10247,11 +10247,11 @@ const nd = "collectionGroupParent", ta = S.memo(
10247
10247
  ]
10248
10248
  }
10249
10249
  )
10250
- ] }) : /* @__PURE__ */ n(L, { variant: "label", children: "No results with the applied filter/sort" }),
10250
+ ] }) : /* @__PURE__ */ n(Y, { variant: "label", children: "No results with the applied filter/sort" }),
10251
10251
  hoverRow: oe,
10252
10252
  inlineEditing: z(),
10253
10253
  AdditionalHeaderWidget: Tt,
10254
- AddColumnComponent: Qr,
10254
+ AddColumnComponent: Dr,
10255
10255
  getIdColumnWidth: ir,
10256
10256
  additionalIDHeaderWidget: /* @__PURE__ */ n(
10257
10257
  ad,
@@ -10307,7 +10307,7 @@ function od({
10307
10307
  onCountChange: a
10308
10308
  }) {
10309
10309
  const o = tt(t), s = _e(), [l, c] = P(void 0), [d, u] = P(void 0), f = i ? i[0] : void 0, m = i ? i[1] : void 0, p = he(() => s.resolveAliasesFrom(e), [e, s.resolveAliasesFrom]);
10310
- return O(() => {
10310
+ return M(() => {
10311
10311
  o.countEntities && o.countEntities({
10312
10312
  path: p,
10313
10313
  collection: t,
@@ -10315,10 +10315,10 @@ function od({
10315
10315
  orderBy: f,
10316
10316
  order: m
10317
10317
  }).then(c).catch(u);
10318
- }, [e, o.countEntities, p, t, r, f, m]), O(() => {
10318
+ }, [e, o.countEntities, p, t, r, f, m]), M(() => {
10319
10319
  a && (u(void 0), a(l ?? 0));
10320
10320
  }, [a, l]), d ? null : /* @__PURE__ */ n(
10321
- L,
10321
+ Y,
10322
10322
  {
10323
10323
  className: "w-full text-ellipsis block overflow-hidden whitespace-nowrap max-w-xs text-left w-fit-content",
10324
10324
  variant: "caption",
@@ -10340,7 +10340,7 @@ function ad({
10340
10340
  }) {
10341
10341
  const [r, i] = S.useState(!1), [a, o] = S.useState(""), s = Ft();
10342
10342
  return /* @__PURE__ */ n(ke, { title: r ? void 0 : "Find by ID", children: /* @__PURE__ */ n(
10343
- wi,
10343
+ vi,
10344
10344
  {
10345
10345
  open: r,
10346
10346
  onOpenChange: i,
@@ -10396,7 +10396,7 @@ function Sm({ propertyConfig: e }) {
10396
10396
  style: {
10397
10397
  background: e?.color ?? r?.color ?? "#888"
10398
10398
  },
10399
- children: e?.Icon ? ai(e, "medium") : ai(r, "medium")
10399
+ children: e?.Icon ? si(e, "medium") : si(r, "medium")
10400
10400
  }
10401
10401
  );
10402
10402
  }
@@ -10407,7 +10407,7 @@ function sd() {
10407
10407
  className: "m-auto flex items-center flex-col",
10408
10408
  children: [
10409
10409
  /* @__PURE__ */ n(
10410
- L,
10410
+ Y,
10411
10411
  {
10412
10412
  variant: "h4",
10413
10413
  align: "center",
@@ -10415,7 +10415,7 @@ function sd() {
10415
10415
  children: "Page not found"
10416
10416
  }
10417
10417
  ),
10418
- /* @__PURE__ */ n(L, { align: "center", gutterBottom: !0, children: "This page does not exist or you may not have access to it" }),
10418
+ /* @__PURE__ */ n(Y, { align: "center", gutterBottom: !0, children: "This page does not exist or you may not have access to it" }),
10419
10419
  /* @__PURE__ */ n(
10420
10420
  ge,
10421
10421
  {
@@ -10438,13 +10438,13 @@ function Im({
10438
10438
  body: o
10439
10439
  }) {
10440
10440
  return /* @__PURE__ */ v(
10441
- ki,
10441
+ _i,
10442
10442
  {
10443
10443
  open: e,
10444
10444
  onOpenChange: (s) => s ? void 0 : r(),
10445
10445
  children: [
10446
- /* @__PURE__ */ v(_i, { children: [
10447
- /* @__PURE__ */ n(L, { variant: "h6", className: "mb-2", children: i }),
10446
+ /* @__PURE__ */ v(xi, { children: [
10447
+ /* @__PURE__ */ n(Y, { variant: "h6", className: "mb-2", children: i }),
10448
10448
  o
10449
10449
  ] }),
10450
10450
  /* @__PURE__ */ v(It, { children: [
@@ -10695,7 +10695,7 @@ const ld = function({
10695
10695
  }
10696
10696
  ) : /* @__PURE__ */ n(ia, { width: "32px", height: "32px" })),
10697
10697
  typeof t == "string" ? /* @__PURE__ */ n(
10698
- L,
10698
+ Y,
10699
10699
  {
10700
10700
  variant: "subtitle1",
10701
10701
  noWrap: !0,
@@ -10721,8 +10721,8 @@ const ld = function({
10721
10721
  ),
10722
10722
  /* @__PURE__ */ v(St, { trigger: w, children: [
10723
10723
  y && /* @__PURE__ */ v("div", { className: "px-4 py-2 mb-2", children: [
10724
- y.displayName && /* @__PURE__ */ n(L, { variant: "body1", color: "secondary", children: y.displayName }),
10725
- y.email && /* @__PURE__ */ n(L, { variant: "body2", color: "secondary", children: y.email })
10724
+ y.displayName && /* @__PURE__ */ n(Y, { variant: "body1", color: "secondary", children: y.displayName }),
10725
+ y.email && /* @__PURE__ */ n(Y, { variant: "body2", color: "secondary", children: y.email })
10726
10726
  ] }),
10727
10727
  a,
10728
10728
  !a && /* @__PURE__ */ v(Pe, { onClick: p.signOut, children: [
@@ -10751,7 +10751,7 @@ function oa({
10751
10751
  const u = r && Array.isArray(r) && r.length > 0, f = ce(cd(r)), [m, p] = P(
10752
10752
  u ? Object.values(f.current) : []
10753
10753
  );
10754
- O(() => {
10754
+ M(() => {
10755
10755
  if (u && r && r.length !== m.length) {
10756
10756
  const w = r.map((b, _) => {
10757
10757
  const k = io(b) + _;
@@ -10946,7 +10946,7 @@ function dd({
10946
10946
  /* @__PURE__ */ v(Pe, { dense: !0, onClick: (d) => {
10947
10947
  l(!1), r(i);
10948
10948
  }, children: [
10949
- /* @__PURE__ */ n(xi, { size: "small" }),
10949
+ /* @__PURE__ */ n(Ei, { size: "small" }),
10950
10950
  "Remove"
10951
10951
  ] }),
10952
10952
  /* @__PURE__ */ v(Pe, { dense: !0, onClick: () => {
@@ -11073,8 +11073,8 @@ function Nm({
11073
11073
  );
11074
11074
  }
11075
11075
  const md = 220;
11076
- si && process.env.NODE_ENV !== "production" && Object.keys(si).forEach((e) => {
11077
- fi.includes(e) || console.warn(`The icon ${e} no longer exists. Remove it from \`iconSynonyms\``);
11076
+ li && process.env.NODE_ENV !== "production" && Object.keys(li).forEach((e) => {
11077
+ hi.includes(e) || console.warn(`The icon ${e} no longer exists. Remove it from \`iconSynonyms\``);
11078
11078
  });
11079
11079
  function Fm({
11080
11080
  selectedIcon: e = "",
@@ -11093,9 +11093,9 @@ function Fm({
11093
11093
  );
11094
11094
  return S.useEffect(() => (s(a), () => {
11095
11095
  s.clear();
11096
- }), [a, s]), /* @__PURE__ */ v(M, { children: [
11096
+ }), [a, s]), /* @__PURE__ */ v(O, { children: [
11097
11097
  /* @__PURE__ */ n(
11098
- yi,
11098
+ wi,
11099
11099
  {
11100
11100
  autoFocus: !1,
11101
11101
  innerClassName: "w-full sticky top-0 z-10",
@@ -11103,14 +11103,14 @@ function Fm({
11103
11103
  placeholder: "Search for more icons…"
11104
11104
  }
11105
11105
  ),
11106
- /* @__PURE__ */ n("div", { className: "flex max-w-full flex-wrap mt-4", children: (r === null ? ti : r).map((c) => /* @__PURE__ */ n(ke, { title: c, children: /* @__PURE__ */ n(
11106
+ /* @__PURE__ */ n("div", { className: "flex max-w-full flex-wrap mt-4", children: (r === null ? ri : r).map((c) => /* @__PURE__ */ n(ke, { title: c, children: /* @__PURE__ */ n(
11107
11107
  de,
11108
11108
  {
11109
11109
  shape: "square",
11110
11110
  toggled: e === c,
11111
11111
  onClick: t ? () => t(c) : void 0,
11112
11112
  className: "box-content m-1",
11113
- children: /* @__PURE__ */ n(hi, { iconKey: c, size: 24 })
11113
+ children: /* @__PURE__ */ n(gi, { iconKey: c, size: 24 })
11114
11114
  }
11115
11115
  ) }, c)) })
11116
11116
  ] });
@@ -11119,7 +11119,7 @@ function Pm({
11119
11119
  error: e,
11120
11120
  children: t
11121
11121
  }) {
11122
- return t ? /* @__PURE__ */ n(L, { variant: "caption", color: e ? "error" : "secondary", className: "ml-3.5 mt-0.5", children: t }) : null;
11122
+ return t ? /* @__PURE__ */ n(Y, { variant: "caption", color: e ? "error" : "secondary", className: "ml-3.5 mt-0.5", children: t }) : null;
11123
11123
  }
11124
11124
  function Mi({
11125
11125
  name: e,
@@ -11161,7 +11161,7 @@ function Me({
11161
11161
  return null;
11162
11162
  if (t && e)
11163
11163
  return /* @__PURE__ */ n(
11164
- L,
11164
+ Y,
11165
11165
  {
11166
11166
  variant: "caption",
11167
11167
  className: "ml-3.5 text-red-500 dark:text-red-500",
@@ -11171,7 +11171,7 @@ function Me({
11171
11171
  const s = typeof r.disabled == "object" ? r.disabled.disabledMessage : void 0;
11172
11172
  return /* @__PURE__ */ v("div", { className: "flex ml-3.5 mt-1", children: [
11173
11173
  /* @__PURE__ */ n(
11174
- L,
11174
+ Y,
11175
11175
  {
11176
11176
  variant: "caption",
11177
11177
  color: a ? "disabled" : "secondary",
@@ -11247,7 +11247,7 @@ function En({
11247
11247
  const f = x((m) => {
11248
11248
  m.stopPropagation(), m.preventDefault(), r(null);
11249
11249
  }, [r]);
11250
- return /* @__PURE__ */ v(M, { children: [
11250
+ return /* @__PURE__ */ v(O, { children: [
11251
11251
  /* @__PURE__ */ n(
11252
11252
  nt,
11253
11253
  {
@@ -11455,15 +11455,22 @@ function pd({
11455
11455
  },
11456
11456
  C
11457
11457
  ) : /* @__PURE__ */ n("div", { children: "Internal ERROR" });
11458
- }, [f.path, f.previewProperties, t]), _ = /* @__PURE__ */ n(
11459
- ze,
11460
- {
11461
- icon: De(l, "small"),
11462
- required: l.validation?.required,
11463
- title: l.name,
11464
- className: "text-text-secondary dark:text-text-secondary-dark"
11465
- }
11466
- ), k = /* @__PURE__ */ v(M, { children: [
11458
+ }, [f.path, f.previewProperties, t]), _ = /* @__PURE__ */ v(O, { children: [
11459
+ /* @__PURE__ */ n(
11460
+ ze,
11461
+ {
11462
+ icon: De(l, "small"),
11463
+ required: l.validation?.required,
11464
+ title: l.name,
11465
+ className: "flex-grow text-text-secondary dark:text-text-secondary-dark"
11466
+ }
11467
+ ),
11468
+ Array.isArray(t) && /* @__PURE__ */ v(Y, { variant: "caption", className: "px-4", children: [
11469
+ "(",
11470
+ t.length,
11471
+ ")"
11472
+ ] })
11473
+ ] }), k = /* @__PURE__ */ v(O, { children: [
11467
11474
  !A && /* @__PURE__ */ n(
11468
11475
  Ne,
11469
11476
  {
@@ -11499,7 +11506,7 @@ function pd({
11499
11506
  )
11500
11507
  ] })
11501
11508
  ] });
11502
- return /* @__PURE__ */ v(M, { children: [
11509
+ return /* @__PURE__ */ v(O, { children: [
11503
11510
  !s && /* @__PURE__ */ n(
11504
11511
  ft,
11505
11512
  {
@@ -11551,7 +11558,7 @@ function aa({
11551
11558
  onClick: (s) => {
11552
11559
  s.stopPropagation(), i(r);
11553
11560
  },
11554
- children: /* @__PURE__ */ n(xi, { size: "small" })
11561
+ children: /* @__PURE__ */ n(Ei, { size: "small" })
11555
11562
  }
11556
11563
  )
11557
11564
  }
@@ -11608,7 +11615,7 @@ function Bn({
11608
11615
  property: l,
11609
11616
  value: t,
11610
11617
  setValue: r
11611
- }), /* @__PURE__ */ v(M, { children: [
11618
+ }), /* @__PURE__ */ v(O, { children: [
11612
11619
  !s && /* @__PURE__ */ n(
11613
11620
  ze,
11614
11621
  {
@@ -11697,7 +11704,7 @@ function wd({
11697
11704
  t ? Yn : xr,
11698
11705
  fd,
11699
11706
  a && l.length ? "" : "flex",
11700
- ii,
11707
+ ni,
11701
11708
  {
11702
11709
  [gd]: !b,
11703
11710
  [Ad]: b,
@@ -11759,7 +11766,7 @@ function wd({
11759
11766
  ref: Q.innerRef,
11760
11767
  ...Q.draggableProps,
11761
11768
  ...Q.dragHandleProps,
11762
- className: U(ii, "rounded-md"),
11769
+ className: U(ni, "rounded-md"),
11763
11770
  style: {
11764
11771
  ...Q.draggableProps.style
11765
11772
  },
@@ -11779,7 +11786,7 @@ function wd({
11779
11786
  {
11780
11787
  className: "flex-grow min-h-[38px] box-border m-2 text-center",
11781
11788
  children: /* @__PURE__ */ n(
11782
- L,
11789
+ Y,
11783
11790
  {
11784
11791
  align: "center",
11785
11792
  variant: "label",
@@ -11910,7 +11917,7 @@ function Vt({
11910
11917
  } else
11911
11918
  i(g.target.value);
11912
11919
  }, h = !!u, A = c.dataType === "number" ? "number" : void 0;
11913
- return /* @__PURE__ */ v(M, { children: [
11920
+ return /* @__PURE__ */ v(O, { children: [
11914
11921
  /* @__PURE__ */ n(
11915
11922
  xt,
11916
11923
  {
@@ -11982,7 +11989,7 @@ const kd = S.forwardRef(function({
11982
11989
  property: d,
11983
11990
  value: r,
11984
11991
  setValue: i
11985
- }), /* @__PURE__ */ v(M, { children: [
11992
+ }), /* @__PURE__ */ v(O, { children: [
11986
11993
  /* @__PURE__ */ n(
11987
11994
  _r,
11988
11995
  {
@@ -12031,7 +12038,7 @@ function _d({
12031
12038
  property: c,
12032
12039
  value: t,
12033
12040
  setValue: r
12034
- }), /* @__PURE__ */ v(M, { children: [
12041
+ }), /* @__PURE__ */ v(O, { children: [
12035
12042
  /* @__PURE__ */ n(
12036
12043
  Xt,
12037
12044
  {
@@ -12077,7 +12084,7 @@ function sa({
12077
12084
  }) {
12078
12085
  if (!l.entityId)
12079
12086
  throw new Error("ReadOnlyFieldBinding: Entity id is null");
12080
- return /* @__PURE__ */ v(M, { children: [
12087
+ return /* @__PURE__ */ v(O, { children: [
12081
12088
  !a && /* @__PURE__ */ n(
12082
12089
  ze,
12083
12090
  {
@@ -12153,7 +12160,7 @@ function Ed({
12153
12160
  ), g = x((y) => {
12154
12161
  y.preventDefault(), A.open();
12155
12162
  }, [A]);
12156
- return /* @__PURE__ */ v(M, { children: [
12163
+ return /* @__PURE__ */ v(O, { children: [
12157
12164
  /* @__PURE__ */ n(
12158
12165
  ze,
12159
12166
  {
@@ -12169,7 +12176,7 @@ function Ed({
12169
12176
  error: "The specified collection does not exist. Check console"
12170
12177
  }
12171
12178
  ),
12172
- p && /* @__PURE__ */ v(M, { children: [
12179
+ p && /* @__PURE__ */ v(O, { children: [
12173
12180
  e && /* @__PURE__ */ n(
12174
12181
  et,
12175
12182
  {
@@ -12213,7 +12220,7 @@ const Dt = S.memo(Cd, (e, t) => {
12213
12220
  if (e.propertyKey !== t.propertyKey)
12214
12221
  return !1;
12215
12222
  const r = Qe(e.property) || e.property.fromBuilder, i = Qe(t.property) || t.property.fromBuilder;
12216
- return !((r === i || J(e.property, t.property)) && e.disabled === t.disabled) || ui(t.property), !1;
12223
+ return !((r === i || J(e.property, t.property)) && e.disabled === t.disabled) || mi(t.property), !1;
12217
12224
  });
12218
12225
  function Cd({
12219
12226
  propertyKey: e,
@@ -12242,14 +12249,14 @@ function Cd({
12242
12249
  entityId: r.entityId,
12243
12250
  fields: u.propertyConfigs
12244
12251
  });
12245
- if (p === null || Bi(p))
12246
- return /* @__PURE__ */ n(M, {});
12252
+ if (p === null || Si(p))
12253
+ return /* @__PURE__ */ n(O, {});
12247
12254
  if (er(p))
12248
12255
  m = sa;
12249
12256
  else if (p.Field)
12250
12257
  typeof p.Field == "function" && (m = p.Field);
12251
12258
  else {
12252
- const A = Pr(p, u.propertyConfigs);
12259
+ const A = Qr(p, u.propertyConfigs);
12253
12260
  if (!A)
12254
12261
  throw console.log("INTERNAL: Could not find field config for property", {
12255
12262
  propertyKey: e,
@@ -12339,14 +12346,14 @@ function Bd({
12339
12346
  customProps: p,
12340
12347
  context: d
12341
12348
  } }),
12342
- a && !_ && /* @__PURE__ */ n(L, { variant: "caption", className: "ml-3.5", children: "This value has been updated elsewhere" })
12349
+ a && !_ && /* @__PURE__ */ n(Y, { variant: "caption", className: "ml-3.5", children: "This value has been updated elsewhere" })
12343
12350
  ] });
12344
12351
  }
12345
- const ui = (e, t) => {
12352
+ const mi = (e, t) => {
12346
12353
  if (t?.some((a) => a.form?.fieldBuilder) || Qe(e))
12347
12354
  return !0;
12348
12355
  const r = e, i = !!r.Field || "fromBuilder" in r && r.fromBuilder;
12349
- return r.dataType === "map" && r.properties ? i || Object.values(r.properties).some((a) => ui(a, t)) : r.dataType === "array" && "resolvedProperties" in r ? i || r.resolvedProperties?.some((a) => a && ui(a, t)) : i;
12356
+ return r.dataType === "map" && r.properties ? i || Object.values(r.properties).some((a) => mi(a, t)) : r.dataType === "array" && "resolvedProperties" in r ? i || r.resolvedProperties?.some((a) => a && mi(a, t)) : i;
12350
12357
  };
12351
12358
  function Sd({
12352
12359
  path: e,
@@ -12398,7 +12405,7 @@ function Id({
12398
12405
  o.properties,
12399
12406
  ...Object.keys(t).filter((y) => y in o.properties)
12400
12407
  ) : h = {} : h = o.properties;
12401
- const A = /* @__PURE__ */ n(M, { children: /* @__PURE__ */ n("div", { className: "py-1 flex flex-col space-y-2", children: Object.entries(h).filter(([y, w]) => !Bi(w)).map(
12408
+ const A = /* @__PURE__ */ n(O, { children: /* @__PURE__ */ n("div", { className: "py-1 flex flex-col space-y-2", children: Object.entries(h).filter(([y, w]) => !Si(w)).map(
12402
12409
  ([y, w], b) => {
12403
12410
  const _ = {
12404
12411
  propertyKey: `${e}.${y}`,
@@ -12485,7 +12492,7 @@ function Nd({
12485
12492
  className: "text-text-secondary dark:text-text-secondary-dark"
12486
12493
  }
12487
12494
  );
12488
- return /* @__PURE__ */ v(M, { children: [
12495
+ return /* @__PURE__ */ v(O, { children: [
12489
12496
  !l && /* @__PURE__ */ n(
12490
12497
  ft,
12491
12498
  {
@@ -12515,17 +12522,17 @@ function zi({
12515
12522
  disabled: i
12516
12523
  }) {
12517
12524
  const [a, o] = S.useState(
12518
- Object.keys(e ?? {}).map((c) => [Zr(), {
12525
+ Object.keys(e ?? {}).map((c) => [Xr(), {
12519
12526
  key: c,
12520
- dataType: mi(e?.[c]) ?? "string"
12527
+ dataType: pi(e?.[c]) ?? "string"
12521
12528
  }])
12522
12529
  );
12523
- O(() => {
12530
+ M(() => {
12524
12531
  const c = a.map(([p, { key: h }]) => h), d = Object.entries(e ?? {}).filter(([p, h]) => h !== void 0).map(([p]) => p), u = d.filter((p) => !c.includes(p)), f = c.filter((p) => !d.includes(p)), m = [...a];
12525
12532
  u.forEach((p) => {
12526
- m.push([Zr(), {
12533
+ m.push([Xr(), {
12527
12534
  key: p,
12528
- dataType: mi(e?.[p]) ?? "string"
12535
+ dataType: pi(e?.[p]) ?? "string"
12529
12536
  }]);
12530
12537
  }), f.forEach((p) => {
12531
12538
  const h = m.findIndex(([A, { key: g }]) => g === p);
@@ -12599,7 +12606,7 @@ function zi({
12599
12606
  c.preventDefault(), t({
12600
12607
  ...e ?? {},
12601
12608
  "": null
12602
- }), o([...a, [Zr(), {
12609
+ }), o([...a, [Xr(), {
12603
12610
  key: "",
12604
12611
  dataType: "string"
12605
12612
  }]]);
@@ -12738,7 +12745,7 @@ function Fd({
12738
12745
  )
12739
12746
  }
12740
12747
  ) : /* @__PURE__ */ n(
12741
- L,
12748
+ Y,
12742
12749
  {
12743
12750
  variant: "caption",
12744
12751
  children: `Data type ${A} not supported yet`
@@ -12748,9 +12755,9 @@ function Fd({
12748
12755
  function m(p) {
12749
12756
  c(e, p);
12750
12757
  }
12751
- return /* @__PURE__ */ v(M, { children: [
12758
+ return /* @__PURE__ */ v(O, { children: [
12752
12759
  /* @__PURE__ */ v(
12753
- L,
12760
+ Y,
12754
12761
  {
12755
12762
  component: "div",
12756
12763
  className: "font-mono flex flex-row gap-1",
@@ -12838,7 +12845,7 @@ function Fd({
12838
12845
  size: "small",
12839
12846
  onClick: a,
12840
12847
  className: "h-7 w-7",
12841
- children: /* @__PURE__ */ n(xi, { size: "small" })
12848
+ children: /* @__PURE__ */ n(Ei, { size: "small" })
12842
12849
  }
12843
12850
  )
12844
12851
  ]
@@ -12854,7 +12861,7 @@ function Pd({
12854
12861
  value: r,
12855
12862
  setValue: i
12856
12863
  }) {
12857
- const { locale: a } = fe(), [o, s] = P(mi(r) ?? "string");
12864
+ const { locale: a } = fe(), [o, s] = P(pi(r) ?? "string");
12858
12865
  function l(d) {
12859
12866
  s(d);
12860
12867
  }
@@ -12893,7 +12900,7 @@ function Pd({
12893
12900
  i(f);
12894
12901
  }
12895
12902
  }
12896
- ) : u === "array" ? /* @__PURE__ */ n(L, { variant: "caption", children: "Arrays of arrays are not supported." }) : u === "map" ? /* @__PURE__ */ n("div", { className: U(Se, "ml-2 pl-2 border-l border-solid"), children: /* @__PURE__ */ n(
12903
+ ) : u === "array" ? /* @__PURE__ */ n(Y, { variant: "caption", children: "Arrays of arrays are not supported." }) : u === "map" ? /* @__PURE__ */ n("div", { className: U(Se, "ml-2 pl-2 border-l border-solid"), children: /* @__PURE__ */ n(
12897
12904
  zi,
12898
12905
  {
12899
12906
  value: d,
@@ -12902,16 +12909,16 @@ function Pd({
12902
12909
  }
12903
12910
  }
12904
12911
  ) }) : /* @__PURE__ */ n(
12905
- L,
12912
+ Y,
12906
12913
  {
12907
12914
  variant: "caption",
12908
12915
  children: `Data type ${u} not supported yet`
12909
12916
  }
12910
12917
  );
12911
12918
  }
12912
- return /* @__PURE__ */ v(M, { children: [
12919
+ return /* @__PURE__ */ v(O, { children: [
12913
12920
  /* @__PURE__ */ v(
12914
- L,
12921
+ Y,
12915
12922
  {
12916
12923
  component: "div",
12917
12924
  className: "font-mono flex min-h-12 flex-row gap-1 items-center",
@@ -12979,10 +12986,10 @@ function Pd({
12979
12986
  o === "map" && c(r, o)
12980
12987
  ] });
12981
12988
  }
12982
- function Zr() {
12989
+ function Xr() {
12983
12990
  return Math.floor(Math.random() * Math.floor(Number.MAX_SAFE_INTEGER));
12984
12991
  }
12985
- function mi(e) {
12992
+ function pi(e) {
12986
12993
  if (typeof e == "string" || e === null)
12987
12994
  return "string";
12988
12995
  if (typeof e == "number")
@@ -13050,18 +13057,25 @@ function Qd({
13050
13057
  onInternalIdAdded: g,
13051
13058
  disabled: a || !!c.disabled,
13052
13059
  includeAddButton: !c.disabled,
13053
- newDefaultEntry: c.of.defaultValue
13054
- }
13055
- ), b = /* @__PURE__ */ n(
13056
- ze,
13057
- {
13058
- icon: De(c, "small"),
13059
- required: c.validation?.required,
13060
- title: c.name,
13061
- className: "text-text-secondary dark:text-text-secondary-dark"
13060
+ newDefaultEntry: Br(c.of)
13062
13061
  }
13063
- );
13064
- return /* @__PURE__ */ v(M, { children: [
13062
+ ), b = /* @__PURE__ */ v(O, { children: [
13063
+ /* @__PURE__ */ n(
13064
+ ze,
13065
+ {
13066
+ icon: De(c, "small"),
13067
+ required: c.validation?.required,
13068
+ title: c.name,
13069
+ className: "flex-grow text-text-secondary dark:text-text-secondary-dark"
13070
+ }
13071
+ ),
13072
+ Array.isArray(t) && /* @__PURE__ */ v(Y, { variant: "caption", className: "px-4", children: [
13073
+ "(",
13074
+ t.length,
13075
+ ")"
13076
+ ] })
13077
+ ] });
13078
+ return /* @__PURE__ */ v(O, { children: [
13065
13079
  !l && /* @__PURE__ */ n(
13066
13080
  ft,
13067
13081
  {
@@ -13141,11 +13155,11 @@ function Dd({
13141
13155
  setFieldValue: s,
13142
13156
  newDefaultEntry: {
13143
13157
  [c.oneOf.typeField ?? Lt]: w,
13144
- [c.oneOf.valueField ?? fr]: Si(c.oneOf.properties[w])
13158
+ [c.oneOf.valueField ?? fr]: Br(c.oneOf.properties[w])
13145
13159
  }
13146
13160
  }
13147
13161
  );
13148
- return /* @__PURE__ */ v(M, { children: [
13162
+ return /* @__PURE__ */ v(O, { children: [
13149
13163
  !l && /* @__PURE__ */ n(
13150
13164
  ft,
13151
13165
  {
@@ -13178,10 +13192,10 @@ function Rd({
13178
13192
  autoFocus: s,
13179
13193
  context: l
13180
13194
  }) {
13181
- const c = r && r[i], [d, u] = P(c ?? void 0), f = pi();
13182
- O(() => {
13195
+ const c = r && r[i], [d, u] = P(c ?? void 0), f = fi();
13196
+ M(() => {
13183
13197
  c || y(Object.keys(o)[0]);
13184
- }, []), O(() => {
13198
+ }, []), M(() => {
13185
13199
  c !== d && u(c);
13186
13200
  }, [c]);
13187
13201
  const m = d ? o[d] : void 0, p = Object.entries(o).map(([w, b]) => ({
@@ -13197,7 +13211,7 @@ function Rd({
13197
13211
  tableMode: !1
13198
13212
  } : void 0, y = (w) => {
13199
13213
  const b = w ? o[w] : void 0;
13200
- u(w), f.setFieldTouched(h, !0), f.setFieldValue(h, w), f.setFieldValue(A, b ? Si(b) : null);
13214
+ u(w), f.setFieldTouched(h, !0), f.setFieldValue(h, w), f.setFieldValue(A, b ? Br(b) : null);
13201
13215
  };
13202
13216
  return /* @__PURE__ */ v("div", { className: U(kr, "bg-transparent p-4 my-4 py-8"), children: [
13203
13217
  /* @__PURE__ */ n(
@@ -13206,12 +13220,12 @@ function Rd({
13206
13220
  name: h,
13207
13221
  children: (w) => {
13208
13222
  const b = w.field.value !== void 0 && w.field.value !== null ? w.field.value : "";
13209
- return /* @__PURE__ */ n(M, { children: /* @__PURE__ */ n(
13223
+ return /* @__PURE__ */ n(O, { children: /* @__PURE__ */ n(
13210
13224
  nt,
13211
13225
  {
13212
13226
  className: "mb-2",
13213
13227
  placeholder: /* @__PURE__ */ n(
13214
- L,
13228
+ Y,
13215
13229
  {
13216
13230
  variant: "caption",
13217
13231
  className: "px-4 py-2 font-medium",
@@ -13260,9 +13274,9 @@ function Rd({
13260
13274
  }
13261
13275
  const Td = new Is();
13262
13276
  try {
13263
- cr.use(jr.AutoResize, {
13277
+ cr.use(Yr.AutoResize, {
13264
13278
  min: 100
13265
- }), cr.unuse(jr.FontUnderline), cr.unuse(jr.Clear);
13279
+ }), cr.unuse(Yr.FontUnderline), cr.unuse(Yr.Clear);
13266
13280
  } catch {
13267
13281
  }
13268
13282
  function Od({
@@ -13285,13 +13299,13 @@ function Od({
13285
13299
  internalValue: m,
13286
13300
  value: t
13287
13301
  });
13288
- return O(() => {
13302
+ return M(() => {
13289
13303
  h.current = t, p(t);
13290
- }, [t]), O(() => {
13304
+ }, [t]), M(() => {
13291
13305
  A.internalValue !== h.current && r(A.internalValue);
13292
- }, [A]), /* @__PURE__ */ v(M, { children: [
13306
+ }, [A]), /* @__PURE__ */ v(O, { children: [
13293
13307
  !d && /* @__PURE__ */ n(
13294
- L,
13308
+ Y,
13295
13309
  {
13296
13310
  variant: "caption",
13297
13311
  className: "flex-grow",
@@ -13948,15 +13962,22 @@ function zd({
13948
13962
  value: t,
13949
13963
  setValue: o
13950
13964
  });
13951
- const p = /* @__PURE__ */ n(
13952
- ze,
13953
- {
13954
- icon: De(l, "small"),
13955
- required: l.validation?.required,
13956
- className: "text-text-secondary dark:text-text-secondary-dark",
13957
- title: l.name
13958
- }
13959
- ), h = l.resolvedProperties.map((A, g) => {
13965
+ const p = /* @__PURE__ */ v(O, { children: [
13966
+ /* @__PURE__ */ n(
13967
+ ze,
13968
+ {
13969
+ icon: De(l, "small"),
13970
+ required: l.validation?.required,
13971
+ title: l.name,
13972
+ className: "flex-grow text-text-secondary dark:text-text-secondary-dark"
13973
+ }
13974
+ ),
13975
+ Array.isArray(t) && /* @__PURE__ */ v(Y, { variant: "caption", className: "px-4", children: [
13976
+ "(",
13977
+ t.length,
13978
+ ")"
13979
+ ] })
13980
+ ] }), h = l.resolvedProperties.map((A, g) => {
13960
13981
  const y = {
13961
13982
  propertyKey: `${e}[${g}]`,
13962
13983
  disabled: f,
@@ -13971,7 +13992,7 @@ function zd({
13971
13992
  };
13972
13993
  return /* @__PURE__ */ n("div", { className: "pb-4", children: /* @__PURE__ */ n(Dt, { ...y }) }, `custom_shaped_array_${g}`);
13973
13994
  });
13974
- return /* @__PURE__ */ v(M, { children: [
13995
+ return /* @__PURE__ */ v(O, { children: [
13975
13996
  !s && /* @__PURE__ */ n(
13976
13997
  ft,
13977
13998
  {
@@ -14273,7 +14294,7 @@ function Gd(e) {
14273
14294
  }
14274
14295
  return Vi[t];
14275
14296
  }
14276
- function Pr(e, t) {
14297
+ function Qr(e, t) {
14277
14298
  const r = la(e), i = Gi(e);
14278
14299
  if (!i) {
14279
14300
  console.error("No field id found for property", e);
@@ -14533,7 +14554,7 @@ function ji(e) {
14533
14554
  path: t,
14534
14555
  collections: r = [],
14535
14556
  currentFullPath: i
14536
- } = e, a = Ee(t).split("/"), o = Ci(a), s = [];
14557
+ } = e, a = Ee(t).split("/"), o = Bi(a), s = [];
14537
14558
  for (let l = 0; l < o.length; l++) {
14538
14559
  const c = o[l], d = r && r.find((u) => u.id === c || u.path === c);
14539
14560
  if (d) {
@@ -14587,7 +14608,7 @@ function Ld({
14587
14608
  entity: o,
14588
14609
  loading: s
14589
14610
  }) {
14590
- const { errors: l } = pi(), c = r === "existing" || !e, d = r !== "existing" && !e, u = he(() => {
14611
+ const { errors: l } = fi(), c = r === "existing" || !e, d = r !== "existing" && !e, u = he(() => {
14591
14612
  if (!(!e || typeof e == "boolean" || e === "optional"))
14592
14613
  return ht(e);
14593
14614
  }, [e]), f = gt(), { copy: m } = ll({
@@ -14600,7 +14621,7 @@ function Ld({
14600
14621
  disabled: c || s,
14601
14622
  name: "id",
14602
14623
  value: (o && r === "existing" ? o.id : t) ?? "",
14603
- endAdornment: s ? /* @__PURE__ */ n(_t, { size: "small" }) : o ? /* @__PURE__ */ v(M, { children: [
14624
+ endAdornment: s ? /* @__PURE__ */ n(_t, { size: "small" }) : o ? /* @__PURE__ */ v(O, { children: [
14604
14625
  /* @__PURE__ */ n(ke, { title: "Copy", children: /* @__PURE__ */ n(
14605
14626
  de,
14606
14627
  {
@@ -14623,7 +14644,7 @@ function Ld({
14623
14644
  ) })
14624
14645
  ] }) : void 0
14625
14646
  };
14626
- return /* @__PURE__ */ v(M, { children: [
14647
+ return /* @__PURE__ */ v(O, { children: [
14627
14648
  u && /* @__PURE__ */ n(
14628
14649
  nt,
14629
14650
  {
@@ -14666,7 +14687,7 @@ function Ld({
14666
14687
  }
14667
14688
  ),
14668
14689
  l.id && /* @__PURE__ */ n(
14669
- L,
14690
+ Y,
14670
14691
  {
14671
14692
  variant: "caption",
14672
14693
  className: "ml-3.5 text-red-500 dark:text-red-500",
@@ -14676,8 +14697,8 @@ function Ld({
14676
14697
  ] });
14677
14698
  }
14678
14699
  const Ud = ({ containerRef: e }) => {
14679
- const { isSubmitting: t, isValidating: r, errors: i } = pi();
14680
- return O(() => {
14700
+ const { isSubmitting: t, isValidating: r, errors: i } = fi();
14701
+ return M(() => {
14681
14702
  const a = Object.keys(i);
14682
14703
  if (a.length > 0 && t && !r) {
14683
14704
  const o = e?.current?.querySelector(
@@ -14706,7 +14727,7 @@ function qd({ propertyId: e }) {
14706
14727
  return /* @__PURE__ */ v("div", { className: "flex flex-row gap-2 items-center justify-center text-white", children: [
14707
14728
  /* @__PURE__ */ v("div", { children: [
14708
14729
  /* @__PURE__ */ n(
14709
- L,
14730
+ Y,
14710
14731
  {
14711
14732
  variant: "caption",
14712
14733
  className: "min-w-20 text-slate-400",
@@ -14714,7 +14735,7 @@ function qd({ propertyId: e }) {
14714
14735
  children: t ? "Copied" : "Property ID"
14715
14736
  }
14716
14737
  ),
14717
- /* @__PURE__ */ n(L, { variant: "caption", className: "text-white", children: /* @__PURE__ */ n("code", { children: e }) })
14738
+ /* @__PURE__ */ n(Y, { variant: "caption", className: "text-white", children: /* @__PURE__ */ n("code", { children: e }) })
14718
14739
  ] }),
14719
14740
  /* @__PURE__ */ n(de, { size: "small", children: /* @__PURE__ */ n(
14720
14741
  vr,
@@ -14783,16 +14804,16 @@ function Jd({
14783
14804
  path: e,
14784
14805
  values: d?.values,
14785
14806
  fields: k.propertyConfigs
14786
- }), [d?.values, e, k.propertyConfigs]), D = i ? "copy" : t ? "existing" : "new", [F, z] = P(D), $ = (F === "new" || F === "copy") && !!Q.customId && Q.customId !== "optional", oe = he(() => F === "new" || F === "copy" ? $ ? void 0 : y.generateEntityId(e) : t, [t, F]), [Y, X] = S.useState(oe), [q, V] = S.useState(!1), [ae, te] = S.useState(), [Ae, ue] = S.useState(!1), se = r ?? lo(
14807
+ }), [d?.values, e, k.propertyConfigs]), D = i ? "copy" : t ? "existing" : "new", [F, z] = P(D), $ = (F === "new" || F === "copy") && !!Q.customId && Q.customId !== "optional", oe = he(() => F === "new" || F === "copy" ? $ ? void 0 : y.generateEntityId(e) : t, [t, F]), [L, X] = S.useState(oe), [q, V] = S.useState(!1), [ae, te] = S.useState(), [Ae, ue] = S.useState(!1), se = r ?? lo(
14787
14808
  a ? a.defaultSelectedView : void 0,
14788
14809
  {
14789
14810
  status: F,
14790
- entityId: Y
14811
+ entityId: L
14791
14812
  }
14792
14813
  ), ee = ce(se ?? Gt), T = ce(Hd(Q, F, d)), ne = ee.current === Gt, K = (a.subcollections ?? []).filter((N) => !N.hideFromNavigation), H = K?.length ?? 0, j = a.entityViews, G = j?.length ?? 0, I = a.formAutoSave && !a.customId, R = G > 0 || H > 0, [me, Ie] = P(d), [Xe, ie] = P(void 0);
14793
- O(() => {
14814
+ M(() => {
14794
14815
  d && Ie(d);
14795
- }, [d]), O(() => {
14816
+ }, [d]), M(() => {
14796
14817
  if (F === "new")
14797
14818
  ie(!1);
14798
14819
  else {
@@ -14825,8 +14846,8 @@ function Jd({
14825
14846
  m(!1), _.open({
14826
14847
  type: "error",
14827
14848
  message: "Error saving: " + N?.message
14828
- }), console.error("Error saving entity", e, Y), console.error(N);
14829
- }, [Y, e, _]), We = ({
14849
+ }), console.error("Error saving entity", e, L), console.error(N);
14850
+ }, [L, e, _]), We = ({
14830
14851
  values: N,
14831
14852
  previousValues: Z,
14832
14853
  closeAfterSave: ve,
@@ -14842,7 +14863,7 @@ function Jd({
14842
14863
  status: F,
14843
14864
  dataSource: y,
14844
14865
  context: E,
14845
- onSaveSuccess: (zr) => Te(zr, ve),
14866
+ onSaveSuccess: (Vr) => Te(Vr, ve),
14846
14867
  onSaveFailure: Ce,
14847
14868
  onPreSaveHookError: xe,
14848
14869
  onSaveSuccessHookError: Ve
@@ -14853,10 +14874,10 @@ function Jd({
14853
14874
  values: Ge,
14854
14875
  previousValues: it,
14855
14876
  closeAfterSave: zt,
14856
- autoSave: zr
14877
+ autoSave: Vr
14857
14878
  }) => {
14858
14879
  if (F)
14859
- if (zr)
14880
+ if (Vr)
14860
14881
  h(Ge);
14861
14882
  else
14862
14883
  return We({
@@ -14868,7 +14889,7 @@ function Jd({
14868
14889
  closeAfterSave: zt
14869
14890
  });
14870
14891
  }, rt = (N, Z) => {
14871
- if ($ && !Y) {
14892
+ if ($ && !L) {
14872
14893
  console.error("Missing custom Id"), V(!0), Z.setSubmitting(!1);
14873
14894
  return;
14874
14895
  }
@@ -14876,7 +14897,7 @@ function Jd({
14876
14897
  if (!d?.id)
14877
14898
  throw Error("Form misconfiguration when saving, no id for existing entity");
14878
14899
  } else if (F === "new" || F === "copy") {
14879
- if (A.customId && A.customId !== "optional" && !Y)
14900
+ if (A.customId && A.customId !== "optional" && !L)
14880
14901
  throw Error("Form misconfiguration when saving, entityId should be set");
14881
14902
  } else
14882
14903
  throw Error("New FormType added, check EntityForm");
@@ -14901,14 +14922,14 @@ function Jd({
14901
14922
  }), Be = Le({
14902
14923
  collection: A,
14903
14924
  path: e,
14904
- entityId: Y,
14925
+ entityId: L,
14905
14926
  values: re.values,
14906
14927
  previousValues: re.initialValues,
14907
14928
  fields: k.propertyConfigs
14908
14929
  }), ir = ce(d?.values), Rt = (N) => (ir.current = N, Ke({
14909
14930
  collection: Be,
14910
14931
  path: e,
14911
- entityId: Y,
14932
+ entityId: L,
14912
14933
  values: N,
14913
14934
  previousValues: d?.values,
14914
14935
  closeAfterSave: C.current,
@@ -14925,11 +14946,11 @@ function Jd({
14925
14946
  setFieldValue: x(re.setFieldValue, []),
14926
14947
  values: re.values,
14927
14948
  collection: Be,
14928
- entityId: Y,
14949
+ entityId: L,
14929
14950
  path: e,
14930
14951
  save: Rt,
14931
14952
  formex: re
14932
- }, Tt = j ? j.map((N) => ua(N, k.entityViews)).filter(Boolean) : [], Qr = Tt.find((N) => N.key === ee.current), Dr = !I && (ee.current === Gt || Qr?.includeActions), Rr = j && Tt.map(
14953
+ }, Tt = j ? j.map((N) => ua(N, k.entityViews)).filter(Boolean) : [], Dr = Tt.find((N) => N.key === ee.current), Rr = !I && (ee.current === Gt || Dr?.includeActions), Tr = j && Tt.map(
14933
14954
  (N, Z) => {
14934
14955
  if (!N || ee.current !== N.key)
14935
14956
  return null;
@@ -14955,7 +14976,7 @@ function Jd({
14955
14976
  `custom_view_${N.key}`
14956
14977
  ) : (console.error("customView.Builder is not defined"), null);
14957
14978
  }
14958
- ).filter(Boolean), bt = u && !me || (!me || Xe === void 0) && (F === "existing" || F === "copy"), Tr = bt || f, W = K && K.map(
14979
+ ).filter(Boolean), bt = u && !me || (!me || Xe === void 0) && (F === "existing" || F === "copy"), Or = bt || f, W = K && K.map(
14959
14980
  (N, Z) => {
14960
14981
  const ve = N.id ?? N.path, Ge = me ? `${e}/${me?.id}/${Ee(ve)}` : void 0;
14961
14982
  return ee.current !== ve ? null : /* @__PURE__ */ v(
@@ -14964,7 +14985,7 @@ function Jd({
14964
14985
  className: "relative flex-grow h-full overflow-auto w-full",
14965
14986
  role: "tabpanel",
14966
14987
  children: [
14967
- Tr && /* @__PURE__ */ n(yr, {}),
14988
+ Or && /* @__PURE__ */ n(yr, {}),
14968
14989
  !bt && (me && Ge ? /* @__PURE__ */ n(
14969
14990
  ta,
14970
14991
  {
@@ -14977,7 +14998,7 @@ function Jd({
14977
14998
  "div",
14978
14999
  {
14979
15000
  className: "flex items-center justify-center w-full h-full p-3",
14980
- children: /* @__PURE__ */ n(L, { variant: "label", children: "You need to save your entity before adding additional collections" })
15001
+ children: /* @__PURE__ */ n(Y, { variant: "label", children: "You need to save your entity before adding additional collections" })
14981
15002
  }
14982
15003
  ))
14983
15004
  ]
@@ -14990,7 +15011,7 @@ function Jd({
14990
15011
  }, []), be = (N) => {
14991
15012
  ee.current = N, b.replace({
14992
15013
  path: e,
14993
- entityId: Y,
15014
+ entityId: L,
14994
15015
  selectedSubPath: N === Gt ? void 0 : N,
14995
15016
  updateUrl: !0,
14996
15017
  collection: a
@@ -15008,12 +15029,12 @@ function Jd({
15008
15029
  }, []), Je = [], st = k.plugins;
15009
15030
  if (st && A) {
15010
15031
  const N = {
15011
- entityId: Y,
15032
+ entityId: L,
15012
15033
  path: e,
15013
15034
  status: F,
15014
15035
  collection: A,
15015
15036
  context: E,
15016
- currentEntityId: Y,
15037
+ currentEntityId: L,
15017
15038
  formContext: at
15018
15039
  };
15019
15040
  Je.push(...st.map((Z, ve) => Z.form?.Actions ? /* @__PURE__ */ n(
@@ -15031,7 +15052,7 @@ function Jd({
15031
15052
  const N = await Li({
15032
15053
  collection: Be,
15033
15054
  path: e,
15034
- entityId: Y,
15055
+ entityId: L,
15035
15056
  values: re.values,
15036
15057
  context: E
15037
15058
  });
@@ -15041,8 +15062,8 @@ function Jd({
15041
15062
  }
15042
15063
  ue(!1);
15043
15064
  }
15044
- }, [Y, re.values, F]);
15045
- O(() => {
15065
+ }, [L, re.values, F]);
15066
+ M(() => {
15046
15067
  Ui();
15047
15068
  }, [Ui]);
15048
15069
  const [Mt, wu] = P({}), $i = x(
@@ -15050,36 +15071,36 @@ function Jd({
15050
15071
  name: N,
15051
15072
  value: Z,
15052
15073
  property: ve
15053
- }) => y.checkUniqueField(e, N, Z, Y),
15054
- [y, e, Y]
15074
+ }) => y.checkUniqueField(e, N, Z, L),
15075
+ [y, e, L]
15055
15076
  ), ga = he(
15056
- () => Y ? jo(
15057
- Y,
15077
+ () => L ? jo(
15078
+ L,
15058
15079
  Be.properties,
15059
15080
  $i
15060
15081
  ) : void 0,
15061
- [Y, Be.properties, $i]
15082
+ [L, Be.properties, $i]
15062
15083
  ), Aa = x(({
15063
15084
  entity: N,
15064
15085
  customEntityActions: Z
15065
15086
  }) => {
15066
15087
  const ve = $t(A, g, e, null), Ge = N ? Fi(A, g, e, N) : !0, it = [];
15067
15088
  return ve && it.push(Ko), Ge && it.push(ea), Z && it.push(...Z), it;
15068
- }, [g, A, e]), Or = re.dirty;
15069
- O(() => {
15070
- I ? re.values && !J(re.values, ir.current) && Rt(re.values) : s(Or);
15071
- }, [Or, re.values]), O(() => {
15089
+ }, [g, A, e]), Mr = re.dirty;
15090
+ M(() => {
15091
+ I ? re.values && !J(re.values, ir.current) && Rt(re.values) : s(Mr);
15092
+ }, [Mr, re.values]), M(() => {
15072
15093
  !I && !re.isSubmitting && Mt && d && Object.entries(Mt).forEach(([N, Z]) => {
15073
15094
  const ve = re.values[N];
15074
15095
  !J(Z, ve) && !re.touched[N] && (console.debug("Updated value from the datasource:", N, Z), re.setFieldValue(N, Z !== void 0 ? Z : null));
15075
15096
  });
15076
15097
  }, [re.isSubmitting, I, Mt, d, re.values, re.touched, re.setFieldValue]);
15077
- const ba = /* @__PURE__ */ n(M, { children: (Be.propertiesOrder ?? Object.keys(Be.properties)).map((N) => {
15098
+ const ba = /* @__PURE__ */ n(O, { children: (Be.propertiesOrder ?? Object.keys(Be.properties)).map((N) => {
15078
15099
  const Z = Be.properties[N];
15079
15100
  if (!Z)
15080
15101
  return console.warn(`Property ${N} not found in collection ${Be.name}`), null;
15081
15102
  const ve = !!Mt && Object.keys(Mt).includes(N) && !!re.touched[N], Ge = !I && re.isSubmitting || er(Z) || !!Z.disabled;
15082
- if (Bi(Z))
15103
+ if (Si(Z))
15083
15104
  return null;
15084
15105
  const zt = {
15085
15106
  propertyKey: N,
@@ -15111,11 +15132,11 @@ function Jd({
15111
15132
  },
15112
15133
  `field_${Be.name}_${N}`
15113
15134
  );
15114
- }).filter(Boolean) }), Mr = re.isSubmitting || !Or && F === "existing", qi = S.useRef(null), Wi = Aa({
15135
+ }).filter(Boolean) }), zr = re.isSubmitting || !Mr && F === "existing", qi = S.useRef(null), Wi = Aa({
15115
15136
  entity: d,
15116
15137
  customEntityActions: A.entityActions
15117
15138
  }).filter((N) => N.includeInForm === void 0 || N.includeInForm), ya = /* @__PURE__ */ v(It, { position: "absolute", children: [
15118
- ae && /* @__PURE__ */ n("div", { className: "text-right", children: /* @__PURE__ */ n(L, { color: "error", children: ae.message }) }),
15139
+ ae && /* @__PURE__ */ n("div", { className: "text-right", children: /* @__PURE__ */ n(Y, { color: "error", children: ae.message }) }),
15119
15140
  d && Wi.length > 0 && /* @__PURE__ */ n("div", { className: "flex-grow flex overflow-auto no-scrollbar", children: Wi.map((N) => /* @__PURE__ */ n(
15120
15141
  de,
15121
15142
  {
@@ -15138,7 +15159,7 @@ function Jd({
15138
15159
  ge,
15139
15160
  {
15140
15161
  variant: "text",
15141
- disabled: Mr || re.isSubmitting,
15162
+ disabled: zr || re.isSubmitting,
15142
15163
  type: "reset",
15143
15164
  children: F === "existing" ? "Discard" : "Clear"
15144
15165
  }
@@ -15149,7 +15170,7 @@ function Jd({
15149
15170
  variant: "text",
15150
15171
  color: "primary",
15151
15172
  type: "submit",
15152
- disabled: Mr || re.isSubmitting,
15173
+ disabled: zr || re.isSubmitting,
15153
15174
  onClick: () => {
15154
15175
  C.current = !1;
15155
15176
  },
@@ -15166,7 +15187,7 @@ function Jd({
15166
15187
  variant: "filled",
15167
15188
  color: "primary",
15168
15189
  type: "submit",
15169
- disabled: Mr || re.isSubmitting,
15190
+ disabled: zr || re.isSubmitting,
15170
15191
  onClick: () => {
15171
15192
  C.current = !0;
15172
15193
  },
@@ -15194,7 +15215,7 @@ function Jd({
15194
15215
  className: `w-full py-2 flex flex-col items-start mt-${4 + (Je ? 8 : 0)} lg:mt-${8 + (Je ? 8 : 0)} mb-8`,
15195
15216
  children: [
15196
15217
  /* @__PURE__ */ n(
15197
- L,
15218
+ Y,
15198
15219
  {
15199
15220
  className: "mt-4 flex-grow line-clamp-1 " + A.hideIdFromForm ? "mb-2" : "mb-0",
15200
15221
  variant: "h4",
@@ -15204,7 +15225,7 @@ function Jd({
15204
15225
  /* @__PURE__ */ n(ys, { color: "base", className: "w-full", size: "small", children: /* @__PURE__ */ v("code", { className: "text-xs select-all", children: [
15205
15226
  e,
15206
15227
  "/",
15207
- Y
15228
+ L
15208
15229
  ] }) })
15209
15230
  ]
15210
15231
  }
@@ -15213,7 +15234,7 @@ function Jd({
15213
15234
  Ld,
15214
15235
  {
15215
15236
  customId: A.customId,
15216
- entityId: Y,
15237
+ entityId: L,
15217
15238
  status: F,
15218
15239
  onChange: X,
15219
15240
  error: q,
@@ -15221,7 +15242,7 @@ function Jd({
15221
15242
  entity: d
15222
15243
  }
15223
15244
  ),
15224
- Y && at && /* @__PURE__ */ v(M, { children: [
15245
+ L && at && /* @__PURE__ */ v(O, { children: [
15225
15246
  /* @__PURE__ */ v(
15226
15247
  "div",
15227
15248
  {
@@ -15254,9 +15275,9 @@ function Jd({
15254
15275
  ));
15255
15276
  }), /* @__PURE__ */ n(pe, { children: N });
15256
15277
  }
15257
- const va = Xe === void 0 ? /* @__PURE__ */ n(M, {}) : Xe ? /* @__PURE__ */ v(M, { children: [
15278
+ const va = Xe === void 0 ? /* @__PURE__ */ n(O, {}) : Xe ? /* @__PURE__ */ v(O, { children: [
15258
15279
  /* @__PURE__ */ n(
15259
- L,
15280
+ Y,
15260
15281
  {
15261
15282
  className: "mt-16 mb-8 mx-8",
15262
15283
  variant: "h4",
@@ -15274,7 +15295,7 @@ function Jd({
15274
15295
  )
15275
15296
  ] }) : wa(), ka = K && K.map(
15276
15297
  (N) => /* @__PURE__ */ n(
15277
- Gr,
15298
+ jr,
15278
15299
  {
15279
15300
  className: "text-sm min-w-[140px]",
15280
15301
  value: N.id,
@@ -15284,7 +15305,7 @@ function Jd({
15284
15305
  )
15285
15306
  ), _a = Tt.map(
15286
15307
  (N) => /* @__PURE__ */ n(
15287
- Gr,
15308
+ jr,
15288
15309
  {
15289
15310
  className: "text-sm min-w-[140px]",
15290
15311
  value: N.key,
@@ -15293,9 +15314,9 @@ function Jd({
15293
15314
  `entity_detail_collection_tab_${N.name}`
15294
15315
  )
15295
15316
  );
15296
- return O(() => {
15297
- Y && we && we(Y);
15298
- }, [Y, we]), /* @__PURE__ */ n(In, { value: re, children: /* @__PURE__ */ v("div", { className: "flex flex-col h-full w-full transition-width duration-250 ease-in-out", children: [
15317
+ return M(() => {
15318
+ L && we && we(L);
15319
+ }, [L, we]), /* @__PURE__ */ n(In, { value: re, children: /* @__PURE__ */ v("div", { className: "flex flex-col h-full w-full transition-width duration-250 ease-in-out", children: [
15299
15320
  /* @__PURE__ */ v(
15300
15321
  "div",
15301
15322
  {
@@ -15332,7 +15353,7 @@ function Jd({
15332
15353
  className: "pl-4 pr-4 pt-0",
15333
15354
  children: [
15334
15355
  /* @__PURE__ */ n(
15335
- Gr,
15356
+ jr,
15336
15357
  {
15337
15358
  disabled: !R,
15338
15359
  value: Gt,
@@ -15366,9 +15387,9 @@ function Jd({
15366
15387
  children: bt ? /* @__PURE__ */ n(yr, {}) : va
15367
15388
  }
15368
15389
  ),
15369
- Rr,
15390
+ Tr,
15370
15391
  W,
15371
- Dr && ya
15392
+ Rr && ya
15372
15393
  ]
15373
15394
  }
15374
15395
  )
@@ -15389,9 +15410,9 @@ function Zd(e) {
15389
15410
  let t = {};
15390
15411
  if (e.inner) {
15391
15412
  if (e.inner.length === 0)
15392
- return ei(t, e.path, e.message);
15413
+ return ti(t, e.path, e.message);
15393
15414
  for (const r of e.inner)
15394
- jt(t, r.path) || (t = ei(t, r.path, r.message));
15415
+ jt(t, r.path) || (t = ti(t, r.path, r.message));
15395
15416
  }
15396
15417
  return t;
15397
15418
  }
@@ -15441,15 +15462,15 @@ function Kd({
15441
15462
  title: a
15442
15463
  }) {
15443
15464
  return /* @__PURE__ */ v(
15444
- ki,
15465
+ _i,
15445
15466
  {
15446
15467
  open: e,
15447
15468
  onOpenChange: (o) => o ? r() : t(),
15448
15469
  children: [
15449
- /* @__PURE__ */ v(_i, { children: [
15450
- /* @__PURE__ */ n(L, { variant: "h6", children: a }),
15470
+ /* @__PURE__ */ v(xi, { children: [
15471
+ /* @__PURE__ */ n(Y, { variant: "h6", children: a }),
15451
15472
  i,
15452
- /* @__PURE__ */ n(L, { children: "Are you sure you want to leave this page?" })
15473
+ /* @__PURE__ */ n(Y, { children: "Are you sure you want to leave this page?" })
15453
15474
  ] }),
15454
15475
  /* @__PURE__ */ v(It, { children: [
15455
15476
  /* @__PURE__ */ n(ge, { variant: "text", onClick: r, autoFocus: !0, children: " Cancel " }),
@@ -15470,8 +15491,8 @@ const pa = S.createContext({
15470
15491
  }
15471
15492
  }), Yi = () => $e(pa);
15472
15493
  function Dm() {
15473
- const t = Ir().sidePanels, r = [...t];
15474
- return r.push(void 0), /* @__PURE__ */ n(M, { children: r.map((i, a) => /* @__PURE__ */ n(
15494
+ const t = Nr().sidePanels, r = [...t];
15495
+ return r.push(void 0), /* @__PURE__ */ n(O, { children: r.map((i, a) => /* @__PURE__ */ n(
15475
15496
  eu,
15476
15497
  {
15477
15498
  panel: i,
@@ -15484,7 +15505,7 @@ function eu({
15484
15505
  offsetPosition: e,
15485
15506
  panel: t
15486
15507
  }) {
15487
- const [r, i] = P(!1), [a, o] = P(!1), [s, l] = P(), c = S.useRef(t?.width), d = c.current, u = Ir(), {
15508
+ const [r, i] = P(!1), [a, o] = P(!1), [s, l] = P(), c = S.useRef(t?.width), d = c.current, u = Nr(), {
15488
15509
  navigationWasBlocked: f,
15489
15510
  handleOk: m,
15490
15511
  handleCancel: p
@@ -15492,7 +15513,7 @@ function eu({
15492
15513
  a && !r,
15493
15514
  () => o(!1)
15494
15515
  );
15495
- O(() => {
15516
+ M(() => {
15496
15517
  t && (c.current = t.width);
15497
15518
  }, [t]);
15498
15519
  const h = () => {
@@ -15561,7 +15582,7 @@ function tu(e) {
15561
15582
  throw console.error("ERROR: No collection found in path `", e.path, "`. Entity id: ", e.entityId), Error("ERROR: No collection found in path `" + e.path + "`. Make sure you have defined a collection for this path in the root navigation.");
15562
15583
  return c;
15563
15584
  }, [a, e]);
15564
- O(() => {
15585
+ M(() => {
15565
15586
  function c(d) {
15566
15587
  t && s && (d.preventDefault(), d.returnValue = `You have unsaved changes in this ${s.name}. Are you sure you want to leave this page?`);
15567
15588
  }
@@ -15570,13 +15591,13 @@ function tu(e) {
15570
15591
  };
15571
15592
  }, [t, s]);
15572
15593
  const l = x((c) => {
15573
- r(c), i(c ? /* @__PURE__ */ v(M, { children: [
15594
+ r(c), i(c ? /* @__PURE__ */ v(O, { children: [
15574
15595
  " You have unsaved changes in this ",
15575
15596
  /* @__PURE__ */ n("b", { children: s?.singularName ?? s?.name }),
15576
15597
  "."
15577
15598
  ] }) : void 0);
15578
15599
  }, [s?.name, r, i]);
15579
- return !e || !s ? /* @__PURE__ */ n("div", { className: "w-full" }) : /* @__PURE__ */ n(M, { children: /* @__PURE__ */ n(pe, { children: /* @__PURE__ */ n(
15600
+ return !e || !s ? /* @__PURE__ */ n("div", { className: "w-full" }) : /* @__PURE__ */ n(O, { children: /* @__PURE__ */ n(pe, { children: /* @__PURE__ */ n(
15580
15601
  Wd,
15581
15602
  {
15582
15603
  ...e,
@@ -15594,10 +15615,10 @@ function ru(e, t) {
15594
15615
  let i;
15595
15616
  return e.width ? i = typeof e.width == "number" ? `${e.width}px` : e.width : e.collection?.sideDialogWidth && (i = typeof e.collection.sideDialogWidth == "number" ? `${e.collection.sideDialogWidth}px` : e.collection.sideDialogWidth), r ? i || (e.collection ? iu(e.collection) : wr) : `calc(${Yd} + ${i ?? wr})`;
15596
15617
  }
15597
- const Xr = {};
15618
+ const Kr = {};
15598
15619
  function iu(e) {
15599
- if (Xr[e.id])
15600
- return Xr[e.id];
15620
+ if (Kr[e.id])
15621
+ return Kr[e.id];
15601
15622
  const t = Le({
15602
15623
  collection: e,
15603
15624
  path: "__ignored",
@@ -15608,7 +15629,7 @@ function iu(e) {
15608
15629
  const i = Object.values(t.properties).map((o) => mr(o)), a = Math.max(...i);
15609
15630
  a < 3 ? r = wr : r = 768 + 32 * (a - 2) + "px";
15610
15631
  }
15611
- return Xr[e.id] = r, r;
15632
+ return Kr[e.id] = r, r;
15612
15633
  }
15613
15634
  function mr(e, t = 0) {
15614
15635
  if (e.dataType === "map" && e.properties) {
@@ -15619,7 +15640,7 @@ function mr(e, t = 0) {
15619
15640
  }
15620
15641
  const nu = (e, t) => {
15621
15642
  const r = Cr(), i = ce(!1), a = !Ze();
15622
- O(() => {
15643
+ M(() => {
15623
15644
  if (!e.loading && !i.current) {
15624
15645
  if (console.debug("Initialising side entity controller"), e.isUrlCollectionPath(r.pathname)) {
15625
15646
  const c = r.hash === `#${fa}`, d = e.urlPathToDataPath(r.pathname), u = ou(d, e.collections ?? [], c);
@@ -15713,7 +15734,7 @@ function au() {
15713
15734
  const e = Cr(), t = Kt(), [r, i] = P([]), a = ce(r), o = ce({}), s = ce(0), l = (f) => {
15714
15735
  a.current = f, i(f);
15715
15736
  };
15716
- O(() => {
15737
+ M(() => {
15717
15738
  const p = (e.state?.panels ?? []).map((h) => o.current[h]).filter((h) => !!h);
15718
15739
  J(a.current.map((h) => h.key), p.map((h) => h.key)) || l(p);
15719
15740
  }, [e]);
@@ -16013,7 +16034,7 @@ async function cu(e, t) {
16013
16034
  }
16014
16035
  function du(e, t) {
16015
16036
  const [r, i] = P(null), a = ce(null), o = t?.map((s) => s.key);
16016
- return O(() => {
16037
+ return M(() => {
16017
16038
  e.user && e.user.uid !== a.current && !e.initialLoading && (cu(e, o).then(i), a.current = e.user.uid);
16018
16039
  }, [e, o]), r;
16019
16040
  }
@@ -16063,8 +16084,8 @@ function Rm(e) {
16063
16084
  error: s.authError
16064
16085
  }
16065
16086
  ) }) : E?.blocked ? /* @__PURE__ */ v(sr, { maxWidth: "md", fullScreen: !0, children: [
16066
- /* @__PURE__ */ n(L, { variant: "h4", children: "Access blocked" }),
16067
- /* @__PURE__ */ v(L, { children: [
16087
+ /* @__PURE__ */ n(Y, { variant: "h4", children: "Access blocked" }),
16088
+ /* @__PURE__ */ v(Y, { children: [
16068
16089
  "This app has been blocked. Please reach out at ",
16069
16090
  /* @__PURE__ */ n(
16070
16091
  "a",
@@ -16075,7 +16096,7 @@ function Rm(e) {
16075
16096
  ),
16076
16097
  " for more information."
16077
16098
  ] }),
16078
- E?.message && /* @__PURE__ */ v(L, { children: [
16099
+ E?.message && /* @__PURE__ */ v(Y, { children: [
16079
16100
  "Response from the server: ",
16080
16101
  E?.message
16081
16102
  ] })
@@ -16148,7 +16169,7 @@ function uu({
16148
16169
  children: a
16149
16170
  }
16150
16171
  ));
16151
- }), /* @__PURE__ */ n(M, { children: a });
16172
+ }), /* @__PURE__ */ n(O, { children: a });
16152
16173
  }
16153
16174
  const mu = 280, Tm = S.memo(
16154
16175
  function(t) {
@@ -16287,7 +16308,7 @@ function fu(e) {
16287
16308
  },
16288
16309
  children: r
16289
16310
  }
16290
- ) : e.displayed ? /* @__PURE__ */ v(M, { children: [
16311
+ ) : e.displayed ? /* @__PURE__ */ v(O, { children: [
16291
16312
  /* @__PURE__ */ n(
16292
16313
  de,
16293
16314
  {
@@ -16389,7 +16410,7 @@ function gu({
16389
16410
  {
16390
16411
  className: "pt-8 pl-6 pr-8 pb-2 flex flex-row items-center",
16391
16412
  children: /* @__PURE__ */ n(
16392
- L,
16413
+ Y,
16393
16414
  {
16394
16415
  variant: "caption",
16395
16416
  color: "secondary",
@@ -16402,7 +16423,7 @@ function gu({
16402
16423
  const _ = b.type === "collection" ? "drawer_navigate_to_collection" : b.type === "view" ? "drawer_navigate_to_view" : "unmapped_event";
16403
16424
  s.onAnalyticsEvent?.(_, { url: b.url }), d || a();
16404
16425
  };
16405
- return /* @__PURE__ */ n(M, { children: /* @__PURE__ */ v("div", { className: U("flex flex-col h-full relative flex-grow w-full", e), style: t, children: [
16426
+ return /* @__PURE__ */ n(O, { children: /* @__PURE__ */ v("div", { className: U("flex flex-col h-full relative flex-grow w-full", e), style: t, children: [
16406
16427
  /* @__PURE__ */ n(Au, { logo: o }),
16407
16428
  /* @__PURE__ */ n("div", { className: "overflow-scroll no-scrollbar", children: g.map((b) => /* @__PURE__ */ v(
16408
16429
  S.Fragment,
@@ -16412,7 +16433,7 @@ function gu({
16412
16433
  Object.values(p).filter((_) => _.group === b).map((_, k) => /* @__PURE__ */ n(
16413
16434
  hu,
16414
16435
  {
16415
- icon: /* @__PURE__ */ n(li, { collectionOrView: _.collection ?? _.view }),
16436
+ icon: /* @__PURE__ */ n(ci, { collectionOrView: _.collection ?? _.view }),
16416
16437
  tooltipsOpen: c,
16417
16438
  drawerOpen: i,
16418
16439
  onClick: () => w(_),
@@ -16466,7 +16487,7 @@ function gu({
16466
16487
  k.preventDefault(), u(b.path);
16467
16488
  },
16468
16489
  children: [
16469
- /* @__PURE__ */ n(li, { collectionOrView: b.view }),
16490
+ /* @__PURE__ */ n(ci, { collectionOrView: b.view }),
16470
16491
  b.name
16471
16492
  ]
16472
16493
  },
@@ -16521,7 +16542,7 @@ const Om = S.memo(
16521
16542
  }) {
16522
16543
  const i = Cr(), a = _e();
16523
16544
  if (!a)
16524
- return /* @__PURE__ */ n(M, {});
16545
+ return /* @__PURE__ */ n(O, {});
16525
16546
  const o = i.state, s = o && o.base_location ? o.base_location : i, l = [];
16526
16547
  a.views && a.views.forEach((m) => {
16527
16548
  Array.isArray(m.path) ? l.push(...m.path.map((p) => ar(p, m))) : l.push(ar(m.path, m));
@@ -16584,7 +16605,7 @@ function bu({
16584
16605
  className: t,
16585
16606
  style: r
16586
16607
  }) {
16587
- return /* @__PURE__ */ n(M, { children: e ?? /* @__PURE__ */ n(gu, { className: t, style: r }) });
16608
+ return /* @__PURE__ */ n(O, { children: e ?? /* @__PURE__ */ n(gu, { className: t, style: r }) });
16588
16609
  }
16589
16610
  bu.componentType = "Drawer";
16590
16611
  function yu({
@@ -16592,7 +16613,7 @@ function yu({
16592
16613
  ...t
16593
16614
  }) {
16594
16615
  const r = e ?? /* @__PURE__ */ n(ld, { ...t });
16595
- return /* @__PURE__ */ n(M, { children: r });
16616
+ return /* @__PURE__ */ n(O, { children: r });
16596
16617
  }
16597
16618
  yu.componentType = "AppBar";
16598
16619
  export {
@@ -16644,7 +16665,7 @@ export {
16644
16665
  ia as FireCMSLogo,
16645
16666
  Mi as FormikArrayContainer,
16646
16667
  ro as GeoPoint,
16647
- li as IconForView,
16668
+ ci as IconForView,
16648
16669
  yl as ImagePreview,
16649
16670
  Nd as KeyValueFieldBinding,
16650
16671
  To as KeyValuePreview,
@@ -16716,26 +16737,26 @@ export {
16716
16737
  co as fullPathToCollectionSegments,
16717
16738
  Xs as getArrayValuesCount,
16718
16739
  em as getBracketNotation,
16719
- Ei as getCollectionByPathOrId,
16720
- Ci as getCollectionPathsCombinations,
16740
+ Ci as getCollectionByPathOrId,
16741
+ Bi as getCollectionPathsCombinations,
16721
16742
  Ku as getColorForProperty,
16722
16743
  Os as getColorScheme,
16723
16744
  Ti as getColumnKeysForProperty,
16724
16745
  Gd as getDefaultFieldConfig,
16725
16746
  Gi as getDefaultFieldId,
16726
16747
  tm as getDefaultPropertiesOrder,
16727
- Si as getDefaultValueFor,
16748
+ Br as getDefaultValueFor,
16728
16749
  no as getDefaultValueForDataType,
16729
16750
  hr as getDefaultValuesFor,
16730
16751
  Zs as getEntityImagePreviewPropertyKey,
16731
16752
  Hs as getEntityPreviewKeys,
16732
16753
  po as getEntityTitlePropertyKey,
16733
- Pr as getFieldConfig,
16754
+ Qr as getFieldConfig,
16734
16755
  la as getFieldId,
16735
16756
  io as getHashValue,
16736
16757
  Js as getIcon,
16737
16758
  De as getIconForProperty,
16738
- ai as getIconForWidget,
16759
+ si as getIconForWidget,
16739
16760
  Xu as getIdIcon,
16740
16761
  Ii as getLabelOrConfigFrom,
16741
16762
  Gu as getLastSegment,
@@ -16747,13 +16768,13 @@ export {
16747
16768
  bm as getSidePanelKey,
16748
16769
  dt as getValueInPath,
16749
16770
  Us as hydrateRegExp,
16750
- si as iconSynonyms,
16771
+ li as iconSynonyms,
16751
16772
  Pi as iconsSearch,
16752
16773
  Vd as isDefaultFieldConfigId,
16753
16774
  on as isEmptyObject,
16754
16775
  Uu as isEnumValueDisabled,
16755
- Bi as isHidden,
16756
- Yr as isObject,
16776
+ Si as isHidden,
16777
+ Lr as isObject,
16757
16778
  Qe as isPropertyBuilder,
16758
16779
  er as isReadOnly,
16759
16780
  $s as isReferenceProperty,
@@ -16788,7 +16809,7 @@ export {
16788
16809
  ua as resolveEntityView,
16789
16810
  Qm as resolveEnumValues,
16790
16811
  al as resolveNavigationFrom,
16791
- Sr as resolvePermissions,
16812
+ Ir as resolvePermissions,
16792
16813
  ca as resolveProperties,
16793
16814
  Ye as resolveProperty,
16794
16815
  da as resolvePropertyEnum,
@@ -16797,12 +16818,12 @@ export {
16797
16818
  Ls as segmentsToStrippedPath,
16798
16819
  Hu as serializeRegExp,
16799
16820
  im as singular,
16800
- oi as slugify,
16821
+ ai as slugify,
16801
16822
  so as sortProperties,
16802
16823
  an as stripCollectionPath,
16803
16824
  $u as toKebabCase,
16804
16825
  qu as toSnakeCase,
16805
- ni as traverseValueProperty,
16826
+ oi as traverseValueProperty,
16806
16827
  oo as traverseValuesProperties,
16807
16828
  Ju as unslugify,
16808
16829
  Ts as updateDateAutoValues,
@@ -16832,7 +16853,7 @@ export {
16832
16853
  fc as useSelectableTableController,
16833
16854
  Ho as useSelectionController,
16834
16855
  Yi as useSideDialogContext,
16835
- Ir as useSideDialogsController,
16856
+ Nr as useSideDialogsController,
16836
16857
  Ft as useSideEntityController,
16837
16858
  gt as useSnackbarController,
16838
16859
  tr as useStorageSource,