unifyedx-storybook-new 0.2.28 → 0.2.30

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,7 +1,7 @@
1
1
  import { jsxs as n, jsx as e, Fragment as te } from "react/jsx-runtime";
2
- import se, { useState as M, useMemo as ue, useId as Qe, Fragment as Q, useEffect as Z, useCallback as ne, useRef as xe } from "react";
3
- import { a as H, U as mt, X as ge, P as c, L as Ua, C as ve, b as tt, f as Ze, d as yt, D as Yt, F as qa, e as Ga, h as Ya, T as Ke, u as Wa, i as zt, I as Wt, j as Jt, k as Ja, l as Xa, m as Ha, n as Xt, S as vt, o as Ht, M as Qa, p as Za, q as wt, r as Ka, A as er, E as Qt, s as tr, t as ar, v as rr, w as nr, x as Zt, y as sr, z as Kt, B as ea, G as lr, H as ir, J as or, K as et, N as ut, O as ht, Q as cr, R as dr, V as ta, W as mr, Y as Nt, Z as ur, _ as hr, $ as Me, a0 as pr, a1 as gr, a2 as br, a3 as fr, a4 as xr, a5 as yr, a6 as St, a7 as vr, a8 as wr, a9 as Nr, aa as kr, ab as Cr, ac as zr, ad as Sr, ae as Dr, af as $r, ag as Fe, ah as aa, ai as Tr, aj as Ar, ak as Fr, al as Er, am as Rr, an as ra, ao as Ir, ap as Or, aq as na, ar as Pr, as as pt, at as sa, au as Lr } from "./vendor-wRQnjUYv.js";
4
- import { Popover as Mr, PopoverButton as Br, PopoverPanel as jr, Transition as he, Dialog as ye, TransitionChild as Ne, DialogPanel as Ee, DialogTitle as at, TabGroup as Vr, TabList as _r, Tab as re, TabPanels as Ur, RadioGroup as qe, Listbox as K, ListboxButton as qr, ListboxOptions as Gr, ListboxOption as Yr, SwitchGroup as Wr, Switch as ot, Menu as Jr, MenuButton as Xr, Portal as Hr, MenuItems as Qr, MenuItem as Zr, DialogBackdrop as Kr } from "@headlessui/react";
2
+ import se, { useState as M, useMemo as ue, useId as Qe, Fragment as Q, useEffect as Z, useCallback as ae, useRef as xe } from "react";
3
+ import { a as H, U as mt, X as ge, P as c, L as Ua, C as ve, b as tt, f as Ze, d as yt, D as Yt, F as qa, e as Ga, h as Ya, T as Ke, u as Wa, i as zt, I as Wt, j as Jt, k as Ja, l as Xa, m as Ha, n as Xt, S as vt, o as Ht, M as Qa, p as Za, q as wt, r as Ka, A as er, E as Qt, s as tr, t as ar, v as rr, w as nr, x as Zt, y as sr, z as Kt, B as ea, G as lr, H as ir, J as or, K as et, N as ut, O as ht, Q as cr, R as dr, V as ta, W as mr, Y as Nt, Z as ur, _ as hr, $ as Me, a0 as pr, a1 as gr, a2 as br, a3 as fr, a4 as xr, a5 as yr, a6 as St, a7 as vr, a8 as wr, a9 as Nr, aa as kr, ab as Cr, ac as zr, ad as Sr, ae as Dr, af as $r, ag as Fe, ah as aa, ai as Tr, aj as Ar, ak as Fr, al as Er, am as Rr, an as ra, ao as Ir, ap as Pr, aq as na, ar as Or, as as pt, at as sa, au as Lr } from "./vendor-wRQnjUYv.js";
4
+ import { Popover as Mr, PopoverButton as Br, PopoverPanel as jr, Transition as he, Dialog as ye, TransitionChild as Ne, DialogPanel as Ee, DialogTitle as at, TabGroup as Vr, TabList as _r, Tab as ne, TabPanels as Ur, RadioGroup as qe, Listbox as K, ListboxButton as qr, ListboxOptions as Gr, ListboxOption as Yr, SwitchGroup as Wr, Switch as ot, Menu as Jr, MenuButton as Xr, Portal as Hr, MenuItems as Qr, MenuItem as Zr, DialogBackdrop as Kr } from "@headlessui/react";
5
5
  import { motion as le, AnimatePresence as Ce } from "framer-motion";
6
6
  import { d as en } from "./vendor-lodash-C6Pmit-j.js";
7
7
  import { useFloating as la, offset as ia, flip as oa, shift as ca, autoUpdate as da, useClick as tn, useDismiss as an, useInteractions as rn, FloatingPortal as nn } from "@floating-ui/react";
