react-admin-crud-manager 1.0.17 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,14 +1,14 @@
1
- import { jsx as e, Fragment as G, jsxs as c } from "react/jsx-runtime";
2
- import Ce, { useState as R, useRef as X, useEffect as z, useMemo as Me } from "react";
1
+ import { jsx as e, Fragment as $, jsxs as h } from "react/jsx-runtime";
2
+ import Ce, { useState as R, useRef as ee, useEffect as H, useMemo as Me } from "react";
3
3
  import { ChevronDown as Te, Search as Re, Check as _e, X as ye, Filter as Ke, ChevronLeft as Ue, ChevronRight as ze, EllipsisVertical as He, User as Ie, Music as Ye, Plus as Ve } from "lucide-react";
4
4
  import { createPortal as We } from "react-dom";
5
- import { Icon as le } from "@iconify/react";
5
+ import { Icon as oe } from "@iconify/react";
6
6
  import { Editor as qe } from "@tinymce/tinymce-react";
7
7
  import { SnackbarProvider as Ze, enqueueSnackbar as ke } from "notistack";
8
8
  import a from "prop-types";
9
- const Oe = (h, n = "DD MMM YYYY") => {
10
- if (!h) return "N/A";
11
- const o = new Date(h);
9
+ const Oe = (c, n = "DD MMM YYYY") => {
10
+ if (!c) return "N/A";
11
+ const o = new Date(c);
12
12
  if (isNaN(o)) return "Invalid Date";
13
13
  const i = (l) => String(l).padStart(2, "0"), s = {
14
14
  YYYY: o.getFullYear(),
@@ -31,10 +31,10 @@ const Oe = (h, n = "DD MMM YYYY") => {
31
31
  /YYYY|YY|MMMM|MMM|MM|M|DD|D|dddd|ddd|HH|hh|mm|ss|A/g,
32
32
  (l) => s[l]
33
33
  );
34
- }, Je = (h, n, o = []) => {
35
- if (!(n != null && n.trim())) return h;
34
+ }, Je = (c, n, o = []) => {
35
+ if (!(n != null && n.trim())) return c;
36
36
  const i = n.toLowerCase(), s = (l) => l == null ? [] : typeof l == "object" ? Object.values(l).flatMap(s) : [String(l)];
37
- return h.filter((l) => {
37
+ return c.filter((l) => {
38
38
  let r = [];
39
39
  return o.length > 0 ? o.forEach((C) => {
40
40
  l[C] !== void 0 && r.push(...s(l[C]));
@@ -44,7 +44,7 @@ const Oe = (h, n = "DD MMM YYYY") => {
44
44
  });
45
45
  }, Q = Ce.forwardRef(
46
46
  ({
47
- className: h = "",
47
+ className: c = "",
48
48
  variant: n = "contained",
49
49
  color: o = "default",
50
50
  size: i = "default",
@@ -53,13 +53,13 @@ const Oe = (h, n = "DD MMM YYYY") => {
53
53
  ...r
54
54
  }, C) => {
55
55
  var u;
56
- const L = "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", b = {
56
+ const L = "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", p = {
57
57
  sm: "h-8 px-3 rounded-md text-sm",
58
58
  md: "h-9 px-4 rounded-md text-sm",
59
59
  lg: "h-11 px-6 rounded-md text-base",
60
60
  xl: "h-12 px-8 rounded-lg text-lg",
61
61
  default: "h-9 px-4 rounded-md text-sm"
62
- }, y = {
62
+ }, f = {
63
63
  primary: {
64
64
  contained: "bg-primary text-white hover:bg-primary-600 focus:ring-primary-500 shadow-sm",
65
65
  outlined: "border border-primary bg-transparent text-primary hover:bg-primary-50 focus:ring-primary-500",
@@ -80,12 +80,12 @@ const Oe = (h, n = "DD MMM YYYY") => {
80
80
  outlined: "border border-gray-300 bg-transparent text-gray-700 hover:bg-gray-100 focus:ring-gray-300 dark:border-gray-600 dark:text-gray-200 dark:hover:bg-gray-700 dark:focus:ring-gray-500",
81
81
  text: "bg-transparent text-gray-700 hover:bg-gray-100 focus:ring-gray-300 dark:text-gray-200 dark:hover:bg-gray-700 dark:focus:ring-gray-500"
82
82
  }
83
- }, d = ((u = y[o]) == null ? void 0 : u[n]) || y.default.contained, p = b[i], m = `
83
+ }, d = ((u = f[o]) == null ? void 0 : u[n]) || f.default.contained, b = p[i], m = `
84
84
  ${L}
85
85
  ${d}
86
- ${p}
86
+ ${b}
87
87
  ${s ? "w-full" : ""}
88
- ${h}
88
+ ${c}
89
89
  `.trim();
90
90
  return /* @__PURE__ */ e(
91
91
  "button",
@@ -100,14 +100,14 @@ const Oe = (h, n = "DD MMM YYYY") => {
100
100
  }
101
101
  );
102
102
  Q.displayName = "Button";
103
- function q({ label: h, required: n = !1 }) {
104
- return /* @__PURE__ */ e(G, { children: /* @__PURE__ */ c("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
105
- h,
103
+ function Z({ label: c, required: n = !1 }) {
104
+ return /* @__PURE__ */ e($, { children: /* @__PURE__ */ h("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
105
+ c,
106
106
  n && /* @__PURE__ */ e("span", { className: "ml-1", children: "*" })
107
107
  ] }) });
108
108
  }
109
109
  const Qe = ({
110
- options: h = [],
110
+ options: c = [],
111
111
  value: n = "",
112
112
  defaultValue: o = "",
113
113
  onChange: i,
@@ -116,76 +116,86 @@ const Qe = ({
116
116
  disabled: r = !1,
117
117
  search: C = !1,
118
118
  label: L = "",
119
- required: b = !1,
120
- name: y = "",
119
+ required: p = !1,
120
+ name: f = "",
121
121
  parentClass: d = "",
122
- multiple: p = !1,
122
+ multiple: b = !1,
123
123
  // ✅ NEW
124
124
  dropdownMaxHeight: m = ""
125
125
  }) => {
126
- var A;
127
- const [u, x] = R(!1), [w, S] = R(""), [$, I] = R(!0), M = X(null), j = X(null);
128
- let E = n || n === !1 ? n : o;
129
- const f = (v) => v == null || v === "" ? "" : String(typeof v == "boolean" ? v : v ?? ""), N = p ? (E || []).map(f) : f(E), O = h.filter(
130
- (v) => v.label.toLowerCase().includes(w.toLowerCase())
131
- ), D = (v) => {
132
- const H = f(v);
133
- return p ? N.includes(H) : H === N;
126
+ var ae;
127
+ const [u, y] = R(!1), [w, S] = R(""), [E, O] = R(!0), M = ee(null), j = ee(null), [G, x] = R([]);
128
+ let v = n || n === !1 ? n : o;
129
+ const I = (N) => N == null || N === "" ? "" : String(typeof N == "boolean" ? N : N ?? "");
130
+ H(() => {
131
+ (async () => {
132
+ if (typeof c == "function") {
133
+ const U = await c();
134
+ x(U);
135
+ } else
136
+ x(c || []);
137
+ })();
138
+ }, [c]);
139
+ const D = b ? (v || []).map(I) : I(v), F = G.filter(
140
+ (N) => N.label.toLowerCase().includes(w.toLowerCase())
141
+ ), z = (N) => {
142
+ const U = I(N);
143
+ return b ? D.includes(U) : U === D;
134
144
  };
135
- z(() => {
136
- const v = (H) => {
137
- M.current && !M.current.contains(H.target) && (x(!1), S(""));
145
+ H(() => {
146
+ const N = (U) => {
147
+ M.current && !M.current.contains(U.target) && (y(!1), S(""));
138
148
  };
139
- return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
140
- }, []), z(() => {
149
+ return document.addEventListener("mousedown", N), () => document.removeEventListener("mousedown", N);
150
+ }, []), H(() => {
141
151
  if (u && M.current) {
142
- const v = M.current.getBoundingClientRect(), Z = window.innerHeight - v.bottom;
143
- I(Z < 200);
152
+ const N = M.current.getBoundingClientRect(), X = window.innerHeight - N.bottom;
153
+ O(X < 200);
144
154
  }
145
- }, [u]), z(() => {
155
+ }, [u]), H(() => {
146
156
  u && j.current && j.current.focus();
147
157
  }, [u]);
148
- const F = (v) => {
149
- let H = v;
150
- if (v === "true" ? H = !0 : v === "false" && (H = !1), p) {
151
- const Z = N.includes(f(v));
152
- let W;
153
- Z ? W = n.filter(
154
- (re) => f(re) !== f(v)
155
- ) : W = [...n || [], H], i(W);
158
+ const A = (N) => {
159
+ let U = N;
160
+ if (N === "true" ? U = !0 : N === "false" && (U = !1), b) {
161
+ const X = D.includes(I(N));
162
+ let q;
163
+ X ? q = n.filter(
164
+ (le) => I(le) !== I(N)
165
+ ) : q = [...n || [], U], i(q);
156
166
  } else
157
- i(H), x(!1);
167
+ i(U), y(!1);
158
168
  S("");
159
- }, U = p ? h.filter((v) => D(v.value)).map((v) => v.label).join(", ") : (A = h.find((v) => D(v.value))) == null ? void 0 : A.label;
160
- return z(() => {
161
- (E || E === !1) && setTimeout(() => {
162
- i(E);
169
+ }, Y = b ? G.filter((N) => z(N.value)).map((N) => N.label).join(", ") : (ae = G.find((N) => z(N.value))) == null ? void 0 : ae.label;
170
+ return H(() => {
171
+ (v || v === !1) && setTimeout(() => {
172
+ i(v);
163
173
  }, 100);
164
- }, []), /* @__PURE__ */ c("div", { className: d || "col-span-12", children: [
165
- /* @__PURE__ */ e(q, { label: L, required: b }),
166
- /* @__PURE__ */ c("div", { className: `relative ${l}`, ref: M, children: [
174
+ }, []), /* @__PURE__ */ h("div", { className: d || "col-span-12", children: [
175
+ /* @__PURE__ */ e(Z, { label: L, required: p }),
176
+ /* @__PURE__ */ h("div", { className: `relative ${l}`, ref: M, children: [
167
177
  /* @__PURE__ */ e(
168
178
  "select",
169
179
  {
170
180
  name: "hidden_select_for_validation",
171
- value: U || "",
172
- required: b,
173
- multiple: p,
181
+ value: Y || "",
182
+ required: p,
183
+ multiple: b,
174
184
  className: "absolute opacity-0 right-1/2 top-[80%] -translate-x-1/2 -translate-y-1/2 pointer-events-none h-[10px]",
175
- children: /* @__PURE__ */ e("option", { hidden: !0, value: U, children: U })
185
+ children: /* @__PURE__ */ e("option", { hidden: !0, value: Y, children: Y })
176
186
  }
177
187
  ),
178
- /* @__PURE__ */ c(
188
+ /* @__PURE__ */ h(
179
189
  "button",
180
190
  {
181
191
  type: "button",
182
- onClick: () => !r && x(!u),
192
+ onClick: () => !r && y(!u),
183
193
  disabled: r,
184
194
  className: `w-full h-10 px-3 border border-gray-300 dark:border-gray-600 rounded-md text-left text-sm flex items-center justify-between
185
- ${U ? "dark:text-white" : "text-gray-500 dark:text-gray-400"}
195
+ ${Y ? "dark:text-white" : "text-gray-500 dark:text-gray-400"}
186
196
  ${r ? "opacity-50 cursor-not-allowed" : "dark:bg-gray-700"}`,
187
197
  children: [
188
- /* @__PURE__ */ e("span", { className: "truncate", children: U || s }),
198
+ /* @__PURE__ */ e("span", { className: "truncate", children: Y || s }),
189
199
  /* @__PURE__ */ e(
190
200
  Te,
191
201
  {
@@ -195,13 +205,13 @@ const Qe = ({
195
205
  ]
196
206
  }
197
207
  ),
198
- u && /* @__PURE__ */ c(
208
+ u && /* @__PURE__ */ h(
199
209
  "div",
200
210
  {
201
211
  className: `absolute z-50 w-full border rounded-md bg-white dark:bg-gray-700 shadow-lg
202
- ${$ ? "bottom-full mb-1" : "top-full mt-1"}`,
212
+ ${E ? "bottom-full mb-1" : "top-full mt-1"}`,
203
213
  children: [
204
- C && /* @__PURE__ */ e("div", { className: "p-2 border-b border-gray-200 dark:border-gray-600", children: /* @__PURE__ */ c("div", { className: "relative", children: [
214
+ C && /* @__PURE__ */ e("div", { className: "p-2 border-b border-gray-200 dark:border-gray-600", children: /* @__PURE__ */ h("div", { className: "relative", children: [
205
215
  /* @__PURE__ */ e(Re, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400" }),
206
216
  /* @__PURE__ */ e(
207
217
  "input",
@@ -209,7 +219,7 @@ const Qe = ({
209
219
  ref: j,
210
220
  type: "text",
211
221
  value: w,
212
- onChange: (v) => S(v.target.value),
222
+ onChange: (N) => S(N.target.value),
213
223
  placeholder: "Search...",
214
224
  className: "w-full pl-9 pr-3 py-2 text-sm border rounded-md bg-white dark:bg-gray-800 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none"
215
225
  }
@@ -222,19 +232,19 @@ const Qe = ({
222
232
  style: {
223
233
  maxHeight: m || ""
224
234
  },
225
- children: O.length > 0 ? O.map((v) => /* @__PURE__ */ c(
235
+ children: F.length > 0 ? F.map((N) => /* @__PURE__ */ h(
226
236
  "button",
227
237
  {
228
238
  type: "button",
229
- onClick: () => F(String(v.value)),
239
+ onClick: () => A(String(N.value)),
230
240
  className: `w-full px-3 py-2 text-left text-sm flex items-center justify-between hover:bg-gray-100 dark:hover:bg-gray-600
231
- ${D(v.value) ? "bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300" : ""}`,
241
+ ${z(N.value) ? "bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300" : ""}`,
232
242
  children: [
233
- /* @__PURE__ */ e("span", { children: v.label }),
234
- p && D(v.value) && /* @__PURE__ */ e(_e, { className: "w-4 h-4" })
243
+ /* @__PURE__ */ e("span", { children: N.label }),
244
+ b && z(N.value) && /* @__PURE__ */ e(_e, { className: "w-4 h-4" })
235
245
  ]
236
246
  },
237
- String(v.value)
247
+ String(N.value)
238
248
  )) : /* @__PURE__ */ e("div", { className: "px-3 py-2 text-sm text-gray-500 dark:text-gray-400", children: "No options found" })
239
249
  }
240
250
  )
@@ -242,9 +252,9 @@ const Qe = ({
242
252
  }
243
253
  )
244
254
  ] })
245
- ] }, y);
255
+ ] }, f);
246
256
  }, Xe = ({
247
- value: h = !0,
257
+ value: c = !0,
248
258
  onChange: n,
249
259
  text: o,
250
260
  options: i = [],
@@ -254,15 +264,15 @@ const Qe = ({
254
264
  disabled: C = !1,
255
265
  parentClass: L = ""
256
266
  }) => {
257
- const b = i.length > 0 ? i : [
267
+ const p = i.length > 0 ? i : [
258
268
  { label: "Active", value: !0 },
259
269
  { label: "Inactive", value: !1 }
260
270
  ];
261
- return /* @__PURE__ */ e(G, { children: /* @__PURE__ */ c("div", { className: L || "col-span-12", children: [
262
- /* @__PURE__ */ e(q, { label: s, required: l }),
263
- /* @__PURE__ */ c("div", { className: "flex items-center justify-between h-10 gap-4 bg-gray-100 dark:bg-gray-700 px-3 rounded-md border border-gray-100 dark:border-gray-600", children: [
271
+ return /* @__PURE__ */ e($, { children: /* @__PURE__ */ h("div", { className: L || "col-span-12", children: [
272
+ /* @__PURE__ */ e(Z, { label: s, required: l }),
273
+ /* @__PURE__ */ h("div", { className: "flex items-center justify-between h-10 gap-4 bg-gray-100 dark:bg-gray-700 px-3 rounded-md border border-gray-100 dark:border-gray-600", children: [
264
274
  o && /* @__PURE__ */ e("p", { className: "text-xs text-gray-600 dark:text-gray-400 flex-shrink overflow-hidden text-ellipsis whitespace-nowrap max-w-[200px]", children: o }),
265
- /* @__PURE__ */ e("div", { className: "flex items-center gap-6", children: b.map((y, d) => /* @__PURE__ */ c(
275
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-6", children: p.map((f, d) => /* @__PURE__ */ h(
266
276
  "label",
267
277
  {
268
278
  className: "flex items-center gap-2 cursor-pointer select-none",
@@ -273,14 +283,14 @@ const Qe = ({
273
283
  type: "radio",
274
284
  name: "switch-field",
275
285
  required: l && d === 0,
276
- value: y.value,
286
+ value: f.value,
277
287
  disabled: C,
278
- checked: h === y.value,
279
- onChange: () => n(y.value),
288
+ checked: c === f.value,
289
+ onChange: () => n(f.value),
280
290
  className: "w-4 h-4 border-gray-300 cursor-pointer"
281
291
  }
282
292
  ),
283
- /* @__PURE__ */ e("span", { className: "text-sm text-gray-700 dark:text-white", children: y.label })
293
+ /* @__PURE__ */ e("span", { className: "text-sm text-gray-700 dark:text-white", children: f.label })
284
294
  ]
285
295
  },
286
296
  d
@@ -540,7 +550,7 @@ const Qe = ({
540
550
  { label: "Zimbabwe", code: "ZW", phone: "263" }
541
551
  ];
542
552
  function ea({
543
- label: h = "",
553
+ label: c = "",
544
554
  value: n = "",
545
555
  name: o = "",
546
556
  parentClass: i = "",
@@ -549,48 +559,48 @@ function ea({
549
559
  required: r = !1,
550
560
  placeholder: C = "Phone number",
551
561
  search: L = !1,
552
- countriesList: b = !1,
553
- defaultCountry: y = ""
562
+ countriesList: p = !1,
563
+ defaultCountry: f = ""
554
564
  }) {
555
- const d = (N) => me.find((O) => O.code == N), [p, m] = R(
556
- d(y) || me[0]
557
- ), [u, x] = R(""), [w, S] = R(!1), [$, I] = R(""), M = X();
558
- z(() => {
565
+ const d = (v) => me.find((I) => I.code == v), [b, m] = R(
566
+ d(f) || me[0]
567
+ ), [u, y] = R(""), [w, S] = R(!1), [E, O] = R(""), M = ee();
568
+ H(() => {
559
569
  if (typeof n == "string" && n.startsWith("+")) {
560
- const N = me.filter((O) => n.startsWith("+" + O.phone)).sort((O, D) => D.phone.length - O.phone.length)[0];
561
- if (N) {
562
- m(N), x(n.replace("+" + N.phone, ""));
570
+ const v = me.filter((I) => n.startsWith("+" + I.phone)).sort((I, D) => D.phone.length - I.phone.length)[0];
571
+ if (v) {
572
+ m(v), y(n.replace("+" + v.phone, ""));
563
573
  return;
564
574
  }
565
575
  }
566
- x(n);
576
+ y(n);
567
577
  }, [n]);
568
- const j = (N) => {
569
- const O = N.target.value.replace(/\D/g, "");
570
- x(O), p && s && s("+" + p.phone + O);
571
- }, E = (N) => {
572
- m(N), s && s("+" + N.phone + u), S(!1), I("");
578
+ const j = (v) => {
579
+ const I = v.target.value.replace(/\D/g, "");
580
+ y(I), b && s && s("+" + b.phone + I);
581
+ }, G = (v) => {
582
+ m(v), s && s("+" + v.phone + u), S(!1), O("");
573
583
  };
574
- z(() => {
575
- const N = (O) => {
576
- M.current && !M.current.contains(O.target) && S(!1);
584
+ H(() => {
585
+ const v = (I) => {
586
+ M.current && !M.current.contains(I.target) && S(!1);
577
587
  };
578
- return document.addEventListener("mousedown", N), () => document.removeEventListener("mousedown", N);
588
+ return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
579
589
  }, []);
580
- const f = me.filter(
581
- (N) => N.label.toLowerCase().includes($.toLowerCase()) || N.phone.includes($)
590
+ const x = me.filter(
591
+ (v) => v.label.toLowerCase().includes(E.toLowerCase()) || v.phone.includes(E)
582
592
  );
583
- return b ? /* @__PURE__ */ e(G, { children: /* @__PURE__ */ c("div", { className: i || "col-span-12", children: [
584
- /* @__PURE__ */ e(q, { label: h, required: r }),
585
- /* @__PURE__ */ c("div", { className: "relative ", ref: M, children: [
586
- /* @__PURE__ */ c(
593
+ return p ? /* @__PURE__ */ e($, { children: /* @__PURE__ */ h("div", { className: i || "col-span-12", children: [
594
+ /* @__PURE__ */ e(Z, { label: c, required: r }),
595
+ /* @__PURE__ */ h("div", { className: "relative ", ref: M, children: [
596
+ /* @__PURE__ */ h(
587
597
  "div",
588
598
  {
589
599
  className: `h-[40px] flex items-center border rounded-md px-2 bg-white dark:bg-gray-700 transition-all
590
600
  ${w ? "ring-0.5 ring-blue-100 border-blue-300" : "border-gray-300 dark:border-gray-600"}
591
601
  ${l ? "opacity-60 cursor-not-allowed" : ""}`,
592
602
  children: [
593
- /* @__PURE__ */ c(
603
+ /* @__PURE__ */ h(
594
604
  "button",
595
605
  {
596
606
  type: "button",
@@ -598,11 +608,11 @@ function ea({
598
608
  onClick: () => S(!w),
599
609
  className: "flex items-center gap-1 pr-2 border-r border-gray-300 dark:border-gray-700 focus:outline-none",
600
610
  children: [
601
- p ? /* @__PURE__ */ e(
611
+ b ? /* @__PURE__ */ e(
602
612
  "img",
603
613
  {
604
- src: `https://flagcdn.com/w20/${p.code.toLowerCase()}.png`,
605
- alt: p.code,
614
+ src: `https://flagcdn.com/w20/${b.code.toLowerCase()}.png`,
615
+ alt: b.code,
606
616
  className: "w-5 h-3 object-cover"
607
617
  }
608
618
  ) : /* @__PURE__ */ e("span", { className: "text-gray-400 text-xs", children: "🌐" }),
@@ -610,9 +620,9 @@ function ea({
610
620
  ]
611
621
  }
612
622
  ),
613
- p && /* @__PURE__ */ c("span", { className: "ml-2 text-sm text-gray-700 dark:text-gray-200 whitespace-nowrap", children: [
623
+ b && /* @__PURE__ */ h("span", { className: "ml-2 text-sm text-gray-700 dark:text-gray-200 whitespace-nowrap", children: [
614
624
  "+",
615
- p.phone
625
+ b.phone
616
626
  ] }),
617
627
  /* @__PURE__ */ e(
618
628
  "input",
@@ -621,8 +631,8 @@ function ea({
621
631
  value: u,
622
632
  onChange: j,
623
633
  required: r,
624
- disabled: l || !p,
625
- placeholder: p ? C : "Select a country",
634
+ disabled: l || !b,
635
+ placeholder: b ? C : "Select a country",
626
636
  className: "flex-1 ml-2 bg-transparent outline-none text-sm text-gray-800 dark:text-gray-100 placeholder-gray-400"
627
637
  }
628
638
  ),
@@ -633,7 +643,7 @@ function ea({
633
643
  required: r,
634
644
  tabIndex: -1,
635
645
  readOnly: !0,
636
- value: p && u ? "+" + p.phone + u : "",
646
+ value: b && u ? "+" + b.phone + u : "",
637
647
  style: {
638
648
  position: "absolute",
639
649
  opacity: 0,
@@ -645,56 +655,56 @@ function ea({
645
655
  ]
646
656
  }
647
657
  ),
648
- w && /* @__PURE__ */ c("div", { className: "absolute top-full left-0 w-full mt-1 border border-gray-300 dark:border-gray-700 rounded-md bg-white dark:bg-gray-700 shadow-lg z-50 max-h-60 overflow-y-auto", children: [
649
- L && /* @__PURE__ */ e("div", { className: "p-2 border-b border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ c("div", { className: "relative", children: [
658
+ w && /* @__PURE__ */ h("div", { className: "absolute top-full left-0 w-full mt-1 border border-gray-300 dark:border-gray-700 rounded-md bg-white dark:bg-gray-700 shadow-lg z-50 max-h-60 overflow-y-auto", children: [
659
+ L && /* @__PURE__ */ e("div", { className: "p-2 border-b border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ h("div", { className: "relative", children: [
650
660
  /* @__PURE__ */ e(Re, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400" }),
651
661
  /* @__PURE__ */ e(
652
662
  "input",
653
663
  {
654
664
  type: "text",
655
- value: $,
656
- onChange: (N) => I(N.target.value),
665
+ value: E,
666
+ onChange: (v) => O(v.target.value),
657
667
  placeholder: "Search country...",
658
668
  className: "w-full pl-9 pr-3 py-2 text-sm border rounded-md bg-white dark:bg-gray-800 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none "
659
669
  }
660
670
  )
661
671
  ] }) }),
662
- f.map((N) => /* @__PURE__ */ c(
672
+ x.map((v) => /* @__PURE__ */ h(
663
673
  "button",
664
674
  {
665
675
  type: "button",
666
- onClick: () => E(N),
676
+ onClick: () => G(v),
667
677
  className: "w-full flex items-center gap-2 px-2 py-1 text-sm hover:bg-blue-50 dark:hover:bg-gray-700 text-gray-800 dark:text-gray-100",
668
678
  children: [
669
679
  /* @__PURE__ */ e(
670
680
  "img",
671
681
  {
672
- src: `https://flagcdn.com/w20/${N.code.toLowerCase()}.png`,
673
- alt: N.code,
682
+ src: `https://flagcdn.com/w20/${v.code.toLowerCase()}.png`,
683
+ alt: v.code,
674
684
  className: "w-5 h-3 object-cover"
675
685
  }
676
686
  ),
677
- /* @__PURE__ */ c("span", { children: [
678
- N.label,
687
+ /* @__PURE__ */ h("span", { children: [
688
+ v.label,
679
689
  " (+",
680
- N.phone,
690
+ v.phone,
681
691
  ")"
682
692
  ] })
683
693
  ]
684
694
  },
685
- N.code
695
+ v.code
686
696
  ))
687
697
  ] })
688
698
  ] })
689
- ] }, o) }) : /* @__PURE__ */ e(G, { children: /* @__PURE__ */ c("div", { className: i || "col-span-12", children: [
690
- /* @__PURE__ */ e(q, { label: h, required: r }),
699
+ ] }, o) }) : /* @__PURE__ */ e($, { children: /* @__PURE__ */ h("div", { className: i || "col-span-12", children: [
700
+ /* @__PURE__ */ e(Z, { label: c, required: r }),
691
701
  /* @__PURE__ */ e(
692
702
  "input",
693
703
  {
694
704
  type: "text",
695
705
  value: n,
696
- onChange: (O) => {
697
- const D = O.target.value.replace(/[^+\d]/g, ""), F = D.startsWith("+") ? "+" + D.replace(/[+]/g, "").slice(0) : D;
706
+ onChange: (I) => {
707
+ const D = I.target.value.replace(/[^+\d]/g, ""), F = D.startsWith("+") ? "+" + D.replace(/[+]/g, "").slice(0) : D;
698
708
  s(F);
699
709
  },
700
710
  placeholder: C,
@@ -710,13 +720,13 @@ function ea({
710
720
  ] }, o) });
711
721
  }
712
722
  const Fe = Ce.forwardRef(
713
- ({ className: h = "", label: n, required: o, ...i }, s) => {
723
+ ({ className: c = "", label: n, required: o, ...i }, s) => {
714
724
  const l = `
715
725
  placeholder-gray-400 dark:placeholder-gray-400
716
- ${h}
726
+ ${c}
717
727
  `.trim();
718
- return /* @__PURE__ */ e(G, { children: /* @__PURE__ */ c("div", { className: i.parentClass || "col-span-12", children: [
719
- /* @__PURE__ */ e(q, { label: n, required: o }),
728
+ return /* @__PURE__ */ e($, { children: /* @__PURE__ */ h("div", { className: i.parentClass || "col-span-12", children: [
729
+ /* @__PURE__ */ e(Z, { label: n, required: o }),
720
730
  /* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ e(
721
731
  "textarea",
722
732
  {
@@ -731,7 +741,7 @@ const Fe = Ce.forwardRef(
731
741
  );
732
742
  Fe.displayName = "TextArea";
733
743
  const aa = ({
734
- label: h = "",
744
+ label: c = "",
735
745
  value: n = null,
736
746
  onChange: o,
737
747
  required: i = !1,
@@ -741,35 +751,35 @@ const aa = ({
741
751
  name: C = "",
742
752
  parentClass: L = ""
743
753
  }) => {
744
- const [b, y] = R(n), [d, p] = R(!1), m = X(null);
745
- z(() => (n instanceof File ? y({ file: n, preview: URL.createObjectURL(n) }) : (n != null && n.preview, y(n)), () => {
746
- b != null && b.preview && b.preview.startsWith("blob:") && URL.revokeObjectURL(b.preview);
754
+ const [p, f] = R(n), [d, b] = R(!1), m = ee(null);
755
+ H(() => (n instanceof File ? f({ file: n, preview: URL.createObjectURL(n) }) : (n != null && n.preview, f(n)), () => {
756
+ p != null && p.preview && p.preview.startsWith("blob:") && URL.revokeObjectURL(p.preview);
747
757
  }), [n]);
748
758
  const u = (M) => {
749
759
  if (!M || M.length === 0)
750
760
  return;
751
- const j = M[0], E = URL.createObjectURL(j), f = { file: j, preview: E };
752
- b != null && b.preview && b.preview.startsWith("blob:") && URL.revokeObjectURL(b.preview), y(f), o == null || o(j);
753
- }, x = (M) => {
754
- M && M.stopPropagation(), b != null && b.preview && b.preview.startsWith("blob:") && URL.revokeObjectURL(b.preview), y(null), o == null || o(null), m.current && (m.current.value = "");
761
+ const j = M[0], G = URL.createObjectURL(j), x = { file: j, preview: G };
762
+ p != null && p.preview && p.preview.startsWith("blob:") && URL.revokeObjectURL(p.preview), f(x), o == null || o(j);
763
+ }, y = (M) => {
764
+ M && M.stopPropagation(), p != null && p.preview && p.preview.startsWith("blob:") && URL.revokeObjectURL(p.preview), f(null), o == null || o(null), m.current && (m.current.value = "");
755
765
  }, w = (M) => {
756
- r && (M.preventDefault(), p(!0));
766
+ r && (M.preventDefault(), b(!0));
757
767
  }, S = (M) => {
758
- r && (M.preventDefault(), p(!1));
759
- }, $ = (M) => {
760
- r && (M.preventDefault(), p(!1), u(M.dataTransfer.files));
761
- }, I = () => {
768
+ r && (M.preventDefault(), b(!1));
769
+ }, E = (M) => {
770
+ r && (M.preventDefault(), b(!1), u(M.dataTransfer.files));
771
+ }, O = () => {
762
772
  m.current.click();
763
773
  };
764
- return /* @__PURE__ */ e(G, { children: /* @__PURE__ */ c("div", { className: L || "col-span-12", children: [
765
- /* @__PURE__ */ e(q, { label: h, required: i }),
766
- /* @__PURE__ */ c(
774
+ return /* @__PURE__ */ e($, { children: /* @__PURE__ */ h("div", { className: L || "col-span-12", children: [
775
+ /* @__PURE__ */ e(Z, { label: c, required: i }),
776
+ /* @__PURE__ */ h(
767
777
  "div",
768
778
  {
769
779
  className: `relative rounded-md p-2 transition-all ${d ? "border-2 border-dashed border-blue-500 bg-blue-50 dark:bg-blue-900/20" : "border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800"}`,
770
780
  onDragOver: w,
771
781
  onDragLeave: S,
772
- onDrop: $,
782
+ onDrop: E,
773
783
  children: [
774
784
  /* @__PURE__ */ e(
775
785
  "input",
@@ -779,22 +789,22 @@ const aa = ({
779
789
  type: "file",
780
790
  accept: s,
781
791
  onChange: (M) => u(M.target.files),
782
- required: i && !b,
792
+ required: i && !p,
783
793
  className: "absolute opacity-0 right-[50%] top-[80%] -translate-y-1/2 pointer-events-none h-[10px]"
784
794
  }
785
795
  ),
786
- /* @__PURE__ */ c(
796
+ /* @__PURE__ */ h(
787
797
  "div",
788
798
  {
789
799
  className: `flex items-center space-x-4 transition-all ${d ? "opacity-50" : ""}`,
790
800
  children: [
791
- b ? (
801
+ p ? (
792
802
  // Image preview with close button
793
- /* @__PURE__ */ c("div", { className: "relative group", children: [
803
+ /* @__PURE__ */ h("div", { className: "relative group", children: [
794
804
  /* @__PURE__ */ e(
795
805
  "img",
796
806
  {
797
- src: b.preview || b,
807
+ src: p.preview || p,
798
808
  alt: "preview",
799
809
  className: "object-cover w-20 h-20 rounded-full shadow-md"
800
810
  }
@@ -803,35 +813,35 @@ const aa = ({
803
813
  "button",
804
814
  {
805
815
  type: "button",
806
- onClick: x,
816
+ onClick: y,
807
817
  className: "absolute top-0 -right-2 bg-red-500 text-white rounded-full p-1 shadow-lg hover:bg-red-600 transition-colors focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2",
808
818
  "aria-label": "Remove image",
809
- children: /* @__PURE__ */ e(le, { icon: "mdi:close", className: "w-3 h-3" })
819
+ children: /* @__PURE__ */ e(oe, { icon: "mdi:close", className: "w-3 h-3" })
810
820
  }
811
821
  )
812
822
  ] })
813
823
  ) : (
814
824
  // Placeholder icon
815
825
  /* @__PURE__ */ e("div", { className: "rounded-full bg-gray-100 dark:bg-gray-700 h-20 w-20 flex items-center justify-center", children: /* @__PURE__ */ e(
816
- le,
826
+ oe,
817
827
  {
818
828
  icon: "ri:image-add-fill",
819
829
  className: "text-gray-400 w-10 h-10"
820
830
  }
821
831
  ) })
822
832
  ),
823
- /* @__PURE__ */ c("div", { className: "flex flex-col items-center space-y-1", children: [
833
+ /* @__PURE__ */ h("div", { className: "flex flex-col items-center space-y-1", children: [
824
834
  /* @__PURE__ */ e(
825
835
  Q,
826
836
  {
827
837
  type: "button",
828
- onClick: I,
838
+ onClick: O,
829
839
  variant: "outlined",
830
840
  color: "default",
831
- children: b ? "Change Image" : "Select Image"
841
+ children: p ? "Change Image" : "Select Image"
832
842
  }
833
843
  ),
834
- r && !b && /* @__PURE__ */ e("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "or drag and drop" })
844
+ r && !p && /* @__PURE__ */ e("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "or drag and drop" })
835
845
  ] })
836
846
  ]
837
847
  }
@@ -843,7 +853,7 @@ const aa = ({
843
853
  ] }, C) });
844
854
  }, Be = Ce.forwardRef(
845
855
  ({
846
- label: h,
856
+ label: c,
847
857
  required: n,
848
858
  parentClass: o = "",
849
859
  className: i = "",
@@ -852,7 +862,7 @@ const aa = ({
852
862
  negativeNumberAllow: r = !0,
853
863
  ...C
854
864
  }, L) => {
855
- const [b, y] = R(!1), d = (m) => {
865
+ const [p, f] = R(!1), d = (m) => {
856
866
  if (s === "number") {
857
867
  if (["e", "E", "+"].includes(m.key)) {
858
868
  m.preventDefault();
@@ -868,23 +878,23 @@ const aa = ({
868
878
  }
869
879
  }
870
880
  l == null || l(m);
871
- }, p = `
881
+ }, b = `
872
882
  h-10 placeholder-gray-400 dark:placeholder-gray-400
873
883
  ${s === "password" ? "pr-10" : ""}
874
884
  ${s === "number" ? "no-spinner" : ""}
875
885
  ${i}
876
886
  `.trim();
877
- return /* @__PURE__ */ e(G, { children: /* @__PURE__ */ c("div", { className: o || "col-span-12", children: [
878
- /* @__PURE__ */ e(q, { label: h, required: n }),
879
- /* @__PURE__ */ c("div", { className: "relative", children: [
887
+ return /* @__PURE__ */ e($, { children: /* @__PURE__ */ h("div", { className: o || "col-span-12", children: [
888
+ /* @__PURE__ */ e(Z, { label: c, required: n }),
889
+ /* @__PURE__ */ h("div", { className: "relative", children: [
880
890
  /* @__PURE__ */ e(
881
891
  "input",
882
892
  {
883
- type: s === "password" && b ? "text" : s,
893
+ type: s === "password" && p ? "text" : s,
884
894
  ref: L,
885
895
  required: n,
886
896
  onKeyDown: d,
887
- className: p,
897
+ className: b,
888
898
  ...C
889
899
  }
890
900
  ),
@@ -893,12 +903,12 @@ const aa = ({
893
903
  {
894
904
  type: "button",
895
905
  tabIndex: -1,
896
- onClick: () => y((m) => !m),
906
+ onClick: () => f((m) => !m),
897
907
  className: "absolute inset-y-0 right-3 flex items-center text-gray-400 hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-200",
898
908
  children: /* @__PURE__ */ e(
899
- le,
909
+ oe,
900
910
  {
901
- icon: b ? "mdi:eye-outline" : "mdi:eye-off-outline",
911
+ icon: p ? "mdi:eye-outline" : "mdi:eye-off-outline",
902
912
  className: "w-5 h-5"
903
913
  }
904
914
  )
@@ -910,7 +920,7 @@ const aa = ({
910
920
  );
911
921
  Be.displayName = "Input";
912
922
  const ra = ({
913
- key: h,
923
+ key: c,
914
924
  editorKey: n = "",
915
925
  value: o = "",
916
926
  onChange: i,
@@ -919,40 +929,40 @@ const ra = ({
919
929
  placeholder: r = "",
920
930
  parentClass: C = "col-span-12",
921
931
  height: L = 400,
922
- inline: b = !1,
923
- disabled: y = !1,
932
+ inline: p = !1,
933
+ disabled: f = !1,
924
934
  plugins: d,
925
- toolbar: p,
935
+ toolbar: b,
926
936
  menubar: m = !1,
927
937
  fontFamily: u = "Inter, sans-serif",
928
- initConfig: x = {},
938
+ initConfig: y = {},
929
939
  imageUploadHandler: w
930
940
  // ✅ Promise function passed from parent
931
- }) => /* @__PURE__ */ c("div", { className: C, children: [
932
- s && /* @__PURE__ */ e(q, { label: s, required: l }),
941
+ }) => /* @__PURE__ */ h("div", { className: C, children: [
942
+ s && /* @__PURE__ */ e(Z, { label: s, required: l }),
933
943
  /* @__PURE__ */ e(
934
944
  qe,
935
945
  {
936
946
  apiKey: n,
937
947
  value: o,
938
- disabled: y,
948
+ disabled: f,
939
949
  init: {
940
950
  height: L,
941
- inline: b,
951
+ inline: p,
942
952
  menubar: m,
943
953
  branding: !1,
944
954
  statusbar: !0,
945
955
  automatic_uploads: !0,
946
- images_upload_handler: (M) => new Promise((j, E) => {
956
+ images_upload_handler: (M) => new Promise((j, G) => {
947
957
  if (!w) {
948
958
  j(`data:${M.blob().type};base64,${M.base64()}`);
949
959
  return;
950
960
  }
951
- w(M).then((f) => {
952
- f ? j(f) : E("Upload failed: No URL returned");
953
- }).catch((f) => {
954
- E(
955
- typeof f == "string" ? f : (f == null ? void 0 : f.message) || "Image upload failed"
961
+ w(M).then((x) => {
962
+ x ? j(x) : G("Upload failed: No URL returned");
963
+ }).catch((x) => {
964
+ G(
965
+ typeof x == "string" ? x : (x == null ? void 0 : x.message) || "Image upload failed"
956
966
  );
957
967
  });
958
968
  }),
@@ -975,22 +985,22 @@ const ra = ({
975
985
  "help",
976
986
  "wordcount"
977
987
  ],
978
- toolbar: p ?? "undo redo | blocks | bold italic underline forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media table | removeformat | code fullscreen preview",
988
+ toolbar: b ?? "undo redo | blocks | bold italic underline forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media table | removeformat | code fullscreen preview",
979
989
  placeholder: r,
980
990
  content_style: `
981
991
  body {
982
992
  font-family: ${u};
983
993
  }
984
994
  `,
985
- ...x
995
+ ...y
986
996
  },
987
997
  onEditorChange: (M) => {
988
998
  i && i(M);
989
999
  }
990
1000
  }
991
1001
  )
992
- ] }, h), ta = ({
993
- name: h = "",
1002
+ ] }, c), ta = ({
1003
+ name: c = "",
994
1004
  label: n = "",
995
1005
  // label for single checkbox
996
1006
  options: o = [],
@@ -1002,76 +1012,76 @@ const ra = ({
1002
1012
  required: r = !1,
1003
1013
  parentClass: C = "col-span-12",
1004
1014
  className: L = "",
1005
- multiSelect: b = !1
1015
+ multiSelect: p = !1
1006
1016
  // ✅ if true, only one option can be selected (like radio)
1007
1017
  }) => {
1008
- const y = Array.isArray(o) && o.length > 0, d = (u) => y ? b ? Array.isArray(i) && i.includes(u) : i === u : !!i, p = (u) => {
1009
- s == null || s(u.target.checked, h);
1010
- }, m = (u, x) => {
1018
+ const f = Array.isArray(o) && o.length > 0, d = (u) => f ? p ? Array.isArray(i) && i.includes(u) : i === u : !!i, b = (u) => {
1019
+ s == null || s(u.target.checked, c);
1020
+ }, m = (u, y) => {
1011
1021
  if (s)
1012
- if (!b)
1013
- s(x ? u : "", h);
1022
+ if (!p)
1023
+ s(y ? u : "", c);
1014
1024
  else {
1015
1025
  const w = Array.isArray(i) ? [...i] : [];
1016
- if (x)
1026
+ if (y)
1017
1027
  w.includes(u) || w.push(u);
1018
1028
  else {
1019
1029
  const S = w.indexOf(u);
1020
1030
  S > -1 && w.splice(S, 1);
1021
1031
  }
1022
- s(w, h);
1032
+ s(w, c);
1023
1033
  }
1024
1034
  };
1025
- return y ? /* @__PURE__ */ e(G, { children: /* @__PURE__ */ c("div", { className: `${C}`, children: [
1026
- /* @__PURE__ */ e(q, { label: n, required: r }),
1027
- /* @__PURE__ */ e("div", { className: "flex flex-col space-y-2", children: o.map((u, x) => /* @__PURE__ */ c("div", { className: "flex items-center", children: [
1035
+ return f ? /* @__PURE__ */ e($, { children: /* @__PURE__ */ h("div", { className: `${C}`, children: [
1036
+ /* @__PURE__ */ e(Z, { label: n, required: r }),
1037
+ /* @__PURE__ */ e("div", { className: "flex flex-col space-y-2", children: o.map((u, y) => /* @__PURE__ */ h("div", { className: "flex items-center", children: [
1028
1038
  /* @__PURE__ */ e(
1029
1039
  "input",
1030
1040
  {
1031
1041
  type: "checkbox",
1032
- name: h,
1042
+ name: c,
1033
1043
  value: u.value,
1034
1044
  checked: d(u.value),
1035
1045
  disabled: l || u.disabled,
1036
- required: r && x === 0,
1046
+ required: r && y === 0,
1037
1047
  onChange: (w) => m(u.value, w.target.checked),
1038
1048
  className: `h-4 w-4 cursor-pointer text-blue-600 border-gray-300 rounded focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400 ${L}`
1039
1049
  },
1040
- h
1050
+ c
1041
1051
  ),
1042
1052
  u.label && /* @__PURE__ */ e(
1043
1053
  "label",
1044
1054
  {
1045
- htmlFor: h,
1055
+ htmlFor: c,
1046
1056
  className: "ml-2 text-sm text-gray-700 dark:text-gray-200 select-none",
1047
1057
  children: u.label
1048
1058
  }
1049
1059
  )
1050
1060
  ] }, u.value || u.label)) })
1051
- ] }) }) : /* @__PURE__ */ c("div", { className: `flex items-center ${C}`, children: [
1061
+ ] }) }) : /* @__PURE__ */ h("div", { className: `flex items-center ${C}`, children: [
1052
1062
  /* @__PURE__ */ e(
1053
1063
  "input",
1054
1064
  {
1055
1065
  type: "checkbox",
1056
- name: h,
1066
+ name: c,
1057
1067
  checked: d(),
1058
1068
  disabled: l,
1059
1069
  required: r,
1060
- onChange: p,
1070
+ onChange: b,
1061
1071
  className: `h-4 w-4 text-blue-600 cursor-pointer border-gray-300 rounded focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400 ${L}`
1062
1072
  }
1063
1073
  ),
1064
1074
  n && /* @__PURE__ */ e(
1065
1075
  "label",
1066
1076
  {
1067
- htmlFor: h,
1077
+ htmlFor: c,
1068
1078
  className: "ml-2 text-sm text-gray-700 dark:text-gray-200 select-none",
1069
1079
  children: n
1070
1080
  }
1071
1081
  )
1072
1082
  ] });
1073
1083
  }, la = ({
1074
- label: h = "",
1084
+ label: c = "",
1075
1085
  value: n = null,
1076
1086
  onChange: o,
1077
1087
  required: i = !1,
@@ -1080,58 +1090,58 @@ const ra = ({
1080
1090
  dragDrop: r = !1,
1081
1091
  name: C = "",
1082
1092
  parentClass: L = "",
1083
- buttonComponent: b = null,
1084
- buttonProps: y = {}
1093
+ buttonComponent: p = null,
1094
+ buttonProps: f = {}
1085
1095
  }) => {
1086
- const [d, p] = R(null), [m, u] = R(!1), x = X(null);
1087
- z(() => {
1096
+ const [d, b] = R(null), [m, u] = R(!1), y = ee(null);
1097
+ H(() => {
1088
1098
  if (!n) {
1089
- w(), p(null);
1099
+ w(), b(null);
1090
1100
  return;
1091
1101
  }
1092
1102
  if (n instanceof File) {
1093
- const f = URL.createObjectURL(n);
1094
- return p({ file: n, preview: f }), () => {
1095
- URL.revokeObjectURL(f);
1103
+ const x = URL.createObjectURL(n);
1104
+ return b({ file: n, preview: x }), () => {
1105
+ URL.revokeObjectURL(x);
1096
1106
  };
1097
- } else typeof n == "string" ? p({ preview: n }) : n != null && n.preview && p(n);
1107
+ } else typeof n == "string" ? b({ preview: n }) : n != null && n.preview && b(n);
1098
1108
  }, [n]);
1099
1109
  const w = () => {
1100
1110
  d != null && d.preview && d.preview.startsWith("blob:") && URL.revokeObjectURL(d.preview);
1101
- }, S = (f) => {
1102
- if (!f || f.length === 0)
1111
+ }, S = (x) => {
1112
+ if (!x || x.length === 0)
1103
1113
  return;
1104
- const N = f[0], O = URL.createObjectURL(N);
1105
- w(), p({ file: N, preview: O }), o == null || o(N);
1106
- }, $ = (f) => {
1107
- f && f.stopPropagation(), w(), p(null), o == null || o(null), x.current && (x.current.value = "");
1108
- }, I = (f) => {
1109
- r && (f.preventDefault(), u(!0));
1110
- }, M = (f) => {
1111
- r && (f.preventDefault(), u(!1));
1112
- }, j = (f) => {
1113
- r && (f.preventDefault(), u(!1), S(f.dataTransfer.files));
1114
- }, E = () => {
1115
- x.current.click();
1114
+ const v = x[0], I = URL.createObjectURL(v);
1115
+ w(), b({ file: v, preview: I }), o == null || o(v);
1116
+ }, E = (x) => {
1117
+ x && x.stopPropagation(), w(), b(null), o == null || o(null), y.current && (y.current.value = "");
1118
+ }, O = (x) => {
1119
+ r && (x.preventDefault(), u(!0));
1120
+ }, M = (x) => {
1121
+ r && (x.preventDefault(), u(!1));
1122
+ }, j = (x) => {
1123
+ r && (x.preventDefault(), u(!1), S(x.dataTransfer.files));
1124
+ }, G = () => {
1125
+ y.current.click();
1116
1126
  };
1117
- return /* @__PURE__ */ c("div", { className: L || "col-span-12", children: [
1118
- /* @__PURE__ */ e(q, { label: h, required: i }),
1119
- /* @__PURE__ */ c(
1127
+ return /* @__PURE__ */ h("div", { className: L || "col-span-12", children: [
1128
+ /* @__PURE__ */ e(Z, { label: c, required: i }),
1129
+ /* @__PURE__ */ h(
1120
1130
  "div",
1121
1131
  {
1122
1132
  className: `relative rounded-lg p-2 transition-all ${m ? "border-2 border-dashed border-blue-500 bg-blue-50 dark:bg-blue-900/20" : "border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800"}`,
1123
- onDragOver: I,
1133
+ onDragOver: O,
1124
1134
  onDragLeave: M,
1125
1135
  onDrop: j,
1126
1136
  children: [
1127
1137
  /* @__PURE__ */ e(
1128
1138
  "input",
1129
1139
  {
1130
- ref: x,
1140
+ ref: y,
1131
1141
  id: l,
1132
1142
  type: "file",
1133
1143
  accept: s,
1134
- onChange: (f) => S(f.target.files),
1144
+ onChange: (x) => S(x.target.files),
1135
1145
  required: i && !d,
1136
1146
  className: "absolute opacity-0 right-[50%] top-[80%] -translate-y-1/2 pointer-events-none h-[10px]"
1137
1147
  }
@@ -1142,31 +1152,31 @@ const ra = ({
1142
1152
  className: `flex items-center space-x-4 transition-all ${m ? "opacity-50" : ""}`,
1143
1153
  children: d ? (
1144
1154
  // Audio player with close button and change button
1145
- /* @__PURE__ */ c("div", { className: "flex items-center space-x-4", children: [
1146
- /* @__PURE__ */ c("div", { className: "relative w-full", children: [
1155
+ /* @__PURE__ */ h("div", { className: "flex items-center space-x-4", children: [
1156
+ /* @__PURE__ */ h("div", { className: "relative w-full", children: [
1147
1157
  !i && /* @__PURE__ */ e(
1148
1158
  "button",
1149
1159
  {
1150
1160
  type: "button",
1151
- onClick: $,
1161
+ onClick: E,
1152
1162
  className: "absolute top-0 -right-2 bg-red-500 text-white rounded-full p-1 shadow-lg hover:bg-red-600 transition-colors z-10 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800",
1153
1163
  "aria-label": "Remove audio",
1154
- children: /* @__PURE__ */ e(le, { icon: "mdi:close", className: "w-3 h-3" })
1164
+ children: /* @__PURE__ */ e(oe, { icon: "mdi:close", className: "w-3 h-3" })
1155
1165
  }
1156
1166
  ),
1157
1167
  /* @__PURE__ */ e("audio", { src: d.preview, controls: !0 }, d.preview)
1158
1168
  ] }),
1159
- /* @__PURE__ */ e(Q, { type: "button", onClick: E, children: /* @__PURE__ */ e("span", { children: "Change Audio File" }) })
1169
+ /* @__PURE__ */ e(Q, { type: "button", onClick: G, children: /* @__PURE__ */ e("span", { children: "Change Audio File" }) })
1160
1170
  ] })
1161
1171
  ) : (
1162
1172
  // Empty state with upload button
1163
- /* @__PURE__ */ c("div", { className: "flex items-center justify-center space-x-4", children: [
1164
- /* @__PURE__ */ e("div", { className: "rounded-full bg-gray-100 dark:bg-gray-700 h-20 w-20 flex items-center justify-center", children: /* @__PURE__ */ e(le, { icon: "mdi:music", className: "text-gray-400 w-10 h-10" }) }),
1173
+ /* @__PURE__ */ h("div", { className: "flex items-center justify-center space-x-4", children: [
1174
+ /* @__PURE__ */ e("div", { className: "rounded-full bg-gray-100 dark:bg-gray-700 h-20 w-20 flex items-center justify-center", children: /* @__PURE__ */ e(oe, { icon: "mdi:music", className: "text-gray-400 w-10 h-10" }) }),
1165
1175
  /* @__PURE__ */ e(
1166
1176
  Q,
1167
1177
  {
1168
1178
  type: "button",
1169
- onClick: E,
1179
+ onClick: G,
1170
1180
  variant: "outlined",
1171
1181
  children: /* @__PURE__ */ e("span", { children: "Choose Audio File" })
1172
1182
  }
@@ -1181,7 +1191,7 @@ const ra = ({
1181
1191
  }
1182
1192
  )
1183
1193
  ] }, C);
1184
- }, Ee = ({ field: h, formData: n, handleChange: o }) => {
1194
+ }, Ee = ({ field: c, formData: n, handleChange: o }) => {
1185
1195
  const {
1186
1196
  key: i,
1187
1197
  label: s,
@@ -1189,27 +1199,27 @@ const ra = ({
1189
1199
  options: r,
1190
1200
  placeholder: C,
1191
1201
  rows: L,
1192
- inputClass: b,
1193
- search: y,
1202
+ inputClass: p,
1203
+ search: f,
1194
1204
  accept: d,
1195
- text: p,
1205
+ text: b,
1196
1206
  required: m = !1,
1197
1207
  minLength: u,
1198
- dragDrop: x,
1208
+ dragDrop: y,
1199
1209
  parentClass: w,
1200
1210
  countriesList: S,
1201
- defaultCountry: $,
1202
- multiple: I,
1211
+ defaultCountry: E,
1212
+ multiple: O,
1203
1213
  dropdownMaxHeight: M,
1204
1214
  editorKey: j,
1205
- fontFamily: E,
1206
- disabled: f,
1207
- negativeNumberAllow: N,
1208
- defaultValue: O
1209
- } = h;
1215
+ fontFamily: G,
1216
+ disabled: x,
1217
+ negativeNumberAllow: v,
1218
+ defaultValue: I
1219
+ } = c;
1210
1220
  let D = n == null ? void 0 : n[i];
1211
1221
  D == null && (D = "");
1212
- const F = C || (l === "select" ? `Select ${s}` : `Enter ${s}`), U = "w-full px-3 py-2 rounded-md border border-gray-300 dark:border-gray-600 text-sm focus:outline-none focus:ring-1 focus:ring-blue-200 bg-white text-black dark:bg-gray-700 dark:text-white";
1222
+ const F = C || (l === "select" ? `Select ${s}` : `Enter ${s}`), z = "w-full px-3 py-2 rounded-md border border-gray-300 dark:border-gray-600 text-sm focus:outline-none focus:ring-1 focus:ring-blue-200 bg-white text-black dark:bg-gray-700 dark:text-white";
1213
1223
  switch (l) {
1214
1224
  case "select":
1215
1225
  return /* @__PURE__ */ e(
@@ -1219,15 +1229,15 @@ const ra = ({
1219
1229
  value: D,
1220
1230
  onChange: (A) => o(i, A),
1221
1231
  placeholder: F,
1222
- className: b || "",
1223
- search: y,
1232
+ className: p || "",
1233
+ search: f,
1224
1234
  required: m,
1225
- defaultValue: O,
1235
+ defaultValue: I,
1226
1236
  label: s,
1227
1237
  name: i,
1228
- disabled: f,
1238
+ disabled: x,
1229
1239
  parentClass: w,
1230
- multiple: I,
1240
+ multiple: O,
1231
1241
  dropdownMaxHeight: M
1232
1242
  }
1233
1243
  );
@@ -1242,9 +1252,9 @@ const ra = ({
1242
1252
  onChange: (A) => o(i, A),
1243
1253
  required: m,
1244
1254
  parentClass: w,
1245
- className: b || "",
1246
- multiSelect: I,
1247
- disabled: f
1255
+ className: p || "",
1256
+ multiSelect: O,
1257
+ disabled: x
1248
1258
  }
1249
1259
  );
1250
1260
  case "switch":
@@ -1253,12 +1263,12 @@ const ra = ({
1253
1263
  {
1254
1264
  value: D,
1255
1265
  onChange: (A) => o(i, A),
1256
- text: p,
1266
+ text: b,
1257
1267
  options: r || [],
1258
1268
  label: s,
1259
1269
  required: m,
1260
1270
  name: i,
1261
- disabled: f,
1271
+ disabled: x,
1262
1272
  parentClass: w
1263
1273
  }
1264
1274
  );
@@ -1269,13 +1279,13 @@ const ra = ({
1269
1279
  value: D,
1270
1280
  onChange: (A) => o(i, A),
1271
1281
  countriesList: S,
1272
- defaultCountry: $,
1282
+ defaultCountry: E,
1273
1283
  required: m,
1274
1284
  placeholder: F,
1275
- search: y,
1285
+ search: f,
1276
1286
  label: s,
1277
1287
  name: i,
1278
- disabled: f,
1288
+ disabled: x,
1279
1289
  parentClass: w
1280
1290
  }
1281
1291
  );
@@ -1287,11 +1297,11 @@ const ra = ({
1287
1297
  onChange: (A) => o(i, A.target.value),
1288
1298
  placeholder: F,
1289
1299
  rows: L || 3,
1290
- className: `${U} ${b || ""}`,
1300
+ className: `${z} ${p || ""}`,
1291
1301
  required: m,
1292
1302
  name: i,
1293
1303
  label: s,
1294
- disabled: f,
1304
+ disabled: x,
1295
1305
  parentClass: w
1296
1306
  }
1297
1307
  );
@@ -1304,7 +1314,7 @@ const ra = ({
1304
1314
  required: m,
1305
1315
  accept: d || "image/*",
1306
1316
  id: `file-${i}`,
1307
- dragDrop: x,
1317
+ dragDrop: y,
1308
1318
  label: s,
1309
1319
  name: i,
1310
1320
  parentClass: w
@@ -1319,7 +1329,7 @@ const ra = ({
1319
1329
  required: m,
1320
1330
  accept: d || "audio/*",
1321
1331
  id: `file-${i}`,
1322
- dragDrop: x,
1332
+ dragDrop: y,
1323
1333
  label: s,
1324
1334
  name: i,
1325
1335
  parentClass: w
@@ -1335,9 +1345,9 @@ const ra = ({
1335
1345
  placeholder: F,
1336
1346
  label: s,
1337
1347
  parentClass: w,
1338
- fontFamily: E,
1348
+ fontFamily: G,
1339
1349
  editorKey: j,
1340
- disabled: f
1350
+ disabled: x
1341
1351
  },
1342
1352
  `editor-${i}`
1343
1353
  );
@@ -1349,43 +1359,43 @@ const ra = ({
1349
1359
  value: D,
1350
1360
  onChange: (A) => o(i, A.target.value),
1351
1361
  placeholder: F,
1352
- className: `${U} ${b || ""}`,
1362
+ className: `${z} ${p || ""}`,
1353
1363
  required: m,
1354
1364
  name: i,
1355
1365
  minLength: u,
1356
1366
  label: s,
1357
- negativeNumberAllow: N,
1367
+ negativeNumberAllow: v,
1358
1368
  parentClass: w,
1359
- disabled: f
1369
+ disabled: x
1360
1370
  }
1361
1371
  );
1362
1372
  }
1363
- }, na = ({ isOpen: h, onClose: n, config: o, onApply: i }) => {
1364
- var b;
1365
- const [s, l] = R({}), r = (y, d) => {
1366
- l((p) => ({ ...p, [y]: d }));
1373
+ }, na = ({ isOpen: c, onClose: n, config: o, onApply: i }) => {
1374
+ var p;
1375
+ const [s, l] = R({}), r = (f, d) => {
1376
+ l((b) => ({ ...b, [f]: d }));
1367
1377
  }, C = () => {
1368
1378
  i == null || i(s), n();
1369
1379
  }, L = () => {
1370
1380
  l({}), i == null || i({}), n();
1371
1381
  };
1372
- return /* @__PURE__ */ c(G, { children: [
1382
+ return /* @__PURE__ */ h($, { children: [
1373
1383
  /* @__PURE__ */ e(
1374
1384
  "div",
1375
1385
  {
1376
- className: `fixed inset-0 bg-black/50 z-40 transition-opacity duration-300 ${h ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"}`,
1386
+ className: `fixed inset-0 bg-black/50 z-40 transition-opacity duration-300 ${c ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"}`,
1377
1387
  onClick: n
1378
1388
  }
1379
1389
  ),
1380
- /* @__PURE__ */ c(
1390
+ /* @__PURE__ */ h(
1381
1391
  "div",
1382
1392
  {
1383
1393
  className: `fixed top-0 right-0 h-full w-[28rem] bg-white dark:bg-gray-900 shadow-2xl z-50 flex flex-col border-l border-gray-200 dark:border-gray-700
1384
1394
  transform transition-transform duration-300 ease-in-out
1385
- ${h ? "translate-x-0" : "translate-x-full"}
1395
+ ${c ? "translate-x-0" : "translate-x-full"}
1386
1396
  `,
1387
1397
  children: [
1388
- /* @__PURE__ */ c("div", { className: "flex items-center justify-between px-4 py-3 border-b border-gray-200 dark:border-gray-700", children: [
1398
+ /* @__PURE__ */ h("div", { className: "flex items-center justify-between px-4 py-3 border-b border-gray-200 dark:border-gray-700", children: [
1389
1399
  /* @__PURE__ */ e("h2", { className: "text-lg font-semibold text-gray-900 dark:text-white", children: "Filters" }),
1390
1400
  /* @__PURE__ */ e(
1391
1401
  "button",
@@ -1396,16 +1406,16 @@ const ra = ({
1396
1406
  }
1397
1407
  )
1398
1408
  ] }),
1399
- /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto px-4 py-3", children: o != null && o.component ? /* @__PURE__ */ e(o.component, { filters: s, onFilterChange: r }) : /* @__PURE__ */ e("div", { className: "space-y-4", children: (b = o == null ? void 0 : o.fields) == null ? void 0 : b.map((y) => /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(
1409
+ /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto px-4 py-3", children: o != null && o.component ? /* @__PURE__ */ e(o.component, { filters: s, onFilterChange: r }) : /* @__PURE__ */ e("div", { className: "space-y-4", children: (p = o == null ? void 0 : o.fields) == null ? void 0 : p.map((f) => /* @__PURE__ */ e($, { children: /* @__PURE__ */ e(
1400
1410
  Ee,
1401
1411
  {
1402
- field: y,
1412
+ field: f,
1403
1413
  formData: s,
1404
1414
  handleChange: r
1405
1415
  },
1406
- y.key
1416
+ f.key
1407
1417
  ) })) }) }),
1408
- /* @__PURE__ */ c("div", { className: "flex gap-2 px-4 py-3 border-t border-gray-200 dark:border-gray-700", children: [
1418
+ /* @__PURE__ */ h("div", { className: "flex gap-2 px-4 py-3 border-t border-gray-200 dark:border-gray-700", children: [
1409
1419
  /* @__PURE__ */ e(
1410
1420
  Q,
1411
1421
  {
@@ -1464,7 +1474,7 @@ const ra = ({
1464
1474
  outline: "border !bg-transparent",
1465
1475
  soft: "bg opacity-90"
1466
1476
  }, $e = ({
1467
- label: h,
1477
+ label: c,
1468
1478
  variant: n = "contained",
1469
1479
  // contained | outline | soft
1470
1480
  color: o = "green",
@@ -1478,14 +1488,14 @@ const ra = ({
1478
1488
  ${r}
1479
1489
  ${l}
1480
1490
  ${i}`,
1481
- children: h
1491
+ children: c
1482
1492
  }
1483
1493
  );
1484
- }, oa = ({ rows: h = 5, columns: n = 5 }) => /* @__PURE__ */ c(G, { children: [
1494
+ }, oa = ({ rows: c = 5, columns: n = 5 }) => /* @__PURE__ */ h($, { children: [
1485
1495
  /* @__PURE__ */ e("div", { className: "w-full mb-6 inline-flex justify-end items-center", children: /* @__PURE__ */ e("div", { className: "h-8 w-80 bg-gray-300 dark:bg-gray-700 rounded animate-pulse" }) }),
1486
- /* @__PURE__ */ e("div", { className: "overflow-hidden rounded-md border border-gray-200 dark:border-gray-800", children: /* @__PURE__ */ c("table", { className: "w-full border-collapse", children: [
1496
+ /* @__PURE__ */ e("div", { className: "overflow-hidden rounded-md border border-gray-200 dark:border-gray-800", children: /* @__PURE__ */ h("table", { className: "w-full border-collapse", children: [
1487
1497
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { className: "bg-gray-50 dark:bg-gray-900", children: Array.from({ length: n }).map((o, i) => /* @__PURE__ */ e("th", { className: "px-4 py-3", children: /* @__PURE__ */ e("div", { className: "h-6 w-24 bg-gray-300 dark:bg-gray-700 rounded animate-pulse inline-flex justify-center items-center" }) }, i)) }) }),
1488
- /* @__PURE__ */ e("tbody", { children: Array.from({ length: h }).map((o, i) => /* @__PURE__ */ e(
1498
+ /* @__PURE__ */ e("tbody", { children: Array.from({ length: c }).map((o, i) => /* @__PURE__ */ e(
1489
1499
  "tr",
1490
1500
  {
1491
1501
  className: "border-t border-gray-200 dark:border-gray-800",
@@ -1494,16 +1504,16 @@ const ra = ({
1494
1504
  i
1495
1505
  )) })
1496
1506
  ] }) })
1497
- ] }), Ge = ({ src: h, alt: n = "preview", isOpen: o, setIsOpen: i }) => {
1507
+ ] }), Ge = ({ src: c, alt: n = "preview", isOpen: o, setIsOpen: i }) => {
1498
1508
  const s = () => i(!1);
1499
- return z(() => {
1509
+ return H(() => {
1500
1510
  const l = (r) => {
1501
1511
  r.key === "Escape" && s();
1502
1512
  };
1503
1513
  return o && (document.body.style.overflow = "hidden", document.addEventListener("keydown", l)), () => {
1504
1514
  document.body.style.overflow = "", document.removeEventListener("keydown", l);
1505
1515
  };
1506
- }, [o]), /* @__PURE__ */ e(G, { children: /* @__PURE__ */ c(
1516
+ }, [o]), /* @__PURE__ */ e($, { children: /* @__PURE__ */ h(
1507
1517
  "div",
1508
1518
  {
1509
1519
  className: `fixed inset-0 z-50 flex items-center justify-center bg-black/70 dark:bg-black/80 \r
@@ -1527,7 +1537,7 @@ const ra = ({
1527
1537
  children: /* @__PURE__ */ e(
1528
1538
  "img",
1529
1539
  {
1530
- src: h,
1540
+ src: c,
1531
1541
  alt: n,
1532
1542
  className: "w-full max-h-[90vh] object-contain rounded-xl"
1533
1543
  }
@@ -1537,7 +1547,7 @@ const ra = ({
1537
1547
  ]
1538
1548
  }
1539
1549
  ) });
1540
- }, ia = ({ config: h }) => {
1550
+ }, ia = ({ config: c }) => {
1541
1551
  const {
1542
1552
  data: n = [],
1543
1553
  table_head: o = [],
@@ -1558,18 +1568,18 @@ const ra = ({
1558
1568
  },
1559
1569
  emptyMessage: C = "No data available",
1560
1570
  onMenuAction: L,
1561
- setServerSidePaginationData: b = () => {
1571
+ setServerSidePaginationData: p = () => {
1562
1572
  },
1563
- onFilterApply: y,
1573
+ onFilterApply: f,
1564
1574
  filterConfig: d = null
1565
- } = h, [p, m] = R(""), [u, x] = R(null), [w, S] = R([]), [$, I] = R({}), [M, j] = R(!1), [E, f] = R(null), [N, O] = R(!1), D = Me(() => !s.enabled || !p.trim() || s.useServerSideSearch ? n : Je(n, p, s.searchKeys || []), [n, p, s]), [F, U] = R(1), [A, v] = R((r == null ? void 0 : r.rows_per_page) || 50), [H, Z] = R(D.length || 0), W = r != null && r.useServerSidePagination ? r.total_pages : Math.ceil(D.length / A), re = Me(() => {
1575
+ } = c, [b, m] = R(""), [u, y] = R(null), [w, S] = R([]), [E, O] = R({}), [M, j] = R(!1), [G, x] = R(null), [v, I] = R(!1), D = Me(() => !s.enabled || !b.trim() || s.useServerSideSearch ? n : Je(n, b, s.searchKeys || []), [n, b, s]), [F, z] = R(1), [A, Y] = R((r == null ? void 0 : r.rows_per_page) || 50), [ae, N] = R(D.length || 0), U = r != null && r.useServerSidePagination ? r.total_pages : Math.ceil(D.length / A), X = Me(() => {
1566
1576
  if (r.useServerSidePagination) return D;
1567
1577
  const t = (F - 1) * A;
1568
1578
  return D.slice(t, t + A);
1569
- }, [D, F, A]), ne = X(null), se = X({}), oe = X(null), te = (t) => {
1570
- m(t), U(1), s.useServerSideSearch && (oe.current && clearTimeout(oe.current), oe.current = setTimeout(async () => {
1579
+ }, [D, F, A]), q = ee(null), le = ee({}), ie = ee(null), ne = (t) => {
1580
+ m(t), z(1), s.useServerSideSearch && (ie.current && clearTimeout(ie.current), ie.current = setTimeout(async () => {
1571
1581
  try {
1572
- await b((g) => ({
1582
+ await p((g) => ({
1573
1583
  ...g,
1574
1584
  search: t,
1575
1585
  current_page: 1
@@ -1579,19 +1589,19 @@ const ra = ({
1579
1589
  }
1580
1590
  }, 800));
1581
1591
  }, xe = (t, g, T) => {
1582
- T.stopPropagation(), x(null), L == null || L(t.type, g);
1592
+ T.stopPropagation(), y(null), L == null || L(t.type, g);
1583
1593
  }, ve = (t, g, T) => {
1584
1594
  g.stopPropagation(), S(T);
1585
1595
  const K = g.currentTarget;
1586
- se.current[t] = K;
1587
- const _ = K.getBoundingClientRect(), J = 192, V = T.length * 40, ee = window.innerWidth, k = window.innerHeight, B = ee - _.right < J ? _.left - J + _.width : _.left, Y = k - _.bottom < V && _.top > V ? _.top - V - 2 : _.bottom + 2;
1588
- I({
1589
- top: Math.max(8, Math.min(Y, k - V - 8)),
1590
- left: Math.max(8, Math.min(B, ee - J - 8))
1591
- }), x(u === t ? null : t);
1596
+ le.current[t] = K;
1597
+ const _ = K.getBoundingClientRect(), J = 192, W = T.length * 40, re = window.innerWidth, k = window.innerHeight, B = re - _.right < J ? _.left - J + _.width : _.left, V = k - _.bottom < W && _.top > W ? _.top - W - 2 : _.bottom + 2;
1598
+ O({
1599
+ top: Math.max(8, Math.min(V, k - W - 8)),
1600
+ left: Math.max(8, Math.min(B, re - J - 8))
1601
+ }), y(u === t ? null : t);
1592
1602
  }, we = (t) => (F - 1) * A + t + 1, de = (t) => {
1593
- f(t), O(!0);
1594
- }, ie = (t, g, T, K = null) => /* @__PURE__ */ e(G, { children: t ? /* @__PURE__ */ e(
1603
+ x(t), I(!0);
1604
+ }, se = (t, g, T, K = null) => /* @__PURE__ */ e($, { children: t ? /* @__PURE__ */ e(
1595
1605
  "img",
1596
1606
  {
1597
1607
  src: t,
@@ -1601,13 +1611,13 @@ const ra = ({
1601
1611
  },
1602
1612
  className: `w-10 h-10 cursor-pointer rounded-full object-cover border border-gray-200 dark:border-gray-700 ${T || ""}`
1603
1613
  }
1604
- ) : /* @__PURE__ */ e(G, { children: K || /* @__PURE__ */ e(
1614
+ ) : /* @__PURE__ */ e($, { children: K || /* @__PURE__ */ e(
1605
1615
  "div",
1606
1616
  {
1607
1617
  className: `w-10 h-10 flex items-center shrink-0 justify-center rounded-full border border-gray-300 dark:border-gray-700 bg-gray-200 dark:bg-gray-600 ${T || ""}`,
1608
1618
  children: /* @__PURE__ */ e(Ie, { className: "w-6 h-6 text-gray-400 dark:text-gray-400" })
1609
1619
  }
1610
- ) }) }), ce = (t, g) => /* @__PURE__ */ e(G, { children: t ? /* @__PURE__ */ e(
1620
+ ) }) }), ce = (t, g) => /* @__PURE__ */ e($, { children: t ? /* @__PURE__ */ e(
1611
1621
  "audio",
1612
1622
  {
1613
1623
  controls: !0,
@@ -1618,15 +1628,15 @@ const ra = ({
1618
1628
  className: `w-64 cursor-pointer ${g || ""}`
1619
1629
  },
1620
1630
  t
1621
- ) : /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(
1631
+ ) : /* @__PURE__ */ e($, { children: /* @__PURE__ */ e(
1622
1632
  "div",
1623
1633
  {
1624
1634
  className: `w-12 h-12 flex items-center shrink-0 justify-center rounded-full border border-gray-300 dark:border-gray-700 bg-gray-200 dark:bg-gray-600 ${g || ""}`,
1625
1635
  children: /* @__PURE__ */ e(Ye, { className: "w-6 h-6 text-gray-400 dark:text-gray-400" })
1626
1636
  }
1627
- ) }) }), he = (t, g) => /* @__PURE__ */ c("div", { className: `flex items-center space-x-4 ${g.className || ""}`, children: [
1628
- g.imageKey ? ie(t[g.imageKey], t[g.titleKey], "group-avatar") : "",
1629
- /* @__PURE__ */ c("div", { children: [
1637
+ ) }) }), he = (t, g) => /* @__PURE__ */ h("div", { className: `flex items-center space-x-4 ${g.className || ""}`, children: [
1638
+ g.imageKey ? se(t[g.imageKey], t[g.titleKey], "group-avatar") : "",
1639
+ /* @__PURE__ */ h("div", { children: [
1630
1640
  /* @__PURE__ */ e("p", { className: "font-medium text-gray-900 dark:text-white group-title", children: t[g.titleKey] || "" }),
1631
1641
  /* @__PURE__ */ e("p", { className: "text-sm text-gray-500 dark:text-gray-400 group-sub-title", children: t[g.subtitleKey] || "" })
1632
1642
  ] })
@@ -1636,8 +1646,8 @@ const ra = ({
1636
1646
  const K = g.variant || "contained";
1637
1647
  let _ = g.defaultColor;
1638
1648
  if (((J = g == null ? void 0 : g.chipOptions) == null ? void 0 : J.length) > 0) {
1639
- let V = g == null ? void 0 : g.chipOptions.find((ee) => ee.value == t);
1640
- V && (T = V.label, _ = V.color);
1649
+ let W = g == null ? void 0 : g.chipOptions.find((re) => re.value == t);
1650
+ W && (T = W.label, _ = W.color);
1641
1651
  }
1642
1652
  return /* @__PURE__ */ e(
1643
1653
  $e,
@@ -1648,71 +1658,71 @@ const ra = ({
1648
1658
  className: g.className || ""
1649
1659
  }
1650
1660
  );
1651
- }, be = (t, g, T) => {
1661
+ }, pe = (t, g, T) => {
1652
1662
  const K = g[t.key];
1653
1663
  return t.type === "menu_actions" ? /* @__PURE__ */ e("div", { className: `text-center ${t.className || ""}`, children: /* @__PURE__ */ e(
1654
1664
  "button",
1655
1665
  {
1656
- ref: (_) => se.current[g.id || g._id] = _,
1666
+ ref: (_) => le.current[g.id || g._id] = _,
1657
1667
  onClick: (_) => ve(g.id || g._id, _, t.menuList),
1658
1668
  className: "p-2 bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-full transition text-gray-700 dark:text-gray-300",
1659
1669
  children: /* @__PURE__ */ e(He, { className: "h-4 w-4" })
1660
1670
  }
1661
- ) }) : t.type === "index" ? /* @__PURE__ */ e("span", { className: t.className || "", children: we(T) }) : t.type === "group" ? he(g, t) : t.type === "chip" ? /* @__PURE__ */ e(G, { children: ue(K, t) }) : t.type === "date" ? /* @__PURE__ */ e("span", { className: t.className || "", children: Oe(K, t.format || "DD MMM YYYY") }) : t.type === "avatar" ? /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e("div", { className: "min-w-[40px]", children: ie(K, t.alt, t.className, t.fallback_icon) }) }) : t.type === "audio" ? /* @__PURE__ */ e(G, { children: ce(K, t.className) }) : /* @__PURE__ */ e("span", { className: t.className || "", children: K || "N/A" });
1662
- }, pe = (t, g) => {
1671
+ ) }) : t.type === "index" ? /* @__PURE__ */ e("span", { className: t.className || "", children: we(T) }) : t.type === "group" ? he(g, t) : t.type === "chip" ? /* @__PURE__ */ e($, { children: ue(K, t) }) : t.type === "date" ? /* @__PURE__ */ e("span", { className: t.className || "", children: Oe(K, t.format || "DD MMM YYYY") }) : t.type === "avatar" ? /* @__PURE__ */ e($, { children: /* @__PURE__ */ e("div", { className: "min-w-[40px]", children: se(K, t.alt, t.className, t.fallback_icon) }) }) : t.type === "audio" ? /* @__PURE__ */ e($, { children: ce(K, t.className) }) : /* @__PURE__ */ e("span", { className: t.className || "", children: K || "N/A" });
1672
+ }, be = (t, g) => {
1663
1673
  if (t.onClickDetails)
1664
1674
  return L == null ? void 0 : L("view", g);
1665
1675
  if (typeof t.handleClick == "function")
1666
1676
  return t.handleClick(g);
1667
1677
  }, ge = (t) => t.onClickDetails || typeof t.handleClick == "function";
1668
- return z(() => {
1678
+ return H(() => {
1669
1679
  const t = () => {
1670
- u && x(null);
1680
+ u && y(null);
1671
1681
  };
1672
1682
  return window.addEventListener("scroll", t, !0), () => {
1673
1683
  window.removeEventListener("scroll", t, !0);
1674
1684
  };
1675
- }, [u]), z(() => {
1685
+ }, [u]), H(() => {
1676
1686
  const t = (g) => {
1677
- ne.current && !ne.current.contains(g.target) && x(null);
1687
+ q.current && !q.current.contains(g.target) && y(null);
1678
1688
  };
1679
1689
  return document.addEventListener("click", t), () => document.removeEventListener("click", t);
1680
- }, []), z(() => {
1681
- r != null && r.rows_per_page && (r != null && r.useServerSidePagination) && v((r == null ? void 0 : r.rows_per_page) || 50), r.current_page && U(r.current_page);
1690
+ }, []), H(() => {
1691
+ r != null && r.rows_per_page && (r != null && r.useServerSidePagination) && Y((r == null ? void 0 : r.rows_per_page) || 50), r.current_page && z(r.current_page);
1682
1692
  }, [
1683
1693
  r.rows_per_page,
1684
1694
  r == null ? void 0 : r.useServerSidePagination,
1685
1695
  r.current_page
1686
- ]), z(() => {
1687
- Z(
1696
+ ]), H(() => {
1697
+ N(
1688
1698
  r != null && r.useServerSidePagination ? r.total_records : D.length
1689
- ), D.length <= A * (F - 1) && !(r != null && r.useServerSidePagination) && U((t) => t - 1 || 1);
1699
+ ), D.length <= A * (F - 1) && !(r != null && r.useServerSidePagination) && z((t) => t - 1 || 1);
1690
1700
  }, [
1691
1701
  D.length,
1692
1702
  r.total_records,
1693
1703
  r == null ? void 0 : r.useServerSidePagination
1694
- ]), i ? /* @__PURE__ */ e(oa, { rows: 6, columns: 6 }) : /* @__PURE__ */ c(G, { children: [
1695
- /* @__PURE__ */ c("div", { className: "flex justify-end items-center mb-4 gap-2", children: [
1696
- s.enabled && /* @__PURE__ */ e("div", { className: "", children: /* @__PURE__ */ c("div", { className: "relative min-w-[300px]", children: [
1704
+ ]), i ? /* @__PURE__ */ e(oa, { rows: 6, columns: 6 }) : /* @__PURE__ */ h($, { children: [
1705
+ /* @__PURE__ */ h("div", { className: "flex justify-end items-center mb-4 gap-2", children: [
1706
+ s.enabled && /* @__PURE__ */ e("div", { className: "", children: /* @__PURE__ */ h("div", { className: "relative min-w-[300px]", children: [
1697
1707
  /* @__PURE__ */ e(Re, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 dark:text-gray-300" }),
1698
1708
  /* @__PURE__ */ e(
1699
1709
  "input",
1700
1710
  {
1701
1711
  type: "text",
1702
1712
  placeholder: s.placeholder || "Search...",
1703
- value: p,
1704
- onChange: (t) => te(t.target.value),
1713
+ value: b,
1714
+ onChange: (t) => ne(t.target.value),
1705
1715
  className: "w-full h-[36px] pl-9 pr-4 py-3 text-sm border border-gray-300 dark:border-gray-600 rounded-md bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-300 dark:ring-blue-200 disabled:opacity-50"
1706
1716
  }
1707
1717
  )
1708
1718
  ] }) }),
1709
- d && l.enabled && /* @__PURE__ */ c(Q, { onClick: () => j(!0), variant: "contained", children: [
1719
+ d && l.enabled && /* @__PURE__ */ h(Q, { onClick: () => j(!0), variant: "contained", children: [
1710
1720
  /* @__PURE__ */ e(Ke, { className: "w-4 h-4 mr-2" }),
1711
1721
  "Filters"
1712
1722
  ] })
1713
1723
  ] }),
1714
- /* @__PURE__ */ c("div", { className: "bg-white dark:bg-gray-800 rounded-lg shadow overflow-hidden border border-gray-200 dark:border-gray-700", children: [
1715
- /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ c("table", { className: "min-w-full divide-y divide-gray-200 dark:divide-gray-700", children: [
1724
+ /* @__PURE__ */ h("div", { className: "bg-white dark:bg-gray-800 rounded-lg shadow overflow-hidden border border-gray-200 dark:border-gray-700", children: [
1725
+ /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ h("table", { className: "min-w-full divide-y divide-gray-200 dark:divide-gray-700", children: [
1716
1726
  /* @__PURE__ */ e("thead", { className: "bg-gray-50 dark:bg-gray-700/60", children: /* @__PURE__ */ e("tr", { children: o.map((t) => /* @__PURE__ */ e(
1717
1727
  "th",
1718
1728
  {
@@ -1721,14 +1731,14 @@ const ra = ({
1721
1731
  },
1722
1732
  t.key
1723
1733
  )) }) }),
1724
- /* @__PURE__ */ e("tbody", { className: "bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700", children: re.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
1734
+ /* @__PURE__ */ e("tbody", { className: "bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700", children: X.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
1725
1735
  "td",
1726
1736
  {
1727
1737
  colSpan: o.length,
1728
1738
  className: "text-center py-10 text-gray-500 dark:text-gray-400",
1729
1739
  children: C
1730
1740
  }
1731
- ) }) : re.map((t, g) => /* @__PURE__ */ e(
1741
+ ) }) : X.map((t, g) => /* @__PURE__ */ e(
1732
1742
  "tr",
1733
1743
  {
1734
1744
  className: "hover:bg-gray-50 dark:hover:bg-blue-800/10 transition",
@@ -1737,8 +1747,8 @@ const ra = ({
1737
1747
  {
1738
1748
  className: `px-6 py-4 text-sm text-gray-900 dark:text-gray-100 min-w-max ${T.type == "audio" ? "" : "max-w-[300px]"} truncate ${ge(T) ? "cursor-pointer" : ""}`,
1739
1749
  title: String(t[T.key] ?? ""),
1740
- onClick: () => pe(T, t),
1741
- children: T.render ? T.render(t, g) : be(T, t, g)
1750
+ onClick: () => be(T, t),
1751
+ children: T.render ? T.render(t, g) : pe(T, t, g)
1742
1752
  },
1743
1753
  T.key
1744
1754
  ))
@@ -1746,20 +1756,20 @@ const ra = ({
1746
1756
  t.id || t._id || g
1747
1757
  )) })
1748
1758
  ] }) }),
1749
- (r == null ? void 0 : r.enabled) && D.length > 0 && /* @__PURE__ */ c("div", { className: " bg-gray-50 dark:bg-gray-700/60 px-6 py-3 flex flex-wrap items-center justify-between border-t border-gray-200 dark:border-gray-600 gap-3", children: [
1750
- /* @__PURE__ */ c("div", { className: "text-sm text-gray-700 dark:text-gray-300", children: [
1759
+ (r == null ? void 0 : r.enabled) && D.length > 0 && /* @__PURE__ */ h("div", { className: " bg-gray-50 dark:bg-gray-700/60 px-6 py-3 flex flex-wrap items-center justify-between border-t border-gray-200 dark:border-gray-600 gap-3", children: [
1760
+ /* @__PURE__ */ h("div", { className: "text-sm text-gray-700 dark:text-gray-300", children: [
1751
1761
  "Showing ",
1752
1762
  (F - 1) * A + 1,
1753
1763
  " to",
1754
1764
  " ",
1755
- Math.min(F * A, H),
1765
+ Math.min(F * A, ae),
1756
1766
  " of ",
1757
- H,
1767
+ ae,
1758
1768
  " ",
1759
1769
  "results"
1760
1770
  ] }),
1761
- /* @__PURE__ */ c("div", { className: "flex items-center gap-4", children: [
1762
- /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
1771
+ /* @__PURE__ */ h("div", { className: "flex items-center gap-4", children: [
1772
+ /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1763
1773
  /* @__PURE__ */ e("span", { className: "text-sm text-gray-700 dark:text-gray-300", children: "Rows per page:" }),
1764
1774
  /* @__PURE__ */ e(
1765
1775
  "select",
@@ -1767,7 +1777,7 @@ const ra = ({
1767
1777
  value: A,
1768
1778
  onChange: (t) => {
1769
1779
  const g = Number(t.target.value);
1770
- v(g), U(1), r.useServerSidePagination && b((T) => ({
1780
+ Y(g), z(1), r.useServerSidePagination && p((T) => ({
1771
1781
  ...T,
1772
1782
  current_page: 1,
1773
1783
  rows_per_page: g
@@ -1778,14 +1788,14 @@ const ra = ({
1778
1788
  }
1779
1789
  )
1780
1790
  ] }),
1781
- /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
1791
+ /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1782
1792
  /* @__PURE__ */ e(
1783
1793
  "button",
1784
1794
  {
1785
1795
  onClick: () => {
1786
1796
  if (F > 1) {
1787
1797
  const t = F - 1;
1788
- U(t), r.useServerSidePagination && b((g) => ({
1798
+ z(t), r.useServerSidePagination && p((g) => ({
1789
1799
  ...g,
1790
1800
  current_page: t
1791
1801
  }));
@@ -1796,25 +1806,25 @@ const ra = ({
1796
1806
  children: /* @__PURE__ */ e(Ue, { className: "h-4 w-4" })
1797
1807
  }
1798
1808
  ),
1799
- /* @__PURE__ */ c("span", { className: "text-sm text-gray-800 dark:text-gray-200", children: [
1809
+ /* @__PURE__ */ h("span", { className: "text-sm text-gray-800 dark:text-gray-200", children: [
1800
1810
  "Page ",
1801
1811
  F,
1802
1812
  " of ",
1803
- W
1813
+ U
1804
1814
  ] }),
1805
1815
  /* @__PURE__ */ e(
1806
1816
  "button",
1807
1817
  {
1808
1818
  onClick: () => {
1809
- if (F < W) {
1819
+ if (F < U) {
1810
1820
  const t = F + 1;
1811
- U(t), r.useServerSidePagination && b((g) => ({
1821
+ z(t), r.useServerSidePagination && p((g) => ({
1812
1822
  ...g,
1813
1823
  current_page: t
1814
1824
  }));
1815
1825
  }
1816
1826
  },
1817
- disabled: F === W,
1827
+ disabled: F === U,
1818
1828
  className: "p-2 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-md transition text-gray-500 dark:text-gray-300 disabled:opacity-50",
1819
1829
  children: /* @__PURE__ */ e(ze, { className: "h-4 w-4" })
1820
1830
  }
@@ -1827,15 +1837,15 @@ const ra = ({
1827
1837
  /* @__PURE__ */ e(
1828
1838
  "div",
1829
1839
  {
1830
- ref: ne,
1840
+ ref: q,
1831
1841
  style: {
1832
1842
  position: "fixed",
1833
- top: `${$.top}px`,
1834
- left: `${$.left}px`,
1843
+ top: `${E.top}px`,
1844
+ left: `${E.left}px`,
1835
1845
  zIndex: 9999
1836
1846
  },
1837
1847
  className: "w-48 bg-white dark:bg-gray-700 rounded-md shadow-lg border border-gray-200 dark:border-gray-600",
1838
- children: w.map((t, g) => /* @__PURE__ */ c(
1848
+ children: w.map((t, g) => /* @__PURE__ */ h(
1839
1849
  "button",
1840
1850
  {
1841
1851
  onClick: (T) => xe(
@@ -1863,21 +1873,21 @@ const ra = ({
1863
1873
  isOpen: M,
1864
1874
  onClose: () => j(!1),
1865
1875
  config: d,
1866
- onApply: y
1876
+ onApply: f
1867
1877
  }
1868
1878
  ),
1869
- N && /* @__PURE__ */ e(
1879
+ v && /* @__PURE__ */ e(
1870
1880
  Ge,
1871
1881
  {
1872
- src: E.src,
1873
- alt: E.alt,
1874
- isOpen: N,
1875
- setIsOpen: O
1882
+ src: G.src,
1883
+ alt: G.alt,
1884
+ isOpen: v,
1885
+ setIsOpen: I
1876
1886
  }
1877
1887
  )
1878
1888
  ] });
1879
1889
  }, fe = ({
1880
- isOpen: h,
1890
+ isOpen: c,
1881
1891
  onClose: n,
1882
1892
  icon: o,
1883
1893
  title: i,
@@ -1886,17 +1896,17 @@ const ra = ({
1886
1896
  actionButtons: r = [],
1887
1897
  actions: C,
1888
1898
  showDefaultClose: L = !0,
1889
- footerConfig: b = null,
1890
- hideFooter: y = !1,
1899
+ footerConfig: p = null,
1900
+ hideFooter: f = !1,
1891
1901
  onFormSubmit: d = () => {
1892
1902
  },
1893
- onCancel: p,
1903
+ onCancel: b,
1894
1904
  loadingBtn: m = !1,
1895
1905
  executeFunction: u = () => {
1896
1906
  },
1897
- selectedItem: x = null
1907
+ selectedItem: y = null
1898
1908
  }) => {
1899
- if (!h) return null;
1909
+ if (!c) return null;
1900
1910
  const w = {
1901
1911
  sm: "max-w-md",
1902
1912
  md: "max-w-lg",
@@ -1904,7 +1914,7 @@ const ra = ({
1904
1914
  xl: "max-w-4xl",
1905
1915
  full: "max-w-full"
1906
1916
  };
1907
- return /* @__PURE__ */ c("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
1917
+ return /* @__PURE__ */ h("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
1908
1918
  /* @__PURE__ */ e(
1909
1919
  "div",
1910
1920
  {
@@ -1912,13 +1922,13 @@ const ra = ({
1912
1922
  onClick: () => n()
1913
1923
  }
1914
1924
  ),
1915
- /* @__PURE__ */ c(
1925
+ /* @__PURE__ */ h(
1916
1926
  "div",
1917
1927
  {
1918
1928
  className: `relative bg-white rounded-lg shadow-xl w-full ${w[l] || w.md} max-h-[90vh] flex flex-col dark:bg-gray-800`,
1919
1929
  children: [
1920
- /* @__PURE__ */ c("div", { className: "flex items-center justify-between p-4 border-b border-gray-200 dark:border-gray-700 flex-shrink-0", children: [
1921
- /* @__PURE__ */ c("div", { className: "flex items-center gap-1", children: [
1930
+ /* @__PURE__ */ h("div", { className: "flex items-center justify-between p-4 border-b border-gray-200 dark:border-gray-700 flex-shrink-0", children: [
1931
+ /* @__PURE__ */ h("div", { className: "flex items-center gap-1", children: [
1922
1932
  o && /* @__PURE__ */ e("span", { children: o }),
1923
1933
  /* @__PURE__ */ e("h3", { className: "text-lg font-medium text-gray-900 dark:text-white", children: i })
1924
1934
  ] }),
@@ -1935,13 +1945,13 @@ const ra = ({
1935
1945
  r.length > 0 && /* @__PURE__ */ e("div", { className: "px-4 py-3 flex justify-end gap-3 border-t border-gray-200 dark:border-gray-700 sm:px-6", children: r.map((S) => /* @__PURE__ */ e(
1936
1946
  Q,
1937
1947
  {
1938
- onClick: ($) => {
1939
- S.type == "submit" ? d($) : u(
1948
+ onClick: (E) => {
1949
+ S.type == "submit" ? d(E) : u(
1940
1950
  () => {
1941
- var I;
1942
- return (I = S == null ? void 0 : S.onClick) == null ? void 0 : I.call(S, $, x);
1951
+ var O;
1952
+ return (O = S == null ? void 0 : S.onClick) == null ? void 0 : O.call(S, E, y);
1943
1953
  },
1944
- (I) => n == null ? void 0 : n(I)
1954
+ (O) => n == null ? void 0 : n(O)
1945
1955
  );
1946
1956
  },
1947
1957
  disabled: m || S.disabled,
@@ -1949,7 +1959,7 @@ const ra = ({
1949
1959
  color: S.color || "primary",
1950
1960
  className: `min-w-[100px] ${S.className}`,
1951
1961
  type: S.type || "button",
1952
- children: m ? /* @__PURE__ */ c("div", { className: "flex items-center", children: [
1962
+ children: m ? /* @__PURE__ */ h("div", { className: "flex items-center", children: [
1953
1963
  /* @__PURE__ */ e("div", { className: "animate-spin rounded-full h-4 w-4 border-2 border-white/30 border-t-2 border-t-white mr-2" }),
1954
1964
  S.label || "Submit",
1955
1965
  "..."
@@ -1960,16 +1970,16 @@ const ra = ({
1960
1970
  }
1961
1971
  )
1962
1972
  ] });
1963
- }, Pe = ({ config: h, onSubmit: n, initialData: o = {}, type: i = "add" }) => {
1964
- const { formClass: s = "grid grid-cols-12 gap-4", formFields: l = [] } = h || {}, [r, C] = R(o);
1965
- z(() => {
1973
+ }, Pe = ({ config: c, onSubmit: n, initialData: o = {}, type: i = "add" }) => {
1974
+ const { formClass: s = "grid grid-cols-12 gap-4", formFields: l = [] } = c || {}, [r, C] = R(o);
1975
+ H(() => {
1966
1976
  C(o);
1967
1977
  }, []);
1968
- const L = (y, d) => {
1969
- C((p) => ({ ...p, [y]: d }));
1970
- }, b = (y) => {
1971
- y.preventDefault();
1972
- const d = y.target;
1978
+ const L = (f, d) => {
1979
+ C((b) => ({ ...b, [f]: d }));
1980
+ }, p = (f) => {
1981
+ f.preventDefault();
1982
+ const d = f.target;
1973
1983
  if (!d.checkValidity()) {
1974
1984
  d.reportValidity();
1975
1985
  return;
@@ -1980,41 +1990,41 @@ const ra = ({
1980
1990
  "form",
1981
1991
  {
1982
1992
  id: i == "add" ? "addForm" : i == "edit" ? "editForm" : "defaultForm",
1983
- onSubmit: b,
1993
+ onSubmit: p,
1984
1994
  className: s,
1985
1995
  noValidate: !1,
1986
- children: l.map((y) => /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(
1996
+ children: l.map((f) => /* @__PURE__ */ e($, { children: /* @__PURE__ */ e(
1987
1997
  Ee,
1988
1998
  {
1989
- field: y,
1999
+ field: f,
1990
2000
  formData: r,
1991
2001
  handleChange: L
1992
2002
  },
1993
- y.key
2003
+ f.key
1994
2004
  ) }))
1995
2005
  }
1996
2006
  );
1997
2007
  };
1998
- function sa({ data: h, config: n }) {
2008
+ function sa({ data: c, config: n }) {
1999
2009
  const { fields: o, containerClass: i } = n, [s, l] = R(null), [r, C] = R(!1), L = (d) => {
2000
2010
  l(d), C(!0);
2001
- }, b = ({ col: d }) => {
2002
- var $;
2003
- let p = d == null ? void 0 : d.icon, m = d.label, u = h[d.key], x = d.type, w = d.variant || "outline", S = d.defaultColor;
2004
- if (x === "chip" && (($ = d.chipOptions) == null ? void 0 : $.length) > 0) {
2005
- let I = d == null ? void 0 : d.chipOptions.find((M) => M.value == u);
2006
- I && (u = I.label, S = I.color);
2011
+ }, p = ({ col: d }) => {
2012
+ var E;
2013
+ let b = d == null ? void 0 : d.icon, m = d.label, u = c[d.key], y = d.type, w = d.variant || "outline", S = d.defaultColor;
2014
+ if (y === "chip" && ((E = d.chipOptions) == null ? void 0 : E.length) > 0) {
2015
+ let O = d == null ? void 0 : d.chipOptions.find((M) => M.value == u);
2016
+ O && (u = O.label, S = O.color);
2007
2017
  }
2008
- return /* @__PURE__ */ c(
2018
+ return /* @__PURE__ */ h(
2009
2019
  "div",
2010
2020
  {
2011
2021
  className: `col-span-12 flex items-center space-x-4 p-4 rounded-xl
2012
2022
  bg-gray-100 dark:bg-gray-900 ${d.blockClass || ""}`,
2013
2023
  children: [
2014
- p && /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: p }),
2015
- /* @__PURE__ */ c("div", { className: "flex-1 min-w-0", children: [
2024
+ b && /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: b }),
2025
+ /* @__PURE__ */ h("div", { className: "flex-1 min-w-0", children: [
2016
2026
  /* @__PURE__ */ e("p", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: m }),
2017
- x === "chip" ? /* @__PURE__ */ e(
2027
+ y === "chip" ? /* @__PURE__ */ e(
2018
2028
  $e,
2019
2029
  {
2020
2030
  label: u,
@@ -2024,7 +2034,7 @@ function sa({ data: h, config: n }) {
2024
2034
  }
2025
2035
  ) : (
2026
2036
  /* TINY EDITOR */
2027
- x === "tinyEditor" ? /* @__PURE__ */ e(
2037
+ y === "tinyEditor" ? /* @__PURE__ */ e(
2028
2038
  "p",
2029
2039
  {
2030
2040
  className: "mt-1 text-sm text-gray-900 dark:text-white break-words",
@@ -2032,27 +2042,27 @@ function sa({ data: h, config: n }) {
2032
2042
  __html: u
2033
2043
  }
2034
2044
  }
2035
- ) : x === "audio" ? u ? /* @__PURE__ */ e(
2045
+ ) : y === "audio" ? u ? /* @__PURE__ */ e(
2036
2046
  "audio",
2037
2047
  {
2038
2048
  controls: !0,
2039
2049
  src: u,
2040
- onClick: (I) => I.stopPropagation(),
2050
+ onClick: (O) => O.stopPropagation(),
2041
2051
  className: "shadow-md rounded-full"
2042
2052
  },
2043
2053
  u
2044
2054
  ) : /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-400", children: "N/A" }) : (
2045
2055
  /* DEFAULT */
2046
- /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-900 dark:text-white break-words", children: x == "date" ? /* @__PURE__ */ e("span", { children: Oe(u, d.format || "DD MMM YYYY") }) : u || "N/A" })
2056
+ /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-gray-900 dark:text-white break-words", children: y == "date" ? /* @__PURE__ */ e("span", { children: Oe(u, d.format || "DD MMM YYYY") }) : u || "N/A" })
2047
2057
  )
2048
2058
  )
2049
2059
  ] })
2050
2060
  ]
2051
2061
  }
2052
2062
  );
2053
- }, y = ({ col: d }) => {
2054
- let p = h[d.titleKey], m = h[d.subtitleKey], u = h[d.imageKey], x = h[d.fallback_icon];
2055
- return /* @__PURE__ */ c(
2063
+ }, f = ({ col: d }) => {
2064
+ let b = c[d.titleKey], m = c[d.subtitleKey], u = c[d.imageKey], y = c[d.fallback_icon];
2065
+ return /* @__PURE__ */ h(
2056
2066
  "div",
2057
2067
  {
2058
2068
  className: `col-span-12 flex items-center space-x-4 p-4 rounded-xl
@@ -2063,20 +2073,20 @@ function sa({ data: h, config: n }) {
2063
2073
  "img",
2064
2074
  {
2065
2075
  src: u,
2066
- alt: p,
2067
- onClick: () => L({ src: u, alt: p }),
2076
+ alt: b,
2077
+ onClick: () => L({ src: u, alt: b }),
2068
2078
  className: "w-16 h-16 cursor-pointer rounded-full object-cover border-2 border-gray-200 dark:border-gray-700"
2069
2079
  }
2070
- ) : x || /* @__PURE__ */ e("div", { className: "w-16 h-16 flex items-center justify-center rounded-full border-2 border-gray-300 dark:border-gray-700 bg-gray-200 dark:bg-gray-600", children: /* @__PURE__ */ e(Ie, { className: "w-8 h-8 text-gray-400" }) }),
2071
- /* @__PURE__ */ c("div", { children: [
2072
- /* @__PURE__ */ e("h3", { className: "text-xl font-semibold text-gray-900 dark:text-white", children: p }),
2080
+ ) : y || /* @__PURE__ */ e("div", { className: "w-16 h-16 flex items-center justify-center rounded-full border-2 border-gray-300 dark:border-gray-700 bg-gray-200 dark:bg-gray-600", children: /* @__PURE__ */ e(Ie, { className: "w-8 h-8 text-gray-400" }) }),
2081
+ /* @__PURE__ */ h("div", { children: [
2082
+ /* @__PURE__ */ e("h3", { className: "text-xl font-semibold text-gray-900 dark:text-white", children: b }),
2073
2083
  /* @__PURE__ */ e("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: m })
2074
2084
  ] })
2075
2085
  ]
2076
2086
  }
2077
2087
  );
2078
2088
  };
2079
- return /* @__PURE__ */ c(G, { children: [
2089
+ return /* @__PURE__ */ h($, { children: [
2080
2090
  r && /* @__PURE__ */ e(
2081
2091
  Ge,
2082
2092
  {
@@ -2087,12 +2097,12 @@ function sa({ data: h, config: n }) {
2087
2097
  }
2088
2098
  ),
2089
2099
  /* @__PURE__ */ e("div", { className: `grid grid-cols-12 gap-4 ${i || ""}`, children: o.map(
2090
- (d) => d.type == "group" ? /* @__PURE__ */ e(y, { col: d }) : /* @__PURE__ */ e(b, { col: d })
2100
+ (d) => d.type == "group" ? /* @__PURE__ */ e(f, { col: d }) : /* @__PURE__ */ e(p, { col: d })
2091
2101
  ) })
2092
2102
  ] });
2093
2103
  }
2094
- const je = ({ config: h }) => {
2095
- var de, ie, ce, he, ue, be, pe, ge, t, g, T, K, _, J, V, ee;
2104
+ const je = ({ config: c }) => {
2105
+ var de, se, ce, he, ue, pe, be, ge, t, g, T, K, _, J, W, re;
2096
2106
  const {
2097
2107
  title: n,
2098
2108
  fetchData: o = async () => {
@@ -2101,66 +2111,66 @@ const je = ({ config: h }) => {
2101
2111
  tableConfig: s = {},
2102
2112
  modalConfig: l = {},
2103
2113
  filterConfig: r
2104
- } = h, [C, L] = R(!0), [b, y] = R(!1), [d, p] = R([]), [m, u] = R(null), [x, w] = R({
2114
+ } = c, [C, L] = R(!0), [p, f] = R(!1), [d, b] = R([]), [m, u] = R(null), [y, w] = R({
2105
2115
  search: "",
2106
2116
  rows_per_page: 50,
2107
2117
  current_page: 1
2108
- }), [S, $] = R({}), [I, M] = R(!1), [j, E] = R(!1), [f, N] = R(!1), [O, D] = R(!1), [F, U] = R(!1), [A, v] = R(null), H = (k, P) => {
2109
- k === "edit" ? (v(P), N(!0)) : k === "view" ? (v(P), U(!0)) : k === "delete" && (v(P), D(!0));
2110
- }, Z = async (k, P, B = "", ae = "") => {
2111
- y(!0);
2118
+ }), [S, E] = R({}), [O, M] = R(!1), [j, G] = R(!1), [x, v] = R(!1), [I, D] = R(!1), [F, z] = R(!1), [A, Y] = R(null), ae = (k, P) => {
2119
+ k === "edit" ? (Y(P), v(!0)) : k === "view" ? (Y(P), z(!0)) : k === "delete" && (Y(P), D(!0));
2120
+ }, N = async (k, P, B = "", te = "") => {
2121
+ f(!0);
2112
2122
  try {
2113
- const Y = await (k == null ? void 0 : k());
2114
- (B || Y.message) && ke(B || Y.message, {
2123
+ const V = await (k == null ? void 0 : k());
2124
+ (B || V.message) && ke(B || V.message, {
2115
2125
  variant: "success"
2116
- }), P == null || P(Y);
2117
- } catch (Y) {
2118
- (ae || Y.message) && ke(ae || Y.message, { variant: "error" });
2126
+ }), P == null || P(V);
2127
+ } catch (V) {
2128
+ (te || V.message) && ke(te || V.message, { variant: "error" });
2119
2129
  } finally {
2120
- y(!1);
2130
+ f(!1);
2121
2131
  }
2122
- }, W = (k) => {
2132
+ }, U = (k) => {
2123
2133
  let P = k.newObject;
2124
- i ? (p((B) => [P, ...B]), u((B) => ({
2134
+ i ? (b((B) => [P, ...B]), u((B) => ({
2125
2135
  ...B,
2126
2136
  current_page: 1
2127
2137
  }))) : (w((B) => ({
2128
2138
  ...B,
2129
2139
  current_page: 1
2130
- })), x.current_page == 1 && te()), E(!1);
2131
- }, re = (k) => {
2140
+ })), y.current_page == 1 && ne()), G(!1);
2141
+ }, X = (k) => {
2132
2142
  let P = k.newObject, B = k.targetObject;
2133
- i ? p(
2134
- (ae) => ae.map(
2135
- (Y) => Y.id === B.id ? { ...Y, ...P } : Y
2143
+ i ? b(
2144
+ (te) => te.map(
2145
+ (V) => V.id === B.id ? { ...V, ...P } : V
2136
2146
  )
2137
- ) : te(), N(!1);
2138
- }, ne = (k) => {
2147
+ ) : ne(), v(!1);
2148
+ }, q = (k) => {
2139
2149
  if (!k) {
2140
- D(!1), v(null);
2150
+ D(!1), Y(null);
2141
2151
  return;
2142
2152
  }
2143
- i ? p(
2153
+ i ? b(
2144
2154
  (P) => P.filter((B) => B.id !== k.targetObject.id)
2145
- ) : d.length == 1 && x.current_page > 1 ? w((P) => ({
2155
+ ) : d.length == 1 && y.current_page > 1 ? w((P) => ({
2146
2156
  ...P,
2147
2157
  current_page: P.current_page - 1
2148
- })) : te(), D(!1), v(null);
2149
- }, se = (k) => Z(
2158
+ })) : ne(), D(!1), Y(null);
2159
+ }, le = (k) => N(
2150
2160
  () => {
2151
2161
  var P, B;
2152
2162
  return (B = (P = l == null ? void 0 : l.addModal) == null ? void 0 : P.handleSubmit) == null ? void 0 : B.call(P, k);
2153
2163
  },
2154
- W
2155
- ), oe = (k) => Z(
2164
+ U
2165
+ ), ie = (k) => N(
2156
2166
  () => {
2157
2167
  var P, B;
2158
2168
  return (B = (P = l == null ? void 0 : l.editModal) == null ? void 0 : P.handleSubmit) == null ? void 0 : B.call(P, k, A);
2159
2169
  },
2160
- re
2161
- ), te = async () => {
2162
- L(!0), o == null || o({ ...x, ...S }).then((k) => {
2163
- p(k.data), u(k.pagination);
2170
+ X
2171
+ ), ne = async () => {
2172
+ L(!0), o == null || o({ ...y, ...S }).then((k) => {
2173
+ b(k.data), u(k.pagination);
2164
2174
  }).catch((k) => {
2165
2175
  ke(k.message, { variant: "error" });
2166
2176
  }).finally(() => {
@@ -2168,22 +2178,22 @@ const je = ({ config: h }) => {
2168
2178
  });
2169
2179
  }, xe = (k) => {
2170
2180
  var P;
2171
- $((B) => ({
2181
+ E((B) => ({
2172
2182
  ...k
2173
2183
  })), (P = s == null ? void 0 : s.filter) != null && P.useServerSideFilters && M((B) => !B);
2174
2184
  }, ve = (k, P) => k.filter(
2175
- (B) => Object.entries(P).every(([ae, Y]) => B[ae] === Y)
2185
+ (B) => Object.entries(P).every(([te, V]) => B[te] === V)
2176
2186
  ), we = Me(() => {
2177
2187
  var k;
2178
2188
  return (k = s == null ? void 0 : s.filter) != null && k.useServerSideFilters ? d : ve(d, S);
2179
2189
  }, [d, S]);
2180
- return z(() => {
2181
- te();
2190
+ return H(() => {
2191
+ ne();
2182
2192
  }, [
2183
- x.search,
2184
- x.rows_per_page,
2185
- x.current_page,
2186
- I
2193
+ y.search,
2194
+ y.rows_per_page,
2195
+ y.current_page,
2196
+ O
2187
2197
  ]), /* @__PURE__ */ e(
2188
2198
  Ze,
2189
2199
  {
@@ -2205,21 +2215,21 @@ const je = ({ config: h }) => {
2205
2215
  children: /* @__PURE__ */ e(ye, { className: "h-4 w-4" })
2206
2216
  }
2207
2217
  ),
2208
- children: /* @__PURE__ */ c("div", { children: [
2209
- /* @__PURE__ */ c("div", { className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-3", children: [
2210
- /* @__PURE__ */ c("div", { children: [
2218
+ children: /* @__PURE__ */ h("div", { children: [
2219
+ /* @__PURE__ */ h("div", { className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-3", children: [
2220
+ /* @__PURE__ */ h("div", { children: [
2211
2221
  /* @__PURE__ */ e("h1", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: n }),
2212
- /* @__PURE__ */ e("p", { className: "text-md text-gray-600 dark:text-gray-400", children: h == null ? void 0 : h.description })
2222
+ /* @__PURE__ */ e("p", { className: "text-md text-gray-600 dark:text-gray-400", children: c == null ? void 0 : c.description })
2213
2223
  ] }),
2214
- /* @__PURE__ */ e("div", { className: "flex items-center space-x-3", children: /* @__PURE__ */ c(
2224
+ /* @__PURE__ */ e("div", { className: "flex items-center space-x-3", children: /* @__PURE__ */ h(
2215
2225
  Q,
2216
2226
  {
2217
- onClick: () => E(!0),
2227
+ onClick: () => G(!0),
2218
2228
  variant: "contained",
2219
2229
  color: "primary",
2220
2230
  children: [
2221
2231
  /* @__PURE__ */ e(Ve, { className: "w-4 h-4 mr-2" }),
2222
- h.buttonText || "Add New"
2232
+ c.buttonText || "Add New"
2223
2233
  ]
2224
2234
  }
2225
2235
  ) })
@@ -2235,7 +2245,7 @@ const je = ({ config: h }) => {
2235
2245
  },
2236
2246
  data: we,
2237
2247
  setServerSidePaginationData: w,
2238
- onMenuAction: H,
2248
+ onMenuAction: ae,
2239
2249
  filterConfig: r,
2240
2250
  onFilterApply: xe,
2241
2251
  loading: C
@@ -2247,25 +2257,25 @@ const je = ({ config: h }) => {
2247
2257
  {
2248
2258
  isOpen: j,
2249
2259
  onClose: () => {
2250
- b || E(!1);
2260
+ p || G(!1);
2251
2261
  },
2252
2262
  icon: (de = l.addModal) == null ? void 0 : de.icon,
2253
- title: ((ie = l.addModal) == null ? void 0 : ie.title) || "Add New",
2263
+ title: ((se = l.addModal) == null ? void 0 : se.title) || "Add New",
2254
2264
  size: ((ce = l.addModal) == null ? void 0 : ce.size) || "md",
2255
2265
  onFormSubmit: () => {
2256
2266
  var k;
2257
2267
  return (k = document.querySelector("#addForm")) == null ? void 0 : k.requestSubmit();
2258
2268
  },
2259
- loadingBtn: b,
2269
+ loadingBtn: p,
2260
2270
  actionButtons: l.addModal.actionButtons,
2261
2271
  children: /* @__PURE__ */ e(
2262
2272
  Pe,
2263
2273
  {
2264
2274
  config: (l == null ? void 0 : l.addModal) || [],
2265
- onSubmit: se,
2275
+ onSubmit: le,
2266
2276
  initialData: {},
2267
2277
  type: "add",
2268
- loading: b
2278
+ loading: p
2269
2279
  }
2270
2280
  )
2271
2281
  }
@@ -2273,46 +2283,46 @@ const je = ({ config: h }) => {
2273
2283
  /* @__PURE__ */ e(
2274
2284
  fe,
2275
2285
  {
2276
- isOpen: f,
2286
+ isOpen: x,
2277
2287
  onClose: () => {
2278
- b || N(!1);
2288
+ p || v(!1);
2279
2289
  },
2280
2290
  icon: (he = l.editModal) == null ? void 0 : he.icon,
2281
2291
  title: ((ue = l.editModal) == null ? void 0 : ue.title) || "Edit",
2282
- size: ((be = l.editModal) == null ? void 0 : be.size) || "md",
2292
+ size: ((pe = l.editModal) == null ? void 0 : pe.size) || "md",
2283
2293
  onFormSubmit: () => {
2284
2294
  var k;
2285
2295
  return (k = document.querySelector("#editForm")) == null ? void 0 : k.requestSubmit();
2286
2296
  },
2287
2297
  actionButtons: l.editModal.actionButtons,
2288
- loadingBtn: b,
2298
+ loadingBtn: p,
2289
2299
  children: /* @__PURE__ */ e(
2290
2300
  Pe,
2291
2301
  {
2292
2302
  config: l.editModal || [],
2293
- onSubmit: oe,
2303
+ onSubmit: ie,
2294
2304
  initialData: A,
2295
2305
  type: "edit",
2296
- loading: b
2306
+ loading: p
2297
2307
  }
2298
2308
  )
2299
2309
  }
2300
2310
  ),
2301
- O && /* @__PURE__ */ e(
2311
+ I && /* @__PURE__ */ e(
2302
2312
  fe,
2303
2313
  {
2304
- isOpen: O,
2314
+ isOpen: I,
2305
2315
  onClose: (k) => {
2306
- ne(k);
2316
+ q(k);
2307
2317
  },
2308
- icon: ((pe = l.deleteModal) == null ? void 0 : pe.icon) || /* @__PURE__ */ e(le, { icon: "ph:warning-bold", className: "w-6 h-6 text-red-500" }),
2318
+ icon: ((be = l.deleteModal) == null ? void 0 : be.icon) || /* @__PURE__ */ e(oe, { icon: "ph:warning-bold", className: "w-6 h-6 text-red-500" }),
2309
2319
  title: ((ge = l.deleteModal) == null ? void 0 : ge.title) || "Confirm Delete",
2310
2320
  size: ((t = l.deleteModal) == null ? void 0 : t.size) || "md",
2311
- loading: b,
2321
+ loading: p,
2312
2322
  actionButtons: l.deleteModal.actionButtons,
2313
- executeFunction: Z,
2323
+ executeFunction: N,
2314
2324
  selectedItem: A,
2315
- children: /* @__PURE__ */ e("div", { className: "flex items-center space-x-2 py-3", children: /* @__PURE__ */ c("div", { children: [
2325
+ children: /* @__PURE__ */ e("div", { className: "flex items-center space-x-2 py-3", children: /* @__PURE__ */ h("div", { children: [
2316
2326
  /* @__PURE__ */ e("p", { className: "text-md text-gray-700 dark:text-white", children: ((g = l.deleteModal) == null ? void 0 : g.confirmText) || "Are you sure you want to delete this item?" }),
2317
2327
  ((T = l.deleteModal) == null ? void 0 : T.referenceKey) && /* @__PURE__ */ e("p", { className: "text-md font-semibold text-gray-700 dark:text-white", children: A[(K = l.deleteModal) == null ? void 0 : K.referenceKey] })
2318
2328
  ] }) })
@@ -2323,13 +2333,13 @@ const je = ({ config: h }) => {
2323
2333
  {
2324
2334
  isOpen: F,
2325
2335
  onClose: () => {
2326
- U(!1), v(null);
2336
+ z(!1), Y(null);
2327
2337
  },
2328
2338
  icon: (_ = l.viewModal) == null ? void 0 : _.icon,
2329
2339
  title: ((J = l.viewModal) == null ? void 0 : J.title) || "View Details",
2330
- size: ((V = l.viewModal) == null ? void 0 : V.size) || "lg",
2340
+ size: ((W = l.viewModal) == null ? void 0 : W.size) || "lg",
2331
2341
  footerConfig: l == null ? void 0 : l.viewModal.footer,
2332
- children: (ee = l.viewModal) != null && ee.component ? /* @__PURE__ */ e(l.viewModal.component, { data: A }) : /* @__PURE__ */ e(
2342
+ children: (re = l.viewModal) != null && re.component ? /* @__PURE__ */ e(l.viewModal.component, { data: A }) : /* @__PURE__ */ e(
2333
2343
  sa,
2334
2344
  {
2335
2345
  data: A,
@@ -2477,8 +2487,8 @@ je.propTypes = {
2477
2487
  };
2478
2488
  const ua = () => {
2479
2489
  if (typeof document > "u" || document.getElementById("react-admin-crud-manager-styles")) return;
2480
- const h = document.createElement("style");
2481
- h.id = "react-admin-crud-manager-styles";
2490
+ const c = document.createElement("style");
2491
+ c.id = "react-admin-crud-manager-styles";
2482
2492
  const n = `
2483
2493
  .no-spinner::-webkit-outer-spin-button,
2484
2494
  .no-spinner::-webkit-inner-spin-button {
@@ -2495,12 +2505,12 @@ const ua = () => {
2495
2505
  box-shadow: none !important;
2496
2506
  }
2497
2507
  `;
2498
- h.textContent = n, document.head.appendChild(h);
2508
+ c.textContent = n, document.head.appendChild(c);
2499
2509
  };
2500
- function wa(h) {
2501
- return z(() => {
2510
+ function wa(c) {
2511
+ return H(() => {
2502
2512
  ua();
2503
- }, []), /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(je, { config: h.config }) });
2513
+ }, []), /* @__PURE__ */ e($, { children: /* @__PURE__ */ e(je, { config: c.config }) });
2504
2514
  }
2505
2515
  export {
2506
2516
  wa as default