proctoring-ui-3 1.0.1 → 1.0.3

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.
Files changed (3) hide show
  1. package/dist/ui-3.es.js +1908 -1079
  2. package/dist/ui-3.umd.js +348 -104
  3. package/package.json +1 -1
package/dist/ui-3.es.js CHANGED
@@ -1,9 +1,8 @@
1
- import ve, { useState as O, useRef as K, useEffect as J } from "react";
2
- import { useTranslation as pe } from "react-i18next";
3
- import { Heart as Ne, Home as ye, Calendar as Ee, Users as Ce, Settings as Se, User as fe, ChevronDown as ae, LogOut as ke, X, AlertCircle as he, Upload as $e, File as Le, Trash2 as Re, Search as le, Save as Me, Edit as oe, Sparkles as _e, Check as re, ChevronRight as se, CheckCircle as ze, ChevronLeft as ie, AlertTriangle as we } from "lucide-react";
4
- import { useNavigate as Te, useLocation as xe, Link as ne } from "react-router-dom";
5
- import { createPortal as de } from "react-dom";
6
- var ce = { exports: {} }, ee = {};
1
+ import ge, { useState as T, useRef as ee, useEffect as Q } from "react";
2
+ import { Heart as Re, Home as Me, Calendar as Le, Users as ze, Settings as Te, User as Ee, ChevronDown as le, LogOut as Se, X as Z, AlertCircle as ke, Upload as _e, File as Ae, Trash2 as Pe, Search as ie, Save as me, Edit as ne, Sparkles as Oe, Check as oe, ChevronRight as se, CheckCircle as Fe, ChevronLeft as ce, AlertTriangle as $e, ArrowRight as he, Eye as De, ArrowLeft as xe, CircleCheck as we, Eraser as Be } from "lucide-react";
3
+ import { useNavigate as Ve, useLocation as fe, Link as de } from "react-router-dom";
4
+ import { createPortal as be } from "react-dom";
5
+ var ue = { exports: {} }, ae = {};
7
6
  /**
8
7
  * @license React
9
8
  * react-jsx-runtime.production.js
@@ -13,29 +12,29 @@ var ce = { exports: {} }, ee = {};
13
12
  * This source code is licensed under the MIT license found in the
14
13
  * LICENSE file in the root directory of this source tree.
15
14
  */
