unifyedx-storybook-new 0.2.77 → 0.2.78

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.
@@ -15,8 +15,8 @@ const wn = (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
  }, kn = (t) => {
18
- const a = (t ?? "").trim().toLowerCase(), s = parseInt((a.match(/\d+$/) ?? [0])[0], 10) || 0, i = wn(a), l = (i % 360 + 37 * s) % 360, m = 55 + (i >>> 8) % 20, o = 30 + (i >>> 16) % 10, u = 86 + (i >>> 24) % 8, h = `hsl(${l}, ${m}%, ${u}%)`, N = `hsl(${l}, ${m}%, ${o}%)`;
19
- return { bg: h, text: N };
18
+ const a = (t ?? "").trim().toLowerCase(), s = parseInt((a.match(/\d+$/) ?? [0])[0], 10) || 0, i = wn(a), l = (i % 360 + 37 * s) % 360, m = 55 + (i >>> 8) % 20, o = 30 + (i >>> 16) % 10, h = 86 + (i >>> 24) % 8, u = `hsl(${l}, ${m}%, ${h}%)`, N = `hsl(${l}, ${m}%, ${o}%)`;
19
+ return { bg: u, text: N };
20
20
  }, Cn = (t = "") => t.split(" ").map((a) => a[0]).slice(0, 2).join("").toUpperCase(), we = ({
21
21
  src: t,
22
22
  name: a,
@@ -29,14 +29,14 @@ const wn = (t) => {
29
29
  className: m,
30
30
  ...o
31
31
  }) => {
32
- const [u, h] = B(!1), N = ae(() => kn(a), []), y = t && !u, r = !y && a, v = !y && !a, d = H(
32
+ const [h, u] = B(!1), N = ae(() => kn(a), []), y = t && !h, r = !y && a, v = !y && !a, d = H(
33
33
  "avatar-container",
34
34
  `avatar--size-${s}`,
35
35
  m
36
- ), p = y ? "transparent" : i || N.bg, z = l || N.text;
36
+ ), g = y ? "transparent" : i || N.bg, D = l || N.text;
37
37
  return /* @__PURE__ */ n("div", { className: d, style: {
38
- backgroundColor: p,
39
- color: z
38
+ backgroundColor: g,
39
+ color: D
40
40
  }, ...o, children: [
41
41
  y && /* @__PURE__ */ e(
42
42
  "img",
@@ -44,7 +44,7 @@ const wn = (t) => {
44
44
  src: t,
45
45
  alt: a || "User avatar",
46
46
  className: "avatar-image",
47
- onError: () => h(!0)
47
+ onError: () => u(!0)
48
48
  }
49
49
  ),
50
50
  r && /* @__PURE__ */ e("span", { className: "avatar-initials", "aria-label": a, children: Cn(a) }),
@@ -71,21 +71,21 @@ const wn = (t) => {
71
71
  onRemove: l,
72
72
  bgColor: m,
73
73
  textColor: o,
74
- className: u,
75
- ...h
74
+ className: h,
75
+ ...u
76
76
  }) => {
77
77
  const N = H(
78
78
  "badge",
79
79
  `badge--variant-${a}`,
80
80
  `badge--size-${s}`,
81
81
  { "badge--with-remove": !!l },
82
- u
82
+ h
83
83
  );
84
84
  return /* @__PURE__ */ n("span", { className: N, style: m && o ? {
85
85
  backgroundColor: m,
86
86
  color: o,
87
87
  borderColor: "#ff0000"
88
- } : {}, ...h, children: [
88
+ } : {}, ...u, children: [
89
89
  i && /* @__PURE__ */ e(i, { className: "badge-icon" }),
90
90
  /* @__PURE__ */ e("span", { className: "badge-label", children: t }),
91
91
  l && /* @__PURE__ */ e(
@@ -146,21 +146,21 @@ const Dn = {
146
146
  // ✅ Default is now empty
147
147
  loader: m = !1,
148
148
  category: o = "primary",
149
- icon: u,
149
+ icon: h,
150
150
  // Renamed for clarity, expecting a component type e.g., CheckCircle
151
- disabled: h = !1,
151
+ disabled: u = !1,
152
152
  size: N = "medium",
153
153
  label: y,
154
154
  children: r,
155
155
  // ✅ Add children to the props list
156
156
  iconWidth: v,
157
157
  iconHeight: d,
158
- iconColor: p,
159
- strokeWidth: z,
158
+ iconColor: g,
159
+ strokeWidth: D,
160
160
  onClick: F,
161
161
  ...E
162
162
  }) => {
163
- const R = h || m, P = u && !y, j = H(
163
+ const I = u || m, P = h && !y, _ = H(
164
164
  "btn-base",
165
165
  Dn[N],
166
166
  $n[o],
@@ -175,14 +175,14 @@ const Dn = {
175
175
  {
176
176
  "data-testid": t,
177
177
  type: s,
178
- className: j,
179
- disabled: R,
178
+ className: _,
179
+ disabled: I,
180
180
  onClick: F,
181
181
  title: a || P && i || (typeof y == "string" ? y : void 0),
182
182
  "aria-label": i || P && a || (typeof y == "string" ? y : void 0),
183
183
  ...E,
184
184
  children: m ? /* @__PURE__ */ e(ja, { className: "loader-spin", "data-testid": "button-loader" }) : /* @__PURE__ */ n(te, { children: [
185
- u && /* @__PURE__ */ e(u, { size: N === "large" ? 20 : 16, width: v || 16, height: d || 16, color: p || "#767676", strokeWidth: z || 2 }),
185
+ h && /* @__PURE__ */ e(h, { size: N === "large" ? 20 : 16, width: v || 16, height: d || 16, color: g || "#767676", strokeWidth: D || 2 }),
186
186
  y,
187
187
  r,
188
188
  " "
@@ -220,9 +220,9 @@ const Dn = {
220
220
  ref: l,
221
221
  checked: m,
222
222
  onChange: o,
223
- ...u
223
+ ...h
224
224
  }) => {
225
- const h = He(), N = a || h;
225
+ const u = He(), N = a || u;
226
226
  return /* @__PURE__ */ n("div", { className: `checkbox-container ${i || ""}`, children: [
227
227
  /* @__PURE__ */ n("label", { htmlFor: N, className: "checkbox-wrapper", children: [
228
228
  /* @__PURE__ */ e(
@@ -234,7 +234,7 @@ const Dn = {
234
234
  className: "checkbox-input",
235
235
  checked: m,
236
236
  onChange: o,
237
- ...u
237
+ ...h
238
238
  }
239
239
  ),
240
240
  /* @__PURE__ */ e(
@@ -260,9 +260,9 @@ const Dn = {
260
260
  label: l,
261
261
  error: m,
262
262
  disabled: o = !1,
263
- className: u,
264
- ...h
265
- }) => /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", u), children: [
263
+ className: h,
264
+ ...u
265
+ }) => /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", h), children: [
266
266
  l && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "datepicker-input", children: l }),
267
267
  /* @__PURE__ */ e(
268
268
  ua,
@@ -288,8 +288,8 @@ const Dn = {
288
288
  label: l,
289
289
  error: m,
290
290
  disabled: o = !1,
291
- className: u,
292
- ...h
291
+ className: h,
292
+ ...u
293
293
  }) => {
294
294
  const N = t?.from, y = t?.to, r = (d) => {
295
295
  d.stopPropagation(), d.preventDefault(), s?.();
@@ -298,7 +298,7 @@ const Dn = {
298
298
  " - ",
299
299
  St(y, "MMM d, y")
300
300
  ] }) : /* @__PURE__ */ e("span", { className: "datepicker-placeholder", children: i });
301
- return /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", u), children: [
301
+ return /* @__PURE__ */ n("div", { className: H("datepicker-wrapper", h), children: [
302
302
  l && /* @__PURE__ */ e("label", { className: "datepicker-label", htmlFor: "daterangepicker-input", children: l }),
303
303
  /* @__PURE__ */ n(An, { children: [
304
304
  /* @__PURE__ */ e(Fn, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "datepicker-input-container", children: [
@@ -599,17 +599,17 @@ const Dn = {
599
599
  open: m,
600
600
  // --- Form and File State ---
601
601
  validFiles: o = [],
602
- rejectedFiles: u = [],
603
- handleRemoveValidFile: h,
602
+ rejectedFiles: h = [],
603
+ handleRemoveValidFile: u,
604
604
  handleRemoveRejectedFile: N,
605
605
  handleSubmit: y,
606
606
  isSubmitting: r,
607
607
  formErrors: v,
608
608
  // --- UI Text ---
609
609
  title: d = "Upload Files",
610
- subHeading: p = "Supports PNG, JPG, PDF. Max size: 50MB."
610
+ subHeading: g = "Supports PNG, JPG, PDF. Max size: 50MB."
611
611
  }) => {
612
- const z = o.length > 0 || u.length > 0;
612
+ const D = o.length > 0 || h.length > 0;
613
613
  return /* @__PURE__ */ e(he, { appear: !0, show: t, as: Q, children: /* @__PURE__ */ n(
614
614
  ye,
615
615
  {
@@ -669,7 +669,7 @@ const Dn = {
669
669
  children: [
670
670
  /* @__PURE__ */ e(Ga, { size: 48, className: "text-gray-400" }),
671
671
  /* @__PURE__ */ e("p", { children: "Drag and drop files here" }),
672
- /* @__PURE__ */ e("p", { className: "sub-heading", children: p }),
672
+ /* @__PURE__ */ e("p", { className: "sub-heading", children: g }),
673
673
  /* @__PURE__ */ e("hr", {}),
674
674
  /* @__PURE__ */ e("p", { children: "OR" }),
675
675
  /* @__PURE__ */ e(
@@ -685,7 +685,7 @@ const Dn = {
685
685
  }
686
686
  ),
687
687
  v.filesToUpload && /* @__PURE__ */ e("p", { className: "form-error-message", children: v.filesToUpload.message }),
688
- z && /* @__PURE__ */ n("div", { className: "file-list-container", children: [
688
+ D && /* @__PURE__ */ n("div", { className: "file-list-container", children: [
689
689
  /* @__PURE__ */ e("h3", { children: "Upload Queue" }),
690
690
  /* @__PURE__ */ n("ul", { className: "file-list", children: [
691
691
  o.map((F, E) => /* @__PURE__ */ n(
@@ -709,7 +709,7 @@ const Dn = {
709
709
  "button",
710
710
  {
711
711
  type: "button",
712
- onClick: () => h(E),
712
+ onClick: () => u(E),
713
713
  className: "remove-file-button",
714
714
  children: /* @__PURE__ */ e(Le, { size: 16 })
715
715
  }
@@ -718,7 +718,7 @@ const Dn = {
718
718
  },
719
719
  `${F.name}-${E}`
720
720
  )),
721
- u.map(({ file: F, message: E }, R) => /* @__PURE__ */ n(
721
+ h.map(({ file: F, message: E }, I) => /* @__PURE__ */ n(
722
722
  "li",
723
723
  {
724
724
  className: "file-item file-item--rejected",
@@ -740,14 +740,14 @@ const Dn = {
740
740
  "button",
741
741
  {
742
742
  type: "button",
743
- onClick: () => N(R),
743
+ onClick: () => N(I),
744
744
  className: "remove-file-button",
745
745
  children: /* @__PURE__ */ e(Le, { size: 16 })
746
746
  }
747
747
  )
748
748
  ]
749
749
  },
750
- `${F.name}-${R}`
750
+ `${F.name}-${I}`
751
751
  ))
752
752
  ] })
753
753
  ] })
@@ -829,10 +829,10 @@ const Dn = {
829
829
  filterConfig: l = [],
830
830
  initialFormikValues: m,
831
831
  customStyles: o = "",
832
- fetchCreatedOrUpdatedByUsers: u = async () => []
832
+ fetchCreatedOrUpdatedByUsers: h = async () => []
833
833
  // Mockable fetcher
834
834
  }) => {
835
- const [h, N] = B({
835
+ const [u, N] = B({
836
836
  createdBy: [],
837
837
  updatedBy: []
838
838
  }), [y, r] = B({
@@ -840,7 +840,7 @@ const Dn = {
840
840
  updatedBy: !1
841
841
  }), [v, d] = B({
842
842
  startDate: null
843
- }), [p, z] = B({
843
+ }), [g, D] = B({
844
844
  endDate: null
845
845
  }), F = qa({
846
846
  initialValues: JSON.parse(JSON.stringify(m)),
@@ -855,7 +855,7 @@ const Dn = {
855
855
  };
856
856
  }), console.log("[storybook filter] Applied Filters:", x), typeof s == "function" && s({
857
857
  filters: x,
858
- activeCount: R
858
+ activeCount: I
859
859
  }), a();
860
860
  },
861
861
  enableReinitialize: !0
@@ -873,18 +873,18 @@ const Dn = {
873
873
  break;
874
874
  }
875
875
  return $[b] = O, $;
876
- }, {}), [l, F.values]), R = Object.values(E).filter(Boolean).length, P = ae(() => l.some(($) => {
876
+ }, {}), [l, F.values]), I = Object.values(E).filter(Boolean).length, P = ae(() => l.some(($) => {
877
877
  if ($.type !== "date") return !1;
878
878
  const x = F.values?.[$.key]?.values;
879
879
  if (!Array.isArray(x) || x.length < 2) return !1;
880
880
  const [b, S] = x;
881
881
  if (!b || !S) return !1;
882
- const O = b instanceof Date ? b : new Date(b), I = S instanceof Date ? S : new Date(S);
883
- return O > I;
884
- }), [l, F.values]), j = async ($, x) => {
882
+ const O = b instanceof Date ? b : new Date(b), R = S instanceof Date ? S : new Date(S);
883
+ return O > R;
884
+ }), [l, F.values]), _ = async ($, x) => {
885
885
  try {
886
886
  r((S) => ({ ...S, [$]: !0 }));
887
- const b = await u($, x);
887
+ const b = await h($, x);
888
888
  N((S) => ({ ...S, [$]: b }));
889
889
  } catch (b) {
890
890
  console.error(`Error fetching ${$} users:`, b);
@@ -893,7 +893,7 @@ const Dn = {
893
893
  }
894
894
  }, U = ($) => {
895
895
  const x = l[$].key, b = l[$].url;
896
- l[$].type === "multiselect-users" && h[x].length === 0 && !y[x] && j(x, b);
896
+ l[$].type === "multiselect-users" && u[x].length === 0 && !y[x] && _(x, b);
897
897
  }, Y = () => {
898
898
  F.resetForm(), N({ createdBy: [], updatedBy: [] }), i();
899
899
  }, q = ($) => {
@@ -965,7 +965,7 @@ const Dn = {
965
965
  ] })
966
966
  ] });
967
967
  case "multiselect-users":
968
- const O = h[$] || [], I = y[$];
968
+ const O = u[$] || [], R = y[$];
969
969
  return /* @__PURE__ */ n("div", { className: "filter-panel-content", children: [
970
970
  /* @__PURE__ */ n("div", { className: "filter-operator-group", children: [
971
971
  /* @__PURE__ */ e("label", { className: "filter-label", children: "Operator:" }),
@@ -979,7 +979,7 @@ const Dn = {
979
979
  }
980
980
  )
981
981
  ] }),
982
- I ? /* @__PURE__ */ e("div", { className: "loading-spinner", children: /* @__PURE__ */ e("div", {}) }) : /* @__PURE__ */ e("div", { className: "filter-checkbox-list", children: O.length > 0 ? /* @__PURE__ */ n(te, { children: [
982
+ R ? /* @__PURE__ */ e("div", { className: "loading-spinner", children: /* @__PURE__ */ e("div", {}) }) : /* @__PURE__ */ e("div", { className: "filter-checkbox-list", children: O.length > 0 ? /* @__PURE__ */ n(te, { children: [
983
983
  /* @__PURE__ */ n("div", { className: "filter-checkbox-item", children: [
984
984
  /* @__PURE__ */ e(
985
985
  "input",
@@ -1038,7 +1038,7 @@ const Dn = {
1038
1038
  ] }) : /* @__PURE__ */ e("div", { className: "text-center py-4 text-gray-500 text-sm", children: "No users loaded." }) })
1039
1039
  ] });
1040
1040
  case "date":
1041
- const D = b.values || [], [f, g] = D, k = f && g, w = D[0] || null, T = D[1] || null, L = {
1041
+ const z = b.values || [], [f, p] = z, k = f && p, w = z[0] || null, T = z[1] || null, L = {
1042
1042
  startDate: w instanceof Date ? w.toISOString().slice(0, 10) : null,
1043
1043
  endDate: w instanceof Date ? w.toISOString().slice(0, 10) : null
1044
1044
  }, C = {
@@ -1052,7 +1052,7 @@ const Dn = {
1052
1052
  { key: "this_month", label: "This Month" },
1053
1053
  { key: "last_month", label: "Last Month" },
1054
1054
  { key: "custom", label: "Custom" }
1055
- ], _ = (A) => {
1055
+ ], V = (A) => {
1056
1056
  if (A === "anytime") {
1057
1057
  F.setFieldValue(`${$}.values`, []), F.setFieldValue(`${$}.range`, "anytime");
1058
1058
  return;
@@ -1104,7 +1104,7 @@ const Dn = {
1104
1104
  type: "radio",
1105
1105
  name: `preset-${$}`,
1106
1106
  checked: G,
1107
- onChange: () => _(A.key),
1107
+ onChange: () => V(A.key),
1108
1108
  className: "h-4 w-4"
1109
1109
  }
1110
1110
  ),
@@ -1126,7 +1126,7 @@ const Dn = {
1126
1126
  useRange: !1,
1127
1127
  value: L,
1128
1128
  onChange: (A) => {
1129
- const G = A?.startDate ? Ve(new Date(A.startDate)) : null, W = D[1] || null;
1129
+ const G = A?.startDate ? Ve(new Date(A.startDate)) : null, W = z[1] || null;
1130
1130
  G && (F.setFieldValue(`${$}.values`, [G, W]), F.setFieldValue(`${$}.range`, "custom"));
1131
1131
  },
1132
1132
  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",
@@ -1150,7 +1150,7 @@ const Dn = {
1150
1150
  useRange: !1,
1151
1151
  value: C,
1152
1152
  onChange: (A) => {
1153
- const G = A?.startDate ? je(new Date(A.startDate)) : null, W = D[0] || null;
1153
+ const G = A?.startDate ? je(new Date(A.startDate)) : null, W = z[0] || null;
1154
1154
  G && (F.setFieldValue(`${$}.values`, [W, G]), F.setFieldValue(`${$}.range`, "custom"));
1155
1155
  },
1156
1156
  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",
@@ -1272,7 +1272,7 @@ const Dn = {
1272
1272
  children: [
1273
1273
  "Apply Filters",
1274
1274
  " ",
1275
- R > 0 ? `(${R})` : ""
1275
+ I > 0 ? `(${I})` : ""
1276
1276
  ]
1277
1277
  }
1278
1278
  )
@@ -1291,24 +1291,24 @@ const Dn = {
1291
1291
  className: m,
1292
1292
  ref: o,
1293
1293
  // ✅ 'ref' is now received directly as a prop
1294
- ...u
1294
+ ...h
1295
1295
  }) => {
1296
- const h = a || u.name;
1296
+ const u = a || h.name;
1297
1297
  return /* @__PURE__ */ n("div", { className: `input-wrapper ${m || ""}`, children: [
1298
- t && /* @__PURE__ */ e("label", { htmlFor: h, className: "input-label", children: t }),
1298
+ t && /* @__PURE__ */ e("label", { htmlFor: u, className: "input-label", children: t }),
1299
1299
  /* @__PURE__ */ n("div", { className: "input-field-container", children: [
1300
1300
  i && /* @__PURE__ */ e(i, { className: "input-icon", size: 20 }),
1301
1301
  /* @__PURE__ */ e(
1302
1302
  "input",
1303
1303
  {
1304
- id: h,
1304
+ id: u,
1305
1305
  type: s,
1306
1306
  ref: o,
1307
1307
  className: H("input-field", {
1308
1308
  "input-field--error": !!l,
1309
1309
  "input-field--with-icon": !!i
1310
1310
  }),
1311
- ...u
1311
+ ...h
1312
1312
  }
1313
1313
  )
1314
1314
  ] }),
@@ -1344,8 +1344,8 @@ const Dn = {
1344
1344
  // No default
1345
1345
  variant: o = "info",
1346
1346
  // 'info', 'warning', 'delete'
1347
- loading: u = !1,
1348
- buttonProps: h = {},
1347
+ loading: h = !1,
1348
+ buttonProps: u = {},
1349
1349
  size: N
1350
1350
  // Add size prop
1351
1351
  }) => {
@@ -1402,7 +1402,7 @@ const Dn = {
1402
1402
  type: "button",
1403
1403
  onClick: v,
1404
1404
  label: l,
1405
- ...h
1405
+ ...u
1406
1406
  }
1407
1407
  )
1408
1408
  ] })
@@ -1418,14 +1418,14 @@ const Dn = {
1418
1418
  onItemsPerPageChange: l,
1419
1419
  itemsPerPageOptions: m = [10, 15, 20]
1420
1420
  }) => {
1421
- const o = Math.ceil(a / s), [u, h] = B(t);
1421
+ const o = Math.ceil(a / s), [h, u] = B(t);
1422
1422
  Z(() => {
1423
- h(t);
1423
+ u(t);
1424
1424
  }, [t]);
1425
1425
  const N = Math.min((t - 1) * s + 1, a), y = Math.min(t * s, a), r = (v) => {
1426
1426
  v.preventDefault();
1427
- let d = parseInt(u, 10);
1428
- isNaN(d) || d < 1 ? d = 1 : d > o && (d = o), h(d), d !== t && i(d);
1427
+ let d = parseInt(h, 10);
1428
+ isNaN(d) || d < 1 ? d = 1 : d > o && (d = o), u(d), d !== t && i(d);
1429
1429
  };
1430
1430
  return /* @__PURE__ */ n("div", { className: "pagination-container", children: [
1431
1431
  /* @__PURE__ */ n("div", { className: "pagination-left", children: [
@@ -1475,8 +1475,8 @@ const Dn = {
1475
1475
  {
1476
1476
  type: "number",
1477
1477
  className: "page-input",
1478
- value: u,
1479
- onChange: (v) => h(v.target.value),
1478
+ value: h,
1479
+ onChange: (v) => u(v.target.value),
1480
1480
  onBlur: r,
1481
1481
  "aria-label": `Current page, Page ${t}`
1482
1482
  }
@@ -1527,12 +1527,12 @@ const Dn = {
1527
1527
  Ue.Option,
1528
1528
  {
1529
1529
  value: o.value,
1530
- className: ({ active: u, checked: h }) => H("radiogroup-option", {
1531
- "radiogroup-option--active": u,
1532
- "radiogroup-option--checked": h,
1530
+ className: ({ active: h, checked: u }) => H("radiogroup-option", {
1531
+ "radiogroup-option--active": h,
1532
+ "radiogroup-option--checked": u,
1533
1533
  "radiogroup-option--error": !!l
1534
1534
  }),
1535
- children: ({ checked: u }) => /* @__PURE__ */ n(te, { children: [
1535
+ children: ({ checked: h }) => /* @__PURE__ */ n(te, { children: [
1536
1536
  /* @__PURE__ */ n("div", { className: "radiogroup-option-content", children: [
1537
1537
  /* @__PURE__ */ e(Ue.Label, { as: "p", className: "option-label", children: o.label }),
1538
1538
  o.description && /* @__PURE__ */ e(
@@ -1544,7 +1544,7 @@ const Dn = {
1544
1544
  }
1545
1545
  )
1546
1546
  ] }),
1547
- u && /* @__PURE__ */ e("div", { className: "option-checkmark", children: /* @__PURE__ */ e(Ht, { size: 20 }) })
1547
+ h && /* @__PURE__ */ e("div", { className: "option-checkmark", children: /* @__PURE__ */ e(Ht, { size: 20 }) })
1548
1548
  ] })
1549
1549
  },
1550
1550
  o.value
@@ -1561,8 +1561,8 @@ const Dn = {
1561
1561
  // Added a default label for accessibility
1562
1562
  customClass: m = "",
1563
1563
  inputStyle: o = {},
1564
- placeholderClass: u = "",
1565
- searchIconSize: h = 16,
1564
+ placeholderClass: h = "",
1565
+ searchIconSize: u = 16,
1566
1566
  searchIconClass: N = "",
1567
1567
  ...y
1568
1568
  }) => {
@@ -1571,30 +1571,30 @@ const Dn = {
1571
1571
  v(t);
1572
1572
  }, [t]);
1573
1573
  const d = ee(
1574
- Zr((z) => {
1575
- a?.(z);
1574
+ Zr((D) => {
1575
+ a?.(D);
1576
1576
  }, s),
1577
1577
  [s, a]
1578
1578
  );
1579
1579
  Z(() => (r !== t && d(r), () => {
1580
1580
  d.cancel();
1581
1581
  }), [r, d, t]);
1582
- const p = (z) => {
1583
- v(z.target.value);
1582
+ const g = (D) => {
1583
+ v(D.target.value);
1584
1584
  };
1585
1585
  return /* @__PURE__ */ n("div", { className: `search-bar-wrapper ${m}`, children: [
1586
1586
  l && /* @__PURE__ */ e("label", { htmlFor: "search-field", className: "sr-only", children: l }),
1587
- /* @__PURE__ */ e("div", { className: "search-bar-icon-wrapper", children: /* @__PURE__ */ e(vt, { size: h || 16, className: `search-bar-icon ${N}`, "aria-hidden": "true" }) }),
1587
+ /* @__PURE__ */ e("div", { className: "search-bar-icon-wrapper", children: /* @__PURE__ */ e(vt, { size: u || 16, className: `search-bar-icon ${N}`, "aria-hidden": "true" }) }),
1588
1588
  /* @__PURE__ */ e(
1589
1589
  "input",
1590
1590
  {
1591
1591
  id: "search-field",
1592
- className: `search-bar-input ${u}`,
1592
+ className: `search-bar-input ${h}`,
1593
1593
  placeholder: i,
1594
1594
  type: "search",
1595
1595
  name: "search",
1596
1596
  value: r,
1597
- onChange: p,
1597
+ onChange: g,
1598
1598
  style: o,
1599
1599
  ...y
1600
1600
  }
@@ -1610,9 +1610,9 @@ const Dn = {
1610
1610
  placeholder: l = "Select an option...",
1611
1611
  disabled: m = !1,
1612
1612
  error: o,
1613
- ref: u,
1613
+ ref: h,
1614
1614
  // From RHF's <Controller>
1615
- showSearch: h = !0
1615
+ showSearch: u = !0
1616
1616
  }) => {
1617
1617
  const [N, y] = B("");
1618
1618
  console.log("Select component - value:", a, "type:", typeof a), console.log("Select component - options:", i);
@@ -1627,7 +1627,7 @@ const Dn = {
1627
1627
  }
1628
1628
  return d.id === a || d.value === a || d.label === a;
1629
1629
  });
1630
- return /* @__PURE__ */ e(K, { value: a, onChange: s, disabled: m, children: /* @__PURE__ */ n("div", { className: "select-wrapper", ref: u, children: [
1630
+ return /* @__PURE__ */ e(K, { value: a, onChange: s, disabled: m, children: /* @__PURE__ */ n("div", { className: "select-wrapper", ref: h, children: [
1631
1631
  t && /* @__PURE__ */ e("label", { className: "select-label", children: t }),
1632
1632
  /* @__PURE__ */ n("div", { className: "select-button-container", children: [
1633
1633
  /* @__PURE__ */ n(
@@ -1649,7 +1649,7 @@ const Dn = {
1649
1649
  leaveFrom: "opacity-100",
1650
1650
  leaveTo: "opacity-0",
1651
1651
  children: /* @__PURE__ */ n(Ur, { className: "select-options", children: [
1652
- h && /* @__PURE__ */ e("div", { className: "search-input-wrapper", children: /* @__PURE__ */ e(
1652
+ u && /* @__PURE__ */ e("div", { className: "search-input-wrapper", children: /* @__PURE__ */ e(
1653
1653
  ge,
1654
1654
  {
1655
1655
  onKeyDown: (d) => {
@@ -1663,20 +1663,20 @@ const Dn = {
1663
1663
  /* @__PURE__ */ e("div", { className: "select-options-list", children: r.length === 0 && N !== "" ? /* @__PURE__ */ e("div", { className: "no-results", children: "No results found." }) : r.map((d) => /* @__PURE__ */ e(
1664
1664
  Gr,
1665
1665
  {
1666
- className: ({ active: p }) => `select-option ${p ? "active" : ""}`,
1666
+ className: ({ active: g }) => `select-option ${g ? "active" : ""}`,
1667
1667
  value: d,
1668
- children: ({ selected: p }) => /* @__PURE__ */ n(te, { children: [
1668
+ children: ({ selected: g }) => /* @__PURE__ */ n(te, { children: [
1669
1669
  /* @__PURE__ */ n("div", { className: "option-content", children: [
1670
1670
  d.icon && /* @__PURE__ */ e(d.icon, { className: "option-icon" }),
1671
1671
  /* @__PURE__ */ e(
1672
1672
  "span",
1673
1673
  {
1674
- className: `option-label ${p ? "selected" : ""}`,
1674
+ className: `option-label ${g ? "selected" : ""}`,
1675
1675
  children: d.label
1676
1676
  }
1677
1677
  )
1678
1678
  ] }),
1679
- p ? /* @__PURE__ */ e(
1679
+ g ? /* @__PURE__ */ e(
1680
1680
  et,
1681
1681
  {
1682
1682
  className: "option-check-icon",
@@ -1709,11 +1709,11 @@ const Dn = {
1709
1709
  return s;
1710
1710
  return null;
1711
1711
  }, ga = ({ item: t, isCollapsed: a, level: s = 0 }) => {
1712
- const { pathname: i } = Bn(), l = t.href || t.url || t.path, [m, o] = B(!1), u = t.icon;
1712
+ const { pathname: i } = Bn(), l = t.href || t.url || t.path, [m, o] = B(!1), h = t.icon;
1713
1713
  Z(() => {
1714
1714
  yt([t], i) && o(!0);
1715
1715
  }, [t, i]);
1716
- const h = i === l, N = !h && !!yt([t], i), y = (r) => {
1716
+ const u = i === l, N = !u && !!yt([t], i), y = (r) => {
1717
1717
  r.preventDefault(), o(!m);
1718
1718
  };
1719
1719
  return /* @__PURE__ */ n(
@@ -1731,12 +1731,12 @@ const Dn = {
1731
1731
  target: t.target,
1732
1732
  rel: t.target === "_blank" ? "noopener noreferrer" : void 0,
1733
1733
  className: H("nav-item", {
1734
- "nav-item--active": h,
1734
+ "nav-item--active": u,
1735
1735
  "nav-item--collapsed": a
1736
1736
  }),
1737
- "aria-current": h ? "page" : void 0,
1737
+ "aria-current": u ? "page" : void 0,
1738
1738
  children: [
1739
- u && /* @__PURE__ */ e(u, { className: "nav-icon", "aria-hidden": "true" }),
1739
+ h && /* @__PURE__ */ e(h, { className: "nav-icon", "aria-hidden": "true" }),
1740
1740
  /* @__PURE__ */ e("span", { className: "nav-label", children: t.label || t.name }),
1741
1741
  t.children && /* @__PURE__ */ e(
1742
1742
  "button",
@@ -1788,7 +1788,7 @@ const Dn = {
1788
1788
  onToggleMobile: l,
1789
1789
  logoSmall: m,
1790
1790
  logoLarge: o,
1791
- user: u = { name: "", email: "" }
1791
+ user: h = { name: "", email: "" }
1792
1792
  }) => /* @__PURE__ */ n(te, { children: [
1793
1793
  i && /* @__PURE__ */ e(
1794
1794
  "div",
@@ -1831,12 +1831,12 @@ const Dn = {
1831
1831
  }
1832
1832
  )
1833
1833
  ] }),
1834
- /* @__PURE__ */ e("nav", { className: "sidebar-nav", "aria-label": "Primary", children: /* @__PURE__ */ e("ul", { className: "sidebar-nav-list", children: t.map((h) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(ga, { item: h, isCollapsed: a }) }, h.label || h.name)) }) }),
1834
+ /* @__PURE__ */ e("nav", { className: "sidebar-nav", "aria-label": "Primary", children: /* @__PURE__ */ e("ul", { className: "sidebar-nav-list", children: t.map((u) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(ga, { item: u, isCollapsed: a }) }, u.label || u.name)) }) }),
1835
1835
  /* @__PURE__ */ n("div", { className: "sidebar-footer", children: [
1836
- /* @__PURE__ */ e(we, { src: u.avatar, name: u.name, size: "medium" }),
1836
+ /* @__PURE__ */ e(we, { src: h.avatar, name: h.name, size: "medium" }),
1837
1837
  /* @__PURE__ */ n("div", { className: "user-info", children: [
1838
- /* @__PURE__ */ e("span", { className: "user-name", children: u.name }),
1839
- /* @__PURE__ */ e("span", { className: "user-email", children: u.email })
1838
+ /* @__PURE__ */ e("span", { className: "user-name", children: h.name }),
1839
+ /* @__PURE__ */ e("span", { className: "user-email", children: h.email })
1840
1840
  ] }),
1841
1841
  /* @__PURE__ */ e(
1842
1842
  "button",
@@ -1897,16 +1897,16 @@ const Dn = {
1897
1897
  // ✅ New prop for max length
1898
1898
  showCharCount: o = !1,
1899
1899
  // ✅ New prop to control visibility
1900
- ...u
1900
+ ...h
1901
1901
  }) => {
1902
- const h = a || u.name, [N, y] = B(
1903
- u.value?.length || u.defaultValue?.length || 0
1902
+ const u = a || h.name, [N, y] = B(
1903
+ h.value?.length || h.defaultValue?.length || 0
1904
1904
  ), r = (d) => {
1905
- y(d.target.value.length), u.onChange && u.onChange(d);
1905
+ y(d.target.value.length), h.onChange && h.onChange(d);
1906
1906
  }, v = m - N;
1907
1907
  return /* @__PURE__ */ n("div", { className: `textarea-wrapper ${i || ""}`, children: [
1908
1908
  /* @__PURE__ */ n("div", { className: "textarea-header", children: [
1909
- t && /* @__PURE__ */ e("label", { htmlFor: h, className: "textarea-label", children: t }),
1909
+ t && /* @__PURE__ */ e("label", { htmlFor: u, className: "textarea-label", children: t }),
1910
1910
  o && m && /* @__PURE__ */ n("span", { className: "char-counter", children: [
1911
1911
  v,
1912
1912
  " characters remaining"
@@ -1915,14 +1915,14 @@ const Dn = {
1915
1915
  /* @__PURE__ */ e(
1916
1916
  "textarea",
1917
1917
  {
1918
- id: h,
1918
+ id: u,
1919
1919
  ref: l,
1920
1920
  className: H("textarea-field", {
1921
1921
  "textarea-field--error": !!s
1922
1922
  }),
1923
1923
  maxLength: m,
1924
1924
  onChange: r,
1925
- ...u
1925
+ ...h
1926
1926
  }
1927
1927
  ),
1928
1928
  s && /* @__PURE__ */ e("p", { className: "textarea-error-message", children: s })
@@ -1967,13 +1967,13 @@ const Dn = {
1967
1967
  // For external styling of the tooltip itself
1968
1968
  ...o
1969
1969
  }) => {
1970
- const u = re.useId();
1970
+ const h = re.useId();
1971
1971
  return /* @__PURE__ */ n(te, { children: [
1972
- re.cloneElement(t, { "data-tooltip-id": u }),
1972
+ re.cloneElement(t, { "data-tooltip-id": h }),
1973
1973
  /* @__PURE__ */ e(
1974
1974
  Qa,
1975
1975
  {
1976
- id: u,
1976
+ id: h,
1977
1977
  content: a,
1978
1978
  place: l,
1979
1979
  variant: s,
@@ -2003,11 +2003,11 @@ const Dn = {
2003
2003
  direction: l = 1,
2004
2004
  stepProps: m = {},
2005
2005
  title: o,
2006
- description: u,
2007
- showProgress: h = !0,
2006
+ description: h,
2007
+ showProgress: u = !0,
2008
2008
  closeOnOverlayClick: N = !0
2009
2009
  }) => {
2010
- const y = s[i], r = Object.keys(s), v = r.indexOf(i), d = (v + 1) / r.length * 100, p = v > 0 && m.onBack;
2010
+ const y = s[i], r = Object.keys(s), v = r.indexOf(i), d = (v + 1) / r.length * 100, g = v > 0 && m.onBack;
2011
2011
  return /* @__PURE__ */ e(he, { show: t, as: Q, children: /* @__PURE__ */ n(
2012
2012
  ye,
2013
2013
  {
@@ -2042,7 +2042,7 @@ const Dn = {
2042
2042
  children: /* @__PURE__ */ n(Fe, { className: "wizard-panel", children: [
2043
2043
  /* @__PURE__ */ n("header", { className: "wizard-header", children: [
2044
2044
  /* @__PURE__ */ n("div", { className: "wizard-header-content", children: [
2045
- p && /* @__PURE__ */ e(
2045
+ g && /* @__PURE__ */ e(
2046
2046
  "button",
2047
2047
  {
2048
2048
  onClick: m.onBack,
@@ -2053,7 +2053,7 @@ const Dn = {
2053
2053
  ),
2054
2054
  /* @__PURE__ */ n("div", { className: "wizard-header-text", children: [
2055
2055
  /* @__PURE__ */ e(ye.Title, { as: "h3", className: "wizard-title", children: o }),
2056
- u && /* @__PURE__ */ e(ye.Description, { className: "wizard-description", children: u })
2056
+ h && /* @__PURE__ */ e(ye.Description, { className: "wizard-description", children: h })
2057
2057
  ] })
2058
2058
  ] }),
2059
2059
  /* @__PURE__ */ e(
@@ -2066,7 +2066,7 @@ const Dn = {
2066
2066
  }
2067
2067
  )
2068
2068
  ] }),
2069
- h && /* @__PURE__ */ e("div", { className: "wizard-progress-container", children: /* @__PURE__ */ e(
2069
+ u && /* @__PURE__ */ e("div", { className: "wizard-progress-container", children: /* @__PURE__ */ e(
2070
2070
  "div",
2071
2071
  {
2072
2072
  className: "wizard-progress-bar",
@@ -2123,18 +2123,18 @@ const Dn = {
2123
2123
  category: m = "secondary",
2124
2124
  icon: o,
2125
2125
  // Renamed for clarity, expecting a component type e.g., CheckCircle
2126
- disabled: u = !1,
2127
- size: h = "small",
2126
+ disabled: h = !1,
2127
+ size: u = "small",
2128
2128
  label: N,
2129
2129
  children: y,
2130
2130
  // ✅ Add children to the props list
2131
2131
  onClick: r,
2132
2132
  ...v
2133
2133
  }) => {
2134
- const d = u, p = H(
2134
+ const d = h, g = H(
2135
2135
  "btn-base-icon",
2136
2136
  "btn-icon-only",
2137
- jn[h],
2137
+ jn[u],
2138
2138
  _n[m],
2139
2139
  l
2140
2140
  );
@@ -2143,13 +2143,13 @@ const Dn = {
2143
2143
  {
2144
2144
  "data-testid": t,
2145
2145
  type: s,
2146
- className: p,
2146
+ className: g,
2147
2147
  disabled: d,
2148
2148
  onClick: r,
2149
2149
  title: i,
2150
2150
  "aria-label": i,
2151
2151
  ...v,
2152
- children: o && /* @__PURE__ */ e(o, { size: h === "large" ? 20 : 16 })
2152
+ children: o && /* @__PURE__ */ e(o, { size: u === "large" ? 20 : 16 })
2153
2153
  }
2154
2154
  );
2155
2155
  }, jl = ({
@@ -2162,7 +2162,7 @@ const Dn = {
2162
2162
  // fullHeight = false,
2163
2163
  ...o
2164
2164
  }) => {
2165
- const u = H(
2165
+ const h = H(
2166
2166
  "page-layout",
2167
2167
  {
2168
2168
  "page-layout--with-footer": a
@@ -2170,7 +2170,7 @@ const Dn = {
2170
2170
  },
2171
2171
  o.className
2172
2172
  );
2173
- return /* @__PURE__ */ n("div", { className: u, ...o, children: [
2173
+ return /* @__PURE__ */ n("div", { className: h, ...o, children: [
2174
2174
  /* @__PURE__ */ e("div", { className: "page-layout-content", children: t }),
2175
2175
  a && /* @__PURE__ */ e("footer", { className: "page-layout-footer", children: s || /* @__PURE__ */ n("div", { className: "footer-actions", children: [
2176
2176
  m?.show && /* @__PURE__ */ e(
@@ -2425,13 +2425,13 @@ function Ot() {
2425
2425
  }
2426
2426
  function Zn(t) {
2427
2427
  if (t && t.isAxiosError) {
2428
- const { response: a, config: s, message: i } = t, l = a?.status ?? null, m = a?.statusText ?? null, o = a?.data ?? null, u = typeof o == "string" && o || o?.message || o?.msg || o?.error || o?.errors?.[0]?.message || null;
2428
+ const { response: a, config: s, message: i } = t, l = a?.status ?? null, m = a?.statusText ?? null, o = a?.data ?? null, h = typeof o == "string" && o || o?.message || o?.msg || o?.error || o?.errors?.[0]?.message || null;
2429
2429
  return {
2430
2430
  ok: !1,
2431
2431
  status: l,
2432
2432
  statusText: m,
2433
2433
  code: o?.code || null,
2434
- message: u || i || "Request failed",
2434
+ message: h || i || "Request failed",
2435
2435
  details: o || null,
2436
2436
  request: {
2437
2437
  url: s?.url || null,
@@ -2492,10 +2492,10 @@ function Kn({
2492
2492
  async function o(N, y = {}, r = !1, v = {}) {
2493
2493
  return s.post(N, y, i({ open: r, customHeader: v }));
2494
2494
  }
2495
- async function u(N, y = {}, r = !1, v = {}) {
2495
+ async function h(N, y = {}, r = !1, v = {}) {
2496
2496
  return s.put(N, y, i({ open: r, customHeader: v }));
2497
2497
  }
2498
- async function h(N, y = {}, r = !1, v = {}) {
2498
+ async function u(N, y = {}, r = !1, v = {}) {
2499
2499
  return s.patch(N, y, i({ open: r, customHeader: v }));
2500
2500
  }
2501
2501
  return {
@@ -2504,8 +2504,8 @@ function Kn({
2504
2504
  axiosGet: l,
2505
2505
  axiosDelete: m,
2506
2506
  axiosPost: o,
2507
- axiosPut: u,
2508
- axiosPatch: h
2507
+ axiosPut: h,
2508
+ axiosPatch: u
2509
2509
  };
2510
2510
  }
2511
2511
  const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl = Ee.axiosPut, Wl = Ee.axiosPatch, Jl = Ee.instance, es = async (t, a) => {
@@ -2615,9 +2615,9 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2615
2615
  }) => {
2616
2616
  const l = t.slice(0, 2), m = [];
2617
2617
  t.length > 0 && m.push(t[0].name), a.length > 0 && m.push(a[0].name), s.length > 0 && m.length < 2 && m.push(s[0].name);
2618
- const o = t.length + a.length + s.length, u = o - m.length;
2619
- let h = m.join(", ");
2620
- return u > 0 && (h += ` and ${u} others`), o === 0 ? /* @__PURE__ */ e(
2618
+ const o = t.length + a.length + s.length, h = o - m.length;
2619
+ let u = m.join(", ");
2620
+ return h > 0 && (u += ` and ${h} others`), o === 0 ? /* @__PURE__ */ e(
2621
2621
  "div",
2622
2622
  {
2623
2623
  className: "flex items-center justify-between p-3 border border-dashed border-gray-400 rounded-lg hover:bg-gray-50",
@@ -2640,7 +2640,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2640
2640
  },
2641
2641
  N.id || y
2642
2642
  )) }),
2643
- /* @__PURE__ */ e("p", { className: "text-sm font-medium text-gray-800 truncate", children: h })
2643
+ /* @__PURE__ */ e("p", { className: "text-sm font-medium text-gray-800 truncate", children: u })
2644
2644
  ] }),
2645
2645
  /* @__PURE__ */ e(xe, { size: 20 })
2646
2646
  ]
@@ -2664,9 +2664,9 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2664
2664
  showExistingShares: m = !1,
2665
2665
  onFinalSubmit: o = () => {
2666
2666
  },
2667
- isChanged: u = !1
2667
+ isChanged: h = !1
2668
2668
  }) => {
2669
- const [h, N] = B(Mt[0]), [y, r] = B(""), v = zt(y, 400), [d, p] = B([]), [z, F] = B(/* @__PURE__ */ new Set()), [E, R] = B(!1), [P, j] = B(Lt[0]), {
2669
+ const [u, N] = B(Mt[0]), [y, r] = B(""), v = zt(y, 400), [d, g] = B([]), [D, F] = B(/* @__PURE__ */ new Set()), [E, I] = B(!1), [P, _] = B(Lt[0]), {
2670
2670
  control: U,
2671
2671
  handleSubmit: Y,
2672
2672
  watch: q,
@@ -2674,27 +2674,27 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2674
2674
  } = nr({
2675
2675
  defaultValues: { pendingInvites: [] },
2676
2676
  resolver: ir(rs)
2677
- }), { fields: b, append: S, remove: O, update: I } = sr({
2677
+ }), { fields: b, append: S, remove: O, update: R } = sr({
2678
2678
  control: U,
2679
2679
  name: "pendingInvites"
2680
- }), D = q("pendingInvites");
2680
+ }), z = q("pendingInvites");
2681
2681
  Z(() => {
2682
- v.length > 1 ? (R(!0), es(h.name, v).then((C) => {
2683
- p(C);
2684
- }).catch((C) => console.error("Search failed:", C)).finally(() => R(!1))) : (p([]), F(/* @__PURE__ */ new Set()));
2685
- }, [v, h]);
2682
+ v.length > 1 ? (I(!0), es(u.name, v).then((C) => {
2683
+ g(C);
2684
+ }).catch((C) => console.error("Search failed:", C)).finally(() => I(!1))) : (g([]), F(/* @__PURE__ */ new Set()));
2685
+ }, [v, u]);
2686
2686
  const f = (C) => {
2687
2687
  F((M) => {
2688
- const _ = new Set(M);
2689
- return _.has(C) ? _.delete(C) : _.add(C), _;
2688
+ const V = new Set(M);
2689
+ return V.has(C) ? V.delete(C) : V.add(C), V;
2690
2690
  });
2691
- }, g = () => {
2692
- d.filter((C) => z.has(C.id)).forEach((C) => {
2691
+ }, p = () => {
2692
+ d.filter((C) => D.has(C.id)).forEach((C) => {
2693
2693
  b.find((M) => M.id === C.id) || S({ ...C, permission: P.name });
2694
2694
  }), F(/* @__PURE__ */ new Set()), r("");
2695
2695
  }, k = (C) => {
2696
- j(C), b.forEach(
2697
- (M, _) => I(_, { ...b[_], permission: C.name })
2696
+ _(C), b.forEach(
2697
+ (M, V) => R(V, { ...b[V], permission: C.name })
2698
2698
  );
2699
2699
  }, w = async (C) => {
2700
2700
  try {
@@ -2711,13 +2711,13 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2711
2711
  // Always send updated existing shares
2712
2712
  }, i);
2713
2713
  } else if (l === ue.INTEREST) {
2714
- const M = C.pendingInvites.map((_) => ({
2715
- identity: _.id,
2716
- type: _.type.toLowerCase(),
2714
+ const M = C.pendingInvites.map((V) => ({
2715
+ identity: V.id,
2716
+ type: V.type.toLowerCase(),
2717
2717
  opt: !0,
2718
2718
  lock: !1,
2719
2719
  moderator: !1,
2720
- userName: _.name,
2720
+ userName: V.name,
2721
2721
  interestId: t?.data?.id
2722
2722
  }));
2723
2723
  o(M, i);
@@ -2741,7 +2741,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2741
2741
  throw console.error("Failed to submit invites:", M), M;
2742
2742
  }
2743
2743
  }, T = (C) => {
2744
- const M = i[h.code].find((_) => _.name === C.name && _.permission !== "remove") || D.find((_) => _.name === C.name);
2744
+ const M = i[u.code].find((V) => V.name === C.name && V.permission !== "remove") || z.find((V) => V.name === C.name);
2745
2745
  return M ? `${M.permission}` : "";
2746
2746
  }, L = () => {
2747
2747
  switch (l) {
@@ -2755,9 +2755,9 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2755
2755
  return "Add User, Groups or Roles test";
2756
2756
  }
2757
2757
  };
2758
- return ae(() => (console.log("InviteFlow - isChanged:", u, "pendingInvites.length:", D.length), D.length === 0 && !u), [D.length, u]), Z(() => {
2759
- typeof o == "function" && o({ pendingInvites: D }, i);
2760
- }, [D]), /* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-white", children: [
2758
+ return ae(() => (console.log("InviteFlow - isChanged:", h, "pendingInvites.length:", z.length), z.length === 0 && !h), [z.length, h]), Z(() => {
2759
+ typeof o == "function" && o({ pendingInvites: z }, i);
2760
+ }, [z]), /* @__PURE__ */ n("div", { className: "flex flex-col h-full bg-white", children: [
2761
2761
  /* @__PURE__ */ n("header", { className: "flex items-center justify-between p-4 border-b border-gray-300 flex-shrink-0", children: [
2762
2762
  /* @__PURE__ */ e(ye.Title, { className: " text-gray-900 !mb-0 text-lg font-semibold", children: L() }),
2763
2763
  /* @__PURE__ */ n("div", { className: "flex items-center gap-4", children: [
@@ -2786,11 +2786,11 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2786
2786
  }
2787
2787
  ),
2788
2788
  /* @__PURE__ */ n("div", { className: "relative grid grid-cols-3 gap-2 items-start", children: [
2789
- /* @__PURE__ */ e("div", { className: "col-span-1", children: /* @__PURE__ */ e(K, { value: h, onChange: N, children: /* @__PURE__ */ n("div", { className: "relative", children: [
2789
+ /* @__PURE__ */ e("div", { className: "col-span-1", children: /* @__PURE__ */ e(K, { value: u, onChange: N, children: /* @__PURE__ */ n("div", { className: "relative", children: [
2790
2790
  /* @__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: [
2791
2791
  /* @__PURE__ */ n("span", { className: "flex items-center", children: [
2792
- /* @__PURE__ */ e(h.icon, { className: "h-5 w-5 text-gray-400 mr-2" }),
2793
- /* @__PURE__ */ e("span", { className: "truncate", children: h.name })
2792
+ /* @__PURE__ */ e(u.icon, { className: "h-5 w-5 text-gray-400 mr-2" }),
2793
+ /* @__PURE__ */ e("span", { className: "truncate", children: u.name })
2794
2794
  ] }),
2795
2795
  /* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ e(mt, { className: "h-5 w-5 text-gray-400" }) })
2796
2796
  ] }),
@@ -2833,7 +2833,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2833
2833
  /* @__PURE__ */ e("div", { className: "col-span-2", children: /* @__PURE__ */ e(
2834
2834
  ge,
2835
2835
  {
2836
- placeholder: `Search by ${h.name.toLowerCase()}...`,
2836
+ placeholder: `Search by ${u.name.toLowerCase()}...`,
2837
2837
  onDebouncedChange: (C) => r(C),
2838
2838
  value: y
2839
2839
  }
@@ -2859,7 +2859,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2859
2859
  "input",
2860
2860
  {
2861
2861
  type: "checkbox",
2862
- checked: z.has(C.id),
2862
+ checked: D.has(C.id),
2863
2863
  readOnly: !0,
2864
2864
  className: "h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500",
2865
2865
  disabled: !!M
@@ -2868,7 +2868,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2868
2868
  /* @__PURE__ */ e(we, { src: C.avatarUrl, name: C.name, size: "small" }),
2869
2869
  /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
2870
2870
  /* @__PURE__ */ e("span", { className: "text-md font-medium text-gray-800 truncate", children: C.name }),
2871
- h.name === De.USER && /* @__PURE__ */ e("span", { className: "text-sm text-gray-500", children: C.id })
2871
+ u.name === De.USER && /* @__PURE__ */ e("span", { className: "text-sm text-gray-500", children: C.id })
2872
2872
  ] }),
2873
2873
  M ? /* @__PURE__ */ n(te, { children: [
2874
2874
  /* @__PURE__ */ e("span", { className: "text-sm px-3 py-0.5 border border-dashed rounded-xl bg-teal-100 text-teal-700", children: M }),
@@ -2892,7 +2892,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2892
2892
  /* @__PURE__ */ e(
2893
2893
  le,
2894
2894
  {
2895
- onClick: g,
2895
+ onClick: p,
2896
2896
  size: "small",
2897
2897
  label: "Add"
2898
2898
  }
@@ -2943,7 +2943,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2943
2943
  {
2944
2944
  value: C,
2945
2945
  className: ({ active: M }) => `${M ? "text-white bg-blue-600" : "text-gray-900"} hover:cursor-pointer select-none relative py-2 pl-10`,
2946
- children: ({ selected: M, active: _ }) => /* @__PURE__ */ n(te, { children: [
2946
+ children: ({ selected: M, active: V }) => /* @__PURE__ */ n(te, { children: [
2947
2947
  /* @__PURE__ */ n(
2948
2948
  "span",
2949
2949
  {
@@ -2952,7 +2952,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
2952
2952
  /* @__PURE__ */ e(
2953
2953
  C.icon,
2954
2954
  {
2955
- className: `h-5 w-5 mr-2 ${_ ? "text-white" : "text-gray-400"}`
2955
+ className: `h-5 w-5 mr-2 ${V ? "text-white" : "text-gray-400"}`
2956
2956
  }
2957
2957
  ),
2958
2958
  "Can ",
@@ -3021,9 +3021,9 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3021
3021
  ] }),
3022
3022
  /* @__PURE__ */ e("footer", { className: "p-4 border-t border-gray-300 shrink-0", children: /* @__PURE__ */ n("div", { className: "flex justify-between items-center", children: [
3023
3023
  /* @__PURE__ */ n("p", { className: "text-sm text-gray-600", children: [
3024
- D.length,
3024
+ z.length,
3025
3025
  " invitation",
3026
- D.length !== 1 ? "s" : "",
3026
+ z.length !== 1 ? "s" : "",
3027
3027
  " selected"
3028
3028
  ] }),
3029
3029
  /* @__PURE__ */ n("div", { className: "flex gap-2", children: [
@@ -3039,7 +3039,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3039
3039
  le,
3040
3040
  {
3041
3041
  onClick: () => Y(w)(),
3042
- disabled: x || D.length === 0 && !u,
3042
+ disabled: x || z.length === 0 && !h,
3043
3043
  label: x ? "Inviting..." : l === ue.DRIVE ? "Send Invites" : "Add"
3044
3044
  }
3045
3045
  )
@@ -3051,21 +3051,21 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3051
3051
  { name: "Can manage", icon: ta, value: "edit" },
3052
3052
  { name: "Remove", icon: or, isDestructive: !0, value: "remove" }
3053
3053
  ], ss = ({ item: t, allowedPermissions: a, onPermissionChange: s }) => {
3054
- const [i, l] = B(!1), { refs: m, floatingStyles: o, context: u } = ia({
3054
+ const [i, l] = B(!1), { refs: m, floatingStyles: o, context: h } = ia({
3055
3055
  open: i,
3056
3056
  onOpenChange: l,
3057
3057
  middleware: [oa(8), ca(), da({ padding: 8 })],
3058
3058
  whileElementsMounted: ma,
3059
3059
  placement: "bottom-end"
3060
- }), h = Kr(u), N = en(u), { getReferenceProps: y, getFloatingProps: r } = tn([
3061
- h,
3060
+ }), u = Kr(h), N = en(h), { getReferenceProps: y, getFloatingProps: r } = tn([
3061
+ u,
3062
3062
  N
3063
- ]), v = ot.find((p) => p.name === t.permission || p.value === t.permission) || ot[0];
3063
+ ]), v = ot.find((g) => g.name === t.permission || g.value === t.permission) || ot[0];
3064
3064
  return (
3065
3065
  // FIX: The <Listbox> component now wraps both the button and the portal.
3066
3066
  // This provides the necessary context for both children.
3067
- /* @__PURE__ */ n(K, { value: v, onChange: (p) => {
3068
- s(p), l(!1);
3067
+ /* @__PURE__ */ n(K, { value: v, onChange: (g) => {
3068
+ s(g), l(!1);
3069
3069
  }, children: [
3070
3070
  /* @__PURE__ */ n(
3071
3071
  K.Button,
@@ -3098,31 +3098,31 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3098
3098
  ...r(),
3099
3099
  static: !0,
3100
3100
  className: "z-50 w-48 bg-white shadow-lg rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm",
3101
- children: ot.filter((p) => a.includes(p.value)).map((p) => /* @__PURE__ */ e(
3101
+ children: ot.filter((g) => a.includes(g.value)).map((g) => /* @__PURE__ */ e(
3102
3102
  K.Option,
3103
3103
  {
3104
3104
  className: ({
3105
- active: z
3105
+ active: D
3106
3106
  }) => `relative select-none py-2 pl-10 pr-4 hover:cursor-pointer
3107
- ${z ? "bg-blue-100 text-blue-900" : "text-gray-900"}
3108
- ${p.isDestructive && z ? "bg-red-100 text-red-900" : ""}
3109
- ${p.isDestructive && !z ? "text-red-600" : ""}`,
3110
- value: p,
3111
- children: ({ selected: z }) => /* @__PURE__ */ n(te, { children: [
3107
+ ${D ? "bg-blue-100 text-blue-900" : "text-gray-900"}
3108
+ ${g.isDestructive && D ? "bg-red-100 text-red-900" : ""}
3109
+ ${g.isDestructive && !D ? "text-red-600" : ""}`,
3110
+ value: g,
3111
+ children: ({ selected: D }) => /* @__PURE__ */ n(te, { children: [
3112
3112
  /* @__PURE__ */ n(
3113
3113
  "span",
3114
3114
  {
3115
- className: `flex items-center gap-2 truncate ${z ? "font-medium" : "font-normal"}`,
3115
+ className: `flex items-center gap-2 truncate ${D ? "font-medium" : "font-normal"}`,
3116
3116
  children: [
3117
- /* @__PURE__ */ e(p.icon, { className: "h-5 w-5", "aria-hidden": "true" }),
3118
- p.name
3117
+ /* @__PURE__ */ e(g.icon, { className: "h-5 w-5", "aria-hidden": "true" }),
3118
+ g.name
3119
3119
  ]
3120
3120
  }
3121
3121
  ),
3122
- z && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600", children: /* @__PURE__ */ e(ut, { className: "h-5 w-5", "aria-hidden": "true" }) })
3122
+ D && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-blue-600", children: /* @__PURE__ */ e(ut, { className: "h-5 w-5", "aria-hidden": "true" }) })
3123
3123
  ] })
3124
3124
  },
3125
- p.name
3125
+ g.name
3126
3126
  ))
3127
3127
  }
3128
3128
  )
@@ -3139,31 +3139,31 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3139
3139
  existingShares: l,
3140
3140
  allowedPermissions: m
3141
3141
  }) => {
3142
- const [o, u] = B(l), [h, N] = B(0), [y, r] = B(""), v = zt(y, 300), d = {
3142
+ const [o, h] = B(l), [u, N] = B(0), [y, r] = B(""), v = zt(y, 300), d = {
3143
3143
  users: o.users.filter(
3144
- (R) => R.name.toLowerCase().includes(v.toLowerCase())
3144
+ (I) => I.name.toLowerCase().includes(v.toLowerCase())
3145
3145
  ),
3146
3146
  groups: o.groups.filter(
3147
- (R) => R.name.toLowerCase().includes(v.toLowerCase())
3147
+ (I) => I.name.toLowerCase().includes(v.toLowerCase())
3148
3148
  ),
3149
3149
  roles: o.roles.filter(
3150
- (R) => R.name.toLowerCase().includes(v.toLowerCase())
3150
+ (I) => I.name.toLowerCase().includes(v.toLowerCase())
3151
3151
  )
3152
- }, p = async (R, P, j, U) => {
3152
+ }, g = async (I, P, _, U) => {
3153
3153
  const Y = P.value;
3154
- u((q) => ({
3154
+ h((q) => ({
3155
3155
  ...q,
3156
- [j]: q[j].map(
3157
- ($) => $.id === R.id ? { ...$, permission: Y } : $
3156
+ [_]: q[_].map(
3157
+ ($) => $.id === I.id ? { ...$, permission: Y } : $
3158
3158
  )
3159
3159
  }));
3160
- }, z = () => {
3161
- const R = {
3160
+ }, D = () => {
3161
+ const I = {
3162
3162
  users: o.users.filter((P) => P.permission !== "remove"),
3163
3163
  groups: o.groups.filter((P) => P.permission !== "remove"),
3164
3164
  roles: o.roles.filter((P) => P.permission !== "remove")
3165
3165
  };
3166
- a(R);
3166
+ a(I);
3167
3167
  }, F = ["users", "groups", "roles"], E = ["Users", "Groups", "Roles"];
3168
3168
  return (
3169
3169
  // The main structure remains the same...
@@ -3191,9 +3191,9 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3191
3191
  )
3192
3192
  ] }),
3193
3193
  /* @__PURE__ */ n("div", { className: "flex flex-col flex-grow", children: [
3194
- /* @__PURE__ */ n(se.Group, { selectedIndex: h, onChange: N, children: [
3194
+ /* @__PURE__ */ n(se.Group, { selectedIndex: u, onChange: N, children: [
3195
3195
  /* @__PURE__ */ n("div", { className: "p-4 bg-white border-b border-gray-300", children: [
3196
- /* @__PURE__ */ e(se.List, { className: "flex space-x-1 bg-gray-100 p-1 rounded-lg", children: E.map((R) => /* @__PURE__ */ e(
3196
+ /* @__PURE__ */ e(se.List, { className: "flex space-x-1 bg-gray-100 p-1 rounded-lg", children: E.map((I) => /* @__PURE__ */ e(
3197
3197
  se,
3198
3198
  {
3199
3199
  className: ({
@@ -3201,16 +3201,16 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3201
3201
  }) => `w-full py-2 text-sm font-medium leading-5 rounded-md
3202
3202
  focus:outline-none focus:ring-2 ring-offset-2 ring-offset-blue-400 ring-white ring-opacity-60
3203
3203
  ${P ? "bg-white shadow text-blue-700" : "text-gray-600 hover:bg-white/[0.6]"}`,
3204
- children: R
3204
+ children: I
3205
3205
  },
3206
- R
3206
+ I
3207
3207
  )) }),
3208
3208
  /* @__PURE__ */ e("div", { className: "mt-4", children: /* @__PURE__ */ e(
3209
3209
  ge,
3210
3210
  {
3211
3211
  onDebouncedChange: r,
3212
3212
  value: y,
3213
- placeholder: `Search in ${E[h]}...`
3213
+ placeholder: `Search in ${E[u]}...`
3214
3214
  }
3215
3215
  ) })
3216
3216
  ] }),
@@ -3221,11 +3221,11 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3221
3221
  animate: { y: 0, opacity: 1 },
3222
3222
  exit: { y: -10, opacity: 0 },
3223
3223
  transition: { duration: 0.2 },
3224
- children: /* @__PURE__ */ e(se.Panels, { as: Q, children: F.map((R) => /* @__PURE__ */ e(
3224
+ children: /* @__PURE__ */ e(se.Panels, { as: Q, children: F.map((I) => /* @__PURE__ */ e(
3225
3225
  se.Panel,
3226
3226
  {
3227
3227
  className: "space-y-3 focus:outline-none",
3228
- children: /* @__PURE__ */ e(Se, { children: d[R].length > 0 ? d[R].map((P) => /* @__PURE__ */ n(
3228
+ children: /* @__PURE__ */ e(Se, { children: d[I].length > 0 ? d[I].map((P) => /* @__PURE__ */ n(
3229
3229
  ie.div,
3230
3230
  {
3231
3231
  layout: !0,
@@ -3249,12 +3249,12 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3249
3249
  ),
3250
3250
  /* @__PURE__ */ n("div", { className: "overflow-hidden", children: [
3251
3251
  /* @__PURE__ */ e("p", { className: "font-medium text-gray-900 truncate", children: P.name }),
3252
- R !== "users" && /* @__PURE__ */ e(
3252
+ I !== "users" && /* @__PURE__ */ e(
3253
3253
  "button",
3254
3254
  {
3255
3255
  onClick: () => i({
3256
3256
  id: P.id,
3257
- type: R,
3257
+ type: I,
3258
3258
  name: P.name
3259
3259
  }),
3260
3260
  className: "text-sm text-blue-600 hover:underline hover:cursor-pointer",
@@ -3268,10 +3268,10 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3268
3268
  {
3269
3269
  item: P,
3270
3270
  allowedPermissions: m,
3271
- onPermissionChange: (j) => p(
3271
+ onPermissionChange: (_) => g(
3272
3272
  P,
3273
- j,
3274
- R
3273
+ _,
3274
+ I
3275
3275
  )
3276
3276
  }
3277
3277
  )
@@ -3290,25 +3290,25 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3290
3290
  /* @__PURE__ */ e(Kt, { className: "h-12 w-12 text-gray-400" }),
3291
3291
  /* @__PURE__ */ n("h3", { className: "mt-2 text-sm font-medium text-gray-900", children: [
3292
3292
  "No ",
3293
- E[h],
3293
+ E[u],
3294
3294
  " Found"
3295
3295
  ] }),
3296
- /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: y ? `No results for "${y}"` : `There are no ${E[h].toLowerCase()} with access.` })
3296
+ /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: y ? `No results for "${y}"` : `There are no ${E[u].toLowerCase()} with access.` })
3297
3297
  ]
3298
3298
  }
3299
3299
  )
3300
3300
  ) })
3301
3301
  },
3302
- R
3302
+ I
3303
3303
  )) })
3304
3304
  },
3305
- h
3305
+ u
3306
3306
  ) }) })
3307
3307
  ] }),
3308
3308
  /* @__PURE__ */ e("div", { className: "p-4 bg-white border-t border-gray-300 flex justify-end", children: /* @__PURE__ */ e(
3309
3309
  "button",
3310
3310
  {
3311
- onClick: z,
3311
+ onClick: D,
3312
3312
  className: "px-4 py-2 bg-blue-600 text-white rounded-md shadow hover:bg-blue-700",
3313
3313
  children: "Update"
3314
3314
  }
@@ -3329,8 +3329,8 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3329
3329
  onClose: s,
3330
3330
  members: i
3331
3331
  }) => {
3332
- const [l, m] = B(!0), [o, u] = B(""), h = zt(o, 300), N = i.filter(
3333
- (d) => d.name.toLowerCase().includes(h.toLowerCase())
3332
+ const [l, m] = B(!0), [o, h] = B(""), u = zt(o, 300), N = i.filter(
3333
+ (d) => d.name.toLowerCase().includes(u.toLowerCase())
3334
3334
  ), y = {
3335
3335
  hidden: { opacity: 0 },
3336
3336
  visible: {
@@ -3345,7 +3345,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3345
3345
  exit: { opacity: 0, x: -20 }
3346
3346
  }, v = () => l ? (
3347
3347
  // Show 5 skeleton items while loading
3348
- /* @__PURE__ */ e("div", { children: Array.from({ length: 5 }).map((d, p) => /* @__PURE__ */ e(is, {}, p)) })
3348
+ /* @__PURE__ */ e("div", { children: Array.from({ length: 5 }).map((d, g) => /* @__PURE__ */ e(is, {}, g)) })
3349
3349
  ) : N.length === 0 ? /* @__PURE__ */ n(
3350
3350
  ie.div,
3351
3351
  {
@@ -3355,7 +3355,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3355
3355
  children: [
3356
3356
  /* @__PURE__ */ e(cr, { className: "h-12 w-12 text-gray-400" }),
3357
3357
  /* @__PURE__ */ e("h3", { className: "mt-2 text-sm font-medium text-gray-900", children: "No Users Found" }),
3358
- /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: h ? `No one found matching "${h}"` : `There are no users in this ${t.type}.` })
3358
+ /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-500", children: u ? `No one found matching "${u}"` : `There are no users in this ${t.type}.` })
3359
3359
  ]
3360
3360
  }
3361
3361
  ) : /* @__PURE__ */ e(
@@ -3422,7 +3422,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3422
3422
  /* @__PURE__ */ e("div", { className: "p-4 border-b border-gray-200 flex-shrink-0", children: /* @__PURE__ */ e(
3423
3423
  ge,
3424
3424
  {
3425
- onDebouncedChange: u,
3425
+ onDebouncedChange: h,
3426
3426
  value: o,
3427
3427
  placeholder: "Search members..."
3428
3428
  }
@@ -3447,29 +3447,29 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3447
3447
  onClose: m = () => {
3448
3448
  },
3449
3449
  showExistingShares: o = !0,
3450
- allowedPermissions: u = [],
3451
- ...h
3450
+ allowedPermissions: h = [],
3451
+ ...u
3452
3452
  }) => {
3453
- const [N, y] = B(be.INVITE), [r, v] = B(t), [d, p] = B(null), [z, F] = B(!1), [E, R] = B([]), [P, j] = B(be.MANAGE), U = () => {
3454
- y(be.INVITE), p(null), m();
3453
+ const [N, y] = B(be.INVITE), [r, v] = B(t), [d, g] = B(null), [D, F] = B(!1), [E, I] = B([]), [P, _] = B(be.MANAGE), U = () => {
3454
+ y(be.INVITE), g(null), m();
3455
3455
  }, Y = () => {
3456
3456
  y(be.MANAGE);
3457
3457
  }, q = async ({ id: b, name: S, type: O }) => {
3458
3458
  if (O === "groups") {
3459
3459
  try {
3460
- const I = await Ze(`${Je.getMembersForGroup(S)}`);
3461
- } catch (I) {
3462
- console.log("Error searching entities:", I);
3460
+ const R = await Ze(`${Je.getMembersForGroup(S)}`);
3461
+ } catch (R) {
3462
+ console.log("Error searching entities:", R);
3463
3463
  }
3464
- R(resp);
3464
+ I(resp);
3465
3465
  }
3466
- p({ id: b, type: O, name: S }), j(N), y(be.MEMBERS);
3466
+ g({ id: b, type: O, name: S }), _(N), y(be.MEMBERS);
3467
3467
  }, $ = (b) => {
3468
3468
  console.log("changedExistingShares", b), v(b);
3469
- const S = it.mapValues(t, (D) => D.map((f) => ({ id: f.id, permission: f.permission })).sort((f, g) => f.id - g.id)), O = it.mapValues(b, (D) => D.map((f) => ({ id: f.id, permission: f.permission })).sort((f, g) => f.id - g.id));
3469
+ const S = it.mapValues(t, (z) => z.map((f) => ({ id: f.id, permission: f.permission })).sort((f, p) => f.id - p.id)), O = it.mapValues(b, (z) => z.map((f) => ({ id: f.id, permission: f.permission })).sort((f, p) => f.id - p.id));
3470
3470
  console.log("Existing data:", S), console.log("Changed data:", O);
3471
- const I = !it.isEqual(S, O);
3472
- console.log("hasPermissionChanged:", I), F(I), y(N === be.MEMBERS ? P : be.INVITE);
3471
+ const R = !it.isEqual(S, O);
3472
+ console.log("hasPermissionChanged:", R), F(R), y(N === be.MEMBERS ? P : be.INVITE);
3473
3473
  };
3474
3474
  return /* @__PURE__ */ e(he, { appear: !0, show: a, as: Q, children: /* @__PURE__ */ n(ye, { as: "div", className: "relative z-50", onClose: U, children: [
3475
3475
  /* @__PURE__ */ e("div", { className: "filter-modal-overlay", "aria-hidden": "true" }),
@@ -3493,7 +3493,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3493
3493
  onOpenMembers: q,
3494
3494
  existingShares: r,
3495
3495
  calledBy: l,
3496
- allowedPermissions: u
3496
+ allowedPermissions: h
3497
3497
  }
3498
3498
  )
3499
3499
  },
@@ -3543,7 +3543,7 @@ const Ee = Kn(), Ze = Ee.axiosGet, ql = Ee.axiosDelete, xt = Ee.axiosPost, Yl =
3543
3543
  onFinalSubmit: (b) => {
3544
3544
  s(b, r);
3545
3545
  },
3546
- isChanged: z
3546
+ isChanged: D
3547
3547
  }
3548
3548
  )
3549
3549
  },
@@ -3566,8 +3566,8 @@ function at({
3566
3566
  },
3567
3567
  placeholder: m = "Select options",
3568
3568
  error: o = null,
3569
- displayLimit: u = 3,
3570
- selectionLimit: h = -1,
3569
+ displayLimit: h = 3,
3570
+ selectionLimit: u = -1,
3571
3571
  // NEW: search behavior
3572
3572
  searchMode: N = "client",
3573
3573
  // "client" | "server"
@@ -3576,31 +3576,31 @@ function at({
3576
3576
  serverLoading: r = !1,
3577
3577
  minSearchChars: v = 2,
3578
3578
  // NEW: mappers (id/label keys)
3579
- getOptionId: d = (z) => String(z.id),
3580
- getOptionLabel: p = (z) => z.name
3579
+ getOptionId: d = (D) => String(D.id),
3580
+ getOptionLabel: g = (D) => D.name
3581
3581
  }) {
3582
- const z = He(), F = He(), [E, R] = B(""), P = fe(""), j = ae(() => {
3582
+ const D = He(), F = He(), [E, I] = B(""), P = fe(""), _ = ae(() => {
3583
3583
  const b = /* @__PURE__ */ new Map();
3584
3584
  for (const S of a) b.set(d(S), S);
3585
3585
  return b;
3586
- }, [a, d]), U = ae(() => Array.isArray(s) ? s.map((b) => b && typeof b == "object" ? j.get(d(b)) || null : j.get(String(b))).filter(Boolean) : [], [s, j, d]), Y = ae(() => {
3586
+ }, [a, d]), U = ae(() => Array.isArray(s) ? s.map((b) => b && typeof b == "object" ? _.get(d(b)) || null : _.get(String(b))).filter(Boolean) : [], [s, _, d]), Y = ae(() => {
3587
3587
  if (!E) return a;
3588
3588
  const b = E.toLowerCase();
3589
- return a.filter((S) => p(S).toLowerCase().includes(b));
3590
- }, [a, E, p]);
3589
+ return a.filter((S) => g(S).toLowerCase().includes(b));
3590
+ }, [a, E, g]);
3591
3591
  Z(() => {
3592
3592
  N === "server" && E.length >= v && E !== P.current && (P.current = E, y && y(E));
3593
3593
  }, [E, N, v, y]);
3594
3594
  const q = N === "client" ? Y : a, $ = () => {
3595
3595
  if (!U.length)
3596
3596
  return /* @__PURE__ */ e("span", { className: "text-gray-500", children: m });
3597
- const b = U.slice(0, u), S = U.length - u;
3597
+ const b = U.slice(0, h), S = U.length - h;
3598
3598
  return /* @__PURE__ */ n("div", { className: "flex flex-wrap gap-2", children: [
3599
3599
  b.map((O) => /* @__PURE__ */ e(
3600
3600
  "span",
3601
3601
  {
3602
3602
  className: "px-2 py-1 text-xs font-medium text-white bg-gray-800 rounded-full",
3603
- children: p(O)
3603
+ children: g(O)
3604
3604
  },
3605
3605
  d(O)
3606
3606
  )),
@@ -3613,12 +3613,12 @@ function at({
3613
3613
  };
3614
3614
  return /* @__PURE__ */ e(K, { value: U, onChange: (b) => {
3615
3615
  const S = Array.from(new Set(b.map((O) => d(O))));
3616
- h !== -1 && S.length > h || i(S);
3616
+ u !== -1 && S.length > u || i(S);
3617
3617
  }, multiple: !0, by: "id", children: ({ open: b }) => /* @__PURE__ */ n("div", { children: [
3618
3618
  /* @__PURE__ */ e(
3619
3619
  K.Label,
3620
3620
  {
3621
- id: z,
3621
+ id: D,
3622
3622
  className: "block text-sm font-medium leading-6 text-gray-900",
3623
3623
  children: t
3624
3624
  }
@@ -3627,7 +3627,7 @@ function at({
3627
3627
  /* @__PURE__ */ n(
3628
3628
  K.Button,
3629
3629
  {
3630
- "aria-labelledby": z,
3630
+ "aria-labelledby": D,
3631
3631
  "aria-invalid": !!o,
3632
3632
  "aria-describedby": o ? F : void 0,
3633
3633
  onBlur: l,
@@ -3654,34 +3654,34 @@ function at({
3654
3654
  ge,
3655
3655
  {
3656
3656
  value: E,
3657
- onDebouncedChange: R,
3657
+ onDebouncedChange: I,
3658
3658
  placeholder: N === "server" ? `Search (min ${v})…` : "Search options…"
3659
3659
  }
3660
3660
  ) }),
3661
3661
  N === "server" && r && /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: "Loading…" }),
3662
3662
  q.length === 0 && !r ? /* @__PURE__ */ e("div", { className: "py-2 px-3 text-gray-500", children: N === "server" ? E.length < v ? `Type at least ${v} characters to search.` : "No results." : "No options found." }) : q.map((S) => {
3663
- const O = d(S), I = p(S), D = U.some((g) => d(g) === O), f = h !== -1 && U.length >= h && !D;
3663
+ const O = d(S), R = g(S), z = U.some((p) => d(p) === O), f = u !== -1 && U.length >= u && !z;
3664
3664
  return /* @__PURE__ */ e(
3665
3665
  K.Option,
3666
3666
  {
3667
3667
  value: S,
3668
3668
  disabled: f,
3669
- className: ({ active: g }) => Ge(
3670
- f ? " text-gray-400 bg-white cursor-not-allowed" : g ? " bg-gray-200 text-gray-900" : " text-gray-900",
3669
+ className: ({ active: p }) => Ge(
3670
+ f ? " text-gray-400 bg-white cursor-not-allowed" : p ? " bg-gray-200 text-gray-900" : " text-gray-900",
3671
3671
  " relative cursor-default select-none py-2 pl-3 pr-9"
3672
3672
  ),
3673
- children: ({ selected: g, active: k }) => /* @__PURE__ */ n(te, { children: [
3673
+ children: ({ selected: p, active: k }) => /* @__PURE__ */ n(te, { children: [
3674
3674
  /* @__PURE__ */ e(
3675
3675
  "span",
3676
3676
  {
3677
3677
  className: Ge(
3678
- g ? "font-semibold" : "font-normal",
3678
+ p ? "font-semibold" : "font-normal",
3679
3679
  "block truncate"
3680
3680
  ),
3681
- children: I
3681
+ children: R
3682
3682
  }
3683
3683
  ),
3684
- g && /* @__PURE__ */ e(
3684
+ p && /* @__PURE__ */ e(
3685
3685
  "span",
3686
3686
  {
3687
3687
  className: Ge(
@@ -3753,9 +3753,9 @@ const Xl = ({
3753
3753
  footer: l = { show: !0, customFooter: null },
3754
3754
  primaryAction: m = { onSubmit: null, label: "Save", loader: !1, disabled: !1 },
3755
3755
  secondaryAction: o = { onCancel: null, label: "Cancel" },
3756
- dialogPanelClass: u = ""
3756
+ dialogPanelClass: h = ""
3757
3757
  }) => {
3758
- const h = (y) => {
3758
+ const u = (y) => {
3759
3759
  y.target === y.currentTarget && a(!1);
3760
3760
  }, N = (y) => {
3761
3761
  y.stopPropagation();
@@ -3771,13 +3771,13 @@ const Xl = ({
3771
3771
  Qr,
3772
3772
  {
3773
3773
  className: "fixed inset-0 bg-black/30",
3774
- onClick: h
3774
+ onClick: u
3775
3775
  }
3776
3776
  ),
3777
3777
  /* @__PURE__ */ e("div", { className: "fixed inset-0 overflow-y-auto", children: /* @__PURE__ */ e("div", { className: "flex min-h-full items-center justify-center p-4", children: /* @__PURE__ */ n(
3778
3778
  Fe,
3779
3779
  {
3780
- 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`,
3780
+ className: `${h} 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`,
3781
3781
  onClick: N,
3782
3782
  children: [
3783
3783
  /* @__PURE__ */ n("div", { className: "flex justify-between items-center border-b border-gray-200 p-6 flex-shrink-0", children: [
@@ -3850,14 +3850,14 @@ function ms({
3850
3850
  onSelect: l,
3851
3851
  onCreateChild: m,
3852
3852
  onRename: o,
3853
- onDelete: u,
3854
- renderActions: h,
3853
+ onDelete: h,
3854
+ renderActions: u,
3855
3855
  // optional override
3856
3856
  dragId: N,
3857
3857
  dropId: y,
3858
3858
  indent: r = 24
3859
3859
  }) {
3860
- const { setNodeRef: v, isOver: d } = dr({ id: y }), { attributes: p, listeners: z, setNodeRef: F, transform: E, isDragging: R } = mr({ id: N }), P = E ? { transform: `translate3d(${Math.round(E.x)}px, ${Math.round(E.y)}px, 0)` } : void 0, [j, U] = B(!1), [Y, q] = B(t.name), $ = () => {
3860
+ const { setNodeRef: v, isOver: d } = dr({ id: y }), { attributes: g, listeners: D, setNodeRef: F, transform: E, isDragging: I } = mr({ id: N }), P = E ? { transform: `translate3d(${Math.round(E.x)}px, ${Math.round(E.y)}px, 0)` } : void 0, [_, U] = B(!1), [Y, q] = B(t.name), $ = () => {
3861
3861
  const b = Y.trim();
3862
3862
  U(!1), b && b !== t.name ? o?.(t, b) : q(t.name);
3863
3863
  }, x = ae(() => /* @__PURE__ */ e(
@@ -3869,15 +3869,15 @@ function ms({
3869
3869
  { action: "delete", label: "Delete" }
3870
3870
  ],
3871
3871
  onSelect: (S) => {
3872
- S.action === "create" ? m?.(t) : S.action === "rename" ? U(!0) : S.action === "delete" && u?.(t);
3872
+ S.action === "create" ? m?.(t) : S.action === "rename" ? U(!0) : S.action === "delete" && h?.(t);
3873
3873
  }
3874
3874
  }
3875
- ), [t, m, u]);
3875
+ ), [t, m, h]);
3876
3876
  return /* @__PURE__ */ n(
3877
3877
  "div",
3878
3878
  {
3879
3879
  ref: v,
3880
- className: `tv-row ${d ? "tv-drop-over" : ""} ${R ? "dragging" : ""}`,
3880
+ className: `tv-row ${d ? "tv-drop-over" : ""} ${I ? "dragging" : ""}`,
3881
3881
  style: { ...P, paddingLeft: 8 + a * r },
3882
3882
  onClick: (b) => {
3883
3883
  b.target.closest(".tv-toggle") || b.target.tagName === "INPUT" || l?.(t);
@@ -3885,7 +3885,7 @@ function ms({
3885
3885
  children: [
3886
3886
  /* @__PURE__ */ e("button", { className: "tv-toggle", onClick: i, "aria-label": "toggle", children: t.children?.length ? s ? /* @__PURE__ */ e(Nt, { size: 16 }) : /* @__PURE__ */ e(xe, { size: 16 }) : /* @__PURE__ */ e("span", { className: "tv-spacer" }) }),
3887
3887
  /* @__PURE__ */ e(Be, { size: 16, className: "tv-folder-ic" }),
3888
- /* @__PURE__ */ e("div", { className: "tv-name", ref: F, children: j ? /* @__PURE__ */ e(
3888
+ /* @__PURE__ */ e("div", { className: "tv-name", ref: F, children: _ ? /* @__PURE__ */ e(
3889
3889
  "input",
3890
3890
  {
3891
3891
  className: "tv-input",
@@ -3898,11 +3898,11 @@ function ms({
3898
3898
  autoFocus: !0
3899
3899
  }
3900
3900
  ) : /* @__PURE__ */ e("span", { onDoubleClick: () => U(!0), children: t.name }) }),
3901
- /* @__PURE__ */ e(ds, { listeners: z, attributes: p }),
3902
- /* @__PURE__ */ e("div", { className: "tv-actions", children: h ? h(t, {
3901
+ /* @__PURE__ */ e(ds, { listeners: D, attributes: g }),
3902
+ /* @__PURE__ */ e("div", { className: "tv-actions", children: u ? u(t, {
3903
3903
  onCreateChild: () => m?.(t),
3904
3904
  onRename: () => U(!0),
3905
- onDelete: () => u?.(t)
3905
+ onDelete: () => h?.(t)
3906
3906
  }) : x })
3907
3907
  ]
3908
3908
  }
@@ -3911,35 +3911,35 @@ function ms({
3911
3911
  const us = (t) => String(t.id ?? t._id), hs = (t) => t.parent !== void 0 ? String(t.parent) : t.parentId != null ? String(t.parentId) : "root", ps = (t) => t.name ?? t.label ?? "", gs = (t) => Array.isArray(t) && t.some((a) => Array.isArray(a.children));
3912
3912
  function bs(t, { rootId: a, getId: s, getParent: i, getName: l }) {
3913
3913
  const m = /* @__PURE__ */ new Map();
3914
- t.forEach((u) => {
3915
- const h = s(u);
3916
- m.set(h, {
3917
- ...u,
3918
- id: h,
3919
- name: l(u),
3920
- parentId: i(u) || a,
3914
+ t.forEach((h) => {
3915
+ const u = s(h);
3916
+ m.set(u, {
3917
+ ...h,
3918
+ id: u,
3919
+ name: l(h),
3920
+ parentId: i(h) || a,
3921
3921
  children: []
3922
3922
  });
3923
3923
  });
3924
3924
  const o = [];
3925
- return m.forEach((u) => {
3926
- const h = u.parentId || a;
3927
- h !== a && m.has(h) ? m.get(h).children.push(u) : o.push(u);
3925
+ return m.forEach((h) => {
3926
+ const u = h.parentId || a;
3927
+ u !== a && m.has(u) ? m.get(u).children.push(h) : o.push(h);
3928
3928
  }), { roots: o, byId: m };
3929
3929
  }
3930
3930
  function fs(t, { rootId: a, getId: s, getName: i }) {
3931
3931
  const l = /* @__PURE__ */ new Map();
3932
- function m(u, h) {
3933
- const N = s(u), y = {
3934
- ...u,
3932
+ function m(h, u) {
3933
+ const N = s(h), y = {
3934
+ ...h,
3935
3935
  id: N,
3936
- name: i(u),
3937
- parentId: h || a,
3938
- children: (u.children || []).map((r) => m(r, N))
3936
+ name: i(h),
3937
+ parentId: u || a,
3938
+ children: (h.children || []).map((r) => m(r, N))
3939
3939
  };
3940
3940
  return l.set(N, y), y;
3941
3941
  }
3942
- return { roots: t.map((u) => m(u, null)), byId: l };
3942
+ return { roots: t.map((h) => m(h, null)), byId: l };
3943
3943
  }
3944
3944
  const Me = (t) => t.map((a) => ({ ...a, children: Me(a.children || []) }));
3945
3945
  function ys(t, a) {
@@ -3949,8 +3949,8 @@ function ys(t, a) {
3949
3949
  if (o.id === a)
3950
3950
  return s = o, null;
3951
3951
  if (o.children?.length) {
3952
- const u = i(o.children);
3953
- if (u !== o.children) return { ...o, children: u };
3952
+ const h = i(o.children);
3953
+ if (h !== o.children) return { ...o, children: h };
3954
3954
  }
3955
3955
  return o;
3956
3956
  }).filter(Boolean);
@@ -3989,52 +3989,52 @@ function Hl({
3989
3989
  getParent: l = hs,
3990
3990
  getName: m = ps,
3991
3991
  onSelect: o,
3992
- onCreateRoot: u,
3993
- onCreateChild: h,
3992
+ onCreateRoot: h,
3993
+ onCreateChild: u,
3994
3994
  onRename: N,
3995
3995
  onDelete: y,
3996
3996
  onMove: r,
3997
3997
  renderActions: v,
3998
3998
  disableMoveToRoot: d = !1,
3999
3999
  // ← allow root moves by default now
4000
- indentUnit: p = 24
4000
+ indentUnit: g = 24
4001
4001
  }) {
4002
- const { roots: z } = ae(() => gs(t) ? fs(t, { rootId: a, getId: i, getName: m }) : bs(
4002
+ const { roots: D } = ae(() => gs(t) ? fs(t, { rootId: a, getId: i, getName: m }) : bs(
4003
4003
  t.map((f) => ({ ...f })),
4004
4004
  { rootId: a, getId: i, getParent: l, getName: m }
4005
- ), [t, a, i, l, m]), [F, E] = B({}), R = ee((f) => {
4006
- const g = {};
4005
+ ), [t, a, i, l, m]), [F, E] = B({}), I = ee((f) => {
4006
+ const p = {};
4007
4007
  return (function k(w) {
4008
4008
  w.forEach((T) => {
4009
- g[T.id] = !0, T.children?.length && k(T.children);
4009
+ p[T.id] = !0, T.children?.length && k(T.children);
4010
4010
  });
4011
- })(f), g;
4011
+ })(f), p;
4012
4012
  }, []);
4013
4013
  re.useEffect(() => {
4014
- E(R(z));
4015
- }, [z, R]);
4014
+ E(I(D));
4015
+ }, [D, I]);
4016
4016
  const P = ee(
4017
- (f) => E((g) => ({ ...g, [f]: !g[f] })),
4017
+ (f) => E((p) => ({ ...p, [f]: !p[f] })),
4018
4018
  []
4019
- ), [j, U] = B(() => Me(z));
4020
- re.useEffect(() => U(Me(z)), [z]);
4019
+ ), [_, U] = B(() => Me(D));
4020
+ re.useEffect(() => U(Me(D)), [D]);
4021
4021
  const Y = ur(
4022
4022
  hr(fr, { activationConstraint: { delay: 250, tolerance: 5 } })
4023
4023
  ), q = fe(null), [$, x] = B(null), b = fe(0), S = () => {
4024
4024
  }, O = ({ delta: f }) => {
4025
4025
  b.current = f?.x ?? 0;
4026
- }, I = ee(
4027
- ({ active: f, over: g }) => {
4026
+ }, R = ee(
4027
+ ({ active: f, over: p }) => {
4028
4028
  const k = b.current;
4029
- if (b.current = 0, x(null), !f || !g) return;
4030
- const w = String(f.id).replace(/^drag-/, ""), T = String(g.id).replace(/^drop-/, "");
4029
+ if (b.current = 0, x(null), !f || !p) return;
4030
+ const w = String(f.id).replace(/^drag-/, ""), T = String(p.id).replace(/^drop-/, "");
4031
4031
  if (!w || !T || w === T) return;
4032
4032
  let L = T;
4033
- const C = Math.max(0, Math.floor(-k / p));
4033
+ const C = Math.max(0, Math.floor(-k / g));
4034
4034
  if (C > 0) {
4035
4035
  let W = T;
4036
4036
  for (let pe = 0; pe < C; pe++) {
4037
- const Ne = Sa(j, W, null);
4037
+ const Ne = Sa(_, W, null);
4038
4038
  if (!Ne) break;
4039
4039
  if (!Ne.parentId) {
4040
4040
  L = a;
@@ -4044,59 +4044,59 @@ function Hl({
4044
4044
  }
4045
4045
  }
4046
4046
  if (d && L === a) {
4047
- U(Me(z));
4047
+ U(Me(D));
4048
4048
  return;
4049
4049
  }
4050
- const M = Me(j), { newRoots: _, removed: A } = ys(M, w);
4050
+ const M = Me(_), { newRoots: V, removed: A } = ys(M, w);
4051
4051
  if (!A) return;
4052
- const G = xs(_, L, A);
4052
+ const G = xs(V, L, A);
4053
4053
  U(G), r?.({ sourceId: w, destParentId: L, newTree: G });
4054
4054
  },
4055
- [j, z, a, d, p, r]
4056
- ), D = ee(
4057
- (f, g = 0) => f.map((k) => /* @__PURE__ */ n(re.Fragment, { children: [
4055
+ [_, D, a, d, g, r]
4056
+ ), z = ee(
4057
+ (f, p = 0) => f.map((k) => /* @__PURE__ */ n(re.Fragment, { children: [
4058
4058
  /* @__PURE__ */ e(
4059
4059
  ms,
4060
4060
  {
4061
4061
  node: k,
4062
- depth: g,
4062
+ depth: p,
4063
4063
  expanded: !!F[k.id],
4064
4064
  onToggle: () => P(k.id),
4065
4065
  onSelect: o,
4066
- onCreateChild: h,
4066
+ onCreateChild: u,
4067
4067
  onRename: N,
4068
4068
  onDelete: y,
4069
4069
  renderActions: v,
4070
4070
  dragId: `drag-${k.id}`,
4071
4071
  dropId: `drop-${k.id}`,
4072
- indent: p
4072
+ indent: g
4073
4073
  }
4074
4074
  ),
4075
- F[k.id] && k.children?.length > 0 ? D(k.children, g + 1) : null
4075
+ F[k.id] && k.children?.length > 0 ? z(k.children, p + 1) : null
4076
4076
  ] }, k.id)),
4077
- [F, p, h, y, N, o, v, P]
4077
+ [F, g, u, y, N, o, v, P]
4078
4078
  );
4079
4079
  return re.useMemo(() => {
4080
4080
  if (!$) return null;
4081
4081
  const f = String($).replace(/^drag-/, "");
4082
- function g(k) {
4082
+ function p(k) {
4083
4083
  for (const w of k) {
4084
4084
  if (w.id === f) return w;
4085
- const T = w.children?.length ? g(w.children) : null;
4085
+ const T = w.children?.length ? p(w.children) : null;
4086
4086
  if (T) return T;
4087
4087
  }
4088
4088
  return null;
4089
4089
  }
4090
- return g(j);
4091
- }, [$, j]), /* @__PURE__ */ n("div", { className: "tv", children: [
4090
+ return p(_);
4091
+ }, [$, _]), /* @__PURE__ */ n("div", { className: "tv", children: [
4092
4092
  s !== !1 && /* @__PURE__ */ n("div", { className: "tv-header", children: [
4093
4093
  /* @__PURE__ */ e("div", { className: "tv-title", children: s }),
4094
- /* @__PURE__ */ e("button", { className: "tv-btn", onClick: u, children: "+ New folder" })
4094
+ /* @__PURE__ */ e("button", { className: "tv-btn", onClick: h, children: "+ New folder" })
4095
4095
  ] }),
4096
4096
  /* @__PURE__ */ n("div", { className: "tv-root-row", children: [
4097
4097
  /* @__PURE__ */ e(Be, { size: 16, className: "tv-folder-ic" }),
4098
4098
  /* @__PURE__ */ e("strong", { children: "ROOT" }),
4099
- /* @__PURE__ */ e("button", { className: "tv-icon", title: "Create top-level", onClick: u, children: "+" })
4099
+ /* @__PURE__ */ e("button", { className: "tv-icon", title: "Create top-level", onClick: h, children: "+" })
4100
4100
  ] }),
4101
4101
  /* @__PURE__ */ e(
4102
4102
  pr,
@@ -4105,9 +4105,9 @@ function Hl({
4105
4105
  sensors: Y,
4106
4106
  onDragStart: S,
4107
4107
  onDragMove: O,
4108
- onDragEnd: I,
4108
+ onDragEnd: R,
4109
4109
  modifiers: [gr],
4110
- children: /* @__PURE__ */ e("div", { ref: q, className: "tv-list", children: D(j, 0) })
4110
+ children: /* @__PURE__ */ e("div", { ref: q, className: "tv-list", children: z(_, 0) })
4111
4111
  }
4112
4112
  )
4113
4113
  ] });
@@ -4123,17 +4123,17 @@ const Ql = ({
4123
4123
  listClassName: l = "",
4124
4124
  panelClassName: m = "",
4125
4125
  tabClassName: o,
4126
- ...u
4126
+ ...h
4127
4127
  // Pass remaining props to Tab.Group
4128
4128
  }) => {
4129
- const h = s === "vertical", N = (v) => ze(
4129
+ const u = s === "vertical", N = (v) => ze(
4130
4130
  "py-2 -mb-px text-sm font-medium focus:outline-none border-b-2",
4131
4131
  v ? "border-primaryX text-textX" : "border-transparent text-slate-600 hover:text-indigo-700"
4132
4132
  ), y = (v) => ze(
4133
4133
  "text-left text-sm rounded-md px-2 py-1.5 focus:outline-none",
4134
4134
  v ? "bg-primaryX text-white" : "text-textX hover:bg-lightgray-100 hover:text-primaryX"
4135
- ), r = ({ selected: v }) => o ? typeof o == "function" ? o(v) : o : h ? y(v) : N(v);
4136
- return /* @__PURE__ */ e(se.Group, { vertical: h, ...u, children: h ? /* @__PURE__ */ n("div", { className: ze("flex gap-4", i), children: [
4135
+ ), r = ({ selected: v }) => o ? typeof o == "function" ? o(v) : o : u ? y(v) : N(v);
4136
+ return /* @__PURE__ */ e(se.Group, { vertical: u, ...h, children: u ? /* @__PURE__ */ n("div", { className: ze("flex gap-4", i), children: [
4137
4137
  /* @__PURE__ */ e(se.List, { className: ze("w-[150px] flex flex-col gap-1 border-r border-gray-300 pr-2", l), children: t.map((v) => /* @__PURE__ */ e(se, { className: r, children: v.label }, v.key)) }),
4138
4138
  /* @__PURE__ */ e(se.Panels, { unmount: !a, className: ze("flex-1", m), children: t.map((v) => /* @__PURE__ */ e(se.Panel, { className: "focus:outline-none", children: /* @__PURE__ */ e("div", { className: "[overflow-anchor:none]", children: v.content }) }, v.key)) })
4139
4139
  ] }) : (
@@ -4150,15 +4150,15 @@ function Zl(t, a = "YYYY-MM-DD HH:mm:ss") {
4150
4150
  c.string;
4151
4151
  function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4152
4152
  console.log(t);
4153
- const [l, m] = re.useState(t), [o, u] = re.useState(() => {
4153
+ const [l, m] = re.useState(t), [o, h] = re.useState(() => {
4154
4154
  const r = a && a[t.key] || {};
4155
4155
  return console.log("Initial Section data for", t.key, r), r;
4156
- }), h = fe(a);
4156
+ }), u = fe(a);
4157
4157
  Z(() => {
4158
- if (h.current !== a) {
4159
- h.current = a;
4158
+ if (u.current !== a) {
4159
+ u.current = a;
4160
4160
  const r = a && a[t.key] || {};
4161
- console.log("Updated Section data for", t.key, r), u(r);
4161
+ console.log("Updated Section data for", t.key, r), h(r);
4162
4162
  }
4163
4163
  }, [a, t.key]), console.log("Section data", o);
4164
4164
  const N = fe(o);
@@ -4167,24 +4167,24 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4167
4167
  }, [l.key, o, s]);
4168
4168
  const y = (r) => {
4169
4169
  if (!r.dependsOn) return !0;
4170
- const { field: v, value: d, operator: p = "equals" } = r.dependsOn, z = o[v];
4171
- switch (p) {
4170
+ const { field: v, value: d, operator: g = "equals" } = r.dependsOn, D = o[v];
4171
+ switch (g) {
4172
4172
  case "equals":
4173
- return z === d;
4173
+ return D === d;
4174
4174
  case "notEquals":
4175
- return z !== d;
4175
+ return D !== d;
4176
4176
  case "contains":
4177
- return Array.isArray(z) && z.includes(d);
4177
+ return Array.isArray(D) && D.includes(d);
4178
4178
  case "notContains":
4179
- return !Array.isArray(z) || !z.includes(d);
4179
+ return !Array.isArray(D) || !D.includes(d);
4180
4180
  case "greaterThan":
4181
- return Number(z) > Number(d);
4181
+ return Number(D) > Number(d);
4182
4182
  case "lessThan":
4183
- return Number(z) < Number(d);
4183
+ return Number(D) < Number(d);
4184
4184
  case "isEmpty":
4185
- return !z || Array.isArray(z) && z.length === 0;
4185
+ return !D || Array.isArray(D) && D.length === 0;
4186
4186
  case "isNotEmpty":
4187
- return z && (!Array.isArray(z) || z.length > 0);
4187
+ return D && (!Array.isArray(D) || D.length > 0);
4188
4188
  default:
4189
4189
  return !0;
4190
4190
  }
@@ -4210,8 +4210,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4210
4210
  name: r.key,
4211
4211
  checked: !!(o[r.key] || r.default),
4212
4212
  onChange: (d) => {
4213
- const p = d.target ? d.target.checked : d, z = { ...o, [r.key]: p };
4214
- u(z), s && s(l.key, z);
4213
+ const g = d.target ? d.target.checked : d, D = { ...o, [r.key]: g };
4214
+ h(D), s && s(l.key, D);
4215
4215
  },
4216
4216
  label: r.label,
4217
4217
  disabled: r.disabled ? r.disabled : !1
@@ -4265,8 +4265,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4265
4265
  placeholder: r.placeholder,
4266
4266
  value: o[r.key] || "",
4267
4267
  onChange: (d) => {
4268
- const p = { ...o, [r.key]: d.target.value };
4269
- u(p), s && s(l.key, p);
4268
+ const g = { ...o, [r.key]: d.target.value };
4269
+ h(g), s && s(l.key, g);
4270
4270
  },
4271
4271
  required: r.required,
4272
4272
  disabled: r.disabled ? r.disabled : !1,
@@ -4285,8 +4285,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4285
4285
  placeholder: r.placeholder,
4286
4286
  value: o[r.key] || "",
4287
4287
  onChange: (d) => {
4288
- const p = { ...o, [r.key]: d.target.value };
4289
- u(p), s && s(l.key, p);
4288
+ const g = { ...o, [r.key]: d.target.value };
4289
+ h(g), s && s(l.key, g);
4290
4290
  },
4291
4291
  rows: 3,
4292
4292
  required: r.required,
@@ -4310,14 +4310,14 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4310
4310
  max: r.max,
4311
4311
  step: r.step,
4312
4312
  onChange: (d) => {
4313
- const p = d.target.value, z = { ...o, [r.key]: p };
4314
- u(z), s && s(l.key, z);
4313
+ const g = d.target.value, D = { ...o, [r.key]: g };
4314
+ h(D), s && s(l.key, D);
4315
4315
  },
4316
4316
  onBlur: (d) => {
4317
- const p = d.target.value;
4318
- if (p !== "" && p !== null && p !== void 0) {
4319
- const z = Number(p);
4320
- isNaN(z) || (r.min !== void 0 && z < r.min ? (d.target.setCustomValidity(`${r.label} must be at least ${r.min}`), d.target.reportValidity()) : r.max !== void 0 && z > r.max ? (d.target.setCustomValidity(`${r.label} must not exceed ${r.max}`), d.target.reportValidity()) : d.target.setCustomValidity(""));
4317
+ const g = d.target.value;
4318
+ if (g !== "" && g !== null && g !== void 0) {
4319
+ const D = Number(g);
4320
+ isNaN(D) || (r.min !== void 0 && D < r.min ? (d.target.setCustomValidity(`${r.label} must be at least ${r.min}`), d.target.reportValidity()) : r.max !== void 0 && D > r.max ? (d.target.setCustomValidity(`${r.label} must not exceed ${r.max}`), d.target.reportValidity()) : d.target.setCustomValidity(""));
4321
4321
  }
4322
4322
  },
4323
4323
  required: r.required,
@@ -4342,8 +4342,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4342
4342
  name: r.key,
4343
4343
  checked: !!(o[r.key] || r.default),
4344
4344
  onChange: (d) => {
4345
- const p = d.target ? d.target.checked : d, z = { ...o, [r.key]: p };
4346
- u(z), s && s(l.key, z);
4345
+ const g = d.target ? d.target.checked : d, D = { ...o, [r.key]: g };
4346
+ h(D), s && s(l.key, D);
4347
4347
  },
4348
4348
  label: r.placeholder || r.label,
4349
4349
  disabled: r.disabled ? r.disabled : !1,
@@ -4360,8 +4360,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4360
4360
  defaultValue: r.default,
4361
4361
  value: o[r.key] || "",
4362
4362
  onChange: (d) => {
4363
- const p = { ...o, [r.key]: d };
4364
- u(p);
4363
+ const g = { ...o, [r.key]: d };
4364
+ h(g);
4365
4365
  },
4366
4366
  options: r.options || [],
4367
4367
  placeholder: r.placeholder || `Select ${r.label}`,
@@ -4382,8 +4382,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4382
4382
  placeholder: r.placeholder || "Enter email address",
4383
4383
  value: o[r.key] || "",
4384
4384
  onChange: (d) => {
4385
- const p = { ...o, [r.key]: d.target.value };
4386
- u(p), s && s(l.key, p);
4385
+ const g = { ...o, [r.key]: d.target.value };
4386
+ h(g), s && s(l.key, g);
4387
4387
  },
4388
4388
  required: r.required,
4389
4389
  disabled: r.disabled ? r.disabled : !1,
@@ -4402,8 +4402,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4402
4402
  placeholder: r.placeholder || "Enter URL",
4403
4403
  value: o[r.key] || "",
4404
4404
  onChange: (d) => {
4405
- const p = { ...o, [r.key]: d.target.value };
4406
- u(p), s && s(l.key, p);
4405
+ const g = { ...o, [r.key]: d.target.value };
4406
+ h(g), s && s(l.key, g);
4407
4407
  },
4408
4408
  required: r.required,
4409
4409
  disabled: r.disabled ? r.disabled : !1,
@@ -4422,8 +4422,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4422
4422
  placeholder: r.placeholder || "Enter password",
4423
4423
  value: o[r.key] || "",
4424
4424
  onChange: (d) => {
4425
- const p = { ...o, [r.key]: d.target.value };
4426
- u(p), s && s(l.key, p);
4425
+ const g = { ...o, [r.key]: d.target.value };
4426
+ h(g), s && s(l.key, g);
4427
4427
  },
4428
4428
  required: r.required,
4429
4429
  disabled: r.disabled ? r.disabled : !1,
@@ -4438,8 +4438,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4438
4438
  {
4439
4439
  selectedItems: o[r.key] || [],
4440
4440
  onSelectionChange: (d) => {
4441
- const p = { ...o, [r.key]: d };
4442
- u(p), s && s(l.key, p);
4441
+ const g = { ...o, [r.key]: d };
4442
+ h(g), s && s(l.key, g);
4443
4443
  },
4444
4444
  options: r.options || [],
4445
4445
  placeholder: r.placeholder || `Select ${r.label}`,
@@ -4456,8 +4456,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4456
4456
  checked: typeof o[r.key] == "boolean" ? o[r.key] : r.default,
4457
4457
  onChange: (d) => {
4458
4458
  console.log("Toggle changed:", r.key, d);
4459
- const p = { ...o, [r.key]: d };
4460
- u(p), s && s(l.key, p);
4459
+ const g = { ...o, [r.key]: d };
4460
+ h(g), s && s(l.key, g);
4461
4461
  },
4462
4462
  disabled: r.disabled ? r.disabled : !1
4463
4463
  }
@@ -4470,8 +4470,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4470
4470
  label: r.label,
4471
4471
  value: o[r.key] ? new Date(o[r.key]) : null,
4472
4472
  onChange: (d) => {
4473
- const p = { ...o, [r.key]: d ? d.toISOString().split("T")[0] : "" };
4474
- u(p), s && s(l.key, p);
4473
+ const g = { ...o, [r.key]: d ? d.toISOString().split("T")[0] : "" };
4474
+ h(g), s && s(l.key, g);
4475
4475
  },
4476
4476
  placeholder: r.placeholder || "Select date",
4477
4477
  disabled: r.disabled ? r.disabled : !1,
@@ -4485,8 +4485,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4485
4485
  label: r.label,
4486
4486
  value: o[r.key] || { from: null, to: null },
4487
4487
  onChange: (d) => {
4488
- const p = { ...o, [r.key]: d };
4489
- u(p), s && s(l.key, p);
4488
+ const g = { ...o, [r.key]: d };
4489
+ h(g), s && s(l.key, g);
4490
4490
  },
4491
4491
  placeholder: r.placeholder || "Select date range",
4492
4492
  disabled: r.disabled ? r.disabled : !1,
@@ -4500,8 +4500,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4500
4500
  {
4501
4501
  selectedValue: typeof o[r.key] < "u" ? o[r.key] : r.default || "",
4502
4502
  onValueChange: (d) => {
4503
- const p = { ...o, [r.key]: d };
4504
- u(p), s && s(l.key, p);
4503
+ const g = { ...o, [r.key]: d };
4504
+ h(g), s && s(l.key, g);
4505
4505
  },
4506
4506
  options: r.options || [],
4507
4507
  disabled: r.disabled ? r.disabled : !1,
@@ -4520,9 +4520,9 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4520
4520
  name: r.key,
4521
4521
  value: d.value,
4522
4522
  checked: o[r.key] === d.value,
4523
- onChange: (p) => {
4524
- const z = { ...o, [r.key]: p.target.value };
4525
- u(z), s && s(l.key, z);
4523
+ onChange: (g) => {
4524
+ const D = { ...o, [r.key]: g.target.value };
4525
+ h(D), s && s(l.key, D);
4526
4526
  },
4527
4527
  disabled: r.disabled
4528
4528
  }
@@ -4540,8 +4540,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4540
4540
  {
4541
4541
  value: o[r.key] || "",
4542
4542
  onChange: (d) => {
4543
- const p = { ...o, [r.key]: d };
4544
- u(p), s && s(l.key, p);
4543
+ const g = { ...o, [r.key]: d };
4544
+ h(g), s && s(l.key, g);
4545
4545
  },
4546
4546
  placeholder: r.placeholder || `Search ${r.label}`,
4547
4547
  className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
@@ -4559,8 +4559,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4559
4559
  placeholder: r.placeholder || "Select date and time",
4560
4560
  value: o[r.key] || "",
4561
4561
  onChange: (d) => {
4562
- const p = { ...o, [r.key]: d.target.value };
4563
- u(p), s && s(l.key, p);
4562
+ const g = { ...o, [r.key]: d.target.value };
4563
+ h(g), s && s(l.key, g);
4564
4564
  },
4565
4565
  required: r.required,
4566
4566
  className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
@@ -4578,8 +4578,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4578
4578
  placeholder: r.placeholder || "Select time",
4579
4579
  value: o[r.key] || "",
4580
4580
  onChange: (d) => {
4581
- const p = { ...o, [r.key]: d.target.value };
4582
- u(p), s && s(l.key, p);
4581
+ const g = { ...o, [r.key]: d.target.value };
4582
+ h(g), s && s(l.key, g);
4583
4583
  },
4584
4584
  required: r.required,
4585
4585
  className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
@@ -4596,8 +4596,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4596
4596
  defaultValue: r.default || "#000000",
4597
4597
  value: o[r.key] || "#000000",
4598
4598
  onChange: (d) => {
4599
- const p = { ...o, [r.key]: d.target.value };
4600
- u(p), s && s(l.key, p);
4599
+ const g = { ...o, [r.key]: d.target.value };
4600
+ h(g), s && s(l.key, g);
4601
4601
  },
4602
4602
  className: `w-full h-10 ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
4603
4603
  }
@@ -4613,8 +4613,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4613
4613
  defaultValue: r.default || r.min || 0,
4614
4614
  value: o[r.key] || r.min || 0,
4615
4615
  onChange: (d) => {
4616
- const p = { ...o, [r.key]: d.target.value };
4617
- u(p), s && s(l.key, p);
4616
+ const g = { ...o, [r.key]: d.target.value };
4617
+ h(g), s && s(l.key, g);
4618
4618
  },
4619
4619
  min: r.min || 0,
4620
4620
  max: r.max || 100,
@@ -4639,8 +4639,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4639
4639
  type: "file",
4640
4640
  name: r.key,
4641
4641
  onChange: (d) => {
4642
- const p = d.target.files[0], z = { ...o, [r.key]: p ? p.name : "" };
4643
- u(z), s && s(l.key, z);
4642
+ const g = d.target.files[0], D = { ...o, [r.key]: g ? g.name : "" };
4643
+ h(D), s && s(l.key, D);
4644
4644
  },
4645
4645
  accept: r.accept,
4646
4646
  className: `w-full ${i[l.key]?.[r.key] ? "border-red-500" : ""}`
@@ -4656,8 +4656,8 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4656
4656
  initialData: o[r.key] || r.initialData || [],
4657
4657
  className: r.className || "",
4658
4658
  onCollectionChange: (d) => {
4659
- const p = { ...o, [r.key]: d };
4660
- u(p), s && s(l.key, p);
4659
+ const g = { ...o, [r.key]: d };
4660
+ h(g), s && s(l.key, g);
4661
4661
  },
4662
4662
  showSearch: r.showSearch !== !1,
4663
4663
  allowAdd: r.allowAdd !== !1,
@@ -4685,7 +4685,7 @@ function vs({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4685
4685
  const Ns = ({ children: t }) => /* @__PURE__ */ e("div", { className: "flex -space-x-2", children: t });
4686
4686
  function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4687
4687
  console.log(`[DynamicConfig/DataTableRenderer] Component loaded for section: ${t.key}`);
4688
- const [l, m] = B(t), [o, u] = B(null), [h, N] = B(null);
4688
+ const [l, m] = B(t), [o, h] = B(null), [u, N] = B(null);
4689
4689
  console.log(`[DataTableRenderer] ${l.key} - Received props:`, { item: t, initialData: a });
4690
4690
  const [y, r] = B(() => {
4691
4691
  const x = a && a[l.key] || [], b = x.length > 0 ? x : [{ id: 0 }];
@@ -4698,75 +4698,75 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4698
4698
  console.log(`[DataTableRenderer] ${l.key} - Setting new data:`, b), r(b);
4699
4699
  }
4700
4700
  }, [a, l.key]);
4701
- const d = fe(y), p = fe(null);
4701
+ const d = fe(y), g = fe(null);
4702
4702
  Z(() => {
4703
- d.current !== y && s && typeof s == "function" && (d.current = y, p.current && clearTimeout(p.current), p.current = setTimeout(() => {
4703
+ d.current !== y && s && typeof s == "function" && (d.current = y, g.current && clearTimeout(g.current), g.current = setTimeout(() => {
4704
4704
  s(l.key, y);
4705
4705
  }, 300));
4706
4706
  }, [l.key, y, s]), Z(() => () => {
4707
- p.current && clearTimeout(p.current);
4707
+ g.current && clearTimeout(g.current);
4708
4708
  }, []);
4709
- const z = (x) => {
4710
- const b = (I, D) => {
4711
- console.log("[DataTableRenderer] updateFieldValue called with:", { rowIndex: I, value: D, type: typeof D }), r((f) => {
4712
- const g = [...f];
4713
- return g[I][x.key] = D, g;
4709
+ const D = (x) => {
4710
+ const b = (R, z) => {
4711
+ console.log("[DataTableRenderer] updateFieldValue called with:", { rowIndex: R, value: z, type: typeof z }), r((f) => {
4712
+ const p = [...f];
4713
+ return p[R][x.key] = z, p;
4714
4714
  });
4715
- }, S = (I) => i[l.key]?.[I]?.[x.key], O = (I) => {
4716
- const D = S(I);
4717
- return D ? /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-1", children: D }) : null;
4715
+ }, S = (R) => i[l.key]?.[R]?.[x.key], O = (R) => {
4716
+ const z = S(R);
4717
+ return z ? /* @__PURE__ */ e("div", { className: "text-red-500 text-xs mt-1", children: z }) : null;
4718
4718
  };
4719
4719
  switch (x.fieldtype) {
4720
4720
  case "text":
4721
- return (I, D) => /* @__PURE__ */ n("div", { children: [
4721
+ return (R, z) => /* @__PURE__ */ n("div", { children: [
4722
4722
  /* @__PURE__ */ e(
4723
4723
  X,
4724
4724
  {
4725
- value: I[x.key] || "",
4726
- onChange: (f) => b(D, f.target.value),
4725
+ value: R[x.key] || "",
4726
+ onChange: (f) => b(z, f.target.value),
4727
4727
  placeholder: x.placeholder || `Enter ${x.label}`,
4728
4728
  required: x.required,
4729
- className: `w-full ${S(D) ? "border-red-500" : ""}`
4729
+ className: `w-full ${S(z) ? "border-red-500" : ""}`
4730
4730
  }
4731
4731
  ),
4732
- O(D)
4732
+ O(z)
4733
4733
  ] });
4734
4734
  case "textarea":
4735
- return (I, D) => /* @__PURE__ */ n("div", { children: [
4735
+ return (R, z) => /* @__PURE__ */ n("div", { children: [
4736
4736
  /* @__PURE__ */ e(
4737
4737
  fa,
4738
4738
  {
4739
- value: I[x.key] || "",
4740
- onChange: (f) => b(D, f.target.value),
4739
+ value: R[x.key] || "",
4740
+ onChange: (f) => b(z, f.target.value),
4741
4741
  placeholder: x.placeholder || `Enter ${x.label}`,
4742
4742
  required: x.required,
4743
- className: `w-full ${S(D) ? "border-red-500" : ""}`,
4743
+ className: `w-full ${S(z) ? "border-red-500" : ""}`,
4744
4744
  rows: 3
4745
4745
  }
4746
4746
  ),
4747
- O(D)
4747
+ O(z)
4748
4748
  ] });
4749
4749
  case "number":
4750
- return (I, D) => /* @__PURE__ */ n("div", { children: [
4750
+ return (R, z) => /* @__PURE__ */ n("div", { children: [
4751
4751
  /* @__PURE__ */ e(
4752
4752
  X,
4753
4753
  {
4754
4754
  type: "number",
4755
- value: I[x.key] || "",
4755
+ value: R[x.key] || "",
4756
4756
  min: x.min,
4757
4757
  max: x.max,
4758
4758
  step: x.step,
4759
- onChange: (f) => b(D, f.target.value),
4759
+ onChange: (f) => b(z, f.target.value),
4760
4760
  onBlur: (f) => {
4761
- const g = f.target.value;
4762
- if (g !== "" && g !== null && g !== void 0) {
4763
- const k = Number(g);
4761
+ const p = f.target.value;
4762
+ if (p !== "" && p !== null && p !== void 0) {
4763
+ const k = Number(p);
4764
4764
  isNaN(k) || (x.min !== void 0 && k < x.min ? (f.target.setCustomValidity(`${x.label} must be at least ${x.min}`), f.target.reportValidity()) : x.max !== void 0 && k > x.max ? (f.target.setCustomValidity(`${x.label} must not exceed ${x.max}`), f.target.reportValidity()) : f.target.setCustomValidity(""));
4765
4765
  }
4766
4766
  },
4767
4767
  placeholder: x.placeholder || `Enter ${x.label}`,
4768
4768
  required: x.required,
4769
- className: `w-full ${S(D) ? "border-red-500" : ""}`
4769
+ className: `w-full ${S(z) ? "border-red-500" : ""}`
4770
4770
  }
4771
4771
  ),
4772
4772
  x.min !== void 0 && /* @__PURE__ */ n("div", { style: { color: "#6b7280", fontSize: "11px", marginTop: "2px" }, children: [
@@ -4777,74 +4777,74 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4777
4777
  "Max: ",
4778
4778
  x.max
4779
4779
  ] }),
4780
- O(D)
4780
+ O(z)
4781
4781
  ] });
4782
4782
  case "email":
4783
- return (I, D) => /* @__PURE__ */ n("div", { children: [
4783
+ return (R, z) => /* @__PURE__ */ n("div", { children: [
4784
4784
  /* @__PURE__ */ e(
4785
4785
  X,
4786
4786
  {
4787
4787
  type: "email",
4788
- value: I[x.key] || "",
4789
- onChange: (f) => b(D, f.target.value),
4788
+ value: R[x.key] || "",
4789
+ onChange: (f) => b(z, f.target.value),
4790
4790
  placeholder: x.placeholder || "Enter email address",
4791
4791
  required: x.required,
4792
- className: `w-full ${S(D) ? "border-red-500" : ""}`
4792
+ className: `w-full ${S(z) ? "border-red-500" : ""}`
4793
4793
  }
4794
4794
  ),
4795
- O(D)
4795
+ O(z)
4796
4796
  ] });
4797
4797
  case "url":
4798
- return (I, D) => /* @__PURE__ */ n("div", { children: [
4798
+ return (R, z) => /* @__PURE__ */ n("div", { children: [
4799
4799
  /* @__PURE__ */ e(
4800
4800
  X,
4801
4801
  {
4802
4802
  type: "url",
4803
- value: I[x.key] || "",
4804
- onChange: (f) => b(D, f.target.value),
4803
+ value: R[x.key] || "",
4804
+ onChange: (f) => b(z, f.target.value),
4805
4805
  placeholder: x.placeholder || "Enter URL",
4806
4806
  required: x.required,
4807
- className: `w-full ${S(D) ? "border-red-500" : ""}`
4807
+ className: `w-full ${S(z) ? "border-red-500" : ""}`
4808
4808
  }
4809
4809
  ),
4810
- O(D)
4810
+ O(z)
4811
4811
  ] });
4812
4812
  case "password":
4813
- return (I, D) => /* @__PURE__ */ n("div", { children: [
4813
+ return (R, z) => /* @__PURE__ */ n("div", { children: [
4814
4814
  /* @__PURE__ */ e(
4815
4815
  X,
4816
4816
  {
4817
4817
  type: "password",
4818
- value: I[x.key] || "",
4819
- onChange: (f) => b(D, f.target.value),
4818
+ value: R[x.key] || "",
4819
+ onChange: (f) => b(z, f.target.value),
4820
4820
  placeholder: x.placeholder || "Enter password",
4821
4821
  required: x.required,
4822
- className: `w-full ${S(D) ? "border-red-500" : ""}`
4822
+ className: `w-full ${S(z) ? "border-red-500" : ""}`
4823
4823
  }
4824
4824
  ),
4825
- O(D)
4825
+ O(z)
4826
4826
  ] });
4827
4827
  case "select":
4828
4828
  case "dropdown":
4829
- return (I, D) => /* @__PURE__ */ n("div", { children: [
4829
+ return (R, z) => /* @__PURE__ */ n("div", { children: [
4830
4830
  /* @__PURE__ */ e(
4831
4831
  ft,
4832
4832
  {
4833
- value: I[x.key] || "",
4834
- onChange: (f) => b(D, f),
4833
+ value: R[x.key] || "",
4834
+ onChange: (f) => b(z, f),
4835
4835
  options: x.options || [],
4836
4836
  placeholder: x.placeholder || `Select ${x.label}`,
4837
4837
  required: x.required,
4838
- className: `w-full ${S(D) ? "border-red-500" : ""}`
4838
+ className: `w-full ${S(z) ? "border-red-500" : ""}`
4839
4839
  }
4840
4840
  ),
4841
- O(D)
4841
+ O(z)
4842
4842
  ] });
4843
4843
  case "selectDynamic":
4844
- return (I, D) => {
4844
+ return (R, z) => {
4845
4845
  const f = () => {
4846
4846
  if (x.optionsFrom && a) {
4847
- const { config: g, valueField: k, labelField: w } = x.optionsFrom, T = a[g] || [];
4847
+ const { config: p, valueField: k, labelField: w } = x.optionsFrom, T = a[p] || [];
4848
4848
  if (Array.isArray(T))
4849
4849
  return T.map((L) => ({
4850
4850
  id: L[k] || "",
@@ -4858,27 +4858,27 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4858
4858
  /* @__PURE__ */ e(
4859
4859
  ft,
4860
4860
  {
4861
- index: D,
4862
- value: I[x.key] || "",
4863
- onChange: (g) => b(D, g),
4861
+ index: z,
4862
+ value: R[x.key] || "",
4863
+ onChange: (p) => b(z, p),
4864
4864
  options: f(),
4865
4865
  placeholder: x.placeholder || `Select ${x.label}`,
4866
4866
  required: x.required,
4867
- className: `w-full ${S(D) ? "border-red-500" : ""}`
4867
+ className: `w-full ${S(z) ? "border-red-500" : ""}`
4868
4868
  },
4869
4869
  Math.random()
4870
4870
  ),
4871
- O(D)
4871
+ O(z)
4872
4872
  ] });
4873
4873
  };
4874
4874
  case "multiselect":
4875
- return (I, D) => {
4876
- const f = I[x.key] || [];
4875
+ return (R, z) => {
4876
+ const f = R[x.key] || [];
4877
4877
  return /* @__PURE__ */ e(
4878
4878
  at,
4879
4879
  {
4880
4880
  selectedItems: f,
4881
- onSelectionChange: (g) => b(D, g),
4881
+ onSelectionChange: (p) => b(z, p),
4882
4882
  options: x.options || [],
4883
4883
  placeholder: x.placeholder || `Select ${x.label}`,
4884
4884
  className: "w-full"
@@ -4887,89 +4887,89 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4887
4887
  };
4888
4888
  case "checkbox":
4889
4889
  case "boolean":
4890
- return (I, D) => /* @__PURE__ */ e(
4890
+ return (R, z) => /* @__PURE__ */ e(
4891
4891
  pt,
4892
4892
  {
4893
- checked: !!I[x.key],
4894
- onChange: (f) => b(D, f),
4893
+ checked: !!R[x.key],
4894
+ onChange: (f) => b(z, f),
4895
4895
  label: x.placeholder || x.label,
4896
4896
  className: "w-full"
4897
4897
  }
4898
4898
  );
4899
4899
  case "toggle":
4900
4900
  case "switch":
4901
- return (I, D) => /* @__PURE__ */ e(
4901
+ return (R, z) => /* @__PURE__ */ e(
4902
4902
  ya,
4903
4903
  {
4904
- isOn: !!I[x.key],
4905
- onToggle: (f) => b(D, f),
4904
+ isOn: !!R[x.key],
4905
+ onToggle: (f) => b(z, f),
4906
4906
  label: x.placeholder || x.label,
4907
4907
  className: "w-full"
4908
4908
  }
4909
4909
  );
4910
4910
  case "date":
4911
- return (I, D) => /* @__PURE__ */ e(
4911
+ return (R, z) => /* @__PURE__ */ e(
4912
4912
  ha,
4913
4913
  {
4914
- selectedDate: I[x.key] ? new Date(I[x.key]) : null,
4915
- onDateChange: (f) => b(D, f ? f.toISOString().split("T")[0] : ""),
4914
+ selectedDate: R[x.key] ? new Date(R[x.key]) : null,
4915
+ onDateChange: (f) => b(z, f ? f.toISOString().split("T")[0] : ""),
4916
4916
  placeholder: x.placeholder || "Select date",
4917
4917
  className: "w-full"
4918
4918
  }
4919
4919
  );
4920
4920
  case "datetime":
4921
- return (I, D) => /* @__PURE__ */ e(
4921
+ return (R, z) => /* @__PURE__ */ e(
4922
4922
  X,
4923
4923
  {
4924
4924
  type: "datetime-local",
4925
- value: I[x.key] || "",
4926
- onChange: (f) => b(D, f.target.value),
4925
+ value: R[x.key] || "",
4926
+ onChange: (f) => b(z, f.target.value),
4927
4927
  placeholder: x.placeholder || "Select date and time",
4928
4928
  required: x.required,
4929
4929
  className: "w-full"
4930
4930
  }
4931
4931
  );
4932
4932
  case "time":
4933
- return (I, D) => /* @__PURE__ */ e(
4933
+ return (R, z) => /* @__PURE__ */ e(
4934
4934
  X,
4935
4935
  {
4936
4936
  type: "time",
4937
- value: I[x.key] || "",
4938
- onChange: (f) => b(D, f.target.value),
4937
+ value: R[x.key] || "",
4938
+ onChange: (f) => b(z, f.target.value),
4939
4939
  placeholder: x.placeholder || "Select time",
4940
4940
  required: x.required,
4941
4941
  className: "w-full"
4942
4942
  }
4943
4943
  );
4944
4944
  case "radio":
4945
- return (I, D) => /* @__PURE__ */ e(
4945
+ return (R, z) => /* @__PURE__ */ e(
4946
4946
  pa,
4947
4947
  {
4948
- selectedValue: I[x.key] || "",
4949
- onValueChange: (f) => b(D, f),
4948
+ selectedValue: R[x.key] || "",
4949
+ onValueChange: (f) => b(z, f),
4950
4950
  options: x.options || [],
4951
4951
  className: "w-full"
4952
4952
  }
4953
4953
  );
4954
4954
  case "search":
4955
- return (I, D) => /* @__PURE__ */ e(
4955
+ return (R, z) => /* @__PURE__ */ e(
4956
4956
  ge,
4957
4957
  {
4958
- value: I[x.key] || "",
4959
- onChange: (f) => b(D, f),
4958
+ value: R[x.key] || "",
4959
+ onChange: (f) => b(z, f),
4960
4960
  placeholder: x.placeholder || `Search ${x.label}`,
4961
4961
  className: "w-full"
4962
4962
  }
4963
4963
  );
4964
4964
  case "audience":
4965
- return (I, D) => {
4966
- const f = I[x.key] || { users: [], groups: [], roles: [] }, g = [
4965
+ return (R, z) => {
4966
+ const f = R[x.key] || { users: [], groups: [], roles: [] }, p = [
4967
4967
  ...f.users || [],
4968
4968
  ...f.groups || [],
4969
4969
  ...f.roles || []
4970
4970
  ];
4971
4971
  return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
4972
- /* @__PURE__ */ e(Ns, { children: g.length > 0 ? g.slice(0, 3).map((k, w) => /* @__PURE__ */ e(
4972
+ /* @__PURE__ */ e(Ns, { children: p.length > 0 ? p.slice(0, 3).map((k, w) => /* @__PURE__ */ e(
4973
4973
  we,
4974
4974
  {
4975
4975
  size: "small",
@@ -4983,75 +4983,82 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
4983
4983
  {
4984
4984
  className: "text-blue-600 font-semibold hover:text-blue-800",
4985
4985
  onClick: () => {
4986
- N(x.key), u(D);
4986
+ console.log("[DataTableRenderer] Button clicked:", {
4987
+ fieldKey: x.key,
4988
+ rowIndex: z,
4989
+ buttonText: p.length > 0 ? "Edit" : "Assign",
4990
+ currentAudienceRowId: o,
4991
+ currentAudienceFieldName: u,
4992
+ allAudience: p
4993
+ }), N(x.key), h(z);
4987
4994
  },
4988
- children: g.length > 0 ? "Edit" : "Assign"
4995
+ children: p.length > 0 ? "Edit" : "Assign"
4989
4996
  }
4990
4997
  )
4991
4998
  ] });
4992
4999
  };
4993
5000
  case "color":
4994
- return (I, D) => /* @__PURE__ */ e(
5001
+ return (R, z) => /* @__PURE__ */ e(
4995
5002
  X,
4996
5003
  {
4997
5004
  type: "color",
4998
- value: I[x.key] || "#000000",
4999
- onChange: (f) => b(D, f.target.value),
5005
+ value: R[x.key] || "#000000",
5006
+ onChange: (f) => b(z, f.target.value),
5000
5007
  className: "w-full h-10"
5001
5008
  }
5002
5009
  );
5003
5010
  case "range":
5004
- return (I, D) => /* @__PURE__ */ n("div", { className: "w-full", children: [
5011
+ return (R, z) => /* @__PURE__ */ n("div", { className: "w-full", children: [
5005
5012
  /* @__PURE__ */ e(
5006
5013
  X,
5007
5014
  {
5008
5015
  type: "range",
5009
- value: I[x.key] || x.min || 0,
5010
- onChange: (f) => b(D, f.target.value),
5016
+ value: R[x.key] || x.min || 0,
5017
+ onChange: (f) => b(z, f.target.value),
5011
5018
  min: x.min || 0,
5012
5019
  max: x.max || 100,
5013
5020
  step: x.step || 1,
5014
5021
  className: "w-full"
5015
5022
  }
5016
5023
  ),
5017
- /* @__PURE__ */ e("span", { className: "text-sm text-gray-500", children: I[x.key] || x.min || 0 })
5024
+ /* @__PURE__ */ e("span", { className: "text-sm text-gray-500", children: R[x.key] || x.min || 0 })
5018
5025
  ] });
5019
5026
  case "file":
5020
- return (I, D) => /* @__PURE__ */ e(
5027
+ return (R, z) => /* @__PURE__ */ e(
5021
5028
  X,
5022
5029
  {
5023
5030
  type: "file",
5024
5031
  onChange: (f) => {
5025
- const g = f.target.files[0];
5026
- b(D, g ? g.name : "");
5032
+ const p = f.target.files[0];
5033
+ b(z, p ? p.name : "");
5027
5034
  },
5028
5035
  accept: x.accept,
5029
5036
  className: "w-full"
5030
5037
  }
5031
5038
  );
5032
5039
  case "hidden":
5033
- return (I, D) => /* @__PURE__ */ e(
5040
+ return (R, z) => /* @__PURE__ */ e(
5034
5041
  X,
5035
5042
  {
5036
5043
  type: "hidden",
5037
- value: I[x.key] || "",
5038
- onChange: (f) => b(D, f.target.value)
5044
+ value: R[x.key] || "",
5045
+ onChange: (f) => b(z, f.target.value)
5039
5046
  }
5040
5047
  );
5041
5048
  // Default fallback for unknown field types
5042
5049
  default:
5043
- return (I, D) => /* @__PURE__ */ n("div", { children: [
5050
+ return (R, z) => /* @__PURE__ */ n("div", { children: [
5044
5051
  /* @__PURE__ */ e(
5045
5052
  X,
5046
5053
  {
5047
- value: I[x.key] || "",
5048
- onChange: (f) => b(D, f.target.value),
5054
+ value: R[x.key] || "",
5055
+ onChange: (f) => b(z, f.target.value),
5049
5056
  placeholder: x.placeholder || `Enter ${x.label}`,
5050
5057
  required: x.required,
5051
- className: `w-full ${S(D) ? "border-red-500" : ""}`
5058
+ className: `w-full ${S(z) ? "border-red-500" : ""}`
5052
5059
  }
5053
5060
  ),
5054
- O(D)
5061
+ O(z)
5055
5062
  ] });
5056
5063
  }
5057
5064
  }, F = ee(() => {
@@ -5074,16 +5081,16 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5074
5081
  const S = [...b];
5075
5082
  return S.splice(x, 1), S;
5076
5083
  });
5077
- }, []), [R, P] = B(null), j = ee((x, b) => {
5084
+ }, []), [I, P] = B(null), _ = ee((x, b) => {
5078
5085
  P(b), x.dataTransfer.effectAllowed = "move", x.dataTransfer.setData("text/html", "");
5079
5086
  }, []), U = ee((x) => {
5080
5087
  x.preventDefault(), x.dataTransfer.dropEffect = "move";
5081
5088
  }, []), Y = ee((x, b) => {
5082
- x.preventDefault(), !(R === null || R === b) && (r((S) => {
5083
- const O = [...S], I = O[R];
5084
- return O.splice(R, 1), O.splice(b, 0, I), O;
5089
+ x.preventDefault(), !(I === null || I === b) && (r((S) => {
5090
+ const O = [...S], R = O[I];
5091
+ return O.splice(I, 1), O.splice(b, 0, R), O;
5085
5092
  }), P(null));
5086
- }, [R]), q = ee(() => {
5093
+ }, [I]), q = ee(() => {
5087
5094
  P(null);
5088
5095
  }, []), $ = ee((x, b) => {
5089
5096
  console.log("[DataTableRenderer] handleAddAudience called with:", { selectedEntities: x, existingShares: b });
@@ -5092,26 +5099,35 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5092
5099
  console.log("[DataTableRenderer] Ignoring empty initial call from InviteFlow useEffect");
5093
5100
  return;
5094
5101
  }
5095
- r((I) => {
5096
- const D = [...I];
5097
- if (o !== null && h && D[o]) {
5102
+ if (S.length === 0 && !O && o !== null && u) {
5103
+ console.log("[DataTableRenderer] Edit mode - no pending invites, checking if this is initial call");
5104
+ const R = y[o] && y[o][u] ? y[o][u] : { users: [], groups: [], roles: [] }, z = (b.users || []).map((V) => V.id).sort(), f = (b.groups || []).map((V) => V.id).sort(), p = (b.roles || []).map((V) => V.id).sort(), k = (R.users || []).map((V) => V.id).sort(), w = (R.groups || []).map((V) => V.id).sort(), T = (R.roles || []).map((V) => V.id).sort(), L = JSON.stringify(z) === JSON.stringify(k), C = JSON.stringify(f) === JSON.stringify(w), M = JSON.stringify(p) === JSON.stringify(T);
5105
+ if (L && C && M) {
5106
+ console.log("[DataTableRenderer] Ignoring initial Edit call - existing shares match current data exactly");
5107
+ return;
5108
+ }
5109
+ console.log("[DataTableRenderer] Data has changed, processing update");
5110
+ }
5111
+ r((R) => {
5112
+ const z = [...R];
5113
+ if (o !== null && u && z[o]) {
5098
5114
  if (S.length > 0) {
5099
- const f = S.filter((w) => w.type === "User"), g = S.filter((w) => w.type === "Group"), k = S.filter((w) => w.type === "Role");
5100
- D[o][h] = {
5101
- users: [...D[o][h]?.users || [], ...f],
5102
- groups: [...D[o][h]?.groups || [], ...g],
5103
- roles: [...D[o][h]?.roles || [], ...k]
5115
+ const f = S.filter((w) => w.type === "User"), p = S.filter((w) => w.type === "Group"), k = S.filter((w) => w.type === "Role");
5116
+ z[o][u] = {
5117
+ users: [...z[o][u]?.users || [], ...f],
5118
+ groups: [...z[o][u]?.groups || [], ...p],
5119
+ roles: [...z[o][u]?.roles || [], ...k]
5104
5120
  };
5105
- } else b && !O && (D[o][h] = {
5121
+ } else b && !O && (z[o][u] = {
5106
5122
  users: b.users || [],
5107
5123
  groups: b.groups || [],
5108
5124
  roles: b.roles || []
5109
5125
  });
5110
- console.log("[DataTableRenderer] Updated audience data:", D[o][h]);
5126
+ console.log("[DataTableRenderer] Updated audience data:", z[o][u]);
5111
5127
  }
5112
- return D;
5113
- }), console.log("[DataTableRenderer] Closing modal after update"), u(null), N(null);
5114
- }, [o, h]);
5128
+ return z;
5129
+ }), console.log("[DataTableRenderer] Closing modal after update"), h(null), N(null);
5130
+ }, [o, u]);
5115
5131
  return /* @__PURE__ */ n("div", { children: [
5116
5132
  /* @__PURE__ */ n("div", { style: { marginBottom: "20px" }, children: [
5117
5133
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
@@ -5143,15 +5159,15 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5143
5159
  /* @__PURE__ */ e("tbody", { children: y.map((x, b) => /* @__PURE__ */ n(
5144
5160
  "tr",
5145
5161
  {
5146
- className: `hover:bg-gray-50 ${R === b ? "opacity-50" : ""}`,
5162
+ className: `hover:bg-gray-50 ${I === b ? "opacity-50" : ""}`,
5147
5163
  draggable: !0,
5148
- onDragStart: (S) => j(S, b),
5164
+ onDragStart: (S) => _(S, b),
5149
5165
  onDragOver: U,
5150
5166
  onDrop: (S) => Y(S, b),
5151
5167
  onDragEnd: q,
5152
5168
  children: [
5153
5169
  /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e("div", { className: "cursor-move text-gray-400 hover:text-gray-600", children: /* @__PURE__ */ e(wt, { size: 16 }) }) }),
5154
- l.fields.map((S, O) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: z(S)(x, b) }, O)),
5170
+ l.fields.map((S, O) => /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: D(S)(x, b) }, O)),
5155
5171
  /* @__PURE__ */ e("td", { className: "px-4 py-2 ", children: /* @__PURE__ */ e(
5156
5172
  "button",
5157
5173
  {
@@ -5166,18 +5182,23 @@ function ws({ item: t, data: a, updateHandler: s, validationErrors: i = {} }) {
5166
5182
  b
5167
5183
  )) })
5168
5184
  ] }) }),
5169
- o !== null && (() => {
5170
- const x = y[o] && y[o][h] ? {
5171
- users: y[o][h].users || [],
5172
- groups: y[o][h].groups || [],
5173
- roles: y[o][h].roles || []
5185
+ (() => {
5186
+ if (console.log("[DataTableRenderer] Modal condition check:", {
5187
+ audienceRowId: o,
5188
+ audienceFieldName: u,
5189
+ shouldRender: o !== null
5190
+ }), o === null) return null;
5191
+ const x = y[o] && y[o][u] ? {
5192
+ users: y[o][u].users || [],
5193
+ groups: y[o][u].groups || [],
5194
+ roles: y[o][u].roles || []
5174
5195
  } : { users: [], groups: [], roles: [] };
5175
- return console.log("[DataTableRenderer] Opening modal with existing data:", x), console.log("[DataTableRenderer] Row data:", y[o]), console.log("[DataTableRenderer] Field name:", h), /* @__PURE__ */ e(
5196
+ return console.log("[DataTableRenderer] Opening modal with existing data:", x), console.log("[DataTableRenderer] Row data:", y[o]), console.log("[DataTableRenderer] Field name:", u), /* @__PURE__ */ e(
5176
5197
  cs,
5177
5198
  {
5178
5199
  isOpen: !0,
5179
5200
  onClose: () => {
5180
- u(null), N(null);
5201
+ h(null), N(null);
5181
5202
  },
5182
5203
  onFinalSubmit: $,
5183
5204
  existingShares: x,
@@ -5209,9 +5230,9 @@ function Ss({
5209
5230
  onShowCancelModal: l,
5210
5231
  onCancel: m
5211
5232
  }) {
5212
- const [o, u] = re.useState(a), [h, N] = re.useState(null), [y, r] = re.useState(null), [v, d] = B(!1), [p, z] = B(!1), [F, E] = B({}), R = `${$e()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, P = R, [j, U] = B(1), Y = () => {
5213
- if (!y || !h)
5214
- return console.log("[DynamicConfig] hasUnsavedChanges: false (no data)", { originalData: y, data: h }), !1;
5233
+ const [o, h] = re.useState(a), [u, N] = re.useState(null), [y, r] = re.useState(null), [v, d] = B(!1), [g, D] = B(!1), [F, E] = B({}), I = `${$e()}/unifyedxappmodulemanagement/api/v1/appmanager/${t}/configuration`, P = I, [_, U] = B(1), Y = () => {
5234
+ if (!y || !u)
5235
+ return console.log("[DynamicConfig] hasUnsavedChanges: false (no data)", { originalData: y, data: u }), !1;
5215
5236
  const f = (T) => {
5216
5237
  if (T == null || typeof T != "object") return T;
5217
5238
  if (Array.isArray(T)) return T.map(f);
@@ -5219,21 +5240,21 @@ function Ss({
5219
5240
  return Object.keys(T).sort().forEach((C) => {
5220
5241
  L[C] = f(T[C]);
5221
5242
  }), L;
5222
- }, g = f(y), k = f(h), w = JSON.stringify(g) !== JSON.stringify(k);
5243
+ }, p = f(y), k = f(u), w = JSON.stringify(p) !== JSON.stringify(k);
5223
5244
  return console.log("[DynamicConfig] hasUnsavedChanges:", w, {
5224
- originalData: g,
5245
+ originalData: p,
5225
5246
  currentData: k,
5226
5247
  originalRaw: y,
5227
- currentRaw: h
5248
+ currentRaw: u
5228
5249
  }), w;
5229
5250
  }, q = (f) => {
5230
5251
  if (!a || !a.configuration)
5231
5252
  return f;
5232
- const g = {}, k = f?.configuration || {};
5253
+ const p = {}, k = f?.configuration || {};
5233
5254
  return a.configuration.forEach((w) => {
5234
5255
  if (w.key && w.type === "datatable") {
5235
5256
  const L = (k[w.key] || []).map((C, M) => {
5236
- const _ = { id: C.id || 0 };
5257
+ const V = { id: C.id || 0 };
5237
5258
  return w.fields && w.fields.forEach((A) => {
5238
5259
  if (A.fieldtype === "audience") {
5239
5260
  let G = { users: [], groups: [], roles: [] };
@@ -5241,9 +5262,9 @@ function Ss({
5241
5262
  users: C[A.key].users || [],
5242
5263
  groups: C[A.key].groups || [],
5243
5264
  roles: C[A.key].roles || []
5244
- })), _[A.key] = G;
5245
- } else A.fieldtype === "select" ? _[A.key] = C[A.key] !== void 0 && C[A.key] !== "" ? C[A.key] : A.default || "" : _[A.key] = C[A.key] || A.default || "";
5246
- }), _;
5265
+ })), V[A.key] = G;
5266
+ } else A.fieldtype === "select" ? V[A.key] = C[A.key] !== void 0 && C[A.key] !== "" ? C[A.key] : A.default || "" : V[A.key] = C[A.key] || A.default || "";
5267
+ }), V;
5247
5268
  });
5248
5269
  if (L.length === 0) {
5249
5270
  const C = { id: 0 };
@@ -5251,31 +5272,31 @@ function Ss({
5251
5272
  M.fieldtype === "audience" ? C[M.key] = { users: [], groups: [], roles: [] } : C[M.key] = M.default || "";
5252
5273
  }), L.push(C);
5253
5274
  }
5254
- g[w.key] = L;
5275
+ p[w.key] = L;
5255
5276
  } else if (w.key) {
5256
5277
  const T = k[w.key] || {};
5257
5278
  w.type === "section" && w.fields && w.fields.forEach((L) => {
5258
5279
  L.fieldtype === "managecollectionlist" && L.key && (!T[L.key] || !Array.isArray(T[L.key])) && (T[L.key] = L.initialData || []);
5259
- }), g[w.key] = T;
5280
+ }), p[w.key] = T;
5260
5281
  }
5261
- }), g;
5282
+ }), p;
5262
5283
  }, $ = () => {
5263
5284
  if (a && a.configuration) {
5264
5285
  const f = {};
5265
- a.configuration.forEach((g) => {
5266
- if (g.key)
5267
- if (g.type === "datatable") {
5286
+ a.configuration.forEach((p) => {
5287
+ if (p.key)
5288
+ if (p.type === "datatable") {
5268
5289
  const k = { id: 0 };
5269
- g.fields && g.fields.forEach((w) => {
5290
+ p.fields && p.fields.forEach((w) => {
5270
5291
  w.fieldtype === "audience" ? k[w.key] = { users: [], groups: [], roles: [] } : (w.fieldtype, k[w.key] = w.default || "");
5271
- }), f[g.key] = [k];
5272
- } else if (g.type === "section") {
5292
+ }), f[p.key] = [k];
5293
+ } else if (p.type === "section") {
5273
5294
  const k = {};
5274
- g.fields && Array.isArray(g.fields) && g.fields.forEach((w) => {
5295
+ p.fields && Array.isArray(p.fields) && p.fields.forEach((w) => {
5275
5296
  w.key && (w.fieldtype === "managecollectionlist" ? k[w.key] = w.initialData || [] : k[w.key] = w.default || "");
5276
- }), f[g.key] = k;
5297
+ }), f[p.key] = k;
5277
5298
  } else
5278
- f[g.key] = {};
5299
+ f[p.key] = {};
5279
5300
  }), N(f), r(f);
5280
5301
  }
5281
5302
  };
@@ -5287,31 +5308,31 @@ function Ss({
5287
5308
  const f = async () => {
5288
5309
  try {
5289
5310
  d(!0);
5290
- let g = await Ze(R);
5291
- if (g) {
5292
- const k = q(g);
5311
+ let p = await Ze(I);
5312
+ if (p) {
5313
+ const k = q(p);
5293
5314
  N(k), r(k);
5294
5315
  } else
5295
5316
  $();
5296
- } catch (g) {
5297
- console.error("Error fetching configuration:", g);
5317
+ } catch (p) {
5318
+ console.error("Error fetching configuration:", p);
5298
5319
  let k = "Failed to load configuration";
5299
- if (g.response) {
5300
- const w = g.response.status, T = g.response.data?.message || g.response.data?.error;
5320
+ if (p.response) {
5321
+ const w = p.response.status, T = p.response.data?.message || p.response.data?.error;
5301
5322
  w === 400 ? k = T || "Invalid request. Please check the application ID." : w === 401 ? k = "You are not authorized to access this configuration." : w === 403 ? k = "Access denied. You don't have permission to view this configuration." : w === 404 ? k = "Configuration not found. It may not exist yet or the application ID is incorrect." : w >= 500 ? k = T || "Server error. Please try again later." : k = T || `Failed to load configuration (Error ${w})`;
5302
- } else g.request ? k = "Network error. Please check your connection and try again." : k = g.message || "An unexpected error occurred while loading configuration.";
5323
+ } else p.request ? k = "Network error. Please check your connection and try again." : k = p.message || "An unexpected error occurred while loading configuration.";
5303
5324
  qe.error(k), $();
5304
5325
  } finally {
5305
5326
  d(!1);
5306
5327
  }
5307
5328
  };
5308
- a && (u(a), t ? f() : $());
5309
- }, [a, j, t, s]);
5310
- const x = (f, g) => {
5311
- console.log(`[DynamicConfig] handleSectionChange called for ${f}:`, g), N((k) => {
5329
+ a && (h(a), t ? f() : $());
5330
+ }, [a, _, t, s]);
5331
+ const x = (f, p) => {
5332
+ console.log(`[DynamicConfig] handleSectionChange called for ${f}:`, p), N((k) => {
5312
5333
  const w = {
5313
5334
  ...k,
5314
- [f]: g
5335
+ [f]: p
5315
5336
  };
5316
5337
  return console.log("[DynamicConfig] Updated data state:", w), w;
5317
5338
  }), E((k) => {
@@ -5320,38 +5341,38 @@ function Ss({
5320
5341
  });
5321
5342
  }, b = () => {
5322
5343
  const f = {};
5323
- return !o || !h || o.configuration.forEach((g) => {
5324
- if (g.type === "section")
5325
- g.fields.forEach((k) => {
5326
- const w = h[g.key]?.[k.key];
5344
+ return !o || !u || o.configuration.forEach((p) => {
5345
+ if (p.type === "section")
5346
+ p.fields.forEach((k) => {
5347
+ const w = u[p.key]?.[k.key];
5327
5348
  if (k.required && (!w || typeof w == "string" && w.trim() === "")) {
5328
- f[g.key] || (f[g.key] = {}), f[g.key][k.key] = `${k.label} is required`;
5349
+ f[p.key] || (f[p.key] = {}), f[p.key][k.key] = `${k.label} is required`;
5329
5350
  return;
5330
5351
  }
5331
5352
  if (k.fieldtype === "number" && w !== "" && w !== null && w !== void 0) {
5332
5353
  const T = Number(w);
5333
- isNaN(T) ? (f[g.key] || (f[g.key] = {}), f[g.key][k.key] = `${k.label} must be a valid number`) : (k.min !== void 0 && T < k.min && (f[g.key] || (f[g.key] = {}), f[g.key][k.key] = `${k.label} must be at least ${k.min}`), k.max !== void 0 && T > k.max && (f[g.key] || (f[g.key] = {}), f[g.key][k.key] = `${k.label} must not exceed ${k.max}`));
5354
+ isNaN(T) ? (f[p.key] || (f[p.key] = {}), f[p.key][k.key] = `${k.label} must be a valid number`) : (k.min !== void 0 && T < k.min && (f[p.key] || (f[p.key] = {}), f[p.key][k.key] = `${k.label} must be at least ${k.min}`), k.max !== void 0 && T > k.max && (f[p.key] || (f[p.key] = {}), f[p.key][k.key] = `${k.label} must not exceed ${k.max}`));
5334
5355
  }
5335
5356
  });
5336
- else if (g.type === "datatable") {
5337
- const k = h[g.key];
5357
+ else if (p.type === "datatable") {
5358
+ const k = u[p.key];
5338
5359
  Array.isArray(k) && k.forEach((w, T) => {
5339
- g.fields.forEach((L) => {
5360
+ p.fields.forEach((L) => {
5340
5361
  const C = w[L.key];
5341
5362
  if (L.required && (!C || typeof C == "string" && C.trim() === "")) {
5342
- f[g.key] || (f[g.key] = {}), f[g.key][T] || (f[g.key][T] = {}), f[g.key][T][L.key] = `${L.label} is required`;
5363
+ f[p.key] || (f[p.key] = {}), f[p.key][T] || (f[p.key][T] = {}), f[p.key][T][L.key] = `${L.label} is required`;
5343
5364
  return;
5344
5365
  }
5345
5366
  if (L.fieldtype === "number" && C !== "" && C !== null && C !== void 0) {
5346
5367
  const M = Number(C);
5347
- isNaN(M) ? (f[g.key] || (f[g.key] = {}), f[g.key][T] || (f[g.key][T] = {}), f[g.key][T][L.key] = `${L.label} must be a valid number`) : (L.min !== void 0 && M < L.min && (f[g.key] || (f[g.key] = {}), f[g.key][T] || (f[g.key][T] = {}), f[g.key][T][L.key] = `${L.label} must be at least ${L.min}`), L.max !== void 0 && M > L.max && (f[g.key] || (f[g.key] = {}), f[g.key][T] || (f[g.key][T] = {}), f[g.key][T][L.key] = `${L.label} must not exceed ${L.max}`));
5368
+ isNaN(M) ? (f[p.key] || (f[p.key] = {}), f[p.key][T] || (f[p.key][T] = {}), f[p.key][T][L.key] = `${L.label} must be a valid number`) : (L.min !== void 0 && M < L.min && (f[p.key] || (f[p.key] = {}), f[p.key][T] || (f[p.key][T] = {}), f[p.key][T][L.key] = `${L.label} must be at least ${L.min}`), L.max !== void 0 && M > L.max && (f[p.key] || (f[p.key] = {}), f[p.key][T] || (f[p.key][T] = {}), f[p.key][T][L.key] = `${L.label} must not exceed ${L.max}`));
5348
5369
  }
5349
5370
  });
5350
5371
  });
5351
5372
  }
5352
5373
  }), f;
5353
5374
  }, S = (f) => Object.keys(f).length > 0, O = () => {
5354
- if (p) {
5375
+ if (g) {
5355
5376
  console.log("[handleSave] Already saving, ignoring duplicate call");
5356
5377
  return;
5357
5378
  }
@@ -5370,48 +5391,48 @@ function Ss({
5370
5391
  }
5371
5392
  (async () => {
5372
5393
  try {
5373
- z(!0);
5394
+ D(!0);
5374
5395
  const k = {};
5375
- h && Object.keys(h).forEach((T) => {
5396
+ u && Object.keys(u).forEach((T) => {
5376
5397
  const L = a?.configuration?.find(
5377
5398
  (C) => C.key === T && C.type === "datatable"
5378
5399
  );
5379
- L && Array.isArray(h[T]) ? k[T] = h[T].map((C) => {
5400
+ L && Array.isArray(u[T]) ? k[T] = u[T].map((C) => {
5380
5401
  const M = { id: C.id || 0 };
5381
- return L.fields && L.fields.forEach((_) => {
5382
- if (_.fieldtype === "audience") {
5402
+ return L.fields && L.fields.forEach((V) => {
5403
+ if (V.fieldtype === "audience") {
5383
5404
  let A = { users: [], groups: [], roles: [] };
5384
- C[_.key] && typeof C[_.key] == "object" && !Array.isArray(C[_.key]) && (A = {
5385
- users: C[_.key].users || [],
5386
- groups: C[_.key].groups || [],
5387
- roles: C[_.key].roles || []
5388
- }), M[_.key] = A;
5405
+ C[V.key] && typeof C[V.key] == "object" && !Array.isArray(C[V.key]) && (A = {
5406
+ users: C[V.key].users || [],
5407
+ groups: C[V.key].groups || [],
5408
+ roles: C[V.key].roles || []
5409
+ }), M[V.key] = A;
5389
5410
  } else
5390
- M[_.key] = C[_.key] || "";
5411
+ M[V.key] = C[V.key] || "";
5391
5412
  }), M;
5392
- }) : k[T] = h[T];
5413
+ }) : k[T] = u[T];
5393
5414
  }), (!k.appkey || k.appkey === "") && (k.appkey = t);
5394
5415
  let w = await xt(P, k);
5395
5416
  if (w && w.status != "fail") {
5396
- E({}), r(JSON.parse(JSON.stringify(h)));
5417
+ E({}), r(JSON.parse(JSON.stringify(u)));
5397
5418
  const T = w.message || "Configuration has been saved successfully";
5398
- qe.success(T), i && typeof i == "function" && i(h);
5419
+ qe.success(T), i && typeof i == "function" && i(u);
5399
5420
  } else
5400
5421
  throw qe.error(w?.message || "Failed to save configuration"), new Error("No response received from server");
5401
5422
  } catch (k) {
5402
5423
  console.error("Error saving configuration:", k), qe.error(k?.message || "Failed to save configuration");
5403
5424
  } finally {
5404
- z(!1);
5425
+ D(!1);
5405
5426
  }
5406
5427
  })();
5407
- }, I = () => {
5428
+ }, R = () => {
5408
5429
  console.log("[DynamicConfig] handleCancel called"), Y() ? (console.log("[DynamicConfig] Unsaved changes detected - showing modal"), l ? l() : console.warn("[DynamicConfig] onShowCancelModal not provided, cannot show modal")) : (console.log("[DynamicConfig] No unsaved changes - going back directly"), m ? m() : (console.log("[DynamicConfig] Using fallback window.history.back()"), window.history.back()));
5409
5430
  };
5410
5431
  if (!o?.configuration && !a?.configuration)
5411
5432
  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" }) });
5412
- const D = a?.configuration || o?.configuration;
5433
+ const z = a?.configuration || o?.configuration;
5413
5434
  return Z(() => {
5414
- s && a ? (!h || Object.keys(h).length === 0) && $() : s && !a && $();
5435
+ s && a ? (!u || Object.keys(u).length === 0) && $() : s && !a && $();
5415
5436
  }, [s, a]), /* @__PURE__ */ n("div", { children: [
5416
5437
  /* @__PURE__ */ n(
5417
5438
  "div",
@@ -5420,18 +5441,18 @@ function Ss({
5420
5441
  style: { padding: "0px 20px 0px 0px" },
5421
5442
  children: [
5422
5443
  v && /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-64", children: /* @__PURE__ */ e(ba, { size: "large" }) }),
5423
- !v && D?.map((f, g) => {
5444
+ !v && z?.map((f, p) => {
5424
5445
  const k = zs(f.type);
5425
5446
  if (k && k !== "UnknownType")
5426
5447
  return /* @__PURE__ */ e(
5427
5448
  k,
5428
5449
  {
5429
5450
  item: f,
5430
- data: h,
5451
+ data: u,
5431
5452
  updateHandler: x,
5432
5453
  validationErrors: F
5433
5454
  },
5434
- g
5455
+ p
5435
5456
  );
5436
5457
  })
5437
5458
  ]
@@ -5442,9 +5463,9 @@ function Ss({
5442
5463
  le,
5443
5464
  {
5444
5465
  category: "secondary",
5445
- onClick: I,
5466
+ onClick: R,
5446
5467
  label: "Cancel",
5447
- disabled: p,
5468
+ disabled: g,
5448
5469
  type: "button"
5449
5470
  }
5450
5471
  ),
@@ -5453,8 +5474,8 @@ function Ss({
5453
5474
  {
5454
5475
  category: "primary",
5455
5476
  onClick: O,
5456
- disabled: p,
5457
- label: p ? "Saving..." : "Save",
5477
+ disabled: g,
5478
+ label: g ? "Saving..." : "Save",
5458
5479
  type: "submit"
5459
5480
  }
5460
5481
  )
@@ -5467,29 +5488,29 @@ const Kl = ({
5467
5488
  disableApi: s = !1
5468
5489
  }) => {
5469
5490
  const [i, l] = B(0), [m, o] = B(!1), {
5470
- pageHeader: u = {},
5471
- appletHeader: h = {},
5491
+ pageHeader: h = {},
5492
+ appletHeader: u = {},
5472
5493
  breadcrumb: N = [],
5473
5494
  overview: y = {},
5474
5495
  configuration: r = []
5475
5496
  } = t, v = ae(() => r.map((b) => {
5476
5497
  if (b.type === "section" && b.fields) {
5477
- const S = [...b.fields], O = S.findIndex((I) => I && I.key === "appkey");
5498
+ const S = [...b.fields], O = S.findIndex((R) => R && R.key === "appkey");
5478
5499
  if (O !== -1) {
5479
- const I = S[O];
5500
+ const R = S[O];
5480
5501
  if (S[O] = {
5481
- ...I,
5502
+ ...R,
5482
5503
  default: a,
5483
5504
  value: a,
5484
5505
  readonly: !0,
5485
5506
  placeholder: a,
5486
5507
  disabled: !1
5487
5508
  }, S.some((f) => f.key === "displayname")) {
5488
- const f = S.findIndex((k) => k.key === "displayname"), g = S[f] || {};
5509
+ const f = S.findIndex((k) => k.key === "displayname"), p = S[f] || {};
5489
5510
  S[f] = {
5490
- ...g,
5491
- default: g.default || g.value || a,
5492
- placeholder: g.placeholder || "Enter display name"
5511
+ ...p,
5512
+ default: p.default || p.value || a,
5513
+ placeholder: p.placeholder || "Enter display name"
5493
5514
  };
5494
5515
  } else {
5495
5516
  const f = {
@@ -5515,25 +5536,25 @@ const Kl = ({
5515
5536
  subHeading: "View app details and customize configurations to align with institutional requirements.",
5516
5537
  isLeftArrow: !0,
5517
5538
  onBackClick: () => window.history.back(),
5518
- ...u
5519
- }, p = N.map((b) => ({
5539
+ ...h
5540
+ }, g = N.map((b) => ({
5520
5541
  label: b.text,
5521
5542
  href: b.href || "#"
5522
- })), z = ee(() => {
5543
+ })), D = ee(() => {
5523
5544
  o(!0);
5524
5545
  }, []), F = ee((b) => {
5525
5546
  o(!1), b.primary && window.history.back();
5526
5547
  }, []), E = ee((b) => {
5527
5548
  console.log("Configuration changed:", b);
5528
- }, []), R = ee(() => {
5549
+ }, []), I = ee(() => {
5529
5550
  window.history.back();
5530
5551
  }, []), P = (() => {
5531
- if (h.headingKey && Array.isArray(r)) {
5532
- const b = h.headingKey.split("."), S = b[0], O = b[1], I = r.find((D) => D && D.key === S);
5533
- if (I && I.fields) {
5534
- const D = I.fields.find((f) => f && f.key === O);
5535
- if (D)
5536
- return D.default ?? D.value ?? h.heading ?? a;
5552
+ if (u.headingKey && Array.isArray(r)) {
5553
+ const b = u.headingKey.split("."), S = b[0], O = b[1], R = r.find((z) => z && z.key === S);
5554
+ if (R && R.fields) {
5555
+ const z = R.fields.find((f) => f && f.key === O);
5556
+ if (z)
5557
+ return z.default ?? z.value ?? u.heading ?? a;
5537
5558
  }
5538
5559
  }
5539
5560
  if (Array.isArray(r)) {
@@ -5543,11 +5564,11 @@ const Kl = ({
5543
5564
  if (S) return S.default ?? S.value ?? a;
5544
5565
  }
5545
5566
  }
5546
- return h.heading || a;
5547
- })(), j = {
5567
+ return u.heading || a;
5568
+ })(), _ = {
5548
5569
  subHeading: "Application configuration and details",
5549
5570
  tags: [],
5550
- ...h,
5571
+ ...u,
5551
5572
  heading: P
5552
5573
  // Use resolvedDisplayName only
5553
5574
  }, U = {
@@ -5572,8 +5593,8 @@ const Kl = ({
5572
5593
  configuration: v
5573
5594
  }), [v]), q = ae(() => [
5574
5595
  { label: "Overview", content: x(U) },
5575
- { label: "Configuration", content: /* @__PURE__ */ e(Ss, { appid: a, configdata: Y, disableApi: s, onSave: E, onShowCancelModal: z, onCancel: R }) }
5576
- ], [a, Y, s, E, z, R, U]);
5596
+ { label: "Configuration", content: /* @__PURE__ */ e(Ss, { appid: a, configdata: Y, disableApi: s, onSave: E, onShowCancelModal: D, onCancel: I }) }
5597
+ ], [a, Y, s, E, D, I, U]);
5577
5598
  function $(b) {
5578
5599
  return b ? b.includes("<svg") ? /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: b } }) : b : "📱";
5579
5600
  }
@@ -5616,18 +5637,18 @@ const Kl = ({
5616
5637
  Un,
5617
5638
  {
5618
5639
  heading: d.heading,
5619
- subHeading: p.length > 0 ? void 0 : d.subHeading,
5620
- breadcrumbItems: p,
5640
+ subHeading: g.length > 0 ? void 0 : d.subHeading,
5641
+ breadcrumbItems: g,
5621
5642
  isLeftArrow: d.isLeftArrow,
5622
5643
  onBackClick: d.onBackClick
5623
5644
  }
5624
5645
  ),
5625
5646
  /* @__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: [
5626
- /* @__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: $(j.icon) }),
5647
+ /* @__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: $(_.icon) }),
5627
5648
  /* @__PURE__ */ n("div", { className: "flex flex-col min-w-0", children: [
5628
- /* @__PURE__ */ e("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children: j.heading }),
5629
- /* @__PURE__ */ e("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children: j.subHeading }),
5630
- /* @__PURE__ */ e("div", { className: "mt-2 flex flex-wrap gap-2", children: j.tags && j.tags.map((b, S) => /* @__PURE__ */ e(
5649
+ /* @__PURE__ */ e("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children: _.heading }),
5650
+ /* @__PURE__ */ e("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children: _.subHeading }),
5651
+ /* @__PURE__ */ e("div", { className: "mt-2 flex flex-wrap gap-2", children: _.tags && _.tags.map((b, S) => /* @__PURE__ */ e(
5631
5652
  "span",
5632
5653
  {
5633
5654
  className: "pill inline-block px-[10px] py-[6px] rounded-[14px] text-[11px] border border-[#e6e9ee] text-[#767676] font-semibold mt-1",
@@ -5670,16 +5691,16 @@ const Kl = ({
5670
5691
  allowEdit: l = !0,
5671
5692
  allowDelete: m = !0,
5672
5693
  allowReorder: o = !0,
5673
- initialData: u = null
5694
+ initialData: h = null
5674
5695
  }) => {
5675
- const [h, N] = B(null), [y, r] = B(""), [v, d] = B(() => Array.isArray(u) ? u : []), [p, z] = B(null), [F, E] = B(null), [R, P] = B("");
5696
+ const [u, N] = B(null), [y, r] = B(""), [v, d] = B(() => Array.isArray(h) ? h : []), [g, D] = B(null), [F, E] = B(null), [I, P] = B("");
5676
5697
  Z(() => {
5677
- Array.isArray(u) && d(u);
5678
- }, [u]);
5679
- const j = (g) => {
5680
- l && (N(g._id), r(g.categoryName || ""));
5698
+ Array.isArray(h) && d(h);
5699
+ }, [h]);
5700
+ const _ = (p) => {
5701
+ l && (N(p._id), r(p.categoryName || ""));
5681
5702
  }, U = () => {
5682
- if (!i || h !== null) return;
5703
+ if (!i || u !== null) return;
5683
5704
  const k = (v.length > 0 ? Math.max(...v.map((w) => typeof w._id == "number" ? w._id : 0)) : 0) + 1;
5684
5705
  d((w) => [
5685
5706
  ...w,
@@ -5693,54 +5714,54 @@ const Kl = ({
5693
5714
  }
5694
5715
  ]), N(k), r("");
5695
5716
  }, Y = () => {
5696
- h != null && (d((g) => {
5697
- const w = !Array.isArray(u) || !u.some((T) => T._id === h) ? g.filter((T) => T._id !== h) : g;
5717
+ u != null && (d((p) => {
5718
+ const w = !Array.isArray(h) || !h.some((T) => T._id === u) ? p.filter((T) => T._id !== u) : p;
5698
5719
  return a?.(w), w;
5699
5720
  }), N(null), r(""));
5700
5721
  }, q = () => {
5701
- h == null || !y.trim() || (d((g) => {
5702
- const k = g.map((w) => w._id === h ? {
5722
+ u == null || !y.trim() || (d((p) => {
5723
+ const k = p.map((w) => w._id === u ? {
5703
5724
  ...w,
5704
5725
  categoryName: y.trim()
5705
5726
  } : w);
5706
5727
  return a?.(k), k;
5707
5728
  }), N(null), r(""));
5708
- }, $ = (g) => {
5729
+ }, $ = (p) => {
5709
5730
  m && d((k) => {
5710
- const w = k.filter((T) => T._id !== g._id);
5731
+ const w = k.filter((T) => T._id !== p._id);
5711
5732
  return a?.(w), w;
5712
5733
  });
5713
- }, x = (g, k, w) => {
5734
+ }, x = (p, k, w) => {
5714
5735
  const T = Number(k), L = Number(w);
5715
- if (!o || T === L) return g;
5716
- const C = g.findIndex((G) => Number(G._id) === T), M = g.findIndex((G) => Number(G._id) === L);
5717
- if (C === -1 || M === -1) return g;
5718
- const _ = [...g], [A] = _.splice(C, 1);
5719
- return _.splice(M, 0, A), _.map((G, W) => ({ ...G, order: W + 1 }));
5720
- }, b = (g, k) => {
5721
- o && (g.dataTransfer.effectAllowed = "move", g.dataTransfer.setData("text/plain", String(k)), z(Number(k)));
5722
- }, S = (g) => {
5723
- p && g !== F && E(g);
5724
- }, O = (g) => {
5725
- g.preventDefault();
5726
- }, I = (g, k) => {
5727
- g.preventDefault();
5728
- const w = g.dataTransfer.getData("text/plain"), T = w === "0" ? 0 : Number(w), L = k === "0" ? 0 : Number(k);
5736
+ if (!o || T === L) return p;
5737
+ const C = p.findIndex((G) => Number(G._id) === T), M = p.findIndex((G) => Number(G._id) === L);
5738
+ if (C === -1 || M === -1) return p;
5739
+ const V = [...p], [A] = V.splice(C, 1);
5740
+ return V.splice(M, 0, A), V.map((G, W) => ({ ...G, order: W + 1 }));
5741
+ }, b = (p, k) => {
5742
+ o && (p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", String(k)), D(Number(k)));
5743
+ }, S = (p) => {
5744
+ g && p !== F && E(p);
5745
+ }, O = (p) => {
5746
+ p.preventDefault();
5747
+ }, R = (p, k) => {
5748
+ p.preventDefault();
5749
+ const w = p.dataTransfer.getData("text/plain"), T = w === "0" ? 0 : Number(w), L = k === "0" ? 0 : Number(k);
5729
5750
  T === void 0 || L === void 0 || (d((C) => {
5730
5751
  const M = x(C, T, L);
5731
5752
  return a?.(M), M;
5732
- }), z(null), E(null));
5733
- }, D = () => {
5734
- z(null), E(null);
5753
+ }), D(null), E(null));
5754
+ }, z = () => {
5755
+ D(null), E(null);
5735
5756
  }, f = Array.isArray(v) ? v.filter(
5736
- (g) => g.categoryName?.toLowerCase().includes(R.toLowerCase())
5757
+ (p) => p.categoryName?.toLowerCase().includes(I.toLowerCase())
5737
5758
  ) : [];
5738
5759
  return /* @__PURE__ */ n("div", { className: `manage-collection-list ${t}`, children: [
5739
5760
  /* @__PURE__ */ e("div", { className: "flex justify-end", children: /* @__PURE__ */ n("div", { className: "w-1/2 flex justify-end", children: [
5740
5761
  s && /* @__PURE__ */ e(
5741
5762
  ge,
5742
5763
  {
5743
- value: R,
5764
+ value: I,
5744
5765
  onDebouncedChange: P,
5745
5766
  placeholder: "Search Collection",
5746
5767
  customClass: "mr-4 searchmanagecollection"
@@ -5751,23 +5772,23 @@ const Kl = ({
5751
5772
  {
5752
5773
  className: [
5753
5774
  "px-4 py-3 bg-black text-white rounded-2xl ml-4",
5754
- h !== null ? "opacity-60 cursor-not-allowed" : "cursor-pointer"
5775
+ u !== null ? "opacity-60 cursor-not-allowed" : "cursor-pointer"
5755
5776
  ].join(" "),
5756
5777
  onClick: U,
5757
- disabled: h !== null,
5778
+ disabled: u !== null,
5758
5779
  children: "Add a Collection"
5759
5780
  }
5760
5781
  )
5761
5782
  ] }) }),
5762
- /* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: f.map((g) => {
5763
- const k = h === g._id, w = g?.links?.length ?? 0, T = p === g._id, L = F === g._id && p !== g._id;
5783
+ /* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: f.map((p) => {
5784
+ const k = u === p._id, w = p?.links?.length ?? 0, T = g === p._id, L = F === p._id && g !== p._id;
5764
5785
  return /* @__PURE__ */ e(
5765
5786
  "div",
5766
5787
  {
5767
- onDragEnter: () => S(g._id),
5788
+ onDragEnter: () => S(p._id),
5768
5789
  onDragOver: O,
5769
- onDrop: (C) => I(C, g._id),
5770
- onDragEnd: D,
5790
+ onDrop: (C) => R(C, p._id),
5791
+ onDragEnd: z,
5771
5792
  className: [
5772
5793
  "flex items-center justify-between p-3 border rounded-2xl mb-3",
5773
5794
  "border-gray-300",
@@ -5781,7 +5802,7 @@ const Kl = ({
5781
5802
  type: "text",
5782
5803
  className: "flex-1 h-10 px-3 max-w-[200px] border border-gray-300 rounded-2xl outline-none focus:ring-2 focus:ring-gray-800/20",
5783
5804
  value: y,
5784
- placeholder: !Array.isArray(u) || !u.some((C) => C._id === g._id) ? "New collection name" : "Edit collection name",
5805
+ placeholder: !Array.isArray(h) || !h.some((C) => C._id === p._id) ? "New collection name" : "Edit collection name",
5785
5806
  onChange: (C) => r(C.target.value),
5786
5807
  onKeyDown: (C) => {
5787
5808
  C.key === "Enter" && q(), C.key === "Escape" && Y();
@@ -5823,36 +5844,36 @@ const Kl = ({
5823
5844
  "aria-label": "Drag to reorder",
5824
5845
  className: "cursor-grab active:cursor-grabbing p-1 -m-1 rounded-md hover:bg-gray-50",
5825
5846
  draggable: !0,
5826
- onDragStart: (C) => b(C, g._id),
5847
+ onDragStart: (C) => b(C, p._id),
5827
5848
  children: /* @__PURE__ */ e(wt, {})
5828
5849
  }
5829
5850
  ),
5830
- /* @__PURE__ */ e("span", { children: g.categoryName })
5851
+ /* @__PURE__ */ e("span", { children: p.categoryName })
5831
5852
  ] }),
5832
5853
  /* @__PURE__ */ n("div", { className: "flex gap-2 items-center", children: [
5833
- g.protected ? /* @__PURE__ */ e("span", { className: "text-sm text-gray-600 cursor-default", children: g.qlAppName }) : /* @__PURE__ */ e("span", { className: "text-sm text-blue-600 cursor-default", children: `${w} ${w === 1 ? "link" : "links"}` }),
5854
+ p.protected ? /* @__PURE__ */ e("span", { className: "text-sm text-gray-600 cursor-default", children: p.qlAppName }) : /* @__PURE__ */ e("span", { className: "text-sm text-blue-600 cursor-default", children: `${w} ${w === 1 ? "link" : "links"}` }),
5834
5855
  l && /* @__PURE__ */ e(
5835
5856
  "button",
5836
5857
  {
5837
5858
  className: "cursor-pointer",
5838
- onClick: () => j(g),
5839
- "aria-label": `Edit ${g.categoryName}`,
5859
+ onClick: () => _(p),
5860
+ "aria-label": `Edit ${p.categoryName}`,
5840
5861
  children: /* @__PURE__ */ e(xr, { color: "#767676" })
5841
5862
  }
5842
5863
  ),
5843
5864
  m && /* @__PURE__ */ e(
5844
5865
  "span",
5845
5866
  {
5846
- className: w === 0 && !g.protected ? "cursor-pointer" : "cursor-not-allowed",
5847
- title: w === 0 && !g.protected ? "Delete" : "Cannot delete a collection with linked items",
5848
- onClick: w === 0 ? () => $(g) : null,
5867
+ className: w === 0 && !p.protected ? "cursor-pointer" : "cursor-not-allowed",
5868
+ title: w === 0 && !p.protected ? "Delete" : "Cannot delete a collection with linked items",
5869
+ onClick: w === 0 ? () => $(p) : null,
5849
5870
  children: /* @__PURE__ */ e(Le, { color: w === 0 ? "#767676" : "#C2C2C2" })
5850
5871
  }
5851
5872
  )
5852
5873
  ] })
5853
5874
  ] })
5854
5875
  },
5855
- g._id
5876
+ p._id
5856
5877
  );
5857
5878
  }) })
5858
5879
  ] });
@@ -5937,23 +5958,23 @@ const Bt = () => {
5937
5958
  // preferred
5938
5959
  onAdd: m,
5939
5960
  onFilterOpen: o,
5940
- addBtnText: u = "Add",
5961
+ addBtnText: h = "Add",
5941
5962
  // Feature toggles
5942
- showSearch: h = !0,
5963
+ showSearch: u = !0,
5943
5964
  showDelete: N = !0,
5944
5965
  showColumnChooser: y = !0,
5945
5966
  showFilter: r = !1,
5946
5967
  showPrint: v = !1,
5947
5968
  showExcel: d = !1,
5948
- showPdf: p = !1,
5949
- showRefresh: z = !1,
5969
+ showPdf: g = !1,
5970
+ showRefresh: D = !1,
5950
5971
  showAdd: F = !1,
5951
5972
  iSelectedRecords: E = 0,
5952
5973
  // Additional props
5953
- searchPlaceholder: R = "Search...",
5974
+ searchPlaceholder: I = "Search...",
5954
5975
  handleRefreshClick: P = () => {
5955
5976
  },
5956
- handleSearchChange: j = () => {
5977
+ handleSearchChange: _ = () => {
5957
5978
  },
5958
5979
  handleDeleteClick: U = () => {
5959
5980
  },
@@ -5964,7 +5985,7 @@ const Bt = () => {
5964
5985
  searchIconClass: x,
5965
5986
  inputStyle: b
5966
5987
  }) => {
5967
- const S = () => l?.current || i?.current, [O, I] = re.useState(""), D = (t || "export").toString().trim() || "export", f = `${Y || D}.xlsx`, g = `${q || D}.pdf`, k = (L, C, M) => Math.max(C, Math.min(L, M)), w = ee(
5988
+ const S = () => l?.current || i?.current, [O, R] = re.useState(""), z = (t || "export").toString().trim() || "export", f = `${Y || z}.xlsx`, p = `${q || z}.pdf`, k = (L, C, M) => Math.max(C, Math.min(L, M)), w = ee(
5968
5989
  (L) => {
5969
5990
  const C = S();
5970
5991
  if (C?.openColumnChooser) {
@@ -5973,8 +5994,8 @@ const Bt = () => {
5973
5994
  return;
5974
5995
  }
5975
5996
  try {
5976
- const M = L.currentTarget.getBoundingClientRect(), _ = M.left + window.scrollX, A = M.bottom + window.scrollY;
5977
- let G = _ - 120, W = A - 120;
5997
+ const M = L.currentTarget.getBoundingClientRect(), V = M.left + window.scrollX, A = M.bottom + window.scrollY;
5998
+ let G = V - 120, W = A - 120;
5978
5999
  const pe = window.innerWidth, Ne = window.innerHeight;
5979
6000
  G = k(G, window.scrollX + 8, window.scrollX + pe - 340), W = k(W, window.scrollY, window.scrollY + Ne - 120), C.openColumnChooser(G, W);
5980
6001
  } catch (M) {
@@ -5991,8 +6012,8 @@ const Bt = () => {
5991
6012
  switch (L) {
5992
6013
  case "Delete": {
5993
6014
  if (N) {
5994
- const _ = M.getSelectedRecords();
5995
- return U(_);
6015
+ const V = M.getSelectedRecords();
6016
+ return U(V);
5996
6017
  }
5997
6018
  break;
5998
6019
  }
@@ -6006,14 +6027,14 @@ const Bt = () => {
6006
6027
  d && M.excelExport?.({ fileName: f });
6007
6028
  break;
6008
6029
  case "Pdf":
6009
- p && M.pdfExport?.({ fileName: g });
6030
+ g && M.pdfExport?.({ fileName: p });
6010
6031
  break;
6011
6032
  case "Refresh":
6012
- z && P();
6033
+ D && P();
6013
6034
  break;
6014
6035
  }
6015
6036
  },
6016
- [y, v, d, p, z, f, g, P, w]
6037
+ [y, v, d, g, D, f, p, P, w]
6017
6038
  );
6018
6039
  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: [
6019
6040
  /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
@@ -6025,13 +6046,13 @@ const Bt = () => {
6025
6046
  a ? /* @__PURE__ */ e("div", { className: "text-sm text-gray-500", children: a }) : null
6026
6047
  ] }),
6027
6048
  /* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
6028
- h && /* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ e(
6049
+ u && /* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ e(
6029
6050
  ge,
6030
6051
  {
6031
- placeholder: R,
6052
+ placeholder: I,
6032
6053
  value: O,
6033
6054
  onDebouncedChange: (L) => {
6034
- I(L), j(L);
6055
+ R(L), _(L);
6035
6056
  },
6036
6057
  searchIconSize: $ || 16,
6037
6058
  searchIconClass: x || "",
@@ -6081,7 +6102,7 @@ const Bt = () => {
6081
6102
  ariaLabel: "Excel Download"
6082
6103
  }
6083
6104
  ),
6084
- p && /* @__PURE__ */ e(
6105
+ g && /* @__PURE__ */ e(
6085
6106
  Ce,
6086
6107
  {
6087
6108
  icon: Cr,
@@ -6089,7 +6110,7 @@ const Bt = () => {
6089
6110
  ariaLabel: "PDF Download"
6090
6111
  }
6091
6112
  ),
6092
- z && /* @__PURE__ */ e(
6113
+ D && /* @__PURE__ */ e(
6093
6114
  Ce,
6094
6115
  {
6095
6116
  icon: zr,
@@ -6101,12 +6122,12 @@ const Bt = () => {
6101
6122
  F && m && /* @__PURE__ */ e(
6102
6123
  le,
6103
6124
  {
6104
- label: u,
6125
+ label: h,
6105
6126
  icon: Sr,
6106
6127
  onClick: m,
6107
6128
  size: "small",
6108
6129
  ariaLabel: "Add New",
6109
- title: u
6130
+ title: h
6110
6131
  }
6111
6132
  )
6112
6133
  ] })
@@ -6122,20 +6143,20 @@ function ai(t) {
6122
6143
  // 1-based
6123
6144
  pageSize: m = 20,
6124
6145
  allowPaging: o = !0,
6125
- allowSorting: u = !0,
6126
- allowFiltering: h = !1,
6146
+ allowSorting: h = !0,
6147
+ allowFiltering: u = !1,
6127
6148
  allowGrouping: N = !1,
6128
6149
  allowReordering: y = !0,
6129
6150
  allowResizing: r = !0,
6130
6151
  allowExcelExport: v = !1,
6131
6152
  allowPdfExport: d = !1,
6132
- showColumnChooser: p = !1,
6133
- enableSearchApi: z = !1,
6153
+ showColumnChooser: g = !1,
6154
+ enableSearchApi: D = !1,
6134
6155
  height: F = "600",
6135
6156
  selectionSettings: E,
6136
- enableCheckbox: R = !1,
6157
+ enableCheckbox: I = !1,
6137
6158
  columns: P = [],
6138
- onGridStateChange: j,
6159
+ onGridStateChange: _,
6139
6160
  onRowSelected: U,
6140
6161
  onRowDeselected: Y,
6141
6162
  onRowDoubleClick: q,
@@ -6144,79 +6165,79 @@ function ai(t) {
6144
6165
  } = t, b = fe(null), {
6145
6166
  pageSettings: S,
6146
6167
  sortSettings: O,
6147
- ...I
6148
- } = x || {}, [D, f] = re.useState(S?.page || l), [g, k] = re.useState(S?.pageSize || m), [w, T] = re.useState(O?.sortKey || "updatedDate"), [L, C] = re.useState(O?.direction || "Descending"), M = ae(() => {
6149
- const V = E || {
6168
+ ...R
6169
+ } = x || {}, [z, f] = re.useState(S?.page || l), [p, k] = re.useState(S?.pageSize || m), [w, T] = re.useState(O?.sortKey || "updatedDate"), [L, C] = re.useState(O?.direction || "Descending"), M = ae(() => {
6170
+ const j = E || {
6150
6171
  type: "Multiple",
6151
6172
  mode: "Row"
6152
6173
  };
6153
- return R ? {
6154
- ...V,
6174
+ return I ? {
6175
+ ...j,
6155
6176
  // These are important for checkbox selection
6156
6177
  enableToggle: !0,
6157
6178
  persistSelection: !0,
6158
6179
  // Enable checkbox specific settings
6159
6180
  checkboxOnly: !1,
6160
6181
  enableSimpleMultiRowSelection: !0
6161
- } : V;
6162
- }, [E, R]), _ = ae(() => {
6163
- const V = [ln];
6164
- return (R || E) && V.push(on), u && V.push(cn), h && V.push(dn), N && V.push(mn), z && V.push(un), v && V.push(hn), d && V.push(pn), p && V.push(gn), r && V.push(bn), y && V.push(fn), V.push(yn), V;
6182
+ } : j;
6183
+ }, [E, I]), V = ae(() => {
6184
+ const j = [ln];
6185
+ return (I || E) && j.push(on), h && j.push(cn), u && j.push(dn), N && j.push(mn), D && j.push(un), v && j.push(hn), d && j.push(pn), g && j.push(gn), r && j.push(bn), y && j.push(fn), j.push(yn), j;
6165
6186
  }, [
6166
- u,
6167
6187
  h,
6188
+ u,
6168
6189
  N,
6169
- z,
6190
+ D,
6170
6191
  v,
6171
6192
  d,
6172
- p,
6193
+ g,
6173
6194
  r,
6174
6195
  y,
6175
- R,
6196
+ I,
6176
6197
  E
6177
6198
  ]), A = ae(() => {
6178
- const V = () => b.current, ne = (J, ce) => {
6199
+ const j = () => b.current, ne = (J, ce) => {
6179
6200
  !ce && process.env.NODE_ENV !== "production" && console.warn(`[CustomDataGrid] ${J} requested but related service/feature is disabled.`);
6180
6201
  };
6181
6202
  return {
6182
- getInstance: () => V(),
6183
- refresh: () => V()?.refresh?.(),
6184
- getSelectedRecords: () => V()?.getSelectedRecords?.() ?? [],
6185
- clearSelection: () => V()?.clearSelection?.(),
6186
- selectRow: (J, ce = !1) => V()?.selectRow?.(J, ce),
6187
- selectRows: (J, ce = !1) => V()?.selectRows?.(J, ce),
6203
+ getInstance: () => j(),
6204
+ refresh: () => j()?.refresh?.(),
6205
+ getSelectedRecords: () => j()?.getSelectedRecords?.() ?? [],
6206
+ clearSelection: () => j()?.clearSelection?.(),
6207
+ selectRow: (J, ce = !1) => j()?.selectRow?.(J, ce),
6208
+ selectRows: (J, ce = !1) => j()?.selectRows?.(J, ce),
6188
6209
  search: (J) => {
6189
- ne("search()", z), V()?.search?.(J);
6210
+ ne("search()", D), j()?.search?.(J);
6190
6211
  },
6191
- print: () => V()?.print?.(),
6212
+ print: () => j()?.print?.(),
6192
6213
  excelExport: (J) => {
6193
- ne("excelExport()", v), V()?.excelExport?.(J);
6214
+ ne("excelExport()", v), j()?.excelExport?.(J);
6194
6215
  },
6195
6216
  pdfExport: (J) => {
6196
- ne("pdfExport()", d), V()?.pdfExport?.(J);
6217
+ ne("pdfExport()", d), j()?.pdfExport?.(J);
6197
6218
  },
6198
6219
  openColumnChooser: (J, ce) => {
6199
- ne("openColumnChooser()", p), V()?.columnChooserModule?.openColumnChooser?.(J, ce);
6220
+ ne("openColumnChooser()", g), j()?.columnChooserModule?.openColumnChooser?.(J, ce);
6200
6221
  },
6201
6222
  // Additional useful methods
6202
- getColumns: () => V()?.getColumns?.(),
6203
- getFilteredRecords: () => V()?.getFilteredRecords?.(),
6204
- autoFitColumns: (J) => V()?.autoFitColumns?.(J)
6223
+ getColumns: () => j()?.getColumns?.(),
6224
+ getFilteredRecords: () => j()?.getFilteredRecords?.(),
6225
+ autoFitColumns: (J) => j()?.autoFitColumns?.(J)
6205
6226
  };
6206
- }, [z, v, d, p]);
6227
+ }, [D, v, d, g]);
6207
6228
  Z(() => {
6208
6229
  $ && ($.current = A);
6209
6230
  }, [$, A]), Z(() => () => {
6210
6231
  $ && ($.current = null);
6211
6232
  }, [$]);
6212
- const G = (V) => {
6213
- const ne = String(V || "");
6233
+ const G = (j) => {
6234
+ const ne = String(j || "");
6214
6235
  return ne === "Ascending" || ne === "Descending" ? ne : ne.toLowerCase() === "ascending" ? "Ascending" : "Descending";
6215
- }, W = (V) => {
6216
- const ne = b.current, J = V?.requestType, ce = J === "paging" ? "paging" : J === "sorting" ? "sorting" : J === "searching" ? "searching" : J === "filtering" ? "filtering" : J === "grouping" ? "grouping" : J === "reorder" ? "reorder" : J === "columnstate" ? "columnstate" : "other", Re = V?.pageSize ?? ne?.pageSettings?.pageSize ?? g, _e = V?.currentPage ?? ne?.pageSettings?.currentPage ?? l, rt = V?.columnName && V?.direction ? [{ field: V.columnName, dir: G(V.direction) }] : (ne?.sortSettings?.columns || []).map((Ie) => ({
6236
+ }, W = (j) => {
6237
+ const ne = b.current, J = j?.requestType, ce = J === "paging" ? "paging" : J === "sorting" ? "sorting" : J === "searching" ? "searching" : J === "filtering" ? "filtering" : J === "grouping" ? "grouping" : J === "reorder" ? "reorder" : J === "columnstate" ? "columnstate" : "other", Re = j?.pageSize ?? ne?.pageSettings?.pageSize ?? p, _e = j?.currentPage ?? ne?.pageSettings?.currentPage ?? l, rt = j?.columnName && j?.direction ? [{ field: j.columnName, dir: G(j.direction) }] : (ne?.sortSettings?.columns || []).map((Ie) => ({
6217
6238
  field: Ie.field,
6218
6239
  dir: G(Ie.direction ?? Ie.dir)
6219
- })), nt = V?.searchString ?? "", st = V?.columns ?? ne?.filterSettings?.columns ?? [];
6240
+ })), nt = j?.searchString ?? "", st = j?.columns ?? ne?.filterSettings?.columns ?? [];
6220
6241
  return {
6221
6242
  reason: ce,
6222
6243
  page: {
@@ -6228,17 +6249,17 @@ function ai(t) {
6228
6249
  sort: rt,
6229
6250
  search: nt,
6230
6251
  filters: st,
6231
- rawEvent: V
6252
+ rawEvent: j
6232
6253
  };
6233
- }, pe = (V) => {
6254
+ }, pe = (j) => {
6234
6255
  setTimeout(() => {
6235
6256
  b?.current?.hideSpinner();
6236
- }, 1e3), V.requestType === "paging" && (f(V.currentPage), k(V.pageSize)), V.requestType === "sorting" && (T(V.columnName || "updatedDate"), C(V.direction)), j?.(W(V), V);
6237
- }, Ne = (V) => {
6238
- q?.(V?.rowData, V);
6257
+ }, 1e3), j.requestType === "paging" && (f(j.currentPage), k(j.pageSize)), j.requestType === "sorting" && (T(j.columnName || "updatedDate"), C(j.direction)), _?.(W(j), j);
6258
+ }, Ne = (j) => {
6259
+ q?.(j?.rowData, j);
6239
6260
  }, Ta = () => {
6240
- const V = [];
6241
- return R && V.push(
6261
+ const j = [];
6262
+ return I && j.push(
6242
6263
  /* @__PURE__ */ e(
6243
6264
  $t,
6244
6265
  {
@@ -6270,7 +6291,7 @@ function ai(t) {
6270
6291
  customAttributes: Ba,
6271
6292
  ...Va
6272
6293
  } = ne || {};
6273
- V.push(
6294
+ j.push(
6274
6295
  /* @__PURE__ */ e(
6275
6296
  $t,
6276
6297
  {
@@ -6294,13 +6315,13 @@ function ai(t) {
6294
6315
  ce || `col-${J}`
6295
6316
  )
6296
6317
  );
6297
- }), V;
6318
+ }), j;
6298
6319
  }, Aa = ae(() => ({
6299
- currentPage: D,
6300
- pageSize: g,
6320
+ currentPage: z,
6321
+ pageSize: p,
6301
6322
  pageSizes: S?.pageSizes ?? [10, 20, 40, 60, 80, 100],
6302
6323
  totalCount: s
6303
- }), [D, g, S?.pageSizes, s]), Fa = ae(() => O ?? {
6324
+ }), [z, p, S?.pageSizes, s]), Fa = ae(() => O ?? {
6304
6325
  columns: [{ field: w, direction: G(L) }],
6305
6326
  allowUnsort: !1
6306
6327
  }, [O, w, L]);
@@ -6315,12 +6336,12 @@ function ai(t) {
6315
6336
  },
6316
6337
  height: F,
6317
6338
  allowPaging: o,
6318
- allowSorting: u,
6319
- allowFiltering: h,
6339
+ allowSorting: h,
6340
+ allowFiltering: u,
6320
6341
  allowGrouping: N,
6321
6342
  allowReordering: y,
6322
6343
  allowResizing: r,
6323
- showColumnChooser: p,
6344
+ showColumnChooser: g,
6324
6345
  selectionSettings: M,
6325
6346
  pageSettings: Aa,
6326
6347
  sortSettings: Fa,
@@ -6329,10 +6350,10 @@ function ai(t) {
6329
6350
  rowDeselected: Y,
6330
6351
  recordDoubleClick: Ne,
6331
6352
  cssClass: "custom-grid-padding",
6332
- ...I,
6353
+ ...R,
6333
6354
  children: [
6334
6355
  /* @__PURE__ */ e(vn, { children: Ta() }),
6335
- /* @__PURE__ */ e(Nn, { services: _ })
6356
+ /* @__PURE__ */ e(Nn, { services: V })
6336
6357
  ]
6337
6358
  }
6338
6359
  );
@@ -6369,14 +6390,14 @@ function oe({
6369
6390
  onSelect: l,
6370
6391
  identity: m = "_id",
6371
6392
  details: o = {},
6372
- ...u
6393
+ ...h
6373
6394
  }) {
6374
- const h = He(), N = $s(u, m), y = (v) => {
6395
+ const u = He(), N = $s(h, m), y = (v) => {
6375
6396
  l?.({
6376
6397
  key: N,
6377
6398
  checked: v.target.checked,
6378
6399
  details: o,
6379
- props: u
6400
+ props: h
6380
6401
  });
6381
6402
  }, r = i === "top-right" ? "top-3 right-3" : "top-3 left-3";
6382
6403
  return /* @__PURE__ */ n(
@@ -6388,7 +6409,7 @@ function oe({
6388
6409
  s && /* @__PURE__ */ e("div", { className: `absolute ${r} z-10`, children: /* @__PURE__ */ e(
6389
6410
  "input",
6390
6411
  {
6391
- id: h,
6412
+ id: u,
6392
6413
  type: "checkbox",
6393
6414
  className: "h-4 w-4 rounded border-zinc-300 focus:ring-[var(--primaryColor)]",
6394
6415
  onChange: y,
@@ -6416,38 +6437,38 @@ function Ts({
6416
6437
  // content
6417
6438
  title: m = "Activity",
6418
6439
  group: o = "Global",
6419
- moreGroupsLabel: u = "+ 5 more",
6420
- author: h = "Judith Black",
6440
+ moreGroupsLabel: h = "+ 5 more",
6441
+ author: u = "Judith Black",
6421
6442
  timeLabel: N = "Just now",
6422
6443
  imageUrl: y = "https://images.unsplash.com/photo-1469980098053-382eb10ba017?q=80&w=1200&auto=format&fit=crop",
6423
6444
  description: r = "Columbia University is a prestigious Ivy League institution located in the heart of New York City.",
6424
6445
  // spread remaining props (_id, instanceId, etc.)
6425
6446
  ...v
6426
6447
  }) {
6427
- const d = de(t), p = me[d];
6448
+ const d = de(t), g = me[d];
6428
6449
  return /* @__PURE__ */ n(
6429
6450
  oe,
6430
6451
  {
6431
- className: `flex flex-col ${p.card}`,
6452
+ className: `flex flex-col ${g.card}`,
6432
6453
  showCheckbox: a,
6433
6454
  checkboxPosition: s,
6434
6455
  onSelect: i,
6435
6456
  identity: l,
6436
- details: { type: "activity", title: m, group: o, author: h },
6457
+ details: { type: "activity", title: m, group: o, author: u },
6437
6458
  ...v,
6438
6459
  children: [
6439
- /* @__PURE__ */ e("div", { className: "flex items-start justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${p.title} ml-3`, children: m }) }),
6440
- /* @__PURE__ */ n("div", { className: `text-zinc-500 dark:text-zinc-400 ${p.meta}`, children: [
6460
+ /* @__PURE__ */ e("div", { className: "flex items-start justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${g.title} ml-3`, children: m }) }),
6461
+ /* @__PURE__ */ n("div", { className: `text-zinc-500 dark:text-zinc-400 ${g.meta}`, children: [
6441
6462
  "Posted in ",
6442
6463
  /* @__PURE__ */ e("span", { className: "font-medium", children: "Global" }),
6443
- u ? /* @__PURE__ */ n(te, { children: [
6464
+ h ? /* @__PURE__ */ n(te, { children: [
6444
6465
  ",",
6445
6466
  " ",
6446
6467
  /* @__PURE__ */ e(
6447
6468
  "span",
6448
6469
  {
6449
6470
  className: "font-medium text-indigo-700",
6450
- children: u
6471
+ children: h
6451
6472
  }
6452
6473
  )
6453
6474
  ] }) : null,
@@ -6457,8 +6478,8 @@ function Ts({
6457
6478
  /* @__PURE__ */ n("div", { className: "mt-2 flex items-center gap-3", children: [
6458
6479
  /* @__PURE__ */ e(we, { name: "John", size: "medium" }),
6459
6480
  /* @__PURE__ */ n("div", { className: "leading-tight", children: [
6460
- /* @__PURE__ */ e("div", { className: "text-sm font-medium text-zinc-800 dark:text-zinc-100", children: h }),
6461
- /* @__PURE__ */ e("div", { className: `text-zinc-500 dark:text-zinc-400 ${p.meta}`, children: N })
6481
+ /* @__PURE__ */ e("div", { className: "text-sm font-medium text-zinc-800 dark:text-zinc-100", children: u }),
6482
+ /* @__PURE__ */ e("div", { className: `text-zinc-500 dark:text-zinc-400 ${g.meta}`, children: N })
6462
6483
  ] })
6463
6484
  ] }),
6464
6485
  /* @__PURE__ */ n("p", { className: "mt-2 text-zinc-700 dark:text-zinc-300", children: [
@@ -6475,7 +6496,7 @@ function Ts({
6475
6496
  /* @__PURE__ */ e(
6476
6497
  "div",
6477
6498
  {
6478
- className: `mt-3 overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800 ${p.media}`,
6499
+ className: `mt-3 overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800 ${g.media}`,
6479
6500
  children: /* @__PURE__ */ e("img", { src: y, alt: "", className: "h-full w-full object-cover" })
6480
6501
  }
6481
6502
  ),
@@ -6539,9 +6560,9 @@ function Is({
6539
6560
  title: m = "Communities",
6540
6561
  activeTab: o = "joined",
6541
6562
  // "joined" | "suggested"
6542
- items: u = Es,
6563
+ items: h = Es,
6543
6564
  // spread for identity (_id/instanceId/etc)
6544
- ...h
6565
+ ...u
6545
6566
  }) {
6546
6567
  const N = de(t), y = me[N], r = Rs[N], v = (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"}`;
6547
6568
  return /* @__PURE__ */ n(
@@ -6552,8 +6573,8 @@ function Is({
6552
6573
  checkboxPosition: s,
6553
6574
  onSelect: i,
6554
6575
  identity: l,
6555
- details: { type: "communities", title: m, activeTab: o, count: u?.length ?? 0 },
6556
- ...h,
6576
+ details: { type: "communities", title: m, activeTab: o, count: h?.length ?? 0 },
6577
+ ...u,
6557
6578
  children: [
6558
6579
  /* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
6559
6580
  /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${y.title}`, children: m }),
@@ -6582,7 +6603,7 @@ function Is({
6582
6603
  }
6583
6604
  )
6584
6605
  ] }),
6585
- /* @__PURE__ */ e("div", { className: "grid gap-4 md:gap-5", children: u.map((d) => /* @__PURE__ */ e(
6606
+ /* @__PURE__ */ e("div", { className: "grid gap-4 md:gap-5", children: h.map((d) => /* @__PURE__ */ e(
6586
6607
  "div",
6587
6608
  {
6588
6609
  className: "rounded-2xl border border-zinc-200 dark:border-zinc-800 p-3 md:p-4",
@@ -6725,9 +6746,9 @@ function Ms({
6725
6746
  title: m = "News",
6726
6747
  items: o = Os,
6727
6748
  // spread for identity fields: _id / id / instanceId etc.
6728
- ...u
6749
+ ...h
6729
6750
  }) {
6730
- const h = de(t), N = me[h], y = Ps[h];
6751
+ const u = de(t), N = me[u], y = Ps[u];
6731
6752
  return /* @__PURE__ */ n(
6732
6753
  oe,
6733
6754
  {
@@ -6737,13 +6758,13 @@ function Ms({
6737
6758
  onSelect: i,
6738
6759
  identity: l,
6739
6760
  details: { type: "news", title: m, count: o?.length ?? 0 },
6740
- ...u,
6761
+ ...h,
6741
6762
  children: [
6742
6763
  /* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
6743
6764
  /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${N.title}`, children: m }),
6744
6765
  /* @__PURE__ */ e("span", { className: "text-sm text-indigo-700 cursor-default select-none", children: "View All" })
6745
6766
  ] }),
6746
- h === "lg" ? (
6767
+ u === "lg" ? (
6747
6768
  // Large: 3-up grid of image cards
6748
6769
  /* @__PURE__ */ e("div", { className: `mt-4 ${y.grid}`, children: o.slice(0, 3).map((r) => /* @__PURE__ */ n("article", { children: [
6749
6770
  /* @__PURE__ */ e("img", { src: r.thumb, alt: "", className: y.cardImg }),
@@ -6840,8 +6861,8 @@ function _s({
6840
6861
  identity: l = "_id",
6841
6862
  title: m = "Campus Map",
6842
6863
  campusName: o = "Morningside Heights Campus",
6843
- filters: u = Ls,
6844
- activeFilter: h = "All",
6864
+ filters: h = Ls,
6865
+ activeFilter: u = "All",
6845
6866
  // NEW: iframe controls
6846
6867
  mapQuery: N = "Florida",
6847
6868
  zoom: y = 12,
@@ -6849,18 +6870,18 @@ function _s({
6849
6870
  // optional full embed URL override
6850
6871
  ...v
6851
6872
  }) {
6852
- const d = de(t), p = me[d], z = Bs[d], F = r || js(N, y);
6873
+ const d = de(t), g = me[d], D = Bs[d], F = r || js(N, y);
6853
6874
  return /* @__PURE__ */ e(
6854
6875
  oe,
6855
6876
  {
6856
- className: `flex flex-col ${p.card} ${z.wrap}`,
6877
+ className: `flex flex-col ${g.card} ${D.wrap}`,
6857
6878
  showCheckbox: a,
6858
6879
  checkboxPosition: s,
6859
6880
  onSelect: i,
6860
6881
  identity: l,
6861
- details: { type: "campus-map", title: m, campusName: o, activeFilter: h, mapQuery: N, zoom: y },
6882
+ details: { type: "campus-map", title: m, campusName: o, activeFilter: u, mapQuery: N, zoom: y },
6862
6883
  ...v,
6863
- children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${z.mapH}`, children: [
6884
+ children: /* @__PURE__ */ n("div", { className: `relative mt-3 overflow-hidden rounded-2xl border border-zinc-200 dark:border-zinc-800 ${D.mapH}`, children: [
6864
6885
  /* @__PURE__ */ e(
6865
6886
  "iframe",
6866
6887
  {
@@ -6874,7 +6895,7 @@ function _s({
6874
6895
  }
6875
6896
  ),
6876
6897
  /* @__PURE__ */ n("div", { className: "absolute left-4 right-4 top-3 flex items-center justify-between pointer-events-none", children: [
6877
- /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 ${z.campusPill}`, children: [
6898
+ /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 ${D.campusPill}`, children: [
6878
6899
  /* @__PURE__ */ e("span", { className: "truncate max-w-[60vw]", children: o }),
6879
6900
  /* @__PURE__ */ e("span", { className: "ml-2 text-zinc-400", children: "▾" })
6880
6901
  ] }),
@@ -6883,8 +6904,8 @@ function _s({
6883
6904
  /* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-full bg-white/90 border border-zinc-300 flex items-center justify-center", children: "›" })
6884
6905
  ] })
6885
6906
  ] }),
6886
- /* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-14 md:top-12 pointer-events-none mt-2", children: /* @__PURE__ */ e("div", { className: `flex ${z.chipGap} overflow-x-auto scrollbar-none`, children: u.map((E) => /* @__PURE__ */ e(Vs, { label: E, active: E === h, size: d }, E)) }) }),
6887
- /* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-28 md:top-24 pointer-events-none", children: /* @__PURE__ */ n("div", { className: `flex items-center rounded-full bg-white dark:bg-zinc-900 shadow border border-zinc-200 dark:border-zinc-700 px-4 ${z.searchH}`, children: [
6907
+ /* @__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 ${D.chipGap} overflow-x-auto scrollbar-none`, children: h.map((E) => /* @__PURE__ */ e(Vs, { label: E, active: E === u, size: d }, E)) }) }),
6908
+ /* @__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 ${D.searchH}`, children: [
6888
6909
  /* @__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" }) }),
6889
6910
  /* @__PURE__ */ e("span", { className: "ml-2 text-zinc-500 dark:text-zinc-400", children: "Search places" })
6890
6911
  ] }) })
@@ -7052,11 +7073,11 @@ function Ws({
7052
7073
  identity: l = "_id",
7053
7074
  title: m = "Upcoming Events",
7054
7075
  events: o = Us,
7055
- selectedIndex: u = 0,
7056
- ...h
7076
+ selectedIndex: h = 0,
7077
+ ...u
7057
7078
  }) {
7058
- const [N, y] = B(u), r = de(t), v = me[r], d = Gs[r], p = o[N] || o[0], z = (E, R) => {
7059
- y(R), i?.(E);
7079
+ const [N, y] = B(h), r = de(t), v = me[r], d = Gs[r], g = o[N] || o[0], D = (E, I) => {
7080
+ y(I), i?.(E);
7060
7081
  }, F = r === "lg";
7061
7082
  return /* @__PURE__ */ n(
7062
7083
  oe,
@@ -7067,7 +7088,7 @@ function Ws({
7067
7088
  onSelect: i,
7068
7089
  identity: l,
7069
7090
  details: { type: "events", title: m, count: o?.length ?? 0 },
7070
- ...h,
7091
+ ...u,
7071
7092
  children: [
7072
7093
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between mb-4", children: [
7073
7094
  /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${v.title}`, children: m }),
@@ -7076,29 +7097,29 @@ function Ws({
7076
7097
  F ? (
7077
7098
  // Large: Two-column layout
7078
7099
  /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
7079
- /* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((E, R) => /* @__PURE__ */ e(
7100
+ /* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((E, I) => /* @__PURE__ */ e(
7080
7101
  _t,
7081
7102
  {
7082
7103
  ev: E,
7083
7104
  sizeMeta: d,
7084
- isSelected: R === N,
7085
- onClick: (P) => z(P, R)
7105
+ isSelected: I === N,
7106
+ onClick: (P) => D(P, I)
7086
7107
  },
7087
- E._id || E.id || R
7108
+ E._id || E.id || I
7088
7109
  )) }),
7089
- /* @__PURE__ */ e(Ys, { ev: p, sizeMeta: d })
7110
+ /* @__PURE__ */ e(Ys, { ev: g, sizeMeta: d })
7090
7111
  ] })
7091
7112
  ) : (
7092
7113
  // Small/Medium: Simple list only
7093
- /* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((E, R) => /* @__PURE__ */ e(
7114
+ /* @__PURE__ */ e("div", { className: "space-y-1", children: o.map((E, I) => /* @__PURE__ */ e(
7094
7115
  _t,
7095
7116
  {
7096
7117
  ev: E,
7097
7118
  sizeMeta: d,
7098
- isSelected: R === N,
7099
- onClick: (P) => z(P, R)
7119
+ isSelected: I === N,
7120
+ onClick: (P) => D(P, I)
7100
7121
  },
7101
- E._id || E.id || R
7122
+ E._id || E.id || I
7102
7123
  )) })
7103
7124
  ),
7104
7125
  !F && /* @__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" }) })
@@ -7211,10 +7232,10 @@ const Js = [
7211
7232
  }
7212
7233
  };
7213
7234
  function Hs({ email: t, sizeMeta: a, isSelected: s, onClick: i, onStar: l, onPin: m }) {
7214
- const o = (h) => {
7215
- h.stopPropagation(), l?.(t);
7216
- }, u = (h) => {
7217
- h.stopPropagation(), m?.(t);
7235
+ const o = (u) => {
7236
+ u.stopPropagation(), l?.(t);
7237
+ }, h = (u) => {
7238
+ u.stopPropagation(), m?.(t);
7218
7239
  };
7219
7240
  return /* @__PURE__ */ n(
7220
7241
  "div",
@@ -7234,7 +7255,7 @@ function Hs({ email: t, sizeMeta: a, isSelected: s, onClick: i, onStar: l, onPin
7234
7255
  /* @__PURE__ */ e(
7235
7256
  "button",
7236
7257
  {
7237
- onClick: u,
7258
+ onClick: h,
7238
7259
  className: "p-1 rounded hover:bg-zinc-200 dark:hover:bg-zinc-700 transition-colors duration-200",
7239
7260
  children: t.pinned ? /* @__PURE__ */ e(Ar, { className: "h-4 w-4 fill-blue-500 text-blue-500" }) : /* @__PURE__ */ e(Fr, { className: "h-4 w-4 text-zinc-400 group-hover:text-blue-500" })
7240
7261
  }
@@ -7267,24 +7288,24 @@ function Qs({
7267
7288
  identity: l = "_id",
7268
7289
  title: m = "0365 Mails",
7269
7290
  emails: o = Js,
7270
- selectedIndex: u = 0,
7271
- onStar: h,
7291
+ selectedIndex: h = 0,
7292
+ onStar: u,
7272
7293
  onPin: N,
7273
7294
  ...y
7274
7295
  }) {
7275
- const [r, v] = B(u), d = de(t), p = me[d], z = Xs[d], F = (P, j) => {
7276
- v(j), i?.(P);
7296
+ const [r, v] = B(h), d = de(t), g = me[d], D = Xs[d], F = (P, _) => {
7297
+ v(_), i?.(P);
7277
7298
  }, E = (P) => {
7278
- const j = { ...P, starred: !P.starred };
7279
- h?.(j);
7280
- }, R = (P) => {
7281
- const j = { ...P, pinned: !P.pinned };
7282
- N?.(j);
7299
+ const _ = { ...P, starred: !P.starred };
7300
+ u?.(_);
7301
+ }, I = (P) => {
7302
+ const _ = { ...P, pinned: !P.pinned };
7303
+ N?.(_);
7283
7304
  };
7284
7305
  return /* @__PURE__ */ n(
7285
7306
  oe,
7286
7307
  {
7287
- className: `flex flex-col ${p.card} ${z.wrap}`,
7308
+ className: `flex flex-col ${g.card} ${D.wrap}`,
7288
7309
  showCheckbox: a,
7289
7310
  checkboxPosition: s,
7290
7311
  onSelect: i,
@@ -7292,19 +7313,19 @@ function Qs({
7292
7313
  details: { type: "emails", title: m, count: o?.length ?? 0 },
7293
7314
  ...y,
7294
7315
  children: [
7295
- /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${p.title}`, children: m }) }),
7316
+ /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${g.title}`, children: m }) }),
7296
7317
  /* @__PURE__ */ e(ge, { placeholder: "Type to search..." }),
7297
- /* @__PURE__ */ e("div", { className: "space-y-0", children: o.map((P, j) => /* @__PURE__ */ e(
7318
+ /* @__PURE__ */ e("div", { className: "space-y-0", children: o.map((P, _) => /* @__PURE__ */ e(
7298
7319
  Hs,
7299
7320
  {
7300
7321
  email: P,
7301
- sizeMeta: z,
7302
- isSelected: j === r,
7303
- onClick: (U) => F(U, j),
7322
+ sizeMeta: D,
7323
+ isSelected: _ === r,
7324
+ onClick: (U) => F(U, _),
7304
7325
  onStar: E,
7305
- onPin: R
7326
+ onPin: I
7306
7327
  },
7307
- P._id || P.id || j
7328
+ P._id || P.id || _
7308
7329
  )) }),
7309
7330
  /* @__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" }) })
7310
7331
  ]
@@ -7521,12 +7542,12 @@ function al({
7521
7542
  identity: l = "_id",
7522
7543
  title: m = "Directory",
7523
7544
  contacts: o = Zs,
7524
- selectedIndex: u = 0,
7525
- ...h
7545
+ selectedIndex: h = 0,
7546
+ ...u
7526
7547
  }) {
7527
- const [N, y] = B(u), r = de(t), v = me[r], d = Ks[r], p = (E, R) => {
7528
- y(R), i?.(E);
7529
- }, z = o[N] || o[0], F = d.layout === "split";
7548
+ const [N, y] = B(h), r = de(t), v = me[r], d = Ks[r], g = (E, I) => {
7549
+ y(I), i?.(E);
7550
+ }, D = o[N] || o[0], F = d.layout === "split";
7530
7551
  return /* @__PURE__ */ n(
7531
7552
  oe,
7532
7553
  {
@@ -7536,39 +7557,39 @@ function al({
7536
7557
  onSelect: i,
7537
7558
  identity: l,
7538
7559
  details: { type: "directory", title: m, count: o?.length ?? 0 },
7539
- ...h,
7560
+ ...u,
7540
7561
  children: [
7541
7562
  /* @__PURE__ */ e("div", { className: "flex items-center justify-between mb-4", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${v.title}`, children: m }) }),
7542
7563
  /* @__PURE__ */ e(tl, { sizeMeta: d }),
7543
7564
  F ? /* @__PURE__ */ n("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6 min-h-0", children: [
7544
- /* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((E, R) => /* @__PURE__ */ e(
7565
+ /* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((E, I) => /* @__PURE__ */ e(
7545
7566
  Ut,
7546
7567
  {
7547
7568
  contact: E,
7548
7569
  sizeMeta: d,
7549
- isSelected: R === N,
7550
- onClick: (P) => p(P, R)
7570
+ isSelected: I === N,
7571
+ onClick: (P) => g(P, I)
7551
7572
  },
7552
- E._id || E.id || R
7573
+ E._id || E.id || I
7553
7574
  )) }),
7554
7575
  /* @__PURE__ */ e(
7555
7576
  el,
7556
7577
  {
7557
- contact: z,
7578
+ contact: D,
7558
7579
  sizeMeta: d
7559
7580
  }
7560
7581
  )
7561
7582
  ] }) : (
7562
7583
  // Single column layout for small screens
7563
- /* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((E, R) => /* @__PURE__ */ e(
7584
+ /* @__PURE__ */ e("div", { className: "space-y-3", children: o.map((E, I) => /* @__PURE__ */ e(
7564
7585
  Ut,
7565
7586
  {
7566
7587
  contact: E,
7567
7588
  sizeMeta: d,
7568
- isSelected: R === N,
7569
- onClick: (P) => p(P, R)
7589
+ isSelected: I === N,
7590
+ onClick: (P) => g(P, I)
7570
7591
  },
7571
- E._id || E.id || R
7592
+ E._id || E.id || I
7572
7593
  )) })
7573
7594
  ),
7574
7595
  /* @__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" }) })
@@ -7655,8 +7676,8 @@ function sl({
7655
7676
  // content
7656
7677
  title: m = "Account Summary",
7657
7678
  termLabel: o = "Spring 2024",
7658
- balance: u = 3e3,
7659
- totalCharges: h = 4440,
7679
+ balance: h = 3e3,
7680
+ totalCharges: u = 4440,
7660
7681
  totalPayments: N = 1568,
7661
7682
  transactions: y = [
7662
7683
  {
@@ -7676,16 +7697,16 @@ function sl({
7676
7697
  ],
7677
7698
  ...r
7678
7699
  }) {
7679
- const v = de(t), d = me[v], p = nl[v];
7700
+ const v = de(t), d = me[v], g = nl[v];
7680
7701
  return /* @__PURE__ */ n(
7681
7702
  oe,
7682
7703
  {
7683
- className: `flex flex-col ${d.card} ${p.wrap}`,
7704
+ className: `flex flex-col ${d.card} ${g.wrap}`,
7684
7705
  showCheckbox: a,
7685
7706
  checkboxPosition: s,
7686
7707
  onSelect: i,
7687
7708
  identity: l,
7688
- details: { type: "account-summary", termLabel: o, balance: u, totalCharges: h, totalPayments: N },
7709
+ details: { type: "account-summary", termLabel: o, balance: h, totalCharges: u, totalPayments: N },
7689
7710
  ...r,
7690
7711
  children: [
7691
7712
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
@@ -7695,14 +7716,14 @@ function sl({
7695
7716
  /* @__PURE__ */ e(Nt, { className: "h-4 w-4 opacity-70" })
7696
7717
  ] })
7697
7718
  ] }),
7698
- /* @__PURE__ */ n("div", { className: p.topGrid || p.grid, children: [
7719
+ /* @__PURE__ */ n("div", { className: g.topGrid || g.grid, children: [
7699
7720
  /* @__PURE__ */ n("div", { className: "space-y-4", children: [
7700
7721
  /* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Account Balance" }),
7701
- /* @__PURE__ */ e("div", { className: p.balance, children: Te(u) }),
7702
- !p.showTxns && /* @__PURE__ */ n("div", { className: p.totalsRow, children: [
7722
+ /* @__PURE__ */ e("div", { className: g.balance, children: Te(h) }),
7723
+ !g.showTxns && /* @__PURE__ */ n("div", { className: g.totalsRow, children: [
7703
7724
  /* @__PURE__ */ n("div", { children: [
7704
7725
  /* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Total Charges" }),
7705
- /* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-rose-600", children: Te(h) })
7726
+ /* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-rose-600", children: Te(u) })
7706
7727
  ] }),
7707
7728
  /* @__PURE__ */ n("div", { children: [
7708
7729
  /* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Total Payments" }),
@@ -7710,27 +7731,27 @@ function sl({
7710
7731
  ] })
7711
7732
  ] })
7712
7733
  ] }),
7713
- p.showTxns && /* @__PURE__ */ n("div", { className: "space-y-4", children: [
7714
- /* @__PURE__ */ n("div", { className: p.totalsRow, children: [
7734
+ g.showTxns && /* @__PURE__ */ n("div", { className: "space-y-4", children: [
7735
+ /* @__PURE__ */ n("div", { className: g.totalsRow, children: [
7715
7736
  /* @__PURE__ */ n("div", { children: [
7716
7737
  /* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Total Charges" }),
7717
- /* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-rose-600", children: Te(h) })
7738
+ /* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-rose-600", children: Te(u) })
7718
7739
  ] }),
7719
7740
  /* @__PURE__ */ n("div", { children: [
7720
7741
  /* @__PURE__ */ e("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Total Payments" }),
7721
7742
  /* @__PURE__ */ e("div", { className: "mt-1 font-semibold text-green-600", children: Te(N) })
7722
7743
  ] })
7723
7744
  ] }),
7724
- /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: y.slice(0, 2).map((z, F) => /* @__PURE__ */ e(
7745
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: y.slice(0, 2).map((D, F) => /* @__PURE__ */ e(
7725
7746
  rl,
7726
7747
  {
7727
7748
  side: F === 0 ? "left" : "right",
7728
- date: z.date,
7729
- title: z.title,
7730
- amount: z.amount,
7731
- kind: z.kind
7749
+ date: D.date,
7750
+ title: D.title,
7751
+ amount: D.amount,
7752
+ kind: D.kind
7732
7753
  },
7733
- z.id || F
7754
+ D.id || F
7734
7755
  )) })
7735
7756
  ] })
7736
7757
  ] }),
@@ -7738,7 +7759,7 @@ function sl({
7738
7759
  "button",
7739
7760
  {
7740
7761
  type: "button",
7741
- className: `mt-4 w-full inline-flex items-center justify-center gap-2 rounded-xl border text-sm ${p.buttonPad}
7762
+ className: `mt-4 w-full inline-flex items-center justify-center gap-2 rounded-xl border text-sm ${g.buttonPad}
7742
7763
  border-orange-400 text-zinc-900 dark:text-zinc-100 bg-white dark:bg-zinc-900`,
7743
7764
  "aria-label": "View Transactions (mock)",
7744
7765
  children: [
@@ -7847,24 +7868,24 @@ function il({
7847
7868
  identity: l = "_id",
7848
7869
  title: m = "Pay Stub and Leave Balance",
7849
7870
  term: o = "Fall 2025",
7850
- ...u
7871
+ ...h
7851
7872
  }) {
7852
- const [h, N] = B("vacation"), [y, r] = B(!1), v = de(t), d = me[v], p = ll[v], z = Ye.find((F) => F.id === h) || Ye[0];
7873
+ const [u, N] = B("vacation"), [y, r] = B(!1), v = de(t), d = me[v], g = ll[v], D = Ye.find((F) => F.id === u) || Ye[0];
7853
7874
  return /* @__PURE__ */ n(
7854
7875
  oe,
7855
7876
  {
7856
- className: `flex flex-col ${d.card} ${p.wrap}`,
7877
+ className: `flex flex-col ${d.card} ${g.wrap}`,
7857
7878
  showCheckbox: a,
7858
7879
  checkboxPosition: s,
7859
7880
  onSelect: i,
7860
7881
  identity: l,
7861
7882
  details: { type: "leave-balance", title: m },
7862
- ...u,
7883
+ ...h,
7863
7884
  children: [
7864
7885
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
7865
7886
  /* @__PURE__ */ n("div", { children: [
7866
- /* @__PURE__ */ e("h3", { className: `text-zinc-900 dark:text-zinc-100 ${p.title} mb-1`, children: m }),
7867
- /* @__PURE__ */ n("div", { className: `text-zinc-600 dark:text-zinc-400 ${p.term} flex items-center gap-2`, children: [
7887
+ /* @__PURE__ */ e("h3", { className: `text-zinc-900 dark:text-zinc-100 ${g.title} mb-1`, children: m }),
7888
+ /* @__PURE__ */ n("div", { className: `text-zinc-600 dark:text-zinc-400 ${g.term} flex items-center gap-2`, children: [
7868
7889
  /* @__PURE__ */ e(Wt, { className: "h-4 w-4" }),
7869
7890
  "Term - ",
7870
7891
  o
@@ -7885,28 +7906,28 @@ function il({
7885
7906
  ] })
7886
7907
  ] })
7887
7908
  ] }),
7888
- p.showTabs && /* @__PURE__ */ e("div", { className: "flex border-b border-zinc-200 dark:border-zinc-800", children: Ye.map((F) => /* @__PURE__ */ e(
7909
+ g.showTabs && /* @__PURE__ */ e("div", { className: "flex border-b border-zinc-200 dark:border-zinc-800", children: Ye.map((F) => /* @__PURE__ */ e(
7889
7910
  "button",
7890
7911
  {
7891
- className: `flex-1 py-2 px-4 text-center ${p.tab} font-medium border-b-2 transition-colors duration-200 ${h === F.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"}`,
7912
+ className: `flex-1 py-2 px-4 text-center ${g.tab} font-medium border-b-2 transition-colors duration-200 ${u === F.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"}`,
7892
7913
  onClick: () => N(F.id),
7893
7914
  children: F.name.split(" ")[0]
7894
7915
  },
7895
7916
  F.id
7896
7917
  )) }),
7897
- /* @__PURE__ */ e("div", { className: "space-y-4 mb-6", children: p.showAllLeave ? (
7918
+ /* @__PURE__ */ e("div", { className: "space-y-4 mb-6", children: g.showAllLeave ? (
7898
7919
  // LG: Show all leave types
7899
- Ye.map((F) => /* @__PURE__ */ e(Gt, { leave: F, sizeMeta: p }, F.id))
7900
- ) : p.showSingleLeave ? (
7920
+ Ye.map((F) => /* @__PURE__ */ e(Gt, { leave: F, sizeMeta: g }, F.id))
7921
+ ) : g.showSingleLeave ? (
7901
7922
  // MD: Show active tab leave type
7902
- /* @__PURE__ */ e(Gt, { leave: z, sizeMeta: p })
7923
+ /* @__PURE__ */ e(Gt, { leave: D, sizeMeta: g })
7903
7924
  ) : (
7904
7925
  // SM: Show only available hours
7905
7926
  /* @__PURE__ */ e("div", { className: "bg-white dark:bg-zinc-900 rounded-lg border border-zinc-200 dark:border-zinc-800 p-4", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-3 mb-3", children: [
7906
7927
  /* @__PURE__ */ e(Ae, { className: "h-5 w-5 text-blue-600 dark:text-blue-400" }),
7907
7928
  /* @__PURE__ */ n("div", { children: [
7908
- /* @__PURE__ */ e("div", { className: `font-medium text-zinc-900 dark:text-zinc-100 ${p.table}`, children: "Available Leave" }),
7909
- /* @__PURE__ */ e("div", { className: `text-zinc-600 dark:text-zinc-400 ${p.table}`, children: z.available })
7929
+ /* @__PURE__ */ e("div", { className: `font-medium text-zinc-900 dark:text-zinc-100 ${g.table}`, children: "Available Leave" }),
7930
+ /* @__PURE__ */ e("div", { className: `text-zinc-600 dark:text-zinc-400 ${g.table}`, children: D.available })
7910
7931
  ] })
7911
7932
  ] }) })
7912
7933
  ) }),
@@ -8038,9 +8059,9 @@ function ml({
8038
8059
  identity: l = "_id",
8039
8060
  title: m = "Drive",
8040
8061
  subtitle: o = "Drive Shared",
8041
- ...u
8062
+ ...h
8042
8063
  }) {
8043
- const [h, N] = B(!1), y = de(t), r = me[y], v = dl[y];
8064
+ const [u, N] = B(!1), y = de(t), r = me[y], v = dl[y];
8044
8065
  return /* @__PURE__ */ n(
8045
8066
  oe,
8046
8067
  {
@@ -8050,7 +8071,7 @@ function ml({
8050
8071
  onSelect: i,
8051
8072
  identity: l,
8052
8073
  details: { type: "drive", title: m },
8053
- ...u,
8074
+ ...h,
8054
8075
  children: [
8055
8076
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
8056
8077
  /* @__PURE__ */ n("div", { children: [
@@ -8062,11 +8083,11 @@ function ml({
8062
8083
  "button",
8063
8084
  {
8064
8085
  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",
8065
- onClick: () => N(!h),
8086
+ onClick: () => N(!u),
8066
8087
  children: /* @__PURE__ */ e(Zt, { className: "h-4 w-4" })
8067
8088
  }
8068
8089
  ),
8069
- h && /* @__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: [
8090
+ u && /* @__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: [
8070
8091
  /* @__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: [
8071
8092
  /* @__PURE__ */ e(sa, { className: "h-4 w-4" }),
8072
8093
  "Download All"
@@ -8232,7 +8253,7 @@ const ul = [
8232
8253
  }
8233
8254
  };
8234
8255
  function gl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
8235
- const [l, m] = B(!1), o = $a(t.type), u = pl(t.type);
8256
+ const [l, m] = B(!1), o = $a(t.type), h = pl(t.type);
8236
8257
  return l ? null : /* @__PURE__ */ n("div", { className: `relative rounded-lg border-l-4 p-4 transition-all duration-200 ${o.bg} ${o.border} ${t.read ? "border-l-2 opacity-80" : "border-l-4"}`, style: { borderLeftColor: o.accent }, children: [
8237
8258
  /* @__PURE__ */ e(
8238
8259
  "button",
@@ -8242,7 +8263,7 @@ function gl({ alert: t, sizeMeta: a, onDismiss: s, onMarkRead: i }) {
8242
8263
  }
8243
8264
  ),
8244
8265
  /* @__PURE__ */ n("div", { className: "flex gap-3 pr-6", children: [
8245
- /* @__PURE__ */ e("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ e(u, { className: `h-4 w-4 ${o.icon}` }) }),
8266
+ /* @__PURE__ */ e("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ e(h, { className: `h-4 w-4 ${o.icon}` }) }),
8246
8267
  /* @__PURE__ */ n("div", { className: "flex-grow min-w-0", children: [
8247
8268
  /* @__PURE__ */ e("div", { className: `${a.title} text-zinc-900 dark:text-zinc-100 mb-1 ${t.read ? "font-medium" : "font-semibold"}`, children: Yt(t.title, a.maxTitleWords) }),
8248
8269
  a.showMessage && t.message && /* @__PURE__ */ e("div", { className: `${a.message} text-zinc-600 dark:text-zinc-400 mb-2 leading-relaxed`, children: Yt(t.message, a.maxMessageWords) }),
@@ -8283,12 +8304,12 @@ function fl({
8283
8304
  identity: l = "_id",
8284
8305
  title: m = "Alerts",
8285
8306
  alerts: o = ul,
8286
- showBanner: u = !0,
8287
- ...h
8307
+ showBanner: h = !0,
8308
+ ...u
8288
8309
  }) {
8289
- const [N, y] = B(o), r = de(t), v = me[r], d = hl[r], p = (E) => {
8290
- y((R) => R.filter((P) => P.id !== E.id));
8291
- }, z = N.find((E) => E.type === "banner"), F = N.filter((E) => E.type !== "banner");
8310
+ const [N, y] = B(o), r = de(t), v = me[r], d = hl[r], g = (E) => {
8311
+ y((I) => I.filter((P) => P.id !== E.id));
8312
+ }, D = N.find((E) => E.type === "banner"), F = N.filter((E) => E.type !== "banner");
8292
8313
  return /* @__PURE__ */ n(
8293
8314
  oe,
8294
8315
  {
@@ -8298,14 +8319,14 @@ function fl({
8298
8319
  onSelect: i,
8299
8320
  identity: l,
8300
8321
  details: { type: "alerts", title: m, count: N.length },
8301
- ...h,
8322
+ ...u,
8302
8323
  children: [
8303
8324
  /* @__PURE__ */ e("div", { className: "flex items-center justify-between ", children: /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${v.title}`, children: m }) }),
8304
- u && z && t !== "sm" && /* @__PURE__ */ e(
8325
+ h && D && t !== "sm" && /* @__PURE__ */ e(
8305
8326
  bl,
8306
8327
  {
8307
- alert: z,
8308
- onDismiss: p
8328
+ alert: D,
8329
+ onDismiss: g
8309
8330
  }
8310
8331
  ),
8311
8332
  /* @__PURE__ */ e("div", { className: "space-y-0.5", children: F.slice(0, 3).map((E) => /* @__PURE__ */ e(
@@ -8313,7 +8334,7 @@ function fl({
8313
8334
  {
8314
8335
  alert: E,
8315
8336
  sizeMeta: d,
8316
- onDismiss: p
8337
+ onDismiss: g
8317
8338
  },
8318
8339
  E.id
8319
8340
  )) }),
@@ -8460,9 +8481,9 @@ function Nl({
8460
8481
  identity: l = "_id",
8461
8482
  title: m = "Videos",
8462
8483
  videos: o = yl,
8463
- ...u
8484
+ ...h
8464
8485
  }) {
8465
- const [h, N] = B(!1), y = de(t), r = me[y], v = xl[y];
8486
+ const [u, N] = B(!1), y = de(t), r = me[y], v = xl[y];
8466
8487
  return /* @__PURE__ */ n(
8467
8488
  oe,
8468
8489
  {
@@ -8472,7 +8493,7 @@ function Nl({
8472
8493
  onSelect: i,
8473
8494
  identity: l,
8474
8495
  details: { type: "videos", title: m, count: o.length },
8475
- ...u,
8496
+ ...h,
8476
8497
  children: [
8477
8498
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between ", children: [
8478
8499
  /* @__PURE__ */ e("h3", { className: `font-semibold text-zinc-900 dark:text-zinc-100 ${r.title}`, children: m }),
@@ -8481,14 +8502,14 @@ function Nl({
8481
8502
  "button",
8482
8503
  {
8483
8504
  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",
8484
- onClick: () => N(!h),
8505
+ onClick: () => N(!u),
8485
8506
  children: [
8486
8507
  "Filter",
8487
8508
  /* @__PURE__ */ e(xe, { className: "h-4 w-4 transform rotate-90" })
8488
8509
  ]
8489
8510
  }
8490
8511
  ),
8491
- h && /* @__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: [
8512
+ u && /* @__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: [
8492
8513
  /* @__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: "All Videos" }),
8493
8514
  /* @__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: "Campus Life" }),
8494
8515
  /* @__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: "Academic" }),