sls-ui-library 1.0.0

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.
@@ -0,0 +1,2236 @@
1
+ import * as v from "react";
2
+ import Je, { forwardRef as Ge, createElement as xe } from "react";
3
+ import { createPortal as Xe } from "react-dom";
4
+ var me = { exports: {} }, Z = {};
5
+ /**
6
+ * @license React
7
+ * react-jsx-runtime.production.min.js
8
+ *
9
+ * Copyright (c) Facebook, Inc. and its affiliates.
10
+ *
11
+ * This source code is licensed under the MIT license found in the
12
+ * LICENSE file in the root directory of this source tree.
13
+ */
14
+ var Ve;
15
+ function Ft() {
16
+ if (Ve) return Z;
17
+ Ve = 1;
18
+ var n = Je, r = Symbol.for("react.element"), s = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, i = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
19
+ function f(h, c, m) {
20
+ var d, x = {}, y = null, D = null;
21
+ m !== void 0 && (y = "" + m), c.key !== void 0 && (y = "" + c.key), c.ref !== void 0 && (D = c.ref);
22
+ for (d in c) a.call(c, d) && !l.hasOwnProperty(d) && (x[d] = c[d]);
23
+ if (h && h.defaultProps) for (d in c = h.defaultProps, c) x[d] === void 0 && (x[d] = c[d]);
24
+ return { $$typeof: r, type: h, key: y, ref: D, props: x, _owner: i.current };
25
+ }
26
+ return Z.Fragment = s, Z.jsx = f, Z.jsxs = f, Z;
27
+ }
28
+ var Q = {};
29
+ /**
30
+ * @license React
31
+ * react-jsx-runtime.development.js
32
+ *
33
+ * Copyright (c) Facebook, Inc. and its affiliates.
34
+ *
35
+ * This source code is licensed under the MIT license found in the
36
+ * LICENSE file in the root directory of this source tree.
37
+ */
38
+ var qe;
39
+ function It() {
40
+ return qe || (qe = 1, process.env.NODE_ENV !== "production" && function() {
41
+ var n = Je, r = Symbol.for("react.element"), s = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), h = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), D = Symbol.for("react.offscreen"), O = Symbol.iterator, j = "@@iterator";
42
+ function _(t) {
43
+ if (t === null || typeof t != "object")
44
+ return null;
45
+ var o = O && t[O] || t[j];
46
+ return typeof o == "function" ? o : null;
47
+ }
48
+ var C = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
49
+ function T(t) {
50
+ {
51
+ for (var o = arguments.length, u = new Array(o > 1 ? o - 1 : 0), p = 1; p < o; p++)
52
+ u[p - 1] = arguments[p];
53
+ H("error", t, u);
54
+ }
55
+ }
56
+ function H(t, o, u) {
57
+ {
58
+ var p = C.ReactDebugCurrentFrame, R = p.getStackAddendum();
59
+ R !== "" && (o += "%s", u = u.concat([R]));
60
+ var E = u.map(function(w) {
61
+ return String(w);
62
+ });
63
+ E.unshift("Warning: " + o), Function.prototype.apply.call(console[t], console, E);
64
+ }
65
+ }
66
+ var J = !1, N = !1, k = !1, I = !1, lt = !1, ve;
67
+ ve = Symbol.for("react.module.reference");
68
+ function ct(t) {
69
+ return !!(typeof t == "string" || typeof t == "function" || t === a || t === l || lt || t === i || t === m || t === d || I || t === D || J || N || k || typeof t == "object" && t !== null && (t.$$typeof === y || t.$$typeof === x || t.$$typeof === f || t.$$typeof === h || t.$$typeof === c || // This needs to include all possible module reference object
70
+ // types supported by any Flight configuration anywhere since
71
+ // we don't know which Flight build this will end up being used
72
+ // with.
73
+ t.$$typeof === ve || t.getModuleId !== void 0));
74
+ }
75
+ function dt(t, o, u) {
76
+ var p = t.displayName;
77
+ if (p)
78
+ return p;
79
+ var R = o.displayName || o.name || "";
80
+ return R !== "" ? u + "(" + R + ")" : u;
81
+ }
82
+ function ge(t) {
83
+ return t.displayName || "Context";
84
+ }
85
+ function $(t) {
86
+ if (t == null)
87
+ return null;
88
+ if (typeof t.tag == "number" && T("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
89
+ return t.displayName || t.name || null;
90
+ if (typeof t == "string")
91
+ return t;
92
+ switch (t) {
93
+ case a:
94
+ return "Fragment";
95
+ case s:
96
+ return "Portal";
97
+ case l:
98
+ return "Profiler";
99
+ case i:
100
+ return "StrictMode";
101
+ case m:
102
+ return "Suspense";
103
+ case d:
104
+ return "SuspenseList";
105
+ }
106
+ if (typeof t == "object")
107
+ switch (t.$$typeof) {
108
+ case h:
109
+ var o = t;
110
+ return ge(o) + ".Consumer";
111
+ case f:
112
+ var u = t;
113
+ return ge(u._context) + ".Provider";
114
+ case c:
115
+ return dt(t, t.render, "ForwardRef");
116
+ case x:
117
+ var p = t.displayName || null;
118
+ return p !== null ? p : $(t.type) || "Memo";
119
+ case y: {
120
+ var R = t, E = R._payload, w = R._init;
121
+ try {
122
+ return $(w(E));
123
+ } catch {
124
+ return null;
125
+ }
126
+ }
127
+ }
128
+ return null;
129
+ }
130
+ var Y = Object.assign, G = 0, ye, je, ke, we, Ne, Ce, Re;
131
+ function Ee() {
132
+ }
133
+ Ee.__reactDisabledLog = !0;
134
+ function ut() {
135
+ {
136
+ if (G === 0) {
137
+ ye = console.log, je = console.info, ke = console.warn, we = console.error, Ne = console.group, Ce = console.groupCollapsed, Re = console.groupEnd;
138
+ var t = {
139
+ configurable: !0,
140
+ enumerable: !0,
141
+ value: Ee,
142
+ writable: !0
143
+ };
144
+ Object.defineProperties(console, {
145
+ info: t,
146
+ log: t,
147
+ warn: t,
148
+ error: t,
149
+ group: t,
150
+ groupCollapsed: t,
151
+ groupEnd: t
152
+ });
153
+ }
154
+ G++;
155
+ }
156
+ }
157
+ function ft() {
158
+ {
159
+ if (G--, G === 0) {
160
+ var t = {
161
+ configurable: !0,
162
+ enumerable: !0,
163
+ writable: !0
164
+ };
165
+ Object.defineProperties(console, {
166
+ log: Y({}, t, {
167
+ value: ye
168
+ }),
169
+ info: Y({}, t, {
170
+ value: je
171
+ }),
172
+ warn: Y({}, t, {
173
+ value: ke
174
+ }),
175
+ error: Y({}, t, {
176
+ value: we
177
+ }),
178
+ group: Y({}, t, {
179
+ value: Ne
180
+ }),
181
+ groupCollapsed: Y({}, t, {
182
+ value: Ce
183
+ }),
184
+ groupEnd: Y({}, t, {
185
+ value: Re
186
+ })
187
+ });
188
+ }
189
+ G < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
190
+ }
191
+ }
192
+ var ae = C.ReactCurrentDispatcher, ie;
193
+ function K(t, o, u) {
194
+ {
195
+ if (ie === void 0)
196
+ try {
197
+ throw Error();
198
+ } catch (R) {
199
+ var p = R.stack.trim().match(/\n( *(at )?)/);
200
+ ie = p && p[1] || "";
201
+ }
202
+ return `
203
+ ` + ie + t;
204
+ }
205
+ }
206
+ var oe = !1, ee;
207
+ {
208
+ var xt = typeof WeakMap == "function" ? WeakMap : Map;
209
+ ee = new xt();
210
+ }
211
+ function Se(t, o) {
212
+ if (!t || oe)
213
+ return "";
214
+ {
215
+ var u = ee.get(t);
216
+ if (u !== void 0)
217
+ return u;
218
+ }
219
+ var p;
220
+ oe = !0;
221
+ var R = Error.prepareStackTrace;
222
+ Error.prepareStackTrace = void 0;
223
+ var E;
224
+ E = ae.current, ae.current = null, ut();
225
+ try {
226
+ if (o) {
227
+ var w = function() {
228
+ throw Error();
229
+ };
230
+ if (Object.defineProperty(w.prototype, "props", {
231
+ set: function() {
232
+ throw Error();
233
+ }
234
+ }), typeof Reflect == "object" && Reflect.construct) {
235
+ try {
236
+ Reflect.construct(w, []);
237
+ } catch (A) {
238
+ p = A;
239
+ }
240
+ Reflect.construct(t, [], w);
241
+ } else {
242
+ try {
243
+ w.call();
244
+ } catch (A) {
245
+ p = A;
246
+ }
247
+ t.call(w.prototype);
248
+ }
249
+ } else {
250
+ try {
251
+ throw Error();
252
+ } catch (A) {
253
+ p = A;
254
+ }
255
+ t();
256
+ }
257
+ } catch (A) {
258
+ if (A && p && typeof A.stack == "string") {
259
+ for (var g = A.stack.split(`
260
+ `), z = p.stack.split(`
261
+ `), M = g.length - 1, P = z.length - 1; M >= 1 && P >= 0 && g[M] !== z[P]; )
262
+ P--;
263
+ for (; M >= 1 && P >= 0; M--, P--)
264
+ if (g[M] !== z[P]) {
265
+ if (M !== 1 || P !== 1)
266
+ do
267
+ if (M--, P--, P < 0 || g[M] !== z[P]) {
268
+ var L = `
269
+ ` + g[M].replace(" at new ", " at ");
270
+ return t.displayName && L.includes("<anonymous>") && (L = L.replace("<anonymous>", t.displayName)), typeof t == "function" && ee.set(t, L), L;
271
+ }
272
+ while (M >= 1 && P >= 0);
273
+ break;
274
+ }
275
+ }
276
+ } finally {
277
+ oe = !1, ae.current = E, ft(), Error.prepareStackTrace = R;
278
+ }
279
+ var q = t ? t.displayName || t.name : "", W = q ? K(q) : "";
280
+ return typeof t == "function" && ee.set(t, W), W;
281
+ }
282
+ function mt(t, o, u) {
283
+ return Se(t, !1);
284
+ }
285
+ function ht(t) {
286
+ var o = t.prototype;
287
+ return !!(o && o.isReactComponent);
288
+ }
289
+ function te(t, o, u) {
290
+ if (t == null)
291
+ return "";
292
+ if (typeof t == "function")
293
+ return Se(t, ht(t));
294
+ if (typeof t == "string")
295
+ return K(t);
296
+ switch (t) {
297
+ case m:
298
+ return K("Suspense");
299
+ case d:
300
+ return K("SuspenseList");
301
+ }
302
+ if (typeof t == "object")
303
+ switch (t.$$typeof) {
304
+ case c:
305
+ return mt(t.render);
306
+ case x:
307
+ return te(t.type, o, u);
308
+ case y: {
309
+ var p = t, R = p._payload, E = p._init;
310
+ try {
311
+ return te(E(R), o, u);
312
+ } catch {
313
+ }
314
+ }
315
+ }
316
+ return "";
317
+ }
318
+ var X = Object.prototype.hasOwnProperty, _e = {}, Te = C.ReactDebugCurrentFrame;
319
+ function re(t) {
320
+ if (t) {
321
+ var o = t._owner, u = te(t.type, t._source, o ? o.type : null);
322
+ Te.setExtraStackFrame(u);
323
+ } else
324
+ Te.setExtraStackFrame(null);
325
+ }
326
+ function bt(t, o, u, p, R) {
327
+ {
328
+ var E = Function.call.bind(X);
329
+ for (var w in t)
330
+ if (E(t, w)) {
331
+ var g = void 0;
332
+ try {
333
+ if (typeof t[w] != "function") {
334
+ var z = Error((p || "React class") + ": " + u + " type `" + w + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[w] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
335
+ throw z.name = "Invariant Violation", z;
336
+ }
337
+ g = t[w](o, w, p, u, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
338
+ } catch (M) {
339
+ g = M;
340
+ }
341
+ g && !(g instanceof Error) && (re(R), T("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", p || "React class", u, w, typeof g), re(null)), g instanceof Error && !(g.message in _e) && (_e[g.message] = !0, re(R), T("Failed %s type: %s", u, g.message), re(null));
342
+ }
343
+ }
344
+ }
345
+ var pt = Array.isArray;
346
+ function le(t) {
347
+ return pt(t);
348
+ }
349
+ function vt(t) {
350
+ {
351
+ var o = typeof Symbol == "function" && Symbol.toStringTag, u = o && t[Symbol.toStringTag] || t.constructor.name || "Object";
352
+ return u;
353
+ }
354
+ }
355
+ function gt(t) {
356
+ try {
357
+ return Me(t), !1;
358
+ } catch {
359
+ return !0;
360
+ }
361
+ }
362
+ function Me(t) {
363
+ return "" + t;
364
+ }
365
+ function Pe(t) {
366
+ if (gt(t))
367
+ return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", vt(t)), Me(t);
368
+ }
369
+ var Oe = C.ReactCurrentOwner, yt = {
370
+ key: !0,
371
+ ref: !0,
372
+ __self: !0,
373
+ __source: !0
374
+ }, De, ze;
375
+ function jt(t) {
376
+ if (X.call(t, "ref")) {
377
+ var o = Object.getOwnPropertyDescriptor(t, "ref").get;
378
+ if (o && o.isReactWarning)
379
+ return !1;
380
+ }
381
+ return t.ref !== void 0;
382
+ }
383
+ function kt(t) {
384
+ if (X.call(t, "key")) {
385
+ var o = Object.getOwnPropertyDescriptor(t, "key").get;
386
+ if (o && o.isReactWarning)
387
+ return !1;
388
+ }
389
+ return t.key !== void 0;
390
+ }
391
+ function wt(t, o) {
392
+ typeof t.ref == "string" && Oe.current;
393
+ }
394
+ function Nt(t, o) {
395
+ {
396
+ var u = function() {
397
+ De || (De = !0, T("%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://reactjs.org/link/special-props)", o));
398
+ };
399
+ u.isReactWarning = !0, Object.defineProperty(t, "key", {
400
+ get: u,
401
+ configurable: !0
402
+ });
403
+ }
404
+ }
405
+ function Ct(t, o) {
406
+ {
407
+ var u = function() {
408
+ ze || (ze = !0, T("%s: `ref` 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://reactjs.org/link/special-props)", o));
409
+ };
410
+ u.isReactWarning = !0, Object.defineProperty(t, "ref", {
411
+ get: u,
412
+ configurable: !0
413
+ });
414
+ }
415
+ }
416
+ var Rt = function(t, o, u, p, R, E, w) {
417
+ var g = {
418
+ // This tag allows us to uniquely identify this as a React Element
419
+ $$typeof: r,
420
+ // Built-in properties that belong on the element
421
+ type: t,
422
+ key: o,
423
+ ref: u,
424
+ props: w,
425
+ // Record the component responsible for creating this element.
426
+ _owner: E
427
+ };
428
+ return g._store = {}, Object.defineProperty(g._store, "validated", {
429
+ configurable: !1,
430
+ enumerable: !1,
431
+ writable: !0,
432
+ value: !1
433
+ }), Object.defineProperty(g, "_self", {
434
+ configurable: !1,
435
+ enumerable: !1,
436
+ writable: !1,
437
+ value: p
438
+ }), Object.defineProperty(g, "_source", {
439
+ configurable: !1,
440
+ enumerable: !1,
441
+ writable: !1,
442
+ value: R
443
+ }), Object.freeze && (Object.freeze(g.props), Object.freeze(g)), g;
444
+ };
445
+ function Et(t, o, u, p, R) {
446
+ {
447
+ var E, w = {}, g = null, z = null;
448
+ u !== void 0 && (Pe(u), g = "" + u), kt(o) && (Pe(o.key), g = "" + o.key), jt(o) && (z = o.ref, wt(o, R));
449
+ for (E in o)
450
+ X.call(o, E) && !yt.hasOwnProperty(E) && (w[E] = o[E]);
451
+ if (t && t.defaultProps) {
452
+ var M = t.defaultProps;
453
+ for (E in M)
454
+ w[E] === void 0 && (w[E] = M[E]);
455
+ }
456
+ if (g || z) {
457
+ var P = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
458
+ g && Nt(w, P), z && Ct(w, P);
459
+ }
460
+ return Rt(t, g, z, R, p, Oe.current, w);
461
+ }
462
+ }
463
+ var ce = C.ReactCurrentOwner, Ae = C.ReactDebugCurrentFrame;
464
+ function V(t) {
465
+ if (t) {
466
+ var o = t._owner, u = te(t.type, t._source, o ? o.type : null);
467
+ Ae.setExtraStackFrame(u);
468
+ } else
469
+ Ae.setExtraStackFrame(null);
470
+ }
471
+ var de;
472
+ de = !1;
473
+ function ue(t) {
474
+ return typeof t == "object" && t !== null && t.$$typeof === r;
475
+ }
476
+ function Le() {
477
+ {
478
+ if (ce.current) {
479
+ var t = $(ce.current.type);
480
+ if (t)
481
+ return `
482
+
483
+ Check the render method of \`` + t + "`.";
484
+ }
485
+ return "";
486
+ }
487
+ }
488
+ function St(t) {
489
+ return "";
490
+ }
491
+ var Fe = {};
492
+ function _t(t) {
493
+ {
494
+ var o = Le();
495
+ if (!o) {
496
+ var u = typeof t == "string" ? t : t.displayName || t.name;
497
+ u && (o = `
498
+
499
+ Check the top-level render call using <` + u + ">.");
500
+ }
501
+ return o;
502
+ }
503
+ }
504
+ function Ie(t, o) {
505
+ {
506
+ if (!t._store || t._store.validated || t.key != null)
507
+ return;
508
+ t._store.validated = !0;
509
+ var u = _t(o);
510
+ if (Fe[u])
511
+ return;
512
+ Fe[u] = !0;
513
+ var p = "";
514
+ t && t._owner && t._owner !== ce.current && (p = " It was passed a child from " + $(t._owner.type) + "."), V(t), T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', u, p), V(null);
515
+ }
516
+ }
517
+ function $e(t, o) {
518
+ {
519
+ if (typeof t != "object")
520
+ return;
521
+ if (le(t))
522
+ for (var u = 0; u < t.length; u++) {
523
+ var p = t[u];
524
+ ue(p) && Ie(p, o);
525
+ }
526
+ else if (ue(t))
527
+ t._store && (t._store.validated = !0);
528
+ else if (t) {
529
+ var R = _(t);
530
+ if (typeof R == "function" && R !== t.entries)
531
+ for (var E = R.call(t), w; !(w = E.next()).done; )
532
+ ue(w.value) && Ie(w.value, o);
533
+ }
534
+ }
535
+ }
536
+ function Tt(t) {
537
+ {
538
+ var o = t.type;
539
+ if (o == null || typeof o == "string")
540
+ return;
541
+ var u;
542
+ if (typeof o == "function")
543
+ u = o.propTypes;
544
+ else if (typeof o == "object" && (o.$$typeof === c || // Note: Memo only checks outer props here.
545
+ // Inner props are checked in the reconciler.
546
+ o.$$typeof === x))
547
+ u = o.propTypes;
548
+ else
549
+ return;
550
+ if (u) {
551
+ var p = $(o);
552
+ bt(u, t.props, "prop", p, t);
553
+ } else if (o.PropTypes !== void 0 && !de) {
554
+ de = !0;
555
+ var R = $(o);
556
+ T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", R || "Unknown");
557
+ }
558
+ typeof o.getDefaultProps == "function" && !o.getDefaultProps.isReactClassApproved && T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
559
+ }
560
+ }
561
+ function Mt(t) {
562
+ {
563
+ for (var o = Object.keys(t.props), u = 0; u < o.length; u++) {
564
+ var p = o[u];
565
+ if (p !== "children" && p !== "key") {
566
+ V(t), T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", p), V(null);
567
+ break;
568
+ }
569
+ }
570
+ t.ref !== null && (V(t), T("Invalid attribute `ref` supplied to `React.Fragment`."), V(null));
571
+ }
572
+ }
573
+ var Ye = {};
574
+ function We(t, o, u, p, R, E) {
575
+ {
576
+ var w = ct(t);
577
+ if (!w) {
578
+ var g = "";
579
+ (t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (g += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
580
+ var z = St();
581
+ z ? g += z : g += Le();
582
+ var M;
583
+ t === null ? M = "null" : le(t) ? M = "array" : t !== void 0 && t.$$typeof === r ? (M = "<" + ($(t.type) || "Unknown") + " />", g = " Did you accidentally export a JSX literal instead of a component?") : M = typeof t, T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", M, g);
584
+ }
585
+ var P = Et(t, o, u, R, E);
586
+ if (P == null)
587
+ return P;
588
+ if (w) {
589
+ var L = o.children;
590
+ if (L !== void 0)
591
+ if (p)
592
+ if (le(L)) {
593
+ for (var q = 0; q < L.length; q++)
594
+ $e(L[q], t);
595
+ Object.freeze && Object.freeze(L);
596
+ } else
597
+ T("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
598
+ else
599
+ $e(L, t);
600
+ }
601
+ if (X.call(o, "key")) {
602
+ var W = $(t), A = Object.keys(o).filter(function(Lt) {
603
+ return Lt !== "key";
604
+ }), fe = A.length > 0 ? "{key: someKey, " + A.join(": ..., ") + ": ...}" : "{key: someKey}";
605
+ if (!Ye[W + fe]) {
606
+ var At = A.length > 0 ? "{" + A.join(": ..., ") + ": ...}" : "{}";
607
+ T(`A props object containing a "key" prop is being spread into JSX:
608
+ let props = %s;
609
+ <%s {...props} />
610
+ React keys must be passed directly to JSX without using spread:
611
+ let props = %s;
612
+ <%s key={someKey} {...props} />`, fe, W, At, W), Ye[W + fe] = !0;
613
+ }
614
+ }
615
+ return t === a ? Mt(P) : Tt(P), P;
616
+ }
617
+ }
618
+ function Pt(t, o, u) {
619
+ return We(t, o, u, !0);
620
+ }
621
+ function Ot(t, o, u) {
622
+ return We(t, o, u, !1);
623
+ }
624
+ var Dt = Ot, zt = Pt;
625
+ Q.Fragment = a, Q.jsx = Dt, Q.jsxs = zt;
626
+ }()), Q;
627
+ }
628
+ process.env.NODE_ENV === "production" ? me.exports = Ft() : me.exports = It();
629
+ var e = me.exports;
630
+ function Ze(n) {
631
+ var r, s, a = "";
632
+ if (typeof n == "string" || typeof n == "number") a += n;
633
+ else if (typeof n == "object") if (Array.isArray(n)) {
634
+ var i = n.length;
635
+ for (r = 0; r < i; r++) n[r] && (s = Ze(n[r])) && (a && (a += " "), a += s);
636
+ } else for (s in n) n[s] && (a && (a += " "), a += s);
637
+ return a;
638
+ }
639
+ function $t() {
640
+ for (var n, r, s = 0, a = "", i = arguments.length; s < i; s++) (n = arguments[s]) && (r = Ze(n)) && (a && (a += " "), a += r);
641
+ return a;
642
+ }
643
+ function b(...n) {
644
+ return $t(n);
645
+ }
646
+ const Yt = {
647
+ neutral: "bg-tag text-tag border border-tag-border",
648
+ online: "bg-status-online-bg text-status-online",
649
+ warn: "bg-status-warn-bg text-status-warn",
650
+ offline: "bg-status-offline-bg text-status-offline",
651
+ live: "bg-live-bg text-live-text",
652
+ accent: "bg-accent-muted text-accent"
653
+ };
654
+ function Rr({ tone: n = "neutral", className: r, children: s, ...a }) {
655
+ return /* @__PURE__ */ e.jsx(
656
+ "span",
657
+ {
658
+ className: b(
659
+ "inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-xs font-medium",
660
+ Yt[n],
661
+ r
662
+ ),
663
+ ...a,
664
+ children: s
665
+ }
666
+ );
667
+ }
668
+ const Wt = {
669
+ primary: "bg-accent text-white hover:brightness-110 focus-visible:ring-accent/50",
670
+ secondary: "bg-accent-muted text-accent hover:brightness-105 focus-visible:ring-accent/40",
671
+ outline: "border border-card-border text-ink-primary bg-transparent hover:bg-accent-muted focus-visible:ring-accent/30",
672
+ ghost: "bg-transparent text-ink-primary hover:bg-accent-muted focus-visible:ring-accent/30",
673
+ danger: "bg-status-offline text-white hover:brightness-110 focus-visible:ring-status-offline/50",
674
+ add: "bg-status-online text-white hover:brightness-110 focus-visible:ring-status-online/50",
675
+ cancel: "border border-card-border text-ink-secondary bg-transparent hover:bg-card focus-visible:ring-ink-muted/30"
676
+ }, Vt = {
677
+ sm: "h-8 px-3 text-sm gap-1.5",
678
+ md: "h-10 px-4 text-sm gap-2",
679
+ lg: "h-12 px-6 text-base gap-2"
680
+ }, F = v.forwardRef(
681
+ ({ variant: n = "primary", size: r = "md", icon: s, trailingIcon: a, loading: i, fullWidth: l, disabled: f, className: h, children: c, ...m }, d) => /* @__PURE__ */ e.jsxs(
682
+ "button",
683
+ {
684
+ ref: d,
685
+ disabled: f || i,
686
+ className: b(
687
+ "inline-flex items-center justify-center rounded-md font-primary font-medium",
688
+ "transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2",
689
+ "disabled:opacity-50 disabled:cursor-not-allowed",
690
+ Wt[n],
691
+ Vt[r],
692
+ l && "w-full",
693
+ h
694
+ ),
695
+ ...m,
696
+ children: [
697
+ i ? /* @__PURE__ */ e.jsx("span", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }) : s && /* @__PURE__ */ e.jsx("span", { className: "inline-flex shrink-0", children: s }),
698
+ c,
699
+ !i && a && /* @__PURE__ */ e.jsx("span", { className: "inline-flex shrink-0", children: a })
700
+ ]
701
+ }
702
+ )
703
+ );
704
+ F.displayName = "Button";
705
+ const qt = v.forwardRef(
706
+ ({ padded: n = !0, className: r, children: s, ...a }, i) => /* @__PURE__ */ e.jsx(
707
+ "div",
708
+ {
709
+ ref: i,
710
+ className: b(
711
+ "rounded-lg border border-card-border bg-card shadow-md text-ink-primary",
712
+ n && "p-4",
713
+ r
714
+ ),
715
+ ...a,
716
+ children: s
717
+ }
718
+ )
719
+ );
720
+ qt.displayName = "Card";
721
+ /**
722
+ * @license lucide-react v0.400.0 - ISC
723
+ *
724
+ * This source code is licensed under the ISC license.
725
+ * See the LICENSE file in the root directory of this source tree.
726
+ */
727
+ const Bt = (n) => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Qe = (...n) => n.filter((r, s, a) => !!r && a.indexOf(r) === s).join(" ");
728
+ /**
729
+ * @license lucide-react v0.400.0 - ISC
730
+ *
731
+ * This source code is licensed under the ISC license.
732
+ * See the LICENSE file in the root directory of this source tree.
733
+ */
734
+ var Ut = {
735
+ xmlns: "http://www.w3.org/2000/svg",
736
+ width: 24,
737
+ height: 24,
738
+ viewBox: "0 0 24 24",
739
+ fill: "none",
740
+ stroke: "currentColor",
741
+ strokeWidth: 2,
742
+ strokeLinecap: "round",
743
+ strokeLinejoin: "round"
744
+ };
745
+ /**
746
+ * @license lucide-react v0.400.0 - ISC
747
+ *
748
+ * This source code is licensed under the ISC license.
749
+ * See the LICENSE file in the root directory of this source tree.
750
+ */
751
+ const Ht = Ge(
752
+ ({
753
+ color: n = "currentColor",
754
+ size: r = 24,
755
+ strokeWidth: s = 2,
756
+ absoluteStrokeWidth: a,
757
+ className: i = "",
758
+ children: l,
759
+ iconNode: f,
760
+ ...h
761
+ }, c) => xe(
762
+ "svg",
763
+ {
764
+ ref: c,
765
+ ...Ut,
766
+ width: r,
767
+ height: r,
768
+ stroke: n,
769
+ strokeWidth: a ? Number(s) * 24 / Number(r) : s,
770
+ className: Qe("lucide", i),
771
+ ...h
772
+ },
773
+ [
774
+ ...f.map(([m, d]) => xe(m, d)),
775
+ ...Array.isArray(l) ? l : [l]
776
+ ]
777
+ )
778
+ );
779
+ /**
780
+ * @license lucide-react v0.400.0 - ISC
781
+ *
782
+ * This source code is licensed under the ISC license.
783
+ * See the LICENSE file in the root directory of this source tree.
784
+ */
785
+ const S = (n, r) => {
786
+ const s = Ge(
787
+ ({ className: a, ...i }, l) => xe(Ht, {
788
+ ref: l,
789
+ iconNode: r,
790
+ className: Qe(`lucide-${Bt(n)}`, a),
791
+ ...i
792
+ })
793
+ );
794
+ return s.displayName = `${n}`, s;
795
+ };
796
+ /**
797
+ * @license lucide-react v0.400.0 - ISC
798
+ *
799
+ * This source code is licensed under the ISC license.
800
+ * See the LICENSE file in the root directory of this source tree.
801
+ */
802
+ const Jt = S("ArrowDown", [
803
+ ["path", { d: "M12 5v14", key: "s699le" }],
804
+ ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
805
+ ]);
806
+ /**
807
+ * @license lucide-react v0.400.0 - ISC
808
+ *
809
+ * This source code is licensed under the ISC license.
810
+ * See the LICENSE file in the root directory of this source tree.
811
+ */
812
+ const Be = S("ArrowUpDown", [
813
+ ["path", { d: "m21 16-4 4-4-4", key: "f6ql7i" }],
814
+ ["path", { d: "M17 20V4", key: "1ejh1v" }],
815
+ ["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
816
+ ["path", { d: "M7 4v16", key: "1glfcx" }]
817
+ ]);
818
+ /**
819
+ * @license lucide-react v0.400.0 - ISC
820
+ *
821
+ * This source code is licensed under the ISC license.
822
+ * See the LICENSE file in the root directory of this source tree.
823
+ */
824
+ const Gt = S("ArrowUp", [
825
+ ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
826
+ ["path", { d: "M12 19V5", key: "x0mq9r" }]
827
+ ]);
828
+ /**
829
+ * @license lucide-react v0.400.0 - ISC
830
+ *
831
+ * This source code is licensed under the ISC license.
832
+ * See the LICENSE file in the root directory of this source tree.
833
+ */
834
+ const Xt = S("Bot", [
835
+ ["path", { d: "M12 8V4H8", key: "hb8ula" }],
836
+ ["rect", { width: "16", height: "12", x: "4", y: "8", rx: "2", key: "enze0r" }],
837
+ ["path", { d: "M2 14h2", key: "vft8re" }],
838
+ ["path", { d: "M20 14h2", key: "4cs60a" }],
839
+ ["path", { d: "M15 13v2", key: "1xurst" }],
840
+ ["path", { d: "M9 13v2", key: "rq6x2g" }]
841
+ ]);
842
+ /**
843
+ * @license lucide-react v0.400.0 - ISC
844
+ *
845
+ * This source code is licensed under the ISC license.
846
+ * See the LICENSE file in the root directory of this source tree.
847
+ */
848
+ const Ke = S("Calendar", [
849
+ ["path", { d: "M8 2v4", key: "1cmpym" }],
850
+ ["path", { d: "M16 2v4", key: "4m81vk" }],
851
+ ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
852
+ ["path", { d: "M3 10h18", key: "8toen8" }]
853
+ ]);
854
+ /**
855
+ * @license lucide-react v0.400.0 - ISC
856
+ *
857
+ * This source code is licensed under the ISC license.
858
+ * See the LICENSE file in the root directory of this source tree.
859
+ */
860
+ const et = S("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
861
+ /**
862
+ * @license lucide-react v0.400.0 - ISC
863
+ *
864
+ * This source code is licensed under the ISC license.
865
+ * See the LICENSE file in the root directory of this source tree.
866
+ */
867
+ const tt = S("ChevronDown", [
868
+ ["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
869
+ ]);
870
+ /**
871
+ * @license lucide-react v0.400.0 - ISC
872
+ *
873
+ * This source code is licensed under the ISC license.
874
+ * See the LICENSE file in the root directory of this source tree.
875
+ */
876
+ const Zt = S("ChevronLeft", [
877
+ ["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]
878
+ ]);
879
+ /**
880
+ * @license lucide-react v0.400.0 - ISC
881
+ *
882
+ * This source code is licensed under the ISC license.
883
+ * See the LICENSE file in the root directory of this source tree.
884
+ */
885
+ const Qt = S("ChevronRight", [
886
+ ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
887
+ ]);
888
+ /**
889
+ * @license lucide-react v0.400.0 - ISC
890
+ *
891
+ * This source code is licensed under the ISC license.
892
+ * See the LICENSE file in the root directory of this source tree.
893
+ */
894
+ const rt = S("ChevronsLeft", [
895
+ ["path", { d: "m11 17-5-5 5-5", key: "13zhaf" }],
896
+ ["path", { d: "m18 17-5-5 5-5", key: "h8a8et" }]
897
+ ]);
898
+ /**
899
+ * @license lucide-react v0.400.0 - ISC
900
+ *
901
+ * This source code is licensed under the ISC license.
902
+ * See the LICENSE file in the root directory of this source tree.
903
+ */
904
+ const nt = S("ChevronsRight", [
905
+ ["path", { d: "m6 17 5-5-5-5", key: "xnjwq" }],
906
+ ["path", { d: "m13 17 5-5-5-5", key: "17xmmf" }]
907
+ ]);
908
+ /**
909
+ * @license lucide-react v0.400.0 - ISC
910
+ *
911
+ * This source code is licensed under the ISC license.
912
+ * See the LICENSE file in the root directory of this source tree.
913
+ */
914
+ const Kt = S("CircleAlert", [
915
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
916
+ ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
917
+ ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
918
+ ]);
919
+ /**
920
+ * @license lucide-react v0.400.0 - ISC
921
+ *
922
+ * This source code is licensed under the ISC license.
923
+ * See the LICENSE file in the root directory of this source tree.
924
+ */
925
+ const er = S("Download", [
926
+ ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
927
+ ["polyline", { points: "7 10 12 15 17 10", key: "2ggqvy" }],
928
+ ["line", { x1: "12", x2: "12", y1: "15", y2: "3", key: "1vk2je" }]
929
+ ]);
930
+ /**
931
+ * @license lucide-react v0.400.0 - ISC
932
+ *
933
+ * This source code is licensed under the ISC license.
934
+ * See the LICENSE file in the root directory of this source tree.
935
+ */
936
+ const tr = S("EyeOff", [
937
+ ["path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24", key: "1jxqfv" }],
938
+ [
939
+ "path",
940
+ {
941
+ d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",
942
+ key: "9wicm4"
943
+ }
944
+ ],
945
+ [
946
+ "path",
947
+ { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61", key: "1jreej" }
948
+ ],
949
+ ["line", { x1: "2", x2: "22", y1: "2", y2: "22", key: "a6p6uj" }]
950
+ ]);
951
+ /**
952
+ * @license lucide-react v0.400.0 - ISC
953
+ *
954
+ * This source code is licensed under the ISC license.
955
+ * See the LICENSE file in the root directory of this source tree.
956
+ */
957
+ const rr = S("Eye", [
958
+ ["path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z", key: "rwhkz3" }],
959
+ ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
960
+ ]);
961
+ /**
962
+ * @license lucide-react v0.400.0 - ISC
963
+ *
964
+ * This source code is licensed under the ISC license.
965
+ * See the LICENSE file in the root directory of this source tree.
966
+ */
967
+ const nr = S("Grid3x3", [
968
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
969
+ ["path", { d: "M3 9h18", key: "1pudct" }],
970
+ ["path", { d: "M3 15h18", key: "5xshup" }],
971
+ ["path", { d: "M9 3v18", key: "fh3hqa" }],
972
+ ["path", { d: "M15 3v18", key: "14nvp0" }]
973
+ ]);
974
+ /**
975
+ * @license lucide-react v0.400.0 - ISC
976
+ *
977
+ * This source code is licensed under the ISC license.
978
+ * See the LICENSE file in the root directory of this source tree.
979
+ */
980
+ const sr = S("LogOut", [
981
+ ["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4", key: "1uf3rs" }],
982
+ ["polyline", { points: "16 17 21 12 16 7", key: "1gabdz" }],
983
+ ["line", { x1: "21", x2: "9", y1: "12", y2: "12", key: "1uyos4" }]
984
+ ]);
985
+ /**
986
+ * @license lucide-react v0.400.0 - ISC
987
+ *
988
+ * This source code is licensed under the ISC license.
989
+ * See the LICENSE file in the root directory of this source tree.
990
+ */
991
+ const ar = S("Mail", [
992
+ ["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2", key: "18n3k1" }],
993
+ ["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7", key: "1ocrg3" }]
994
+ ]);
995
+ /**
996
+ * @license lucide-react v0.400.0 - ISC
997
+ *
998
+ * This source code is licensed under the ISC license.
999
+ * See the LICENSE file in the root directory of this source tree.
1000
+ */
1001
+ const st = S("Plus", [
1002
+ ["path", { d: "M5 12h14", key: "1ays0h" }],
1003
+ ["path", { d: "M12 5v14", key: "s699le" }]
1004
+ ]);
1005
+ /**
1006
+ * @license lucide-react v0.400.0 - ISC
1007
+ *
1008
+ * This source code is licensed under the ISC license.
1009
+ * See the LICENSE file in the root directory of this source tree.
1010
+ */
1011
+ const ir = S("RefreshCw", [
1012
+ ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
1013
+ ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
1014
+ ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
1015
+ ["path", { d: "M8 16H3v5", key: "1cv678" }]
1016
+ ]);
1017
+ /**
1018
+ * @license lucide-react v0.400.0 - ISC
1019
+ *
1020
+ * This source code is licensed under the ISC license.
1021
+ * See the LICENSE file in the root directory of this source tree.
1022
+ */
1023
+ const he = S("Search", [
1024
+ ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
1025
+ ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
1026
+ ]);
1027
+ /**
1028
+ * @license lucide-react v0.400.0 - ISC
1029
+ *
1030
+ * This source code is licensed under the ISC license.
1031
+ * See the LICENSE file in the root directory of this source tree.
1032
+ */
1033
+ const at = S("SlidersHorizontal", [
1034
+ ["line", { x1: "21", x2: "14", y1: "4", y2: "4", key: "obuewd" }],
1035
+ ["line", { x1: "10", x2: "3", y1: "4", y2: "4", key: "1q6298" }],
1036
+ ["line", { x1: "21", x2: "12", y1: "12", y2: "12", key: "1iu8h1" }],
1037
+ ["line", { x1: "8", x2: "3", y1: "12", y2: "12", key: "ntss68" }],
1038
+ ["line", { x1: "21", x2: "16", y1: "20", y2: "20", key: "14d8ph" }],
1039
+ ["line", { x1: "12", x2: "3", y1: "20", y2: "20", key: "m0wm8r" }],
1040
+ ["line", { x1: "14", x2: "14", y1: "2", y2: "6", key: "14e1ph" }],
1041
+ ["line", { x1: "8", x2: "8", y1: "10", y2: "14", key: "1i6ji0" }],
1042
+ ["line", { x1: "16", x2: "16", y1: "18", y2: "22", key: "1lctlv" }]
1043
+ ]);
1044
+ /**
1045
+ * @license lucide-react v0.400.0 - ISC
1046
+ *
1047
+ * This source code is licensed under the ISC license.
1048
+ * See the LICENSE file in the root directory of this source tree.
1049
+ */
1050
+ const or = S("Trash2", [
1051
+ ["path", { d: "M3 6h18", key: "d0wm0j" }],
1052
+ ["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
1053
+ ["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
1054
+ ["line", { x1: "10", x2: "10", y1: "11", y2: "17", key: "1uufr5" }],
1055
+ ["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }]
1056
+ ]);
1057
+ /**
1058
+ * @license lucide-react v0.400.0 - ISC
1059
+ *
1060
+ * This source code is licensed under the ISC license.
1061
+ * See the LICENSE file in the root directory of this source tree.
1062
+ */
1063
+ const lr = S("User", [
1064
+ ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
1065
+ ["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
1066
+ ]);
1067
+ /**
1068
+ * @license lucide-react v0.400.0 - ISC
1069
+ *
1070
+ * This source code is licensed under the ISC license.
1071
+ * See the LICENSE file in the root directory of this source tree.
1072
+ */
1073
+ const se = S("X", [
1074
+ ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
1075
+ ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
1076
+ ]), be = v.forwardRef(
1077
+ ({ label: n, id: r, className: s, checked: a, ...i }, l) => {
1078
+ const f = r ?? v.useId();
1079
+ return /* @__PURE__ */ e.jsxs("label", { htmlFor: f, className: "inline-flex cursor-pointer items-center gap-2 select-none", children: [
1080
+ /* @__PURE__ */ e.jsxs("span", { className: "relative inline-flex h-4 w-4 shrink-0 items-center justify-center", children: [
1081
+ /* @__PURE__ */ e.jsx("input", { ref: l, id: f, type: "checkbox", checked: a, className: "peer sr-only", ...i }),
1082
+ /* @__PURE__ */ e.jsx(
1083
+ "span",
1084
+ {
1085
+ className: b(
1086
+ "h-4 w-4 rounded border border-card-border bg-input transition-colors",
1087
+ "peer-checked:border-accent peer-checked:bg-accent",
1088
+ "peer-focus-visible:ring-2 peer-focus-visible:ring-accent/40",
1089
+ s
1090
+ )
1091
+ }
1092
+ ),
1093
+ a && /* @__PURE__ */ e.jsx(et, { size: 12, strokeWidth: 3, className: "pointer-events-none absolute text-white" })
1094
+ ] }),
1095
+ n && /* @__PURE__ */ e.jsx("span", { className: "text-sm text-ink-primary", children: n })
1096
+ ] });
1097
+ }
1098
+ );
1099
+ be.displayName = "Checkbox";
1100
+ const cr = {
1101
+ idle: "text-icon-idle hover:text-icon-active hover:bg-accent-muted",
1102
+ active: "text-icon-active bg-accent-muted",
1103
+ danger: "text-status-offline hover:bg-status-offline-bg"
1104
+ }, dr = { sm: "h-8 w-8", md: "h-10 w-10" }, B = v.forwardRef(
1105
+ ({ icon: n, label: r, variant: s = "idle", size: a = "md", className: i, ...l }, f) => /* @__PURE__ */ e.jsx(
1106
+ "button",
1107
+ {
1108
+ ref: f,
1109
+ "aria-label": r,
1110
+ title: r,
1111
+ className: b(
1112
+ "inline-flex items-center justify-center rounded-full transition-colors duration-150",
1113
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40",
1114
+ "disabled:opacity-40 disabled:cursor-not-allowed",
1115
+ cr[s],
1116
+ dr[a],
1117
+ i
1118
+ ),
1119
+ ...l,
1120
+ children: n
1121
+ }
1122
+ )
1123
+ );
1124
+ B.displayName = "IconButton";
1125
+ function Er({ columns: n, visible: r, onChange: s, className: a }) {
1126
+ const [i, l] = v.useState(!1), f = v.useRef(null);
1127
+ v.useEffect(() => {
1128
+ function c(m) {
1129
+ f.current && !f.current.contains(m.target) && l(!1);
1130
+ }
1131
+ return document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c);
1132
+ }, []);
1133
+ function h(c) {
1134
+ s(r.includes(c) ? r.filter((m) => m !== c) : [...r, c]);
1135
+ }
1136
+ return /* @__PURE__ */ e.jsxs("div", { ref: f, className: b("relative", a), children: [
1137
+ /* @__PURE__ */ e.jsx(B, { icon: /* @__PURE__ */ e.jsx(nr, { size: 16 }), label: "Choose columns", onClick: () => l((c) => !c), variant: i ? "active" : "idle" }),
1138
+ i && /* @__PURE__ */ e.jsx("div", { className: "absolute right-0 z-20 mt-1 w-52 rounded-md border border-card-border bg-card p-2 shadow-lg", children: n.map((c) => /* @__PURE__ */ e.jsxs("label", { className: "flex items-center gap-2 rounded px-2 py-1.5 text-sm hover:bg-accent-muted", children: [
1139
+ /* @__PURE__ */ e.jsx(be, { checked: r.includes(c.key), onChange: () => h(c.key) }),
1140
+ /* @__PURE__ */ e.jsx("span", { className: "text-ink-primary", children: c.label })
1141
+ ] }, c.key)) })
1142
+ ] });
1143
+ }
1144
+ const ur = {
1145
+ sm: "max-w-sm",
1146
+ md: "max-w-lg",
1147
+ lg: "max-w-2xl",
1148
+ xl: "max-w-4xl"
1149
+ };
1150
+ function pe({ open: n, onClose: r, title: s, footer: a, size: i = "md", children: l, className: f }) {
1151
+ return v.useEffect(() => {
1152
+ if (!n) return;
1153
+ function h(c) {
1154
+ c.key === "Escape" && r();
1155
+ }
1156
+ return document.addEventListener("keydown", h), () => document.removeEventListener("keydown", h);
1157
+ }, [n, r]), n ? Xe(
1158
+ /* @__PURE__ */ e.jsxs("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
1159
+ /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 bg-black/50", onClick: r, "aria-hidden": !0 }),
1160
+ /* @__PURE__ */ e.jsxs(
1161
+ "div",
1162
+ {
1163
+ role: "dialog",
1164
+ "aria-modal": "true",
1165
+ className: b(
1166
+ "relative z-10 flex max-h-[90vh] w-full flex-col rounded-lg border border-card-border bg-card shadow-xl",
1167
+ ur[i],
1168
+ f
1169
+ ),
1170
+ children: [
1171
+ s && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between border-b border-card-border px-5 py-4", children: [
1172
+ /* @__PURE__ */ e.jsx("h2", { className: "font-secondary text-base font-semibold text-ink-primary", children: s }),
1173
+ /* @__PURE__ */ e.jsx("button", { onClick: r, "aria-label": "Close", className: "text-ink-muted hover:text-ink-primary", children: /* @__PURE__ */ e.jsx(se, { size: 18 }) })
1174
+ ] }),
1175
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto px-5 py-4", children: l }),
1176
+ a && /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-end gap-2 border-t border-card-border px-5 py-4", children: a })
1177
+ ]
1178
+ }
1179
+ )
1180
+ ] }),
1181
+ document.body
1182
+ ) : null;
1183
+ }
1184
+ function Sr({
1185
+ open: n,
1186
+ title: r,
1187
+ message: s,
1188
+ confirmLabel: a = "Ok",
1189
+ cancelLabel: i = "Close",
1190
+ tone: l = "default",
1191
+ onConfirm: f,
1192
+ onClose: h,
1193
+ loading: c
1194
+ }) {
1195
+ return /* @__PURE__ */ e.jsx(
1196
+ pe,
1197
+ {
1198
+ open: n,
1199
+ onClose: h,
1200
+ title: r,
1201
+ size: "sm",
1202
+ footer: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1203
+ /* @__PURE__ */ e.jsx(F, { variant: "cancel", onClick: h, children: i }),
1204
+ /* @__PURE__ */ e.jsx(F, { variant: l === "danger" ? "danger" : "primary", onClick: f, loading: c, children: a })
1205
+ ] }),
1206
+ children: /* @__PURE__ */ e.jsx("p", { className: "text-sm text-ink-secondary", children: s })
1207
+ }
1208
+ );
1209
+ }
1210
+ function it({ fullPage: n, label: r = "Loading...", className: s }) {
1211
+ const a = /* @__PURE__ */ e.jsxs("div", { className: b("flex flex-col items-center justify-center gap-3", s), children: [
1212
+ /* @__PURE__ */ e.jsx("span", { className: "h-10 w-10 animate-spin rounded-full border-4 border-accent-muted border-t-accent" }),
1213
+ r && /* @__PURE__ */ e.jsx("span", { className: "text-sm text-ink-secondary", children: r })
1214
+ ] });
1215
+ return n ? /* @__PURE__ */ e.jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-canvas/70 backdrop-blur-sm", children: a }) : a;
1216
+ }
1217
+ function Ue({ checked: n, indeterminate: r, onChange: s, label: a = "Select row" }) {
1218
+ const i = v.useRef(null);
1219
+ return v.useEffect(() => {
1220
+ i.current && (i.current.indeterminate = !!r);
1221
+ }, [r]), /* @__PURE__ */ e.jsx(be, { ref: i, checked: n, onChange: (l) => s(l.target.checked), "aria-label": a });
1222
+ }
1223
+ function _r({
1224
+ columns: n,
1225
+ data: r,
1226
+ rowKey: s,
1227
+ loading: a,
1228
+ emptyMessage: i = "No records found.",
1229
+ visibleColumns: l,
1230
+ sortKey: f,
1231
+ sortDirection: h,
1232
+ onSortChange: c,
1233
+ selectable: m,
1234
+ selectedKeys: d = [],
1235
+ onSelectedKeysChange: x,
1236
+ onRowClick: y,
1237
+ className: D
1238
+ }) {
1239
+ const O = l ? n.filter((N) => l.includes(N.key)) : n, j = r.map(s), _ = m && r.length > 0 && j.every((N) => d.includes(N)), C = m && j.some((N) => d.includes(N));
1240
+ function T(N) {
1241
+ if (!(!N.sortable || !c)) {
1242
+ if (f !== N.key) return c(N.key, "asc");
1243
+ if (h === "asc") return c(N.key, "desc");
1244
+ c(N.key, null);
1245
+ }
1246
+ }
1247
+ function H() {
1248
+ x && x(_ ? [] : j);
1249
+ }
1250
+ function J(N) {
1251
+ x && x(d.includes(N) ? d.filter((k) => k !== N) : [...d, N]);
1252
+ }
1253
+ return /* @__PURE__ */ e.jsx("div", { className: b("overflow-x-auto rounded-lg border border-card-border bg-card", D), children: /* @__PURE__ */ e.jsxs("table", { className: "w-full text-left text-sm", children: [
1254
+ /* @__PURE__ */ e.jsx("thead", { children: /* @__PURE__ */ e.jsxs("tr", { className: "border-b border-card-border bg-canvas", children: [
1255
+ m && /* @__PURE__ */ e.jsx("th", { className: "w-10 px-4 py-3", children: /* @__PURE__ */ e.jsx(Ue, { checked: !!_, indeterminate: !_ && C, onChange: H, label: "Select all rows" }) }),
1256
+ O.map((N) => /* @__PURE__ */ e.jsx(
1257
+ "th",
1258
+ {
1259
+ style: { width: N.width },
1260
+ className: b(
1261
+ "px-4 py-3 font-medium text-ink-secondary",
1262
+ N.align === "right" && "text-right",
1263
+ N.align === "center" && "text-center"
1264
+ ),
1265
+ children: N.sortable ? /* @__PURE__ */ e.jsxs("button", { onClick: () => T(N), className: "inline-flex items-center gap-1 hover:text-ink-primary", children: [
1266
+ N.header,
1267
+ f === N.key ? h === "asc" ? /* @__PURE__ */ e.jsx(Gt, { size: 12 }) : h === "desc" ? /* @__PURE__ */ e.jsx(Jt, { size: 12 }) : /* @__PURE__ */ e.jsx(Be, { size: 12, className: "opacity-40" }) : /* @__PURE__ */ e.jsx(Be, { size: 12, className: "opacity-40" })
1268
+ ] }) : N.header
1269
+ },
1270
+ N.key
1271
+ ))
1272
+ ] }) }),
1273
+ /* @__PURE__ */ e.jsx("tbody", { children: a ? /* @__PURE__ */ e.jsx("tr", { children: /* @__PURE__ */ e.jsx("td", { colSpan: O.length + (m ? 1 : 0), className: "py-10", children: /* @__PURE__ */ e.jsx(it, { label: "Loading records..." }) }) }) : r.length === 0 ? /* @__PURE__ */ e.jsx("tr", { children: /* @__PURE__ */ e.jsx("td", { colSpan: O.length + (m ? 1 : 0), className: "py-10 text-center text-ink-muted", children: i }) }) : r.map((N) => {
1274
+ const k = s(N);
1275
+ return /* @__PURE__ */ e.jsxs(
1276
+ "tr",
1277
+ {
1278
+ onClick: () => y == null ? void 0 : y(N),
1279
+ className: b(
1280
+ "border-b border-card-border last:border-0 hover:bg-accent-muted/60",
1281
+ y && "cursor-pointer"
1282
+ ),
1283
+ children: [
1284
+ m && /* @__PURE__ */ e.jsx("td", { className: "px-4 py-3", onClick: (I) => I.stopPropagation(), children: /* @__PURE__ */ e.jsx(Ue, { checked: d.includes(k), onChange: () => J(k) }) }),
1285
+ O.map((I) => /* @__PURE__ */ e.jsx(
1286
+ "td",
1287
+ {
1288
+ className: b(
1289
+ "px-4 py-3 text-ink-primary",
1290
+ I.align === "right" && "text-right",
1291
+ I.align === "center" && "text-center"
1292
+ ),
1293
+ children: I.render(N)
1294
+ },
1295
+ I.key
1296
+ ))
1297
+ ]
1298
+ },
1299
+ k
1300
+ );
1301
+ }) })
1302
+ ] }) });
1303
+ }
1304
+ function fr({ children: n, className: r, ...s }) {
1305
+ return n ? /* @__PURE__ */ e.jsxs("p", { className: b("mt-1 flex items-center gap-1 text-xs text-status-offline", r), ...s, children: [
1306
+ /* @__PURE__ */ e.jsx(Kt, { size: 12, className: "shrink-0" }),
1307
+ n
1308
+ ] }) : null;
1309
+ }
1310
+ function U({ label: n, htmlFor: r, required: s, error: a, hint: i, className: l, children: f, ...h }) {
1311
+ return /* @__PURE__ */ e.jsxs("div", { className: b("flex flex-col", l), ...h, children: [
1312
+ n && /* @__PURE__ */ e.jsxs("label", { htmlFor: r, className: "mb-1.5 text-sm font-medium text-ink-primary", children: [
1313
+ n,
1314
+ s && /* @__PURE__ */ e.jsx("span", { className: "ml-0.5 text-status-offline", children: "*" })
1315
+ ] }),
1316
+ f,
1317
+ i && !a && /* @__PURE__ */ e.jsx("p", { className: "mt-1 text-xs text-ink-muted", children: i }),
1318
+ /* @__PURE__ */ e.jsx(fr, { children: a })
1319
+ ] });
1320
+ }
1321
+ function Tr({ label: n, required: r, error: s, value: a, onChange: i, min: l, max: f, disabled: h, className: c }) {
1322
+ const m = v.useId();
1323
+ return /* @__PURE__ */ e.jsx(U, { label: n, htmlFor: m, required: r, error: s, className: c, children: /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1324
+ /* @__PURE__ */ e.jsx(Ke, { size: 16, className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-ink-muted" }),
1325
+ /* @__PURE__ */ e.jsx(
1326
+ "input",
1327
+ {
1328
+ id: m,
1329
+ type: "date",
1330
+ value: a ?? "",
1331
+ min: l,
1332
+ max: f,
1333
+ disabled: h,
1334
+ onChange: (d) => i(d.target.value),
1335
+ className: b(
1336
+ "h-10 w-full rounded-md border bg-input pl-9 pr-3 text-sm text-ink-primary",
1337
+ "focus:outline-none focus:ring-2 focus:ring-accent/40 disabled:opacity-50",
1338
+ s ? "border-status-offline" : "border-card-border"
1339
+ )
1340
+ }
1341
+ )
1342
+ ] }) });
1343
+ }
1344
+ const ot = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], xr = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], mr = ["This Financial Year", "This Month", "Last Month", "Next Month", "This Quarter", "This Year", "Last Year", "Custom Range"];
1345
+ function ne(n) {
1346
+ return n ? `${String(n.getDate()).padStart(2, "0")}-${ot[n.getMonth()]}-${n.getFullYear()}` : "";
1347
+ }
1348
+ function hr(n, r = /* @__PURE__ */ new Date()) {
1349
+ const s = r.getFullYear(), a = r.getMonth();
1350
+ switch (n) {
1351
+ case "This Financial Year": {
1352
+ const i = a >= 3 ? s : s - 1;
1353
+ return { from: new Date(i, 3, 1), to: new Date(i + 1, 2, 31) };
1354
+ }
1355
+ case "This Month":
1356
+ return { from: new Date(s, a, 1), to: new Date(s, a + 1, 0) };
1357
+ case "Last Month":
1358
+ return { from: new Date(s, a - 1, 1), to: new Date(s, a, 0) };
1359
+ case "Next Month":
1360
+ return { from: new Date(s, a + 1, 1), to: new Date(s, a + 2, 0) };
1361
+ case "This Quarter": {
1362
+ const i = Math.floor(a / 3) * 3;
1363
+ return { from: new Date(s, i, 1), to: new Date(s, i + 3, 0) };
1364
+ }
1365
+ case "This Year":
1366
+ return { from: new Date(s, 0, 1), to: new Date(s, 11, 31) };
1367
+ case "Last Year":
1368
+ return { from: new Date(s - 1, 0, 1), to: new Date(s - 1, 11, 31) };
1369
+ default:
1370
+ return { from: null, to: null };
1371
+ }
1372
+ }
1373
+ function He({ year: n, month: r, from: s, to: a, onPick: i }) {
1374
+ const f = new Date(n, r, 1).getDay(), h = new Date(n, r + 1, 0).getDate(), c = [];
1375
+ for (let x = 0; x < f; x++) c.push(null);
1376
+ for (let x = 1; x <= h; x++) c.push(x);
1377
+ function m(x) {
1378
+ if (!x || !s || !a) return !1;
1379
+ const y = new Date(n, r, x).getTime();
1380
+ return y >= s.getTime() && y <= a.getTime();
1381
+ }
1382
+ function d(x) {
1383
+ if (!x) return !1;
1384
+ const y = new Date(n, r, x).getTime();
1385
+ return s && y === s.getTime() || a && y === a.getTime();
1386
+ }
1387
+ return /* @__PURE__ */ e.jsxs("div", { children: [
1388
+ /* @__PURE__ */ e.jsxs("p", { className: "mb-2 text-center text-sm font-semibold text-ink-primary", children: [
1389
+ ot[r],
1390
+ " ",
1391
+ n
1392
+ ] }),
1393
+ /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-7 gap-y-1 text-center text-xs", children: [
1394
+ xr.map((x) => /* @__PURE__ */ e.jsx("span", { className: "text-ink-muted", children: x }, x)),
1395
+ c.map((x, y) => /* @__PURE__ */ e.jsx(
1396
+ "button",
1397
+ {
1398
+ type: "button",
1399
+ disabled: !x,
1400
+ onClick: () => x && i(new Date(n, r, x)),
1401
+ className: b(
1402
+ "h-7 w-7 rounded text-ink-primary",
1403
+ !x && "invisible",
1404
+ x && m(x) && "bg-accent-muted",
1405
+ x && d(x) && "bg-accent text-white"
1406
+ ),
1407
+ children: x
1408
+ },
1409
+ y
1410
+ ))
1411
+ ] })
1412
+ ] });
1413
+ }
1414
+ function Mr({ label: n, required: r, error: s, value: a, onChange: i, className: l }) {
1415
+ const [f, h] = v.useState(!1), [c, m] = v.useState("Custom Range"), [d, x] = v.useState(a), [y, D] = v.useState(() => (a.from ?? /* @__PURE__ */ new Date()).getMonth()), [O, j] = v.useState(() => (a.from ?? /* @__PURE__ */ new Date()).getFullYear()), _ = v.useRef(null);
1416
+ v.useEffect(() => {
1417
+ function k(I) {
1418
+ _.current && !_.current.contains(I.target) && h(!1);
1419
+ }
1420
+ return document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k);
1421
+ }, []);
1422
+ function C(k) {
1423
+ m(k), k !== "Custom Range" && x(hr(k));
1424
+ }
1425
+ function T(k) {
1426
+ m("Custom Range"), !d.from || d.from && d.to ? x({ from: k, to: null }) : k.getTime() < d.from.getTime() ? x({ from: k, to: d.from }) : x({ ...d, to: k });
1427
+ }
1428
+ function H() {
1429
+ y === 0 ? (D(11), j((k) => k - 1)) : D((k) => k - 1);
1430
+ }
1431
+ function J() {
1432
+ y === 11 ? (D(0), j((k) => k + 1)) : D((k) => k + 1);
1433
+ }
1434
+ function N() {
1435
+ i(d), h(!1);
1436
+ }
1437
+ return /* @__PURE__ */ e.jsx(U, { label: n, required: r, error: s, className: l, children: /* @__PURE__ */ e.jsxs("div", { ref: _, className: "relative", children: [
1438
+ /* @__PURE__ */ e.jsxs(
1439
+ "button",
1440
+ {
1441
+ type: "button",
1442
+ onClick: () => h((k) => !k),
1443
+ className: b(
1444
+ "flex h-10 w-full items-center gap-2 rounded-md border bg-input px-3 text-left text-sm",
1445
+ "focus:outline-none focus:ring-2 focus:ring-accent/40",
1446
+ s ? "border-status-offline" : "border-card-border"
1447
+ ),
1448
+ children: [
1449
+ /* @__PURE__ */ e.jsx(Ke, { size: 16, className: "shrink-0 text-ink-muted" }),
1450
+ /* @__PURE__ */ e.jsx("span", { className: a.from ? "text-ink-primary" : "text-ink-muted", children: a.from && a.to ? `${ne(a.from)} - ${ne(a.to)}` : "Select date range" })
1451
+ ]
1452
+ }
1453
+ ),
1454
+ f && /* @__PURE__ */ e.jsxs("div", { className: "absolute z-20 mt-1 flex w-[560px] max-w-[90vw] overflow-hidden rounded-md border border-card-border bg-card shadow-xl", children: [
1455
+ /* @__PURE__ */ e.jsx("div", { className: "w-40 shrink-0 border-r border-card-border py-2", children: mr.map((k) => /* @__PURE__ */ e.jsx(
1456
+ "button",
1457
+ {
1458
+ type: "button",
1459
+ onClick: () => C(k),
1460
+ className: b(
1461
+ "block w-full px-3 py-2 text-left text-sm",
1462
+ c === k ? "bg-accent text-white" : "text-ink-primary hover:bg-accent-muted"
1463
+ ),
1464
+ children: k
1465
+ },
1466
+ k
1467
+ )) }),
1468
+ /* @__PURE__ */ e.jsxs("div", { className: "flex-1 p-3", children: [
1469
+ /* @__PURE__ */ e.jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
1470
+ /* @__PURE__ */ e.jsx("button", { type: "button", onClick: H, className: "text-ink-muted hover:text-ink-primary", children: /* @__PURE__ */ e.jsx(Zt, { size: 16 }) }),
1471
+ /* @__PURE__ */ e.jsx("button", { type: "button", onClick: J, className: "text-ink-muted hover:text-ink-primary", children: /* @__PURE__ */ e.jsx(Qt, { size: 16 }) })
1472
+ ] }),
1473
+ /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
1474
+ /* @__PURE__ */ e.jsx(He, { year: O, month: y, from: d.from, to: d.to, onPick: T }),
1475
+ /* @__PURE__ */ e.jsx(
1476
+ He,
1477
+ {
1478
+ year: y === 11 ? O + 1 : O,
1479
+ month: y === 11 ? 0 : y + 1,
1480
+ from: d.from,
1481
+ to: d.to,
1482
+ onPick: T
1483
+ }
1484
+ )
1485
+ ] }),
1486
+ /* @__PURE__ */ e.jsxs("div", { className: "mt-3 flex items-center justify-between border-t border-card-border pt-3", children: [
1487
+ /* @__PURE__ */ e.jsx("span", { className: "text-sm text-ink-secondary", children: d.from && d.to ? `${ne(d.from)} - ${ne(d.to)}` : "Select a range" }),
1488
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
1489
+ /* @__PURE__ */ e.jsx(F, { variant: "cancel", size: "sm", onClick: () => h(!1), children: "Cancel" }),
1490
+ /* @__PURE__ */ e.jsx(F, { variant: "primary", size: "sm", onClick: N, disabled: !d.from || !d.to, children: "Apply" })
1491
+ ] })
1492
+ ] })
1493
+ ] })
1494
+ ] })
1495
+ ] }) });
1496
+ }
1497
+ function Pr({
1498
+ label: n,
1499
+ required: r,
1500
+ error: s,
1501
+ options: a,
1502
+ value: i,
1503
+ onChange: l,
1504
+ placeholder: f = "Select...",
1505
+ searchable: h = !0,
1506
+ disabled: c,
1507
+ className: m
1508
+ }) {
1509
+ const [d, x] = v.useState(!1), [y, D] = v.useState(""), O = v.useRef(null);
1510
+ v.useEffect(() => {
1511
+ function C(T) {
1512
+ O.current && !O.current.contains(T.target) && x(!1);
1513
+ }
1514
+ return document.addEventListener("mousedown", C), () => document.removeEventListener("mousedown", C);
1515
+ }, []);
1516
+ const j = h && y ? a.filter((C) => C.label.toLowerCase().includes(y.toLowerCase())) : a, _ = a.find((C) => C.value === i);
1517
+ return /* @__PURE__ */ e.jsx(U, { label: n, required: r, error: s, className: m, children: /* @__PURE__ */ e.jsxs("div", { ref: O, className: "relative", children: [
1518
+ /* @__PURE__ */ e.jsxs(
1519
+ "button",
1520
+ {
1521
+ type: "button",
1522
+ disabled: c,
1523
+ onClick: () => x((C) => !C),
1524
+ className: b(
1525
+ "flex h-10 w-full items-center justify-between rounded-md border bg-input px-3 text-sm text-left",
1526
+ "focus:outline-none focus:ring-2 focus:ring-accent/40 disabled:opacity-50",
1527
+ s ? "border-status-offline" : "border-card-border",
1528
+ _ ? "text-ink-primary" : "text-ink-muted"
1529
+ ),
1530
+ children: [
1531
+ /* @__PURE__ */ e.jsx("span", { className: "truncate", children: (_ == null ? void 0 : _.label) ?? f }),
1532
+ /* @__PURE__ */ e.jsx(tt, { size: 16, className: b("shrink-0 text-ink-muted transition-transform", d && "rotate-180") })
1533
+ ]
1534
+ }
1535
+ ),
1536
+ d && /* @__PURE__ */ e.jsxs("div", { className: "absolute z-20 mt-1 w-full overflow-hidden rounded-md border border-card-border bg-card shadow-lg", children: [
1537
+ h && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 border-b border-card-border px-3 py-2", children: [
1538
+ /* @__PURE__ */ e.jsx(he, { size: 14, className: "text-ink-muted" }),
1539
+ /* @__PURE__ */ e.jsx(
1540
+ "input",
1541
+ {
1542
+ autoFocus: !0,
1543
+ value: y,
1544
+ onChange: (C) => D(C.target.value),
1545
+ placeholder: "Search...",
1546
+ className: "w-full bg-transparent text-sm text-ink-primary placeholder:text-ink-muted focus:outline-none"
1547
+ }
1548
+ )
1549
+ ] }),
1550
+ /* @__PURE__ */ e.jsxs("ul", { className: "max-h-56 overflow-y-auto py-1", role: "listbox", children: [
1551
+ j.length === 0 && /* @__PURE__ */ e.jsx("li", { className: "px-3 py-2 text-sm text-ink-muted", children: "No options" }),
1552
+ j.map((C) => /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsxs(
1553
+ "button",
1554
+ {
1555
+ type: "button",
1556
+ disabled: C.disabled,
1557
+ onClick: () => {
1558
+ l(C.value), x(!1), D("");
1559
+ },
1560
+ className: b(
1561
+ "flex w-full items-center justify-between px-3 py-2 text-left text-sm hover:bg-accent-muted disabled:opacity-40",
1562
+ C.value === i ? "text-accent" : "text-ink-primary"
1563
+ ),
1564
+ children: [
1565
+ C.label,
1566
+ C.value === i && /* @__PURE__ */ e.jsx(et, { size: 14 })
1567
+ ]
1568
+ }
1569
+ ) }, C.value))
1570
+ ] })
1571
+ ] })
1572
+ ] }) });
1573
+ }
1574
+ function Or({
1575
+ items: n,
1576
+ onChange: r,
1577
+ createItem: s,
1578
+ renderRow: a,
1579
+ addLabel: i = "Add row",
1580
+ minRows: l = 0,
1581
+ className: f
1582
+ }) {
1583
+ function h(m, d) {
1584
+ const x = n.slice();
1585
+ x[m] = { ...x[m], ...d }, r(x);
1586
+ }
1587
+ function c(m) {
1588
+ r(n.filter((d, x) => x !== m));
1589
+ }
1590
+ return /* @__PURE__ */ e.jsxs("div", { className: b("flex flex-col gap-2", f), children: [
1591
+ n.map((m, d) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
1592
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1", children: a(m, d, (x) => h(d, x)) }),
1593
+ /* @__PURE__ */ e.jsx(
1594
+ B,
1595
+ {
1596
+ icon: /* @__PURE__ */ e.jsx(or, { size: 16 }),
1597
+ label: "Remove row",
1598
+ variant: "danger",
1599
+ size: "sm",
1600
+ disabled: n.length <= l,
1601
+ onClick: () => c(d)
1602
+ }
1603
+ )
1604
+ ] }, d)),
1605
+ /* @__PURE__ */ e.jsx(F, { variant: "ghost", size: "sm", icon: /* @__PURE__ */ e.jsx(st, { size: 14 }), onClick: () => r([...n, s()]), className: "self-start", children: i })
1606
+ ] });
1607
+ }
1608
+ function Dr({ open: n, onSearch: r, onClear: s, children: a, className: i }) {
1609
+ return n ? /* @__PURE__ */ e.jsxs(
1610
+ "div",
1611
+ {
1612
+ className: b(
1613
+ "z-20 w-full max-w-md rounded-lg border border-card-border bg-card p-4 shadow-lg",
1614
+ i
1615
+ ),
1616
+ children: [
1617
+ /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: a }),
1618
+ /* @__PURE__ */ e.jsxs("div", { className: "mt-4 flex items-center justify-end gap-2 border-t border-card-border pt-3", children: [
1619
+ /* @__PURE__ */ e.jsx(F, { variant: "cancel", size: "sm", onClick: s, children: "Clear filters" }),
1620
+ /* @__PURE__ */ e.jsx(F, { variant: "primary", size: "sm", onClick: r, children: "Search" })
1621
+ ] })
1622
+ ]
1623
+ }
1624
+ ) : null;
1625
+ }
1626
+ const br = v.forwardRef(
1627
+ ({ label: n = "Add", className: r, ...s }, a) => /* @__PURE__ */ e.jsx(
1628
+ "button",
1629
+ {
1630
+ ref: a,
1631
+ "aria-label": n,
1632
+ title: n,
1633
+ className: b(
1634
+ "fixed bottom-6 right-6 z-40 flex h-14 w-14 items-center justify-center rounded-full",
1635
+ "bg-accent text-white shadow-lg hover:brightness-110 active:scale-95",
1636
+ "transition-all duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50",
1637
+ r
1638
+ ),
1639
+ ...s,
1640
+ children: /* @__PURE__ */ e.jsx(st, { size: 24, strokeWidth: 2.5 })
1641
+ }
1642
+ )
1643
+ );
1644
+ br.displayName = "FloatingAddButton";
1645
+ function zr({
1646
+ open: n,
1647
+ onClose: r,
1648
+ onSubmit: s,
1649
+ title: a,
1650
+ size: i = "md",
1651
+ submitLabel: l = "Ok",
1652
+ cancelLabel: f = "Close",
1653
+ submitting: h,
1654
+ submitDisabled: c,
1655
+ children: m
1656
+ }) {
1657
+ return /* @__PURE__ */ e.jsx(
1658
+ pe,
1659
+ {
1660
+ open: n,
1661
+ onClose: r,
1662
+ title: a,
1663
+ size: i,
1664
+ footer: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1665
+ /* @__PURE__ */ e.jsx(F, { variant: "cancel", onClick: r, disabled: h, children: f }),
1666
+ /* @__PURE__ */ e.jsx(F, { variant: "primary", onClick: s, loading: h, disabled: c, children: l })
1667
+ ] }),
1668
+ children: /* @__PURE__ */ e.jsx(
1669
+ "form",
1670
+ {
1671
+ onSubmit: (d) => {
1672
+ d.preventDefault(), s();
1673
+ },
1674
+ className: "flex flex-col gap-4",
1675
+ children: m
1676
+ }
1677
+ )
1678
+ }
1679
+ );
1680
+ }
1681
+ const pr = v.forwardRef(
1682
+ ({ label: n, required: r, error: s, hint: a, icon: i, id: l, className: f, ...h }, c) => {
1683
+ const m = l ?? v.useId();
1684
+ return /* @__PURE__ */ e.jsx(U, { label: n, htmlFor: m, required: r, error: s, hint: a, children: /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1685
+ i && /* @__PURE__ */ e.jsx("span", { className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-ink-muted", children: i }),
1686
+ /* @__PURE__ */ e.jsx(
1687
+ "input",
1688
+ {
1689
+ ref: c,
1690
+ id: m,
1691
+ className: b(
1692
+ "h-10 w-full rounded-md border bg-input px-3 text-sm text-ink-primary placeholder:text-ink-muted",
1693
+ "focus:outline-none focus:ring-2 focus:ring-accent/40",
1694
+ s ? "border-status-offline" : "border-card-border",
1695
+ i && "pl-9",
1696
+ f
1697
+ ),
1698
+ "aria-invalid": !!s,
1699
+ ...h
1700
+ }
1701
+ )
1702
+ ] }) });
1703
+ }
1704
+ );
1705
+ pr.displayName = "InputField";
1706
+ function Ar({
1707
+ label: n,
1708
+ required: r,
1709
+ error: s,
1710
+ options: a,
1711
+ value: i,
1712
+ onChange: l,
1713
+ placeholder: f = "Select...",
1714
+ className: h
1715
+ }) {
1716
+ const [c, m] = v.useState(!1), [d, x] = v.useState(""), y = v.useRef(null);
1717
+ v.useEffect(() => {
1718
+ function j(_) {
1719
+ y.current && !y.current.contains(_.target) && m(!1);
1720
+ }
1721
+ return document.addEventListener("mousedown", j), () => document.removeEventListener("mousedown", j);
1722
+ }, []);
1723
+ const D = d ? a.filter((j) => j.label.toLowerCase().includes(d.toLowerCase())) : a;
1724
+ function O(j) {
1725
+ l(i.includes(j) ? i.filter((_) => _ !== j) : [...i, j]);
1726
+ }
1727
+ return /* @__PURE__ */ e.jsx(U, { label: n, required: r, error: s, className: h, children: /* @__PURE__ */ e.jsxs("div", { ref: y, className: "relative", children: [
1728
+ /* @__PURE__ */ e.jsxs(
1729
+ "button",
1730
+ {
1731
+ type: "button",
1732
+ onClick: () => m((j) => !j),
1733
+ className: b(
1734
+ "flex min-h-10 w-full flex-wrap items-center gap-1.5 rounded-md border bg-input px-2 py-1.5 text-left",
1735
+ "focus:outline-none focus:ring-2 focus:ring-accent/40",
1736
+ s ? "border-status-offline" : "border-card-border"
1737
+ ),
1738
+ children: [
1739
+ i.length === 0 && /* @__PURE__ */ e.jsx("span", { className: "px-1 text-sm text-ink-muted", children: f }),
1740
+ i.map((j) => {
1741
+ const _ = a.find((C) => C.value === j);
1742
+ return /* @__PURE__ */ e.jsxs(
1743
+ "span",
1744
+ {
1745
+ className: "inline-flex items-center gap-1 rounded bg-tag px-2 py-0.5 text-xs text-tag border border-tag-border",
1746
+ children: [
1747
+ (_ == null ? void 0 : _.label) ?? j,
1748
+ /* @__PURE__ */ e.jsx(
1749
+ se,
1750
+ {
1751
+ size: 12,
1752
+ className: "cursor-pointer hover:text-status-offline",
1753
+ onClick: (C) => {
1754
+ C.stopPropagation(), O(j);
1755
+ }
1756
+ }
1757
+ )
1758
+ ]
1759
+ },
1760
+ j
1761
+ );
1762
+ }),
1763
+ /* @__PURE__ */ e.jsx(tt, { size: 16, className: b("ml-auto shrink-0 text-ink-muted transition-transform", c && "rotate-180") })
1764
+ ]
1765
+ }
1766
+ ),
1767
+ c && /* @__PURE__ */ e.jsxs("div", { className: "absolute z-20 mt-1 w-full overflow-hidden rounded-md border border-card-border bg-card shadow-lg", children: [
1768
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 border-b border-card-border px-3 py-2", children: [
1769
+ /* @__PURE__ */ e.jsx(he, { size: 14, className: "text-ink-muted" }),
1770
+ /* @__PURE__ */ e.jsx(
1771
+ "input",
1772
+ {
1773
+ autoFocus: !0,
1774
+ value: d,
1775
+ onChange: (j) => x(j.target.value),
1776
+ placeholder: "Search...",
1777
+ className: "w-full bg-transparent text-sm text-ink-primary placeholder:text-ink-muted focus:outline-none"
1778
+ }
1779
+ )
1780
+ ] }),
1781
+ /* @__PURE__ */ e.jsxs("ul", { className: "max-h-56 overflow-y-auto py-1", role: "listbox", children: [
1782
+ D.length === 0 && /* @__PURE__ */ e.jsx("li", { className: "px-3 py-2 text-sm text-ink-muted", children: "No options" }),
1783
+ D.map((j) => /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsxs("label", { className: "flex w-full cursor-pointer items-center gap-2 px-3 py-2 text-sm hover:bg-accent-muted", children: [
1784
+ /* @__PURE__ */ e.jsx(
1785
+ "input",
1786
+ {
1787
+ type: "checkbox",
1788
+ checked: i.includes(j.value),
1789
+ onChange: () => O(j.value),
1790
+ className: "h-3.5 w-3.5 rounded border-card-border accent-[var(--accent-primary)]"
1791
+ }
1792
+ ),
1793
+ /* @__PURE__ */ e.jsx("span", { className: "text-ink-primary", children: j.label })
1794
+ ] }) }, j.value))
1795
+ ] })
1796
+ ] })
1797
+ ] }) });
1798
+ }
1799
+ function Lr({ page: n, pageSize: r, total: s, onPageChange: a, className: i }) {
1800
+ const l = Math.max(1, Math.ceil(s / r)), f = s === 0 ? 0 : (n - 1) * r + 1, h = Math.min(s, n * r);
1801
+ return /* @__PURE__ */ e.jsxs("nav", { className: b("flex items-center gap-2 text-sm text-ink-secondary", i), "aria-label": "Pagination", children: [
1802
+ /* @__PURE__ */ e.jsx(
1803
+ "button",
1804
+ {
1805
+ onClick: () => a(Math.max(1, n - 1)),
1806
+ disabled: n === 1,
1807
+ "aria-label": "Previous page",
1808
+ className: "flex h-7 w-7 items-center justify-center rounded text-ink-secondary hover:bg-accent-muted disabled:opacity-40",
1809
+ children: /* @__PURE__ */ e.jsx(rt, { size: 16 })
1810
+ }
1811
+ ),
1812
+ /* @__PURE__ */ e.jsxs("span", { children: [
1813
+ f,
1814
+ "-",
1815
+ h,
1816
+ " of ",
1817
+ s
1818
+ ] }),
1819
+ /* @__PURE__ */ e.jsx(
1820
+ "button",
1821
+ {
1822
+ onClick: () => a(Math.min(l, n + 1)),
1823
+ disabled: n >= l,
1824
+ "aria-label": "Next page",
1825
+ className: "flex h-7 w-7 items-center justify-center rounded text-ink-secondary hover:bg-accent-muted disabled:opacity-40",
1826
+ children: /* @__PURE__ */ e.jsx(nt, { size: 16 })
1827
+ }
1828
+ )
1829
+ ] });
1830
+ }
1831
+ function Fr({ title: n, actions: r, className: s, children: a, ...i }) {
1832
+ return /* @__PURE__ */ e.jsxs("div", { className: b("rounded-lg border border-card-border bg-card", s), ...i, children: [
1833
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between border-b border-card-border px-4 py-3", children: [
1834
+ /* @__PURE__ */ e.jsx("h3", { className: "font-secondary text-sm font-semibold text-ink-primary", children: n }),
1835
+ r && /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: r })
1836
+ ] }),
1837
+ /* @__PURE__ */ e.jsx("div", { className: "p-4", children: a })
1838
+ ] });
1839
+ }
1840
+ const vr = v.forwardRef(
1841
+ ({ label: n, required: r, error: s, hint: a, id: i, className: l, ...f }, h) => {
1842
+ const [c, m] = v.useState(!1), d = i ?? v.useId();
1843
+ return /* @__PURE__ */ e.jsx(U, { label: n, htmlFor: d, required: r, error: s, hint: a, children: /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1844
+ /* @__PURE__ */ e.jsx(
1845
+ "input",
1846
+ {
1847
+ ref: h,
1848
+ id: d,
1849
+ type: c ? "text" : "password",
1850
+ className: b(
1851
+ "h-10 w-full rounded-md border bg-input pl-3 pr-10 text-sm text-ink-primary placeholder:text-ink-muted",
1852
+ "focus:outline-none focus:ring-2 focus:ring-accent/40",
1853
+ s ? "border-status-offline" : "border-card-border",
1854
+ l
1855
+ ),
1856
+ "aria-invalid": !!s,
1857
+ ...f
1858
+ }
1859
+ ),
1860
+ /* @__PURE__ */ e.jsx(
1861
+ "button",
1862
+ {
1863
+ type: "button",
1864
+ onClick: () => m((x) => !x),
1865
+ "aria-label": c ? "Hide password" : "Show password",
1866
+ className: "absolute right-3 top-1/2 -translate-y-1/2 text-ink-muted hover:text-ink-primary",
1867
+ children: c ? /* @__PURE__ */ e.jsx(tr, { size: 16 }) : /* @__PURE__ */ e.jsx(rr, { size: 16 })
1868
+ }
1869
+ )
1870
+ ] }) });
1871
+ }
1872
+ );
1873
+ vr.displayName = "PasswordInput";
1874
+ function gr(n) {
1875
+ let r = 0;
1876
+ return n.length >= 8 && r++, n.length >= 12 && r++, /[A-Z]/.test(n) && /[a-z]/.test(n) && r++, /\d/.test(n) && r++, /[^A-Za-z0-9]/.test(n) && r++, r <= 1 ? { score: r, label: "Weak", tone: "bg-status-offline" } : r <= 3 ? { score: r, label: "Medium", tone: "bg-status-warn" } : { score: r, label: "Strong", tone: "bg-status-online" };
1877
+ }
1878
+ function Ir({ password: n, className: r }) {
1879
+ const { score: s, label: a, tone: i } = gr(n), l = Math.min(s / 5 * 100, 100);
1880
+ return n ? /* @__PURE__ */ e.jsxs("div", { className: b("mt-2", r), children: [
1881
+ /* @__PURE__ */ e.jsx("div", { className: "h-1.5 w-full overflow-hidden rounded-full bg-card-border", children: /* @__PURE__ */ e.jsx("div", { className: b("h-full rounded-full transition-all duration-200", i), style: { width: `${l}%` } }) }),
1882
+ /* @__PURE__ */ e.jsxs("p", { className: "mt-1 text-xs text-ink-secondary", children: [
1883
+ "Strength: ",
1884
+ a
1885
+ ] })
1886
+ ] }) : null;
1887
+ }
1888
+ const yr = v.forwardRef(
1889
+ ({ value: n, onChange: r, onFilterClick: s, placeholder: a = "Search Data", className: i, ...l }, f) => /* @__PURE__ */ e.jsxs(
1890
+ "div",
1891
+ {
1892
+ className: b(
1893
+ "flex h-10 w-full items-center gap-2 rounded-md border border-card-border bg-input px-3",
1894
+ "focus-within:ring-2 focus-within:ring-accent/40",
1895
+ i
1896
+ ),
1897
+ children: [
1898
+ /* @__PURE__ */ e.jsx(he, { size: 16, className: "shrink-0 text-ink-muted" }),
1899
+ /* @__PURE__ */ e.jsx(
1900
+ "input",
1901
+ {
1902
+ ref: f,
1903
+ value: n,
1904
+ onChange: (h) => r(h.target.value),
1905
+ placeholder: a,
1906
+ className: "w-full bg-transparent text-sm text-ink-primary placeholder:text-ink-muted focus:outline-none",
1907
+ ...l
1908
+ }
1909
+ ),
1910
+ n && /* @__PURE__ */ e.jsx("button", { type: "button", "aria-label": "Clear search", onClick: () => r(""), className: "text-ink-muted hover:text-ink-primary", children: /* @__PURE__ */ e.jsx(se, { size: 14 }) }),
1911
+ s && /* @__PURE__ */ e.jsx("button", { type: "button", "aria-label": "Filters", onClick: s, className: "text-ink-muted hover:text-accent", children: /* @__PURE__ */ e.jsx(at, { size: 16 }) })
1912
+ ]
1913
+ }
1914
+ )
1915
+ );
1916
+ yr.displayName = "SearchBox";
1917
+ function jr({ open: n, onClose: r, title: s, width: a = "480px", children: i, className: l }) {
1918
+ return v.useEffect(() => {
1919
+ if (!n) return;
1920
+ function f(h) {
1921
+ h.key === "Escape" && r();
1922
+ }
1923
+ return document.addEventListener("keydown", f), () => document.removeEventListener("keydown", f);
1924
+ }, [n, r]), n ? Xe(
1925
+ /* @__PURE__ */ e.jsxs("div", { className: "fixed inset-0 z-50", children: [
1926
+ /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 bg-black/50", onClick: r, "aria-hidden": !0 }),
1927
+ /* @__PURE__ */ e.jsxs(
1928
+ "div",
1929
+ {
1930
+ role: "dialog",
1931
+ "aria-modal": "true",
1932
+ style: { width: a },
1933
+ className: b(
1934
+ "absolute right-0 top-0 flex h-full max-w-full flex-col border-l border-card-border bg-card shadow-xl",
1935
+ l
1936
+ ),
1937
+ children: [
1938
+ s && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between border-b border-card-border px-5 py-4", children: [
1939
+ /* @__PURE__ */ e.jsx("h2", { className: "font-secondary text-base font-semibold text-ink-primary", children: s }),
1940
+ /* @__PURE__ */ e.jsx("button", { onClick: r, "aria-label": "Close", className: "text-ink-muted hover:text-ink-primary", children: /* @__PURE__ */ e.jsx(se, { size: 18 }) })
1941
+ ] }),
1942
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto px-5 py-4", children: i })
1943
+ ]
1944
+ }
1945
+ )
1946
+ ] }),
1947
+ document.body
1948
+ ) : null;
1949
+ }
1950
+ function $r({ start: n, end: r, className: s, ...a }) {
1951
+ return /* @__PURE__ */ e.jsxs("div", { className: b("flex flex-wrap items-center justify-between gap-3 py-2", s), ...a, children: [
1952
+ /* @__PURE__ */ e.jsx("div", { className: "flex flex-1 items-center gap-2", children: n }),
1953
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1.5", children: r })
1954
+ ] });
1955
+ }
1956
+ function kr({ items: n, value: r, onChange: s, className: a }) {
1957
+ return /* @__PURE__ */ e.jsx("div", { role: "tablist", className: b("flex items-center gap-1 border-b border-card-border", a), children: n.map((i) => {
1958
+ const l = i.value === r;
1959
+ return /* @__PURE__ */ e.jsxs(
1960
+ "button",
1961
+ {
1962
+ role: "tab",
1963
+ "aria-selected": l,
1964
+ onClick: () => s(i.value),
1965
+ className: b(
1966
+ "flex items-center gap-1.5 border-b-2 px-4 py-2 text-sm font-medium transition-colors",
1967
+ l ? "border-accent text-accent" : "border-transparent text-ink-secondary hover:text-ink-primary"
1968
+ ),
1969
+ children: [
1970
+ i.icon,
1971
+ i.label
1972
+ ]
1973
+ },
1974
+ i.value
1975
+ );
1976
+ }) });
1977
+ }
1978
+ function Yr({ options: n, value: r, onChange: s, className: a }) {
1979
+ return /* @__PURE__ */ e.jsx("div", { className: b("inline-flex overflow-hidden rounded-md border border-card-border", a), role: "tablist", children: n.map((i, l) => {
1980
+ const f = i.value === r;
1981
+ return /* @__PURE__ */ e.jsx(
1982
+ "button",
1983
+ {
1984
+ type: "button",
1985
+ role: "tab",
1986
+ "aria-selected": f,
1987
+ onClick: () => s(i.value),
1988
+ className: b(
1989
+ "h-9 px-4 text-sm font-medium transition-colors",
1990
+ l === 0 ? "border-r border-card-border" : "",
1991
+ f ? "bg-accent text-white" : "bg-input text-ink-secondary hover:bg-accent-muted"
1992
+ ),
1993
+ children: i.label
1994
+ },
1995
+ i.value
1996
+ );
1997
+ }) });
1998
+ }
1999
+ function Wr({ logo: n, children: r, className: s }) {
2000
+ return /* @__PURE__ */ e.jsx("div", { className: b("flex min-h-screen items-center justify-center bg-canvas px-4", s), children: /* @__PURE__ */ e.jsxs("div", { className: "w-full max-w-md", children: [
2001
+ n && /* @__PURE__ */ e.jsx("div", { className: "mb-8 flex justify-center", children: n }),
2002
+ /* @__PURE__ */ e.jsx("div", { className: "rounded-lg border border-card-border bg-card p-8 shadow-lg", children: r })
2003
+ ] }) });
2004
+ }
2005
+ function Vr({ className: n, children: r, ...s }) {
2006
+ return /* @__PURE__ */ e.jsx(
2007
+ "footer",
2008
+ {
2009
+ className: b("border-t border-card-border px-6 py-3 text-xs text-ink-muted", n),
2010
+ ...s,
2011
+ children: r ?? `© ${(/* @__PURE__ */ new Date()).getFullYear()} SLS — Software License System`
2012
+ }
2013
+ );
2014
+ }
2015
+ function qr({ title: n, search: r, profileMenu: s, actions: a, className: i }) {
2016
+ return /* @__PURE__ */ e.jsxs(
2017
+ "header",
2018
+ {
2019
+ className: b(
2020
+ "flex h-16 items-center justify-between gap-4 border-b border-topbar-border bg-chrome px-6",
2021
+ i
2022
+ ),
2023
+ children: [
2024
+ /* @__PURE__ */ e.jsx("h1", { className: "font-secondary text-lg font-semibold text-ink-onchrome truncate", children: n }),
2025
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-1 items-center justify-end gap-4", children: [
2026
+ r && /* @__PURE__ */ e.jsx("div", { className: "w-full max-w-sm", children: r }),
2027
+ a,
2028
+ s
2029
+ ] })
2030
+ ]
2031
+ }
2032
+ );
2033
+ }
2034
+ function Br({ sidebar: n, header: r, footer: s, children: a, className: i }) {
2035
+ return /* @__PURE__ */ e.jsxs("div", { className: b("flex h-screen w-full overflow-hidden bg-canvas", i), children: [
2036
+ n,
2037
+ /* @__PURE__ */ e.jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [
2038
+ r,
2039
+ /* @__PURE__ */ e.jsx("main", { className: "flex-1 overflow-y-auto p-6", children: a }),
2040
+ s
2041
+ ] })
2042
+ ] });
2043
+ }
2044
+ function Ur({ name: n, role: r, avatarUrl: s, onSignOut: a, actions: i = [], className: l }) {
2045
+ const [f, h] = v.useState(!1), c = v.useRef(null);
2046
+ return v.useEffect(() => {
2047
+ function m(d) {
2048
+ c.current && !c.current.contains(d.target) && h(!1);
2049
+ }
2050
+ return document.addEventListener("mousedown", m), () => document.removeEventListener("mousedown", m);
2051
+ }, []), /* @__PURE__ */ e.jsxs("div", { ref: c, className: b("relative", l), children: [
2052
+ /* @__PURE__ */ e.jsx("button", { onClick: () => h((m) => !m), className: "flex items-center gap-2", "aria-label": "Open profile menu", children: s ? /* @__PURE__ */ e.jsx("img", { src: s, alt: "", className: "h-9 w-9 rounded-full object-cover" }) : /* @__PURE__ */ e.jsx("span", { className: "flex h-9 w-9 items-center justify-center rounded-full bg-accent-muted text-accent", children: /* @__PURE__ */ e.jsx(lr, { size: 16 }) }) }),
2053
+ f && /* @__PURE__ */ e.jsxs("div", { className: "absolute right-0 z-30 mt-2 w-56 rounded-lg border border-card-border bg-card p-4 shadow-lg", children: [
2054
+ /* @__PURE__ */ e.jsx("p", { className: "font-secondary text-sm font-semibold text-ink-primary", children: n }),
2055
+ /* @__PURE__ */ e.jsx("p", { className: "text-xs text-ink-muted", children: r }),
2056
+ i.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "mt-3 flex flex-col gap-1 border-t border-card-border pt-3", children: i.map((m) => /* @__PURE__ */ e.jsxs(
2057
+ "button",
2058
+ {
2059
+ onClick: m.onClick,
2060
+ className: "flex items-center gap-2 rounded px-2 py-1.5 text-left text-sm text-ink-primary hover:bg-accent-muted",
2061
+ children: [
2062
+ m.icon,
2063
+ m.label
2064
+ ]
2065
+ },
2066
+ m.label
2067
+ )) }),
2068
+ /* @__PURE__ */ e.jsxs(
2069
+ "button",
2070
+ {
2071
+ onClick: a,
2072
+ className: "mt-2 flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm text-status-offline hover:bg-status-offline-bg",
2073
+ children: [
2074
+ /* @__PURE__ */ e.jsx(sr, { size: 14 }),
2075
+ "Sign out"
2076
+ ]
2077
+ }
2078
+ )
2079
+ ] })
2080
+ ] });
2081
+ }
2082
+ function Hr({ items: n, collapsed: r, onCollapsedChange: s, logo: a, className: i }) {
2083
+ return /* @__PURE__ */ e.jsxs(
2084
+ "aside",
2085
+ {
2086
+ className: b(
2087
+ "flex h-full flex-col border-r border-sidebar-border bg-chrome-deep transition-all duration-200",
2088
+ r ? "w-16" : "w-56",
2089
+ i
2090
+ ),
2091
+ children: [
2092
+ a && /* @__PURE__ */ e.jsx("div", { className: "flex h-16 items-center justify-center border-b border-sidebar-border", children: a }),
2093
+ /* @__PURE__ */ e.jsx("nav", { className: "flex flex-1 flex-col gap-1 p-2", children: n.map((l) => /* @__PURE__ */ e.jsxs(
2094
+ "button",
2095
+ {
2096
+ onClick: l.onClick,
2097
+ title: r ? l.label : void 0,
2098
+ className: b(
2099
+ "flex items-center gap-3 rounded-md px-3 py-2.5 text-sm font-medium transition-colors",
2100
+ l.active ? "border-l-2 bg-nav-active-bg text-ink-onchrome" : "text-icon-idle hover:bg-nav-active-bg hover:text-icon-active"
2101
+ ),
2102
+ style: l.active ? { borderColor: "var(--nav-active-border)" } : void 0,
2103
+ children: [
2104
+ /* @__PURE__ */ e.jsx("span", { className: "shrink-0", children: l.icon }),
2105
+ !r && /* @__PURE__ */ e.jsx("span", { className: "truncate", children: l.label })
2106
+ ]
2107
+ },
2108
+ l.key
2109
+ )) }),
2110
+ s && /* @__PURE__ */ e.jsx(
2111
+ "button",
2112
+ {
2113
+ onClick: () => s(!r),
2114
+ className: "flex items-center justify-center border-t border-sidebar-border py-3 text-icon-idle hover:text-icon-active",
2115
+ "aria-label": r ? "Expand sidebar" : "Collapse sidebar",
2116
+ children: r ? /* @__PURE__ */ e.jsx(nt, { size: 16 }) : /* @__PURE__ */ e.jsx(rt, { size: 16 })
2117
+ }
2118
+ )
2119
+ ]
2120
+ }
2121
+ );
2122
+ }
2123
+ function Jr({ onOpen: n, className: r }) {
2124
+ function s() {
2125
+ if (n) return n();
2126
+ const a = window.open("", "_blank");
2127
+ a && a.document.write("<title>SLS License Agent</title><body style='font-family:sans-serif;padding:40px'><h2>SLS AI License Agent</h2><p>The agent would open here.</p></body>");
2128
+ }
2129
+ return /* @__PURE__ */ e.jsx(
2130
+ "button",
2131
+ {
2132
+ onClick: s,
2133
+ "aria-label": "Open AI license agent",
2134
+ title: "AI License Agent",
2135
+ className: b(
2136
+ "fixed bottom-24 right-6 z-40 flex h-14 w-14 items-center justify-center rounded-full",
2137
+ "bg-accent-light text-white shadow-lg hover:brightness-110 active:scale-95 transition-all",
2138
+ r
2139
+ ),
2140
+ children: /* @__PURE__ */ e.jsx(Xt, { size: 22 })
2141
+ }
2142
+ );
2143
+ }
2144
+ function Gr({ title: n, loading: r, onReload: s, onExport: a, onFilter: i, children: l, className: f }) {
2145
+ return /* @__PURE__ */ e.jsxs("div", { className: b("flex flex-col rounded-lg border border-card-border bg-card", f), children: [
2146
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between border-b border-card-border px-4 py-3", children: [
2147
+ /* @__PURE__ */ e.jsx("h3", { className: "font-secondary text-sm font-semibold text-ink-primary", children: n }),
2148
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1", children: [
2149
+ i && /* @__PURE__ */ e.jsx(B, { icon: /* @__PURE__ */ e.jsx(at, { size: 14 }), label: "Filter", size: "sm", onClick: i }),
2150
+ s && /* @__PURE__ */ e.jsx(B, { icon: /* @__PURE__ */ e.jsx(ir, { size: 14 }), label: "Reload", size: "sm", onClick: s }),
2151
+ a && /* @__PURE__ */ e.jsx(B, { icon: /* @__PURE__ */ e.jsx(er, { size: 14 }), label: "Export", size: "sm", onClick: a })
2152
+ ] })
2153
+ ] }),
2154
+ /* @__PURE__ */ e.jsx("div", { className: "p-4", children: r ? /* @__PURE__ */ e.jsx(it, { label: "Loading widget..." }) : l })
2155
+ ] });
2156
+ }
2157
+ const wr = [
2158
+ { value: "pdf", label: "Invoice PDF" },
2159
+ { value: "excel", label: "Renewal Excel" }
2160
+ ];
2161
+ function Xr({
2162
+ open: n,
2163
+ onClose: r,
2164
+ customerEmail: s,
2165
+ activeTab: a,
2166
+ onTabChange: i,
2167
+ onSendEmail: l,
2168
+ children: f
2169
+ }) {
2170
+ return /* @__PURE__ */ e.jsx(jr, { open: n, onClose: r, title: "Invoice preview", width: "640px", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4", children: [
2171
+ /* @__PURE__ */ e.jsx(kr, { items: wr, value: a, onChange: i }),
2172
+ s && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between rounded-md bg-accent-muted px-3 py-2 text-sm", children: [
2173
+ /* @__PURE__ */ e.jsxs("span", { className: "flex items-center gap-2 text-ink-secondary", children: [
2174
+ /* @__PURE__ */ e.jsx(ar, { size: 14 }),
2175
+ s
2176
+ ] }),
2177
+ l && /* @__PURE__ */ e.jsx(F, { size: "sm", variant: "secondary", onClick: l, children: "Send" })
2178
+ ] }),
2179
+ /* @__PURE__ */ e.jsx("div", { className: "min-h-[60vh]", children: f })
2180
+ ] }) });
2181
+ }
2182
+ function Zr({ open: n, onClose: r, title: s = "Changes", fields: a }) {
2183
+ return /* @__PURE__ */ e.jsx(pe, { open: n, onClose: r, title: s, size: "md", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 gap-2 text-sm", children: [
2184
+ /* @__PURE__ */ e.jsx("div", { className: "font-medium text-ink-secondary", children: "Field" }),
2185
+ /* @__PURE__ */ e.jsx("div", { className: "font-medium text-ink-secondary", children: "Previous" }),
2186
+ /* @__PURE__ */ e.jsx("div", { className: "font-medium text-ink-secondary", children: "Current" }),
2187
+ a.map((i) => /* @__PURE__ */ e.jsxs(v.Fragment, { children: [
2188
+ /* @__PURE__ */ e.jsx("div", { className: "text-ink-primary", children: i.label }),
2189
+ /* @__PURE__ */ e.jsx("div", { className: "rounded bg-status-offline-bg px-2 py-1 text-status-offline", children: i.previous }),
2190
+ /* @__PURE__ */ e.jsx("div", { className: "rounded bg-status-online-bg px-2 py-1 text-status-online", children: i.current })
2191
+ ] }, i.label))
2192
+ ] }) });
2193
+ }
2194
+ export {
2195
+ Wr as AuthLayout,
2196
+ Rr as Badge,
2197
+ F as Button,
2198
+ qt as Card,
2199
+ Zr as ChangesPreviewModal,
2200
+ be as Checkbox,
2201
+ Er as ColumnFilterDropdown,
2202
+ Sr as ConfirmDialog,
2203
+ _r as DataTable,
2204
+ Tr as DatePicker,
2205
+ Mr as DateRangePicker,
2206
+ Pr as Dropdown,
2207
+ Or as DynamicRowList,
2208
+ Dr as FilterPanel,
2209
+ br as FloatingAddButton,
2210
+ Vr as Footer,
2211
+ U as FormGroup,
2212
+ zr as FormModal,
2213
+ qr as Header,
2214
+ B as IconButton,
2215
+ pr as InputField,
2216
+ Xr as InvoicePreviewModal,
2217
+ Jr as LicenseAgentButton,
2218
+ it as Loader,
2219
+ Br as MainLayout,
2220
+ pe as Modal,
2221
+ Ar as MultiSelectDropdown,
2222
+ Lr as Pagination,
2223
+ Fr as Panel,
2224
+ vr as PasswordInput,
2225
+ Ir as PasswordStrengthMeter,
2226
+ Ur as ProfileMenu,
2227
+ Gr as ReportWidget,
2228
+ Ue as RowSelectCheckbox,
2229
+ yr as SearchBox,
2230
+ Hr as Sidebar,
2231
+ jr as SlideOverModal,
2232
+ $r as TableToolbar,
2233
+ kr as Tabs,
2234
+ Yr as ToggleButtonGroup,
2235
+ fr as ValidationMessage
2236
+ };