unifyedx-storybook-new 0.2.51 → 0.2.52

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.
@@ -1,8 +1,8 @@
1
1
  import { jsxs as n, jsx as e, Fragment as te } from "react/jsx-runtime";
2
- import ae, { useState as j, useMemo as oe, useId as Xe, Fragment as H, useEffect as Z, useCallback as se, useRef as ge } from "react";
3
- import { a as Q, U as dt, X as ye, P as c, L as ja, C as fe, b as Ke, D as mt, f as zt, d as Yt, F as Va, e as _a, h as Ua, T as Qe, u as Ga, I as Wt, i as Jt, j as qa, k as Ya, l as Wa, m as Xt, S as vt, n as Qt, M as Ja, o as Xa, p as Nt, q as Qa, A as Ha, E as Ht, r as Za, s as Ka, t as er, v as tr, w as Zt, x as ar, y as Kt, z as ea, B as rr, G as nr, H as sr, J as He, K as ut, N as ht, O as lr, Q as or, R as ta, V as ir, W as wt, Y as cr, Z as dr, _ as Le, $ as mr, a0 as ur, a1 as hr, a2 as pr, a3 as gr, a4 as br, a5 as St, a6 as fr, a7 as yr, a8 as xr, a9 as vr, aa as Nr, ab as wr, ac as kr, ad as Cr, ae as zr, af as Ae, ag as aa, ah as Sr, ai as Dr, aj as $r, ak as Tr, al as Ar, am as ra, an as Fr, ao as Er, ap as na, aq as Rr, ar as pt, as as sa, at as Or } from "./vendor-DoYRzmYd.js";
4
- import { Popover as Ir, PopoverButton as Pr, PopoverPanel as Lr, Transition as ue, Dialog as be, TransitionChild as Ne, DialogPanel as Fe, DialogTitle as et, TabGroup as Mr, TabList as Br, Tab as ne, TabPanels as jr, RadioGroup as _e, Listbox as K, ListboxButton as Vr, ListboxOptions as _r, ListboxOption as Ur, SwitchGroup as Gr, Switch as lt, Menu as qr, MenuButton as Yr, Portal as Wr, MenuItems as Jr, MenuItem as Xr, DialogBackdrop as Qr } from "@headlessui/react";
5
- import { motion as le, AnimatePresence as ke } from "framer-motion";
2
+ import re, { useState as j, useMemo as le, useId as Xe, Fragment as H, useEffect as Z, useCallback as ae, useRef as ge } from "react";
3
+ import { a as Q, U as dt, X as ye, P as c, L as ja, C as fe, b as Ke, D as mt, f as zt, d as Yt, F as Va, e as _a, h as Ua, T as Qe, u as Ga, I as Wt, i as Jt, j as qa, k as Ya, l as Wa, m as Xt, S as vt, n as Qt, M as Ja, o as Xa, p as Nt, q as Qa, A as Ha, E as Ht, r as Za, s as Ka, t as er, v as tr, w as Zt, x as ar, y as Kt, z as ea, B as rr, G as nr, H as sr, J as He, K as ut, N as ht, O as lr, Q as or, R as ta, V as ir, W as wt, Y as cr, Z as dr, _ as Me, $ as mr, a0 as ur, a1 as hr, a2 as pr, a3 as gr, a4 as br, a5 as St, a6 as fr, a7 as yr, a8 as xr, a9 as vr, aa as Nr, ab as wr, ac as kr, ad as Cr, ae as zr, af as Ae, ag as aa, ah as Sr, ai as Dr, aj as $r, ak as Tr, al as Ar, am as ra, an as Fr, ao as Er, ap as na, aq as Rr, ar as pt, as as sa, at as Or } from "./vendor-DoYRzmYd.js";
4
+ import { Popover as Ir, PopoverButton as Pr, PopoverPanel as Mr, Transition as ue, Dialog as be, TransitionChild as Ne, DialogPanel as Fe, DialogTitle as et, TabGroup as Lr, TabList as Br, Tab as se, TabPanels as jr, RadioGroup as _e, Listbox as K, ListboxButton as Vr, ListboxOptions as _r, ListboxOption as Ur, SwitchGroup as Gr, Switch as lt, Menu as qr, MenuButton as Yr, Portal as Wr, MenuItems as Jr, MenuItem as Xr, DialogBackdrop as Qr } from "@headlessui/react";
5
+ import { motion as oe, AnimatePresence as ke } from "framer-motion";
6
6
  import { d as Hr } from "./vendor-lodash-DUMS_goM.js";
7
7
  import { useFloating as la, offset as oa, flip as ia, shift as ca, autoUpdate as da, useClick as Zr, useDismiss as Kr, useInteractions as en, FloatingPortal as tn } from "@floating-ui/react";
8
8
  import ot, { debounce as an } from "lodash";
