proctoring-ui-3 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui-3.es.js +1911 -1081
- package/dist/ui-3.umd.js +350 -106
- package/package.json +4 -1
package/dist/ui-3.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Heart as
|
|
3
|
-
import { useNavigate as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
var
|
|
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 = {};
|
|
6
6
|
/**
|
|
7
7
|
* @license React
|
|
8
8
|
* react-jsx-runtime.production.js
|
|
@@ -12,29 +12,29 @@ var ce = { exports: {} }, ee = {};
|
|
|
12
12
|
* This source code is licensed under the MIT license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
14
14
|
*/
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
if (
|
|
18
|
-
|
|
15
|
+
var je;
|
|
16
|
+
function We() {
|
|
17
|
+
if (je) return ae;
|
|
18
|
+
je = 1;
|
|
19
19
|
var t = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
|
|
20
|
-
function
|
|
21
|
-
var
|
|
22
|
-
if (
|
|
23
|
-
|
|
24
|
-
for (var
|
|
25
|
-
|
|
26
|
-
} else
|
|
27
|
-
return
|
|
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, {
|
|
28
28
|
$$typeof: t,
|
|
29
|
-
type:
|
|
30
|
-
key:
|
|
31
|
-
ref:
|
|
32
|
-
props:
|
|
29
|
+
type: i,
|
|
30
|
+
key: d,
|
|
31
|
+
ref: x !== void 0 ? x : null,
|
|
32
|
+
props: b
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
return
|
|
35
|
+
return ae.Fragment = r, ae.jsx = a, ae.jsxs = a, ae;
|
|
36
36
|
}
|
|
37
|
-
var
|
|
37
|
+
var re = {};
|
|
38
38
|
/**
|
|
39
39
|
* @license React
|
|
40
40
|
* react-jsx-runtime.development.js
|
|
@@ -44,47 +44,47 @@ var te = {};
|
|
|
44
44
|
* This source code is licensed under the MIT license found in the
|
|
45
45
|
* LICENSE file in the root directory of this source tree.
|
|
46
46
|
*/
|
|
47
|
-
var
|
|
48
|
-
function
|
|
49
|
-
return
|
|
47
|
+
var Ne;
|
|
48
|
+
function Ie() {
|
|
49
|
+
return Ne || (Ne = 1, process.env.NODE_ENV !== "production" && function() {
|
|
50
50
|
function t(s) {
|
|
51
51
|
if (s == null) return null;
|
|
52
52
|
if (typeof s == "function")
|
|
53
|
-
return s.$$typeof ===
|
|
53
|
+
return s.$$typeof === h ? null : s.displayName || s.name || null;
|
|
54
54
|
if (typeof s == "string") return s;
|
|
55
55
|
switch (s) {
|
|
56
|
-
case
|
|
56
|
+
case m:
|
|
57
57
|
return "Fragment";
|
|
58
|
-
case
|
|
58
|
+
case R:
|
|
59
59
|
return "Profiler";
|
|
60
|
-
case
|
|
60
|
+
case g:
|
|
61
61
|
return "StrictMode";
|
|
62
|
-
case
|
|
62
|
+
case X:
|
|
63
63
|
return "Suspense";
|
|
64
|
-
case
|
|
64
|
+
case H:
|
|
65
65
|
return "SuspenseList";
|
|
66
|
-
case
|
|
66
|
+
case O:
|
|
67
67
|
return "Activity";
|
|
68
68
|
}
|
|
69
69
|
if (typeof s == "object")
|
|
70
70
|
switch (typeof s.tag == "number" && console.error(
|
|
71
71
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
72
72
|
), s.$$typeof) {
|
|
73
|
-
case
|
|
73
|
+
case f:
|
|
74
74
|
return "Portal";
|
|
75
|
-
case
|
|
75
|
+
case Y:
|
|
76
76
|
return s.displayName || "Context";
|
|
77
|
-
case
|
|
77
|
+
case L:
|
|
78
78
|
return (s._context.displayName || "Context") + ".Consumer";
|
|
79
|
-
case
|
|
80
|
-
var
|
|
81
|
-
return s = s.displayName, s || (s =
|
|
82
|
-
case
|
|
83
|
-
return
|
|
84
|
-
case
|
|
85
|
-
|
|
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;
|
|
86
86
|
try {
|
|
87
|
-
return t(s(
|
|
87
|
+
return t(s(n));
|
|
88
88
|
} catch {
|
|
89
89
|
}
|
|
90
90
|
}
|
|
@@ -93,77 +93,77 @@ function Oe() {
|
|
|
93
93
|
function r(s) {
|
|
94
94
|
return "" + s;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function a(s) {
|
|
97
97
|
try {
|
|
98
98
|
r(s);
|
|
99
|
-
var
|
|
99
|
+
var n = !1;
|
|
100
100
|
} catch {
|
|
101
|
-
|
|
101
|
+
n = !0;
|
|
102
102
|
}
|
|
103
|
-
if (
|
|
104
|
-
|
|
105
|
-
var
|
|
106
|
-
return
|
|
107
|
-
|
|
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,
|
|
108
108
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
109
|
-
|
|
109
|
+
j
|
|
110
110
|
), r(s);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
if (s ===
|
|
115
|
-
if (typeof s == "object" && s !== null && s.$$typeof ===
|
|
113
|
+
function i(s) {
|
|
114
|
+
if (s === m) return "<>";
|
|
115
|
+
if (typeof s == "object" && s !== null && s.$$typeof === C)
|
|
116
116
|
return "<...>";
|
|
117
117
|
try {
|
|
118
|
-
var
|
|
119
|
-
return
|
|
118
|
+
var n = t(s);
|
|
119
|
+
return n ? "<" + n + ">" : "<...>";
|
|
120
120
|
} catch {
|
|
121
121
|
return "<...>";
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
function
|
|
125
|
-
var s =
|
|
124
|
+
function x() {
|
|
125
|
+
var s = k.A;
|
|
126
126
|
return s === null ? null : s.getOwner();
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function b() {
|
|
129
129
|
return Error("react-stack-top-frame");
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
if (
|
|
133
|
-
var
|
|
134
|
-
if (
|
|
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;
|
|
135
135
|
}
|
|
136
136
|
return s.key !== void 0;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
function
|
|
140
|
-
|
|
138
|
+
function u(s, n) {
|
|
139
|
+
function c() {
|
|
140
|
+
p || (p = !0, console.error(
|
|
141
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)",
|
|
142
|
-
|
|
142
|
+
n
|
|
143
143
|
));
|
|
144
144
|
}
|
|
145
|
-
|
|
146
|
-
get:
|
|
145
|
+
c.isReactWarning = !0, Object.defineProperty(s, "key", {
|
|
146
|
+
get: c,
|
|
147
147
|
configurable: !0
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function v() {
|
|
151
151
|
var s = t(this.type);
|
|
152
|
-
return
|
|
152
|
+
return _[s] || (_[s] = !0, console.error(
|
|
153
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."
|
|
154
154
|
)), s = this.props.ref, s !== void 0 ? s : null;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
157
|
-
var
|
|
156
|
+
function y(s, n, c, j, E, B) {
|
|
157
|
+
var o = c.ref;
|
|
158
158
|
return s = {
|
|
159
|
-
$$typeof:
|
|
159
|
+
$$typeof: P,
|
|
160
160
|
type: s,
|
|
161
|
-
key:
|
|
162
|
-
props:
|
|
163
|
-
_owner:
|
|
164
|
-
}, (
|
|
161
|
+
key: n,
|
|
162
|
+
props: c,
|
|
163
|
+
_owner: j
|
|
164
|
+
}, (o !== void 0 ? o : null) !== null ? Object.defineProperty(s, "ref", {
|
|
165
165
|
enumerable: !1,
|
|
166
|
-
get:
|
|
166
|
+
get: v
|
|
167
167
|
}) : Object.defineProperty(s, "ref", { enumerable: !1, value: null }), s._store = {}, Object.defineProperty(s._store, "validated", {
|
|
168
168
|
configurable: !1,
|
|
169
169
|
enumerable: !1,
|
|
@@ -178,132 +178,132 @@ function Oe() {
|
|
|
178
178
|
configurable: !1,
|
|
179
179
|
enumerable: !1,
|
|
180
180
|
writable: !0,
|
|
181
|
-
value:
|
|
181
|
+
value: E
|
|
182
182
|
}), Object.defineProperty(s, "_debugTask", {
|
|
183
183
|
configurable: !1,
|
|
184
184
|
enumerable: !1,
|
|
185
185
|
writable: !0,
|
|
186
|
-
value:
|
|
186
|
+
value: B
|
|
187
187
|
}), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
|
|
188
188
|
}
|
|
189
|
-
function
|
|
190
|
-
var
|
|
191
|
-
if (
|
|
192
|
-
if (
|
|
193
|
-
if (
|
|
194
|
-
for (
|
|
195
|
-
|
|
196
|
-
Object.freeze && Object.freeze(
|
|
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);
|
|
197
197
|
} else
|
|
198
198
|
console.error(
|
|
199
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."
|
|
200
200
|
);
|
|
201
|
-
else
|
|
202
|
-
if (
|
|
203
|
-
|
|
204
|
-
var
|
|
205
|
-
return
|
|
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";
|
|
206
206
|
});
|
|
207
|
-
|
|
207
|
+
j = 0 < S.length ? "{key: someKey, " + S.join(": ..., ") + ": ...}" : "{key: someKey}", J[o + j] || (S = 0 < S.length ? "{" + S.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
208
208
|
`A props object containing a "key" prop is being spread into JSX:
|
|
209
209
|
let props = %s;
|
|
210
210
|
<%s {...props} />
|
|
211
211
|
React keys must be passed directly to JSX without using spread:
|
|
212
212
|
let props = %s;
|
|
213
213
|
<%s key={someKey} {...props} />`,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
),
|
|
214
|
+
j,
|
|
215
|
+
o,
|
|
216
|
+
S,
|
|
217
|
+
o
|
|
218
|
+
), J[o + j] = !0);
|
|
219
219
|
}
|
|
220
|
-
if (
|
|
221
|
-
|
|
222
|
-
for (var
|
|
223
|
-
|
|
224
|
-
} else
|
|
225
|
-
return
|
|
226
|
-
|
|
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,
|
|
227
227
|
typeof s == "function" ? s.displayName || s.name || "Unknown" : s
|
|
228
|
-
),
|
|
228
|
+
), y(
|
|
229
229
|
s,
|
|
230
|
-
L,
|
|
231
230
|
o,
|
|
232
|
-
c
|
|
233
|
-
|
|
234
|
-
|
|
231
|
+
c,
|
|
232
|
+
x(),
|
|
233
|
+
E,
|
|
234
|
+
B
|
|
235
235
|
);
|
|
236
236
|
}
|
|
237
|
-
function
|
|
238
|
-
|
|
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));
|
|
239
239
|
}
|
|
240
|
-
function
|
|
241
|
-
return typeof s == "object" && s !== null && s.$$typeof ===
|
|
240
|
+
function N(s) {
|
|
241
|
+
return typeof s == "object" && s !== null && s.$$typeof === P;
|
|
242
242
|
}
|
|
243
|
-
var
|
|
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() {
|
|
244
244
|
return null;
|
|
245
245
|
};
|
|
246
|
-
|
|
246
|
+
$ = {
|
|
247
247
|
react_stack_bottom_frame: function(s) {
|
|
248
248
|
return s();
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
var
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
)(),
|
|
255
|
-
|
|
256
|
-
var
|
|
257
|
-
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(
|
|
258
258
|
s,
|
|
259
|
-
|
|
260
|
-
|
|
259
|
+
n,
|
|
260
|
+
c,
|
|
261
261
|
!1,
|
|
262
|
-
|
|
263
|
-
|
|
262
|
+
j ? Error("react-stack-top-frame") : I,
|
|
263
|
+
j ? F(i(s)) : G
|
|
264
264
|
);
|
|
265
|
-
},
|
|
266
|
-
var
|
|
267
|
-
return
|
|
265
|
+
}, re.jsxs = function(s, n, c) {
|
|
266
|
+
var j = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
267
|
+
return w(
|
|
268
268
|
s,
|
|
269
|
-
|
|
270
|
-
|
|
269
|
+
n,
|
|
270
|
+
c,
|
|
271
271
|
!0,
|
|
272
|
-
|
|
273
|
-
|
|
272
|
+
j ? Error("react-stack-top-frame") : I,
|
|
273
|
+
j ? F(i(s)) : G
|
|
274
274
|
);
|
|
275
275
|
};
|
|
276
|
-
}()),
|
|
276
|
+
}()), re;
|
|
277
277
|
}
|
|
278
|
-
process.env.NODE_ENV === "production" ?
|
|
279
|
-
var e =
|
|
280
|
-
function
|
|
281
|
-
const
|
|
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 = [
|
|
282
282
|
{
|
|
283
|
-
icon:
|
|
283
|
+
icon: Me,
|
|
284
284
|
label: "Dashboard",
|
|
285
285
|
path: "/dashboard",
|
|
286
286
|
key: "dashboard"
|
|
287
287
|
},
|
|
288
288
|
{
|
|
289
|
-
icon:
|
|
289
|
+
icon: Le,
|
|
290
290
|
label: "Calendar",
|
|
291
291
|
path: "/calendar",
|
|
292
292
|
key: "calendar"
|
|
293
293
|
},
|
|
294
294
|
{
|
|
295
|
-
icon:
|
|
295
|
+
icon: ze,
|
|
296
296
|
label: "Admins",
|
|
297
297
|
path: "/admins",
|
|
298
298
|
key: "admins"
|
|
299
299
|
},
|
|
300
300
|
{
|
|
301
|
-
icon:
|
|
301
|
+
icon: Te,
|
|
302
302
|
label: "Settings",
|
|
303
303
|
path: "/settings",
|
|
304
304
|
key: "settings"
|
|
305
305
|
}
|
|
306
|
-
],
|
|
306
|
+
], v = x.length > 0 ? x : u, y = (w) => d.pathname === w;
|
|
307
307
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
308
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: [
|
|
309
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" }),
|
|
@@ -329,7 +329,7 @@ function Be({ text: t, link: r, linkText: n, year: l, navigationItems: c = [] })
|
|
|
329
329
|
) }),
|
|
330
330
|
/* @__PURE__ */ e.jsxs("span", { className: "text-sm text-slate-600 dark:text-slate-400", children: [
|
|
331
331
|
"© ",
|
|
332
|
-
|
|
332
|
+
i || (/* @__PURE__ */ new Date()).getFullYear()
|
|
333
333
|
] }),
|
|
334
334
|
/* @__PURE__ */ e.jsx(
|
|
335
335
|
"a",
|
|
@@ -338,7 +338,7 @@ function Be({ text: t, link: r, linkText: n, year: l, navigationItems: c = [] })
|
|
|
338
338
|
target: "_blank",
|
|
339
339
|
rel: "noopener noreferrer",
|
|
340
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",
|
|
341
|
-
children: t ||
|
|
341
|
+
children: t || a || "Footer Text"
|
|
342
342
|
}
|
|
343
343
|
)
|
|
344
344
|
] }),
|
|
@@ -361,7 +361,7 @@ function Be({ text: t, link: r, linkText: n, year: l, navigationItems: c = [] })
|
|
|
361
361
|
),
|
|
362
362
|
/* @__PURE__ */ e.jsxs("span", { className: "text-xs text-slate-500 dark:text-slate-500", children: [
|
|
363
363
|
"Made with ",
|
|
364
|
-
/* @__PURE__ */ e.jsx(
|
|
364
|
+
/* @__PURE__ */ e.jsx(Re, { className: "w-3 h-3 inline text-red-500 fill-red-500" })
|
|
365
365
|
] })
|
|
366
366
|
] })
|
|
367
367
|
] }) })
|
|
@@ -369,30 +369,30 @@ function Be({ text: t, link: r, linkText: n, year: l, navigationItems: c = [] })
|
|
|
369
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: [
|
|
370
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" }),
|
|
371
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" }),
|
|
372
|
-
/* @__PURE__ */ e.jsx("div", { className: "relative grid grid-cols-4 gap-1 px-2 py-2 pb-safe", children:
|
|
373
|
-
const
|
|
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);
|
|
374
374
|
return /* @__PURE__ */ e.jsxs(
|
|
375
375
|
"button",
|
|
376
376
|
{
|
|
377
|
-
onClick: () =>
|
|
378
|
-
className: `relative flex flex-col items-center justify-center py-2 px-1 rounded-2xl transition-all duration-300 group ${
|
|
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"}`,
|
|
379
379
|
children: [
|
|
380
|
-
|
|
381
|
-
/* @__PURE__ */ e.jsxs("div", { className: `relative mb-1 transition-transform duration-300 ${
|
|
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: [
|
|
382
382
|
/* @__PURE__ */ e.jsx(
|
|
383
|
-
|
|
383
|
+
N,
|
|
384
384
|
{
|
|
385
|
-
className: `w-6 h-6 transition-colors duration-300 ${
|
|
386
|
-
strokeWidth:
|
|
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
|
|
387
387
|
}
|
|
388
388
|
),
|
|
389
|
-
|
|
389
|
+
$ && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 rounded-full bg-white/20 animate-ping" })
|
|
390
390
|
] }),
|
|
391
|
-
/* @__PURE__ */ e.jsx("span", { className: `text-xs font-semibold transition-all duration-300 ${
|
|
392
|
-
|
|
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" })
|
|
393
393
|
]
|
|
394
394
|
},
|
|
395
|
-
|
|
395
|
+
w.key || z
|
|
396
396
|
);
|
|
397
397
|
}) }),
|
|
398
398
|
/* @__PURE__ */ e.jsx("div", { className: "h-safe-area-inset-bottom bg-white/50 dark:bg-slate-900/50" })
|
|
@@ -410,27 +410,27 @@ function Be({ text: t, link: r, linkText: n, year: l, navigationItems: c = [] })
|
|
|
410
410
|
` })
|
|
411
411
|
] });
|
|
412
412
|
}
|
|
413
|
-
const
|
|
414
|
-
const [
|
|
415
|
-
return
|
|
416
|
-
const
|
|
417
|
-
|
|
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);
|
|
418
418
|
};
|
|
419
|
-
return
|
|
420
|
-
}, [
|
|
419
|
+
return i && document.addEventListener("mousedown", y), () => document.removeEventListener("mousedown", y);
|
|
420
|
+
}, [i]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
421
421
|
/* @__PURE__ */ e.jsxs(
|
|
422
422
|
"button",
|
|
423
423
|
{
|
|
424
|
-
ref:
|
|
424
|
+
ref: u,
|
|
425
425
|
onClick: () => {
|
|
426
|
-
if (!
|
|
427
|
-
const
|
|
428
|
-
|
|
429
|
-
top:
|
|
430
|
-
right: window.innerWidth -
|
|
426
|
+
if (!i && u.current) {
|
|
427
|
+
const y = u.current.getBoundingClientRect();
|
|
428
|
+
d({
|
|
429
|
+
top: y.bottom + 6,
|
|
430
|
+
right: window.innerWidth - y.right
|
|
431
431
|
});
|
|
432
432
|
}
|
|
433
|
-
|
|
433
|
+
x(!i);
|
|
434
434
|
},
|
|
435
435
|
title: "Account",
|
|
436
436
|
className: `p-2 sm:p-2.5 rounded-xl transition-all duration-200
|
|
@@ -440,22 +440,22 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
440
440
|
hover:scale-105 active:scale-95
|
|
441
441
|
flex items-center gap-1`,
|
|
442
442
|
children: [
|
|
443
|
-
/* @__PURE__ */ e.jsx(
|
|
443
|
+
/* @__PURE__ */ e.jsx(Ee, { className: "w-[18px] h-[18px]" }),
|
|
444
444
|
/* @__PURE__ */ e.jsx(
|
|
445
|
-
|
|
445
|
+
le,
|
|
446
446
|
{
|
|
447
|
-
className: `w-3 h-3 text-slate-400 transition-transform duration-200 ${
|
|
447
|
+
className: `w-3 h-3 text-slate-400 transition-transform duration-200 ${i ? "rotate-180" : ""}`
|
|
448
448
|
}
|
|
449
449
|
)
|
|
450
450
|
]
|
|
451
451
|
}
|
|
452
452
|
),
|
|
453
|
-
|
|
453
|
+
i && be(
|
|
454
454
|
/* @__PURE__ */ e.jsxs(
|
|
455
455
|
"div",
|
|
456
456
|
{
|
|
457
|
-
ref:
|
|
458
|
-
style: { top:
|
|
457
|
+
ref: v,
|
|
458
|
+
style: { top: b.top, right: b.right },
|
|
459
459
|
className: `fixed w-48 rounded-xl border shadow-lg overflow-hidden z-[9999]
|
|
460
460
|
bg-white border-slate-200/60
|
|
461
461
|
dark:bg-slate-800 dark:border-slate-700/60
|
|
@@ -463,20 +463,20 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
463
463
|
children: [
|
|
464
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: [
|
|
465
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 }),
|
|
466
|
-
|
|
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 })
|
|
467
467
|
] }),
|
|
468
468
|
/* @__PURE__ */ e.jsxs(
|
|
469
469
|
"button",
|
|
470
470
|
{
|
|
471
471
|
onClick: () => {
|
|
472
|
-
|
|
472
|
+
x(!1), r();
|
|
473
473
|
},
|
|
474
474
|
className: `w-full flex items-center gap-2 px-3.5 py-2.5
|
|
475
475
|
text-sm font-medium text-red-600 dark:text-red-400
|
|
476
476
|
hover:bg-red-50 dark:hover:bg-red-900/20
|
|
477
477
|
transition-colors duration-150`,
|
|
478
478
|
children: [
|
|
479
|
-
/* @__PURE__ */ e.jsx(
|
|
479
|
+
/* @__PURE__ */ e.jsx(Se, { className: "w-4 h-4 flex-shrink-0" }),
|
|
480
480
|
"Logout"
|
|
481
481
|
]
|
|
482
482
|
}
|
|
@@ -487,61 +487,61 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
487
487
|
document.body
|
|
488
488
|
)
|
|
489
489
|
] });
|
|
490
|
-
},
|
|
490
|
+
}, Ke = ({
|
|
491
491
|
appIcon: t,
|
|
492
492
|
appName: r,
|
|
493
|
-
appShortName:
|
|
494
|
-
appTagline:
|
|
495
|
-
userName:
|
|
493
|
+
appShortName: a,
|
|
494
|
+
appTagline: i,
|
|
495
|
+
userName: x,
|
|
496
496
|
// <-- Taken from props!
|
|
497
|
-
userEmail:
|
|
497
|
+
userEmail: b,
|
|
498
498
|
// <-- Taken from props!
|
|
499
|
-
userRole:
|
|
500
|
-
onLogout:
|
|
499
|
+
userRole: d,
|
|
500
|
+
onLogout: u,
|
|
501
501
|
// <-- Added onLogout prop!
|
|
502
|
-
navLinks:
|
|
503
|
-
showAccessibility:
|
|
504
|
-
showUserInfo:
|
|
505
|
-
showLanguageSelector:
|
|
506
|
-
showThemeToggle:
|
|
507
|
-
showAppIcon:
|
|
508
|
-
showAppFullName:
|
|
509
|
-
showAppTagline:
|
|
510
|
-
showNavLinks:
|
|
511
|
-
rightContent:
|
|
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
|
|
512
512
|
}) => {
|
|
513
|
-
var
|
|
514
|
-
const
|
|
513
|
+
var S;
|
|
514
|
+
const R = fe(), [L, Y] = T(
|
|
515
515
|
localStorage.getItem("language") || "eng"
|
|
516
|
-
), [
|
|
517
|
-
|
|
518
|
-
const
|
|
519
|
-
|
|
520
|
-
}, []),
|
|
521
|
-
const
|
|
522
|
-
return window.addEventListener("scroll",
|
|
523
|
-
}, []),
|
|
524
|
-
|
|
525
|
-
}, [
|
|
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]);
|
|
526
526
|
const s = () => {
|
|
527
|
-
|
|
528
|
-
const
|
|
529
|
-
return
|
|
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;
|
|
530
530
|
});
|
|
531
|
-
},
|
|
532
|
-
|
|
531
|
+
}, n = (l) => {
|
|
532
|
+
Y(l), localStorage.setItem("language", l), U(!1);
|
|
533
533
|
};
|
|
534
|
-
|
|
535
|
-
document.documentElement.style.fontSize = `${
|
|
536
|
-
}, [
|
|
537
|
-
const
|
|
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 = {
|
|
538
538
|
eng: { label: "English", disabled: !1 },
|
|
539
539
|
hin: { label: "Hindi", disabled: !1 }
|
|
540
|
-
},
|
|
541
|
-
|
|
542
|
-
},
|
|
543
|
-
|
|
544
|
-
},
|
|
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);
|
|
545
545
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
546
546
|
/* @__PURE__ */ e.jsxs(
|
|
547
547
|
"nav",
|
|
@@ -551,7 +551,7 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
551
551
|
bg-white/95 dark:bg-slate-900/95 backdrop-blur-md
|
|
552
552
|
border-b border-slate-200/60 dark:border-slate-700/60
|
|
553
553
|
transition-all duration-300
|
|
554
|
-
${
|
|
554
|
+
${G ? "shadow-xl shadow-slate-200/50 dark:shadow-slate-950/50" : "shadow-sm shadow-slate-100/50 dark:shadow-slate-900/30"}
|
|
555
555
|
`,
|
|
556
556
|
children: [
|
|
557
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" }),
|
|
@@ -559,7 +559,7 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
559
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: [
|
|
560
560
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between h-14 sm:h-20", children: [
|
|
561
561
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 sm:gap-4 group flex-shrink-0", children: [
|
|
562
|
-
|
|
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(
|
|
563
563
|
"img",
|
|
564
564
|
{
|
|
565
565
|
src: t,
|
|
@@ -568,248 +568,248 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
568
568
|
}
|
|
569
569
|
) }),
|
|
570
570
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col leading-tight", children: [
|
|
571
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-extrabold text-base sm:text-xl text-slate-900 dark:text-white sm:hidden tracking-tight", children:
|
|
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 }),
|
|
572
572
|
/* @__PURE__ */ e.jsxs("div", { className: "hidden sm:flex flex-col", children: [
|
|
573
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-extrabold text-slate-900 dark:text-white tracking-tight text-lg lg:hidden", children:
|
|
574
|
-
|
|
575
|
-
|
|
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 })
|
|
576
576
|
] })
|
|
577
577
|
] })
|
|
578
578
|
] }),
|
|
579
|
-
|
|
580
|
-
var
|
|
581
|
-
return
|
|
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(
|
|
582
582
|
"a",
|
|
583
583
|
{
|
|
584
|
-
href:
|
|
585
|
-
target:
|
|
584
|
+
href: l.to,
|
|
585
|
+
target: l.target || "_self",
|
|
586
586
|
rel: "noopener noreferrer",
|
|
587
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",
|
|
588
|
-
children:
|
|
588
|
+
children: l.label
|
|
589
589
|
},
|
|
590
|
-
|
|
590
|
+
l.to
|
|
591
591
|
) : /* @__PURE__ */ e.jsxs(
|
|
592
|
-
|
|
592
|
+
de,
|
|
593
593
|
{
|
|
594
|
-
to:
|
|
595
|
-
target:
|
|
596
|
-
rel:
|
|
597
|
-
className: `relative px-4 lg:px-5 py-2.5 rounded-xl text-sm font-semibold tracking-wide transition-all duration-200 ${
|
|
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"}`,
|
|
598
598
|
children: [
|
|
599
|
-
|
|
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" })
|
|
601
601
|
]
|
|
602
602
|
},
|
|
603
|
-
|
|
603
|
+
l.to
|
|
604
604
|
) : null;
|
|
605
605
|
}) }),
|
|
606
606
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1.5 sm:gap-2", children: [
|
|
607
|
-
|
|
608
|
-
|
|
607
|
+
g && /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: g }),
|
|
608
|
+
y && /* @__PURE__ */ e.jsx(
|
|
609
609
|
"button",
|
|
610
610
|
{
|
|
611
|
-
onClick: () =>
|
|
611
|
+
onClick: () => X(!0),
|
|
612
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",
|
|
613
613
|
title: "Accessibility Settings",
|
|
614
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" }) })
|
|
615
615
|
}
|
|
616
616
|
),
|
|
617
|
-
|
|
617
|
+
N && /* @__PURE__ */ e.jsx(
|
|
618
618
|
"button",
|
|
619
619
|
{
|
|
620
620
|
onClick: s,
|
|
621
621
|
"aria-label": "Toggle theme",
|
|
622
|
-
title:
|
|
622
|
+
title: F ? "Switch to Light Mode" : "Switch to Dark Mode",
|
|
623
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",
|
|
624
|
-
children:
|
|
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" }) })
|
|
625
625
|
}
|
|
626
626
|
),
|
|
627
|
-
|
|
627
|
+
z && /* @__PURE__ */ e.jsxs(
|
|
628
628
|
"button",
|
|
629
629
|
{
|
|
630
|
-
onClick: () =>
|
|
630
|
+
onClick: () => U(!0),
|
|
631
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",
|
|
632
632
|
children: [
|
|
633
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" }) }),
|
|
634
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium", children: (
|
|
634
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium", children: (S = c[L]) == null ? void 0 : S.label })
|
|
635
635
|
]
|
|
636
636
|
}
|
|
637
637
|
),
|
|
638
|
-
|
|
638
|
+
z && /* @__PURE__ */ e.jsx(
|
|
639
639
|
"button",
|
|
640
640
|
{
|
|
641
|
-
onClick: () =>
|
|
641
|
+
onClick: () => U(!0),
|
|
642
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",
|
|
643
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" }) })
|
|
644
644
|
}
|
|
645
645
|
),
|
|
646
|
-
|
|
647
|
-
|
|
646
|
+
w && /* @__PURE__ */ e.jsx(
|
|
647
|
+
He,
|
|
648
648
|
{
|
|
649
|
-
user: { name:
|
|
650
|
-
onLogout:
|
|
649
|
+
user: { name: x, email: b },
|
|
650
|
+
onLogout: u,
|
|
651
651
|
showEmail: !0
|
|
652
652
|
}
|
|
653
653
|
),
|
|
654
|
-
|
|
654
|
+
m && v.length > 0 && /* @__PURE__ */ e.jsx(
|
|
655
655
|
"button",
|
|
656
656
|
{
|
|
657
|
-
onClick: () =>
|
|
658
|
-
"aria-label":
|
|
657
|
+
onClick: () => I((l) => !l),
|
|
658
|
+
"aria-label": _ ? "Close menu" : "Open menu",
|
|
659
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",
|
|
660
|
-
children:
|
|
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" }) })
|
|
661
661
|
}
|
|
662
662
|
)
|
|
663
663
|
] })
|
|
664
664
|
] }),
|
|
665
|
-
|
|
666
|
-
var
|
|
667
|
-
return
|
|
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(
|
|
668
668
|
"a",
|
|
669
669
|
{
|
|
670
|
-
href:
|
|
671
|
-
target:
|
|
670
|
+
href: l.to,
|
|
671
|
+
target: l.target || "_self",
|
|
672
672
|
rel: "noopener noreferrer",
|
|
673
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",
|
|
674
|
-
children:
|
|
674
|
+
children: l.label
|
|
675
675
|
},
|
|
676
|
-
|
|
676
|
+
l.to
|
|
677
677
|
) : /* @__PURE__ */ e.jsxs(
|
|
678
|
-
|
|
678
|
+
de,
|
|
679
679
|
{
|
|
680
|
-
to:
|
|
681
|
-
target:
|
|
682
|
-
rel:
|
|
683
|
-
className: `flex items-center justify-between px-3 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200 ${
|
|
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"}`,
|
|
684
684
|
children: [
|
|
685
|
-
|
|
686
|
-
|
|
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" })
|
|
687
687
|
]
|
|
688
688
|
},
|
|
689
|
-
|
|
689
|
+
l.to
|
|
690
690
|
) : null;
|
|
691
691
|
}) }) })
|
|
692
692
|
] })
|
|
693
693
|
]
|
|
694
694
|
}
|
|
695
695
|
),
|
|
696
|
-
|
|
696
|
+
D && /* Accessibility Modal (unchanged) */
|
|
697
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: [
|
|
698
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: [
|
|
699
699
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-3", children: [
|
|
700
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" }) }) }),
|
|
701
701
|
/* @__PURE__ */ e.jsx("h3", { className: "text-lg font-bold text-slate-900 dark:text-white", children: "Accessibility Settings" })
|
|
702
702
|
] }),
|
|
703
|
-
/* @__PURE__ */ e.jsx("button", { onClick: () =>
|
|
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" }) }) })
|
|
704
704
|
] }),
|
|
705
705
|
/* @__PURE__ */ e.jsxs("div", { className: "p-6 space-y-6", children: [
|
|
706
706
|
/* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
|
|
707
707
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
708
708
|
/* @__PURE__ */ e.jsx("span", { className: "text-sm font-semibold text-slate-700 dark:text-slate-300", children: "Font Size" }),
|
|
709
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: [
|
|
710
|
-
|
|
710
|
+
C,
|
|
711
711
|
"px"
|
|
712
712
|
] })
|
|
713
713
|
] }),
|
|
714
714
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
715
|
-
/* @__PURE__ */ e.jsx("button", { onClick:
|
|
716
|
-
/* @__PURE__ */ e.jsx("button", { onClick:
|
|
717
|
-
/* @__PURE__ */ e.jsx("button", { onClick:
|
|
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+" })
|
|
718
718
|
] })
|
|
719
719
|
] }),
|
|
720
720
|
/* @__PURE__ */ e.jsx("div", { className: "border-t border-slate-200 dark:border-slate-700" }),
|
|
721
721
|
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
722
722
|
/* @__PURE__ */ e.jsx("label", { className: "text-sm font-semibold text-slate-700 dark:text-slate-300", children: "Grayscale Mode" }),
|
|
723
|
-
/* @__PURE__ */ e.jsx("button", { onClick: () =>
|
|
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"}` }) })
|
|
724
724
|
] }),
|
|
725
725
|
/* @__PURE__ */ e.jsx("div", { className: "border-t border-slate-200 dark:border-slate-700" }),
|
|
726
726
|
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
727
727
|
/* @__PURE__ */ e.jsx("label", { className: "text-sm font-semibold text-slate-700 dark:text-slate-300", children: "Dyslexia-Friendly Font" }),
|
|
728
|
-
/* @__PURE__ */ e.jsx("button", { onClick: () =>
|
|
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"}` }) })
|
|
729
729
|
] })
|
|
730
730
|
] }),
|
|
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: () =>
|
|
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" }) })
|
|
732
732
|
] }) }) }),
|
|
733
|
-
|
|
733
|
+
H && /* Language Modal (unchanged) */
|
|
734
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: [
|
|
735
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: [
|
|
736
736
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-3", children: [
|
|
737
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" }) }) }),
|
|
738
738
|
/* @__PURE__ */ e.jsx("h3", { className: "text-lg font-bold text-slate-900 dark:text-white", children: "Select Language" })
|
|
739
739
|
] }),
|
|
740
|
-
/* @__PURE__ */ e.jsx("button", { onClick: () =>
|
|
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" }) }) })
|
|
741
741
|
] }),
|
|
742
|
-
/* @__PURE__ */ e.jsx("div", { className: "p-5", children: /* @__PURE__ */ e.jsx("ul", { className: "space-y-3", children: Object.keys(
|
|
743
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
744
|
-
|
|
745
|
-
] }) }) },
|
|
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: () =>
|
|
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" }) })
|
|
747
747
|
] }) }) })
|
|
748
748
|
] });
|
|
749
|
-
},
|
|
750
|
-
const
|
|
751
|
-
for (const
|
|
752
|
-
if (
|
|
753
|
-
const
|
|
754
|
-
(
|
|
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)
|
|
755
755
|
);
|
|
756
|
-
|
|
756
|
+
i(b.subItems), d && (a[b.name] = !0);
|
|
757
757
|
}
|
|
758
758
|
};
|
|
759
|
-
return
|
|
760
|
-
},
|
|
761
|
-
const [
|
|
762
|
-
() =>
|
|
763
|
-
),
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
...
|
|
767
|
-
...
|
|
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)
|
|
768
768
|
}));
|
|
769
|
-
}, [
|
|
770
|
-
const
|
|
771
|
-
|
|
769
|
+
}, [u.pathname, t]), Q(() => {
|
|
770
|
+
const m = (g) => {
|
|
771
|
+
d.current && !d.current.contains(g.target) && b(!1);
|
|
772
772
|
};
|
|
773
|
-
return
|
|
774
|
-
}, [
|
|
775
|
-
const
|
|
776
|
-
const
|
|
777
|
-
return
|
|
773
|
+
return x && document.addEventListener("mousedown", m), () => document.removeEventListener("mousedown", m);
|
|
774
|
+
}, [x]);
|
|
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: `
|
|
778
778
|
flex items-center gap-2.5
|
|
779
779
|
px-3 py-2 rounded-xl cursor-pointer
|
|
780
780
|
transition-all duration-150 group
|
|
781
|
-
${
|
|
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"}
|
|
782
782
|
`, children: [
|
|
783
783
|
/* @__PURE__ */ e.jsx("div", { className: `
|
|
784
784
|
w-6 h-6 rounded-lg flex items-center justify-center flex-shrink-0
|
|
785
|
-
${
|
|
786
|
-
`, children: /* @__PURE__ */ e.jsx(
|
|
787
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium leading-none", children:
|
|
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 })
|
|
788
788
|
] }) }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
789
789
|
/* @__PURE__ */ e.jsxs(
|
|
790
790
|
"div",
|
|
791
791
|
{
|
|
792
|
-
onClick: () =>
|
|
792
|
+
onClick: () => w(m.name),
|
|
793
793
|
className: `
|
|
794
794
|
flex items-center justify-between
|
|
795
795
|
px-3 py-2 rounded-xl cursor-pointer
|
|
796
796
|
transition-all duration-150 group
|
|
797
|
-
${
|
|
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"}
|
|
798
798
|
`,
|
|
799
799
|
children: [
|
|
800
800
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2.5", children: [
|
|
801
801
|
/* @__PURE__ */ e.jsx("div", { className: `
|
|
802
802
|
w-6 h-6 rounded-lg flex items-center justify-center flex-shrink-0
|
|
803
|
-
${
|
|
804
|
-
`, children: /* @__PURE__ */ e.jsx(
|
|
805
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-sm font-semibold leading-none", children:
|
|
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 })
|
|
806
806
|
] }),
|
|
807
807
|
/* @__PURE__ */ e.jsx(
|
|
808
808
|
"svg",
|
|
809
809
|
{
|
|
810
810
|
className: `w-3 h-3 flex-shrink-0 transition-transform duration-200
|
|
811
811
|
text-slate-400 dark:text-slate-500
|
|
812
|
-
${
|
|
812
|
+
${v[m.name] ? "rotate-90" : ""}`,
|
|
813
813
|
fill: "none",
|
|
814
814
|
stroke: "currentColor",
|
|
815
815
|
viewBox: "0 0 24 24",
|
|
@@ -819,39 +819,39 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
819
819
|
]
|
|
820
820
|
}
|
|
821
821
|
),
|
|
822
|
-
|
|
823
|
-
] }) }) : /* @__PURE__ */ e.jsx("div", { children:
|
|
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: `
|
|
824
824
|
flex items-center gap-2
|
|
825
825
|
px-2.5 py-1.5 rounded-lg cursor-pointer
|
|
826
826
|
transition-all duration-150 group
|
|
827
|
-
${
|
|
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"}
|
|
828
828
|
`, children: [
|
|
829
829
|
/* @__PURE__ */ e.jsx("div", { className: `w-1.5 h-1.5 rounded-full flex-shrink-0 transition-all duration-200
|
|
830
|
-
${
|
|
831
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-[13px] font-medium", children:
|
|
830
|
+
${L ? $ : P}` }),
|
|
831
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-[13px] font-medium", children: m.name })
|
|
832
832
|
] }) }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
833
833
|
/* @__PURE__ */ e.jsxs(
|
|
834
834
|
"div",
|
|
835
835
|
{
|
|
836
|
-
onClick: () =>
|
|
836
|
+
onClick: () => w(m.name),
|
|
837
837
|
className: `
|
|
838
838
|
flex items-center justify-between
|
|
839
839
|
px-2.5 py-1.5 rounded-lg cursor-pointer
|
|
840
840
|
transition-all duration-150 group
|
|
841
|
-
${
|
|
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"}
|
|
842
842
|
`,
|
|
843
843
|
children: [
|
|
844
844
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
845
845
|
/* @__PURE__ */ e.jsx("div", { className: `w-1.5 h-1.5 rounded-full flex-shrink-0 transition-all duration-200
|
|
846
|
-
${
|
|
847
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-[13px] font-medium", children:
|
|
846
|
+
${v[m.name] ? $ : P}` }),
|
|
847
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-[13px] font-medium", children: m.name })
|
|
848
848
|
] }),
|
|
849
849
|
/* @__PURE__ */ e.jsx(
|
|
850
850
|
"svg",
|
|
851
851
|
{
|
|
852
852
|
className: `w-3 h-3 flex-shrink-0 transition-transform duration-200
|
|
853
853
|
text-slate-400 dark:text-slate-500
|
|
854
|
-
${
|
|
854
|
+
${v[m.name] ? "rotate-90" : ""}`,
|
|
855
855
|
fill: "none",
|
|
856
856
|
stroke: "currentColor",
|
|
857
857
|
viewBox: "0 0 24 24",
|
|
@@ -861,7 +861,7 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
861
861
|
]
|
|
862
862
|
}
|
|
863
863
|
),
|
|
864
|
-
|
|
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)) })
|
|
865
865
|
] }) });
|
|
866
866
|
};
|
|
867
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: [
|
|
@@ -897,16 +897,16 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
897
897
|
{
|
|
898
898
|
className: "flex-1 overflow-y-auto space-y-0.5 custom-scrollbar",
|
|
899
899
|
"aria-label": "Main navigation",
|
|
900
|
-
children: t.map((
|
|
900
|
+
children: t.map((m) => /* @__PURE__ */ e.jsx(f, { item: m, depth: 0 }, m.name))
|
|
901
901
|
}
|
|
902
902
|
),
|
|
903
903
|
r && /* @__PURE__ */ e.jsxs(
|
|
904
904
|
"div",
|
|
905
905
|
{
|
|
906
|
-
ref:
|
|
906
|
+
ref: d,
|
|
907
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",
|
|
908
908
|
children: [
|
|
909
|
-
|
|
909
|
+
x && a && /* @__PURE__ */ e.jsx("div", { className: `
|
|
910
910
|
mb-1.5 rounded-xl overflow-hidden
|
|
911
911
|
bg-white dark:bg-slate-800
|
|
912
912
|
border border-red-100 dark:border-red-500/20
|
|
@@ -916,7 +916,7 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
916
916
|
"button",
|
|
917
917
|
{
|
|
918
918
|
onClick: () => {
|
|
919
|
-
|
|
919
|
+
a(), b(!1);
|
|
920
920
|
},
|
|
921
921
|
className: `
|
|
922
922
|
w-full flex items-center gap-2.5 px-3 py-2.5
|
|
@@ -925,7 +925,7 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
925
925
|
transition-colors duration-150
|
|
926
926
|
`,
|
|
927
927
|
children: [
|
|
928
|
-
/* @__PURE__ */ e.jsx(
|
|
928
|
+
/* @__PURE__ */ e.jsx(Se, { className: "w-3.5 h-3.5 flex-shrink-0" }),
|
|
929
929
|
"Sign out"
|
|
930
930
|
]
|
|
931
931
|
}
|
|
@@ -933,27 +933,27 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
933
933
|
/* @__PURE__ */ e.jsxs(
|
|
934
934
|
"button",
|
|
935
935
|
{
|
|
936
|
-
onClick: () =>
|
|
936
|
+
onClick: () => b((m) => !m),
|
|
937
937
|
className: `
|
|
938
938
|
w-full flex items-center gap-2.5
|
|
939
939
|
px-2.5 py-2 rounded-xl border
|
|
940
940
|
transition-all duration-150
|
|
941
|
-
${
|
|
941
|
+
${x ? "bg-violet-50 border-violet-200/60 dark:bg-violet-900/20 dark:border-violet-700/40" : "bg-slate-50/60 border-slate-200/50 hover:bg-violet-50 hover:border-violet-200/60 dark:bg-slate-800/40 dark:border-slate-700/50 dark:hover:bg-violet-900/20 dark:hover:border-violet-700/40"}
|
|
942
942
|
`,
|
|
943
943
|
children: [
|
|
944
944
|
/* @__PURE__ */ e.jsx("div", { className: `
|
|
945
945
|
w-7 h-7 rounded-lg flex-shrink-0
|
|
946
946
|
bg-gradient-to-br from-violet-600 to-indigo-600
|
|
947
947
|
flex items-center justify-center shadow-sm shadow-violet-500/20
|
|
948
|
-
`, children: /* @__PURE__ */ e.jsx(
|
|
948
|
+
`, children: /* @__PURE__ */ e.jsx(Ee, { className: "w-3.5 h-3.5 text-white" }) }),
|
|
949
949
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 text-left min-w-0", children: [
|
|
950
950
|
/* @__PURE__ */ e.jsx("p", { className: "text-[13px] font-semibold text-slate-900 dark:text-white truncate leading-none", children: r.username }),
|
|
951
951
|
/* @__PURE__ */ e.jsx("p", { className: "text-[11px] text-slate-400 dark:text-slate-500 truncate mt-0.5 leading-none", children: r.email })
|
|
952
952
|
] }),
|
|
953
|
-
/* @__PURE__ */ e.jsx(
|
|
953
|
+
/* @__PURE__ */ e.jsx(le, { className: `
|
|
954
954
|
w-3 h-3 flex-shrink-0 text-slate-400 dark:text-slate-500
|
|
955
955
|
transition-transform duration-200
|
|
956
|
-
${
|
|
956
|
+
${x ? "rotate-180" : ""}
|
|
957
957
|
` })
|
|
958
958
|
]
|
|
959
959
|
}
|
|
@@ -970,15 +970,15 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
970
970
|
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgb(148 163 184); }
|
|
971
971
|
` })
|
|
972
972
|
] });
|
|
973
|
-
},
|
|
973
|
+
}, tt = ({
|
|
974
974
|
icon: t,
|
|
975
975
|
title: r,
|
|
976
|
-
subtitle:
|
|
977
|
-
badge:
|
|
978
|
-
actions:
|
|
979
|
-
searchBar:
|
|
980
|
-
onIconClick:
|
|
981
|
-
iconTitle:
|
|
976
|
+
subtitle: a,
|
|
977
|
+
badge: i,
|
|
978
|
+
actions: x,
|
|
979
|
+
searchBar: b,
|
|
980
|
+
onIconClick: d,
|
|
981
|
+
iconTitle: u
|
|
982
982
|
}) => /* @__PURE__ */ e.jsxs(
|
|
983
983
|
"div",
|
|
984
984
|
{
|
|
@@ -1009,14 +1009,14 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1009
1009
|
flex items-center justify-center
|
|
1010
1010
|
shadow-md shadow-violet-200/40 dark:shadow-violet-900/30
|
|
1011
1011
|
transition-all duration-200
|
|
1012
|
-
${
|
|
1012
|
+
${d ? "cursor-pointer hover:scale-110 hover:shadow-lg active:scale-95" : "hover:scale-105"}
|
|
1013
1013
|
`,
|
|
1014
|
-
onClick:
|
|
1015
|
-
title:
|
|
1016
|
-
role:
|
|
1017
|
-
tabIndex:
|
|
1018
|
-
onKeyDown:
|
|
1019
|
-
(
|
|
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());
|
|
1020
1020
|
} : void 0,
|
|
1021
1021
|
children: /* @__PURE__ */ e.jsx(t, { className: "w-[18px] h-[18px] sm:w-5 sm:h-5 text-white" })
|
|
1022
1022
|
}
|
|
@@ -1025,17 +1025,17 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1025
1025
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
1026
1026
|
/* @__PURE__ */ e.jsx("h2", { className: `text-base sm:text-lg font-bold tracking-tight
|
|
1027
1027
|
text-slate-900 dark:text-white leading-tight truncate`, children: r }),
|
|
1028
|
-
|
|
1028
|
+
i && /* @__PURE__ */ e.jsx("span", { className: `
|
|
1029
1029
|
inline-flex items-center px-2 py-0.5 rounded-full
|
|
1030
1030
|
text-[11px] font-semibold tracking-wide
|
|
1031
1031
|
bg-violet-100 text-violet-700
|
|
1032
1032
|
border border-violet-200/50
|
|
1033
1033
|
dark:bg-violet-600/50 dark:text-violet-400 dark:border-violet-500/30
|
|
1034
|
-
`, children:
|
|
1034
|
+
`, children: i })
|
|
1035
1035
|
] }),
|
|
1036
|
-
|
|
1036
|
+
a && /* @__PURE__ */ e.jsx("p", { className: "mt-0.5 text-xs text-slate-500 dark:text-slate-400 leading-snug truncate", children: a })
|
|
1037
1037
|
] }),
|
|
1038
|
-
|
|
1038
|
+
x && /* @__PURE__ */ e.jsx("div", { className: `
|
|
1039
1039
|
flex-shrink-0
|
|
1040
1040
|
flex items-center gap-1.5
|
|
1041
1041
|
overflow-x-auto sm:overflow-x-visible
|
|
@@ -1045,31 +1045,31 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1045
1045
|
sm:max-w-none
|
|
1046
1046
|
sm:flex-wrap
|
|
1047
1047
|
[&::-webkit-scrollbar]:hidden
|
|
1048
|
-
`, children:
|
|
1048
|
+
`, children: x })
|
|
1049
1049
|
] }),
|
|
1050
|
-
|
|
1050
|
+
b && /* @__PURE__ */ e.jsx("div", { className: "mt-3 pt-3 border-t border-slate-200/40 dark:border-slate-700/50", children: b })
|
|
1051
1051
|
] })
|
|
1052
1052
|
]
|
|
1053
1053
|
}
|
|
1054
|
-
),
|
|
1054
|
+
), st = ({
|
|
1055
1055
|
icon: t,
|
|
1056
1056
|
onClick: r,
|
|
1057
|
-
title:
|
|
1058
|
-
variant:
|
|
1059
|
-
size:
|
|
1057
|
+
title: a,
|
|
1058
|
+
variant: i = "secondary",
|
|
1059
|
+
size: x = "md"
|
|
1060
1060
|
// sm | md
|
|
1061
1061
|
}) => {
|
|
1062
|
-
const
|
|
1062
|
+
const b = {
|
|
1063
1063
|
secondary: `bg-white hover:bg-slate-50 text-slate-700 border border-slate-200 shadow-sm
|
|
1064
1064
|
dark:bg-slate-700/50 dark:hover:bg-slate-700 dark:text-slate-300 dark:border-slate-600/50`,
|
|
1065
1065
|
danger: `bg-white hover:bg-red-50 text-slate-500 hover:text-red-600 border border-slate-200 shadow-sm
|
|
1066
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`,
|
|
1067
1067
|
primary: `bg-violet-100 hover:bg-violet-200 text-violet-700 border border-violet-200 shadow-sm
|
|
1068
1068
|
dark:bg-violet-600/20 dark:hover:bg-violet-600/30 dark:text-violet-400 dark:border-violet-500/30`
|
|
1069
|
-
},
|
|
1069
|
+
}, d = {
|
|
1070
1070
|
sm: "p-1.5",
|
|
1071
1071
|
md: "p-2 sm:p-2.5"
|
|
1072
|
-
},
|
|
1072
|
+
}, u = {
|
|
1073
1073
|
sm: "w-3.5 h-3.5",
|
|
1074
1074
|
md: "w-4 h-4 sm:w-[18px] sm:h-[18px]"
|
|
1075
1075
|
};
|
|
@@ -1077,70 +1077,70 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1077
1077
|
"button",
|
|
1078
1078
|
{
|
|
1079
1079
|
onClick: r,
|
|
1080
|
-
title:
|
|
1081
|
-
"aria-label":
|
|
1080
|
+
title: a,
|
|
1081
|
+
"aria-label": a,
|
|
1082
1082
|
className: `
|
|
1083
1083
|
rounded-xl transition-all duration-200
|
|
1084
|
-
${x
|
|
1085
|
-
${
|
|
1084
|
+
${d[x]}
|
|
1085
|
+
${b[i] ?? b.secondary}
|
|
1086
1086
|
hover:scale-105 active:scale-95
|
|
1087
1087
|
`,
|
|
1088
|
-
children: /* @__PURE__ */ e.jsx(t, { className:
|
|
1088
|
+
children: /* @__PURE__ */ e.jsx(t, { className: u[x] })
|
|
1089
1089
|
}
|
|
1090
1090
|
);
|
|
1091
|
-
},
|
|
1091
|
+
}, Ce = ({
|
|
1092
1092
|
children: t,
|
|
1093
1093
|
icon: r,
|
|
1094
|
-
iconPosition:
|
|
1095
|
-
disabled:
|
|
1096
|
-
onClick:
|
|
1097
|
-
variant:
|
|
1098
|
-
loading:
|
|
1099
|
-
size:
|
|
1094
|
+
iconPosition: a = "left",
|
|
1095
|
+
disabled: i = !1,
|
|
1096
|
+
onClick: x,
|
|
1097
|
+
variant: b = "primary",
|
|
1098
|
+
loading: d = !1,
|
|
1099
|
+
size: u = "md",
|
|
1100
1100
|
// sm | md | lg
|
|
1101
|
-
className:
|
|
1102
|
-
...
|
|
1101
|
+
className: v = "",
|
|
1102
|
+
...y
|
|
1103
1103
|
}) => {
|
|
1104
|
-
const
|
|
1104
|
+
const w = {
|
|
1105
1105
|
sm: "px-3 py-1.5 text-xs rounded-lg gap-1.5",
|
|
1106
1106
|
md: "px-4 py-2 sm:px-5 sm:py-2.5 text-sm rounded-xl gap-2",
|
|
1107
1107
|
lg: "px-5 py-2.5 sm:px-6 sm:py-3 text-sm sm:text-base rounded-xl gap-2"
|
|
1108
|
-
},
|
|
1108
|
+
}, z = {
|
|
1109
1109
|
sm: "w-3.5 h-3.5",
|
|
1110
1110
|
md: "w-4 h-4",
|
|
1111
1111
|
lg: "w-4 h-4 sm:w-5 sm:h-5"
|
|
1112
|
-
},
|
|
1113
|
-
primary:
|
|
1114
|
-
secondary:
|
|
1115
|
-
danger:
|
|
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"
|
|
1116
1116
|
};
|
|
1117
1117
|
return /* @__PURE__ */ e.jsxs(
|
|
1118
1118
|
"button",
|
|
1119
1119
|
{
|
|
1120
|
-
disabled:
|
|
1121
|
-
onClick:
|
|
1120
|
+
disabled: i || d,
|
|
1121
|
+
onClick: i || d ? void 0 : x,
|
|
1122
1122
|
className: `
|
|
1123
1123
|
inline-flex items-center justify-center font-semibold whitespace-nowrap
|
|
1124
1124
|
transition-all duration-200
|
|
1125
|
-
${
|
|
1126
|
-
${
|
|
1127
|
-
${
|
|
1125
|
+
${w[u]}
|
|
1126
|
+
${N[b]}
|
|
1127
|
+
${v}
|
|
1128
1128
|
`,
|
|
1129
|
-
...
|
|
1129
|
+
...y,
|
|
1130
1130
|
children: [
|
|
1131
|
-
r &&
|
|
1132
|
-
|
|
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
|
|
1133
1133
|
border-2 border-white/30 border-t-white` }),
|
|
1134
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
1135
|
-
r &&
|
|
1134
|
+
/* @__PURE__ */ e.jsx("span", { children: d ? "Loading..." : t }),
|
|
1135
|
+
r && a === "right" && !d && /* @__PURE__ */ e.jsx(r, { className: `${z[u]} flex-shrink-0` })
|
|
1136
1136
|
]
|
|
1137
1137
|
}
|
|
1138
1138
|
);
|
|
1139
|
-
},
|
|
1139
|
+
}, at = ({
|
|
1140
1140
|
value: t,
|
|
1141
1141
|
onChange: r,
|
|
1142
|
-
placeholder:
|
|
1143
|
-
onClear:
|
|
1142
|
+
placeholder: a = "Search...",
|
|
1143
|
+
onClear: i
|
|
1144
1144
|
}) => /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
1145
1145
|
/* @__PURE__ */ e.jsx(
|
|
1146
1146
|
"svg",
|
|
@@ -1164,73 +1164,73 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1164
1164
|
"input",
|
|
1165
1165
|
{
|
|
1166
1166
|
type: "text",
|
|
1167
|
-
placeholder:
|
|
1167
|
+
placeholder: a,
|
|
1168
1168
|
value: t,
|
|
1169
1169
|
onChange: r,
|
|
1170
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"
|
|
1171
1171
|
}
|
|
1172
1172
|
),
|
|
1173
|
-
t &&
|
|
1173
|
+
t && i && /* @__PURE__ */ e.jsx(
|
|
1174
1174
|
"button",
|
|
1175
1175
|
{
|
|
1176
|
-
onClick:
|
|
1176
|
+
onClick: i,
|
|
1177
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",
|
|
1178
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" }) })
|
|
1179
1179
|
}
|
|
1180
1180
|
)
|
|
1181
|
-
] }),
|
|
1181
|
+
] }), rt = ({
|
|
1182
1182
|
columns: t,
|
|
1183
1183
|
data: r,
|
|
1184
|
-
onSort:
|
|
1185
|
-
sortConfig:
|
|
1186
|
-
emptyMessage:
|
|
1187
|
-
emptyDescription:
|
|
1188
|
-
emptyIcon:
|
|
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
|
|
1189
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: [
|
|
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:
|
|
1191
|
-
/* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-slate-900 dark:text-slate-300 mb-2", children:
|
|
1192
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children:
|
|
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 })
|
|
1193
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: [
|
|
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((
|
|
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(
|
|
1195
1195
|
"th",
|
|
1196
1196
|
{
|
|
1197
|
-
onClick: () =>
|
|
1197
|
+
onClick: () => u.sortable && a && a(u.key),
|
|
1198
1198
|
className: `
|
|
1199
1199
|
px-6 py-4 text-left text-xs font-semibold text-slate-700 dark:text-slate-300 uppercase tracking-wider
|
|
1200
|
-
${
|
|
1200
|
+
${u.sortable ? "cursor-pointer select-none hover:bg-slate-100 dark:hover:bg-slate-700/50" : ""}
|
|
1201
1201
|
`,
|
|
1202
1202
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
1203
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
1204
|
-
|
|
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" ? "↑" : "↓" })
|
|
1205
1205
|
] })
|
|
1206
1206
|
},
|
|
1207
|
-
|
|
1207
|
+
u.key
|
|
1208
1208
|
)) }) }),
|
|
1209
|
-
/* @__PURE__ */ e.jsx("tbody", { className: "divide-y divide-slate-200 dark:divide-slate-700", children: r.map((
|
|
1209
|
+
/* @__PURE__ */ e.jsx("tbody", { className: "divide-y divide-slate-200 dark:divide-slate-700", children: r.map((u, v) => /* @__PURE__ */ e.jsx(
|
|
1210
1210
|
"tr",
|
|
1211
1211
|
{
|
|
1212
1212
|
className: "hover:bg-slate-50 dark:hover:bg-slate-800/30 transition-colors",
|
|
1213
|
-
children: t.map((
|
|
1213
|
+
children: t.map((y) => /* @__PURE__ */ e.jsx(
|
|
1214
1214
|
"td",
|
|
1215
1215
|
{
|
|
1216
1216
|
className: "px-6 py-4 whitespace-nowrap text-sm",
|
|
1217
|
-
children:
|
|
1217
|
+
children: y.render ? y.render(u) : u[y.key]
|
|
1218
1218
|
},
|
|
1219
|
-
|
|
1219
|
+
y.key
|
|
1220
1220
|
))
|
|
1221
1221
|
},
|
|
1222
|
-
|
|
1222
|
+
u.id || v
|
|
1223
1223
|
)) })
|
|
1224
|
-
] }) }) }),
|
|
1224
|
+
] }) }) }), K = ({
|
|
1225
1225
|
icon: t,
|
|
1226
1226
|
onClick: r,
|
|
1227
|
-
children:
|
|
1228
|
-
variant:
|
|
1229
|
-
disabled:
|
|
1230
|
-
title:
|
|
1231
|
-
size:
|
|
1227
|
+
children: a,
|
|
1228
|
+
variant: i = "primary",
|
|
1229
|
+
disabled: x = !1,
|
|
1230
|
+
title: b = "",
|
|
1231
|
+
size: d = "md"
|
|
1232
1232
|
}) => {
|
|
1233
|
-
const
|
|
1233
|
+
const u = {
|
|
1234
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",
|
|
1235
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",
|
|
1236
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",
|
|
@@ -1245,10 +1245,10 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1245
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",
|
|
1246
1246
|
rainbow: "action-btn-rainbow",
|
|
1247
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"
|
|
1248
|
-
},
|
|
1248
|
+
}, v = {
|
|
1249
1249
|
sm: "px-2.5 py-1.5 text-xs gap-1",
|
|
1250
1250
|
md: "px-3 py-1.5 sm:px-3.5 sm:py-2 text-sm gap-1.5"
|
|
1251
|
-
},
|
|
1251
|
+
}, y = x ? u.disabled : u[i] ?? u.primary;
|
|
1252
1252
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1253
1253
|
/* @__PURE__ */ e.jsx("style", { children: `
|
|
1254
1254
|
@property --beam-angle {
|
|
@@ -1336,60 +1336,60 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1336
1336
|
/* @__PURE__ */ e.jsxs(
|
|
1337
1337
|
"button",
|
|
1338
1338
|
{
|
|
1339
|
-
onClick:
|
|
1339
|
+
onClick: x ? void 0 : r,
|
|
1340
1340
|
type: "button",
|
|
1341
|
-
title:
|
|
1342
|
-
disabled:
|
|
1341
|
+
title: b,
|
|
1342
|
+
disabled: x,
|
|
1343
1343
|
className: `
|
|
1344
1344
|
inline-flex items-center justify-center relative
|
|
1345
|
-
${
|
|
1345
|
+
${v[d]}
|
|
1346
1346
|
rounded-xl font-semibold whitespace-nowrap
|
|
1347
1347
|
transition-all duration-200
|
|
1348
|
-
${
|
|
1349
|
-
${
|
|
1348
|
+
${y}
|
|
1349
|
+
${x ? "opacity-60" : "active:scale-95"}
|
|
1350
1350
|
`,
|
|
1351
1351
|
children: [
|
|
1352
1352
|
t && /* @__PURE__ */ e.jsx(t, { className: "w-3.5 h-3.5 flex-shrink-0" }),
|
|
1353
|
-
|
|
1353
|
+
a && /* @__PURE__ */ e.jsx("span", { children: a })
|
|
1354
1354
|
]
|
|
1355
1355
|
}
|
|
1356
1356
|
)
|
|
1357
1357
|
] });
|
|
1358
|
-
},
|
|
1358
|
+
}, Ye = ({
|
|
1359
1359
|
isOpen: t,
|
|
1360
1360
|
onClose: r,
|
|
1361
|
-
title:
|
|
1362
|
-
subtitle:
|
|
1363
|
-
icon:
|
|
1364
|
-
children:
|
|
1365
|
-
size:
|
|
1366
|
-
fullscreen:
|
|
1367
|
-
hideHeader:
|
|
1361
|
+
title: a,
|
|
1362
|
+
subtitle: i,
|
|
1363
|
+
icon: x,
|
|
1364
|
+
children: b,
|
|
1365
|
+
size: d = "md",
|
|
1366
|
+
fullscreen: u = !1,
|
|
1367
|
+
hideHeader: v = !1
|
|
1368
1368
|
}) => {
|
|
1369
|
-
if (
|
|
1370
|
-
const
|
|
1371
|
-
|
|
1369
|
+
if (Q(() => {
|
|
1370
|
+
const z = (N) => {
|
|
1371
|
+
N.key === "Escape" && r();
|
|
1372
1372
|
};
|
|
1373
|
-
return t && (document.addEventListener("keydown",
|
|
1374
|
-
document.removeEventListener("keydown",
|
|
1373
|
+
return t && (document.addEventListener("keydown", z), document.body.style.overflow = "hidden"), () => {
|
|
1374
|
+
document.removeEventListener("keydown", z), document.body.style.overflow = "unset";
|
|
1375
1375
|
};
|
|
1376
1376
|
}, [t, r]), !t) return null;
|
|
1377
|
-
const
|
|
1377
|
+
const y = {
|
|
1378
1378
|
sm: "max-w-md",
|
|
1379
1379
|
md: "max-w-2xl",
|
|
1380
1380
|
lg: "max-w-4xl",
|
|
1381
1381
|
xl: "max-w-6xl"
|
|
1382
|
-
},
|
|
1382
|
+
}, w = /* @__PURE__ */ e.jsx("div", { className: `flex-shrink-0 px-4 py-3 sm:px-5 sm:py-4
|
|
1383
1383
|
bg-gradient-to-r from-violet-50 via-indigo-50 to-violet-50
|
|
1384
1384
|
dark:from-slate-700/50 dark:via-slate-800/50 dark:to-slate-700/50
|
|
1385
1385
|
border-b border-slate-200 dark:border-slate-700`, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
1386
1386
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2.5 sm:gap-3 min-w-0", children: [
|
|
1387
|
-
|
|
1387
|
+
x && /* @__PURE__ */ e.jsx("div", { className: `flex-shrink-0 w-9 h-9 sm:w-10 sm:h-10 rounded-xl
|
|
1388
1388
|
flex items-center justify-center
|
|
1389
|
-
bg-gradient-to-br from-violet-600 to-indigo-600 shadow-lg`, children: /* @__PURE__ */ e.jsx(
|
|
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" }) }),
|
|
1390
1390
|
/* @__PURE__ */ e.jsxs("div", { className: "min-w-0", children: [
|
|
1391
|
-
/* @__PURE__ */ e.jsx("h3", { className: "text-sm sm:text-base font-bold text-slate-900 dark:text-white truncate", children:
|
|
1392
|
-
|
|
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 })
|
|
1393
1393
|
] })
|
|
1394
1394
|
] }),
|
|
1395
1395
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1404,17 +1404,17 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1404
1404
|
dark:hover:text-white dark:hover:border-slate-500
|
|
1405
1405
|
hover:scale-105 active:scale-95`,
|
|
1406
1406
|
"aria-label": "Close modal",
|
|
1407
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1407
|
+
children: /* @__PURE__ */ e.jsx(Z, { className: "w-4 h-4" })
|
|
1408
1408
|
}
|
|
1409
1409
|
)
|
|
1410
1410
|
] }) });
|
|
1411
|
-
return
|
|
1411
|
+
return u ? be(
|
|
1412
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: [
|
|
1413
|
-
!
|
|
1414
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex-1 min-h-0 overflow-hidden", children:
|
|
1413
|
+
!v && w,
|
|
1414
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex-1 min-h-0 overflow-hidden", children: b })
|
|
1415
1415
|
] }),
|
|
1416
1416
|
document.body
|
|
1417
|
-
) :
|
|
1417
|
+
) : be(
|
|
1418
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: [
|
|
1419
1419
|
/* @__PURE__ */ e.jsx(
|
|
1420
1420
|
"div",
|
|
@@ -1423,31 +1423,31 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1423
1423
|
onClick: r
|
|
1424
1424
|
}
|
|
1425
1425
|
),
|
|
1426
|
-
/* @__PURE__ */ e.jsx("div", { className: `relative z-[11001] w-full ${
|
|
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: `
|
|
1427
1427
|
rounded-xl sm:rounded-2xl border overflow-hidden
|
|
1428
1428
|
bg-white border-slate-200/50 shadow-2xl ml-2 mr-2
|
|
1429
1429
|
dark:bg-slate-800 dark:border-slate-700/50
|
|
1430
1430
|
flex flex-col max-h-[70dvh] sm:max-h-[80dvh]
|
|
1431
1431
|
`, children: [
|
|
1432
|
-
!
|
|
1433
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex-1 min-h-0 overflow-y-auto", children:
|
|
1432
|
+
!v && w,
|
|
1433
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex-1 min-h-0 overflow-y-auto", children: b })
|
|
1434
1434
|
] }) })
|
|
1435
1435
|
] }),
|
|
1436
1436
|
document.body
|
|
1437
1437
|
);
|
|
1438
|
-
},
|
|
1438
|
+
}, Ue = ({
|
|
1439
1439
|
checked: t = !1,
|
|
1440
1440
|
onChange: r,
|
|
1441
|
-
disabled:
|
|
1442
|
-
label:
|
|
1443
|
-
name:
|
|
1444
|
-
helpText:
|
|
1441
|
+
disabled: a = !1,
|
|
1442
|
+
label: i,
|
|
1443
|
+
name: x,
|
|
1444
|
+
helpText: b
|
|
1445
1445
|
}) => {
|
|
1446
|
-
const
|
|
1447
|
-
|
|
1446
|
+
const d = () => {
|
|
1447
|
+
a || r(x, !t);
|
|
1448
1448
|
};
|
|
1449
1449
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-1.5", children: [
|
|
1450
|
-
|
|
1450
|
+
i && /* @__PURE__ */ e.jsx("span", { className: "block text-sm font-semibold text-slate-700 dark:text-slate-300", children: i }),
|
|
1451
1451
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1452
1452
|
/* @__PURE__ */ e.jsx(
|
|
1453
1453
|
"button",
|
|
@@ -1455,13 +1455,13 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1455
1455
|
type: "button",
|
|
1456
1456
|
role: "switch",
|
|
1457
1457
|
"aria-checked": t,
|
|
1458
|
-
onClick:
|
|
1459
|
-
disabled:
|
|
1458
|
+
onClick: d,
|
|
1459
|
+
disabled: a,
|
|
1460
1460
|
className: `
|
|
1461
1461
|
relative inline-flex h-6 w-11 flex-shrink-0 items-center rounded-full
|
|
1462
1462
|
transition-all duration-200
|
|
1463
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"}
|
|
1464
|
-
${
|
|
1464
|
+
${a ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:scale-105 active:scale-95"}
|
|
1465
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
|
|
1466
1466
|
`,
|
|
1467
1467
|
children: /* @__PURE__ */ e.jsx(
|
|
@@ -1478,72 +1478,72 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1478
1478
|
),
|
|
1479
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" })
|
|
1480
1480
|
] }),
|
|
1481
|
-
|
|
1481
|
+
b && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400 leading-snug", children: b })
|
|
1482
1482
|
] });
|
|
1483
|
-
},
|
|
1484
|
-
var
|
|
1485
|
-
const [
|
|
1486
|
-
const
|
|
1487
|
-
|
|
1488
|
-
},
|
|
1489
|
-
|
|
1490
|
-
},
|
|
1491
|
-
|
|
1492
|
-
},
|
|
1493
|
-
|
|
1494
|
-
},
|
|
1495
|
-
|
|
1496
|
-
},
|
|
1497
|
-
|
|
1498
|
-
},
|
|
1499
|
-
|
|
1500
|
-
},
|
|
1501
|
-
if (!
|
|
1502
|
-
const
|
|
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 : [];
|
|
1503
1503
|
if (t.fuzzySearch && typeof t.findFuzzyMatches == "function")
|
|
1504
1504
|
try {
|
|
1505
|
-
return t.findFuzzyMatches(
|
|
1506
|
-
} catch (
|
|
1507
|
-
return console.error("Fuzzy search error:",
|
|
1508
|
-
(
|
|
1509
|
-
var
|
|
1510
|
-
return (
|
|
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());
|
|
1511
1511
|
}
|
|
1512
1512
|
);
|
|
1513
1513
|
}
|
|
1514
|
-
return
|
|
1515
|
-
(
|
|
1516
|
-
var
|
|
1517
|
-
return (
|
|
1514
|
+
return p.filter(
|
|
1515
|
+
(_) => {
|
|
1516
|
+
var I;
|
|
1517
|
+
return (I = _.label) == null ? void 0 : I.toLowerCase().includes(d.toLowerCase());
|
|
1518
1518
|
}
|
|
1519
1519
|
) || [];
|
|
1520
|
-
})(),
|
|
1521
|
-
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 _;
|
|
1522
1522
|
if (!r) return t.placeholder;
|
|
1523
|
-
if (t.type === "select-or-custom" &&
|
|
1523
|
+
if (t.type === "select-or-custom" && k)
|
|
1524
1524
|
return r;
|
|
1525
|
-
const
|
|
1526
|
-
return
|
|
1527
|
-
},
|
|
1528
|
-
var
|
|
1529
|
-
const
|
|
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, _ = `
|
|
1530
1530
|
w-full px-3.5 py-2.5 rounded-xl border transition-all duration-200
|
|
1531
1531
|
bg-white dark:bg-slate-800 text-sm text-slate-900 dark:text-white
|
|
1532
1532
|
focus:outline-none focus:ring-2 focus:ring-violet-500/20 placeholder-slate-400
|
|
1533
|
-
`,
|
|
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";
|
|
1534
1534
|
switch (t.type) {
|
|
1535
1535
|
case "select-or-custom":
|
|
1536
|
-
return
|
|
1537
|
-
|
|
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" }) }),
|
|
1538
1538
|
/* @__PURE__ */ e.jsx(
|
|
1539
1539
|
"input",
|
|
1540
1540
|
{
|
|
1541
1541
|
type: "text",
|
|
1542
1542
|
value: r,
|
|
1543
|
-
onChange: (s) =>
|
|
1543
|
+
onChange: (s) => a(t.name, s.target.value),
|
|
1544
1544
|
placeholder: t.customPlaceholder || "Enter custom value",
|
|
1545
1545
|
disabled: t.disabled,
|
|
1546
|
-
className: `${
|
|
1546
|
+
className: `${_} ${I} ${p ? "pl-9 sm:pl-12" : ""} pr-32 disabled:opacity-50 disabled:cursor-not-allowed`
|
|
1547
1547
|
}
|
|
1548
1548
|
),
|
|
1549
1549
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1551,7 +1551,7 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1551
1551
|
{
|
|
1552
1552
|
type: "button",
|
|
1553
1553
|
onClick: (s) => {
|
|
1554
|
-
s.preventDefault(), s.stopPropagation(),
|
|
1554
|
+
s.preventDefault(), s.stopPropagation(), z(!1), a(t.name, "");
|
|
1555
1555
|
},
|
|
1556
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",
|
|
1557
1557
|
children: "Select Existing"
|
|
@@ -1563,30 +1563,30 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1563
1563
|
{
|
|
1564
1564
|
type: "button",
|
|
1565
1565
|
onClick: (s) => {
|
|
1566
|
-
s.preventDefault(), s.stopPropagation(), t.disabled ||
|
|
1566
|
+
s.preventDefault(), s.stopPropagation(), t.disabled || y(!0);
|
|
1567
1567
|
},
|
|
1568
1568
|
disabled: t.disabled,
|
|
1569
|
-
className: ` relative ${
|
|
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`,
|
|
1570
1570
|
children: [
|
|
1571
|
-
|
|
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" }) }),
|
|
1572
1572
|
/* @__PURE__ */ e.jsx(
|
|
1573
1573
|
"span",
|
|
1574
1574
|
{
|
|
1575
1575
|
className: `${r ? "" : "text-slate-400"} truncate pr-2`,
|
|
1576
|
-
title:
|
|
1577
|
-
children:
|
|
1576
|
+
title: M(),
|
|
1577
|
+
children: M()
|
|
1578
1578
|
}
|
|
1579
1579
|
),
|
|
1580
|
-
/* @__PURE__ */ e.jsx(
|
|
1580
|
+
/* @__PURE__ */ e.jsx(le, { className: "w-5 h-5 text-slate-400 " })
|
|
1581
1581
|
]
|
|
1582
1582
|
}
|
|
1583
1583
|
),
|
|
1584
|
-
|
|
1584
|
+
v && /* @__PURE__ */ e.jsx(
|
|
1585
1585
|
"div",
|
|
1586
1586
|
{
|
|
1587
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",
|
|
1588
1588
|
onMouseDown: (s) => {
|
|
1589
|
-
s.target === s.currentTarget && (s.preventDefault(), s.stopPropagation(),
|
|
1589
|
+
s.target === s.currentTarget && (s.preventDefault(), s.stopPropagation(), Y());
|
|
1590
1590
|
},
|
|
1591
1591
|
children: /* @__PURE__ */ e.jsx(
|
|
1592
1592
|
"div",
|
|
@@ -1599,15 +1599,15 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1599
1599
|
dark:from-slate-700/50 dark:via-slate-800/50 dark:to-slate-700/50
|
|
1600
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: [
|
|
1601
1601
|
/* @__PURE__ */ e.jsxs("div", { className: "min-w-0", children: [
|
|
1602
|
-
/* @__PURE__ */ e.jsx("h3", { className: "text-sm sm:text-base font-bold text-slate-900 dark:text-white truncate", children:
|
|
1603
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400 mt-0.5 truncate", children:
|
|
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" })
|
|
1604
1604
|
] }),
|
|
1605
1605
|
/* @__PURE__ */ e.jsx(
|
|
1606
1606
|
"button",
|
|
1607
1607
|
{
|
|
1608
1608
|
type: "button",
|
|
1609
1609
|
onClick: (s) => {
|
|
1610
|
-
s.preventDefault(), s.stopPropagation(),
|
|
1610
|
+
s.preventDefault(), s.stopPropagation(), Y();
|
|
1611
1611
|
},
|
|
1612
1612
|
className: `flex-shrink-0 p-1.5 rounded-lg border transition-all duration-200
|
|
1613
1613
|
text-slate-400 hover:bg-slate-100 hover:text-slate-900
|
|
@@ -1615,11 +1615,11 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1615
1615
|
dark:border-slate-700/50 dark:hover:bg-slate-700
|
|
1616
1616
|
dark:hover:text-white dark:hover:border-slate-500
|
|
1617
1617
|
hover:scale-105 active:scale-95`,
|
|
1618
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1618
|
+
children: /* @__PURE__ */ e.jsx(Z, { className: "w-4 h-4" })
|
|
1619
1619
|
}
|
|
1620
1620
|
)
|
|
1621
1621
|
] }) }),
|
|
1622
|
-
|
|
1622
|
+
m ? /* @__PURE__ */ e.jsxs("div", { className: "p-4 sm:p-5 space-y-3 sm:space-y-4", children: [
|
|
1623
1623
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1624
1624
|
/* @__PURE__ */ e.jsx("label", { className: `block text-xs font-semibold uppercase tracking-wide
|
|
1625
1625
|
text-slate-700 dark:text-slate-300 mb-1.5`, children: "Edit Rank Designation" }),
|
|
@@ -1627,8 +1627,8 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1627
1627
|
"input",
|
|
1628
1628
|
{
|
|
1629
1629
|
type: "text",
|
|
1630
|
-
value:
|
|
1631
|
-
onChange: (s) =>
|
|
1630
|
+
value: P,
|
|
1631
|
+
onChange: (s) => f(s.target.value),
|
|
1632
1632
|
className: `w-full px-3 py-2.5 sm:px-4 sm:py-3 rounded-xl border
|
|
1633
1633
|
border-slate-200/50 dark:border-slate-700/50
|
|
1634
1634
|
bg-white dark:bg-slate-800
|
|
@@ -1644,7 +1644,7 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1644
1644
|
"button",
|
|
1645
1645
|
{
|
|
1646
1646
|
type: "button",
|
|
1647
|
-
onClick:
|
|
1647
|
+
onClick: U,
|
|
1648
1648
|
className: `flex-1 inline-flex items-center justify-center gap-2
|
|
1649
1649
|
px-3 py-2.5 sm:px-4 sm:py-3 rounded-xl
|
|
1650
1650
|
bg-white dark:bg-slate-700 hover:bg-slate-50 dark:hover:bg-slate-600
|
|
@@ -1652,7 +1652,7 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1652
1652
|
border border-slate-200/50 dark:border-slate-700/50
|
|
1653
1653
|
transition-all duration-200 hover:scale-105 active:scale-95 shadow-sm`,
|
|
1654
1654
|
children: [
|
|
1655
|
-
/* @__PURE__ */ e.jsx(
|
|
1655
|
+
/* @__PURE__ */ e.jsx(Z, { className: "w-4 h-4" }),
|
|
1656
1656
|
" Cancel"
|
|
1657
1657
|
]
|
|
1658
1658
|
}
|
|
@@ -1661,7 +1661,7 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1661
1661
|
"button",
|
|
1662
1662
|
{
|
|
1663
1663
|
type: "button",
|
|
1664
|
-
onClick:
|
|
1664
|
+
onClick: H,
|
|
1665
1665
|
className: `flex-1 inline-flex items-center justify-center gap-2
|
|
1666
1666
|
px-3 py-2.5 sm:px-4 sm:py-3 rounded-xl
|
|
1667
1667
|
bg-gradient-to-r from-violet-600 to-indigo-600
|
|
@@ -1670,7 +1670,7 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1670
1670
|
shadow-md hover:shadow-lg
|
|
1671
1671
|
transition-all duration-200 hover:scale-105 active:scale-95`,
|
|
1672
1672
|
children: [
|
|
1673
|
-
/* @__PURE__ */ e.jsx(
|
|
1673
|
+
/* @__PURE__ */ e.jsx(me, { className: "w-4 h-4" }),
|
|
1674
1674
|
" Save Changes"
|
|
1675
1675
|
]
|
|
1676
1676
|
}
|
|
@@ -1678,41 +1678,41 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1678
1678
|
] })
|
|
1679
1679
|
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1680
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: [
|
|
1681
|
-
/* @__PURE__ */ e.jsx(
|
|
1681
|
+
/* @__PURE__ */ e.jsx(ie, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400" }),
|
|
1682
1682
|
/* @__PURE__ */ e.jsx(
|
|
1683
1683
|
"input",
|
|
1684
1684
|
{
|
|
1685
1685
|
type: "text",
|
|
1686
|
-
value:
|
|
1687
|
-
onChange: (s) =>
|
|
1686
|
+
value: d,
|
|
1687
|
+
onChange: (s) => u(s.target.value),
|
|
1688
1688
|
placeholder: t.fuzzySearch ? "Search or type to create new..." : "Search...",
|
|
1689
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",
|
|
1690
1690
|
autoFocus: !0
|
|
1691
1691
|
}
|
|
1692
1692
|
)
|
|
1693
1693
|
] }) }),
|
|
1694
|
-
|
|
1695
|
-
/* @__PURE__ */ e.jsx(
|
|
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" }),
|
|
1696
1696
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 text-xs", children: [
|
|
1697
1697
|
/* @__PURE__ */ e.jsx("p", { className: "font-semibold text-amber-900 dark:text-amber-300", children: "Similar designation found!" }),
|
|
1698
1698
|
/* @__PURE__ */ e.jsxs("p", { className: "text-amber-700 dark:text-amber-400 mt-1", children: [
|
|
1699
1699
|
"Similar rank found (",
|
|
1700
|
-
|
|
1700
|
+
O.scorePercentage,
|
|
1701
1701
|
"% match). You can still create this if it's different."
|
|
1702
1702
|
] })
|
|
1703
1703
|
] })
|
|
1704
1704
|
] }) }),
|
|
1705
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-2", children:
|
|
1705
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-2", children: d.trim() ? (
|
|
1706
1706
|
/* Show filtered results + Create New when user types */
|
|
1707
1707
|
/* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1708
|
-
|
|
1708
|
+
C.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "space-y-1 mb-3", children: [
|
|
1709
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" }),
|
|
1710
|
-
|
|
1710
|
+
C.map((s) => /* @__PURE__ */ e.jsx("div", { className: "group relative", children: /* @__PURE__ */ e.jsxs(
|
|
1711
1711
|
"button",
|
|
1712
1712
|
{
|
|
1713
1713
|
type: "button",
|
|
1714
|
-
onClick: (
|
|
1715
|
-
|
|
1714
|
+
onClick: (n) => {
|
|
1715
|
+
n.preventDefault(), n.stopPropagation(), L(s.value);
|
|
1716
1716
|
},
|
|
1717
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"}`,
|
|
1718
1718
|
children: [
|
|
@@ -1726,10 +1726,10 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1726
1726
|
"button",
|
|
1727
1727
|
{
|
|
1728
1728
|
type: "button",
|
|
1729
|
-
onClick: (
|
|
1729
|
+
onClick: (n) => X(s, n),
|
|
1730
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",
|
|
1731
1731
|
title: "Edit this rank",
|
|
1732
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1732
|
+
children: /* @__PURE__ */ e.jsx(ne, { className: "w-3.5 h-3.5" })
|
|
1733
1733
|
}
|
|
1734
1734
|
)
|
|
1735
1735
|
] })
|
|
@@ -1737,22 +1737,22 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1737
1737
|
}
|
|
1738
1738
|
) }, s.value))
|
|
1739
1739
|
] }),
|
|
1740
|
-
(!
|
|
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:
|
|
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" }),
|
|
1742
1742
|
/* @__PURE__ */ e.jsx("div", { className: "px-2", children: /* @__PURE__ */ e.jsx(
|
|
1743
1743
|
"button",
|
|
1744
1744
|
{
|
|
1745
1745
|
type: "button",
|
|
1746
1746
|
onClick: (s) => {
|
|
1747
|
-
s.preventDefault(), s.stopPropagation(),
|
|
1747
|
+
s.preventDefault(), s.stopPropagation(), D();
|
|
1748
1748
|
},
|
|
1749
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",
|
|
1750
1750
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center space-x-2 min-w-0", children: [
|
|
1751
|
-
/* @__PURE__ */ e.jsx(
|
|
1751
|
+
/* @__PURE__ */ e.jsx(Oe, { className: "w-5 h-5 flex-shrink-0" }),
|
|
1752
1752
|
/* @__PURE__ */ e.jsxs("span", { className: "truncate", children: [
|
|
1753
|
-
|
|
1753
|
+
b === "edit" ? "Update to" : "Create New",
|
|
1754
1754
|
": ",
|
|
1755
|
-
|
|
1755
|
+
d.trim()
|
|
1756
1756
|
] })
|
|
1757
1757
|
] })
|
|
1758
1758
|
}
|
|
@@ -1765,8 +1765,8 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1765
1765
|
"button",
|
|
1766
1766
|
{
|
|
1767
1767
|
type: "button",
|
|
1768
|
-
onClick: (
|
|
1769
|
-
|
|
1768
|
+
onClick: (n) => {
|
|
1769
|
+
n.preventDefault(), n.stopPropagation(), L(s.value);
|
|
1770
1770
|
},
|
|
1771
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"}`,
|
|
1772
1772
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
@@ -1775,10 +1775,10 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1775
1775
|
"button",
|
|
1776
1776
|
{
|
|
1777
1777
|
type: "button",
|
|
1778
|
-
onClick: (
|
|
1778
|
+
onClick: (n) => X(s, n),
|
|
1779
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",
|
|
1780
1780
|
title: "Edit this rank",
|
|
1781
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1781
|
+
children: /* @__PURE__ */ e.jsx(ne, { className: "w-3.5 h-3.5" })
|
|
1782
1782
|
}
|
|
1783
1783
|
)
|
|
1784
1784
|
] })
|
|
@@ -1787,8 +1787,8 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1787
1787
|
) })
|
|
1788
1788
|
] }),
|
|
1789
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: [
|
|
1790
|
-
!
|
|
1791
|
-
|
|
1790
|
+
!m && (C ? `${C.length} option${C.length !== 1 ? "s" : ""} available` : ""),
|
|
1791
|
+
m && "Edit the rank designation and save changes"
|
|
1792
1792
|
] }) })
|
|
1793
1793
|
] })
|
|
1794
1794
|
}
|
|
@@ -1803,23 +1803,23 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1803
1803
|
{
|
|
1804
1804
|
type: "button",
|
|
1805
1805
|
onClick: (s) => {
|
|
1806
|
-
s.preventDefault(), s.stopPropagation(), t.disabled ||
|
|
1806
|
+
s.preventDefault(), s.stopPropagation(), t.disabled || y(!0);
|
|
1807
1807
|
},
|
|
1808
1808
|
disabled: t.disabled,
|
|
1809
|
-
className: `relative ${
|
|
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`,
|
|
1810
1810
|
children: [
|
|
1811
|
-
|
|
1812
|
-
/* @__PURE__ */ e.jsx("span", { className: r ? "text-slate-900 dark:text-white truncate" : "text-slate-400", children:
|
|
1813
|
-
/* @__PURE__ */ e.jsx(
|
|
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" })
|
|
1814
1814
|
]
|
|
1815
1815
|
}
|
|
1816
1816
|
),
|
|
1817
|
-
|
|
1817
|
+
v && /* @__PURE__ */ e.jsx(
|
|
1818
1818
|
"div",
|
|
1819
1819
|
{
|
|
1820
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",
|
|
1821
1821
|
onMouseDown: (s) => {
|
|
1822
|
-
s.target === s.currentTarget && (s.preventDefault(), s.stopPropagation(),
|
|
1822
|
+
s.target === s.currentTarget && (s.preventDefault(), s.stopPropagation(), Y());
|
|
1823
1823
|
},
|
|
1824
1824
|
children: /* @__PURE__ */ e.jsxs(
|
|
1825
1825
|
"div",
|
|
@@ -1841,36 +1841,36 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1841
1841
|
{
|
|
1842
1842
|
type: "button",
|
|
1843
1843
|
onClick: (s) => {
|
|
1844
|
-
s.preventDefault(), s.stopPropagation(),
|
|
1844
|
+
s.preventDefault(), s.stopPropagation(), Y();
|
|
1845
1845
|
},
|
|
1846
1846
|
className: `flex-shrink-0 p-1.5 rounded-lg border transition-all duration-200
|
|
1847
1847
|
text-slate-400 hover:bg-slate-100 hover:text-slate-900
|
|
1848
1848
|
border-slate-200/50 dark:border-slate-700/50
|
|
1849
1849
|
dark:hover:bg-slate-700 dark:hover:text-white`,
|
|
1850
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1850
|
+
children: /* @__PURE__ */ e.jsx(Z, { className: "w-4 h-4" })
|
|
1851
1851
|
}
|
|
1852
1852
|
)
|
|
1853
1853
|
] }),
|
|
1854
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: [
|
|
1855
|
-
/* @__PURE__ */ e.jsx(
|
|
1855
|
+
/* @__PURE__ */ e.jsx(ie, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400" }),
|
|
1856
1856
|
/* @__PURE__ */ e.jsx(
|
|
1857
1857
|
"input",
|
|
1858
1858
|
{
|
|
1859
1859
|
type: "text",
|
|
1860
|
-
value:
|
|
1861
|
-
onChange: (s) =>
|
|
1860
|
+
value: d,
|
|
1861
|
+
onChange: (s) => u(s.target.value),
|
|
1862
1862
|
placeholder: "Search...",
|
|
1863
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",
|
|
1864
1864
|
autoFocus: !0
|
|
1865
1865
|
}
|
|
1866
1866
|
)
|
|
1867
1867
|
] }) }),
|
|
1868
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto p-2", children:
|
|
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(
|
|
1869
1869
|
"button",
|
|
1870
1870
|
{
|
|
1871
1871
|
type: "button",
|
|
1872
|
-
onClick: (
|
|
1873
|
-
|
|
1872
|
+
onClick: (n) => {
|
|
1873
|
+
n.preventDefault(), n.stopPropagation(), L(s.value);
|
|
1874
1874
|
},
|
|
1875
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"}`,
|
|
1876
1876
|
children: s.label
|
|
@@ -1883,54 +1883,54 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1883
1883
|
}
|
|
1884
1884
|
)
|
|
1885
1885
|
] }) : /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
1886
|
-
|
|
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" }) }),
|
|
1887
1887
|
/* @__PURE__ */ e.jsxs(
|
|
1888
1888
|
"select",
|
|
1889
1889
|
{
|
|
1890
1890
|
value: r,
|
|
1891
|
-
onChange:
|
|
1891
|
+
onChange: R,
|
|
1892
1892
|
disabled: t.disabled,
|
|
1893
|
-
className: `${
|
|
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`,
|
|
1894
1894
|
children: [
|
|
1895
1895
|
/* @__PURE__ */ e.jsx("option", { value: "", children: t.placeholder || "Select an option" }),
|
|
1896
|
-
(
|
|
1896
|
+
(G = t.options) == null ? void 0 : G.map((s) => /* @__PURE__ */ e.jsx("option", { value: s.value, children: s.label }, s.value))
|
|
1897
1897
|
]
|
|
1898
1898
|
}
|
|
1899
1899
|
),
|
|
1900
|
-
/* @__PURE__ */ e.jsx(
|
|
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" })
|
|
1901
1901
|
] });
|
|
1902
1902
|
case "date":
|
|
1903
1903
|
case "number":
|
|
1904
1904
|
return /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
1905
|
-
|
|
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" }) }),
|
|
1906
1906
|
/* @__PURE__ */ e.jsx(
|
|
1907
1907
|
"input",
|
|
1908
1908
|
{
|
|
1909
1909
|
type: t.type,
|
|
1910
1910
|
value: r,
|
|
1911
|
-
onChange: (s) =>
|
|
1911
|
+
onChange: (s) => a(t.name, s.target.value),
|
|
1912
1912
|
disabled: t.disabled,
|
|
1913
1913
|
min: t.min,
|
|
1914
1914
|
max: t.max,
|
|
1915
1915
|
step: t.step,
|
|
1916
|
-
className: `${
|
|
1916
|
+
className: `${_} ${I} ${p ? "pl-12" : ""} disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-violet-500/20`
|
|
1917
1917
|
}
|
|
1918
1918
|
)
|
|
1919
1919
|
] });
|
|
1920
1920
|
case "textarea":
|
|
1921
1921
|
return t.isHtml ? t.disabled ? /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
1922
|
-
|
|
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" }) }),
|
|
1923
1923
|
/* @__PURE__ */ e.jsx(
|
|
1924
1924
|
"div",
|
|
1925
1925
|
{
|
|
1926
|
-
className: `${
|
|
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`,
|
|
1927
1927
|
style: { minHeight: `${(t.rows || 4) * 1.75 + 1.5}rem` },
|
|
1928
1928
|
dangerouslySetInnerHTML: { __html: r || "" }
|
|
1929
1929
|
}
|
|
1930
1930
|
)
|
|
1931
1931
|
] }) : t.renderHtmlEditor ? t.renderHtmlEditor({
|
|
1932
1932
|
content: r || "",
|
|
1933
|
-
onChange: (s) =>
|
|
1933
|
+
onChange: (s) => a(t.name, s),
|
|
1934
1934
|
height: t.height || 200,
|
|
1935
1935
|
rows: t.rows || 4
|
|
1936
1936
|
}) : /* @__PURE__ */ e.jsxs("div", { className: "p-3 bg-amber-50 text-amber-800 rounded-xl border border-amber-200 text-sm", children: [
|
|
@@ -1938,16 +1938,16 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1938
1938
|
/* @__PURE__ */ e.jsx("code", { children: "renderHtmlEditor" }),
|
|
1939
1939
|
" to this field configuration."
|
|
1940
1940
|
] }) : /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
1941
|
-
|
|
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" }) }),
|
|
1942
1942
|
/* @__PURE__ */ e.jsx(
|
|
1943
1943
|
"textarea",
|
|
1944
1944
|
{
|
|
1945
1945
|
value: r,
|
|
1946
|
-
onChange: (s) =>
|
|
1946
|
+
onChange: (s) => a(t.name, s.target.value),
|
|
1947
1947
|
placeholder: t.placeholder,
|
|
1948
1948
|
disabled: t.disabled,
|
|
1949
1949
|
rows: t.rows || 4,
|
|
1950
|
-
className: `${
|
|
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`
|
|
1951
1951
|
}
|
|
1952
1952
|
)
|
|
1953
1953
|
] });
|
|
@@ -1958,7 +1958,7 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1958
1958
|
{
|
|
1959
1959
|
type: "checkbox",
|
|
1960
1960
|
checked: r || !1,
|
|
1961
|
-
onChange: (s) =>
|
|
1961
|
+
onChange: (s) => a(t.name, s.target.checked),
|
|
1962
1962
|
disabled: t.disabled,
|
|
1963
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"
|
|
1964
1964
|
}
|
|
@@ -1967,10 +1967,10 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1967
1967
|
] });
|
|
1968
1968
|
case "toggle":
|
|
1969
1969
|
return /* @__PURE__ */ e.jsx(
|
|
1970
|
-
|
|
1970
|
+
Ue,
|
|
1971
1971
|
{
|
|
1972
1972
|
checked: r || !1,
|
|
1973
|
-
onChange:
|
|
1973
|
+
onChange: a,
|
|
1974
1974
|
disabled: t.disabled,
|
|
1975
1975
|
label: t.toggleLabel,
|
|
1976
1976
|
name: t.name,
|
|
@@ -1978,7 +1978,7 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1978
1978
|
}
|
|
1979
1979
|
);
|
|
1980
1980
|
case "radio":
|
|
1981
|
-
return /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap items-center gap-3 sm:gap-6", children: (
|
|
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(
|
|
1982
1982
|
"label",
|
|
1983
1983
|
{
|
|
1984
1984
|
className: `flex items-center cursor-pointer ${t.disabled ? "opacity-50 cursor-not-allowed" : ""}`,
|
|
@@ -1990,7 +1990,7 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
1990
1990
|
name: t.name,
|
|
1991
1991
|
value: s.value,
|
|
1992
1992
|
checked: r === s.value,
|
|
1993
|
-
onChange: (
|
|
1993
|
+
onChange: (n) => a(t.name, n.target.value),
|
|
1994
1994
|
disabled: t.disabled,
|
|
1995
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"
|
|
1996
1996
|
}
|
|
@@ -2001,19 +2001,19 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2001
2001
|
s.value
|
|
2002
2002
|
)) });
|
|
2003
2003
|
case "file": {
|
|
2004
|
-
const s =
|
|
2004
|
+
const s = ge.useRef(null), n = Array.isArray(r) ? r : [];
|
|
2005
2005
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
|
|
2006
2006
|
/* @__PURE__ */ e.jsxs("div", { className: "relative flex items-center", children: [
|
|
2007
|
-
|
|
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" }) }),
|
|
2008
2008
|
/* @__PURE__ */ e.jsx(
|
|
2009
2009
|
"div",
|
|
2010
2010
|
{
|
|
2011
2011
|
onClick: () => {
|
|
2012
|
-
var
|
|
2013
|
-
return !t.disabled && ((
|
|
2012
|
+
var c;
|
|
2013
|
+
return !t.disabled && ((c = s.current) == null ? void 0 : c.click());
|
|
2014
2014
|
},
|
|
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 ${
|
|
2016
|
-
children: /* @__PURE__ */ e.jsx("span", { className: "text-slate-400 dark:text-slate-500 text-sm", children:
|
|
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..." })
|
|
2017
2017
|
}
|
|
2018
2018
|
),
|
|
2019
2019
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2022,12 +2022,12 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2022
2022
|
type: "button",
|
|
2023
2023
|
disabled: t.disabled,
|
|
2024
2024
|
onClick: () => {
|
|
2025
|
-
var
|
|
2026
|
-
return (
|
|
2025
|
+
var c;
|
|
2026
|
+
return (c = s.current) == null ? void 0 : c.click();
|
|
2027
2027
|
},
|
|
2028
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",
|
|
2029
2029
|
title: "Browse files",
|
|
2030
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2030
|
+
children: /* @__PURE__ */ e.jsx(_e, { className: "w-4 h-4" })
|
|
2031
2031
|
}
|
|
2032
2032
|
),
|
|
2033
2033
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2038,29 +2038,29 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2038
2038
|
accept: t.accept,
|
|
2039
2039
|
multiple: t.multiple ?? !1,
|
|
2040
2040
|
className: "hidden",
|
|
2041
|
-
onChange: (
|
|
2042
|
-
t.onFilesSelected && t.onFilesSelected(
|
|
2041
|
+
onChange: (c) => {
|
|
2042
|
+
t.onFilesSelected && t.onFilesSelected(c.target.files), c.target.value = "";
|
|
2043
2043
|
}
|
|
2044
2044
|
}
|
|
2045
2045
|
)
|
|
2046
2046
|
] }),
|
|
2047
|
-
|
|
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(
|
|
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" }) }),
|
|
2049
2049
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
2050
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-slate-800 dark:text-slate-200 truncate", children:
|
|
2051
|
-
(
|
|
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` })
|
|
2052
2052
|
] }),
|
|
2053
2053
|
t.onRemove && /* @__PURE__ */ e.jsx(
|
|
2054
2054
|
"button",
|
|
2055
2055
|
{
|
|
2056
2056
|
type: "button",
|
|
2057
|
-
onClick: () => t.onRemove(
|
|
2057
|
+
onClick: () => t.onRemove(c),
|
|
2058
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",
|
|
2059
2059
|
title: "Remove",
|
|
2060
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2060
|
+
children: /* @__PURE__ */ e.jsx(Pe, { className: "w-3.5 h-3.5" })
|
|
2061
2061
|
}
|
|
2062
2062
|
)
|
|
2063
|
-
] },
|
|
2063
|
+
] }, c))
|
|
2064
2064
|
] });
|
|
2065
2065
|
}
|
|
2066
2066
|
case "text":
|
|
@@ -2068,16 +2068,16 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2068
2068
|
case "password":
|
|
2069
2069
|
default:
|
|
2070
2070
|
return /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
2071
|
-
|
|
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" }) }),
|
|
2072
2072
|
/* @__PURE__ */ e.jsx(
|
|
2073
2073
|
"input",
|
|
2074
2074
|
{
|
|
2075
2075
|
type: t.type,
|
|
2076
2076
|
value: t.displayValue ?? r ?? "",
|
|
2077
|
-
onChange: (s) =>
|
|
2077
|
+
onChange: (s) => a(t.name, s.target.value),
|
|
2078
2078
|
placeholder: t.placeholder,
|
|
2079
2079
|
disabled: t.disabled,
|
|
2080
|
-
className: `${
|
|
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`
|
|
2081
2081
|
}
|
|
2082
2082
|
)
|
|
2083
2083
|
] });
|
|
@@ -2088,109 +2088,109 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2088
2088
|
/* @__PURE__ */ e.jsx("span", { children: t.label }),
|
|
2089
2089
|
t.required && /* @__PURE__ */ e.jsx("span", { className: "text-red-500 dark:text-red-400", children: "*" })
|
|
2090
2090
|
] }) }),
|
|
2091
|
-
/* @__PURE__ */ e.jsx("div", { className: "mt-2", children:
|
|
2092
|
-
|
|
2093
|
-
/* @__PURE__ */ e.jsx(
|
|
2094
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
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 })
|
|
2095
2095
|
] }),
|
|
2096
|
-
t.helpText && !
|
|
2096
|
+
t.helpText && !i && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: t.helpText })
|
|
2097
2097
|
] });
|
|
2098
|
-
},
|
|
2098
|
+
}, lt = ({
|
|
2099
2099
|
fields: t = [],
|
|
2100
2100
|
initialData: r = {},
|
|
2101
|
-
onSubmit:
|
|
2102
|
-
onCancel:
|
|
2103
|
-
onEdit:
|
|
2104
|
-
onFieldChange:
|
|
2105
|
-
submitButtonText:
|
|
2106
|
-
cancelButtonText:
|
|
2107
|
-
editButtonText:
|
|
2108
|
-
showEditingBadge:
|
|
2109
|
-
editingEntity:
|
|
2110
|
-
helpText:
|
|
2111
|
-
isModal:
|
|
2112
|
-
mode:
|
|
2113
|
-
disabled:
|
|
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,
|
|
2114
2114
|
// ✅ Add disabled prop for loading states
|
|
2115
|
-
renderCustomField:
|
|
2115
|
+
renderCustomField: f
|
|
2116
2116
|
}) => {
|
|
2117
|
-
const
|
|
2118
|
-
const
|
|
2119
|
-
return (typeof t == "function" ? t(r) : t).forEach((
|
|
2120
|
-
|
|
2121
|
-
}),
|
|
2122
|
-
}), [
|
|
2123
|
-
|
|
2124
|
-
if (
|
|
2125
|
-
|
|
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;
|
|
2126
2126
|
return;
|
|
2127
2127
|
}
|
|
2128
2128
|
if (r && Object.keys(r).length > 0 && r.id) {
|
|
2129
|
-
const
|
|
2130
|
-
(typeof t == "function" ? t(
|
|
2131
|
-
|
|
2132
|
-
}),
|
|
2129
|
+
const k = {};
|
|
2130
|
+
(typeof t == "function" ? t(g) : t).forEach((W) => {
|
|
2131
|
+
k[W.name] = r[W.name] || "";
|
|
2132
|
+
}), R(k);
|
|
2133
2133
|
}
|
|
2134
2134
|
}, [r.id]);
|
|
2135
|
-
const
|
|
2136
|
-
if (
|
|
2137
|
-
const
|
|
2138
|
-
|
|
2139
|
-
const
|
|
2140
|
-
delete
|
|
2141
|
-
var
|
|
2142
|
-
if ((
|
|
2143
|
-
const
|
|
2144
|
-
|
|
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];
|
|
2145
2145
|
}
|
|
2146
|
-
}),
|
|
2147
|
-
},
|
|
2148
|
-
if (
|
|
2149
|
-
const
|
|
2150
|
-
return
|
|
2151
|
-
const
|
|
2152
|
-
if (
|
|
2153
|
-
|
|
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`;
|
|
2154
2154
|
return;
|
|
2155
2155
|
}
|
|
2156
|
-
if (
|
|
2157
|
-
const { minLength:
|
|
2158
|
-
if (
|
|
2159
|
-
|
|
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`;
|
|
2160
2160
|
return;
|
|
2161
2161
|
}
|
|
2162
|
-
if (
|
|
2163
|
-
|
|
2162
|
+
if (p && G.length > p) {
|
|
2163
|
+
h[k.name] = `Maximum ${p} characters allowed`;
|
|
2164
2164
|
return;
|
|
2165
2165
|
}
|
|
2166
|
-
if (
|
|
2167
|
-
|
|
2166
|
+
if (_ && !_.test(M)) {
|
|
2167
|
+
h[k.name] = k.validation.patternMessage || k.validation.message || "Invalid format";
|
|
2168
2168
|
return;
|
|
2169
2169
|
}
|
|
2170
|
-
if (
|
|
2171
|
-
const
|
|
2172
|
-
if (
|
|
2173
|
-
|
|
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";
|
|
2174
2174
|
return;
|
|
2175
2175
|
}
|
|
2176
2176
|
}
|
|
2177
2177
|
}
|
|
2178
|
-
}),
|
|
2179
|
-
},
|
|
2180
|
-
|
|
2178
|
+
}), Y(h), Object.keys(h).length === 0;
|
|
2179
|
+
}, O = (h) => {
|
|
2180
|
+
h.preventDefault(), !D && C() && a(g);
|
|
2181
2181
|
};
|
|
2182
|
-
return /* @__PURE__ */ e.jsxs("form", { onSubmit:
|
|
2182
|
+
return /* @__PURE__ */ e.jsxs("form", { onSubmit: O, className: "flex flex-col h-full max-h-[75vh] sm:max-h-[70vh]", children: [
|
|
2183
2183
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 overflow-y-auto px-4 pt-4 sm:px-5 sm:pt-5", children: [
|
|
2184
|
-
|
|
2184
|
+
D && /* @__PURE__ */ e.jsxs("div", { className: `mb-4 flex items-center gap-3 p-3 sm:p-3.5 rounded-xl
|
|
2185
2185
|
bg-blue-50 border border-blue-200
|
|
2186
2186
|
dark:bg-blue-600/10 dark:border-blue-500/30`, children: [
|
|
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(
|
|
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" }) }),
|
|
2188
2188
|
/* @__PURE__ */ e.jsxs("div", { className: "min-w-0", children: [
|
|
2189
2189
|
/* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-slate-900 dark:text-white leading-tight", children: "View Mode" }),
|
|
2190
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" })
|
|
2191
2191
|
] })
|
|
2192
2192
|
] }),
|
|
2193
|
-
!
|
|
2193
|
+
!D && y && w && /* @__PURE__ */ e.jsxs("div", { className: `mb-4 flex items-center gap-3 p-3 sm:p-3.5 rounded-xl
|
|
2194
2194
|
bg-violet-50 border border-violet-200
|
|
2195
2195
|
dark:bg-violet-600/10 dark:border-violet-500/30`, children: [
|
|
2196
2196
|
/* @__PURE__ */ e.jsx("span", { className: "flex-shrink-0 w-2 h-2 rounded-full bg-violet-500 animate-pulse" }),
|
|
@@ -2199,64 +2199,64 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2199
2199
|
/* @__PURE__ */ e.jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-400 truncate", children: [
|
|
2200
2200
|
"Modifying:",
|
|
2201
2201
|
" ",
|
|
2202
|
-
/* @__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 })
|
|
2203
2203
|
] })
|
|
2204
2204
|
] })
|
|
2205
2205
|
] }),
|
|
2206
|
-
/* @__PURE__ */ e.jsx("div", { className: "space-y-4 pb-4", children:
|
|
2207
|
-
const
|
|
2208
|
-
if (
|
|
2209
|
-
const
|
|
2210
|
-
field:
|
|
2211
|
-
value:
|
|
2212
|
-
error:
|
|
2213
|
-
index:
|
|
2214
|
-
mode:
|
|
2215
|
-
disabled:
|
|
2216
|
-
onChange:
|
|
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
|
|
2217
2217
|
});
|
|
2218
|
-
if (
|
|
2218
|
+
if (F) return /* @__PURE__ */ e.jsx("div", { children: F }, h.name || k);
|
|
2219
2219
|
}
|
|
2220
2220
|
return /* @__PURE__ */ e.jsx(
|
|
2221
|
-
|
|
2221
|
+
pe,
|
|
2222
2222
|
{
|
|
2223
|
-
field: { ...
|
|
2224
|
-
value:
|
|
2225
|
-
onChange:
|
|
2226
|
-
error:
|
|
2227
|
-
mode:
|
|
2223
|
+
field: { ...h, disabled: D || h.disabled || P },
|
|
2224
|
+
value: M,
|
|
2225
|
+
onChange: U,
|
|
2226
|
+
error: W,
|
|
2227
|
+
mode: $
|
|
2228
2228
|
},
|
|
2229
|
-
|
|
2229
|
+
h.name || k
|
|
2230
2230
|
);
|
|
2231
2231
|
}) })
|
|
2232
2232
|
] }),
|
|
2233
2233
|
/* @__PURE__ */ e.jsxs("div", { className: `flex-shrink-0 bg-white dark:bg-slate-800
|
|
2234
2234
|
border-t border-slate-200 dark:border-slate-700
|
|
2235
2235
|
px-4 py-3 sm:px-5 sm:py-4`, children: [
|
|
2236
|
-
|
|
2237
|
-
|
|
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(
|
|
2238
2238
|
"button",
|
|
2239
2239
|
{
|
|
2240
2240
|
type: "button",
|
|
2241
|
-
onClick:
|
|
2242
|
-
className: `${
|
|
2241
|
+
onClick: i,
|
|
2242
|
+
className: `${N ? "flex-1 sm:flex-none" : "w-auto"}
|
|
2243
2243
|
flex items-center justify-center gap-2
|
|
2244
2244
|
px-4 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200
|
|
2245
2245
|
bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200
|
|
2246
2246
|
dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300 dark:border-slate-600
|
|
2247
2247
|
hover:scale-[1.02] active:scale-[0.98]`,
|
|
2248
2248
|
children: [
|
|
2249
|
-
/* @__PURE__ */ e.jsx(
|
|
2249
|
+
/* @__PURE__ */ e.jsx(Z, { className: "w-4 h-4" }),
|
|
2250
2250
|
/* @__PURE__ */ e.jsx("span", { children: "Close" })
|
|
2251
2251
|
]
|
|
2252
2252
|
}
|
|
2253
2253
|
),
|
|
2254
|
-
|
|
2254
|
+
x && /* @__PURE__ */ e.jsxs(
|
|
2255
2255
|
"button",
|
|
2256
2256
|
{
|
|
2257
2257
|
type: "button",
|
|
2258
|
-
onClick:
|
|
2259
|
-
className: `${
|
|
2258
|
+
onClick: x,
|
|
2259
|
+
className: `${N ? "flex-1" : "w-auto"}
|
|
2260
2260
|
flex items-center justify-center gap-2
|
|
2261
2261
|
px-4 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200
|
|
2262
2262
|
bg-gradient-to-r from-violet-600 to-indigo-600
|
|
@@ -2264,21 +2264,21 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2264
2264
|
text-white shadow-md hover:shadow-lg
|
|
2265
2265
|
hover:scale-[1.02] active:scale-[0.98]`,
|
|
2266
2266
|
children: [
|
|
2267
|
-
/* @__PURE__ */ e.jsx(
|
|
2268
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
2267
|
+
/* @__PURE__ */ e.jsx(ne, { className: "w-4 h-4" }),
|
|
2268
|
+
/* @__PURE__ */ e.jsx("span", { children: v })
|
|
2269
2269
|
]
|
|
2270
2270
|
}
|
|
2271
2271
|
)
|
|
2272
2272
|
] }) : (
|
|
2273
2273
|
/* Edit mode actions */
|
|
2274
|
-
/* @__PURE__ */ e.jsxs("div", { className: `flex ${
|
|
2275
|
-
|
|
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(
|
|
2276
2276
|
"button",
|
|
2277
2277
|
{
|
|
2278
2278
|
type: "button",
|
|
2279
|
-
onClick:
|
|
2280
|
-
disabled:
|
|
2281
|
-
className: `${
|
|
2279
|
+
onClick: i,
|
|
2280
|
+
disabled: P,
|
|
2281
|
+
className: `${N ? "flex-1 sm:flex-none" : "w-auto"}
|
|
2282
2282
|
flex items-center justify-center gap-2
|
|
2283
2283
|
px-4 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200
|
|
2284
2284
|
bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-200
|
|
@@ -2286,8 +2286,8 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2286
2286
|
disabled:opacity-50 disabled:cursor-not-allowed
|
|
2287
2287
|
hover:scale-[1.02] active:scale-[0.98]`,
|
|
2288
2288
|
children: [
|
|
2289
|
-
/* @__PURE__ */ e.jsx(
|
|
2290
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
2289
|
+
/* @__PURE__ */ e.jsx(Z, { className: "w-4 h-4" }),
|
|
2290
|
+
/* @__PURE__ */ e.jsx("span", { children: u })
|
|
2291
2291
|
]
|
|
2292
2292
|
}
|
|
2293
2293
|
),
|
|
@@ -2295,8 +2295,8 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2295
2295
|
"button",
|
|
2296
2296
|
{
|
|
2297
2297
|
type: "submit",
|
|
2298
|
-
disabled:
|
|
2299
|
-
className: `${
|
|
2298
|
+
disabled: P,
|
|
2299
|
+
className: `${N ? "flex-1" : "w-auto"}
|
|
2300
2300
|
flex items-center justify-center gap-2
|
|
2301
2301
|
px-4 py-2.5 rounded-xl text-sm font-semibold transition-all duration-200
|
|
2302
2302
|
bg-gradient-to-r from-violet-600 to-indigo-600
|
|
@@ -2305,42 +2305,42 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2305
2305
|
disabled:opacity-50 disabled:cursor-not-allowed
|
|
2306
2306
|
hover:scale-[1.02] active:scale-[0.98] disabled:hover:scale-100`,
|
|
2307
2307
|
children: [
|
|
2308
|
-
|
|
2309
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
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 })
|
|
2310
2310
|
]
|
|
2311
2311
|
}
|
|
2312
2312
|
)
|
|
2313
2313
|
] })
|
|
2314
2314
|
),
|
|
2315
|
-
!
|
|
2315
|
+
!D && z && /* @__PURE__ */ e.jsx("p", { className: "mt-2.5 text-xs text-slate-400 dark:text-slate-500 text-center", children: z })
|
|
2316
2316
|
] })
|
|
2317
2317
|
] });
|
|
2318
|
-
},
|
|
2318
|
+
}, Ge = ({
|
|
2319
2319
|
isOpen: t,
|
|
2320
2320
|
onClose: r,
|
|
2321
|
-
onSelect:
|
|
2322
|
-
options:
|
|
2323
|
-
selectedValue:
|
|
2324
|
-
title:
|
|
2325
|
-
subtitle:
|
|
2326
|
-
icon:
|
|
2327
|
-
searchable:
|
|
2328
|
-
searchPlaceholder:
|
|
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..."
|
|
2329
2329
|
}) => {
|
|
2330
|
-
const [
|
|
2331
|
-
|
|
2332
|
-
const
|
|
2333
|
-
|
|
2330
|
+
const [w, z] = T(""), N = ee(null);
|
|
2331
|
+
Q(() => {
|
|
2332
|
+
const f = (m) => {
|
|
2333
|
+
m.key === "Escape" && r();
|
|
2334
2334
|
};
|
|
2335
|
-
return t && (document.addEventListener("keydown",
|
|
2336
|
-
var
|
|
2337
|
-
return (
|
|
2338
|
-
}, 100)), () => document.removeEventListener("keydown",
|
|
2339
|
-
}, [t, r,
|
|
2340
|
-
const
|
|
2341
|
-
(
|
|
2342
|
-
) :
|
|
2343
|
-
|
|
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("");
|
|
2344
2344
|
};
|
|
2345
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: [
|
|
2346
2346
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2354,10 +2354,10 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2354
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: [
|
|
2355
2355
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2356
2356
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-3", children: [
|
|
2357
|
-
|
|
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" }) }),
|
|
2358
2358
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
2359
|
-
/* @__PURE__ */ e.jsx("h3", { className: "text-lg font-bold text-slate-900 dark:text-white", children:
|
|
2360
|
-
|
|
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 })
|
|
2361
2361
|
] })
|
|
2362
2362
|
] }),
|
|
2363
2363
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2365,20 +2365,20 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2365
2365
|
{
|
|
2366
2366
|
onClick: r,
|
|
2367
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",
|
|
2368
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2368
|
+
children: /* @__PURE__ */ e.jsx(Z, { className: "w-5 h-5" })
|
|
2369
2369
|
}
|
|
2370
2370
|
)
|
|
2371
2371
|
] }),
|
|
2372
|
-
|
|
2373
|
-
/* @__PURE__ */ e.jsx(
|
|
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" }),
|
|
2374
2374
|
/* @__PURE__ */ e.jsx(
|
|
2375
2375
|
"input",
|
|
2376
2376
|
{
|
|
2377
|
-
ref:
|
|
2377
|
+
ref: N,
|
|
2378
2378
|
type: "text",
|
|
2379
|
-
value:
|
|
2380
|
-
onChange: (
|
|
2381
|
-
placeholder:
|
|
2379
|
+
value: w,
|
|
2380
|
+
onChange: (f) => z(f.target.value),
|
|
2381
|
+
placeholder: y,
|
|
2382
2382
|
className: `w-full pl-11 pr-4 py-3 rounded-xl border transition-all duration-200
|
|
2383
2383
|
bg-white border-slate-200 text-slate-900 placeholder-slate-400
|
|
2384
2384
|
focus:border-violet-400 focus:bg-slate-50
|
|
@@ -2389,185 +2389,185 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2389
2389
|
)
|
|
2390
2390
|
] })
|
|
2391
2391
|
] }),
|
|
2392
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex-grow overflow-y-auto custom-scrollbar", children:
|
|
2393
|
-
const
|
|
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;
|
|
2394
2394
|
return /* @__PURE__ */ e.jsxs(
|
|
2395
2395
|
"button",
|
|
2396
2396
|
{
|
|
2397
2397
|
type: "button",
|
|
2398
|
-
onClick: () =>
|
|
2398
|
+
onClick: () => P(f.value),
|
|
2399
2399
|
className: `w-full px-4 py-3.5 rounded-xl text-left flex items-center justify-between transition-all duration-200 group
|
|
2400
|
-
${
|
|
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"}`,
|
|
2401
2401
|
children: [
|
|
2402
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-medium", children:
|
|
2403
|
-
|
|
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" }) })
|
|
2404
2404
|
]
|
|
2405
2405
|
},
|
|
2406
|
-
|
|
2406
|
+
f.value
|
|
2407
2407
|
);
|
|
2408
2408
|
}) }) : /* @__PURE__ */ e.jsxs("div", { className: "px-4 py-12 text-center", children: [
|
|
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(
|
|
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" }) }),
|
|
2410
2410
|
/* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-slate-600 dark:text-slate-400", children: "No options found" }),
|
|
2411
2411
|
/* @__PURE__ */ e.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-500 mt-1", children: "Try adjusting your search terms" })
|
|
2412
2412
|
] }) }),
|
|
2413
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: [
|
|
2414
|
-
|
|
2414
|
+
$.length,
|
|
2415
2415
|
" option",
|
|
2416
|
-
|
|
2416
|
+
$.length !== 1 ? "s" : "",
|
|
2417
2417
|
" available"
|
|
2418
2418
|
] }) })
|
|
2419
2419
|
] }) })
|
|
2420
2420
|
] }) : null;
|
|
2421
|
-
},
|
|
2421
|
+
}, nt = ({
|
|
2422
2422
|
value: t,
|
|
2423
2423
|
onChange: r,
|
|
2424
|
-
options:
|
|
2425
|
-
placeholder:
|
|
2426
|
-
label:
|
|
2427
|
-
icon:
|
|
2428
|
-
required:
|
|
2429
|
-
disabled:
|
|
2430
|
-
error:
|
|
2431
|
-
searchable:
|
|
2432
|
-
name:
|
|
2433
|
-
modalTitle:
|
|
2434
|
-
modalSubtitle:
|
|
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
|
|
2435
2435
|
}) => {
|
|
2436
|
-
const [
|
|
2437
|
-
r(
|
|
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);
|
|
2438
2438
|
};
|
|
2439
2439
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2440
2440
|
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
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: "*" })
|
|
2445
2445
|
] }),
|
|
2446
2446
|
/* @__PURE__ */ e.jsxs(
|
|
2447
2447
|
"button",
|
|
2448
2448
|
{
|
|
2449
2449
|
type: "button",
|
|
2450
|
-
onClick: () => !
|
|
2451
|
-
disabled:
|
|
2450
|
+
onClick: () => !u && P(!0),
|
|
2451
|
+
disabled: u,
|
|
2452
2452
|
className: `w-full px-4 py-3 rounded-xl border transition-all duration-200 flex items-center justify-between text-left
|
|
2453
|
-
${
|
|
2454
|
-
${
|
|
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"}
|
|
2455
2455
|
text-slate-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-violet-500/20`,
|
|
2456
2456
|
children: [
|
|
2457
2457
|
/* @__PURE__ */ e.jsx(
|
|
2458
2458
|
"span",
|
|
2459
2459
|
{
|
|
2460
2460
|
className: `text-sm ${t ? "" : "text-slate-400 dark:text-slate-500"}`,
|
|
2461
|
-
children:
|
|
2461
|
+
children: m
|
|
2462
2462
|
}
|
|
2463
2463
|
),
|
|
2464
2464
|
/* @__PURE__ */ e.jsx(se, { className: "w-5 h-5 text-slate-400 dark:text-slate-500" })
|
|
2465
2465
|
]
|
|
2466
2466
|
}
|
|
2467
2467
|
),
|
|
2468
|
-
!
|
|
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(
|
|
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" }) }),
|
|
2470
2470
|
/* @__PURE__ */ e.jsx("span", { className: "text-xs text-green-600 dark:text-green-400 font-medium", children: "Selected" })
|
|
2471
2471
|
] }),
|
|
2472
|
-
|
|
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 }) })
|
|
2473
2473
|
] }),
|
|
2474
2474
|
/* @__PURE__ */ e.jsx(
|
|
2475
|
-
|
|
2475
|
+
Ge,
|
|
2476
2476
|
{
|
|
2477
|
-
isOpen:
|
|
2478
|
-
onClose: () =>
|
|
2479
|
-
onSelect:
|
|
2480
|
-
options:
|
|
2477
|
+
isOpen: $,
|
|
2478
|
+
onClose: () => P(!1),
|
|
2479
|
+
onSelect: g,
|
|
2480
|
+
options: a,
|
|
2481
2481
|
selectedValue: t,
|
|
2482
|
-
title:
|
|
2483
|
-
subtitle:
|
|
2484
|
-
icon:
|
|
2485
|
-
searchable:
|
|
2482
|
+
title: z || x || "Select Option",
|
|
2483
|
+
subtitle: N || `Choose from ${a.length} options`,
|
|
2484
|
+
icon: b,
|
|
2485
|
+
searchable: y
|
|
2486
2486
|
}
|
|
2487
2487
|
)
|
|
2488
2488
|
] });
|
|
2489
|
-
},
|
|
2489
|
+
}, ot = ({
|
|
2490
2490
|
steps: t = [],
|
|
2491
2491
|
initialData: r = {},
|
|
2492
|
-
onSubmit:
|
|
2493
|
-
onCancel:
|
|
2494
|
-
onEdit:
|
|
2495
|
-
onStepChange:
|
|
2496
|
-
submitButtonText:
|
|
2497
|
-
cancelButtonText:
|
|
2498
|
-
editButtonText:
|
|
2499
|
-
showEditingBadge:
|
|
2500
|
-
editingEntity:
|
|
2501
|
-
helpText:
|
|
2502
|
-
isModal:
|
|
2503
|
-
mode:
|
|
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"
|
|
2504
2504
|
}) => {
|
|
2505
2505
|
var s;
|
|
2506
|
-
const
|
|
2506
|
+
const P = ee(null), [f, m] = T(0), [g, R] = T(
|
|
2507
2507
|
() => typeof window < "u" ? window.innerWidth >= 1024 : !0
|
|
2508
|
-
), [
|
|
2509
|
-
const
|
|
2510
|
-
return
|
|
2511
|
-
|
|
2512
|
-
|
|
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] || "";
|
|
2513
2513
|
});
|
|
2514
|
-
}),
|
|
2515
|
-
}), [
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
}, [
|
|
2519
|
-
const
|
|
2520
|
-
var
|
|
2521
|
-
(
|
|
2522
|
-
},
|
|
2523
|
-
if (
|
|
2524
|
-
const
|
|
2525
|
-
|
|
2526
|
-
const
|
|
2527
|
-
return
|
|
2528
|
-
|
|
2529
|
-
}),
|
|
2530
|
-
}),
|
|
2531
|
-
},
|
|
2532
|
-
if (
|
|
2533
|
-
const
|
|
2534
|
-
if (
|
|
2535
|
-
const
|
|
2536
|
-
Object.assign(
|
|
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);
|
|
2537
2537
|
}
|
|
2538
|
-
return
|
|
2539
|
-
const
|
|
2540
|
-
if (
|
|
2541
|
-
|
|
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`;
|
|
2542
2542
|
return;
|
|
2543
2543
|
}
|
|
2544
|
-
if (
|
|
2545
|
-
const { minLength:
|
|
2546
|
-
|
|
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");
|
|
2547
2547
|
}
|
|
2548
|
-
}),
|
|
2549
|
-
},
|
|
2550
|
-
if (
|
|
2551
|
-
const
|
|
2552
|
-
|
|
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();
|
|
2553
2553
|
}
|
|
2554
|
-
},
|
|
2555
|
-
|
|
2556
|
-
},
|
|
2557
|
-
if (typeof window < "u" && window.innerWidth < 1024 &&
|
|
2558
|
-
|
|
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();
|
|
2559
2559
|
return;
|
|
2560
2560
|
}
|
|
2561
|
-
(
|
|
2562
|
-
},
|
|
2563
|
-
|
|
2564
|
-
},
|
|
2565
|
-
return /* @__PURE__ */ e.jsxs("form", { onSubmit:
|
|
2566
|
-
|
|
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(
|
|
2567
2567
|
"div",
|
|
2568
2568
|
{
|
|
2569
2569
|
className: "lg:hidden absolute inset-0 z-20 bg-black/40 backdrop-blur-[1px]",
|
|
2570
|
-
onClick: () =>
|
|
2570
|
+
onClick: () => R(!1)
|
|
2571
2571
|
}
|
|
2572
2572
|
),
|
|
2573
2573
|
/* @__PURE__ */ e.jsxs("div", { className: `
|
|
@@ -2575,45 +2575,45 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2575
2575
|
border-r border-slate-200 dark:border-slate-700
|
|
2576
2576
|
absolute z-30 h-full bg-white dark:bg-slate-800
|
|
2577
2577
|
lg:relative lg:flex-shrink-0 lg:z-auto lg:h-auto lg:bg-transparent dark:lg:bg-transparent
|
|
2578
|
-
${
|
|
2578
|
+
${g ? "w-52 lg:w-56" : "w-0 lg:w-10"}
|
|
2579
2579
|
`, children: [
|
|
2580
|
-
!
|
|
2581
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center gap-2 flex-1 justify-center", children:
|
|
2582
|
-
const
|
|
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;
|
|
2583
2583
|
return /* @__PURE__ */ e.jsx(
|
|
2584
2584
|
"button",
|
|
2585
2585
|
{
|
|
2586
2586
|
type: "button",
|
|
2587
|
-
onClick: () =>
|
|
2588
|
-
title:
|
|
2587
|
+
onClick: () => _(c),
|
|
2588
|
+
title: h[c].title,
|
|
2589
2589
|
className: `
|
|
2590
2590
|
rounded-full transition-all duration-300 flex-shrink-0
|
|
2591
|
-
${
|
|
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"}
|
|
2592
2592
|
`
|
|
2593
2593
|
},
|
|
2594
|
-
|
|
2594
|
+
c
|
|
2595
2595
|
);
|
|
2596
2596
|
}) }),
|
|
2597
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(
|
|
2598
2598
|
"div",
|
|
2599
2599
|
{
|
|
2600
|
-
className: `w-full rounded-full transition-all duration-500 ${
|
|
2601
|
-
style: { height: `${(
|
|
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}%` }
|
|
2602
2602
|
}
|
|
2603
2603
|
) })
|
|
2604
2604
|
] }),
|
|
2605
|
-
|
|
2606
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex-1 space-y-1.5 mb-4", children:
|
|
2607
|
-
const
|
|
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;
|
|
2608
2608
|
return /* @__PURE__ */ e.jsx(
|
|
2609
2609
|
"button",
|
|
2610
2610
|
{
|
|
2611
2611
|
type: "button",
|
|
2612
|
-
onClick: () =>
|
|
2613
|
-
disabled: !
|
|
2612
|
+
onClick: () => B && _(c),
|
|
2613
|
+
disabled: !B,
|
|
2614
2614
|
className: `
|
|
2615
2615
|
w-full p-3 rounded-xl transition-all duration-200 text-left
|
|
2616
|
-
${
|
|
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"}
|
|
2617
2617
|
`,
|
|
2618
2618
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2.5", children: [
|
|
2619
2619
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2621,35 +2621,35 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2621
2621
|
{
|
|
2622
2622
|
className: `
|
|
2623
2623
|
w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0 transition-all
|
|
2624
|
-
${
|
|
2624
|
+
${j ? "bg-white/20" : E ? "bg-emerald-100 dark:bg-emerald-500/20" : "bg-slate-100 dark:bg-slate-700"}
|
|
2625
2625
|
`,
|
|
2626
|
-
children:
|
|
2627
|
-
|
|
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,
|
|
2628
2628
|
{
|
|
2629
|
-
className: `w-4 h-4 ${
|
|
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"}`
|
|
2630
2630
|
}
|
|
2631
2631
|
)
|
|
2632
2632
|
}
|
|
2633
2633
|
),
|
|
2634
2634
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
2635
2635
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1.5 mb-0.5", children: [
|
|
2636
|
-
/* @__PURE__ */ e.jsxs("span", { className: `text-[10px] font-semibold uppercase tracking-wider ${
|
|
2637
|
-
|
|
2638
|
-
|
|
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
|
|
2639
2639
|
] }),
|
|
2640
|
-
|
|
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: "✓" })
|
|
2641
2641
|
] }),
|
|
2642
|
-
/* @__PURE__ */ e.jsx("p", { className: `text-xs font-semibold truncate leading-tight ${
|
|
2643
|
-
|
|
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 })
|
|
2644
2644
|
] })
|
|
2645
2645
|
] })
|
|
2646
2646
|
},
|
|
2647
|
-
|
|
2647
|
+
c
|
|
2648
2648
|
);
|
|
2649
2649
|
}) }),
|
|
2650
|
-
!
|
|
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: [
|
|
2651
2651
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold text-blue-600 dark:text-blue-400", children: "Tip: " }),
|
|
2652
|
-
|
|
2652
|
+
z
|
|
2653
2653
|
] }) })
|
|
2654
2654
|
] })
|
|
2655
2655
|
] }),
|
|
@@ -2661,31 +2661,31 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2661
2661
|
"button",
|
|
2662
2662
|
{
|
|
2663
2663
|
type: "button",
|
|
2664
|
-
onClick: () =>
|
|
2664
|
+
onClick: () => R(!g),
|
|
2665
2665
|
className: `p-2.5 rounded-lg border border-slate-200 dark:border-slate-600
|
|
2666
2666
|
bg-white dark:bg-slate-700 text-slate-500 dark:text-slate-400
|
|
2667
2667
|
hover:bg-violet-50 hover:border-violet-300 hover:text-violet-600
|
|
2668
2668
|
dark:hover:bg-violet-900/30 dark:hover:border-violet-600 dark:hover:text-violet-400
|
|
2669
2669
|
transition-all duration-200 active:scale-95`,
|
|
2670
2670
|
"aria-label": "Toggle steps",
|
|
2671
|
-
children:
|
|
2671
|
+
children: g ? /* @__PURE__ */ e.jsx(ce, { className: "w-4 h-4" }) : /* @__PURE__ */ e.jsx(se, { className: "w-4 h-4" })
|
|
2672
2672
|
}
|
|
2673
2673
|
),
|
|
2674
2674
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
2675
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-xs font-semibold text-slate-700 dark:text-slate-300 truncate", children:
|
|
2676
|
-
/* @__PURE__ */ e.jsxs("p", { className: `text-[10px] font-medium ${
|
|
2677
|
-
|
|
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",
|
|
2678
2678
|
" ",
|
|
2679
|
-
|
|
2679
|
+
f + 1,
|
|
2680
2680
|
"/",
|
|
2681
|
-
|
|
2681
|
+
h.length
|
|
2682
2682
|
] })
|
|
2683
2683
|
] }),
|
|
2684
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(
|
|
2685
2685
|
"div",
|
|
2686
2686
|
{
|
|
2687
|
-
className: `h-1.5 rounded-full transition-all duration-300 ${
|
|
2688
|
-
style: { width: `${(
|
|
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}%` }
|
|
2689
2689
|
}
|
|
2690
2690
|
) })
|
|
2691
2691
|
] }),
|
|
@@ -2693,7 +2693,7 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2693
2693
|
"button",
|
|
2694
2694
|
{
|
|
2695
2695
|
type: "button",
|
|
2696
|
-
onClick: () =>
|
|
2696
|
+
onClick: () => R(!g),
|
|
2697
2697
|
className: `hidden lg:flex absolute left-0 top-5 -translate-x-[1.625rem] z-20
|
|
2698
2698
|
w-6 h-6 lg:w-7 lg:h-7 rounded-full
|
|
2699
2699
|
bg-white dark:bg-slate-800
|
|
@@ -2704,30 +2704,30 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2704
2704
|
hover:border-violet-300 dark:hover:border-violet-600
|
|
2705
2705
|
hover:scale-110 active:scale-95
|
|
2706
2706
|
transition-all duration-200 group`,
|
|
2707
|
-
"aria-label":
|
|
2708
|
-
children:
|
|
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" })
|
|
2709
2709
|
}
|
|
2710
2710
|
),
|
|
2711
|
-
/* @__PURE__ */ e.jsx("div", { ref:
|
|
2712
|
-
|
|
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,
|
|
2713
2713
|
{
|
|
2714
|
-
index:
|
|
2715
|
-
field: { ...
|
|
2716
|
-
value:
|
|
2717
|
-
onChange:
|
|
2718
|
-
error:
|
|
2719
|
-
mode:
|
|
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: $
|
|
2720
2720
|
},
|
|
2721
|
-
|
|
2721
|
+
n.name || c
|
|
2722
2722
|
)) }) }),
|
|
2723
2723
|
/* @__PURE__ */ e.jsx("div", { className: `flex-shrink-0 px-4 py-3 sm:px-5 sm:py-3.5
|
|
2724
2724
|
border-t border-slate-200 dark:border-slate-700
|
|
2725
2725
|
bg-white dark:bg-slate-800`, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-2.5", children: [
|
|
2726
|
-
|
|
2726
|
+
J ? /* @__PURE__ */ e.jsx("div", {}) : /* @__PURE__ */ e.jsxs(
|
|
2727
2727
|
"button",
|
|
2728
2728
|
{
|
|
2729
2729
|
type: "button",
|
|
2730
|
-
onClick:
|
|
2730
|
+
onClick: p,
|
|
2731
2731
|
className: `inline-flex items-center gap-2 px-3.5 py-2.5 sm:px-4 sm:py-2.5
|
|
2732
2732
|
rounded-xl text-sm font-semibold transition-all duration-200
|
|
2733
2733
|
bg-white hover:bg-slate-50 text-slate-700
|
|
@@ -2735,18 +2735,18 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2735
2735
|
dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300
|
|
2736
2736
|
shadow-sm hover:shadow-md hover:scale-105 active:scale-95`,
|
|
2737
2737
|
children: [
|
|
2738
|
-
/* @__PURE__ */ e.jsx(
|
|
2739
|
-
/* @__PURE__ */ e.jsx("span", { className:
|
|
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" })
|
|
2740
2740
|
]
|
|
2741
2741
|
}
|
|
2742
2742
|
),
|
|
2743
2743
|
/* @__PURE__ */ e.jsx("div", { className: "flex-1" }),
|
|
2744
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children:
|
|
2744
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: C ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2745
2745
|
/* @__PURE__ */ e.jsxs(
|
|
2746
2746
|
"button",
|
|
2747
2747
|
{
|
|
2748
2748
|
type: "button",
|
|
2749
|
-
onClick:
|
|
2749
|
+
onClick: i,
|
|
2750
2750
|
className: `hidden sm:inline-flex items-center gap-1.5 px-3.5 py-2.5 sm:px-4 sm:py-2.5
|
|
2751
2751
|
rounded-xl text-sm font-semibold transition-all duration-200
|
|
2752
2752
|
bg-white hover:bg-slate-50 text-slate-700
|
|
@@ -2754,16 +2754,16 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2754
2754
|
dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300
|
|
2755
2755
|
shadow-sm hover:shadow-md hover:scale-105 active:scale-95`,
|
|
2756
2756
|
children: [
|
|
2757
|
-
/* @__PURE__ */ e.jsx(
|
|
2757
|
+
/* @__PURE__ */ e.jsx(Z, { className: "w-4 h-4 flex-shrink-0" }),
|
|
2758
2758
|
/* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children: "Close" })
|
|
2759
2759
|
]
|
|
2760
2760
|
}
|
|
2761
2761
|
),
|
|
2762
|
-
!
|
|
2762
|
+
!G && /* @__PURE__ */ e.jsxs(
|
|
2763
2763
|
"button",
|
|
2764
2764
|
{
|
|
2765
2765
|
type: "button",
|
|
2766
|
-
onClick:
|
|
2766
|
+
onClick: F,
|
|
2767
2767
|
className: `inline-flex items-center gap-1.5 px-3.5 py-2.5 sm:px-4 sm:py-2.5
|
|
2768
2768
|
rounded-xl text-sm font-semibold transition-all duration-200
|
|
2769
2769
|
bg-white hover:bg-slate-50 text-slate-700
|
|
@@ -2776,11 +2776,11 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2776
2776
|
]
|
|
2777
2777
|
}
|
|
2778
2778
|
),
|
|
2779
|
-
|
|
2779
|
+
x && /* @__PURE__ */ e.jsxs(
|
|
2780
2780
|
"button",
|
|
2781
2781
|
{
|
|
2782
2782
|
type: "button",
|
|
2783
|
-
onClick:
|
|
2783
|
+
onClick: x,
|
|
2784
2784
|
className: `inline-flex items-center gap-1.5 px-3.5 py-2.5 sm:px-4 sm:py-2.5
|
|
2785
2785
|
rounded-xl text-sm font-semibold transition-all duration-200
|
|
2786
2786
|
bg-gradient-to-r from-violet-600 to-indigo-600
|
|
@@ -2788,8 +2788,8 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2788
2788
|
text-white shadow-md hover:shadow-lg
|
|
2789
2789
|
hover:scale-105 active:scale-95`,
|
|
2790
2790
|
children: [
|
|
2791
|
-
/* @__PURE__ */ e.jsx(
|
|
2792
|
-
/* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children:
|
|
2791
|
+
/* @__PURE__ */ e.jsx(ne, { className: "w-4 h-4 flex-shrink-0" }),
|
|
2792
|
+
/* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children: v }),
|
|
2793
2793
|
/* @__PURE__ */ e.jsx("span", { className: "sm:hidden", children: "Edit" })
|
|
2794
2794
|
]
|
|
2795
2795
|
}
|
|
@@ -2799,7 +2799,7 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2799
2799
|
"button",
|
|
2800
2800
|
{
|
|
2801
2801
|
type: "button",
|
|
2802
|
-
onClick:
|
|
2802
|
+
onClick: i,
|
|
2803
2803
|
className: `
|
|
2804
2804
|
items-center gap-1.5 px-3.5 py-2.5 sm:px-4 sm:py-2.5
|
|
2805
2805
|
rounded-xl text-sm font-semibold transition-all duration-200
|
|
@@ -2807,15 +2807,15 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2807
2807
|
border border-slate-200 dark:border-slate-600
|
|
2808
2808
|
dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-300
|
|
2809
2809
|
shadow-sm hover:shadow-md hover:scale-105 active:scale-95
|
|
2810
|
-
${
|
|
2810
|
+
${O ? "hidden sm:inline-flex" : "inline-flex"}
|
|
2811
2811
|
`,
|
|
2812
2812
|
children: [
|
|
2813
|
-
/* @__PURE__ */ e.jsx(
|
|
2814
|
-
/* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children:
|
|
2813
|
+
/* @__PURE__ */ e.jsx(Z, { className: "w-4 h-4 flex-shrink-0" }),
|
|
2814
|
+
/* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children: u })
|
|
2815
2815
|
]
|
|
2816
2816
|
}
|
|
2817
2817
|
),
|
|
2818
|
-
|
|
2818
|
+
G ? /* @__PURE__ */ e.jsxs(
|
|
2819
2819
|
"button",
|
|
2820
2820
|
{
|
|
2821
2821
|
type: "submit",
|
|
@@ -2826,15 +2826,15 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2826
2826
|
text-white shadow-md hover:shadow-lg
|
|
2827
2827
|
hover:scale-105 active:scale-95`,
|
|
2828
2828
|
children: [
|
|
2829
|
-
/* @__PURE__ */ e.jsx(
|
|
2830
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
2829
|
+
/* @__PURE__ */ e.jsx(oe, { className: "w-4 h-4 flex-shrink-0" }),
|
|
2830
|
+
/* @__PURE__ */ e.jsx("span", { children: d })
|
|
2831
2831
|
]
|
|
2832
2832
|
}
|
|
2833
2833
|
) : /* @__PURE__ */ e.jsxs(
|
|
2834
2834
|
"button",
|
|
2835
2835
|
{
|
|
2836
2836
|
type: "button",
|
|
2837
|
-
onClick:
|
|
2837
|
+
onClick: F,
|
|
2838
2838
|
className: `inline-flex items-center gap-1.5 px-3.5 py-2.5 sm:px-4 sm:py-2.5
|
|
2839
2839
|
rounded-xl text-sm font-semibold transition-all duration-200
|
|
2840
2840
|
bg-white hover:bg-slate-50 text-slate-700
|
|
@@ -2851,14 +2851,14 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2851
2851
|
] }) })
|
|
2852
2852
|
] })
|
|
2853
2853
|
] });
|
|
2854
|
-
},
|
|
2854
|
+
}, it = ({
|
|
2855
2855
|
header: t,
|
|
2856
2856
|
error: r = null,
|
|
2857
|
-
errorDescription:
|
|
2858
|
-
onErrorClose:
|
|
2859
|
-
children:
|
|
2860
|
-
loading:
|
|
2861
|
-
loadingMessage:
|
|
2857
|
+
errorDescription: a = null,
|
|
2858
|
+
onErrorClose: i,
|
|
2859
|
+
children: x,
|
|
2860
|
+
loading: b = !1,
|
|
2861
|
+
loadingMessage: d = "Loading data..."
|
|
2862
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: [
|
|
2863
2863
|
t && /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0", children: t }),
|
|
2864
2864
|
r && /* @__PURE__ */ e.jsx("div", { className: `
|
|
@@ -2871,26 +2871,26 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2871
2871
|
flex-shrink-0 w-7 h-7 sm:w-8 sm:h-8 rounded-lg mt-0.5
|
|
2872
2872
|
bg-red-100 dark:bg-red-800/30
|
|
2873
2873
|
flex items-center justify-center
|
|
2874
|
-
`, children: /* @__PURE__ */ e.jsx(
|
|
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" }) }),
|
|
2875
2875
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
2876
2876
|
/* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-red-800 dark:text-red-300 leading-snug", children: r }),
|
|
2877
|
-
|
|
2877
|
+
a && /* @__PURE__ */ e.jsx("p", { className: "mt-0.5 text-xs text-red-700/80 dark:text-red-400 leading-relaxed", children: a })
|
|
2878
2878
|
] }),
|
|
2879
|
-
|
|
2879
|
+
i && /* @__PURE__ */ e.jsx(
|
|
2880
2880
|
"button",
|
|
2881
2881
|
{
|
|
2882
|
-
onClick:
|
|
2882
|
+
onClick: i,
|
|
2883
2883
|
className: `flex-shrink-0 p-2 rounded-lg mt-0.5
|
|
2884
2884
|
text-red-400 transition-all duration-200
|
|
2885
2885
|
hover:bg-red-100 hover:text-red-600
|
|
2886
2886
|
dark:hover:bg-red-800/50 dark:hover:text-red-300
|
|
2887
2887
|
hover:scale-105 active:scale-95`,
|
|
2888
2888
|
"aria-label": "Dismiss error",
|
|
2889
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2889
|
+
children: /* @__PURE__ */ e.jsx(Z, { className: "w-3.5 h-3.5" })
|
|
2890
2890
|
}
|
|
2891
2891
|
)
|
|
2892
2892
|
] }) }) }),
|
|
2893
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex-grow min-h-0 overflow-y-auto", children:
|
|
2893
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex-grow min-h-0 overflow-y-auto", children: b ? /* @__PURE__ */ e.jsx("div", { className: `
|
|
2894
2894
|
h-full flex items-center justify-center
|
|
2895
2895
|
rounded-xl sm:rounded-2xl border
|
|
2896
2896
|
bg-white border-slate-200/60 shadow-sm
|
|
@@ -2901,88 +2901,88 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
2901
2901
|
/* @__PURE__ */ e.jsx("div", { className: `absolute inset-0 rounded-full border-[2.5px] border-transparent
|
|
2902
2902
|
border-t-violet-600 dark:border-t-violet-400 animate-spin` })
|
|
2903
2903
|
] }),
|
|
2904
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1", children: [0, 120, 240].map((
|
|
2904
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1", children: [0, 120, 240].map((u) => /* @__PURE__ */ e.jsx(
|
|
2905
2905
|
"span",
|
|
2906
2906
|
{
|
|
2907
2907
|
className: `w-1 h-1 rounded-full bg-gradient-to-r from-violet-500 to-indigo-500
|
|
2908
2908
|
animate-bounce`,
|
|
2909
|
-
style: { animationDelay: `${
|
|
2909
|
+
style: { animationDelay: `${u}ms` }
|
|
2910
2910
|
},
|
|
2911
|
-
|
|
2911
|
+
u
|
|
2912
2912
|
)) }),
|
|
2913
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-xs font-medium text-slate-500 dark:text-slate-400", children:
|
|
2914
|
-
] }) }) :
|
|
2915
|
-
] }) }),
|
|
2913
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-xs font-medium text-slate-500 dark:text-slate-400", children: d })
|
|
2914
|
+
] }) }) : x })
|
|
2915
|
+
] }) }), dt = ({
|
|
2916
2916
|
message: t = "Loading...",
|
|
2917
2917
|
supportingMessage: r = !1,
|
|
2918
|
-
title:
|
|
2919
|
-
className:
|
|
2920
|
-
size:
|
|
2918
|
+
title: a = "Loading Data",
|
|
2919
|
+
className: i = "",
|
|
2920
|
+
size: x = "lg"
|
|
2921
2921
|
}) => {
|
|
2922
|
-
const
|
|
2922
|
+
const b = {
|
|
2923
2923
|
sm: "h-7 w-7 border-2",
|
|
2924
2924
|
md: "h-9 w-9 border-[3px]",
|
|
2925
2925
|
lg: "h-10 w-10 sm:h-12 sm:w-12 border-[3px] sm:border-[4px]",
|
|
2926
2926
|
xl: "h-12 w-12 sm:h-16 sm:w-16 border-[4px]"
|
|
2927
2927
|
};
|
|
2928
|
-
return /* @__PURE__ */ e.jsxs("div", { className: `flex flex-col items-center justify-center h-full w-full text-center px-4 ${
|
|
2929
|
-
/* @__PURE__ */ e.jsx("div", { className: `animate-spin rounded-full ${
|
|
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]}
|
|
2930
2930
|
border-slate-200 border-t-violet-500 border-r-violet-500 mb-4` }),
|
|
2931
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1 mb-3", children: [0, 120, 240].map((
|
|
2931
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1 mb-3", children: [0, 120, 240].map((d) => /* @__PURE__ */ e.jsx(
|
|
2932
2932
|
"span",
|
|
2933
2933
|
{
|
|
2934
2934
|
className: "w-1 h-1 rounded-full bg-gradient-to-r from-violet-500 to-indigo-500 animate-bounce",
|
|
2935
|
-
style: { animationDelay: `${
|
|
2935
|
+
style: { animationDelay: `${d}ms` }
|
|
2936
2936
|
},
|
|
2937
|
-
|
|
2937
|
+
d
|
|
2938
2938
|
)) }),
|
|
2939
|
-
/* @__PURE__ */ e.jsx("h3", { className: "text-sm sm:text-base font-semibold text-slate-900 dark:text-slate-200 mb-1", children:
|
|
2939
|
+
/* @__PURE__ */ e.jsx("h3", { className: "text-sm sm:text-base font-semibold text-slate-900 dark:text-slate-200 mb-1", children: a }),
|
|
2940
2940
|
/* @__PURE__ */ e.jsx("p", { className: "text-xs sm:text-sm text-slate-500 dark:text-slate-400 max-w-xs", children: r || t })
|
|
2941
2941
|
] });
|
|
2942
|
-
},
|
|
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
|
|
2943
2943
|
border-red-200 bg-red-50
|
|
2944
2944
|
dark:bg-red-900/20 dark:border-red-800/50
|
|
2945
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: [
|
|
2946
2946
|
/* @__PURE__ */ e.jsx("div", { className: `flex-shrink-0 w-7 h-7 rounded-lg mt-0.5
|
|
2947
2947
|
bg-red-100 dark:bg-red-800/30
|
|
2948
|
-
flex items-center justify-center`, children: /* @__PURE__ */ e.jsx(
|
|
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" }) }),
|
|
2949
2949
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
2950
2950
|
/* @__PURE__ */ e.jsx("p", { className: "text-sm font-semibold text-red-800 dark:text-red-300 leading-snug", children: t }),
|
|
2951
2951
|
r && /* @__PURE__ */ e.jsx("p", { className: "mt-0.5 text-xs text-red-700/80 dark:text-red-400 leading-relaxed", children: r })
|
|
2952
2952
|
] }),
|
|
2953
|
-
|
|
2953
|
+
a && /* @__PURE__ */ e.jsx(
|
|
2954
2954
|
"button",
|
|
2955
2955
|
{
|
|
2956
2956
|
type: "button",
|
|
2957
|
-
onClick:
|
|
2957
|
+
onClick: a,
|
|
2958
2958
|
"aria-label": "Close error",
|
|
2959
2959
|
className: `flex-shrink-0 p-1 rounded-lg mt-0.5 transition-all duration-200
|
|
2960
2960
|
text-red-400
|
|
2961
2961
|
hover:bg-red-100 hover:text-red-600
|
|
2962
2962
|
dark:hover:bg-red-800/50 dark:hover:text-red-300
|
|
2963
2963
|
hover:scale-105 active:scale-95`,
|
|
2964
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2964
|
+
children: /* @__PURE__ */ e.jsx(Z, { className: "w-3.5 h-3.5" })
|
|
2965
2965
|
}
|
|
2966
2966
|
)
|
|
2967
|
-
] }) }) }) : null,
|
|
2967
|
+
] }) }) }) : null, xt = ({
|
|
2968
2968
|
content: t,
|
|
2969
2969
|
className: r = "",
|
|
2970
|
-
emptyText:
|
|
2971
|
-
size:
|
|
2970
|
+
emptyText: a = null,
|
|
2971
|
+
size: i = "md"
|
|
2972
2972
|
// 'xs' | 'sm' | 'md'
|
|
2973
2973
|
}) => {
|
|
2974
2974
|
if (!t || !t.replace(/<[^>]*>/g, "").trim())
|
|
2975
|
-
return
|
|
2976
|
-
const
|
|
2975
|
+
return a ? /* @__PURE__ */ e.jsx("span", { className: "text-slate-400 dark:text-slate-500 text-sm italic", children: a }) : null;
|
|
2976
|
+
const x = {
|
|
2977
2977
|
xs: "prose-xs text-xs",
|
|
2978
2978
|
sm: "prose-sm text-sm",
|
|
2979
2979
|
md: "prose-base text-base"
|
|
2980
|
-
}[
|
|
2980
|
+
}[i] || "prose-sm text-sm";
|
|
2981
2981
|
return /* @__PURE__ */ e.jsx(
|
|
2982
2982
|
"div",
|
|
2983
2983
|
{
|
|
2984
2984
|
className: `
|
|
2985
|
-
prose ${
|
|
2985
|
+
prose ${x} max-w-none
|
|
2986
2986
|
text-slate-700 dark:text-slate-300
|
|
2987
2987
|
|
|
2988
2988
|
[&>*]:my-0.5
|
|
@@ -3004,105 +3004,935 @@ const Ae = ({ user: t, onLogout: r, showEmail: n = !0 }) => {
|
|
|
3004
3004
|
}
|
|
3005
3005
|
);
|
|
3006
3006
|
};
|
|
3007
|
-
let
|
|
3008
|
-
const
|
|
3007
|
+
let V = null;
|
|
3008
|
+
const mt = ({
|
|
3009
3009
|
items: t = [],
|
|
3010
3010
|
onReorder: r,
|
|
3011
|
-
onDropFrom:
|
|
3012
|
-
onDropTo:
|
|
3013
|
-
listId:
|
|
3014
|
-
disabled:
|
|
3015
|
-
renderItem:
|
|
3016
|
-
className:
|
|
3017
|
-
dropZoneClassName:
|
|
3018
|
-
activeDropZoneClassName:
|
|
3019
|
-
children:
|
|
3020
|
-
footer:
|
|
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
|
|
3021
3021
|
}) => {
|
|
3022
|
-
const
|
|
3023
|
-
|
|
3024
|
-
const
|
|
3025
|
-
|
|
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);
|
|
3026
3026
|
};
|
|
3027
|
-
return document.addEventListener("dragend",
|
|
3027
|
+
return document.addEventListener("dragend", h), () => document.removeEventListener("dragend", h);
|
|
3028
3028
|
}, []);
|
|
3029
|
-
const
|
|
3030
|
-
|
|
3031
|
-
},
|
|
3032
|
-
|
|
3033
|
-
},
|
|
3034
|
-
|
|
3035
|
-
},
|
|
3036
|
-
|
|
3037
|
-
},
|
|
3038
|
-
|
|
3039
|
-
},
|
|
3040
|
-
if (
|
|
3041
|
-
if (
|
|
3042
|
-
const
|
|
3043
|
-
if (
|
|
3044
|
-
|
|
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();
|
|
3045
3045
|
return;
|
|
3046
3046
|
}
|
|
3047
|
-
const
|
|
3048
|
-
|
|
3047
|
+
const W = [...t], [F] = W.splice(M, 1);
|
|
3048
|
+
W.splice(k, 0, F), r == null || r(W);
|
|
3049
3049
|
} else
|
|
3050
|
-
|
|
3051
|
-
|
|
3050
|
+
a == null || a({ item: V.item, fromListId: V.listId, toIndex: k }), i == null || i({ item: V.item, fromIndex: V.index });
|
|
3051
|
+
D();
|
|
3052
3052
|
}
|
|
3053
|
-
},
|
|
3054
|
-
if (
|
|
3055
|
-
if (
|
|
3056
|
-
|
|
3053
|
+
}, C = (h) => {
|
|
3054
|
+
if (h.preventDefault(), !!V) {
|
|
3055
|
+
if (V.listId === x) {
|
|
3056
|
+
D();
|
|
3057
3057
|
return;
|
|
3058
3058
|
}
|
|
3059
|
-
|
|
3059
|
+
a == null || a({ item: V.item, fromListId: V.listId, toIndex: t.length }), i == null || i({ item: V.item, fromIndex: V.index }), D();
|
|
3060
3060
|
}
|
|
3061
|
-
},
|
|
3061
|
+
}, O = f && !b && (V == null ? void 0 : V.listId) !== x;
|
|
3062
3062
|
return /* @__PURE__ */ e.jsxs(
|
|
3063
3063
|
"div",
|
|
3064
3064
|
{
|
|
3065
|
-
className: `${
|
|
3066
|
-
onDragOver:
|
|
3067
|
-
onDragLeave:
|
|
3068
|
-
onDrop:
|
|
3065
|
+
className: `${v} ${O ? y : ""} ${u}`,
|
|
3066
|
+
onDragOver: b ? void 0 : X,
|
|
3067
|
+
onDragLeave: b ? void 0 : H,
|
|
3068
|
+
onDrop: b ? void 0 : C,
|
|
3069
3069
|
children: [
|
|
3070
|
-
t.length === 0 ?
|
|
3071
|
-
const
|
|
3072
|
-
return
|
|
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 ? {} : {
|
|
3073
3073
|
draggable: !0,
|
|
3074
|
-
onDragStart: (
|
|
3075
|
-
onDragEnter: (
|
|
3076
|
-
onDragEnd:
|
|
3077
|
-
onDrop: (
|
|
3078
|
-
},
|
|
3074
|
+
onDragStart: (p) => L(p, k),
|
|
3075
|
+
onDragEnter: (p) => Y(p, k),
|
|
3076
|
+
onDragEnd: D,
|
|
3077
|
+
onDrop: (p) => U(p, k)
|
|
3078
|
+
}, M, W);
|
|
3079
3079
|
}),
|
|
3080
|
-
|
|
3080
|
+
z
|
|
3081
3081
|
]
|
|
3082
3082
|
}
|
|
3083
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
|
+
] });
|
|
3084
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
|
+
}
|
|
3085
3911
|
export {
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
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
|
|
3108
3938
|
};
|