16
- var be;
17
- function Oe() {
18
- if (be) return ee;
19
- be = 1;
15
+ var je;
16
+ function We() {
17
+ if (je) return ae;
18
+ je = 1;
20
19
  var t = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
21
- function n(l, d, x) {
22
- var m = null;
23
- if (x !== void 0 && (m = "" + x), d.key !== void 0 && (m = "" + d.key), "key" in d) {
24
- x = {};
25
- for (var h in d)
26
- h !== "key" && (x[h] = d[h]);
27
- } else x = d;
28
- return d = x.ref, {
20
+ function a(i, x, b) {
21
+ var d = null;
22
+ if (b !== void 0 && (d = "" + b), x.key !== void 0 && (d = "" + x.key), "key" in x) {
23
+ b = {};
24
+ for (var u in x)
25
+ u !== "key" && (b[u] = x[u]);
26
+ } else b = x;
27
+ return x = b.ref, {
29
28
  $$typeof: t,
30
- type: l,
31
- key: m,
32
- ref: d !== void 0 ? d : null,
33
- props: x
29
+ type: i,
30
+ key: d,
31
+ ref: x !== void 0 ? x : null,
32
+ props: b
34
33
  };
35
34
  }
36
- return ee.Fragment = r, ee.jsx = n, ee.jsxs = n, ee;
35
+ return ae.Fragment = r, ae.jsx = a, ae.jsxs = a, ae;
37
36
  }
38
- var te = {};
37
+ var re = {};
39
38
  /**
40
39
  * @license React
41
40
  * react-jsx-runtime.development.js
@@ -45,47 +44,47 @@ var te = {};
45
44
  * This source code is licensed under the MIT license found in the
46
45
  * LICENSE file in the root directory of this source tree.
47
46
  */
48
- var ue;
49
- function Ae() {
50
- return ue || (ue = 1, process.env.NODE_ENV !== "production" && function() {
47
+ var Ne;
48
+ function Ie() {
49
+ return Ne || (Ne = 1, process.env.NODE_ENV !== "production" && function() {
51
50
  function t(s) {
52
51
  if (s == null) return null;
53
52
  if (typeof s == "function")
54
- return s.$$typeof === i ? null : s.displayName || s.name || null;
53
+ return s.$$typeof === h ? null : s.displayName || s.name || null;
55
54
  if (typeof s == "string") return s;
56
55
  switch (s) {
57
- case N:
56
+ case m:
58
57
  return "Fragment";
59
- case z:
58
+ case R:
60
59
  return "Profiler";
61
- case c:
60
+ case g:
62
61
  return "StrictMode";
63
- case Y:
62
+ case X:
64
63
  return "Suspense";
65
- case U:
64
+ case H:
66
65
  return "SuspenseList";
67
- case W:
66
+ case O:
68
67
  return "Activity";
69
68
  }
70
69
  if (typeof s == "object")
71
70
  switch (typeof s.tag == "number" && console.error(
72
71
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
73
72
  ), s.$$typeof) {
74
- case g:
73
+ case f:
75
74
  return "Portal";
76
- case V:
75
+ case Y:
77
76
  return s.displayName || "Context";
78
- case I:
77
+ case L:
79
78
  return (s._context.displayName || "Context") + ".Consumer";
80
- case M:
81
- var a = s.render;
82
- return s = s.displayName, s || (s = a.displayName || a.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
83
- case B:
84
- return a = s.displayName || null, a !== null ? a : t(s.type) || "Memo";
85
- case j:
86
- a = s._payload, s = s._init;
79
+ case D:
80
+ var n = s.render;
81
+ return s = s.displayName, s || (s = n.displayName || n.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
82
+ case U:
83
+ return n = s.displayName || null, n !== null ? n : t(s.type) || "Memo";
84
+ case C:
85
+ n = s._payload, s = s._init;
87
86
  try {
88
- return t(s(a));
87
+ return t(s(n));
89
88
  } catch {
90
89
  }
91
90
  }
@@ -94,77 +93,77 @@ function Ae() {
94
93
  function r(s) {
95
94
  return "" + s;
96
95
  }
97
- function n(s) {
96
+ function a(s) {
98
97
  try {
99
98
  r(s);
100
- var a = !1;
99
+ var n = !1;
101
100
  } catch {
102
- a = !0;
101
+ n = !0;
103
102
  }
104
- if (a) {
105
- a = console;
106
- var o = a.error, p = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
107
- return o.call(
108
- a,
103
+ if (n) {
104
+ n = console;
105
+ var c = n.error, j = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
106
+ return c.call(
107
+ n,
109
108
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
110
- p
109
+ j
111
110
  ), r(s);
112
111
  }
113
112
  }
114
- function l(s) {
115
- if (s === N) return "<>";
116
- if (typeof s == "object" && s !== null && s.$$typeof === j)
113
+ function i(s) {
114
+ if (s === m) return "<>";
115
+ if (typeof s == "object" && s !== null && s.$$typeof === C)
117
116
  return "<...>";
118
117
  try {
119
- var a = t(s);
120
- return a ? "<" + a + ">" : "<...>";
118
+ var n = t(s);
119
+ return n ? "<" + n + ">" : "<...>";
121
120
  } catch {
122
121
  return "<...>";
123
122
  }
124
123
  }
125
- function d() {
126
- var s = v.A;
124
+ function x() {
125
+ var s = k.A;
127
126
  return s === null ? null : s.getOwner();
128
127
  }
129
- function x() {
128
+ function b() {
130
129
  return Error("react-stack-top-frame");
131
130
  }
132
- function m(s) {
133
- if (S.call(s, "key")) {
134
- var a = Object.getOwnPropertyDescriptor(s, "key").get;
135
- if (a && a.isReactWarning) return !1;
131
+ function d(s) {
132
+ if (M.call(s, "key")) {
133
+ var n = Object.getOwnPropertyDescriptor(s, "key").get;
134
+ if (n && n.isReactWarning) return !1;
136
135
  }
137
136
  return s.key !== void 0;
138
137
  }
139
- function h(s, a) {
140
- function o() {
141
- b || (b = !0, console.error(
138
+ function u(s, n) {
139
+ function c() {
140
+ p || (p = !0, console.error(
142
141
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
143
- a
142
+ n
144
143
  ));
145
144
  }
146
- o.isReactWarning = !0, Object.defineProperty(s, "key", {
147
- get: o,
145
+ c.isReactWarning = !0, Object.defineProperty(s, "key", {
146
+ get: c,
148
147
  configurable: !0
149
148
  });
150
149
  }
151
- function f() {
150
+ function v() {
152
151
  var s = t(this.type);
153
- return $[s] || ($[s] = !0, console.error(
152
+ return _[s] || (_[s] = !0, console.error(
154
153
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
155
154
  )), s = this.props.ref, s !== void 0 ? s : null;
156
155
  }
157
- function k(s, a, o, p, w, D) {
158
- var R = o.ref;
156
+ function y(s, n, c, j, E, B) {
157
+ var o = c.ref;
159
158
  return s = {
160
- $$typeof: C,
159
+ $$typeof: P,
161
160
  type: s,
162
- key: a,
163
- props: o,
164
- _owner: p
165
- }, (R !== void 0 ? R : null) !== null ? Object.defineProperty(s, "ref", {
161
+ key: n,
162
+ props: c,
163
+ _owner: j
164
+ }, (o !== void 0 ? o : null) !== null ? Object.defineProperty(s, "ref", {
166
165
  enumerable: !1,
167
- get: f
166
+ get: v
168
167
  }) : Object.defineProperty(s, "ref", { enumerable: !1, value: null }), s._store = {}, Object.defineProperty(s._store, "validated", {
169
168
  configurable: !1,
170
169
  enumerable: !1,
@@ -179,132 +178,132 @@ function Ae() {
179
178
  configurable: !1,
180
179
  enumerable: !1,
181
180
  writable: !0,
182
- value: w
181
+ value: E
183
182
  }), Object.defineProperty(s, "_debugTask", {
184
183
  configurable: !1,
185
184
  enumerable: !1,
186
185
  writable: !0,
187
- value: D
186
+ value: B
188
187
  }), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
189
188
  }
190
- function _(s, a, o, p, w, D) {
191
- var R = a.children;
192
- if (R !== void 0)
193
- if (p)
194
- if (P(R)) {
195
- for (p = 0; p < R.length; p++)
196
- y(R[p]);
197
- Object.freeze && Object.freeze(R);
189
+ function w(s, n, c, j, E, B) {
190
+ var o = n.children;
191
+ if (o !== void 0)
192
+ if (j)
193
+ if (W(o)) {
194
+ for (j = 0; j < o.length; j++)
195
+ z(o[j]);
196
+ Object.freeze && Object.freeze(o);
198
197
  } else
199
198
  console.error(
200
199
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
201
200
  );
202
- else y(R);
203
- if (S.call(a, "key")) {
204
- R = t(s);
205
- var q = Object.keys(a).filter(function(Q) {
206
- return Q !== "key";
201
+ else z(o);
202
+ if (M.call(n, "key")) {
203
+ o = t(s);
204
+ var S = Object.keys(n).filter(function(A) {
205
+ return A !== "key";
207
206
  });
208
- p = 0 < q.length ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}", G[R + p] || (q = 0 < q.length ? "{" + q.join(": ..., ") + ": ...}" : "{}", console.error(
207
+ j = 0 < S.length ? "{key: someKey, " + S.join(": ..., ") + ": ...}" : "{key: someKey}", J[o + j] || (S = 0 < S.length ? "{" + S.join(": ..., ") + ": ...}" : "{}", console.error(
209
208
  `A props object containing a "key" prop is being spread into JSX:
210
209
  let props = %s;
211
210
  <%s {...props} />
212
211
  React keys must be passed directly to JSX without using spread:
213
212
  let props = %s;
214
213
  <%s key={someKey} {...props} />`,
215
- p,
216
- R,
217
- q,
218
- R
219
- ), G[R + p] = !0);
214
+ j,
215
+ o,
216
+ S,
217
+ o
218
+ ), J[o + j] = !0);
220
219
  }
221
- if (R = null, o !== void 0 && (n(o), R = "" + o), m(a) && (n(a.key), R = "" + a.key), "key" in a) {
222
- o = {};
223
- for (var u in a)
224
- u !== "key" && (o[u] = a[u]);
225
- } else o = a;
226
- return R && h(
227
- o,
220
+ if (o = null, c !== void 0 && (a(c), o = "" + c), d(n) && (a(n.key), o = "" + n.key), "key" in n) {
221
+ c = {};
222
+ for (var l in n)
223
+ l !== "key" && (c[l] = n[l]);
224
+ } else c = n;
225
+ return o && u(
226
+ c,
228
227
  typeof s == "function" ? s.displayName || s.name || "Unknown" : s
229
- ), k(
228
+ ), y(
230
229
  s,
231
- R,
232
230
  o,
233
- d(),
234
- w,
235
- D
231
+ c,
232
+ x(),
233
+ E,
234
+ B
236
235
  );
237
236
  }
238
- function y(s) {
239
- E(s) ? s._store && (s._store.validated = 1) : typeof s == "object" && s !== null && s.$$typeof === j && (s._payload.status === "fulfilled" ? E(s._payload.value) && s._payload.value._store && (s._payload.value._store.validated = 1) : s._store && (s._store.validated = 1));
237
+ function z(s) {
238
+ N(s) ? s._store && (s._store.validated = 1) : typeof s == "object" && s !== null && s.$$typeof === C && (s._payload.status === "fulfilled" ? N(s._payload.value) && s._payload.value._store && (s._payload.value._store.validated = 1) : s._store && (s._store.validated = 1));
240
239
  }
241
- function E(s) {
242
- return typeof s == "object" && s !== null && s.$$typeof === C;
240
+ function N(s) {
241
+ return typeof s == "object" && s !== null && s.$$typeof === P;
243
242
  }
244
- var L = ve, C = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), N = Symbol.for("react.fragment"), c = Symbol.for("react.strict_mode"), z = Symbol.for("react.profiler"), I = Symbol.for("react.consumer"), V = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), Y = Symbol.for("react.suspense"), U = Symbol.for("react.suspense_list"), B = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), W = Symbol.for("react.activity"), i = Symbol.for("react.client.reference"), v = L.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, S = Object.prototype.hasOwnProperty, P = Array.isArray, A = console.createTask ? console.createTask : function() {
243
+ var $ = ge, P = Symbol.for("react.transitional.element"), f = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), g = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), L = Symbol.for("react.consumer"), Y = Symbol.for("react.context"), D = Symbol.for("react.forward_ref"), X = Symbol.for("react.suspense"), H = Symbol.for("react.suspense_list"), U = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), h = Symbol.for("react.client.reference"), k = $.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, M = Object.prototype.hasOwnProperty, W = Array.isArray, F = console.createTask ? console.createTask : function() {
245
244
  return null;
246
245
  };
247
- L = {
246
+ $ = {
248
247
  react_stack_bottom_frame: function(s) {
249
248
  return s();
250
249
  }
251
250
  };
252
- var b, $ = {}, F = L.react_stack_bottom_frame.bind(
253
- L,
254
- x
255
- )(), H = A(l(x)), G = {};
256
- te.Fragment = N, te.jsx = function(s, a, o) {
257
- var p = 1e4 > v.recentlyCreatedOwnerStacks++;
258
- return _(
251
+ var p, _ = {}, I = $.react_stack_bottom_frame.bind(
252
+ $,
253
+ b
254
+ )(), G = F(i(b)), J = {};
255
+ re.Fragment = m, re.jsx = function(s, n, c) {
256
+ var j = 1e4 > k.recentlyCreatedOwnerStacks++;
257
+ return w(
259
258
  s,
260
- a,
261
- o,
259
+ n,
260
+ c,
262
261
  !1,
263
- p ? Error("react-stack-top-frame") : F,
264
- p ? A(l(s)) : H
262
+ j ? Error("react-stack-top-frame") : I,
263
+ j ? F(i(s)) : G
265
264
  );
266
- }, te.jsxs = function(s, a, o) {
267
- var p = 1e4 > v.recentlyCreatedOwnerStacks++;
268
- return _(
265
+ }, re.jsxs = function(s, n, c) {
266
+ var j = 1e4 > k.recentlyCreatedOwnerStacks++;
267
+ return w(
269
268
  s,
270
- a,
271
- o,
269
+ n,
270
+ c,
272
271
  !0,
273
- p ? Error("react-stack-top-frame") : F,
274
- p ? A(l(s)) : H
272
+ j ? Error("react-stack-top-frame") : I,
273
+ j ? F(i(s)) : G
275
274
  );
276
275
  };
277
- }()), te;
276
+ }()), re;
278
277
  }
279
- process.env.NODE_ENV === "production" ? ce.exports = Oe() : ce.exports = Ae();
280
- var e = ce.exports;
281
- function Ye({ text: t, link: r, linkText: n, year: l, navigationItems: d = [] }) {
282
- const { t: x } = pe("pages-product-page"), m = Te(), h = xe(), f = [
278
+ process.env.NODE_ENV === "production" ? ue.exports = We() : ue.exports = Ie();
279
+ var e = ue.exports;
280
+ function Ze({ text: t, link: r, linkText: a, year: i, navigationItems: x = [] }) {
281
+ const b = Ve(), d = fe(), u = [
283
282
  {
284
- icon: ye,
283
+ icon: Me,
285
284
  label: "Dashboard",
286
285
  path: "/dashboard",
287
286
  key: "dashboard"
288
287
  },
289
288
  {
290
- icon: Ee,
289
+ icon: Le,
291
290
  label: "Calendar",
292
291
  path: "/calendar",
293
292
  key: "calendar"
294
293
  },
295
294
  {
296
- icon: Ce,
295
+ icon: ze,
297
296
  label: "Admins",
298
297
  path: "/admins",
299
298
  key: "admins"
300
299
  },
301
300
  {
302
- icon: Se,
301
+ icon: Te,
303
302
  label: "Settings",
304
303
  path: "/settings",
305
304
  key: "settings"
306
305
  }
307
- ], k = d.length > 0 ? d : f, _ = (y) => h.pathname === y;
306
+ ], v = x.length > 0 ? x : u, y = (w) => d.pathname === w;
308
307
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
309
308
  /* @__PURE__ */ e.jsxs("footer", { className: "hidden md:block relative overflow-hidden border-t transition-all duration-300 bg-gradient-to-r from-white via-violet-50/30 to-white border-slate-200/50 dark:bg-gradient-to-r dark:from-slate-800 dark:via-slate-900 dark:to-slate-800 dark:border-slate-700/50 shadow-sm", children: [
310
309
  /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 w-full h-full opacity-5 bg-gradient-to-r from-violet-300 to-indigo-300 dark:bg-gradient-to-r dark:from-violet-500 dark:to-indigo-500" }),
@@ -330,7 +329,7 @@ function Ye({ text: t, link: r, linkText: n, year: l, navigationItems: d = [] })
330
329
  ) }),
331
330
  /* @__PURE__ */ e.jsxs("span", { className: "text-sm text-slate-600 dark:text-slate-400", children: [
332
331
  "© ",
333
- l || (/* @__PURE__ */ new Date()).getFullYear()
332
+ i || (/* @__PURE__ */ new Date()).getFullYear()
334
333
  ] }),
335
334
  /* @__PURE__ */ e.jsx(
336
335
  "a",
@@ -339,7 +338,7 @@ function Ye({ text: t, link: r, linkText: n, year: l, navigationItems: d = [] })
339
338
  target: "_blank",
340
339
  rel: "noopener noreferrer",
341
340
  className: "text-sm font-medium transition-all duration-200 hover:scale-105 inline-block text-violet-600 hover:text-violet-700 dark:text-violet-400 dark:hover:text-violet-300",
342
- children: x("footer.text")
341
+ children: t || a || "Footer Text"
343
342
  }
344
343
  )
345
344
  ] }),
@@ -362,7 +361,7 @@ function Ye({ text: t, link: r, linkText: n, year: l, navigationItems: d = [] })
362
361
  ),
363
362
  /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-slate-500 dark:text-slate-500", children: [
364
363
  "Made with ",
365
- /* @__PURE__ */ e.jsx(Ne, { className: "w-3 h-3 inline text-red-500 fill-red-500" })
364
+ /* @__PURE__ */ e.jsx(Re, { className: "w-3 h-3 inline text-red-500 fill-red-500" })
366
365
  ] })
367
366
  ] })
368
367
  ] }) })
@@ -370,30 +369,30 @@ function Ye({ text: t, link: r, linkText: n, year: l, navigationItems: d = [] })
370
369
  /* @__PURE__ */ e.jsx("nav", { className: "md:hidden fixed bottom-0 left-0 right-0 z-50 safe-area-bottom", children: /* @__PURE__ */ e.jsxs("div", { className: "relative backdrop-blur-2xl bg-white/90 dark:bg-slate-900/95 border-t border-slate-200/50 dark:border-slate-700/50 shadow-2xl", children: [
371
370
  /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-violet-50/30 to-transparent dark:from-violet-950/20 dark:to-transparent pointer-events-none" }),
372
371
  /* @__PURE__ */ e.jsx("div", { className: "absolute top-0 left-0 right-0 h-0.5 bg-gradient-to-r from-transparent via-violet-500 to-transparent opacity-50" }),
373
- /* @__PURE__ */ e.jsx("div", { className: "relative grid grid-cols-4 gap-1 px-2 py-2 pb-safe", children: k.map((y, E) => {
374
- const L = y.icon, C = _(y.path);
372
+ /* @__PURE__ */ e.jsx("div", { className: "relative grid grid-cols-4 gap-1 px-2 py-2 pb-safe", children: v.map((w, z) => {
373
+ const N = w.icon, $ = y(w.path);
375
374
  return /* @__PURE__ */ e.jsxs(
376
375
  "button",
377
376
  {
378
- onClick: () => m(y.path),
379
- className: `relative flex flex-col items-center justify-center py-2 px-1 rounded-2xl transition-all duration-300 group ${C ? "bg-gradient-to-br from-violet-500 to-indigo-600 shadow-lg shadow-violet-500/30" : "hover:bg-slate-100 dark:hover:bg-slate-800/50 active:scale-95"}`,
377
+ onClick: () => b(w.path),
378
+ className: `relative flex flex-col items-center justify-center py-2 px-1 rounded-2xl transition-all duration-300 group ${$ ? "bg-gradient-to-br from-violet-500 to-indigo-600 shadow-lg shadow-violet-500/30" : "hover:bg-slate-100 dark:hover:bg-slate-800/50 active:scale-95"}`,
380
379
  children: [
381
- C && /* @__PURE__ */ e.jsx("div", { className: "absolute -top-1 left-1/2 -translate-x-1/2 w-1 h-1 rounded-full bg-white shadow-lg shadow-white/50 animate-pulse" }),
382
- /* @__PURE__ */ e.jsxs("div", { className: `relative mb-1 transition-transform duration-300 ${C ? "scale-110" : "group-hover:scale-110"}`, children: [
380
+ $ && /* @__PURE__ */ e.jsx("div", { className: "absolute -top-1 left-1/2 -translate-x-1/2 w-1 h-1 rounded-full bg-white shadow-lg shadow-white/50 animate-pulse" }),
381
+ /* @__PURE__ */ e.jsxs("div", { className: `relative mb-1 transition-transform duration-300 ${$ ? "scale-110" : "group-hover:scale-110"}`, children: [
383
382
  /* @__PURE__ */ e.jsx(
384
- L,
383
+ N,
385
384
  {
386
- className: `w-6 h-6 transition-colors duration-300 ${C ? "text-white" : "text-slate-600 dark:text-slate-400 group-hover:text-violet-600 dark:group-hover:text-violet-400"}`,
387
- strokeWidth: C ? 2.5 : 2
385
+ className: `w-6 h-6 transition-colors duration-300 ${$ ? "text-white" : "text-slate-600 dark:text-slate-400 group-hover:text-violet-600 dark:group-hover:text-violet-400"}`,
386
+ strokeWidth: $ ? 2.5 : 2
388
387
  }
389
388
  ),
390
- C && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 rounded-full bg-white/20 animate-ping" })
389
+ $ && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 rounded-full bg-white/20 animate-ping" })
391
390
  ] }),
392
- /* @__PURE__ */ e.jsx("span", { className: `text-xs font-semibold transition-all duration-300 ${C ? "text-white scale-105" : "text-slate-600 dark:text-slate-400 group-hover:text-violet-600 dark:group-hover:text-violet-400"}`, children: y.label }),
393
- y.badge && /* @__PURE__ */ e.jsx("div", { className: "absolute top-1 right-2 w-2 h-2 rounded-full bg-red-500 border-2 border-white dark:border-slate-900 animate-pulse" })
391
+ /* @__PURE__ */ e.jsx("span", { className: `text-xs font-semibold transition-all duration-300 ${$ ? "text-white scale-105" : "text-slate-600 dark:text-slate-400 group-hover:text-violet-600 dark:group-hover:text-violet-400"}`, children: w.label }),
392
+ w.badge && /* @__PURE__ */ e.jsx("div", { className: "absolute top-1 right-2 w-2 h-2 rounded-full bg-red-500 border-2 border-white dark:border-slate-900 animate-pulse" })
394
393
  ]
395
394
  },
396
- y.key || E
395
+ w.key || z
397
396
  );
398
397
  }) }),
399
398
  /* @__PURE__ */ e.jsx("div", { className: "h-safe-area-inset-bottom bg-white/50 dark:bg-slate-900/50" })
@@ -411,27 +410,27 @@ function Ye({ text: t, link: r, linkText: n, year: l, navigationItems: d = [] })
411
410
  ` })
412
411
  ] });
413
412
  }
414
- const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
415
- const [l, d] = O(!1), [x, m] = O({ top: 0, right: 0 }), h = K(null), f = K(null);
416
- return J(() => {
417
- const k = (_) => {
418
- h.current && !h.current.contains(_.target) && f.current && !f.current.contains(_.target) && d(!1);
413
+ const He = ({ user: t, onLogout: r, showEmail: a = !0 }) => {
414
+ const [i, x] = T(!1), [b, d] = T({ top: 0, right: 0 }), u = ee(null), v = ee(null);
415
+ return Q(() => {
416
+ const y = (w) => {
417
+ u.current && !u.current.contains(w.target) && v.current && !v.current.contains(w.target) && x(!1);
419
418
  };
420
- return l && document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k);
421
- }, [l]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
419
+ return i && document.addEventListener("mousedown", y), () => document.removeEventListener("mousedown", y);
420
+ }, [i]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
422
421
  /* @__PURE__ */ e.jsxs(
423
422
  "button",
424
423
  {
425
- ref: h,
424
+ ref: u,
426
425
  onClick: () => {
427
- if (!l && h.current) {
428
- const k = h.current.getBoundingClientRect();
429
- m({
430
- top: k.bottom + 6,
431
- right: window.innerWidth - k.right
426
+ if (!i && u.current) {
427
+ const y = u.current.getBoundingClientRect();
428
+ d({
429
+ top: y.bottom + 6,
430
+ right: window.innerWidth - y.right
432
431
  });
433
432
  }
434
- d(!l);
433
+ x(!i);
435
434
  },
436
435
  title: "Account",
437
436
  className: `p-2 sm:p-2.5 rounded-xl transition-all duration-200
@@ -441,22 +440,22 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
441
440
  hover:scale-105 active:scale-95
442
441
  flex items-center gap-1`,
443
442
  children: [
444
- /* @__PURE__ */ e.jsx(fe, { className: "w-[18px] h-[18px]" }),
443
+ /* @__PURE__ */ e.jsx(Ee, { className: "w-[18px] h-[18px]" }),
445
444
  /* @__PURE__ */ e.jsx(
446
- ae,
445
+ le,
447
446
  {
448
- className: `w-3 h-3 text-slate-400 transition-transform duration-200 ${l ? "rotate-180" : ""}`
447
+ className: `w-3 h-3 text-slate-400 transition-transform duration-200 ${i ? "rotate-180" : ""}`
449
448
  }
450
449
  )
451
450
  ]
452
451
  }
453
452
  ),
454
- l && de(
453
+ i && be(
455
454
  /* @__PURE__ */ e.jsxs(
456
455
  "div",
457
456
  {
458
- ref: f,
459
- style: { top: x.top, right: x.right },
457
+ ref: v,
458
+ style: { top: b.top, right: b.right },
460
459
  className: `fixed w-48 rounded-xl border shadow-lg overflow-hidden z-[9999]
461
460
  bg-white border-slate-200/60
462
461
  dark:bg-slate-800 dark:border-slate-700/60
@@ -464,20 +463,20 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
464
463
  children: [
465
464
  ((t == null ? void 0 : t.name) || (t == null ? void 0 : t.email)) && /* @__PURE__ */ e.jsxs("div", { className: "px-3.5 py-3 border-b border-slate-100 dark:border-slate-700", children: [
466
465
  (t == null ? void 0 : t.name) && /* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-slate-800 dark:text-slate-200 truncate", children: t.name }),
467
- n && (t == null ? void 0 : t.email) && /* @__PURE__ */ e.jsx("p", { className: "text-xs font-medium text-slate-500 dark:text-slate-400 truncate mt-0.5", children: t.email })
466
+ a && (t == null ? void 0 : t.email) && /* @__PURE__ */ e.jsx("p", { className: "text-xs font-medium text-slate-500 dark:text-slate-400 truncate mt-0.5", children: t.email })
468
467
  ] }),
469
468
  /* @__PURE__ */ e.jsxs(
470
469
  "button",
471
470
  {
472
471
  onClick: () => {
473
- d(!1), r();
472
+ x(!1), r();
474
473
  },
475
474
  className: `w-full flex items-center gap-2 px-3.5 py-2.5
476
475
  text-sm font-medium text-red-600 dark:text-red-400
477
476
  hover:bg-red-50 dark:hover:bg-red-900/20
478
477
  transition-colors duration-150`,
479
478
  children: [
480
- /* @__PURE__ */ e.jsx(ke, { className: "w-4 h-4 flex-shrink-0" }),
479
+ /* @__PURE__ */ e.jsx(Se, { className: "w-4 h-4 flex-shrink-0" }),
481
480
  "Logout"
482
481
  ]
483
482
  }
@@ -488,61 +487,61 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
488
487
  document.body
489
488
  )
490
489
  ] });
491
- }, Ue = ({
490
+ }, Ke = ({
492
491
  appIcon: t,
493
492
  appName: r,
494
- appShortName: n,
495
- appTagline: l,
496
- userName: d,
493
+ appShortName: a,
494
+ appTagline: i,
495
+ userName: x,
497
496
  // <-- Taken from props!
498
- userEmail: x,
497
+ userEmail: b,
499
498
  // <-- Taken from props!
500
- userRole: m,
501
- onLogout: h,
499
+ userRole: d,
500
+ onLogout: u,
502
501
  // <-- Added onLogout prop!
503
- navLinks: f = [],
504
- showAccessibility: k = !0,
505
- showUserInfo: _ = !0,
506
- showLanguageSelector: y = !0,
507
- showThemeToggle: E = !0,
508
- showAppIcon: L = !0,
509
- showAppFullName: C = !0,
510
- showAppTagline: g = !1,
511
- showNavLinks: N = !1,
512
- rightContent: c
502
+ navLinks: v = [],
503
+ showAccessibility: y = !0,
504
+ showUserInfo: w = !0,
505
+ showLanguageSelector: z = !0,
506
+ showThemeToggle: N = !0,
507
+ showAppIcon: $ = !0,
508
+ showAppFullName: P = !0,
509
+ showAppTagline: f = !1,
510
+ showNavLinks: m = !1,
511
+ rightContent: g
513
512
  }) => {
514
- var q;
515
- const z = xe(), [I, V] = O(
513
+ var S;
514
+ const R = fe(), [L, Y] = T(
516
515
  localStorage.getItem("language") || "eng"
517
- ), [M, Y] = O(!1), [U, B] = O(!1), [j, W] = O(16), [i, v] = O(!1), [S, P] = O(!1), [A, b] = O(!1), [$, F] = O(!1), [H, G] = O(!1);
518
- J(() => {
519
- const u = localStorage.getItem("theme") || "light";
520
- b(u === "dark"), document.documentElement.classList.toggle("dark", u === "dark");
521
- }, []), J(() => {
522
- const u = () => G(window.scrollY > 8);
523
- return window.addEventListener("scroll", u, { passive: !0 }), () => window.removeEventListener("scroll", u);
524
- }, []), J(() => {
525
- F(!1);
526
- }, [z.pathname]);
516
+ ), [D, X] = T(!1), [H, U] = T(!1), [C, O] = T(16), [h, k] = T(!1), [M, W] = T(!1), [F, p] = T(!1), [_, I] = T(!1), [G, J] = T(!1);
517
+ Q(() => {
518
+ const l = localStorage.getItem("theme") || "light";
519
+ p(l === "dark"), document.documentElement.classList.toggle("dark", l === "dark");
520
+ }, []), Q(() => {
521
+ const l = () => J(window.scrollY > 8);
522
+ return window.addEventListener("scroll", l, { passive: !0 }), () => window.removeEventListener("scroll", l);
523
+ }, []), Q(() => {
524
+ I(!1);
525
+ }, [R.pathname]);
527
526
  const s = () => {
528
- b((u) => {
529
- const Q = !u;
530
- return Q ? (document.documentElement.classList.add("dark"), localStorage.setItem("theme", "dark")) : (document.documentElement.classList.remove("dark"), localStorage.setItem("theme", "light")), Q;
527
+ p((l) => {
528
+ const A = !l;
529
+ return A ? (document.documentElement.classList.add("dark"), localStorage.setItem("theme", "dark")) : (document.documentElement.classList.remove("dark"), localStorage.setItem("theme", "light")), A;
531
530
  });
532
- }, a = (u) => {
533
- V(u), localStorage.setItem("language", u), B(!1);
531
+ }, n = (l) => {
532
+ Y(l), localStorage.setItem("language", l), U(!1);
534
533
  };
535
- J(() => {
536
- document.documentElement.style.fontSize = `${j}px`, document.body.style.filter = i ? "grayscale(100%)" : "none", document.body.style.fontFamily = S ? "OpenDyslexic, Arial, sans-serif" : "inherit";
537
- }, [j, i, S]);
538
- const o = {
534
+ Q(() => {
535
+ document.documentElement.style.fontSize = `${C}px`, document.body.style.filter = h ? "grayscale(100%)" : "none", document.body.style.fontFamily = M ? "OpenDyslexic, Arial, sans-serif" : "inherit";
536
+ }, [C, h, M]);
537
+ const c = {
539
538
  eng: { label: "English", disabled: !1 },
540
539
  hin: { label: "Hindi", disabled: !1 }
541
- }, p = () => {
542
- j < 24 && W(j + 2);
543
- }, w = () => {
544
- j > 12 && W(j - 2);
545
- }, D = () => W(16), R = (u) => u === "/" ? z.pathname === "/" : z.pathname.startsWith(u);
540
+ }, j = () => {
541
+ C < 24 && O(C + 2);
542
+ }, E = () => {
543
+ C > 12 && O(C - 2);
544
+ }, B = () => O(16), o = (l) => l === "/" ? R.pathname === "/" : R.pathname.startsWith(l);
546
545
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
547
546
  /* @__PURE__ */ e.jsxs(
548
547
  "nav",
@@ -552,7 +551,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
552
551
  bg-white/95 dark:bg-slate-900/95 backdrop-blur-md
553
552
  border-b border-slate-200/60 dark:border-slate-700/60
554
553
  transition-all duration-300
555
- ${H ? "shadow-xl shadow-slate-200/50 dark:shadow-slate-950/50" : "shadow-sm shadow-slate-100/50 dark:shadow-slate-900/30"}
554
+ ${G ? "shadow-xl shadow-slate-200/50 dark:shadow-slate-950/50" : "shadow-sm shadow-slate-100/50 dark:shadow-slate-900/30"}
556
555
  `,
557
556
  children: [
558
557
  /* @__PURE__ */ e.jsx("div", { className: "absolute top-0 right-0 w-96 h-96 rounded-full blur-3xl opacity-20 bg-violet-300 dark:bg-violet-500 -translate-y-1/2 translate-x-1/2 pointer-events-none" }),
@@ -560,7 +559,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
560
559
  /* @__PURE__ */ e.jsxs("div", { className: "relative z-10 mx-auto px-3 sm:px-5 lg:px-6 py-2 sm:py-0", children: [
561
560
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between h-14 sm:h-20", children: [
562
561
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 sm:gap-4 group flex-shrink-0", children: [
563
- L && t && /* @__PURE__ */ e.jsx("div", { className: "w-8 h-8 sm:w-16 sm:h-16 flex items-center justify-center group-hover:scale-105 transition-transform duration-200", children: /* @__PURE__ */ e.jsx(
562
+ $ && t && /* @__PURE__ */ e.jsx("div", { className: "w-8 h-8 sm:w-16 sm:h-16 flex items-center justify-center group-hover:scale-105 transition-transform duration-200", children: /* @__PURE__ */ e.jsx(
564
563
  "img",
565
564
  {
566
565
  src: t,
@@ -569,248 +568,248 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
569
568
  }
570
569
  ) }),
571
570
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col leading-tight", children: [
572
- /* @__PURE__ */ e.jsx("span", { className: "font-extrabold text-base sm:text-xl text-slate-900 dark:text-white sm:hidden tracking-tight", children: n || r }),
571
+ /* @__PURE__ */ e.jsx("span", { className: "font-extrabold text-base sm:text-xl text-slate-900 dark:text-white sm:hidden tracking-tight", children: a || r }),
573
572
  /* @__PURE__ */ e.jsxs("div", { className: "hidden sm:flex flex-col", children: [
574
- /* @__PURE__ */ e.jsx("span", { className: "font-extrabold text-slate-900 dark:text-white tracking-tight text-lg lg:hidden", children: n || r }),
575
- C && /* @__PURE__ */ e.jsx("span", { className: "font-extrabold text-slate-900 dark:text-white tracking-tight hidden lg:block text-[17px] xl:text-lg leading-tight max-w-md", children: r }),
576
- g && l && /* @__PURE__ */ e.jsx("span", { className: "mt-0.5 text-[10px] font-semibold tracking-[0.2em] text-violet-600 dark:text-violet-400 uppercase", children: l })
573
+ /* @__PURE__ */ e.jsx("span", { className: "font-extrabold text-slate-900 dark:text-white tracking-tight text-lg lg:hidden", children: a || r }),
574
+ P && /* @__PURE__ */ e.jsx("span", { className: "font-extrabold text-slate-900 dark:text-white tracking-tight hidden lg:block text-[17px] xl:text-lg leading-tight max-w-md", children: r }),
575
+ f && i && /* @__PURE__ */ e.jsx("span", { className: "mt-0.5 text-[10px] font-semibold tracking-[0.2em] text-violet-600 dark:text-violet-400 uppercase", children: i })
577
576
  ] })
578
577
  ] })
579
578
  ] }),
580
- N && f.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "hidden md:flex items-center gap-2", children: f.map((u) => {
581
- var Z;
582
- return u != null && u.to ? ((Z = u == null ? void 0 : u.to) == null ? void 0 : Z.startsWith("http")) ? /* @__PURE__ */ e.jsx(
579
+ m && v.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "hidden md:flex items-center gap-2", children: v.map((l) => {
580
+ var q;
581
+ return l != null && l.to ? ((q = l == null ? void 0 : l.to) == null ? void 0 : q.startsWith("http")) ? /* @__PURE__ */ e.jsx(
583
582
  "a",
584
583
  {
585
- href: u.to,
586
- target: u.target || "_self",
584
+ href: l.to,
585
+ target: l.target || "_self",
587
586
  rel: "noopener noreferrer",
588
587
  className: "relative px-4 lg:px-5 py-2.5 rounded-xl text-sm font-semibold tracking-wide transition-all duration-200 text-slate-600 dark:text-slate-300 hover:text-violet-700 dark:hover:text-violet-400 hover:bg-violet-50/80 dark:hover:bg-slate-700/50",
589
- children: u.label
588
+ children: l.label
590
589
  },
591
- u.to
590
+ l.to
592
591
  ) : /* @__PURE__ */ e.jsxs(
593
- ne,
592
+ de,
594
593
  {
595
- to: u.to,
596
- target: u.target || "_self",
597
- rel: u.target === "_blank" ? "noopener noreferrer" : void 0,
598
- className: `relative px-4 lg:px-5 py-2.5 rounded-xl text-sm font-semibold tracking-wide transition-all duration-200 ${R(u.to) ? "text-violet-700 dark:text-violet-400 bg-violet-50 dark:bg-violet-600/10 shadow-sm" : "text-slate-600 dark:text-slate-300 hover:text-violet-700 dark:hover:text-violet-400 hover:bg-violet-50/80 dark:hover:bg-slate-700/50"}`,
594
+ to: l.to,
595
+ target: l.target || "_self",
596
+ rel: l.target === "_blank" ? "noopener noreferrer" : void 0,
597
+ className: `relative px-4 lg:px-5 py-2.5 rounded-xl text-sm font-semibold tracking-wide transition-all duration-200 ${o(l.to) ? "text-violet-700 dark:text-violet-400 bg-violet-50 dark:bg-violet-600/10 shadow-sm" : "text-slate-600 dark:text-slate-300 hover:text-violet-700 dark:hover:text-violet-400 hover:bg-violet-50/80 dark:hover:bg-slate-700/50"}`,
599
598
  children: [
600
- u.label,
601
- R(u.to) && /* @__PURE__ */ e.jsx("span", { className: "absolute bottom-1 left-1/2 -translate-x-1/2 w-4 h-0.5 rounded-full bg-gradient-to-r from-violet-600 to-indigo-600" })
599
+ l.label,
600
+ o(l.to) && /* @__PURE__ */ e.jsx("span", { className: "absolute bottom-1 left-1/2 -translate-x-1/2 w-4 h-0.5 rounded-full bg-gradient-to-r from-violet-600 to-indigo-600" })
602
601
  ]
603
602
  },
604
- u.to
603
+ l.to
605
604
  ) : null;
606
605
  }) }),
607
606
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1.5 sm:gap-2", children: [
608
- c && /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: c }),
609
- k && /* @__PURE__ */ e.jsx(
607
+ g && /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: g }),
608
+ y && /* @__PURE__ */ e.jsx(
610
609
  "button",
611
610
  {
612
- onClick: () => Y(!0),
611
+ onClick: () => X(!0),
613
612
  className: "p-2 sm:p-2.5 rounded-xl transition-all duration-200 bg-white hover:bg-slate-50 text-slate-700 border border-slate-200 shadow-sm dark:bg-slate-700/50 dark:hover:bg-slate-700 dark:text-slate-300 dark:border-slate-600/50 hover:scale-105 active:scale-95",
614
613
  title: "Accessibility Settings",
615
614
  children: /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4 sm:w-[18px] sm:h-[18px]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4" }) })
616
615
  }
617
616
  ),
618
- E && /* @__PURE__ */ e.jsx(
617
+ N && /* @__PURE__ */ e.jsx(
619
618
  "button",
620
619
  {
621
620
  onClick: s,
622
621
  "aria-label": "Toggle theme",
623
- title: A ? "Switch to Light Mode" : "Switch to Dark Mode",
622
+ title: F ? "Switch to Light Mode" : "Switch to Dark Mode",
624
623
  className: "p-2 sm:p-2.5 rounded-xl transition-all duration-200 bg-white hover:bg-slate-50 text-slate-700 border border-slate-200 shadow-sm dark:bg-slate-700/50 dark:hover:bg-slate-700 dark:text-yellow-400 dark:border-slate-600/50 hover:scale-105 active:scale-95",
625
- children: A ? /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4 sm:w-[18px] sm:h-[18px]", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", d: "M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z", clipRule: "evenodd" }) }) : /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4 sm:w-[18px] sm:h-[18px]", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e.jsx("path", { d: "M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z" }) })
624
+ children: F ? /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4 sm:w-[18px] sm:h-[18px]", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", d: "M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z", clipRule: "evenodd" }) }) : /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4 sm:w-[18px] sm:h-[18px]", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e.jsx("path", { d: "M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z" }) })
626
625
  }
627
626
  ),
628
- y && /* @__PURE__ */ e.jsxs(
627
+ z && /* @__PURE__ */ e.jsxs(
629
628
  "button",
630
629
  {
631
- onClick: () => B(!0),
630
+ onClick: () => U(!0),
632
631
  className: "hidden sm:flex items-center gap-2 px-4 py-2.5 rounded-xl bg-white hover:bg-slate-50 text-slate-700 border border-slate-200 shadow-sm dark:bg-slate-700/50 dark:hover:bg-slate-700 dark:text-slate-300 dark:border-slate-600/50 hover:scale-105 active:scale-95 transition-all duration-200",
633
632
  children: [
634
633
  /* @__PURE__ */ e.jsx("svg", { className: "w-[18px] h-[18px]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 2a10 10 0 100 20 10 10 0 000-20zm0 0c2.5 2.5 4 6 4 10s-1.5 7.5-4 10m0-20C9.5 4.5 8 8 8 12s1.5 7.5 4 10m-9-10h18" }) }),
635
- /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium", children: (q = o[I]) == null ? void 0 : q.label })
634
+ /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium", children: (S = c[L]) == null ? void 0 : S.label })
636
635
  ]
637
636
  }
638
637
  ),
639
- y && /* @__PURE__ */ e.jsx(
638
+ z && /* @__PURE__ */ e.jsx(
640
639
  "button",
641
640
  {
642
- onClick: () => B(!0),
641
+ onClick: () => U(!0),
643
642
  className: "sm:hidden p-2 rounded-xl bg-white hover:bg-slate-50 text-slate-700 border border-slate-200 shadow-sm dark:bg-slate-700/50 dark:hover:bg-slate-700 dark:text-slate-300 dark:border-slate-600/50 hover:scale-105 active:scale-95 transition-all duration-200",
644
643
  children: /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 2a10 10 0 100 20 10 10 0 000-20zm0 0c2.5 2.5 4 6 4 10s-1.5 7.5-4 10m0-20C9.5 4.5 8 8 8 12s1.5 7.5 4 10m-9-10h18" }) })
645
644
  }
646
645
  ),
647
- _ && /* @__PURE__ */ e.jsx(
648
- Pe,
646
+ w && /* @__PURE__ */ e.jsx(
647
+ He,
649
648
  {
650
- user: { name: d, email: x },
651
- onLogout: h,
649
+ user: { name: x, email: b },
650
+ onLogout: u,
652
651
  showEmail: !0
653
652
  }
654
653
  ),
655
- N && f.length > 0 && /* @__PURE__ */ e.jsx(
654
+ m && v.length > 0 && /* @__PURE__ */ e.jsx(
656
655
  "button",
657
656
  {
658
- onClick: () => F((u) => !u),
659
- "aria-label": $ ? "Close menu" : "Open menu",
657
+ onClick: () => I((l) => !l),
658
+ "aria-label": _ ? "Close menu" : "Open menu",
660
659
  className: "md:hidden p-2 rounded-xl transition-all duration-200 bg-white dark:bg-slate-700/50 border border-slate-200 dark:border-slate-600/50 text-slate-700 dark:text-slate-300 shadow-sm hover:scale-105 active:scale-95",
661
- children: $ ? /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) : /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" }) })
660
+ children: _ ? /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) : /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" }) })
662
661
  }
663
662
  )
664
663
  ] })
665
664
  ] }),
666
- N && $ && f.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "md:hidden border-t border-slate-200 dark:border-slate-700 pb-3 animate-in slide-in-from-top-2 duration-200", children: /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-0.5 pt-2", children: f.map((u) => {
667
- var Z;
668
- return u != null && u.to ? ((Z = u == null ? void 0 : u.to) == null ? void 0 : Z.startsWith("http")) ? /* @__PURE__ */ e.jsx(
665
+ m && _ && v.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "md:hidden border-t border-slate-200 dark:border-slate-700 pb-3 animate-in slide-in-from-top-2 duration-200", children: /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-0.5 pt-2", children: v.map((l) => {
666
+ var q;
667
+ return l != null && l.to ? ((q = l == null ? void 0 : l.to) == null ? void 0 : q.startsWith("http")) ? /* @__PURE__ */ e.jsx(
669
668
  "a",
670
669
  {
671
- href: u.to,
672
- target: u.target || "_self",
670
+ href: l.to,
671
+ target: l.target || "_self",
673
672
  rel: "noopener noreferrer",
674
673
  className: "flex items-center justify-between px-3 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-700/50",
675
- children: u.label
674
+ children: l.label
676
675
  },
677
- u.to
676
+ l.to
678
677
  ) : /* @__PURE__ */ e.jsxs(
679
- ne,
678
+ de,
680
679
  {
681
- to: u.to,
682
- target: u.target || "_self",
683
- rel: u.target === "_blank" ? "noopener noreferrer" : void 0,
684
- className: `flex items-center justify-between px-3 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200 ${R(u.to) ? "bg-violet-50 dark:bg-violet-600/10 text-violet-700 dark:text-violet-400" : "text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-700/50"}`,
680
+ to: l.to,
681
+ target: l.target || "_self",
682
+ rel: l.target === "_blank" ? "noopener noreferrer" : void 0,
683
+ className: `flex items-center justify-between px-3 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200 ${o(l.to) ? "bg-violet-50 dark:bg-violet-600/10 text-violet-700 dark:text-violet-400" : "text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-700/50"}`,
685
684
  children: [
686
- u.label,
687
- R(u.to) && /* @__PURE__ */ e.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-gradient-to-r from-violet-600 to-indigo-600" })
685
+ l.label,
686
+ o(l.to) && /* @__PURE__ */ e.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-gradient-to-r from-violet-600 to-indigo-600" })
688
687
  ]
689
688
  },
690
- u.to
689
+ l.to
691
690
  ) : null;
692
691
  }) }) })
693
692
  ] })
694
693
  ]
695
694
  }
696
695
  ),
697
- M && /* Accessibility Modal (unchanged) */
696
+ D && /* Accessibility Modal (unchanged) */
698
697
  /* @__PURE__ */ e.jsx("div", { className: "overflow-hidden overflow-x-hidden fixed top-0 right-0 left-0 z-50 flex justify-center items-center w-full h-full bg-gray-800 bg-opacity-50", children: /* @__PURE__ */ e.jsx("div", { className: "relative p-4 w-full max-w-md", children: /* @__PURE__ */ e.jsxs("div", { className: "relative rounded-2xl shadow-2xl bg-white border border-slate-200 dark:bg-gradient-to-br dark:from-slate-800 dark:to-slate-900 dark:border dark:border-slate-700", children: [
699
698
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between p-5 border-b rounded-t-2xl border-slate-200 dark:border-slate-700 bg-gradient-to-r from-slate-50 to-violet-50/30 dark:bg-gradient-to-r dark:from-slate-800 dark:to-slate-900", children: [
700
699
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-3", children: [
701
700
  /* @__PURE__ */ e.jsx("div", { className: "w-10 h-10 rounded-lg bg-gradient-to-br from-violet-600 to-indigo-600 flex items-center justify-center", children: /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5 text-white", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4" }) }) }),
702
701
  /* @__PURE__ */ e.jsx("h3", { className: "text-lg font-bold text-slate-900 dark:text-white", children: "Accessibility Settings" })
703
702
  ] }),
704
- /* @__PURE__ */ e.jsx("button", { onClick: () => Y(!1), className: "p-2 rounded-lg transition-colors text-slate-400 hover:bg-slate-100 hover:text-slate-900 dark:hover:bg-slate-700 dark:hover:text-white", children: /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) })
703
+ /* @__PURE__ */ e.jsx("button", { onClick: () => X(!1), className: "p-2 rounded-lg transition-colors text-slate-400 hover:bg-slate-100 hover:text-slate-900 dark:hover:bg-slate-700 dark:hover:text-white", children: /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) })
705
704
  ] }),
706
705
  /* @__PURE__ */ e.jsxs("div", { className: "p-6 space-y-6", children: [
707
706
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
708
707
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
709
708
  /* @__PURE__ */ e.jsx("span", { className: "text-sm font-semibold text-slate-700 dark:text-slate-300", children: "Font Size" }),
710
709
  /* @__PURE__ */ e.jsxs("span", { className: "text-sm font-medium px-3 py-1 rounded-lg bg-violet-100 text-violet-700 border border-violet-200 dark:bg-violet-600/20 dark:text-violet-400 dark:border dark:border-violet-500/30", children: [
711
- j,
710
+ C,
712
711
  "px"
713
712
  ] })
714
713
  ] }),
715
714
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
716
- /* @__PURE__ */ e.jsx("button", { onClick: w, className: "flex-1 py-3 px-4 rounded-xl font-semibold transition-all duration-200 bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200 dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300 dark:border dark:border-slate-600", children: "A-" }),
717
- /* @__PURE__ */ e.jsx("button", { onClick: D, className: "flex-1 py-3 px-4 rounded-xl font-semibold transition-all duration-200 bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200 dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300 dark:border dark:border-slate-600", children: "A" }),
718
- /* @__PURE__ */ e.jsx("button", { onClick: p, className: "flex-1 py-3 px-4 rounded-xl font-semibold transition-all duration-200 bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200 dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300 dark:border dark:border-slate-600", children: "A+" })
715
+ /* @__PURE__ */ e.jsx("button", { onClick: E, className: "flex-1 py-3 px-4 rounded-xl font-semibold transition-all duration-200 bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200 dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300 dark:border dark:border-slate-600", children: "A-" }),
716
+ /* @__PURE__ */ e.jsx("button", { onClick: B, className: "flex-1 py-3 px-4 rounded-xl font-semibold transition-all duration-200 bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200 dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300 dark:border dark:border-slate-600", children: "A" }),
717
+ /* @__PURE__ */ e.jsx("button", { onClick: j, className: "flex-1 py-3 px-4 rounded-xl font-semibold transition-all duration-200 bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200 dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300 dark:border dark:border-slate-600", children: "A+" })
719
718
  ] })
720
719
  ] }),
721
720
  /* @__PURE__ */ e.jsx("div", { className: "border-t border-slate-200 dark:border-slate-700" }),
722
721
  /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center", children: [
723
722
  /* @__PURE__ */ e.jsx("label", { className: "text-sm font-semibold text-slate-700 dark:text-slate-300", children: "Grayscale Mode" }),
724
- /* @__PURE__ */ e.jsx("button", { onClick: () => v(!i), className: `relative inline-flex h-7 w-12 items-center rounded-full transition-colors ${i ? "bg-gradient-to-r from-violet-600 to-indigo-600" : "bg-slate-300 dark:bg-slate-700"}`, children: /* @__PURE__ */ e.jsx("span", { className: `inline-block h-5 w-5 transform rounded-full bg-white shadow-lg transition-transform ${i ? "translate-x-6" : "translate-x-1"}` }) })
723
+ /* @__PURE__ */ e.jsx("button", { onClick: () => k(!h), className: `relative inline-flex h-7 w-12 items-center rounded-full transition-colors ${h ? "bg-gradient-to-r from-violet-600 to-indigo-600" : "bg-slate-300 dark:bg-slate-700"}`, children: /* @__PURE__ */ e.jsx("span", { className: `inline-block h-5 w-5 transform rounded-full bg-white shadow-lg transition-transform ${h ? "translate-x-6" : "translate-x-1"}` }) })
725
724
  ] }),
726
725
  /* @__PURE__ */ e.jsx("div", { className: "border-t border-slate-200 dark:border-slate-700" }),
727
726
  /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center", children: [
728
727
  /* @__PURE__ */ e.jsx("label", { className: "text-sm font-semibold text-slate-700 dark:text-slate-300", children: "Dyslexia-Friendly Font" }),
729
- /* @__PURE__ */ e.jsx("button", { onClick: () => P(!S), className: `relative inline-flex h-7 w-12 items-center rounded-full transition-colors ${S ? "bg-gradient-to-r from-violet-600 to-indigo-600" : "bg-slate-300 dark:bg-slate-700"}`, children: /* @__PURE__ */ e.jsx("span", { className: `inline-block h-5 w-5 transform rounded-full bg-white shadow-lg transition-transform ${S ? "translate-x-6" : "translate-x-1"}` }) })
728
+ /* @__PURE__ */ e.jsx("button", { onClick: () => W(!M), className: `relative inline-flex h-7 w-12 items-center rounded-full transition-colors ${M ? "bg-gradient-to-r from-violet-600 to-indigo-600" : "bg-slate-300 dark:bg-slate-700"}`, children: /* @__PURE__ */ e.jsx("span", { className: `inline-block h-5 w-5 transform rounded-full bg-white shadow-lg transition-transform ${M ? "translate-x-6" : "translate-x-1"}` }) })
730
729
  ] })
731
730
  ] }),
732
- /* @__PURE__ */ e.jsx("div", { className: "flex p-5 border-t rounded-b border-slate-200 dark:border-slate-700", children: /* @__PURE__ */ e.jsx("button", { onClick: () => Y(!1), className: "w-full py-3 px-5 text-sm font-semibold text-white bg-gradient-to-r from-violet-600 to-indigo-600 hover:from-violet-700 hover:to-indigo-700 rounded-xl shadow-lg transition-all duration-200", children: "Close" }) })
731
+ /* @__PURE__ */ e.jsx("div", { className: "flex p-5 border-t rounded-b border-slate-200 dark:border-slate-700", children: /* @__PURE__ */ e.jsx("button", { onClick: () => X(!1), className: "w-full py-3 px-5 text-sm font-semibold text-white bg-gradient-to-r from-violet-600 to-indigo-600 hover:from-violet-700 hover:to-indigo-700 rounded-xl shadow-lg transition-all duration-200", children: "Close" }) })
733
732
  ] }) }) }),
734
- U && /* Language Modal (unchanged) */
733
+ H && /* Language Modal (unchanged) */
735
734
  /* @__PURE__ */ e.jsx("div", { className: "overflow-hidden overflow-x-hidden fixed top-0 right-0 left-0 z-50 flex justify-center items-center w-full h-full bg-gray-800 bg-opacity-50", children: /* @__PURE__ */ e.jsx("div", { className: "relative p-4 w-full max-w-md", children: /* @__PURE__ */ e.jsxs("div", { className: "relative rounded-2xl shadow-2xl bg-white border border-slate-200 dark:bg-gradient-to-br dark:from-slate-800 dark:to-slate-900 dark:border dark:border-slate-700", children: [
736
735
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between p-5 border-b rounded-t-2xl border-slate-200 dark:border-slate-700 bg-gradient-to-r from-slate-50 to-violet-50/30 dark:bg-gradient-to-r dark:from-slate-800 dark:to-slate-900", children: [
737
736
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-3", children: [
738
737
  /* @__PURE__ */ e.jsx("div", { className: "w-10 h-10 rounded-lg bg-gradient-to-br from-violet-600 to-indigo-600 flex items-center justify-center", children: /* @__PURE__ */ e.jsx("svg", { className: "w-[18px] h-[18px] text-white", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 2a10 10 0 100 20 10 10 0 000-20zm0 0c2.5 2.5 4 6 4 10s-1.5 7.5-4 10m0-20C9.5 4.5 8 8 8 12s1.5 7.5 4 10m-9-10h18" }) }) }),
739
738
  /* @__PURE__ */ e.jsx("h3", { className: "text-lg font-bold text-slate-900 dark:text-white", children: "Select Language" })
740
739
  ] }),
741
- /* @__PURE__ */ e.jsx("button", { onClick: () => B(!1), className: "p-2 rounded-lg transition-colors text-slate-400 hover:bg-slate-100 hover:text-slate-900 dark:hover:bg-slate-700 dark:hover:text-white", children: /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) })
740
+ /* @__PURE__ */ e.jsx("button", { onClick: () => U(!1), className: "p-2 rounded-lg transition-colors text-slate-400 hover:bg-slate-100 hover:text-slate-900 dark:hover:bg-slate-700 dark:hover:text-white", children: /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) })
742
741
  ] }),
743
- /* @__PURE__ */ e.jsx("div", { className: "p-5", children: /* @__PURE__ */ e.jsx("ul", { className: "space-y-3", children: Object.keys(o).map((u) => /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("button", { onClick: () => a(u), disabled: o[u].disabled, className: `w-full px-5 py-4 rounded-xl text-left font-semibold transition-all duration-200 ${u === I ? "bg-gradient-to-r from-violet-600 to-indigo-600 text-white shadow-lg" : "bg-slate-50 hover:bg-slate-100 text-slate-700 border border-slate-200 dark:bg-slate-700/50 dark:hover:bg-slate-700 dark:text-slate-300 dark:border dark:border-slate-600"} ${o[u].disabled ? "opacity-50 cursor-not-allowed" : "hover:scale-[1.02]"}`, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
744
- /* @__PURE__ */ e.jsx("span", { children: o[u].label }),
745
- u === I && /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }) })
746
- ] }) }) }, u)) }) }),
747
- /* @__PURE__ */ e.jsx("div", { className: "flex p-5 border-t rounded-b border-slate-200 dark:border-slate-700", children: /* @__PURE__ */ e.jsx("button", { onClick: () => B(!1), className: "w-full py-3 px-5 text-sm font-semibold text-white bg-gradient-to-r from-violet-600 to-indigo-600 hover:from-violet-700 hover:to-indigo-700 rounded-xl shadow-lg transition-all duration-200", children: "Close" }) })
742
+ /* @__PURE__ */ e.jsx("div", { className: "p-5", children: /* @__PURE__ */ e.jsx("ul", { className: "space-y-3", children: Object.keys(c).map((l) => /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("button", { onClick: () => n(l), disabled: c[l].disabled, className: `w-full px-5 py-4 rounded-xl text-left font-semibold transition-all duration-200 ${l === L ? "bg-gradient-to-r from-violet-600 to-indigo-600 text-white shadow-lg" : "bg-slate-50 hover:bg-slate-100 text-slate-700 border border-slate-200 dark:bg-slate-700/50 dark:hover:bg-slate-700 dark:text-slate-300 dark:border dark:border-slate-600"} ${c[l].disabled ? "opacity-50 cursor-not-allowed" : "hover:scale-[1.02]"}`, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
743
+ /* @__PURE__ */ e.jsx("span", { children: c[l].label }),
744
+ l === L && /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }) })
745
+ ] }) }) }, l)) }) }),
746
+ /* @__PURE__ */ e.jsx("div", { className: "flex p-5 border-t rounded-b border-slate-200 dark:border-slate-700", children: /* @__PURE__ */ e.jsx("button", { onClick: () => U(!1), className: "w-full py-3 px-5 text-sm font-semibold text-white bg-gradient-to-r from-violet-600 to-indigo-600 hover:from-violet-700 hover:to-indigo-700 rounded-xl shadow-lg transition-all duration-200", children: "Close" }) })
748
747
  ] }) }) })
749
748
  ] });
750
- }, ge = (t, r) => {
751
- const n = {}, l = (d) => {
752
- for (const x of d)
753
- if (x.subItems) {
754
- const m = x.subItems.some(
755
- (h) => h.path && r.startsWith(h.path)
749
+ }, ye = (t, r) => {
750
+ const a = {}, i = (x) => {
751
+ for (const b of x)
752
+ if (b.subItems) {
753
+ const d = b.subItems.some(
754
+ (u) => u.path && r.startsWith(u.path)
756
755
  );
757
- l(x.subItems), m && (n[x.name] = !0);
756
+ i(b.subItems), d && (a[b.name] = !0);
758
757
  }
759
758
  };
760
- return l(t), n;
761
- }, qe = ({ menuItems: t, user: r, onLogout: n, onNavigate: l }) => {
762
- const { t: d } = pe("pages-product-page"), [x, m] = O(!1), h = K(null), f = xe(), [k, _] = O(
763
- () => ge(t, f.pathname)
764
- ), y = (c) => _((z) => ({ ...z, [c]: !z[c] })), E = (c) => f.pathname === c;
765
- J(() => {
766
- _((c) => ({
767
- ...c,
768
- ...ge(t, f.pathname)
759
+ return i(t), a;
760
+ }, et = ({ menuItems: t, user: r, onLogout: a, onNavigate: i }) => {
761
+ const [x, b] = T(!1), d = ee(null), u = fe(), [v, y] = T(
762
+ () => ye(t, u.pathname)
763
+ ), w = (m) => y((g) => ({ ...g, [m]: !g[m] })), z = (m) => u.pathname === m;
764
+ Q(() => {
765
+ y((m) => ({
766
+ ...m,
767
+ ...ye(t, u.pathname)
769
768
  }));
770
- }, [f.pathname, t]), J(() => {
771
- const c = (z) => {
772
- h.current && !h.current.contains(z.target) && m(!1);
769
+ }, [u.pathname, t]), Q(() => {
770
+ const m = (g) => {
771
+ d.current && !d.current.contains(g.target) && b(!1);
773
772
  };
774
- return x && document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c);
773
+ return x && document.addEventListener("mousedown", m), () => document.removeEventListener("mousedown", m);
775
774
  }, [x]);
776
- const L = "bg-violet-100 text-violet-700 dark:bg-violet-600/20 dark:text-violet-400", C = "bg-violet-600 dark:bg-violet-400", g = "bg-slate-300 group-hover:bg-violet-400 dark:bg-slate-600 dark:group-hover:bg-slate-500", N = ({ item: c, depth: z = 0 }) => {
777
- const I = !!c.path, V = E(c.path);
778
- return z === 0 ? /* @__PURE__ */ e.jsx("div", { children: I ? /* @__PURE__ */ e.jsx(ne, { to: c.path, onClick: () => l == null ? void 0 : l(), children: /* @__PURE__ */ e.jsxs("div", { className: `
775
+ const N = "bg-violet-100 text-violet-700 dark:bg-violet-600/20 dark:text-violet-400", $ = "bg-violet-600 dark:bg-violet-400", P = "bg-slate-300 group-hover:bg-violet-400 dark:bg-slate-600 dark:group-hover:bg-slate-500", f = ({ item: m, depth: g = 0 }) => {
776
+ const R = !!m.path, L = z(m.path);
777
+ return g === 0 ? /* @__PURE__ */ e.jsx("div", { children: R ? /* @__PURE__ */ e.jsx(de, { to: m.path, onClick: () => i == null ? void 0 : i(), children: /* @__PURE__ */ e.jsxs("div", { className: `
779
778
  flex items-center gap-2.5
780
779
  px-3 py-2 rounded-xl cursor-pointer
781
780
  transition-all duration-150 group
782
- ${V ? "bg-gradient-to-r from-violet-600 to-indigo-600 text-white shadow-sm shadow-violet-500/20" : "text-slate-600 hover:bg-slate-100/80 hover:text-slate-900 dark:text-slate-400 dark:hover:bg-slate-700/50 dark:hover:text-white"}
781
+ ${L ? "bg-gradient-to-r from-violet-600 to-indigo-600 text-white shadow-sm shadow-violet-500/20" : "text-slate-600 hover:bg-slate-100/80 hover:text-slate-900 dark:text-slate-400 dark:hover:bg-slate-700/50 dark:hover:text-white"}
783
782
  `, children: [
784
783
  /* @__PURE__ */ e.jsx("div", { className: `
785
784
  w-6 h-6 rounded-lg flex items-center justify-center flex-shrink-0
786
- ${V ? "bg-white/20" : "bg-slate-100 group-hover:bg-slate-200 dark:bg-slate-700/60 dark:group-hover:bg-slate-700"}
787
- `, children: /* @__PURE__ */ e.jsx(c.icon, { className: `w-3.5 h-3.5 ${V ? "text-white" : "text-slate-500 dark:text-slate-400"}` }) }),
788
- /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium leading-none", children: d(c.name) })
785
+ ${L ? "bg-white/20" : "bg-slate-100 group-hover:bg-slate-200 dark:bg-slate-700/60 dark:group-hover:bg-slate-700"}
786
+ `, children: /* @__PURE__ */ e.jsx(m.icon, { className: `w-3.5 h-3.5 ${L ? "text-white" : "text-slate-500 dark:text-slate-400"}` }) }),
787
+ /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium leading-none", children: m.name })
789
788
  ] }) }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
790
789
  /* @__PURE__ */ e.jsxs(
791
790
  "div",
792
791
  {
793
- onClick: () => y(c.name),
792
+ onClick: () => w(m.name),
794
793
  className: `
795
794
  flex items-center justify-between
796
795
  px-3 py-2 rounded-xl cursor-pointer
797
796
  transition-all duration-150 group
798
- ${k[c.name] ? "bg-slate-100/80 text-slate-900 dark:bg-slate-700/40 dark:text-white" : "text-slate-600 hover:bg-slate-100/80 hover:text-slate-900 dark:text-slate-400 dark:hover:bg-slate-700/50 dark:hover:text-white"}
797
+ ${v[m.name] ? "bg-slate-100/80 text-slate-900 dark:bg-slate-700/40 dark:text-white" : "text-slate-600 hover:bg-slate-100/80 hover:text-slate-900 dark:text-slate-400 dark:hover:bg-slate-700/50 dark:hover:text-white"}
799
798
  `,
800
799
  children: [
801
800
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2.5", children: [
802
801
  /* @__PURE__ */ e.jsx("div", { className: `
803
802
  w-6 h-6 rounded-lg flex items-center justify-center flex-shrink-0
804
- ${k[c.name] ? "bg-violet-100 dark:bg-violet-600/20" : "bg-slate-100 group-hover:bg-slate-200 dark:bg-slate-700/60 dark:group-hover:bg-slate-700"}
805
- `, children: /* @__PURE__ */ e.jsx(c.icon, { className: `w-3.5 h-3.5 ${k[c.name] ? "text-violet-600 dark:text-violet-400" : "text-slate-500 dark:text-slate-400"}` }) }),
806
- /* @__PURE__ */ e.jsx("span", { className: "text-sm font-semibold leading-none", children: d(c.name) })
803
+ ${v[m.name] ? "bg-violet-100 dark:bg-violet-600/20" : "bg-slate-100 group-hover:bg-slate-200 dark:bg-slate-700/60 dark:group-hover:bg-slate-700"}
804
+ `, children: /* @__PURE__ */ e.jsx(m.icon, { className: `w-3.5 h-3.5 ${v[m.name] ? "text-violet-600 dark:text-violet-400" : "text-slate-500 dark:text-slate-400"}` }) }),
805
+ /* @__PURE__ */ e.jsx("span", { className: "text-sm font-semibold leading-none", children: m.name })
807
806
  ] }),
808
807
  /* @__PURE__ */ e.jsx(
809
808
  "svg",
810
809
  {
811
810
  className: `w-3 h-3 flex-shrink-0 transition-transform duration-200
812
811
  text-slate-400 dark:text-slate-500
813
- ${k[c.name] ? "rotate-90" : ""}`,
812
+ ${v[m.name] ? "rotate-90" : ""}`,
814
813
  fill: "none",
815
814
  stroke: "currentColor",
816
815
  viewBox: "0 0 24 24",
@@ -820,39 +819,39 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
820
819
  ]
821
820
  }
822
821
  ),
823
- c.subItems && k[c.name] && /* @__PURE__ */ e.jsx("div", { className: "mt-0.5 ml-3.5 pl-3 space-y-0.5 border-l border-slate-200/70 dark:border-slate-700/70", children: c.subItems.map((M) => /* @__PURE__ */ e.jsx(N, { item: M, depth: 1 }, M.name)) })
824
- ] }) }) : /* @__PURE__ */ e.jsx("div", { children: I ? /* @__PURE__ */ e.jsx(ne, { to: c.path, onClick: () => l == null ? void 0 : l(), children: /* @__PURE__ */ e.jsxs("div", { className: `
822
+ m.subItems && v[m.name] && /* @__PURE__ */ e.jsx("div", { className: "mt-0.5 ml-3.5 pl-3 space-y-0.5 border-l border-slate-200/70 dark:border-slate-700/70", children: m.subItems.map((Y) => /* @__PURE__ */ e.jsx(f, { item: Y, depth: 1 }, Y.name)) })
823
+ ] }) }) : /* @__PURE__ */ e.jsx("div", { children: R ? /* @__PURE__ */ e.jsx(de, { to: m.path, onClick: () => i == null ? void 0 : i(), children: /* @__PURE__ */ e.jsxs("div", { className: `
825
824
  flex items-center gap-2
826
825
  px-2.5 py-1.5 rounded-lg cursor-pointer
827
826
  transition-all duration-150 group
828
- ${V ? L : "text-slate-500 hover:bg-slate-100/70 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-slate-700/30 dark:hover:text-slate-300"}
827
+ ${L ? N : "text-slate-500 hover:bg-slate-100/70 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-slate-700/30 dark:hover:text-slate-300"}
829
828
  `, children: [
830
829
  /* @__PURE__ */ e.jsx("div", { className: `w-1.5 h-1.5 rounded-full flex-shrink-0 transition-all duration-200
831
- ${V ? C : g}` }),
832
- /* @__PURE__ */ e.jsx("span", { className: "text-[13px] font-medium", children: d(c.name) })
830
+ ${L ? $ : P}` }),
831
+ /* @__PURE__ */ e.jsx("span", { className: "text-[13px] font-medium", children: m.name })
833
832
  ] }) }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
834
833
  /* @__PURE__ */ e.jsxs(
835
834
  "div",
836
835
  {
837
- onClick: () => y(c.name),
836
+ onClick: () => w(m.name),
838
837
  className: `
839
838
  flex items-center justify-between
840
839
  px-2.5 py-1.5 rounded-lg cursor-pointer
841
840
  transition-all duration-150 group
842
- ${k[c.name] ? "bg-slate-100/70 text-slate-700 dark:bg-slate-700/30 dark:text-slate-300" : "text-slate-500 hover:bg-slate-100/70 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-slate-700/30 dark:hover:text-slate-300"}
841
+ ${v[m.name] ? "bg-slate-100/70 text-slate-700 dark:bg-slate-700/30 dark:text-slate-300" : "text-slate-500 hover:bg-slate-100/70 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-slate-700/30 dark:hover:text-slate-300"}
843
842
  `,
844
843
  children: [
845
844
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
846
845
  /* @__PURE__ */ e.jsx("div", { className: `w-1.5 h-1.5 rounded-full flex-shrink-0 transition-all duration-200
847
- ${k[c.name] ? C : g}` }),
848
- /* @__PURE__ */ e.jsx("span", { className: "text-[13px] font-medium", children: d(c.name) })
846
+ ${v[m.name] ? $ : P}` }),
847
+ /* @__PURE__ */ e.jsx("span", { className: "text-[13px] font-medium", children: m.name })
849
848
  ] }),
850
849
  /* @__PURE__ */ e.jsx(
851
850
  "svg",
852
851
  {
853
852
  className: `w-3 h-3 flex-shrink-0 transition-transform duration-200
854
853
  text-slate-400 dark:text-slate-500
855
- ${k[c.name] ? "rotate-90" : ""}`,
854
+ ${v[m.name] ? "rotate-90" : ""}`,
856
855
  fill: "none",
857
856
  stroke: "currentColor",
858
857
  viewBox: "0 0 24 24",
@@ -862,7 +861,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
862
861
  ]
863
862
  }
864
863
  ),
865
- c.subItems && k[c.name] && /* @__PURE__ */ e.jsx("div", { className: "mt-0.5 ml-3 pl-2.5 space-y-0.5 border-l border-slate-200/70 dark:border-slate-700/70", children: c.subItems.map((M) => /* @__PURE__ */ e.jsx(N, { item: M, depth: z + 1 }, M.name)) })
864
+ m.subItems && v[m.name] && /* @__PURE__ */ e.jsx("div", { className: "mt-0.5 ml-3 pl-2.5 space-y-0.5 border-l border-slate-200/70 dark:border-slate-700/70", children: m.subItems.map((Y) => /* @__PURE__ */ e.jsx(f, { item: Y, depth: g + 1 }, Y.name)) })
866
865
  ] }) });
867
866
  };
868
867
  return /* @__PURE__ */ e.jsxs("div", { className: "h-full w-full flex pl-2.5 sm:pl-3.5 max-sm:pr-2.5 sm:max-sm:pr-3.5", children: [
@@ -898,16 +897,16 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
898
897
  {
899
898
  className: "flex-1 overflow-y-auto space-y-0.5 custom-scrollbar",
900
899
  "aria-label": "Main navigation",
901
- children: t.map((c) => /* @__PURE__ */ e.jsx(N, { item: c, depth: 0 }, c.name))
900
+ children: t.map((m) => /* @__PURE__ */ e.jsx(f, { item: m, depth: 0 }, m.name))
902
901
  }
903
902
  ),
904
903
  r && /* @__PURE__ */ e.jsxs(
905
904
  "div",
906
905
  {
907
- ref: h,
906
+ ref: d,
908
907
  className: "flex-shrink-0 mt-2.5 sm:mt-3.5 pt-2.5 sm:pt-3.5 border-t border-slate-200/80 dark:border-slate-700/80",
909
908
  children: [
910
- x && n && /* @__PURE__ */ e.jsx("div", { className: `
909
+ x && a && /* @__PURE__ */ e.jsx("div", { className: `
911
910
  mb-1.5 rounded-xl overflow-hidden
912
911
  bg-white dark:bg-slate-800
913
912
  border border-red-100 dark:border-red-500/20
@@ -917,7 +916,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
917
916
  "button",
918
917
  {
919
918
  onClick: () => {
920
- n(), m(!1);
919
+ a(), b(!1);
921
920
  },
922
921
  className: `
923
922
  w-full flex items-center gap-2.5 px-3 py-2.5
@@ -926,7 +925,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
926
925
  transition-colors duration-150
927
926
  `,
928
927
  children: [
929
- /* @__PURE__ */ e.jsx(ke, { className: "w-3.5 h-3.5 flex-shrink-0" }),
928
+ /* @__PURE__ */ e.jsx(Se, { className: "w-3.5 h-3.5 flex-shrink-0" }),
930
929
  "Sign out"
931
930
  ]
932
931
  }
@@ -934,7 +933,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
934
933
  /* @__PURE__ */ e.jsxs(
935
934
  "button",
936
935
  {
937
- onClick: () => m((c) => !c),
936
+ onClick: () => b((m) => !m),
938
937
  className: `
939
938
  w-full flex items-center gap-2.5
940
939
  px-2.5 py-2 rounded-xl border
@@ -946,12 +945,12 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
946
945
  w-7 h-7 rounded-lg flex-shrink-0
947
946
  bg-gradient-to-br from-violet-600 to-indigo-600
948
947
  flex items-center justify-center shadow-sm shadow-violet-500/20
949
- `, children: /* @__PURE__ */ e.jsx(fe, { className: "w-3.5 h-3.5 text-white" }) }),
948
+ `, children: /* @__PURE__ */ e.jsx(Ee, { className: "w-3.5 h-3.5 text-white" }) }),
950
949
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1 text-left min-w-0", children: [
951
950
  /* @__PURE__ */ e.jsx("p", { className: "text-[13px] font-semibold text-slate-900 dark:text-white truncate leading-none", children: r.username }),
952
951
  /* @__PURE__ */ e.jsx("p", { className: "text-[11px] text-slate-400 dark:text-slate-500 truncate mt-0.5 leading-none", children: r.email })
953
952
  ] }),
954
- /* @__PURE__ */ e.jsx(ae, { className: `
953
+ /* @__PURE__ */ e.jsx(le, { className: `
955
954
  w-3 h-3 flex-shrink-0 text-slate-400 dark:text-slate-500
956
955
  transition-transform duration-200
957
956
  ${x ? "rotate-180" : ""}
@@ -971,15 +970,15 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
971
970
  .custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgb(148 163 184); }
972
971
  ` })
973
972
  ] });
974
- }, Ge = ({
973
+ }, tt = ({
975
974
  icon: t,
976
975
  title: r,
977
- subtitle: n,
978
- badge: l,
979
- actions: d,
980
- searchBar: x,
981
- onIconClick: m,
982
- iconTitle: h
976
+ subtitle: a,
977
+ badge: i,
978
+ actions: x,
979
+ searchBar: b,
980
+ onIconClick: d,
981
+ iconTitle: u
983
982
  }) => /* @__PURE__ */ e.jsxs(
984
983
  "div",
985
984
  {
@@ -1010,14 +1009,14 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1010
1009
  flex items-center justify-center
1011
1010
  shadow-md shadow-violet-200/40 dark:shadow-violet-900/30
1012
1011
  transition-all duration-200
1013
- ${m ? "cursor-pointer hover:scale-110 hover:shadow-lg active:scale-95" : "hover:scale-105"}
1012
+ ${d ? "cursor-pointer hover:scale-110 hover:shadow-lg active:scale-95" : "hover:scale-105"}
1014
1013
  `,
1015
- onClick: m,
1016
- title: h,
1017
- role: m ? "button" : void 0,
1018
- tabIndex: m ? 0 : void 0,
1019
- onKeyDown: m ? (f) => {
1020
- (f.key === "Enter" || f.key === " ") && (f.preventDefault(), m());
1014
+ onClick: d,
1015
+ title: u,
1016
+ role: d ? "button" : void 0,
1017
+ tabIndex: d ? 0 : void 0,
1018
+ onKeyDown: d ? (v) => {
1019
+ (v.key === "Enter" || v.key === " ") && (v.preventDefault(), d());
1021
1020
  } : void 0,
1022
1021
  children: /* @__PURE__ */ e.jsx(t, { className: "w-[18px] h-[18px] sm:w-5 sm:h-5 text-white" })
1023
1022
  }
@@ -1026,17 +1025,17 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1026
1025
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
1027
1026
  /* @__PURE__ */ e.jsx("h2", { className: `text-base sm:text-lg font-bold tracking-tight
1028
1027
  text-slate-900 dark:text-white leading-tight truncate`, children: r }),
1029
- l && /* @__PURE__ */ e.jsx("span", { className: `
1028
+ i && /* @__PURE__ */ e.jsx("span", { className: `
1030
1029
  inline-flex items-center px-2 py-0.5 rounded-full
1031
1030
  text-[11px] font-semibold tracking-wide
1032
1031
  bg-violet-100 text-violet-700
1033
1032
  border border-violet-200/50
1034
1033
  dark:bg-violet-600/50 dark:text-violet-400 dark:border-violet-500/30
1035
- `, children: l })
1034
+ `, children: i })
1036
1035
  ] }),
1037
- n && /* @__PURE__ */ e.jsx("p", { className: "mt-0.5 text-xs text-slate-500 dark:text-slate-400 leading-snug truncate", children: n })
1036
+ a && /* @__PURE__ */ e.jsx("p", { className: "mt-0.5 text-xs text-slate-500 dark:text-slate-400 leading-snug truncate", children: a })
1038
1037
  ] }),
1039
- d && /* @__PURE__ */ e.jsx("div", { className: `
1038
+ x && /* @__PURE__ */ e.jsx("div", { className: `
1040
1039
  flex-shrink-0
1041
1040
  flex items-center gap-1.5
1042
1041
  overflow-x-auto sm:overflow-x-visible
@@ -1046,31 +1045,31 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1046
1045
  sm:max-w-none
1047
1046
  sm:flex-wrap
1048
1047
  [&::-webkit-scrollbar]:hidden
1049
- `, children: d })
1048
+ `, children: x })
1050
1049
  ] }),
1051
- x && /* @__PURE__ */ e.jsx("div", { className: "mt-3 pt-3 border-t border-slate-200/40 dark:border-slate-700/50", children: x })
1050
+ b && /* @__PURE__ */ e.jsx("div", { className: "mt-3 pt-3 border-t border-slate-200/40 dark:border-slate-700/50", children: b })
1052
1051
  ] })
1053
1052
  ]
1054
1053
  }
1055
- ), Je = ({
1054
+ ), st = ({
1056
1055
  icon: t,
1057
1056
  onClick: r,
1058
- title: n,
1059
- variant: l = "secondary",
1060
- size: d = "md"
1057
+ title: a,
1058
+ variant: i = "secondary",
1059
+ size: x = "md"
1061
1060
  // sm | md
1062
1061
  }) => {
1063
- const x = {
1062
+ const b = {
1064
1063
  secondary: `bg-white hover:bg-slate-50 text-slate-700 border border-slate-200 shadow-sm
1065
1064
  dark:bg-slate-700/50 dark:hover:bg-slate-700 dark:text-slate-300 dark:border-slate-600/50`,
1066
1065
  danger: `bg-white hover:bg-red-50 text-slate-500 hover:text-red-600 border border-slate-200 shadow-sm
1067
1066
  dark:bg-slate-700/50 dark:hover:bg-red-900/20 dark:text-slate-400 dark:hover:text-red-400 dark:border-slate-600/50`,
1068
1067
  primary: `bg-violet-100 hover:bg-violet-200 text-violet-700 border border-violet-200 shadow-sm
1069
1068
  dark:bg-violet-600/20 dark:hover:bg-violet-600/30 dark:text-violet-400 dark:border-violet-500/30`
1070
- }, m = {
1069
+ }, d = {
1071
1070
  sm: "p-1.5",
1072
1071
  md: "p-2 sm:p-2.5"
1073
- }, h = {
1072
+ }, u = {
1074
1073
  sm: "w-3.5 h-3.5",
1075
1074
  md: "w-4 h-4 sm:w-[18px] sm:h-[18px]"
1076
1075
  };
@@ -1078,70 +1077,70 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1078
1077
  "button",
1079
1078
  {
1080
1079
  onClick: r,
1081
- title: n,
1082
- "aria-label": n,
1080
+ title: a,
1081
+ "aria-label": a,
1083
1082
  className: `
1084
1083
  rounded-xl transition-all duration-200
1085
- ${m[d]}
1086
- ${x[l] ?? x.secondary}
1084
+ ${d[x]}
1085
+ ${b[i] ?? b.secondary}
1087
1086
  hover:scale-105 active:scale-95
1088
1087
  `,
1089
- children: /* @__PURE__ */ e.jsx(t, { className: h[d] })
1088
+ children: /* @__PURE__ */ e.jsx(t, { className: u[x] })
1090
1089
  }
1091
1090
  );
1092
- }, Xe = ({
1091
+ }, Ce = ({
1093
1092
  children: t,
1094
1093
  icon: r,
1095
- iconPosition: n = "left",
1096
- disabled: l = !1,
1097
- onClick: d,
1098
- variant: x = "primary",
1099
- loading: m = !1,
1100
- size: h = "md",
1094
+ iconPosition: a = "left",
1095
+ disabled: i = !1,
1096
+ onClick: x,
1097
+ variant: b = "primary",
1098
+ loading: d = !1,
1099
+ size: u = "md",
1101
1100
  // sm | md | lg
1102
- className: f = "",
1103
- ...k
1101
+ className: v = "",
1102
+ ...y
1104
1103
  }) => {
1105
- const _ = {
1104
+ const w = {
1106
1105
  sm: "px-3 py-1.5 text-xs rounded-lg gap-1.5",
1107
1106
  md: "px-4 py-2 sm:px-5 sm:py-2.5 text-sm rounded-xl gap-2",
1108
1107
  lg: "px-5 py-2.5 sm:px-6 sm:py-3 text-sm sm:text-base rounded-xl gap-2"
1109
- }, y = {
1108
+ }, z = {
1110
1109
  sm: "w-3.5 h-3.5",
1111
1110
  md: "w-4 h-4",
1112
1111
  lg: "w-4 h-4 sm:w-5 sm:h-5"
1113
- }, E = {
1114
- primary: l || m ? "bg-violet-300 text-white cursor-not-allowed opacity-60 dark:bg-violet-800/50" : "bg-gradient-to-r from-violet-600 to-indigo-600 text-white hover:from-violet-700 hover:to-indigo-700 shadow-md hover:shadow-lg hover:scale-105 active:scale-95",
1115
- secondary: l || m ? "bg-gray-200 text-gray-400 cursor-not-allowed opacity-60 dark:bg-gray-700 dark:text-gray-500" : "bg-white text-slate-700 border border-slate-200 hover:bg-slate-50 dark:bg-slate-700/50 dark:text-slate-300 dark:border-slate-600 dark:hover:bg-slate-700 shadow-sm hover:shadow-md hover:scale-105 active:scale-95",
1116
- danger: l || m ? "bg-red-300 text-white cursor-not-allowed opacity-60 dark:bg-red-800/50" : "bg-red-600 text-white hover:bg-red-700 shadow-md hover:shadow-lg hover:scale-105 active:scale-95"
1112
+ }, N = {
1113
+ primary: i || d ? "bg-violet-300 text-white cursor-not-allowed opacity-60 dark:bg-violet-800/50" : "bg-gradient-to-r from-violet-600 to-indigo-600 text-white hover:from-violet-700 hover:to-indigo-700 shadow-md hover:shadow-lg hover:scale-105 active:scale-95",
1114
+ secondary: i || d ? "bg-gray-200 text-gray-400 cursor-not-allowed opacity-60 dark:bg-gray-700 dark:text-gray-500" : "bg-white text-slate-700 border border-slate-200 hover:bg-slate-50 dark:bg-slate-700/50 dark:text-slate-300 dark:border-slate-600 dark:hover:bg-slate-700 shadow-sm hover:shadow-md hover:scale-105 active:scale-95",
1115
+ danger: i || d ? "bg-red-300 text-white cursor-not-allowed opacity-60 dark:bg-red-800/50" : "bg-red-600 text-white hover:bg-red-700 shadow-md hover:shadow-lg hover:scale-105 active:scale-95"
1117
1116
  };
1118
1117
  return /* @__PURE__ */ e.jsxs(
1119
1118
  "button",
1120
1119
  {
1121
- disabled: l || m,
1122
- onClick: l || m ? void 0 : d,
1120
+ disabled: i || d,
1121
+ onClick: i || d ? void 0 : x,
1123
1122
  className: `
1124
1123
  inline-flex items-center justify-center font-semibold whitespace-nowrap
1125
1124
  transition-all duration-200
1126
- ${_[h]}
1127
- ${E[x]}
1128
- ${f}
1125
+ ${w[u]}
1126
+ ${N[b]}
1127
+ ${v}
1129
1128
  `,
1130
- ...k,
1129
+ ...y,
1131
1130
  children: [
1132
- r && n === "left" && !m && /* @__PURE__ */ e.jsx(r, { className: `${y[h]} flex-shrink-0` }),
1133
- m && /* @__PURE__ */ e.jsx("span", { className: `${y[h]} flex-shrink-0 animate-spin rounded-full
1131
+ r && a === "left" && !d && /* @__PURE__ */ e.jsx(r, { className: `${z[u]} flex-shrink-0` }),
1132
+ d && /* @__PURE__ */ e.jsx("span", { className: `${z[u]} flex-shrink-0 animate-spin rounded-full
1134
1133
  border-2 border-white/30 border-t-white` }),
1135
- /* @__PURE__ */ e.jsx("span", { children: m ? "Loading..." : t }),
1136
- r && n === "right" && !m && /* @__PURE__ */ e.jsx(r, { className: `${y[h]} flex-shrink-0` })
1134
+ /* @__PURE__ */ e.jsx("span", { children: d ? "Loading..." : t }),
1135
+ r && a === "right" && !d && /* @__PURE__ */ e.jsx(r, { className: `${z[u]} flex-shrink-0` })
1137
1136
  ]
1138
1137
  }
1139
1138
  );
1140
- }, Qe = ({
1139
+ }, at = ({
1141
1140
  value: t,
1142
1141
  onChange: r,
1143
- placeholder: n = "Search...",
1144
- onClear: l
1142
+ placeholder: a = "Search...",
1143
+ onClear: i
1145
1144
  }) => /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1146
1145
  /* @__PURE__ */ e.jsx(
1147
1146
  "svg",
@@ -1165,73 +1164,73 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1165
1164
  "input",
1166
1165
  {
1167
1166
  type: "text",
1168
- placeholder: n,
1167
+ placeholder: a,
1169
1168
  value: t,
1170
1169
  onChange: r,
1171
1170
  className: "w-full pl-12 pr-4 py-3 rounded-xl border transition-all duration-200 bg-white border-slate-200 text-slate-900 placeholder-slate-400 focus:border-violet-400 focus:bg-slate-50 dark:bg-slate-800/50 dark:border-slate-700 dark:text-white dark:placeholder-slate-500 dark:focus:border-violet-500 dark:focus:bg-slate-800 focus:outline-none focus:ring-2 focus:ring-violet-500/20"
1172
1171
  }
1173
1172
  ),
1174
- t && l && /* @__PURE__ */ e.jsx(
1173
+ t && i && /* @__PURE__ */ e.jsx(
1175
1174
  "button",
1176
1175
  {
1177
- onClick: l,
1176
+ onClick: i,
1178
1177
  className: "absolute right-4 top-1/2 -translate-y-1/2 p-1 rounded-lg transition-colors text-slate-400 hover:text-slate-600 hover:bg-slate-100 dark:text-slate-500 dark:hover:text-slate-300 dark:hover:bg-slate-700",
1179
1178
  children: /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
1180
1179
  }
1181
1180
  )
1182
- ] }), Ze = ({
1181
+ ] }), rt = ({
1183
1182
  columns: t,
1184
1183
  data: r,
1185
- onSort: n,
1186
- sortConfig: l,
1187
- emptyMessage: d = "No data found",
1188
- emptyDescription: x = "Try adjusting your filters or add new data",
1189
- emptyIcon: m
1184
+ onSort: a,
1185
+ sortConfig: i,
1186
+ emptyMessage: x = "No data found",
1187
+ emptyDescription: b = "Try adjusting your filters or add new data",
1188
+ emptyIcon: d
1190
1189
  }) => r.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "h-full rounded-2xl border bg-white border-slate-200/50 dark:bg-slate-800/50 dark:border-slate-700/50 flex items-center justify-center", children: /* @__PURE__ */ e.jsxs("div", { className: "text-center py-12 px-6", children: [
1191
- /* @__PURE__ */ e.jsx("div", { className: "w-16 h-16 rounded-full bg-slate-100 dark:bg-slate-700 flex items-center justify-center mx-auto mb-4", children: m ? /* @__PURE__ */ e.jsx(m, { className: "w-8 h-8 text-slate-400 dark:text-slate-500" }) : /* @__PURE__ */ e.jsx("svg", { className: "w-8 h-8 text-slate-400 dark:text-slate-500", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4" }) }) }),
1192
- /* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-slate-900 dark:text-slate-300 mb-2", children: d }),
1193
- /* @__PURE__ */ e.jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: x })
1190
+ /* @__PURE__ */ e.jsx("div", { className: "w-16 h-16 rounded-full bg-slate-100 dark:bg-slate-700 flex items-center justify-center mx-auto mb-4", children: d ? /* @__PURE__ */ e.jsx(d, { className: "w-8 h-8 text-slate-400 dark:text-slate-500" }) : /* @__PURE__ */ e.jsx("svg", { className: "w-8 h-8 text-slate-400 dark:text-slate-500", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4" }) }) }),
1191
+ /* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-slate-900 dark:text-slate-300 mb-2", children: x }),
1192
+ /* @__PURE__ */ e.jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: b })
1194
1193
  ] }) }) : /* @__PURE__ */ e.jsx("div", { className: "h-full rounded-2xl border bg-white border-slate-200/50 dark:bg-slate-800/50 dark:border-slate-700/50 flex flex-col overflow-hidden", children: /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ e.jsxs("table", { className: "w-full", children: [
1195
- /* @__PURE__ */ e.jsx("thead", { className: "bg-slate-50 dark:bg-slate-800/50 sticky top-0 ", children: /* @__PURE__ */ e.jsx("tr", { children: t.map((h) => /* @__PURE__ */ e.jsx(
1194
+ /* @__PURE__ */ e.jsx("thead", { className: "bg-slate-50 dark:bg-slate-800/50 sticky top-0 ", children: /* @__PURE__ */ e.jsx("tr", { children: t.map((u) => /* @__PURE__ */ e.jsx(
1196
1195
  "th",
1197
1196
  {
1198
- onClick: () => h.sortable && n && n(h.key),
1197
+ onClick: () => u.sortable && a && a(u.key),
1199
1198
  className: `
1200
1199
  px-6 py-4 text-left text-xs font-semibold text-slate-700 dark:text-slate-300 uppercase tracking-wider
1201
- ${h.sortable ? "cursor-pointer select-none hover:bg-slate-100 dark:hover:bg-slate-700/50" : ""}
1200
+ ${u.sortable ? "cursor-pointer select-none hover:bg-slate-100 dark:hover:bg-slate-700/50" : ""}
1202
1201
  `,
1203
1202
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
1204
- /* @__PURE__ */ e.jsx("span", { children: h.label }),
1205
- h.sortable && (l == null ? void 0 : l.key) === h.key && /* @__PURE__ */ e.jsx("span", { className: "text-violet-600 dark:text-violet-400", children: l.direction === "asc" ? "↑" : "↓" })
1203
+ /* @__PURE__ */ e.jsx("span", { children: u.label }),
1204
+ u.sortable && (i == null ? void 0 : i.key) === u.key && /* @__PURE__ */ e.jsx("span", { className: "text-violet-600 dark:text-violet-400", children: i.direction === "asc" ? "↑" : "↓" })
1206
1205
  ] })
1207
1206
  },
1208
- h.key
1207
+ u.key
1209
1208
  )) }) }),
1210
- /* @__PURE__ */ e.jsx("tbody", { className: "divide-y divide-slate-200 dark:divide-slate-700", children: r.map((h, f) => /* @__PURE__ */ e.jsx(
1209
+ /* @__PURE__ */ e.jsx("tbody", { className: "divide-y divide-slate-200 dark:divide-slate-700", children: r.map((u, v) => /* @__PURE__ */ e.jsx(
1211
1210
  "tr",
1212
1211
  {
1213
1212
  className: "hover:bg-slate-50 dark:hover:bg-slate-800/30 transition-colors",
1214
- children: t.map((k) => /* @__PURE__ */ e.jsx(
1213
+ children: t.map((y) => /* @__PURE__ */ e.jsx(
1215
1214
  "td",
1216
1215
  {
1217
1216
  className: "px-6 py-4 whitespace-nowrap text-sm",
1218
- children: k.render ? k.render(h) : h[k.key]
1217
+ children: y.render ? y.render(u) : u[y.key]
1219
1218
  },
1220
- k.key
1219
+ y.key
1221
1220
  ))
1222
1221
  },
1223
- h.id || f
1222
+ u.id || v
1224
1223
  )) })
1225
- ] }) }) }), Ke = ({
1224
+ ] }) }) }), K = ({
1226
1225
  icon: t,
1227
1226
  onClick: r,
1228
- children: n,
1229
- variant: l = "primary",
1230
- disabled: d = !1,
1231
- title: x = "",
1232
- size: m = "md"
1227
+ children: a,
1228
+ variant: i = "primary",
1229
+ disabled: x = !1,
1230
+ title: b = "",
1231
+ size: d = "md"
1233
1232
  }) => {
1234
- const h = {
1233
+ const u = {
1235
1234
  primary: "bg-violet-100 text-violet-700 hover:bg-violet-200 border border-violet-200 dark:bg-violet-600/20 dark:text-violet-400 dark:hover:bg-violet-600/30 dark:border dark:border-violet-500/30",
1236
1235
  amber: "bg-amber-50 text-amber-700 border border-amber-200 hover:bg-amber-100 dark:bg-amber-900/20 dark:text-amber-300 dark:border-amber-700/40",
1237
1236
  emerald: "bg-emerald-50 text-emerald-700 border border-emerald-200 hover:bg-emerald-100 dark:bg-emerald-900/20 dark:text-emerald-300 dark:border-emerald-700/40",
@@ -1246,10 +1245,10 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1246
1245
  ghost: "bg-transparent text-slate-600 border border-dashed border-slate-300 hover:bg-slate-50 dark:text-slate-400 dark:border-slate-600 dark:hover:bg-slate-800/50",
1247
1246
  rainbow: "action-btn-rainbow",
1248
1247
  disabled: "bg-slate-100/50 text-slate-400 border border-slate-200/50 cursor-not-allowed dark:bg-slate-800/30 dark:text-slate-500 dark:border-slate-700/50"
1249
- }, f = {
1248
+ }, v = {
1250
1249
  sm: "px-2.5 py-1.5 text-xs gap-1",
1251
1250
  md: "px-3 py-1.5 sm:px-3.5 sm:py-2 text-sm gap-1.5"
1252
- }, k = d ? h.disabled : h[l] ?? h.primary;
1251
+ }, y = x ? u.disabled : u[i] ?? u.primary;
1253
1252
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1254
1253
  /* @__PURE__ */ e.jsx("style", { children: `
1255
1254
  @property --beam-angle {
@@ -1337,60 +1336,60 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1337
1336
  /* @__PURE__ */ e.jsxs(
1338
1337
  "button",
1339
1338
  {
1340
- onClick: d ? void 0 : r,
1339
+ onClick: x ? void 0 : r,
1341
1340
  type: "button",
1342
- title: x,
1343
- disabled: d,
1341
+ title: b,
1342
+ disabled: x,
1344
1343
  className: `
1345
1344
  inline-flex items-center justify-center relative
1346
- ${f[m]}
1345
+ ${v[d]}
1347
1346
  rounded-xl font-semibold whitespace-nowrap
1348
1347
  transition-all duration-200
1349
- ${k}
1350
- ${d ? "opacity-60" : "active:scale-95"}
1348
+ ${y}
1349
+ ${x ? "opacity-60" : "active:scale-95"}
1351
1350
  `,
1352
1351
  children: [
1353
1352
  t && /* @__PURE__ */ e.jsx(t, { className: "w-3.5 h-3.5 flex-shrink-0" }),
1354
- n && /* @__PURE__ */ e.jsx("span", { children: n })
1353
+ a && /* @__PURE__ */ e.jsx("span", { children: a })
1355
1354
  ]
1356
1355
  }
1357
1356
  )
1358
1357
  ] });
1359
- }, et = ({
1358
+ }, Ye = ({
1360
1359
  isOpen: t,
1361
1360
  onClose: r,
1362
- title: n,
1363
- subtitle: l,
1364
- icon: d,
1365
- children: x,
1366
- size: m = "md",
1367
- fullscreen: h = !1,
1368
- hideHeader: f = !1
1361
+ title: a,
1362
+ subtitle: i,
1363
+ icon: x,
1364
+ children: b,
1365
+ size: d = "md",
1366
+ fullscreen: u = !1,
1367
+ hideHeader: v = !1
1369
1368
  }) => {
1370
- if (J(() => {
1371
- const y = (E) => {
1372
- E.key === "Escape" && r();
1369
+ if (Q(() => {
1370
+ const z = (N) => {
1371
+ N.key === "Escape" && r();
1373
1372
  };
1374
- return t && (document.addEventListener("keydown", y), document.body.style.overflow = "hidden"), () => {
1375
- document.removeEventListener("keydown", y), document.body.style.overflow = "unset";
1373
+ return t && (document.addEventListener("keydown", z), document.body.style.overflow = "hidden"), () => {
1374
+ document.removeEventListener("keydown", z), document.body.style.overflow = "unset";
1376
1375
  };
1377
1376
  }, [t, r]), !t) return null;
1378
- const k = {
1377
+ const y = {
1379
1378
  sm: "max-w-md",
1380
1379
  md: "max-w-2xl",
1381
1380
  lg: "max-w-4xl",
1382
1381
  xl: "max-w-6xl"
1383
- }, _ = /* @__PURE__ */ e.jsx("div", { className: `flex-shrink-0 px-4 py-3 sm:px-5 sm:py-4
1382
+ }, w = /* @__PURE__ */ e.jsx("div", { className: `flex-shrink-0 px-4 py-3 sm:px-5 sm:py-4
1384
1383
  bg-gradient-to-r from-violet-50 via-indigo-50 to-violet-50
1385
1384
  dark:from-slate-700/50 dark:via-slate-800/50 dark:to-slate-700/50
1386
1385
  border-b border-slate-200 dark:border-slate-700`, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
1387
1386
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2.5 sm:gap-3 min-w-0", children: [
1388
- d && /* @__PURE__ */ e.jsx("div", { className: `flex-shrink-0 w-9 h-9 sm:w-10 sm:h-10 rounded-xl
1387
+ x && /* @__PURE__ */ e.jsx("div", { className: `flex-shrink-0 w-9 h-9 sm:w-10 sm:h-10 rounded-xl
1389
1388
  flex items-center justify-center
1390
- bg-gradient-to-br from-violet-600 to-indigo-600 shadow-lg`, children: /* @__PURE__ */ e.jsx(d, { className: "w-[18px] h-[18px] sm:w-5 sm:h-5 text-white" }) }),
1389
+ bg-gradient-to-br from-violet-600 to-indigo-600 shadow-lg`, children: /* @__PURE__ */ e.jsx(x, { className: "w-[18px] h-[18px] sm:w-5 sm:h-5 text-white" }) }),
1391
1390
  /* @__PURE__ */ e.jsxs("div", { className: "min-w-0", children: [
1392
- /* @__PURE__ */ e.jsx("h3", { className: "text-sm sm:text-base font-bold text-slate-900 dark:text-white truncate", children: n }),
1393
- l && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400 mt-0.5 truncate", children: l })
1391
+ /* @__PURE__ */ e.jsx("h3", { className: "text-sm sm:text-base font-bold text-slate-900 dark:text-white truncate", children: a }),
1392
+ i && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400 mt-0.5 truncate", children: i })
1394
1393
  ] })
1395
1394
  ] }),
1396
1395
  /* @__PURE__ */ e.jsx(
@@ -1405,17 +1404,17 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1405
1404
  dark:hover:text-white dark:hover:border-slate-500
1406
1405
  hover:scale-105 active:scale-95`,
1407
1406
  "aria-label": "Close modal",
1408
- children: /* @__PURE__ */ e.jsx(X, { className: "w-4 h-4" })
1407
+ children: /* @__PURE__ */ e.jsx(Z, { className: "w-4 h-4" })
1409
1408
  }
1410
1409
  )
1411
1410
  ] }) });
1412
- return h ? de(
1411
+ return u ? be(
1413
1412
  /* @__PURE__ */ e.jsxs("div", { className: "fixed inset-0 z-[11000] flex flex-col animate-in fade-in duration-200 bg-white dark:bg-slate-800", children: [
1414
- !f && _,
1415
- /* @__PURE__ */ e.jsx("div", { className: "flex-1 min-h-0 overflow-hidden", children: x })
1413
+ !v && w,
1414
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 min-h-0 overflow-hidden", children: b })
1416
1415
  ] }),
1417
1416
  document.body
1418
- ) : de(
1417
+ ) : be(
1419
1418
  /* @__PURE__ */ e.jsxs("div", { className: "fixed inset-0 z-[11000] overflow-y-auto flex min-h-full items-center justify-center animate-in fade-in duration-200", children: [
1420
1419
  /* @__PURE__ */ e.jsx(
1421
1420
  "div",
@@ -1424,31 +1423,31 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1424
1423
  onClick: r
1425
1424
  }
1426
1425
  ),
1427
- /* @__PURE__ */ e.jsx("div", { className: `relative z-[11001] w-full ${k[m]} animate-in zoom-in-95 duration-200 my-auto`, children: /* @__PURE__ */ e.jsxs("div", { className: `
1426
+ /* @__PURE__ */ e.jsx("div", { className: `relative z-[11001] w-full ${y[d]} animate-in zoom-in-95 duration-200 my-auto`, children: /* @__PURE__ */ e.jsxs("div", { className: `
1428
1427
  rounded-xl sm:rounded-2xl border overflow-hidden
1429
1428
  bg-white border-slate-200/50 shadow-2xl ml-2 mr-2
1430
1429
  dark:bg-slate-800 dark:border-slate-700/50
1431
1430
  flex flex-col max-h-[70dvh] sm:max-h-[80dvh]
1432
1431
  `, children: [
1433
- !f && _,
1434
- /* @__PURE__ */ e.jsx("div", { className: "flex-1 min-h-0 overflow-y-auto", children: x })
1432
+ !v && w,
1433
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 min-h-0 overflow-y-auto", children: b })
1435
1434
  ] }) })
1436
1435
  ] }),
1437
1436
  document.body
1438
1437
  );
1439
- }, De = ({
1438
+ }, Ue = ({
1440
1439
  checked: t = !1,
1441
1440
  onChange: r,
1442
- disabled: n = !1,
1443
- label: l,
1444
- name: d,
1445
- helpText: x
1441
+ disabled: a = !1,
1442
+ label: i,
1443
+ name: x,
1444
+ helpText: b
1446
1445
  }) => {
1447
- const m = () => {
1448
- n || r(d, !t);
1446
+ const d = () => {
1447
+ a || r(x, !t);
1449
1448
  };
1450
1449
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-1.5", children: [
1451
- l && /* @__PURE__ */ e.jsx("span", { className: "block text-sm font-semibold text-slate-700 dark:text-slate-300", children: l }),
1450
+ i && /* @__PURE__ */ e.jsx("span", { className: "block text-sm font-semibold text-slate-700 dark:text-slate-300", children: i }),
1452
1451
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
1453
1452
  /* @__PURE__ */ e.jsx(
1454
1453
  "button",
@@ -1456,13 +1455,13 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1456
1455
  type: "button",
1457
1456
  role: "switch",
1458
1457
  "aria-checked": t,
1459
- onClick: m,
1460
- disabled: n,
1458
+ onClick: d,
1459
+ disabled: a,
1461
1460
  className: `
1462
1461
  relative inline-flex h-6 w-11 flex-shrink-0 items-center rounded-full
1463
1462
  transition-all duration-200
1464
1463
  ${t ? "bg-gradient-to-r from-violet-600 to-indigo-600 shadow-md shadow-violet-200 dark:shadow-violet-900/30" : "bg-slate-300 dark:bg-slate-600"}
1465
- ${n ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:scale-105 active:scale-95"}
1464
+ ${a ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:scale-105 active:scale-95"}
1466
1465
  focus:outline-none focus-visible:ring-2 focus-visible:ring-violet-500/30 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-slate-800
1467
1466
  `,
1468
1467
  children: /* @__PURE__ */ e.jsx(
@@ -1479,72 +1478,72 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1479
1478
  ),
1480
1479
  /* @__PURE__ */ e.jsx("span", { className: `text-sm font-medium ${t ? "text-violet-700 dark:text-violet-400" : "text-slate-500 dark:text-slate-400"}`, children: t ? "Yes" : "No" })
1481
1480
  ] }),
1482
- x && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400 leading-snug", children: x })
1481
+ b && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400 leading-snug", children: b })
1483
1482
  ] });
1484
- }, je = ({ field: t, value: r, onChange: n, error: l, index: d, mode: x = "create" }) => {
1485
- var A;
1486
- const [m, h] = O(""), [f, k] = O(!1), [_, y] = O(!1), [E, L] = O(null), [C, g] = O(""), [N, c] = O(!1), z = (b) => {
1487
- const $ = b.target.value;
1488
- n(t.name, $);
1489
- }, I = (b) => {
1490
- n(t.name, b), k(!1), h("");
1491
- }, V = () => {
1492
- k(!1), h(""), c(!1), L(null);
1493
- }, M = () => {
1494
- m.trim() && (n(t.name, m.trim()), y(!0), k(!1), h(""));
1495
- }, Y = (b, $) => {
1496
- $.preventDefault(), $.stopPropagation(), L(b), g(b.label), c(!0);
1497
- }, U = async (b) => {
1498
- b.preventDefault(), b.stopPropagation(), C.trim() && E && t.onEditRank && await t.onEditRank(E.value, C.trim()) && (r === E.value && n(t.name, E.value), c(!1), L(null), g(""));
1499
- }, B = (b) => {
1500
- b.preventDefault(), b.stopPropagation(), c(!1), L(null), g("");
1501
- }, j = (() => {
1502
- if (!m) return t.options || [];
1503
- const b = Array.isArray(t.options) ? t.options : [];
1483
+ }, pe = ({ field: t, value: r, onChange: a, error: i, index: x, mode: b = "create" }) => {
1484
+ var F;
1485
+ const [d, u] = T(""), [v, y] = T(!1), [w, z] = T(!1), [N, $] = T(null), [P, f] = T(""), [m, g] = T(!1), R = (p) => {
1486
+ const _ = p.target.value;
1487
+ a(t.name, _);
1488
+ }, L = (p) => {
1489
+ a(t.name, p), y(!1), u("");
1490
+ }, Y = () => {
1491
+ y(!1), u(""), g(!1), $(null);
1492
+ }, D = () => {
1493
+ d.trim() && (a(t.name, d.trim()), z(!0), y(!1), u(""));
1494
+ }, X = (p, _) => {
1495
+ _.preventDefault(), _.stopPropagation(), $(p), f(p.label), g(!0);
1496
+ }, H = async (p) => {
1497
+ p.preventDefault(), p.stopPropagation(), P.trim() && N && t.onEditRank && await t.onEditRank(N.value, P.trim()) && (r === N.value && a(t.name, N.value), g(!1), $(null), f(""));
1498
+ }, U = (p) => {
1499
+ p.preventDefault(), p.stopPropagation(), g(!1), $(null), f("");
1500
+ }, C = (() => {
1501
+ if (!d) return t.options || [];
1502
+ const p = Array.isArray(t.options) ? t.options : [];
1504
1503
  if (t.fuzzySearch && typeof t.findFuzzyMatches == "function")
1505
1504
  try {
1506
- return t.findFuzzyMatches(m, b, t.fuzzyThreshold || 0.5);
1507
- } catch ($) {
1508
- return console.error("Fuzzy search error:", $), b.filter(
1509
- (F) => {
1510
- var H;
1511
- return (H = F.label) == null ? void 0 : H.toLowerCase().includes(m.toLowerCase());
1505
+ return t.findFuzzyMatches(d, p, t.fuzzyThreshold || 0.5);
1506
+ } catch (_) {
1507
+ return console.error("Fuzzy search error:", _), p.filter(
1508
+ (I) => {
1509
+ var G;
1510
+ return (G = I.label) == null ? void 0 : G.toLowerCase().includes(d.toLowerCase());
1512
1511
  }
1513
1512
  );
1514
1513
  }
1515
- return b.filter(
1516
- ($) => {
1517
- var F;
1518
- return (F = $.label) == null ? void 0 : F.toLowerCase().includes(m.toLowerCase());
1514
+ return p.filter(
1515
+ (_) => {
1516
+ var I;
1517
+ return (I = _.label) == null ? void 0 : I.toLowerCase().includes(d.toLowerCase());
1519
1518
  }
1520
1519
  ) || [];
1521
- })(), W = m.trim() && t.fuzzySearch && t.options && typeof t.checkForDuplicateDesignation == "function" ? t.checkForDuplicateDesignation(m, t.options, 0.8) : null, i = W && W.similarityScore === 1, v = t.type === "select-or-custom" && r && !((A = t.options) != null && A.some((b) => b.value === r)), S = () => {
1522
- var $;
1520
+ })(), O = d.trim() && t.fuzzySearch && t.options && typeof t.checkForDuplicateDesignation == "function" ? t.checkForDuplicateDesignation(d, t.options, 0.8) : null, h = O && O.similarityScore === 1, k = t.type === "select-or-custom" && r && !((F = t.options) != null && F.some((p) => p.value === r)), M = () => {
1521
+ var _;
1523
1522
  if (!r) return t.placeholder;
1524
- if (t.type === "select-or-custom" && v)
1523
+ if (t.type === "select-or-custom" && k)
1525
1524
  return r;
1526
- const b = ($ = t.options) == null ? void 0 : $.find((F) => F.value === r);
1527
- return b ? b.label : t.placeholder;
1528
- }, P = () => {
1529
- var H, G;
1530
- const b = t.icon, $ = `
1525
+ const p = (_ = t.options) == null ? void 0 : _.find((I) => I.value === r);
1526
+ return p ? p.label : t.placeholder;
1527
+ }, W = () => {
1528
+ var G, J;
1529
+ const p = t.icon, _ = `
1531
1530
  w-full px-3.5 py-2.5 rounded-xl border transition-all duration-200
1532
1531
  bg-white dark:bg-slate-800 text-sm text-slate-900 dark:text-white
1533
1532
  focus:outline-none focus:ring-2 focus:ring-violet-500/20 placeholder-slate-400
1534
- `, F = l ? "border-red-300 dark:border-red-700 focus:border-red-500 focus:ring-red-500" : "border-slate-300 dark:border-slate-600 focus:border-violet-500 focus:ring-violet-500";
1533
+ `, I = i ? "border-red-300 dark:border-red-700 focus:border-red-500 focus:ring-red-500" : "border-slate-300 dark:border-slate-600 focus:border-violet-500 focus:ring-violet-500";
1535
1534
  switch (t.type) {
1536
1535
  case "select-or-custom":
1537
- return _ || v ? /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1538
- b && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(b, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
1536
+ return w || k ? /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1537
+ p && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(p, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
1539
1538
  /* @__PURE__ */ e.jsx(
1540
1539
  "input",
1541
1540
  {
1542
1541
  type: "text",
1543
1542
  value: r,
1544
- onChange: (s) => n(t.name, s.target.value),
1543
+ onChange: (s) => a(t.name, s.target.value),
1545
1544
  placeholder: t.customPlaceholder || "Enter custom value",
1546
1545
  disabled: t.disabled,
1547
- className: `${$} ${F} ${b ? "pl-9 sm:pl-12" : ""} pr-32 disabled:opacity-50 disabled:cursor-not-allowed`
1546
+ className: `${_} ${I} ${p ? "pl-9 sm:pl-12" : ""} pr-32 disabled:opacity-50 disabled:cursor-not-allowed`
1548
1547
  }
1549
1548
  ),
1550
1549
  /* @__PURE__ */ e.jsx(
@@ -1552,7 +1551,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1552
1551
  {
1553
1552
  type: "button",
1554
1553
  onClick: (s) => {
1555
- s.preventDefault(), s.stopPropagation(), y(!1), n(t.name, "");
1554
+ s.preventDefault(), s.stopPropagation(), z(!1), a(t.name, "");
1556
1555
  },
1557
1556
  className: "absolute right-3 top-1/2 -translate-y-1/2 px-3 py-1.5 text-xs font-semibold text-slate-600 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white transition-colors rounded-lg hover:bg-slate-100 dark:hover:bg-slate-700",
1558
1557
  children: "Select Existing"
@@ -1564,30 +1563,30 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1564
1563
  {
1565
1564
  type: "button",
1566
1565
  onClick: (s) => {
1567
- s.preventDefault(), s.stopPropagation(), t.disabled || k(!0);
1566
+ s.preventDefault(), s.stopPropagation(), t.disabled || y(!0);
1568
1567
  },
1569
1568
  disabled: t.disabled,
1570
- className: ` relative ${$} ${F} ${b ? "pl-12" : ""} pr-4 text-left flex items-center justify-between disabled:opacity-50 disabled:cursor-not-allowed hover:border-violet-400 dark:hover:border-violet-500`,
1569
+ className: ` relative ${_} ${I} ${p ? "pl-12" : ""} pr-4 text-left flex items-center justify-between disabled:opacity-50 disabled:cursor-not-allowed hover:border-violet-400 dark:hover:border-violet-500`,
1571
1570
  children: [
1572
- b && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(b, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
1571
+ p && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(p, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
1573
1572
  /* @__PURE__ */ e.jsx(
1574
1573
  "span",
1575
1574
  {
1576
1575
  className: `${r ? "" : "text-slate-400"} truncate pr-2`,
1577
- title: S(),
1578
- children: S()
1576
+ title: M(),
1577
+ children: M()
1579
1578
  }
1580
1579
  ),
1581
- /* @__PURE__ */ e.jsx(ae, { className: "w-5 h-5 text-slate-400 " })
1580
+ /* @__PURE__ */ e.jsx(le, { className: "w-5 h-5 text-slate-400 " })
1582
1581
  ]
1583
1582
  }
1584
1583
  ),
1585
- f && /* @__PURE__ */ e.jsx(
1584
+ v && /* @__PURE__ */ e.jsx(
1586
1585
  "div",
1587
1586
  {
1588
1587
  className: "fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-4 bg-slate-900/50 backdrop-blur-sm animate-in fade-in duration-200",
1589
1588
  onMouseDown: (s) => {
1590
- s.target === s.currentTarget && (s.preventDefault(), s.stopPropagation(), V());
1589
+ s.target === s.currentTarget && (s.preventDefault(), s.stopPropagation(), Y());
1591
1590
  },
1592
1591
  children: /* @__PURE__ */ e.jsx(
1593
1592
  "div",
@@ -1600,15 +1599,15 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1600
1599
  dark:from-slate-700/50 dark:via-slate-800/50 dark:to-slate-700/50
1601
1600
  border-b border-slate-200 dark:border-slate-700 rounded-t-2xl`, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
1602
1601
  /* @__PURE__ */ e.jsxs("div", { className: "min-w-0", children: [
1603
- /* @__PURE__ */ e.jsx("h3", { className: "text-sm sm:text-base font-bold text-slate-900 dark:text-white truncate", children: N ? "Edit Rank Designation" : t.modalTitle || t.label }),
1604
- /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400 mt-0.5 truncate", children: N ? `Editing: ${E == null ? void 0 : E.label}` : t.modalSubtitle || "Search existing or create new" })
1602
+ /* @__PURE__ */ e.jsx("h3", { className: "text-sm sm:text-base font-bold text-slate-900 dark:text-white truncate", children: m ? "Edit Rank Designation" : t.modalTitle || t.label }),
1603
+ /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400 mt-0.5 truncate", children: m ? `Editing: ${N == null ? void 0 : N.label}` : t.modalSubtitle || "Search existing or create new" })
1605
1604
  ] }),
1606
1605
  /* @__PURE__ */ e.jsx(
1607
1606
  "button",
1608
1607
  {
1609
1608
  type: "button",
1610
1609
  onClick: (s) => {
1611
- s.preventDefault(), s.stopPropagation(), V();
1610
+ s.preventDefault(), s.stopPropagation(), Y();
1612
1611
  },
1613
1612
  className: `flex-shrink-0 p-1.5 rounded-lg border transition-all duration-200
1614
1613
  text-slate-400 hover:bg-slate-100 hover:text-slate-900
@@ -1616,11 +1615,11 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1616
1615
  dark:border-slate-700/50 dark:hover:bg-slate-700
1617
1616
  dark:hover:text-white dark:hover:border-slate-500
1618
1617
  hover:scale-105 active:scale-95`,
1619
- children: /* @__PURE__ */ e.jsx(X, { className: "w-4 h-4" })
1618
+ children: /* @__PURE__ */ e.jsx(Z, { className: "w-4 h-4" })
1620
1619
  }
1621
1620
  )
1622
1621
  ] }) }),
1623
- N ? /* @__PURE__ */ e.jsxs("div", { className: "p-4 sm:p-5 space-y-3 sm:space-y-4", children: [
1622
+ m ? /* @__PURE__ */ e.jsxs("div", { className: "p-4 sm:p-5 space-y-3 sm:space-y-4", children: [
1624
1623
  /* @__PURE__ */ e.jsxs("div", { children: [
1625
1624
  /* @__PURE__ */ e.jsx("label", { className: `block text-xs font-semibold uppercase tracking-wide
1626
1625
  text-slate-700 dark:text-slate-300 mb-1.5`, children: "Edit Rank Designation" }),
@@ -1628,8 +1627,8 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1628
1627
  "input",
1629
1628
  {
1630
1629
  type: "text",
1631
- value: C,
1632
- onChange: (s) => g(s.target.value),
1630
+ value: P,
1631
+ onChange: (s) => f(s.target.value),
1633
1632
  className: `w-full px-3 py-2.5 sm:px-4 sm:py-3 rounded-xl border
1634
1633
  border-slate-200/50 dark:border-slate-700/50
1635
1634
  bg-white dark:bg-slate-800
@@ -1645,7 +1644,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1645
1644
  "button",
1646
1645
  {
1647
1646
  type: "button",
1648
- onClick: B,
1647
+ onClick: U,
1649
1648
  className: `flex-1 inline-flex items-center justify-center gap-2
1650
1649
  px-3 py-2.5 sm:px-4 sm:py-3 rounded-xl
1651
1650
  bg-white dark:bg-slate-700 hover:bg-slate-50 dark:hover:bg-slate-600
@@ -1653,7 +1652,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1653
1652
  border border-slate-200/50 dark:border-slate-700/50
1654
1653
  transition-all duration-200 hover:scale-105 active:scale-95 shadow-sm`,
1655
1654
  children: [
1656
- /* @__PURE__ */ e.jsx(X, { className: "w-4 h-4" }),
1655
+ /* @__PURE__ */ e.jsx(Z, { className: "w-4 h-4" }),
1657
1656
  " Cancel"
1658
1657
  ]
1659
1658
  }
@@ -1662,7 +1661,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1662
1661
  "button",
1663
1662
  {
1664
1663
  type: "button",
1665
- onClick: U,
1664
+ onClick: H,
1666
1665
  className: `flex-1 inline-flex items-center justify-center gap-2
1667
1666
  px-3 py-2.5 sm:px-4 sm:py-3 rounded-xl
1668
1667
  bg-gradient-to-r from-violet-600 to-indigo-600
@@ -1671,7 +1670,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1671
1670
  shadow-md hover:shadow-lg
1672
1671
  transition-all duration-200 hover:scale-105 active:scale-95`,
1673
1672
  children: [
1674
- /* @__PURE__ */ e.jsx(Me, { className: "w-4 h-4" }),
1673
+ /* @__PURE__ */ e.jsx(me, { className: "w-4 h-4" }),
1675
1674
  " Save Changes"
1676
1675
  ]
1677
1676
  }
@@ -1679,41 +1678,41 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1679
1678
  ] })
1680
1679
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1681
1680
  /* @__PURE__ */ e.jsx("div", { className: "p-4 border-b border-slate-200 dark:border-slate-700", children: /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1682
- /* @__PURE__ */ e.jsx(le, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400" }),
1681
+ /* @__PURE__ */ e.jsx(ie, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400" }),
1683
1682
  /* @__PURE__ */ e.jsx(
1684
1683
  "input",
1685
1684
  {
1686
1685
  type: "text",
1687
- value: m,
1688
- onChange: (s) => h(s.target.value),
1686
+ value: d,
1687
+ onChange: (s) => u(s.target.value),
1689
1688
  placeholder: t.fuzzySearch ? "Search or type to create new..." : "Search...",
1690
1689
  className: "w-full pl-10 pr-4 py-2.5 rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 text-slate-900 dark:text-white placeholder-slate-400 focus:border-violet-500 focus:ring-2 focus:ring-violet-500/20 transition-all",
1691
1690
  autoFocus: !0
1692
1691
  }
1693
1692
  )
1694
1693
  ] }) }),
1695
- W && W.similarityScore < 1 && /* @__PURE__ */ e.jsx("div", { className: "mx-4 mt-4 p-3 rounded-lg bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800/50", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-start space-x-2", children: [
1696
- /* @__PURE__ */ e.jsx(he, { className: "w-4 h-4 text-amber-600 dark:text-amber-400 flex-shrink-0 mt-0.5" }),
1694
+ O && O.similarityScore < 1 && /* @__PURE__ */ e.jsx("div", { className: "mx-4 mt-4 p-3 rounded-lg bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800/50", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-start space-x-2", children: [
1695
+ /* @__PURE__ */ e.jsx(ke, { className: "w-4 h-4 text-amber-600 dark:text-amber-400 flex-shrink-0 mt-0.5" }),
1697
1696
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1 text-xs", children: [
1698
1697
  /* @__PURE__ */ e.jsx("p", { className: "font-semibold text-amber-900 dark:text-amber-300", children: "Similar designation found!" }),
1699
1698
  /* @__PURE__ */ e.jsxs("p", { className: "text-amber-700 dark:text-amber-400 mt-1", children: [
1700
1699
  "Similar rank found (",
1701
- W.scorePercentage,
1700
+ O.scorePercentage,
1702
1701
  "% match). You can still create this if it's different."
1703
1702
  ] })
1704
1703
  ] })
1705
1704
  ] }) }),
1706
- /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-2", children: m.trim() ? (
1705
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-2", children: d.trim() ? (
1707
1706
  /* Show filtered results + Create New when user types */
1708
1707
  /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1709
- j.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "space-y-1 mb-3", children: [
1708
+ C.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "space-y-1 mb-3", children: [
1710
1709
  /* @__PURE__ */ e.jsx("p", { className: "px-4 py-2 text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider", children: "Existing Options" }),
1711
- j.map((s) => /* @__PURE__ */ e.jsx("div", { className: "group relative", children: /* @__PURE__ */ e.jsxs(
1710
+ C.map((s) => /* @__PURE__ */ e.jsx("div", { className: "group relative", children: /* @__PURE__ */ e.jsxs(
1712
1711
  "button",
1713
1712
  {
1714
1713
  type: "button",
1715
- onClick: (a) => {
1716
- a.preventDefault(), a.stopPropagation(), I(s.value);
1714
+ onClick: (n) => {
1715
+ n.preventDefault(), n.stopPropagation(), L(s.value);
1717
1716
  },
1718
1717
  className: `w-full text-left px-4 py-3 rounded-lg transition-all duration-200 flex items-center justify-between ${r === s.value ? "bg-violet-100 dark:bg-violet-600/20 text-violet-900 dark:text-violet-300 font-semibold" : "hover:bg-slate-100 dark:hover:bg-slate-700 text-slate-700 dark:text-slate-300"}`,
1719
1718
  children: [
@@ -1727,10 +1726,10 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1727
1726
  "button",
1728
1727
  {
1729
1728
  type: "button",
1730
- onClick: (a) => Y(s, a),
1729
+ onClick: (n) => X(s, n),
1731
1730
  className: "opacity-0 group-hover:opacity-100 transition-opacity p-1.5 rounded-md hover:bg-white dark:hover:bg-slate-600 text-slate-500 hover:text-violet-600 dark:text-slate-400 dark:hover:text-violet-400",
1732
1731
  title: "Edit this rank",
1733
- children: /* @__PURE__ */ e.jsx(oe, { className: "w-3.5 h-3.5" })
1732
+ children: /* @__PURE__ */ e.jsx(ne, { className: "w-3.5 h-3.5" })
1734
1733
  }
1735
1734
  )
1736
1735
  ] })
@@ -1738,22 +1737,22 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1738
1737
  }
1739
1738
  ) }, s.value))
1740
1739
  ] }),
1741
- (!i || (W == null ? void 0 : W.similarityScore) < 1) && /* @__PURE__ */ e.jsxs("div", { className: j.length > 0 ? "border-t border-slate-200 dark:border-slate-700 pt-3" : "", children: [
1742
- /* @__PURE__ */ e.jsx("p", { className: "px-4 py-2 text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider", children: j.length > 0 ? x === "edit" ? "Or Update To" : "Or Create New" : "No matches found" }),
1740
+ (!h || (O == null ? void 0 : O.similarityScore) < 1) && /* @__PURE__ */ e.jsxs("div", { className: C.length > 0 ? "border-t border-slate-200 dark:border-slate-700 pt-3" : "", children: [
1741
+ /* @__PURE__ */ e.jsx("p", { className: "px-4 py-2 text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider", children: C.length > 0 ? b === "edit" ? "Or Update To" : "Or Create New" : "No matches found" }),
1743
1742
  /* @__PURE__ */ e.jsx("div", { className: "px-2", children: /* @__PURE__ */ e.jsx(
1744
1743
  "button",
1745
1744
  {
1746
1745
  type: "button",
1747
1746
  onClick: (s) => {
1748
- s.preventDefault(), s.stopPropagation(), M();
1747
+ s.preventDefault(), s.stopPropagation(), D();
1749
1748
  },
1750
1749
  className: "w-full px-4 py-3 rounded-lg transition-all duration-200 bg-gradient-to-r from-violet-600 to-indigo-600 hover:from-violet-700 hover:to-indigo-700 text-white font-semibold shadow-lg hover:shadow-xl transform hover:-translate-y-0.5 min-w-0",
1751
1750
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center space-x-2 min-w-0", children: [
1752
- /* @__PURE__ */ e.jsx(_e, { className: "w-5 h-5 flex-shrink-0" }),
1751
+ /* @__PURE__ */ e.jsx(Oe, { className: "w-5 h-5 flex-shrink-0" }),
1753
1752
  /* @__PURE__ */ e.jsxs("span", { className: "truncate", children: [
1754
- x === "edit" ? "Update to" : "Create New",
1753
+ b === "edit" ? "Update to" : "Create New",
1755
1754
  ": ",
1756
- m.trim()
1755
+ d.trim()
1757
1756
  ] })
1758
1757
  ] })
1759
1758
  }
@@ -1766,8 +1765,8 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1766
1765
  "button",
1767
1766
  {
1768
1767
  type: "button",
1769
- onClick: (a) => {
1770
- a.preventDefault(), a.stopPropagation(), I(s.value);
1768
+ onClick: (n) => {
1769
+ n.preventDefault(), n.stopPropagation(), L(s.value);
1771
1770
  },
1772
1771
  className: `w-full text-left px-4 py-3 rounded-lg transition-all duration-200 break-words whitespace-normal ${r === s.value ? "bg-violet-100 dark:bg-violet-600/20 text-violet-900 dark:text-violet-300 font-semibold" : "hover:bg-slate-100 dark:hover:bg-slate-700 text-slate-700 dark:text-slate-300"}`,
1773
1772
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
@@ -1776,10 +1775,10 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1776
1775
  "button",
1777
1776
  {
1778
1777
  type: "button",
1779
- onClick: (a) => Y(s, a),
1778
+ onClick: (n) => X(s, n),
1780
1779
  className: "opacity-0 group-hover:opacity-100 transition-opacity ml-2 p-1.5 rounded-md hover:bg-white dark:hover:bg-slate-600 text-slate-500 hover:text-violet-600 dark:text-slate-400 dark:hover:text-violet-400",
1781
1780
  title: "Edit this rank",
1782
- children: /* @__PURE__ */ e.jsx(oe, { className: "w-3.5 h-3.5" })
1781
+ children: /* @__PURE__ */ e.jsx(ne, { className: "w-3.5 h-3.5" })
1783
1782
  }
1784
1783
  )
1785
1784
  ] })
@@ -1788,8 +1787,8 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1788
1787
  ) })
1789
1788
  ] }),
1790
1789
  /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0 px-6 py-3 border-t border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-800/50", children: /* @__PURE__ */ e.jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-400 text-center", children: [
1791
- !N && (j ? `${j.length} option${j.length !== 1 ? "s" : ""} available` : ""),
1792
- N && "Edit the rank designation and save changes"
1790
+ !m && (C ? `${C.length} option${C.length !== 1 ? "s" : ""} available` : ""),
1791
+ m && "Edit the rank designation and save changes"
1793
1792
  ] }) })
1794
1793
  ] })
1795
1794
  }
@@ -1804,23 +1803,23 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1804
1803
  {
1805
1804
  type: "button",
1806
1805
  onClick: (s) => {
1807
- s.preventDefault(), s.stopPropagation(), t.disabled || k(!0);
1806
+ s.preventDefault(), s.stopPropagation(), t.disabled || y(!0);
1808
1807
  },
1809
1808
  disabled: t.disabled,
1810
- className: `relative ${$} ${F} flex items-center justify-between ${b ? "pl-12" : ""} pr-4 text-left disabled:opacity-50 disabled:cursor-not-allowed hover:border-violet-400 dark:hover:border-violet-500`,
1809
+ className: `relative ${_} ${I} flex items-center justify-between ${p ? "pl-12" : ""} pr-4 text-left disabled:opacity-50 disabled:cursor-not-allowed hover:border-violet-400 dark:hover:border-violet-500`,
1811
1810
  children: [
1812
- b && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(b, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
1813
- /* @__PURE__ */ e.jsx("span", { className: r ? "text-slate-900 dark:text-white truncate" : "text-slate-400", children: S() }),
1814
- /* @__PURE__ */ e.jsx(ae, { className: "w-5 h-5 text-slate-400" })
1811
+ p && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(p, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
1812
+ /* @__PURE__ */ e.jsx("span", { className: r ? "text-slate-900 dark:text-white truncate" : "text-slate-400", children: M() }),
1813
+ /* @__PURE__ */ e.jsx(le, { className: "w-5 h-5 text-slate-400" })
1815
1814
  ]
1816
1815
  }
1817
1816
  ),
1818
- f && /* @__PURE__ */ e.jsx(
1817
+ v && /* @__PURE__ */ e.jsx(
1819
1818
  "div",
1820
1819
  {
1821
1820
  className: "fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-4 bg-black/50 backdrop-blur-sm animate-in fade-in duration-200",
1822
1821
  onMouseDown: (s) => {
1823
- s.target === s.currentTarget && (s.preventDefault(), s.stopPropagation(), V());
1822
+ s.target === s.currentTarget && (s.preventDefault(), s.stopPropagation(), Y());
1824
1823
  },
1825
1824
  children: /* @__PURE__ */ e.jsxs(
1826
1825
  "div",
@@ -1842,36 +1841,36 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1842
1841
  {
1843
1842
  type: "button",
1844
1843
  onClick: (s) => {
1845
- s.preventDefault(), s.stopPropagation(), V();
1844
+ s.preventDefault(), s.stopPropagation(), Y();
1846
1845
  },
1847
1846
  className: `flex-shrink-0 p-1.5 rounded-lg border transition-all duration-200
1848
1847
  text-slate-400 hover:bg-slate-100 hover:text-slate-900
1849
1848
  border-slate-200/50 dark:border-slate-700/50
1850
1849
  dark:hover:bg-slate-700 dark:hover:text-white`,
1851
- children: /* @__PURE__ */ e.jsx(X, { className: "w-4 h-4" })
1850
+ children: /* @__PURE__ */ e.jsx(Z, { className: "w-4 h-4" })
1852
1851
  }
1853
1852
  )
1854
1853
  ] }),
1855
1854
  /* @__PURE__ */ e.jsx("div", { className: "p-4 border-b border-slate-200 dark:border-slate-700", children: /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1856
- /* @__PURE__ */ e.jsx(le, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400" }),
1855
+ /* @__PURE__ */ e.jsx(ie, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400" }),
1857
1856
  /* @__PURE__ */ e.jsx(
1858
1857
  "input",
1859
1858
  {
1860
1859
  type: "text",
1861
- value: m,
1862
- onChange: (s) => h(s.target.value),
1860
+ value: d,
1861
+ onChange: (s) => u(s.target.value),
1863
1862
  placeholder: "Search...",
1864
1863
  className: "w-full pl-10 pr-4 py-2.5 rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 text-slate-900 dark:text-white placeholder-slate-400 focus:border-violet-500 focus:ring-2 focus:ring-violet-500/20 transition-all",
1865
1864
  autoFocus: !0
1866
1865
  }
1867
1866
  )
1868
1867
  ] }) }),
1869
- /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-2", children: j.length > 0 ? /* @__PURE__ */ e.jsx("div", { className: "space-y-1", children: j.map((s) => /* @__PURE__ */ e.jsx(
1868
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-2", children: C.length > 0 ? /* @__PURE__ */ e.jsx("div", { className: "space-y-1", children: C.map((s) => /* @__PURE__ */ e.jsx(
1870
1869
  "button",
1871
1870
  {
1872
1871
  type: "button",
1873
- onClick: (a) => {
1874
- a.preventDefault(), a.stopPropagation(), I(s.value);
1872
+ onClick: (n) => {
1873
+ n.preventDefault(), n.stopPropagation(), L(s.value);
1875
1874
  },
1876
1875
  className: `w-full text-left px-4 py-3 rounded-lg transition-all duration-200 break-all whitespace-normal ${r === s.value ? "bg-violet-100 dark:bg-violet-600/20 text-violet-900 dark:text-violet-300 font-semibold" : "hover:bg-slate-100 dark:hover:bg-slate-700 text-slate-700 dark:text-slate-300"}`,
1877
1876
  children: s.label
@@ -1884,54 +1883,54 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1884
1883
  }
1885
1884
  )
1886
1885
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1887
- b && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(b, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
1886
+ p && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(p, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
1888
1887
  /* @__PURE__ */ e.jsxs(
1889
1888
  "select",
1890
1889
  {
1891
1890
  value: r,
1892
- onChange: z,
1891
+ onChange: R,
1893
1892
  disabled: t.disabled,
1894
- className: `${$} ${F} ${b ? "pl-12" : ""} pr-10 appearance-none cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-violet-500/20`,
1893
+ className: `${_} ${I} ${p ? "pl-12" : ""} pr-10 appearance-none cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-violet-500/20`,
1895
1894
  children: [
1896
1895
  /* @__PURE__ */ e.jsx("option", { value: "", children: t.placeholder || "Select an option" }),
1897
- (H = t.options) == null ? void 0 : H.map((s) => /* @__PURE__ */ e.jsx("option", { value: s.value, children: s.label }, s.value))
1896
+ (G = t.options) == null ? void 0 : G.map((s) => /* @__PURE__ */ e.jsx("option", { value: s.value, children: s.label }, s.value))
1898
1897
  ]
1899
1898
  }
1900
1899
  ),
1901
- /* @__PURE__ */ e.jsx(ae, { className: "absolute right-4 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400 pointer-events-none" })
1900
+ /* @__PURE__ */ e.jsx(le, { className: "absolute right-4 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400 pointer-events-none" })
1902
1901
  ] });
1903
1902
  case "date":
1904
1903
  case "number":
1905
1904
  return /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1906
- b && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(b, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
1905
+ p && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(p, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
1907
1906
  /* @__PURE__ */ e.jsx(
1908
1907
  "input",
1909
1908
  {
1910
1909
  type: t.type,
1911
1910
  value: r,
1912
- onChange: (s) => n(t.name, s.target.value),
1911
+ onChange: (s) => a(t.name, s.target.value),
1913
1912
  disabled: t.disabled,
1914
1913
  min: t.min,
1915
1914
  max: t.max,
1916
1915
  step: t.step,
1917
- className: `${$} ${F} ${b ? "pl-12" : ""} disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-violet-500/20`
1916
+ className: `${_} ${I} ${p ? "pl-12" : ""} disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-violet-500/20`
1918
1917
  }
1919
1918
  )
1920
1919
  ] });
1921
1920
  case "textarea":
1922
1921
  return t.isHtml ? t.disabled ? /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1923
- b && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-3 pointer-events-none", children: /* @__PURE__ */ e.jsx(b, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
1922
+ p && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-3 pointer-events-none", children: /* @__PURE__ */ e.jsx(p, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
1924
1923
  /* @__PURE__ */ e.jsx(
1925
1924
  "div",
1926
1925
  {
1927
- className: `${$} ${F} ${b ? "pl-12" : ""} opacity-50 cursor-not-allowed prose prose-sm max-w-none [&>*]:my-0.5 [&>ul]:list-disc [&>ul]:pl-4 [&>ol]:list-decimal [&>ol]:pl-4`,
1926
+ className: `${_} ${I} ${p ? "pl-12" : ""} opacity-50 cursor-not-allowed prose prose-sm max-w-none [&>*]:my-0.5 [&>ul]:list-disc [&>ul]:pl-4 [&>ol]:list-decimal [&>ol]:pl-4`,
1928
1927
  style: { minHeight: `${(t.rows || 4) * 1.75 + 1.5}rem` },
1929
1928
  dangerouslySetInnerHTML: { __html: r || "" }
1930
1929
  }
1931
1930
  )
1932
1931
  ] }) : t.renderHtmlEditor ? t.renderHtmlEditor({
1933
1932
  content: r || "",
1934
- onChange: (s) => n(t.name, s),
1933
+ onChange: (s) => a(t.name, s),
1935
1934
  height: t.height || 200,
1936
1935
  rows: t.rows || 4
1937
1936
  }) : /* @__PURE__ */ e.jsxs("div", { className: "p-3 bg-amber-50 text-amber-800 rounded-xl border border-amber-200 text-sm", children: [
@@ -1939,16 +1938,16 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1939
1938
  /* @__PURE__ */ e.jsx("code", { children: "renderHtmlEditor" }),
1940
1939
  " to this field configuration."
1941
1940
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1942
- b && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-3 pointer-events-none", children: /* @__PURE__ */ e.jsx(b, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
1941
+ p && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-3 pointer-events-none", children: /* @__PURE__ */ e.jsx(p, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
1943
1942
  /* @__PURE__ */ e.jsx(
1944
1943
  "textarea",
1945
1944
  {
1946
1945
  value: r,
1947
- onChange: (s) => n(t.name, s.target.value),
1946
+ onChange: (s) => a(t.name, s.target.value),
1948
1947
  placeholder: t.placeholder,
1949
1948
  disabled: t.disabled,
1950
1949
  rows: t.rows || 4,
1951
- className: `${$} ${F} ${b ? "pl-12" : ""} placeholder-slate-400 resize-none disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-violet-500/20`
1950
+ className: `${_} ${I} ${p ? "pl-12" : ""} placeholder-slate-400 resize-none disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-violet-500/20`
1952
1951
  }
1953
1952
  )
1954
1953
  ] });
@@ -1959,7 +1958,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1959
1958
  {
1960
1959
  type: "checkbox",
1961
1960
  checked: r || !1,
1962
- onChange: (s) => n(t.name, s.target.checked),
1961
+ onChange: (s) => a(t.name, s.target.checked),
1963
1962
  disabled: t.disabled,
1964
1963
  className: "h-5 w-5 rounded border-slate-300 text-violet-600 focus:ring-violet-500 dark:border-slate-600 dark:bg-slate-700 disabled:opacity-50 disabled:cursor-not-allowed"
1965
1964
  }
@@ -1968,10 +1967,10 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1968
1967
  ] });
1969
1968
  case "toggle":
1970
1969
  return /* @__PURE__ */ e.jsx(
1971
- De,
1970
+ Ue,
1972
1971
  {
1973
1972
  checked: r || !1,
1974
- onChange: n,
1973
+ onChange: a,
1975
1974
  disabled: t.disabled,
1976
1975
  label: t.toggleLabel,
1977
1976
  name: t.name,
@@ -1979,7 +1978,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1979
1978
  }
1980
1979
  );
1981
1980
  case "radio":
1982
- return /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap items-center gap-3 sm:gap-6", children: (G = t.options) == null ? void 0 : G.map((s) => /* @__PURE__ */ e.jsxs(
1981
+ return /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap items-center gap-3 sm:gap-6", children: (J = t.options) == null ? void 0 : J.map((s) => /* @__PURE__ */ e.jsxs(
1983
1982
  "label",
1984
1983
  {
1985
1984
  className: `flex items-center cursor-pointer ${t.disabled ? "opacity-50 cursor-not-allowed" : ""}`,
@@ -1991,7 +1990,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
1991
1990
  name: t.name,
1992
1991
  value: s.value,
1993
1992
  checked: r === s.value,
1994
- onChange: (a) => n(t.name, a.target.value),
1993
+ onChange: (n) => a(t.name, n.target.value),
1995
1994
  disabled: t.disabled,
1996
1995
  className: "h-4 w-4 text-violet-600 border-slate-300 focus:ring-2 focus:ring-violet-500 cursor-pointer disabled:cursor-not-allowed dark:border-slate-600 dark:bg-slate-700"
1997
1996
  }
@@ -2002,19 +2001,19 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2002
2001
  s.value
2003
2002
  )) });
2004
2003
  case "file": {
2005
- const s = ve.useRef(null), a = Array.isArray(r) ? r : [];
2004
+ const s = ge.useRef(null), n = Array.isArray(r) ? r : [];
2006
2005
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
2007
2006
  /* @__PURE__ */ e.jsxs("div", { className: "relative flex items-center", children: [
2008
- b && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(b, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
2007
+ p && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(p, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
2009
2008
  /* @__PURE__ */ e.jsx(
2010
2009
  "div",
2011
2010
  {
2012
2011
  onClick: () => {
2013
- var o;
2014
- return !t.disabled && ((o = s.current) == null ? void 0 : o.click());
2012
+ var c;
2013
+ return !t.disabled && ((c = s.current) == null ? void 0 : c.click());
2015
2014
  },
2016
- className: `w-full px-4 py-3 rounded-xl border transition-all duration-200 bg-white dark:bg-slate-800 text-slate-900 dark:text-white ${b ? "pl-12" : "pl-4"} pr-14 cursor-pointer select-none ${t.disabled ? "opacity-50 cursor-not-allowed border-slate-300 dark:border-slate-600" : "border-slate-300 dark:border-slate-600 hover:border-violet-400 dark:hover:border-violet-500"} ${l ? "border-red-300 dark:border-red-700" : ""}`,
2017
- children: /* @__PURE__ */ e.jsx("span", { className: "text-slate-400 dark:text-slate-500 text-sm", children: a.length > 0 ? `${a.length} file${a.length !== 1 ? "s" : ""} selected` : t.placeholder || "Select files to upload..." })
2015
+ className: `w-full px-4 py-3 rounded-xl border transition-all duration-200 bg-white dark:bg-slate-800 text-slate-900 dark:text-white ${p ? "pl-12" : "pl-4"} pr-14 cursor-pointer select-none ${t.disabled ? "opacity-50 cursor-not-allowed border-slate-300 dark:border-slate-600" : "border-slate-300 dark:border-slate-600 hover:border-violet-400 dark:hover:border-violet-500"} ${i ? "border-red-300 dark:border-red-700" : ""}`,
2016
+ children: /* @__PURE__ */ e.jsx("span", { className: "text-slate-400 dark:text-slate-500 text-sm", children: n.length > 0 ? `${n.length} file${n.length !== 1 ? "s" : ""} selected` : t.placeholder || "Select files to upload..." })
2018
2017
  }
2019
2018
  ),
2020
2019
  /* @__PURE__ */ e.jsx(
@@ -2023,12 +2022,12 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2023
2022
  type: "button",
2024
2023
  disabled: t.disabled,
2025
2024
  onClick: () => {
2026
- var o;
2027
- return (o = s.current) == null ? void 0 : o.click();
2025
+ var c;
2026
+ return (c = s.current) == null ? void 0 : c.click();
2028
2027
  },
2029
2028
  className: "absolute right-2 top-1/2 -translate-y-1/2 p-2 rounded-lg bg-violet-600 hover:bg-violet-700 active:bg-violet-800 disabled:opacity-50 disabled:cursor-not-allowed text-white transition-colors",
2030
2029
  title: "Browse files",
2031
- children: /* @__PURE__ */ e.jsx($e, { className: "w-4 h-4" })
2030
+ children: /* @__PURE__ */ e.jsx(_e, { className: "w-4 h-4" })
2032
2031
  }
2033
2032
  ),
2034
2033
  /* @__PURE__ */ e.jsx(
@@ -2039,29 +2038,29 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2039
2038
  accept: t.accept,
2040
2039
  multiple: t.multiple ?? !1,
2041
2040
  className: "hidden",
2042
- onChange: (o) => {
2043
- t.onFilesSelected && t.onFilesSelected(o.target.files), o.target.value = "";
2041
+ onChange: (c) => {
2042
+ t.onFilesSelected && t.onFilesSelected(c.target.files), c.target.value = "";
2044
2043
  }
2045
2044
  }
2046
2045
  )
2047
2046
  ] }),
2048
- a.map(({ tempId: o, file: p, documentName: w }) => /* @__PURE__ */ e.jsxs("div", { className: "group flex items-center gap-3 px-4 py-3 rounded-xl border border-violet-200 dark:border-violet-700/40 bg-violet-50/50 dark:bg-violet-900/10 transition-colors", children: [
2049
- /* @__PURE__ */ e.jsx("div", { className: "w-8 h-8 rounded-lg bg-violet-100 dark:bg-violet-900/30 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ e.jsx(Le, { className: "w-4 h-4 text-violet-600 dark:text-violet-400" }) }),
2047
+ n.map(({ tempId: c, file: j, documentName: E }) => /* @__PURE__ */ e.jsxs("div", { className: "group flex items-center gap-3 px-4 py-3 rounded-xl border border-violet-200 dark:border-violet-700/40 bg-violet-50/50 dark:bg-violet-900/10 transition-colors", children: [
2048
+ /* @__PURE__ */ e.jsx("div", { className: "w-8 h-8 rounded-lg bg-violet-100 dark:bg-violet-900/30 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ e.jsx(Ae, { className: "w-4 h-4 text-violet-600 dark:text-violet-400" }) }),
2050
2049
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
2051
- /* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-slate-800 dark:text-slate-200 truncate", children: w || (p == null ? void 0 : p.name) }),
2052
- (p == null ? void 0 : p.size) !== void 0 && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-violet-600 dark:text-violet-400 mt-0.5", children: p.size < 1024 * 1024 ? `${(p.size / 1024).toFixed(1)} KB` : `${(p.size / (1024 * 1024)).toFixed(2)} MB` })
2050
+ /* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-slate-800 dark:text-slate-200 truncate", children: E || (j == null ? void 0 : j.name) }),
2051
+ (j == null ? void 0 : j.size) !== void 0 && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-violet-600 dark:text-violet-400 mt-0.5", children: j.size < 1024 * 1024 ? `${(j.size / 1024).toFixed(1)} KB` : `${(j.size / (1024 * 1024)).toFixed(2)} MB` })
2053
2052
  ] }),
2054
2053
  t.onRemove && /* @__PURE__ */ e.jsx(
2055
2054
  "button",
2056
2055
  {
2057
2056
  type: "button",
2058
- onClick: () => t.onRemove(o),
2057
+ onClick: () => t.onRemove(c),
2059
2058
  className: "w-7 h-7 rounded-lg flex items-center justify-center text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 transition-all flex-shrink-0 opacity-60 sm:opacity-0 sm:group-hover:opacity-100",
2060
2059
  title: "Remove",
2061
- children: /* @__PURE__ */ e.jsx(Re, { className: "w-3.5 h-3.5" })
2060
+ children: /* @__PURE__ */ e.jsx(Pe, { className: "w-3.5 h-3.5" })
2062
2061
  }
2063
2062
  )
2064
- ] }, o))
2063
+ ] }, c))
2065
2064
  ] });
2066
2065
  }
2067
2066
  case "text":
@@ -2069,16 +2068,16 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2069
2068
  case "password":
2070
2069
  default:
2071
2070
  return /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
2072
- b && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(b, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
2071
+ p && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ e.jsx(p, { className: "w-4 h-4 sm:w-5 sm:h-5 text-slate-400" }) }),
2073
2072
  /* @__PURE__ */ e.jsx(
2074
2073
  "input",
2075
2074
  {
2076
2075
  type: t.type,
2077
2076
  value: t.displayValue ?? r ?? "",
2078
- onChange: (s) => n(t.name, s.target.value),
2077
+ onChange: (s) => a(t.name, s.target.value),
2079
2078
  placeholder: t.placeholder,
2080
2079
  disabled: t.disabled,
2081
- className: `${$} ${F} ${b ? "pl-12" : ""} placeholder-slate-400 disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-violet-500/20`
2080
+ className: `${_} ${I} ${p ? "pl-12" : ""} placeholder-slate-400 disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-violet-500/20`
2082
2081
  }
2083
2082
  )
2084
2083
  ] });
@@ -2089,109 +2088,109 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2089
2088
  /* @__PURE__ */ e.jsx("span", { children: t.label }),
2090
2089
  t.required && /* @__PURE__ */ e.jsx("span", { className: "text-red-500 dark:text-red-400", children: "*" })
2091
2090
  ] }) }),
2092
- /* @__PURE__ */ e.jsx("div", { className: "mt-2", children: P() }),
2093
- l && /* @__PURE__ */ e.jsxs("p", { className: "text-xs sm:text-sm text-red-600 dark:text-red-400 flex items-center gap-1.5 animate-in slide-in-from-top-1 duration-200", children: [
2094
- /* @__PURE__ */ e.jsx(he, { className: "w-3.5 h-3.5 flex-shrink-0" }),
2095
- /* @__PURE__ */ e.jsx("span", { children: l })
2091
+ /* @__PURE__ */ e.jsx("div", { className: "mt-2", children: W() }),
2092
+ i && /* @__PURE__ */ e.jsxs("p", { className: "text-xs sm:text-sm text-red-600 dark:text-red-400 flex items-center gap-1.5 animate-in slide-in-from-top-1 duration-200", children: [
2093
+ /* @__PURE__ */ e.jsx(ke, { className: "w-3.5 h-3.5 flex-shrink-0" }),
2094
+ /* @__PURE__ */ e.jsx("span", { children: i })
2096
2095
  ] }),
2097
- t.helpText && !l && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: t.helpText })
2096
+ t.helpText && !i && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: t.helpText })
2098
2097
  ] });
2099
- }, tt = ({
2098
+ }, lt = ({
2100
2099
  fields: t = [],
2101
2100
  initialData: r = {},
2102
- onSubmit: n,
2103
- onCancel: l,
2104
- onEdit: d,
2105
- onFieldChange: x,
2106
- submitButtonText: m = "Submit",
2107
- cancelButtonText: h = "Cancel",
2108
- editButtonText: f = "Edit",
2109
- showEditingBadge: k = !1,
2110
- editingEntity: _ = "",
2111
- helpText: y = "All fields marked with * are required",
2112
- isModal: E = !0,
2113
- mode: L = "edit",
2114
- disabled: C = !1,
2101
+ onSubmit: a,
2102
+ onCancel: i,
2103
+ onEdit: x,
2104
+ onFieldChange: b,
2105
+ submitButtonText: d = "Submit",
2106
+ cancelButtonText: u = "Cancel",
2107
+ editButtonText: v = "Edit",
2108
+ showEditingBadge: y = !1,
2109
+ editingEntity: w = "",
2110
+ helpText: z = "All fields marked with * are required",
2111
+ isModal: N = !0,
2112
+ mode: $ = "edit",
2113
+ disabled: P = !1,
2115
2114
  // ✅ Add disabled prop for loading states
2116
- renderCustomField: g
2115
+ renderCustomField: f
2117
2116
  }) => {
2118
- const N = K(!0), [c, z] = O(() => {
2119
- const i = {};
2120
- return (typeof t == "function" ? t(r) : t).forEach((S) => {
2121
- i[S.name] = r[S.name] || "";
2122
- }), i;
2123
- }), [I, V] = O({}), M = L === "view", Y = M ? !0 : !E;
2124
- J(() => {
2125
- if (N.current) {
2126
- N.current = !1;
2117
+ const m = ee(!0), [g, R] = T(() => {
2118
+ const h = {};
2119
+ return (typeof t == "function" ? t(r) : t).forEach((M) => {
2120
+ h[M.name] = r[M.name] || "";
2121
+ }), h;
2122
+ }), [L, Y] = T({}), D = $ === "view", X = D ? !0 : !N;
2123
+ Q(() => {
2124
+ if (m.current) {
2125
+ m.current = !1;
2127
2126
  return;
2128
2127
  }
2129
2128
  if (r && Object.keys(r).length > 0 && r.id) {
2130
- const v = {};
2131
- (typeof t == "function" ? t(c) : t).forEach((P) => {
2132
- v[P.name] = r[P.name] || "";
2133
- }), z(v);
2129
+ const k = {};
2130
+ (typeof t == "function" ? t(g) : t).forEach((W) => {
2131
+ k[W.name] = r[W.name] || "";
2132
+ }), R(k);
2134
2133
  }
2135
2134
  }, [r.id]);
2136
- const U = typeof t == "function" ? t(c) : t, B = (i, v) => {
2137
- if (M) return;
2138
- const S = { ...c, [i]: v };
2139
- z(S);
2140
- const P = { ...I };
2141
- delete P[i], U.forEach((A) => {
2142
- var b;
2143
- if ((b = A.validation) != null && b.custom && P[A.name]) {
2144
- const $ = A.name === i ? v : c[A.name];
2145
- A.validation.custom($, S) === !0 && delete P[A.name];
2135
+ const H = typeof t == "function" ? t(g) : t, U = (h, k) => {
2136
+ if (D) return;
2137
+ const M = { ...g, [h]: k };
2138
+ R(M);
2139
+ const W = { ...L };
2140
+ delete W[h], H.forEach((F) => {
2141
+ var p;
2142
+ if ((p = F.validation) != null && p.custom && W[F.name]) {
2143
+ const _ = F.name === h ? k : g[F.name];
2144
+ F.validation.custom(_, M) === !0 && delete W[F.name];
2146
2145
  }
2147
- }), V(P), x && x(i, v, S);
2148
- }, j = () => {
2149
- if (M) return !0;
2150
- const i = {};
2151
- return U.forEach((v) => {
2152
- const S = c[v.name], P = v.isHtml ? !(S || "").replace(/<[^>]*>/g, "").trim() : !S;
2153
- if (v.required && P) {
2154
- i[v.name] = `${v.label} is required`;
2146
+ }), Y(W), b && b(h, k, M);
2147
+ }, C = () => {
2148
+ if (D) return !0;
2149
+ const h = {};
2150
+ return H.forEach((k) => {
2151
+ const M = g[k.name], W = k.isHtml ? !(M || "").replace(/<[^>]*>/g, "").trim() : !M;
2152
+ if (k.required && W) {
2153
+ h[k.name] = `${k.label} is required`;
2155
2154
  return;
2156
2155
  }
2157
- if (v.validation && S) {
2158
- const { minLength: A, maxLength: b, pattern: $, custom: F } = v.validation, H = v.isHtml ? (S || "").replace(/<[^>]*>/g, "").trim() : S;
2159
- if (A && H.length < A) {
2160
- i[v.name] = `Minimum ${A} characters required`;
2156
+ if (k.validation && M) {
2157
+ const { minLength: F, maxLength: p, pattern: _, custom: I } = k.validation, G = k.isHtml ? (M || "").replace(/<[^>]*>/g, "").trim() : M;
2158
+ if (F && G.length < F) {
2159
+ h[k.name] = `Minimum ${F} characters required`;
2161
2160
  return;
2162
2161
  }
2163
- if (b && H.length > b) {
2164
- i[v.name] = `Maximum ${b} characters allowed`;
2162
+ if (p && G.length > p) {
2163
+ h[k.name] = `Maximum ${p} characters allowed`;
2165
2164
  return;
2166
2165
  }
2167
- if ($ && !$.test(S)) {
2168
- i[v.name] = v.validation.patternMessage || v.validation.message || "Invalid format";
2166
+ if (_ && !_.test(M)) {
2167
+ h[k.name] = k.validation.patternMessage || k.validation.message || "Invalid format";
2169
2168
  return;
2170
2169
  }
2171
- if (F) {
2172
- const G = F(S, c);
2173
- if (G !== !0) {
2174
- i[v.name] = typeof G == "string" ? G : v.validation.message || "Validation failed";
2170
+ if (I) {
2171
+ const J = I(M, g);
2172
+ if (J !== !0) {
2173
+ h[k.name] = typeof J == "string" ? J : k.validation.message || "Validation failed";
2175
2174
  return;
2176
2175
  }
2177
2176
  }
2178
2177
  }
2179
- }), V(i), Object.keys(i).length === 0;
2180
- }, W = (i) => {
2181
- i.preventDefault(), !M && j() && n(c);
2178
+ }), Y(h), Object.keys(h).length === 0;
2179
+ }, O = (h) => {
2180
+ h.preventDefault(), !D && C() && a(g);
2182
2181
  };
2183
- return /* @__PURE__ */ e.jsxs("form", { onSubmit: W, className: "flex flex-col h-full max-h-[75vh] sm:max-h-[70vh]", children: [
2182
+ return /* @__PURE__ */ e.jsxs("form", { onSubmit: O, className: "flex flex-col h-full max-h-[75vh] sm:max-h-[70vh]", children: [
2184
2183
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1 overflow-y-auto px-4 pt-4 sm:px-5 sm:pt-5", children: [
2185
- M && /* @__PURE__ */ e.jsxs("div", { className: `mb-4 flex items-center gap-3 p-3 sm:p-3.5 rounded-xl
2184
+ D && /* @__PURE__ */ e.jsxs("div", { className: `mb-4 flex items-center gap-3 p-3 sm:p-3.5 rounded-xl
2186
2185
  bg-blue-50 border border-blue-200
2187
2186
  dark:bg-blue-600/10 dark:border-blue-500/30`, children: [
2188
- /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0 p-1.5 rounded-lg bg-blue-600 dark:bg-blue-500", children: /* @__PURE__ */ e.jsx(re, { className: "w-3.5 h-3.5 text-white" }) }),
2187
+ /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0 p-1.5 rounded-lg bg-blue-600 dark:bg-blue-500", children: /* @__PURE__ */ e.jsx(oe, { className: "w-3.5 h-3.5 text-white" }) }),
2189
2188
  /* @__PURE__ */ e.jsxs("div", { className: "min-w-0", children: [
2190
2189
  /* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-slate-900 dark:text-white leading-tight", children: "View Mode" }),
2191
2190
  /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400 leading-snug", children: "Read-only — no changes will be saved" })
2192
2191
  ] })
2193
2192
  ] }),
2194
- !M && k && _ && /* @__PURE__ */ e.jsxs("div", { className: `mb-4 flex items-center gap-3 p-3 sm:p-3.5 rounded-xl
2193
+ !D && y && w && /* @__PURE__ */ e.jsxs("div", { className: `mb-4 flex items-center gap-3 p-3 sm:p-3.5 rounded-xl
2195
2194
  bg-violet-50 border border-violet-200
2196
2195
  dark:bg-violet-600/10 dark:border-violet-500/30`, children: [
2197
2196
  /* @__PURE__ */ e.jsx("span", { className: "flex-shrink-0 w-2 h-2 rounded-full bg-violet-500 animate-pulse" }),
@@ -2200,64 +2199,64 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2200
2199
  /* @__PURE__ */ e.jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-400 truncate", children: [
2201
2200
  "Modifying:",
2202
2201
  " ",
2203
- /* @__PURE__ */ e.jsx("span", { className: "font-semibold text-violet-600 dark:text-violet-400", children: _ })
2202
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold text-violet-600 dark:text-violet-400", children: w })
2204
2203
  ] })
2205
2204
  ] })
2206
2205
  ] }),
2207
- /* @__PURE__ */ e.jsx("div", { className: "space-y-4 pb-4", children: U.map((i, v) => {
2208
- const S = c[i.name], P = I[i.name];
2209
- if (g) {
2210
- const A = g({
2211
- field: i,
2212
- value: S,
2213
- error: P,
2214
- index: v,
2215
- mode: L,
2216
- disabled: M || i.disabled || C,
2217
- onChange: B
2206
+ /* @__PURE__ */ e.jsx("div", { className: "space-y-4 pb-4", children: H.map((h, k) => {
2207
+ const M = g[h.name], W = L[h.name];
2208
+ if (f) {
2209
+ const F = f({
2210
+ field: h,
2211
+ value: M,
2212
+ error: W,
2213
+ index: k,
2214
+ mode: $,
2215
+ disabled: D || h.disabled || P,
2216
+ onChange: U
2218
2217
  });
2219
- if (A) return /* @__PURE__ */ e.jsx("div", { children: A }, i.name || v);
2218
+ if (F) return /* @__PURE__ */ e.jsx("div", { children: F }, h.name || k);
2220
2219
  }
2221
2220
  return /* @__PURE__ */ e.jsx(
2222
- je,
2221
+ pe,
2223
2222
  {
2224
- field: { ...i, disabled: M || i.disabled || C },
2225
- value: S,
2226
- onChange: B,
2227
- error: P,
2228
- mode: L
2223
+ field: { ...h, disabled: D || h.disabled || P },
2224
+ value: M,
2225
+ onChange: U,
2226
+ error: W,
2227
+ mode: $
2229
2228
  },
2230
- i.name || v
2229
+ h.name || k
2231
2230
  );
2232
2231
  }) })
2233
2232
  ] }),
2234
2233
  /* @__PURE__ */ e.jsxs("div", { className: `flex-shrink-0 bg-white dark:bg-slate-800
2235
2234
  border-t border-slate-200 dark:border-slate-700
2236
2235
  px-4 py-3 sm:px-5 sm:py-4`, children: [
2237
- M ? /* @__PURE__ */ e.jsxs("div", { className: `flex ${E ? "flex-col-reverse sm:flex-row" : "flex-row"} gap-2.5`, children: [
2238
- Y && l && /* @__PURE__ */ e.jsxs(
2236
+ D ? /* @__PURE__ */ e.jsxs("div", { className: `flex ${N ? "flex-col-reverse sm:flex-row" : "flex-row"} gap-2.5`, children: [
2237
+ X && i && /* @__PURE__ */ e.jsxs(
2239
2238
  "button",
2240
2239
  {
2241
2240
  type: "button",
2242
- onClick: l,
2243
- className: `${E ? "flex-1 sm:flex-none" : "w-auto"}
2241
+ onClick: i,
2242
+ className: `${N ? "flex-1 sm:flex-none" : "w-auto"}
2244
2243
  flex items-center justify-center gap-2
2245
2244
  px-4 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200
2246
2245
  bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200
2247
2246
  dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300 dark:border-slate-600
2248
2247
  hover:scale-[1.02] active:scale-[0.98]`,
2249
2248
  children: [
2250
- /* @__PURE__ */ e.jsx(X, { className: "w-4 h-4" }),
2249
+ /* @__PURE__ */ e.jsx(Z, { className: "w-4 h-4" }),
2251
2250
  /* @__PURE__ */ e.jsx("span", { children: "Close" })
2252
2251
  ]
2253
2252
  }
2254
2253
  ),
2255
- d && /* @__PURE__ */ e.jsxs(
2254
+ x && /* @__PURE__ */ e.jsxs(
2256
2255
  "button",
2257
2256
  {
2258
2257
  type: "button",
2259
- onClick: d,
2260
- className: `${E ? "flex-1" : "w-auto"}
2258
+ onClick: x,
2259
+ className: `${N ? "flex-1" : "w-auto"}
2261
2260
  flex items-center justify-center gap-2
2262
2261
  px-4 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200
2263
2262
  bg-gradient-to-r from-violet-600 to-indigo-600
@@ -2265,21 +2264,21 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2265
2264
  text-white shadow-md hover:shadow-lg
2266
2265
  hover:scale-[1.02] active:scale-[0.98]`,
2267
2266
  children: [
2268
- /* @__PURE__ */ e.jsx(oe, { className: "w-4 h-4" }),
2269
- /* @__PURE__ */ e.jsx("span", { children: f })
2267
+ /* @__PURE__ */ e.jsx(ne, { className: "w-4 h-4" }),
2268
+ /* @__PURE__ */ e.jsx("span", { children: v })
2270
2269
  ]
2271
2270
  }
2272
2271
  )
2273
2272
  ] }) : (
2274
2273
  /* Edit mode actions */
2275
- /* @__PURE__ */ e.jsxs("div", { className: `flex ${E ? "flex-col-reverse sm:flex-row" : "flex-row justify-start"} gap-2.5`, children: [
2276
- l && /* @__PURE__ */ e.jsxs(
2274
+ /* @__PURE__ */ e.jsxs("div", { className: `flex ${N ? "flex-col-reverse sm:flex-row" : "flex-row justify-start"} gap-2.5`, children: [
2275
+ i && /* @__PURE__ */ e.jsxs(
2277
2276
  "button",
2278
2277
  {
2279
2278
  type: "button",
2280
- onClick: l,
2281
- disabled: C,
2282
- className: `${E ? "flex-1 sm:flex-none" : "w-auto"}
2279
+ onClick: i,
2280
+ disabled: P,
2281
+ className: `${N ? "flex-1 sm:flex-none" : "w-auto"}
2283
2282
  flex items-center justify-center gap-2
2284
2283
  px-4 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200
2285
2284
  bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200
@@ -2287,8 +2286,8 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2287
2286
  disabled:opacity-50 disabled:cursor-not-allowed
2288
2287
  hover:scale-[1.02] active:scale-[0.98]`,
2289
2288
  children: [
2290
- /* @__PURE__ */ e.jsx(X, { className: "w-4 h-4" }),
2291
- /* @__PURE__ */ e.jsx("span", { children: h })
2289
+ /* @__PURE__ */ e.jsx(Z, { className: "w-4 h-4" }),
2290
+ /* @__PURE__ */ e.jsx("span", { children: u })
2292
2291
  ]
2293
2292
  }
2294
2293
  ),
@@ -2296,8 +2295,8 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2296
2295
  "button",
2297
2296
  {
2298
2297
  type: "submit",
2299
- disabled: C,
2300
- className: `${E ? "flex-1" : "w-auto"}
2298
+ disabled: P,
2299
+ className: `${N ? "flex-1" : "w-auto"}
2301
2300
  flex items-center justify-center gap-2
2302
2301
  px-4 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200
2303
2302
  bg-gradient-to-r from-violet-600 to-indigo-600
@@ -2306,42 +2305,42 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2306
2305
  disabled:opacity-50 disabled:cursor-not-allowed
2307
2306
  hover:scale-[1.02] active:scale-[0.98] disabled:hover:scale-100`,
2308
2307
  children: [
2309
- C ? /* @__PURE__ */ e.jsx("span", { className: "w-4 h-4 rounded-full border-2 border-white/30 border-t-white animate-spin flex-shrink-0" }) : /* @__PURE__ */ e.jsx(re, { className: "w-4 h-4 flex-shrink-0" }),
2310
- /* @__PURE__ */ e.jsx("span", { children: C ? "Saving..." : m })
2308
+ P ? /* @__PURE__ */ e.jsx("span", { className: "w-4 h-4 rounded-full border-2 border-white/30 border-t-white animate-spin flex-shrink-0" }) : /* @__PURE__ */ e.jsx(oe, { className: "w-4 h-4 flex-shrink-0" }),
2309
+ /* @__PURE__ */ e.jsx("span", { children: P ? "Saving..." : d })
2311
2310
  ]
2312
2311
  }
2313
2312
  )
2314
2313
  ] })
2315
2314
  ),
2316
- !M && y && /* @__PURE__ */ e.jsx("p", { className: "mt-2.5 text-xs text-slate-400 dark:text-slate-500 text-center", children: y })
2315
+ !D && z && /* @__PURE__ */ e.jsx("p", { className: "mt-2.5 text-xs text-slate-400 dark:text-slate-500 text-center", children: z })
2317
2316
  ] })
2318
2317
  ] });
2319
- }, Fe = ({
2318
+ }, Ge = ({
2320
2319
  isOpen: t,
2321
2320
  onClose: r,
2322
- onSelect: n,
2323
- options: l = [],
2324
- selectedValue: d,
2325
- title: x = "Select Option",
2326
- subtitle: m = "Choose from the list below",
2327
- icon: h,
2328
- searchable: f = !0,
2329
- searchPlaceholder: k = "Search options..."
2321
+ onSelect: a,
2322
+ options: i = [],
2323
+ selectedValue: x,
2324
+ title: b = "Select Option",
2325
+ subtitle: d = "Choose from the list below",
2326
+ icon: u,
2327
+ searchable: v = !0,
2328
+ searchPlaceholder: y = "Search options..."
2330
2329
  }) => {
2331
- const [_, y] = O(""), E = K(null);
2332
- J(() => {
2333
- const g = (N) => {
2334
- N.key === "Escape" && r();
2330
+ const [w, z] = T(""), N = ee(null);
2331
+ Q(() => {
2332
+ const f = (m) => {
2333
+ m.key === "Escape" && r();
2335
2334
  };
2336
- return t && (document.addEventListener("keydown", g), f && E.current && setTimeout(() => {
2337
- var N;
2338
- return (N = E.current) == null ? void 0 : N.focus();
2339
- }, 100)), () => document.removeEventListener("keydown", g);
2340
- }, [t, r, f]);
2341
- const L = _ ? l.filter(
2342
- (g) => g.label.toLowerCase().includes(_.toLowerCase())
2343
- ) : l, C = (g) => {
2344
- n(g), r(), y("");
2335
+ return t && (document.addEventListener("keydown", f), v && N.current && setTimeout(() => {
2336
+ var m;
2337
+ return (m = N.current) == null ? void 0 : m.focus();
2338
+ }, 100)), () => document.removeEventListener("keydown", f);
2339
+ }, [t, r, v]);
2340
+ const $ = w ? i.filter(
2341
+ (f) => f.label.toLowerCase().includes(w.toLowerCase())
2342
+ ) : i, P = (f) => {
2343
+ a(f), r(), z("");
2345
2344
  };
2346
2345
  return t ? /* @__PURE__ */ e.jsxs("div", { className: "fixed inset-0 z-[60] flex items-center justify-center p-4 animate-in fade-in duration-200", children: [
2347
2346
  /* @__PURE__ */ e.jsx(
@@ -2355,10 +2354,10 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2355
2354
  /* @__PURE__ */ e.jsxs("div", { className: "flex-shrink-0 px-6 py-5 bg-gradient-to-r from-violet-50 via-indigo-50 to-violet-50 border-b border-slate-200 dark:bg-gradient-to-r dark:from-slate-700/50 dark:via-slate-800/50 dark:to-slate-700/50 dark:border-slate-700", children: [
2356
2355
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
2357
2356
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-3", children: [
2358
- h && /* @__PURE__ */ e.jsx("div", { className: "w-12 h-12 rounded-xl flex items-center justify-center bg-gradient-to-br from-violet-600 to-indigo-600 shadow-lg", children: /* @__PURE__ */ e.jsx(h, { className: "w-6 h-6 text-white" }) }),
2357
+ u && /* @__PURE__ */ e.jsx("div", { className: "w-12 h-12 rounded-xl flex items-center justify-center bg-gradient-to-br from-violet-600 to-indigo-600 shadow-lg", children: /* @__PURE__ */ e.jsx(u, { className: "w-6 h-6 text-white" }) }),
2359
2358
  /* @__PURE__ */ e.jsxs("div", { children: [
2360
- /* @__PURE__ */ e.jsx("h3", { className: "text-lg font-bold text-slate-900 dark:text-white", children: x }),
2361
- m && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400 mt-0.5", children: m })
2359
+ /* @__PURE__ */ e.jsx("h3", { className: "text-lg font-bold text-slate-900 dark:text-white", children: b }),
2360
+ d && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400 mt-0.5", children: d })
2362
2361
  ] })
2363
2362
  ] }),
2364
2363
  /* @__PURE__ */ e.jsx(
@@ -2366,20 +2365,20 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2366
2365
  {
2367
2366
  onClick: r,
2368
2367
  className: "p-2 rounded-lg border transition-all duration-200 text-slate-400 hover:bg-slate-100 hover:text-slate-900 border-slate-300 hover:border-slate-400 dark:border-slate-600 dark:hover:bg-slate-700 dark:hover:text-white dark:hover:border-slate-500",
2369
- children: /* @__PURE__ */ e.jsx(X, { className: "w-5 h-5" })
2368
+ children: /* @__PURE__ */ e.jsx(Z, { className: "w-5 h-5" })
2370
2369
  }
2371
2370
  )
2372
2371
  ] }),
2373
- f && /* @__PURE__ */ e.jsxs("div", { className: "mt-4 relative", children: [
2374
- /* @__PURE__ */ e.jsx(le, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400 dark:text-slate-500" }),
2372
+ v && /* @__PURE__ */ e.jsxs("div", { className: "mt-4 relative", children: [
2373
+ /* @__PURE__ */ e.jsx(ie, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400 dark:text-slate-500" }),
2375
2374
  /* @__PURE__ */ e.jsx(
2376
2375
  "input",
2377
2376
  {
2378
- ref: E,
2377
+ ref: N,
2379
2378
  type: "text",
2380
- value: _,
2381
- onChange: (g) => y(g.target.value),
2382
- placeholder: k,
2379
+ value: w,
2380
+ onChange: (f) => z(f.target.value),
2381
+ placeholder: y,
2383
2382
  className: `w-full pl-11 pr-4 py-3 rounded-xl border transition-all duration-200
2384
2383
  bg-white border-slate-200 text-slate-900 placeholder-slate-400
2385
2384
  focus:border-violet-400 focus:bg-slate-50
@@ -2390,185 +2389,185 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2390
2389
  )
2391
2390
  ] })
2392
2391
  ] }),
2393
- /* @__PURE__ */ e.jsx("div", { className: "flex-grow overflow-y-auto custom-scrollbar", children: L.length > 0 ? /* @__PURE__ */ e.jsx("div", { className: "p-3 space-y-1", children: L.map((g) => {
2394
- const N = g.value === d;
2392
+ /* @__PURE__ */ e.jsx("div", { className: "flex-grow overflow-y-auto custom-scrollbar", children: $.length > 0 ? /* @__PURE__ */ e.jsx("div", { className: "p-3 space-y-1", children: $.map((f) => {
2393
+ const m = f.value === x;
2395
2394
  return /* @__PURE__ */ e.jsxs(
2396
2395
  "button",
2397
2396
  {
2398
2397
  type: "button",
2399
- onClick: () => C(g.value),
2398
+ onClick: () => P(f.value),
2400
2399
  className: `w-full px-4 py-3.5 rounded-xl text-left flex items-center justify-between transition-all duration-200 group
2401
- ${N ? "bg-gradient-to-r from-violet-600 to-indigo-600 text-white shadow-lg shadow-violet-500/30 dark:shadow-violet-900/30" : "text-slate-700 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-700/50"}`,
2400
+ ${m ? "bg-gradient-to-r from-violet-600 to-indigo-600 text-white shadow-lg shadow-violet-500/30 dark:shadow-violet-900/30" : "text-slate-700 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-700/50"}`,
2402
2401
  children: [
2403
- /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: g.label }),
2404
- N && /* @__PURE__ */ e.jsx("div", { className: "w-6 h-6 rounded-full bg-white/20 flex items-center justify-center", children: /* @__PURE__ */ e.jsx(re, { className: "w-4 h-4 text-white" }) })
2402
+ /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: f.label }),
2403
+ m && /* @__PURE__ */ e.jsx("div", { className: "w-6 h-6 rounded-full bg-white/20 flex items-center justify-center", children: /* @__PURE__ */ e.jsx(oe, { className: "w-4 h-4 text-white" }) })
2405
2404
  ]
2406
2405
  },
2407
- g.value
2406
+ f.value
2408
2407
  );
2409
2408
  }) }) : /* @__PURE__ */ e.jsxs("div", { className: "px-4 py-12 text-center", children: [
2410
- /* @__PURE__ */ e.jsx("div", { className: "w-16 h-16 mx-auto mb-4 rounded-full bg-slate-100 dark:bg-slate-700/50 flex items-center justify-center", children: /* @__PURE__ */ e.jsx(le, { className: "w-8 h-8 text-slate-400 dark:text-slate-500" }) }),
2409
+ /* @__PURE__ */ e.jsx("div", { className: "w-16 h-16 mx-auto mb-4 rounded-full bg-slate-100 dark:bg-slate-700/50 flex items-center justify-center", children: /* @__PURE__ */ e.jsx(ie, { className: "w-8 h-8 text-slate-400 dark:text-slate-500" }) }),
2411
2410
  /* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-slate-600 dark:text-slate-400", children: "No options found" }),
2412
2411
  /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-500 mt-1", children: "Try adjusting your search terms" })
2413
2412
  ] }) }),
2414
2413
  /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0 px-6 py-3 border-t border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-800/50", children: /* @__PURE__ */ e.jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-400 text-center", children: [
2415
- L.length,
2414
+ $.length,
2416
2415
  " option",
2417
- L.length !== 1 ? "s" : "",
2416
+ $.length !== 1 ? "s" : "",
2418
2417
  " available"
2419
2418
  ] }) })
2420
2419
  ] }) })
2421
2420
  ] }) : null;
2422
- }, st = ({
2421
+ }, nt = ({
2423
2422
  value: t,
2424
2423
  onChange: r,
2425
- options: n = [],
2426
- placeholder: l = "Select an option",
2427
- label: d,
2428
- icon: x,
2429
- required: m = !1,
2430
- disabled: h = !1,
2431
- error: f,
2432
- searchable: k = !0,
2433
- name: _,
2434
- modalTitle: y,
2435
- modalSubtitle: E
2424
+ options: a = [],
2425
+ placeholder: i = "Select an option",
2426
+ label: x,
2427
+ icon: b,
2428
+ required: d = !1,
2429
+ disabled: u = !1,
2430
+ error: v,
2431
+ searchable: y = !0,
2432
+ name: w,
2433
+ modalTitle: z,
2434
+ modalSubtitle: N
2436
2435
  }) => {
2437
- const [L, C] = O(!1), g = n.find((z) => z.value === t), N = (g == null ? void 0 : g.label) || l, c = (z) => {
2438
- r(_, z);
2436
+ const [$, P] = T(!1), f = a.find((R) => R.value === t), m = (f == null ? void 0 : f.label) || i, g = (R) => {
2437
+ r(w, R);
2439
2438
  };
2440
2439
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2441
2440
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
2442
- d && /* @__PURE__ */ e.jsxs("label", { className: "flex items-center text-sm font-semibold text-slate-700 dark:text-slate-300", children: [
2443
- x && /* @__PURE__ */ e.jsx(x, { className: "w-4 h-4 mr-2 text-violet-600 dark:text-violet-400" }),
2444
- d,
2445
- m && /* @__PURE__ */ e.jsx("span", { className: "text-red-500 ml-1", children: "*" })
2441
+ x && /* @__PURE__ */ e.jsxs("label", { className: "flex items-center text-sm font-semibold text-slate-700 dark:text-slate-300", children: [
2442
+ b && /* @__PURE__ */ e.jsx(b, { className: "w-4 h-4 mr-2 text-violet-600 dark:text-violet-400" }),
2443
+ x,
2444
+ d && /* @__PURE__ */ e.jsx("span", { className: "text-red-500 ml-1", children: "*" })
2446
2445
  ] }),
2447
2446
  /* @__PURE__ */ e.jsxs(
2448
2447
  "button",
2449
2448
  {
2450
2449
  type: "button",
2451
- onClick: () => !h && C(!0),
2452
- disabled: h,
2450
+ onClick: () => !u && P(!0),
2451
+ disabled: u,
2453
2452
  className: `w-full px-4 py-3 rounded-xl border transition-all duration-200 flex items-center justify-between text-left
2454
- ${f ? "border-red-500 focus:border-red-500 focus:ring-red-500/20" : "border-slate-200 focus:border-violet-400 dark:border-slate-600 dark:focus:border-violet-500"}
2455
- ${h ? "opacity-50 cursor-not-allowed bg-slate-100 dark:bg-slate-800" : "bg-slate-50 hover:bg-white dark:bg-slate-700/50 dark:hover:bg-slate-700 cursor-pointer"}
2453
+ ${v ? "border-red-500 focus:border-red-500 focus:ring-red-500/20" : "border-slate-200 focus:border-violet-400 dark:border-slate-600 dark:focus:border-violet-500"}
2454
+ ${u ? "opacity-50 cursor-not-allowed bg-slate-100 dark:bg-slate-800" : "bg-slate-50 hover:bg-white dark:bg-slate-700/50 dark:hover:bg-slate-700 cursor-pointer"}
2456
2455
  text-slate-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-violet-500/20`,
2457
2456
  children: [
2458
2457
  /* @__PURE__ */ e.jsx(
2459
2458
  "span",
2460
2459
  {
2461
2460
  className: `text-sm ${t ? "" : "text-slate-400 dark:text-slate-500"}`,
2462
- children: N
2461
+ children: m
2463
2462
  }
2464
2463
  ),
2465
2464
  /* @__PURE__ */ e.jsx(se, { className: "w-5 h-5 text-slate-400 dark:text-slate-500" })
2466
2465
  ]
2467
2466
  }
2468
2467
  ),
2469
- !f && t && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2 mt-2", children: [
2470
- /* @__PURE__ */ e.jsx("div", { className: "w-5 h-5 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center", children: /* @__PURE__ */ e.jsx(re, { className: "w-3 h-3 text-green-600 dark:text-green-400" }) }),
2468
+ !v && t && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2 mt-2", children: [
2469
+ /* @__PURE__ */ e.jsx("div", { className: "w-5 h-5 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center", children: /* @__PURE__ */ e.jsx(oe, { className: "w-3 h-3 text-green-600 dark:text-green-400" }) }),
2471
2470
  /* @__PURE__ */ e.jsx("span", { className: "text-xs text-green-600 dark:text-green-400 font-medium", children: "Selected" })
2472
2471
  ] }),
2473
- f && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-red-500 flex items-center space-x-1 mt-1", children: /* @__PURE__ */ e.jsx("span", { children: f }) })
2472
+ v && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-red-500 flex items-center space-x-1 mt-1", children: /* @__PURE__ */ e.jsx("span", { children: v }) })
2474
2473
  ] }),
2475
2474
  /* @__PURE__ */ e.jsx(
2476
- Fe,
2475
+ Ge,
2477
2476
  {
2478
- isOpen: L,
2479
- onClose: () => C(!1),
2480
- onSelect: c,
2481
- options: n,
2477
+ isOpen: $,
2478
+ onClose: () => P(!1),
2479
+ onSelect: g,
2480
+ options: a,
2482
2481
  selectedValue: t,
2483
- title: y || d || "Select Option",
2484
- subtitle: E || `Choose from ${n.length} options`,
2485
- icon: x,
2486
- searchable: k
2482
+ title: z || x || "Select Option",
2483
+ subtitle: N || `Choose from ${a.length} options`,
2484
+ icon: b,
2485
+ searchable: y
2487
2486
  }
2488
2487
  )
2489
2488
  ] });
2490
- }, at = ({
2489
+ }, ot = ({
2491
2490
  steps: t = [],
2492
2491
  initialData: r = {},
2493
- onSubmit: n,
2494
- onCancel: l,
2495
- onEdit: d,
2496
- onStepChange: x,
2497
- submitButtonText: m = "Submit",
2498
- cancelButtonText: h = "Cancel",
2499
- editButtonText: f = "Edit Record",
2500
- showEditingBadge: k = !1,
2501
- editingEntity: _ = "",
2502
- helpText: y = "All fields marked with * are required",
2503
- isModal: E = !0,
2504
- mode: L = "create"
2492
+ onSubmit: a,
2493
+ onCancel: i,
2494
+ onEdit: x,
2495
+ onStepChange: b,
2496
+ submitButtonText: d = "Submit",
2497
+ cancelButtonText: u = "Cancel",
2498
+ editButtonText: v = "Edit Record",
2499
+ showEditingBadge: y = !1,
2500
+ editingEntity: w = "",
2501
+ helpText: z = "All fields marked with * are required",
2502
+ isModal: N = !0,
2503
+ mode: $ = "create"
2505
2504
  }) => {
2506
2505
  var s;
2507
- const C = K(null), [g, N] = O(0), [c, z] = O(
2506
+ const P = ee(null), [f, m] = T(0), [g, R] = T(
2508
2507
  () => typeof window < "u" ? window.innerWidth >= 1024 : !0
2509
- ), [I, V] = O(() => {
2510
- const a = typeof t == "function" ? t(r) : t, o = {};
2511
- return a.forEach((p) => {
2512
- p.fields && p.fields.forEach((w) => {
2513
- o[w.name] = r[w.name] || "";
2508
+ ), [L, Y] = T(() => {
2509
+ const n = typeof t == "function" ? t(r) : t, c = {};
2510
+ return n.forEach((j) => {
2511
+ j.fields && j.fields.forEach((E) => {
2512
+ c[E.name] = r[E.name] || "";
2514
2513
  });
2515
- }), o;
2516
- }), [M, Y] = O({}), [U, B] = O(/* @__PURE__ */ new Set([0])), j = L === "view", W = L === "edit", i = typeof t == "function" ? t(I) : t;
2517
- J(() => {
2518
- x && x(g, I);
2519
- }, [g, I, x]);
2520
- const v = () => {
2521
- var a;
2522
- (a = C.current) == null || a.scrollTo({ top: 0, behavior: "smooth" });
2523
- }, S = (a, o) => {
2524
- if (j) return;
2525
- const w = i.flatMap((D) => D.fields || []).find((D) => D.name === a);
2526
- V((D) => {
2527
- const R = { ...D, [a]: o };
2528
- return w != null && w.resetFieldsOnChange && w.resetFieldsOnChange.forEach((q) => {
2529
- R[q] = "";
2530
- }), R;
2531
- }), M[a] && Y((D) => ({ ...D, [a]: "" })), w != null && w.onChange && w.onChange(a, o);
2532
- }, P = (a) => {
2533
- if (j) return !0;
2534
- const o = {}, p = i[a];
2535
- if (p.customValidator) {
2536
- const w = p.customValidator(a, I);
2537
- Object.assign(o, w);
2514
+ }), c;
2515
+ }), [D, X] = T({}), [H, U] = T(/* @__PURE__ */ new Set([0])), C = $ === "view", O = $ === "edit", h = typeof t == "function" ? t(L) : t;
2516
+ Q(() => {
2517
+ b && b(f, L);
2518
+ }, [f, L, b]);
2519
+ const k = () => {
2520
+ var n;
2521
+ (n = P.current) == null || n.scrollTo({ top: 0, behavior: "smooth" });
2522
+ }, M = (n, c) => {
2523
+ if (C) return;
2524
+ const E = h.flatMap((B) => B.fields || []).find((B) => B.name === n);
2525
+ Y((B) => {
2526
+ const o = { ...B, [n]: c };
2527
+ return E != null && E.resetFieldsOnChange && E.resetFieldsOnChange.forEach((S) => {
2528
+ o[S] = "";
2529
+ }), o;
2530
+ }), D[n] && X((B) => ({ ...B, [n]: "" })), E != null && E.onChange && E.onChange(n, c);
2531
+ }, W = (n) => {
2532
+ if (C) return !0;
2533
+ const c = {}, j = h[n];
2534
+ if (j.customValidator) {
2535
+ const E = j.customValidator(n, L);
2536
+ Object.assign(c, E);
2538
2537
  }
2539
- return p.fields && p.fields.length > 0 && p.fields.forEach((w) => {
2540
- const D = I[w.name];
2541
- if (w.required && !D) {
2542
- o[w.name] = `${w.label} is required`;
2538
+ return j.fields && j.fields.length > 0 && j.fields.forEach((E) => {
2539
+ const B = L[E.name];
2540
+ if (E.required && !B) {
2541
+ c[E.name] = `${E.label} is required`;
2543
2542
  return;
2544
2543
  }
2545
- if (D && w.validation) {
2546
- const { minLength: R, maxLength: q, pattern: u, min: Q, max: Z, custom: me } = w.validation;
2547
- R && D.length < R && (o[w.name] = `Minimum ${R} characters required`), q && D.length > q && (o[w.name] = `Maximum ${q} characters allowed`), u && !u.test(D) && (o[w.name] = w.validation.message || "Invalid format"), Q !== void 0 && parseFloat(D) < Q && (o[w.name] = w.validation.message || `Minimum value is ${Q}`), Z !== void 0 && parseFloat(D) > Z && (o[w.name] = w.validation.message || `Maximum value is ${Z}`), me && !me(D) && (o[w.name] = w.validation.message || "Validation failed");
2544
+ if (B && E.validation) {
2545
+ const { minLength: o, maxLength: S, pattern: l, min: A, max: q, custom: te } = E.validation;
2546
+ o && B.length < o && (c[E.name] = `Minimum ${o} characters required`), S && B.length > S && (c[E.name] = `Maximum ${S} characters allowed`), l && !l.test(B) && (c[E.name] = E.validation.message || "Invalid format"), A !== void 0 && parseFloat(B) < A && (c[E.name] = E.validation.message || `Minimum value is ${A}`), q !== void 0 && parseFloat(B) > q && (c[E.name] = E.validation.message || `Maximum value is ${q}`), te && !te(B) && (c[E.name] = E.validation.message || "Validation failed");
2548
2547
  }
2549
- }), Y(o), Object.keys(o).length === 0;
2550
- }, A = (a) => {
2551
- if (a.preventDefault(), a.stopPropagation(), P(g)) {
2552
- const o = g + 1;
2553
- N(o), B((p) => /* @__PURE__ */ new Set([...p, o])), v();
2548
+ }), X(c), Object.keys(c).length === 0;
2549
+ }, F = (n) => {
2550
+ if (n.preventDefault(), n.stopPropagation(), W(f)) {
2551
+ const c = f + 1;
2552
+ m(c), U((j) => /* @__PURE__ */ new Set([...j, c])), k();
2554
2553
  }
2555
- }, b = (a) => {
2556
- a.preventDefault(), a.stopPropagation(), N((o) => o - 1), v();
2557
- }, $ = (a) => {
2558
- if (typeof window < "u" && window.innerWidth < 1024 && z(!1), j) {
2559
- N(a), B((o) => /* @__PURE__ */ new Set([...o, a])), v();
2554
+ }, p = (n) => {
2555
+ n.preventDefault(), n.stopPropagation(), m((c) => c - 1), k();
2556
+ }, _ = (n) => {
2557
+ if (typeof window < "u" && window.innerWidth < 1024 && R(!1), C) {
2558
+ m(n), U((c) => /* @__PURE__ */ new Set([...c, n])), k();
2560
2559
  return;
2561
2560
  }
2562
- (U.has(a) || a === g + 1) && (a > g ? P(g) && (N(a), B((o) => /* @__PURE__ */ new Set([...o, a])), v()) : (N(a), v()));
2563
- }, F = (a) => {
2564
- a.preventDefault(), !j && P(g) && n(I);
2565
- }, H = g === i.length - 1, G = g === 0;
2566
- return /* @__PURE__ */ e.jsxs("form", { onSubmit: F, className: "flex h-full overflow-hidden relative", children: [
2567
- c && /* @__PURE__ */ e.jsx(
2561
+ (H.has(n) || n === f + 1) && (n > f ? W(f) && (m(n), U((c) => /* @__PURE__ */ new Set([...c, n])), k()) : (m(n), k()));
2562
+ }, I = (n) => {
2563
+ n.preventDefault(), !C && W(f) && a(L);
2564
+ }, G = f === h.length - 1, J = f === 0;
2565
+ return /* @__PURE__ */ e.jsxs("form", { onSubmit: I, className: "flex h-full overflow-hidden relative", children: [
2566
+ g && /* @__PURE__ */ e.jsx(
2568
2567
  "div",
2569
2568
  {
2570
2569
  className: "lg:hidden absolute inset-0 z-20 bg-black/40 backdrop-blur-[1px]",
2571
- onClick: () => z(!1)
2570
+ onClick: () => R(!1)
2572
2571
  }
2573
2572
  ),
2574
2573
  /* @__PURE__ */ e.jsxs("div", { className: `
@@ -2576,45 +2575,45 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2576
2575
  border-r border-slate-200 dark:border-slate-700
2577
2576
  absolute z-30 h-full bg-white dark:bg-slate-800
2578
2577
  lg:relative lg:flex-shrink-0 lg:z-auto lg:h-auto lg:bg-transparent dark:lg:bg-transparent
2579
- ${c ? "w-52 lg:w-56" : "w-0 lg:w-10"}
2578
+ ${g ? "w-52 lg:w-56" : "w-0 lg:w-10"}
2580
2579
  `, children: [
2581
- !c && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col h-full items-center justify-between py-4 px-2 gap-3", children: [
2582
- /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center gap-2 flex-1 justify-center", children: i.map((a, o) => {
2583
- const p = o === g, w = o < g;
2580
+ !g && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col h-full items-center justify-between py-4 px-2 gap-3", children: [
2581
+ /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center gap-2 flex-1 justify-center", children: h.map((n, c) => {
2582
+ const j = c === f, E = c < f;
2584
2583
  return /* @__PURE__ */ e.jsx(
2585
2584
  "button",
2586
2585
  {
2587
2586
  type: "button",
2588
- onClick: () => $(o),
2589
- title: i[o].title,
2587
+ onClick: () => _(c),
2588
+ title: h[c].title,
2590
2589
  className: `
2591
2590
  rounded-full transition-all duration-300 flex-shrink-0
2592
- ${w ? "w-2 h-2 bg-emerald-500 shadow-sm" : p ? j ? "w-2.5 h-2.5 bg-blue-500 shadow-md ring-2 ring-blue-300/40 dark:ring-blue-600/40" : "w-2.5 h-2.5 bg-violet-500 shadow-md ring-2 ring-violet-300/40 dark:ring-violet-600/40" : "w-2 h-2 bg-slate-300 dark:bg-slate-600 hover:bg-slate-400"}
2591
+ ${E ? "w-2 h-2 bg-emerald-500 shadow-sm" : j ? C ? "w-2.5 h-2.5 bg-blue-500 shadow-md ring-2 ring-blue-300/40 dark:ring-blue-600/40" : "w-2.5 h-2.5 bg-violet-500 shadow-md ring-2 ring-violet-300/40 dark:ring-violet-600/40" : "w-2 h-2 bg-slate-300 dark:bg-slate-600 hover:bg-slate-400"}
2593
2592
  `
2594
2593
  },
2595
- o
2594
+ c
2596
2595
  );
2597
2596
  }) }),
2598
2597
  /* @__PURE__ */ e.jsx("div", { className: "w-1 h-16 bg-slate-200/60 dark:bg-slate-700/60 rounded-full overflow-hidden", children: /* @__PURE__ */ e.jsx(
2599
2598
  "div",
2600
2599
  {
2601
- className: `w-full rounded-full transition-all duration-500 ${j ? "bg-blue-500" : "bg-gradient-to-b from-violet-500 to-indigo-500"}`,
2602
- style: { height: `${(g + 1) / i.length * 100}%` }
2600
+ className: `w-full rounded-full transition-all duration-500 ${C ? "bg-blue-500" : "bg-gradient-to-b from-violet-500 to-indigo-500"}`,
2601
+ style: { height: `${(f + 1) / h.length * 100}%` }
2603
2602
  }
2604
2603
  ) })
2605
2604
  ] }),
2606
- c && /* @__PURE__ */ e.jsxs("div", { className: "h-full flex flex-col px-3 sm:px-4 pt-4 pb-4 overflow-y-auto", children: [
2607
- /* @__PURE__ */ e.jsx("div", { className: "flex-1 space-y-1.5 mb-4", children: i.map((a, o) => {
2608
- const p = o === g, w = (j || U.has(o)) && o < g, D = j ? !0 : U.has(o) || o === g + 1, R = a.icon;
2605
+ g && /* @__PURE__ */ e.jsxs("div", { className: "h-full flex flex-col px-3 sm:px-4 pt-4 pb-4 overflow-y-auto", children: [
2606
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 space-y-1.5 mb-4", children: h.map((n, c) => {
2607
+ const j = c === f, E = (C || H.has(c)) && c < f, B = C ? !0 : H.has(c) || c === f + 1, o = n.icon;
2609
2608
  return /* @__PURE__ */ e.jsx(
2610
2609
  "button",
2611
2610
  {
2612
2611
  type: "button",
2613
- onClick: () => D && $(o),
2614
- disabled: !D,
2612
+ onClick: () => B && _(c),
2613
+ disabled: !B,
2615
2614
  className: `
2616
2615
  w-full p-3 rounded-xl transition-all duration-200 text-left
2617
- ${p ? j ? "bg-gradient-to-r from-blue-600 to-cyan-600 text-white shadow-md scale-[1.01]" : "bg-gradient-to-r from-violet-600 to-indigo-600 text-white shadow-md scale-[1.01]" : w ? "bg-white dark:bg-slate-800/50 border border-emerald-200 dark:border-emerald-500/30 hover:shadow-sm" : D ? "bg-white dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700 hover:shadow-sm" : "bg-slate-100 dark:bg-slate-800/30 border border-slate-200 dark:border-slate-700 opacity-50 cursor-not-allowed"}
2616
+ ${j ? C ? "bg-gradient-to-r from-blue-600 to-cyan-600 text-white shadow-md scale-[1.01]" : "bg-gradient-to-r from-violet-600 to-indigo-600 text-white shadow-md scale-[1.01]" : E ? "bg-white dark:bg-slate-800/50 border border-emerald-200 dark:border-emerald-500/30 hover:shadow-sm" : B ? "bg-white dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700 hover:shadow-sm" : "bg-slate-100 dark:bg-slate-800/30 border border-slate-200 dark:border-slate-700 opacity-50 cursor-not-allowed"}
2618
2617
  `,
2619
2618
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2.5", children: [
2620
2619
  /* @__PURE__ */ e.jsx(
@@ -2622,35 +2621,35 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2622
2621
  {
2623
2622
  className: `
2624
2623
  w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0 transition-all
2625
- ${p ? "bg-white/20" : w ? "bg-emerald-100 dark:bg-emerald-500/20" : "bg-slate-100 dark:bg-slate-700"}
2624
+ ${j ? "bg-white/20" : E ? "bg-emerald-100 dark:bg-emerald-500/20" : "bg-slate-100 dark:bg-slate-700"}
2626
2625
  `,
2627
- children: w && !p ? /* @__PURE__ */ e.jsx(ze, { className: "w-4 h-4 text-emerald-600 dark:text-emerald-400" }) : /* @__PURE__ */ e.jsx(
2628
- R,
2626
+ children: E && !j ? /* @__PURE__ */ e.jsx(Fe, { className: "w-4 h-4 text-emerald-600 dark:text-emerald-400" }) : /* @__PURE__ */ e.jsx(
2627
+ o,
2629
2628
  {
2630
- className: `w-4 h-4 ${p ? "text-white" : D ? j ? "text-blue-600 dark:text-blue-400" : "text-violet-600 dark:text-violet-400" : "text-slate-400 dark:text-slate-500"}`
2629
+ className: `w-4 h-4 ${j ? "text-white" : B ? C ? "text-blue-600 dark:text-blue-400" : "text-violet-600 dark:text-violet-400" : "text-slate-400 dark:text-slate-500"}`
2631
2630
  }
2632
2631
  )
2633
2632
  }
2634
2633
  ),
2635
2634
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
2636
2635
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1.5 mb-0.5", children: [
2637
- /* @__PURE__ */ e.jsxs("span", { className: `text-[10px] font-semibold uppercase tracking-wider ${p ? "text-white/70" : "text-slate-400 dark:text-slate-500"}`, children: [
2638
- j ? "§" : "#",
2639
- o + 1
2636
+ /* @__PURE__ */ e.jsxs("span", { className: `text-[10px] font-semibold uppercase tracking-wider ${j ? "text-white/70" : "text-slate-400 dark:text-slate-500"}`, children: [
2637
+ C ? "§" : "#",
2638
+ c + 1
2640
2639
  ] }),
2641
- w && !p && !j && /* @__PURE__ */ e.jsx("span", { className: "inline-flex items-center px-1.5 py-0.5 rounded-full text-[10px] font-semibold bg-emerald-100 text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-400", children: "✓" })
2640
+ E && !j && !C && /* @__PURE__ */ e.jsx("span", { className: "inline-flex items-center px-1.5 py-0.5 rounded-full text-[10px] font-semibold bg-emerald-100 text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-400", children: "✓" })
2642
2641
  ] }),
2643
- /* @__PURE__ */ e.jsx("p", { className: `text-xs font-semibold truncate leading-tight ${p ? "text-white" : w ? "text-slate-900 dark:text-white" : D ? "text-slate-700 dark:text-slate-300" : "text-slate-400 dark:text-slate-500"}`, children: a.title }),
2644
- a.subtitle && /* @__PURE__ */ e.jsx("p", { className: `text-[10px] mt-0.5 line-clamp-1 leading-snug ${p ? "text-white/75" : "text-slate-400 dark:text-slate-500"}`, children: a.subtitle })
2642
+ /* @__PURE__ */ e.jsx("p", { className: `text-xs font-semibold truncate leading-tight ${j ? "text-white" : E ? "text-slate-900 dark:text-white" : B ? "text-slate-700 dark:text-slate-300" : "text-slate-400 dark:text-slate-500"}`, children: n.title }),
2643
+ n.subtitle && /* @__PURE__ */ e.jsx("p", { className: `text-[10px] mt-0.5 line-clamp-1 leading-snug ${j ? "text-white/75" : "text-slate-400 dark:text-slate-500"}`, children: n.subtitle })
2645
2644
  ] })
2646
2645
  ] })
2647
2646
  },
2648
- o
2647
+ c
2649
2648
  );
2650
2649
  }) }),
2651
- !j && y && /* @__PURE__ */ e.jsx("div", { className: "p-3 rounded-xl bg-blue-50 border border-blue-200 dark:bg-blue-900/20 dark:border-blue-800/30 flex-shrink-0", children: /* @__PURE__ */ e.jsxs("p", { className: "text-[11px] text-slate-600 dark:text-slate-400 leading-relaxed", children: [
2650
+ !C && z && /* @__PURE__ */ e.jsx("div", { className: "p-3 rounded-xl bg-blue-50 border border-blue-200 dark:bg-blue-900/20 dark:border-blue-800/30 flex-shrink-0", children: /* @__PURE__ */ e.jsxs("p", { className: "text-[11px] text-slate-600 dark:text-slate-400 leading-relaxed", children: [
2652
2651
  /* @__PURE__ */ e.jsx("span", { className: "font-semibold text-blue-600 dark:text-blue-400", children: "Tip: " }),
2653
- y
2652
+ z
2654
2653
  ] }) })
2655
2654
  ] })
2656
2655
  ] }),
@@ -2662,31 +2661,31 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2662
2661
  "button",
2663
2662
  {
2664
2663
  type: "button",
2665
- onClick: () => z(!c),
2664
+ onClick: () => R(!g),
2666
2665
  className: `p-2.5 rounded-lg border border-slate-200 dark:border-slate-600
2667
2666
  bg-white dark:bg-slate-700 text-slate-500 dark:text-slate-400
2668
2667
  hover:bg-violet-50 hover:border-violet-300 hover:text-violet-600
2669
2668
  dark:hover:bg-violet-900/30 dark:hover:border-violet-600 dark:hover:text-violet-400
2670
2669
  transition-all duration-200 active:scale-95`,
2671
2670
  "aria-label": "Toggle steps",
2672
- children: c ? /* @__PURE__ */ e.jsx(ie, { className: "w-4 h-4" }) : /* @__PURE__ */ e.jsx(se, { className: "w-4 h-4" })
2671
+ children: g ? /* @__PURE__ */ e.jsx(ce, { className: "w-4 h-4" }) : /* @__PURE__ */ e.jsx(se, { className: "w-4 h-4" })
2673
2672
  }
2674
2673
  ),
2675
2674
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
2676
- /* @__PURE__ */ e.jsx("p", { className: "text-xs font-semibold text-slate-700 dark:text-slate-300 truncate", children: i[g].title }),
2677
- /* @__PURE__ */ e.jsxs("p", { className: `text-[10px] font-medium ${j ? "text-blue-500" : "text-violet-500"}`, children: [
2678
- j ? "Section" : "Step",
2675
+ /* @__PURE__ */ e.jsx("p", { className: "text-xs font-semibold text-slate-700 dark:text-slate-300 truncate", children: h[f].title }),
2676
+ /* @__PURE__ */ e.jsxs("p", { className: `text-[10px] font-medium ${C ? "text-blue-500" : "text-violet-500"}`, children: [
2677
+ C ? "Section" : "Step",
2679
2678
  " ",
2680
- g + 1,
2679
+ f + 1,
2681
2680
  "/",
2682
- i.length
2681
+ h.length
2683
2682
  ] })
2684
2683
  ] }),
2685
2684
  /* @__PURE__ */ e.jsx("div", { className: "w-16 h-1.5 bg-slate-200 dark:bg-slate-700 rounded-full overflow-hidden flex-shrink-0", children: /* @__PURE__ */ e.jsx(
2686
2685
  "div",
2687
2686
  {
2688
- className: `h-1.5 rounded-full transition-all duration-300 ${j ? "bg-blue-500" : "bg-gradient-to-r from-violet-500 to-indigo-500"}`,
2689
- style: { width: `${(g + 1) / i.length * 100}%` }
2687
+ className: `h-1.5 rounded-full transition-all duration-300 ${C ? "bg-blue-500" : "bg-gradient-to-r from-violet-500 to-indigo-500"}`,
2688
+ style: { width: `${(f + 1) / h.length * 100}%` }
2690
2689
  }
2691
2690
  ) })
2692
2691
  ] }),
@@ -2694,7 +2693,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2694
2693
  "button",
2695
2694
  {
2696
2695
  type: "button",
2697
- onClick: () => z(!c),
2696
+ onClick: () => R(!g),
2698
2697
  className: `hidden lg:flex absolute left-0 top-5 -translate-x-[1.625rem] z-20
2699
2698
  w-6 h-6 lg:w-7 lg:h-7 rounded-full
2700
2699
  bg-white dark:bg-slate-800
@@ -2705,30 +2704,30 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2705
2704
  hover:border-violet-300 dark:hover:border-violet-600
2706
2705
  hover:scale-110 active:scale-95
2707
2706
  transition-all duration-200 group`,
2708
- "aria-label": c ? "Collapse steps" : "Expand steps",
2709
- children: c ? /* @__PURE__ */ e.jsx(ie, { className: "w-3 h-3 lg:w-3.5 lg:h-3.5 text-slate-400 group-hover:text-violet-500 transition-colors" }) : /* @__PURE__ */ e.jsx(se, { className: "w-3 h-3 lg:w-3.5 lg:h-3.5 text-slate-400 group-hover:text-violet-500 transition-colors" })
2707
+ "aria-label": g ? "Collapse steps" : "Expand steps",
2708
+ children: g ? /* @__PURE__ */ e.jsx(ce, { className: "w-3 h-3 lg:w-3.5 lg:h-3.5 text-slate-400 group-hover:text-violet-500 transition-colors" }) : /* @__PURE__ */ e.jsx(se, { className: "w-3 h-3 lg:w-3.5 lg:h-3.5 text-slate-400 group-hover:text-violet-500 transition-colors" })
2710
2709
  }
2711
2710
  ),
2712
- /* @__PURE__ */ e.jsx("div", { ref: C, className: "flex-1 min-h-0 overflow-y-auto px-3.5 sm:px-5 lg:px-6 py-4 sm:py-5", children: /* @__PURE__ */ e.jsx("div", { className: "space-y-4 sm:space-y-5 w-full", children: i[g].customRender ? j && i[g].customViewRender ? /* @__PURE__ */ e.jsx("div", { className: "w-full", children: typeof i[g].customViewRender == "function" ? i[g].customViewRender() : i[g].customViewRender }) : /* @__PURE__ */ e.jsx("div", { className: "w-full", children: typeof i[g].customRender == "function" ? i[g].customRender({ formData: I, errors: M, handleChange: S, mode: L }) : i[g].customRender }) : (s = i[g].fields) == null ? void 0 : s.map((a, o) => /* @__PURE__ */ e.jsx(
2713
- je,
2711
+ /* @__PURE__ */ e.jsx("div", { ref: P, className: "flex-1 min-h-0 overflow-y-auto px-3.5 sm:px-5 lg:px-6 py-4 sm:py-5", children: /* @__PURE__ */ e.jsx("div", { className: "space-y-4 sm:space-y-5 w-full", children: h[f].customRender ? C && h[f].customViewRender ? /* @__PURE__ */ e.jsx("div", { className: "w-full", children: typeof h[f].customViewRender == "function" ? h[f].customViewRender() : h[f].customViewRender }) : /* @__PURE__ */ e.jsx("div", { className: "w-full", children: typeof h[f].customRender == "function" ? h[f].customRender({ formData: L, errors: D, handleChange: M, mode: $ }) : h[f].customRender }) : (s = h[f].fields) == null ? void 0 : s.map((n, c) => /* @__PURE__ */ e.jsx(
2712
+ pe,
2714
2713
  {
2715
- index: o,
2716
- field: { ...a, disabled: j || a.disabled },
2717
- value: I[a.name],
2718
- onChange: S,
2719
- error: M[a.name],
2720
- mode: L
2714
+ index: c,
2715
+ field: { ...n, disabled: C || n.disabled },
2716
+ value: L[n.name],
2717
+ onChange: M,
2718
+ error: D[n.name],
2719
+ mode: $
2721
2720
  },
2722
- a.name || o
2721
+ n.name || c
2723
2722
  )) }) }),
2724
2723
  /* @__PURE__ */ e.jsx("div", { className: `flex-shrink-0 px-4 py-3 sm:px-5 sm:py-3.5
2725
2724
  border-t border-slate-200 dark:border-slate-700
2726
2725
  bg-white dark:bg-slate-800`, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-2.5", children: [
2727
- G ? /* @__PURE__ */ e.jsx("div", {}) : /* @__PURE__ */ e.jsxs(
2726
+ J ? /* @__PURE__ */ e.jsx("div", {}) : /* @__PURE__ */ e.jsxs(
2728
2727
  "button",
2729
2728
  {
2730
2729
  type: "button",
2731
- onClick: b,
2730
+ onClick: p,
2732
2731
  className: `inline-flex items-center gap-2 px-3.5 py-2.5 sm:px-4 sm:py-2.5
2733
2732
  rounded-xl text-sm font-semibold transition-all duration-200
2734
2733
  bg-white hover:bg-slate-50 text-slate-700
@@ -2736,18 +2735,18 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2736
2735
  dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300
2737
2736
  shadow-sm hover:shadow-md hover:scale-105 active:scale-95`,
2738
2737
  children: [
2739
- /* @__PURE__ */ e.jsx(ie, { className: "w-4 h-4 flex-shrink-0" }),
2740
- /* @__PURE__ */ e.jsx("span", { className: W ? void 0 : "hidden sm:inline", children: "Previous" })
2738
+ /* @__PURE__ */ e.jsx(ce, { className: "w-4 h-4 flex-shrink-0" }),
2739
+ /* @__PURE__ */ e.jsx("span", { className: O ? void 0 : "hidden sm:inline", children: "Previous" })
2741
2740
  ]
2742
2741
  }
2743
2742
  ),
2744
2743
  /* @__PURE__ */ e.jsx("div", { className: "flex-1" }),
2745
- /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: j ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2744
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: C ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2746
2745
  /* @__PURE__ */ e.jsxs(
2747
2746
  "button",
2748
2747
  {
2749
2748
  type: "button",
2750
- onClick: l,
2749
+ onClick: i,
2751
2750
  className: `hidden sm:inline-flex items-center gap-1.5 px-3.5 py-2.5 sm:px-4 sm:py-2.5
2752
2751
  rounded-xl text-sm font-semibold transition-all duration-200
2753
2752
  bg-white hover:bg-slate-50 text-slate-700
@@ -2755,16 +2754,16 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2755
2754
  dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300
2756
2755
  shadow-sm hover:shadow-md hover:scale-105 active:scale-95`,
2757
2756
  children: [
2758
- /* @__PURE__ */ e.jsx(X, { className: "w-4 h-4 flex-shrink-0" }),
2757
+ /* @__PURE__ */ e.jsx(Z, { className: "w-4 h-4 flex-shrink-0" }),
2759
2758
  /* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children: "Close" })
2760
2759
  ]
2761
2760
  }
2762
2761
  ),
2763
- !H && /* @__PURE__ */ e.jsxs(
2762
+ !G && /* @__PURE__ */ e.jsxs(
2764
2763
  "button",
2765
2764
  {
2766
2765
  type: "button",
2767
- onClick: A,
2766
+ onClick: F,
2768
2767
  className: `inline-flex items-center gap-1.5 px-3.5 py-2.5 sm:px-4 sm:py-2.5
2769
2768
  rounded-xl text-sm font-semibold transition-all duration-200
2770
2769
  bg-white hover:bg-slate-50 text-slate-700
@@ -2777,11 +2776,11 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2777
2776
  ]
2778
2777
  }
2779
2778
  ),
2780
- d && /* @__PURE__ */ e.jsxs(
2779
+ x && /* @__PURE__ */ e.jsxs(
2781
2780
  "button",
2782
2781
  {
2783
2782
  type: "button",
2784
- onClick: d,
2783
+ onClick: x,
2785
2784
  className: `inline-flex items-center gap-1.5 px-3.5 py-2.5 sm:px-4 sm:py-2.5
2786
2785
  rounded-xl text-sm font-semibold transition-all duration-200
2787
2786
  bg-gradient-to-r from-violet-600 to-indigo-600
@@ -2789,8 +2788,8 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2789
2788
  text-white shadow-md hover:shadow-lg
2790
2789
  hover:scale-105 active:scale-95`,
2791
2790
  children: [
2792
- /* @__PURE__ */ e.jsx(oe, { className: "w-4 h-4 flex-shrink-0" }),
2793
- /* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children: f }),
2791
+ /* @__PURE__ */ e.jsx(ne, { className: "w-4 h-4 flex-shrink-0" }),
2792
+ /* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children: v }),
2794
2793
  /* @__PURE__ */ e.jsx("span", { className: "sm:hidden", children: "Edit" })
2795
2794
  ]
2796
2795
  }
@@ -2800,7 +2799,7 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2800
2799
  "button",
2801
2800
  {
2802
2801
  type: "button",
2803
- onClick: l,
2802
+ onClick: i,
2804
2803
  className: `
2805
2804
  items-center gap-1.5 px-3.5 py-2.5 sm:px-4 sm:py-2.5
2806
2805
  rounded-xl text-sm font-semibold transition-all duration-200
@@ -2808,15 +2807,15 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2808
2807
  border border-slate-200 dark:border-slate-600
2809
2808
  dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300
2810
2809
  shadow-sm hover:shadow-md hover:scale-105 active:scale-95
2811
- ${W ? "hidden sm:inline-flex" : "inline-flex"}
2810
+ ${O ? "hidden sm:inline-flex" : "inline-flex"}
2812
2811
  `,
2813
2812
  children: [
2814
- /* @__PURE__ */ e.jsx(X, { className: "w-4 h-4 flex-shrink-0" }),
2815
- /* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children: h })
2813
+ /* @__PURE__ */ e.jsx(Z, { className: "w-4 h-4 flex-shrink-0" }),
2814
+ /* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children: u })
2816
2815
  ]
2817
2816
  }
2818
2817
  ),
2819
- H ? /* @__PURE__ */ e.jsxs(
2818
+ G ? /* @__PURE__ */ e.jsxs(
2820
2819
  "button",
2821
2820
  {
2822
2821
  type: "submit",
@@ -2827,15 +2826,15 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2827
2826
  text-white shadow-md hover:shadow-lg
2828
2827
  hover:scale-105 active:scale-95`,
2829
2828
  children: [
2830
- /* @__PURE__ */ e.jsx(re, { className: "w-4 h-4 flex-shrink-0" }),
2831
- /* @__PURE__ */ e.jsx("span", { children: m })
2829
+ /* @__PURE__ */ e.jsx(oe, { className: "w-4 h-4 flex-shrink-0" }),
2830
+ /* @__PURE__ */ e.jsx("span", { children: d })
2832
2831
  ]
2833
2832
  }
2834
2833
  ) : /* @__PURE__ */ e.jsxs(
2835
2834
  "button",
2836
2835
  {
2837
2836
  type: "button",
2838
- onClick: A,
2837
+ onClick: F,
2839
2838
  className: `inline-flex items-center gap-1.5 px-3.5 py-2.5 sm:px-4 sm:py-2.5
2840
2839
  rounded-xl text-sm font-semibold transition-all duration-200
2841
2840
  bg-white hover:bg-slate-50 text-slate-700
@@ -2852,14 +2851,14 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2852
2851
  ] }) })
2853
2852
  ] })
2854
2853
  ] });
2855
- }, rt = ({
2854
+ }, it = ({
2856
2855
  header: t,
2857
2856
  error: r = null,
2858
- errorDescription: n = null,
2859
- onErrorClose: l,
2860
- children: d,
2861
- loading: x = !1,
2862
- loadingMessage: m = "Loading data..."
2857
+ errorDescription: a = null,
2858
+ onErrorClose: i,
2859
+ children: x,
2860
+ loading: b = !1,
2861
+ loadingMessage: d = "Loading data..."
2863
2862
  }) => /* @__PURE__ */ e.jsx("div", { className: "h-full w-full flex flex-col overflow-hidden p-2.5 sm:p-3.5", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2.5 sm:gap-3 h-full overflow-hidden", children: [
2864
2863
  t && /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0", children: t }),
2865
2864
  r && /* @__PURE__ */ e.jsx("div", { className: `
@@ -2872,26 +2871,26 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2872
2871
  flex-shrink-0 w-7 h-7 sm:w-8 sm:h-8 rounded-lg mt-0.5
2873
2872
  bg-red-100 dark:bg-red-800/30
2874
2873
  flex items-center justify-center
2875
- `, children: /* @__PURE__ */ e.jsx(we, { className: "w-3.5 h-3.5 sm:w-4 sm:h-4 text-red-600 dark:text-red-400" }) }),
2874
+ `, children: /* @__PURE__ */ e.jsx($e, { className: "w-3.5 h-3.5 sm:w-4 sm:h-4 text-red-600 dark:text-red-400" }) }),
2876
2875
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
2877
2876
  /* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-red-800 dark:text-red-300 leading-snug", children: r }),
2878
- n && /* @__PURE__ */ e.jsx("p", { className: "mt-0.5 text-xs text-red-700/80 dark:text-red-400 leading-relaxed", children: n })
2877
+ a && /* @__PURE__ */ e.jsx("p", { className: "mt-0.5 text-xs text-red-700/80 dark:text-red-400 leading-relaxed", children: a })
2879
2878
  ] }),
2880
- l && /* @__PURE__ */ e.jsx(
2879
+ i && /* @__PURE__ */ e.jsx(
2881
2880
  "button",
2882
2881
  {
2883
- onClick: l,
2882
+ onClick: i,
2884
2883
  className: `flex-shrink-0 p-2 rounded-lg mt-0.5
2885
2884
  text-red-400 transition-all duration-200
2886
2885
  hover:bg-red-100 hover:text-red-600
2887
2886
  dark:hover:bg-red-800/50 dark:hover:text-red-300
2888
2887
  hover:scale-105 active:scale-95`,
2889
2888
  "aria-label": "Dismiss error",
2890
- children: /* @__PURE__ */ e.jsx(X, { className: "w-3.5 h-3.5" })
2889
+ children: /* @__PURE__ */ e.jsx(Z, { className: "w-3.5 h-3.5" })
2891
2890
  }
2892
2891
  )
2893
2892
  ] }) }) }),
2894
- /* @__PURE__ */ e.jsx("div", { className: "flex-grow min-h-0 overflow-y-auto", children: x ? /* @__PURE__ */ e.jsx("div", { className: `
2893
+ /* @__PURE__ */ e.jsx("div", { className: "flex-grow min-h-0 overflow-y-auto", children: b ? /* @__PURE__ */ e.jsx("div", { className: `
2895
2894
  h-full flex items-center justify-center
2896
2895
  rounded-xl sm:rounded-2xl border
2897
2896
  bg-white border-slate-200/60 shadow-sm
@@ -2902,88 +2901,88 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
2902
2901
  /* @__PURE__ */ e.jsx("div", { className: `absolute inset-0 rounded-full border-[2.5px] border-transparent
2903
2902
  border-t-violet-600 dark:border-t-violet-400 animate-spin` })
2904
2903
  ] }),
2905
- /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1", children: [0, 120, 240].map((h) => /* @__PURE__ */ e.jsx(
2904
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1", children: [0, 120, 240].map((u) => /* @__PURE__ */ e.jsx(
2906
2905
  "span",
2907
2906
  {
2908
2907
  className: `w-1 h-1 rounded-full bg-gradient-to-r from-violet-500 to-indigo-500
2909
2908
  animate-bounce`,
2910
- style: { animationDelay: `${h}ms` }
2909
+ style: { animationDelay: `${u}ms` }
2911
2910
  },
2912
- h
2911
+ u
2913
2912
  )) }),
2914
- /* @__PURE__ */ e.jsx("p", { className: "text-xs font-medium text-slate-500 dark:text-slate-400", children: m })
2915
- ] }) }) : d })
2916
- ] }) }), lt = ({
2913
+ /* @__PURE__ */ e.jsx("p", { className: "text-xs font-medium text-slate-500 dark:text-slate-400", children: d })
2914
+ ] }) }) : x })
2915
+ ] }) }), dt = ({
2917
2916
  message: t = "Loading...",
2918
2917
  supportingMessage: r = !1,
2919
- title: n = "Loading Data",
2920
- className: l = "",
2921
- size: d = "lg"
2918
+ title: a = "Loading Data",
2919
+ className: i = "",
2920
+ size: x = "lg"
2922
2921
  }) => {
2923
- const x = {
2922
+ const b = {
2924
2923
  sm: "h-7 w-7 border-2",
2925
2924
  md: "h-9 w-9 border-[3px]",
2926
2925
  lg: "h-10 w-10 sm:h-12 sm:w-12 border-[3px] sm:border-[4px]",
2927
2926
  xl: "h-12 w-12 sm:h-16 sm:w-16 border-[4px]"
2928
2927
  };
2929
- return /* @__PURE__ */ e.jsxs("div", { className: `flex flex-col items-center justify-center h-full w-full text-center px-4 ${l}`, children: [
2930
- /* @__PURE__ */ e.jsx("div", { className: `animate-spin rounded-full ${x[d]}
2928
+ return /* @__PURE__ */ e.jsxs("div", { className: `flex flex-col items-center justify-center h-full w-full text-center px-4 ${i}`, children: [
2929
+ /* @__PURE__ */ e.jsx("div", { className: `animate-spin rounded-full ${b[x]}
2931
2930
  border-slate-200 border-t-violet-500 border-r-violet-500 mb-4` }),
2932
- /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1 mb-3", children: [0, 120, 240].map((m) => /* @__PURE__ */ e.jsx(
2931
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1 mb-3", children: [0, 120, 240].map((d) => /* @__PURE__ */ e.jsx(
2933
2932
  "span",
2934
2933
  {
2935
2934
  className: "w-1 h-1 rounded-full bg-gradient-to-r from-violet-500 to-indigo-500 animate-bounce",
2936
- style: { animationDelay: `${m}ms` }
2935
+ style: { animationDelay: `${d}ms` }
2937
2936
  },
2938
- m
2937
+ d
2939
2938
  )) }),
2940
- /* @__PURE__ */ e.jsx("h3", { className: "text-sm sm:text-base font-semibold text-slate-900 dark:text-slate-200 mb-1", children: n }),
2939
+ /* @__PURE__ */ e.jsx("h3", { className: "text-sm sm:text-base font-semibold text-slate-900 dark:text-slate-200 mb-1", children: a }),
2941
2940
  /* @__PURE__ */ e.jsx("p", { className: "text-xs sm:text-sm text-slate-500 dark:text-slate-400 max-w-xs", children: r || t })
2942
2941
  ] });
2943
- }, ot = ({ error: t, errorDescription: r, onClose: n }) => t ? /* @__PURE__ */ e.jsx("div", { className: `mx-4 mt-3 sm:mx-5 sm:mt-4 rounded-xl border
2942
+ }, ct = ({ error: t, errorDescription: r, onClose: a }) => t ? /* @__PURE__ */ e.jsx("div", { className: `mx-4 mt-3 sm:mx-5 sm:mt-4 rounded-xl border
2944
2943
  border-red-200 bg-red-50
2945
2944
  dark:bg-red-900/20 dark:border-red-800/50
2946
2945
  animate-in slide-in-from-top-1 duration-200`, children: /* @__PURE__ */ e.jsx("div", { className: "px-3.5 py-3 sm:px-4", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2.5", children: [
2947
2946
  /* @__PURE__ */ e.jsx("div", { className: `flex-shrink-0 w-7 h-7 rounded-lg mt-0.5
2948
2947
  bg-red-100 dark:bg-red-800/30
2949
- flex items-center justify-center`, children: /* @__PURE__ */ e.jsx(we, { className: "w-3.5 h-3.5 text-red-600 dark:text-red-400" }) }),
2948
+ flex items-center justify-center`, children: /* @__PURE__ */ e.jsx($e, { className: "w-3.5 h-3.5 text-red-600 dark:text-red-400" }) }),
2950
2949
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
2951
2950
  /* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-red-800 dark:text-red-300 leading-snug", children: t }),
2952
2951
  r && /* @__PURE__ */ e.jsx("p", { className: "mt-0.5 text-xs text-red-700/80 dark:text-red-400 leading-relaxed", children: r })
2953
2952
  ] }),
2954
- n && /* @__PURE__ */ e.jsx(
2953
+ a && /* @__PURE__ */ e.jsx(
2955
2954
  "button",
2956
2955
  {
2957
2956
  type: "button",
2958
- onClick: n,
2957
+ onClick: a,
2959
2958
  "aria-label": "Close error",
2960
2959
  className: `flex-shrink-0 p-1 rounded-lg mt-0.5 transition-all duration-200
2961
2960
  text-red-400
2962
2961
  hover:bg-red-100 hover:text-red-600
2963
2962
  dark:hover:bg-red-800/50 dark:hover:text-red-300
2964
2963
  hover:scale-105 active:scale-95`,
2965
- children: /* @__PURE__ */ e.jsx(X, { className: "w-3.5 h-3.5" })
2964
+ children: /* @__PURE__ */ e.jsx(Z, { className: "w-3.5 h-3.5" })
2966
2965
  }
2967
2966
  )
2968
- ] }) }) }) : null, nt = ({
2967
+ ] }) }) }) : null, xt = ({
2969
2968
  content: t,
2970
2969
  className: r = "",
2971
- emptyText: n = null,
2972
- size: l = "md"
2970
+ emptyText: a = null,
2971
+ size: i = "md"
2973
2972
  // 'xs' | 'sm' | 'md'
2974
2973
  }) => {
2975
2974
  if (!t || !t.replace(/<[^>]*>/g, "").trim())
2976
- return n ? /* @__PURE__ */ e.jsx("span", { className: "text-slate-400 dark:text-slate-500 text-sm italic", children: n }) : null;
2977
- const d = {
2975
+ return a ? /* @__PURE__ */ e.jsx("span", { className: "text-slate-400 dark:text-slate-500 text-sm italic", children: a }) : null;
2976
+ const x = {
2978
2977
  xs: "prose-xs text-xs",
2979
2978
  sm: "prose-sm text-sm",
2980
2979
  md: "prose-base text-base"
2981
- }[l] || "prose-sm text-sm";
2980
+ }[i] || "prose-sm text-sm";
2982
2981
  return /* @__PURE__ */ e.jsx(
2983
2982
  "div",
2984
2983
  {
2985
2984
  className: `
2986
- prose ${d} max-w-none
2985
+ prose ${x} max-w-none
2987
2986
  text-slate-700 dark:text-slate-300
2988
2987
 
2989
2988
  [&>*]:my-0.5
@@ -3005,105 +3004,935 @@ const Pe = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
3005
3004
  }
3006
3005
  );
3007
3006
  };
3008
- let T = null;
3009
- const it = ({
3007
+ let V = null;
3008
+ const mt = ({
3010
3009
  items: t = [],
3011
3010
  onReorder: r,
3012
- onDropFrom: n,
3013
- onDropTo: l,
3014
- listId: d = "default",
3015
- disabled: x = !1,
3016
- renderItem: m,
3017
- className: h = "",
3018
- dropZoneClassName: f = "",
3019
- activeDropZoneClassName: k = "",
3020
- children: _,
3021
- footer: y = null
3011
+ onDropFrom: a,
3012
+ onDropTo: i,
3013
+ listId: x = "default",
3014
+ disabled: b = !1,
3015
+ renderItem: d,
3016
+ className: u = "",
3017
+ dropZoneClassName: v = "",
3018
+ activeDropZoneClassName: y = "",
3019
+ children: w,
3020
+ footer: z = null
3022
3021
  }) => {
3023
- const E = K(null), [L, C] = O(null), [g, N] = O(!1), [c, z] = O(null);
3024
- J(() => {
3025
- const i = () => {
3026
- T && (T = null, z(null), C(null), N(!1), E.current = null);
3022
+ const N = ee(null), [$, P] = T(null), [f, m] = T(!1), [g, R] = T(null);
3023
+ Q(() => {
3024
+ const h = () => {
3025
+ V && (V = null, R(null), P(null), m(!1), N.current = null);
3027
3026
  };
3028
- return document.addEventListener("dragend", i), () => document.removeEventListener("dragend", i);
3027
+ return document.addEventListener("dragend", h), () => document.removeEventListener("dragend", h);
3029
3028
  }, []);
3030
- const I = (i, v) => {
3031
- E.current = v, z(t[v].id), T = { listId: d, index: v, item: t[v] }, i.dataTransfer.effectAllowed = "move";
3032
- }, V = (i, v) => {
3033
- i.preventDefault(), (T == null ? void 0 : T.listId) === d && C(v);
3034
- }, M = () => {
3035
- E.current = null, z(null), C(null), N(!1), T = null;
3036
- }, Y = (i) => {
3037
- i.preventDefault(), !x && (T == null ? void 0 : T.listId) !== d && N(!0);
3038
- }, U = (i) => {
3039
- i.currentTarget.contains(i.relatedTarget) || (N(!1), (T == null ? void 0 : T.listId) === d && C(null));
3040
- }, B = (i, v) => {
3041
- if (i.preventDefault(), i.stopPropagation(), !!T) {
3042
- if (T.listId === d) {
3043
- const S = E.current;
3044
- if (S === v) {
3045
- M();
3029
+ const L = (h, k) => {
3030
+ N.current = k, R(t[k].id), V = { listId: x, index: k, item: t[k] }, h.dataTransfer.effectAllowed = "move";
3031
+ }, Y = (h, k) => {
3032
+ h.preventDefault(), (V == null ? void 0 : V.listId) === x && P(k);
3033
+ }, D = () => {
3034
+ N.current = null, R(null), P(null), m(!1), V = null;
3035
+ }, X = (h) => {
3036
+ h.preventDefault(), !b && (V == null ? void 0 : V.listId) !== x && m(!0);
3037
+ }, H = (h) => {
3038
+ h.currentTarget.contains(h.relatedTarget) || (m(!1), (V == null ? void 0 : V.listId) === x && P(null));
3039
+ }, U = (h, k) => {
3040
+ if (h.preventDefault(), h.stopPropagation(), !!V) {
3041
+ if (V.listId === x) {
3042
+ const M = N.current;
3043
+ if (M === k) {
3044
+ D();
3046
3045
  return;
3047
3046
  }
3048
- const P = [...t], [A] = P.splice(S, 1);
3049
- P.splice(v, 0, A), r == null || r(P);
3047
+ const W = [...t], [F] = W.splice(M, 1);
3048
+ W.splice(k, 0, F), r == null || r(W);
3050
3049
  } else
3051
- n == null || n({ item: T.item, fromListId: T.listId, toIndex: v }), l == null || l({ item: T.item, fromIndex: T.index });
3052
- M();
3050
+ a == null || a({ item: V.item, fromListId: V.listId, toIndex: k }), i == null || i({ item: V.item, fromIndex: V.index });
3051
+ D();
3053
3052
  }
3054
- }, j = (i) => {
3055
- if (i.preventDefault(), !!T) {
3056
- if (T.listId === d) {
3057
- M();
3053
+ }, C = (h) => {
3054
+ if (h.preventDefault(), !!V) {
3055
+ if (V.listId === x) {
3056
+ D();
3058
3057
  return;
3059
3058
  }
3060
- n == null || n({ item: T.item, fromListId: T.listId, toIndex: t.length }), l == null || l({ item: T.item, fromIndex: T.index }), M();
3059
+ a == null || a({ item: V.item, fromListId: V.listId, toIndex: t.length }), i == null || i({ item: V.item, fromIndex: V.index }), D();
3061
3060
  }
3062
- }, W = g && !x && (T == null ? void 0 : T.listId) !== d;
3061
+ }, O = f && !b && (V == null ? void 0 : V.listId) !== x;
3063
3062
  return /* @__PURE__ */ e.jsxs(
3064
3063
  "div",
3065
3064
  {
3066
- className: `${f} ${W ? k : ""} ${h}`,
3067
- onDragOver: x ? void 0 : Y,
3068
- onDragLeave: x ? void 0 : U,
3069
- onDrop: x ? void 0 : j,
3065
+ className: `${v} ${O ? y : ""} ${u}`,
3066
+ onDragOver: b ? void 0 : X,
3067
+ onDragLeave: b ? void 0 : H,
3068
+ onDrop: b ? void 0 : C,
3070
3069
  children: [
3071
- t.length === 0 ? _ : t.map((i, v) => {
3072
- const S = c === i.id, P = (T == null ? void 0 : T.listId) === d && L === v && c !== i.id;
3073
- return m(i, v, x ? {} : {
3070
+ t.length === 0 ? w : t.map((h, k) => {
3071
+ const M = g === h.id, W = (V == null ? void 0 : V.listId) === x && $ === k && g !== h.id;
3072
+ return d(h, k, b ? {} : {
3074
3073
  draggable: !0,
3075
- onDragStart: (b) => I(b, v),
3076
- onDragEnter: (b) => V(b, v),
3077
- onDragEnd: M,
3078
- onDrop: (b) => B(b, v)
3079
- }, S, P);
3074
+ onDragStart: (p) => L(p, k),
3075
+ onDragEnter: (p) => Y(p, k),
3076
+ onDragEnd: D,
3077
+ onDrop: (p) => U(p, k)
3078
+ }, M, W);
3080
3079
  }),
3081
- y
3080
+ z
3082
3081
  ]
3083
3082
  }
3084
3083
  );
3084
+ }, ht = ({ title: t, count: r, icon: a, color: i, onClick: x }) => {
3085
+ const b = {
3086
+ yellow: {
3087
+ gradient: "from-yellow-400 to-yellow-500",
3088
+ iconBg: "bg-yellow-500/20",
3089
+ iconColor: "text-yellow-700 dark:text-yellow-300",
3090
+ textColor: "text-yellow-900 dark:text-yellow-50",
3091
+ subtextColor: "text-yellow-800 dark:text-yellow-200",
3092
+ buttonGradient: "from-yellow-500 to-yellow-600",
3093
+ buttonHover: "hover:from-yellow-600 hover:to-yellow-700"
3094
+ },
3095
+ red: {
3096
+ gradient: "from-red-500 to-red-600",
3097
+ iconBg: "bg-red-500/20",
3098
+ iconColor: "text-red-700 dark:text-red-300",
3099
+ textColor: "text-red-900 dark:text-red-50",
3100
+ subtextColor: "text-red-800 dark:text-red-200",
3101
+ buttonGradient: "from-red-500 to-red-600",
3102
+ buttonHover: "hover:from-red-600 hover:to-red-700"
3103
+ },
3104
+ green: {
3105
+ gradient: "from-green-500 to-green-600",
3106
+ iconBg: "bg-green-500/20",
3107
+ iconColor: "text-green-700 dark:text-green-300",
3108
+ textColor: "text-green-900 dark:text-green-50",
3109
+ subtextColor: "text-green-800 dark:text-green-200",
3110
+ buttonGradient: "from-green-500 to-green-600",
3111
+ buttonHover: "hover:from-green-600 hover:to-green-700"
3112
+ },
3113
+ blue: {
3114
+ gradient: "from-blue-500 to-blue-600",
3115
+ iconBg: "bg-blue-500/20",
3116
+ iconColor: "text-blue-700 dark:text-blue-300",
3117
+ textColor: "text-blue-900 dark:text-blue-50",
3118
+ subtextColor: "text-blue-800 dark:text-blue-200",
3119
+ buttonGradient: "from-blue-500 to-blue-600",
3120
+ buttonHover: "hover:from-blue-600 hover:to-blue-700"
3121
+ },
3122
+ violet: {
3123
+ gradient: "from-violet-500 to-indigo-600",
3124
+ iconBg: "bg-violet-500/20",
3125
+ iconColor: "text-violet-700 dark:text-violet-300",
3126
+ textColor: "text-violet-900 dark:text-violet-50",
3127
+ subtextColor: "text-violet-800 dark:text-violet-200",
3128
+ buttonGradient: "from-violet-600 to-indigo-600",
3129
+ buttonHover: "hover:from-violet-700 hover:to-indigo-700"
3130
+ }
3131
+ }, d = b[i] || b.violet;
3132
+ return /* @__PURE__ */ e.jsxs("div", { className: "relative overflow-hidden rounded-2xl border bg-white dark:bg-slate-800 border-slate-200/50 dark:border-slate-700/50 transition-all duration-300 hover:-translate-y-1", children: [
3133
+ /* @__PURE__ */ e.jsx("div", { className: `absolute inset-0 bg-gradient-to-br ${d.gradient} opacity-5` }),
3134
+ /* @__PURE__ */ e.jsx("div", { className: "relative p-6", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-start justify-between", children: [
3135
+ /* @__PURE__ */ e.jsxs("div", { className: "flex-1", children: [
3136
+ /* @__PURE__ */ e.jsx("p", { className: `text-sm font-semibold uppercase tracking-wide mb-2 ${d.subtextColor}`, children: t }),
3137
+ /* @__PURE__ */ e.jsx("h2", { className: `text-5xl font-bold mb-1 ${d.textColor}`, children: r })
3138
+ ] }),
3139
+ /* @__PURE__ */ e.jsx("div", { className: `w-16 h-16 rounded-xl ${d.iconBg} flex items-center justify-center`, children: a && /* @__PURE__ */ e.jsx("div", { className: `${d.iconColor}`, children: ge.cloneElement(a, {
3140
+ className: "w-8 h-8",
3141
+ strokeWidth: 2
3142
+ }) }) })
3143
+ ] }) }),
3144
+ /* @__PURE__ */ e.jsx("div", { className: "relative px-6 py-4 border-t border-slate-200 dark:border-slate-700", children: /* @__PURE__ */ e.jsxs(
3145
+ "button",
3146
+ {
3147
+ onClick: x,
3148
+ className: `w-full flex items-center justify-center space-x-2 bg-gradient-to-r ${d.buttonGradient} ${d.buttonHover} text-white font-semibold px-6 py-3 rounded-xl transition-all duration-200 transform hover:-translate-y-0.5`,
3149
+ children: [
3150
+ /* @__PURE__ */ e.jsx("span", { children: "More info" }),
3151
+ /* @__PURE__ */ e.jsx(he, { className: "w-5 h-5" })
3152
+ ]
3153
+ }
3154
+ ) })
3155
+ ] });
3156
+ }, bt = ({
3157
+ columns: t,
3158
+ data: r,
3159
+ onSort: a,
3160
+ sortConfig: i,
3161
+ emptyMessage: x = "No data found",
3162
+ emptyDescription: b = "Try adjusting your search terms",
3163
+ showStats: d = !0,
3164
+ selectable: u = !1,
3165
+ onSelectionChange: v,
3166
+ actions: y = []
3167
+ }) => {
3168
+ const [w, z] = T(/* @__PURE__ */ new Set()), N = (g) => {
3169
+ if (g.target.checked) {
3170
+ const R = new Set(r.map((L, Y) => Y));
3171
+ z(R), v == null || v(R);
3172
+ } else
3173
+ z(/* @__PURE__ */ new Set()), v == null || v(/* @__PURE__ */ new Set());
3174
+ }, $ = (g) => {
3175
+ const R = new Set(w);
3176
+ R.has(g) ? R.delete(g) : R.add(g), z(R), v == null || v(R);
3177
+ }, P = r.length > 0 && w.size === r.length, f = w.size > 0 && w.size < r.length, m = u ? [
3178
+ {
3179
+ key: "select",
3180
+ label: "Select",
3181
+ sortable: !1,
3182
+ render: (g, R) => /* @__PURE__ */ e.jsx(
3183
+ "input",
3184
+ {
3185
+ type: "checkbox",
3186
+ checked: w.has(R),
3187
+ onChange: () => $(R),
3188
+ className: "h-4 w-4 rounded border-slate-300 text-blue-600 focus:ring-blue-500 dark:border-slate-600 dark:bg-slate-700"
3189
+ }
3190
+ ),
3191
+ headerRender: () => /* @__PURE__ */ e.jsx(
3192
+ "input",
3193
+ {
3194
+ type: "checkbox",
3195
+ checked: P,
3196
+ ref: (g) => {
3197
+ g && (g.indeterminate = f);
3198
+ },
3199
+ onChange: N,
3200
+ className: "h-4 w-4 rounded border-slate-300 text-blue-600 focus:ring-blue-500 dark:border-slate-600 dark:bg-slate-700"
3201
+ }
3202
+ )
3203
+ },
3204
+ ...t
3205
+ ] : t;
3206
+ return /* @__PURE__ */ e.jsx("div", { className: "flex flex-col rounded-2xl border overflow-hidden transition-all duration-300 bg-white border-slate-200/50 dark:bg-slate-800/50 dark:border-slate-700/50 flex-grow min-h-0", children: /* @__PURE__ */ e.jsxs("div", { className: "h-full overflow-hidden flex flex-col", children: [
3207
+ d && /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0 px-6 py-3 border-b border-slate-200 bg-slate-50 dark:border-slate-700 dark:bg-slate-800/30", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
3208
+ /* @__PURE__ */ e.jsxs("p", { className: "text-sm font-medium text-slate-600 dark:text-slate-400", children: [
3209
+ "Showing ",
3210
+ r.length,
3211
+ " results",
3212
+ u && w.size > 0 && /* @__PURE__ */ e.jsxs("span", { className: "ml-2 text-blue-600 dark:text-blue-400", children: [
3213
+ "(",
3214
+ w.size,
3215
+ " selected)"
3216
+ ] })
3217
+ ] }),
3218
+ y.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "flex space-x-2", children: y.map((g, R) => /* @__PURE__ */ e.jsx(
3219
+ "button",
3220
+ {
3221
+ onClick: g.onClick,
3222
+ disabled: g.disabled,
3223
+ className: `px-3 py-1 text-sm font-medium rounded-md transition-colors ${g.disabled ? "bg-slate-100 text-slate-400 cursor-not-allowed dark:bg-slate-700 dark:text-slate-500" : "bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-700 dark:hover:bg-blue-600"}`,
3224
+ children: g.label
3225
+ },
3226
+ R
3227
+ )) })
3228
+ ] }) }),
3229
+ /* @__PURE__ */ e.jsx("div", { className: "flex-grow overflow-auto", children: /* @__PURE__ */ e.jsxs("table", { className: "w-full", children: [
3230
+ /* @__PURE__ */ e.jsx("thead", { className: "sticky top-0 z-10 bg-slate-50 dark:bg-slate-800", children: /* @__PURE__ */ e.jsx("tr", { className: "border-b border-slate-200 dark:border-slate-700", children: m.map((g) => /* @__PURE__ */ e.jsx(
3231
+ "th",
3232
+ {
3233
+ onClick: () => g.sortable && a && a(g.key),
3234
+ className: `px-6 py-4 text-left text-xs font-semibold uppercase tracking-wider ${g.sortable ? "cursor-pointer select-none" : ""} transition-colors text-slate-700 hover:text-slate-900 dark:text-slate-400 dark:hover:text-slate-300`,
3235
+ children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
3236
+ g.headerRender ? g.headerRender() : /* @__PURE__ */ e.jsx("span", { children: g.label }),
3237
+ g.sortable && (i == null ? void 0 : i.key) === g.key && /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4", fill: "currentColor", viewBox: "0 0 20 20", children: i.direction === "asc" ? /* @__PURE__ */ e.jsx(
3238
+ "path",
3239
+ {
3240
+ fillRule: "evenodd",
3241
+ d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
3242
+ clipRule: "evenodd"
3243
+ }
3244
+ ) : /* @__PURE__ */ e.jsx(
3245
+ "path",
3246
+ {
3247
+ fillRule: "evenodd",
3248
+ d: "M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",
3249
+ clipRule: "evenodd"
3250
+ }
3251
+ ) })
3252
+ ] })
3253
+ },
3254
+ g.key
3255
+ )) }) }),
3256
+ /* @__PURE__ */ e.jsx("tbody", { className: "divide-y divide-slate-200 dark:divide-slate-700", children: r.length > 0 ? r.map((g, R) => /* @__PURE__ */ e.jsx(
3257
+ "tr",
3258
+ {
3259
+ className: "transition-colors hover:bg-slate-50 dark:hover:bg-slate-700/50",
3260
+ children: m.map((L) => /* @__PURE__ */ e.jsx(
3261
+ "td",
3262
+ {
3263
+ className: "px-6 py-4 whitespace-nowrap text-sm",
3264
+ children: L.render ? L.render(g, R) : g[L.key]
3265
+ },
3266
+ L.key
3267
+ ))
3268
+ },
3269
+ R
3270
+ )) : /* @__PURE__ */ e.jsx("tr", { children: /* @__PURE__ */ e.jsx("td", { colSpan: m.length, className: "px-6 py-12 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center justify-center space-y-3", children: [
3271
+ /* @__PURE__ */ e.jsx(
3272
+ "svg",
3273
+ {
3274
+ className: "w-16 h-16 text-slate-300 dark:text-slate-600",
3275
+ fill: "none",
3276
+ stroke: "currentColor",
3277
+ viewBox: "0 0 24 24",
3278
+ children: /* @__PURE__ */ e.jsx(
3279
+ "path",
3280
+ {
3281
+ strokeLinecap: "round",
3282
+ strokeLinejoin: "round",
3283
+ strokeWidth: 1.5,
3284
+ d: "M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M12 12h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
3285
+ }
3286
+ )
3287
+ }
3288
+ ),
3289
+ /* @__PURE__ */ e.jsxs("div", { children: [
3290
+ /* @__PURE__ */ e.jsx("p", { className: "text-lg font-semibold text-slate-600 dark:text-slate-400", children: x }),
3291
+ /* @__PURE__ */ e.jsx("p", { className: "text-sm mt-1 text-slate-500 dark:text-slate-500", children: b })
3292
+ ] })
3293
+ ] }) }) }) })
3294
+ ] }) })
3295
+ ] }) });
3296
+ }, ut = ({
3297
+ icon: t,
3298
+ onClick: r,
3299
+ children: a,
3300
+ variant: i = "ping",
3301
+ disabled: x = !1,
3302
+ title: b = "",
3303
+ size: d = "md",
3304
+ className: u = ""
3305
+ }) => {
3306
+ const v = {
3307
+ sm: "px-2.5 py-1.5 text-xs gap-1",
3308
+ md: "px-3 py-1.5 sm:px-3.5 sm:py-2 text-sm gap-1.5"
3309
+ }, y = {
3310
+ ping: "fb-ping",
3311
+ spotlight: "fb-spotlight-btn",
3312
+ typewriter: "fb-typewriter-btn",
3313
+ marching: "fb-marching-btn",
3314
+ jelly: "fb-jelly-btn",
3315
+ orbit: "fb-orbit",
3316
+ fillwipe: "fb-fillwipe-btn",
3317
+ signal: "fb-signal",
3318
+ shimmy: ""
3319
+ }[i] ?? "", w = () => {
3320
+ switch (i) {
3321
+ case "ping":
3322
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3323
+ /* @__PURE__ */ e.jsxs("div", { className: "fb-ping-wrap", children: [
3324
+ /* @__PURE__ */ e.jsx("div", { className: "fb-ping-ring" }),
3325
+ /* @__PURE__ */ e.jsx("div", { className: "fb-ping-dot" })
3326
+ ] }),
3327
+ t && /* @__PURE__ */ e.jsx(t, { className: "w-3.5 h-3.5 flex-shrink-0" }),
3328
+ a && /* @__PURE__ */ e.jsx("span", { children: a })
3329
+ ] });
3330
+ case "spotlight":
3331
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3332
+ /* @__PURE__ */ e.jsx("div", { className: "fb-spotlight" }),
3333
+ t && /* @__PURE__ */ e.jsx(t, { className: "w-3.5 h-3.5 flex-shrink-0" }),
3334
+ a && /* @__PURE__ */ e.jsx("span", { children: a })
3335
+ ] });
3336
+ case "typewriter":
3337
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3338
+ t && /* @__PURE__ */ e.jsx(t, { className: "w-3.5 h-3.5 flex-shrink-0" }),
3339
+ /* @__PURE__ */ e.jsxs("span", { className: "fb-tw-wrap", children: [
3340
+ /* @__PURE__ */ e.jsx("span", { className: "fb-tw-text", children: a }),
3341
+ /* @__PURE__ */ e.jsx("span", { className: "fb-tw-measure", "aria-hidden": "true", children: a })
3342
+ ] }),
3343
+ /* @__PURE__ */ e.jsx("span", { className: "fb-cursor" })
3344
+ ] });
3345
+ case "marching":
3346
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3347
+ t && /* @__PURE__ */ e.jsx(t, { className: "w-3.5 h-3.5 flex-shrink-0" }),
3348
+ a && /* @__PURE__ */ e.jsx("span", { children: a })
3349
+ ] });
3350
+ case "jelly":
3351
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3352
+ t && /* @__PURE__ */ e.jsx(t, { className: "w-3.5 h-3.5 flex-shrink-0" }),
3353
+ a && /* @__PURE__ */ e.jsx("span", { children: a })
3354
+ ] });
3355
+ case "magnetic":
3356
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3357
+ t && /* @__PURE__ */ e.jsx(t, { className: "w-3.5 h-3.5 flex-shrink-0" }),
3358
+ a && /* @__PURE__ */ e.jsx("span", { className: "fb-magnetic-text", children: a })
3359
+ ] });
3360
+ case "orbit":
3361
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3362
+ /* @__PURE__ */ e.jsx("div", { className: "fb-orbit-dot" }),
3363
+ t && /* @__PURE__ */ e.jsx(t, { className: "w-3.5 h-3.5 flex-shrink-0" }),
3364
+ a && /* @__PURE__ */ e.jsx("span", { children: a })
3365
+ ] });
3366
+ case "fillwipe":
3367
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3368
+ /* @__PURE__ */ e.jsx("div", { className: "fb-fill-layer" }),
3369
+ t && /* @__PURE__ */ e.jsx(t, { className: "w-3.5 h-3.5 flex-shrink-0 fb-rel" }),
3370
+ a && /* @__PURE__ */ e.jsx("span", { className: "fb-rel", children: a })
3371
+ ] });
3372
+ case "signal":
3373
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3374
+ /* @__PURE__ */ e.jsx("div", { className: "fb-wave" }),
3375
+ /* @__PURE__ */ e.jsx("div", { className: "fb-wave fb-wave-2" }),
3376
+ /* @__PURE__ */ e.jsx("div", { className: "fb-wave fb-wave-3" }),
3377
+ t && /* @__PURE__ */ e.jsx(t, { className: "w-3.5 h-3.5 flex-shrink-0 fb-rel" }),
3378
+ a && /* @__PURE__ */ e.jsx("span", { className: "fb-rel", children: a })
3379
+ ] });
3380
+ case "shimmy":
3381
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3382
+ /* @__PURE__ */ e.jsx("span", { className: "fb-shimmy-icon", children: t && /* @__PURE__ */ e.jsx(t, { className: "w-3.5 h-3.5 flex-shrink-0" }) }),
3383
+ a && /* @__PURE__ */ e.jsx("span", { children: a })
3384
+ ] });
3385
+ default:
3386
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3387
+ t && /* @__PURE__ */ e.jsx(t, { className: "w-3.5 h-3.5 flex-shrink-0" }),
3388
+ a && /* @__PURE__ */ e.jsx("span", { children: a })
3389
+ ] });
3390
+ }
3391
+ };
3392
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3393
+ /* @__PURE__ */ e.jsx("style", { children: `
3394
+ .fb {
3395
+ position: relative;
3396
+ display: inline-flex;
3397
+ align-items: center;
3398
+ justify-content: center;
3399
+ white-space: nowrap;
3400
+ font-weight: 600;
3401
+ letter-spacing: -0.01em;
3402
+ color: #3d3a5e;
3403
+ cursor: pointer;
3404
+ outline: none;
3405
+ border-radius: 12px;
3406
+ background: rgba(255, 255, 255, 0.75);
3407
+ backdrop-filter: blur(16px) saturate(1.4);
3408
+ -webkit-backdrop-filter: blur(16px) saturate(1.4);
3409
+ border: 1.5px solid rgba(180, 180, 195, 0.55);
3410
+ box-shadow: none;
3411
+ transition: border-color 0.2s ease, transform 0.15s ease, color 0.15s ease;
3412
+ }
3413
+ .fb:not(:disabled):hover {
3414
+ border-color: rgba(139, 92, 246, 0.5);
3415
+ color: #2a2060;
3416
+ transform: translateY(-1px);
3417
+ }
3418
+ .fb:not(:disabled):active { transform: scale(0.97); }
3419
+ .fb:disabled { opacity: 0.6; cursor: not-allowed; }
3420
+ .fb-rel { position: relative; z-index: 1; }
3421
+
3422
+ .dark .fb {
3423
+ background: rgba(15, 12, 40, 0.55);
3424
+ color: #c4b5fd;
3425
+ border-color: rgba(120, 110, 160, 0.5);
3426
+ }
3427
+ .dark .fb:not(:disabled):hover {
3428
+ border-color: rgba(139, 92, 246, 0.7);
3429
+ color: #ede9fe;
3430
+ }
3431
+
3432
+ /* ── 1. PING ── */
3433
+ .fb-ping { overflow: visible; }
3434
+ .fb-ping-wrap {
3435
+ position: absolute;
3436
+ top: -4px; right: -4px;
3437
+ width: 10px; height: 10px;
3438
+ pointer-events: none;
3439
+ }
3440
+ .fb-ping-dot {
3441
+ position: absolute; inset: 0;
3442
+ border-radius: 50%;
3443
+ background: #7c3aed;
3444
+ }
3445
+ .fb-ping-ring {
3446
+ position: absolute; inset: 0;
3447
+ border-radius: 50%;
3448
+ background: #7c3aed;
3449
+ animation: fb-ping 1.8s ease-out infinite;
3450
+ }
3451
+ @keyframes fb-ping {
3452
+ 0% { transform: scale(1); opacity: 1; }
3453
+ 70% { transform: scale(2.8); opacity: 0; }
3454
+ 100% { transform: scale(2.8); opacity: 0; }
3455
+ }
3456
+ .dark .fb-ping-dot,
3457
+ .dark .fb-ping-ring { background: #a78bfa; }
3458
+
3459
+ /* ── 2. SPOTLIGHT ── */
3460
+ .fb-spotlight-btn { overflow: hidden; }
3461
+ .fb-spotlight {
3462
+ position: absolute;
3463
+ top: 0; bottom: 0;
3464
+ left: -80%; width: 45%;
3465
+ background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,0.82) 50%, transparent 80%);
3466
+ transform: skewX(-15deg);
3467
+ pointer-events: none;
3468
+ z-index: 10;
3469
+ animation: fb-spotlight-sweep 2.4s ease-in-out infinite;
3470
+ animation-delay: 0.6s;
3471
+ }
3472
+ @keyframes fb-spotlight-sweep {
3473
+ 0% { left: -80%; }
3474
+ 100% { left: 130%; }
3475
+ }
3476
+
3477
+ /* ── 3. TYPEWRITER ── */
3478
+ .fb-typewriter-btn { overflow: hidden; }
3479
+ .fb-tw-wrap {
3480
+ position: relative;
3481
+ display: inline-flex;
3482
+ }
3483
+ .fb-tw-text {
3484
+ display: inline-block;
3485
+ overflow: hidden;
3486
+ white-space: nowrap;
3487
+ width: 0;
3488
+ animation: fb-typewriter 3.2s steps(10) infinite;
3489
+ vertical-align: bottom;
3490
+ }
3491
+ .fb-tw-measure {
3492
+ position: absolute;
3493
+ visibility: hidden;
3494
+ white-space: nowrap;
3495
+ pointer-events: none;
3496
+ }
3497
+ .fb-cursor {
3498
+ display: inline-block;
3499
+ width: 1.5px; height: 12px;
3500
+ background: #7c3aed;
3501
+ margin-left: 1px;
3502
+ vertical-align: middle;
3503
+ border-radius: 1px;
3504
+ animation: fb-cursor-blink 0.7s infinite;
3505
+ flex-shrink: 0;
3506
+ }
3507
+ @keyframes fb-typewriter {
3508
+ 0%, 15% { width: 0; }
3509
+ 60%, 85% { width: 100%; }
3510
+ 100% { width: 0; }
3511
+ }
3512
+ @keyframes fb-cursor-blink {
3513
+ 0%, 100% { opacity: 1; }
3514
+ 50% { opacity: 0; }
3515
+ }
3516
+ .dark .fb-cursor { background: #a78bfa; }
3517
+
3518
+ /* ── 4. MARCHING ANTS ── */
3519
+ .fb-marching-btn {
3520
+ border: none !important;
3521
+ background-image:
3522
+ repeating-linear-gradient(90deg, #7c3aed 0, #7c3aed 6px, transparent 6px, transparent 12px),
3523
+ repeating-linear-gradient(90deg, #7c3aed 0, #7c3aed 6px, transparent 6px, transparent 12px),
3524
+ repeating-linear-gradient(0deg, #7c3aed 0, #7c3aed 6px, transparent 6px, transparent 12px),
3525
+ repeating-linear-gradient(0deg, #7c3aed 0, #7c3aed 6px, transparent 6px, transparent 12px);
3526
+ background-size: 12px 1.5px, 12px 1.5px, 1.5px 12px, 1.5px 12px;
3527
+ background-position: 0 0, 0 100%, 0 0, 100% 0;
3528
+ background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
3529
+ animation: fb-march 0.6s linear infinite;
3530
+ }
3531
+ @keyframes fb-march {
3532
+ to { background-position: 100% 0, 0 100%, 0 0, 100% 100%; }
3533
+ }
3534
+ .dark .fb-marching-btn {
3535
+ background-image:
3536
+ repeating-linear-gradient(90deg, #a78bfa 0, #a78bfa 6px, transparent 6px, transparent 12px),
3537
+ repeating-linear-gradient(90deg, #a78bfa 0, #a78bfa 6px, transparent 6px, transparent 12px),
3538
+ repeating-linear-gradient(0deg, #a78bfa 0, #a78bfa 6px, transparent 6px, transparent 12px),
3539
+ repeating-linear-gradient(0deg, #a78bfa 0, #a78bfa 6px, transparent 6px, transparent 12px);
3540
+ }
3541
+
3542
+ /* ── 5. JELLY ── */
3543
+ .fb-jelly-btn {
3544
+ animation: fb-jelly 2.2s ease-in-out infinite;
3545
+ animation-delay: 0.5s;
3546
+ }
3547
+ @keyframes fb-jelly {
3548
+ 0%, 100% { transform: scale(1, 1); }
3549
+ 20% { transform: scale(1.15, 0.85); }
3550
+ 40% { transform: scale(0.9, 1.1); }
3551
+ 60% { transform: scale(1.05, 0.95); }
3552
+ 80% { transform: scale(0.98, 1.02); }
3553
+ }
3554
+
3555
+ /* ── 6. MAGNETIC ── */
3556
+ .fb-magnetic-text {
3557
+ display: inline-block;
3558
+ animation: fb-magnetic 2s ease-in-out infinite;
3559
+ }
3560
+ @keyframes fb-magnetic {
3561
+ 0%, 100% { letter-spacing: -0.01em; }
3562
+ 50% { letter-spacing: 0.08em; }
3563
+ }
3564
+
3565
+ /* ── 7. ORBIT ── */
3566
+ .fb-orbit { overflow: visible; }
3567
+ .fb-orbit-dot {
3568
+ position: absolute;
3569
+ top: 50%; left: 50%;
3570
+ width: 6px; height: 6px;
3571
+ margin: -3px 0 0 -3px;
3572
+ border-radius: 50%;
3573
+ background: #7c3aed;
3574
+ animation: fb-orbit 2.4s linear infinite;
3575
+ pointer-events: none;
3576
+ z-index: 2;
3577
+ }
3578
+ @keyframes fb-orbit {
3579
+ from { transform: rotate(0deg) translateX(28px) rotate(0deg); }
3580
+ to { transform: rotate(360deg) translateX(28px) rotate(-360deg); }
3581
+ }
3582
+ .dark .fb-orbit-dot { background: #a78bfa; }
3583
+
3584
+ /* ── 8. FILL WIPE ── */
3585
+ .fb-fillwipe-btn {
3586
+ overflow: hidden;
3587
+ border-color: rgba(124, 58, 237, 0.45);
3588
+ }
3589
+ .fb-fill-layer {
3590
+ position: absolute; inset: 0;
3591
+ background: rgba(124, 58, 237, 0.08);
3592
+ clip-path: inset(0 100% 0 0);
3593
+ animation: fb-fill-wipe 2.8s ease-in-out infinite;
3594
+ border-radius: 8px;
3595
+ pointer-events: none;
3596
+ z-index: 0;
3597
+ }
3598
+ @keyframes fb-fill-wipe {
3599
+ 0%, 100% { clip-path: inset(0 100% 0 0); }
3600
+ 40%, 70% { clip-path: inset(0 0% 0 0); }
3601
+ }
3602
+ .dark .fb-fill-layer { background: rgba(167, 139, 250, 0.12); }
3603
+
3604
+ /* ── 9. SIGNAL ── */
3605
+ .fb-signal {
3606
+ overflow: visible;
3607
+ border-color: rgba(124, 58, 237, 0.45);
3608
+ }
3609
+ .fb-wave {
3610
+ position: absolute;
3611
+ top: 50%; left: 50%;
3612
+ border-radius: 50%;
3613
+ border: 1.5px solid rgba(124, 58, 237, 0.45);
3614
+ animation: fb-wave-out 2s ease-out infinite;
3615
+ pointer-events: none;
3616
+ z-index: -1;
3617
+ }
3618
+ .fb-wave-2 { animation-delay: 0.65s; }
3619
+ .fb-wave-3 { animation-delay: 1.3s; }
3620
+ @keyframes fb-wave-out {
3621
+ 0% { width: 10px; height: 10px; opacity: 0.8; margin: -5px 0 0 -5px; }
3622
+ 100% { width: 60px; height: 40px; opacity: 0; margin: -20px 0 0 -30px; }
3623
+ }
3624
+ .dark .fb-wave { border-color: rgba(167, 139, 250, 0.4); }
3625
+
3626
+ /* ── 10. SHIMMY ── */
3627
+ .fb-shimmy-icon {
3628
+ display: inline-flex;
3629
+ transform-origin: bottom center;
3630
+ animation: fb-shimmy 1.8s ease-in-out infinite;
3631
+ }
3632
+ @keyframes fb-shimmy {
3633
+ 0%, 100% { transform: rotate(0deg); }
3634
+ 25% { transform: rotate(-8deg); }
3635
+ 75% { transform: rotate(8deg); }
3636
+ }
3637
+ ` }),
3638
+ /* @__PURE__ */ e.jsx(
3639
+ "button",
3640
+ {
3641
+ onClick: x ? void 0 : r,
3642
+ type: "button",
3643
+ title: b,
3644
+ disabled: x,
3645
+ className: [
3646
+ "fb",
3647
+ v[d],
3648
+ y,
3649
+ x && "opacity-60",
3650
+ u
3651
+ ].filter(Boolean).join(" "),
3652
+ children: w()
3653
+ }
3654
+ )
3655
+ ] });
3085
3656
  };
3657
+ function gt({
3658
+ sections: t = [],
3659
+ data: r = {},
3660
+ onSave: a,
3661
+ disabled: i = !1,
3662
+ title: x = "Editor",
3663
+ subtitle: b
3664
+ }) {
3665
+ const [d, u] = T(!1), [v, y] = T({}), [w, z] = T(null), [N, $] = T([]), [P, f] = T({}), [m, g] = T({}), [R, L] = T(!1), [Y, D] = T(!1), H = ((o) => {
3666
+ const S = [], l = (A) => {
3667
+ A.fields && A.fields.length > 0 && S.push(A), A.subsections && A.subsections.length > 0 && A.subsections.forEach(l);
3668
+ };
3669
+ return o.forEach(l), S;
3670
+ })(t);
3671
+ !w && H.length > 0 && z(H[0].name);
3672
+ const U = Object.values(P).some(Boolean), C = d ? v : r, O = H.find((o) => o.name === w), h = H.findIndex((o) => o.name === w), k = h < H.length - 1, M = h > 0, W = () => {
3673
+ let o = t;
3674
+ for (const S of N) {
3675
+ const l = o.find((A) => A.name === S.name);
3676
+ l && l.subsections && (o = l.subsections);
3677
+ }
3678
+ return o;
3679
+ }, F = (o, S = t, l = []) => {
3680
+ for (const A of S)
3681
+ if (A.subsections) {
3682
+ if (A.subsections.some((te) => te.name === o))
3683
+ return [...l, A];
3684
+ const q = F(o, A.subsections, [...l, A]);
3685
+ if (q) return q;
3686
+ }
3687
+ return null;
3688
+ }, p = () => {
3689
+ u(!0), y({ ...r }), f({}), g({});
3690
+ }, _ = () => {
3691
+ u(!1), y({}), f({}), g({});
3692
+ }, I = (o, S) => {
3693
+ y((A) => ({ ...A, [o]: S }));
3694
+ const l = H.find(
3695
+ (A) => A.fields.some((q) => q.name === o)
3696
+ );
3697
+ l && (f((A) => ({ ...A, [l.name]: !0 })), g((A) => ({ ...A, [l.name]: !1 })));
3698
+ }, G = () => {
3699
+ a == null || a(v), L(!0), f({});
3700
+ const o = H.reduce((S, l) => (S[l.name] = !0, S), {});
3701
+ g(o), setTimeout(() => L(!1), 3e3);
3702
+ }, J = () => {
3703
+ const o = H.find((l) => l.name === w);
3704
+ if (!o) return;
3705
+ const S = o.fields.reduce((l, A) => (l[A.name] = v[A.name], l), {});
3706
+ a == null || a({ ...r, ...S }), f((l) => ({ ...l, [w]: !1 })), g((l) => ({ ...l, [w]: !0 })), L(!0), setTimeout(() => L(!1), 3e3);
3707
+ }, s = () => {
3708
+ const o = H.find((l) => l.name === w);
3709
+ if (!o) return;
3710
+ const S = { ...v };
3711
+ o.fields.forEach((l) => {
3712
+ S[l.name] = "";
3713
+ }), y(S), a == null || a(S), f((l) => ({ ...l, [w]: !1 })), g((l) => ({ ...l, [w]: !0 })), D(!1), L(!0), setTimeout(() => L(!1), 3e3);
3714
+ }, n = () => {
3715
+ if (k) {
3716
+ const o = H[h + 1], S = F(o.name);
3717
+ $(S || []), z(o.name);
3718
+ }
3719
+ }, c = () => {
3720
+ if (M) {
3721
+ const o = H[h - 1], S = F(o.name);
3722
+ $(S || []), z(o.name);
3723
+ }
3724
+ }, j = (o) => {
3725
+ o.subsections && o.subsections.length > 0 ? $([...N, o]) : o.fields && o.fields.length > 0 && z(o.name);
3726
+ }, E = (o) => {
3727
+ $(o === -1 ? [] : N.slice(0, o + 1));
3728
+ }, B = (o) => o.subsections && o.subsections.length > 0;
3729
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3730
+ /* @__PURE__ */ e.jsxs("div", { className: "flex-1 flex flex-col h-full overflow-hidden", children: [
3731
+ /* @__PURE__ */ e.jsxs("div", { className: "flex-shrink-0 flex items-center justify-between px-8 py-6 border-b border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-800", children: [
3732
+ /* @__PURE__ */ e.jsxs("div", { children: [
3733
+ /* @__PURE__ */ e.jsxs("h4", { className: "font-bold text-2xl text-slate-900 dark:text-white flex items-center gap-3", children: [
3734
+ x,
3735
+ d && /* @__PURE__ */ e.jsx("span", { className: "px-3 py-1.5 bg-violet-100 text-violet-700 border border-violet-300 dark:bg-violet-600/20 dark:text-violet-300 dark:border-violet-500/40 text-xs font-bold uppercase tracking-wider rounded-lg shadow-sm", children: "Editing Mode" })
3736
+ ] }),
3737
+ /* @__PURE__ */ e.jsxs("p", { className: "text-sm text-slate-600 dark:text-slate-400 mt-2", children: [
3738
+ b || (d ? "Make changes to the fields below." : "View details. Click Edit to make changes."),
3739
+ d && U && /* @__PURE__ */ e.jsx("span", { className: "ml-3 text-amber-600 dark:text-amber-400 font-semibold", children: "• Unsaved changes" })
3740
+ ] })
3741
+ ] }),
3742
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-3", children: d ? /* @__PURE__ */ e.jsx(K, { icon: De, onClick: _, variant: "secondary", children: "View Mode" }) : !i && /* @__PURE__ */ e.jsx(K, { icon: ne, onClick: p, variant: "primary", children: "Edit Data" }) })
3743
+ ] }),
3744
+ /* @__PURE__ */ e.jsxs("div", { className: "flex-1 flex overflow-hidden min-h-0", children: [
3745
+ /* @__PURE__ */ e.jsx("div", { className: "w-72 border-r border-slate-200 dark:border-slate-700 bg-gradient-to-b from-slate-50 to-slate-100/50 dark:from-slate-900 dark:to-slate-900/50 overflow-y-auto flex-shrink-0", children: /* @__PURE__ */ e.jsxs("nav", { className: "p-4 space-y-1.5", children: [
3746
+ N.length > 0 && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3747
+ /* @__PURE__ */ e.jsxs(
3748
+ "button",
3749
+ {
3750
+ onClick: () => E(N.length - 2),
3751
+ className: "group w-full text-left px-4 py-3.5 rounded-xl transition-all duration-200 flex items-center gap-3 bg-white dark:bg-slate-800 hover:bg-gradient-to-r hover:from-violet-50 hover:to-indigo-50 dark:hover:from-violet-900/30 dark:hover:to-indigo-900/30 border border-slate-200 dark:border-slate-700 hover:border-violet-300 dark:hover:border-violet-600/50 mb-4 shadow-sm hover:shadow-md",
3752
+ children: [
3753
+ /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0 w-8 h-8 rounded-lg bg-slate-100 dark:bg-slate-700 group-hover:bg-gradient-to-br group-hover:from-violet-100 group-hover:to-indigo-100 dark:group-hover:from-violet-600/30 dark:group-hover:to-indigo-600/30 flex items-center justify-center transition-all duration-200 group-hover:scale-110", children: /* @__PURE__ */ e.jsx(xe, { className: "w-4 h-4 text-slate-600 dark:text-slate-400 group-hover:text-violet-600 dark:group-hover:text-violet-400" }) }),
3754
+ /* @__PURE__ */ e.jsxs("div", { className: "min-w-0 flex-1", children: [
3755
+ /* @__PURE__ */ e.jsx("div", { className: "text-sm font-bold text-slate-700 dark:text-slate-200 group-hover:text-violet-700 dark:group-hover:text-violet-300", children: "Back" }),
3756
+ /* @__PURE__ */ e.jsx("div", { className: "text-xs text-slate-500 dark:text-slate-400 truncate mt-0.5 group-hover:text-slate-600 dark:group-hover:text-slate-300", children: N.length === 1 ? "All Sections" : `${N[N.length - 1].number} ${N[N.length - 1].label}` })
3757
+ ] })
3758
+ ]
3759
+ }
3760
+ ),
3761
+ /* @__PURE__ */ e.jsx("div", { className: "h-px bg-gradient-to-r from-transparent via-slate-300 dark:via-slate-600 to-transparent mb-4" })
3762
+ ] }),
3763
+ W().map((o) => {
3764
+ const S = !B(o), l = S && w === o.name, A = S && !!P[o.name], q = S && !!m[o.name], te = S && o.fields ? o.fields.filter((ve) => C[ve.name] && C[ve.name] !== "").length : 0;
3765
+ return /* @__PURE__ */ e.jsxs(
3766
+ "button",
3767
+ {
3768
+ onClick: () => j(o),
3769
+ className: `w-full text-left px-4 py-4 rounded-xl transition-all duration-200 flex items-center justify-between group border ${l ? "bg-gradient-to-r from-violet-50 to-indigo-50 dark:from-violet-600 dark:to-indigo-700 text-violet-700 font-semibold shadow-sm ring-1 ring-violet-200 dark:ring-violet-500/30 border border-transparent" : "text-slate-600 dark:text-slate-400 hover:bg-slate-100 dark:hover:bg-slate-800 border border-transparent"}`,
3770
+ children: [
3771
+ /* @__PURE__ */ e.jsxs("div", { className: "min-w-0 flex-1", children: [
3772
+ /* @__PURE__ */ e.jsxs("div", { className: "text-base truncate flex items-center gap-2", children: [
3773
+ o.number && /* @__PURE__ */ e.jsx("span", { className: `font-bold flex-shrink-0 ${l ? "text-violet-600 dark:text-violet-400" : "text-slate-400"}`, children: o.number }),
3774
+ /* @__PURE__ */ e.jsx("span", { className: "truncate", children: o.label || o.name })
3775
+ ] }),
3776
+ S && o.fields && /* @__PURE__ */ e.jsxs("div", { className: `text-sm mt-1 font-normal flex items-center gap-2 ${l ? "text-violet-600 dark:text-violet-400" : "text-slate-400"}`, children: [
3777
+ /* @__PURE__ */ e.jsxs("span", { children: [
3778
+ te,
3779
+ "/",
3780
+ o.fields.length,
3781
+ " filled"
3782
+ ] }),
3783
+ A && !q && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3784
+ /* @__PURE__ */ e.jsx("span", { children: "•" }),
3785
+ /* @__PURE__ */ e.jsx("span", { className: "text-amber-600 dark:text-amber-400 font-medium", children: "Unsaved" })
3786
+ ] })
3787
+ ] })
3788
+ ] }),
3789
+ B(o) ? /* @__PURE__ */ e.jsx(se, { className: `w-5 h-5 flex-shrink-0 ml-3 ${l ? "text-white" : "text-slate-400 group-hover:text-slate-600 dark:group-hover:text-slate-300"}` }) : q ? /* @__PURE__ */ e.jsx(we, { className: "w-5 h-5 text-green-500 dark:text-green-400 flex-shrink-0 ml-3" }) : null
3790
+ ]
3791
+ },
3792
+ o.name
3793
+ );
3794
+ })
3795
+ ] }) }),
3796
+ /* @__PURE__ */ e.jsxs("div", { className: "flex-1 flex flex-col overflow-hidden bg-white dark:bg-slate-800", children: [
3797
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-8", children: O && /* @__PURE__ */ e.jsxs("div", { className: "max-w-5xl mx-auto", children: [
3798
+ /* @__PURE__ */ e.jsx("div", { className: "mb-10 pb-6 border-b-2 border-gradient-to-r from-violet-200 to-indigo-200 dark:from-violet-800 dark:to-indigo-800", children: /* @__PURE__ */ e.jsxs("h3", { className: "text-2xl font-bold text-slate-900 dark:text-slate-100 flex items-center gap-3", children: [
3799
+ O.number && /* @__PURE__ */ e.jsx("span", { className: "inline-flex items-center justify-center w-10 h-10 rounded-full bg-gradient-to-br from-violet-500 to-indigo-600 text-white font-black text-lg shadow-lg", children: O.number }),
3800
+ /* @__PURE__ */ e.jsx("span", { children: O.label || O.name })
3801
+ ] }) }),
3802
+ /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-1 xl:grid-cols-2 gap-x-16 gap-y-10", children: O.fields.map((o) => {
3803
+ const S = C[o.name], l = !S || S === "" || S === 0;
3804
+ return d ? /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
3805
+ /* @__PURE__ */ e.jsxs("label", { className: "flex items-center gap-2.5 text-sm font-bold text-slate-700 dark:text-slate-300 tracking-wide", children: [
3806
+ o.number && /* @__PURE__ */ e.jsx("span", { className: "inline-flex items-center justify-center min-w-[28px] h-7 px-2 rounded-md bg-gradient-to-br from-violet-100 to-indigo-100 dark:from-violet-900/40 dark:to-indigo-900/40 text-violet-700 dark:text-violet-300 font-black text-xs border border-violet-200 dark:border-violet-700", children: o.number }),
3807
+ /* @__PURE__ */ e.jsx("span", { children: o.label })
3808
+ ] }),
3809
+ /* @__PURE__ */ e.jsx(
3810
+ pe,
3811
+ {
3812
+ field: {
3813
+ ...o,
3814
+ disabled: !1,
3815
+ label: null
3816
+ },
3817
+ value: S || "",
3818
+ onChange: I,
3819
+ error: null
3820
+ }
3821
+ )
3822
+ ] }, o.name) : /* @__PURE__ */ e.jsxs("div", { className: "group", children: [
3823
+ /* @__PURE__ */ e.jsxs("label", { className: "flex items-center gap-2.5 text-sm font-bold text-slate-600 dark:text-slate-400 tracking-wide mb-3", children: [
3824
+ o.number && /* @__PURE__ */ e.jsx("span", { className: "inline-flex items-center justify-center min-w-[28px] h-7 px-2 rounded-md bg-gradient-to-br from-violet-100 to-indigo-100 dark:from-violet-900/40 dark:to-indigo-900/40 text-violet-700 dark:text-violet-300 font-black text-xs border border-violet-200 dark:border-violet-700", children: o.number }),
3825
+ /* @__PURE__ */ e.jsx("span", { children: o.label })
3826
+ ] }),
3827
+ /* @__PURE__ */ e.jsx(
3828
+ "div",
3829
+ {
3830
+ className: `text-base py-3 px-4 rounded-lg border-2 border-dashed ${l ? "text-slate-400 dark:text-slate-500 italic bg-slate-50/50 dark:bg-slate-900/30 border-slate-200 dark:border-slate-700" : "text-slate-900 dark:text-slate-100 font-medium bg-slate-50 dark:bg-slate-900/50 border-slate-300 dark:border-slate-600"}`,
3831
+ children: l ? "Not Provided" : S
3832
+ }
3833
+ )
3834
+ ] }, o.name);
3835
+ }) })
3836
+ ] }) }),
3837
+ d ? /* @__PURE__ */ e.jsxs("div", { className: "border-t-2 border-slate-200 dark:border-slate-700 px-8 py-5 bg-gradient-to-r from-slate-50 to-slate-100/50 dark:from-slate-900/50 dark:to-slate-900 flex items-center justify-between", children: [
3838
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
3839
+ /* @__PURE__ */ e.jsxs(
3840
+ "button",
3841
+ {
3842
+ onClick: () => D(!0),
3843
+ className: "flex items-center gap-2 text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 text-sm font-semibold px-5 py-2.5 rounded-lg hover:bg-red-50 dark:hover:bg-red-900/20 transition-all border-2 border-transparent hover:border-red-200 dark:hover:border-red-800",
3844
+ children: [
3845
+ /* @__PURE__ */ e.jsx(Be, { className: "w-4 h-4" }),
3846
+ " Clear Section"
3847
+ ]
3848
+ }
3849
+ ),
3850
+ /* @__PURE__ */ e.jsx(
3851
+ K,
3852
+ {
3853
+ icon: me,
3854
+ onClick: J,
3855
+ variant: "secondary",
3856
+ disabled: !P[w],
3857
+ children: "Save Section"
3858
+ }
3859
+ ),
3860
+ /* @__PURE__ */ e.jsx(K, { icon: me, onClick: G, variant: "primary", disabled: !U, children: "Save All Sections" })
3861
+ ] }),
3862
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
3863
+ /* @__PURE__ */ e.jsx(K, { icon: xe, onClick: c, variant: "secondary", disabled: !M, children: "Previous" }),
3864
+ /* @__PURE__ */ e.jsx(K, { icon: he, onClick: n, variant: "secondary", disabled: !k, children: "Next" })
3865
+ ] })
3866
+ ] }) : /* @__PURE__ */ e.jsxs("div", { className: "border-t-2 border-slate-200 dark:border-slate-700 px-8 py-5 bg-gradient-to-r from-slate-50 to-slate-100/50 dark:from-slate-900/50 dark:to-slate-900 flex items-center justify-between", children: [
3867
+ /* @__PURE__ */ e.jsx(K, { icon: xe, onClick: c, variant: "secondary", disabled: !M, children: "Previous Section" }),
3868
+ /* @__PURE__ */ e.jsx(K, { icon: he, onClick: n, variant: "secondary", disabled: !k, children: "Next Section" })
3869
+ ] })
3870
+ ] })
3871
+ ] })
3872
+ ] }),
3873
+ R && /* @__PURE__ */ e.jsx("div", { className: "fixed top-6 right-6 z-50 animate-in fade-in slide-in-from-top-2 duration-300", children: /* @__PURE__ */ e.jsxs("div", { className: "bg-white dark:bg-slate-800 border border-green-200 dark:border-green-700 rounded-xl shadow-xl px-5 py-4 flex items-center gap-4 min-w-[320px]", children: [
3874
+ /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0 w-10 h-10 bg-green-100 dark:bg-green-900/30 rounded-full flex items-center justify-center", children: /* @__PURE__ */ e.jsx(we, { className: "w-5 h-5 text-green-600 dark:text-green-500" }) }),
3875
+ /* @__PURE__ */ e.jsxs("div", { className: "flex-1", children: [
3876
+ /* @__PURE__ */ e.jsx("p", { className: "font-semibold text-base text-slate-900 dark:text-white", children: "Changes Saved!" }),
3877
+ /* @__PURE__ */ e.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400 mt-0.5", children: "Your progress has been saved successfully" })
3878
+ ] })
3879
+ ] }) }),
3880
+ /* @__PURE__ */ e.jsx(Ye, { isOpen: Y, onClose: () => D(!1), title: "Clear Section", size: "sm", children: /* @__PURE__ */ e.jsxs("div", { className: "p-6", children: [
3881
+ /* @__PURE__ */ e.jsxs("p", { className: "text-base text-slate-700 dark:text-slate-300 mb-6 leading-relaxed", children: [
3882
+ "Are you sure you want to clear all fields in",
3883
+ " ",
3884
+ /* @__PURE__ */ e.jsxs("span", { className: "font-bold text-violet-600 dark:text-violet-400", children: [
3885
+ (O == null ? void 0 : O.number) && `Section ${O.number}: `,
3886
+ (O == null ? void 0 : O.label) || w
3887
+ ] }),
3888
+ "? This action will be saved immediately."
3889
+ ] }),
3890
+ /* @__PURE__ */ e.jsxs("div", { className: "flex justify-end gap-3", children: [
3891
+ /* @__PURE__ */ e.jsx(
3892
+ Ce,
3893
+ {
3894
+ variant: "secondary",
3895
+ onClick: () => D(!1),
3896
+ children: "Cancel"
3897
+ }
3898
+ ),
3899
+ /* @__PURE__ */ e.jsx(
3900
+ Ce,
3901
+ {
3902
+ variant: "danger",
3903
+ onClick: s,
3904
+ children: "Yes, Clear & Save"
3905
+ }
3906
+ )
3907
+ ] })
3908
+ ] }) })
3909
+ ] });
3910
+ }
3086
3911
  export {
3087
- Ke as ActionButton,
3088
- Ze as DataTable,
3089
- it as DragDropList,
3090
- tt as DynamicForm,
3091
- at as DynamicFormMultiStep,
3092
- Ye as Footer,
3093
- je as FormField,
3094
- nt as HtmlContent,
3095
- Je as IconButton,
3096
- lt as Loader,
3097
- rt as ManagerLayout,
3098
- et as Modal,
3099
- ot as ModalErrorAlert,
3100
- Ue as Navbar,
3101
- Ge as PageHeader,
3102
- Xe as PrimaryButton,
3103
- Qe as SearchInput,
3104
- Fe as SelectModal,
3105
- st as SelectModalField,
3106
- qe as Sidebar,
3107
- De as Toggle,
3108
- Pe as UserMenu
3912
+ K as ActionButton,
3913
+ ht as Card,
3914
+ rt as DataTable,
3915
+ mt as DragDropList,
3916
+ lt as DynamicForm,
3917
+ ot as DynamicFormMultiStep,
3918
+ bt as DynamicTable,
3919
+ ut as FlashButton,
3920
+ Ze as Footer,
3921
+ pe as FormField,
3922
+ xt as HtmlContent,
3923
+ st as IconButton,
3924
+ dt as Loader,
3925
+ it as ManagerLayout,
3926
+ Ye as Modal,
3927
+ ct as ModalErrorAlert,
3928
+ Ke as Navbar,
3929
+ tt as PageHeader,
3930
+ Ce as PrimaryButton,
3931
+ at as SearchInput,
3932
+ gt as SectionEditor,
3933
+ Ge as SelectModal,
3934
+ nt as SelectModalField,
3935
+ et as Sidebar,
3936
+ Ue as Toggle,
3937
+ He as UserMenu
3109
3938
  };