@@ -29,14 +29,14 @@ const vn = (t) => {
29
29
  className: m,
30
30
  ...i
31
31
  }) => {
32
- const [u, g] = j(!1), f = oe(() => Nn(a), []), y = t && !u, r = !y && a, x = !y && !a, d = Q(
32
+ const [u, g] = j(!1), f = le(() => Nn(a), []), y = t && !u, r = !y && a, v = !y && !a, d = Q(
33
33
  "avatar-container",
34
34
  `avatar--size-${s}`,
35
35
  m
36
- ), p = y ? "transparent" : o || f.bg, S = l || f.text;
36
+ ), p = y ? "transparent" : o || f.bg, z = l || f.text;
37
37
  return /* @__PURE__ */ n("div", { className: d, style: {
38
38
  backgroundColor: p,
39
- color: S
39
+ color: z
40
40
  }, ...i, children: [
41
41
  y && /* @__PURE__ */ e(
42
42
  "img",
@@ -48,10 +48,10 @@ const vn = (t) => {
48
48
  }
49
49
  ),
50
50
  r && /* @__PURE__ */ e("span", { className: "avatar-initials", "aria-label": a, children: wn(a) }),
51
- x && /* @__PURE__ */ e("span", { className: "avatar-icon", children: /* @__PURE__ */ e(dt, {}) })
51
+ v && /* @__PURE__ */ e("span", { className: "avatar-icon", children: /* @__PURE__ */ e(dt, {}) })
52
52
  ] });
53
53
  }, kn = ({ children: t, max: a = 4, truncatedMessage: s = "Members", ...o }) => {
54
- const l = ae.Children.toArray(t), m = l.slice(0, a), i = l.length - a;
54
+ const l = re.Children.toArray(t), m = l.slice(0, a), i = l.length - a;
55
55
  return /* @__PURE__ */ n("div", { className: "avatar-group-container", ...o, children: [
56
56
  m,
57
57
  i > 0 && /* @__PURE__ */ n("div", { className: "avatar-container avatar--size-medium avatar-excess", children: [
@@ -153,16 +153,16 @@ const zn = {
153
153
  label: y,
154
154
  children: r,
155
155
  // ✅ Add children to the props list
156
- onClick: x,
156
+ onClick: v,
157
157
  ...d
158
158
  }) => {
159
- const p = g || m, S = u && !y, T = Q(
159
+ const p = g || m, z = u && !y, $ = Q(
160
160
  "btn-base",
161
161
  zn[f],
162
162
  Sn[i],
163
163
  {
164
164
  "is-loading": m,
165
- "btn-icon-only": S
165
+ "btn-icon-only": z
166
166
  },
167
167
  l
168
168
  );
@@ -171,11 +171,11 @@ const zn = {
171
171
  {
172
172
  "data-testid": t,
173
173
  type: s,
174
- className: T,
174
+ className: $,
175
175
  disabled: p,
176
- onClick: x,
177
- title: a || S && o || (typeof y == "string" ? y : void 0),
178
- "aria-label": o || S && a || (typeof y == "string" ? y : void 0),
176
+ onClick: v,
177
+ title: a || z && o || (typeof y == "string" ? y : void 0),
178
+ "aria-label": o || z && a || (typeof y == "string" ? y : void 0),
179
179
  ...d,
180
180
  children: m ? /* @__PURE__ */ e(ja, { className: "loader-spin", "data-testid": "button-loader" }) : /* @__PURE__ */ n(te, { children: [
181
181
  u && /* @__PURE__ */ e(u, { size: f === "large" ? 20 : 16 }),
@@ -248,7 +248,7 @@ const zn = {
248
248
  ] }),
249
249
  s && /* @__PURE__ */ e("p", { className: "checkbox-error-message", children: s })
250
250
  ] });
251
- }, $n = ({ children: t }) => /* @__PURE__ */ e(Ir, { className: "popover-container", children: t }), Tn = ({ children: t }) => /* @__PURE__ */ e(Pr, { as: "div", children: t }), An = ({ children: t, className: a }) => /* @__PURE__ */ e(Lr, { className: `popover-panel ${a || ""}`, children: t }), ma = mt, ua = ({
251
+ }, $n = ({ children: t }) => /* @__PURE__ */ e(Ir, { className: "popover-container", children: t }), Tn = ({ children: t }) => /* @__PURE__ */ e(Pr, { as: "div", children: t }), An = ({ children: t, className: a }) => /* @__PURE__ */ e(Mr, { className: `popover-panel ${a || ""}`, children: t }), ma = mt, ua = ({
252
252
  value: t,
253
253
  onChange: a,
254
254
  onClear: s,
@@ -289,7 +289,7 @@ const zn = {
289
289
  }) => {
290
290
  const f = t?.from, y = t?.to, r = (d) => {
291
291
  d.stopPropagation(), d.preventDefault(), s?.();
292
- }, x = f && y ? /* @__PURE__ */ n(te, { children: [
292
+ }, v = f && y ? /* @__PURE__ */ n(te, { children: [
293
293
  zt(f, "MMM d, y"),
294
294
  " - ",
295
295
  zt(y, "MMM d, y")
@@ -308,10 +308,10 @@ const zn = {
308
308
  "datepicker-trigger--disabled": i
309
309
  }),
310
310
  disabled: i,
311
- "aria-label": f && y ? `Selected range is ${x}` : o,
311
+ "aria-label": f && y ? `Selected range is ${v}` : o,
312
312
  children: [
313
313
  /* @__PURE__ */ e(Yt, { className: "datepicker-icon" }),
314
- /* @__PURE__ */ e("span", { className: "datepicker-value", children: x })
314
+ /* @__PURE__ */ e("span", { className: "datepicker-value", children: v })
315
315
  ]
316
316
  }
317
317
  ),
@@ -600,12 +600,12 @@ const zn = {
600
600
  handleRemoveRejectedFile: f,
601
601
  handleSubmit: y,
602
602
  isSubmitting: r,
603
- formErrors: x,
603
+ formErrors: v,
604
604
  // --- UI Text ---
605
605
  title: d = "Upload Files",
606
606
  subHeading: p = "Supports PNG, JPG, PDF. Max size: 50MB."
607
607
  }) => {
608
- const S = i.length > 0 || u.length > 0;
608
+ const z = i.length > 0 || u.length > 0;
609
609
  return /* @__PURE__ */ e(ue, { appear: !0, show: t, as: H, children: /* @__PURE__ */ n(
610
610
  be,
611
611
  {
@@ -641,7 +641,7 @@ const zn = {
641
641
  Fe,
642
642
  {
643
643
  className: "dialog-panel",
644
- onClick: (T) => T.stopPropagation(),
644
+ onClick: ($) => $.stopPropagation(),
645
645
  children: [
646
646
  /* @__PURE__ */ e("input", { ...o() }),
647
647
  /* @__PURE__ */ n("form", { onSubmit: y, className: "form-wrapper", children: [
@@ -680,11 +680,11 @@ const zn = {
680
680
  ]
681
681
  }
682
682
  ),
683
- x.filesToUpload && /* @__PURE__ */ e("p", { className: "form-error-message", children: x.filesToUpload.message }),
684
- S && /* @__PURE__ */ n("div", { className: "file-list-container", children: [
683
+ v.filesToUpload && /* @__PURE__ */ e("p", { className: "form-error-message", children: v.filesToUpload.message }),
684
+ z && /* @__PURE__ */ n("div", { className: "file-list-container", children: [
685
685
  /* @__PURE__ */ e("h3", { children: "Upload Queue" }),
686
686
  /* @__PURE__ */ n("ul", { className: "file-list", children: [
687
- i.map((T, R) => /* @__PURE__ */ n(
687
+ i.map(($, R) => /* @__PURE__ */ n(
688
688
  "li",
689
689
  {
690
690
  className: "file-item",
@@ -693,12 +693,12 @@ const zn = {
693
693
  /* @__PURE__ */ e(
694
694
  Tt,
695
695
  {
696
- extension: T.name.split(".").pop()
696
+ extension: $.name.split(".").pop()
697
697
  }
698
698
  ),
699
699
  /* @__PURE__ */ n("div", { children: [
700
- /* @__PURE__ */ e("p", { className: "file-item-name", children: T.name }),
701
- /* @__PURE__ */ e("p", { className: "file-item-size", children: At(T.size) })
700
+ /* @__PURE__ */ e("p", { className: "file-item-name", children: $.name }),
701
+ /* @__PURE__ */ e("p", { className: "file-item-size", children: At($.size) })
702
702
  ] })
703
703
  ] }),
704
704
  /* @__PURE__ */ e(
@@ -712,9 +712,9 @@ const zn = {
712
712
  )
713
713
  ]
714
714
  },
715
- `${T.name}-${R}`
715
+ `${$.name}-${R}`
716
716
  )),
717
- u.map(({ file: T, message: R }, O) => /* @__PURE__ */ n(
717
+ u.map(({ file: $, message: R }, O) => /* @__PURE__ */ n(
718
718
  "li",
719
719
  {
720
720
  className: "file-item file-item--rejected",
@@ -723,12 +723,12 @@ const zn = {
723
723
  /* @__PURE__ */ e(
724
724
  Tt,
725
725
  {
726
- extension: T.name.split(".").pop()
726
+ extension: $.name.split(".").pop()
727
727
  }
728
728
  ),
729
729
  /* @__PURE__ */ n("div", { children: [
730
- /* @__PURE__ */ e("p", { className: "file-item-name", children: T.name }),
731
- /* @__PURE__ */ e("p", { className: "file-item-size", children: At(T.size) }),
730
+ /* @__PURE__ */ e("p", { className: "file-item-name", children: $.name }),
731
+ /* @__PURE__ */ e("p", { className: "file-item-size", children: At($.size) }),
732
732
  /* @__PURE__ */ e("p", { className: "rejection-reason", children: R })
733
733
  ] })
734
734
  ] }),
@@ -743,7 +743,7 @@ const zn = {
743
743
  )
744
744
  ]
745
745
  },
746
- `${T.name}-${O}`
746
+ `${$.name}-${O}`
747
747
  ))
748
748
  ] })
749
749
  ] })
@@ -777,7 +777,7 @@ const zn = {
777
777
  ]
778
778
  }
779
779
  ) });
780
- }, Me = (t) => {
780
+ }, Le = (t) => {
781
781
  const a = new Date(t);
782
782
  return a.setHours(0, 0, 0, 0), a;
783
783
  }, Be = (t) => {
@@ -788,10 +788,10 @@ const zn = {
788
788
  return s.setDate(s.getDate() + a), s;
789
789
  }, ft = (t) => {
790
790
  const a = new Date(t), s = a.getDay(), o = a.getDate() - s;
791
- return Me(new Date(a.setDate(o)));
791
+ return Le(new Date(a.setDate(o)));
792
792
  }, On = (t) => Be(bt(ft(t), 6)), Ft = (t) => {
793
793
  const a = new Date(t);
794
- return Me(new Date(a.getFullYear(), a.getMonth(), 1));
794
+ return Le(new Date(a.getFullYear(), a.getMonth(), 1));
795
795
  }, Et = (t) => {
796
796
  const a = new Date(t);
797
797
  return Be(new Date(a.getFullYear(), a.getMonth() + 1, 0));
@@ -801,12 +801,12 @@ const zn = {
801
801
  case "anytime":
802
802
  return [null, null];
803
803
  case "today":
804
- return [Me(a), Be(a)];
804
+ return [Le(a), Be(a)];
805
805
  case "this_week":
806
806
  return [ft(a), On(a)];
807
807
  case "last_week": {
808
808
  const s = bt(ft(a), -7);
809
- return [Me(s), Be(bt(s, 6))];
809
+ return [Le(s), Be(bt(s, 6))];
810
810
  }
811
811
  case "this_month":
812
812
  return [Ft(a), Et(a)];
@@ -834,20 +834,20 @@ const zn = {
834
834
  }), [y, r] = j({
835
835
  createdBy: !1,
836
836
  updatedBy: !1
837
- }), [x, d] = j({
837
+ }), [v, d] = j({
838
838
  startDate: null
839
- }), [p, S] = j({
839
+ }), [p, z] = j({
840
840
  endDate: null
841
- }), T = Ga({
841
+ }), $ = Ga({
842
842
  initialValues: JSON.parse(JSON.stringify(m)),
843
843
  // Deep copy
844
- onSubmit: (C) => {
844
+ onSubmit: (F) => {
845
845
  const h = {};
846
- Object.keys(C).forEach((v) => {
847
- h[v] = {
848
- operator: C[v].operator || "in",
849
- values: Array.isArray(C[v].values) ? C[v].values : [],
850
- range: C[v].range || null
846
+ Object.keys(F).forEach((x) => {
847
+ h[x] = {
848
+ operator: F[x].operator || "in",
849
+ values: Array.isArray(F[x].values) ? F[x].values : [],
850
+ range: F[x].range || null
851
851
  };
852
852
  }), console.log("[storybook filter] Applied Filters:", h), typeof s == "function" && s({
853
853
  filters: h,
@@ -855,47 +855,47 @@ const zn = {
855
855
  }), a();
856
856
  },
857
857
  enableReinitialize: !0
858
- }), R = oe(() => l.reduce((C, h) => {
859
- const v = h.key, $ = T.values[v];
860
- let B = !1;
861
- if ($)
858
+ }), R = le(() => l.reduce((F, h) => {
859
+ const x = h.key, S = $.values[x];
860
+ let L = !1;
861
+ if (S)
862
862
  switch (h.type) {
863
863
  case "multiselect":
864
864
  case "multiselect-users":
865
- B = Array.isArray($.values) && $.values.length > 0;
865
+ L = Array.isArray(S.values) && S.values.length > 0;
866
866
  break;
867
867
  case "date":
868
- ($.range && $.range !== "" || Array.isArray($.values) && $.values.length > 0) && (B = !0);
868
+ (S.range && S.range !== "" || Array.isArray(S.values) && S.values.length > 0) && (L = !0);
869
869
  break;
870
870
  }
871
- return C[v] = B, C;
872
- }, {}), [l, T.values]), O = Object.values(R).filter(Boolean).length, L = oe(() => l.some((C) => {
873
- if (C.type !== "date") return !1;
874
- const h = T.values?.[C.key]?.values;
871
+ return F[x] = L, F;
872
+ }, {}), [l, $.values]), O = Object.values(R).filter(Boolean).length, P = le(() => l.some((F) => {
873
+ if (F.type !== "date") return !1;
874
+ const h = $.values?.[F.key]?.values;
875
875
  if (!Array.isArray(h) || h.length < 2) return !1;
876
- const [v, $] = h;
877
- if (!v || !$) return !1;
878
- const B = v instanceof Date ? v : new Date(v), E = $ instanceof Date ? $ : new Date($);
879
- return B > E;
880
- }), [l, T.values]), _ = async (C, h) => {
876
+ const [x, S] = h;
877
+ if (!x || !S) return !1;
878
+ const L = x instanceof Date ? x : new Date(x), E = S instanceof Date ? S : new Date(S);
879
+ return L > E;
880
+ }), [l, $.values]), _ = async (F, h) => {
881
881
  try {
882
- r(($) => ({ ...$, [C]: !0 }));
883
- const v = await u(C, h);
884
- f(($) => ({ ...$, [C]: v }));
885
- } catch (v) {
886
- console.error(`Error fetching ${C} users:`, v);
882
+ r((S) => ({ ...S, [F]: !0 }));
883
+ const x = await u(F, h);
884
+ f((S) => ({ ...S, [F]: x }));
885
+ } catch (x) {
886
+ console.error(`Error fetching ${F} users:`, x);
887
887
  } finally {
888
- r((v) => ({ ...v, [C]: !1 }));
888
+ r((x) => ({ ...x, [F]: !1 }));
889
889
  }
890
- }, U = (C) => {
891
- const h = l[C].key, v = l[C].url;
892
- l[C].type === "multiselect-users" && g[h].length === 0 && !y[h] && _(h, v);
890
+ }, U = (F) => {
891
+ const h = l[F].key, x = l[F].url;
892
+ l[F].type === "multiselect-users" && g[h].length === 0 && !y[h] && _(h, x);
893
893
  }, Y = () => {
894
- T.resetForm(), f({ createdBy: [], updatedBy: [] }), o();
895
- }, G = (C) => {
896
- const h = l.find((B) => B.key === C);
894
+ $.resetForm(), f({ createdBy: [], updatedBy: [] }), o();
895
+ }, G = (F) => {
896
+ const h = l.find((L) => L.key === F);
897
897
  if (!h) return null;
898
- const v = T.values[C] || m[C], $ = Array.isArray(v.values) ? v.values : [];
898
+ const x = $.values[F] || m[F], S = Array.isArray(x.values) ? x.values : [];
899
899
  switch (h.type) {
900
900
  case "multiselect":
901
901
  return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
@@ -904,10 +904,10 @@ const zn = {
904
904
  /* @__PURE__ */ e(
905
905
  "select",
906
906
  {
907
- value: v.operator || "in",
908
- onChange: (F) => T.setFieldValue(`${C}.operator`, F.target.value),
907
+ value: x.operator || "in",
908
+ onChange: (A) => $.setFieldValue(`${F}.operator`, A.target.value),
909
909
  className: "filter-select",
910
- children: h.operators.map((F) => /* @__PURE__ */ e("option", { value: F, children: F === "in" ? "Includes" : "Excludes" }, F))
910
+ children: h.operators.map((A) => /* @__PURE__ */ e("option", { value: A, children: A === "in" ? "Includes" : "Excludes" }, A))
911
911
  }
912
912
  )
913
913
  ] }),
@@ -917,77 +917,77 @@ const zn = {
917
917
  "input",
918
918
  {
919
919
  type: "checkbox",
920
- id: `select-all-${C}`,
920
+ id: `select-all-${F}`,
921
921
  className: "filter-checkbox-input",
922
- checked: h.options.length > 0 && $.length === h.options.length,
923
- onChange: (F) => {
924
- const q = F.target.checked ? h.options.map((X) => X.value) : [];
925
- T.setFieldValue(`${C}.values`, q);
922
+ checked: h.options.length > 0 && S.length === h.options.length,
923
+ onChange: (A) => {
924
+ const q = A.target.checked ? h.options.map((X) => X.value) : [];
925
+ $.setFieldValue(`${F}.values`, q);
926
926
  }
927
927
  }
928
928
  ),
929
929
  /* @__PURE__ */ e(
930
930
  "label",
931
931
  {
932
- htmlFor: `select-all-${C}`,
932
+ htmlFor: `select-all-${F}`,
933
933
  className: "filter-checkbox-label",
934
934
  children: "Select All"
935
935
  }
936
936
  )
937
937
  ] }),
938
- h.options.map((F) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item", children: [
938
+ h.options.map((A) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item", children: [
939
939
  /* @__PURE__ */ e(
940
940
  "input",
941
941
  {
942
942
  type: "checkbox",
943
- id: `${C}-${F.value}`,
943
+ id: `${F}-${A.value}`,
944
944
  className: "filter-checkbox-input",
945
- checked: $.includes(F.value),
945
+ checked: S.includes(A.value),
946
946
  onChange: (q) => {
947
- const X = q.target.checked ? [...$, F.value] : $.filter((xe) => xe !== F.value);
948
- T.setFieldValue(`${C}.values`, X);
947
+ const X = q.target.checked ? [...S, A.value] : S.filter((xe) => xe !== A.value);
948
+ $.setFieldValue(`${F}.values`, X);
949
949
  }
950
950
  }
951
951
  ),
952
952
  /* @__PURE__ */ e(
953
953
  "label",
954
954
  {
955
- htmlFor: `${C}-${F.value}`,
955
+ htmlFor: `${F}-${A.value}`,
956
956
  className: "filter-checkbox-label",
957
- children: F.label
957
+ children: A.label
958
958
  }
959
959
  )
960
- ] }, F.value))
960
+ ] }, A.value))
961
961
  ] })
962
962
  ] });
963
963
  case "multiselect-users":
964
- const B = g[C] || [], E = y[C];
964
+ const L = g[F] || [], E = y[F];
965
965
  return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
966
966
  /* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
967
967
  /* @__PURE__ */ e("label", { className: "filter-label", children: "Operator:" }),
968
968
  /* @__PURE__ */ e(
969
969
  "select",
970
970
  {
971
- value: v.operator || "in",
972
- onChange: (F) => T.setFieldValue(`${C}.operator`, F.target.value),
971
+ value: x.operator || "in",
972
+ onChange: (A) => $.setFieldValue(`${F}.operator`, A.target.value),
973
973
  className: "filter-select",
974
- children: h.operators.map((F) => /* @__PURE__ */ e("option", { value: F, children: F === "in" ? "Includes" : "Excludes" }, F))
974
+ children: h.operators.map((A) => /* @__PURE__ */ e("option", { value: A, children: A === "in" ? "Includes" : "Excludes" }, A))
975
975
  }
976
976
  )
977
977
  ] }),
978
- E ? /* @__PURE__ */ e("div", { className: "loading-spinner", children: /* @__PURE__ */ e("div", {}) }) : /* @__PURE__ */ e("div", { className: "filter-checkbox-list", children: B.length > 0 ? /* @__PURE__ */ n(te, { children: [
978
+ E ? /* @__PURE__ */ e("div", { className: "loading-spinner", children: /* @__PURE__ */ e("div", {}) }) : /* @__PURE__ */ e("div", { className: "filter-checkbox-list", children: L.length > 0 ? /* @__PURE__ */ n(te, { children: [
979
979
  /* @__PURE__ */ n("div", { className: "filter-checkbox-item", children: [
980
980
  /* @__PURE__ */ e(
981
981
  "input",
982
982
  {
983
983
  type: "checkbox",
984
- id: `select-all-users-${C}`,
984
+ id: `select-all-users-${F}`,
985
985
  className: "filter-checkbox-input",
986
- checked: B.length > 0 && $.length === B.length,
987
- onChange: (F) => {
988
- const q = F.target.checked ? B.map((X) => X.email) : [];
989
- T.setFieldValue(
990
- `${C}.values`,
986
+ checked: L.length > 0 && S.length === L.length,
987
+ onChange: (A) => {
988
+ const q = A.target.checked ? L.map((X) => X.email) : [];
989
+ $.setFieldValue(
990
+ `${F}.values`,
991
991
  q
992
992
  );
993
993
  }
@@ -996,24 +996,24 @@ const zn = {
996
996
  /* @__PURE__ */ e(
997
997
  "label",
998
998
  {
999
- htmlFor: `select-all-users-${C}`,
999
+ htmlFor: `select-all-users-${F}`,
1000
1000
  className: "filter-checkbox-label",
1001
1001
  children: "Select All Users"
1002
1002
  }
1003
1003
  )
1004
1004
  ] }),
1005
- B.map((F) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item createdby", children: [
1005
+ L.map((A) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item createdby", children: [
1006
1006
  /* @__PURE__ */ e(
1007
1007
  "input",
1008
1008
  {
1009
1009
  type: "checkbox",
1010
- id: `${C}-${F.email}`,
1010
+ id: `${F}-${A.email}`,
1011
1011
  className: "filter-checkbox-input",
1012
- checked: $.includes(F.email),
1012
+ checked: S.includes(A.email),
1013
1013
  onChange: (q) => {
1014
- const X = q.target.checked ? [...$, F.email] : $.filter((xe) => xe !== F.email);
1015
- T.setFieldValue(
1016
- `${C}.values`,
1014
+ const X = q.target.checked ? [...S, A.email] : S.filter((xe) => xe !== A.email);
1015
+ $.setFieldValue(
1016
+ `${F}.values`,
1017
1017
  X
1018
1018
  );
1019
1019
  }
@@ -1022,25 +1022,25 @@ const zn = {
1022
1022
  /* @__PURE__ */ n(
1023
1023
  "label",
1024
1024
  {
1025
- htmlFor: `${C}-${F.email}`,
1025
+ htmlFor: `${F}-${A.email}`,
1026
1026
  className: "filter-checkbox-label",
1027
1027
  children: [
1028
- /* @__PURE__ */ e("span", { className: "user-label-name", children: F.name }),
1029
- /* @__PURE__ */ e("span", { className: "user-label-email", children: F.email })
1028
+ /* @__PURE__ */ e("span", { className: "user-label-name", children: A.name }),
1029
+ /* @__PURE__ */ e("span", { className: "user-label-email", children: A.email })
1030
1030
  ]
1031
1031
  }
1032
1032
  )
1033
- ] }, F.email))
1033
+ ] }, A.email))
1034
1034
  ] }) : /* @__PURE__ */ e("div", { className: "text-center py-4 text-gray-500 text-sm", children: "No users loaded." }) })
1035
1035
  ] });
1036
1036
  case "date":
1037
- const z = v.values || [], [b, w] = z, D = b && w, N = z[0] || null, A = z[1] || null, I = {
1038
- startDate: N instanceof Date ? N.toISOString().slice(0, 10) : null,
1039
- endDate: N instanceof Date ? N.toISOString().slice(0, 10) : null
1037
+ const C = x.values || [], [b, N] = C, D = b && N, w = C[0] || null, T = C[1] || null, I = {
1038
+ startDate: w instanceof Date ? w.toISOString().slice(0, 10) : null,
1039
+ endDate: w instanceof Date ? w.toISOString().slice(0, 10) : null
1040
1040
  }, k = {
1041
- startDate: A instanceof Date ? A.toISOString().slice(0, 10) : null,
1042
- endDate: A instanceof Date ? A.toISOString().slice(0, 10) : null
1043
- }, M = [
1041
+ startDate: T instanceof Date ? T.toISOString().slice(0, 10) : null,
1042
+ endDate: T instanceof Date ? T.toISOString().slice(0, 10) : null
1043
+ }, B = [
1044
1044
  { key: "anytime", label: "Anytime" },
1045
1045
  { key: "today", label: "Today" },
1046
1046
  { key: "this_week", label: "This Week" },
@@ -1048,17 +1048,17 @@ const zn = {
1048
1048
  { key: "this_month", label: "This Month" },
1049
1049
  { key: "last_month", label: "Last Month" },
1050
1050
  { key: "custom", label: "Custom" }
1051
- ], P = (F) => {
1052
- if (F === "anytime") {
1053
- T.setFieldValue(`${C}.values`, []), T.setFieldValue(`${C}.range`, "anytime");
1051
+ ], M = (A) => {
1052
+ if (A === "anytime") {
1053
+ $.setFieldValue(`${F}.values`, []), $.setFieldValue(`${F}.range`, "anytime");
1054
1054
  return;
1055
1055
  }
1056
- if (F === "custom") {
1057
- T.setFieldValue(`${C}.range`, "custom");
1056
+ if (A === "custom") {
1057
+ $.setFieldValue(`${F}.range`, "custom");
1058
1058
  return;
1059
1059
  }
1060
- const [q, X] = In(F);
1061
- T.setFieldValue(`${C}.values`, q && X ? [q, X] : []), T.setFieldValue(`${C}.range`, F);
1060
+ const [q, X] = In(A);
1061
+ $.setFieldValue(`${F}.values`, q && X ? [q, X] : []), $.setFieldValue(`${F}.range`, A);
1062
1062
  };
1063
1063
  return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
1064
1064
  /* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
@@ -1066,10 +1066,10 @@ const zn = {
1066
1066
  /* @__PURE__ */ e(
1067
1067
  "select",
1068
1068
  {
1069
- value: v.operator,
1070
- onChange: (F) => T.setFieldValue(`${C}.operator`, F.target.value),
1069
+ value: x.operator,
1070
+ onChange: (A) => $.setFieldValue(`${F}.operator`, A.target.value),
1071
1071
  className: "filter-select",
1072
- children: h.operators.map((F) => /* @__PURE__ */ e("option", { value: F, children: F === "in" ? "Is" : "Is not" }, F))
1072
+ children: h.operators.map((A) => /* @__PURE__ */ e("option", { value: A, children: A === "in" ? "Is" : "Is not" }, A))
1073
1073
  }
1074
1074
  ),
1075
1075
  D && /* @__PURE__ */ e(
@@ -1077,9 +1077,9 @@ const zn = {
1077
1077
  {
1078
1078
  type: "button",
1079
1079
  onClick: () => {
1080
- T.setFieldValue(
1081
- C,
1082
- m[C]
1080
+ $.setFieldValue(
1081
+ F,
1082
+ m[F]
1083
1083
  );
1084
1084
  },
1085
1085
  className: "filter-clear-selection-button",
@@ -1087,8 +1087,8 @@ const zn = {
1087
1087
  }
1088
1088
  )
1089
1089
  ] }),
1090
- /* @__PURE__ */ e("div", { className: "pb-0", children: /* @__PURE__ */ e("div", { className: "space-y-3", children: M.map((F) => {
1091
- const q = v.range === F.key || F.key === "anytime" && (!Array.isArray(v.values) || v.values.length === 0);
1090
+ /* @__PURE__ */ e("div", { className: "pb-0", children: /* @__PURE__ */ e("div", { className: "space-y-3", children: B.map((A) => {
1091
+ const q = x.range === A.key || A.key === "anytime" && (!Array.isArray(x.values) || x.values.length === 0);
1092
1092
  return /* @__PURE__ */ n(
1093
1093
  "label",
1094
1094
  {
@@ -1098,17 +1098,17 @@ const zn = {
1098
1098
  "input",
1099
1099
  {
1100
1100
  type: "radio",
1101
- name: `preset-${C}`,
1101
+ name: `preset-${F}`,
1102
1102
  checked: q,
1103
- onChange: () => P(F.key),
1103
+ onChange: () => M(A.key),
1104
1104
  className: "h-4 w-4"
1105
1105
  }
1106
1106
  ),
1107
- /* @__PURE__ */ e("span", { className: "text-sm text-[#222]", children: F.label }),
1108
- F.key === "anytime" && q && /* @__PURE__ */ e("span", { className: "ml-2 text-xs bg-yellow-100 text-yellow-800 px-2 py-0.5 rounded", children: "Default" })
1107
+ /* @__PURE__ */ e("span", { className: "text-sm text-[#222]", children: A.label }),
1108
+ A.key === "anytime" && q && /* @__PURE__ */ e("span", { className: "ml-2 text-xs bg-yellow-100 text-yellow-800 px-2 py-0.5 rounded", children: "Default" })
1109
1109
  ]
1110
1110
  },
1111
- F.key
1111
+ A.key
1112
1112
  );
1113
1113
  }) }) }),
1114
1114
  /* @__PURE__ */ n("div", { className: "", children: [
@@ -1121,9 +1121,9 @@ const zn = {
1121
1121
  asSingle: !0,
1122
1122
  useRange: !1,
1123
1123
  value: I,
1124
- onChange: (F) => {
1125
- const q = F?.startDate ? Me(new Date(F.startDate)) : null, X = z[1] || null;
1126
- q && (T.setFieldValue(`${C}.values`, [q, X]), T.setFieldValue(`${C}.range`, "custom"));
1124
+ onChange: (A) => {
1125
+ const q = A?.startDate ? Le(new Date(A.startDate)) : null, X = C[1] || null;
1126
+ q && ($.setFieldValue(`${F}.values`, [q, X]), $.setFieldValue(`${F}.range`, "custom"));
1127
1127
  },
1128
1128
  inputClassName: "w-full rounded-xl border border-[#767676] px-4 py-2 text-sm font-normal text-[#101112] focus:border-violet-500 focus:outline-none focus:ring-1 focus:ring-violet-500",
1129
1129
  primaryColor: "violet",
@@ -1145,9 +1145,9 @@ const zn = {
1145
1145
  asSingle: !0,
1146
1146
  useRange: !1,
1147
1147
  value: k,
1148
- onChange: (F) => {
1149
- const q = F?.startDate ? Be(new Date(F.startDate)) : null, X = z[0] || null;
1150
- q && (T.setFieldValue(`${C}.values`, [X, q]), T.setFieldValue(`${C}.range`, "custom"));
1148
+ onChange: (A) => {
1149
+ const q = A?.startDate ? Be(new Date(A.startDate)) : null, X = C[0] || null;
1150
+ q && ($.setFieldValue(`${F}.values`, [X, q]), $.setFieldValue(`${F}.range`, "custom"));
1151
1151
  },
1152
1152
  inputClassName: "w-full rounded-xl border border-[#767676] px-4 py-2 text-sm font-normal text-[#101112] focus:border-violet-500 focus:outline-none focus:ring-1 focus:ring-violet-500",
1153
1153
  primaryColor: "violet",
@@ -1160,7 +1160,7 @@ const zn = {
1160
1160
  }
1161
1161
  )
1162
1162
  ] }),
1163
- N && A && N > A && /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-2", children: "End date must be after start date" })
1163
+ w && T && w > T && /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-2", children: "End date must be after start date" })
1164
1164
  ] })
1165
1165
  ] });
1166
1166
  default:
@@ -1204,9 +1204,9 @@ const zn = {
1204
1204
  }
1205
1205
  )
1206
1206
  ] }),
1207
- /* @__PURE__ */ n("form", { onSubmit: T.handleSubmit, className: "filter-form", children: [
1207
+ /* @__PURE__ */ n("form", { onSubmit: $.handleSubmit, className: "filter-form", children: [
1208
1208
  /* @__PURE__ */ e("div", { className: "filter-content-wrapper", children: /* @__PURE__ */ n(
1209
- Mr,
1209
+ Lr,
1210
1210
  {
1211
1211
  vertical: !0,
1212
1212
  onChange: U,
@@ -1215,11 +1215,11 @@ const zn = {
1215
1215
  flexGrow: 1
1216
1216
  },
1217
1217
  children: [
1218
- /* @__PURE__ */ e(Br, { className: "filter-tabs-list", children: l.map((C) => /* @__PURE__ */ n(ne, { className: "filter-tab-item", children: [
1218
+ /* @__PURE__ */ e(Br, { className: "filter-tabs-list", children: l.map((F) => /* @__PURE__ */ n(se, { className: "filter-tab-item", children: [
1219
1219
  /* @__PURE__ */ e("div", { className: "filter-selection-horizontal-indicator" }),
1220
1220
  /* @__PURE__ */ n("div", { className: "filter-lbl-indicator-wrapper", children: [
1221
- C.label,
1222
- R[C.key] && /* @__PURE__ */ e(
1221
+ F.label,
1222
+ R[F.key] && /* @__PURE__ */ e(
1223
1223
  "span",
1224
1224
  {
1225
1225
  className: "filter-active-indicator",
@@ -1227,24 +1227,24 @@ const zn = {
1227
1227
  }
1228
1228
  )
1229
1229
  ] })
1230
- ] }, C.key)) }),
1231
- /* @__PURE__ */ e(jr, { className: "filter-tabs-panels", children: l.map((C) => /* @__PURE__ */ e(
1232
- ne.Panel,
1230
+ ] }, F.key)) }),
1231
+ /* @__PURE__ */ e(jr, { className: "filter-tabs-panels", children: l.map((F) => /* @__PURE__ */ e(
1232
+ se.Panel,
1233
1233
  {
1234
1234
  className: "filter-tab-panel",
1235
1235
  children: /* @__PURE__ */ e(
1236
- le.div,
1236
+ oe.div,
1237
1237
  {
1238
1238
  initial: { opacity: 0.8, x: 10 },
1239
1239
  animate: { opacity: 1, x: 0 },
1240
1240
  transition: { duration: 0.3 },
1241
1241
  className: "h-full",
1242
- children: G(C.key)
1242
+ children: G(F.key)
1243
1243
  },
1244
- C.key
1244
+ F.key
1245
1245
  )
1246
1246
  },
1247
- C.key
1247
+ F.key
1248
1248
  )) })
1249
1249
  ]
1250
1250
  }
@@ -1263,7 +1263,7 @@ const zn = {
1263
1263
  "button",
1264
1264
  {
1265
1265
  type: "submit",
1266
- disabled: !T.dirty || L,
1266
+ disabled: !$.dirty || P,
1267
1267
  className: "filter-button apply",
1268
1268
  children: [
1269
1269
  "Apply Filters",
@@ -1345,7 +1345,7 @@ const zn = {
1345
1345
  size: f
1346
1346
  // Add size prop
1347
1347
  }) => {
1348
- const y = Rt[i] || Rt.info, r = y.icon, x = () => {
1348
+ const y = Rt[i] || Rt.info, r = y.icon, v = () => {
1349
1349
  a({ primary: !0, secondary: !1 });
1350
1350
  }, d = () => {
1351
1351
  a({ primary: !1, secondary: !0 });
@@ -1396,7 +1396,7 @@ const zn = {
1396
1396
  ee,
1397
1397
  {
1398
1398
  type: "button",
1399
- onClick: x,
1399
+ onClick: v,
1400
1400
  label: l,
1401
1401
  ...g
1402
1402
  }
@@ -1418,8 +1418,8 @@ const zn = {
1418
1418
  Z(() => {
1419
1419
  g(t);
1420
1420
  }, [t]);
1421
- const f = Math.min((t - 1) * s + 1, a), y = Math.min(t * s, a), r = (x) => {
1422
- x.preventDefault();
1421
+ const f = Math.min((t - 1) * s + 1, a), y = Math.min(t * s, a), r = (v) => {
1422
+ v.preventDefault();
1423
1423
  let d = parseInt(u, 10);
1424
1424
  isNaN(d) || d < 1 ? d = 1 : d > i && (d = i), g(d), d !== t && o(d);
1425
1425
  };
@@ -1432,8 +1432,8 @@ const zn = {
1432
1432
  id: "items-per-page",
1433
1433
  className: "pagination-select",
1434
1434
  value: s,
1435
- onChange: (x) => l(Number(x.target.value)),
1436
- children: m.map((x) => /* @__PURE__ */ e("option", { value: x, children: x }, x))
1435
+ onChange: (v) => l(Number(v.target.value)),
1436
+ children: m.map((v) => /* @__PURE__ */ e("option", { value: v, children: v }, v))
1437
1437
  }
1438
1438
  ),
1439
1439
  /* @__PURE__ */ n("span", { className: "pagination-info", children: [
@@ -1472,7 +1472,7 @@ const zn = {
1472
1472
  type: "number",
1473
1473
  className: "page-input",
1474
1474
  value: u,
1475
- onChange: (x) => g(x.target.value),
1475
+ onChange: (v) => g(v.target.value),
1476
1476
  onBlur: r,
1477
1477
  "aria-label": `Current page, Page ${t}`
1478
1478
  }
@@ -1562,7 +1562,7 @@ const zn = {
1562
1562
  Z(() => {
1563
1563
  g(t);
1564
1564
  }, [t]);
1565
- const f = se(
1565
+ const f = ae(
1566
1566
  Hr((r) => {
1567
1567
  a?.(r);
1568
1568
  }, s),
@@ -1609,7 +1609,7 @@ const zn = {
1609
1609
  console.log("Select component - value:", a, "type:", typeof a), console.log("Select component - options:", o);
1610
1610
  const r = f === "" ? o : o.filter(
1611
1611
  (d) => d.label.toLowerCase().includes(f.toLowerCase())
1612
- ), x = o.find((d) => {
1612
+ ), v = o.find((d) => {
1613
1613
  if (typeof a == "object" && a !== null) {
1614
1614
  if (a === d) return !0;
1615
1615
  if (a.id && d.id) return d.id === a.id;
@@ -1628,7 +1628,7 @@ const zn = {
1628
1628
  "select-button--error": !!i
1629
1629
  }),
1630
1630
  children: [
1631
- /* @__PURE__ */ e("span", { className: "select-value-display", children: x ? x.label : /* @__PURE__ */ e("span", { className: "placeholder", children: l }) }),
1631
+ /* @__PURE__ */ e("span", { className: "select-value-display", children: v ? v.label : /* @__PURE__ */ e("span", { className: "placeholder", children: l }) }),
1632
1632
  /* @__PURE__ */ e(Qt, { className: "select-chevron", "aria-hidden": "true" })
1633
1633
  ]
1634
1634
  }
@@ -1681,7 +1681,7 @@ const zn = {
1681
1681
  ] }),
1682
1682
  i && /* @__PURE__ */ e("p", { className: "select-error-message", children: i })
1683
1683
  ] }) });
1684
- }, Ln = () => {
1684
+ }, Mn = () => {
1685
1685
  const [t, a] = j(window.location.pathname);
1686
1686
  return Z(() => {
1687
1687
  const s = () => {
@@ -1697,7 +1697,7 @@ const zn = {
1697
1697
  return s;
1698
1698
  return null;
1699
1699
  }, pa = ({ item: t, isCollapsed: a, level: s = 0 }) => {
1700
- const { pathname: o } = Ln(), l = t.href || t.url || t.path, [m, i] = j(!1), u = t.icon;
1700
+ const { pathname: o } = Mn(), l = t.href || t.url || t.path, [m, i] = j(!1), u = t.icon;
1701
1701
  Z(() => {
1702
1702
  xt([t], o) && i(!0);
1703
1703
  }, [t, o]);
@@ -1891,12 +1891,12 @@ const zn = {
1891
1891
  u.value?.length || u.defaultValue?.length || 0
1892
1892
  ), r = (d) => {
1893
1893
  y(d.target.value.length), u.onChange && u.onChange(d);
1894
- }, x = m - f;
1894
+ }, v = m - f;
1895
1895
  return /* @__PURE__ */ n("div", { className: `textarea-wrapper ${o || ""}`, children: [
1896
1896
  /* @__PURE__ */ n("div", { className: "textarea-header", children: [
1897
1897
  t && /* @__PURE__ */ e("label", { htmlFor: g, className: "textarea-label", children: t }),
1898
1898
  i && m && /* @__PURE__ */ n("span", { className: "char-counter", children: [
1899
- x,
1899
+ v,
1900
1900
  " characters remaining"
1901
1901
  ] })
1902
1902
  ] }),
@@ -1941,7 +1941,7 @@ const zn = {
1941
1941
  t && o === "right" && /* @__PURE__ */ e(lt.Label, { className: "switch-label", passive: !0, children: t })
1942
1942
  ] }),
1943
1943
  l && /* @__PURE__ */ e("p", { className: "switch-error-message", children: l })
1944
- ] }), Ll = ({
1944
+ ] }), Ml = ({
1945
1945
  children: t,
1946
1946
  content: a,
1947
1947
  variant: s = "dark",
@@ -1954,9 +1954,9 @@ const zn = {
1954
1954
  // For external styling of the tooltip itself
1955
1955
  ...i
1956
1956
  }) => {
1957
- const u = ae.useId();
1957
+ const u = re.useId();
1958
1958
  return /* @__PURE__ */ n(te, { children: [
1959
- ae.cloneElement(t, { "data-tooltip-id": u }),
1959
+ re.cloneElement(t, { "data-tooltip-id": u }),
1960
1960
  /* @__PURE__ */ e(
1961
1961
  Qa,
1962
1962
  {
@@ -1969,7 +1969,7 @@ const zn = {
1969
1969
  }
1970
1970
  )
1971
1971
  ] });
1972
- }, Mn = {
1972
+ }, Ln = {
1973
1973
  enter: (t) => ({
1974
1974
  x: t > 0 ? "100%" : "-100%",
1975
1975
  opacity: 0
@@ -1982,7 +1982,7 @@ const zn = {
1982
1982
  x: t < 0 ? "100%" : "-100%",
1983
1983
  opacity: 0
1984
1984
  })
1985
- }, Ml = ({
1985
+ }, Ll = ({
1986
1986
  isOpen: t,
1987
1987
  onClose: a,
1988
1988
  steps: s = {},
@@ -1994,7 +1994,7 @@ const zn = {
1994
1994
  showProgress: g = !0,
1995
1995
  closeOnOverlayClick: f = !0
1996
1996
  }) => {
1997
- const y = s[o], r = Object.keys(s), x = r.indexOf(o), d = (x + 1) / r.length * 100, p = x > 0 && m.onBack;
1997
+ const y = s[o], r = Object.keys(s), v = r.indexOf(o), d = (v + 1) / r.length * 100, p = v > 0 && m.onBack;
1998
1998
  return /* @__PURE__ */ e(ue, { show: t, as: H, children: /* @__PURE__ */ n(
1999
1999
  be,
2000
2000
  {
@@ -2067,10 +2067,10 @@ const zn = {
2067
2067
  custom: l,
2068
2068
  mode: "wait",
2069
2069
  children: /* @__PURE__ */ e(
2070
- le.div,
2070
+ oe.div,
2071
2071
  {
2072
2072
  custom: l,
2073
- variants: Mn,
2073
+ variants: Ln,
2074
2074
  initial: "enter",
2075
2075
  animate: "center",
2076
2076
  exit: "exit",
@@ -2116,7 +2116,7 @@ const zn = {
2116
2116
  children: y,
2117
2117
  // ✅ Add children to the props list
2118
2118
  onClick: r,
2119
- ...x
2119
+ ...v
2120
2120
  }) => {
2121
2121
  const d = u, p = Q(
2122
2122
  "btn-base-icon",
@@ -2135,7 +2135,7 @@ const zn = {
2135
2135
  onClick: r,
2136
2136
  title: o,
2137
2137
  "aria-label": o,
2138
- ...x,
2138
+ ...v,
2139
2139
  children: i && /* @__PURE__ */ e(i, { size: g === "large" ? 20 : 16 })
2140
2140
  }
2141
2141
  );
@@ -2460,31 +2460,31 @@ function Qn({
2460
2460
  );
2461
2461
  function o({ open: f = !1, customHeader: y = {} } = {}) {
2462
2462
  if (f) {
2463
- const { Authorization: r, ...x } = Ot();
2463
+ const { Authorization: r, ...v } = Ot();
2464
2464
  return {
2465
- headers: { ...x, ...a, ...y }
2465
+ headers: { ...v, ...a, ...y }
2466
2466
  };
2467
2467
  }
2468
2468
  return { headers: { ...Ot(), ...y } };
2469
2469
  }
2470
- async function l(f, y, r = !1, x = {}) {
2470
+ async function l(f, y, r = !1, v = {}) {
2471
2471
  return s.get(f, {
2472
2472
  params: y,
2473
- ...o({ open: r, customHeader: x })
2473
+ ...o({ open: r, customHeader: v })
2474
2474
  });
2475
2475
  }
2476
- async function m(f, y, r = !1, x = {}) {
2477
- const d = { ...o({ open: r, customHeader: x }) };
2476
+ async function m(f, y, r = !1, v = {}) {
2477
+ const d = { ...o({ open: r, customHeader: v }) };
2478
2478
  return y !== void 0 && (d.data = y), s.delete(f, d);
2479
2479
  }
2480
- async function i(f, y = {}, r = !1, x = {}) {
2481
- return s.post(f, y, o({ open: r, customHeader: x }));
2480
+ async function i(f, y = {}, r = !1, v = {}) {
2481
+ return s.post(f, y, o({ open: r, customHeader: v }));
2482
2482
  }
2483
- async function u(f, y = {}, r = !1, x = {}) {
2484
- return s.put(f, y, o({ open: r, customHeader: x }));
2483
+ async function u(f, y = {}, r = !1, v = {}) {
2484
+ return s.put(f, y, o({ open: r, customHeader: v }));
2485
2485
  }
2486
- async function g(f, y = {}, r = !1, x = {}) {
2487
- return s.patch(f, y, o({ open: r, customHeader: x }));
2486
+ async function g(f, y = {}, r = !1, v = {}) {
2487
+ return s.patch(f, y, o({ open: r, customHeader: v }));
2488
2488
  }
2489
2489
  return {
2490
2490
  instance: s,
@@ -2638,7 +2638,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
2638
2638
  { id: 1, name: $e.USER, icon: tr, code: "users" },
2639
2639
  { id: 2, name: $e.GROUP, icon: Zt, code: "groups" },
2640
2640
  { id: 3, name: $e.ROLE, icon: ar, code: "roles" }
2641
- ], Lt = [
2641
+ ], Mt = [
2642
2642
  { id: 1, name: $t.View, icon: Kt },
2643
2643
  { id: 2, name: $t.Manage, icon: ea }
2644
2644
  ], ts = Ka().shape({
@@ -2654,70 +2654,70 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
2654
2654
  },
2655
2655
  isChanged: u = !1
2656
2656
  }) => {
2657
- const [g, f] = j(Pt[0]), [y, r] = j(""), x = Ct(y, 400), [d, p] = j([]), [S, T] = j(/* @__PURE__ */ new Set()), [R, O] = j(!1), [L, _] = j(Lt[0]), {
2657
+ const [g, f] = j(Pt[0]), [y, r] = j(""), v = Ct(y, 400), [d, p] = j([]), [z, $] = j(/* @__PURE__ */ new Set()), [R, O] = j(!1), [P, _] = j(Mt[0]), {
2658
2658
  control: U,
2659
2659
  handleSubmit: Y,
2660
2660
  watch: G,
2661
- formState: { errors: C, isSubmitting: h }
2661
+ formState: { errors: F, isSubmitting: h }
2662
2662
  } = rr({
2663
2663
  defaultValues: { pendingInvites: [] },
2664
2664
  resolver: lr(ts)
2665
- }), { fields: v, append: $, remove: B, update: E } = nr({
2665
+ }), { fields: x, append: S, remove: L, update: E } = nr({
2666
2666
  control: U,
2667
2667
  name: "pendingInvites"
2668
- }), z = G("pendingInvites");
2668
+ }), C = G("pendingInvites");
2669
2669
  Z(() => {
2670
- x.length > 1 ? (O(!0), Zn(g.name, x).then((k) => {
2670
+ v.length > 1 ? (O(!0), Zn(g.name, v).then((k) => {
2671
2671
  p(k);
2672
- }).catch((k) => console.error("Search failed:", k)).finally(() => O(!1))) : (p([]), T(/* @__PURE__ */ new Set()));
2673
- }, [x, g]);
2672
+ }).catch((k) => console.error("Search failed:", k)).finally(() => O(!1))) : (p([]), $(/* @__PURE__ */ new Set()));
2673
+ }, [v, g]);
2674
2674
  const b = (k) => {
2675
- T((M) => {
2676
- const P = new Set(M);
2677
- return P.has(k) ? P.delete(k) : P.add(k), P;
2675
+ $((B) => {
2676
+ const M = new Set(B);
2677
+ return M.has(k) ? M.delete(k) : M.add(k), M;
2678
2678
  });
2679
- }, w = () => {
2680
- d.filter((k) => S.has(k.id)).forEach((k) => {
2681
- v.find((M) => M.id === k.id) || $({ ...k, permission: L.name });
2682
- }), T(/* @__PURE__ */ new Set()), r("");
2679
+ }, N = () => {
2680
+ d.filter((k) => z.has(k.id)).forEach((k) => {
2681
+ x.find((B) => B.id === k.id) || S({ ...k, permission: P.name });
2682
+ }), $(/* @__PURE__ */ new Set()), r("");
2683
2683
  }, D = (k) => {
2684
- _(k), v.forEach(
2685
- (M, P) => E(P, { ...v[P], permission: k.name })
2684
+ _(k), x.forEach(
2685
+ (B, M) => E(M, { ...x[M], permission: k.name })
2686
2686
  );
2687
- }, N = async (k) => {
2687
+ }, w = async (k) => {
2688
2688
  try {
2689
2689
  if (l === me.DRIVE) {
2690
- const M = k.pendingInvites.map((F) => ({
2691
- id: F.id,
2692
- permission: F.permission,
2693
- type: F.type.toLowerCase()
2690
+ const B = k.pendingInvites.map((A) => ({
2691
+ id: A.id,
2692
+ permission: A.permission,
2693
+ type: A.type.toLowerCase()
2694
2694
  }));
2695
2695
  i({
2696
2696
  entity: t,
2697
- userGroupRolesObj: M,
2697
+ userGroupRolesObj: B,
2698
2698
  existingShares: o
2699
2699
  // Always send updated existing shares
2700
2700
  }, o);
2701
2701
  } else if (l === me.INTEREST) {
2702
- const M = k.pendingInvites.map((P) => ({
2703
- identity: P.id,
2704
- type: P.type.toLowerCase(),
2702
+ const B = k.pendingInvites.map((M) => ({
2703
+ identity: M.id,
2704
+ type: M.type.toLowerCase(),
2705
2705
  opt: !0,
2706
2706
  lock: !1,
2707
2707
  moderator: !1,
2708
- userName: P.name,
2708
+ userName: M.name,
2709
2709
  interestId: t?.data?.id
2710
2710
  }));
2711
- i(M, o);
2711
+ i(B, o);
2712
2712
  } else if (l === me.ARTICLE) {
2713
- const M = k.pendingInvites.map((F) => ({
2714
- id: F.id,
2715
- permission: F.permission,
2716
- type: F.type.toLowerCase()
2713
+ const B = k.pendingInvites.map((A) => ({
2714
+ id: A.id,
2715
+ permission: A.permission,
2716
+ type: A.type.toLowerCase()
2717
2717
  }));
2718
2718
  i({
2719
2719
  entity: t,
2720
- userGroupRolesObj: M,
2720
+ userGroupRolesObj: B,
2721
2721
  existingShares: o
2722
2722
  }, o);
2723
2723
  } else
@@ -2725,12 +2725,12 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
2725
2725
  setTimeout(() => {
2726
2726
  s();
2727
2727
  }, 1e3);
2728
- } catch (M) {
2729
- throw console.error("Failed to submit invites:", M), M;
2728
+ } catch (B) {
2729
+ throw console.error("Failed to submit invites:", B), B;
2730
2730
  }
2731
- }, A = (k) => {
2732
- const M = o[g.code].find((P) => P.name === k.name && P.permission !== "remove") || z.find((P) => P.name === k.name);
2733
- return M ? `${M.permission}` : "";
2731
+ }, T = (k) => {
2732
+ const B = o[g.code].find((M) => M.name === k.name && M.permission !== "remove") || C.find((M) => M.name === k.name);
2733
+ return B ? `${B.permission}` : "";
2734
2734
  }, I = () => {
2735
2735
  switch (l) {
2736
2736
  case me.DRIVE:
@@ -2743,7 +2743,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
2743
2743
  return "Add User, Groups or Roles test";
2744
2744
  }
2745
2745
  };
2746
- return oe(() => (console.log("InviteFlow - isChanged:", u, "pendingInvites.length:", z.length), z.length === 0 && !u), [z.length, u]), /* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-white", children: [
2746
+ return le(() => (console.log("InviteFlow - isChanged:", u, "pendingInvites.length:", C.length), C.length === 0 && !u), [C.length, u]), /* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-white", children: [
2747
2747
  /* @__PURE__ */ n("header", { className: "flex items-center justify-between p-4 border-b border-gray-300 flex-shrink-0", children: [
2748
2748
  /* @__PURE__ */ e(be.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children: I() }),
2749
2749
  /* @__PURE__ */ n("div", { className: "flex items-center gap-4", children: [
@@ -2791,24 +2791,24 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
2791
2791
  K.Option,
2792
2792
  {
2793
2793
  value: k,
2794
- className: ({ active: M }) => `${M ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
2795
- children: ({ selected: M }) => /* @__PURE__ */ n(te, { children: [
2794
+ className: ({ active: B }) => `${B ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
2795
+ children: ({ selected: B }) => /* @__PURE__ */ n(te, { children: [
2796
2796
  /* @__PURE__ */ n(
2797
2797
  "span",
2798
2798
  {
2799
- className: `${M ? "font-medium" : "font-normal"} flex items-center`,
2799
+ className: `${B ? "font-medium" : "font-normal"} flex items-center`,
2800
2800
  children: [
2801
2801
  /* @__PURE__ */ e(
2802
2802
  k.icon,
2803
2803
  {
2804
- className: `h-5 w-5 mr-2 ${M ? "text-white" : "text-gray-400"}`
2804
+ className: `h-5 w-5 mr-2 ${B ? "text-white" : "text-gray-400"}`
2805
2805
  }
2806
2806
  ),
2807
2807
  k.name
2808
2808
  ]
2809
2809
  }
2810
2810
  ),
2811
- M && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-white", children: /* @__PURE__ */ e(ht, { className: "h-5 w-5" }) })
2811
+ B && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-white", children: /* @__PURE__ */ e(ht, { className: "h-5 w-5" }) })
2812
2812
  ] })
2813
2813
  },
2814
2814
  k.id
@@ -2825,7 +2825,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
2825
2825
  }
2826
2826
  ) }),
2827
2827
  /* @__PURE__ */ e(ke, { children: (d?.length > 0 || R) && /* @__PURE__ */ e(
2828
- le.div,
2828
+ oe.div,
2829
2829
  {
2830
2830
  initial: { opacity: 0, y: -10 },
2831
2831
  animate: { opacity: 1, y: 0 },
@@ -2834,21 +2834,21 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
2834
2834
  className: "absolute top-full mt-2 w-full col-span-3 bg-white border border-gray-300 rounded-lg shadow-lg z-10",
2835
2835
  children: R ? /* @__PURE__ */ e("div", { className: "p-4 text-center text-gray-500", children: "Loading..." }) : /* @__PURE__ */ n(te, { children: [
2836
2836
  /* @__PURE__ */ e("div", { className: "max-h-60 overflow-y-auto p-2 space-y-1", children: d.map((k) => {
2837
- const M = A(k);
2837
+ const B = T(k);
2838
2838
  return /* @__PURE__ */ n(
2839
2839
  "div",
2840
2840
  {
2841
- onClick: () => M ? null : b(k.id),
2842
- className: `flex items-center gap-3 p-2 rounded-md hover:bg-blue-50 ${M ? " hover:cursor-not-allowed" : "hover:cursor-pointer"}`,
2841
+ onClick: () => B ? null : b(k.id),
2842
+ className: `flex items-center gap-3 p-2 rounded-md hover:bg-blue-50 ${B ? " hover:cursor-not-allowed" : "hover:cursor-pointer"}`,
2843
2843
  children: [
2844
2844
  /* @__PURE__ */ e(
2845
2845
  "input",
2846
2846
  {
2847
2847
  type: "checkbox",
2848
- checked: S.has(k.id),
2848
+ checked: z.has(k.id),
2849
2849
  readOnly: !0,
2850
2850
  className: "h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500",
2851
- disabled: !!M
2851
+ disabled: !!B
2852
2852
  }
2853
2853
  ),
2854
2854
  /* @__PURE__ */ e(
@@ -2860,8 +2860,8 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
2860
2860
  }
2861
2861
  ),
2862
2862
  /* @__PURE__ */ e("span", { className: "text-md font-medium text-gray-800 truncate", children: k.name }),
2863
- M ? /* @__PURE__ */ n(te, { children: [
2864
- /* @__PURE__ */ e("span", { className: "text-sm px-[12px] py-[2px] border border-dashed rounded-xl bg-teal-100 text-teal-700", children: M }),
2863
+ B ? /* @__PURE__ */ n(te, { children: [
2864
+ /* @__PURE__ */ e("span", { className: "text-sm px-[12px] py-[2px] border border-dashed rounded-xl bg-teal-100 text-teal-700", children: B }),
2865
2865
  /* @__PURE__ */ e("span", { className: "text-sm text-gray-400", children: "Already added" })
2866
2866
  ] }) : ""
2867
2867
  ]
@@ -2881,8 +2881,8 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
2881
2881
  /* @__PURE__ */ e(
2882
2882
  "button",
2883
2883
  {
2884
- onClick: w,
2885
- disabled: S.size === 0,
2884
+ onClick: N,
2885
+ disabled: z.size === 0,
2886
2886
  className: "px-3 py-1 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:bg-blue-300 disabled:cursor-not-allowed hover:cursor-pointer",
2887
2887
  children: "Add"
2888
2888
  }
@@ -2892,8 +2892,8 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
2892
2892
  }
2893
2893
  ) })
2894
2894
  ] }),
2895
- /* @__PURE__ */ e(ke, { children: v.length > 0 && /* @__PURE__ */ n(
2896
- le.div,
2895
+ /* @__PURE__ */ e(ke, { children: x.length > 0 && /* @__PURE__ */ n(
2896
+ oe.div,
2897
2897
  {
2898
2898
  initial: { opacity: 0, y: 20 },
2899
2899
  animate: { opacity: 1, y: 0 },
@@ -2902,21 +2902,21 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
2902
2902
  /* @__PURE__ */ n("div", { className: "flex justify-between items-center", children: [
2903
2903
  /* @__PURE__ */ n("div", { className: "font-semibold text-gray-800", children: [
2904
2904
  "Pending Invites (",
2905
- v.length,
2905
+ x.length,
2906
2906
  ")"
2907
2907
  ] }),
2908
2908
  l === me.DRIVE && /* @__PURE__ */ e(
2909
2909
  K,
2910
2910
  {
2911
- value: L,
2911
+ value: P,
2912
2912
  onChange: D,
2913
2913
  children: /* @__PURE__ */ n("div", { className: "relative", children: [
2914
2914
  /* @__PURE__ */ n(K.Button, { className: "relative w-full border border-gray-300 bg-white rounded-md shadow-sm pl-3 pr-10 py-2 text-left hover:cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 sm:text-sm", children: [
2915
2915
  /* @__PURE__ */ n("span", { className: "flex items-center", children: [
2916
- /* @__PURE__ */ e(L.icon, { className: "h-5 w-5 text-gray-400 mr-2" }),
2916
+ /* @__PURE__ */ e(P.icon, { className: "h-5 w-5 text-gray-400 mr-2" }),
2917
2917
  /* @__PURE__ */ n("span", { className: "truncate", children: [
2918
2918
  "Can ",
2919
- L.name
2919
+ P.name
2920
2920
  ] })
2921
2921
  ] }),
2922
2922
  /* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ e(ut, { className: "h-5 w-5 text-gray-400" }) })
@@ -2928,21 +2928,21 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
2928
2928
  leave: "transition ease-in duration-100",
2929
2929
  leaveFrom: "opacity-100",
2930
2930
  leaveTo: "opacity-0",
2931
- children: /* @__PURE__ */ e(K.Options, { className: "absolute z-10 mt-1 w-auto min-w-full bg-white shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm", children: Lt.map((k) => /* @__PURE__ */ e(
2931
+ children: /* @__PURE__ */ e(K.Options, { className: "absolute z-10 mt-1 w-auto min-w-full bg-white shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm", children: Mt.map((k) => /* @__PURE__ */ e(
2932
2932
  K.Option,
2933
2933
  {
2934
2934
  value: k,
2935
- className: ({ active: M }) => `${M ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
2936
- children: ({ selected: M, active: P }) => /* @__PURE__ */ n(te, { children: [
2935
+ className: ({ active: B }) => `${B ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
2936
+ children: ({ selected: B, active: M }) => /* @__PURE__ */ n(te, { children: [
2937
2937
  /* @__PURE__ */ n(
2938
2938
  "span",
2939
2939
  {
2940
- className: `${M ? "font-medium" : "font-normal"} flex items-center`,
2940
+ className: `${B ? "font-medium" : "font-normal"} flex items-center`,
2941
2941
  children: [
2942
2942
  /* @__PURE__ */ e(
2943
2943
  k.icon,
2944
2944
  {
2945
- className: `h-5 w-5 mr-2 ${P ? "text-white" : "text-gray-400"}`
2945
+ className: `h-5 w-5 mr-2 ${M ? "text-white" : "text-gray-400"}`
2946
2946
  }
2947
2947
  ),
2948
2948
  "Can ",
@@ -2950,7 +2950,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
2950
2950
  ]
2951
2951
  }
2952
2952
  ),
2953
- M && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600", children: /* @__PURE__ */ e(
2953
+ B && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600", children: /* @__PURE__ */ e(
2954
2954
  ht,
2955
2955
  {
2956
2956
  className: "h-5 w-5",
@@ -2967,8 +2967,8 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
2967
2967
  }
2968
2968
  )
2969
2969
  ] }),
2970
- /* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e(ke, { children: v.map((k, M) => /* @__PURE__ */ n(
2971
- le.div,
2970
+ /* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e(ke, { children: x.map((k, B) => /* @__PURE__ */ n(
2971
+ oe.div,
2972
2972
  {
2973
2973
  layout: !0,
2974
2974
  initial: { opacity: 0, x: -5 },
@@ -2995,7 +2995,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
2995
2995
  /* @__PURE__ */ e(
2996
2996
  "button",
2997
2997
  {
2998
- onClick: () => B(M),
2998
+ onClick: () => L(B),
2999
2999
  className: "text-gray-400 hover:text-red-500 hover:cursor-pointer",
3000
3000
  children: /* @__PURE__ */ e(He, { className: "h-5 w-5" })
3001
3001
  }
@@ -3011,9 +3011,9 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
3011
3011
  ] }),
3012
3012
  /* @__PURE__ */ e("footer", { className: "p-4 border-t border-gray-300 flex-shrink-0", children: /* @__PURE__ */ n("div", { className: "flex justify-between items-center", children: [
3013
3013
  /* @__PURE__ */ n("p", { className: "text-sm text-gray-600", children: [
3014
- z.length,
3014
+ C.length,
3015
3015
  " invitation",
3016
- z.length !== 1 ? "s" : "",
3016
+ C.length !== 1 ? "s" : "",
3017
3017
  " selected"
3018
3018
  ] }),
3019
3019
  /* @__PURE__ */ n("div", { className: "flex gap-2", children: [
@@ -3028,8 +3028,8 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
3028
3028
  /* @__PURE__ */ e(
3029
3029
  "button",
3030
3030
  {
3031
- onClick: () => Y(N)(),
3032
- disabled: h || z.length === 0 && !u,
3031
+ onClick: () => Y(w)(),
3032
+ disabled: h || C.length === 0 && !u,
3033
3033
  className: "px-4 py-2 text-sm font-medium text-white bg-blue-600 border border-transparent rounded-md shadow-sm hover:bg-blue-700 hover:cursor-pointer focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:bg-blue-300 disabled:cursor-not-allowed",
3034
3034
  children: h ? "Inviting..." : l === me.DRIVE ? "Send Invites" : "Add"
3035
3035
  }
@@ -3051,11 +3051,11 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
3051
3051
  }), g = Zr(u), f = Kr(u), { getReferenceProps: y, getFloatingProps: r } = en([
3052
3052
  g,
3053
3053
  f
3054
- ]), x = it.find((p) => p.name === t.permission || p.value === t.permission) || it[0];
3054
+ ]), v = it.find((p) => p.name === t.permission || p.value === t.permission) || it[0];
3055
3055
  return (
3056
3056
  // FIX: The <Listbox> component now wraps both the button and the portal.
3057
3057
  // This provides the necessary context for both children.
3058
- /* @__PURE__ */ n(K, { value: x, onChange: (p) => {
3058
+ /* @__PURE__ */ n(K, { value: v, onChange: (p) => {
3059
3059
  s(p), l(!1);
3060
3060
  }, children: [
3061
3061
  /* @__PURE__ */ n(
@@ -3093,24 +3093,24 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
3093
3093
  K.Option,
3094
3094
  {
3095
3095
  className: ({
3096
- active: S
3096
+ active: z
3097
3097
  }) => `relative select-none py-2 pl-10 pr-4 hover:cursor-pointer
3098
- ${S ? "bg-blue-100 text-blue-900" : "text-gray-900"}
3099
- ${p.isDestructive && S ? "bg-red-100 text-red-900" : ""}
3100
- ${p.isDestructive && !S ? "text-red-600" : ""}`,
3098
+ ${z ? "bg-blue-100 text-blue-900" : "text-gray-900"}
3099
+ ${p.isDestructive && z ? "bg-red-100 text-red-900" : ""}
3100
+ ${p.isDestructive && !z ? "text-red-600" : ""}`,
3101
3101
  value: p,
3102
- children: ({ selected: S }) => /* @__PURE__ */ n(te, { children: [
3102
+ children: ({ selected: z }) => /* @__PURE__ */ n(te, { children: [
3103
3103
  /* @__PURE__ */ n(
3104
3104
  "span",
3105
3105
  {
3106
- className: `flex items-center gap-2 truncate ${S ? "font-medium" : "font-normal"}`,
3106
+ className: `flex items-center gap-2 truncate ${z ? "font-medium" : "font-normal"}`,
3107
3107
  children: [
3108
3108
  /* @__PURE__ */ e(p.icon, { className: "h-5 w-5", "aria-hidden": "true" }),
3109
3109
  p.name
3110
3110
  ]
3111
3111
  }
3112
3112
  ),
3113
- S && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600", children: /* @__PURE__ */ e(ht, { className: "h-5 w-5", "aria-hidden": "true" }) })
3113
+ z && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600", children: /* @__PURE__ */ e(ht, { className: "h-5 w-5", "aria-hidden": "true" }) })
3114
3114
  ] })
3115
3115
  },
3116
3116
  p.name
@@ -3130,32 +3130,32 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
3130
3130
  existingShares: l,
3131
3131
  allowedPermissions: m
3132
3132
  }) => {
3133
- const [i, u] = j(l), [g, f] = j(0), [y, r] = j(""), x = Ct(y, 300), d = {
3133
+ const [i, u] = j(l), [g, f] = j(0), [y, r] = j(""), v = Ct(y, 300), d = {
3134
3134
  users: i.users.filter(
3135
- (O) => O.name.toLowerCase().includes(x.toLowerCase())
3135
+ (O) => O.name.toLowerCase().includes(v.toLowerCase())
3136
3136
  ),
3137
3137
  groups: i.groups.filter(
3138
- (O) => O.name.toLowerCase().includes(x.toLowerCase())
3138
+ (O) => O.name.toLowerCase().includes(v.toLowerCase())
3139
3139
  ),
3140
3140
  roles: i.roles.filter(
3141
- (O) => O.name.toLowerCase().includes(x.toLowerCase())
3141
+ (O) => O.name.toLowerCase().includes(v.toLowerCase())
3142
3142
  )
3143
- }, p = async (O, L, _, U) => {
3144
- const Y = L.value;
3143
+ }, p = async (O, P, _, U) => {
3144
+ const Y = P.value;
3145
3145
  u((G) => ({
3146
3146
  ...G,
3147
3147
  [_]: G[_].map(
3148
- (C) => C.id === O.id ? { ...C, permission: Y } : C
3148
+ (F) => F.id === O.id ? { ...F, permission: Y } : F
3149
3149
  )
3150
3150
  }));
3151
- }, S = () => {
3151
+ }, z = () => {
3152
3152
  const O = {
3153
- users: i.users.filter((L) => L.permission !== "remove"),
3154
- groups: i.groups.filter((L) => L.permission !== "remove"),
3155
- roles: i.roles.filter((L) => L.permission !== "remove")
3153
+ users: i.users.filter((P) => P.permission !== "remove"),
3154
+ groups: i.groups.filter((P) => P.permission !== "remove"),
3155
+ roles: i.roles.filter((P) => P.permission !== "remove")
3156
3156
  };
3157
3157
  a(O);
3158
- }, T = ["users", "groups", "roles"], R = ["Users", "Groups", "Roles"];
3158
+ }, $ = ["users", "groups", "roles"], R = ["Users", "Groups", "Roles"];
3159
3159
  return (
3160
3160
  // The main structure remains the same...
3161
3161
  /* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-gray-50", children: [
@@ -3182,16 +3182,16 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
3182
3182
  )
3183
3183
  ] }),
3184
3184
  /* @__PURE__ */ n("div", { className: "flex flex-col flex-grow", children: [
3185
- /* @__PURE__ */ n(ne.Group, { selectedIndex: g, onChange: f, children: [
3185
+ /* @__PURE__ */ n(se.Group, { selectedIndex: g, onChange: f, children: [
3186
3186
  /* @__PURE__ */ n("div", { className: "p-4 bg-white border-b border-gray-300", children: [
3187
- /* @__PURE__ */ e(ne.List, { className: "flex space-x-1 bg-gray-100 p-1 rounded-lg", children: R.map((O) => /* @__PURE__ */ e(
3188
- ne,
3187
+ /* @__PURE__ */ e(se.List, { className: "flex space-x-1 bg-gray-100 p-1 rounded-lg", children: R.map((O) => /* @__PURE__ */ e(
3188
+ se,
3189
3189
  {
3190
3190
  className: ({
3191
- selected: L
3191
+ selected: P
3192
3192
  }) => `w-full py-2 text-sm font-medium leading-5 rounded-md
3193
3193
  focus:outline-none focus:ring-2 ring-offset-2 ring-offset-blue-400 ring-white ring-opacity-60
3194
- ${L ? "bg-white shadow text-blue-700" : "text-gray-600 hover:bg-white/[0.6]"}`,
3194
+ ${P ? "bg-white shadow text-blue-700" : "text-gray-600 hover:bg-white/[0.6]"}`,
3195
3195
  children: O
3196
3196
  },
3197
3197
  O
@@ -3206,18 +3206,18 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
3206
3206
  ) })
3207
3207
  ] }),
3208
3208
  /* @__PURE__ */ e("div", { className: "flex-grow overflow-y-auto p-4 h-[calc(100vh-330px)]", children: /* @__PURE__ */ e(ke, { mode: "wait", children: /* @__PURE__ */ e(
3209
- le.div,
3209
+ oe.div,
3210
3210
  {
3211
3211
  initial: { y: 10, opacity: 0 },
3212
3212
  animate: { y: 0, opacity: 1 },
3213
3213
  exit: { y: -10, opacity: 0 },
3214
3214
  transition: { duration: 0.2 },
3215
- children: /* @__PURE__ */ e(ne.Panels, { as: H, children: T.map((O) => /* @__PURE__ */ e(
3216
- ne.Panel,
3215
+ children: /* @__PURE__ */ e(se.Panels, { as: H, children: $.map((O) => /* @__PURE__ */ e(
3216
+ se.Panel,
3217
3217
  {
3218
3218
  className: "space-y-3 focus:outline-none",
3219
- children: /* @__PURE__ */ e(ke, { children: d[O].length > 0 ? d[O].map((L) => /* @__PURE__ */ n(
3220
- le.div,
3219
+ children: /* @__PURE__ */ e(ke, { children: d[O].length > 0 ? d[O].map((P) => /* @__PURE__ */ n(
3220
+ oe.div,
3221
3221
  {
3222
3222
  layout: !0,
3223
3223
  initial: { opacity: 0, y: 20 },
@@ -3233,20 +3233,20 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
3233
3233
  /* @__PURE__ */ e(
3234
3234
  "img",
3235
3235
  {
3236
- src: L.avatarUrl || `https://avatar.vercel.sh/${L.name}.svg?text=${L.name.charAt(0)}`,
3237
- alt: L.name,
3236
+ src: P.avatarUrl || `https://avatar.vercel.sh/${P.name}.svg?text=${P.name.charAt(0)}`,
3237
+ alt: P.name,
3238
3238
  className: "w-10 h-10 rounded-full flex-shrink-0"
3239
3239
  }
3240
3240
  ),
3241
3241
  /* @__PURE__ */ n("div", { className: "overflow-hidden", children: [
3242
- /* @__PURE__ */ e("p", { className: "font-medium text-gray-900 truncate", children: L.name }),
3242
+ /* @__PURE__ */ e("p", { className: "font-medium text-gray-900 truncate", children: P.name }),
3243
3243
  O !== "users" && /* @__PURE__ */ e(
3244
3244
  "button",
3245
3245
  {
3246
3246
  onClick: () => o({
3247
- id: L.id,
3247
+ id: P.id,
3248
3248
  type: O,
3249
- name: L.name
3249
+ name: P.name
3250
3250
  }),
3251
3251
  className: "text-sm text-blue-600 hover:underline hover:cursor-pointer",
3252
3252
  children: "View Members"
@@ -3257,10 +3257,10 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
3257
3257
  /* @__PURE__ */ e(
3258
3258
  rs,
3259
3259
  {
3260
- item: L,
3260
+ item: P,
3261
3261
  allowedPermissions: m,
3262
3262
  onPermissionChange: (_) => p(
3263
- L,
3263
+ P,
3264
3264
  _,
3265
3265
  O
3266
3266
  )
@@ -3268,11 +3268,11 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
3268
3268
  )
3269
3269
  ]
3270
3270
  },
3271
- L.id
3271
+ P.id
3272
3272
  )) : (
3273
3273
  // Empty state is unchanged
3274
3274
  /* @__PURE__ */ n(
3275
- le.div,
3275
+ oe.div,
3276
3276
  {
3277
3277
  initial: { opacity: 0 },
3278
3278
  animate: { opacity: 1 },
@@ -3299,7 +3299,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
3299
3299
  /* @__PURE__ */ e("div", { className: "p-4 bg-white border-t border-gray-300 flex justify-end", children: /* @__PURE__ */ e(
3300
3300
  "button",
3301
3301
  {
3302
- onClick: S,
3302
+ onClick: z,
3303
3303
  className: "px-4 py-2 bg-blue-600 text-white rounded-md shadow hover:bg-blue-700",
3304
3304
  children: "Update"
3305
3305
  }
@@ -3334,11 +3334,11 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
3334
3334
  hidden: { y: 20, opacity: 0 },
3335
3335
  visible: { y: 0, opacity: 1 },
3336
3336
  exit: { opacity: 0, x: -20 }
3337
- }, x = () => l ? (
3337
+ }, v = () => l ? (
3338
3338
  // Show 5 skeleton items while loading
3339
3339
  /* @__PURE__ */ e("div", { children: Array.from({ length: 5 }).map((d, p) => /* @__PURE__ */ e(ss, {}, p)) })
3340
3340
  ) : f.length === 0 ? /* @__PURE__ */ n(
3341
- le.div,
3341
+ oe.div,
3342
3342
  {
3343
3343
  initial: { opacity: 0, scale: 0.95 },
3344
3344
  animate: { opacity: 1, scale: 1 },
@@ -3350,14 +3350,14 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
3350
3350
  ]
3351
3351
  }
3352
3352
  ) : /* @__PURE__ */ e(
3353
- le.ul,
3353
+ oe.ul,
3354
3354
  {
3355
3355
  variants: y,
3356
3356
  initial: "hidden",
3357
3357
  animate: "visible",
3358
3358
  className: "divide-y divide-gray-200",
3359
3359
  children: /* @__PURE__ */ e(ke, { children: f.map((d) => /* @__PURE__ */ n(
3360
- le.li,
3360
+ oe.li,
3361
3361
  {
3362
3362
  layout: !0,
3363
3363
  variants: r,
@@ -3418,7 +3418,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
3418
3418
  placeholder: "Search members..."
3419
3419
  }
3420
3420
  ) }),
3421
- /* @__PURE__ */ e("div", { className: "flex-grow overflow-y-auto", children: x() })
3421
+ /* @__PURE__ */ e("div", { className: "flex-grow overflow-y-auto", children: v() })
3422
3422
  ] });
3423
3423
  }, pe = {
3424
3424
  INVITE: "invite",
@@ -3441,26 +3441,26 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
3441
3441
  allowedPermissions: u = [],
3442
3442
  ...g
3443
3443
  }) => {
3444
- const [f, y] = j(pe.INVITE), [r, x] = j(t), [d, p] = j(null), [S, T] = j(!1), [R, O] = j([]), [L, _] = j(pe.MANAGE), U = () => {
3444
+ const [f, y] = j(pe.INVITE), [r, v] = j(t), [d, p] = j(null), [z, $] = j(!1), [R, O] = j([]), [P, _] = j(pe.MANAGE), U = () => {
3445
3445
  y(pe.INVITE), p(null), m();
3446
3446
  }, Y = () => {
3447
3447
  y(pe.MANAGE);
3448
- }, G = async ({ id: v, name: $, type: B }) => {
3449
- if (B === "groups") {
3448
+ }, G = async ({ id: x, name: S, type: L }) => {
3449
+ if (L === "groups") {
3450
3450
  try {
3451
- const E = await je(`${We.getMembersForGroup($)}`);
3451
+ const E = await je(`${We.getMembersForGroup(S)}`);
3452
3452
  } catch (E) {
3453
3453
  console.log("Error searching entities:", E);
3454
3454
  }
3455
3455
  O(resp);
3456
3456
  }
3457
- p({ id: v, type: B, name: $ }), _(f), y(pe.MEMBERS);
3458
- }, C = (v) => {
3459
- console.log("changedExistingShares", v), x(v);
3460
- const $ = ot.mapValues(t, (z) => z.map((b) => ({ id: b.id, permission: b.permission })).sort((b, w) => b.id - w.id)), B = ot.mapValues(v, (z) => z.map((b) => ({ id: b.id, permission: b.permission })).sort((b, w) => b.id - w.id));
3461
- console.log("Existing data:", $), console.log("Changed data:", B);
3462
- const E = !ot.isEqual($, B);
3463
- console.log("hasPermissionChanged:", E), T(E), y(f === pe.MEMBERS ? L : pe.INVITE);
3457
+ p({ id: x, type: L, name: S }), _(f), y(pe.MEMBERS);
3458
+ }, F = (x) => {
3459
+ console.log("changedExistingShares", x), v(x);
3460
+ const S = ot.mapValues(t, (C) => C.map((b) => ({ id: b.id, permission: b.permission })).sort((b, N) => b.id - N.id)), L = ot.mapValues(x, (C) => C.map((b) => ({ id: b.id, permission: b.permission })).sort((b, N) => b.id - N.id));
3461
+ console.log("Existing data:", S), console.log("Changed data:", L);
3462
+ const E = !ot.isEqual(S, L);
3463
+ console.log("hasPermissionChanged:", E), $(E), y(f === pe.MEMBERS ? P : pe.INVITE);
3464
3464
  };
3465
3465
  return /* @__PURE__ */ e(ue, { appear: !0, show: a, as: H, children: /* @__PURE__ */ n(be, { as: "div", className: "relative z-50", onClose: U, children: [
3466
3466
  /* @__PURE__ */ e("div", { className: "filter-modal-overlay", "aria-hidden": "true" }),
@@ -3468,7 +3468,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
3468
3468
  switch (f) {
3469
3469
  case pe.MANAGE:
3470
3470
  return /* @__PURE__ */ e(
3471
- le.div,
3471
+ oe.div,
3472
3472
  {
3473
3473
  initial: { x: "100%" },
3474
3474
  animate: { x: 0 },
@@ -3479,7 +3479,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
3479
3479
  ns,
3480
3480
  {
3481
3481
  entity: o,
3482
- onBack: C,
3482
+ onBack: F,
3483
3483
  onClose: U,
3484
3484
  onOpenMembers: G,
3485
3485
  existingShares: r,
@@ -3492,7 +3492,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
3492
3492
  );
3493
3493
  case pe.MEMBERS:
3494
3494
  return /* @__PURE__ */ e(
3495
- le.div,
3495
+ oe.div,
3496
3496
  {
3497
3497
  initial: { x: "100%" },
3498
3498
  animate: { x: 0 },
@@ -3503,7 +3503,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
3503
3503
  ls,
3504
3504
  {
3505
3505
  entity: d,
3506
- onBack: C,
3506
+ onBack: F,
3507
3507
  onClose: U,
3508
3508
  calledBy: l,
3509
3509
  existingShares: r,
@@ -3515,7 +3515,7 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
3515
3515
  );
3516
3516
  default:
3517
3517
  return /* @__PURE__ */ e(
3518
- le.div,
3518
+ oe.div,
3519
3519
  {
3520
3520
  initial: { x: 0 },
3521
3521
  animate: { x: 0 },
@@ -3531,10 +3531,10 @@ const Ee = Qn(), je = Ee.axiosGet, Gl = Ee.axiosDelete, Ze = Ee.axiosPost, Hn =
3531
3531
  existingShares: r,
3532
3532
  calledBy: l,
3533
3533
  showExistingShares: i,
3534
- onFinalSubmit: (v) => {
3535
- s(v, r);
3534
+ onFinalSubmit: (x) => {
3535
+ s(x, r);
3536
3536
  },
3537
- isChanged: S
3537
+ isChanged: z
3538
3538
  }
3539
3539
  )
3540
3540
  },
@@ -3565,51 +3565,51 @@ function at({
3565
3565
  onSearch: y,
3566
3566
  // (query: string) => void (required if searchMode==="server")
3567
3567
  serverLoading: r = !1,
3568
- minSearchChars: x = 2,
3568
+ minSearchChars: v = 2,
3569
3569
  // NEW: mappers (id/label keys)
3570
- getOptionId: d = (S) => String(S.id),
3571
- getOptionLabel: p = (S) => S.name
3570
+ getOptionId: d = (z) => String(z.id),
3571
+ getOptionLabel: p = (z) => z.name
3572
3572
  }) {
3573
- const S = Xe(), T = Xe(), [R, O] = j(""), L = ge(""), _ = oe(() => {
3574
- const v = /* @__PURE__ */ new Map();
3575
- for (const $ of a) v.set(d($), $);
3576
- return v;
3577
- }, [a, d]), U = oe(() => Array.isArray(s) ? s.map((v) => v && typeof v == "object" ? _.get(d(v)) || null : _.get(String(v))).filter(Boolean) : [], [s, _, d]), Y = oe(() => {
3573
+ const z = Xe(), $ = Xe(), [R, O] = j(""), P = ge(""), _ = le(() => {
3574
+ const x = /* @__PURE__ */ new Map();
3575
+ for (const S of a) x.set(d(S), S);
3576
+ return x;
3577
+ }, [a, d]), U = le(() => Array.isArray(s) ? s.map((x) => x && typeof x == "object" ? _.get(d(x)) || null : _.get(String(x))).filter(Boolean) : [], [s, _, d]), Y = le(() => {
3578
3578
  if (!R) return a;
3579
- const v = R.toLowerCase();
3580
- return a.filter(($) => p($).toLowerCase().includes(v));
3579
+ const x = R.toLowerCase();
3580
+ return a.filter((S) => p(S).toLowerCase().includes(x));
3581
3581
  }, [a, R, p]);
3582
3582
  Z(() => {
3583
- f === "server" && R.length >= x && R !== L.current && (L.current = R, y && y(R));
3584
- }, [R, f, x, y]);
3585
- const G = f === "client" ? Y : a, C = () => {
3583
+ f === "server" && R.length >= v && R !== P.current && (P.current = R, y && y(R));
3584
+ }, [R, f, v, y]);
3585
+ const G = f === "client" ? Y : a, F = () => {
3586
3586
  if (!U.length)
3587
3587
  return /* @__PURE__ */ e("span", { className: "text-gray-500", children: m });
3588
- const v = U.slice(0, u), $ = U.length - u;
3588
+ const x = U.slice(0, u), S = U.length - u;
3589
3589
  return /* @__PURE__ */ n("div", { className: "flex flex-wrap gap-2", children: [
3590
- v.map((B) => /* @__PURE__ */ e(
3590
+ x.map((L) => /* @__PURE__ */ e(
3591
3591
  "span",
3592
3592
  {
3593
3593
  className: "px-2 py-1 text-xs font-medium text-white bg-gray-800 rounded-full",
3594
- children: p(B)
3594
+ children: p(L)
3595
3595
  },
3596
- d(B)
3596
+ d(L)
3597
3597
  )),
3598
- $ > 0 && /* @__PURE__ */ n("span", { className: "px-2 py-1 text-xs font-medium text-gray-600 bg-gray-200 rounded-full", children: [
3598
+ S > 0 && /* @__PURE__ */ n("span", { className: "px-2 py-1 text-xs font-medium text-gray-600 bg-gray-200 rounded-full", children: [
3599
3599
  "+",
3600
- $,
3600
+ S,
3601
3601
  " more"
3602
3602
  ] })
3603
3603
  ] });
3604
3604
  };
3605
- return /* @__PURE__ */ e(K, { value: U, onChange: (v) => {
3606
- const $ = Array.from(new Set(v.map((B) => d(B))));
3607
- g !== -1 && $.length > g || o($);
3608
- }, multiple: !0, by: "id", children: ({ open: v }) => /* @__PURE__ */ n("div", { children: [
3605
+ return /* @__PURE__ */ e(K, { value: U, onChange: (x) => {
3606
+ const S = Array.from(new Set(x.map((L) => d(L))));
3607
+ g !== -1 && S.length > g || o(S);
3608
+ }, multiple: !0, by: "id", children: ({ open: x }) => /* @__PURE__ */ n("div", { children: [
3609
3609
  /* @__PURE__ */ e(
3610
3610
  K.Label,
3611
3611
  {
3612
- id: S,
3612
+ id: z,
3613
3613
  className: "block text-sm font-medium leading-6 text-gray-900",
3614
3614
  children: t
3615
3615
  }
@@ -3618,16 +3618,16 @@ function at({
3618
3618
  /* @__PURE__ */ n(
3619
3619
  K.Button,
3620
3620
  {
3621
- "aria-labelledby": S,
3621
+ "aria-labelledby": z,
3622
3622
  "aria-invalid": !!i,
3623
- "aria-describedby": i ? T : void 0,
3623
+ "aria-describedby": i ? $ : void 0,
3624
3624
  onBlur: l,
3625
3625
  className: Ue(
3626
3626
  "relative w-full min-h-[38px] cursor-default rounded-md bg-white py-1.5 pl-3 pr-10 text-left text-gray-900 shadow-sm ring-1 ring-inset focus:outline-none focus:ring-2 focus:ring-gray-600 sm:text-sm sm:leading-6",
3627
3627
  i ? "ring-red-500" : "ring-gray-300"
3628
3628
  ),
3629
3629
  children: [
3630
- /* @__PURE__ */ e("span", { className: "block truncate", children: C() }),
3630
+ /* @__PURE__ */ e("span", { className: "block truncate", children: F() }),
3631
3631
  /* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ e(Qt, { className: "w-5 h-5 text-gray-400", "aria-hidden": "true" }) })
3632
3632
  ]
3633
3633
  }
@@ -3636,7 +3636,7 @@ function at({
3636
3636
  ue,
3637
3637
  {
3638
3638
  as: H,
3639
- show: v,
3639
+ show: x,
3640
3640
  leave: "transition ease-in duration-100",
3641
3641
  leaveFrom: "opacity-100",
3642
3642
  leaveTo: "opacity-0",
@@ -3646,33 +3646,33 @@ function at({
3646
3646
  {
3647
3647
  value: R,
3648
3648
  onDebouncedChange: O,
3649
- placeholder: f === "server" ? `Search (min ${x})…` : "Search options…"
3649
+ placeholder: f === "server" ? `Search (min ${v})…` : "Search options…"
3650
3650
  }
3651
3651
  ) }),
3652
3652
  f === "server" && r && /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: "Loading…" }),
3653
- G.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: f === "server" ? R.length < x ? `Type at least ${x} characters to search.` : "No results." : "No options found." }) : G.map(($) => {
3654
- const B = d($), E = p($), z = U.some((w) => d(w) === B), b = g !== -1 && U.length >= g && !z;
3653
+ G.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: f === "server" ? R.length < v ? `Type at least ${v} characters to search.` : "No results." : "No options found." }) : G.map((S) => {
3654
+ const L = d(S), E = p(S), C = U.some((N) => d(N) === L), b = g !== -1 && U.length >= g && !C;
3655
3655
  return /* @__PURE__ */ e(
3656
3656
  K.Option,
3657
3657
  {
3658
- value: $,
3658
+ value: S,
3659
3659
  disabled: b,
3660
- className: ({ active: w }) => Ue(
3661
- b ? " text-gray-400 bg-white cursor-not-allowed" : w ? " bg-gray-200 text-gray-900" : " text-gray-900",
3660
+ className: ({ active: N }) => Ue(
3661
+ b ? " text-gray-400 bg-white cursor-not-allowed" : N ? " bg-gray-200 text-gray-900" : " text-gray-900",
3662
3662
  " relative cursor-default select-none py-2 pl-3 pr-9"
3663
3663
  ),
3664
- children: ({ selected: w, active: D }) => /* @__PURE__ */ n(te, { children: [
3664
+ children: ({ selected: N, active: D }) => /* @__PURE__ */ n(te, { children: [
3665
3665
  /* @__PURE__ */ e(
3666
3666
  "span",
3667
3667
  {
3668
3668
  className: Ue(
3669
- w ? "font-semibold" : "font-normal",
3669
+ N ? "font-semibold" : "font-normal",
3670
3670
  "block truncate"
3671
3671
  ),
3672
3672
  children: E
3673
3673
  }
3674
3674
  ),
3675
- w && /* @__PURE__ */ e(
3675
+ N && /* @__PURE__ */ e(
3676
3676
  "span",
3677
3677
  {
3678
3678
  className: Ue(
@@ -3684,13 +3684,13 @@ function at({
3684
3684
  )
3685
3685
  ] })
3686
3686
  },
3687
- B
3687
+ L
3688
3688
  );
3689
3689
  })
3690
3690
  ] })
3691
3691
  }
3692
3692
  ),
3693
- i && /* @__PURE__ */ e("p", { id: T, className: "mt-1 text-sm text-red-600", children: i })
3693
+ i && /* @__PURE__ */ e("p", { id: $, className: "mt-1 text-sm text-red-600", children: i })
3694
3694
  ] })
3695
3695
  ] }) });
3696
3696
  }
@@ -3848,10 +3848,10 @@ function cs({
3848
3848
  dropId: y,
3849
3849
  indent: r = 24
3850
3850
  }) {
3851
- const { setNodeRef: x, isOver: d } = cr({ id: y }), { attributes: p, listeners: S, setNodeRef: T, transform: R, isDragging: O } = dr({ id: f }), L = R ? { transform: `translate3d(${Math.round(R.x)}px, ${Math.round(R.y)}px, 0)` } : void 0, [_, U] = j(!1), [Y, G] = j(t.name), C = () => {
3852
- const v = Y.trim();
3853
- U(!1), v && v !== t.name ? i?.(t, v) : G(t.name);
3854
- }, h = oe(() => /* @__PURE__ */ e(
3851
+ const { setNodeRef: v, isOver: d } = cr({ id: y }), { attributes: p, listeners: z, setNodeRef: $, transform: R, isDragging: O } = dr({ id: f }), P = R ? { transform: `translate3d(${Math.round(R.x)}px, ${Math.round(R.y)}px, 0)` } : void 0, [_, U] = j(!1), [Y, G] = j(t.name), F = () => {
3852
+ const x = Y.trim();
3853
+ U(!1), x && x !== t.name ? i?.(t, x) : G(t.name);
3854
+ }, h = le(() => /* @__PURE__ */ e(
3855
3855
  _n,
3856
3856
  {
3857
3857
  options: [
@@ -3859,37 +3859,37 @@ function cs({
3859
3859
  { action: "rename", label: "Rename" },
3860
3860
  { action: "delete", label: "Delete" }
3861
3861
  ],
3862
- onSelect: ($) => {
3863
- $.action === "create" ? m?.(t) : $.action === "rename" ? U(!0) : $.action === "delete" && u?.(t);
3862
+ onSelect: (S) => {
3863
+ S.action === "create" ? m?.(t) : S.action === "rename" ? U(!0) : S.action === "delete" && u?.(t);
3864
3864
  }
3865
3865
  }
3866
3866
  ), [t, m, u]);
3867
3867
  return /* @__PURE__ */ n(
3868
3868
  "div",
3869
3869
  {
3870
- ref: x,
3870
+ ref: v,
3871
3871
  className: `tv-row ${d ? "tv-drop-over" : ""} ${O ? "dragging" : ""}`,
3872
- style: { ...L, paddingLeft: 8 + a * r },
3873
- onClick: (v) => {
3874
- v.target.closest(".tv-toggle") || v.target.tagName === "INPUT" || l?.(t);
3872
+ style: { ...P, paddingLeft: 8 + a * r },
3873
+ onClick: (x) => {
3874
+ x.target.closest(".tv-toggle") || x.target.tagName === "INPUT" || l?.(t);
3875
3875
  },
3876
3876
  children: [
3877
3877
  /* @__PURE__ */ e("button", { className: "tv-toggle", onClick: o, "aria-label": "toggle", children: t.children?.length ? s ? /* @__PURE__ */ e(Nt, { size: 16 }) : /* @__PURE__ */ e(fe, { size: 16 }) : /* @__PURE__ */ e("span", { className: "tv-spacer" }) }),
3878
- /* @__PURE__ */ e(Le, { size: 16, className: "tv-folder-ic" }),
3879
- /* @__PURE__ */ e("div", { className: "tv-name", ref: T, children: _ ? /* @__PURE__ */ e(
3878
+ /* @__PURE__ */ e(Me, { size: 16, className: "tv-folder-ic" }),
3879
+ /* @__PURE__ */ e("div", { className: "tv-name", ref: $, children: _ ? /* @__PURE__ */ e(
3880
3880
  "input",
3881
3881
  {
3882
3882
  className: "tv-input",
3883
3883
  value: Y,
3884
- onChange: (v) => G(v.target.value),
3885
- onBlur: C,
3886
- onKeyDown: (v) => {
3887
- v.key === "Enter" && C(), v.key === "Escape" && (U(!1), G(t.name));
3884
+ onChange: (x) => G(x.target.value),
3885
+ onBlur: F,
3886
+ onKeyDown: (x) => {
3887
+ x.key === "Enter" && F(), x.key === "Escape" && (U(!1), G(t.name));
3888
3888
  },
3889
3889
  autoFocus: !0
3890
3890
  }
3891
3891
  ) : /* @__PURE__ */ e("span", { onDoubleClick: () => U(!0), children: t.name }) }),
3892
- /* @__PURE__ */ e(is, { listeners: S, attributes: p }),
3892
+ /* @__PURE__ */ e(is, { listeners: z, attributes: p }),
3893
3893
  /* @__PURE__ */ e("div", { className: "tv-actions", children: g ? g(t, {
3894
3894
  onCreateChild: () => m?.(t),
3895
3895
  onRename: () => U(!0),
@@ -3985,45 +3985,45 @@ function Jl({
3985
3985
  onRename: f,
3986
3986
  onDelete: y,
3987
3987
  onMove: r,
3988
- renderActions: x,
3988
+ renderActions: v,
3989
3989
  disableMoveToRoot: d = !1,
3990
3990
  // ← allow root moves by default now
3991
3991
  indentUnit: p = 24
3992
3992
  }) {
3993
- const { roots: S } = oe(() => hs(t) ? gs(t, { rootId: a, getId: o, getName: m }) : ps(
3993
+ const { roots: z } = le(() => hs(t) ? gs(t, { rootId: a, getId: o, getName: m }) : ps(
3994
3994
  t.map((b) => ({ ...b })),
3995
3995
  { rootId: a, getId: o, getParent: l, getName: m }
3996
- ), [t, a, o, l, m]), [T, R] = j({}), O = se((b) => {
3997
- const w = {};
3998
- return (function D(N) {
3999
- N.forEach((A) => {
4000
- w[A.id] = !0, A.children?.length && D(A.children);
3996
+ ), [t, a, o, l, m]), [$, R] = j({}), O = ae((b) => {
3997
+ const N = {};
3998
+ return (function D(w) {
3999
+ w.forEach((T) => {
4000
+ N[T.id] = !0, T.children?.length && D(T.children);
4001
4001
  });
4002
- })(b), w;
4002
+ })(b), N;
4003
4003
  }, []);
4004
- ae.useEffect(() => {
4005
- R(O(S));
4006
- }, [S, O]);
4007
- const L = se(
4008
- (b) => R((w) => ({ ...w, [b]: !w[b] })),
4004
+ re.useEffect(() => {
4005
+ R(O(z));
4006
+ }, [z, O]);
4007
+ const P = ae(
4008
+ (b) => R((N) => ({ ...N, [b]: !N[b] })),
4009
4009
  []
4010
- ), [_, U] = j(() => Pe(S));
4011
- ae.useEffect(() => U(Pe(S)), [S]);
4010
+ ), [_, U] = j(() => Pe(z));
4011
+ re.useEffect(() => U(Pe(z)), [z]);
4012
4012
  const Y = mr(
4013
4013
  ur(br, { activationConstraint: { delay: 250, tolerance: 5 } })
4014
- ), G = ge(null), [C, h] = j(null), v = ge(0), $ = () => {
4015
- }, B = ({ delta: b }) => {
4016
- v.current = b?.x ?? 0;
4017
- }, E = se(
4018
- ({ active: b, over: w }) => {
4019
- const D = v.current;
4020
- if (v.current = 0, h(null), !b || !w) return;
4021
- const N = String(b.id).replace(/^drag-/, ""), A = String(w.id).replace(/^drop-/, "");
4022
- if (!N || !A || N === A) return;
4023
- let I = A;
4014
+ ), G = ge(null), [F, h] = j(null), x = ge(0), S = () => {
4015
+ }, L = ({ delta: b }) => {
4016
+ x.current = b?.x ?? 0;
4017
+ }, E = ae(
4018
+ ({ active: b, over: N }) => {
4019
+ const D = x.current;
4020
+ if (x.current = 0, h(null), !b || !N) return;
4021
+ const w = String(b.id).replace(/^drag-/, ""), T = String(N.id).replace(/^drop-/, "");
4022
+ if (!w || !T || w === T) return;
4023
+ let I = T;
4024
4024
  const k = Math.max(0, Math.floor(-D / p));
4025
4025
  if (k > 0) {
4026
- let X = A;
4026
+ let X = T;
4027
4027
  for (let xe = 0; xe < k; xe++) {
4028
4028
  const V = Sa(_, X, null);
4029
4029
  if (!V) break;
@@ -4035,57 +4035,57 @@ function Jl({
4035
4035
  }
4036
4036
  }
4037
4037
  if (d && I === a) {
4038
- U(Pe(S));
4038
+ U(Pe(z));
4039
4039
  return;
4040
4040
  }
4041
- const M = Pe(_), { newRoots: P, removed: F } = bs(M, N);
4042
- if (!F) return;
4043
- const q = fs(P, I, F);
4044
- U(q), r?.({ sourceId: N, destParentId: I, newTree: q });
4041
+ const B = Pe(_), { newRoots: M, removed: A } = bs(B, w);
4042
+ if (!A) return;
4043
+ const q = fs(M, I, A);
4044
+ U(q), r?.({ sourceId: w, destParentId: I, newTree: q });
4045
4045
  },
4046
- [_, S, a, d, p, r]
4047
- ), z = se(
4048
- (b, w = 0) => b.map((D) => /* @__PURE__ */ n(ae.Fragment, { children: [
4046
+ [_, z, a, d, p, r]
4047
+ ), C = ae(
4048
+ (b, N = 0) => b.map((D) => /* @__PURE__ */ n(re.Fragment, { children: [
4049
4049
  /* @__PURE__ */ e(
4050
4050
  cs,
4051
4051
  {
4052
4052
  node: D,
4053
- depth: w,
4054
- expanded: !!T[D.id],
4055
- onToggle: () => L(D.id),
4053
+ depth: N,
4054
+ expanded: !!$[D.id],
4055
+ onToggle: () => P(D.id),
4056
4056
  onSelect: i,
4057
4057
  onCreateChild: g,
4058
4058
  onRename: f,
4059
4059
  onDelete: y,
4060
- renderActions: x,
4060
+ renderActions: v,
4061
4061
  dragId: `drag-${D.id}`,
4062
4062
  dropId: `drop-${D.id}`,
4063
4063
  indent: p
4064
4064
  }
4065
4065
  ),
4066
- T[D.id] && D.children?.length > 0 ? z(D.children, w + 1) : null
4066
+ $[D.id] && D.children?.length > 0 ? C(D.children, N + 1) : null
4067
4067
  ] }, D.id)),
4068
- [T, p, g, y, f, i, x, L]
4068
+ [$, p, g, y, f, i, v, P]
4069
4069
  );
4070
- return ae.useMemo(() => {
4071
- if (!C) return null;
4072
- const b = String(C).replace(/^drag-/, "");
4073
- function w(D) {
4074
- for (const N of D) {
4075
- if (N.id === b) return N;
4076
- const A = N.children?.length ? w(N.children) : null;
4077
- if (A) return A;
4070
+ return re.useMemo(() => {
4071
+ if (!F) return null;
4072
+ const b = String(F).replace(/^drag-/, "");
4073
+ function N(D) {
4074
+ for (const w of D) {
4075
+ if (w.id === b) return w;
4076
+ const T = w.children?.length ? N(w.children) : null;
4077
+ if (T) return T;
4078
4078
  }
4079
4079
  return null;
4080
4080
  }
4081
- return w(_);
4082
- }, [C, _]), /* @__PURE__ */ n("div", { className: "tv", children: [
4081
+ return N(_);
4082
+ }, [F, _]), /* @__PURE__ */ n("div", { className: "tv", children: [
4083
4083
  s !== !1 && /* @__PURE__ */ n("div", { className: "tv-header", children: [
4084
4084
  /* @__PURE__ */ e("div", { className: "tv-title", children: s }),
4085
4085
  /* @__PURE__ */ e("button", { className: "tv-btn", onClick: u, children: "+ New folder" })
4086
4086
  ] }),
4087
4087
  /* @__PURE__ */ n("div", { className: "tv-root-row", children: [
4088
- /* @__PURE__ */ e(Le, { size: 16, className: "tv-folder-ic" }),
4088
+ /* @__PURE__ */ e(Me, { size: 16, className: "tv-folder-ic" }),
4089
4089
  /* @__PURE__ */ e("strong", { children: "ROOT" }),
4090
4090
  /* @__PURE__ */ e("button", { className: "tv-icon", title: "Create top-level", onClick: u, children: "+" })
4091
4091
  ] }),
@@ -4094,11 +4094,11 @@ function Jl({
4094
4094
  {
4095
4095
  collisionDetection: gr,
4096
4096
  sensors: Y,
4097
- onDragStart: $,
4098
- onDragMove: B,
4097
+ onDragStart: S,
4098
+ onDragMove: L,
4099
4099
  onDragEnd: E,
4100
4100
  modifiers: [pr],
4101
- children: /* @__PURE__ */ e("div", { ref: G, className: "tv-list", children: z(_, 0) })
4101
+ children: /* @__PURE__ */ e("div", { ref: G, className: "tv-list", children: C(_, 0) })
4102
4102
  }
4103
4103
  )
4104
4104
  ] });
@@ -4117,21 +4117,21 @@ const Xl = ({
4117
4117
  ...u
4118
4118
  // Pass remaining props to Tab.Group
4119
4119
  }) => {
4120
- const g = s === "vertical", f = (x) => we(
4120
+ const g = s === "vertical", f = (v) => we(
4121
4121
  "py-2 -mb-px text-sm font-medium focus:outline-none border-b-2",
4122
- x ? "border-primaryX text-textX" : "border-transparent text-slate-600 hover:text-indigo-700"
4123
- ), y = (x) => we(
4122
+ v ? "border-primaryX text-textX" : "border-transparent text-slate-600 hover:text-indigo-700"
4123
+ ), y = (v) => we(
4124
4124
  "text-left text-sm rounded-md px-2 py-1.5 focus:outline-none",
4125
- x ? "bg-primaryX text-white" : "text-textX hover:bg-lightgray-100 hover:text-primaryX"
4126
- ), r = ({ selected: x }) => i ? typeof i == "function" ? i(x) : i : g ? y(x) : f(x);
4127
- return /* @__PURE__ */ e(ne.Group, { vertical: g, ...u, children: g ? /* @__PURE__ */ n("div", { className: we("flex gap-4", o), children: [
4128
- /* @__PURE__ */ e(ne.List, { className: we("w-[150px] flex flex-col gap-1 border-r border-gray-300 pr-2", l), children: t.map((x) => /* @__PURE__ */ e(ne, { className: r, children: x.label }, x.key)) }),
4129
- /* @__PURE__ */ e(ne.Panels, { unmount: !a, className: we("flex-1", m), children: t.map((x) => /* @__PURE__ */ e(ne.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: x.content }) }, x.key)) })
4125
+ v ? "bg-primaryX text-white" : "text-textX hover:bg-lightgray-100 hover:text-primaryX"
4126
+ ), r = ({ selected: v }) => i ? typeof i == "function" ? i(v) : i : g ? y(v) : f(v);
4127
+ return /* @__PURE__ */ e(se.Group, { vertical: g, ...u, children: g ? /* @__PURE__ */ n("div", { className: we("flex gap-4", o), children: [
4128
+ /* @__PURE__ */ e(se.List, { className: we("w-[150px] flex flex-col gap-1 border-r border-gray-300 pr-2", l), children: t.map((v) => /* @__PURE__ */ e(se, { className: r, children: v.label }, v.key)) }),
4129
+ /* @__PURE__ */ e(se.Panels, { unmount: !a, className: we("flex-1", m), children: t.map((v) => /* @__PURE__ */ e(se.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: v.content }) }, v.key)) })
4130
4130
  ] }) : (
4131
4131
  // mostly this part is used : horizontal
4132
4132
  /* @__PURE__ */ n(te, { children: [
4133
- /* @__PURE__ */ e(ne.List, { className: we("flex gap-6 border rounded-t-2xl px-1.5 border-gray-300 mb-3 ", l), children: t.map((x) => /* @__PURE__ */ e(ne, { className: r, children: x.label }, x.key)) }),
4134
- /* @__PURE__ */ e(ne.Panels, { unmount: !a, className: we("mt-2", m), children: t.map((x) => /* @__PURE__ */ e(ne.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: x.content }) }, x.key)) })
4133
+ /* @__PURE__ */ e(se.List, { className: we("flex gap-6 border rounded-t-2xl px-1.5 border-gray-300 mb-3 ", l), children: t.map((v) => /* @__PURE__ */ e(se, { className: r, children: v.label }, v.key)) }),
4134
+ /* @__PURE__ */ e(se.Panels, { unmount: !a, className: we("mt-2", m), children: t.map((v) => /* @__PURE__ */ e(se.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: v.content }) }, v.key)) })
4135
4135
  ] })
4136
4136
  ) });
4137
4137
  };
@@ -4141,7 +4141,7 @@ function Ql(t, a = "YYYY-MM-DD HH:mm:ss") {
4141
4141
  c.string;
4142
4142
  function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4143
4143
  console.log(t);
4144
- const [l, m] = ae.useState(t), [i, u] = ae.useState(() => {
4144
+ const [l, m] = re.useState(t), [i, u] = re.useState(() => {
4145
4145
  const r = a && a[t.key] || {};
4146
4146
  return console.log("Initial Section data for", t.key, r), r;
4147
4147
  }), g = ge(a);
@@ -4158,24 +4158,24 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4158
4158
  }, [l.key, i, s]);
4159
4159
  const y = (r) => {
4160
4160
  if (!r.dependsOn) return !0;
4161
- const { field: x, value: d, operator: p = "equals" } = r.dependsOn, S = i[x];
4161
+ const { field: v, value: d, operator: p = "equals" } = r.dependsOn, z = i[v];
4162
4162
  switch (p) {
4163
4163
  case "equals":
4164
- return S === d;
4164
+ return z === d;
4165
4165
  case "notEquals":
4166
- return S !== d;
4166
+ return z !== d;
4167
4167
  case "contains":
4168
- return Array.isArray(S) && S.includes(d);
4168
+ return Array.isArray(z) && z.includes(d);
4169
4169
  case "notContains":
4170
- return !Array.isArray(S) || !S.includes(d);
4170
+ return !Array.isArray(z) || !z.includes(d);
4171
4171
  case "greaterThan":
4172
- return Number(S) > Number(d);
4172
+ return Number(z) > Number(d);
4173
4173
  case "lessThan":
4174
- return Number(S) < Number(d);
4174
+ return Number(z) < Number(d);
4175
4175
  case "isEmpty":
4176
- return !S || Array.isArray(S) && S.length === 0;
4176
+ return !z || Array.isArray(z) && z.length === 0;
4177
4177
  case "isNotEmpty":
4178
- return S && (!Array.isArray(S) || S.length > 0);
4178
+ return z && (!Array.isArray(z) || z.length > 0);
4179
4179
  default:
4180
4180
  return !0;
4181
4181
  }
@@ -4194,15 +4194,15 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4194
4194
  ),
4195
4195
  /* @__PURE__ */ e("p", { style: { fontSize: "14px", marginBottom: "10px" }, children: l.description }),
4196
4196
  l.layout === "inline-checkboxes" ? /* @__PURE__ */ n("div", { style: { marginBottom: "20px" }, children: [
4197
- /* @__PURE__ */ e("div", { style: { display: "flex", flexWrap: "wrap", gap: "20px", alignItems: "center" }, children: l.fields.map((r, x) => y(r) && r.fieldtype === "checkbox" && /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center" }, children: [
4197
+ /* @__PURE__ */ e("div", { style: { display: "flex", flexWrap: "wrap", gap: "20px", alignItems: "center" }, children: l.fields.map((r, v) => y(r) && r.fieldtype === "checkbox" && /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center" }, children: [
4198
4198
  /* @__PURE__ */ e(
4199
4199
  gt,
4200
4200
  {
4201
4201
  name: r.key,
4202
4202
  checked: !!(i[r.key] || r.default),
4203
4203
  onChange: (d) => {
4204
- const p = d.target ? d.target.checked : d, S = { ...i, [r.key]: p };
4205
- u(S), s && s(l.key, S);
4204
+ const p = d.target ? d.target.checked : d, z = { ...i, [r.key]: p };
4205
+ u(z), s && s(l.key, z);
4206
4206
  },
4207
4207
  label: r.label,
4208
4208
  disabled: r.disabled ? r.disabled : !1
@@ -4220,17 +4220,17 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4220
4220
  children: "ℹ️"
4221
4221
  }
4222
4222
  )
4223
- ] }, x)) }),
4223
+ ] }, v)) }),
4224
4224
  l.fields.some(
4225
4225
  (r) => r.fieldtype === "checkbox" && o[l.key]?.[r.key]
4226
4226
  ) && /* @__PURE__ */ e("div", { style: { marginTop: "10px" }, children: l.fields.map(
4227
- (r, x) => r.fieldtype === "checkbox" && o[l.key]?.[r.key] && /* @__PURE__ */ n("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: [
4227
+ (r, v) => r.fieldtype === "checkbox" && o[l.key]?.[r.key] && /* @__PURE__ */ n("div", { style: { color: "#ef4444", fontSize: "12px", marginTop: "2px" }, children: [
4228
4228
  r.label,
4229
4229
  ": ",
4230
4230
  o[l.key][r.key]
4231
- ] }, x)
4231
+ ] }, v)
4232
4232
  ) })
4233
- ] }) : /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: l.fields.map((r, x) => y(r) && /* @__PURE__ */ n("div", { className: r.fullWidth ? "col-span-full" : "", style: { marginBottom: "10px" }, children: [
4233
+ ] }) : /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: l.fields.map((r, v) => y(r) && /* @__PURE__ */ n("div", { className: r.fullWidth ? "col-span-full" : "", style: { marginBottom: "10px" }, children: [
4234
4234
  r.fieldtype !== "checkbox" && /* @__PURE__ */ n(
4235
4235
  "label",
4236
4236
  {
@@ -4301,14 +4301,14 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4301
4301
  max: r.max,
4302
4302
  step: r.step,
4303
4303
  onChange: (d) => {
4304
- const p = d.target.value, S = { ...i, [r.key]: p };
4305
- u(S), s && s(l.key, S);
4304
+ const p = d.target.value, z = { ...i, [r.key]: p };
4305
+ u(z), s && s(l.key, z);
4306
4306
  },
4307
4307
  onBlur: (d) => {
4308
4308
  const p = d.target.value;
4309
4309
  if (p !== "" && p !== null && p !== void 0) {
4310
- const S = Number(p);
4311
- isNaN(S) || (r.min !== void 0 && S < r.min ? (d.target.setCustomValidity(`${r.label} must be at least ${r.min}`), d.target.reportValidity()) : r.max !== void 0 && S > r.max ? (d.target.setCustomValidity(`${r.label} must not exceed ${r.max}`), d.target.reportValidity()) : d.target.setCustomValidity(""));
4310
+ const z = Number(p);
4311
+ isNaN(z) || (r.min !== void 0 && z < r.min ? (d.target.setCustomValidity(`${r.label} must be at least ${r.min}`), d.target.reportValidity()) : r.max !== void 0 && z > r.max ? (d.target.setCustomValidity(`${r.label} must not exceed ${r.max}`), d.target.reportValidity()) : d.target.setCustomValidity(""));
4312
4312
  }
4313
4313
  },
4314
4314
  required: r.required,
@@ -4333,8 +4333,8 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4333
4333
  name: r.key,
4334
4334
  checked: !!(i[r.key] || r.default),
4335
4335
  onChange: (d) => {
4336
- const p = d.target ? d.target.checked : d, S = { ...i, [r.key]: p };
4337
- u(S), s && s(l.key, S);
4336
+ const p = d.target ? d.target.checked : d, z = { ...i, [r.key]: p };
4337
+ u(z), s && s(l.key, z);
4338
4338
  },
4339
4339
  label: r.placeholder || r.label,
4340
4340
  disabled: r.disabled ? r.disabled : !1,
@@ -4512,8 +4512,8 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4512
4512
  value: d.value,
4513
4513
  checked: i[r.key] === d.value,
4514
4514
  onChange: (p) => {
4515
- const S = { ...i, [r.key]: p.target.value };
4516
- u(S), s && s(l.key, S);
4515
+ const z = { ...i, [r.key]: p.target.value };
4516
+ u(z), s && s(l.key, z);
4517
4517
  },
4518
4518
  disabled: r.disabled
4519
4519
  }
@@ -4630,8 +4630,8 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4630
4630
  type: "file",
4631
4631
  name: r.key,
4632
4632
  onChange: (d) => {
4633
- const p = d.target.files[0], S = { ...i, [r.key]: p ? p.name : "" };
4634
- u(S), s && s(l.key, S);
4633
+ const p = d.target.files[0], z = { ...i, [r.key]: p ? p.name : "" };
4634
+ u(z), s && s(l.key, z);
4635
4635
  },
4636
4636
  accept: r.accept,
4637
4637
  className: `w-full ${o[l.key]?.[r.key] ? "border-red-500" : ""}`
@@ -4670,7 +4670,7 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4670
4670
  children: r.info
4671
4671
  }
4672
4672
  )
4673
- ] }, x)) })
4673
+ ] }, v)) })
4674
4674
  ] }) });
4675
4675
  }
4676
4676
  const xs = ({ children: t }) => /* @__PURE__ */ e("div", { className: "flex -space-x-2", children: t });
@@ -4679,14 +4679,14 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4679
4679
  const [l, m] = j(t), [i, u] = j(null), [g, f] = j(null);
4680
4680
  console.log(`[DataTableRenderer] ${l.key} - Received props:`, { item: t, initialData: a });
4681
4681
  const [y, r] = j(() => {
4682
- const h = a && a[l.key] || [], v = h.length > 0 ? h : [{ id: 0 }];
4683
- return console.log(`[DataTableRenderer] ${l.key} - Initial data:`, v), v;
4684
- }), x = ge(a);
4682
+ const h = a && a[l.key] || [], x = h.length > 0 ? h : [{ id: 0 }];
4683
+ return console.log(`[DataTableRenderer] ${l.key} - Initial data:`, x), x;
4684
+ }), v = ge(a);
4685
4685
  Z(() => {
4686
- if (console.log(`[DataTableRenderer] ${l.key} - Checking for initialData changes`), console.log(`[DataTableRenderer] ${l.key} - Previous:`, x.current), console.log(`[DataTableRenderer] ${l.key} - Current:`, a), x.current !== a) {
4687
- x.current = a;
4688
- const h = a && a[l.key] || [], v = h.length > 0 ? h : [{ id: 0 }];
4689
- console.log(`[DataTableRenderer] ${l.key} - Setting new data:`, v), r(v);
4686
+ if (console.log(`[DataTableRenderer] ${l.key} - Checking for initialData changes`), console.log(`[DataTableRenderer] ${l.key} - Previous:`, v.current), console.log(`[DataTableRenderer] ${l.key} - Current:`, a), v.current !== a) {
4687
+ v.current = a;
4688
+ const h = a && a[l.key] || [], x = h.length > 0 ? h : [{ id: 0 }];
4689
+ console.log(`[DataTableRenderer] ${l.key} - Setting new data:`, x), r(x);
4690
4690
  }
4691
4691
  }, [a, l.key]);
4692
4692
  const d = ge(y), p = ge(null);
@@ -4697,48 +4697,48 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4697
4697
  }, [l.key, y, s]), Z(() => () => {
4698
4698
  p.current && clearTimeout(p.current);
4699
4699
  }, []);
4700
- const S = (h) => {
4701
- const v = (E, z) => {
4702
- console.log("[DataTableRenderer] updateFieldValue called with:", { rowIndex: E, value: z, type: typeof z }), r((b) => {
4703
- const w = [...b];
4704
- return w[E][h.key] = z, w;
4700
+ const z = (h) => {
4701
+ const x = (E, C) => {
4702
+ console.log("[DataTableRenderer] updateFieldValue called with:", { rowIndex: E, value: C, type: typeof C }), r((b) => {
4703
+ const N = [...b];
4704
+ return N[E][h.key] = C, N;
4705
4705
  });
4706
- }, $ = (E) => o[l.key]?.[E]?.[h.key], B = (E) => {
4707
- const z = $(E);
4708
- return z ? /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-1", children: z }) : null;
4706
+ }, S = (E) => o[l.key]?.[E]?.[h.key], L = (E) => {
4707
+ const C = S(E);
4708
+ return C ? /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-1", children: C }) : null;
4709
4709
  };
4710
4710
  switch (h.fieldtype) {
4711
4711
  case "text":
4712
- return (E, z) => /* @__PURE__ */ n("div", { children: [
4712
+ return (E, C) => /* @__PURE__ */ n("div", { children: [
4713
4713
  /* @__PURE__ */ e(
4714
4714
  J,
4715
4715
  {
4716
4716
  value: E[h.key] || "",
4717
- onChange: (b) => v(z, b.target.value),
4717
+ onChange: (b) => x(C, b.target.value),
4718
4718
  placeholder: h.placeholder || `Enter ${h.label}`,
4719
4719
  required: h.required,
4720
- className: `w-full ${$(z) ? "border-red-500" : ""}`
4720
+ className: `w-full ${S(C) ? "border-red-500" : ""}`
4721
4721
  }
4722
4722
  ),
4723
- B(z)
4723
+ L(C)
4724
4724
  ] });
4725
4725
  case "textarea":
4726
- return (E, z) => /* @__PURE__ */ n("div", { children: [
4726
+ return (E, C) => /* @__PURE__ */ n("div", { children: [
4727
4727
  /* @__PURE__ */ e(
4728
4728
  ba,
4729
4729
  {
4730
4730
  value: E[h.key] || "",
4731
- onChange: (b) => v(z, b.target.value),
4731
+ onChange: (b) => x(C, b.target.value),
4732
4732
  placeholder: h.placeholder || `Enter ${h.label}`,
4733
4733
  required: h.required,
4734
- className: `w-full ${$(z) ? "border-red-500" : ""}`,
4734
+ className: `w-full ${S(C) ? "border-red-500" : ""}`,
4735
4735
  rows: 3
4736
4736
  }
4737
4737
  ),
4738
- B(z)
4738
+ L(C)
4739
4739
  ] });
4740
4740
  case "number":
4741
- return (E, z) => /* @__PURE__ */ n("div", { children: [
4741
+ return (E, C) => /* @__PURE__ */ n("div", { children: [
4742
4742
  /* @__PURE__ */ e(
4743
4743
  J,
4744
4744
  {
@@ -4747,17 +4747,17 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4747
4747
  min: h.min,
4748
4748
  max: h.max,
4749
4749
  step: h.step,
4750
- onChange: (b) => v(z, b.target.value),
4750
+ onChange: (b) => x(C, b.target.value),
4751
4751
  onBlur: (b) => {
4752
- const w = b.target.value;
4753
- if (w !== "" && w !== null && w !== void 0) {
4754
- const D = Number(w);
4752
+ const N = b.target.value;
4753
+ if (N !== "" && N !== null && N !== void 0) {
4754
+ const D = Number(N);
4755
4755
  isNaN(D) || (h.min !== void 0 && D < h.min ? (b.target.setCustomValidity(`${h.label} must be at least ${h.min}`), b.target.reportValidity()) : h.max !== void 0 && D > h.max ? (b.target.setCustomValidity(`${h.label} must not exceed ${h.max}`), b.target.reportValidity()) : b.target.setCustomValidity(""));
4756
4756
  }
4757
4757
  },
4758
4758
  placeholder: h.placeholder || `Enter ${h.label}`,
4759
4759
  required: h.required,
4760
- className: `w-full ${$(z) ? "border-red-500" : ""}`
4760
+ className: `w-full ${S(C) ? "border-red-500" : ""}`
4761
4761
  }
4762
4762
  ),
4763
4763
  h.min !== void 0 && /* @__PURE__ */ n("div", { style: { color: "#6b7280", fontSize: "11px", marginTop: "2px" }, children: [
@@ -4768,79 +4768,79 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4768
4768
  "Max: ",
4769
4769
  h.max
4770
4770
  ] }),
4771
- B(z)
4771
+ L(C)
4772
4772
  ] });
4773
4773
  case "email":
4774
- return (E, z) => /* @__PURE__ */ n("div", { children: [
4774
+ return (E, C) => /* @__PURE__ */ n("div", { children: [
4775
4775
  /* @__PURE__ */ e(
4776
4776
  J,
4777
4777
  {
4778
4778
  type: "email",
4779
4779
  value: E[h.key] || "",
4780
- onChange: (b) => v(z, b.target.value),
4780
+ onChange: (b) => x(C, b.target.value),
4781
4781
  placeholder: h.placeholder || "Enter email address",
4782
4782
  required: h.required,
4783
- className: `w-full ${$(z) ? "border-red-500" : ""}`
4783
+ className: `w-full ${S(C) ? "border-red-500" : ""}`
4784
4784
  }
4785
4785
  ),
4786
- B(z)
4786
+ L(C)
4787
4787
  ] });
4788
4788
  case "url":
4789
- return (E, z) => /* @__PURE__ */ n("div", { children: [
4789
+ return (E, C) => /* @__PURE__ */ n("div", { children: [
4790
4790
  /* @__PURE__ */ e(
4791
4791
  J,
4792
4792
  {
4793
4793
  type: "url",
4794
4794
  value: E[h.key] || "",
4795
- onChange: (b) => v(z, b.target.value),
4795
+ onChange: (b) => x(C, b.target.value),
4796
4796
  placeholder: h.placeholder || "Enter URL",
4797
4797
  required: h.required,
4798
- className: `w-full ${$(z) ? "border-red-500" : ""}`
4798
+ className: `w-full ${S(C) ? "border-red-500" : ""}`
4799
4799
  }
4800
4800
  ),
4801
- B(z)
4801
+ L(C)
4802
4802
  ] });
4803
4803
  case "password":
4804
- return (E, z) => /* @__PURE__ */ n("div", { children: [
4804
+ return (E, C) => /* @__PURE__ */ n("div", { children: [
4805
4805
  /* @__PURE__ */ e(
4806
4806
  J,
4807
4807
  {
4808
4808
  type: "password",
4809
4809
  value: E[h.key] || "",
4810
- onChange: (b) => v(z, b.target.value),
4810
+ onChange: (b) => x(C, b.target.value),
4811
4811
  placeholder: h.placeholder || "Enter password",
4812
4812
  required: h.required,
4813
- className: `w-full ${$(z) ? "border-red-500" : ""}`
4813
+ className: `w-full ${S(C) ? "border-red-500" : ""}`
4814
4814
  }
4815
4815
  ),
4816
- B(z)
4816
+ L(C)
4817
4817
  ] });
4818
4818
  case "select":
4819
4819
  case "dropdown":
4820
- return (E, z) => /* @__PURE__ */ n("div", { children: [
4820
+ return (E, C) => /* @__PURE__ */ n("div", { children: [
4821
4821
  /* @__PURE__ */ e(
4822
4822
  yt,
4823
4823
  {
4824
4824
  value: E[h.key] || "",
4825
- onChange: (b) => v(z, b),
4825
+ onChange: (b) => x(C, b),
4826
4826
  options: h.options || [],
4827
4827
  placeholder: h.placeholder || `Select ${h.label}`,
4828
4828
  required: h.required,
4829
- className: `w-full ${$(z) ? "border-red-500" : ""}`
4829
+ className: `w-full ${S(C) ? "border-red-500" : ""}`
4830
4830
  }
4831
4831
  ),
4832
- B(z)
4832
+ L(C)
4833
4833
  ] });
4834
4834
  case "selectDynamic":
4835
- return (E, z) => {
4835
+ return (E, C) => {
4836
4836
  const b = () => {
4837
4837
  if (h.optionsFrom && a) {
4838
- const { config: w, valueField: D, labelField: N } = h.optionsFrom, A = a[w] || [];
4839
- if (Array.isArray(A))
4840
- return A.map((I) => ({
4838
+ const { config: N, valueField: D, labelField: w } = h.optionsFrom, T = a[N] || [];
4839
+ if (Array.isArray(T))
4840
+ return T.map((I) => ({
4841
4841
  id: I[D] || "",
4842
4842
  value: I[D] || "",
4843
- label: I[N] || ""
4843
+ label: I[w] || ""
4844
4844
  }));
4845
4845
  }
4846
4846
  return h.options || [];
@@ -4849,27 +4849,27 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4849
4849
  /* @__PURE__ */ e(
4850
4850
  yt,
4851
4851
  {
4852
- index: z,
4852
+ index: C,
4853
4853
  value: E[h.key] || "",
4854
- onChange: (w) => v(z, w),
4854
+ onChange: (N) => x(C, N),
4855
4855
  options: b(),
4856
4856
  placeholder: h.placeholder || `Select ${h.label}`,
4857
4857
  required: h.required,
4858
- className: `w-full ${$(z) ? "border-red-500" : ""}`
4858
+ className: `w-full ${S(C) ? "border-red-500" : ""}`
4859
4859
  },
4860
4860
  Math.random()
4861
4861
  ),
4862
- B(z)
4862
+ L(C)
4863
4863
  ] });
4864
4864
  };
4865
4865
  case "multiselect":
4866
- return (E, z) => {
4866
+ return (E, C) => {
4867
4867
  const b = E[h.key] || [];
4868
4868
  return /* @__PURE__ */ e(
4869
4869
  at,
4870
4870
  {
4871
4871
  selectedItems: b,
4872
- onSelectionChange: (w) => v(z, w),
4872
+ onSelectionChange: (N) => x(C, N),
4873
4873
  options: h.options || [],
4874
4874
  placeholder: h.placeholder || `Select ${h.label}`,
4875
4875
  className: "w-full"
@@ -4878,127 +4878,127 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
4878
4878
  };
4879
4879
  case "checkbox":
4880
4880
  case "boolean":
4881
- return (E, z) => /* @__PURE__ */ e(
4881
+ return (E, C) => /* @__PURE__ */ e(
4882
4882
  gt,
4883
4883
  {
4884
4884
  checked: !!E[h.key],
4885
- onChange: (b) => v(z, b),
4885
+ onChange: (b) => x(C, b),
4886
4886
  label: h.placeholder || h.label,
4887
4887
  className: "w-full"
4888
4888
  }
4889
4889
  );
4890
4890
  case "toggle":
4891
4891
  case "switch":
4892
- return (E, z) => /* @__PURE__ */ e(
4892
+ return (E, C) => /* @__PURE__ */ e(
4893
4893
  fa,
4894
4894
  {
4895
4895
  isOn: !!E[h.key],
4896
- onToggle: (b) => v(z, b),
4896
+ onToggle: (b) => x(C, b),
4897
4897
  label: h.placeholder || h.label,
4898
4898
  className: "w-full"
4899
4899
  }
4900
4900
  );
4901
4901
  case "date":
4902
- return (E, z) => /* @__PURE__ */ e(
4902
+ return (E, C) => /* @__PURE__ */ e(
4903
4903
  ua,
4904
4904
  {
4905
4905
  selectedDate: E[h.key] ? new Date(E[h.key]) : null,
4906
- onDateChange: (b) => v(z, b ? b.toISOString().split("T")[0] : ""),
4906
+ onDateChange: (b) => x(C, b ? b.toISOString().split("T")[0] : ""),
4907
4907
  placeholder: h.placeholder || "Select date",
4908
4908
  className: "w-full"
4909
4909
  }
4910
4910
  );
4911
4911
  case "datetime":
4912
- return (E, z) => /* @__PURE__ */ e(
4912
+ return (E, C) => /* @__PURE__ */ e(
4913
4913
  J,
4914
4914
  {
4915
4915
  type: "datetime-local",
4916
4916
  value: E[h.key] || "",
4917
- onChange: (b) => v(z, b.target.value),
4917
+ onChange: (b) => x(C, b.target.value),
4918
4918
  placeholder: h.placeholder || "Select date and time",
4919
4919
  required: h.required,
4920
4920
  className: "w-full"
4921
4921
  }
4922
4922
  );
4923
4923
  case "time":
4924
- return (E, z) => /* @__PURE__ */ e(
4924
+ return (E, C) => /* @__PURE__ */ e(
4925
4925
  J,
4926
4926
  {
4927
4927
  type: "time",
4928
4928
  value: E[h.key] || "",
4929
- onChange: (b) => v(z, b.target.value),
4929
+ onChange: (b) => x(C, b.target.value),
4930
4930
  placeholder: h.placeholder || "Select time",
4931
4931
  required: h.required,
4932
4932
  className: "w-full"
4933
4933
  }
4934
4934
  );
4935
4935
  case "radio":
4936
- return (E, z) => /* @__PURE__ */ e(
4936
+ return (E, C) => /* @__PURE__ */ e(
4937
4937
  ha,
4938
4938
  {
4939
4939
  selectedValue: E[h.key] || "",
4940
- onValueChange: (b) => v(z, b),
4940
+ onValueChange: (b) => x(C, b),
4941
4941
  options: h.options || [],
4942
4942
  className: "w-full"
4943
4943
  }
4944
4944
  );
4945
4945
  case "search":
4946
- return (E, z) => /* @__PURE__ */ e(
4946
+ return (E, C) => /* @__PURE__ */ e(
4947
4947
  he,
4948
4948
  {
4949
4949
  value: E[h.key] || "",
4950
- onChange: (b) => v(z, b),
4950
+ onChange: (b) => x(C, b),
4951
4951
  placeholder: h.placeholder || `Search ${h.label}`,
4952
4952
  className: "w-full"
4953
4953
  }
4954
4954
  );
4955
4955
  case "audience":
4956
- return (E, z) => {
4957
- const b = E[h.key] || { users: [], groups: [], roles: [] }, w = [
4956
+ return (E, C) => {
4957
+ const b = E[h.key] || { users: [], groups: [], roles: [] }, N = [
4958
4958
  ...b.users || [],
4959
4959
  ...b.groups || [],
4960
4960
  ...b.roles || []
4961
4961
  ];
4962
4962
  return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
4963
- /* @__PURE__ */ e(xs, { children: w.length > 0 ? w.slice(0, 3).map((D, N) => /* @__PURE__ */ e(
4963
+ /* @__PURE__ */ e(xs, { children: N.length > 0 ? N.slice(0, 3).map((D, w) => /* @__PURE__ */ e(
4964
4964
  Ce,
4965
4965
  {
4966
4966
  size: "small",
4967
4967
  name: D.name || D.displayName || D.id,
4968
4968
  src: D.avatarUrl
4969
4969
  },
4970
- N
4970
+ w
4971
4971
  )) : null }),
4972
4972
  /* @__PURE__ */ e(
4973
4973
  "button",
4974
4974
  {
4975
4975
  className: "text-blue-600 font-semibold hover:text-blue-800",
4976
4976
  onClick: () => {
4977
- f(h.key), u(z);
4977
+ f(h.key), u(C);
4978
4978
  },
4979
- children: w.length > 0 ? "Edit" : "Assign"
4979
+ children: N.length > 0 ? "Edit" : "Assign"
4980
4980
  }
4981
4981
  )
4982
4982
  ] });
4983
4983
  };
4984
4984
  case "color":
4985
- return (E, z) => /* @__PURE__ */ e(
4985
+ return (E, C) => /* @__PURE__ */ e(
4986
4986
  J,
4987
4987
  {
4988
4988
  type: "color",
4989
4989
  value: E[h.key] || "#000000",
4990
- onChange: (b) => v(z, b.target.value),
4990
+ onChange: (b) => x(C, b.target.value),
4991
4991
  className: "w-full h-10"
4992
4992
  }
4993
4993
  );
4994
4994
  case "range":
4995
- return (E, z) => /* @__PURE__ */ n("div", { className: "w-full", children: [
4995
+ return (E, C) => /* @__PURE__ */ n("div", { className: "w-full", children: [
4996
4996
  /* @__PURE__ */ e(
4997
4997
  J,
4998
4998
  {
4999
4999
  type: "range",
5000
5000
  value: E[h.key] || h.min || 0,
5001
- onChange: (b) => v(z, b.target.value),
5001
+ onChange: (b) => x(C, b.target.value),
5002
5002
  min: h.min || 0,
5003
5003
  max: h.max || 100,
5004
5004
  step: h.step || 1,
@@ -5008,86 +5008,86 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
5008
5008
  /* @__PURE__ */ e("span", { className: "text-sm text-gray-500", children: E[h.key] || h.min || 0 })
5009
5009
  ] });
5010
5010
  case "file":
5011
- return (E, z) => /* @__PURE__ */ e(
5011
+ return (E, C) => /* @__PURE__ */ e(
5012
5012
  J,
5013
5013
  {
5014
5014
  type: "file",
5015
5015
  onChange: (b) => {
5016
- const w = b.target.files[0];
5017
- v(z, w ? w.name : "");
5016
+ const N = b.target.files[0];
5017
+ x(C, N ? N.name : "");
5018
5018
  },
5019
5019
  accept: h.accept,
5020
5020
  className: "w-full"
5021
5021
  }
5022
5022
  );
5023
5023
  case "hidden":
5024
- return (E, z) => /* @__PURE__ */ e(
5024
+ return (E, C) => /* @__PURE__ */ e(
5025
5025
  J,
5026
5026
  {
5027
5027
  type: "hidden",
5028
5028
  value: E[h.key] || "",
5029
- onChange: (b) => v(z, b.target.value)
5029
+ onChange: (b) => x(C, b.target.value)
5030
5030
  }
5031
5031
  );
5032
5032
  // Default fallback for unknown field types
5033
5033
  default:
5034
- return (E, z) => /* @__PURE__ */ n("div", { children: [
5034
+ return (E, C) => /* @__PURE__ */ n("div", { children: [
5035
5035
  /* @__PURE__ */ e(
5036
5036
  J,
5037
5037
  {
5038
5038
  value: E[h.key] || "",
5039
- onChange: (b) => v(z, b.target.value),
5039
+ onChange: (b) => x(C, b.target.value),
5040
5040
  placeholder: h.placeholder || `Enter ${h.label}`,
5041
5041
  required: h.required,
5042
- className: `w-full ${$(z) ? "border-red-500" : ""}`
5042
+ className: `w-full ${S(C) ? "border-red-500" : ""}`
5043
5043
  }
5044
5044
  ),
5045
- B(z)
5045
+ L(C)
5046
5046
  ] });
5047
5047
  }
5048
- }, T = se(() => {
5048
+ }, $ = ae(() => {
5049
5049
  console.log("[DataTableRenderer] Adding blank row"), r((h) => {
5050
5050
  console.log("[DataTableRenderer] Current data before add:", h);
5051
- const v = {
5051
+ const x = {
5052
5052
  id: h.length
5053
5053
  // Assign next available ID
5054
5054
  };
5055
- l.fields.forEach((B) => {
5056
- B.fieldtype === "audience" ? v[B.key] = { users: [], groups: [], roles: [] } : v[B.key] = B.default || "";
5057
- }), console.log("[DataTableRenderer] New blank row:", v);
5058
- const $ = [...h, v];
5059
- return console.log("[DataTableRenderer] Updated data:", $), $;
5055
+ l.fields.forEach((L) => {
5056
+ L.fieldtype === "audience" ? x[L.key] = { users: [], groups: [], roles: [] } : x[L.key] = L.default || "";
5057
+ }), console.log("[DataTableRenderer] New blank row:", x);
5058
+ const S = [...h, x];
5059
+ return console.log("[DataTableRenderer] Updated data:", S), S;
5060
5060
  });
5061
- }, [l.fields]), R = se((h) => {
5062
- r((v) => {
5063
- if (v.length <= 1)
5064
- return v;
5065
- const $ = [...v];
5066
- return $.splice(h, 1), $;
5061
+ }, [l.fields]), R = ae((h) => {
5062
+ r((x) => {
5063
+ if (x.length <= 1)
5064
+ return x;
5065
+ const S = [...x];
5066
+ return S.splice(h, 1), S;
5067
5067
  });
5068
- }, []), [O, L] = j(null), _ = se((h, v) => {
5069
- L(v), h.dataTransfer.effectAllowed = "move", h.dataTransfer.setData("text/html", "");
5070
- }, []), U = se((h) => {
5068
+ }, []), [O, P] = j(null), _ = ae((h, x) => {
5069
+ P(x), h.dataTransfer.effectAllowed = "move", h.dataTransfer.setData("text/html", "");
5070
+ }, []), U = ae((h) => {
5071
5071
  h.preventDefault(), h.dataTransfer.dropEffect = "move";
5072
- }, []), Y = se((h, v) => {
5073
- h.preventDefault(), !(O === null || O === v) && (r(($) => {
5074
- const B = [...$], E = B[O];
5075
- return B.splice(O, 1), B.splice(v, 0, E), B;
5076
- }), L(null));
5077
- }, [O]), G = se(() => {
5078
- L(null);
5079
- }, []), C = se((h) => {
5080
- console.log("[DataTableRenderer] handleAddAudience called with:", h), r((v) => {
5081
- const $ = [...v];
5082
- if (i !== null && g && $[i]) {
5083
- const B = h.pendingInvites || [], E = B.filter((w) => w.type === "User"), z = B.filter((w) => w.type === "Group"), b = B.filter((w) => w.type === "Role");
5084
- $[i][g] = {
5085
- users: [...$[i][g]?.users || [], ...E],
5086
- groups: [...$[i][g]?.groups || [], ...z],
5087
- roles: [...$[i][g]?.roles || [], ...b]
5088
- }, console.log("[DataTableRenderer] Updated audience data:", $[i][g]);
5072
+ }, []), Y = ae((h, x) => {
5073
+ h.preventDefault(), !(O === null || O === x) && (r((S) => {
5074
+ const L = [...S], E = L[O];
5075
+ return L.splice(O, 1), L.splice(x, 0, E), L;
5076
+ }), P(null));
5077
+ }, [O]), G = ae(() => {
5078
+ P(null);
5079
+ }, []), F = ae((h) => {
5080
+ console.log("[DataTableRenderer] handleAddAudience called with:", h), r((x) => {
5081
+ const S = [...x];
5082
+ if (i !== null && g && S[i]) {
5083
+ const L = h.pendingInvites || [], E = L.filter((N) => N.type === "User"), C = L.filter((N) => N.type === "Group"), b = L.filter((N) => N.type === "Role");
5084
+ S[i][g] = {
5085
+ users: [...S[i][g]?.users || [], ...E],
5086
+ groups: [...S[i][g]?.groups || [], ...C],
5087
+ roles: [...S[i][g]?.roles || [], ...b]
5088
+ }, console.log("[DataTableRenderer] Updated audience data:", S[i][g]);
5089
5089
  }
5090
- return $;
5090
+ return S;
5091
5091
  }), u(null), f(null);
5092
5092
  }, [i, g]);
5093
5093
  return /* @__PURE__ */ n("div", { children: [
@@ -5098,7 +5098,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
5098
5098
  "button",
5099
5099
  {
5100
5100
  className: "btn btn-primary text-white px-6 py-2 rounded-2xl cursor-pointer hover:bg-gray-800",
5101
- onClick: T,
5101
+ onClick: $,
5102
5102
  children: "Add"
5103
5103
  }
5104
5104
  )
@@ -5108,32 +5108,32 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
5108
5108
  /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ n("table", { className: "min-w-full bg-white border border-gray-300", style: { marginBottom: "20px" }, children: [
5109
5109
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { className: "bg-gray-50", children: [
5110
5110
  /* @__PURE__ */ e("th", { className: "px-4 py-2 w-10" }),
5111
- l.fields.map((h, v) => /* @__PURE__ */ e(
5111
+ l.fields.map((h, x) => /* @__PURE__ */ e(
5112
5112
  "th",
5113
5113
  {
5114
5114
  className: "px-4 py-2 text-left text-sm font-medium text-gray-700",
5115
5115
  children: h.label || h.key
5116
5116
  },
5117
- v
5117
+ x
5118
5118
  )),
5119
5119
  /* @__PURE__ */ e("th", { className: "px-4 py-2 w-16" })
5120
5120
  ] }) }),
5121
- /* @__PURE__ */ e("tbody", { children: y.map((h, v) => /* @__PURE__ */ n(
5121
+ /* @__PURE__ */ e("tbody", { children: y.map((h, x) => /* @__PURE__ */ n(
5122
5122
  "tr",
5123
5123
  {
5124
- className: `hover:bg-gray-50 ${O === v ? "opacity-50" : ""}`,
5124
+ className: `hover:bg-gray-50 ${O === x ? "opacity-50" : ""}`,
5125
5125
  draggable: !0,
5126
- onDragStart: ($) => _($, v),
5126
+ onDragStart: (S) => _(S, x),
5127
5127
  onDragOver: U,
5128
- onDrop: ($) => Y($, v),
5128
+ onDrop: (S) => Y(S, x),
5129
5129
  onDragEnd: G,
5130
5130
  children: [
5131
5131
  /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e("div", { className: "cursor-move text-gray-400 hover:text-gray-600", children: /* @__PURE__ */ e(wt, { size: 16 }) }) }),
5132
- l.fields.map(($, B) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: S($)(h, v) }, B)),
5132
+ l.fields.map((S, L) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: z(S)(h, x) }, L)),
5133
5133
  /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e(
5134
5134
  "button",
5135
5135
  {
5136
- onClick: () => R(v),
5136
+ onClick: () => R(x),
5137
5137
  className: "text-red-500 hover:text-red-700",
5138
5138
  title: "Delete row",
5139
5139
  children: /* @__PURE__ */ e(fr, { size: 16 })
@@ -5141,7 +5141,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
5141
5141
  ) })
5142
5142
  ]
5143
5143
  },
5144
- v
5144
+ x
5145
5145
  )) })
5146
5146
  ] }) }),
5147
5147
  i !== null && (() => {
@@ -5157,7 +5157,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: o = {} }) {
5157
5157
  onClose: () => {
5158
5158
  u(null), f(null);
5159
5159
  },
5160
- onFinalSubmit: C,
5160
+ onFinalSubmit: F,
5161
5161
  existingShares: h,
5162
5162
  allowedPermissions: ["view", "remove"]
5163
5163
  }
@@ -5174,7 +5174,7 @@ const Ie = {
5174
5174
  closeOnClick: !0
5175
5175
  };
5176
5176
  let Je = 0;
5177
- const Mt = () => {
5177
+ const Lt = () => {
5178
5178
  typeof document > "u" || (Je += 1, document.body.classList.add("toast-backdrop"));
5179
5179
  }, Bt = () => {
5180
5180
  typeof document > "u" || (Je = Math.max(0, Je - 1), Je === 0 && document.body.classList.remove("toast-backdrop"));
@@ -5188,7 +5188,7 @@ const Mt = () => {
5188
5188
  autoClose: !1,
5189
5189
  closeOnClick: !1,
5190
5190
  draggable: !1,
5191
- onOpen: Mt,
5191
+ onOpen: Lt,
5192
5192
  onClose: Bt,
5193
5193
  ...a
5194
5194
  }),
@@ -5203,7 +5203,7 @@ const Mt = () => {
5203
5203
  autoClose: !1,
5204
5204
  closeOnClick: !1,
5205
5205
  draggable: !1,
5206
- onOpen: Mt,
5206
+ onOpen: Lt,
5207
5207
  onClose: Bt
5208
5208
  }
5209
5209
  },
@@ -5231,18 +5231,18 @@ const Mt = () => {
5231
5231
  initialData: g = null
5232
5232
  // Add prop for initial demo data
5233
5233
  }) => {
5234
- const [f, y] = j(null), [r, x] = j(""), [d, p] = j(() => Array.isArray(g) ? g : []), [S, T] = j(null), [R, O] = j(null), [L, _] = j(""), U = async () => {
5234
+ const [f, y] = j(null), [r, v] = j(""), [d, p] = j(() => Array.isArray(g) ? g : []), [z, $] = j(null), [R, O] = j(null), [P, _] = j(""), U = async () => {
5235
5235
  try {
5236
- const N = await je(t.collectionList);
5237
- if (N) {
5238
- const A = N.map((I, k) => ({
5236
+ const w = await je(t.collectionList);
5237
+ if (w) {
5238
+ const T = w.map((I, k) => ({
5239
5239
  ...I,
5240
5240
  order: typeof I.order == "number" ? I.order : k + 1
5241
5241
  }));
5242
- A.sort((I, k) => (I.order ?? 0) - (k.order ?? 0)), p(A), s?.(A);
5242
+ T.sort((I, k) => (I.order ?? 0) - (k.order ?? 0)), p(T), s?.(T);
5243
5243
  }
5244
- } catch (N) {
5245
- console.log("Error loading collections:", N), typeof window < "u" && !window.location.pathname.includes("iframe.html") && Se.error("Failed to load collections");
5244
+ } catch (w) {
5245
+ console.log("Error loading collections:", w), typeof window < "u" && !window.location.pathname.includes("iframe.html") && Se.error("Failed to load collections");
5246
5246
  }
5247
5247
  };
5248
5248
  Z(() => {
@@ -5250,30 +5250,30 @@ const Mt = () => {
5250
5250
  }, [g]), Z(() => {
5251
5251
  Array.isArray(g) && p(g);
5252
5252
  }, [g]);
5253
- const Y = (N) => {
5254
- m && (y(N.id), x(N.categoryName || ""));
5253
+ const Y = (w) => {
5254
+ m && (y(w.id), v(w.categoryName || ""));
5255
5255
  }, G = () => {
5256
5256
  if (!l || f !== null) return;
5257
- const N = `temp-${Date.now()}`;
5258
- p((A) => [
5259
- ...A,
5257
+ const w = `temp-${Date.now()}`;
5258
+ p((T) => [
5259
+ ...T,
5260
5260
  {
5261
- id: N,
5261
+ id: w,
5262
5262
  categoryName: "",
5263
5263
  links: [],
5264
- order: (A.at(-1)?.order ?? 0) + 1,
5264
+ order: (T.at(-1)?.order ?? 0) + 1,
5265
5265
  _temp: !0
5266
5266
  }
5267
- ]), y(N), x("");
5268
- }, C = () => {
5269
- f != null && (p((N) => {
5270
- const A = N.find((k) => k.id === f), I = A && A._temp ? N.filter((k) => k.id !== f) : N;
5267
+ ]), y(w), v("");
5268
+ }, F = () => {
5269
+ f != null && (p((w) => {
5270
+ const T = w.find((k) => k.id === f), I = T && T._temp ? w.filter((k) => k.id !== f) : w;
5271
5271
  return s?.(I), I;
5272
- }), y(null), x(""));
5272
+ }), y(null), v(""));
5273
5273
  }, h = () => {
5274
5274
  if (f == null || !r.trim()) return;
5275
5275
  if (typeof f == "string" && f.startsWith("temp-")) {
5276
- const A = {
5276
+ const T = {
5277
5277
  id: f,
5278
5278
  categoryName: r.trim(),
5279
5279
  links: [],
@@ -5284,54 +5284,54 @@ const Mt = () => {
5284
5284
  // Flag to indicate this is a draft change
5285
5285
  };
5286
5286
  p((I) => {
5287
- const k = I.map((M) => M.id === f ? A : M);
5287
+ const k = I.map((B) => B.id === f ? T : B);
5288
5288
  return s?.(k), k;
5289
5289
  });
5290
5290
  } else
5291
- p((A) => {
5292
- const I = A.map(
5291
+ p((T) => {
5292
+ const I = T.map(
5293
5293
  (k) => k.id === f ? { ...k, categoryName: r.trim(), _isDraft: !0 } : k
5294
5294
  );
5295
5295
  return s?.(I), I;
5296
5296
  });
5297
- y(null), x("");
5298
- }, v = (N) => {
5299
- i && p((A) => {
5300
- const I = A.filter((k) => k.id !== N.id);
5297
+ y(null), v("");
5298
+ }, x = (w) => {
5299
+ i && p((T) => {
5300
+ const I = T.filter((k) => k.id !== w.id);
5301
5301
  return s?.(I), I;
5302
5302
  });
5303
- }, $ = (N, A, I) => {
5304
- if (!u || !A || !I || A === I) return N;
5305
- const k = N.findIndex((q) => q.id === A), M = N.findIndex((q) => q.id === I);
5306
- if (k === -1 || M === -1) return N;
5307
- const P = [...N], [F] = P.splice(k, 1);
5308
- return P.splice(M, 0, F), P.map((q, X) => ({ ...q, order: X + 1 }));
5309
- }, B = (N, A) => {
5310
- u && (N.dataTransfer.effectAllowed = "move", N.dataTransfer.setData("text/plain", String(A)), T(A));
5311
- }, E = (N) => {
5312
- S && N !== R && O(N);
5313
- }, z = (N) => {
5314
- N.preventDefault();
5315
- }, b = (N, A) => {
5316
- N.preventDefault();
5317
- const I = N.dataTransfer.getData("text/plain");
5303
+ }, S = (w, T, I) => {
5304
+ if (!u || !T || !I || T === I) return w;
5305
+ const k = w.findIndex((q) => q.id === T), B = w.findIndex((q) => q.id === I);
5306
+ if (k === -1 || B === -1) return w;
5307
+ const M = [...w], [A] = M.splice(k, 1);
5308
+ return M.splice(B, 0, A), M.map((q, X) => ({ ...q, order: X + 1 }));
5309
+ }, L = (w, T) => {
5310
+ u && (w.dataTransfer.effectAllowed = "move", w.dataTransfer.setData("text/plain", String(T)), $(T));
5311
+ }, E = (w) => {
5312
+ z && w !== R && O(w);
5313
+ }, C = (w) => {
5314
+ w.preventDefault();
5315
+ }, b = (w, T) => {
5316
+ w.preventDefault();
5317
+ const I = w.dataTransfer.getData("text/plain");
5318
5318
  I && (p((k) => {
5319
- const M = $(k, I, A);
5320
- console.log("Reordered", M);
5321
- const P = M.map((F) => ({ ...F, _isDraft: !0 }));
5322
- return s?.(P), P;
5323
- }), T(null), O(null));
5324
- }, w = () => {
5325
- T(null), O(null);
5319
+ const B = S(k, I, T);
5320
+ console.log("Reordered", B);
5321
+ const M = B.map((A) => ({ ...A, _isDraft: !0 }));
5322
+ return s?.(M), M;
5323
+ }), $(null), O(null));
5324
+ }, N = () => {
5325
+ $(null), O(null);
5326
5326
  }, D = Array.isArray(d) ? d.filter(
5327
- (N) => N.categoryName?.toLowerCase().includes(L.toLowerCase())
5327
+ (w) => w.categoryName?.toLowerCase().includes(P.toLowerCase())
5328
5328
  ) : [];
5329
5329
  return /* @__PURE__ */ n("div", { className: `manage-collection-list ${a}`, children: [
5330
5330
  /* @__PURE__ */ e("div", { className: "flex justify-end", children: /* @__PURE__ */ n("div", { className: "w-1/2 flex justify-end", children: [
5331
5331
  o && /* @__PURE__ */ e(
5332
5332
  he,
5333
5333
  {
5334
- value: L,
5334
+ value: P,
5335
5335
  onDebouncedChange: _,
5336
5336
  placeholder: "Search Collection",
5337
5337
  customClass: "mr-4 searchmanagecollection"
@@ -5350,32 +5350,32 @@ const Mt = () => {
5350
5350
  }
5351
5351
  )
5352
5352
  ] }) }),
5353
- /* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: D.map((N) => {
5354
- const A = f === N.id, I = N?.links?.length ?? 0, k = S === N.id, M = R === N.id && S !== N.id;
5353
+ /* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: D.map((w) => {
5354
+ const T = f === w.id, I = w?.links?.length ?? 0, k = z === w.id, B = R === w.id && z !== w.id;
5355
5355
  return /* @__PURE__ */ e(
5356
5356
  "div",
5357
5357
  {
5358
- onDragEnter: () => E(N.id),
5359
- onDragOver: z,
5360
- onDrop: (P) => b(P, N.id),
5361
- onDragEnd: w,
5358
+ onDragEnter: () => E(w.id),
5359
+ onDragOver: C,
5360
+ onDrop: (M) => b(M, w.id),
5361
+ onDragEnd: N,
5362
5362
  className: [
5363
5363
  "flex items-center justify-between p-3 border rounded-2xl mb-3",
5364
5364
  "border-gray-300",
5365
- M ? "ring-2 ring-gray-800/20" : "",
5365
+ B ? "ring-2 ring-gray-800/20" : "",
5366
5366
  k ? "opacity-60" : ""
5367
5367
  ].join(" "),
5368
- children: A ? /* @__PURE__ */ n(te, { children: [
5368
+ children: T ? /* @__PURE__ */ n(te, { children: [
5369
5369
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2 flex-1", children: /* @__PURE__ */ e(
5370
5370
  "input",
5371
5371
  {
5372
5372
  type: "text",
5373
5373
  className: "flex-1 h-10 px-3 max-w-[200px] border border-gray-300 rounded-2xl outline-none focus:ring-2 focus:ring-gray-800/20",
5374
5374
  value: r,
5375
- placeholder: N._temp ? "New collection name" : "Edit collection name",
5376
- onChange: (P) => x(P.target.value),
5377
- onKeyDown: (P) => {
5378
- P.key === "Enter" && h(), P.key === "Escape" && C();
5375
+ placeholder: w._temp ? "New collection name" : "Edit collection name",
5376
+ onChange: (M) => v(M.target.value),
5377
+ onKeyDown: (M) => {
5378
+ M.key === "Enter" && h(), M.key === "Escape" && F();
5379
5379
  },
5380
5380
  autoFocus: !0
5381
5381
  }
@@ -5385,7 +5385,7 @@ const Mt = () => {
5385
5385
  "button",
5386
5386
  {
5387
5387
  className: "cursor-pointer border border-gray-300 p-2 rounded-2xl",
5388
- onClick: C,
5388
+ onClick: F,
5389
5389
  "aria-label": "Cancel edit",
5390
5390
  children: /* @__PURE__ */ e(ye, { color: "#767676" })
5391
5391
  }
@@ -5414,36 +5414,36 @@ const Mt = () => {
5414
5414
  "aria-label": "Drag to reorder",
5415
5415
  className: "cursor-grab active:cursor-grabbing p-1 -m-1 rounded-md hover:bg-gray-50",
5416
5416
  draggable: !0,
5417
- onDragStart: (P) => B(P, N.id),
5417
+ onDragStart: (M) => L(M, w.id),
5418
5418
  children: /* @__PURE__ */ e(wt, {})
5419
5419
  }
5420
5420
  ),
5421
- /* @__PURE__ */ e("span", { children: N.categoryName })
5421
+ /* @__PURE__ */ e("span", { children: w.categoryName })
5422
5422
  ] }),
5423
5423
  /* @__PURE__ */ n("div", { className: "flex gap-2 items-center", children: [
5424
- N.protected ? /* @__PURE__ */ e("span", { className: "text-sm text-gray-600 cursor-default", children: N.qlAppName }) : /* @__PURE__ */ e("span", { className: "text-sm text-blue-600 cursor-default", children: `${I} ${I === 1 ? "link" : "links"}` }),
5424
+ w.protected ? /* @__PURE__ */ e("span", { className: "text-sm text-gray-600 cursor-default", children: w.qlAppName }) : /* @__PURE__ */ e("span", { className: "text-sm text-blue-600 cursor-default", children: `${I} ${I === 1 ? "link" : "links"}` }),
5425
5425
  m && /* @__PURE__ */ e(
5426
5426
  "button",
5427
5427
  {
5428
5428
  className: "cursor-pointer",
5429
- onClick: () => Y(N),
5430
- "aria-label": `Edit ${N.categoryName}`,
5429
+ onClick: () => Y(w),
5430
+ "aria-label": `Edit ${w.categoryName}`,
5431
5431
  children: /* @__PURE__ */ e(yr, { color: "#767676" })
5432
5432
  }
5433
5433
  ),
5434
5434
  i && /* @__PURE__ */ e(
5435
5435
  "span",
5436
5436
  {
5437
- className: I === 0 && !N.protected ? "cursor-pointer" : "cursor-not-allowed",
5438
- title: I === 0 && !N.protected ? "Delete" : "Cannot delete this collection",
5439
- onClick: I === 0 ? () => v(N) : null,
5437
+ className: I === 0 && !w.protected ? "cursor-pointer" : "cursor-not-allowed",
5438
+ title: I === 0 && !w.protected ? "Delete" : "Cannot delete this collection",
5439
+ onClick: I === 0 ? () => x(w) : null,
5440
5440
  children: /* @__PURE__ */ e(Qe, { color: I === 0 ? "#767676" : "#C2C2C2" })
5441
5441
  }
5442
5442
  )
5443
5443
  ] })
5444
5444
  ] })
5445
5445
  },
5446
- N.id
5446
+ w.id
5447
5447
  );
5448
5448
  }) })
5449
5449
  ] });
@@ -5458,7 +5458,7 @@ const Mt = () => {
5458
5458
  allowEdit: f = !0,
5459
5459
  allowDelete: y = !0,
5460
5460
  allowReorder: r = !0,
5461
- className: x = ""
5461
+ className: v = ""
5462
5462
  } = t, d = a?.[t.key] || i || [], p = Array.isArray(d) ? d : [];
5463
5463
  return /* @__PURE__ */ n("div", { className: "dynamic-config-manage-collection-list", children: [
5464
5464
  (o || l) && /* @__PURE__ */ n("div", { className: "mb-4", children: [
@@ -5470,9 +5470,9 @@ const Mt = () => {
5470
5470
  {
5471
5471
  endpoints: m,
5472
5472
  initialData: p,
5473
- className: x,
5474
- onCollectionChange: (T) => {
5475
- s && s(t.key, T);
5473
+ className: v,
5474
+ onCollectionChange: ($) => {
5475
+ s && s(t.key, $);
5476
5476
  },
5477
5477
  showSearch: u,
5478
5478
  allowAdd: g,
@@ -5505,165 +5505,165 @@ function zs({
5505
5505
  onSave: o,
5506
5506
  onShowCancelModal: l
5507
5507
  }) {
5508
- const [m, i] = ae.useState(a), [u, g] = ae.useState(null), [f, y] = ae.useState(null), [r, x] = j(!1), [d, p] = j(!1), [S, T] = j({}), R = `${ze()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, O = R, [L, _] = j(1), U = () => !f || !u ? !1 : JSON.stringify(f) !== JSON.stringify(u), Y = (b) => {
5508
+ const [m, i] = re.useState(a), [u, g] = re.useState(null), [f, y] = re.useState(null), [r, v] = j(!1), [d, p] = j(!1), [z, $] = j({}), R = `${ze()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, O = R, [P, _] = j(1), U = () => !f || !u ? !1 : JSON.stringify(f) !== JSON.stringify(u), Y = (b) => {
5509
5509
  if (!a || !a.configuration)
5510
5510
  return b;
5511
- const w = {}, D = b?.configuration || {};
5512
- return a.configuration.forEach((N) => {
5513
- if (N.key && N.type === "datatable") {
5514
- const I = (D[N.key] || []).map((k, M) => {
5515
- const P = { id: k.id || 0 };
5516
- return N.fields && N.fields.forEach((F) => {
5517
- if (F.fieldtype === "audience") {
5511
+ const N = {}, D = b?.configuration || {};
5512
+ return a.configuration.forEach((w) => {
5513
+ if (w.key && w.type === "datatable") {
5514
+ const I = (D[w.key] || []).map((k, B) => {
5515
+ const M = { id: k.id || 0 };
5516
+ return w.fields && w.fields.forEach((A) => {
5517
+ if (A.fieldtype === "audience") {
5518
5518
  let q = { users: [], groups: [], roles: [] };
5519
- k[F.key] && (Array.isArray(k[F.key]) ? q = { users: [], groups: [], roles: [] } : typeof k[F.key] == "object" && (q = {
5520
- users: k[F.key].users || [],
5521
- groups: k[F.key].groups || [],
5522
- roles: k[F.key].roles || []
5523
- })), P[F.key] = q;
5519
+ k[A.key] && (Array.isArray(k[A.key]) ? q = { users: [], groups: [], roles: [] } : typeof k[A.key] == "object" && (q = {
5520
+ users: k[A.key].users || [],
5521
+ groups: k[A.key].groups || [],
5522
+ roles: k[A.key].roles || []
5523
+ })), M[A.key] = q;
5524
5524
  } else
5525
- P[F.key] = k[F.key] || F.default || "";
5526
- }), P;
5525
+ M[A.key] = k[A.key] || A.default || "";
5526
+ }), M;
5527
5527
  });
5528
5528
  if (I.length === 0) {
5529
5529
  const k = { id: 0 };
5530
- N.fields && N.fields.forEach((M) => {
5531
- M.fieldtype === "audience" ? k[M.key] = { users: [], groups: [], roles: [] } : k[M.key] = M.default || "";
5530
+ w.fields && w.fields.forEach((B) => {
5531
+ B.fieldtype === "audience" ? k[B.key] = { users: [], groups: [], roles: [] } : k[B.key] = B.default || "";
5532
5532
  }), I.push(k);
5533
5533
  }
5534
- w[N.key] = I;
5535
- } else N.key && (w[N.key] = D[N.key] || {});
5536
- }), w;
5534
+ N[w.key] = I;
5535
+ } else w.key && (N[w.key] = D[w.key] || {});
5536
+ }), N;
5537
5537
  }, G = () => {
5538
5538
  if (a && a.configuration) {
5539
5539
  const b = {};
5540
- a.configuration.forEach((w) => {
5541
- if (w.key)
5542
- if (w.type === "datatable") {
5540
+ a.configuration.forEach((N) => {
5541
+ if (N.key)
5542
+ if (N.type === "datatable") {
5543
5543
  const D = { id: 0 };
5544
- w.fields && w.fields.forEach((N) => {
5545
- N.fieldtype === "audience" ? D[N.key] = { users: [], groups: [], roles: [] } : D[N.key] = N.default || "";
5546
- }), b[w.key] = [D];
5547
- } else if (w.type === "section") {
5544
+ N.fields && N.fields.forEach((w) => {
5545
+ w.fieldtype === "audience" ? D[w.key] = { users: [], groups: [], roles: [] } : D[w.key] = w.default || "";
5546
+ }), b[N.key] = [D];
5547
+ } else if (N.type === "section") {
5548
5548
  const D = {};
5549
- w.fields && Array.isArray(w.fields) && w.fields.forEach((N) => {
5550
- N.key && (D[N.key] = N.default || "");
5551
- }), b[w.key] = D;
5549
+ N.fields && Array.isArray(N.fields) && N.fields.forEach((w) => {
5550
+ w.key && (D[w.key] = w.default || "");
5551
+ }), b[N.key] = D;
5552
5552
  } else
5553
- b[w.key] = {};
5553
+ b[N.key] = {};
5554
5554
  }), g(b), y(b);
5555
5555
  }
5556
5556
  };
5557
5557
  Z(() => {
5558
5558
  if (s) {
5559
- x(!1);
5559
+ v(!1);
5560
5560
  return;
5561
5561
  }
5562
5562
  const b = async () => {
5563
5563
  try {
5564
- x(!0);
5565
- let w = await je(R);
5566
- if (w) {
5567
- const D = Y(w);
5564
+ v(!0);
5565
+ let N = await je(R);
5566
+ if (N) {
5567
+ const D = Y(N);
5568
5568
  g(D), y(D);
5569
5569
  } else
5570
5570
  G();
5571
- } catch (w) {
5572
- console.error("Error fetching configuration:", w);
5571
+ } catch (N) {
5572
+ console.error("Error fetching configuration:", N);
5573
5573
  let D = "Failed to load configuration";
5574
- if (w.response) {
5575
- const N = w.response.status, A = w.response.data?.message || w.response.data?.error;
5576
- N === 400 ? D = A || "Invalid request. Please check the application ID." : N === 401 ? D = "You are not authorized to access this configuration." : N === 403 ? D = "Access denied. You don't have permission to view this configuration." : N === 404 ? D = "Configuration not found. It may not exist yet or the application ID is incorrect." : N >= 500 ? D = A || "Server error. Please try again later." : D = A || `Failed to load configuration (Error ${N})`;
5577
- } else w.request ? D = "Network error. Please check your connection and try again." : D = w.message || "An unexpected error occurred while loading configuration.";
5574
+ if (N.response) {
5575
+ const w = N.response.status, T = N.response.data?.message || N.response.data?.error;
5576
+ w === 400 ? D = T || "Invalid request. Please check the application ID." : w === 401 ? D = "You are not authorized to access this configuration." : w === 403 ? D = "Access denied. You don't have permission to view this configuration." : w === 404 ? D = "Configuration not found. It may not exist yet or the application ID is incorrect." : w >= 500 ? D = T || "Server error. Please try again later." : D = T || `Failed to load configuration (Error ${w})`;
5577
+ } else N.request ? D = "Network error. Please check your connection and try again." : D = N.message || "An unexpected error occurred while loading configuration.";
5578
5578
  Ge.error(D), G();
5579
5579
  } finally {
5580
- x(!1);
5580
+ v(!1);
5581
5581
  }
5582
5582
  };
5583
5583
  a && (i(a), t ? b() : G());
5584
- }, [a, L, t, s]);
5585
- const C = (b, w) => {
5584
+ }, [a, P, t, s]);
5585
+ const F = (b, N) => {
5586
5586
  g((D) => ({
5587
5587
  ...D,
5588
- [b]: w
5589
- })), T((D) => {
5590
- const N = { ...D };
5591
- return N[b] && delete N[b], N;
5588
+ [b]: N
5589
+ })), $((D) => {
5590
+ const w = { ...D };
5591
+ return w[b] && delete w[b], w;
5592
5592
  });
5593
5593
  }, h = () => {
5594
5594
  const b = {};
5595
- return !m || !u || m.configuration.forEach((w) => {
5596
- if (w.type === "section")
5597
- w.fields.forEach((D) => {
5598
- const N = u[w.key]?.[D.key];
5599
- if (D.required && (!N || typeof N == "string" && N.trim() === "")) {
5600
- b[w.key] || (b[w.key] = {}), b[w.key][D.key] = `${D.label} is required`;
5595
+ return !m || !u || m.configuration.forEach((N) => {
5596
+ if (N.type === "section")
5597
+ N.fields.forEach((D) => {
5598
+ const w = u[N.key]?.[D.key];
5599
+ if (D.required && (!w || typeof w == "string" && w.trim() === "")) {
5600
+ b[N.key] || (b[N.key] = {}), b[N.key][D.key] = `${D.label} is required`;
5601
5601
  return;
5602
5602
  }
5603
- if (D.fieldtype === "number" && N !== "" && N !== null && N !== void 0) {
5604
- const A = Number(N);
5605
- isNaN(A) ? (b[w.key] || (b[w.key] = {}), b[w.key][D.key] = `${D.label} must be a valid number`) : (D.min !== void 0 && A < D.min && (b[w.key] || (b[w.key] = {}), b[w.key][D.key] = `${D.label} must be at least ${D.min}`), D.max !== void 0 && A > D.max && (b[w.key] || (b[w.key] = {}), b[w.key][D.key] = `${D.label} must not exceed ${D.max}`));
5603
+ if (D.fieldtype === "number" && w !== "" && w !== null && w !== void 0) {
5604
+ const T = Number(w);
5605
+ isNaN(T) ? (b[N.key] || (b[N.key] = {}), b[N.key][D.key] = `${D.label} must be a valid number`) : (D.min !== void 0 && T < D.min && (b[N.key] || (b[N.key] = {}), b[N.key][D.key] = `${D.label} must be at least ${D.min}`), D.max !== void 0 && T > D.max && (b[N.key] || (b[N.key] = {}), b[N.key][D.key] = `${D.label} must not exceed ${D.max}`));
5606
5606
  }
5607
5607
  });
5608
- else if (w.type === "datatable") {
5609
- const D = u[w.key];
5610
- Array.isArray(D) && D.forEach((N, A) => {
5611
- w.fields.forEach((I) => {
5612
- const k = N[I.key];
5608
+ else if (N.type === "datatable") {
5609
+ const D = u[N.key];
5610
+ Array.isArray(D) && D.forEach((w, T) => {
5611
+ N.fields.forEach((I) => {
5612
+ const k = w[I.key];
5613
5613
  if (I.required && (!k || typeof k == "string" && k.trim() === "")) {
5614
- b[w.key] || (b[w.key] = {}), b[w.key][A] || (b[w.key][A] = {}), b[w.key][A][I.key] = `${I.label} is required`;
5614
+ b[N.key] || (b[N.key] = {}), b[N.key][T] || (b[N.key][T] = {}), b[N.key][T][I.key] = `${I.label} is required`;
5615
5615
  return;
5616
5616
  }
5617
5617
  if (I.fieldtype === "number" && k !== "" && k !== null && k !== void 0) {
5618
- const M = Number(k);
5619
- isNaN(M) ? (b[w.key] || (b[w.key] = {}), b[w.key][A] || (b[w.key][A] = {}), b[w.key][A][I.key] = `${I.label} must be a valid number`) : (I.min !== void 0 && M < I.min && (b[w.key] || (b[w.key] = {}), b[w.key][A] || (b[w.key][A] = {}), b[w.key][A][I.key] = `${I.label} must be at least ${I.min}`), I.max !== void 0 && M > I.max && (b[w.key] || (b[w.key] = {}), b[w.key][A] || (b[w.key][A] = {}), b[w.key][A][I.key] = `${I.label} must not exceed ${I.max}`));
5618
+ const B = Number(k);
5619
+ isNaN(B) ? (b[N.key] || (b[N.key] = {}), b[N.key][T] || (b[N.key][T] = {}), b[N.key][T][I.key] = `${I.label} must be a valid number`) : (I.min !== void 0 && B < I.min && (b[N.key] || (b[N.key] = {}), b[N.key][T] || (b[N.key][T] = {}), b[N.key][T][I.key] = `${I.label} must be at least ${I.min}`), I.max !== void 0 && B > I.max && (b[N.key] || (b[N.key] = {}), b[N.key][T] || (b[N.key][T] = {}), b[N.key][T][I.key] = `${I.label} must not exceed ${I.max}`));
5620
5620
  }
5621
5621
  });
5622
5622
  });
5623
5623
  }
5624
5624
  }), b;
5625
- }, v = (b) => Object.keys(b).length > 0, $ = async (b) => {
5626
- const w = a?.configuration?.filter(
5627
- (D) => D.fields?.some((N) => N.fieldtype === "managecollectionlist")
5625
+ }, x = (b) => Object.keys(b).length > 0, S = async (b) => {
5626
+ const N = a?.configuration?.filter(
5627
+ (D) => D.fields?.some((w) => w.fieldtype === "managecollectionlist")
5628
5628
  ) || [];
5629
- for (const D of w) {
5630
- const N = D.fields.find((P) => P.fieldtype === "managecollectionlist");
5631
- if (!N || !b[D.key]) continue;
5632
- const A = b[D.key][N.key];
5633
- if (!Array.isArray(A)) continue;
5634
- const I = N.endpoints || {};
5635
- let k = 0, M = 0;
5636
- for (const P of A)
5629
+ for (const D of N) {
5630
+ const w = D.fields.find((M) => M.fieldtype === "managecollectionlist");
5631
+ if (!w || !b[D.key]) continue;
5632
+ const T = b[D.key][w.key];
5633
+ if (!Array.isArray(T)) continue;
5634
+ const I = w.endpoints || {};
5635
+ let k = 0, B = 0;
5636
+ for (const M of T)
5637
5637
  try {
5638
- if (P._temp && P._isDraft) {
5639
- console.log("Creating new collection:", P.categoryName);
5640
- const F = await Ze(I.collectionCreate, {
5641
- categoryName: P.categoryName,
5642
- order: P.order
5638
+ if (M._temp && M._isDraft) {
5639
+ console.log("Creating new collection:", M.categoryName);
5640
+ const A = await Ze(I.collectionCreate, {
5641
+ categoryName: M.categoryName,
5642
+ order: M.order
5643
5643
  });
5644
- F && (console.log("Collection created successfully:", F), k++);
5645
- } else if (P._isDraft && !P._temp) {
5646
- console.log("Updating collection:", P.id, P.categoryName);
5647
- const F = await Hn(`${I.collectionUpdate}/${P.id}?newName=${encodeURIComponent(P.categoryName)}`);
5648
- F && (console.log("Collection updated successfully:", F), M++);
5644
+ A && (console.log("Collection created successfully:", A), k++);
5645
+ } else if (M._isDraft && !M._temp) {
5646
+ console.log("Updating collection:", M.id, M.categoryName);
5647
+ const A = await Hn(`${I.collectionUpdate}/${M.id}?newName=${encodeURIComponent(M.categoryName)}`);
5648
+ A && (console.log("Collection updated successfully:", A), B++);
5649
5649
  }
5650
- } catch (F) {
5651
- throw console.error(`Failed to save collection ${P.categoryName}:`, F), new Error(`Failed to save collection "${P.categoryName}": ${F.message}`);
5650
+ } catch (A) {
5651
+ throw console.error(`Failed to save collection ${M.categoryName}:`, A), new Error(`Failed to save collection "${M.categoryName}": ${A.message}`);
5652
5652
  }
5653
- if (k > 0 || M > 0) {
5654
- const P = [];
5655
- k > 0 && P.push(`${k} collection${k > 1 ? "s" : ""} created`), M > 0 && P.push(`${M} collection${M > 1 ? "s" : ""} updated`), console.log("ManageCollectionList operations completed:", P.join(", "));
5653
+ if (k > 0 || B > 0) {
5654
+ const M = [];
5655
+ k > 0 && M.push(`${k} collection${k > 1 ? "s" : ""} created`), B > 0 && M.push(`${B} collection${B > 1 ? "s" : ""} updated`), console.log("ManageCollectionList operations completed:", M.join(", "));
5656
5656
  }
5657
5657
  }
5658
- }, B = () => {
5658
+ }, L = () => {
5659
5659
  const b = h();
5660
- if (T(b), v(b)) {
5660
+ if ($(b), x(b)) {
5661
5661
  let D = [];
5662
- Object.keys(b).forEach((N) => {
5663
- typeof b[N] == "object" && Object.keys(b[N]).forEach((A) => {
5664
- typeof b[N][A] == "object" ? Object.keys(b[N][A]).forEach((I) => {
5665
- D.push(`${N} row ${parseInt(A) + 1}: ${b[N][A][I]}`);
5666
- }) : D.push(`${N}: ${b[N][A]}`);
5662
+ Object.keys(b).forEach((w) => {
5663
+ typeof b[w] == "object" && Object.keys(b[w]).forEach((T) => {
5664
+ typeof b[w][T] == "object" ? Object.keys(b[w][T]).forEach((I) => {
5665
+ D.push(`${w} row ${parseInt(T) + 1}: ${b[w][T][I]}`);
5666
+ }) : D.push(`${w}: ${b[w][T]}`);
5667
5667
  });
5668
5668
  });
5669
5669
  return;
@@ -5672,32 +5672,32 @@ function zs({
5672
5672
  try {
5673
5673
  p(!0);
5674
5674
  const D = {};
5675
- u && (await $(u), Object.keys(u).forEach((A) => {
5675
+ u && (await S(u), Object.keys(u).forEach((T) => {
5676
5676
  const I = a?.configuration?.find(
5677
- (k) => k.key === A && k.type === "datatable"
5677
+ (k) => k.key === T && k.type === "datatable"
5678
5678
  );
5679
- I && Array.isArray(u[A]) ? D[A] = u[A].map((k) => {
5680
- const M = { id: k.id || 0 };
5681
- return I.fields && I.fields.forEach((P) => {
5682
- if (P.fieldtype === "audience") {
5683
- let F = { users: [], groups: [], roles: [] };
5684
- k[P.key] && typeof k[P.key] == "object" && !Array.isArray(k[P.key]) && (F = {
5685
- users: k[P.key].users || [],
5686
- groups: k[P.key].groups || [],
5687
- roles: k[P.key].roles || []
5688
- }), M[P.key] = F;
5679
+ I && Array.isArray(u[T]) ? D[T] = u[T].map((k) => {
5680
+ const B = { id: k.id || 0 };
5681
+ return I.fields && I.fields.forEach((M) => {
5682
+ if (M.fieldtype === "audience") {
5683
+ let A = { users: [], groups: [], roles: [] };
5684
+ k[M.key] && typeof k[M.key] == "object" && !Array.isArray(k[M.key]) && (A = {
5685
+ users: k[M.key].users || [],
5686
+ groups: k[M.key].groups || [],
5687
+ roles: k[M.key].roles || []
5688
+ }), B[M.key] = A;
5689
5689
  } else
5690
- M[P.key] = k[P.key] || "";
5691
- }), M;
5692
- }) : D[A] = u[A];
5690
+ B[M.key] = k[M.key] || "";
5691
+ }), B;
5692
+ }) : D[T] = u[T];
5693
5693
  })), (!D.appkey || D.appkey === "") && (D.appkey = t);
5694
- let N = await Ze(O, D);
5695
- if (N && N.status != "fail") {
5696
- T({});
5697
- const A = N.message || "Configuration has been saved successfully";
5698
- Ge.success(A), o && typeof o == "function" && o(u);
5694
+ let w = await Ze(O, D);
5695
+ if (w && w.status != "fail") {
5696
+ $({});
5697
+ const T = w.message || "Configuration has been saved successfully";
5698
+ Ge.success(T), o && typeof o == "function" && o(u);
5699
5699
  } else
5700
- throw Ge.error(N?.message || "Failed to save configuration"), new Error("No response received from server");
5700
+ throw Ge.error(w?.message || "Failed to save configuration"), new Error("No response received from server");
5701
5701
  } catch (D) {
5702
5702
  console.error("Error saving configuration:", D), Ge.error(D?.message || "Failed to save configuration");
5703
5703
  } finally {
@@ -5709,7 +5709,7 @@ function zs({
5709
5709
  };
5710
5710
  if (!m?.configuration && !a?.configuration)
5711
5711
  return /* @__PURE__ */ e("div", { className: "min-h-screen flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "text-gray-500", children: "No configuration available" }) });
5712
- const z = a?.configuration || m?.configuration;
5712
+ const C = a?.configuration || m?.configuration;
5713
5713
  return Z(() => {
5714
5714
  s && a ? (!u || Object.keys(u).length === 0) && G() : s && !a && G();
5715
5715
  }, [s, a]), /* @__PURE__ */ n("div", { children: [
@@ -5720,7 +5720,7 @@ function zs({
5720
5720
  style: { padding: "0px 20px 0px 0px" },
5721
5721
  children: [
5722
5722
  r && /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-64", children: /* @__PURE__ */ e(ga, { size: "large" }) }),
5723
- !r && z?.map((b, w) => {
5723
+ !r && C?.map((b, N) => {
5724
5724
  const D = Cs(b.type);
5725
5725
  if (D && D !== "UnknownType")
5726
5726
  return /* @__PURE__ */ e(
@@ -5728,10 +5728,10 @@ function zs({
5728
5728
  {
5729
5729
  item: b,
5730
5730
  data: u,
5731
- updateHandler: C,
5732
- validationErrors: S
5731
+ updateHandler: F,
5732
+ validationErrors: z
5733
5733
  },
5734
- w
5734
+ N
5735
5735
  );
5736
5736
  })
5737
5737
  ]
@@ -5752,7 +5752,7 @@ function zs({
5752
5752
  ee,
5753
5753
  {
5754
5754
  category: "primary",
5755
- onClick: B,
5755
+ onClick: L,
5756
5756
  disabled: d,
5757
5757
  label: d ? "Saving..." : "Save",
5758
5758
  type: "submit"
@@ -5772,27 +5772,27 @@ const Hl = ({
5772
5772
  breadcrumb: f = [],
5773
5773
  overview: y = {},
5774
5774
  configuration: r = []
5775
- } = t, x = r.map((C) => {
5776
- if (C.type === "section" && C.fields) {
5777
- const h = [...C.fields], v = h.findIndex(($) => $ && $.key === "appkey");
5778
- if (v !== -1) {
5779
- const $ = h[v];
5780
- if (h[v] = {
5781
- ...$,
5775
+ } = t, v = le(() => r.map((h) => {
5776
+ if (h.type === "section" && h.fields) {
5777
+ const x = [...h.fields], S = x.findIndex((L) => L && L.key === "appkey");
5778
+ if (S !== -1) {
5779
+ const L = x[S];
5780
+ if (x[S] = {
5781
+ ...L,
5782
5782
  default: a,
5783
5783
  value: a,
5784
5784
  readonly: !0,
5785
5785
  placeholder: a,
5786
5786
  disabled: !1
5787
- }, h.some((E) => E.key === "displayname")) {
5788
- const E = h.findIndex((b) => b.key === "displayname"), z = h[E] || {};
5789
- h[E] = {
5790
- ...z,
5791
- default: z.default || z.value || a,
5792
- placeholder: z.placeholder || "Enter display name"
5787
+ }, x.some((C) => C.key === "displayname")) {
5788
+ const C = x.findIndex((N) => N.key === "displayname"), b = x[C] || {};
5789
+ x[C] = {
5790
+ ...b,
5791
+ default: b.default || b.value || a,
5792
+ placeholder: b.placeholder || "Enter display name"
5793
5793
  };
5794
5794
  } else {
5795
- const E = {
5795
+ const C = {
5796
5796
  key: "displayname",
5797
5797
  label: "Display Name",
5798
5798
  fieldtype: "text",
@@ -5801,52 +5801,54 @@ const Hl = ({
5801
5801
  placeholder: "Enter display name",
5802
5802
  required: !1
5803
5803
  };
5804
- h.splice(v + 1, 0, E);
5804
+ x.splice(S + 1, 0, C);
5805
5805
  }
5806
5806
  }
5807
5807
  return {
5808
- ...C,
5809
- fields: h
5808
+ ...h,
5809
+ fields: x
5810
5810
  };
5811
5811
  }
5812
- return C;
5813
- }), d = {
5812
+ return h;
5813
+ }), [r, a]), d = {
5814
5814
  heading: "App Details",
5815
5815
  subHeading: "View app details and customize configurations to align with institutional requirements.",
5816
5816
  isLeftArrow: !0,
5817
5817
  onBackClick: () => window.history.back(),
5818
5818
  ...u
5819
- }, p = f.map((C) => ({
5820
- label: C.text,
5821
- href: C.href || "#"
5822
- })), S = se((C) => {
5823
- i(!1), C.primary && window.location.reload();
5824
- }, []), T = se((C) => {
5825
- console.log("Configuration changed:", C);
5826
- }, []), R = (() => {
5819
+ }, p = f.map((h) => ({
5820
+ label: h.text,
5821
+ href: h.href || "#"
5822
+ })), z = ae(() => {
5823
+ i(!0);
5824
+ }, []), $ = ae((h) => {
5825
+ i(!1), h.primary && window.location.reload();
5826
+ }, []), R = ae((h) => {
5827
+ console.log("Configuration changed:", h);
5828
+ }, []), O = (() => {
5827
5829
  if (g.headingKey && Array.isArray(r)) {
5828
- const C = g.headingKey.split("."), h = C[0], v = C[1], $ = r.find((B) => B && B.key === h);
5829
- if ($ && $.fields) {
5830
- const B = $.fields.find((E) => E && E.key === v);
5831
- if (B)
5832
- return B.default ?? B.value ?? g.heading ?? a;
5830
+ const h = g.headingKey.split("."), x = h[0], S = h[1], L = r.find((E) => E && E.key === x);
5831
+ if (L && L.fields) {
5832
+ const E = L.fields.find((C) => C && C.key === S);
5833
+ if (E)
5834
+ return E.default ?? E.value ?? g.heading ?? a;
5833
5835
  }
5834
5836
  }
5835
5837
  if (Array.isArray(r)) {
5836
- for (const C of r)
5837
- if (C && C.fields) {
5838
- const h = C.fields.find((v) => v && v.key === "displayname");
5839
- if (h) return h.default ?? h.value ?? a;
5838
+ for (const h of r)
5839
+ if (h && h.fields) {
5840
+ const x = h.fields.find((S) => S && S.key === "displayname");
5841
+ if (x) return x.default ?? x.value ?? a;
5840
5842
  }
5841
5843
  }
5842
5844
  return g.heading || a;
5843
- })(), O = {
5845
+ })(), P = {
5844
5846
  subHeading: "Application configuration and details",
5845
5847
  tags: [],
5846
5848
  ...g,
5847
- heading: R
5849
+ heading: O
5848
5850
  // Use resolvedDisplayName only
5849
- }, L = {
5851
+ }, _ = {
5850
5852
  about: "This application provides comprehensive functionality for your organization.",
5851
5853
  images: {
5852
5854
  desktop: "https://via.placeholder.com/600x400?text=Desktop+View",
@@ -5864,26 +5866,26 @@ const Hl = ({
5864
5866
  }
5865
5867
  ],
5866
5868
  ...y
5867
- }, _ = oe(() => ({
5868
- configuration: x
5869
- }), [x]), U = oe(() => [
5870
- { label: "Overview", content: G(L) },
5871
- { label: "Configuration", content: /* @__PURE__ */ e(zs, { appid: a, configdata: _, disableApi: s, onSave: T, onShowCancelModal: () => i(!0) }) }
5872
- ], [a, _, s, T, L]);
5873
- function Y(C) {
5874
- return C ? C.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: C } }) : C : "📱";
5869
+ }, U = le(() => ({
5870
+ configuration: v
5871
+ }), [v]), Y = le(() => [
5872
+ { label: "Overview", content: F(_) },
5873
+ { label: "Configuration", content: /* @__PURE__ */ e(zs, { appid: a, configdata: U, disableApi: s, onSave: R, onShowCancelModal: z }) }
5874
+ ], [a, U, s, R, z, _]);
5875
+ function G(h) {
5876
+ return h ? h.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: h } }) : h : "📱";
5875
5877
  }
5876
- function G(C) {
5878
+ function F(h) {
5877
5879
  return /* @__PURE__ */ n("div", { className: "bg-white rounded-2xl p-1", children: [
5878
5880
  /* @__PURE__ */ n("section", { className: "mb-8", children: [
5879
5881
  /* @__PURE__ */ e("h2", { className: "text-xl font-semibold mb-2", children: "About" }),
5880
- /* @__PURE__ */ e("p", { className: "text-gray-700 text-base", children: C.about })
5882
+ /* @__PURE__ */ e("p", { className: "text-gray-700 text-base", children: h.about })
5881
5883
  ] }),
5882
5884
  /* @__PURE__ */ n("section", { className: "flex flex-row gap-6 justify-center items-center mb-8", children: [
5883
5885
  /* @__PURE__ */ e(
5884
5886
  "img",
5885
5887
  {
5886
- src: C.images.desktop,
5888
+ src: h.images.desktop,
5887
5889
  alt: "Desktop View",
5888
5890
  className: "rounded-xl border border-gray-200 w-[340px] h-[220px] object-cover"
5889
5891
  }
@@ -5891,7 +5893,7 @@ const Hl = ({
5891
5893
  /* @__PURE__ */ e(
5892
5894
  "img",
5893
5895
  {
5894
- src: C.images.mobile1,
5896
+ src: h.images.mobile1,
5895
5897
  alt: "Mobile View 1",
5896
5898
  className: "rounded-2xl border border-gray-200 w-[120px] h-[220px] object-cover"
5897
5899
  }
@@ -5899,11 +5901,11 @@ const Hl = ({
5899
5901
  ] }),
5900
5902
  /* @__PURE__ */ n("section", { children: [
5901
5903
  /* @__PURE__ */ e("h3", { className: "text-lg font-semibold mb-4", children: "Key Features" }),
5902
- /* @__PURE__ */ e("ul", { className: "space-y-3", children: C.features.map((h, v) => /* @__PURE__ */ n("li", { children: [
5903
- /* @__PURE__ */ e("span", { className: "font-semibold", children: h.title }),
5904
+ /* @__PURE__ */ e("ul", { className: "space-y-3", children: h.features.map((x, S) => /* @__PURE__ */ n("li", { children: [
5905
+ /* @__PURE__ */ e("span", { className: "font-semibold", children: x.title }),
5904
5906
  /* @__PURE__ */ e("br", {}),
5905
- /* @__PURE__ */ e("span", { className: "text-gray-700", children: h.description })
5906
- ] }, v)) })
5907
+ /* @__PURE__ */ e("span", { className: "text-gray-700", children: x.description })
5908
+ ] }, S)) })
5907
5909
  ] })
5908
5910
  ] });
5909
5911
  }
@@ -5919,37 +5921,37 @@ const Hl = ({
5919
5921
  }
5920
5922
  ),
5921
5923
  /* @__PURE__ */ n("div", { className: "bg-[#ffffff] border border-[#eef2f6] rounded-[12px] px-6 py-5 flex gap-4 items-start mb-4 shadow-sm", children: [
5922
- /* @__PURE__ */ e("div", { className: "icon w-[72px] h-[72px] rounded-full flex items-center justify-center bg-[#F5F5F6] text-[#1C274C] font-bold text-[18px]", children: Y(O.icon) }),
5924
+ /* @__PURE__ */ e("div", { className: "icon w-[72px] h-[72px] rounded-full flex items-center justify-center bg-[#F5F5F6] text-[#1C274C] font-bold text-[18px]", children: G(P.icon) }),
5923
5925
  /* @__PURE__ */ n("div", { className: "flex flex-col min-w-0", children: [
5924
- /* @__PURE__ */ e("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children: O.heading }),
5925
- /* @__PURE__ */ e("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children: O.subHeading }),
5926
- /* @__PURE__ */ e("div", { className: "mt-2 flex flex-wrap gap-2", children: O.tags && O.tags.map((C, h) => /* @__PURE__ */ e(
5926
+ /* @__PURE__ */ e("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children: P.heading }),
5927
+ /* @__PURE__ */ e("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children: P.subHeading }),
5928
+ /* @__PURE__ */ e("div", { className: "mt-2 flex flex-wrap gap-2", children: P.tags && P.tags.map((h, x) => /* @__PURE__ */ e(
5927
5929
  "span",
5928
5930
  {
5929
5931
  className: "pill inline-block px-[10px] py-[6px] rounded-[14px] text-[11px] border border-[#e6e9ee] text-[#767676] font-semibold mt-1",
5930
- children: C
5932
+ children: h
5931
5933
  },
5932
- h
5934
+ x
5933
5935
  )) })
5934
5936
  ] })
5935
5937
  ] }),
5936
5938
  /* @__PURE__ */ n("div", { className: "bg-white border border-gray-300 rounded-2xl w-full mt-5 ", children: [
5937
- /* @__PURE__ */ e("div", { className: "border-b border-gray-200", children: /* @__PURE__ */ e("nav", { className: "flex space-x-8", "aria-label": "Tabs", children: U.map((C, h) => /* @__PURE__ */ e(
5939
+ /* @__PURE__ */ e("div", { className: "border-b border-gray-200", children: /* @__PURE__ */ e("nav", { className: "flex space-x-8", "aria-label": "Tabs", children: Y.map((h, x) => /* @__PURE__ */ e(
5938
5940
  "button",
5939
5941
  {
5940
- onClick: () => l(h),
5941
- className: `${o === h ? "border-black text-black" : "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"} whitespace-nowrap py-3 px-6 border-b-2 font-medium text-sm transition-colors duration-200`,
5942
- children: C.label
5942
+ onClick: () => l(x),
5943
+ className: `${o === x ? "border-black text-black" : "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"} whitespace-nowrap py-3 px-6 border-b-2 font-medium text-sm transition-colors duration-200`,
5944
+ children: h.label
5943
5945
  },
5944
- h
5946
+ x
5945
5947
  )) }) }),
5946
- /* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: U[o].content })
5948
+ /* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: Y[o].content })
5947
5949
  ] }),
5948
5950
  /* @__PURE__ */ e(
5949
5951
  Pn,
5950
5952
  {
5951
5953
  isOpen: m,
5952
- onClose: S,
5954
+ onClose: $,
5953
5955
  variant: "warning",
5954
5956
  title: "Are you sure you want to cancel?",
5955
5957
  primaryButtonText: "Yes",
@@ -6001,63 +6003,63 @@ const Kl = ({
6001
6003
  showColumnChooser: f = !0,
6002
6004
  showFilter: y = !1,
6003
6005
  showPrint: r = !1,
6004
- showExcel: x = !1,
6006
+ showExcel: v = !1,
6005
6007
  showPdf: d = !1,
6006
6008
  showRefresh: p = !1,
6007
- showAdd: S = !1,
6009
+ showAdd: z = !1,
6008
6010
  // Additional props
6009
- searchPlaceholder: T = "Search...",
6011
+ searchPlaceholder: $ = "Search...",
6010
6012
  handleRefreshClick: R = () => {
6011
6013
  },
6012
6014
  handleSearchChange: O = () => {
6013
6015
  },
6014
6016
  // Optional: override export file names
6015
- excelFileName: L,
6017
+ excelFileName: P,
6016
6018
  pdfFileName: _
6017
6019
  }) => {
6018
- const U = () => l?.current || o?.current, [Y, G] = ae.useState(""), C = (t || "export").toString().trim() || "export", h = `${L || C}.xlsx`, v = `${_ || C}.pdf`, $ = (z, b, w) => Math.max(b, Math.min(z, w)), B = se(
6019
- (z) => {
6020
+ const U = () => l?.current || o?.current, [Y, G] = re.useState(""), F = (t || "export").toString().trim() || "export", h = `${P || F}.xlsx`, x = `${_ || F}.pdf`, S = (C, b, N) => Math.max(b, Math.min(C, N)), L = ae(
6021
+ (C) => {
6020
6022
  const b = U();
6021
6023
  if (console.log("openColumnChooserNear", b), !!b?.openColumnChooser) {
6022
- if (typeof window > "u" || !z?.currentTarget) {
6024
+ if (typeof window > "u" || !C?.currentTarget) {
6023
6025
  b.openColumnChooser();
6024
6026
  return;
6025
6027
  }
6026
6028
  try {
6027
- const w = z.currentTarget.getBoundingClientRect(), D = w.left + window.scrollX, N = w.bottom + window.scrollY;
6028
- let A = D - 120, I = N - 120;
6029
- const k = window.innerWidth, M = window.innerHeight;
6030
- A = $(A, window.scrollX + 8, window.scrollX + k - 340), I = $(I, window.scrollY, window.scrollY + M - 120), console.log("openColumnChooserNear", A, I), b.openColumnChooser(A, I);
6031
- } catch (w) {
6032
- console.log("coloumn choose error", w);
6029
+ const N = C.currentTarget.getBoundingClientRect(), D = N.left + window.scrollX, w = N.bottom + window.scrollY;
6030
+ let T = D - 120, I = w - 120;
6031
+ const k = window.innerWidth, B = window.innerHeight;
6032
+ T = S(T, window.scrollX + 8, window.scrollX + k - 340), I = S(I, window.scrollY, window.scrollY + B - 120), console.log("openColumnChooserNear", T, I), b.openColumnChooser(T, I);
6033
+ } catch (N) {
6034
+ console.log("coloumn choose error", N);
6033
6035
  }
6034
6036
  }
6035
6037
  },
6036
6038
  []
6037
6039
  // no external deps; reads ref at call time
6038
- ), E = se(
6039
- (z, b) => {
6040
- const w = U();
6041
- if (w)
6042
- switch (z) {
6040
+ ), E = ae(
6041
+ (C, b) => {
6042
+ const N = U();
6043
+ if (N)
6044
+ switch (C) {
6043
6045
  case "ColumnChooser":
6044
- f && (console.log("openColumnChooser", b), b ? B(b) : w.openColumnChooser?.()), console.log("openColumnChooser out", b);
6046
+ f && (console.log("openColumnChooser", b), b ? L(b) : N.openColumnChooser?.()), console.log("openColumnChooser out", b);
6045
6047
  break;
6046
6048
  case "Print":
6047
- r && w.print?.();
6049
+ r && N.print?.();
6048
6050
  break;
6049
6051
  case "Excel":
6050
- x && w.excelExport?.({ fileName: h });
6052
+ v && N.excelExport?.({ fileName: h });
6051
6053
  break;
6052
6054
  case "Pdf":
6053
- d && w.pdfExport?.({ fileName: v });
6055
+ d && N.pdfExport?.({ fileName: x });
6054
6056
  break;
6055
6057
  case "Refresh":
6056
6058
  p && R();
6057
6059
  break;
6058
6060
  }
6059
6061
  },
6060
- [f, r, x, d, p, h, v, R, B]
6062
+ [f, r, v, d, p, h, x, R, L]
6061
6063
  );
6062
6064
  return /* @__PURE__ */ n("div", { className: "flex items-center flex-wrap justify-between w-full px-4 py-2 bg-white border border-gray-200 rounded-t-2xl mb-0", children: [
6063
6065
  /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
@@ -6072,10 +6074,10 @@ const Kl = ({
6072
6074
  g && /* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ e(
6073
6075
  he,
6074
6076
  {
6075
- placeholder: T,
6077
+ placeholder: $,
6076
6078
  value: Y,
6077
- onDebouncedChange: (z) => {
6078
- G(z), O(z);
6079
+ onDebouncedChange: (C) => {
6080
+ G(C), O(C);
6079
6081
  }
6080
6082
  }
6081
6083
  ) }),
@@ -6085,7 +6087,7 @@ const Kl = ({
6085
6087
  ee,
6086
6088
  {
6087
6089
  icon: xr,
6088
- onClick: (z) => E("ColumnChooser", z),
6090
+ onClick: (C) => E("ColumnChooser", C),
6089
6091
  size: "small",
6090
6092
  ariaLabel: "Column Chooser",
6091
6093
  category: "secondary",
@@ -6114,7 +6116,7 @@ const Kl = ({
6114
6116
  title: "Print Grid"
6115
6117
  }
6116
6118
  ),
6117
- x && /* @__PURE__ */ e(
6119
+ v && /* @__PURE__ */ e(
6118
6120
  ee,
6119
6121
  {
6120
6122
  icon: wr,
@@ -6133,7 +6135,7 @@ const Kl = ({
6133
6135
  ariaLabel: "PDF Download",
6134
6136
  size: "small",
6135
6137
  category: "secondary",
6136
- title: `Export PDF (${v})`
6138
+ title: `Export PDF (${x})`
6137
6139
  }
6138
6140
  ),
6139
6141
  p && /* @__PURE__ */ e(
@@ -6148,7 +6150,7 @@ const Kl = ({
6148
6150
  }
6149
6151
  )
6150
6152
  ] }),
6151
- S && m && /* @__PURE__ */ e(
6153
+ z && m && /* @__PURE__ */ e(
6152
6154
  ee,
6153
6155
  {
6154
6156
  label: u,
@@ -6178,28 +6180,28 @@ function eo(t) {
6178
6180
  allowReordering: f = !0,
6179
6181
  allowResizing: y = !0,
6180
6182
  allowExcelExport: r = !1,
6181
- allowPdfExport: x = !1,
6183
+ allowPdfExport: v = !1,
6182
6184
  showColumnChooser: d = !1,
6183
6185
  enableSearchApi: p = !1,
6184
- height: S = "600",
6185
- selectionSettings: T = { type: "Multiple", mode: "Row" },
6186
+ height: z = "600",
6187
+ selectionSettings: $ = { type: "Multiple", mode: "Row" },
6186
6188
  enableCheckbox: R = !1,
6187
6189
  columns: O = [],
6188
- onGridStateChange: L,
6190
+ onGridStateChange: P,
6189
6191
  onRowSelected: _,
6190
6192
  onRowDeselected: U,
6191
6193
  onRowDoubleClick: Y,
6192
6194
  apiRef: G,
6193
- gridProps: C = {}
6195
+ gridProps: F = {}
6194
6196
  } = t, h = ge(null), {
6195
- pageSettings: v,
6196
- sortSettings: $,
6197
- ...B
6198
- } = C || {}, [E, z] = ae.useState(v?.page || 1), [b, w] = ae.useState($?.pageSize || 20), [D, N] = ae.useState($?.sortKey || "updatedDate"), [A, I] = ae.useState($?.direction || "Descending"), k = oe(() => {
6197
+ pageSettings: x,
6198
+ sortSettings: S,
6199
+ ...L
6200
+ } = F || {}, [E, C] = re.useState(x?.page || 1), [b, N] = re.useState(S?.pageSize || 20), [D, w] = re.useState(S?.sortKey || "updatedDate"), [T, I] = re.useState(S?.direction || "Descending"), k = le(() => {
6199
6201
  const V = [sn];
6200
- return i && V.push(ln), u && V.push(on), g && V.push(cn), p && V.push(dn), r && V.push(mn), x && V.push(un), d && V.push(hn), y && V.push(pn), f && V.push(gn), V.push(bn), V;
6201
- }, [i, u, g, p, r, x, d, y, f]), M = oe(() => {
6202
- const V = () => h.current, re = (W, ve) => {
6202
+ return i && V.push(ln), u && V.push(on), g && V.push(cn), p && V.push(dn), r && V.push(mn), v && V.push(un), d && V.push(hn), y && V.push(pn), f && V.push(gn), V.push(bn), V;
6203
+ }, [i, u, g, p, r, v, d, y, f]), B = le(() => {
6204
+ const V = () => h.current, ne = (W, ve) => {
6203
6205
  !ve && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${W} requested but related service/feature is disabled.`);
6204
6206
  };
6205
6207
  return {
@@ -6210,33 +6212,33 @@ function eo(t) {
6210
6212
  selectRow: (W) => V()?.selectRow?.(W),
6211
6213
  selectRows: (W) => V()?.selectRows?.(W),
6212
6214
  search: (W) => {
6213
- re("search()", p), V()?.search?.(W);
6215
+ ne("search()", p), V()?.search?.(W);
6214
6216
  },
6215
6217
  print: () => V()?.print?.(),
6216
6218
  excelExport: (W) => {
6217
- re("excelExport()", r), V()?.excelExport?.(W);
6219
+ ne("excelExport()", r), V()?.excelExport?.(W);
6218
6220
  },
6219
6221
  pdfExport: (W) => {
6220
- re("pdfExport()", x), V()?.pdfExport?.(W);
6222
+ ne("pdfExport()", v), V()?.pdfExport?.(W);
6221
6223
  },
6222
6224
  openColumnChooser: (W, ve) => {
6223
- re("openColumnChooser()", d), V()?.columnChooserModule?.openColumnChooser?.(W, ve);
6225
+ ne("openColumnChooser()", d), V()?.columnChooserModule?.openColumnChooser?.(W, ve);
6224
6226
  }
6225
6227
  };
6226
6228
  }, []);
6227
6229
  Z(() => {
6228
- G && (G.current = M);
6229
- }, [G, M]), Z(() => () => {
6230
+ G && (G.current = B);
6231
+ }, [G, B]), Z(() => () => {
6230
6232
  G && (G.current = null);
6231
6233
  }, []);
6232
- const P = (V) => {
6233
- const re = String(V || "");
6234
- return re === "Ascending" || re === "Descending" ? re : re.toLowerCase() === "ascending" ? "Ascending" : "Descending";
6235
- }, F = (V) => {
6236
- const re = h.current, W = V?.requestType, ve = W === "paging" ? "paging" : W === "sorting" ? "sorting" : W === "searching" ? "searching" : W === "filtering" ? "filtering" : W === "grouping" ? "grouping" : W === "reorder" ? "reorder" : W === "columnstate" ? "columnstate" : "other", Re = V?.pageSize ?? re?.pageSettings?.pageSize ?? b, Ve = V?.currentPage ?? re?.pageSettings?.currentPage ?? l, rt = V?.columnName && V?.direction ? [{ field: V.columnName, dir: P(V.direction) }] : (re?.sortSettings?.columns || []).map((Oe) => ({
6234
+ const M = (V) => {
6235
+ const ne = String(V || "");
6236
+ return ne === "Ascending" || ne === "Descending" ? ne : ne.toLowerCase() === "ascending" ? "Ascending" : "Descending";
6237
+ }, A = (V) => {
6238
+ const ne = h.current, W = V?.requestType, ve = W === "paging" ? "paging" : W === "sorting" ? "sorting" : W === "searching" ? "searching" : W === "filtering" ? "filtering" : W === "grouping" ? "grouping" : W === "reorder" ? "reorder" : W === "columnstate" ? "columnstate" : "other", Re = V?.pageSize ?? ne?.pageSettings?.pageSize ?? b, Ve = V?.currentPage ?? ne?.pageSettings?.currentPage ?? l, rt = V?.columnName && V?.direction ? [{ field: V.columnName, dir: M(V.direction) }] : (ne?.sortSettings?.columns || []).map((Oe) => ({
6237
6239
  field: Oe.field,
6238
- dir: P(Oe.direction ?? Oe.dir)
6239
- })), nt = V?.searchString ?? "", st = V?.columns ?? re?.filterSettings?.columns ?? [];
6240
+ dir: M(Oe.direction ?? Oe.dir)
6241
+ })), nt = V?.searchString ?? "", st = V?.columns ?? ne?.filterSettings?.columns ?? [];
6240
6242
  return {
6241
6243
  reason: ve,
6242
6244
  page: { index: Ve, size: Re, skip: (Ve - 1) * Re, take: Re },
@@ -6249,12 +6251,12 @@ function eo(t) {
6249
6251
  }, q = (V) => {
6250
6252
  setTimeout(() => {
6251
6253
  h?.current?.hideSpinner();
6252
- }, 1e3), V.requestType === "paging" && (z(V.currentPage), w(V.pageSize)), V.requestType === "sorting" && (N(V.columnName || "updatedDate"), I(V.direction === "Ascending" ? "ASC" : "DESC")), L && L(F(V), V);
6254
+ }, 1e3), V.requestType === "paging" && (C(V.currentPage), N(V.pageSize)), V.requestType === "sorting" && (w(V.columnName || "updatedDate"), I(V.direction === "Ascending" ? "ASC" : "DESC")), P && P(A(V), V);
6253
6255
  }, X = (V) => {
6254
6256
  typeof Y == "function" && Y(V?.rowData, V);
6255
6257
  }, xe = () => {
6256
6258
  const V = [];
6257
- return R && V.push(/* @__PURE__ */ e(Dt, { type: "checkbox", width: "50" }, "__checkbox__")), O.forEach((re, W) => {
6259
+ return R && V.push(/* @__PURE__ */ e(Dt, { type: "checkbox", width: "50" }, "__checkbox__")), O.forEach((ne, W) => {
6258
6260
  const {
6259
6261
  field: ve,
6260
6262
  headerText: Re,
@@ -6269,10 +6271,10 @@ function eo(t) {
6269
6271
  format: Oa,
6270
6272
  visible: Ia = !0,
6271
6273
  minWidth: Pa,
6272
- maxWidth: La,
6273
- customAttributes: Ma,
6274
+ maxWidth: Ma,
6275
+ customAttributes: La,
6274
6276
  ...Ba
6275
- } = re || {};
6277
+ } = ne || {};
6276
6278
  V.push(
6277
6279
  /* @__PURE__ */ e(
6278
6280
  Dt,
@@ -6290,8 +6292,8 @@ function eo(t) {
6290
6292
  format: Oa,
6291
6293
  visible: Ia,
6292
6294
  minWidth: Pa,
6293
- maxWidth: La,
6294
- customAttributes: Ma,
6295
+ maxWidth: Ma,
6296
+ customAttributes: La,
6295
6297
  ...Ba
6296
6298
  },
6297
6299
  ve || `col-${W}`
@@ -6308,7 +6310,7 @@ function eo(t) {
6308
6310
  result: a,
6309
6311
  count: s
6310
6312
  },
6311
- height: S,
6313
+ height: z,
6312
6314
  allowPaging: m,
6313
6315
  allowSorting: i,
6314
6316
  allowFiltering: u,
@@ -6316,17 +6318,17 @@ function eo(t) {
6316
6318
  allowReordering: f,
6317
6319
  allowResizing: y,
6318
6320
  showColumnChooser: d,
6319
- selectionSettings: T,
6320
- pageSettings: { pageSize: 10, pageSizes: v?.pageSizes ?? [20, 40, 60, 80, 100] },
6321
- sortSettings: $ ?? {
6322
- columns: [{ field: D, direction: P(A) }],
6321
+ selectionSettings: $,
6322
+ pageSettings: { pageSize: 10, pageSizes: x?.pageSizes ?? [20, 40, 60, 80, 100] },
6323
+ sortSettings: S ?? {
6324
+ columns: [{ field: D, direction: M(T) }],
6323
6325
  allowUnsort: !1
6324
6326
  },
6325
6327
  actionBegin: q,
6326
6328
  rowSelected: _,
6327
6329
  rowDeselected: U,
6328
6330
  recordDoubleClick: X,
6329
- ...B,
6331
+ ...L,
6330
6332
  children: [
6331
6333
  /* @__PURE__ */ e(yn, { children: xe() }),
6332
6334
  /* @__PURE__ */ e(xn, { services: k })
@@ -6368,10 +6370,10 @@ function ie({
6368
6370
  details: i = {},
6369
6371
  ...u
6370
6372
  }) {
6371
- const g = Xe(), f = Ss(u, m), y = (x) => {
6373
+ const g = Xe(), f = Ss(u, m), y = (v) => {
6372
6374
  l?.({
6373
6375
  key: f,
6374
- checked: x.target.checked,
6376
+ checked: v.target.checked,
6375
6377
  details: i,
6376
6378
  props: u
6377
6379
  });
@@ -6419,7 +6421,7 @@ function Ds({
6419
6421
  imageUrl: y = "https://images.unsplash.com/photo-1469980098053-382eb10ba017?q=80&w=1200&auto=format&fit=crop",
6420
6422
  description: r = "Columbia University is a prestigious Ivy League institution located in the heart of New York City.",
6421
6423
  // spread remaining props (_id, instanceId, etc.)
6422
- ...x
6424
+ ...v
6423
6425
  }) {
6424
6426
  const d = ce(t), p = de[d];
6425
6427
  return /* @__PURE__ */ n(
@@ -6431,7 +6433,7 @@ function Ds({
6431
6433
  onSelect: o,
6432
6434
  identity: l,
6433
6435
  details: { type: "activity", title: m, group: i, author: g },
6434
- ...x,
6436
+ ...v,
6435
6437
  children: [
6436
6438
  /* @__PURE__ */ e("div", { className: "flex items-start justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${p.title} ml-3`, children: m }) }),
6437
6439
  /* @__PURE__ */ n("div", { className: `text-zinc-500 dark:text-zinc-400 ${p.meta}`, children: [
@@ -6540,7 +6542,7 @@ function Es({
6540
6542
  // spread for identity (_id/instanceId/etc)
6541
6543
  ...g
6542
6544
  }) {
6543
- const f = ce(t), y = de[f], r = Fs[f], x = (d) => `px-1 pb-2 text-sm font-medium ${d === i ? "text-zinc-900 dark:text-zinc-100 border-b-2" : "text-zinc-500 dark:text-zinc-400"}`;
6545
+ const f = ce(t), y = de[f], r = Fs[f], v = (d) => `px-1 pb-2 text-sm font-medium ${d === i ? "text-zinc-900 dark:text-zinc-100 border-b-2" : "text-zinc-500 dark:text-zinc-400"}`;
6544
6546
  return /* @__PURE__ */ n(
6545
6547
  ie,
6546
6548
  {
@@ -6567,14 +6569,14 @@ function Es({
6567
6569
  /* @__PURE__ */ e(
6568
6570
  "span",
6569
6571
  {
6570
- className: `${x("joined")} ${i === "joined" ? "border-[var(--primaryColor)]" : "border-transparent"}`,
6572
+ className: `${v("joined")} ${i === "joined" ? "border-[var(--primaryColor)]" : "border-transparent"}`,
6571
6573
  children: "Joined"
6572
6574
  }
6573
6575
  ),
6574
6576
  /* @__PURE__ */ e(
6575
6577
  "span",
6576
6578
  {
6577
- className: `${x("suggested")} ${i === "suggested" ? "border-[var(--primaryColor)]" : "border-transparent"}`,
6579
+ className: `${v("suggested")} ${i === "suggested" ? "border-[var(--primaryColor)]" : "border-transparent"}`,
6578
6580
  children: "Suggested"
6579
6581
  }
6580
6582
  )
@@ -6799,7 +6801,7 @@ Is.propTypes = {
6799
6801
  })
6800
6802
  )
6801
6803
  };
6802
- const Ps = ["All", "Library", "Restaurant", "Parking", "Bus Stop"], Ls = {
6804
+ const Ps = ["All", "Library", "Restaurant", "Parking", "Bus Stop"], Ms = {
6803
6805
  sm: {
6804
6806
  wrap: "max-w-md w-full md:w-auto flex-none justify-self-start",
6805
6807
  mapH: "h-48",
@@ -6821,7 +6823,7 @@ const Ps = ["All", "Library", "Restaurant", "Parking", "Bus Stop"], Ls = {
6821
6823
  searchH: "h-11 text-base",
6822
6824
  chipGap: "gap-3.5"
6823
6825
  }
6824
- }, Ms = ({ label: t, active: a = !1, size: s = "md", className: o = "" }) => {
6826
+ }, Ls = ({ label: t, active: a = !1, size: s = "md", className: o = "" }) => {
6825
6827
  const l = "inline-flex items-center justify-center whitespace-nowrap rounded-full border transition-colors duration-150 shadow-[0_0.5px_0_rgba(0,0,0,0.04)]", m = {
6826
6828
  sm: "h-8 px-3 text-[11px] font-semibold",
6827
6829
  md: "h-9 px-3.5 text-[13px] font-semibold",
@@ -6844,25 +6846,25 @@ function js({
6844
6846
  zoom: y = 12,
6845
6847
  mapUrl: r,
6846
6848
  // optional full embed URL override
6847
- ...x
6849
+ ...v
6848
6850
  }) {
6849
- const d = ce(t), p = de[d], S = Ls[d], T = r || Bs(f, y);
6851
+ const d = ce(t), p = de[d], z = Ms[d], $ = r || Bs(f, y);
6850
6852
  return /* @__PURE__ */ e(
6851
6853
  ie,
6852
6854
  {
6853
- className: `flex flex-col ${p.card} ${S.wrap}`,
6855
+ className: `flex flex-col ${p.card} ${z.wrap}`,
6854
6856
  showCheckbox: a,
6855
6857
  checkboxPosition: s,
6856
6858
  onSelect: o,
6857
6859
  identity: l,
6858
6860
  details: { type: "campus-map", title: m, campusName: i, activeFilter: g, mapQuery: f, zoom: y },
6859
- ...x,
6860
- children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${S.mapH}`, children: [
6861
+ ...v,
6862
+ children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${z.mapH}`, children: [
6861
6863
  /* @__PURE__ */ e(
6862
6864
  "iframe",
6863
6865
  {
6864
6866
  title: "Google Map",
6865
- src: T,
6867
+ src: $,
6866
6868
  className: "h-full w-full",
6867
6869
  style: { border: 0 },
6868
6870
  loading: "lazy",
@@ -6871,7 +6873,7 @@ function js({
6871
6873
  }
6872
6874
  ),
6873
6875
  /* @__PURE__ */ n("div", { className: "absolute left-4 right-4 top-3 flex items-center justify-between pointer-events-none", children: [
6874
- /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 ${S.campusPill}`, children: [
6876
+ /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 ${z.campusPill}`, children: [
6875
6877
  /* @__PURE__ */ e("span", { className: "truncate max-w-[60vw]", children: i }),
6876
6878
  /* @__PURE__ */ e("span", { className: "ml-2 text-zinc-400", children: "▾" })
6877
6879
  ] }),
@@ -6880,8 +6882,8 @@ function js({
6880
6882
  /* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-full bg-white/90 border border-zinc-300 flex items-center justify-center", children: "›" })
6881
6883
  ] })
6882
6884
  ] }),
6883
- /* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-14 md:top-12 pointer-events-none mt-2", children: /* @__PURE__ */ e("div", { className: `flex ${S.chipGap} overflow-x-auto scrollbar-none`, children: u.map((R) => /* @__PURE__ */ e(Ms, { label: R, active: R === g, size: d }, R)) }) }),
6884
- /* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-28 md:top-24 pointer-events-none", children: /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 px-4 ${S.searchH}`, children: [
6885
+ /* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-14 md:top-12 pointer-events-none mt-2", children: /* @__PURE__ */ e("div", { className: `flex ${z.chipGap} overflow-x-auto scrollbar-none`, children: u.map((R) => /* @__PURE__ */ e(Ls, { label: R, active: R === g, size: d }, R)) }) }),
6886
+ /* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-28 md:top-24 pointer-events-none", children: /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 px-4 ${z.searchH}`, children: [
6885
6887
  /* @__PURE__ */ e("svg", { width: "18", height: "18", viewBox: "0 0 24 24", "aria-hidden": "true", className: "opacity-60", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M15.5 14h-.79l-.28-.27a6.471 6.471 0 001.48-4.23C15.91 6.01 13.4 3.5 10.45 3.5S5 6.01 5 9.5 7.5 15.5 10.45 15.5c1.61 0 3.09-.59 4.23-1.48l.27.28v.79l4.25 4.25c.41.41 1.07.41 1.48 0s.41-1.07 0-1.48L15.5 14Zm-5.05 0C8.01 14 6 11.99 6 9.5S8.01 5 10.45 5s4.45 2.01 4.45 4.5-2.01 4.5-4.45 4.5Z" }) }),
6886
6888
  /* @__PURE__ */ e("span", { className: "ml-2 text-zinc-500 dark:text-zinc-400", children: "Search places" })
6887
6889
  ] }) })
@@ -7052,13 +7054,13 @@ function qs({
7052
7054
  selectedIndex: u = 0,
7053
7055
  ...g
7054
7056
  }) {
7055
- const [f, y] = j(u), r = ce(t), x = de[r], d = _s[r], p = i[f] || i[0], S = (R, O) => {
7057
+ const [f, y] = j(u), r = ce(t), v = de[r], d = _s[r], p = i[f] || i[0], z = (R, O) => {
7056
7058
  y(O), o?.(R);
7057
- }, T = r === "lg";
7059
+ }, $ = r === "lg";
7058
7060
  return /* @__PURE__ */ n(
7059
7061
  ie,
7060
7062
  {
7061
- className: `flex flex-col ${x.card} ${d.wrap}`,
7063
+ className: `flex flex-col ${v.card} ${d.wrap}`,
7062
7064
  showCheckbox: a,
7063
7065
  checkboxPosition: s,
7064
7066
  onSelect: o,
@@ -7067,10 +7069,10 @@ function qs({
7067
7069
  ...g,
7068
7070
  children: [
7069
7071
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between mb-4", children: [
7070
- /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${x.title}`, children: m }),
7072
+ /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${v.title}`, children: m }),
7071
7073
  /* @__PURE__ */ e("button", { className: "text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 text-sm font-medium transition-colors duration-200", children: "View All" })
7072
7074
  ] }),
7073
- T ? (
7075
+ $ ? (
7074
7076
  // Large: Two-column layout
7075
7077
  /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
7076
7078
  /* @__PURE__ */ e("div", { className: "space-y-1", children: i.map((R, O) => /* @__PURE__ */ e(
@@ -7079,7 +7081,7 @@ function qs({
7079
7081
  ev: R,
7080
7082
  sizeMeta: d,
7081
7083
  isSelected: O === f,
7082
- onClick: (L) => S(L, O)
7084
+ onClick: (P) => z(P, O)
7083
7085
  },
7084
7086
  R._id || R.id || O
7085
7087
  )) }),
@@ -7093,12 +7095,12 @@ function qs({
7093
7095
  ev: R,
7094
7096
  sizeMeta: d,
7095
7097
  isSelected: O === f,
7096
- onClick: (L) => S(L, O)
7098
+ onClick: (P) => z(P, O)
7097
7099
  },
7098
7100
  R._id || R.id || O
7099
7101
  )) })
7100
7102
  ),
7101
- !T && /* @__PURE__ */ e("div", { className: "mt-4 pt-3 border-t border-zinc-200 dark:border-zinc-800", children: /* @__PURE__ */ e("button", { className: "w-full text-center text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 text-sm font-medium transition-colors duration-200", children: "View All" }) })
7103
+ !$ && /* @__PURE__ */ e("div", { className: "mt-4 pt-3 border-t border-zinc-200 dark:border-zinc-800", children: /* @__PURE__ */ e("button", { className: "w-full text-center text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 text-sm font-medium transition-colors duration-200", children: "View All" }) })
7102
7104
  ]
7103
7105
  }
7104
7106
  );
@@ -7269,19 +7271,19 @@ function Xs({
7269
7271
  onPin: f,
7270
7272
  ...y
7271
7273
  }) {
7272
- const [r, x] = j(u), d = ce(t), p = de[d], S = Ws[d], T = (L, _) => {
7273
- x(_), o?.(L);
7274
- }, R = (L) => {
7275
- const _ = { ...L, starred: !L.starred };
7274
+ const [r, v] = j(u), d = ce(t), p = de[d], z = Ws[d], $ = (P, _) => {
7275
+ v(_), o?.(P);
7276
+ }, R = (P) => {
7277
+ const _ = { ...P, starred: !P.starred };
7276
7278
  g?.(_);
7277
- }, O = (L) => {
7278
- const _ = { ...L, pinned: !L.pinned };
7279
+ }, O = (P) => {
7280
+ const _ = { ...P, pinned: !P.pinned };
7279
7281
  f?.(_);
7280
7282
  };
7281
7283
  return /* @__PURE__ */ n(
7282
7284
  ie,
7283
7285
  {
7284
- className: `flex flex-col ${p.card} ${S.wrap}`,
7286
+ className: `flex flex-col ${p.card} ${z.wrap}`,
7285
7287
  showCheckbox: a,
7286
7288
  checkboxPosition: s,
7287
7289
  onSelect: o,
@@ -7291,17 +7293,17 @@ function Xs({
7291
7293
  children: [
7292
7294
  /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${p.title}`, children: m }) }),
7293
7295
  /* @__PURE__ */ e(he, { placeholder: "Type to search..." }),
7294
- /* @__PURE__ */ e("div", { className: "space-y-0", children: i.map((L, _) => /* @__PURE__ */ e(
7296
+ /* @__PURE__ */ e("div", { className: "space-y-0", children: i.map((P, _) => /* @__PURE__ */ e(
7295
7297
  Js,
7296
7298
  {
7297
- email: L,
7298
- sizeMeta: S,
7299
+ email: P,
7300
+ sizeMeta: z,
7299
7301
  isSelected: _ === r,
7300
- onClick: (U) => T(U, _),
7302
+ onClick: (U) => $(U, _),
7301
7303
  onStar: R,
7302
7304
  onPin: O
7303
7305
  },
7304
- L._id || L.id || _
7306
+ P._id || P.id || _
7305
7307
  )) }),
7306
7308
  /* @__PURE__ */ e("div", { className: "mt-4 pt-3 border-t border-zinc-200 dark:border-zinc-800", children: /* @__PURE__ */ e("button", { className: "w-full text-center text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 text-sm font-medium transition-colors duration-200", children: "View All" }) })
7307
7309
  ]
@@ -7521,13 +7523,13 @@ function el({
7521
7523
  selectedIndex: u = 0,
7522
7524
  ...g
7523
7525
  }) {
7524
- const [f, y] = j(u), r = ce(t), x = de[r], d = Hs[r], p = (R, O) => {
7526
+ const [f, y] = j(u), r = ce(t), v = de[r], d = Hs[r], p = (R, O) => {
7525
7527
  y(O), o?.(R);
7526
- }, S = i[f] || i[0], T = d.layout === "split";
7528
+ }, z = i[f] || i[0], $ = d.layout === "split";
7527
7529
  return /* @__PURE__ */ n(
7528
7530
  ie,
7529
7531
  {
7530
- className: `flex flex-col ${x.card} ${d.wrap}`,
7532
+ className: `flex flex-col ${v.card} ${d.wrap}`,
7531
7533
  showCheckbox: a,
7532
7534
  checkboxPosition: s,
7533
7535
  onSelect: o,
@@ -7535,23 +7537,23 @@ function el({
7535
7537
  details: { type: "directory", title: m, count: i?.length ?? 0 },
7536
7538
  ...g,
7537
7539
  children: [
7538
- /* @__PURE__ */ e("div", { className: "flex items-center justify-between mb-4", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${x.title}`, children: m }) }),
7540
+ /* @__PURE__ */ e("div", { className: "flex items-center justify-between mb-4", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${v.title}`, children: m }) }),
7539
7541
  /* @__PURE__ */ e(Ks, { sizeMeta: d }),
7540
- T ? /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6 min-h-0", children: [
7542
+ $ ? /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6 min-h-0", children: [
7541
7543
  /* @__PURE__ */ e("div", { className: "space-y-3", children: i.map((R, O) => /* @__PURE__ */ e(
7542
7544
  _t,
7543
7545
  {
7544
7546
  contact: R,
7545
7547
  sizeMeta: d,
7546
7548
  isSelected: O === f,
7547
- onClick: (L) => p(L, O)
7549
+ onClick: (P) => p(P, O)
7548
7550
  },
7549
7551
  R._id || R.id || O
7550
7552
  )) }),
7551
7553
  /* @__PURE__ */ e(
7552
7554
  Zs,
7553
7555
  {
7554
- contact: S,
7556
+ contact: z,
7555
7557
  sizeMeta: d
7556
7558
  }
7557
7559
  )
@@ -7563,7 +7565,7 @@ function el({
7563
7565
  contact: R,
7564
7566
  sizeMeta: d,
7565
7567
  isSelected: O === f,
7566
- onClick: (L) => p(L, O)
7568
+ onClick: (P) => p(P, O)
7567
7569
  },
7568
7570
  R._id || R.id || O
7569
7571
  )) })
@@ -7673,7 +7675,7 @@ function rl({
7673
7675
  ],
7674
7676
  ...r
7675
7677
  }) {
7676
- const x = ce(t), d = de[x], p = al[x];
7678
+ const v = ce(t), d = de[v], p = al[v];
7677
7679
  return /* @__PURE__ */ n(
7678
7680
  ie,
7679
7681
  {
@@ -7718,16 +7720,16 @@ function rl({
7718
7720
  /* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: De(f) })
7719
7721
  ] })
7720
7722
  ] }),
7721
- /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: y.slice(0, 2).map((S, T) => /* @__PURE__ */ e(
7723
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: y.slice(0, 2).map((z, $) => /* @__PURE__ */ e(
7722
7724
  tl,
7723
7725
  {
7724
- side: T === 0 ? "left" : "right",
7725
- date: S.date,
7726
- title: S.title,
7727
- amount: S.amount,
7728
- kind: S.kind
7726
+ side: $ === 0 ? "left" : "right",
7727
+ date: z.date,
7728
+ title: z.title,
7729
+ amount: z.amount,
7730
+ kind: z.kind
7729
7731
  },
7730
- S.id || T
7732
+ z.id || $
7731
7733
  )) })
7732
7734
  ] })
7733
7735
  ] }),
@@ -7846,7 +7848,7 @@ function sl({
7846
7848
  term: i = "Fall 2025",
7847
7849
  ...u
7848
7850
  }) {
7849
- const [g, f] = j("vacation"), [y, r] = j(!1), x = ce(t), d = de[x], p = nl[x], S = qe.find((T) => T.id === g) || qe[0];
7851
+ const [g, f] = j("vacation"), [y, r] = j(!1), v = ce(t), d = de[v], p = nl[v], z = qe.find(($) => $.id === g) || qe[0];
7850
7852
  return /* @__PURE__ */ n(
7851
7853
  ie,
7852
7854
  {
@@ -7882,28 +7884,28 @@ function sl({
7882
7884
  ] })
7883
7885
  ] })
7884
7886
  ] }),
7885
- p.showTabs && /* @__PURE__ */ e("div", { className: "flex border-b border-zinc-200 dark:border-zinc-800", children: qe.map((T) => /* @__PURE__ */ e(
7887
+ p.showTabs && /* @__PURE__ */ e("div", { className: "flex border-b border-zinc-200 dark:border-zinc-800", children: qe.map(($) => /* @__PURE__ */ e(
7886
7888
  "button",
7887
7889
  {
7888
- className: `flex-1 py-2 px-4 text-center ${p.tab} font-medium border-b-2 transition-colors duration-200 ${g === T.id ? "border-blue-500 text-blue-600 dark:text-blue-400" : "border-transparent text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100"}`,
7889
- onClick: () => f(T.id),
7890
- children: T.name.split(" ")[0]
7890
+ className: `flex-1 py-2 px-4 text-center ${p.tab} font-medium border-b-2 transition-colors duration-200 ${g === $.id ? "border-blue-500 text-blue-600 dark:text-blue-400" : "border-transparent text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100"}`,
7891
+ onClick: () => f($.id),
7892
+ children: $.name.split(" ")[0]
7891
7893
  },
7892
- T.id
7894
+ $.id
7893
7895
  )) }),
7894
7896
  /* @__PURE__ */ e("div", { className: "space-y-4 mb-6", children: p.showAllLeave ? (
7895
7897
  // LG: Show all leave types
7896
- qe.map((T) => /* @__PURE__ */ e(Ut, { leave: T, sizeMeta: p }, T.id))
7898
+ qe.map(($) => /* @__PURE__ */ e(Ut, { leave: $, sizeMeta: p }, $.id))
7897
7899
  ) : p.showSingleLeave ? (
7898
7900
  // MD: Show active tab leave type
7899
- /* @__PURE__ */ e(Ut, { leave: S, sizeMeta: p })
7901
+ /* @__PURE__ */ e(Ut, { leave: z, sizeMeta: p })
7900
7902
  ) : (
7901
7903
  // SM: Show only available hours
7902
7904
  /* @__PURE__ */ e("div", { className: "bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800 p-4", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-3 mb-3", children: [
7903
7905
  /* @__PURE__ */ e(Ae, { className: "h-5 w-5 text-blue-600 dark:text-blue-400" }),
7904
7906
  /* @__PURE__ */ n("div", { children: [
7905
7907
  /* @__PURE__ */ e("div", { className: `font-medium text-zinc-900 dark:text-zinc-100 ${p.table}`, children: "Available Leave" }),
7906
- /* @__PURE__ */ e("div", { className: `text-zinc-600 dark:text-zinc-400 ${p.table}`, children: S.available })
7908
+ /* @__PURE__ */ e("div", { className: `text-zinc-600 dark:text-zinc-400 ${p.table}`, children: z.available })
7907
7909
  ] })
7908
7910
  ] }) })
7909
7911
  ) }),
@@ -7927,7 +7929,7 @@ const ll = [
7927
7929
  name: "Admin Files",
7928
7930
  type: "folder",
7929
7931
  count: "200 files",
7930
- icon: Le,
7932
+ icon: Me,
7931
7933
  color: "text-blue-500"
7932
7934
  },
7933
7935
  {
@@ -7960,7 +7962,7 @@ const ll = [
7960
7962
  name: "2024 - Taurus",
7961
7963
  type: "folder",
7962
7964
  date: "March 06, 2025",
7963
- icon: Le,
7965
+ icon: Me,
7964
7966
  color: "text-blue-500"
7965
7967
  },
7966
7968
  {
@@ -7976,7 +7978,7 @@ const ll = [
7976
7978
  name: "Championship 2",
7977
7979
  type: "folder",
7978
7980
  date: "March 06, 2025",
7979
- icon: Le,
7981
+ icon: Me,
7980
7982
  color: "text-blue-500"
7981
7983
  },
7982
7984
  {
@@ -8037,11 +8039,11 @@ function cl({
8037
8039
  subtitle: i = "Drive Shared",
8038
8040
  ...u
8039
8041
  }) {
8040
- const [g, f] = j(!1), y = ce(t), r = de[y], x = il[y];
8042
+ const [g, f] = j(!1), y = ce(t), r = de[y], v = il[y];
8041
8043
  return /* @__PURE__ */ n(
8042
8044
  ie,
8043
8045
  {
8044
- className: `flex flex-col ${r.card} ${x.wrap}`,
8046
+ className: `flex flex-col ${r.card} ${v.wrap}`,
8045
8047
  showCheckbox: a,
8046
8048
  checkboxPosition: s,
8047
8049
  onSelect: o,
@@ -8051,7 +8053,7 @@ function cl({
8051
8053
  children: [
8052
8054
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
8053
8055
  /* @__PURE__ */ n("div", { children: [
8054
- /* @__PURE__ */ e("h3", { className: `text-zinc-900 dark:text-zinc-100 ${x.title} mb-1`, children: m }),
8056
+ /* @__PURE__ */ e("h3", { className: `text-zinc-900 dark:text-zinc-100 ${v.title} mb-1`, children: m }),
8055
8057
  /* @__PURE__ */ e("div", { className: "text-zinc-600 dark:text-zinc-400 text-sm", children: i })
8056
8058
  ] }),
8057
8059
  /* @__PURE__ */ n("div", { className: "relative", children: [
@@ -8075,21 +8077,21 @@ function cl({
8075
8077
  ] })
8076
8078
  ] })
8077
8079
  ] }),
8078
- /* @__PURE__ */ e("div", { className: `grid ${x.gridCols} gap-3 `, children: ll.map((d) => /* @__PURE__ */ e(
8080
+ /* @__PURE__ */ e("div", { className: `grid ${v.gridCols} gap-3 `, children: ll.map((d) => /* @__PURE__ */ e(
8079
8081
  Gt,
8080
8082
  {
8081
8083
  item: d,
8082
- sizeMeta: x
8084
+ sizeMeta: v
8083
8085
  },
8084
8086
  d.id
8085
8087
  )) }),
8086
- x.showRecent && /* @__PURE__ */ n("div", { className: "", children: [
8087
- /* @__PURE__ */ e("h4", { className: `font-semibold text-zinc-900 dark:text-zinc-100 mb-3 ${x.item}`, children: "Recent Files" }),
8088
+ v.showRecent && /* @__PURE__ */ n("div", { className: "", children: [
8089
+ /* @__PURE__ */ e("h4", { className: `font-semibold text-zinc-900 dark:text-zinc-100 mb-3 ${v.item}`, children: "Recent Files" }),
8088
8090
  /* @__PURE__ */ e("div", { className: "space-y-2", children: ol.map((d) => /* @__PURE__ */ e(
8089
8091
  Gt,
8090
8092
  {
8091
8093
  item: d,
8092
- sizeMeta: x,
8094
+ sizeMeta: v,
8093
8095
  showDate: !0
8094
8096
  },
8095
8097
  d.id
@@ -8283,13 +8285,13 @@ function gl({
8283
8285
  showBanner: u = !0,
8284
8286
  ...g
8285
8287
  }) {
8286
- const [f, y] = j(i), r = ce(t), x = de[r], d = ml[r], p = (R) => {
8287
- y((O) => O.filter((L) => L.id !== R.id));
8288
- }, S = f.find((R) => R.type === "banner"), T = f.filter((R) => R.type !== "banner");
8288
+ const [f, y] = j(i), r = ce(t), v = de[r], d = ml[r], p = (R) => {
8289
+ y((O) => O.filter((P) => P.id !== R.id));
8290
+ }, z = f.find((R) => R.type === "banner"), $ = f.filter((R) => R.type !== "banner");
8289
8291
  return /* @__PURE__ */ n(
8290
8292
  ie,
8291
8293
  {
8292
- className: `flex flex-col ${x.card} ${d.wrap}`,
8294
+ className: `flex flex-col ${v.card} ${d.wrap}`,
8293
8295
  showCheckbox: a,
8294
8296
  checkboxPosition: s,
8295
8297
  onSelect: o,
@@ -8297,15 +8299,15 @@ function gl({
8297
8299
  details: { type: "alerts", title: m, count: f.length },
8298
8300
  ...g,
8299
8301
  children: [
8300
- /* @__PURE__ */ e("div", { className: "flex items-center justify-between ", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${x.title}`, children: m }) }),
8301
- u && S && t !== "sm" && /* @__PURE__ */ e(
8302
+ /* @__PURE__ */ e("div", { className: "flex items-center justify-between ", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${v.title}`, children: m }) }),
8303
+ u && z && t !== "sm" && /* @__PURE__ */ e(
8302
8304
  pl,
8303
8305
  {
8304
- alert: S,
8306
+ alert: z,
8305
8307
  onDismiss: p
8306
8308
  }
8307
8309
  ),
8308
- /* @__PURE__ */ e("div", { className: "space-y-0.5", children: T.slice(0, 3).map((R) => /* @__PURE__ */ e(
8310
+ /* @__PURE__ */ e("div", { className: "space-y-0.5", children: $.slice(0, 3).map((R) => /* @__PURE__ */ e(
8309
8311
  hl,
8310
8312
  {
8311
8313
  alert: R,
@@ -8459,11 +8461,11 @@ function xl({
8459
8461
  videos: i = bl,
8460
8462
  ...u
8461
8463
  }) {
8462
- const [g, f] = j(!1), y = ce(t), r = de[y], x = fl[y];
8464
+ const [g, f] = j(!1), y = ce(t), r = de[y], v = fl[y];
8463
8465
  return /* @__PURE__ */ n(
8464
8466
  ie,
8465
8467
  {
8466
- className: `flex flex-col ${r.card} ${x.wrap}`,
8468
+ className: `flex flex-col ${r.card} ${v.wrap}`,
8467
8469
  showCheckbox: a,
8468
8470
  checkboxPosition: s,
8469
8471
  onSelect: o,
@@ -8493,11 +8495,11 @@ function xl({
8493
8495
  ] })
8494
8496
  ] })
8495
8497
  ] }),
8496
- /* @__PURE__ */ e("div", { className: `grid ${x.gridCols} gap-4 `, children: i.slice(0, x.gridCols === "grid-cols-3" ? 6 : 4).map((d) => /* @__PURE__ */ e(
8498
+ /* @__PURE__ */ e("div", { className: `grid ${v.gridCols} gap-4 `, children: i.slice(0, v.gridCols === "grid-cols-3" ? 6 : 4).map((d) => /* @__PURE__ */ e(
8497
8499
  yl,
8498
8500
  {
8499
8501
  video: d,
8500
- sizeMeta: x
8502
+ sizeMeta: v
8501
8503
  },
8502
8504
  d.id
8503
8505
  )) }),
@@ -8575,11 +8577,11 @@ export {
8575
8577
  ba as Textarea,
8576
8578
  Zl as ToastProvider,
8577
8579
  fa as ToggleSwitch,
8578
- Ll as Tooltip,
8580
+ Ml as Tooltip,
8579
8581
  Jl as TreeView,
8580
8582
  ee as UnifyedCoreButton,
8581
8583
  xl as VideosMock,
8582
- Ml as WizardModal,
8584
+ Ll as WizardModal,
8583
8585
  wa as adGroupsListSearchApi,
8584
8586
  Gl as axiosDelete,
8585
8587
  je as axiosGet,