@@ -15,8 +15,8 @@ const kn = (t) => {
15
15
  a ^= t.charCodeAt(s), a += (a << 1) + (a << 4) + (a << 7) + (a << 8) + (a << 24);
16
16
  return a >>> 0;
17
17
  }, Cn = (t) => {
18
- const a = (t ?? "").trim().toLowerCase(), s = parseInt((a.match(/\d+$/) ?? [0])[0], 10) || 0, i = kn(a), l = (i % 360 + 37 * s) % 360, m = 55 + (i >>> 8) % 20, o = 30 + (i >>> 16) % 10, u = 86 + (i >>> 24) % 8, p = `hsl(${l}, ${m}%, ${u}%)`, g = `hsl(${l}, ${m}%, ${o}%)`;
19
- return { bg: p, text: g };
18
+ const a = (t ?? "").trim().toLowerCase(), s = parseInt((a.match(/\d+$/) ?? [0])[0], 10) || 0, i = kn(a), l = (i % 360 + 37 * s) % 360, m = 55 + (i >>> 8) % 20, o = 30 + (i >>> 16) % 10, u = 86 + (i >>> 24) % 8, p = `hsl(${l}, ${m}%, ${u}%)`, b = `hsl(${l}, ${m}%, ${o}%)`;
19
+ return { bg: p, text: b };
20
20
  }, zn = (t = "") => t.split(" ").map((a) => a[0]).slice(0, 2).join("").toUpperCase(), ze = ({
21
21
  src: t,
22
22
  name: a,
@@ -29,16 +29,16 @@ const kn = (t) => {
29
29
  className: m,
30
30
  ...o
31
31
  }) => {
32
- const [u, p] = M(!1), g = ue(() => Cn(a), []), b = t && !u, r = !b && a, y = !b && !a, d = H(
32
+ const [u, p] = M(!1), b = ue(() => Cn(a), []), f = t && !u, r = !f && a, y = !f && !a, d = H(
33
33
  "avatar-container",
34
34
  `avatar--size-${s}`,
35
35
  m
36
- ), h = b ? "transparent" : i || g.bg, $ = l || g.text;
36
+ ), h = f ? "transparent" : i || b.bg, $ = l || b.text;
37
37
  return /* @__PURE__ */ n("div", { className: d, style: {
38
38
  backgroundColor: h,
39
39
  color: $
40
40
  }, ...o, children: [
41
- b && /* @__PURE__ */ e(
41
+ f && /* @__PURE__ */ e(
42
42
  "img",
43
43
  {
44
44
  src: t,
@@ -74,14 +74,14 @@ const kn = (t) => {
74
74
  className: u,
75
75
  ...p
76
76
  }) => {
77
- const g = H(
77
+ const b = H(
78
78
  "badge",
79
79
  `badge--variant-${a}`,
80
80
  `badge--size-${s}`,
81
81
  { "badge--with-remove": !!l },
82
82
  u
83
83
  );
84
- return /* @__PURE__ */ n("span", { className: g, style: m && o ? {
84
+ return /* @__PURE__ */ n("span", { className: b, style: m && o ? {
85
85
  backgroundColor: m,
86
86
  color: o,
87
87
  borderColor: "#ff0000"
@@ -149,16 +149,16 @@ const $n = {
149
149
  icon: u,
150
150
  // Renamed for clarity, expecting a component type e.g., CheckCircle
151
151
  disabled: p = !1,
152
- size: g = "medium",
153
- label: b,
152
+ size: b = "medium",
153
+ label: f,
154
154
  children: r,
155
155
  // ✅ Add children to the props list
156
156
  onClick: y,
157
157
  ...d
158
158
  }) => {
159
- const h = p || m, $ = u && !b, T = H(
159
+ const h = p || m, $ = u && !f, T = H(
160
160
  "btn-base",
161
- $n[g],
161
+ $n[b],
162
162
  Tn[o],
163
163
  {
164
164
  "is-loading": m,
@@ -174,12 +174,12 @@ const $n = {
174
174
  className: T,
175
175
  disabled: h,
176
176
  onClick: y,
177
- title: a || $ && i || (typeof b == "string" ? b : void 0),
178
- "aria-label": i || $ && a || (typeof b == "string" ? b : void 0),
177
+ title: a || $ && i || (typeof f == "string" ? f : void 0),
178
+ "aria-label": i || $ && a || (typeof f == "string" ? f : void 0),
179
179
  ...d,
180
180
  children: m ? /* @__PURE__ */ e(Ua, { className: "loader-spin", "data-testid": "button-loader" }) : /* @__PURE__ */ n(te, { children: [
181
- u && /* @__PURE__ */ e(u, { size: g === "large" ? 20 : 16 }),
182
- b,
181
+ u && /* @__PURE__ */ e(u, { size: b === "large" ? 20 : 16 }),
182
+ f,
183
183
  r,
184
184
  " "
185
185
  ] })
@@ -218,13 +218,13 @@ const $n = {
218
218
  onChange: o,
219
219
  ...u
220
220
  }) => {
221
- const p = Qe(), g = a || p;
221
+ const p = Qe(), b = a || p;
222
222
  return /* @__PURE__ */ n("div", { className: `checkbox-container ${i || ""}`, children: [
223
- /* @__PURE__ */ n("label", { htmlFor: g, className: "checkbox-wrapper", children: [
223
+ /* @__PURE__ */ n("label", { htmlFor: b, className: "checkbox-wrapper", children: [
224
224
  /* @__PURE__ */ e(
225
225
  "input",
226
226
  {
227
- id: g,
227
+ id: b,
228
228
  type: "checkbox",
229
229
  ref: l,
230
230
  className: "checkbox-input",
@@ -259,8 +259,8 @@ const $n = {
259
259
  className: u,
260
260
  ...p
261
261
  }) => {
262
- const g = (b) => {
263
- b.stopPropagation(), b.preventDefault(), s?.();
262
+ const b = (f) => {
263
+ f.stopPropagation(), f.preventDefault(), s?.();
264
264
  };
265
265
  return /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", u), children: [
266
266
  l && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "datepicker-input", children: l }),
@@ -287,7 +287,7 @@ const $n = {
287
287
  "button",
288
288
  {
289
289
  type: "button",
290
- onClick: g,
290
+ onClick: b,
291
291
  className: "datepicker-clear-button",
292
292
  "aria-label": "Clear selected date",
293
293
  children: /* @__PURE__ */ e(ge, { size: 16 })
@@ -319,12 +319,12 @@ const $n = {
319
319
  className: u,
320
320
  ...p
321
321
  }) => {
322
- const g = t?.from, b = t?.to, r = (d) => {
322
+ const b = t?.from, f = t?.to, r = (d) => {
323
323
  d.stopPropagation(), d.preventDefault(), s?.();
324
- }, y = g && b ? /* @__PURE__ */ n(te, { children: [
325
- Ze(g, "MMM d, y"),
324
+ }, y = b && f ? /* @__PURE__ */ n(te, { children: [
325
+ Ze(b, "MMM d, y"),
326
326
  " - ",
327
- Ze(b, "MMM d, y")
327
+ Ze(f, "MMM d, y")
328
328
  ] }) : /* @__PURE__ */ e("span", { className: "datepicker-placeholder", children: i });
329
329
  return /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", u), children: [
330
330
  l && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "daterangepicker-input", children: l }),
@@ -340,14 +340,14 @@ const $n = {
340
340
  "datepicker-trigger--disabled": o
341
341
  }),
342
342
  disabled: o,
343
- "aria-label": g && b ? `Selected range is ${y}` : i,
343
+ "aria-label": b && f ? `Selected range is ${y}` : i,
344
344
  children: [
345
345
  /* @__PURE__ */ e(yt, { className: "datepicker-icon" }),
346
346
  /* @__PURE__ */ e("span", { className: "datepicker-value", children: y })
347
347
  ]
348
348
  }
349
349
  ),
350
- g && s && !o && /* @__PURE__ */ e(
350
+ b && s && !o && /* @__PURE__ */ e(
351
351
  "button",
352
352
  {
353
353
  type: "button",
@@ -627,8 +627,8 @@ const $n = {
627
627
  validFiles: o = [],
628
628
  rejectedFiles: u = [],
629
629
  handleRemoveValidFile: p,
630
- handleRemoveRejectedFile: g,
631
- handleSubmit: b,
630
+ handleRemoveRejectedFile: b,
631
+ handleSubmit: f,
632
632
  isSubmitting: r,
633
633
  formErrors: y,
634
634
  // --- UI Text ---
@@ -674,7 +674,7 @@ const $n = {
674
674
  onClick: (T) => T.stopPropagation(),
675
675
  children: [
676
676
  /* @__PURE__ */ e("input", { ...i() }),
677
- /* @__PURE__ */ n("form", { onSubmit: b, className: "form-wrapper", children: [
677
+ /* @__PURE__ */ n("form", { onSubmit: f, className: "form-wrapper", children: [
678
678
  /* @__PURE__ */ n("div", { className: "dialog-header", children: [
679
679
  /* @__PURE__ */ e(at, { as: "h3", className: "dialog-title-text", children: d }),
680
680
  /* @__PURE__ */ e(
@@ -714,7 +714,7 @@ const $n = {
714
714
  $ && /* @__PURE__ */ n("div", { className: "file-list-container", children: [
715
715
  /* @__PURE__ */ e("h3", { children: "Upload Queue" }),
716
716
  /* @__PURE__ */ n("ul", { className: "file-list", children: [
717
- o.map((T, F) => /* @__PURE__ */ n(
717
+ o.map((T, A) => /* @__PURE__ */ n(
718
718
  "li",
719
719
  {
720
720
  className: "file-item",
@@ -735,16 +735,16 @@ const $n = {
735
735
  "button",
736
736
  {
737
737
  type: "button",
738
- onClick: () => p(F),
738
+ onClick: () => p(A),
739
739
  className: "remove-file-button",
740
740
  children: /* @__PURE__ */ e(Ke, { size: 16 })
741
741
  }
742
742
  )
743
743
  ]
744
744
  },
745
- `${T.name}-${F}`
745
+ `${T.name}-${A}`
746
746
  )),
747
- u.map(({ file: T, message: F }, A) => /* @__PURE__ */ n(
747
+ u.map(({ file: T, message: A }, E) => /* @__PURE__ */ n(
748
748
  "li",
749
749
  {
750
750
  className: "file-item file-item--rejected",
@@ -759,21 +759,21 @@ const $n = {
759
759
  /* @__PURE__ */ n("div", { children: [
760
760
  /* @__PURE__ */ e("p", { className: "file-item-name", children: T.name }),
761
761
  /* @__PURE__ */ e("p", { className: "file-item-size", children: At(T.size) }),
762
- /* @__PURE__ */ e("p", { className: "rejection-reason", children: F })
762
+ /* @__PURE__ */ e("p", { className: "rejection-reason", children: A })
763
763
  ] })
764
764
  ] }),
765
765
  /* @__PURE__ */ e(
766
766
  "button",
767
767
  {
768
768
  type: "button",
769
- onClick: () => g(A),
769
+ onClick: () => b(E),
770
770
  className: "remove-file-button",
771
771
  children: /* @__PURE__ */ e(Ke, { size: 16 })
772
772
  }
773
773
  )
774
774
  ]
775
775
  },
776
- `${T.name}-${A}`
776
+ `${T.name}-${E}`
777
777
  ))
778
778
  ] })
779
779
  ] })
@@ -825,7 +825,7 @@ const $n = {
825
825
  }, Et = (t) => {
826
826
  const a = new Date(t);
827
827
  return je(new Date(a.getFullYear(), a.getMonth() + 1, 0));
828
- }, On = (t) => {
828
+ }, Pn = (t) => {
829
829
  const a = /* @__PURE__ */ new Date();
830
830
  switch (t) {
831
831
  case "anytime":
@@ -858,10 +858,10 @@ const $n = {
858
858
  fetchCreatedOrUpdatedByUsers: u = async () => []
859
859
  // Mockable fetcher
860
860
  }) => {
861
- const [p, g] = M({
861
+ const [p, b] = M({
862
862
  createdBy: [],
863
863
  updatedBy: []
864
- }), [b, r] = M({
864
+ }), [f, r] = M({
865
865
  createdBy: !1,
866
866
  updatedBy: !1
867
867
  }), [y, d] = M({
@@ -871,62 +871,62 @@ const $n = {
871
871
  }), T = Wa({
872
872
  initialValues: JSON.parse(JSON.stringify(m)),
873
873
  // Deep copy
874
- onSubmit: (z) => {
875
- const f = {};
876
- Object.keys(z).forEach((v) => {
877
- f[v] = {
878
- operator: z[v].operator || "in",
879
- values: Array.isArray(z[v].values) ? z[v].values : [],
880
- range: z[v].range || null
874
+ onSubmit: (k) => {
875
+ const g = {};
876
+ Object.keys(k).forEach((v) => {
877
+ g[v] = {
878
+ operator: k[v].operator || "in",
879
+ values: Array.isArray(k[v].values) ? k[v].values : [],
880
+ range: k[v].range || null
881
881
  };
882
- }), console.log("[storybook filter] Applied Filters:", f), typeof s == "function" && s({
883
- filters: f,
884
- activeCount: A
882
+ }), console.log("[storybook filter] Applied Filters:", g), typeof s == "function" && s({
883
+ filters: g,
884
+ activeCount: E
885
885
  }), a();
886
886
  },
887
887
  enableReinitialize: !0
888
- }), F = ue(() => l.reduce((z, f) => {
889
- const v = f.key, w = T.values[v];
890
- let C = !1;
888
+ }), A = ue(() => l.reduce((k, g) => {
889
+ const v = g.key, w = T.values[v];
890
+ let z = !1;
891
891
  if (w)
892
- switch (f.type) {
892
+ switch (g.type) {
893
893
  case "multiselect":
894
894
  case "multiselect-users":
895
- C = Array.isArray(w.values) && w.values.length > 0;
895
+ z = Array.isArray(w.values) && w.values.length > 0;
896
896
  break;
897
897
  case "date":
898
- (w.range && w.range !== "" || Array.isArray(w.values) && w.values.length > 0) && (C = !0);
898
+ (w.range && w.range !== "" || Array.isArray(w.values) && w.values.length > 0) && (z = !0);
899
899
  break;
900
900
  }
901
- return z[v] = C, z;
902
- }, {}), [l, T.values]), A = Object.values(F).filter(Boolean).length, I = ue(() => l.some((z) => {
903
- if (z.type !== "date") return !1;
904
- const f = T.values?.[z.key]?.values;
905
- if (!Array.isArray(f) || f.length < 2) return !1;
906
- const [v, w] = f;
901
+ return k[v] = z, k;
902
+ }, {}), [l, T.values]), E = Object.values(A).filter(Boolean).length, I = ue(() => l.some((k) => {
903
+ if (k.type !== "date") return !1;
904
+ const g = T.values?.[k.key]?.values;
905
+ if (!Array.isArray(g) || g.length < 2) return !1;
906
+ const [v, w] = g;
907
907
  if (!v || !w) return !1;
908
- const C = v instanceof Date ? v : new Date(v), N = w instanceof Date ? w : new Date(w);
909
- return C > N;
910
- }), [l, T.values]), V = async (z, f) => {
908
+ const z = v instanceof Date ? v : new Date(v), N = w instanceof Date ? w : new Date(w);
909
+ return z > N;
910
+ }), [l, T.values]), j = async (k, g) => {
911
911
  try {
912
- r((w) => ({ ...w, [z]: !0 }));
913
- const v = await u(z, f);
914
- g((w) => ({ ...w, [z]: v }));
912
+ r((w) => ({ ...w, [k]: !0 }));
913
+ const v = await u(k, g);
914
+ b((w) => ({ ...w, [k]: v }));
915
915
  } catch (v) {
916
- console.error(`Error fetching ${z} users:`, v);
916
+ console.error(`Error fetching ${k} users:`, v);
917
917
  } finally {
918
- r((v) => ({ ...v, [z]: !1 }));
918
+ r((v) => ({ ...v, [k]: !1 }));
919
919
  }
920
- }, U = (z) => {
921
- const f = l[z].key, v = l[z].url;
922
- l[z].type === "multiselect-users" && p[f].length === 0 && !b[f] && V(f, v);
920
+ }, _ = (k) => {
921
+ const g = l[k].key, v = l[k].url;
922
+ l[k].type === "multiselect-users" && p[g].length === 0 && !f[g] && j(g, v);
923
923
  }, G = () => {
924
- T.resetForm(), g({ createdBy: [], updatedBy: [] }), i();
925
- }, B = (z) => {
926
- const f = l.find((C) => C.key === z);
927
- if (!f) return null;
928
- const v = T.values[z] || m[z], w = Array.isArray(v.values) ? v.values : [];
929
- switch (f.type) {
924
+ T.resetForm(), b({ createdBy: [], updatedBy: [] }), i();
925
+ }, q = (k) => {
926
+ const g = l.find((z) => z.key === k);
927
+ if (!g) return null;
928
+ const v = T.values[k] || m[k], w = Array.isArray(v.values) ? v.values : [];
929
+ switch (g.type) {
930
930
  case "multiselect":
931
931
  return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
932
932
  /* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
@@ -935,9 +935,9 @@ const $n = {
935
935
  "select",
936
936
  {
937
937
  value: v.operator || "in",
938
- onChange: (R) => T.setFieldValue(`${z}.operator`, R.target.value),
938
+ onChange: (R) => T.setFieldValue(`${k}.operator`, R.target.value),
939
939
  className: "filter-select",
940
- children: f.operators.map((R) => /* @__PURE__ */ e("option", { value: R, children: R === "in" ? "Includes" : "Excludes" }, R))
940
+ children: g.operators.map((R) => /* @__PURE__ */ e("option", { value: R, children: R === "in" ? "Includes" : "Excludes" }, R))
941
941
  }
942
942
  )
943
943
  ] }),
@@ -947,42 +947,42 @@ const $n = {
947
947
  "input",
948
948
  {
949
949
  type: "checkbox",
950
- id: `select-all-${z}`,
950
+ id: `select-all-${k}`,
951
951
  className: "filter-checkbox-input",
952
- checked: f.options.length > 0 && w.length === f.options.length,
952
+ checked: g.options.length > 0 && w.length === g.options.length,
953
953
  onChange: (R) => {
954
- const Y = R.target.checked ? f.options.map((W) => W.value) : [];
955
- T.setFieldValue(`${z}.values`, Y);
954
+ const Y = R.target.checked ? g.options.map((W) => W.value) : [];
955
+ T.setFieldValue(`${k}.values`, Y);
956
956
  }
957
957
  }
958
958
  ),
959
959
  /* @__PURE__ */ e(
960
960
  "label",
961
961
  {
962
- htmlFor: `select-all-${z}`,
962
+ htmlFor: `select-all-${k}`,
963
963
  className: "filter-checkbox-label",
964
964
  children: "Select All"
965
965
  }
966
966
  )
967
967
  ] }),
968
- f.options.map((R) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item", children: [
968
+ g.options.map((R) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item", children: [
969
969
  /* @__PURE__ */ e(
970
970
  "input",
971
971
  {
972
972
  type: "checkbox",
973
- id: `${z}-${R.value}`,
973
+ id: `${k}-${R.value}`,
974
974
  className: "filter-checkbox-input",
975
975
  checked: w.includes(R.value),
976
976
  onChange: (Y) => {
977
977
  const W = Y.target.checked ? [...w, R.value] : w.filter((pe) => pe !== R.value);
978
- T.setFieldValue(`${z}.values`, W);
978
+ T.setFieldValue(`${k}.values`, W);
979
979
  }
980
980
  }
981
981
  ),
982
982
  /* @__PURE__ */ e(
983
983
  "label",
984
984
  {
985
- htmlFor: `${z}-${R.value}`,
985
+ htmlFor: `${k}-${R.value}`,
986
986
  className: "filter-checkbox-label",
987
987
  children: R.label
988
988
  }
@@ -991,7 +991,7 @@ const $n = {
991
991
  ] })
992
992
  ] });
993
993
  case "multiselect-users":
994
- const C = p[z] || [], N = b[z];
994
+ const z = p[k] || [], N = f[k];
995
995
  return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
996
996
  /* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
997
997
  /* @__PURE__ */ e("label", { className: "filter-label", children: "Operator:" }),
@@ -999,25 +999,25 @@ const $n = {
999
999
  "select",
1000
1000
  {
1001
1001
  value: v.operator || "in",
1002
- onChange: (R) => T.setFieldValue(`${z}.operator`, R.target.value),
1002
+ onChange: (R) => T.setFieldValue(`${k}.operator`, R.target.value),
1003
1003
  className: "filter-select",
1004
- children: f.operators.map((R) => /* @__PURE__ */ e("option", { value: R, children: R === "in" ? "Includes" : "Excludes" }, R))
1004
+ children: g.operators.map((R) => /* @__PURE__ */ e("option", { value: R, children: R === "in" ? "Includes" : "Excludes" }, R))
1005
1005
  }
1006
1006
  )
1007
1007
  ] }),
1008
- N ? /* @__PURE__ */ e("div", { className: "loading-spinner", children: /* @__PURE__ */ e("div", {}) }) : /* @__PURE__ */ e("div", { className: "filter-checkbox-list", children: C.length > 0 ? /* @__PURE__ */ n(te, { children: [
1008
+ N ? /* @__PURE__ */ e("div", { className: "loading-spinner", children: /* @__PURE__ */ e("div", {}) }) : /* @__PURE__ */ e("div", { className: "filter-checkbox-list", children: z.length > 0 ? /* @__PURE__ */ n(te, { children: [
1009
1009
  /* @__PURE__ */ n("div", { className: "filter-checkbox-item", children: [
1010
1010
  /* @__PURE__ */ e(
1011
1011
  "input",
1012
1012
  {
1013
1013
  type: "checkbox",
1014
- id: `select-all-users-${z}`,
1014
+ id: `select-all-users-${k}`,
1015
1015
  className: "filter-checkbox-input",
1016
- checked: C.length > 0 && w.length === C.length,
1016
+ checked: z.length > 0 && w.length === z.length,
1017
1017
  onChange: (R) => {
1018
- const Y = R.target.checked ? C.map((W) => W.email) : [];
1018
+ const Y = R.target.checked ? z.map((W) => W.email) : [];
1019
1019
  T.setFieldValue(
1020
- `${z}.values`,
1020
+ `${k}.values`,
1021
1021
  Y
1022
1022
  );
1023
1023
  }
@@ -1026,24 +1026,24 @@ const $n = {
1026
1026
  /* @__PURE__ */ e(
1027
1027
  "label",
1028
1028
  {
1029
- htmlFor: `select-all-users-${z}`,
1029
+ htmlFor: `select-all-users-${k}`,
1030
1030
  className: "filter-checkbox-label",
1031
1031
  children: "Select All Users"
1032
1032
  }
1033
1033
  )
1034
1034
  ] }),
1035
- C.map((R) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item createdby", children: [
1035
+ z.map((R) => /* @__PURE__ */ n("div", { className: "filter-checkbox-item createdby", children: [
1036
1036
  /* @__PURE__ */ e(
1037
1037
  "input",
1038
1038
  {
1039
1039
  type: "checkbox",
1040
- id: `${z}-${R.email}`,
1040
+ id: `${k}-${R.email}`,
1041
1041
  className: "filter-checkbox-input",
1042
1042
  checked: w.includes(R.email),
1043
1043
  onChange: (Y) => {
1044
1044
  const W = Y.target.checked ? [...w, R.email] : w.filter((pe) => pe !== R.email);
1045
1045
  T.setFieldValue(
1046
- `${z}.values`,
1046
+ `${k}.values`,
1047
1047
  W
1048
1048
  );
1049
1049
  }
@@ -1052,7 +1052,7 @@ const $n = {
1052
1052
  /* @__PURE__ */ n(
1053
1053
  "label",
1054
1054
  {
1055
- htmlFor: `${z}-${R.email}`,
1055
+ htmlFor: `${k}-${R.email}`,
1056
1056
  className: "filter-checkbox-label",
1057
1057
  children: [
1058
1058
  /* @__PURE__ */ e("span", { className: "user-label-name", children: R.name }),
@@ -1064,13 +1064,13 @@ const $n = {
1064
1064
  ] }) : /* @__PURE__ */ e("div", { className: "text-center py-4 text-gray-500 text-sm", children: "No users loaded." }) })
1065
1065
  ] });
1066
1066
  case "date":
1067
- const x = v.values || [], [k, E] = x, L = k && E, q = x[0] || null, S = x[1] || null, O = {
1068
- startDate: q instanceof Date ? q.toISOString().slice(0, 10) : null,
1069
- endDate: q instanceof Date ? q.toISOString().slice(0, 10) : null
1067
+ const x = v.values || [], [C, F] = x, L = C && F, U = x[0] || null, S = x[1] || null, P = {
1068
+ startDate: U instanceof Date ? U.toISOString().slice(0, 10) : null,
1069
+ endDate: U instanceof Date ? U.toISOString().slice(0, 10) : null
1070
1070
  }, D = {
1071
1071
  startDate: S instanceof Date ? S.toISOString().slice(0, 10) : null,
1072
1072
  endDate: S instanceof Date ? S.toISOString().slice(0, 10) : null
1073
- }, P = [
1073
+ }, O = [
1074
1074
  { key: "anytime", label: "Anytime" },
1075
1075
  { key: "today", label: "Today" },
1076
1076
  { key: "this_week", label: "This Week" },
@@ -1078,17 +1078,17 @@ const $n = {
1078
1078
  { key: "this_month", label: "This Month" },
1079
1079
  { key: "last_month", label: "Last Month" },
1080
1080
  { key: "custom", label: "Custom" }
1081
- ], _ = (R) => {
1081
+ ], V = (R) => {
1082
1082
  if (R === "anytime") {
1083
- T.setFieldValue(`${z}.values`, []), T.setFieldValue(`${z}.range`, "anytime");
1083
+ T.setFieldValue(`${k}.values`, []), T.setFieldValue(`${k}.range`, "anytime");
1084
1084
  return;
1085
1085
  }
1086
1086
  if (R === "custom") {
1087
- T.setFieldValue(`${z}.range`, "custom");
1087
+ T.setFieldValue(`${k}.range`, "custom");
1088
1088
  return;
1089
1089
  }
1090
- const [Y, W] = On(R);
1091
- T.setFieldValue(`${z}.values`, Y && W ? [Y, W] : []), T.setFieldValue(`${z}.range`, R);
1090
+ const [Y, W] = Pn(R);
1091
+ T.setFieldValue(`${k}.values`, Y && W ? [Y, W] : []), T.setFieldValue(`${k}.range`, R);
1092
1092
  };
1093
1093
  return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
1094
1094
  /* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
@@ -1097,9 +1097,9 @@ const $n = {
1097
1097
  "select",
1098
1098
  {
1099
1099
  value: v.operator,
1100
- onChange: (R) => T.setFieldValue(`${z}.operator`, R.target.value),
1100
+ onChange: (R) => T.setFieldValue(`${k}.operator`, R.target.value),
1101
1101
  className: "filter-select",
1102
- children: f.operators.map((R) => /* @__PURE__ */ e("option", { value: R, children: R === "in" ? "Is" : "Is not" }, R))
1102
+ children: g.operators.map((R) => /* @__PURE__ */ e("option", { value: R, children: R === "in" ? "Is" : "Is not" }, R))
1103
1103
  }
1104
1104
  ),
1105
1105
  L && /* @__PURE__ */ e(
@@ -1108,8 +1108,8 @@ const $n = {
1108
1108
  type: "button",
1109
1109
  onClick: () => {
1110
1110
  T.setFieldValue(
1111
- z,
1112
- m[z]
1111
+ k,
1112
+ m[k]
1113
1113
  );
1114
1114
  },
1115
1115
  className: "filter-clear-selection-button",
@@ -1117,7 +1117,7 @@ const $n = {
1117
1117
  }
1118
1118
  )
1119
1119
  ] }),
1120
- /* @__PURE__ */ e("div", { className: "pb-0", children: /* @__PURE__ */ e("div", { className: "space-y-3", children: P.map((R) => {
1120
+ /* @__PURE__ */ e("div", { className: "pb-0", children: /* @__PURE__ */ e("div", { className: "space-y-3", children: O.map((R) => {
1121
1121
  const Y = v.range === R.key || R.key === "anytime" && (!Array.isArray(v.values) || v.values.length === 0);
1122
1122
  return /* @__PURE__ */ n(
1123
1123
  "label",
@@ -1128,9 +1128,9 @@ const $n = {
1128
1128
  "input",
1129
1129
  {
1130
1130
  type: "radio",
1131
- name: `preset-${z}`,
1131
+ name: `preset-${k}`,
1132
1132
  checked: Y,
1133
- onChange: () => _(R.key),
1133
+ onChange: () => V(R.key),
1134
1134
  className: "h-4 w-4"
1135
1135
  }
1136
1136
  ),
@@ -1150,10 +1150,10 @@ const $n = {
1150
1150
  {
1151
1151
  asSingle: !0,
1152
1152
  useRange: !1,
1153
- value: O,
1153
+ value: P,
1154
1154
  onChange: (R) => {
1155
1155
  const Y = R?.startDate ? Be(new Date(R.startDate)) : null, W = x[1] || null;
1156
- Y && (T.setFieldValue(`${z}.values`, [Y, W]), T.setFieldValue(`${z}.range`, "custom"));
1156
+ Y && (T.setFieldValue(`${k}.values`, [Y, W]), T.setFieldValue(`${k}.range`, "custom"));
1157
1157
  },
1158
1158
  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",
1159
1159
  primaryColor: "violet",
@@ -1177,7 +1177,7 @@ const $n = {
1177
1177
  value: D,
1178
1178
  onChange: (R) => {
1179
1179
  const Y = R?.startDate ? je(new Date(R.startDate)) : null, W = x[0] || null;
1180
- Y && (T.setFieldValue(`${z}.values`, [W, Y]), T.setFieldValue(`${z}.range`, "custom"));
1180
+ Y && (T.setFieldValue(`${k}.values`, [W, Y]), T.setFieldValue(`${k}.range`, "custom"));
1181
1181
  },
1182
1182
  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",
1183
1183
  primaryColor: "violet",
@@ -1190,7 +1190,7 @@ const $n = {
1190
1190
  }
1191
1191
  )
1192
1192
  ] }),
1193
- q && S && q > S && /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-2", children: "End date must be after start date" })
1193
+ U && S && U > S && /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-2", children: "End date must be after start date" })
1194
1194
  ] })
1195
1195
  ] });
1196
1196
  default:
@@ -1239,17 +1239,17 @@ const $n = {
1239
1239
  Vr,
1240
1240
  {
1241
1241
  vertical: !0,
1242
- onChange: U,
1242
+ onChange: _,
1243
1243
  style: {
1244
1244
  display: "flex",
1245
1245
  flexGrow: 1
1246
1246
  },
1247
1247
  children: [
1248
- /* @__PURE__ */ e(_r, { className: "filter-tabs-list", children: l.map((z) => /* @__PURE__ */ n(re, { className: "filter-tab-item", children: [
1248
+ /* @__PURE__ */ e(_r, { className: "filter-tabs-list", children: l.map((k) => /* @__PURE__ */ n(ne, { className: "filter-tab-item", children: [
1249
1249
  /* @__PURE__ */ e("div", { className: "filter-selection-horizontal-indicator" }),
1250
1250
  /* @__PURE__ */ n("div", { className: "filter-lbl-indicator-wrapper", children: [
1251
- z.label,
1252
- F[z.key] && /* @__PURE__ */ e(
1251
+ k.label,
1252
+ A[k.key] && /* @__PURE__ */ e(
1253
1253
  "span",
1254
1254
  {
1255
1255
  className: "filter-active-indicator",
@@ -1257,9 +1257,9 @@ const $n = {
1257
1257
  }
1258
1258
  )
1259
1259
  ] })
1260
- ] }, z.key)) }),
1261
- /* @__PURE__ */ e(Ur, { className: "filter-tabs-panels", children: l.map((z) => /* @__PURE__ */ e(
1262
- re.Panel,
1260
+ ] }, k.key)) }),
1261
+ /* @__PURE__ */ e(Ur, { className: "filter-tabs-panels", children: l.map((k) => /* @__PURE__ */ e(
1262
+ ne.Panel,
1263
1263
  {
1264
1264
  className: "filter-tab-panel",
1265
1265
  children: /* @__PURE__ */ e(
@@ -1269,12 +1269,12 @@ const $n = {
1269
1269
  animate: { opacity: 1, x: 0 },
1270
1270
  transition: { duration: 0.3 },
1271
1271
  className: "h-full",
1272
- children: B(z.key)
1272
+ children: q(k.key)
1273
1273
  },
1274
- z.key
1274
+ k.key
1275
1275
  )
1276
1276
  },
1277
- z.key
1277
+ k.key
1278
1278
  )) })
1279
1279
  ]
1280
1280
  }
@@ -1298,7 +1298,7 @@ const $n = {
1298
1298
  children: [
1299
1299
  "Apply Filters",
1300
1300
  " ",
1301
- A > 0 ? `(${A})` : ""
1301
+ E > 0 ? `(${E})` : ""
1302
1302
  ]
1303
1303
  }
1304
1304
  )
@@ -1358,7 +1358,7 @@ const $n = {
1358
1358
  iconClass: "icon--info",
1359
1359
  primaryButtonCategory: "primary"
1360
1360
  }
1361
- }, Pn = ({
1361
+ }, On = ({
1362
1362
  isOpen: t,
1363
1363
  onClose: a,
1364
1364
  title: s,
@@ -1372,10 +1372,10 @@ const $n = {
1372
1372
  // 'info', 'warning', 'delete'
1373
1373
  loading: u = !1,
1374
1374
  buttonProps: p = {},
1375
- size: g
1375
+ size: b
1376
1376
  // Add size prop
1377
1377
  }) => {
1378
- const b = Rt[o] || Rt.info, r = b.icon, y = () => {
1378
+ const f = Rt[o] || Rt.info, r = f.icon, y = () => {
1379
1379
  a({ primary: !0, secondary: !1 });
1380
1380
  }, d = () => {
1381
1381
  a({ primary: !1, secondary: !0 });
@@ -1404,9 +1404,9 @@ const $n = {
1404
1404
  leave: "ease-in duration-200",
1405
1405
  leaveFrom: "opacity-100 scale-100",
1406
1406
  leaveTo: "opacity-0 scale-95",
1407
- children: /* @__PURE__ */ n(Ee, { className: g === "large" ? "modal-panel modal-panel--large" : "modal-panel", children: [
1407
+ children: /* @__PURE__ */ n(Ee, { className: b === "large" ? "modal-panel modal-panel--large" : "modal-panel", children: [
1408
1408
  /* @__PURE__ */ n("div", { className: "modal-content-wrapper", children: [
1409
- /* @__PURE__ */ e("div", { className: `modal-icon-container ${b.iconClass}`, children: /* @__PURE__ */ e(r, { size: 24, "aria-hidden": "true" }) }),
1409
+ /* @__PURE__ */ e("div", { className: `modal-icon-container ${f.iconClass}`, children: /* @__PURE__ */ e(r, { size: 24, "aria-hidden": "true" }) }),
1410
1410
  /* @__PURE__ */ n("div", { className: "modal-text-content", children: [
1411
1411
  /* @__PURE__ */ e(at, { as: "h3", className: "modal-title", children: s }),
1412
1412
  /* @__PURE__ */ e("div", { className: "modal-description", children: i })
@@ -1434,7 +1434,7 @@ const $n = {
1434
1434
  }
1435
1435
  ) })
1436
1436
  ] }) });
1437
- }, Ol = ({
1437
+ }, Pl = ({
1438
1438
  currentPage: t,
1439
1439
  totalItems: a,
1440
1440
  itemsPerPage: s,
@@ -1446,7 +1446,7 @@ const $n = {
1446
1446
  Z(() => {
1447
1447
  p(t);
1448
1448
  }, [t]);
1449
- const g = Math.min((t - 1) * s + 1, a), b = Math.min(t * s, a), r = (y) => {
1449
+ const b = Math.min((t - 1) * s + 1, a), f = Math.min(t * s, a), r = (y) => {
1450
1450
  y.preventDefault();
1451
1451
  let d = parseInt(u, 10);
1452
1452
  isNaN(d) || d < 1 ? d = 1 : d > o && (d = o), p(d), d !== t && i(d);
@@ -1465,9 +1465,9 @@ const $n = {
1465
1465
  }
1466
1466
  ),
1467
1467
  /* @__PURE__ */ n("span", { className: "pagination-info", children: [
1468
- g,
1469
- "-",
1470
1468
  b,
1469
+ "-",
1470
+ f,
1471
1471
  " of ",
1472
1472
  a,
1473
1473
  " items"
@@ -1590,16 +1590,16 @@ const $n = {
1590
1590
  Z(() => {
1591
1591
  p(t);
1592
1592
  }, [t]);
1593
- const g = ne(
1593
+ const b = ae(
1594
1594
  en((r) => {
1595
1595
  a?.(r);
1596
1596
  }, s),
1597
1597
  [s, a]
1598
1598
  );
1599
- Z(() => (u !== t && g(u), () => {
1600
- g.cancel();
1601
- }), [u, g, t]);
1602
- const b = (r) => {
1599
+ Z(() => (u !== t && b(u), () => {
1600
+ b.cancel();
1601
+ }), [u, b, t]);
1602
+ const f = (r) => {
1603
1603
  p(r.target.value);
1604
1604
  };
1605
1605
  return /* @__PURE__ */ n("div", { className: `search-bar-wrapper ${m}`, children: [
@@ -1614,7 +1614,7 @@ const $n = {
1614
1614
  type: "search",
1615
1615
  name: "search",
1616
1616
  value: u,
1617
- onChange: b,
1617
+ onChange: f,
1618
1618
  ...o
1619
1619
  }
1620
1620
  )
@@ -1633,8 +1633,8 @@ const $n = {
1633
1633
  // From RHF's <Controller>
1634
1634
  showSearch: p = !0
1635
1635
  }) => {
1636
- const [g, b] = M(""), r = g === "" ? i : i.filter(
1637
- (d) => d.label.toLowerCase().includes(g.toLowerCase())
1636
+ const [b, f] = M(""), r = b === "" ? i : i.filter(
1637
+ (d) => d.label.toLowerCase().includes(b.toLowerCase())
1638
1638
  ), y = i.find((d) => a?.id ? d.id === a.id : d.id === a || d.value === a);
1639
1639
  return /* @__PURE__ */ e(K, { value: a, onChange: s, disabled: m, children: /* @__PURE__ */ n("div", { className: "select-wrapper", ref: u, children: [
1640
1640
  t && /* @__PURE__ */ e("label", { className: "select-label", children: t }),
@@ -1661,12 +1661,12 @@ const $n = {
1661
1661
  p && /* @__PURE__ */ e("div", { className: "search-input-wrapper", children: /* @__PURE__ */ e(
1662
1662
  be,
1663
1663
  {
1664
- value: g,
1665
- onDebouncedChange: b,
1664
+ value: b,
1665
+ onDebouncedChange: f,
1666
1666
  placeholder: "Search..."
1667
1667
  }
1668
1668
  ) }),
1669
- /* @__PURE__ */ e("div", { className: "select-options-list", children: r.length === 0 && g !== "" ? /* @__PURE__ */ e("div", { className: "no-results", children: "No results found." }) : r.map((d) => /* @__PURE__ */ e(
1669
+ /* @__PURE__ */ e("div", { className: "select-options-list", children: r.length === 0 && b !== "" ? /* @__PURE__ */ e("div", { className: "no-results", children: "No results found." }) : r.map((d) => /* @__PURE__ */ e(
1670
1670
  Yr,
1671
1671
  {
1672
1672
  className: ({ active: h }) => `select-option ${h ? "active" : ""}`,
@@ -1719,14 +1719,14 @@ const $n = {
1719
1719
  Z(() => {
1720
1720
  xt([t], i) && o(!0);
1721
1721
  }, [t, i]);
1722
- const p = i === l, g = !p && !!xt([t], i), b = (r) => {
1722
+ const p = i === l, b = !p && !!xt([t], i), f = (r) => {
1723
1723
  r.preventDefault(), o(!m);
1724
1724
  };
1725
1725
  return /* @__PURE__ */ n(
1726
1726
  "div",
1727
1727
  {
1728
1728
  className: H("nav-item-container", {
1729
- "nav-item-container--parent-active": g,
1729
+ "nav-item-container--parent-active": b,
1730
1730
  [`nav-item-container--level-${s}`]: s > 0
1731
1731
  }),
1732
1732
  children: [
@@ -1748,7 +1748,7 @@ const $n = {
1748
1748
  "button",
1749
1749
  {
1750
1750
  className: "nav-chevron-button",
1751
- onClick: b,
1751
+ onClick: f,
1752
1752
  "aria-expanded": m,
1753
1753
  "aria-label": m ? "Collapse menu" : "Expand menu",
1754
1754
  children: /* @__PURE__ */ e(
@@ -1786,7 +1786,7 @@ const $n = {
1786
1786
  ]
1787
1787
  }
1788
1788
  );
1789
- }, Pl = ({
1789
+ }, Ol = ({
1790
1790
  navItems: t = [],
1791
1791
  isCollapsed: a = !1,
1792
1792
  onToggleCollapse: s,
@@ -1905,11 +1905,11 @@ const $n = {
1905
1905
  // ✅ New prop to control visibility
1906
1906
  ...u
1907
1907
  }) => {
1908
- const p = a || u.name, [g, b] = M(
1908
+ const p = a || u.name, [b, f] = M(
1909
1909
  u.value?.length || u.defaultValue?.length || 0
1910
1910
  ), r = (d) => {
1911
- b(d.target.value.length), u.onChange && u.onChange(d);
1912
- }, y = m - g;
1911
+ f(d.target.value.length), u.onChange && u.onChange(d);
1912
+ }, y = m - b;
1913
1913
  return /* @__PURE__ */ n("div", { className: `textarea-wrapper ${i || ""}`, children: [
1914
1914
  /* @__PURE__ */ n("div", { className: "textarea-header", children: [
1915
1915
  t && /* @__PURE__ */ e("label", { htmlFor: p, className: "textarea-label", children: t }),
@@ -2010,15 +2010,15 @@ const $n = {
2010
2010
  title: o,
2011
2011
  description: u,
2012
2012
  showProgress: p = !0,
2013
- closeOnOverlayClick: g = !0
2013
+ closeOnOverlayClick: b = !0
2014
2014
  }) => {
2015
- const b = s[i], r = Object.keys(s), y = r.indexOf(i), d = (y + 1) / r.length * 100, h = y > 0 && m.onBack;
2015
+ const f = s[i], r = Object.keys(s), y = r.indexOf(i), d = (y + 1) / r.length * 100, h = y > 0 && m.onBack;
2016
2016
  return /* @__PURE__ */ e(he, { show: t, as: Q, children: /* @__PURE__ */ n(
2017
2017
  ye,
2018
2018
  {
2019
2019
  as: "div",
2020
2020
  className: "wizard-dialog",
2021
- onClose: g ? a : () => {
2021
+ onClose: b ? a : () => {
2022
2022
  },
2023
2023
  children: [
2024
2024
  /* @__PURE__ */ e(
@@ -2099,7 +2099,7 @@ const $n = {
2099
2099
  },
2100
2100
  className: "wizard-step-motion-wrapper",
2101
2101
  style: { overflowX: "hidden" },
2102
- children: b && /* @__PURE__ */ e(b, { ...m })
2102
+ children: f && /* @__PURE__ */ e(f, { ...m })
2103
2103
  },
2104
2104
  i
2105
2105
  )
@@ -2130,8 +2130,8 @@ const $n = {
2130
2130
  // Renamed for clarity, expecting a component type e.g., CheckCircle
2131
2131
  disabled: u = !1,
2132
2132
  size: p = "small",
2133
- label: g,
2134
- children: b,
2133
+ label: b,
2134
+ children: f,
2135
2135
  // ✅ Add children to the props list
2136
2136
  onClick: r,
2137
2137
  ...y
@@ -2468,41 +2468,41 @@ function Hn({
2468
2468
  // timeout: 20000,
2469
2469
  });
2470
2470
  s.interceptors.response.use(
2471
- (g) => g?.data ?? {
2472
- message: g?.statusText || "Request succeeded"
2471
+ (b) => b?.data ?? {
2472
+ message: b?.statusText || "Request succeeded"
2473
2473
  },
2474
- (g) => {
2475
- const b = Xn(g), r = b.status;
2476
- return t && (r === 401 || r === 403) && (window.location.href.includes("/login") || (window.historyPath = window.location.pathname, localStorage.clear(), sessionStorage.clear(), window.location.href = "/login")), Promise.reject(b);
2474
+ (b) => {
2475
+ const f = Xn(b), r = f.status;
2476
+ return t && (r === 401 || r === 403) && (window.location.href.includes("/login") || (window.historyPath = window.location.pathname, localStorage.clear(), sessionStorage.clear(), window.location.href = "/login")), Promise.reject(f);
2477
2477
  }
2478
2478
  );
2479
- function i({ open: g = !1, customHeader: b = {} } = {}) {
2480
- if (g) {
2479
+ function i({ open: b = !1, customHeader: f = {} } = {}) {
2480
+ if (b) {
2481
2481
  const { Authorization: r, ...y } = It();
2482
2482
  return {
2483
- headers: { ...y, ...a, ...b }
2483
+ headers: { ...y, ...a, ...f }
2484
2484
  };
2485
2485
  }
2486
- return { headers: { ...It(), ...b } };
2486
+ return { headers: { ...It(), ...f } };
2487
2487
  }
2488
- async function l(g, b, r = !1, y = {}) {
2489
- return s.get(g, {
2490
- params: b,
2488
+ async function l(b, f, r = !1, y = {}) {
2489
+ return s.get(b, {
2490
+ params: f,
2491
2491
  ...i({ open: r, customHeader: y })
2492
2492
  });
2493
2493
  }
2494
- async function m(g, b, r = !1, y = {}) {
2494
+ async function m(b, f, r = !1, y = {}) {
2495
2495
  const d = { ...i({ open: r, customHeader: y }) };
2496
- return b !== void 0 && (d.data = b), s.delete(g, d);
2496
+ return f !== void 0 && (d.data = f), s.delete(b, d);
2497
2497
  }
2498
- async function o(g, b = {}, r = !1, y = {}) {
2499
- return s.post(g, b, i({ open: r, customHeader: y }));
2498
+ async function o(b, f = {}, r = !1, y = {}) {
2499
+ return s.post(b, f, i({ open: r, customHeader: y }));
2500
2500
  }
2501
- async function u(g, b = {}, r = !1, y = {}) {
2502
- return s.put(g, b, i({ open: r, customHeader: y }));
2501
+ async function u(b, f = {}, r = !1, y = {}) {
2502
+ return s.put(b, f, i({ open: r, customHeader: y }));
2503
2503
  }
2504
- async function p(g, b = {}, r = !1, y = {}) {
2505
- return s.patch(g, b, i({ open: r, customHeader: y }));
2504
+ async function p(b, f = {}, r = !1, y = {}) {
2505
+ return s.patch(b, f, i({ open: r, customHeader: y }));
2506
2506
  }
2507
2507
  return {
2508
2508
  instance: s,
@@ -2541,7 +2541,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2541
2541
  type: "User",
2542
2542
  avatarUrl: a?.profileImage || Je(l)
2543
2543
  };
2544
- }), Ot = (t) => {
2544
+ }), Pt = (t) => {
2545
2545
  try {
2546
2546
  const a = JSON.parse(t);
2547
2547
  return Array.isArray(a) ? a : [];
@@ -2592,10 +2592,10 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2592
2592
  if (Array.isArray(s))
2593
2593
  i = s;
2594
2594
  else if (typeof s == "string")
2595
- i = Ot(s.trim());
2595
+ i = Pt(s.trim());
2596
2596
  else if (s && typeof s == "object") {
2597
2597
  const l = s.data;
2598
- Array.isArray(l) ? i = l : typeof l == "string" && (i = Ot(l.trim()));
2598
+ Array.isArray(l) ? i = l : typeof l == "string" && (i = Pt(l.trim()));
2599
2599
  }
2600
2600
  return es(i);
2601
2601
  }
@@ -2636,15 +2636,15 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2636
2636
  className: "flex items-center justify-between p-3 border border-gray-300 rounded-lg hover:bg-gray-50 hover:cursor-pointer transition-colors duration-150",
2637
2637
  children: [
2638
2638
  /* @__PURE__ */ n("div", { className: "flex items-center gap-3 overflow-hidden", children: [
2639
- /* @__PURE__ */ e("div", { className: "flex items-center", children: l.map((g, b) => /* @__PURE__ */ e(
2639
+ /* @__PURE__ */ e("div", { className: "flex items-center", children: l.map((b, f) => /* @__PURE__ */ e(
2640
2640
  "img",
2641
2641
  {
2642
- src: g.avatarUrl || `https://avatar.vercel.sh/${g.name}.svg?text=${g?.name?.charAt(0) || "U"}`,
2643
- alt: g.name,
2644
- className: `w-10 h-10 rounded-full border-2 border-white ${b > 0 ? "-ml-4" : ""}`,
2645
- style: { zIndex: b }
2642
+ src: b.avatarUrl || `https://avatar.vercel.sh/${b.name}.svg?text=${b?.name?.charAt(0) || "U"}`,
2643
+ alt: b.name,
2644
+ className: `w-10 h-10 rounded-full border-2 border-white ${f > 0 ? "-ml-4" : ""}`,
2645
+ style: { zIndex: f }
2646
2646
  },
2647
- g.id || b
2647
+ b.id || f
2648
2648
  )) }),
2649
2649
  /* @__PURE__ */ e("p", { className: "text-sm font-medium text-gray-800 truncate", children: p })
2650
2650
  ] }),
@@ -2652,7 +2652,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2652
2652
  ]
2653
2653
  }
2654
2654
  );
2655
- }, Pt = [
2655
+ }, Ot = [
2656
2656
  { id: 1, name: Te.USER, icon: nr, code: "users" },
2657
2657
  { id: 2, name: Te.GROUP, icon: Zt, code: "groups" },
2658
2658
  { id: 3, name: Te.ROLE, icon: sr, code: "roles" }
@@ -2672,70 +2672,70 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2672
2672
  },
2673
2673
  isChanged: u = !1
2674
2674
  }) => {
2675
- const [p, g] = M(Pt[0]), [b, r] = M(""), y = Ct(b, 400), [d, h] = M([]), [$, T] = M(/* @__PURE__ */ new Set()), [F, A] = M(!1), [I, V] = M(Lt[0]), {
2676
- control: U,
2675
+ const [p, b] = M(Ot[0]), [f, r] = M(""), y = Ct(f, 400), [d, h] = M([]), [$, T] = M(/* @__PURE__ */ new Set()), [A, E] = M(!1), [I, j] = M(Lt[0]), {
2676
+ control: _,
2677
2677
  handleSubmit: G,
2678
- watch: B,
2679
- formState: { errors: z, isSubmitting: f }
2678
+ watch: q,
2679
+ formState: { errors: k, isSubmitting: g }
2680
2680
  } = lr({
2681
2681
  defaultValues: { pendingInvites: [] },
2682
2682
  resolver: cr(as)
2683
- }), { fields: v, append: w, remove: C, update: N } = ir({
2684
- control: U,
2683
+ }), { fields: v, append: w, remove: z, update: N } = ir({
2684
+ control: _,
2685
2685
  name: "pendingInvites"
2686
- }), x = B("pendingInvites");
2686
+ }), x = q("pendingInvites");
2687
2687
  Z(() => {
2688
- y.length > 1 ? (A(!0), Kn(p.name, y).then((D) => {
2688
+ y.length > 1 ? (E(!0), Kn(p.name, y).then((D) => {
2689
2689
  h(D);
2690
- }).catch((D) => console.error("Search failed:", D)).finally(() => A(!1))) : (h([]), T(/* @__PURE__ */ new Set()));
2690
+ }).catch((D) => console.error("Search failed:", D)).finally(() => E(!1))) : (h([]), T(/* @__PURE__ */ new Set()));
2691
2691
  }, [y, p]);
2692
- const k = (D) => {
2693
- T((P) => {
2694
- const _ = new Set(P);
2695
- return _.has(D) ? _.delete(D) : _.add(D), _;
2692
+ const C = (D) => {
2693
+ T((O) => {
2694
+ const V = new Set(O);
2695
+ return V.has(D) ? V.delete(D) : V.add(D), V;
2696
2696
  });
2697
- }, E = () => {
2697
+ }, F = () => {
2698
2698
  d.filter((D) => $.has(D.id)).forEach((D) => {
2699
- v.find((P) => P.id === D.id) || w({ ...D, permission: I.name });
2699
+ v.find((O) => O.id === D.id) || w({ ...D, permission: I.name });
2700
2700
  }), T(/* @__PURE__ */ new Set()), r("");
2701
2701
  }, L = (D) => {
2702
- V(D), v.forEach(
2703
- (P, _) => N(_, { ...v[_], permission: D.name })
2702
+ j(D), v.forEach(
2703
+ (O, V) => N(V, { ...v[V], permission: D.name })
2704
2704
  );
2705
- }, q = async (D) => {
2705
+ }, U = async (D) => {
2706
2706
  try {
2707
2707
  if (l === de.DRIVE) {
2708
- const P = D.pendingInvites.map((R) => ({
2708
+ const O = D.pendingInvites.map((R) => ({
2709
2709
  id: R.id,
2710
2710
  permission: R.permission,
2711
2711
  type: R.type.toLowerCase()
2712
2712
  }));
2713
2713
  o({
2714
2714
  entity: t,
2715
- userGroupRolesObj: P,
2715
+ userGroupRolesObj: O,
2716
2716
  existingShares: i
2717
2717
  // Always send updated existing shares
2718
2718
  }, i);
2719
2719
  } else if (l === de.INTEREST) {
2720
- const P = D.pendingInvites.map((_) => ({
2721
- identity: _.id,
2722
- type: _.type.toLowerCase(),
2720
+ const O = D.pendingInvites.map((V) => ({
2721
+ identity: V.id,
2722
+ type: V.type.toLowerCase(),
2723
2723
  opt: !0,
2724
2724
  lock: !1,
2725
2725
  moderator: !1,
2726
- userName: _.name,
2726
+ userName: V.name,
2727
2727
  interestId: t?.data?.id
2728
2728
  }));
2729
- o(P, i);
2729
+ o(O, i);
2730
2730
  } else if (l === de.ARTICLE) {
2731
- const P = D.pendingInvites.map((R) => ({
2731
+ const O = D.pendingInvites.map((R) => ({
2732
2732
  id: R.id,
2733
2733
  permission: R.permission,
2734
2734
  type: R.type.toLowerCase()
2735
2735
  }));
2736
2736
  o({
2737
2737
  entity: t,
2738
- userGroupRolesObj: P,
2738
+ userGroupRolesObj: O,
2739
2739
  existingShares: i
2740
2740
  }, i);
2741
2741
  } else
@@ -2743,13 +2743,13 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2743
2743
  setTimeout(() => {
2744
2744
  s();
2745
2745
  }, 1e3);
2746
- } catch (P) {
2747
- throw console.error("Failed to submit invites:", P), P;
2746
+ } catch (O) {
2747
+ throw console.error("Failed to submit invites:", O), O;
2748
2748
  }
2749
2749
  }, S = (D) => {
2750
- const P = i[p.code].find((_) => _.name === D.name && _.permission !== "remove") || x.find((_) => _.name === D.name);
2751
- return P ? `${P.permission}` : "";
2752
- }, O = () => {
2750
+ const O = i[p.code].find((V) => V.name === D.name && V.permission !== "remove") || x.find((V) => V.name === D.name);
2751
+ return O ? `${O.permission}` : "";
2752
+ }, P = () => {
2753
2753
  switch (l) {
2754
2754
  case de.DRIVE:
2755
2755
  return "Share with others";
@@ -2763,7 +2763,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2763
2763
  };
2764
2764
  return ue(() => (console.log("InviteFlow - isChanged:", u, "pendingInvites.length:", x.length), x.length === 0 && !u), [x.length, u]), /* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-white", children: [
2765
2765
  /* @__PURE__ */ n("header", { className: "flex items-center justify-between p-4 border-b border-gray-300 flex-shrink-0", children: [
2766
- /* @__PURE__ */ e(ye.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children: O() }),
2766
+ /* @__PURE__ */ e(ye.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children: P() }),
2767
2767
  /* @__PURE__ */ n("div", { className: "flex items-center gap-4", children: [
2768
2768
  l === de.DRIVE && /* @__PURE__ */ n("button", { className: "flex items-center gap-2 text-sm text-blue-600 hover:text-blue-800 font-semibold hover:cursor-pointer", children: [
2769
2769
  /* @__PURE__ */ e(or, { className: "h-5 w-5" }),
@@ -2790,7 +2790,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2790
2790
  }
2791
2791
  ),
2792
2792
  /* @__PURE__ */ n("div", { className: "relative grid grid-cols-3 gap-2 items-start", children: [
2793
- /* @__PURE__ */ e("div", { className: "col-span-1", children: /* @__PURE__ */ e(K, { value: p, onChange: g, children: /* @__PURE__ */ n("div", { className: "relative", children: [
2793
+ /* @__PURE__ */ e("div", { className: "col-span-1", children: /* @__PURE__ */ e(K, { value: p, onChange: b, children: /* @__PURE__ */ n("div", { className: "relative", children: [
2794
2794
  /* @__PURE__ */ n(K.Button, { className: "relative w-full border border-gray-300 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: [
2795
2795
  /* @__PURE__ */ n("span", { className: "flex items-center", children: [
2796
2796
  /* @__PURE__ */ e(p.icon, { className: "h-5 w-5 text-gray-400 mr-2" }),
@@ -2805,28 +2805,28 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2805
2805
  leave: "transition ease-in duration-100",
2806
2806
  leaveFrom: "opacity-100",
2807
2807
  leaveTo: "opacity-0",
2808
- children: /* @__PURE__ */ e(K.Options, { className: "absolute z-10 mt-1 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: Pt.map((D) => /* @__PURE__ */ e(
2808
+ children: /* @__PURE__ */ e(K.Options, { className: "absolute z-10 mt-1 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: Ot.map((D) => /* @__PURE__ */ e(
2809
2809
  K.Option,
2810
2810
  {
2811
2811
  value: D,
2812
- className: ({ active: P }) => `${P ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
2813
- children: ({ selected: P }) => /* @__PURE__ */ n(te, { children: [
2812
+ className: ({ active: O }) => `${O ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
2813
+ children: ({ selected: O }) => /* @__PURE__ */ n(te, { children: [
2814
2814
  /* @__PURE__ */ n(
2815
2815
  "span",
2816
2816
  {
2817
- className: `${P ? "font-medium" : "font-normal"} flex items-center`,
2817
+ className: `${O ? "font-medium" : "font-normal"} flex items-center`,
2818
2818
  children: [
2819
2819
  /* @__PURE__ */ e(
2820
2820
  D.icon,
2821
2821
  {
2822
- className: `h-5 w-5 mr-2 ${P ? "text-white" : "text-gray-400"}`
2822
+ className: `h-5 w-5 mr-2 ${O ? "text-white" : "text-gray-400"}`
2823
2823
  }
2824
2824
  ),
2825
2825
  D.name
2826
2826
  ]
2827
2827
  }
2828
2828
  ),
2829
- P && /* @__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" }) })
2829
+ O && /* @__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" }) })
2830
2830
  ] })
2831
2831
  },
2832
2832
  D.id
@@ -2839,10 +2839,10 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2839
2839
  {
2840
2840
  placeholder: `Search by ${p.name.toLowerCase()}...`,
2841
2841
  onDebouncedChange: (D) => r(D),
2842
- value: b
2842
+ value: f
2843
2843
  }
2844
2844
  ) }),
2845
- /* @__PURE__ */ e(Ce, { children: (d?.length > 0 || F) && /* @__PURE__ */ e(
2845
+ /* @__PURE__ */ e(Ce, { children: (d?.length > 0 || A) && /* @__PURE__ */ e(
2846
2846
  le.div,
2847
2847
  {
2848
2848
  initial: { opacity: 0, y: -10 },
@@ -2850,14 +2850,14 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2850
2850
  exit: { opacity: 0, y: -10 },
2851
2851
  transition: { duration: 0.2 },
2852
2852
  className: "absolute top-full mt-2 w-full col-span-3 bg-white border border-gray-300 rounded-lg shadow-lg z-10",
2853
- children: F ? /* @__PURE__ */ e("div", { className: "p-4 text-center text-gray-500", children: "Loading..." }) : /* @__PURE__ */ n(te, { children: [
2853
+ children: A ? /* @__PURE__ */ e("div", { className: "p-4 text-center text-gray-500", children: "Loading..." }) : /* @__PURE__ */ n(te, { children: [
2854
2854
  /* @__PURE__ */ e("div", { className: "max-h-60 overflow-y-auto p-2 space-y-1", children: d.map((D) => {
2855
- const P = S(D);
2855
+ const O = S(D);
2856
2856
  return /* @__PURE__ */ n(
2857
2857
  "div",
2858
2858
  {
2859
- onClick: () => P ? null : k(D.id),
2860
- className: `flex items-center gap-3 p-2 rounded-md hover:bg-blue-50 ${P ? " hover:cursor-not-allowed" : "hover:cursor-pointer"}`,
2859
+ onClick: () => O ? null : C(D.id),
2860
+ className: `flex items-center gap-3 p-2 rounded-md hover:bg-blue-50 ${O ? " hover:cursor-not-allowed" : "hover:cursor-pointer"}`,
2861
2861
  children: [
2862
2862
  /* @__PURE__ */ e(
2863
2863
  "input",
@@ -2866,7 +2866,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2866
2866
  checked: $.has(D.id),
2867
2867
  readOnly: !0,
2868
2868
  className: "h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500",
2869
- disabled: !!P
2869
+ disabled: !!O
2870
2870
  }
2871
2871
  ),
2872
2872
  /* @__PURE__ */ e(
@@ -2878,8 +2878,8 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2878
2878
  }
2879
2879
  ),
2880
2880
  /* @__PURE__ */ e("span", { className: "text-md font-medium text-gray-800 truncate", children: D.name }),
2881
- P ? /* @__PURE__ */ n(te, { children: [
2882
- /* @__PURE__ */ e("span", { className: "text-sm px-[12px] py-[2px] border border-dashed rounded-xl bg-teal-100 text-teal-700", children: P }),
2881
+ O ? /* @__PURE__ */ n(te, { children: [
2882
+ /* @__PURE__ */ e("span", { className: "text-sm px-[12px] py-[2px] border border-dashed rounded-xl bg-teal-100 text-teal-700", children: O }),
2883
2883
  /* @__PURE__ */ e("span", { className: "text-sm text-gray-400", children: "Already added" })
2884
2884
  ] }) : ""
2885
2885
  ]
@@ -2899,7 +2899,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2899
2899
  /* @__PURE__ */ e(
2900
2900
  "button",
2901
2901
  {
2902
- onClick: E,
2902
+ onClick: F,
2903
2903
  disabled: $.size === 0,
2904
2904
  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",
2905
2905
  children: "Add"
@@ -2950,17 +2950,17 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2950
2950
  K.Option,
2951
2951
  {
2952
2952
  value: D,
2953
- className: ({ active: P }) => `${P ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
2954
- children: ({ selected: P, active: _ }) => /* @__PURE__ */ n(te, { children: [
2953
+ className: ({ active: O }) => `${O ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
2954
+ children: ({ selected: O, active: V }) => /* @__PURE__ */ n(te, { children: [
2955
2955
  /* @__PURE__ */ n(
2956
2956
  "span",
2957
2957
  {
2958
- className: `${P ? "font-medium" : "font-normal"} flex items-center`,
2958
+ className: `${O ? "font-medium" : "font-normal"} flex items-center`,
2959
2959
  children: [
2960
2960
  /* @__PURE__ */ e(
2961
2961
  D.icon,
2962
2962
  {
2963
- className: `h-5 w-5 mr-2 ${_ ? "text-white" : "text-gray-400"}`
2963
+ className: `h-5 w-5 mr-2 ${V ? "text-white" : "text-gray-400"}`
2964
2964
  }
2965
2965
  ),
2966
2966
  "Can ",
@@ -2968,7 +2968,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2968
2968
  ]
2969
2969
  }
2970
2970
  ),
2971
- P && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600", children: /* @__PURE__ */ e(
2971
+ O && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600", children: /* @__PURE__ */ e(
2972
2972
  ht,
2973
2973
  {
2974
2974
  className: "h-5 w-5",
@@ -2985,7 +2985,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
2985
2985
  }
2986
2986
  )
2987
2987
  ] }),
2988
- /* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e(Ce, { children: v.map((D, P) => /* @__PURE__ */ n(
2988
+ /* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e(Ce, { children: v.map((D, O) => /* @__PURE__ */ n(
2989
2989
  le.div,
2990
2990
  {
2991
2991
  layout: !0,
@@ -3013,7 +3013,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3013
3013
  /* @__PURE__ */ e(
3014
3014
  "button",
3015
3015
  {
3016
- onClick: () => C(P),
3016
+ onClick: () => z(O),
3017
3017
  className: "text-gray-400 hover:text-red-500 hover:cursor-pointer",
3018
3018
  children: /* @__PURE__ */ e(et, { className: "h-5 w-5" })
3019
3019
  }
@@ -3046,10 +3046,10 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3046
3046
  /* @__PURE__ */ e(
3047
3047
  "button",
3048
3048
  {
3049
- onClick: () => G(q)(),
3050
- disabled: f || x.length === 0 && !u,
3049
+ onClick: () => G(U)(),
3050
+ disabled: g || x.length === 0 && !u,
3051
3051
  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",
3052
- children: f ? "Inviting..." : l === de.DRIVE ? "Send Invites" : "Add"
3052
+ children: g ? "Inviting..." : l === de.DRIVE ? "Send Invites" : "Add"
3053
3053
  }
3054
3054
  )
3055
3055
  ] })
@@ -3066,9 +3066,9 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3066
3066
  middleware: [ia(8), oa(), ca({ padding: 8 })],
3067
3067
  whileElementsMounted: da,
3068
3068
  placement: "bottom-end"
3069
- }), p = tn(u), g = an(u), { getReferenceProps: b, getFloatingProps: r } = rn([
3069
+ }), p = tn(u), b = an(u), { getReferenceProps: f, getFloatingProps: r } = rn([
3070
3070
  p,
3071
- g
3071
+ b
3072
3072
  ]), y = dt.find((h) => h.name === t.permission || h.value === t.permission) || dt[0];
3073
3073
  return (
3074
3074
  // FIX: The <Listbox> component now wraps both the button and the portal.
@@ -3080,7 +3080,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3080
3080
  K.Button,
3081
3081
  {
3082
3082
  ref: m.setReference,
3083
- ...b(),
3083
+ ...f(),
3084
3084
  className: "relative min-w-[120px] text-left text-sm p-2 border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-opacity-75 hover:cursor-pointer",
3085
3085
  children: [
3086
3086
  /* @__PURE__ */ e("span", { className: "block truncate", children: t.permission }),
@@ -3148,32 +3148,32 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3148
3148
  existingShares: l,
3149
3149
  allowedPermissions: m
3150
3150
  }) => {
3151
- const [o, u] = M(l), [p, g] = M(0), [b, r] = M(""), y = Ct(b, 300), d = {
3151
+ const [o, u] = M(l), [p, b] = M(0), [f, r] = M(""), y = Ct(f, 300), d = {
3152
3152
  users: o.users.filter(
3153
- (A) => A.name.toLowerCase().includes(y.toLowerCase())
3153
+ (E) => E.name.toLowerCase().includes(y.toLowerCase())
3154
3154
  ),
3155
3155
  groups: o.groups.filter(
3156
- (A) => A.name.toLowerCase().includes(y.toLowerCase())
3156
+ (E) => E.name.toLowerCase().includes(y.toLowerCase())
3157
3157
  ),
3158
3158
  roles: o.roles.filter(
3159
- (A) => A.name.toLowerCase().includes(y.toLowerCase())
3159
+ (E) => E.name.toLowerCase().includes(y.toLowerCase())
3160
3160
  )
3161
- }, h = async (A, I, V, U) => {
3161
+ }, h = async (E, I, j, _) => {
3162
3162
  const G = I.value;
3163
- u((B) => ({
3164
- ...B,
3165
- [V]: B[V].map(
3166
- (z) => z.id === A.id ? { ...z, permission: G } : z
3163
+ u((q) => ({
3164
+ ...q,
3165
+ [j]: q[j].map(
3166
+ (k) => k.id === E.id ? { ...k, permission: G } : k
3167
3167
  )
3168
3168
  }));
3169
3169
  }, $ = () => {
3170
- const A = {
3170
+ const E = {
3171
3171
  users: o.users.filter((I) => I.permission !== "remove"),
3172
3172
  groups: o.groups.filter((I) => I.permission !== "remove"),
3173
3173
  roles: o.roles.filter((I) => I.permission !== "remove")
3174
3174
  };
3175
- a(A);
3176
- }, T = ["users", "groups", "roles"], F = ["Users", "Groups", "Roles"];
3175
+ a(E);
3176
+ }, T = ["users", "groups", "roles"], A = ["Users", "Groups", "Roles"];
3177
3177
  return (
3178
3178
  // The main structure remains the same...
3179
3179
  /* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-gray-50", children: [
@@ -3200,26 +3200,26 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3200
3200
  )
3201
3201
  ] }),
3202
3202
  /* @__PURE__ */ n("div", { className: "flex flex-col flex-grow", children: [
3203
- /* @__PURE__ */ n(re.Group, { selectedIndex: p, onChange: g, children: [
3203
+ /* @__PURE__ */ n(ne.Group, { selectedIndex: p, onChange: b, children: [
3204
3204
  /* @__PURE__ */ n("div", { className: "p-4 bg-white border-b border-gray-300", children: [
3205
- /* @__PURE__ */ e(re.List, { className: "flex space-x-1 bg-gray-100 p-1 rounded-lg", children: F.map((A) => /* @__PURE__ */ e(
3206
- re,
3205
+ /* @__PURE__ */ e(ne.List, { className: "flex space-x-1 bg-gray-100 p-1 rounded-lg", children: A.map((E) => /* @__PURE__ */ e(
3206
+ ne,
3207
3207
  {
3208
3208
  className: ({
3209
3209
  selected: I
3210
3210
  }) => `w-full py-2 text-sm font-medium leading-5 rounded-md
3211
3211
  focus:outline-none focus:ring-2 ring-offset-2 ring-offset-blue-400 ring-white ring-opacity-60
3212
3212
  ${I ? "bg-white shadow text-blue-700" : "text-gray-600 hover:bg-white/[0.6]"}`,
3213
- children: A
3213
+ children: E
3214
3214
  },
3215
- A
3215
+ E
3216
3216
  )) }),
3217
3217
  /* @__PURE__ */ e("div", { className: "mt-4", children: /* @__PURE__ */ e(
3218
3218
  be,
3219
3219
  {
3220
3220
  onDebouncedChange: r,
3221
- value: b,
3222
- placeholder: `Search in ${F[p]}...`
3221
+ value: f,
3222
+ placeholder: `Search in ${A[p]}...`
3223
3223
  }
3224
3224
  ) })
3225
3225
  ] }),
@@ -3230,11 +3230,11 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3230
3230
  animate: { y: 0, opacity: 1 },
3231
3231
  exit: { y: -10, opacity: 0 },
3232
3232
  transition: { duration: 0.2 },
3233
- children: /* @__PURE__ */ e(re.Panels, { as: Q, children: T.map((A) => /* @__PURE__ */ e(
3234
- re.Panel,
3233
+ children: /* @__PURE__ */ e(ne.Panels, { as: Q, children: T.map((E) => /* @__PURE__ */ e(
3234
+ ne.Panel,
3235
3235
  {
3236
3236
  className: "space-y-3 focus:outline-none",
3237
- children: /* @__PURE__ */ e(Ce, { children: d[A].length > 0 ? d[A].map((I) => /* @__PURE__ */ n(
3237
+ children: /* @__PURE__ */ e(Ce, { children: d[E].length > 0 ? d[E].map((I) => /* @__PURE__ */ n(
3238
3238
  le.div,
3239
3239
  {
3240
3240
  layout: !0,
@@ -3258,12 +3258,12 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3258
3258
  ),
3259
3259
  /* @__PURE__ */ n("div", { className: "overflow-hidden", children: [
3260
3260
  /* @__PURE__ */ e("p", { className: "font-medium text-gray-900 truncate", children: I.name }),
3261
- A !== "users" && /* @__PURE__ */ e(
3261
+ E !== "users" && /* @__PURE__ */ e(
3262
3262
  "button",
3263
3263
  {
3264
3264
  onClick: () => i({
3265
3265
  id: I.id,
3266
- type: A,
3266
+ type: E,
3267
3267
  name: I.name
3268
3268
  }),
3269
3269
  className: "text-sm text-blue-600 hover:underline hover:cursor-pointer",
@@ -3277,10 +3277,10 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3277
3277
  {
3278
3278
  item: I,
3279
3279
  allowedPermissions: m,
3280
- onPermissionChange: (V) => h(
3280
+ onPermissionChange: (j) => h(
3281
3281
  I,
3282
- V,
3283
- A
3282
+ j,
3283
+ E
3284
3284
  )
3285
3285
  }
3286
3286
  )
@@ -3299,16 +3299,16 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3299
3299
  /* @__PURE__ */ e(Zt, { className: "h-12 w-12 text-gray-400" }),
3300
3300
  /* @__PURE__ */ n("h3", { className: "mt-2 text-sm font-medium text-gray-900", children: [
3301
3301
  "No ",
3302
- F[p],
3302
+ A[p],
3303
3303
  " Found"
3304
3304
  ] }),
3305
- /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: b ? `No results for "${b}"` : `There are no ${F[p].toLowerCase()} with access.` })
3305
+ /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: f ? `No results for "${f}"` : `There are no ${A[p].toLowerCase()} with access.` })
3306
3306
  ]
3307
3307
  }
3308
3308
  )
3309
3309
  ) })
3310
3310
  },
3311
- A
3311
+ E
3312
3312
  )) })
3313
3313
  },
3314
3314
  p
@@ -3338,9 +3338,9 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3338
3338
  onClose: s,
3339
3339
  members: i
3340
3340
  }) => {
3341
- const [l, m] = M(!0), [o, u] = M(""), p = Ct(o, 300), g = i.filter(
3341
+ const [l, m] = M(!0), [o, u] = M(""), p = Ct(o, 300), b = i.filter(
3342
3342
  (d) => d.name.toLowerCase().includes(p.toLowerCase())
3343
- ), b = {
3343
+ ), f = {
3344
3344
  hidden: { opacity: 0 },
3345
3345
  visible: {
3346
3346
  opacity: 1,
@@ -3355,7 +3355,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3355
3355
  }, y = () => l ? (
3356
3356
  // Show 5 skeleton items while loading
3357
3357
  /* @__PURE__ */ e("div", { children: Array.from({ length: 5 }).map((d, h) => /* @__PURE__ */ e(ls, {}, h)) })
3358
- ) : g.length === 0 ? /* @__PURE__ */ n(
3358
+ ) : b.length === 0 ? /* @__PURE__ */ n(
3359
3359
  le.div,
3360
3360
  {
3361
3361
  initial: { opacity: 0, scale: 0.95 },
@@ -3370,11 +3370,11 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3370
3370
  ) : /* @__PURE__ */ e(
3371
3371
  le.ul,
3372
3372
  {
3373
- variants: b,
3373
+ variants: f,
3374
3374
  initial: "hidden",
3375
3375
  animate: "visible",
3376
3376
  className: "divide-y divide-gray-200",
3377
- children: /* @__PURE__ */ e(Ce, { children: g.map((d) => /* @__PURE__ */ n(
3377
+ children: /* @__PURE__ */ e(Ce, { children: b.map((d) => /* @__PURE__ */ n(
3378
3378
  le.li,
3379
3379
  {
3380
3380
  layout: !0,
@@ -3459,31 +3459,31 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3459
3459
  allowedPermissions: u = [],
3460
3460
  ...p
3461
3461
  }) => {
3462
- const [g, b] = M(fe.INVITE), [r, y] = M(t), [d, h] = M(null), [$, T] = M(!1), [F, A] = M([]), [I, V] = M(fe.MANAGE), U = () => {
3463
- b(fe.INVITE), h(null), m();
3462
+ const [b, f] = M(fe.INVITE), [r, y] = M(t), [d, h] = M(null), [$, T] = M(!1), [A, E] = M([]), [I, j] = M(fe.MANAGE), _ = () => {
3463
+ f(fe.INVITE), h(null), m();
3464
3464
  }, G = () => {
3465
- b(fe.MANAGE);
3466
- }, B = async ({ id: v, name: w, type: C }) => {
3467
- if (C === "groups") {
3465
+ f(fe.MANAGE);
3466
+ }, q = async ({ id: v, name: w, type: z }) => {
3467
+ if (z === "groups") {
3468
3468
  try {
3469
3469
  const N = await Ve(`${Xe.getMembersForGroup(w)}`);
3470
3470
  } catch (N) {
3471
3471
  console.log("Error searching entities:", N);
3472
3472
  }
3473
- A(resp);
3473
+ E(resp);
3474
3474
  }
3475
- h({ id: v, type: C, name: w }), V(g), b(fe.MEMBERS);
3476
- }, z = (v) => {
3475
+ h({ id: v, type: z, name: w }), j(b), f(fe.MEMBERS);
3476
+ }, k = (v) => {
3477
3477
  console.log("changedExistingShares", v), y(v);
3478
- const w = ct.mapValues(t, (x) => x.map((k) => ({ id: k.id, permission: k.permission })).sort((k, E) => k.id - E.id)), C = ct.mapValues(v, (x) => x.map((k) => ({ id: k.id, permission: k.permission })).sort((k, E) => k.id - E.id));
3479
- console.log("Existing data:", w), console.log("Changed data:", C);
3480
- const N = !ct.isEqual(w, C);
3481
- console.log("hasPermissionChanged:", N), T(N), b(g === fe.MEMBERS ? I : fe.INVITE);
3478
+ const w = ct.mapValues(t, (x) => x.map((C) => ({ id: C.id, permission: C.permission })).sort((C, F) => C.id - F.id)), z = ct.mapValues(v, (x) => x.map((C) => ({ id: C.id, permission: C.permission })).sort((C, F) => C.id - F.id));
3479
+ console.log("Existing data:", w), console.log("Changed data:", z);
3480
+ const N = !ct.isEqual(w, z);
3481
+ console.log("hasPermissionChanged:", N), T(N), f(b === fe.MEMBERS ? I : fe.INVITE);
3482
3482
  };
3483
- return /* @__PURE__ */ e(he, { appear: !0, show: a, as: Q, children: /* @__PURE__ */ n(ye, { as: "div", className: "relative z-50", onClose: U, children: [
3483
+ return /* @__PURE__ */ e(he, { appear: !0, show: a, as: Q, children: /* @__PURE__ */ n(ye, { as: "div", className: "relative z-50", onClose: _, children: [
3484
3484
  /* @__PURE__ */ e("div", { className: "filter-modal-overlay", "aria-hidden": "true" }),
3485
3485
  /* @__PURE__ */ e("div", { className: "filter-modal-container", children: /* @__PURE__ */ e("div", { className: "filter-modal-positioner", children: /* @__PURE__ */ e(Ee, { className: "filter-modal-panel", style: { background: "white" }, children: (() => {
3486
- switch (g) {
3486
+ switch (b) {
3487
3487
  case fe.MANAGE:
3488
3488
  return /* @__PURE__ */ e(
3489
3489
  le.div,
@@ -3497,9 +3497,9 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3497
3497
  ss,
3498
3498
  {
3499
3499
  entity: i,
3500
- onBack: z,
3501
- onClose: U,
3502
- onOpenMembers: B,
3500
+ onBack: k,
3501
+ onClose: _,
3502
+ onOpenMembers: q,
3503
3503
  existingShares: r,
3504
3504
  calledBy: l,
3505
3505
  allowedPermissions: u
@@ -3521,11 +3521,11 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3521
3521
  is,
3522
3522
  {
3523
3523
  entity: d,
3524
- onBack: z,
3525
- onClose: U,
3524
+ onBack: k,
3525
+ onClose: _,
3526
3526
  calledBy: l,
3527
3527
  existingShares: r,
3528
- members: F
3528
+ members: A
3529
3529
  }
3530
3530
  )
3531
3531
  },
@@ -3545,7 +3545,7 @@ const Re = Hn(), Ve = Re.axiosGet, Qn = Re.axiosDelete, _e = Re.axiosPost, Zn =
3545
3545
  {
3546
3546
  entity: i,
3547
3547
  onManage: G,
3548
- onClose: U,
3548
+ onClose: _,
3549
3549
  existingShares: r,
3550
3550
  calledBy: l,
3551
3551
  showExistingShares: o,
@@ -3578,9 +3578,9 @@ function nt({
3578
3578
  displayLimit: u = 3,
3579
3579
  selectionLimit: p = -1,
3580
3580
  // NEW: search behavior
3581
- searchMode: g = "client",
3581
+ searchMode: b = "client",
3582
3582
  // "client" | "server"
3583
- onSearch: b,
3583
+ onSearch: f,
3584
3584
  // (query: string) => void (required if searchMode==="server")
3585
3585
  serverLoading: r = !1,
3586
3586
  minSearchChars: y = 2,
@@ -3588,30 +3588,30 @@ function nt({
3588
3588
  getOptionId: d = ($) => String($.id),
3589
3589
  getOptionLabel: h = ($) => $.name
3590
3590
  }) {
3591
- const $ = Qe(), T = Qe(), [F, A] = M(""), I = xe(""), V = ue(() => {
3591
+ const $ = Qe(), T = Qe(), [A, E] = M(""), I = xe(""), j = ue(() => {
3592
3592
  const v = /* @__PURE__ */ new Map();
3593
3593
  for (const w of a) v.set(d(w), w);
3594
3594
  return v;
3595
- }, [a, d]), U = ue(() => Array.isArray(s) ? s.map((v) => v && typeof v == "object" ? V.get(d(v)) || null : V.get(String(v))).filter(Boolean) : [], [s, V, d]), G = ue(() => {
3596
- if (!F) return a;
3597
- const v = F.toLowerCase();
3595
+ }, [a, d]), _ = ue(() => Array.isArray(s) ? s.map((v) => v && typeof v == "object" ? j.get(d(v)) || null : j.get(String(v))).filter(Boolean) : [], [s, j, d]), G = ue(() => {
3596
+ if (!A) return a;
3597
+ const v = A.toLowerCase();
3598
3598
  return a.filter((w) => h(w).toLowerCase().includes(v));
3599
- }, [a, F, h]);
3599
+ }, [a, A, h]);
3600
3600
  Z(() => {
3601
- g === "server" && F.length >= y && F !== I.current && (I.current = F, b && b(F));
3602
- }, [F, g, y, b]);
3603
- const B = g === "client" ? G : a, z = () => {
3604
- if (!U.length)
3601
+ b === "server" && A.length >= y && A !== I.current && (I.current = A, f && f(A));
3602
+ }, [A, b, y, f]);
3603
+ const q = b === "client" ? G : a, k = () => {
3604
+ if (!_.length)
3605
3605
  return /* @__PURE__ */ e("span", { className: "text-gray-500", children: m });
3606
- const v = U.slice(0, u), w = U.length - u;
3606
+ const v = _.slice(0, u), w = _.length - u;
3607
3607
  return /* @__PURE__ */ n("div", { className: "flex flex-wrap gap-2", children: [
3608
- v.map((C) => /* @__PURE__ */ e(
3608
+ v.map((z) => /* @__PURE__ */ e(
3609
3609
  "span",
3610
3610
  {
3611
3611
  className: "px-2 py-1 text-xs font-medium text-white bg-gray-800 rounded-full",
3612
- children: h(C)
3612
+ children: h(z)
3613
3613
  },
3614
- d(C)
3614
+ d(z)
3615
3615
  )),
3616
3616
  w > 0 && /* @__PURE__ */ n("span", { className: "px-2 py-1 text-xs font-medium text-gray-600 bg-gray-200 rounded-full", children: [
3617
3617
  "+",
@@ -3620,8 +3620,8 @@ function nt({
3620
3620
  ] })
3621
3621
  ] });
3622
3622
  };
3623
- return /* @__PURE__ */ e(K, { value: U, onChange: (v) => {
3624
- const w = Array.from(new Set(v.map((C) => d(C))));
3623
+ return /* @__PURE__ */ e(K, { value: _, onChange: (v) => {
3624
+ const w = Array.from(new Set(v.map((z) => d(z))));
3625
3625
  p !== -1 && w.length > p || i(w);
3626
3626
  }, multiple: !0, by: "id", children: ({ open: v }) => /* @__PURE__ */ n("div", { children: [
3627
3627
  /* @__PURE__ */ e(
@@ -3645,7 +3645,7 @@ function nt({
3645
3645
  o ? "ring-red-500" : "ring-gray-300"
3646
3646
  ),
3647
3647
  children: [
3648
- /* @__PURE__ */ e("span", { className: "block truncate", children: z() }),
3648
+ /* @__PURE__ */ e("span", { className: "block truncate", children: k() }),
3649
3649
  /* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ e(Ht, { className: "w-5 h-5 text-gray-400", "aria-hidden": "true" }) })
3650
3650
  ]
3651
3651
  }
@@ -3662,35 +3662,35 @@ function nt({
3662
3662
  /* @__PURE__ */ e("div", { className: "p-2 sticky top-0 bg-white z-20 shadow-sm", children: /* @__PURE__ */ e(
3663
3663
  be,
3664
3664
  {
3665
- value: F,
3666
- onDebouncedChange: A,
3667
- placeholder: g === "server" ? `Search (min ${y})…` : "Search options…"
3665
+ value: A,
3666
+ onDebouncedChange: E,
3667
+ placeholder: b === "server" ? `Search (min ${y})…` : "Search options…"
3668
3668
  }
3669
3669
  ) }),
3670
- g === "server" && r && /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: "Loading…" }),
3671
- B.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: g === "server" ? F.length < y ? `Type at least ${y} characters to search.` : "No results." : "No options found." }) : B.map((w) => {
3672
- const C = d(w), N = h(w), x = U.some((E) => d(E) === C), k = p !== -1 && U.length >= p && !x;
3670
+ b === "server" && r && /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: "Loading…" }),
3671
+ q.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: b === "server" ? A.length < y ? `Type at least ${y} characters to search.` : "No results." : "No options found." }) : q.map((w) => {
3672
+ const z = d(w), N = h(w), x = _.some((F) => d(F) === z), C = p !== -1 && _.length >= p && !x;
3673
3673
  return /* @__PURE__ */ e(
3674
3674
  K.Option,
3675
3675
  {
3676
3676
  value: w,
3677
- disabled: k,
3678
- className: ({ active: E }) => Ge(
3679
- k ? " text-gray-400 bg-white cursor-not-allowed" : E ? " bg-gray-200 text-gray-900" : " text-gray-900",
3677
+ disabled: C,
3678
+ className: ({ active: F }) => Ge(
3679
+ C ? " text-gray-400 bg-white cursor-not-allowed" : F ? " bg-gray-200 text-gray-900" : " text-gray-900",
3680
3680
  " relative cursor-default select-none py-2 pl-3 pr-9"
3681
3681
  ),
3682
- children: ({ selected: E, active: L }) => /* @__PURE__ */ n(te, { children: [
3682
+ children: ({ selected: F, active: L }) => /* @__PURE__ */ n(te, { children: [
3683
3683
  /* @__PURE__ */ e(
3684
3684
  "span",
3685
3685
  {
3686
3686
  className: Ge(
3687
- E ? "font-semibold" : "font-normal",
3687
+ F ? "font-semibold" : "font-normal",
3688
3688
  "block truncate"
3689
3689
  ),
3690
3690
  children: N
3691
3691
  }
3692
3692
  ),
3693
- E && /* @__PURE__ */ e(
3693
+ F && /* @__PURE__ */ e(
3694
3694
  "span",
3695
3695
  {
3696
3696
  className: Ge(
@@ -3702,7 +3702,7 @@ function nt({
3702
3702
  )
3703
3703
  ] })
3704
3704
  },
3705
- C
3705
+ z
3706
3706
  );
3707
3707
  })
3708
3708
  ] })
@@ -3764,10 +3764,10 @@ const Wl = ({
3764
3764
  secondaryAction: o = { onCancel: null, label: "Cancel" },
3765
3765
  dialogPanelClass: u = ""
3766
3766
  }) => {
3767
- const p = (b) => {
3768
- b.target === b.currentTarget && a(!1);
3769
- }, g = (b) => {
3770
- b.stopPropagation();
3767
+ const p = (f) => {
3768
+ f.target === f.currentTarget && a(!1);
3769
+ }, b = (f) => {
3770
+ f.stopPropagation();
3771
3771
  };
3772
3772
  return /* @__PURE__ */ n(
3773
3773
  ye,
@@ -3787,7 +3787,7 @@ const Wl = ({
3787
3787
  Ee,
3788
3788
  {
3789
3789
  className: `${u} relative bg-white align-middle w-full lg:w-[36rem] mx-5 lg:mx-0 transform overflow-hidden rounded-2xl text-left shadow-xl lg:min-w-[36rem] md:min-w-96 transition-all`,
3790
- onClick: g,
3790
+ onClick: b,
3791
3791
  children: [
3792
3792
  /* @__PURE__ */ n("div", { className: "flex justify-between items-center border-b border-gray-200 p-6 flex-shrink-0", children: [
3793
3793
  i?.customHeader && i.customHeader,
@@ -3798,7 +3798,7 @@ const Wl = ({
3798
3798
  "div",
3799
3799
  {
3800
3800
  className: "px-5 mb-5",
3801
- onClick: g,
3801
+ onClick: b,
3802
3802
  children: s
3803
3803
  }
3804
3804
  ),
@@ -3862,14 +3862,14 @@ function ds({
3862
3862
  onDelete: u,
3863
3863
  renderActions: p,
3864
3864
  // optional override
3865
- dragId: g,
3866
- dropId: b,
3865
+ dragId: b,
3866
+ dropId: f,
3867
3867
  indent: r = 24
3868
3868
  }) {
3869
- const { setNodeRef: y, isOver: d } = ur({ id: b }), { attributes: h, listeners: $, setNodeRef: T, transform: F, isDragging: A } = hr({ id: g }), I = F ? { transform: `translate3d(${Math.round(F.x)}px, ${Math.round(F.y)}px, 0)` } : void 0, [V, U] = M(!1), [G, B] = M(t.name), z = () => {
3869
+ const { setNodeRef: y, isOver: d } = ur({ id: f }), { attributes: h, listeners: $, setNodeRef: T, transform: A, isDragging: E } = hr({ id: b }), I = A ? { transform: `translate3d(${Math.round(A.x)}px, ${Math.round(A.y)}px, 0)` } : void 0, [j, _] = M(!1), [G, q] = M(t.name), k = () => {
3870
3870
  const v = G.trim();
3871
- U(!1), v && v !== t.name ? o?.(t, v) : B(t.name);
3872
- }, f = ue(() => /* @__PURE__ */ e(
3871
+ _(!1), v && v !== t.name ? o?.(t, v) : q(t.name);
3872
+ }, g = ue(() => /* @__PURE__ */ e(
3873
3873
  _n,
3874
3874
  {
3875
3875
  options: [
@@ -3878,7 +3878,7 @@ function ds({
3878
3878
  { action: "delete", label: "Delete" }
3879
3879
  ],
3880
3880
  onSelect: (w) => {
3881
- w.action === "create" ? m?.(t) : w.action === "rename" ? U(!0) : w.action === "delete" && u?.(t);
3881
+ w.action === "create" ? m?.(t) : w.action === "rename" ? _(!0) : w.action === "delete" && u?.(t);
3882
3882
  }
3883
3883
  }
3884
3884
  ), [t, m, u]);
@@ -3886,7 +3886,7 @@ function ds({
3886
3886
  "div",
3887
3887
  {
3888
3888
  ref: y,
3889
- className: `tv-row ${d ? "tv-drop-over" : ""} ${A ? "dragging" : ""}`,
3889
+ className: `tv-row ${d ? "tv-drop-over" : ""} ${E ? "dragging" : ""}`,
3890
3890
  style: { ...I, paddingLeft: 8 + a * r },
3891
3891
  onClick: (v) => {
3892
3892
  v.target.closest(".tv-toggle") || v.target.tagName === "INPUT" || l?.(t);
@@ -3894,25 +3894,25 @@ function ds({
3894
3894
  children: [
3895
3895
  /* @__PURE__ */ e("button", { className: "tv-toggle", onClick: i, "aria-label": "toggle", children: t.children?.length ? s ? /* @__PURE__ */ e(wt, { size: 16 }) : /* @__PURE__ */ e(ve, { size: 16 }) : /* @__PURE__ */ e("span", { className: "tv-spacer" }) }),
3896
3896
  /* @__PURE__ */ e(Me, { size: 16, className: "tv-folder-ic" }),
3897
- /* @__PURE__ */ e("div", { className: "tv-name", ref: T, children: V ? /* @__PURE__ */ e(
3897
+ /* @__PURE__ */ e("div", { className: "tv-name", ref: T, children: j ? /* @__PURE__ */ e(
3898
3898
  "input",
3899
3899
  {
3900
3900
  className: "tv-input",
3901
3901
  value: G,
3902
- onChange: (v) => B(v.target.value),
3903
- onBlur: z,
3902
+ onChange: (v) => q(v.target.value),
3903
+ onBlur: k,
3904
3904
  onKeyDown: (v) => {
3905
- v.key === "Enter" && z(), v.key === "Escape" && (U(!1), B(t.name));
3905
+ v.key === "Enter" && k(), v.key === "Escape" && (_(!1), q(t.name));
3906
3906
  },
3907
3907
  autoFocus: !0
3908
3908
  }
3909
- ) : /* @__PURE__ */ e("span", { onDoubleClick: () => U(!0), children: t.name }) }),
3909
+ ) : /* @__PURE__ */ e("span", { onDoubleClick: () => _(!0), children: t.name }) }),
3910
3910
  /* @__PURE__ */ e(cs, { listeners: $, attributes: h }),
3911
3911
  /* @__PURE__ */ e("div", { className: "tv-actions", children: p ? p(t, {
3912
3912
  onCreateChild: () => m?.(t),
3913
- onRename: () => U(!0),
3913
+ onRename: () => _(!0),
3914
3914
  onDelete: () => u?.(t)
3915
- }) : f })
3915
+ }) : g })
3916
3916
  ]
3917
3917
  }
3918
3918
  );
@@ -3939,14 +3939,14 @@ function gs(t, { rootId: a, getId: s, getParent: i, getName: l }) {
3939
3939
  function bs(t, { rootId: a, getId: s, getName: i }) {
3940
3940
  const l = /* @__PURE__ */ new Map();
3941
3941
  function m(u, p) {
3942
- const g = s(u), b = {
3942
+ const b = s(u), f = {
3943
3943
  ...u,
3944
- id: g,
3944
+ id: b,
3945
3945
  name: i(u),
3946
3946
  parentId: p || a,
3947
- children: (u.children || []).map((r) => m(r, g))
3947
+ children: (u.children || []).map((r) => m(r, b))
3948
3948
  };
3949
- return l.set(g, b), b;
3949
+ return l.set(b, f), f;
3950
3950
  }
3951
3951
  return { roots: t.map((u) => m(u, null)), byId: l };
3952
3952
  }
@@ -4000,8 +4000,8 @@ function Jl({
4000
4000
  onSelect: o,
4001
4001
  onCreateRoot: u,
4002
4002
  onCreateChild: p,
4003
- onRename: g,
4004
- onDelete: b,
4003
+ onRename: b,
4004
+ onDelete: f,
4005
4005
  onMove: r,
4006
4006
  renderActions: y,
4007
4007
  disableMoveToRoot: d = !1,
@@ -4009,95 +4009,95 @@ function Jl({
4009
4009
  indentUnit: h = 24
4010
4010
  }) {
4011
4011
  const { roots: $ } = ue(() => ps(t) ? bs(t, { rootId: a, getId: i, getName: m }) : gs(
4012
- t.map((k) => ({ ...k })),
4012
+ t.map((C) => ({ ...C })),
4013
4013
  { rootId: a, getId: i, getParent: l, getName: m }
4014
- ), [t, a, i, l, m]), [T, F] = M({}), A = ne((k) => {
4015
- const E = {};
4016
- return (function L(q) {
4017
- q.forEach((S) => {
4018
- E[S.id] = !0, S.children?.length && L(S.children);
4014
+ ), [t, a, i, l, m]), [T, A] = M({}), E = ae((C) => {
4015
+ const F = {};
4016
+ return (function L(U) {
4017
+ U.forEach((S) => {
4018
+ F[S.id] = !0, S.children?.length && L(S.children);
4019
4019
  });
4020
- })(k), E;
4020
+ })(C), F;
4021
4021
  }, []);
4022
4022
  se.useEffect(() => {
4023
- F(A($));
4024
- }, [$, A]);
4025
- const I = ne(
4026
- (k) => F((E) => ({ ...E, [k]: !E[k] })),
4023
+ A(E($));
4024
+ }, [$, E]);
4025
+ const I = ae(
4026
+ (C) => A((F) => ({ ...F, [C]: !F[C] })),
4027
4027
  []
4028
- ), [V, U] = M(() => Le($));
4029
- se.useEffect(() => U(Le($)), [$]);
4028
+ ), [j, _] = M(() => Le($));
4029
+ se.useEffect(() => _(Le($)), [$]);
4030
4030
  const G = pr(
4031
4031
  gr(yr, { activationConstraint: { delay: 250, tolerance: 5 } })
4032
- ), B = xe(null), [z, f] = M(null), v = xe(0), w = () => {
4033
- }, C = ({ delta: k }) => {
4034
- v.current = k?.x ?? 0;
4035
- }, N = ne(
4036
- ({ active: k, over: E }) => {
4032
+ ), q = xe(null), [k, g] = M(null), v = xe(0), w = () => {
4033
+ }, z = ({ delta: C }) => {
4034
+ v.current = C?.x ?? 0;
4035
+ }, N = ae(
4036
+ ({ active: C, over: F }) => {
4037
4037
  const L = v.current;
4038
- if (v.current = 0, f(null), !k || !E) return;
4039
- const q = String(k.id).replace(/^drag-/, ""), S = String(E.id).replace(/^drop-/, "");
4040
- if (!q || !S || q === S) return;
4041
- let O = S;
4038
+ if (v.current = 0, g(null), !C || !F) return;
4039
+ const U = String(C.id).replace(/^drag-/, ""), S = String(F.id).replace(/^drop-/, "");
4040
+ if (!U || !S || U === S) return;
4041
+ let P = S;
4042
4042
  const D = Math.max(0, Math.floor(-L / h));
4043
4043
  if (D > 0) {
4044
4044
  let W = S;
4045
4045
  for (let pe = 0; pe < D; pe++) {
4046
- const j = Ta(V, W, null);
4047
- if (!j) break;
4048
- if (!j.parentId) {
4049
- O = a;
4046
+ const B = Ta(j, W, null);
4047
+ if (!B) break;
4048
+ if (!B.parentId) {
4049
+ P = a;
4050
4050
  break;
4051
4051
  }
4052
- O = j.parentId, W = j.parentId;
4052
+ P = B.parentId, W = B.parentId;
4053
4053
  }
4054
4054
  }
4055
- if (d && O === a) {
4056
- U(Le($));
4055
+ if (d && P === a) {
4056
+ _(Le($));
4057
4057
  return;
4058
4058
  }
4059
- const P = Le(V), { newRoots: _, removed: R } = fs(P, q);
4059
+ const O = Le(j), { newRoots: V, removed: R } = fs(O, U);
4060
4060
  if (!R) return;
4061
- const Y = xs(_, O, R);
4062
- U(Y), r?.({ sourceId: q, destParentId: O, newTree: Y });
4061
+ const Y = xs(V, P, R);
4062
+ _(Y), r?.({ sourceId: U, destParentId: P, newTree: Y });
4063
4063
  },
4064
- [V, $, a, d, h, r]
4065
- ), x = ne(
4066
- (k, E = 0) => k.map((L) => /* @__PURE__ */ n(se.Fragment, { children: [
4064
+ [j, $, a, d, h, r]
4065
+ ), x = ae(
4066
+ (C, F = 0) => C.map((L) => /* @__PURE__ */ n(se.Fragment, { children: [
4067
4067
  /* @__PURE__ */ e(
4068
4068
  ds,
4069
4069
  {
4070
4070
  node: L,
4071
- depth: E,
4071
+ depth: F,
4072
4072
  expanded: !!T[L.id],
4073
4073
  onToggle: () => I(L.id),
4074
4074
  onSelect: o,
4075
4075
  onCreateChild: p,
4076
- onRename: g,
4077
- onDelete: b,
4076
+ onRename: b,
4077
+ onDelete: f,
4078
4078
  renderActions: y,
4079
4079
  dragId: `drag-${L.id}`,
4080
4080
  dropId: `drop-${L.id}`,
4081
4081
  indent: h
4082
4082
  }
4083
4083
  ),
4084
- T[L.id] && L.children?.length > 0 ? x(L.children, E + 1) : null
4084
+ T[L.id] && L.children?.length > 0 ? x(L.children, F + 1) : null
4085
4085
  ] }, L.id)),
4086
- [T, h, p, b, g, o, y, I]
4086
+ [T, h, p, f, b, o, y, I]
4087
4087
  );
4088
4088
  return se.useMemo(() => {
4089
- if (!z) return null;
4090
- const k = String(z).replace(/^drag-/, "");
4091
- function E(L) {
4092
- for (const q of L) {
4093
- if (q.id === k) return q;
4094
- const S = q.children?.length ? E(q.children) : null;
4089
+ if (!k) return null;
4090
+ const C = String(k).replace(/^drag-/, "");
4091
+ function F(L) {
4092
+ for (const U of L) {
4093
+ if (U.id === C) return U;
4094
+ const S = U.children?.length ? F(U.children) : null;
4095
4095
  if (S) return S;
4096
4096
  }
4097
4097
  return null;
4098
4098
  }
4099
- return E(V);
4100
- }, [z, V]), /* @__PURE__ */ n("div", { className: "tv", children: [
4099
+ return F(j);
4100
+ }, [k, j]), /* @__PURE__ */ n("div", { className: "tv", children: [
4101
4101
  s !== !1 && /* @__PURE__ */ n("div", { className: "tv-header", children: [
4102
4102
  /* @__PURE__ */ e("div", { className: "tv-title", children: s }),
4103
4103
  /* @__PURE__ */ e("button", { className: "tv-btn", onClick: u, children: "+ New folder" })
@@ -4113,10 +4113,10 @@ function Jl({
4113
4113
  collisionDetection: xr,
4114
4114
  sensors: G,
4115
4115
  onDragStart: w,
4116
- onDragMove: C,
4116
+ onDragMove: z,
4117
4117
  onDragEnd: N,
4118
4118
  modifiers: [fr],
4119
- children: /* @__PURE__ */ e("div", { ref: B, className: "tv-list", children: x(V, 0) })
4119
+ children: /* @__PURE__ */ e("div", { ref: q, className: "tv-list", children: x(j, 0) })
4120
4120
  }
4121
4121
  )
4122
4122
  ] });
@@ -4135,21 +4135,21 @@ const Xl = ({
4135
4135
  ...u
4136
4136
  // Pass remaining props to Tab.Group
4137
4137
  }) => {
4138
- const p = s === "vertical", g = (y) => ke(
4138
+ const p = s === "vertical", b = (y) => ke(
4139
4139
  "py-2 -mb-px text-sm font-medium focus:outline-none border-b-2",
4140
4140
  y ? "border-primaryX text-textX" : "border-transparent text-slate-600 hover:text-indigo-700"
4141
- ), b = (y) => ke(
4141
+ ), f = (y) => ke(
4142
4142
  "text-left text-sm rounded-md px-2 py-1.5 focus:outline-none",
4143
4143
  y ? "bg-primaryX text-white" : "text-textX hover:bg-lightgray-100 hover:text-primaryX"
4144
- ), r = ({ selected: y }) => o ? typeof o == "function" ? o(y) : o : p ? b(y) : g(y);
4145
- return /* @__PURE__ */ e(re.Group, { vertical: p, ...u, children: p ? /* @__PURE__ */ n("div", { className: ke("flex gap-4", i), children: [
4146
- /* @__PURE__ */ e(re.List, { className: ke("w-[150px] flex flex-col gap-1 border-r border-gray-300 pr-2", l), children: t.map((y) => /* @__PURE__ */ e(re, { className: r, children: y.label }, y.key)) }),
4147
- /* @__PURE__ */ e(re.Panels, { unmount: !a, className: ke("flex-1", m), children: t.map((y) => /* @__PURE__ */ e(re.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: y.content }) }, y.key)) })
4144
+ ), r = ({ selected: y }) => o ? typeof o == "function" ? o(y) : o : p ? f(y) : b(y);
4145
+ return /* @__PURE__ */ e(ne.Group, { vertical: p, ...u, children: p ? /* @__PURE__ */ n("div", { className: ke("flex gap-4", i), children: [
4146
+ /* @__PURE__ */ e(ne.List, { className: ke("w-[150px] flex flex-col gap-1 border-r border-gray-300 pr-2", l), children: t.map((y) => /* @__PURE__ */ e(ne, { className: r, children: y.label }, y.key)) }),
4147
+ /* @__PURE__ */ e(ne.Panels, { unmount: !a, className: ke("flex-1", m), children: t.map((y) => /* @__PURE__ */ e(ne.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: y.content }) }, y.key)) })
4148
4148
  ] }) : (
4149
4149
  // mostly this part is used : horizontal
4150
4150
  /* @__PURE__ */ n(te, { children: [
4151
- /* @__PURE__ */ e(re.List, { className: ke("flex gap-6 border rounded-t-2xl px-1.5 border-gray-300 mb-3 ", l), children: t.map((y) => /* @__PURE__ */ e(re, { className: r, children: y.label }, y.key)) }),
4152
- /* @__PURE__ */ e(re.Panels, { unmount: !a, className: ke("mt-2", m), children: t.map((y) => /* @__PURE__ */ e(re.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: y.content }) }, y.key)) })
4151
+ /* @__PURE__ */ e(ne.List, { className: ke("flex gap-6 border rounded-t-2xl px-1.5 border-gray-300 mb-3 ", l), children: t.map((y) => /* @__PURE__ */ e(ne, { className: r, children: y.label }, y.key)) }),
4152
+ /* @__PURE__ */ e(ne.Panels, { unmount: !a, className: ke("mt-2", m), children: t.map((y) => /* @__PURE__ */ e(ne.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: y.content }) }, y.key)) })
4153
4153
  ] })
4154
4154
  ) });
4155
4155
  };
@@ -4170,11 +4170,11 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4170
4170
  console.log("Updated Section data for", t.key, r), u(r);
4171
4171
  }
4172
4172
  }, [a, t.key]), console.log("Section data", o);
4173
- const g = xe(o);
4173
+ const b = xe(o);
4174
4174
  Z(() => {
4175
- g.current !== o && s && typeof s == "function" && (g.current = o, s(l.key, o));
4175
+ b.current !== o && s && typeof s == "function" && (b.current = o, s(l.key, o));
4176
4176
  }, [l.key, o, s]);
4177
- const b = (r) => {
4177
+ const f = (r) => {
4178
4178
  if (!r.dependsOn) return !0;
4179
4179
  const { field: y, value: d, operator: h = "equals" } = r.dependsOn, $ = o[y];
4180
4180
  switch (h) {
@@ -4211,7 +4211,7 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4211
4211
  }
4212
4212
  ),
4213
4213
  /* @__PURE__ */ e("p", { style: { fontSize: "14px", marginBottom: "10px" }, children: l.description }),
4214
- /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: l.fields.map((r, y) => b(r) && /* @__PURE__ */ n("div", { style: { marginBottom: "10px" }, children: [
4214
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: l.fields.map((r, y) => f(r) && /* @__PURE__ */ n("div", { style: { marginBottom: "10px" }, children: [
4215
4215
  /* @__PURE__ */ n(
4216
4216
  "label",
4217
4217
  {
@@ -4637,66 +4637,66 @@ function ys({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4637
4637
  const vs = ({ children: t }) => /* @__PURE__ */ e("div", { className: "flex -space-x-2", children: t });
4638
4638
  function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4639
4639
  console.log(`[DynamicConfig/DataTableRenderer] Component loaded for section: ${t.key}`);
4640
- const [l, m] = M(t), [o, u] = M(null), [p, g] = M(null);
4640
+ const [l, m] = M(t), [o, u] = M(null), [p, b] = M(null);
4641
4641
  console.log(`[DataTableRenderer] ${l.key} - Received props:`, { item: t, initialData: a });
4642
- const [b, r] = M(() => {
4643
- const f = a && a[l.key] || [], v = f.length > 0 ? f : [{ id: 0 }];
4642
+ const [f, r] = M(() => {
4643
+ const g = a && a[l.key] || [], v = g.length > 0 ? g : [{ id: 0 }];
4644
4644
  return console.log(`[DataTableRenderer] ${l.key} - Initial data:`, v), v;
4645
4645
  }), y = xe(a);
4646
4646
  Z(() => {
4647
4647
  if (console.log(`[DataTableRenderer] ${l.key} - Checking for initialData changes`), console.log(`[DataTableRenderer] ${l.key} - Previous:`, y.current), console.log(`[DataTableRenderer] ${l.key} - Current:`, a), y.current !== a) {
4648
4648
  y.current = a;
4649
- const f = a && a[l.key] || [], v = f.length > 0 ? f : [{ id: 0 }];
4649
+ const g = a && a[l.key] || [], v = g.length > 0 ? g : [{ id: 0 }];
4650
4650
  console.log(`[DataTableRenderer] ${l.key} - Setting new data:`, v), r(v);
4651
4651
  }
4652
4652
  }, [a, l.key]);
4653
- const d = xe(b), h = xe(null);
4653
+ const d = xe(f), h = xe(null);
4654
4654
  Z(() => {
4655
- d.current !== b && s && typeof s == "function" && (d.current = b, h.current && clearTimeout(h.current), h.current = setTimeout(() => {
4656
- s(l.key, b);
4655
+ d.current !== f && s && typeof s == "function" && (d.current = f, h.current && clearTimeout(h.current), h.current = setTimeout(() => {
4656
+ s(l.key, f);
4657
4657
  }, 300));
4658
- }, [l.key, b, s]), Z(() => () => {
4658
+ }, [l.key, f, s]), Z(() => () => {
4659
4659
  h.current && clearTimeout(h.current);
4660
4660
  }, []);
4661
- const $ = (f) => {
4661
+ const $ = (g) => {
4662
4662
  const v = (N, x) => {
4663
- console.log("[DataTableRenderer] updateFieldValue called with:", { rowIndex: N, value: x, type: typeof x }), r((k) => {
4664
- const E = [...k];
4665
- return E[N][f.key] = x, E;
4663
+ console.log("[DataTableRenderer] updateFieldValue called with:", { rowIndex: N, value: x, type: typeof x }), r((C) => {
4664
+ const F = [...C];
4665
+ return F[N][g.key] = x, F;
4666
4666
  });
4667
- }, w = (N) => i[l.key]?.[N]?.[f.key], C = (N) => {
4667
+ }, w = (N) => i[l.key]?.[N]?.[g.key], z = (N) => {
4668
4668
  const x = w(N);
4669
4669
  return x ? /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-1", children: x }) : null;
4670
4670
  };
4671
- switch (f.fieldtype) {
4671
+ switch (g.fieldtype) {
4672
4672
  case "text":
4673
4673
  return (N, x) => /* @__PURE__ */ n("div", { children: [
4674
4674
  /* @__PURE__ */ e(
4675
4675
  X,
4676
4676
  {
4677
- value: N[f.key] || "",
4678
- onChange: (k) => v(x, k.target.value),
4679
- placeholder: f.placeholder || `Enter ${f.label}`,
4680
- required: f.required,
4677
+ value: N[g.key] || "",
4678
+ onChange: (C) => v(x, C.target.value),
4679
+ placeholder: g.placeholder || `Enter ${g.label}`,
4680
+ required: g.required,
4681
4681
  className: `w-full ${w(x) ? "border-red-500" : ""}`
4682
4682
  }
4683
4683
  ),
4684
- C(x)
4684
+ z(x)
4685
4685
  ] });
4686
4686
  case "textarea":
4687
4687
  return (N, x) => /* @__PURE__ */ n("div", { children: [
4688
4688
  /* @__PURE__ */ e(
4689
4689
  ya,
4690
4690
  {
4691
- value: N[f.key] || "",
4692
- onChange: (k) => v(x, k.target.value),
4693
- placeholder: f.placeholder || `Enter ${f.label}`,
4694
- required: f.required,
4691
+ value: N[g.key] || "",
4692
+ onChange: (C) => v(x, C.target.value),
4693
+ placeholder: g.placeholder || `Enter ${g.label}`,
4694
+ required: g.required,
4695
4695
  className: `w-full ${w(x) ? "border-red-500" : ""}`,
4696
4696
  rows: 3
4697
4697
  }
4698
4698
  ),
4699
- C(x)
4699
+ z(x)
4700
4700
  ] });
4701
4701
  case "number":
4702
4702
  return (N, x) => /* @__PURE__ */ n("div", { children: [
@@ -4704,14 +4704,14 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4704
4704
  X,
4705
4705
  {
4706
4706
  type: "number",
4707
- value: N[f.key] || "",
4708
- onChange: (k) => v(x, k.target.value),
4709
- placeholder: f.placeholder || `Enter ${f.label}`,
4710
- required: f.required,
4707
+ value: N[g.key] || "",
4708
+ onChange: (C) => v(x, C.target.value),
4709
+ placeholder: g.placeholder || `Enter ${g.label}`,
4710
+ required: g.required,
4711
4711
  className: `w-full ${w(x) ? "border-red-500" : ""}`
4712
4712
  }
4713
4713
  ),
4714
- C(x)
4714
+ z(x)
4715
4715
  ] });
4716
4716
  case "email":
4717
4717
  return (N, x) => /* @__PURE__ */ n("div", { children: [
@@ -4719,14 +4719,14 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4719
4719
  X,
4720
4720
  {
4721
4721
  type: "email",
4722
- value: N[f.key] || "",
4723
- onChange: (k) => v(x, k.target.value),
4724
- placeholder: f.placeholder || "Enter email address",
4725
- required: f.required,
4722
+ value: N[g.key] || "",
4723
+ onChange: (C) => v(x, C.target.value),
4724
+ placeholder: g.placeholder || "Enter email address",
4725
+ required: g.required,
4726
4726
  className: `w-full ${w(x) ? "border-red-500" : ""}`
4727
4727
  }
4728
4728
  ),
4729
- C(x)
4729
+ z(x)
4730
4730
  ] });
4731
4731
  case "url":
4732
4732
  return (N, x) => /* @__PURE__ */ n("div", { children: [
@@ -4734,14 +4734,14 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4734
4734
  X,
4735
4735
  {
4736
4736
  type: "url",
4737
- value: N[f.key] || "",
4738
- onChange: (k) => v(x, k.target.value),
4739
- placeholder: f.placeholder || "Enter URL",
4740
- required: f.required,
4737
+ value: N[g.key] || "",
4738
+ onChange: (C) => v(x, C.target.value),
4739
+ placeholder: g.placeholder || "Enter URL",
4740
+ required: g.required,
4741
4741
  className: `w-full ${w(x) ? "border-red-500" : ""}`
4742
4742
  }
4743
4743
  ),
4744
- C(x)
4744
+ z(x)
4745
4745
  ] });
4746
4746
  case "password":
4747
4747
  return (N, x) => /* @__PURE__ */ n("div", { children: [
@@ -4749,14 +4749,14 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4749
4749
  X,
4750
4750
  {
4751
4751
  type: "password",
4752
- value: N[f.key] || "",
4753
- onChange: (k) => v(x, k.target.value),
4754
- placeholder: f.placeholder || "Enter password",
4755
- required: f.required,
4752
+ value: N[g.key] || "",
4753
+ onChange: (C) => v(x, C.target.value),
4754
+ placeholder: g.placeholder || "Enter password",
4755
+ required: g.required,
4756
4756
  className: `w-full ${w(x) ? "border-red-500" : ""}`
4757
4757
  }
4758
4758
  ),
4759
- C(x)
4759
+ z(x)
4760
4760
  ] });
4761
4761
  case "select":
4762
4762
  case "dropdown":
@@ -4764,57 +4764,57 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4764
4764
  /* @__PURE__ */ e(
4765
4765
  ft,
4766
4766
  {
4767
- value: N[f.key] || "",
4768
- onChange: (k) => v(x, k),
4769
- options: f.options || [],
4770
- placeholder: f.placeholder || `Select ${f.label}`,
4771
- required: f.required,
4767
+ value: N[g.key] || "",
4768
+ onChange: (C) => v(x, C),
4769
+ options: g.options || [],
4770
+ placeholder: g.placeholder || `Select ${g.label}`,
4771
+ required: g.required,
4772
4772
  className: `w-full ${w(x) ? "border-red-500" : ""}`
4773
4773
  }
4774
4774
  ),
4775
- C(x)
4775
+ z(x)
4776
4776
  ] });
4777
4777
  case "selectDynamic":
4778
4778
  return (N, x) => {
4779
- const k = () => {
4780
- if (f.optionsFrom && a) {
4781
- const { config: E, valueField: L, labelField: q } = f.optionsFrom, S = a[E] || [];
4779
+ const C = () => {
4780
+ if (g.optionsFrom && a) {
4781
+ const { config: F, valueField: L, labelField: U } = g.optionsFrom, S = a[F] || [];
4782
4782
  if (Array.isArray(S))
4783
- return S.map((O) => ({
4784
- id: O[L] || "",
4785
- value: O[L] || "",
4786
- label: O[q] || ""
4783
+ return S.map((P) => ({
4784
+ id: P[L] || "",
4785
+ value: P[L] || "",
4786
+ label: P[U] || ""
4787
4787
  }));
4788
4788
  }
4789
- return f.options || [];
4789
+ return g.options || [];
4790
4790
  };
4791
4791
  return /* @__PURE__ */ n("div", { children: [
4792
4792
  /* @__PURE__ */ e(
4793
4793
  ft,
4794
4794
  {
4795
4795
  index: x,
4796
- value: N[f.key] || "",
4797
- onChange: (E) => v(x, E),
4798
- options: k(),
4799
- placeholder: f.placeholder || `Select ${f.label}`,
4800
- required: f.required,
4796
+ value: N[g.key] || "",
4797
+ onChange: (F) => v(x, F),
4798
+ options: C(),
4799
+ placeholder: g.placeholder || `Select ${g.label}`,
4800
+ required: g.required,
4801
4801
  className: `w-full ${w(x) ? "border-red-500" : ""}`
4802
4802
  },
4803
4803
  Math.random()
4804
4804
  ),
4805
- C(x)
4805
+ z(x)
4806
4806
  ] });
4807
4807
  };
4808
4808
  case "multiselect":
4809
4809
  return (N, x) => {
4810
- const k = N[f.key] || [];
4810
+ const C = N[g.key] || [];
4811
4811
  return /* @__PURE__ */ e(
4812
4812
  nt,
4813
4813
  {
4814
- selectedItems: k,
4815
- onSelectionChange: (E) => v(x, E),
4816
- options: f.options || [],
4817
- placeholder: f.placeholder || `Select ${f.label}`,
4814
+ selectedItems: C,
4815
+ onSelectionChange: (F) => v(x, F),
4816
+ options: g.options || [],
4817
+ placeholder: g.placeholder || `Select ${g.label}`,
4818
4818
  className: "w-full"
4819
4819
  }
4820
4820
  );
@@ -4824,9 +4824,9 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4824
4824
  return (N, x) => /* @__PURE__ */ e(
4825
4825
  ma,
4826
4826
  {
4827
- checked: !!N[f.key],
4828
- onChange: (k) => v(x, k),
4829
- label: f.placeholder || f.label,
4827
+ checked: !!N[g.key],
4828
+ onChange: (C) => v(x, C),
4829
+ label: g.placeholder || g.label,
4830
4830
  className: "w-full"
4831
4831
  }
4832
4832
  );
@@ -4835,9 +4835,9 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4835
4835
  return (N, x) => /* @__PURE__ */ e(
4836
4836
  va,
4837
4837
  {
4838
- isOn: !!N[f.key],
4839
- onToggle: (k) => v(x, k),
4840
- label: f.placeholder || f.label,
4838
+ isOn: !!N[g.key],
4839
+ onToggle: (C) => v(x, C),
4840
+ label: g.placeholder || g.label,
4841
4841
  className: "w-full"
4842
4842
  }
4843
4843
  );
@@ -4845,9 +4845,9 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4845
4845
  return (N, x) => /* @__PURE__ */ e(
4846
4846
  ga,
4847
4847
  {
4848
- selectedDate: N[f.key] ? new Date(N[f.key]) : null,
4849
- onDateChange: (k) => v(x, k ? k.toISOString().split("T")[0] : ""),
4850
- placeholder: f.placeholder || "Select date",
4848
+ selectedDate: N[g.key] ? new Date(N[g.key]) : null,
4849
+ onDateChange: (C) => v(x, C ? C.toISOString().split("T")[0] : ""),
4850
+ placeholder: g.placeholder || "Select date",
4851
4851
  className: "w-full"
4852
4852
  }
4853
4853
  );
@@ -4856,10 +4856,10 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4856
4856
  X,
4857
4857
  {
4858
4858
  type: "datetime-local",
4859
- value: N[f.key] || "",
4860
- onChange: (k) => v(x, k.target.value),
4861
- placeholder: f.placeholder || "Select date and time",
4862
- required: f.required,
4859
+ value: N[g.key] || "",
4860
+ onChange: (C) => v(x, C.target.value),
4861
+ placeholder: g.placeholder || "Select date and time",
4862
+ required: g.required,
4863
4863
  className: "w-full"
4864
4864
  }
4865
4865
  );
@@ -4868,10 +4868,10 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4868
4868
  X,
4869
4869
  {
4870
4870
  type: "time",
4871
- value: N[f.key] || "",
4872
- onChange: (k) => v(x, k.target.value),
4873
- placeholder: f.placeholder || "Select time",
4874
- required: f.required,
4871
+ value: N[g.key] || "",
4872
+ onChange: (C) => v(x, C.target.value),
4873
+ placeholder: g.placeholder || "Select time",
4874
+ required: g.required,
4875
4875
  className: "w-full"
4876
4876
  }
4877
4877
  );
@@ -4879,9 +4879,9 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4879
4879
  return (N, x) => /* @__PURE__ */ e(
4880
4880
  ba,
4881
4881
  {
4882
- selectedValue: N[f.key] || "",
4883
- onValueChange: (k) => v(x, k),
4884
- options: f.options || [],
4882
+ selectedValue: N[g.key] || "",
4883
+ onValueChange: (C) => v(x, C),
4884
+ options: g.options || [],
4885
4885
  className: "w-full"
4886
4886
  }
4887
4887
  );
@@ -4889,37 +4889,37 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4889
4889
  return (N, x) => /* @__PURE__ */ e(
4890
4890
  be,
4891
4891
  {
4892
- value: N[f.key] || "",
4893
- onChange: (k) => v(x, k),
4894
- placeholder: f.placeholder || `Search ${f.label}`,
4892
+ value: N[g.key] || "",
4893
+ onChange: (C) => v(x, C),
4894
+ placeholder: g.placeholder || `Search ${g.label}`,
4895
4895
  className: "w-full"
4896
4896
  }
4897
4897
  );
4898
4898
  case "audience":
4899
4899
  return (N, x) => {
4900
- const k = N[f.key] || { users: [], groups: [], roles: [] }, E = [
4901
- ...k.users || [],
4902
- ...k.groups || [],
4903
- ...k.roles || []
4900
+ const C = N[g.key] || { users: [], groups: [], roles: [] }, F = [
4901
+ ...C.users || [],
4902
+ ...C.groups || [],
4903
+ ...C.roles || []
4904
4904
  ];
4905
4905
  return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
4906
- /* @__PURE__ */ e(vs, { children: E.length > 0 ? E.slice(0, 3).map((L, q) => /* @__PURE__ */ e(
4906
+ /* @__PURE__ */ e(vs, { children: F.length > 0 ? F.slice(0, 3).map((L, U) => /* @__PURE__ */ e(
4907
4907
  ze,
4908
4908
  {
4909
4909
  size: "small",
4910
4910
  name: L.name || L.displayName || L.id,
4911
4911
  src: L.avatarUrl
4912
4912
  },
4913
- q
4913
+ U
4914
4914
  )) : null }),
4915
4915
  /* @__PURE__ */ e(
4916
4916
  "button",
4917
4917
  {
4918
4918
  className: "text-blue-600 font-semibold hover:text-blue-800",
4919
4919
  onClick: () => {
4920
- g(f.key), u(x);
4920
+ b(g.key), u(x);
4921
4921
  },
4922
- children: E.length > 0 ? "Edit" : "Assign"
4922
+ children: F.length > 0 ? "Edit" : "Assign"
4923
4923
  }
4924
4924
  )
4925
4925
  ] });
@@ -4929,8 +4929,8 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4929
4929
  X,
4930
4930
  {
4931
4931
  type: "color",
4932
- value: N[f.key] || "#000000",
4933
- onChange: (k) => v(x, k.target.value),
4932
+ value: N[g.key] || "#000000",
4933
+ onChange: (C) => v(x, C.target.value),
4934
4934
  className: "w-full h-10"
4935
4935
  }
4936
4936
  );
@@ -4940,26 +4940,26 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4940
4940
  X,
4941
4941
  {
4942
4942
  type: "range",
4943
- value: N[f.key] || f.min || 0,
4944
- onChange: (k) => v(x, k.target.value),
4945
- min: f.min || 0,
4946
- max: f.max || 100,
4947
- step: f.step || 1,
4943
+ value: N[g.key] || g.min || 0,
4944
+ onChange: (C) => v(x, C.target.value),
4945
+ min: g.min || 0,
4946
+ max: g.max || 100,
4947
+ step: g.step || 1,
4948
4948
  className: "w-full"
4949
4949
  }
4950
4950
  ),
4951
- /* @__PURE__ */ e("span", { className: "text-sm text-gray-500", children: N[f.key] || f.min || 0 })
4951
+ /* @__PURE__ */ e("span", { className: "text-sm text-gray-500", children: N[g.key] || g.min || 0 })
4952
4952
  ] });
4953
4953
  case "file":
4954
4954
  return (N, x) => /* @__PURE__ */ e(
4955
4955
  X,
4956
4956
  {
4957
4957
  type: "file",
4958
- onChange: (k) => {
4959
- const E = k.target.files[0];
4960
- v(x, E ? E.name : "");
4958
+ onChange: (C) => {
4959
+ const F = C.target.files[0];
4960
+ v(x, F ? F.name : "");
4961
4961
  },
4962
- accept: f.accept,
4962
+ accept: g.accept,
4963
4963
  className: "w-full"
4964
4964
  }
4965
4965
  );
@@ -4968,8 +4968,8 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4968
4968
  X,
4969
4969
  {
4970
4970
  type: "hidden",
4971
- value: N[f.key] || "",
4972
- onChange: (k) => v(x, k.target.value)
4971
+ value: N[g.key] || "",
4972
+ onChange: (C) => v(x, C.target.value)
4973
4973
  }
4974
4974
  );
4975
4975
  // Default fallback for unknown field types
@@ -4978,60 +4978,60 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4978
4978
  /* @__PURE__ */ e(
4979
4979
  X,
4980
4980
  {
4981
- value: N[f.key] || "",
4982
- onChange: (k) => v(x, k.target.value),
4983
- placeholder: f.placeholder || `Enter ${f.label}`,
4984
- required: f.required,
4981
+ value: N[g.key] || "",
4982
+ onChange: (C) => v(x, C.target.value),
4983
+ placeholder: g.placeholder || `Enter ${g.label}`,
4984
+ required: g.required,
4985
4985
  className: `w-full ${w(x) ? "border-red-500" : ""}`
4986
4986
  }
4987
4987
  ),
4988
- C(x)
4988
+ z(x)
4989
4989
  ] });
4990
4990
  }
4991
- }, T = ne(() => {
4992
- console.log("[DataTableRenderer] Adding blank row"), r((f) => {
4993
- console.log("[DataTableRenderer] Current data before add:", f);
4991
+ }, T = ae(() => {
4992
+ console.log("[DataTableRenderer] Adding blank row"), r((g) => {
4993
+ console.log("[DataTableRenderer] Current data before add:", g);
4994
4994
  const v = {
4995
- id: f.length
4995
+ id: g.length
4996
4996
  // Assign next available ID
4997
4997
  };
4998
- l.fields.forEach((C) => {
4999
- C.fieldtype === "audience" ? v[C.key] = { users: [], groups: [], roles: [] } : v[C.key] = C.default || "";
4998
+ l.fields.forEach((z) => {
4999
+ z.fieldtype === "audience" ? v[z.key] = { users: [], groups: [], roles: [] } : v[z.key] = z.default || "";
5000
5000
  }), console.log("[DataTableRenderer] New blank row:", v);
5001
- const w = [...f, v];
5001
+ const w = [...g, v];
5002
5002
  return console.log("[DataTableRenderer] Updated data:", w), w;
5003
5003
  });
5004
- }, [l.fields]), F = ne((f) => {
5004
+ }, [l.fields]), A = ae((g) => {
5005
5005
  r((v) => {
5006
5006
  if (v.length <= 1)
5007
5007
  return v;
5008
5008
  const w = [...v];
5009
- return w.splice(f, 1), w;
5009
+ return w.splice(g, 1), w;
5010
5010
  });
5011
- }, []), [A, I] = M(null), V = ne((f, v) => {
5012
- I(v), f.dataTransfer.effectAllowed = "move", f.dataTransfer.setData("text/html", "");
5013
- }, []), U = ne((f) => {
5014
- f.preventDefault(), f.dataTransfer.dropEffect = "move";
5015
- }, []), G = ne((f, v) => {
5016
- f.preventDefault(), !(A === null || A === v) && (r((w) => {
5017
- const C = [...w], N = C[A];
5018
- return C.splice(A, 1), C.splice(v, 0, N), C;
5011
+ }, []), [E, I] = M(null), j = ae((g, v) => {
5012
+ I(v), g.dataTransfer.effectAllowed = "move", g.dataTransfer.setData("text/html", "");
5013
+ }, []), _ = ae((g) => {
5014
+ g.preventDefault(), g.dataTransfer.dropEffect = "move";
5015
+ }, []), G = ae((g, v) => {
5016
+ g.preventDefault(), !(E === null || E === v) && (r((w) => {
5017
+ const z = [...w], N = z[E];
5018
+ return z.splice(E, 1), z.splice(v, 0, N), z;
5019
5019
  }), I(null));
5020
- }, [A]), B = ne(() => {
5020
+ }, [E]), q = ae(() => {
5021
5021
  I(null);
5022
- }, []), z = ne((f) => {
5023
- console.log("[DataTableRenderer] handleAddAudience called with:", f), r((v) => {
5022
+ }, []), k = ae((g) => {
5023
+ console.log("[DataTableRenderer] handleAddAudience called with:", g), r((v) => {
5024
5024
  const w = [...v];
5025
5025
  if (o !== null && p && w[o]) {
5026
- const C = f.pendingInvites || [], N = C.filter((E) => E.type === "User"), x = C.filter((E) => E.type === "Group"), k = C.filter((E) => E.type === "Role");
5026
+ const z = g.pendingInvites || [], N = z.filter((F) => F.type === "User"), x = z.filter((F) => F.type === "Group"), C = z.filter((F) => F.type === "Role");
5027
5027
  w[o][p] = {
5028
5028
  users: [...w[o][p]?.users || [], ...N],
5029
5029
  groups: [...w[o][p]?.groups || [], ...x],
5030
- roles: [...w[o][p]?.roles || [], ...k]
5030
+ roles: [...w[o][p]?.roles || [], ...C]
5031
5031
  }, console.log("[DataTableRenderer] Updated audience data:", w[o][p]);
5032
5032
  }
5033
5033
  return w;
5034
- }), u(null), g(null);
5034
+ }), u(null), b(null);
5035
5035
  }, [o, p]);
5036
5036
  return /* @__PURE__ */ n("div", { children: [
5037
5037
  /* @__PURE__ */ n("div", { style: { marginBottom: "20px" }, children: [
@@ -5051,32 +5051,32 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5051
5051
  /* @__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: [
5052
5052
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { className: "bg-gray-50", children: [
5053
5053
  /* @__PURE__ */ e("th", { className: "px-4 py-2 w-10" }),
5054
- l.fields.map((f, v) => /* @__PURE__ */ e(
5054
+ l.fields.map((g, v) => /* @__PURE__ */ e(
5055
5055
  "th",
5056
5056
  {
5057
5057
  className: "px-4 py-2 text-left text-sm font-medium text-gray-700",
5058
- children: f.label || f.key
5058
+ children: g.label || g.key
5059
5059
  },
5060
5060
  v
5061
5061
  )),
5062
5062
  /* @__PURE__ */ e("th", { className: "px-4 py-2 w-16" })
5063
5063
  ] }) }),
5064
- /* @__PURE__ */ e("tbody", { children: b.map((f, v) => /* @__PURE__ */ n(
5064
+ /* @__PURE__ */ e("tbody", { children: f.map((g, v) => /* @__PURE__ */ n(
5065
5065
  "tr",
5066
5066
  {
5067
- className: `hover:bg-gray-50 ${A === v ? "opacity-50" : ""}`,
5067
+ className: `hover:bg-gray-50 ${E === v ? "opacity-50" : ""}`,
5068
5068
  draggable: !0,
5069
- onDragStart: (w) => V(w, v),
5070
- onDragOver: U,
5069
+ onDragStart: (w) => j(w, v),
5070
+ onDragOver: _,
5071
5071
  onDrop: (w) => G(w, v),
5072
- onDragEnd: B,
5072
+ onDragEnd: q,
5073
5073
  children: [
5074
5074
  /* @__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(Nt, { size: 16 }) }) }),
5075
- l.fields.map((w, C) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: $(w)(f, v) }, C)),
5075
+ l.fields.map((w, z) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: $(w)(g, v) }, z)),
5076
5076
  /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e(
5077
5077
  "button",
5078
5078
  {
5079
- onClick: () => F(v),
5079
+ onClick: () => A(v),
5080
5080
  className: "text-red-500 hover:text-red-700",
5081
5081
  title: "Delete row",
5082
5082
  children: /* @__PURE__ */ e(vr, { size: 16 })
@@ -5088,27 +5088,27 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5088
5088
  )) })
5089
5089
  ] }) }),
5090
5090
  o !== null && (() => {
5091
- const f = b[o] && b[o][p] ? {
5092
- users: b[o][p].users || [],
5093
- groups: b[o][p].groups || [],
5094
- roles: b[o][p].roles || []
5091
+ const g = f[o] && f[o][p] ? {
5092
+ users: f[o][p].users || [],
5093
+ groups: f[o][p].groups || [],
5094
+ roles: f[o][p].roles || []
5095
5095
  } : { users: [], groups: [], roles: [] };
5096
- return console.log("[DataTableRenderer] Opening modal with existing data:", f), console.log("[DataTableRenderer] Row data:", b[o]), console.log("[DataTableRenderer] Field name:", p), /* @__PURE__ */ e(
5096
+ return console.log("[DataTableRenderer] Opening modal with existing data:", g), console.log("[DataTableRenderer] Row data:", f[o]), console.log("[DataTableRenderer] Field name:", p), /* @__PURE__ */ e(
5097
5097
  os,
5098
5098
  {
5099
5099
  isOpen: !0,
5100
5100
  onClose: () => {
5101
- u(null), g(null);
5101
+ u(null), b(null);
5102
5102
  },
5103
- onFinalSubmit: z,
5104
- existingShares: f,
5103
+ onFinalSubmit: k,
5104
+ existingShares: g,
5105
5105
  allowedPermissions: ["view", "remove"]
5106
5106
  }
5107
5107
  );
5108
5108
  })()
5109
5109
  ] });
5110
5110
  }
5111
- const Pe = {
5111
+ const Oe = {
5112
5112
  containerId: "ui-toast",
5113
5113
  position: "bottom-right",
5114
5114
  autoClose: 3500,
@@ -5122,12 +5122,12 @@ const Mt = () => {
5122
5122
  }, Bt = () => {
5123
5123
  typeof document > "u" || (He = Math.max(0, He - 1), He === 0 && document.body.classList.remove("toast-backdrop"));
5124
5124
  }, De = {
5125
- success: (t, a) => me.success(t, { ...Pe, ...a }),
5126
- info: (t, a) => me.info(t, { ...Pe, ...a }),
5127
- warn: (t, a) => me.warn(t, { ...Pe, ...a }),
5125
+ success: (t, a) => me.success(t, { ...Oe, ...a }),
5126
+ info: (t, a) => me.info(t, { ...Oe, ...a }),
5127
+ warn: (t, a) => me.warn(t, { ...Oe, ...a }),
5128
5128
  // Error: no autoClose + modal-like behavior via backdrop
5129
5129
  error: (t, a) => me.error(t, {
5130
- ...Pe,
5130
+ ...Oe,
5131
5131
  autoClose: !1,
5132
5132
  closeOnClick: !1,
5133
5133
  draggable: !1,
@@ -5150,7 +5150,7 @@ const Mt = () => {
5150
5150
  onClose: Bt
5151
5151
  }
5152
5152
  },
5153
- { ...Pe, ...s }
5153
+ { ...Oe, ...s }
5154
5154
  )
5155
5155
  }, Ye = (t) => {
5156
5156
  try {
@@ -5175,113 +5175,113 @@ const Mt = () => {
5175
5175
  initialData: p = null
5176
5176
  // Add prop for initial demo data
5177
5177
  }) => {
5178
- const [g, b] = M(null), [r, y] = M(""), [d, h] = M(() => Array.isArray(p) ? p : []), [$, T] = M(null), [F, A] = M(null), [I, V] = M(""), U = async () => {
5178
+ const [b, f] = M(null), [r, y] = M(""), [d, h] = M(() => Array.isArray(p) ? p : []), [$, T] = M(null), [A, E] = M(null), [I, j] = M(""), _ = async () => {
5179
5179
  try {
5180
5180
  const S = await Ve(t.collectionList);
5181
5181
  if (S) {
5182
- const O = S.map((D, P) => ({
5182
+ const P = S.map((D, O) => ({
5183
5183
  ...D,
5184
- order: typeof D.order == "number" ? D.order : P + 1
5184
+ order: typeof D.order == "number" ? D.order : O + 1
5185
5185
  }));
5186
- O.sort((D, P) => (D.order ?? 0) - (P.order ?? 0)), h(O), s?.(O);
5186
+ P.sort((D, O) => (D.order ?? 0) - (O.order ?? 0)), h(P), s?.(P);
5187
5187
  }
5188
5188
  } catch (S) {
5189
5189
  console.log("Error loading collections:", S), typeof window < "u" && !window.location.pathname.includes("iframe.html") && me.error("Failed to load collections");
5190
5190
  }
5191
5191
  };
5192
5192
  Z(() => {
5193
- (!p || p.length === 0) && U();
5193
+ (!p || p.length === 0) && _();
5194
5194
  }, [p]), Z(() => {
5195
5195
  Array.isArray(p) && h(p);
5196
5196
  }, [p]);
5197
5197
  const G = (S) => {
5198
- m && (b(S.id), y(S.categoryName || ""));
5199
- }, B = () => {
5200
- if (!l || g !== null) return;
5198
+ m && (f(S.id), y(S.categoryName || ""));
5199
+ }, q = () => {
5200
+ if (!l || b !== null) return;
5201
5201
  const S = `temp-${Date.now()}`;
5202
- h((O) => [
5203
- ...O,
5202
+ h((P) => [
5203
+ ...P,
5204
5204
  {
5205
5205
  id: S,
5206
5206
  categoryName: "",
5207
5207
  links: [],
5208
- order: (O.at(-1)?.order ?? 0) + 1,
5208
+ order: (P.at(-1)?.order ?? 0) + 1,
5209
5209
  _temp: !0
5210
5210
  }
5211
- ]), b(S), y("");
5212
- }, z = () => {
5213
- g != null && (h((S) => {
5214
- const O = S.find((P) => P.id === g), D = O && O._temp ? S.filter((P) => P.id !== g) : S;
5211
+ ]), f(S), y("");
5212
+ }, k = () => {
5213
+ b != null && (h((S) => {
5214
+ const P = S.find((O) => O.id === b), D = P && P._temp ? S.filter((O) => O.id !== b) : S;
5215
5215
  return s?.(D), D;
5216
- }), b(null), y(""));
5217
- }, f = async () => {
5218
- if (g == null || !r.trim()) return;
5219
- const S = typeof g == "string" && g.startsWith("temp-");
5216
+ }), f(null), y(""));
5217
+ }, g = async () => {
5218
+ if (b == null || !r.trim()) return;
5219
+ const S = typeof b == "string" && b.startsWith("temp-");
5220
5220
  try {
5221
5221
  if (S) {
5222
- const O = await _e(t.collectionCreate, {
5222
+ const P = await _e(t.collectionCreate, {
5223
5223
  categoryName: r.trim(),
5224
5224
  order: (Array.isArray(d) && d.length > 0 ? d.at(-1)?.order ?? 0 : 0) + 1
5225
5225
  });
5226
- O && (h((D) => {
5227
- const P = D.map((_) => _.id === g ? O : _);
5228
- return s?.(P), P;
5226
+ P && (h((D) => {
5227
+ const O = D.map((V) => V.id === b ? P : V);
5228
+ return s?.(O), O;
5229
5229
  }), De.success("Collection created successfully"));
5230
5230
  } else {
5231
- const O = await Zn(
5232
- `${t.collectionUpdate}/${g}?newName=${r.trim()}`
5231
+ const P = await Zn(
5232
+ `${t.collectionUpdate}/${b}?newName=${r.trim()}`
5233
5233
  );
5234
5234
  h((D) => {
5235
- const P = D.map(
5236
- (_) => _.id === g ? O && O.id ? { ..._, ...O } : { ..._, categoryName: r.trim() } : _
5235
+ const O = D.map(
5236
+ (V) => V.id === b ? P && P.id ? { ...V, ...P } : { ...V, categoryName: r.trim() } : V
5237
5237
  );
5238
- return s?.(P), P;
5238
+ return s?.(O), O;
5239
5239
  }), me.success("Collection updated successfully");
5240
5240
  }
5241
- b(null), y("");
5242
- } catch (O) {
5243
- console.log(O), me.error("Failed to save collection");
5241
+ f(null), y("");
5242
+ } catch (P) {
5243
+ console.log(P), me.error("Failed to save collection");
5244
5244
  }
5245
5245
  }, v = async (S) => {
5246
5246
  if (o)
5247
5247
  try {
5248
- await Qn(`${t.collectionUpdate}/${S.id}`) && (me.success("Deleted successfully", { autoClose: 3e3 }), U());
5249
- } catch (O) {
5250
- console.log(O), me.error("Failed to delete collection");
5248
+ await Qn(`${t.collectionUpdate}/${S.id}`) && (me.success("Deleted successfully", { autoClose: 3e3 }), _());
5249
+ } catch (P) {
5250
+ console.log(P), me.error("Failed to delete collection");
5251
5251
  }
5252
- }, w = (S, O, D) => {
5253
- if (!u || !O || !D || O === D) return S;
5254
- const P = S.findIndex((W) => W.id === O), _ = S.findIndex((W) => W.id === D);
5255
- if (P === -1 || _ === -1) return S;
5256
- const R = [...S], [Y] = R.splice(P, 1);
5257
- return R.splice(_, 0, Y), R.map((W, pe) => ({ ...W, order: pe + 1 }));
5258
- }, C = async (S) => {
5259
- const O = S.map((D) => ({
5252
+ }, w = (S, P, D) => {
5253
+ if (!u || !P || !D || P === D) return S;
5254
+ const O = S.findIndex((W) => W.id === P), V = S.findIndex((W) => W.id === D);
5255
+ if (O === -1 || V === -1) return S;
5256
+ const R = [...S], [Y] = R.splice(O, 1);
5257
+ return R.splice(V, 0, Y), R.map((W, pe) => ({ ...W, order: pe + 1 }));
5258
+ }, z = async (S) => {
5259
+ const P = S.map((D) => ({
5260
5260
  id: D.id,
5261
5261
  order: D.order,
5262
5262
  categoryName: D.categoryName
5263
5263
  }));
5264
5264
  try {
5265
- await _e(t.updateCollection, O);
5265
+ await _e(t.updateCollection, P);
5266
5266
  } catch (D) {
5267
5267
  console.log(D), me.error("Failed to save order", { autoClose: 2500 });
5268
5268
  }
5269
- }, N = (S, O) => {
5270
- u && (S.dataTransfer.effectAllowed = "move", S.dataTransfer.setData("text/plain", String(O)), T(O));
5269
+ }, N = (S, P) => {
5270
+ u && (S.dataTransfer.effectAllowed = "move", S.dataTransfer.setData("text/plain", String(P)), T(P));
5271
5271
  }, x = (S) => {
5272
- $ && S !== F && A(S);
5273
- }, k = (S) => {
5272
+ $ && S !== A && E(S);
5273
+ }, C = (S) => {
5274
5274
  S.preventDefault();
5275
- }, E = async (S, O) => {
5275
+ }, F = async (S, P) => {
5276
5276
  S.preventDefault();
5277
5277
  const D = S.dataTransfer.getData("text/plain");
5278
- D && (h((P) => {
5279
- const _ = w(P, D, O);
5280
- return console.log("Reordered", _), C(_), s?.(_), _;
5281
- }), T(null), A(null));
5278
+ D && (h((O) => {
5279
+ const V = w(O, D, P);
5280
+ return console.log("Reordered", V), z(V), s?.(V), V;
5281
+ }), T(null), E(null));
5282
5282
  }, L = () => {
5283
- T(null), A(null);
5284
- }, q = Array.isArray(d) ? d.filter(
5283
+ T(null), E(null);
5284
+ }, U = Array.isArray(d) ? d.filter(
5285
5285
  (S) => S.categoryName?.toLowerCase().includes(I.toLowerCase())
5286
5286
  ) : [];
5287
5287
  return /* @__PURE__ */ n("div", { className: `manage-collection-list ${a}`, children: [
@@ -5290,7 +5290,7 @@ const Mt = () => {
5290
5290
  be,
5291
5291
  {
5292
5292
  value: I,
5293
- onDebouncedChange: V,
5293
+ onDebouncedChange: j,
5294
5294
  placeholder: "Search Collection",
5295
5295
  customClass: "mr-4 searchmanagecollection"
5296
5296
  }
@@ -5300,30 +5300,30 @@ const Mt = () => {
5300
5300
  {
5301
5301
  className: [
5302
5302
  "px-4 py-3 bg-black text-white rounded-2xl ml-4",
5303
- g !== null ? "opacity-60 cursor-not-allowed" : "cursor-pointer"
5303
+ b !== null ? "opacity-60 cursor-not-allowed" : "cursor-pointer"
5304
5304
  ].join(" "),
5305
- onClick: B,
5306
- disabled: g !== null,
5305
+ onClick: q,
5306
+ disabled: b !== null,
5307
5307
  children: "Add a Collection"
5308
5308
  }
5309
5309
  )
5310
5310
  ] }) }),
5311
- /* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: q.map((S) => {
5312
- const O = g === S.id, D = S?.links?.length ?? 0, P = $ === S.id, _ = F === S.id && $ !== S.id;
5311
+ /* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: U.map((S) => {
5312
+ const P = b === S.id, D = S?.links?.length ?? 0, O = $ === S.id, V = A === S.id && $ !== S.id;
5313
5313
  return /* @__PURE__ */ e(
5314
5314
  "div",
5315
5315
  {
5316
5316
  onDragEnter: () => x(S.id),
5317
- onDragOver: k,
5318
- onDrop: (R) => E(R, S.id),
5317
+ onDragOver: C,
5318
+ onDrop: (R) => F(R, S.id),
5319
5319
  onDragEnd: L,
5320
5320
  className: [
5321
5321
  "flex items-center justify-between p-3 border rounded-2xl mb-3",
5322
5322
  "border-gray-300",
5323
- _ ? "ring-2 ring-gray-800/20" : "",
5324
- P ? "opacity-60" : ""
5323
+ V ? "ring-2 ring-gray-800/20" : "",
5324
+ O ? "opacity-60" : ""
5325
5325
  ].join(" "),
5326
- children: O ? /* @__PURE__ */ n(te, { children: [
5326
+ children: P ? /* @__PURE__ */ n(te, { children: [
5327
5327
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2 flex-1", children: /* @__PURE__ */ e(
5328
5328
  "input",
5329
5329
  {
@@ -5333,7 +5333,7 @@ const Mt = () => {
5333
5333
  placeholder: S._temp ? "New collection name" : "Edit collection name",
5334
5334
  onChange: (R) => y(R.target.value),
5335
5335
  onKeyDown: (R) => {
5336
- R.key === "Enter" && f(), R.key === "Escape" && z();
5336
+ R.key === "Enter" && g(), R.key === "Escape" && k();
5337
5337
  },
5338
5338
  autoFocus: !0
5339
5339
  }
@@ -5343,7 +5343,7 @@ const Mt = () => {
5343
5343
  "button",
5344
5344
  {
5345
5345
  className: "cursor-pointer border border-gray-300 p-2 rounded-2xl",
5346
- onClick: z,
5346
+ onClick: k,
5347
5347
  "aria-label": "Cancel edit",
5348
5348
  children: /* @__PURE__ */ e(ge, { color: "#767676" })
5349
5349
  }
@@ -5355,7 +5355,7 @@ const Mt = () => {
5355
5355
  "border p-2 rounded-2xl",
5356
5356
  r.trim() ? "cursor-pointer border-gray-300" : "cursor-not-allowed border-gray-200"
5357
5357
  ].join(" "),
5358
- onClick: f,
5358
+ onClick: g,
5359
5359
  "aria-label": "Save",
5360
5360
  disabled: !r.trim(),
5361
5361
  title: r.trim() ? "Save" : "Name required",
@@ -5413,8 +5413,8 @@ const Mt = () => {
5413
5413
  initialData: o = null,
5414
5414
  showSearch: u = !0,
5415
5415
  allowAdd: p = !0,
5416
- allowEdit: g = !0,
5417
- allowDelete: b = !0,
5416
+ allowEdit: b = !0,
5417
+ allowDelete: f = !0,
5418
5418
  allowReorder: r = !0,
5419
5419
  className: y = ""
5420
5420
  } = t, d = a?.[t.key] || o || [], h = Array.isArray(d) ? d : [];
@@ -5434,8 +5434,8 @@ const Mt = () => {
5434
5434
  },
5435
5435
  showSearch: u,
5436
5436
  allowAdd: p,
5437
- allowEdit: g,
5438
- allowDelete: b,
5437
+ allowEdit: b,
5438
+ allowDelete: f,
5439
5439
  allowReorder: r
5440
5440
  }
5441
5441
  )
@@ -5463,122 +5463,122 @@ function Ss({
5463
5463
  onCancel: i,
5464
5464
  onSave: l
5465
5465
  }) {
5466
- const [m, o] = se.useState(a), [u, p] = se.useState(null), [g, b] = M(!1), [r, y] = M(!1), [d, h] = M({}), $ = `${Se()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, T = $, [F, A] = M(1), I = (w) => {
5466
+ const [m, o] = se.useState(a), [u, p] = se.useState(null), [b, f] = M(!1), [r, y] = M(!1), [d, h] = M({}), $ = `${Se()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, T = $, [A, E] = M(1), I = (w) => {
5467
5467
  if (!a || !a.configuration)
5468
5468
  return w;
5469
- const C = {}, N = w?.configuration || {};
5469
+ const z = {}, N = w?.configuration || {};
5470
5470
  return a.configuration.forEach((x) => {
5471
5471
  if (x.key && x.type === "datatable") {
5472
- const E = (N[x.key] || []).map((L, q) => {
5472
+ const F = (N[x.key] || []).map((L, U) => {
5473
5473
  const S = { id: L.id || 0 };
5474
- return x.fields && x.fields.forEach((O) => {
5475
- if (O.fieldtype === "audience") {
5474
+ return x.fields && x.fields.forEach((P) => {
5475
+ if (P.fieldtype === "audience") {
5476
5476
  let D = { users: [], groups: [], roles: [] };
5477
- L[O.key] && (Array.isArray(L[O.key]) ? D = { users: [], groups: [], roles: [] } : typeof L[O.key] == "object" && (D = {
5478
- users: L[O.key].users || [],
5479
- groups: L[O.key].groups || [],
5480
- roles: L[O.key].roles || []
5481
- })), S[O.key] = D;
5477
+ L[P.key] && (Array.isArray(L[P.key]) ? D = { users: [], groups: [], roles: [] } : typeof L[P.key] == "object" && (D = {
5478
+ users: L[P.key].users || [],
5479
+ groups: L[P.key].groups || [],
5480
+ roles: L[P.key].roles || []
5481
+ })), S[P.key] = D;
5482
5482
  } else
5483
- S[O.key] = L[O.key] || O.default || "";
5483
+ S[P.key] = L[P.key] || P.default || "";
5484
5484
  }), S;
5485
5485
  });
5486
- if (E.length === 0) {
5486
+ if (F.length === 0) {
5487
5487
  const L = { id: 0 };
5488
- x.fields && x.fields.forEach((q) => {
5489
- q.fieldtype === "audience" ? L[q.key] = { users: [], groups: [], roles: [] } : L[q.key] = q.default || "";
5490
- }), E.push(L);
5488
+ x.fields && x.fields.forEach((U) => {
5489
+ U.fieldtype === "audience" ? L[U.key] = { users: [], groups: [], roles: [] } : L[U.key] = U.default || "";
5490
+ }), F.push(L);
5491
5491
  }
5492
- C[x.key] = E;
5493
- } else x.key && (C[x.key] = N[x.key] || {});
5494
- }), C;
5495
- }, V = () => {
5492
+ z[x.key] = F;
5493
+ } else x.key && (z[x.key] = N[x.key] || {});
5494
+ }), z;
5495
+ }, j = () => {
5496
5496
  if (a && a.configuration) {
5497
5497
  const w = {};
5498
- a.configuration.forEach((C) => {
5499
- if (C.key)
5500
- if (C.type === "datatable") {
5498
+ a.configuration.forEach((z) => {
5499
+ if (z.key)
5500
+ if (z.type === "datatable") {
5501
5501
  const N = { id: 0 };
5502
- C.fields && C.fields.forEach((x) => {
5502
+ z.fields && z.fields.forEach((x) => {
5503
5503
  x.fieldtype === "audience" ? N[x.key] = { users: [], groups: [], roles: [] } : N[x.key] = x.default || "";
5504
- }), w[C.key] = [N];
5505
- } else if (C.type === "section") {
5504
+ }), w[z.key] = [N];
5505
+ } else if (z.type === "section") {
5506
5506
  const N = {};
5507
- C.fields && Array.isArray(C.fields) && C.fields.forEach((x) => {
5507
+ z.fields && Array.isArray(z.fields) && z.fields.forEach((x) => {
5508
5508
  x.key && (N[x.key] = x.default || "");
5509
- }), w[C.key] = N;
5509
+ }), w[z.key] = N;
5510
5510
  } else
5511
- w[C.key] = {};
5511
+ w[z.key] = {};
5512
5512
  }), p(w);
5513
5513
  }
5514
5514
  };
5515
5515
  Z(() => {
5516
5516
  if (s) {
5517
- b(!1);
5517
+ f(!1);
5518
5518
  return;
5519
5519
  }
5520
5520
  const w = async () => {
5521
5521
  try {
5522
- b(!0);
5523
- let C = await Ve($);
5524
- if (C) {
5525
- const N = I(C);
5522
+ f(!0);
5523
+ let z = await Ve($);
5524
+ if (z) {
5525
+ const N = I(z);
5526
5526
  p(N);
5527
5527
  } else
5528
- V();
5529
- } catch (C) {
5530
- console.error("Error fetching configuration:", C);
5528
+ j();
5529
+ } catch (z) {
5530
+ console.error("Error fetching configuration:", z);
5531
5531
  let N = "Failed to load configuration";
5532
- if (C.response) {
5533
- const x = C.response.status, k = C.response.data?.message || C.response.data?.error;
5534
- x === 400 ? N = k || "Invalid request. Please check the application ID." : x === 401 ? N = "You are not authorized to access this configuration." : x === 403 ? N = "Access denied. You don't have permission to view this configuration." : x === 404 ? N = "Configuration not found. It may not exist yet or the application ID is incorrect." : x >= 500 ? N = k || "Server error. Please try again later." : N = k || `Failed to load configuration (Error ${x})`;
5535
- } else C.request ? N = "Network error. Please check your connection and try again." : N = C.message || "An unexpected error occurred while loading configuration.";
5536
- De.error(N), V();
5532
+ if (z.response) {
5533
+ const x = z.response.status, C = z.response.data?.message || z.response.data?.error;
5534
+ x === 400 ? N = C || "Invalid request. Please check the application ID." : x === 401 ? N = "You are not authorized to access this configuration." : x === 403 ? N = "Access denied. You don't have permission to view this configuration." : x === 404 ? N = "Configuration not found. It may not exist yet or the application ID is incorrect." : x >= 500 ? N = C || "Server error. Please try again later." : N = C || `Failed to load configuration (Error ${x})`;
5535
+ } else z.request ? N = "Network error. Please check your connection and try again." : N = z.message || "An unexpected error occurred while loading configuration.";
5536
+ De.error(N), j();
5537
5537
  } finally {
5538
- b(!1);
5538
+ f(!1);
5539
5539
  }
5540
5540
  };
5541
- a && (o(a), t ? w() : V());
5542
- }, [a, F, t, s]);
5543
- const U = (w, C) => {
5541
+ a && (o(a), t ? w() : j());
5542
+ }, [a, A, t, s]);
5543
+ const _ = (w, z) => {
5544
5544
  p((N) => ({
5545
5545
  ...N,
5546
- [w]: C
5546
+ [w]: z
5547
5547
  })), h((N) => {
5548
5548
  const x = { ...N };
5549
5549
  return x[w] && delete x[w], x;
5550
5550
  });
5551
5551
  }, G = () => {
5552
5552
  const w = {};
5553
- return !m || !u || m.configuration.forEach((C) => {
5554
- if (C.type === "section")
5555
- C.fields.forEach((N) => {
5553
+ return !m || !u || m.configuration.forEach((z) => {
5554
+ if (z.type === "section")
5555
+ z.fields.forEach((N) => {
5556
5556
  if (N.required) {
5557
- const x = u[C.key]?.[N.key];
5558
- (!x || typeof x == "string" && x.trim() === "") && (w[C.key] || (w[C.key] = {}), w[C.key][N.key] = `${N.label} is required`);
5557
+ const x = u[z.key]?.[N.key];
5558
+ (!x || typeof x == "string" && x.trim() === "") && (w[z.key] || (w[z.key] = {}), w[z.key][N.key] = `${N.label} is required`);
5559
5559
  }
5560
5560
  });
5561
- else if (C.type === "datatable") {
5562
- const N = u[C.key];
5563
- Array.isArray(N) && N.forEach((x, k) => {
5564
- C.fields.forEach((E) => {
5565
- if (E.required) {
5566
- const L = x[E.key];
5567
- (!L || typeof L == "string" && L.trim() === "") && (w[C.key] || (w[C.key] = {}), w[C.key][k] || (w[C.key][k] = {}), w[C.key][k][E.key] = `${E.label} is required`);
5561
+ else if (z.type === "datatable") {
5562
+ const N = u[z.key];
5563
+ Array.isArray(N) && N.forEach((x, C) => {
5564
+ z.fields.forEach((F) => {
5565
+ if (F.required) {
5566
+ const L = x[F.key];
5567
+ (!L || typeof L == "string" && L.trim() === "") && (w[z.key] || (w[z.key] = {}), w[z.key][C] || (w[z.key][C] = {}), w[z.key][C][F.key] = `${F.label} is required`);
5568
5568
  }
5569
5569
  });
5570
5570
  });
5571
5571
  }
5572
5572
  }), w;
5573
- }, B = (w) => Object.keys(w).length > 0, z = () => {
5573
+ }, q = (w) => Object.keys(w).length > 0, k = () => {
5574
5574
  const w = G();
5575
- if (h(w), B(w)) {
5575
+ if (h(w), q(w)) {
5576
5576
  let N = [];
5577
5577
  Object.keys(w).forEach((x) => {
5578
- typeof w[x] == "object" && Object.keys(w[x]).forEach((k) => {
5579
- typeof w[x][k] == "object" ? Object.keys(w[x][k]).forEach((E) => {
5580
- N.push(`${x} row ${parseInt(k) + 1}: ${w[x][k][E]}`);
5581
- }) : N.push(`${x}: ${w[x][k]}`);
5578
+ typeof w[x] == "object" && Object.keys(w[x]).forEach((C) => {
5579
+ typeof w[x][C] == "object" ? Object.keys(w[x][C]).forEach((F) => {
5580
+ N.push(`${x} row ${parseInt(C) + 1}: ${w[x][C][F]}`);
5581
+ }) : N.push(`${x}: ${w[x][C]}`);
5582
5582
  });
5583
5583
  });
5584
5584
  return;
@@ -5587,30 +5587,30 @@ function Ss({
5587
5587
  try {
5588
5588
  y(!0);
5589
5589
  const N = {};
5590
- u && Object.keys(u).forEach((k) => {
5591
- const E = a?.configuration?.find(
5592
- (L) => L.key === k && L.type === "datatable"
5590
+ u && Object.keys(u).forEach((C) => {
5591
+ const F = a?.configuration?.find(
5592
+ (L) => L.key === C && L.type === "datatable"
5593
5593
  );
5594
- E && Array.isArray(u[k]) ? N[k] = u[k].map((L) => {
5595
- const q = { id: L.id || 0 };
5596
- return E.fields && E.fields.forEach((S) => {
5594
+ F && Array.isArray(u[C]) ? N[C] = u[C].map((L) => {
5595
+ const U = { id: L.id || 0 };
5596
+ return F.fields && F.fields.forEach((S) => {
5597
5597
  if (S.fieldtype === "audience") {
5598
- let O = { users: [], groups: [], roles: [] };
5599
- L[S.key] && typeof L[S.key] == "object" && !Array.isArray(L[S.key]) && (O = {
5598
+ let P = { users: [], groups: [], roles: [] };
5599
+ L[S.key] && typeof L[S.key] == "object" && !Array.isArray(L[S.key]) && (P = {
5600
5600
  users: L[S.key].users || [],
5601
5601
  groups: L[S.key].groups || [],
5602
5602
  roles: L[S.key].roles || []
5603
- }), q[S.key] = O;
5603
+ }), U[S.key] = P;
5604
5604
  } else
5605
- q[S.key] = L[S.key] || "";
5606
- }), q;
5607
- }) : N[k] = u[k];
5605
+ U[S.key] = L[S.key] || "";
5606
+ }), U;
5607
+ }) : N[C] = u[C];
5608
5608
  });
5609
5609
  let x = await _e(T, N);
5610
5610
  if (console.log(), x && x.status != "fail") {
5611
5611
  h({});
5612
- const k = x.message || "Configuration has been saved successfully";
5613
- De.success(k), l && typeof l == "function" && l(u);
5612
+ const C = x.message || "Configuration has been saved successfully";
5613
+ De.success(C), l && typeof l == "function" && l(u);
5614
5614
  } else
5615
5615
  throw De.error(x?.message || "Failed to save configuration"), new Error("No response received from server");
5616
5616
  } catch (N) {
@@ -5619,20 +5619,20 @@ function Ss({
5619
5619
  y(!1);
5620
5620
  }
5621
5621
  })();
5622
- }, f = () => {
5622
+ }, g = () => {
5623
5623
  if (i) {
5624
5624
  i();
5625
5625
  return;
5626
5626
  }
5627
5627
  d && Object.keys(d).length > 0 && !window.confirm(
5628
5628
  "You have validation errors that will be lost. Are you sure you want to cancel?"
5629
- ) || (h({}), p(null), A((C) => C + 1), De.info("Configuration changes cancelled"));
5629
+ ) || (h({}), p(null), E((z) => z + 1), De.info("Configuration changes cancelled"));
5630
5630
  };
5631
5631
  if (!m?.configuration && !a?.configuration)
5632
5632
  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" }) });
5633
5633
  const v = a?.configuration || m?.configuration;
5634
5634
  return Z(() => {
5635
- s && a ? (!u || Object.keys(u).length === 0) && V() : s && !a && V();
5635
+ s && a ? (!u || Object.keys(u).length === 0) && j() : s && !a && j();
5636
5636
  }, [s, a]), /* @__PURE__ */ n("div", { children: [
5637
5637
  /* @__PURE__ */ n(
5638
5638
  "div",
@@ -5640,8 +5640,8 @@ function Ss({
5640
5640
  className: "dynamic-config bg-white w-full h-[calc(100vh-350px)] overflow-y-auto",
5641
5641
  style: { padding: "0px 20px 0px 0px" },
5642
5642
  children: [
5643
- g && /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-64", children: /* @__PURE__ */ e(xa, { size: "large" }) }),
5644
- !g && v?.map((w, C) => {
5643
+ b && /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-64", children: /* @__PURE__ */ e(xa, { size: "large" }) }),
5644
+ !b && v?.map((w, z) => {
5645
5645
  const N = zs(w.type);
5646
5646
  if (N && N !== "UnknownType")
5647
5647
  return /* @__PURE__ */ e(
@@ -5649,10 +5649,10 @@ function Ss({
5649
5649
  {
5650
5650
  item: w,
5651
5651
  data: u,
5652
- updateHandler: U,
5652
+ updateHandler: _,
5653
5653
  validationErrors: d
5654
5654
  },
5655
- C
5655
+ z
5656
5656
  );
5657
5657
  })
5658
5658
  ]
@@ -5663,7 +5663,7 @@ function Ss({
5663
5663
  ee,
5664
5664
  {
5665
5665
  category: "secondary",
5666
- onClick: f,
5666
+ onClick: g,
5667
5667
  label: "Cancel",
5668
5668
  disabled: r
5669
5669
  }
@@ -5672,7 +5672,7 @@ function Ss({
5672
5672
  ee,
5673
5673
  {
5674
5674
  category: "primary",
5675
- onClick: z,
5675
+ onClick: k,
5676
5676
  disabled: r,
5677
5677
  label: r ? "Saving..." : "Apply",
5678
5678
  type: "submit"
@@ -5689,29 +5689,29 @@ const Ql = ({
5689
5689
  const [i, l] = M(0), [m, o] = M(!1), {
5690
5690
  pageHeader: u = {},
5691
5691
  appletHeader: p = {},
5692
- breadcrumb: g = [],
5693
- overview: b = {},
5692
+ breadcrumb: b = [],
5693
+ overview: f = {},
5694
5694
  configuration: r = []
5695
- } = t, y = r.map((B) => {
5696
- if (B.type === "section" && B.fields) {
5697
- const z = [...B.fields], f = z.findIndex((v) => v.key === "appkey");
5698
- if (f !== -1) {
5699
- const v = z[f];
5700
- if (z[f] = {
5701
- ...v,
5695
+ } = t, y = r.map((k) => {
5696
+ if (k.type === "section" && k.fields) {
5697
+ const g = [...k.fields], v = g.findIndex((w) => w.key === "appkey");
5698
+ if (v !== -1) {
5699
+ const w = g[v];
5700
+ if (g[v] = {
5701
+ ...w,
5702
5702
  default: a,
5703
5703
  value: a,
5704
5704
  disabled: !0,
5705
5705
  placeholder: a
5706
- }, z.some((C) => C.key === "displayname")) {
5707
- const C = z.findIndex((x) => x.key === "displayname"), N = z[C] || {};
5708
- z[C] = {
5709
- ...N,
5710
- default: N.default || N.value || a,
5711
- placeholder: N.placeholder || "Enter display name"
5706
+ }, g.some((N) => N.key === "displayname")) {
5707
+ const N = g.findIndex((C) => C.key === "displayname"), x = g[N] || {};
5708
+ g[N] = {
5709
+ ...x,
5710
+ default: x.default || x.value || a,
5711
+ placeholder: x.placeholder || "Enter display name"
5712
5712
  };
5713
5713
  } else {
5714
- const C = {
5714
+ const N = {
5715
5715
  key: "displayname",
5716
5716
  label: "Display Name",
5717
5717
  fieldtype: "text",
@@ -5720,44 +5720,54 @@ const Ql = ({
5720
5720
  placeholder: "Enter display name",
5721
5721
  required: !1
5722
5722
  };
5723
- z.splice(f + 1, 0, C);
5723
+ g.splice(v + 1, 0, N);
5724
5724
  }
5725
5725
  }
5726
5726
  return {
5727
- ...B,
5728
- fields: z
5727
+ ...k,
5728
+ fields: g
5729
5729
  };
5730
5730
  }
5731
- return B;
5731
+ return k;
5732
5732
  }), d = {
5733
5733
  heading: "App Details",
5734
5734
  subHeading: "View app details and customize configurations to align with institutional requirements.",
5735
5735
  isLeftArrow: !0,
5736
5736
  onBackClick: () => window.history.back(),
5737
5737
  ...u
5738
- }, h = g.map((B) => ({
5739
- label: B.text,
5740
- href: B.href || "#"
5741
- })), $ = ne(() => {
5738
+ }, h = b.map((k) => ({
5739
+ label: k.text,
5740
+ href: k.href || "#"
5741
+ })), $ = ae(() => {
5742
5742
  console.log("handleCancelRequest called - showing modal"), o(!0);
5743
- }, []), T = ne((B) => {
5744
- o(!1), B.primary ? (console.log("User confirmed cancel - navigating back"), window.history.back()) : console.log("User cancelled the cancel action - modal closed, data preserved");
5745
- }, []), F = (() => {
5743
+ }, []), T = ae((k) => {
5744
+ o(!1), k.primary ? (console.log("User confirmed cancel - navigating back"), window.history.back()) : console.log("User cancelled the cancel action - modal closed, data preserved");
5745
+ }, []), A = ae((k) => {
5746
+ console.log("Configuration changed:", k);
5747
+ }, []), E = (() => {
5748
+ if (p.headingKey && Array.isArray(r)) {
5749
+ const k = p.headingKey.split("."), g = k[0], v = k[1], w = r.find((z) => z && z.key === g);
5750
+ if (w && w.fields) {
5751
+ const z = w.fields.find((N) => N && N.key === v);
5752
+ if (z)
5753
+ return z.default ?? z.value ?? p.heading ?? a;
5754
+ }
5755
+ }
5746
5756
  if (Array.isArray(r)) {
5747
- for (const B of r)
5748
- if (B && B.fields) {
5749
- const z = B.fields.find((f) => f && f.key === "displayname");
5750
- if (z) return z.default ?? z.value ?? a;
5757
+ for (const k of r)
5758
+ if (k && k.fields) {
5759
+ const g = k.fields.find((v) => v && v.key === "displayname");
5760
+ if (g) return g.default ?? g.value ?? a;
5751
5761
  }
5752
5762
  }
5753
5763
  return p.heading || a;
5754
- })(), A = {
5764
+ })(), I = {
5755
5765
  subHeading: "Application configuration and details",
5756
5766
  tags: [],
5757
5767
  ...p,
5758
- heading: F
5768
+ heading: E
5759
5769
  // Use resolvedDisplayName only
5760
- }, I = {
5770
+ }, j = {
5761
5771
  about: "This application provides comprehensive functionality for your organization.",
5762
5772
  images: {
5763
5773
  desktop: "https://via.placeholder.com/600x400?text=Desktop+View",
@@ -5774,25 +5784,25 @@ const Ql = ({
5774
5784
  description: "Description of feature 2"
5775
5785
  }
5776
5786
  ],
5777
- ...b
5778
- }, V = [
5779
- { label: "Overview", content: G(I) },
5780
- { label: "Configuration", content: /* @__PURE__ */ e(Ss, { appid: a, configdata: { configuration: y }, disableApi: s, onCancel: $, onSave: handleConfigChange }) }
5787
+ ...f
5788
+ }, _ = [
5789
+ { label: "Overview", content: q(j) },
5790
+ { label: "Configuration", content: /* @__PURE__ */ e(Ss, { appid: a, configdata: { configuration: y }, disableApi: s, onCancel: $, onSave: A }) }
5781
5791
  ];
5782
- function U(B) {
5783
- return B ? B.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: B } }) : B : "📱";
5792
+ function G(k) {
5793
+ return k ? k.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: k } }) : k : "📱";
5784
5794
  }
5785
- function G(B) {
5795
+ function q(k) {
5786
5796
  return /* @__PURE__ */ n("div", { className: "bg-white rounded-2xl p-1", children: [
5787
5797
  /* @__PURE__ */ n("section", { className: "mb-8", children: [
5788
5798
  /* @__PURE__ */ e("h2", { className: "text-xl font-semibold mb-2", children: "About" }),
5789
- /* @__PURE__ */ e("p", { className: "text-gray-700 text-base", children: B.about })
5799
+ /* @__PURE__ */ e("p", { className: "text-gray-700 text-base", children: k.about })
5790
5800
  ] }),
5791
5801
  /* @__PURE__ */ n("section", { className: "flex flex-row gap-6 justify-center items-center mb-8", children: [
5792
5802
  /* @__PURE__ */ e(
5793
5803
  "img",
5794
5804
  {
5795
- src: B.images.desktop,
5805
+ src: k.images.desktop,
5796
5806
  alt: "Desktop View",
5797
5807
  className: "rounded-xl border border-gray-200 w-[340px] h-[220px] object-cover"
5798
5808
  }
@@ -5800,7 +5810,7 @@ const Ql = ({
5800
5810
  /* @__PURE__ */ e(
5801
5811
  "img",
5802
5812
  {
5803
- src: B.images.mobile1,
5813
+ src: k.images.mobile1,
5804
5814
  alt: "Mobile View 1",
5805
5815
  className: "rounded-2xl border border-gray-200 w-[120px] h-[220px] object-cover"
5806
5816
  }
@@ -5808,7 +5818,7 @@ const Ql = ({
5808
5818
  /* @__PURE__ */ e(
5809
5819
  "img",
5810
5820
  {
5811
- src: B.images.mobile2,
5821
+ src: k.images.mobile2,
5812
5822
  alt: "Mobile View 2",
5813
5823
  className: "rounded-2xl border border-gray-200 w-[120px] h-[220px] object-cover"
5814
5824
  }
@@ -5816,11 +5826,11 @@ const Ql = ({
5816
5826
  ] }),
5817
5827
  /* @__PURE__ */ n("section", { children: [
5818
5828
  /* @__PURE__ */ e("h3", { className: "text-lg font-semibold mb-4", children: "Key Features" }),
5819
- /* @__PURE__ */ e("ul", { className: "space-y-3", children: B.features.map((z, f) => /* @__PURE__ */ n("li", { children: [
5820
- /* @__PURE__ */ e("span", { className: "font-semibold", children: z.title }),
5829
+ /* @__PURE__ */ e("ul", { className: "space-y-3", children: k.features.map((g, v) => /* @__PURE__ */ n("li", { children: [
5830
+ /* @__PURE__ */ e("span", { className: "font-semibold", children: g.title }),
5821
5831
  /* @__PURE__ */ e("br", {}),
5822
- /* @__PURE__ */ e("span", { className: "text-gray-700", children: z.description })
5823
- ] }, f)) })
5832
+ /* @__PURE__ */ e("span", { className: "text-gray-700", children: g.description })
5833
+ ] }, v)) })
5824
5834
  ] })
5825
5835
  ] });
5826
5836
  }
@@ -5836,34 +5846,34 @@ const Ql = ({
5836
5846
  }
5837
5847
  ),
5838
5848
  /* @__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: [
5839
- /* @__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: U(A.icon) }),
5849
+ /* @__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(I.icon) }),
5840
5850
  /* @__PURE__ */ n("div", { className: "flex flex-col min-w-0", children: [
5841
- /* @__PURE__ */ e("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children: A.heading }),
5842
- /* @__PURE__ */ e("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children: A.subHeading }),
5843
- /* @__PURE__ */ e("div", { className: "mt-2 flex flex-wrap gap-2", children: A.tags && A.tags.map((B, z) => /* @__PURE__ */ e(
5851
+ /* @__PURE__ */ e("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children: I.heading }),
5852
+ /* @__PURE__ */ e("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children: I.subHeading }),
5853
+ /* @__PURE__ */ e("div", { className: "mt-2 flex flex-wrap gap-2", children: I.tags && I.tags.map((k, g) => /* @__PURE__ */ e(
5844
5854
  "span",
5845
5855
  {
5846
5856
  className: "pill inline-block px-[10px] py-[6px] rounded-[14px] text-[11px] border border-[#e6e9ee] text-[#767676] font-semibold mt-1",
5847
- children: B
5857
+ children: k
5848
5858
  },
5849
- z
5859
+ g
5850
5860
  )) })
5851
5861
  ] })
5852
5862
  ] }),
5853
5863
  /* @__PURE__ */ n("div", { className: "bg-white border border-gray-300 rounded-2xl w-full mt-5 ", children: [
5854
- /* @__PURE__ */ e("div", { className: "border-b border-gray-200", children: /* @__PURE__ */ e("nav", { className: "flex space-x-8", "aria-label": "Tabs", children: V.map((B, z) => /* @__PURE__ */ e(
5864
+ /* @__PURE__ */ e("div", { className: "border-b border-gray-200", children: /* @__PURE__ */ e("nav", { className: "flex space-x-8", "aria-label": "Tabs", children: _.map((k, g) => /* @__PURE__ */ e(
5855
5865
  "button",
5856
5866
  {
5857
- onClick: () => l(z),
5858
- className: `${i === z ? "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`,
5859
- children: B.label
5867
+ onClick: () => l(g),
5868
+ className: `${i === g ? "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`,
5869
+ children: k.label
5860
5870
  },
5861
- z
5871
+ g
5862
5872
  )) }) }),
5863
- /* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: V[i].content })
5873
+ /* @__PURE__ */ e("div", { className: "p-8 h-full overflow-y-auto", children: _[i].content })
5864
5874
  ] }),
5865
5875
  /* @__PURE__ */ e(
5866
- Pn,
5876
+ On,
5867
5877
  {
5868
5878
  isOpen: m,
5869
5879
  onClose: T,
@@ -5915,8 +5925,8 @@ const Kl = ({
5915
5925
  addBtnText: u = "Add",
5916
5926
  // Feature toggles
5917
5927
  showSearch: p = !0,
5918
- showColumnChooser: g = !0,
5919
- showFilter: b = !1,
5928
+ showColumnChooser: b = !0,
5929
+ showFilter: f = !1,
5920
5930
  showPrint: r = !1,
5921
5931
  showExcel: y = !1,
5922
5932
  showPdf: d = !1,
@@ -5924,57 +5934,57 @@ const Kl = ({
5924
5934
  showAdd: $ = !1,
5925
5935
  // Additional props
5926
5936
  searchPlaceholder: T = "Search...",
5927
- handleRefreshClick: F = () => {
5937
+ handleRefreshClick: A = () => {
5928
5938
  },
5929
- handleSearchChange: A = () => {
5939
+ handleSearchChange: E = () => {
5930
5940
  },
5931
5941
  // Optional: override export file names
5932
5942
  excelFileName: I,
5933
- pdfFileName: V
5943
+ pdfFileName: j
5934
5944
  }) => {
5935
- const U = () => l?.current || i?.current, [G, B] = se.useState(""), z = (t || "export").toString().trim() || "export", f = `${I || z}.xlsx`, v = `${V || z}.pdf`, w = (x, k, E) => Math.max(k, Math.min(x, E)), C = ne(
5945
+ const _ = () => l?.current || i?.current, [G, q] = se.useState(""), k = (t || "export").toString().trim() || "export", g = `${I || k}.xlsx`, v = `${j || k}.pdf`, w = (x, C, F) => Math.max(C, Math.min(x, F)), z = ae(
5936
5946
  (x) => {
5937
- const k = U();
5938
- if (console.log("openColumnChooserNear", k), !!k?.openColumnChooser) {
5947
+ const C = _();
5948
+ if (console.log("openColumnChooserNear", C), !!C?.openColumnChooser) {
5939
5949
  if (typeof window > "u" || !x?.currentTarget) {
5940
- k.openColumnChooser();
5950
+ C.openColumnChooser();
5941
5951
  return;
5942
5952
  }
5943
5953
  try {
5944
- const E = x.currentTarget.getBoundingClientRect(), L = E.left + window.scrollX, q = E.bottom + window.scrollY;
5945
- let S = L - 120, O = q - 120;
5946
- const D = window.innerWidth, P = window.innerHeight;
5947
- S = w(S, window.scrollX + 8, window.scrollX + D - 340), O = w(O, window.scrollY, window.scrollY + P - 120), console.log("openColumnChooserNear", S, O), k.openColumnChooser(S, O);
5948
- } catch (E) {
5949
- console.log("coloumn choose error", E);
5954
+ const F = x.currentTarget.getBoundingClientRect(), L = F.left + window.scrollX, U = F.bottom + window.scrollY;
5955
+ let S = L - 120, P = U - 120;
5956
+ const D = window.innerWidth, O = window.innerHeight;
5957
+ S = w(S, window.scrollX + 8, window.scrollX + D - 340), P = w(P, window.scrollY, window.scrollY + O - 120), console.log("openColumnChooserNear", S, P), C.openColumnChooser(S, P);
5958
+ } catch (F) {
5959
+ console.log("coloumn choose error", F);
5950
5960
  }
5951
5961
  }
5952
5962
  },
5953
5963
  []
5954
5964
  // no external deps; reads ref at call time
5955
- ), N = ne(
5956
- (x, k) => {
5957
- const E = U();
5958
- if (E)
5965
+ ), N = ae(
5966
+ (x, C) => {
5967
+ const F = _();
5968
+ if (F)
5959
5969
  switch (x) {
5960
5970
  case "ColumnChooser":
5961
- g && (console.log("openColumnChooser", k), k ? C(k) : E.openColumnChooser?.()), console.log("openColumnChooser out", k);
5971
+ b && (console.log("openColumnChooser", C), C ? z(C) : F.openColumnChooser?.()), console.log("openColumnChooser out", C);
5962
5972
  break;
5963
5973
  case "Print":
5964
- r && E.print?.();
5974
+ r && F.print?.();
5965
5975
  break;
5966
5976
  case "Excel":
5967
- y && E.excelExport?.({ fileName: f });
5977
+ y && F.excelExport?.({ fileName: g });
5968
5978
  break;
5969
5979
  case "Pdf":
5970
- d && E.pdfExport?.({ fileName: v });
5980
+ d && F.pdfExport?.({ fileName: v });
5971
5981
  break;
5972
5982
  case "Refresh":
5973
- h && F();
5983
+ h && A();
5974
5984
  break;
5975
5985
  }
5976
5986
  },
5977
- [g, r, y, d, h, f, v, F, C]
5987
+ [b, r, y, d, h, g, v, A, z]
5978
5988
  );
5979
5989
  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: [
5980
5990
  /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
@@ -5992,13 +6002,13 @@ const Kl = ({
5992
6002
  placeholder: T,
5993
6003
  value: G,
5994
6004
  onDebouncedChange: (x) => {
5995
- B(x), A(x);
6005
+ q(x), E(x);
5996
6006
  }
5997
6007
  }
5998
6008
  ) }),
5999
6009
  /* @__PURE__ */ n("div", { className: "flex gap-3", children: [
6000
6010
  /* @__PURE__ */ n("div", { className: "flex items-center gap-1.5", children: [
6001
- g && /* @__PURE__ */ e(
6011
+ b && /* @__PURE__ */ e(
6002
6012
  ee,
6003
6013
  {
6004
6014
  icon: Nr,
@@ -6009,7 +6019,7 @@ const Kl = ({
6009
6019
  title: "Choose Columns"
6010
6020
  }
6011
6021
  ),
6012
- b && /* @__PURE__ */ e(
6022
+ f && /* @__PURE__ */ e(
6013
6023
  ee,
6014
6024
  {
6015
6025
  icon: kr,
@@ -6039,7 +6049,7 @@ const Kl = ({
6039
6049
  ariaLabel: "Excel Download",
6040
6050
  size: "small",
6041
6051
  category: "secondary",
6042
- title: `Export Excel (${f})`
6052
+ title: `Export Excel (${g})`
6043
6053
  }
6044
6054
  ),
6045
6055
  d && /* @__PURE__ */ e(
@@ -6092,68 +6102,68 @@ function ei(t) {
6092
6102
  allowSorting: o = !0,
6093
6103
  allowFiltering: u = !1,
6094
6104
  allowGrouping: p = !1,
6095
- allowReordering: g = !0,
6096
- allowResizing: b = !0,
6105
+ allowReordering: b = !0,
6106
+ allowResizing: f = !0,
6097
6107
  allowExcelExport: r = !1,
6098
6108
  allowPdfExport: y = !1,
6099
6109
  showColumnChooser: d = !1,
6100
6110
  enableSearchApi: h = !1,
6101
6111
  height: $ = "600",
6102
6112
  selectionSettings: T = { type: "Multiple", mode: "Row" },
6103
- enableCheckbox: F = !1,
6104
- columns: A = [],
6113
+ enableCheckbox: A = !1,
6114
+ columns: E = [],
6105
6115
  onGridStateChange: I,
6106
- onRowSelected: V,
6107
- onRowDeselected: U,
6116
+ onRowSelected: j,
6117
+ onRowDeselected: _,
6108
6118
  onRowDoubleClick: G,
6109
- apiRef: B,
6110
- gridProps: z = {}
6111
- } = t, f = xe(null), {
6119
+ apiRef: q,
6120
+ gridProps: k = {}
6121
+ } = t, g = xe(null), {
6112
6122
  pageSettings: v,
6113
6123
  sortSettings: w,
6114
- ...C
6115
- } = z || {}, [N, x] = se.useState(v?.page || 1), [k, E] = se.useState(w?.pageSize || 20), [L, q] = se.useState(w?.sortKey || "updatedDate"), [S, O] = se.useState(w?.direction || "Descending"), D = ue(() => {
6116
- const j = [cn];
6117
- return o && j.push(dn), u && j.push(mn), p && j.push(un), h && j.push(hn), r && j.push(pn), y && j.push(gn), d && j.push(bn), b && j.push(fn), g && j.push(xn), j.push(yn), j;
6118
- }, [o, u, p, h, r, y, d, b, g]), P = ue(() => {
6119
- const j = () => f.current, ae = (J, we) => {
6124
+ ...z
6125
+ } = k || {}, [N, x] = se.useState(v?.page || 1), [C, F] = se.useState(w?.pageSize || 20), [L, U] = se.useState(w?.sortKey || "updatedDate"), [S, P] = se.useState(w?.direction || "Descending"), D = ue(() => {
6126
+ const B = [cn];
6127
+ return o && B.push(dn), u && B.push(mn), p && B.push(un), h && B.push(hn), r && B.push(pn), y && B.push(gn), d && B.push(bn), f && B.push(fn), b && B.push(xn), B.push(yn), B;
6128
+ }, [o, u, p, h, r, y, d, f, b]), O = ue(() => {
6129
+ const B = () => g.current, re = (J, we) => {
6120
6130
  !we && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${J} requested but related service/feature is disabled.`);
6121
6131
  };
6122
6132
  return {
6123
- getInstance: () => j(),
6124
- refresh: () => j()?.refresh?.(),
6125
- getSelectedRecords: () => j()?.getSelectedRecords?.() ?? [],
6126
- clearSelection: () => j()?.clearSelection?.(),
6127
- selectRow: (J) => j()?.selectRow?.(J),
6128
- selectRows: (J) => j()?.selectRows?.(J),
6133
+ getInstance: () => B(),
6134
+ refresh: () => B()?.refresh?.(),
6135
+ getSelectedRecords: () => B()?.getSelectedRecords?.() ?? [],
6136
+ clearSelection: () => B()?.clearSelection?.(),
6137
+ selectRow: (J) => B()?.selectRow?.(J),
6138
+ selectRows: (J) => B()?.selectRows?.(J),
6129
6139
  search: (J) => {
6130
- ae("search()", h), j()?.search?.(J);
6140
+ re("search()", h), B()?.search?.(J);
6131
6141
  },
6132
- print: () => j()?.print?.(),
6142
+ print: () => B()?.print?.(),
6133
6143
  excelExport: (J) => {
6134
- ae("excelExport()", r), j()?.excelExport?.(J);
6144
+ re("excelExport()", r), B()?.excelExport?.(J);
6135
6145
  },
6136
6146
  pdfExport: (J) => {
6137
- ae("pdfExport()", y), j()?.pdfExport?.(J);
6147
+ re("pdfExport()", y), B()?.pdfExport?.(J);
6138
6148
  },
6139
6149
  openColumnChooser: (J, we) => {
6140
- ae("openColumnChooser()", d), j()?.columnChooserModule?.openColumnChooser?.(J, we);
6150
+ re("openColumnChooser()", d), B()?.columnChooserModule?.openColumnChooser?.(J, we);
6141
6151
  }
6142
6152
  };
6143
6153
  }, []);
6144
6154
  Z(() => {
6145
- B && (B.current = P);
6146
- }, [B, P]), Z(() => () => {
6147
- B && (B.current = null);
6155
+ q && (q.current = O);
6156
+ }, [q, O]), Z(() => () => {
6157
+ q && (q.current = null);
6148
6158
  }, []);
6149
- const _ = (j) => {
6150
- const ae = String(j || "");
6151
- return ae === "Ascending" || ae === "Descending" ? ae : ae.toLowerCase() === "ascending" ? "Ascending" : "Descending";
6152
- }, R = (j) => {
6153
- const ae = f.current, J = j?.requestType, we = J === "paging" ? "paging" : J === "sorting" ? "sorting" : J === "searching" ? "searching" : J === "filtering" ? "filtering" : J === "grouping" ? "grouping" : J === "reorder" ? "reorder" : J === "columnstate" ? "columnstate" : "other", Ie = j?.pageSize ?? ae?.pageSettings?.pageSize ?? k, Ue = j?.currentPage ?? ae?.pageSettings?.currentPage ?? l, st = j?.columnName && j?.direction ? [{ field: j.columnName, dir: _(j.direction) }] : (ae?.sortSettings?.columns || []).map((Oe) => ({
6154
- field: Oe.field,
6155
- dir: _(Oe.direction ?? Oe.dir)
6156
- })), lt = j?.searchString ?? "", it = j?.columns ?? ae?.filterSettings?.columns ?? [];
6159
+ const V = (B) => {
6160
+ const re = String(B || "");
6161
+ return re === "Ascending" || re === "Descending" ? re : re.toLowerCase() === "ascending" ? "Ascending" : "Descending";
6162
+ }, R = (B) => {
6163
+ const re = g.current, J = B?.requestType, we = J === "paging" ? "paging" : J === "sorting" ? "sorting" : J === "searching" ? "searching" : J === "filtering" ? "filtering" : J === "grouping" ? "grouping" : J === "reorder" ? "reorder" : J === "columnstate" ? "columnstate" : "other", Ie = B?.pageSize ?? re?.pageSettings?.pageSize ?? C, Ue = B?.currentPage ?? re?.pageSettings?.currentPage ?? l, st = B?.columnName && B?.direction ? [{ field: B.columnName, dir: V(B.direction) }] : (re?.sortSettings?.columns || []).map((Pe) => ({
6164
+ field: Pe.field,
6165
+ dir: V(Pe.direction ?? Pe.dir)
6166
+ })), lt = B?.searchString ?? "", it = B?.columns ?? re?.filterSettings?.columns ?? [];
6157
6167
  return {
6158
6168
  reason: we,
6159
6169
  page: { index: Ue, size: Ie, skip: (Ue - 1) * Ie, take: Ie },
@@ -6161,17 +6171,17 @@ function ei(t) {
6161
6171
  // [{ field, dir: 'Ascending'|'Descending' }]
6162
6172
  search: lt,
6163
6173
  filters: it,
6164
- rawEvent: j
6174
+ rawEvent: B
6165
6175
  };
6166
- }, Y = (j) => {
6176
+ }, Y = (B) => {
6167
6177
  setTimeout(() => {
6168
- f?.current?.hideSpinner();
6169
- }, 1e3), j.requestType === "paging" && (x(j.currentPage), E(j.pageSize)), j.requestType === "sorting" && (q(j.columnName || "updatedDate"), O(j.direction === "Ascending" ? "ASC" : "DESC")), I && I(R(j), j);
6170
- }, W = (j) => {
6171
- typeof G == "function" && G(j?.rowData, j);
6178
+ g?.current?.hideSpinner();
6179
+ }, 1e3), B.requestType === "paging" && (x(B.currentPage), F(B.pageSize)), B.requestType === "sorting" && (U(B.columnName || "updatedDate"), P(B.direction === "Ascending" ? "ASC" : "DESC")), I && I(R(B), B);
6180
+ }, W = (B) => {
6181
+ typeof G == "function" && G(B?.rowData, B);
6172
6182
  }, pe = () => {
6173
- const j = [];
6174
- return F && j.push(/* @__PURE__ */ e(Dt, { type: "checkbox", width: "50" }, "__checkbox__")), A.forEach((ae, J) => {
6183
+ const B = [];
6184
+ return A && B.push(/* @__PURE__ */ e(Dt, { type: "checkbox", width: "50" }, "__checkbox__")), E.forEach((re, J) => {
6175
6185
  const {
6176
6186
  field: we,
6177
6187
  headerText: Ie,
@@ -6179,18 +6189,18 @@ function ei(t) {
6179
6189
  textAlign: st = "Left",
6180
6190
  template: lt,
6181
6191
  isPrimaryKey: it,
6182
- showInColumnChooser: Oe = !0,
6192
+ showInColumnChooser: Pe = !0,
6183
6193
  allowFiltering: Ia = !0,
6184
- allowSorting: Oa = !0,
6185
- type: Pa,
6194
+ allowSorting: Pa = !0,
6195
+ type: Oa,
6186
6196
  format: La,
6187
6197
  visible: Ma = !0,
6188
6198
  minWidth: Ba,
6189
6199
  maxWidth: ja,
6190
6200
  customAttributes: Va,
6191
6201
  ..._a
6192
- } = ae || {};
6193
- j.push(
6202
+ } = re || {};
6203
+ B.push(
6194
6204
  /* @__PURE__ */ e(
6195
6205
  Dt,
6196
6206
  {
@@ -6200,10 +6210,10 @@ function ei(t) {
6200
6210
  textAlign: st,
6201
6211
  template: lt,
6202
6212
  isPrimaryKey: it,
6203
- showInColumnChooser: Oe,
6213
+ showInColumnChooser: Pe,
6204
6214
  allowFiltering: Ia,
6205
- allowSorting: Oa,
6206
- type: Pa,
6215
+ allowSorting: Pa,
6216
+ type: Oa,
6207
6217
  format: La,
6208
6218
  visible: Ma,
6209
6219
  minWidth: Ba,
@@ -6214,13 +6224,13 @@ function ei(t) {
6214
6224
  we || `col-${J}`
6215
6225
  )
6216
6226
  );
6217
- }), j;
6227
+ }), B;
6218
6228
  };
6219
6229
  return /* @__PURE__ */ n(
6220
6230
  vn,
6221
6231
  {
6222
6232
  id: i,
6223
- ref: f,
6233
+ ref: g,
6224
6234
  dataSource: {
6225
6235
  result: a,
6226
6236
  count: s
@@ -6230,20 +6240,20 @@ function ei(t) {
6230
6240
  allowSorting: o,
6231
6241
  allowFiltering: u,
6232
6242
  allowGrouping: p,
6233
- allowReordering: g,
6234
- allowResizing: b,
6243
+ allowReordering: b,
6244
+ allowResizing: f,
6235
6245
  showColumnChooser: d,
6236
6246
  selectionSettings: T,
6237
6247
  pageSettings: { pageSize: 10, pageSizes: v?.pageSizes ?? [20, 40, 60, 80, 100] },
6238
6248
  sortSettings: w ?? {
6239
- columns: [{ field: L, direction: _(S) }],
6249
+ columns: [{ field: L, direction: V(S) }],
6240
6250
  allowUnsort: !1
6241
6251
  },
6242
6252
  actionBegin: Y,
6243
- rowSelected: V,
6244
- rowDeselected: U,
6253
+ rowSelected: j,
6254
+ rowDeselected: _,
6245
6255
  recordDoubleClick: W,
6246
- ...C,
6256
+ ...z,
6247
6257
  children: [
6248
6258
  /* @__PURE__ */ e(wn, { children: pe() }),
6249
6259
  /* @__PURE__ */ e(Nn, { services: D })
@@ -6285,9 +6295,9 @@ function ie({
6285
6295
  details: o = {},
6286
6296
  ...u
6287
6297
  }) {
6288
- const p = Qe(), g = Ds(u, m), b = (y) => {
6298
+ const p = Qe(), b = Ds(u, m), f = (y) => {
6289
6299
  l?.({
6290
- key: g,
6300
+ key: b,
6291
6301
  checked: y.target.checked,
6292
6302
  details: o,
6293
6303
  props: u
@@ -6305,7 +6315,7 @@ function ie({
6305
6315
  id: p,
6306
6316
  type: "checkbox",
6307
6317
  className: "h-4 w-4 rounded border-zinc-300 focus:ring-[var(--primaryColor)]",
6308
- onChange: b,
6318
+ onChange: f,
6309
6319
  "aria-label": "Select card"
6310
6320
  }
6311
6321
  ) }),
@@ -6332,8 +6342,8 @@ function $s({
6332
6342
  group: o = "Global",
6333
6343
  moreGroupsLabel: u = "+ 5 more",
6334
6344
  author: p = "Judith Black",
6335
- timeLabel: g = "Just now",
6336
- imageUrl: b = "https://images.unsplash.com/photo-1469980098053-382eb10ba017?q=80&w=1200&auto=format&fit=crop",
6345
+ timeLabel: b = "Just now",
6346
+ imageUrl: f = "https://images.unsplash.com/photo-1469980098053-382eb10ba017?q=80&w=1200&auto=format&fit=crop",
6337
6347
  description: r = "Columbia University is a prestigious Ivy League institution located in the heart of New York City.",
6338
6348
  // spread remaining props (_id, instanceId, etc.)
6339
6349
  ...y
@@ -6366,13 +6376,13 @@ function $s({
6366
6376
  )
6367
6377
  ] }) : null,
6368
6378
  /* @__PURE__ */ e("span", { "aria-hidden": "true", className: "px-2", children: "•" }),
6369
- /* @__PURE__ */ e("span", { children: g })
6379
+ /* @__PURE__ */ e("span", { children: b })
6370
6380
  ] }),
6371
6381
  /* @__PURE__ */ n("div", { className: "mt-2 flex items-center gap-3", children: [
6372
6382
  /* @__PURE__ */ e(ze, { name: "John", size: "medium" }),
6373
6383
  /* @__PURE__ */ n("div", { className: "leading-tight", children: [
6374
6384
  /* @__PURE__ */ e("div", { className: "text-sm font-medium text-zinc-800 dark:text-zinc-100", children: p }),
6375
- /* @__PURE__ */ e("div", { className: `text-zinc-500 dark:text-zinc-400 ${h.meta}`, children: g })
6385
+ /* @__PURE__ */ e("div", { className: `text-zinc-500 dark:text-zinc-400 ${h.meta}`, children: b })
6376
6386
  ] })
6377
6387
  ] }),
6378
6388
  /* @__PURE__ */ n("p", { className: "mt-2 text-zinc-700 dark:text-zinc-300", children: [
@@ -6390,7 +6400,7 @@ function $s({
6390
6400
  "div",
6391
6401
  {
6392
6402
  className: `mt-3 overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800 ${h.media}`,
6393
- children: /* @__PURE__ */ e("img", { src: b, alt: "", className: "h-full w-full object-cover" })
6403
+ children: /* @__PURE__ */ e("img", { src: f, alt: "", className: "h-full w-full object-cover" })
6394
6404
  }
6395
6405
  ),
6396
6406
  /* @__PURE__ */ e("div", { className: "mt-3 w-full flex justify-center", children: /* @__PURE__ */ e(
@@ -6457,11 +6467,11 @@ function Rs({
6457
6467
  // spread for identity (_id/instanceId/etc)
6458
6468
  ...p
6459
6469
  }) {
6460
- const g = oe(t), b = ce[g], r = Es[g], y = (d) => `px-1 pb-2 text-sm font-medium ${d === o ? "text-zinc-900 dark:text-zinc-100 border-b-2" : "text-zinc-500 dark:text-zinc-400"}`;
6470
+ const b = oe(t), f = ce[b], r = Es[b], y = (d) => `px-1 pb-2 text-sm font-medium ${d === o ? "text-zinc-900 dark:text-zinc-100 border-b-2" : "text-zinc-500 dark:text-zinc-400"}`;
6461
6471
  return /* @__PURE__ */ n(
6462
6472
  ie,
6463
6473
  {
6464
- className: `flex flex-col ${b.card} ${r.wrap}`,
6474
+ className: `flex flex-col ${f.card} ${r.wrap}`,
6465
6475
  showCheckbox: a,
6466
6476
  checkboxPosition: s,
6467
6477
  onSelect: i,
@@ -6470,7 +6480,7 @@ function Rs({
6470
6480
  ...p,
6471
6481
  children: [
6472
6482
  /* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
6473
- /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${b.title}`, children: m }),
6483
+ /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${f.title}`, children: m }),
6474
6484
  /* @__PURE__ */ e(
6475
6485
  "span",
6476
6486
  {
@@ -6605,7 +6615,7 @@ const Is = [
6605
6615
  thumb: "https://images.unsplash.com/photo-1522202176988-66273c2fd55f?q=80&w=640&auto=format&fit=crop",
6606
6616
  excerpt: "Community and business partners joined KCC leadership to recognize outstanding collaborations and celebrate student success…"
6607
6617
  }
6608
- ], Os = {
6618
+ ], Ps = {
6609
6619
  sm: {
6610
6620
  wrap: "max-w-md",
6611
6621
  itemThumb: "h-14 w-20",
@@ -6630,7 +6640,7 @@ const Is = [
6630
6640
  excerpt: "text-sm text-zinc-600 dark:text-zinc-300 line-clamp-2"
6631
6641
  }
6632
6642
  }, jt = ({ label: t }) => /* @__PURE__ */ e("span", { className: "mt-1 inline-flex items-center rounded-full border border-zinc-300 dark:border-zinc-700 bg-white dark:bg-zinc-900 px-2 py-0.5 text-[11px] font-semibold tracking-wide", children: t });
6633
- function Ps({
6643
+ function Os({
6634
6644
  size: t = "md",
6635
6645
  showCheckbox: a = !1,
6636
6646
  checkboxPosition: s = "top-left",
@@ -6641,11 +6651,11 @@ function Ps({
6641
6651
  // spread for identity fields: _id / id / instanceId etc.
6642
6652
  ...u
6643
6653
  }) {
6644
- const p = oe(t), g = ce[p], b = Os[p];
6654
+ const p = oe(t), b = ce[p], f = Ps[p];
6645
6655
  return /* @__PURE__ */ n(
6646
6656
  ie,
6647
6657
  {
6648
- className: `flex flex-col ${g.card} ${b.wrap || ""}`,
6658
+ className: `flex flex-col ${b.card} ${f.wrap || ""}`,
6649
6659
  showCheckbox: a,
6650
6660
  checkboxPosition: s,
6651
6661
  onSelect: i,
@@ -6654,17 +6664,17 @@ function Ps({
6654
6664
  ...u,
6655
6665
  children: [
6656
6666
  /* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
6657
- /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${g.title}`, children: m }),
6667
+ /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${b.title}`, children: m }),
6658
6668
  /* @__PURE__ */ e("span", { className: "text-sm text-indigo-700 cursor-default select-none", children: "View All" })
6659
6669
  ] }),
6660
6670
  p === "lg" ? (
6661
6671
  // Large: 3-up grid of image cards
6662
- /* @__PURE__ */ e("div", { className: `mt-4 ${b.grid}`, children: o.slice(0, 3).map((r) => /* @__PURE__ */ n("article", { children: [
6663
- /* @__PURE__ */ e("img", { src: r.thumb, alt: "", className: b.cardImg }),
6664
- /* @__PURE__ */ e("h4", { className: `mt-3 ${b.title} text-zinc-900 dark:text-zinc-100`, children: r.title }),
6665
- /* @__PURE__ */ e("div", { className: `mt-1 text-zinc-500 dark:text-zinc-400 ${b.date}`, children: r.date }),
6672
+ /* @__PURE__ */ e("div", { className: `mt-4 ${f.grid}`, children: o.slice(0, 3).map((r) => /* @__PURE__ */ n("article", { children: [
6673
+ /* @__PURE__ */ e("img", { src: r.thumb, alt: "", className: f.cardImg }),
6674
+ /* @__PURE__ */ e("h4", { className: `mt-3 ${f.title} text-zinc-900 dark:text-zinc-100`, children: r.title }),
6675
+ /* @__PURE__ */ e("div", { className: `mt-1 text-zinc-500 dark:text-zinc-400 ${f.date}`, children: r.date }),
6666
6676
  /* @__PURE__ */ e("div", { className: "mt-2", children: /* @__PURE__ */ e(jt, { label: r.tag }) }),
6667
- /* @__PURE__ */ n("p", { className: `mt-2 ${b.excerpt}`, children: [
6677
+ /* @__PURE__ */ n("p", { className: `mt-2 ${f.excerpt}`, children: [
6668
6678
  r.excerpt,
6669
6679
  " ",
6670
6680
  /* @__PURE__ */ e("span", { className: "underline decoration-dotted text-indigo-700 cursor-default", children: "View more" })
@@ -6677,12 +6687,12 @@ function Ps({
6677
6687
  {
6678
6688
  className: "flex items-start gap-3 rounded-xl border border-zinc-200 dark:border-zinc-800 p-2",
6679
6689
  children: [
6680
- /* @__PURE__ */ e("div", { className: `overflow-hidden rounded-lg ${b.itemThumb} flex-shrink-0`, children: /* @__PURE__ */ e("img", { src: r.thumb, alt: "", className: "h-full w-full object-cover" }) }),
6690
+ /* @__PURE__ */ e("div", { className: `overflow-hidden rounded-lg ${f.itemThumb} flex-shrink-0`, children: /* @__PURE__ */ e("img", { src: r.thumb, alt: "", className: "h-full w-full object-cover" }) }),
6681
6691
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
6682
- /* @__PURE__ */ e("h4", { className: `${b.title} text-zinc-900 dark:text-zinc-100 line-clamp-2`, children: r.title }),
6683
- /* @__PURE__ */ e("div", { className: `mt-1 text-zinc-500 dark:text-zinc-400 ${b.date}`, children: r.date }),
6692
+ /* @__PURE__ */ e("h4", { className: `${f.title} text-zinc-900 dark:text-zinc-100 line-clamp-2`, children: r.title }),
6693
+ /* @__PURE__ */ e("div", { className: `mt-1 text-zinc-500 dark:text-zinc-400 ${f.date}`, children: r.date }),
6684
6694
  /* @__PURE__ */ e("div", { className: "mt-1", children: /* @__PURE__ */ e(jt, { label: r.tag }) }),
6685
- b.excerpt !== "hidden" && /* @__PURE__ */ n("p", { className: `mt-2 ${b.excerpt}`, children: [
6695
+ f.excerpt !== "hidden" && /* @__PURE__ */ n("p", { className: `mt-2 ${f.excerpt}`, children: [
6686
6696
  r.excerpt,
6687
6697
  " ",
6688
6698
  /* @__PURE__ */ e("span", { className: "underline decoration-dotted text-indigo-700 cursor-default", children: "View more" })
@@ -6698,7 +6708,7 @@ function Ps({
6698
6708
  }
6699
6709
  );
6700
6710
  }
6701
- Ps.propTypes = {
6711
+ Os.propTypes = {
6702
6712
  size: c.string,
6703
6713
  showCheckbox: c.bool,
6704
6714
  checkboxPosition: c.oneOf(["top-left", "top-right"]),
@@ -6757,13 +6767,13 @@ function Vs({
6757
6767
  filters: u = Ls,
6758
6768
  activeFilter: p = "All",
6759
6769
  // NEW: iframe controls
6760
- mapQuery: g = "Florida",
6761
- zoom: b = 12,
6770
+ mapQuery: b = "Florida",
6771
+ zoom: f = 12,
6762
6772
  mapUrl: r,
6763
6773
  // optional full embed URL override
6764
6774
  ...y
6765
6775
  }) {
6766
- const d = oe(t), h = ce[d], $ = Ms[d], T = r || js(g, b);
6776
+ const d = oe(t), h = ce[d], $ = Ms[d], T = r || js(b, f);
6767
6777
  return /* @__PURE__ */ e(
6768
6778
  ie,
6769
6779
  {
@@ -6772,7 +6782,7 @@ function Vs({
6772
6782
  checkboxPosition: s,
6773
6783
  onSelect: i,
6774
6784
  identity: l,
6775
- details: { type: "campus-map", title: m, campusName: o, activeFilter: p, mapQuery: g, zoom: b },
6785
+ details: { type: "campus-map", title: m, campusName: o, activeFilter: p, mapQuery: b, zoom: f },
6776
6786
  ...y,
6777
6787
  children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${$.mapH}`, children: [
6778
6788
  /* @__PURE__ */ e(
@@ -6797,7 +6807,7 @@ function Vs({
6797
6807
  /* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-full bg-white/90 border border-zinc-300 flex items-center justify-center", children: "›" })
6798
6808
  ] })
6799
6809
  ] }),
6800
- /* @__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 ${$.chipGap} overflow-x-auto scrollbar-none`, children: u.map((F) => /* @__PURE__ */ e(Bs, { label: F, active: F === p, size: d }, F)) }) }),
6810
+ /* @__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 ${$.chipGap} overflow-x-auto scrollbar-none`, children: u.map((A) => /* @__PURE__ */ e(Bs, { label: A, active: A === p, size: d }, A)) }) }),
6801
6811
  /* @__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 ${$.searchH}`, children: [
6802
6812
  /* @__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" }) }),
6803
6813
  /* @__PURE__ */ e("span", { className: "ml-2 text-zinc-500 dark:text-zinc-400", children: "Search places" })
@@ -6969,8 +6979,8 @@ function Ys({
6969
6979
  selectedIndex: u = 0,
6970
6980
  ...p
6971
6981
  }) {
6972
- const [g, b] = M(u), r = oe(t), y = ce[r], d = Us[r], h = o[g] || o[0], $ = (F, A) => {
6973
- b(A), i?.(F);
6982
+ const [b, f] = M(u), r = oe(t), y = ce[r], d = Us[r], h = o[b] || o[0], $ = (A, E) => {
6983
+ f(E), i?.(A);
6974
6984
  }, T = r === "lg";
6975
6985
  return /* @__PURE__ */ n(
6976
6986
  ie,
@@ -6990,29 +7000,29 @@ function Ys({
6990
7000
  T ? (
6991
7001
  // Large: Two-column layout
6992
7002
  /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
6993
- /* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((F, A) => /* @__PURE__ */ e(
7003
+ /* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((A, E) => /* @__PURE__ */ e(
6994
7004
  Vt,
6995
7005
  {
6996
- ev: F,
7006
+ ev: A,
6997
7007
  sizeMeta: d,
6998
- isSelected: A === g,
6999
- onClick: (I) => $(I, A)
7008
+ isSelected: E === b,
7009
+ onClick: (I) => $(I, E)
7000
7010
  },
7001
- F._id || F.id || A
7011
+ A._id || A.id || E
7002
7012
  )) }),
7003
7013
  /* @__PURE__ */ e(Gs, { ev: h, sizeMeta: d })
7004
7014
  ] })
7005
7015
  ) : (
7006
7016
  // Small/Medium: Simple list only
7007
- /* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((F, A) => /* @__PURE__ */ e(
7017
+ /* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((A, E) => /* @__PURE__ */ e(
7008
7018
  Vt,
7009
7019
  {
7010
- ev: F,
7020
+ ev: A,
7011
7021
  sizeMeta: d,
7012
- isSelected: A === g,
7013
- onClick: (I) => $(I, A)
7022
+ isSelected: E === b,
7023
+ onClick: (I) => $(I, E)
7014
7024
  },
7015
- F._id || F.id || A
7025
+ A._id || A.id || E
7016
7026
  )) })
7017
7027
  ),
7018
7028
  !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" }) })
@@ -7183,17 +7193,17 @@ function Hs({
7183
7193
  emails: o = Ws,
7184
7194
  selectedIndex: u = 0,
7185
7195
  onStar: p,
7186
- onPin: g,
7187
- ...b
7196
+ onPin: b,
7197
+ ...f
7188
7198
  }) {
7189
- const [r, y] = M(u), d = oe(t), h = ce[d], $ = Js[d], T = (I, V) => {
7190
- y(V), i?.(I);
7191
- }, F = (I) => {
7192
- const V = { ...I, starred: !I.starred };
7193
- p?.(V);
7199
+ const [r, y] = M(u), d = oe(t), h = ce[d], $ = Js[d], T = (I, j) => {
7200
+ y(j), i?.(I);
7194
7201
  }, A = (I) => {
7195
- const V = { ...I, pinned: !I.pinned };
7196
- g?.(V);
7202
+ const j = { ...I, starred: !I.starred };
7203
+ p?.(j);
7204
+ }, E = (I) => {
7205
+ const j = { ...I, pinned: !I.pinned };
7206
+ b?.(j);
7197
7207
  };
7198
7208
  return /* @__PURE__ */ n(
7199
7209
  ie,
@@ -7204,21 +7214,21 @@ function Hs({
7204
7214
  onSelect: i,
7205
7215
  identity: l,
7206
7216
  details: { type: "emails", title: m, count: o?.length ?? 0 },
7207
- ...b,
7217
+ ...f,
7208
7218
  children: [
7209
7219
  /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${h.title}`, children: m }) }),
7210
7220
  /* @__PURE__ */ e(be, { placeholder: "Type to search..." }),
7211
- /* @__PURE__ */ e("div", { className: "space-y-0", children: o.map((I, V) => /* @__PURE__ */ e(
7221
+ /* @__PURE__ */ e("div", { className: "space-y-0", children: o.map((I, j) => /* @__PURE__ */ e(
7212
7222
  Xs,
7213
7223
  {
7214
7224
  email: I,
7215
7225
  sizeMeta: $,
7216
- isSelected: V === r,
7217
- onClick: (U) => T(U, V),
7218
- onStar: F,
7219
- onPin: A
7226
+ isSelected: j === r,
7227
+ onClick: (_) => T(_, j),
7228
+ onStar: A,
7229
+ onPin: E
7220
7230
  },
7221
- I._id || I.id || V
7231
+ I._id || I.id || j
7222
7232
  )) }),
7223
7233
  /* @__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" }) })
7224
7234
  ]
@@ -7438,9 +7448,9 @@ function tl({
7438
7448
  selectedIndex: u = 0,
7439
7449
  ...p
7440
7450
  }) {
7441
- const [g, b] = M(u), r = oe(t), y = ce[r], d = Zs[r], h = (F, A) => {
7442
- b(A), i?.(F);
7443
- }, $ = o[g] || o[0], T = d.layout === "split";
7451
+ const [b, f] = M(u), r = oe(t), y = ce[r], d = Zs[r], h = (A, E) => {
7452
+ f(E), i?.(A);
7453
+ }, $ = o[b] || o[0], T = d.layout === "split";
7444
7454
  return /* @__PURE__ */ n(
7445
7455
  ie,
7446
7456
  {
@@ -7455,15 +7465,15 @@ function tl({
7455
7465
  /* @__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 ${y.title}`, children: m }) }),
7456
7466
  /* @__PURE__ */ e(el, { sizeMeta: d }),
7457
7467
  T ? /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6 min-h-0", children: [
7458
- /* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((F, A) => /* @__PURE__ */ e(
7468
+ /* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((A, E) => /* @__PURE__ */ e(
7459
7469
  _t,
7460
7470
  {
7461
- contact: F,
7471
+ contact: A,
7462
7472
  sizeMeta: d,
7463
- isSelected: A === g,
7464
- onClick: (I) => h(I, A)
7473
+ isSelected: E === b,
7474
+ onClick: (I) => h(I, E)
7465
7475
  },
7466
- F._id || F.id || A
7476
+ A._id || A.id || E
7467
7477
  )) }),
7468
7478
  /* @__PURE__ */ e(
7469
7479
  Ks,
@@ -7474,15 +7484,15 @@ function tl({
7474
7484
  )
7475
7485
  ] }) : (
7476
7486
  // Single column layout for small screens
7477
- /* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((F, A) => /* @__PURE__ */ e(
7487
+ /* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((A, E) => /* @__PURE__ */ e(
7478
7488
  _t,
7479
7489
  {
7480
- contact: F,
7490
+ contact: A,
7481
7491
  sizeMeta: d,
7482
- isSelected: A === g,
7483
- onClick: (I) => h(I, A)
7492
+ isSelected: E === b,
7493
+ onClick: (I) => h(I, E)
7484
7494
  },
7485
- F._id || F.id || A
7495
+ A._id || A.id || E
7486
7496
  )) })
7487
7497
  ),
7488
7498
  /* @__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" }) })
@@ -7571,8 +7581,8 @@ function nl({
7571
7581
  termLabel: o = "Spring 2024",
7572
7582
  balance: u = 3e3,
7573
7583
  totalCharges: p = 4440,
7574
- totalPayments: g = 1568,
7575
- transactions: b = [
7584
+ totalPayments: b = 1568,
7585
+ transactions: f = [
7576
7586
  {
7577
7587
  id: "t1",
7578
7588
  date: "February 16, 2025",
@@ -7599,7 +7609,7 @@ function nl({
7599
7609
  checkboxPosition: s,
7600
7610
  onSelect: i,
7601
7611
  identity: l,
7602
- details: { type: "account-summary", termLabel: o, balance: u, totalCharges: p, totalPayments: g },
7612
+ details: { type: "account-summary", termLabel: o, balance: u, totalCharges: p, totalPayments: b },
7603
7613
  ...r,
7604
7614
  children: [
7605
7615
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
@@ -7620,7 +7630,7 @@ function nl({
7620
7630
  ] }),
7621
7631
  /* @__PURE__ */ n("div", { children: [
7622
7632
  /* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Total Payments" }),
7623
- /* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: $e(g) })
7633
+ /* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: $e(b) })
7624
7634
  ] })
7625
7635
  ] })
7626
7636
  ] }),
@@ -7632,10 +7642,10 @@ function nl({
7632
7642
  ] }),
7633
7643
  /* @__PURE__ */ n("div", { children: [
7634
7644
  /* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Total Payments" }),
7635
- /* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: $e(g) })
7645
+ /* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: $e(b) })
7636
7646
  ] })
7637
7647
  ] }),
7638
- /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: b.slice(0, 2).map(($, T) => /* @__PURE__ */ e(
7648
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: f.slice(0, 2).map(($, T) => /* @__PURE__ */ e(
7639
7649
  al,
7640
7650
  {
7641
7651
  side: T === 0 ? "left" : "right",
@@ -7657,7 +7667,7 @@ function nl({
7657
7667
  "aria-label": "View Transactions (mock)",
7658
7668
  children: [
7659
7669
  "View Transactions",
7660
- /* @__PURE__ */ e(Or, { className: "h-4 w-4" })
7670
+ /* @__PURE__ */ e(Pr, { className: "h-4 w-4" })
7661
7671
  ]
7662
7672
  }
7663
7673
  )
@@ -7763,7 +7773,7 @@ function ll({
7763
7773
  term: o = "Fall 2025",
7764
7774
  ...u
7765
7775
  }) {
7766
- const [p, g] = M("vacation"), [b, r] = M(!1), y = oe(t), d = ce[y], h = sl[y], $ = We.find((T) => T.id === p) || We[0];
7776
+ const [p, b] = M("vacation"), [f, r] = M(!1), y = oe(t), d = ce[y], h = sl[y], $ = We.find((T) => T.id === p) || We[0];
7767
7777
  return /* @__PURE__ */ n(
7768
7778
  ie,
7769
7779
  {
@@ -7789,11 +7799,11 @@ function ll({
7789
7799
  "button",
7790
7800
  {
7791
7801
  className: "flex items-center gap-1 p-2 text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-md transition-colors duration-200",
7792
- onClick: () => r(!b),
7802
+ onClick: () => r(!f),
7793
7803
  children: /* @__PURE__ */ e(na, { className: "h-4 w-4" })
7794
7804
  }
7795
7805
  ),
7796
- b && /* @__PURE__ */ n("div", { className: "absolute right-0 top-full mt-1 w-48 bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 rounded-md shadow-lg z-10 py-1", children: [
7806
+ f && /* @__PURE__ */ n("div", { className: "absolute right-0 top-full mt-1 w-48 bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 rounded-md shadow-lg z-10 py-1", children: [
7797
7807
  /* @__PURE__ */ e("button", { className: "w-full px-4 py-2 text-sm text-zinc-700 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-700 text-left", children: "Download Pay Stub" }),
7798
7808
  /* @__PURE__ */ e("button", { className: "w-full px-4 py-2 text-sm text-zinc-700 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-700 text-left", children: "View Leave History" })
7799
7809
  ] })
@@ -7803,7 +7813,7 @@ function ll({
7803
7813
  "button",
7804
7814
  {
7805
7815
  className: `flex-1 py-2 px-4 text-center ${h.tab} font-medium border-b-2 transition-colors duration-200 ${p === 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"}`,
7806
- onClick: () => g(T.id),
7816
+ onClick: () => b(T.id),
7807
7817
  children: T.name.split(" ")[0]
7808
7818
  },
7809
7819
  T.id
@@ -7954,7 +7964,7 @@ function dl({
7954
7964
  subtitle: o = "Drive Shared",
7955
7965
  ...u
7956
7966
  }) {
7957
- const [p, g] = M(!1), b = oe(t), r = ce[b], y = cl[b];
7967
+ const [p, b] = M(!1), f = oe(t), r = ce[f], y = cl[f];
7958
7968
  return /* @__PURE__ */ n(
7959
7969
  ie,
7960
7970
  {
@@ -7976,7 +7986,7 @@ function dl({
7976
7986
  "button",
7977
7987
  {
7978
7988
  className: "flex items-center gap-1 p-2 text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-md transition-colors duration-200",
7979
- onClick: () => g(!p),
7989
+ onClick: () => b(!p),
7980
7990
  children: /* @__PURE__ */ e(Qt, { className: "h-4 w-4" })
7981
7991
  }
7982
7992
  ),
@@ -7986,7 +7996,7 @@ function dl({
7986
7996
  "Download All"
7987
7997
  ] }),
7988
7998
  /* @__PURE__ */ n("button", { className: "w-full px-4 py-2 text-sm text-zinc-700 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-700 text-left flex items-center gap-2", children: [
7989
- /* @__PURE__ */ e(Pr, { className: "h-4 w-4" }),
7999
+ /* @__PURE__ */ e(Or, { className: "h-4 w-4" }),
7990
8000
  "Share Drive"
7991
8001
  ] })
7992
8002
  ] })
@@ -8200,9 +8210,9 @@ function bl({
8200
8210
  showBanner: u = !0,
8201
8211
  ...p
8202
8212
  }) {
8203
- const [g, b] = M(o), r = oe(t), y = ce[r], d = ul[r], h = (F) => {
8204
- b((A) => A.filter((I) => I.id !== F.id));
8205
- }, $ = g.find((F) => F.type === "banner"), T = g.filter((F) => F.type !== "banner");
8213
+ const [b, f] = M(o), r = oe(t), y = ce[r], d = ul[r], h = (A) => {
8214
+ f((E) => E.filter((I) => I.id !== A.id));
8215
+ }, $ = b.find((A) => A.type === "banner"), T = b.filter((A) => A.type !== "banner");
8206
8216
  return /* @__PURE__ */ n(
8207
8217
  ie,
8208
8218
  {
@@ -8211,7 +8221,7 @@ function bl({
8211
8221
  checkboxPosition: s,
8212
8222
  onSelect: i,
8213
8223
  identity: l,
8214
- details: { type: "alerts", title: m, count: g.length },
8224
+ details: { type: "alerts", title: m, count: b.length },
8215
8225
  ...p,
8216
8226
  children: [
8217
8227
  /* @__PURE__ */ e("div", { className: "flex items-center justify-between ", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${y.title}`, children: m }) }),
@@ -8222,14 +8232,14 @@ function bl({
8222
8232
  onDismiss: h
8223
8233
  }
8224
8234
  ),
8225
- /* @__PURE__ */ e("div", { className: "space-y-0.5", children: T.slice(0, 3).map((F) => /* @__PURE__ */ e(
8235
+ /* @__PURE__ */ e("div", { className: "space-y-0.5", children: T.slice(0, 3).map((A) => /* @__PURE__ */ e(
8226
8236
  pl,
8227
8237
  {
8228
- alert: F,
8238
+ alert: A,
8229
8239
  sizeMeta: d,
8230
8240
  onDismiss: h
8231
8241
  },
8232
- F.id
8242
+ A.id
8233
8243
  )) }),
8234
8244
  /* @__PURE__ */ e("button", { className: "w-full py-3 px-4 border border-zinc-300 dark:border-zinc-600 text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 font-medium rounded-lg transition-colors duration-200", children: "View All" })
8235
8245
  ]
@@ -8376,7 +8386,7 @@ function vl({
8376
8386
  videos: o = fl,
8377
8387
  ...u
8378
8388
  }) {
8379
- const [p, g] = M(!1), b = oe(t), r = ce[b], y = xl[b];
8389
+ const [p, b] = M(!1), f = oe(t), r = ce[f], y = xl[f];
8380
8390
  return /* @__PURE__ */ n(
8381
8391
  ie,
8382
8392
  {
@@ -8395,7 +8405,7 @@ function vl({
8395
8405
  "button",
8396
8406
  {
8397
8407
  className: "flex items-center gap-1 px-3 py-1.5 text-sm text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 border border-zinc-300 dark:border-zinc-600 rounded-md transition-colors duration-200",
8398
- onClick: () => g(!p),
8408
+ onClick: () => b(!p),
8399
8409
  children: [
8400
8410
  "Filter",
8401
8411
  /* @__PURE__ */ e(ve, { className: "h-4 w-4 transform rotate-90" })
@@ -8475,19 +8485,19 @@ export {
8475
8485
  X as Input,
8476
8486
  ll as LeaveBalanceMock,
8477
8487
  Aa as ManageCollectionList,
8478
- Pn as Modal,
8488
+ On as Modal,
8479
8489
  nt as MultiSelect,
8480
- Ps as NewsMock,
8490
+ Os as NewsMock,
8481
8491
  Hs as O365MailsMock,
8482
8492
  _n as OptionsMenu,
8483
8493
  Vn as PageHeader,
8484
8494
  Vl as PageLayout,
8485
- Ol as Pagination,
8495
+ Pl as Pagination,
8486
8496
  ba as RadioGroup,
8487
8497
  be as SearchBar,
8488
8498
  ft as Select,
8489
8499
  ie as SelectableCard,
8490
- Pl as Sidebar,
8500
+ Ol as Sidebar,
8491
8501
  xa as Spinner,
8492
8502
  ya as Textarea,
8493
8503
  Zl as ToastProvider,