mgv-backoffice 1.36.1 → 1.36.2
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-lib.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { Fragment as e, Teleport as t,
|
|
2
|
-
import { ArrowDownIcon as
|
|
3
|
-
import { HomeIcon as
|
|
4
|
-
import { useRoute as
|
|
1
|
+
import { Fragment as e, Teleport as t, Text as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createStaticVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, effectScope as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, onScopeDispose as b, onUnmounted as x, openBlock as S, reactive as C, readonly as w, ref as T, renderList as E, renderSlot as D, resolveComponent as O, resolveDynamicComponent as k, toDisplayString as A, unref as j, useSlots as ee, vModelCheckbox as M, vModelDynamic as te, vModelText as N, vShow as ne, watch as P, withCtx as F, withDirectives as I, withKeys as re, withModifiers as L } from "vue";
|
|
2
|
+
import { ArrowDownIcon as ie, ArrowUpIcon as ae, Bars3Icon as oe, BellIcon as se, CheckCircleIcon as ce, ChevronDoubleLeftIcon as le, ChevronDoubleRightIcon as ue, ChevronDownIcon as de, ChevronRightIcon as fe, ClipboardDocumentCheckIcon as pe, ClipboardDocumentIcon as me, DocumentDuplicateIcon as he, ExclamationCircleIcon as ge, ExclamationTriangleIcon as _e, FolderIcon as ve, InformationCircleIcon as ye, MagnifyingGlassIcon as be, MinusIcon as xe, MoonIcon as Se, SunIcon as Ce, XMarkIcon as we } from "@heroicons/vue/24/outline";
|
|
3
|
+
import { HomeIcon as Te } from "@heroicons/vue/24/solid";
|
|
4
|
+
import { useRoute as Ee, useRouter as De } from "vue-router";
|
|
5
5
|
//#region src/enums/AlertEnum.ts
|
|
6
6
|
var R = /* @__PURE__ */ function(e) {
|
|
7
7
|
return e.WARNING = "WARNING", e.ERROR = "ERROR", e.SUCCESS = "SUCCESS", e.INFO = "INFO", e;
|
|
8
|
-
}({}), z =
|
|
9
|
-
function
|
|
10
|
-
if (
|
|
8
|
+
}({}), z = T(!1), Oe = !1, B = "mgv-theme";
|
|
9
|
+
function ke(e) {
|
|
10
|
+
if (Oe) {
|
|
11
11
|
e !== B && console.warn(`[ui-lib] useTheme: storage key "${e}" ignored — theme already initialized with "${B}". Call initTheme({ storageKey }) before mounting any component.`);
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
|
-
if (
|
|
14
|
+
if (Oe = !0, B = e, typeof window < "u") {
|
|
15
15
|
let e = window.localStorage?.getItem(B);
|
|
16
16
|
e ? z.value = e === "dark" : typeof window.matchMedia == "function" && (z.value = window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
17
17
|
}
|
|
18
|
-
typeof document < "u" &&
|
|
18
|
+
typeof document < "u" && m(!0).run(() => {
|
|
19
19
|
P(z, (e) => {
|
|
20
20
|
document.documentElement.classList.toggle("dark", e), window.localStorage?.setItem(B, e ? "dark" : "light");
|
|
21
21
|
}, { immediate: !0 });
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
24
|
+
function Ae(e) {
|
|
25
|
+
ke(e?.storageKey ?? B);
|
|
26
26
|
}
|
|
27
27
|
function V(e) {
|
|
28
|
-
|
|
28
|
+
ke(e?.storageKey ?? B);
|
|
29
29
|
function t() {
|
|
30
30
|
z.value = !z.value;
|
|
31
31
|
}
|
|
@@ -36,10 +36,10 @@ function V(e) {
|
|
|
36
36
|
}
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/components/BaseAlert.vue?vue&type=script&setup=true&lang.ts
|
|
39
|
-
var
|
|
39
|
+
var je = { class: "min-w-0 flex-1" }, Me = {
|
|
40
40
|
key: 0,
|
|
41
41
|
class: "font-medium"
|
|
42
|
-
},
|
|
42
|
+
}, Ne = /* @__PURE__ */ p({
|
|
43
43
|
__name: "BaseAlert",
|
|
44
44
|
props: {
|
|
45
45
|
title: { default: "" },
|
|
@@ -50,7 +50,7 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
setup(e) {
|
|
53
|
-
let t = e, { isDark: n } = V(),
|
|
53
|
+
let t = e, { isDark: n } = V(), r = {
|
|
54
54
|
[R.ERROR]: {
|
|
55
55
|
light: "bg-red-50 border-red-200 text-red-700",
|
|
56
56
|
dark: "bg-red-500/10 border-red-500/30 text-red-300"
|
|
@@ -67,14 +67,14 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
67
67
|
light: "bg-sky-50 border-sky-200 text-sky-700",
|
|
68
68
|
dark: "bg-sky-500/10 border-sky-500/30 text-sky-300"
|
|
69
69
|
}
|
|
70
|
-
}, l =
|
|
70
|
+
}, l = i(() => n.value ? r[t.color].dark : r[t.color].light), u = i(() => {
|
|
71
71
|
switch (t.color) {
|
|
72
|
-
case R.SUCCESS: return
|
|
73
|
-
case R.WARNING: return
|
|
74
|
-
case R.INFO: return
|
|
75
|
-
default: return
|
|
72
|
+
case R.SUCCESS: return ce;
|
|
73
|
+
case R.WARNING: return _e;
|
|
74
|
+
case R.INFO: return ye;
|
|
75
|
+
default: return ge;
|
|
76
76
|
}
|
|
77
|
-
}), d =
|
|
77
|
+
}), d = i(() => {
|
|
78
78
|
switch (t.color) {
|
|
79
79
|
case R.SUCCESS: return "text-emerald-500";
|
|
80
80
|
case R.WARNING: return "text-amber-500";
|
|
@@ -82,24 +82,24 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
82
82
|
default: return "text-red-500";
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
|
-
return (t, n) => (
|
|
85
|
+
return (t, n) => (S(), s("div", {
|
|
86
86
|
role: "alert",
|
|
87
|
-
class:
|
|
88
|
-
}, [(
|
|
89
|
-
class:
|
|
87
|
+
class: g(["flex gap-3 mb-4 rounded-lg border text-sm transition-colors", [e.compact ? "items-start px-3 py-2 text-xs" : "items-start p-4", l.value]])
|
|
88
|
+
}, [(S(), a(k(u.value), {
|
|
89
|
+
class: g(["shrink-0", [e.compact ? "w-4 h-4 mt-px" : "w-5 h-5 mt-0.5", d.value]]),
|
|
90
90
|
"aria-hidden": "true"
|
|
91
|
-
}, null, 8, ["class"])),
|
|
91
|
+
}, null, 8, ["class"])), c("div", je, [e.title ? (S(), s("p", Me, A(e.title), 1)) : o("", !0), D(t.$slots, "default")])], 2));
|
|
92
92
|
}
|
|
93
93
|
}), H = /* @__PURE__ */ function(e) {
|
|
94
94
|
return e.NONE = "NONE", e.RED = "RED", e.YELLOW = "YELLOW", e.BLACK = "BLACK", e.GRAY = "GRAY", e.GREEN = "GREEN", e.BLUE = "BLUE", e;
|
|
95
|
-
}({}),
|
|
95
|
+
}({}), Pe = "bg-red-100 text-red-700 border-red-200", Fe = /* @__PURE__ */ p({
|
|
96
96
|
__name: "BaseBadge",
|
|
97
97
|
props: { color: {
|
|
98
98
|
type: String,
|
|
99
99
|
required: !1
|
|
100
100
|
} },
|
|
101
101
|
setup(e) {
|
|
102
|
-
let t = ee(),
|
|
102
|
+
let t = ee(), r = i(() => !!t.default), a = () => (t.default?.() ?? []).map((e) => e.type === n && typeof e.children == "string" ? d(e.children.replace(/_/g, " ")) : e), c = e, l = {
|
|
103
103
|
[H.RED]: "bg-red-100 text-red-700 border-red-200",
|
|
104
104
|
[H.GREEN]: "bg-green-100 text-green-700 border-green-200",
|
|
105
105
|
[H.BLUE]: "bg-blue-100 text-blue-700 border-blue-200",
|
|
@@ -107,19 +107,19 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
107
107
|
[H.GRAY]: "bg-gray-100 text-gray-700 border-gray-200",
|
|
108
108
|
[H.BLACK]: "bg-gray-800 text-gray-100 border-gray-700",
|
|
109
109
|
[H.NONE]: "bg-gray-50 text-gray-600 border-gray-200"
|
|
110
|
-
},
|
|
111
|
-
return (e, t) =>
|
|
110
|
+
}, u = i(() => `inline-flex items-center gap-1 font-semibold text-xs leading-none px-3 py-1.5 rounded-full border ${c.color && l[c.color] || Pe}`);
|
|
111
|
+
return (e, t) => r.value ? (S(), s("span", {
|
|
112
112
|
key: 0,
|
|
113
|
-
class:
|
|
114
|
-
}, [
|
|
113
|
+
class: g(u.value)
|
|
114
|
+
}, [f(a)], 2)) : o("", !0);
|
|
115
115
|
}
|
|
116
|
-
}),
|
|
116
|
+
}), Ie = {
|
|
117
117
|
class: "flex px-5 py-3 text-gray-700 border border-gray-200 rounded-lg bg-gray-50 dark:bg-gray-800 dark:border-gray-700",
|
|
118
118
|
"aria-label": "Breadcrumb"
|
|
119
|
-
},
|
|
119
|
+
}, Le = { class: "inline-flex items-center space-x-1 md:space-x-3" }, Re = {
|
|
120
120
|
class: "inline-flex items-center",
|
|
121
121
|
style: { "margin-left": "0" }
|
|
122
|
-
},
|
|
122
|
+
}, ze = /* @__PURE__ */ p({
|
|
123
123
|
__name: "BaseBreadcrumb",
|
|
124
124
|
props: {
|
|
125
125
|
items: {
|
|
@@ -134,7 +134,7 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
134
134
|
}
|
|
135
135
|
},
|
|
136
136
|
setup(t) {
|
|
137
|
-
let n = t,
|
|
137
|
+
let n = t, r = i(() => {
|
|
138
138
|
if (n.items && n.items.length > 0) return n.items;
|
|
139
139
|
let e = (n.path ?? (typeof window < "u" ? window.location.pathname : "/")).split("/").filter((e) => e !== ""), t = "";
|
|
140
140
|
return e.map((e) => (t += "/" + e, {
|
|
@@ -143,22 +143,22 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
143
143
|
}));
|
|
144
144
|
});
|
|
145
145
|
return (t, n) => {
|
|
146
|
-
let
|
|
147
|
-
return
|
|
146
|
+
let i = O("router-link");
|
|
147
|
+
return S(), s("nav", Ie, [c("ol", Le, [c("li", Re, [f(i, {
|
|
148
148
|
to: "/",
|
|
149
149
|
class: "inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white transition-colors rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500"
|
|
150
150
|
}, {
|
|
151
|
-
default: F(() => [
|
|
151
|
+
default: F(() => [f(j(Te), { class: "h-4 w-4 text-gray-500 mr-2" }), n[0] ||= d(" Home ", -1)]),
|
|
152
152
|
_: 1
|
|
153
|
-
})]), (
|
|
153
|
+
})]), (S(!0), s(e, null, E(r.value, (e, t) => (S(), s("li", {
|
|
154
154
|
key: t,
|
|
155
155
|
class: "inline-flex items-center",
|
|
156
156
|
style: { "margin-left": "0" }
|
|
157
|
-
}, [
|
|
157
|
+
}, [f(j(fe), { class: "h-4 w-4 text-gray-500" }), f(i, {
|
|
158
158
|
to: e.url,
|
|
159
159
|
class: "ml-1 text-sm font-medium text-gray-700 hover:text-blue-600 md:ml-2 dark:text-gray-400 dark:hover:text-white transition-colors rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500"
|
|
160
160
|
}, {
|
|
161
|
-
default: F(() => [
|
|
161
|
+
default: F(() => [d(A(e.name), 1)]),
|
|
162
162
|
_: 2
|
|
163
163
|
}, 1032, ["to"])]))), 128))])]);
|
|
164
164
|
};
|
|
@@ -167,17 +167,17 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
167
167
|
return e.RED = "RED", e.BLUE = "BLUE", e.WHITE = "WHITE", e.DARK = "DARK", e.GREEN = "GREEN", e.EMERALD = "EMERALD", e.YELLOW = "YELLOW", e.PURPLE = "PURPLE", e.SKY = "SKY", e.GRAY = "GRAY", e.AMBER = "AMBER", e;
|
|
168
168
|
}({}), W = /* @__PURE__ */ function(e) {
|
|
169
169
|
return e.EXTRA_SMALL = "EXTRA_SMALL", e.SMALL = "SMALL", e.BASE = "BASE", e.LARGE = "LARGE", e.EXTRA_LARGE = "EXTRA_LARGE", e;
|
|
170
|
-
}({}),
|
|
170
|
+
}({}), Be = [
|
|
171
171
|
"type",
|
|
172
172
|
"disabled",
|
|
173
173
|
"onClick"
|
|
174
|
-
],
|
|
174
|
+
], Ve = {
|
|
175
175
|
key: 0,
|
|
176
176
|
class: "inline-flex items-center"
|
|
177
|
-
},
|
|
177
|
+
}, He = { key: 1 }, Ue = { key: 2 }, We = ["type", "disabled"], Ge = {
|
|
178
178
|
key: 0,
|
|
179
179
|
class: "inline-flex items-center"
|
|
180
|
-
},
|
|
180
|
+
}, Ke = { key: 1 }, qe = { key: 2 }, Je = /* @__PURE__ */ p({
|
|
181
181
|
__name: "BaseButton",
|
|
182
182
|
props: {
|
|
183
183
|
description: {
|
|
@@ -281,7 +281,7 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
281
281
|
}, r = e[n.color] ?? e[U.BLUE], i = t.value ? r.dark : r.light;
|
|
282
282
|
return n.isDisable || n.isLoading ? `border bg-transparent ${i} opacity-50 cursor-not-allowed` : `focus:outline-none focus-visible:ring-2 focus-visible:ring-current border bg-transparent ${i}`;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function i() {
|
|
285
285
|
let e = {
|
|
286
286
|
[U.BLUE]: {
|
|
287
287
|
light: "text-blue-600 hover:bg-blue-50",
|
|
@@ -333,197 +333,197 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
333
333
|
function l() {
|
|
334
334
|
let e = n.isDisable || n.isLoading, t = "inline-flex items-center transition-colors duration-150";
|
|
335
335
|
e || (t += " cursor-pointer");
|
|
336
|
-
let
|
|
336
|
+
let a;
|
|
337
337
|
switch (n.color) {
|
|
338
338
|
case U.BLUE:
|
|
339
|
-
|
|
339
|
+
a = e ? "text-white bg-blue-400 cursor-not-allowed" : "focus:outline-none text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300";
|
|
340
340
|
break;
|
|
341
341
|
case U.WHITE:
|
|
342
|
-
|
|
342
|
+
a = e ? "text-gray-900 bg-gray-200 border border-gray-200 cursor-not-allowed" : "focus:outline-none text-gray-900 bg-white border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-200";
|
|
343
343
|
break;
|
|
344
344
|
case U.DARK:
|
|
345
|
-
|
|
345
|
+
a = e ? "text-white bg-gray-400 cursor-not-allowed" : "focus:outline-none text-white bg-gray-800 hover:bg-gray-900 focus:ring-4 focus:ring-gray-300";
|
|
346
346
|
break;
|
|
347
347
|
case U.GREEN:
|
|
348
|
-
|
|
348
|
+
a = e ? "text-white bg-green-400 cursor-not-allowed" : "focus:outline-none text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300";
|
|
349
349
|
break;
|
|
350
350
|
case U.EMERALD:
|
|
351
|
-
|
|
351
|
+
a = e ? "text-white bg-emerald-400 cursor-not-allowed" : "focus:outline-none text-white bg-emerald-600 hover:bg-emerald-700 focus:ring-4 focus:ring-emerald-300";
|
|
352
352
|
break;
|
|
353
353
|
case U.RED:
|
|
354
|
-
|
|
354
|
+
a = e ? "text-white bg-red-400 cursor-not-allowed" : "focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300";
|
|
355
355
|
break;
|
|
356
356
|
case U.YELLOW:
|
|
357
|
-
|
|
357
|
+
a = e ? "text-white bg-yellow-300 cursor-not-allowed" : "focus:outline-none text-white bg-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300";
|
|
358
358
|
break;
|
|
359
359
|
case U.PURPLE:
|
|
360
|
-
|
|
360
|
+
a = e ? "text-white bg-purple-400 cursor-not-allowed" : "focus:outline-none text-white bg-purple-700 hover:bg-purple-800 focus:ring-4 focus:ring-purple-300";
|
|
361
361
|
break;
|
|
362
362
|
case U.SKY:
|
|
363
|
-
|
|
363
|
+
a = e ? "text-white bg-sky-400 cursor-not-allowed" : "focus:outline-none text-white bg-sky-600 hover:bg-sky-700 focus:ring-4 focus:ring-sky-300";
|
|
364
364
|
break;
|
|
365
365
|
case U.AMBER:
|
|
366
|
-
|
|
366
|
+
a = e ? "text-white bg-amber-300 cursor-not-allowed" : "focus:outline-none text-white bg-amber-500 hover:bg-amber-600 focus:ring-4 focus:ring-amber-300";
|
|
367
367
|
break;
|
|
368
368
|
case U.GRAY:
|
|
369
|
-
|
|
369
|
+
a = e ? "text-white bg-gray-400 cursor-not-allowed" : "focus:outline-none text-white bg-gray-600 hover:bg-gray-700 focus:ring-4 focus:ring-gray-300";
|
|
370
370
|
break;
|
|
371
371
|
default:
|
|
372
|
-
|
|
372
|
+
a = e ? "text-white bg-blue-400 cursor-not-allowed" : "focus:outline-none text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300";
|
|
373
373
|
break;
|
|
374
374
|
}
|
|
375
|
-
n.outline && (
|
|
376
|
-
let
|
|
375
|
+
n.outline && (a = r()), n.ghost && (a = i());
|
|
376
|
+
let o = "px-5 py-2.5 mr-2 mb-2 text-sm";
|
|
377
377
|
switch (n.size) {
|
|
378
378
|
case W.EXTRA_SMALL:
|
|
379
|
-
|
|
379
|
+
o = "px-3 py-2 text-xs";
|
|
380
380
|
break;
|
|
381
381
|
case W.SMALL:
|
|
382
|
-
|
|
382
|
+
o = "px-3 py-2 text-sm";
|
|
383
383
|
break;
|
|
384
384
|
case W.BASE:
|
|
385
|
-
|
|
385
|
+
o = "px-5 py-2.5 text-sm";
|
|
386
386
|
break;
|
|
387
387
|
case W.LARGE:
|
|
388
|
-
|
|
388
|
+
o = "px-5 py-3 text-base";
|
|
389
389
|
break;
|
|
390
390
|
case W.EXTRA_LARGE:
|
|
391
|
-
|
|
391
|
+
o = "px-6 py-3.5 text-base";
|
|
392
392
|
break;
|
|
393
393
|
}
|
|
394
|
-
let
|
|
395
|
-
return n.isRounded && (
|
|
394
|
+
let s = "rounded-lg";
|
|
395
|
+
return n.isRounded && (s = "rounded-full"), t + " " + o + " " + a + " font-medium " + s;
|
|
396
396
|
}
|
|
397
397
|
return (t, r) => {
|
|
398
|
-
let
|
|
399
|
-
return e.to ? (
|
|
398
|
+
let i = O("router-link");
|
|
399
|
+
return e.to ? (S(), a(i, {
|
|
400
400
|
key: 0,
|
|
401
401
|
to: e.to,
|
|
402
402
|
custom: ""
|
|
403
403
|
}, {
|
|
404
|
-
default: F(({ navigate: i }) => [
|
|
404
|
+
default: F(({ navigate: i }) => [c("button", {
|
|
405
405
|
type: n.type,
|
|
406
|
-
class:
|
|
406
|
+
class: g(l()),
|
|
407
407
|
disabled: e.isDisable || e.isLoading,
|
|
408
408
|
onClick: i
|
|
409
409
|
}, [
|
|
410
|
-
e.isLoading ? (
|
|
410
|
+
e.isLoading ? (S(), s("div", Ve, [...r[0] ||= [c("svg", {
|
|
411
411
|
"aria-hidden": "true",
|
|
412
412
|
role: "status",
|
|
413
413
|
class: "inline w-4 h-4 me-3 animate-spin",
|
|
414
414
|
viewBox: "0 0 100 101",
|
|
415
415
|
fill: "none",
|
|
416
416
|
xmlns: "http://www.w3.org/2000/svg"
|
|
417
|
-
}, [
|
|
417
|
+
}, [c("path", {
|
|
418
418
|
d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
|
|
419
419
|
fill: "#E5E7EB"
|
|
420
|
-
}),
|
|
420
|
+
}), c("path", {
|
|
421
421
|
d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
|
|
422
422
|
fill: "currentColor"
|
|
423
|
-
})], -1)]])) :
|
|
424
|
-
e.iconLeft ?
|
|
425
|
-
|
|
426
|
-
e.iconLeft ? (
|
|
427
|
-
], 10,
|
|
423
|
+
})], -1)]])) : o("", !0),
|
|
424
|
+
e.iconLeft ? o("", !0) : (S(), s("span", He, A(e.description), 1)),
|
|
425
|
+
D(t.$slots, "default"),
|
|
426
|
+
e.iconLeft ? (S(), s("span", Ue, A(e.description), 1)) : o("", !0)
|
|
427
|
+
], 10, Be)]),
|
|
428
428
|
_: 3
|
|
429
|
-
}, 8, ["to"])) : (
|
|
429
|
+
}, 8, ["to"])) : (S(), s("button", {
|
|
430
430
|
key: 1,
|
|
431
431
|
type: n.type,
|
|
432
|
-
class:
|
|
432
|
+
class: g(l()),
|
|
433
433
|
disabled: e.isDisable || e.isLoading
|
|
434
434
|
}, [
|
|
435
|
-
e.isLoading ? (
|
|
435
|
+
e.isLoading ? (S(), s("div", Ge, [...r[1] ||= [c("svg", {
|
|
436
436
|
"aria-hidden": "true",
|
|
437
437
|
role: "status",
|
|
438
438
|
class: "inline w-4 h-4 me-3 animate-spin",
|
|
439
439
|
viewBox: "0 0 100 101",
|
|
440
440
|
fill: "none",
|
|
441
441
|
xmlns: "http://www.w3.org/2000/svg"
|
|
442
|
-
}, [
|
|
442
|
+
}, [c("path", {
|
|
443
443
|
d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
|
|
444
444
|
fill: "#E5E7EB"
|
|
445
|
-
}),
|
|
445
|
+
}), c("path", {
|
|
446
446
|
d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
|
|
447
447
|
fill: "currentColor"
|
|
448
|
-
})], -1)]])) :
|
|
449
|
-
e.iconLeft ?
|
|
450
|
-
|
|
451
|
-
e.iconLeft ? (
|
|
452
|
-
], 10,
|
|
448
|
+
})], -1)]])) : o("", !0),
|
|
449
|
+
e.iconLeft ? o("", !0) : (S(), s("span", Ke, A(e.description), 1)),
|
|
450
|
+
D(t.$slots, "default"),
|
|
451
|
+
e.iconLeft ? (S(), s("span", qe, A(e.description), 1)) : o("", !0)
|
|
452
|
+
], 10, We));
|
|
453
453
|
};
|
|
454
454
|
}
|
|
455
|
-
}),
|
|
455
|
+
}), Ye = /* @__PURE__ */ function(e) {
|
|
456
456
|
return e.BASE = "BASE", e.BASE_SHORTER = "BASE_SHORTER", e.SQUARE = "SQUARE", e;
|
|
457
|
-
}({}),
|
|
457
|
+
}({}), Xe = {
|
|
458
458
|
key: 0,
|
|
459
459
|
class: "h-px my-8 bg-gray-200 border-0 dark:bg-gray-700"
|
|
460
|
-
},
|
|
460
|
+
}, Ze = {
|
|
461
461
|
key: 1,
|
|
462
462
|
class: "w-48 h-1 mx-auto my-4 bg-gray-100 border-0 rounded md:my-10 dark:bg-gray-700"
|
|
463
|
-
},
|
|
463
|
+
}, Qe = {
|
|
464
464
|
key: 2,
|
|
465
465
|
class: "w-8 h-8 mx-auto my-8 bg-gray-200 border-0 rounded md:my-12 dark:bg-gray-700"
|
|
466
|
-
},
|
|
466
|
+
}, $e = /* @__PURE__ */ p({
|
|
467
467
|
__name: "BaseLine",
|
|
468
468
|
props: { mode: {
|
|
469
469
|
type: String,
|
|
470
470
|
required: !1,
|
|
471
|
-
default:
|
|
471
|
+
default: Ye.BASE
|
|
472
472
|
} },
|
|
473
473
|
setup(t) {
|
|
474
|
-
return (n, r) => (
|
|
475
|
-
t.mode ===
|
|
476
|
-
t.mode ===
|
|
477
|
-
t.mode ===
|
|
474
|
+
return (n, r) => (S(), s(e, null, [
|
|
475
|
+
t.mode === j(Ye).BASE ? (S(), s("hr", Xe)) : o("", !0),
|
|
476
|
+
t.mode === j(Ye).BASE_SHORTER ? (S(), s("hr", Ze)) : o("", !0),
|
|
477
|
+
t.mode === j(Ye).SQUARE ? (S(), s("hr", Qe)) : o("", !0)
|
|
478
478
|
], 64));
|
|
479
479
|
}
|
|
480
|
-
}),
|
|
480
|
+
}), G = /* @__PURE__ */ function(e) {
|
|
481
481
|
return e.SMALL = "SMALL", e.MEDIUM = "MEDIUM", e.LARGE = "LARGE", e;
|
|
482
|
-
}({}),
|
|
482
|
+
}({}), et = G, tt = ["height", "width"], nt = /* @__PURE__ */ p({
|
|
483
483
|
__name: "BaseLogo",
|
|
484
484
|
props: { size: {
|
|
485
485
|
type: String,
|
|
486
486
|
required: !1,
|
|
487
|
-
default:
|
|
487
|
+
default: G.MEDIUM
|
|
488
488
|
} },
|
|
489
489
|
setup(e) {
|
|
490
490
|
let t = e;
|
|
491
491
|
function n() {
|
|
492
492
|
let e = "";
|
|
493
493
|
switch (t.size) {
|
|
494
|
-
case
|
|
494
|
+
case G.SMALL:
|
|
495
495
|
e = "50px";
|
|
496
496
|
break;
|
|
497
|
-
case
|
|
497
|
+
case G.MEDIUM:
|
|
498
498
|
e = "100px";
|
|
499
499
|
break;
|
|
500
|
-
case
|
|
500
|
+
case G.LARGE:
|
|
501
501
|
e = "150px";
|
|
502
502
|
break;
|
|
503
503
|
}
|
|
504
504
|
return e;
|
|
505
505
|
}
|
|
506
506
|
return (e, t) => {
|
|
507
|
-
let r =
|
|
508
|
-
return
|
|
507
|
+
let r = O("router-link");
|
|
508
|
+
return S(), a(r, {
|
|
509
509
|
to: "/",
|
|
510
510
|
class: "flex items-center mb-6 text-2xl font-semibold text-gray-900 dark:text-white"
|
|
511
511
|
}, {
|
|
512
|
-
default: F(() => [(
|
|
512
|
+
default: F(() => [(S(), s("svg", {
|
|
513
513
|
height: n(),
|
|
514
514
|
width: n(),
|
|
515
515
|
viewBox: "33.6 130.6 499.7 242.9",
|
|
516
516
|
xmlns: "http://www.w3.org/2000/svg",
|
|
517
517
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
518
518
|
}, [...t[0] ||= [
|
|
519
|
-
|
|
519
|
+
c("linearGradient", { id: "a" }, [c("stop", {
|
|
520
520
|
offset: ".085",
|
|
521
521
|
"stop-color": "#469e43"
|
|
522
|
-
}),
|
|
522
|
+
}), c("stop", {
|
|
523
523
|
offset: "1",
|
|
524
524
|
"stop-color": "#132d13"
|
|
525
525
|
})], -1),
|
|
526
|
-
|
|
526
|
+
c("linearGradient", {
|
|
527
527
|
id: "b",
|
|
528
528
|
gradientUnits: "userSpaceOnUse",
|
|
529
529
|
x1: "64.863",
|
|
@@ -532,7 +532,7 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
532
532
|
y1: "288.291",
|
|
533
533
|
y2: "369.4"
|
|
534
534
|
}, null, -1),
|
|
535
|
-
|
|
535
|
+
c("linearGradient", {
|
|
536
536
|
id: "c",
|
|
537
537
|
gradientUnits: "userSpaceOnUse",
|
|
538
538
|
x1: "138.367",
|
|
@@ -541,7 +541,7 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
541
541
|
y1: "308.454",
|
|
542
542
|
y2: "370.601"
|
|
543
543
|
}, null, -1),
|
|
544
|
-
|
|
544
|
+
c("linearGradient", {
|
|
545
545
|
id: "d",
|
|
546
546
|
gradientUnits: "userSpaceOnUse",
|
|
547
547
|
x1: "195.475",
|
|
@@ -550,7 +550,7 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
550
550
|
y1: "288.291",
|
|
551
551
|
y2: "369.85"
|
|
552
552
|
}, null, -1),
|
|
553
|
-
|
|
553
|
+
c("linearGradient", {
|
|
554
554
|
id: "e",
|
|
555
555
|
gradientUnits: "userSpaceOnUse",
|
|
556
556
|
x1: "249.634",
|
|
@@ -559,7 +559,7 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
559
559
|
y1: "307.312",
|
|
560
560
|
y2: "369.511"
|
|
561
561
|
}, null, -1),
|
|
562
|
-
|
|
562
|
+
c("linearGradient", {
|
|
563
563
|
id: "f",
|
|
564
564
|
gradientUnits: "userSpaceOnUse",
|
|
565
565
|
x1: "302.884",
|
|
@@ -568,7 +568,7 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
568
568
|
y1: "288.291",
|
|
569
569
|
y2: "367.857"
|
|
570
570
|
}, null, -1),
|
|
571
|
-
|
|
571
|
+
c("linearGradient", {
|
|
572
572
|
id: "g",
|
|
573
573
|
gradientUnits: "userSpaceOnUse",
|
|
574
574
|
x1: "354.118",
|
|
@@ -577,7 +577,7 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
577
577
|
y1: "307.312",
|
|
578
578
|
y2: "369.511"
|
|
579
579
|
}, null, -1),
|
|
580
|
-
|
|
580
|
+
c("linearGradient", {
|
|
581
581
|
id: "h",
|
|
582
582
|
gradientUnits: "userSpaceOnUse",
|
|
583
583
|
x1: "428.02",
|
|
@@ -586,7 +586,7 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
586
586
|
y1: "306.156",
|
|
587
587
|
y2: "367.742"
|
|
588
588
|
}, null, -1),
|
|
589
|
-
|
|
589
|
+
c("linearGradient", {
|
|
590
590
|
id: "i",
|
|
591
591
|
gradientUnits: "userSpaceOnUse",
|
|
592
592
|
x1: "502.066",
|
|
@@ -595,7 +595,7 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
595
595
|
y1: "288.291",
|
|
596
596
|
y2: "369.4"
|
|
597
597
|
}, null, -1),
|
|
598
|
-
|
|
598
|
+
c("linearGradient", {
|
|
599
599
|
id: "j",
|
|
600
600
|
gradientUnits: "userSpaceOnUse",
|
|
601
601
|
x1: "283.264",
|
|
@@ -604,78 +604,78 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
604
604
|
y1: "131.629",
|
|
605
605
|
y2: "232.559"
|
|
606
606
|
}, null, -1),
|
|
607
|
-
|
|
607
|
+
c("linearGradient", {
|
|
608
608
|
id: "k",
|
|
609
609
|
gradientUnits: "userSpaceOnUse",
|
|
610
610
|
x1: "283.46",
|
|
611
611
|
x2: "283.46",
|
|
612
612
|
y1: "202.275",
|
|
613
613
|
y2: "183.785"
|
|
614
|
-
}, [
|
|
614
|
+
}, [c("stop", {
|
|
615
615
|
offset: "0",
|
|
616
616
|
"stop-color": "#969799",
|
|
617
617
|
"stop-opacity": "0"
|
|
618
|
-
}),
|
|
618
|
+
}), c("stop", {
|
|
619
619
|
offset: "1",
|
|
620
620
|
"stop-color": "#808183"
|
|
621
621
|
})], -1),
|
|
622
|
-
|
|
622
|
+
c("path", {
|
|
623
623
|
d: "m65 307.2c-6.8 0-13.1 2.2-18.2 5.9v-24.8h-13.2v81.1h31.4c17.2 0 31.1-13.9 31.1-31.1s-13.9-31.1-31.1-31.1zm0 49.3h-18.2v-18.2c0-10.1 8.2-18.2 18.2-18.2 10.1 0 18.2 8.2 18.2 18.2.1 10.1-8.1 18.2-18.2 18.2z",
|
|
624
624
|
fill: "url(#b)"
|
|
625
625
|
}, null, -1),
|
|
626
|
-
|
|
626
|
+
c("path", {
|
|
627
627
|
d: "m168.8 343.9h-46.7c1.4 7.1 6.6 12 14.1 12.7 6.4.6 12.9.1 19.9.1v11.9c-15.2 4.9-33.3.5-42.1-10.4-3.8-4.7-17.3-34.7 11.5-47.4 39-11.4 45.3 22.4 43.3 33.1zm-14.2-12.7c-1.7-8.1-8.8-12.9-17.9-12.3-7.6.5-14 5.8-14.5 12.3z",
|
|
628
628
|
fill: "url(#c)"
|
|
629
629
|
}, null, -1),
|
|
630
|
-
|
|
630
|
+
c("path", {
|
|
631
631
|
d: "m195.5 320.2c0 10.5-.2 20 .1 29.6.2 5.8 4.4 8.4 13.2 8.6v10.5c-13.8 3.9-26.2-4.5-26.4-18-.2-18.7-.1-43.9-.1-62.6h14.1l-.3 18.5 12.7-.1v13.4h-13.3z",
|
|
632
632
|
fill: "url(#d)"
|
|
633
633
|
}, null, -1),
|
|
634
|
-
|
|
634
|
+
c("path", {
|
|
635
635
|
d: "m249.6 307.3c-17.2 0-31.1 13.9-31.1 31.1s13.9 31.1 31.1 31.1h31.1v-31.1c0-17.2-13.9-31.1-31.1-31.1zm18.6 49.7h-18.5c-10.2 0-18.5-8.3-18.5-18.5s8.3-18.5 18.5-18.5 18.5 8.3 18.5 18.5z",
|
|
636
636
|
fill: "url(#e)"
|
|
637
637
|
}, null, -1),
|
|
638
|
-
|
|
638
|
+
c("path", {
|
|
639
639
|
d: "m296.4 288.3h13v79.6h-13z",
|
|
640
640
|
fill: "url(#f)"
|
|
641
641
|
}, null, -1),
|
|
642
|
-
|
|
642
|
+
c("path", {
|
|
643
643
|
d: "m354.1 307.3c-17.2 0-31.1 13.9-31.1 31.1s13.9 31.1 31.1 31.1h31.1v-31.1c0-17.2-13.9-31.1-31.1-31.1zm18.6 49.7h-18.5c-10.2 0-18.5-8.3-18.5-18.5s8.3-18.5 18.5-18.5 18.5 8.3 18.5 18.5z",
|
|
644
644
|
fill: "url(#g)"
|
|
645
645
|
}, null, -1),
|
|
646
|
-
|
|
646
|
+
c("path", {
|
|
647
647
|
d: "m442.2 367.7c0-12.3.2-23.6 0-34.9-.2-3.4-3.6-13.8-14.1-13.4-10.3-.3-14.4 10-14.3 12.7.1 10.2.5 35.1.5 35.1l-13.6.1s-.3-25.7.2-36.2c.6-14.1 12.7-25 27.5-25 14.7 0 26.2 10.4 26.7 24.9.4 10.4.5 36.3.5 36.3z",
|
|
648
648
|
fill: "url(#h)"
|
|
649
649
|
}, null, -1),
|
|
650
|
-
|
|
650
|
+
c("path", {
|
|
651
651
|
d: "m501.9 307.2c6.8 0 13.1 2.2 18.2 5.9v-24.8h13.2v81.1h-31.4c-17.2 0-31.1-13.9-31.1-31.1s13.9-31.1 31.1-31.1zm0 49.3h18.2v-18.2c0-10.1-8.2-18.2-18.2-18.2-10.1 0-18.2 8.2-18.2 18.2 0 10.1 8.1 18.2 18.2 18.2z",
|
|
652
652
|
fill: "url(#i)"
|
|
653
653
|
}, null, -1),
|
|
654
|
-
|
|
654
|
+
c("path", {
|
|
655
655
|
d: "m309.2 180.6h-24v-24c0-12.6 10.2-24.1 22.8-25 14.8-1 27.1 11.3 26.1 26.1-.8 12.7-12.3 22.9-24.9 22.9zm-50.7-48.9c-14.8-1-27.1 11.3-26.1 26.1.8 12.6 12.4 22.8 25 22.8h23.9v-24c0-12.6-10.3-24.1-22.8-24.9zm50.7 51.9h-24v23.9c0 12.6 10.2 24.1 22.8 25 14.8 1 27.1-11.3 26.1-26.1-.8-12.6-12.3-22.8-24.9-22.8zm-52.4 0c-14 0-25.3 11.8-24.4 26 .8 12.2 10.7 22.1 22.9 22.9 14.2.9 26-10.4 26-24.4v-24.5z",
|
|
656
656
|
fill: "url(#j)"
|
|
657
657
|
}, null, -1),
|
|
658
|
-
|
|
658
|
+
c("path", {
|
|
659
659
|
d: "m281.7 183.8h3.6v18.5h-3.6z",
|
|
660
660
|
fill: "url(#k)"
|
|
661
661
|
}, null, -1)
|
|
662
|
-
]], 8,
|
|
662
|
+
]], 8, tt))]),
|
|
663
663
|
_: 1
|
|
664
664
|
});
|
|
665
665
|
};
|
|
666
666
|
}
|
|
667
|
-
}),
|
|
667
|
+
}), rt = /* @__PURE__ */ function(e) {
|
|
668
668
|
return e.DELETE = "DELETE", e.SUCCESS = "SUCCESS", e;
|
|
669
|
-
}({}),
|
|
669
|
+
}({}), it = {
|
|
670
670
|
key: 0,
|
|
671
671
|
class: "p-6 text-center"
|
|
672
|
-
},
|
|
672
|
+
}, at = { class: "flex justify-center" }, ot = {
|
|
673
673
|
key: 1,
|
|
674
674
|
class: "p-6 text-center"
|
|
675
|
-
},
|
|
675
|
+
}, st = {
|
|
676
676
|
key: 0,
|
|
677
677
|
class: "mb-5 text-sm text-gray-500"
|
|
678
|
-
},
|
|
678
|
+
}, ct = { class: "flex justify-center" }, lt = /* @__PURE__ */ p({
|
|
679
679
|
__name: "BaseModal",
|
|
680
680
|
props: {
|
|
681
681
|
title: {
|
|
@@ -694,58 +694,58 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
694
694
|
mode: {
|
|
695
695
|
type: String,
|
|
696
696
|
required: !1,
|
|
697
|
-
default:
|
|
697
|
+
default: rt.SUCCESS
|
|
698
698
|
}
|
|
699
699
|
},
|
|
700
700
|
emits: ["closeModal", "confirmModal"],
|
|
701
701
|
setup(t, { emit: n }) {
|
|
702
702
|
let r = n, i = `modal-title-${Math.random().toString(36).slice(2, 9)}`;
|
|
703
|
-
function
|
|
703
|
+
function a(e) {
|
|
704
704
|
e.key === "Escape" && r("closeModal");
|
|
705
705
|
}
|
|
706
|
-
return
|
|
707
|
-
document.addEventListener("keydown",
|
|
708
|
-
}),
|
|
709
|
-
document.removeEventListener("keydown",
|
|
710
|
-
}), (n, r) => (
|
|
706
|
+
return y(() => {
|
|
707
|
+
document.addEventListener("keydown", a);
|
|
708
|
+
}), x(() => {
|
|
709
|
+
document.removeEventListener("keydown", a);
|
|
710
|
+
}), (n, r) => (S(), s(e, null, [c("div", {
|
|
711
711
|
class: "fixed inset-0 w-full h-screen bg-black/75 z-40",
|
|
712
712
|
onClick: r[0] ||= (e) => n.$emit("closeModal")
|
|
713
|
-
}),
|
|
713
|
+
}), c("div", {
|
|
714
714
|
class: "fixed top-[20vh] left-1/2 -translate-x-1/2 w-96 z-50 rounded-xl shadow-lg bg-white overflow-hidden",
|
|
715
715
|
role: "dialog",
|
|
716
716
|
"aria-modal": "true",
|
|
717
717
|
"aria-labelledby": i
|
|
718
|
-
}, [t.mode ===
|
|
719
|
-
|
|
720
|
-
|
|
718
|
+
}, [t.mode === j(rt).DELETE ? (S(), s("div", it, [
|
|
719
|
+
f(j(ge), { class: "w-12 h-12 text-gray-400 mx-auto mb-4" }),
|
|
720
|
+
c("h3", {
|
|
721
721
|
id: i,
|
|
722
722
|
class: "mb-5 text-lg font-normal text-gray-500 dark:text-gray-400"
|
|
723
|
-
}, " Are you sure you want to delete this " +
|
|
724
|
-
|
|
725
|
-
color:
|
|
723
|
+
}, " Are you sure you want to delete this " + A(t.title) + "? ", 1),
|
|
724
|
+
c("div", at, [f(Je, {
|
|
725
|
+
color: j(U).RED,
|
|
726
726
|
onClick: r[1] ||= (e) => n.$emit("confirmModal"),
|
|
727
727
|
description: "Yes, I'm sure"
|
|
728
|
-
}, null, 8, ["color"]),
|
|
729
|
-
color:
|
|
728
|
+
}, null, 8, ["color"]), f(Je, {
|
|
729
|
+
color: j(U).WHITE,
|
|
730
730
|
onClick: r[2] ||= (e) => n.$emit("closeModal"),
|
|
731
731
|
description: "No, cancel"
|
|
732
732
|
}, null, 8, ["color"])])
|
|
733
|
-
])) : (
|
|
734
|
-
|
|
735
|
-
|
|
733
|
+
])) : (S(), s("div", ot, [
|
|
734
|
+
f(j(ce), { class: "w-12 h-12 text-green-500 mx-auto mb-4" }),
|
|
735
|
+
c("h3", {
|
|
736
736
|
id: i,
|
|
737
737
|
class: "mb-2 text-lg font-medium text-gray-900"
|
|
738
|
-
},
|
|
739
|
-
t.description ? (
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
color:
|
|
738
|
+
}, A(t.title), 1),
|
|
739
|
+
t.description ? (S(), s("p", st, A(t.description), 1)) : o("", !0),
|
|
740
|
+
D(n.$slots, "default"),
|
|
741
|
+
c("div", ct, [f(Je, {
|
|
742
|
+
color: j(U).BLUE,
|
|
743
743
|
onClick: r[3] ||= (e) => n.$emit("closeModal"),
|
|
744
744
|
description: "OK"
|
|
745
745
|
}, null, 8, ["color"])])
|
|
746
746
|
]))])], 64));
|
|
747
747
|
}
|
|
748
|
-
}),
|
|
748
|
+
}), ut = /* @__PURE__ */ p({
|
|
749
749
|
__name: "BaseRow",
|
|
750
750
|
props: { bgColor: {
|
|
751
751
|
type: String,
|
|
@@ -757,21 +757,21 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
757
757
|
function n() {
|
|
758
758
|
return "block p-8 border border-gray-200 rounded-xl shadow-sm dark:bg-gray-800 dark:border-gray-700 " + t.bgColor;
|
|
759
759
|
}
|
|
760
|
-
return (e, t) => (
|
|
760
|
+
return (e, t) => (S(), s("div", { class: g(n()) }, [D(e.$slots, "default")], 2));
|
|
761
761
|
}
|
|
762
|
-
}),
|
|
762
|
+
}), dt = /* @__PURE__ */ p({
|
|
763
763
|
__name: "BaseSpinner",
|
|
764
764
|
props: {
|
|
765
765
|
size: { default: "sm" },
|
|
766
766
|
color: { default: "blue" }
|
|
767
767
|
},
|
|
768
768
|
setup(e) {
|
|
769
|
-
let t = e, n =
|
|
769
|
+
let t = e, n = i(() => ({
|
|
770
770
|
sm: "w-4 h-4 border-2",
|
|
771
771
|
md: "w-6 h-6 border-2",
|
|
772
772
|
lg: "w-8 h-8 border-4",
|
|
773
773
|
xl: "w-12 h-12 border-4"
|
|
774
|
-
})[t.size]),
|
|
774
|
+
})[t.size]), r = i(() => ({
|
|
775
775
|
blue: "border-t-blue-500",
|
|
776
776
|
emerald: "border-t-emerald-500",
|
|
777
777
|
sky: "border-t-sky-500",
|
|
@@ -781,17 +781,17 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
781
781
|
red: "border-t-red-500",
|
|
782
782
|
amber: "border-t-amber-500"
|
|
783
783
|
})[t.color]);
|
|
784
|
-
return (e, t) => (
|
|
785
|
-
class:
|
|
784
|
+
return (e, t) => (S(), s("div", {
|
|
785
|
+
class: g(["border-gray-200 rounded-full animate-spin", [n.value, r.value]]),
|
|
786
786
|
role: "status",
|
|
787
787
|
"aria-label": "Loading"
|
|
788
788
|
}, null, 2));
|
|
789
789
|
}
|
|
790
|
-
}),
|
|
790
|
+
}), K = /* @__PURE__ */ function(e) {
|
|
791
791
|
return e.SUCCESS = "SUCCESS", e.WARNING = "WARNING", e.ERROR = "ERROR", e;
|
|
792
|
-
}({}),
|
|
792
|
+
}({}), q = /* @__PURE__ */ function(e) {
|
|
793
793
|
return e.TOP_LEFT = "TOP_LEFT", e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e.BOTTOM_RIGHT = "BOTTOM_RIGHT", e;
|
|
794
|
-
}({}),
|
|
794
|
+
}({}), ft = { class: "flex items-center w-full max-w-md p-4 mb-4 text-gray-500 bg-white rounded-lg shadow dark:text-gray-400 dark:bg-gray-800" }, pt = { class: "ml-3 text-sm font-normal" }, mt = /* @__PURE__ */ p({
|
|
795
795
|
__name: "BaseToast",
|
|
796
796
|
props: {
|
|
797
797
|
mode: {
|
|
@@ -810,7 +810,7 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
810
810
|
positioning: {
|
|
811
811
|
type: String,
|
|
812
812
|
required: !1,
|
|
813
|
-
default:
|
|
813
|
+
default: q.TOP_RIGHT
|
|
814
814
|
},
|
|
815
815
|
duration: {
|
|
816
816
|
type: Number,
|
|
@@ -819,25 +819,25 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
819
819
|
}
|
|
820
820
|
},
|
|
821
821
|
setup(e) {
|
|
822
|
-
let t = e, n =
|
|
822
|
+
let t = e, n = T(!0), r = null;
|
|
823
823
|
function i() {
|
|
824
824
|
n.value = !1, r &&= (clearTimeout(r), null);
|
|
825
825
|
}
|
|
826
|
-
|
|
826
|
+
y(() => {
|
|
827
827
|
r = setTimeout(() => n.value = !1, t.duration);
|
|
828
|
-
}),
|
|
828
|
+
}), x(() => {
|
|
829
829
|
r && clearTimeout(r);
|
|
830
830
|
});
|
|
831
|
-
function
|
|
831
|
+
function a() {
|
|
832
832
|
let e = "";
|
|
833
833
|
switch (t.mode) {
|
|
834
|
-
case
|
|
834
|
+
case K.ERROR:
|
|
835
835
|
e = "text-red-500 bg-red-100 dark:bg-red-800 dark:text-red-200";
|
|
836
836
|
break;
|
|
837
|
-
case
|
|
837
|
+
case K.SUCCESS:
|
|
838
838
|
e = "text-green-500 bg-green-100 dark:bg-green-800 dark:text-green-200";
|
|
839
839
|
break;
|
|
840
|
-
case
|
|
840
|
+
case K.WARNING:
|
|
841
841
|
e = "text-orange-500 bg-orange-100 dark:bg-orange-700 dark:text-orange-200";
|
|
842
842
|
break;
|
|
843
843
|
default:
|
|
@@ -849,48 +849,48 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
849
849
|
function l() {
|
|
850
850
|
let e = "top-5 right-5";
|
|
851
851
|
switch (t.positioning) {
|
|
852
|
-
case
|
|
852
|
+
case q.BOTTOM_LEFT:
|
|
853
853
|
e = "bottom-5 left-5";
|
|
854
854
|
break;
|
|
855
|
-
case
|
|
855
|
+
case q.TOP_LEFT:
|
|
856
856
|
e = "top-5 left-5";
|
|
857
857
|
break;
|
|
858
|
-
case
|
|
858
|
+
case q.TOP_RIGHT:
|
|
859
859
|
e = "top-5 right-5";
|
|
860
860
|
break;
|
|
861
|
-
case
|
|
861
|
+
case q.BOTTOM_RIGHT:
|
|
862
862
|
e = "bottom-5 right-5";
|
|
863
863
|
break;
|
|
864
864
|
}
|
|
865
865
|
return "fixed flex items-center w-full max-w-md p-4 space-x-4 divide-x rounded-lg " + e;
|
|
866
866
|
}
|
|
867
|
-
return (t, r) => n.value ? (
|
|
867
|
+
return (t, r) => n.value ? (S(), s("div", {
|
|
868
868
|
key: 0,
|
|
869
869
|
id: "toast-top-right",
|
|
870
|
-
class:
|
|
870
|
+
class: g(l()),
|
|
871
871
|
role: "alert"
|
|
872
|
-
}, [
|
|
873
|
-
e.mode ==
|
|
872
|
+
}, [c("div", ft, [
|
|
873
|
+
e.mode == j(K).ERROR ? (S(), s("div", {
|
|
874
874
|
key: 0,
|
|
875
|
-
class:
|
|
876
|
-
}, [
|
|
875
|
+
class: g(a())
|
|
876
|
+
}, [f(j(ge), { class: "h-6 w-6 text-red-500" }), r[0] ||= c("span", { class: "sr-only" }, "Error icon", -1)], 2)) : e.mode == j(K).SUCCESS ? (S(), s("div", {
|
|
877
877
|
key: 1,
|
|
878
|
-
class:
|
|
879
|
-
}, [
|
|
878
|
+
class: g(a())
|
|
879
|
+
}, [f(j(ce), { class: "h-6 w-6 text-green-500" }), r[1] ||= c("span", { class: "sr-only" }, "Check icon", -1)], 2)) : e.mode == j(K).WARNING ? (S(), s("div", {
|
|
880
880
|
key: 2,
|
|
881
|
-
class:
|
|
882
|
-
}, [
|
|
883
|
-
|
|
884
|
-
e.hasCloseIcon ? (
|
|
881
|
+
class: g(a())
|
|
882
|
+
}, [f(j(_e), { class: "h-6 w-6 text-yellow-500" }), r[2] ||= c("span", { class: "sr-only" }, "Warning icon", -1)], 2)) : o("", !0),
|
|
883
|
+
c("div", pt, A(e.description), 1),
|
|
884
|
+
e.hasCloseIcon ? (S(), s("button", {
|
|
885
885
|
key: 3,
|
|
886
886
|
type: "button",
|
|
887
887
|
class: "ml-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex items-center justify-center h-8 w-8 dark:text-gray-500 dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700 cursor-pointer",
|
|
888
888
|
"aria-label": "Close",
|
|
889
889
|
onClick: i
|
|
890
|
-
}, [r[3] ||=
|
|
891
|
-
])], 2)) :
|
|
890
|
+
}, [r[3] ||= c("span", { class: "sr-only" }, "Close", -1), f(j(we), { class: "h-6 w-6 text-gray-500" })])) : o("", !0)
|
|
891
|
+
])], 2)) : o("", !0);
|
|
892
892
|
}
|
|
893
|
-
}),
|
|
893
|
+
}), ht = { class: "w-13" }, gt = /* @__PURE__ */ p({
|
|
894
894
|
__name: "ColoredSquares",
|
|
895
895
|
props: { color: {
|
|
896
896
|
type: String,
|
|
@@ -907,7 +907,7 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
907
907
|
"bg-yellow-300",
|
|
908
908
|
"bg-purple-300",
|
|
909
909
|
"bg-pink-300"
|
|
910
|
-
], r =
|
|
910
|
+
], r = T(n[Math.floor(Math.random() * n.length)]);
|
|
911
911
|
function i() {
|
|
912
912
|
let e = "gray";
|
|
913
913
|
switch (t.color) {
|
|
@@ -927,9 +927,9 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
927
927
|
}
|
|
928
928
|
return "font-bold text-xs mr-2 px-2.5 py-0.5 rounded-full bg-" + e + "-100 text-" + e + "-800";
|
|
929
929
|
}
|
|
930
|
-
return (e, t) => (
|
|
930
|
+
return (e, t) => (S(), s("div", ht, [c("div", { class: g(["border border-gray-300 relative aspect-square rounded-lg bg-white shadow-sm overflow-hidden flex items-center justify-center text-center", i()]) }, [D(e.$slots, "default"), c("div", { class: g(["absolute bottom-0 left-0 h-1 w-full", r.value]) }, null, 2)], 2)]));
|
|
931
931
|
}
|
|
932
|
-
}),
|
|
932
|
+
}), _t = { class: "flex items-start justify-between" }, vt = { class: "min-w-0" }, yt = /* @__PURE__ */ p({
|
|
933
933
|
__name: "EarningsCard",
|
|
934
934
|
props: {
|
|
935
935
|
title: { default: "TOTAL EARNINGS" },
|
|
@@ -949,7 +949,7 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
949
949
|
}
|
|
950
950
|
},
|
|
951
951
|
setup(t) {
|
|
952
|
-
let n = t,
|
|
952
|
+
let n = t, r = {
|
|
953
953
|
orange: {
|
|
954
954
|
border: "border-orange-300 dark:border-orange-700",
|
|
955
955
|
badge: "bg-orange-100 text-orange-500 dark:bg-orange-900/40 dark:text-orange-400",
|
|
@@ -974,34 +974,34 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
974
974
|
iconBox: "bg-red-50 dark:bg-red-900/30",
|
|
975
975
|
icon: "text-red-500"
|
|
976
976
|
}
|
|
977
|
-
},
|
|
977
|
+
}, a = i(() => {
|
|
978
978
|
let e = Number(n.amount);
|
|
979
979
|
return Number.isFinite(e) ? e : 0;
|
|
980
|
-
}), l =
|
|
980
|
+
}), l = i(() => n.signed && a.value < 0), u = i(() => l.value ? "red" : n.accent), d = i(() => r[u.value]), f = i(() => n.currency + a.value.toLocaleString("en-US", {
|
|
981
981
|
minimumFractionDigits: n.decimals,
|
|
982
982
|
maximumFractionDigits: n.decimals
|
|
983
983
|
}));
|
|
984
|
-
return (n, r) => (
|
|
984
|
+
return (n, r) => (S(), s("div", { class: g(["relative rounded-xl border-2 border-dashed bg-white dark:bg-slate-800", [d.value.border, t.compact ? "p-3" : "p-6"]]) }, [t.badge ? (S(), s("div", {
|
|
985
985
|
key: 0,
|
|
986
|
-
class:
|
|
987
|
-
},
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
]),
|
|
992
|
-
class:
|
|
986
|
+
class: g(["absolute right-4 top-4 rounded-md px-3 py-1 text-xs font-bold tracking-wide", d.value.badge])
|
|
987
|
+
}, A(t.badge), 3)) : o("", !0), c("div", _t, [c("div", vt, [
|
|
988
|
+
c("p", { class: g(["font-bold tracking-wide text-gray-800 dark:text-slate-200", t.compact ? "pr-8 text-xs" : "text-sm"]) }, A(t.title), 3),
|
|
989
|
+
c("p", { class: g(["mt-1 font-bold truncate", [d.value.amount, t.compact ? "text-lg" : "text-4xl"]]) }, A(f.value), 3),
|
|
990
|
+
c("p", { class: g(["mt-1 font-medium", [d.value.subtitle, t.compact ? "text-xs" : "text-sm"]]) }, A(t.subtitle), 3)
|
|
991
|
+
]), c("div", { class: g(["flex items-center justify-center", [d.value.iconBox, t.compact ? "absolute right-2 top-2 h-6 w-6 rounded-lg" : "mt-6 h-12 w-12 rounded-xl"]]) }, [(S(), s("svg", {
|
|
992
|
+
class: g([d.value.icon, t.compact ? "h-3.5 w-3.5" : "h-6 w-6"]),
|
|
993
993
|
viewBox: "0 0 24 24",
|
|
994
994
|
fill: "none",
|
|
995
995
|
stroke: "currentColor",
|
|
996
996
|
"stroke-width": "2.5",
|
|
997
997
|
"stroke-linecap": "round",
|
|
998
998
|
"stroke-linejoin": "round"
|
|
999
|
-
}, [l.value ? (
|
|
999
|
+
}, [l.value ? (S(), s(e, { key: 0 }, [r[0] ||= c("polyline", { points: "22 17 13.5 8.5 8.5 13.5 2 7" }, null, -1), r[1] ||= c("polyline", { points: "16 17 22 17 22 11" }, null, -1)], 64)) : (S(), s(e, { key: 1 }, [r[2] ||= c("polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17" }, null, -1), r[3] ||= c("polyline", { points: "16 7 22 7 22 13" }, null, -1)], 64))], 2))], 2)])], 2));
|
|
1000
1000
|
}
|
|
1001
|
-
}),
|
|
1001
|
+
}), bt = {
|
|
1002
1002
|
key: 0,
|
|
1003
1003
|
class: "font-bold text-green-800 dark:text-green-400"
|
|
1004
|
-
},
|
|
1004
|
+
}, xt = { key: 0 }, St = { key: 0 }, Ct = "font-bold", wt = /* @__PURE__ */ p({
|
|
1005
1005
|
__name: "EuroAmount",
|
|
1006
1006
|
props: {
|
|
1007
1007
|
amount: {
|
|
@@ -1020,21 +1020,21 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
1020
1020
|
}
|
|
1021
1021
|
},
|
|
1022
1022
|
setup(t) {
|
|
1023
|
-
let n = t,
|
|
1024
|
-
return (n,
|
|
1023
|
+
let n = t, r = i(() => n.amount !== null && n.amount !== void 0), a = i(() => r.value && n.amount < 0), c = i(() => n.beforeAmount === null || n.beforeAmount === void 0 ? !1 : n.amount < n.beforeAmount), l = i(() => a.value || c.value), u = i(() => !a.value && !c.value && !(n.beforeAmount === null || n.beforeAmount === void 0));
|
|
1024
|
+
return (n, i) => (S(), s(e, null, [r.value && u.value ? (S(), s("span", bt, [d(A(t.amount) + " ", 1), t.showCurrency ? (S(), s("span", xt, "€")) : o("", !0)])) : o("", !0), r.value && !u.value ? (S(), s("span", {
|
|
1025
1025
|
key: 1,
|
|
1026
|
-
class:
|
|
1027
|
-
}, [
|
|
1026
|
+
class: g([Ct, l.value ? "text-red-800 dark:text-red-400" : "text-gray-800 dark:text-gray-200"])
|
|
1027
|
+
}, [d(A(t.amount) + " ", 1), t.showCurrency ? (S(), s("span", St, "€")) : o("", !0)], 2)) : o("", !0)], 64));
|
|
1028
1028
|
}
|
|
1029
|
-
}),
|
|
1029
|
+
}), Tt = { "aria-label": "Pagination" }, Et = { class: "flex list-none p-0 m-0" }, Dt = [
|
|
1030
1030
|
"aria-current",
|
|
1031
1031
|
"aria-label",
|
|
1032
1032
|
"onClick"
|
|
1033
|
-
],
|
|
1033
|
+
], Ot = {
|
|
1034
1034
|
key: 1,
|
|
1035
1035
|
"aria-hidden": "true",
|
|
1036
1036
|
class: "inline-block border border-gray-300 dark:border-gray-600 rounded-lg p-3 text-black dark:text-gray-200 cursor-not-allowed"
|
|
1037
|
-
},
|
|
1037
|
+
}, kt = /* @__PURE__ */ p({
|
|
1038
1038
|
__name: "Pagination",
|
|
1039
1039
|
props: {
|
|
1040
1040
|
totalItems: {
|
|
@@ -1048,44 +1048,44 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
1048
1048
|
},
|
|
1049
1049
|
emits: ["page-changed"],
|
|
1050
1050
|
setup(t, { emit: n }) {
|
|
1051
|
-
let r = t, i =
|
|
1051
|
+
let r = t, i = T(1), a = T(0), o = T([]), l = n;
|
|
1052
1052
|
function u(e) {
|
|
1053
1053
|
if (a.value <= 5) {
|
|
1054
|
-
|
|
1054
|
+
o.value = Array.from({ length: a.value }, (e, t) => t + 1);
|
|
1055
1055
|
return;
|
|
1056
1056
|
}
|
|
1057
1057
|
let t = [], n = Math.max(1, e - 2), r = Math.min(a.value, e + 2);
|
|
1058
1058
|
n > 1 && (t.push(1), n > 2 && t.push(0));
|
|
1059
1059
|
for (let e = n; e <= r; e++) t.push(e);
|
|
1060
|
-
r < a.value && (r < a.value - 1 && t.push(0), t.push(a.value)),
|
|
1060
|
+
r < a.value && (r < a.value - 1 && t.push(0), t.push(a.value)), o.value = t;
|
|
1061
1061
|
}
|
|
1062
1062
|
function d(e) {
|
|
1063
1063
|
e === i.value || e < 1 || e > a.value || (i.value = e, u(e), l("page-changed", e));
|
|
1064
1064
|
}
|
|
1065
1065
|
return P(() => [r.totalItems, r.itemsPerPage], () => {
|
|
1066
1066
|
a.value = Math.ceil(r.totalItems / r.itemsPerPage), i.value > a.value && (i.value = Math.max(1, a.value)), u(i.value);
|
|
1067
|
-
}, { immediate: !0 }), (t, n) => (
|
|
1067
|
+
}, { immediate: !0 }), (t, n) => (S(), s("nav", Tt, [c("ul", Et, [(S(!0), s(e, null, E(o.value, (e, t) => (S(), s("li", {
|
|
1068
1068
|
key: t,
|
|
1069
1069
|
class: "mr-1"
|
|
1070
|
-
}, [e === 0 ? (
|
|
1070
|
+
}, [e === 0 ? (S(), s("span", Ot, "...")) : (S(), s("button", {
|
|
1071
1071
|
key: 0,
|
|
1072
1072
|
type: "button",
|
|
1073
1073
|
"aria-current": e === i.value ? "page" : void 0,
|
|
1074
1074
|
"aria-label": `Go to page ${e}`,
|
|
1075
1075
|
onClick: (t) => d(e),
|
|
1076
|
-
class:
|
|
1077
|
-
},
|
|
1076
|
+
class: g(["inline-block min-w-[44px] border border-gray-300 dark:border-gray-600 rounded-lg p-3 text-black dark:text-gray-200 cursor-pointer transition-colors hover:bg-gray-300 dark:hover:bg-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", { "active font-bold bg-gray-200 dark:bg-gray-700": e === i.value }])
|
|
1077
|
+
}, A(e), 11, Dt))]))), 128))])]));
|
|
1078
1078
|
}
|
|
1079
|
-
}),
|
|
1079
|
+
}), At = { key: 0 }, jt = {
|
|
1080
1080
|
key: 0,
|
|
1081
1081
|
class: "flex items-center space-x-2"
|
|
1082
|
-
},
|
|
1082
|
+
}, Mt = {
|
|
1083
1083
|
key: 1,
|
|
1084
1084
|
class: "flex items-center space-x-2"
|
|
1085
|
-
},
|
|
1085
|
+
}, Nt = {
|
|
1086
1086
|
key: 2,
|
|
1087
1087
|
class: "flex items-center space-x-2"
|
|
1088
|
-
},
|
|
1088
|
+
}, Pt = /* @__PURE__ */ p({
|
|
1089
1089
|
__name: "TrendArrow",
|
|
1090
1090
|
props: {
|
|
1091
1091
|
number: {
|
|
@@ -1098,58 +1098,58 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
1098
1098
|
}
|
|
1099
1099
|
},
|
|
1100
1100
|
setup(e) {
|
|
1101
|
-
let t = e, n =
|
|
1102
|
-
return (
|
|
1103
|
-
default: F(() => [
|
|
1101
|
+
let t = e, n = i(() => t.number !== null && t.number !== void 0 && t.number < 0), r = i(() => t.number === 0);
|
|
1102
|
+
return (i, a) => e.number !== null && e.number !== void 0 ? (S(), s("div", At, [n.value ? (S(), s("span", jt, [f(Fe, { color: j(H).RED }, {
|
|
1103
|
+
default: F(() => [d(A(e.number) + A(t.icon), 1)]),
|
|
1104
1104
|
_: 1
|
|
1105
|
-
}, 8, ["color"]),
|
|
1106
|
-
default: F(() => [
|
|
1105
|
+
}, 8, ["color"]), f(j(ie), { class: "h-5 w-5 text-red-500" })])) : r.value ? (S(), s("span", Mt, [f(Fe, { color: j(H).GRAY }, {
|
|
1106
|
+
default: F(() => [d(A(e.number) + A(t.icon), 1)]),
|
|
1107
1107
|
_: 1
|
|
1108
|
-
}, 8, ["color"]),
|
|
1109
|
-
default: F(() => [
|
|
1108
|
+
}, 8, ["color"]), f(j(xe), { class: "h-5 w-5 text-gray-400" })])) : (S(), s("span", Nt, [f(Fe, { color: j(H).GREEN }, {
|
|
1109
|
+
default: F(() => [d(A(e.number) + A(t.icon), 1)]),
|
|
1110
1110
|
_: 1
|
|
1111
|
-
}, 8, ["color"]),
|
|
1111
|
+
}, 8, ["color"]), f(j(ae), { class: "h-5 w-5 text-green-500" })]))])) : o("", !0);
|
|
1112
1112
|
}
|
|
1113
1113
|
});
|
|
1114
1114
|
//#endregion
|
|
1115
1115
|
//#region src/composables/useThemeClasses.ts
|
|
1116
|
-
function
|
|
1116
|
+
function J() {
|
|
1117
1117
|
let { isDark: e } = V();
|
|
1118
|
-
return
|
|
1119
|
-
card:
|
|
1120
|
-
cardAlt:
|
|
1121
|
-
pageBg:
|
|
1122
|
-
border:
|
|
1123
|
-
divider:
|
|
1124
|
-
primaryText:
|
|
1125
|
-
primaryTextSoft:
|
|
1126
|
-
bodyText:
|
|
1127
|
-
label:
|
|
1128
|
-
mutedText:
|
|
1129
|
-
subtleText:
|
|
1130
|
-
dimText:
|
|
1131
|
-
dimTextAlt:
|
|
1132
|
-
illustration:
|
|
1133
|
-
input:
|
|
1134
|
-
inputWithPlaceholder:
|
|
1135
|
-
ghostButton:
|
|
1136
|
-
emeraldText:
|
|
1137
|
-
amberText:
|
|
1138
|
-
amberTextStrong:
|
|
1139
|
-
redText:
|
|
1118
|
+
return C({
|
|
1119
|
+
card: i(() => e.value ? "bg-gray-800 border-gray-700" : "bg-white border-gray-200"),
|
|
1120
|
+
cardAlt: i(() => e.value ? "bg-gray-900 border-gray-700" : "bg-white border-gray-200"),
|
|
1121
|
+
pageBg: i(() => e.value ? "bg-gray-900" : "bg-gray-50"),
|
|
1122
|
+
border: i(() => e.value ? "border-gray-700" : "border-gray-200"),
|
|
1123
|
+
divider: i(() => e.value ? "border-gray-800" : "border-gray-100"),
|
|
1124
|
+
primaryText: i(() => e.value ? "text-white" : "text-gray-900"),
|
|
1125
|
+
primaryTextSoft: i(() => e.value ? "text-gray-100" : "text-gray-800"),
|
|
1126
|
+
bodyText: i(() => e.value ? "text-gray-200" : "text-gray-700"),
|
|
1127
|
+
label: i(() => e.value ? "text-gray-300" : "text-gray-700"),
|
|
1128
|
+
mutedText: i(() => e.value ? "text-gray-400" : "text-gray-600"),
|
|
1129
|
+
subtleText: i(() => e.value ? "text-gray-500" : "text-gray-600"),
|
|
1130
|
+
dimText: i(() => e.value ? "text-gray-500" : "text-gray-400"),
|
|
1131
|
+
dimTextAlt: i(() => e.value ? "text-gray-400" : "text-gray-500"),
|
|
1132
|
+
illustration: i(() => e.value ? "text-gray-600" : "text-gray-300"),
|
|
1133
|
+
input: i(() => e.value ? "bg-gray-700 border-gray-600 text-white" : "bg-gray-50 border-gray-300 text-gray-900"),
|
|
1134
|
+
inputWithPlaceholder: i(() => e.value ? "bg-gray-700 border-gray-600 text-white placeholder-gray-400" : "bg-gray-50 border-gray-300 text-gray-900 placeholder-gray-500"),
|
|
1135
|
+
ghostButton: i(() => e.value ? "bg-gray-800 text-gray-200 border-gray-600 hover:bg-gray-700" : "bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),
|
|
1136
|
+
emeraldText: i(() => e.value ? "text-emerald-400" : "text-emerald-600"),
|
|
1137
|
+
amberText: i(() => e.value ? "text-amber-400" : "text-amber-600"),
|
|
1138
|
+
amberTextStrong: i(() => e.value ? "text-amber-300" : "text-amber-700"),
|
|
1139
|
+
redText: i(() => e.value ? "text-red-400" : "text-red-500")
|
|
1140
1140
|
});
|
|
1141
1141
|
}
|
|
1142
1142
|
//#endregion
|
|
1143
1143
|
//#region src/composables/useEscapeKey.ts
|
|
1144
|
-
function
|
|
1144
|
+
function Ft(e) {
|
|
1145
1145
|
function t(t) {
|
|
1146
1146
|
t.key === "Escape" && e();
|
|
1147
1147
|
}
|
|
1148
|
-
|
|
1148
|
+
y(() => document.addEventListener("keydown", t)), v(() => document.removeEventListener("keydown", t));
|
|
1149
1149
|
}
|
|
1150
1150
|
//#endregion
|
|
1151
1151
|
//#region src/components/BaseModalShell.vue?vue&type=script&setup=true&lang.ts
|
|
1152
|
-
var
|
|
1152
|
+
var It = { class: "flex items-start gap-4 min-w-0" }, Lt = { class: "flex-1 min-w-0" }, Rt = { class: "p-6 overflow-y-auto flex-1" }, zt = { class: "p-6" }, Bt = { class: "flex items-start gap-4" }, Vt = { class: "flex-1" }, Ht = { class: "mt-4" }, Ut = { class: "mt-6 flex gap-3 justify-end" }, Wt = /* @__PURE__ */ p({
|
|
1153
1153
|
__name: "BaseModalShell",
|
|
1154
1154
|
props: {
|
|
1155
1155
|
title: {},
|
|
@@ -1169,55 +1169,55 @@ var Pt = { class: "flex items-start gap-4 min-w-0" }, Ft = { class: "flex-1 min-
|
|
|
1169
1169
|
},
|
|
1170
1170
|
emits: ["cancel", "backdrop"],
|
|
1171
1171
|
setup(e, { emit: n }) {
|
|
1172
|
-
let
|
|
1173
|
-
function
|
|
1174
|
-
l("backdrop"),
|
|
1172
|
+
let r = e, l = n, { isDark: u } = V(), d = J(), f = `modal-title-${Math.random().toString(36).slice(2, 9)}`, p = i(() => u.value ? "bg-gray-900 border border-gray-700" : "bg-white border border-gray-200"), m = i(() => r.iconBgClass || (u.value ? "bg-emerald-900/30" : "bg-emerald-50"));
|
|
1173
|
+
function h() {
|
|
1174
|
+
l("backdrop"), r.manualClose || l("cancel");
|
|
1175
1175
|
}
|
|
1176
|
-
return
|
|
1177
|
-
|
|
1178
|
-
}), (n, r) => (
|
|
1176
|
+
return Ft(() => {
|
|
1177
|
+
r.manualClose || l("cancel");
|
|
1178
|
+
}), (n, r) => (S(), a(t, { to: "body" }, [c("div", {
|
|
1179
1179
|
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50",
|
|
1180
1180
|
role: "dialog",
|
|
1181
1181
|
"aria-modal": "true",
|
|
1182
1182
|
"aria-labelledby": f,
|
|
1183
|
-
onClick:
|
|
1184
|
-
}, [e.scrollable ? (
|
|
1183
|
+
onClick: h
|
|
1184
|
+
}, [e.scrollable ? (S(), s("div", {
|
|
1185
1185
|
key: 0,
|
|
1186
|
-
class:
|
|
1186
|
+
class: g(["relative w-full mx-4 rounded-lg shadow-xl max-h-[90vh] flex flex-col", [e.maxWidthClass, p.value]]),
|
|
1187
1187
|
onClick: r[0] ||= L(() => {}, ["stop"])
|
|
1188
1188
|
}, [
|
|
1189
|
-
|
|
1190
|
-
class:
|
|
1189
|
+
c("div", { class: g(["flex items-start justify-between gap-4 p-6 border-b shrink-0", j(d).border]) }, [c("div", It, [D(n.$slots, "icon", {}, () => [c("div", { class: g(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", m.value]) }, [(S(), a(k(e.icon), {
|
|
1190
|
+
class: g(["h-6 w-6", e.iconClass]),
|
|
1191
1191
|
"aria-hidden": "true"
|
|
1192
|
-
}, null, 8, ["class"]))], 2)]),
|
|
1192
|
+
}, null, 8, ["class"]))], 2)]), c("div", Lt, [c("h3", {
|
|
1193
1193
|
id: f,
|
|
1194
|
-
class:
|
|
1195
|
-
},
|
|
1194
|
+
class: g(["text-lg font-medium", j(d).primaryText])
|
|
1195
|
+
}, A(e.title), 3), e.subtitle ? (S(), s("p", {
|
|
1196
1196
|
key: 0,
|
|
1197
|
-
class:
|
|
1198
|
-
},
|
|
1199
|
-
|
|
1200
|
-
n.$slots.footer ? (
|
|
1197
|
+
class: g(["text-sm mt-1 break-all", j(d).mutedText])
|
|
1198
|
+
}, A(e.subtitle), 3)) : o("", !0)])]), D(n.$slots, "header-actions")], 2),
|
|
1199
|
+
c("div", Rt, [D(n.$slots, "default")]),
|
|
1200
|
+
n.$slots.footer ? (S(), s("div", {
|
|
1201
1201
|
key: 0,
|
|
1202
|
-
class:
|
|
1203
|
-
}, [
|
|
1204
|
-
], 2)) : (
|
|
1202
|
+
class: g(["flex gap-3 justify-end p-6 border-t shrink-0", j(d).border])
|
|
1203
|
+
}, [D(n.$slots, "footer")], 2)) : o("", !0)
|
|
1204
|
+
], 2)) : (S(), s("div", {
|
|
1205
1205
|
key: 1,
|
|
1206
|
-
class:
|
|
1206
|
+
class: g(["relative w-full mx-4 rounded-lg shadow-xl", [e.maxWidthClass, p.value]]),
|
|
1207
1207
|
onClick: r[1] ||= L(() => {}, ["stop"])
|
|
1208
|
-
}, [
|
|
1209
|
-
|
|
1210
|
-
class:
|
|
1208
|
+
}, [c("div", zt, [
|
|
1209
|
+
c("div", Bt, [D(n.$slots, "icon", {}, () => [c("div", { class: g(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", m.value]) }, [(S(), a(k(e.icon), {
|
|
1210
|
+
class: g(["h-6 w-6", e.iconClass]),
|
|
1211
1211
|
"aria-hidden": "true"
|
|
1212
|
-
}, null, 8, ["class"]))], 2)]),
|
|
1212
|
+
}, null, 8, ["class"]))], 2)]), c("div", Vt, [c("h3", {
|
|
1213
1213
|
id: f,
|
|
1214
|
-
class:
|
|
1215
|
-
},
|
|
1216
|
-
|
|
1217
|
-
|
|
1214
|
+
class: g(["text-lg font-medium", j(d).primaryText])
|
|
1215
|
+
}, A(e.title), 3)])]),
|
|
1216
|
+
c("div", Ht, [D(n.$slots, "default")]),
|
|
1217
|
+
c("div", Ut, [D(n.$slots, "footer")])
|
|
1218
1218
|
])], 2))])]));
|
|
1219
1219
|
}
|
|
1220
|
-
}),
|
|
1220
|
+
}), Gt = ["aria-expanded"], Kt = { class: "flex items-center gap-3" }, qt = /* @__PURE__ */ p({
|
|
1221
1221
|
__name: "BaseCollapsibleSection",
|
|
1222
1222
|
props: {
|
|
1223
1223
|
title: {},
|
|
@@ -1227,35 +1227,35 @@ var Pt = { class: "flex items-start gap-4 min-w-0" }, Ft = { class: "flex-1 min-
|
|
|
1227
1227
|
},
|
|
1228
1228
|
emits: ["toggle"],
|
|
1229
1229
|
setup(e, { emit: t }) {
|
|
1230
|
-
let n = e,
|
|
1231
|
-
return (t, n) => (
|
|
1230
|
+
let n = e, r = t, { isDark: a } = V(), l = J(), u = i(() => a.value ? "text-gray-100" : "text-gray-700"), d = i(() => a.value ? "bg-gray-800/50 hover:bg-gray-800 border-gray-700" : "bg-gray-50 hover:bg-gray-100 border-gray-200"), f = i(() => a.value ? "bg-emerald-500/15 text-emerald-400" : "bg-emerald-50 text-emerald-700"), p = i(() => n.bodyClass === void 0 ? a.value ? "bg-gray-800" : "bg-white" : n.bodyClass);
|
|
1231
|
+
return (t, n) => (S(), s("section", { class: g(["rounded-xl border transition-colors", j(l).cardAlt]) }, [c("button", {
|
|
1232
1232
|
type: "button",
|
|
1233
|
-
class:
|
|
1233
|
+
class: g(["w-full flex items-center justify-between p-4 text-left transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500", [d.value, e.collapsed ? "rounded-xl" : "rounded-t-xl"]]),
|
|
1234
1234
|
"aria-expanded": !e.collapsed,
|
|
1235
|
-
onClick: n[0] ||= (e) =>
|
|
1236
|
-
}, [
|
|
1235
|
+
onClick: n[0] ||= (e) => r("toggle")
|
|
1236
|
+
}, [c("div", Kt, [c("h2", { class: g(["text-base font-semibold", u.value]) }, A(e.title), 3), e.badge ? (S(), s("span", {
|
|
1237
1237
|
key: 0,
|
|
1238
|
-
class:
|
|
1239
|
-
},
|
|
1240
|
-
class:
|
|
1238
|
+
class: g(["text-xs px-2 py-0.5 rounded-full", f.value])
|
|
1239
|
+
}, A(e.badge), 3)) : o("", !0)]), (S(), s("svg", {
|
|
1240
|
+
class: g(["w-5 h-5 transition-transform", [e.collapsed ? "" : "rotate-180", j(l).dimTextAlt]]),
|
|
1241
1241
|
fill: "none",
|
|
1242
1242
|
viewBox: "0 0 24 24",
|
|
1243
1243
|
stroke: "currentColor",
|
|
1244
1244
|
"stroke-width": "2",
|
|
1245
1245
|
"aria-hidden": "true"
|
|
1246
|
-
}, [...n[1] ||= [
|
|
1246
|
+
}, [...n[1] ||= [c("path", {
|
|
1247
1247
|
"stroke-linecap": "round",
|
|
1248
1248
|
"stroke-linejoin": "round",
|
|
1249
1249
|
d: "M19 9l-7 7-7-7"
|
|
1250
|
-
}, null, -1)]], 2))], 10,
|
|
1250
|
+
}, null, -1)]], 2))], 10, Gt), I(c("div", { class: g(["p-6 border-t rounded-b-xl", [j(l).border, p.value]]) }, [D(t.$slots, "default")], 2), [[ne, !e.collapsed]])], 2));
|
|
1251
1251
|
}
|
|
1252
|
-
}),
|
|
1252
|
+
}), Jt = ["disabled"], Yt = ["disabled"], Xt = {
|
|
1253
1253
|
key: 0,
|
|
1254
1254
|
class: "w-4 h-4 animate-spin",
|
|
1255
1255
|
fill: "none",
|
|
1256
1256
|
viewBox: "0 0 24 24",
|
|
1257
1257
|
"aria-hidden": "true"
|
|
1258
|
-
},
|
|
1258
|
+
}, Zt = /* @__PURE__ */ p({
|
|
1259
1259
|
__name: "BaseConfirmModal",
|
|
1260
1260
|
props: {
|
|
1261
1261
|
title: {},
|
|
@@ -1271,44 +1271,44 @@ var Pt = { class: "flex items-start gap-4 min-w-0" }, Ft = { class: "flex-1 min-
|
|
|
1271
1271
|
},
|
|
1272
1272
|
emits: ["confirm", "cancel"],
|
|
1273
1273
|
setup(e, { emit: t }) {
|
|
1274
|
-
let n = e, r = t, { isDark:
|
|
1275
|
-
function
|
|
1274
|
+
let n = e, r = t, { isDark: i } = V(), l = J();
|
|
1275
|
+
function u() {
|
|
1276
1276
|
n.submitting || r("confirm");
|
|
1277
1277
|
}
|
|
1278
1278
|
function f() {
|
|
1279
1279
|
n.submitting || r("cancel");
|
|
1280
1280
|
}
|
|
1281
|
-
return (t, n) => (
|
|
1281
|
+
return (t, n) => (S(), a(Wt, {
|
|
1282
1282
|
title: e.title,
|
|
1283
|
-
icon:
|
|
1284
|
-
"icon-bg-class": e.variant === "danger" ?
|
|
1283
|
+
icon: j(_e),
|
|
1284
|
+
"icon-bg-class": e.variant === "danger" ? j(i) ? "bg-red-900/30" : "bg-red-50" : j(i) ? "bg-amber-900/30" : "bg-amber-50",
|
|
1285
1285
|
"icon-class": e.variant === "danger" ? "text-red-600" : "text-amber-600",
|
|
1286
1286
|
"manual-close": e.submitting,
|
|
1287
1287
|
onCancel: f
|
|
1288
1288
|
}, {
|
|
1289
|
-
footer: F(() => [
|
|
1289
|
+
footer: F(() => [c("button", {
|
|
1290
1290
|
type: "button",
|
|
1291
1291
|
disabled: e.submitting,
|
|
1292
|
-
class:
|
|
1292
|
+
class: g(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [j(l).ghostButton, e.submitting ? "opacity-60 cursor-not-allowed" : "cursor-pointer"]]),
|
|
1293
1293
|
onClick: f
|
|
1294
|
-
},
|
|
1294
|
+
}, A(e.cancelText), 11, Jt), c("button", {
|
|
1295
1295
|
type: "button",
|
|
1296
1296
|
disabled: e.submitting,
|
|
1297
|
-
class:
|
|
1298
|
-
onClick:
|
|
1299
|
-
}, [e.submitting ? (
|
|
1297
|
+
class: g(["inline-flex items-center justify-center gap-2 px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2", [e.variant === "danger" ? "focus-visible:ring-red-500" : "focus-visible:ring-emerald-500", e.variant === "danger" ? e.submitting ? "bg-red-400 cursor-not-allowed" : "bg-red-600 hover:bg-red-700 cursor-pointer" : e.submitting ? "bg-emerald-400 cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 cursor-pointer"]]),
|
|
1298
|
+
onClick: u
|
|
1299
|
+
}, [e.submitting ? (S(), s("svg", Xt, [...n[0] ||= [c("circle", {
|
|
1300
1300
|
class: "opacity-25",
|
|
1301
1301
|
cx: "12",
|
|
1302
1302
|
cy: "12",
|
|
1303
1303
|
r: "10",
|
|
1304
1304
|
stroke: "currentColor",
|
|
1305
1305
|
"stroke-width": "4"
|
|
1306
|
-
}, null, -1),
|
|
1306
|
+
}, null, -1), c("path", {
|
|
1307
1307
|
class: "opacity-75",
|
|
1308
1308
|
fill: "currentColor",
|
|
1309
1309
|
d: "M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"
|
|
1310
|
-
}, null, -1)]])) :
|
|
1311
|
-
default: F(() => [
|
|
1310
|
+
}, null, -1)]])) : o("", !0), d(" " + A(e.submitting ? e.submittingText : e.confirmText), 1)], 10, Yt)]),
|
|
1311
|
+
default: F(() => [D(t.$slots, "message", {}, () => [c("p", { class: g(["text-sm", j(i) ? "text-gray-300" : "text-gray-600"]) }, A(e.message), 3)]), D(t.$slots, "default")]),
|
|
1312
1312
|
_: 3
|
|
1313
1313
|
}, 8, [
|
|
1314
1314
|
"title",
|
|
@@ -1318,7 +1318,7 @@ var Pt = { class: "flex items-start gap-4 min-w-0" }, Ft = { class: "flex-1 min-
|
|
|
1318
1318
|
"manual-close"
|
|
1319
1319
|
]));
|
|
1320
1320
|
}
|
|
1321
|
-
}),
|
|
1321
|
+
}), Qt = { class: "mt-4" }, $t = ["placeholder"], en = ["disabled"], tn = /* @__PURE__ */ p({
|
|
1322
1322
|
__name: "BaseTextInputModal",
|
|
1323
1323
|
props: {
|
|
1324
1324
|
title: {},
|
|
@@ -1336,52 +1336,52 @@ var Pt = { class: "flex items-start gap-4 min-w-0" }, Ft = { class: "flex-1 min-
|
|
|
1336
1336
|
},
|
|
1337
1337
|
emits: ["confirm", "cancel"],
|
|
1338
1338
|
setup(e, { emit: t }) {
|
|
1339
|
-
let n = e, r = t, { isDark:
|
|
1340
|
-
|
|
1341
|
-
await
|
|
1339
|
+
let n = e, r = t, { isDark: i } = V(), o = J(), s = T(n.initialValue), u = T(null);
|
|
1340
|
+
y(async () => {
|
|
1341
|
+
await h(), u.value?.focus();
|
|
1342
1342
|
});
|
|
1343
1343
|
function d() {
|
|
1344
|
-
!
|
|
1344
|
+
!s.value.trim() || n.submitting || r("confirm", s.value.trim());
|
|
1345
1345
|
}
|
|
1346
1346
|
function f() {
|
|
1347
1347
|
r("cancel");
|
|
1348
1348
|
}
|
|
1349
1349
|
function p() {
|
|
1350
|
-
|
|
1350
|
+
s.value.trim() === (n.initialValue ?? "").trim() && f();
|
|
1351
1351
|
}
|
|
1352
|
-
return
|
|
1352
|
+
return Ft(f), (t, n) => (S(), a(Wt, {
|
|
1353
1353
|
title: e.title,
|
|
1354
|
-
icon:
|
|
1354
|
+
icon: j(he),
|
|
1355
1355
|
"manual-close": "",
|
|
1356
1356
|
onBackdrop: p
|
|
1357
|
-
},
|
|
1358
|
-
footer: F(() => [
|
|
1357
|
+
}, l({
|
|
1358
|
+
footer: F(() => [c("button", {
|
|
1359
1359
|
type: "button",
|
|
1360
|
-
class:
|
|
1360
|
+
class: g(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150 cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", j(o).ghostButton]),
|
|
1361
1361
|
onClick: f
|
|
1362
|
-
},
|
|
1362
|
+
}, A(e.cancelText), 3), c("button", {
|
|
1363
1363
|
type: "button",
|
|
1364
|
-
disabled: !
|
|
1365
|
-
class:
|
|
1364
|
+
disabled: !s.value.trim() || e.submitting,
|
|
1365
|
+
class: g(["inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:ring-offset-2", [!s.value.trim() || e.submitting ? "bg-emerald-400 cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 cursor-pointer"]]),
|
|
1366
1366
|
onClick: d
|
|
1367
|
-
},
|
|
1368
|
-
default: F(() => [
|
|
1367
|
+
}, A(e.submitting ? e.submittingText : e.confirmText), 11, en)]),
|
|
1368
|
+
default: F(() => [c("p", { class: g(["text-sm", j(i) ? "text-gray-300" : "text-gray-600"]) }, A(e.message), 3), c("div", Qt, [c("label", { class: g(["block text-sm font-medium mb-1", j(o).label]) }, A(e.inputLabel), 3), I(c("input", {
|
|
1369
1369
|
ref_key: "nameInput",
|
|
1370
1370
|
ref: u,
|
|
1371
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
1371
|
+
"onUpdate:modelValue": n[0] ||= (e) => s.value = e,
|
|
1372
1372
|
type: "text",
|
|
1373
1373
|
placeholder: e.placeholder,
|
|
1374
|
-
class:
|
|
1375
|
-
onKeyup:
|
|
1376
|
-
}, null, 42,
|
|
1374
|
+
class: g(["w-full px-3 py-2 rounded-md border text-sm transition-colors", j(i) ? "bg-gray-800 border-gray-600 text-gray-100 placeholder-gray-500 focus:outline-none focus:border-emerald-500" : "bg-white border-gray-300 text-gray-900 placeholder-gray-400 focus:outline-none focus:border-emerald-500"]),
|
|
1375
|
+
onKeyup: re(d, ["enter"])
|
|
1376
|
+
}, null, 42, $t), [[N, s.value]])])]),
|
|
1377
1377
|
_: 2
|
|
1378
1378
|
}, [t.$slots.icon ? {
|
|
1379
1379
|
name: "icon",
|
|
1380
|
-
fn: F(() => [
|
|
1380
|
+
fn: F(() => [D(t.$slots, "icon")]),
|
|
1381
1381
|
key: "0"
|
|
1382
1382
|
} : void 0]), 1032, ["title", "icon"]));
|
|
1383
1383
|
}
|
|
1384
|
-
}),
|
|
1384
|
+
}), nn = { class: "flex items-center justify-center min-h-[60vh]" }, rn = { class: "text-center px-6" }, an = /* @__PURE__ */ p({
|
|
1385
1385
|
__name: "BaseNotFoundPage",
|
|
1386
1386
|
props: {
|
|
1387
1387
|
code: { default: "404" },
|
|
@@ -1390,33 +1390,33 @@ var Pt = { class: "flex items-start gap-4 min-w-0" }, Ft = { class: "flex-1 min-
|
|
|
1390
1390
|
homeLabel: { default: "Go home" }
|
|
1391
1391
|
},
|
|
1392
1392
|
setup(e) {
|
|
1393
|
-
let t = e, n =
|
|
1393
|
+
let t = e, n = De(), { isDark: r } = V(), i = J();
|
|
1394
1394
|
function a() {
|
|
1395
1395
|
n.push({ name: t.homeRouteName });
|
|
1396
1396
|
}
|
|
1397
|
-
return (t, n) => (
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1397
|
+
return (t, n) => (S(), s("div", nn, [c("div", rn, [
|
|
1398
|
+
f(j(_e), { class: g(["w-16 h-16 mx-auto mb-4", j(i).illustration]) }, null, 8, ["class"]),
|
|
1399
|
+
c("h1", { class: g(["text-4xl font-bold mb-2", j(r) ? "text-gray-200" : "text-gray-800"]) }, A(e.code), 3),
|
|
1400
|
+
c("p", { class: g(["text-lg mb-6", j(i).dimTextAlt]) }, A(e.message), 3),
|
|
1401
|
+
c("button", {
|
|
1402
1402
|
onClick: a,
|
|
1403
|
-
class:
|
|
1404
|
-
},
|
|
1403
|
+
class: g(["inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium text-white transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:ring-offset-2", j(r) ? "bg-emerald-600 hover:bg-emerald-500" : "bg-emerald-600 hover:bg-emerald-700"])
|
|
1404
|
+
}, A(e.homeLabel), 3)
|
|
1405
1405
|
])]));
|
|
1406
1406
|
}
|
|
1407
|
-
}),
|
|
1408
|
-
function
|
|
1407
|
+
}), on = T(!1);
|
|
1408
|
+
function sn() {
|
|
1409
1409
|
function e() {
|
|
1410
|
-
|
|
1410
|
+
on.value = !0;
|
|
1411
1411
|
}
|
|
1412
1412
|
function t() {
|
|
1413
|
-
|
|
1413
|
+
on.value = !1;
|
|
1414
1414
|
}
|
|
1415
1415
|
function n() {
|
|
1416
|
-
|
|
1416
|
+
on.value = !on.value;
|
|
1417
1417
|
}
|
|
1418
1418
|
return {
|
|
1419
|
-
mobileOpen:
|
|
1419
|
+
mobileOpen: on,
|
|
1420
1420
|
open: e,
|
|
1421
1421
|
close: t,
|
|
1422
1422
|
toggle: n
|
|
@@ -1424,30 +1424,30 @@ function an() {
|
|
|
1424
1424
|
}
|
|
1425
1425
|
//#endregion
|
|
1426
1426
|
//#region src/composables/useSidebarCollapse.ts
|
|
1427
|
-
var
|
|
1428
|
-
function
|
|
1429
|
-
if (!
|
|
1430
|
-
let e = window.localStorage?.getItem(
|
|
1431
|
-
e && (
|
|
1432
|
-
P(
|
|
1433
|
-
window.localStorage?.setItem(
|
|
1427
|
+
var Y = T(!1), cn = !1, ln = "mgv-sidebar-collapsed";
|
|
1428
|
+
function un(e) {
|
|
1429
|
+
if (!cn && (cn = !0, ln = e, typeof window < "u")) {
|
|
1430
|
+
let e = window.localStorage?.getItem(ln);
|
|
1431
|
+
e && (Y.value = e === "true"), m(!0).run(() => {
|
|
1432
|
+
P(Y, (e) => {
|
|
1433
|
+
window.localStorage?.setItem(ln, String(e));
|
|
1434
1434
|
});
|
|
1435
1435
|
});
|
|
1436
1436
|
}
|
|
1437
1437
|
}
|
|
1438
|
-
function
|
|
1439
|
-
|
|
1438
|
+
function dn(e) {
|
|
1439
|
+
un(e?.storageKey ?? ln);
|
|
1440
1440
|
function t() {
|
|
1441
|
-
|
|
1441
|
+
Y.value = !0;
|
|
1442
1442
|
}
|
|
1443
1443
|
function n() {
|
|
1444
|
-
|
|
1444
|
+
Y.value = !1;
|
|
1445
1445
|
}
|
|
1446
1446
|
function r() {
|
|
1447
|
-
|
|
1447
|
+
Y.value = !Y.value;
|
|
1448
1448
|
}
|
|
1449
1449
|
return {
|
|
1450
|
-
collapsed:
|
|
1450
|
+
collapsed: Y,
|
|
1451
1451
|
collapse: t,
|
|
1452
1452
|
expand: n,
|
|
1453
1453
|
toggle: r
|
|
@@ -1455,45 +1455,45 @@ function ln(e) {
|
|
|
1455
1455
|
}
|
|
1456
1456
|
//#endregion
|
|
1457
1457
|
//#region src/composables/useNotifications.ts
|
|
1458
|
-
var
|
|
1459
|
-
function
|
|
1458
|
+
var X = T([]), Z = T(!1), fn = i(() => X.value.filter((e) => !e.read).length);
|
|
1459
|
+
function pn() {
|
|
1460
1460
|
function e() {
|
|
1461
|
-
|
|
1461
|
+
Z.value = !0;
|
|
1462
1462
|
}
|
|
1463
1463
|
function t() {
|
|
1464
|
-
|
|
1464
|
+
Z.value = !1;
|
|
1465
1465
|
}
|
|
1466
1466
|
function n() {
|
|
1467
|
-
|
|
1467
|
+
Z.value = !Z.value;
|
|
1468
1468
|
}
|
|
1469
1469
|
function r(e) {
|
|
1470
|
-
|
|
1470
|
+
X.value = e;
|
|
1471
1471
|
}
|
|
1472
1472
|
function i(e) {
|
|
1473
|
-
|
|
1473
|
+
X.value = [e, ...X.value];
|
|
1474
1474
|
}
|
|
1475
1475
|
function a(e) {
|
|
1476
|
-
|
|
1476
|
+
X.value = X.value.filter((t) => t.id !== e);
|
|
1477
1477
|
}
|
|
1478
1478
|
function o(e) {
|
|
1479
|
-
|
|
1479
|
+
X.value = X.value.map((t) => t.id === e ? {
|
|
1480
1480
|
...t,
|
|
1481
1481
|
read: !0
|
|
1482
1482
|
} : t);
|
|
1483
1483
|
}
|
|
1484
1484
|
function s() {
|
|
1485
|
-
|
|
1485
|
+
X.value = X.value.map((e) => e.read ? e : {
|
|
1486
1486
|
...e,
|
|
1487
1487
|
read: !0
|
|
1488
1488
|
});
|
|
1489
1489
|
}
|
|
1490
1490
|
function c() {
|
|
1491
|
-
|
|
1491
|
+
X.value = [];
|
|
1492
1492
|
}
|
|
1493
1493
|
return {
|
|
1494
|
-
notifications:
|
|
1495
|
-
unreadCount:
|
|
1496
|
-
open:
|
|
1494
|
+
notifications: X,
|
|
1495
|
+
unreadCount: fn,
|
|
1496
|
+
open: Z,
|
|
1497
1497
|
openPanel: e,
|
|
1498
1498
|
closePanel: t,
|
|
1499
1499
|
togglePanel: n,
|
|
@@ -1507,26 +1507,26 @@ function fn() {
|
|
|
1507
1507
|
}
|
|
1508
1508
|
//#endregion
|
|
1509
1509
|
//#region src/components/BaseSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
1510
|
-
var
|
|
1510
|
+
var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }, gn = { class: "flex-1 overflow-y-auto px-3 space-y-6" }, _n = { class: "space-y-0.5" }, vn = [
|
|
1511
1511
|
"aria-current",
|
|
1512
1512
|
"title",
|
|
1513
1513
|
"onClick"
|
|
1514
|
-
],
|
|
1514
|
+
], yn = ["aria-label"], bn = { class: "relative shrink-0" }, xn = {
|
|
1515
1515
|
key: 0,
|
|
1516
1516
|
class: "absolute -top-1.5 -right-1.5 min-w-4 h-4 px-1 rounded-full bg-red-500 text-white text-[10px] font-semibold leading-4 text-center"
|
|
1517
|
-
},
|
|
1517
|
+
}, Sn = [
|
|
1518
1518
|
"title",
|
|
1519
1519
|
"aria-label",
|
|
1520
1520
|
"aria-pressed"
|
|
1521
|
-
],
|
|
1521
|
+
], Cn = [
|
|
1522
1522
|
"title",
|
|
1523
1523
|
"aria-label",
|
|
1524
1524
|
"aria-pressed"
|
|
1525
|
-
],
|
|
1525
|
+
], wn = /*#__PURE__*/ ((e, t) => {
|
|
1526
1526
|
let n = e.__vccOpts || e;
|
|
1527
1527
|
for (let [e, r] of t) n[e] = r;
|
|
1528
1528
|
return n;
|
|
1529
|
-
})(/* @__PURE__ */
|
|
1529
|
+
})(/* @__PURE__ */ p({
|
|
1530
1530
|
__name: "BaseSidebar",
|
|
1531
1531
|
props: {
|
|
1532
1532
|
sections: {},
|
|
@@ -1547,151 +1547,151 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
1547
1547
|
}
|
|
1548
1548
|
},
|
|
1549
1549
|
setup(t) {
|
|
1550
|
-
let n = t,
|
|
1551
|
-
P(
|
|
1552
|
-
e ? (
|
|
1550
|
+
let n = t, r = De(), l = Ee(), { isDark: u, toggleTheme: p } = V(), { mobileOpen: m, close: _, toggle: v } = sn(), { collapsed: y, toggle: b } = dn(), { unreadCount: x, togglePanel: C } = pn(), w = i(() => n.collapsible && y.value), O = T(null), ee = null;
|
|
1551
|
+
P(m, async (e) => {
|
|
1552
|
+
e ? (ee = document.activeElement instanceof HTMLElement ? document.activeElement : null, await h(), O.value?.focus()) : (ee?.focus(), ee = null);
|
|
1553
1553
|
});
|
|
1554
1554
|
function M() {
|
|
1555
|
-
|
|
1555
|
+
r.push({ name: n.homeRouteName }), _();
|
|
1556
1556
|
}
|
|
1557
|
-
function
|
|
1557
|
+
function te(e) {
|
|
1558
1558
|
return l.name === e;
|
|
1559
1559
|
}
|
|
1560
|
-
function
|
|
1561
|
-
|
|
1560
|
+
function N(e) {
|
|
1561
|
+
r.push({ name: e }), _();
|
|
1562
1562
|
}
|
|
1563
|
-
return (n, r) => (
|
|
1564
|
-
|
|
1563
|
+
return (n, r) => (S(), s("div", null, [
|
|
1564
|
+
c("div", { class: g(["mobile-topbar fixed top-0 inset-x-0 z-30 flex items-center justify-between px-4 py-3 border-b transition-colors", j(u) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200"]) }, [c("button", {
|
|
1565
1565
|
type: "button",
|
|
1566
1566
|
onClick: M,
|
|
1567
1567
|
class: "cursor-pointer rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500",
|
|
1568
1568
|
"aria-label": "Go to home"
|
|
1569
|
-
}, [
|
|
1569
|
+
}, [D(n.$slots, "logo", { size: 28 }, void 0, !0)]), c("button", {
|
|
1570
1570
|
type: "button",
|
|
1571
|
-
onClick: r[0] ||= (...e) =>
|
|
1572
|
-
class:
|
|
1573
|
-
"aria-label":
|
|
1574
|
-
"aria-expanded":
|
|
1575
|
-
}, [
|
|
1571
|
+
onClick: r[0] ||= (...e) => j(v) && j(v)(...e),
|
|
1572
|
+
class: g(["p-2 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", j(u) ? "text-gray-400 hover:bg-gray-800" : "text-gray-600 hover:bg-gray-100"]),
|
|
1573
|
+
"aria-label": j(m) ? "Close navigation menu" : "Open navigation menu",
|
|
1574
|
+
"aria-expanded": j(m)
|
|
1575
|
+
}, [j(m) ? (S(), a(j(we), {
|
|
1576
1576
|
key: 1,
|
|
1577
1577
|
class: "w-6 h-6",
|
|
1578
1578
|
"aria-hidden": "true"
|
|
1579
|
-
})) : (
|
|
1579
|
+
})) : (S(), a(j(oe), {
|
|
1580
1580
|
key: 0,
|
|
1581
1581
|
class: "w-6 h-6",
|
|
1582
1582
|
"aria-hidden": "true"
|
|
1583
|
-
}))], 10,
|
|
1584
|
-
|
|
1583
|
+
}))], 10, mn)], 2),
|
|
1584
|
+
j(m) ? (S(), s("div", {
|
|
1585
1585
|
key: 0,
|
|
1586
1586
|
class: "mobile-overlay fixed inset-0 z-40 bg-black/50",
|
|
1587
1587
|
"aria-hidden": "true",
|
|
1588
|
-
onClick: r[1] ||= (...e) =>
|
|
1589
|
-
})) :
|
|
1590
|
-
|
|
1588
|
+
onClick: r[1] ||= (...e) => j(_) && j(_)(...e)
|
|
1589
|
+
})) : o("", !0),
|
|
1590
|
+
c("aside", {
|
|
1591
1591
|
role: "navigation",
|
|
1592
1592
|
"aria-label": "Main navigation",
|
|
1593
|
-
class:
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
t.collapsible &&
|
|
1593
|
+
class: g(["fixed top-0 left-0 h-screen w-60 flex flex-col border-r transition-all duration-300 lg:pointer-events-auto", [
|
|
1594
|
+
j(u) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200",
|
|
1595
|
+
j(m) ? "translate-x-0 z-50" : "-translate-x-full max-lg:pointer-events-none lg:translate-x-0 z-50",
|
|
1596
|
+
t.collapsible && j(y) ? "lg:w-16" : "lg:w-60"
|
|
1597
1597
|
]])
|
|
1598
|
-
}, [
|
|
1599
|
-
|
|
1598
|
+
}, [c("div", hn, [
|
|
1599
|
+
c("div", { class: g(["px-5 pt-5 pb-4 flex items-center justify-center relative", { "lg:px-2": w.value }]) }, [c("button", {
|
|
1600
1600
|
type: "button",
|
|
1601
1601
|
onClick: M,
|
|
1602
1602
|
class: "cursor-pointer rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500",
|
|
1603
1603
|
"aria-label": "Go to home"
|
|
1604
|
-
}, [
|
|
1604
|
+
}, [D(n.$slots, "logo", { size: w.value ? 36 : 52 }, void 0, !0)]), c("button", {
|
|
1605
1605
|
ref_key: "closeMobileButton",
|
|
1606
|
-
ref:
|
|
1606
|
+
ref: O,
|
|
1607
1607
|
type: "button",
|
|
1608
|
-
onClick: r[2] ||= (...e) =>
|
|
1609
|
-
class:
|
|
1608
|
+
onClick: r[2] ||= (...e) => j(_) && j(_)(...e),
|
|
1609
|
+
class: g(["lg:hidden p-1.5 rounded-lg cursor-pointer absolute right-3 top-4 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", j(u) ? "text-gray-400 hover:bg-gray-800" : "text-gray-500 hover:bg-gray-100"]),
|
|
1610
1610
|
"aria-label": "Close navigation menu"
|
|
1611
|
-
}, [
|
|
1611
|
+
}, [f(j(we), {
|
|
1612
1612
|
class: "w-5 h-5",
|
|
1613
1613
|
"aria-hidden": "true"
|
|
1614
1614
|
})], 2)], 2),
|
|
1615
|
-
|
|
1615
|
+
c("nav", gn, [(S(!0), s(e, null, E(t.sections, (t) => (S(), s("div", { key: t.title }, [c("p", { class: g(["px-2 mb-2 text-[10px] font-semibold uppercase tracking-wider text-gray-500", { "lg:hidden": w.value }]) }, A(t.title), 3), c("ul", _n, [(S(!0), s(e, null, E(t.items, (e) => (S(), s("li", { key: e.name }, [c("button", {
|
|
1616
1616
|
type: "button",
|
|
1617
|
-
"aria-current":
|
|
1618
|
-
title:
|
|
1619
|
-
onClick: (t) =>
|
|
1620
|
-
class:
|
|
1621
|
-
}, [(
|
|
1622
|
-
|
|
1623
|
-
t.showNotifications ? (
|
|
1617
|
+
"aria-current": te(e.name) ? "page" : void 0,
|
|
1618
|
+
title: w.value ? e.label : void 0,
|
|
1619
|
+
onClick: (t) => N(e.name),
|
|
1620
|
+
class: g(["flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-colors w-full text-left cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [te(e.name) ? j(u) ? "bg-emerald-500/15 text-emerald-300" : "bg-emerald-50 text-emerald-700" : j(u) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100", { "lg:justify-center": w.value }]])
|
|
1621
|
+
}, [(S(), a(k(e.icon), { class: "w-[18px] h-[18px] shrink-0" })), c("span", { class: g({ "lg:hidden": w.value }) }, A(e.label), 3)], 10, vn)]))), 128))])]))), 128))]),
|
|
1622
|
+
c("div", { class: g(["px-4 py-4 border-t transition-colors space-y-3", j(u) ? "border-gray-800" : "border-gray-200"]) }, [
|
|
1623
|
+
t.showNotifications ? (S(), s("button", {
|
|
1624
1624
|
key: 0,
|
|
1625
1625
|
type: "button",
|
|
1626
|
-
onClick: r[3] ||= (...e) =>
|
|
1626
|
+
onClick: r[3] ||= (...e) => j(C) && j(C)(...e),
|
|
1627
1627
|
title: "Notifications",
|
|
1628
|
-
"aria-label":
|
|
1629
|
-
class:
|
|
1630
|
-
}, [
|
|
1628
|
+
"aria-label": j(x) > 0 ? `Notifications, ${j(x)} unread` : "Notifications",
|
|
1629
|
+
class: g(["relative flex items-center gap-3 w-full px-3 py-2.5 rounded-lg text-sm font-medium transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [j(u) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100", { "lg:justify-center": w.value }]])
|
|
1630
|
+
}, [c("span", bn, [f(j(se), {
|
|
1631
1631
|
class: "w-[18px] h-[18px]",
|
|
1632
1632
|
"aria-hidden": "true"
|
|
1633
|
-
}),
|
|
1634
|
-
t.showThemeToggle ? (
|
|
1633
|
+
}), j(x) > 0 ? (S(), s("span", xn, A(j(x) > 99 ? "99+" : j(x)), 1)) : o("", !0)]), c("span", { class: g({ "lg:hidden": w.value }) }, "Notifications", 2)], 10, yn)) : o("", !0),
|
|
1634
|
+
t.showThemeToggle ? (S(), s("button", {
|
|
1635
1635
|
key: 1,
|
|
1636
1636
|
type: "button",
|
|
1637
|
-
onClick: r[4] ||= (...e) =>
|
|
1638
|
-
title:
|
|
1639
|
-
"aria-label":
|
|
1640
|
-
"aria-pressed":
|
|
1641
|
-
class:
|
|
1637
|
+
onClick: r[4] ||= (...e) => j(p) && j(p)(...e),
|
|
1638
|
+
title: j(u) ? "Switch to light mode" : "Switch to dark mode",
|
|
1639
|
+
"aria-label": j(u) ? "Switch to light mode" : "Switch to dark mode",
|
|
1640
|
+
"aria-pressed": j(u),
|
|
1641
|
+
class: g(["flex items-center gap-3 w-full px-3 py-2.5 rounded-lg text-sm font-medium transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [j(u) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100", { "lg:justify-center": w.value }]])
|
|
1642
1642
|
}, [
|
|
1643
|
-
(
|
|
1644
|
-
class:
|
|
1643
|
+
(S(), a(k(j(u) ? j(Ce) : j(Se)), {
|
|
1644
|
+
class: g(["hidden w-[18px] h-[18px] shrink-0", { "lg:block": w.value }]),
|
|
1645
1645
|
"aria-hidden": "true"
|
|
1646
1646
|
}, null, 8, ["class"])),
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
], 10,
|
|
1650
|
-
t.collapsible ? (
|
|
1647
|
+
c("span", { class: g({ "lg:hidden": w.value }) }, A(j(u) ? "Switch to light" : "Switch to dark"), 3),
|
|
1648
|
+
c("span", { class: g(["ml-auto relative w-9 h-5 rounded-full transition-colors", [j(u) ? "bg-emerald-600" : "bg-gray-300", { "lg:hidden": w.value }]]) }, [c("span", { class: g(["absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-300", j(u) ? "translate-x-4" : "translate-x-0"]) }, null, 2)], 2)
|
|
1649
|
+
], 10, Sn)) : o("", !0),
|
|
1650
|
+
t.collapsible ? (S(), s("button", {
|
|
1651
1651
|
key: 2,
|
|
1652
1652
|
type: "button",
|
|
1653
|
-
onClick: r[5] ||= (...e) =>
|
|
1654
|
-
title:
|
|
1655
|
-
"aria-label":
|
|
1656
|
-
"aria-pressed":
|
|
1657
|
-
class:
|
|
1658
|
-
}, [(
|
|
1653
|
+
onClick: r[5] ||= (...e) => j(b) && j(b)(...e),
|
|
1654
|
+
title: j(y) ? "Expand sidebar" : "Collapse sidebar",
|
|
1655
|
+
"aria-label": j(y) ? "Expand sidebar" : "Collapse sidebar",
|
|
1656
|
+
"aria-pressed": j(y),
|
|
1657
|
+
class: g(["hidden lg:flex items-center gap-3 w-full px-3 py-2.5 rounded-lg text-sm font-medium transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [j(u) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100", { "lg:justify-center": w.value }]])
|
|
1658
|
+
}, [(S(), a(k(j(y) ? j(ue) : j(le)), {
|
|
1659
1659
|
class: "w-[18px] h-[18px] shrink-0",
|
|
1660
1660
|
"aria-hidden": "true"
|
|
1661
|
-
})),
|
|
1662
|
-
|
|
1663
|
-
|
|
1661
|
+
})), c("span", { class: g({ "lg:hidden": w.value }) }, "Collapse", 2)], 10, Cn)) : o("", !0),
|
|
1662
|
+
c("div", { class: g({ "lg:hidden": w.value }) }, [D(n.$slots, "status", {}, void 0, !0)], 2),
|
|
1663
|
+
c("div", { class: g({ "lg:hidden": w.value }) }, [D(n.$slots, "footer", {}, () => [t.appName || t.version ? (S(), s("div", {
|
|
1664
1664
|
key: 0,
|
|
1665
|
-
class:
|
|
1666
|
-
}, [
|
|
1667
|
-
|
|
1668
|
-
t.appName && t.version ? (
|
|
1669
|
-
t.version ? (
|
|
1670
|
-
])], 2)) :
|
|
1665
|
+
class: g(["flex items-center justify-center gap-2 text-xs", (j(u), "text-gray-500")])
|
|
1666
|
+
}, [c("span", null, [
|
|
1667
|
+
d(A(t.appName), 1),
|
|
1668
|
+
t.appName && t.version ? (S(), s(e, { key: 0 }, [], 64)) : o("", !0),
|
|
1669
|
+
t.version ? (S(), s(e, { key: 1 }, [d("v" + A(t.version), 1)], 64)) : o("", !0)
|
|
1670
|
+
])], 2)) : o("", !0)], !0)], 2)
|
|
1671
1671
|
], 2)
|
|
1672
1672
|
])], 2)
|
|
1673
1673
|
]));
|
|
1674
1674
|
}
|
|
1675
|
-
}), [["__scopeId", "data-v-452beaf2"]]),
|
|
1675
|
+
}), [["__scopeId", "data-v-452beaf2"]]), Tn = {
|
|
1676
1676
|
key: 1,
|
|
1677
1677
|
class: "mt-4 flex justify-center py-6"
|
|
1678
|
-
},
|
|
1678
|
+
}, En = {
|
|
1679
1679
|
key: 2,
|
|
1680
1680
|
class: "mt-4 text-sm text-red-500",
|
|
1681
1681
|
role: "alert"
|
|
1682
|
-
},
|
|
1682
|
+
}, Dn = {
|
|
1683
1683
|
key: 3,
|
|
1684
1684
|
class: "mt-4"
|
|
1685
|
-
},
|
|
1685
|
+
}, On = { class: "relative" }, kn = ["placeholder"], An = {
|
|
1686
1686
|
key: 4,
|
|
1687
1687
|
class: "mt-3 max-h-64 overflow-y-auto"
|
|
1688
|
-
},
|
|
1688
|
+
}, jn = ["aria-pressed", "onClick"], Mn = { class: "flex-1 min-w-0" }, Nn = {
|
|
1689
1689
|
key: 0,
|
|
1690
1690
|
class: "text-center py-6"
|
|
1691
|
-
},
|
|
1691
|
+
}, Pn = {
|
|
1692
1692
|
key: 1,
|
|
1693
1693
|
class: "text-center py-6"
|
|
1694
|
-
},
|
|
1694
|
+
}, Fn = ["disabled"], In = ["disabled"], Ln = /* @__PURE__ */ p({
|
|
1695
1695
|
__name: "BaseEntityPickerModal",
|
|
1696
1696
|
props: {
|
|
1697
1697
|
title: {},
|
|
@@ -1713,10 +1713,10 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
1713
1713
|
},
|
|
1714
1714
|
emits: ["confirm", "cancel"],
|
|
1715
1715
|
setup(t, { emit: n }) {
|
|
1716
|
-
let
|
|
1717
|
-
let e =
|
|
1718
|
-
return
|
|
1719
|
-
}), O =
|
|
1716
|
+
let r = t, u = n, { isDark: d } = V(), p = J(), m = T([]), _ = T(!1), v = T(""), b = T(null), x = T(""), C = T(null), w = i(() => {
|
|
1717
|
+
let e = r.loader ? m.value : r.items;
|
|
1718
|
+
return r.excludeId ? e.filter((e) => e.id !== r.excludeId) : e;
|
|
1719
|
+
}), O = i(() => w.value.filter((e) => e.label.toLowerCase().includes(x.value.toLowerCase()))), k = {
|
|
1720
1720
|
emerald: {
|
|
1721
1721
|
iconBg: "bg-emerald-50",
|
|
1722
1722
|
iconText: "text-emerald-600",
|
|
@@ -1762,7 +1762,7 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
1762
1762
|
confirmActive: "bg-amber-600 hover:bg-amber-700 cursor-pointer",
|
|
1763
1763
|
confirmDisabled: "bg-amber-400 cursor-not-allowed"
|
|
1764
1764
|
}
|
|
1765
|
-
},
|
|
1765
|
+
}, ee = {
|
|
1766
1766
|
emerald: {
|
|
1767
1767
|
iconBg: "bg-emerald-900/30",
|
|
1768
1768
|
iconText: "text-emerald-400",
|
|
@@ -1808,92 +1808,92 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
1808
1808
|
confirmActive: "bg-amber-600 hover:bg-amber-700 cursor-pointer",
|
|
1809
1809
|
confirmDisabled: "bg-amber-400 cursor-not-allowed"
|
|
1810
1810
|
}
|
|
1811
|
-
}, M =
|
|
1812
|
-
|
|
1813
|
-
if (
|
|
1811
|
+
}, M = i(() => (d.value ? ee : k)[r.variant]);
|
|
1812
|
+
y(async () => {
|
|
1813
|
+
if (r.loader) {
|
|
1814
1814
|
_.value = !0;
|
|
1815
1815
|
try {
|
|
1816
|
-
|
|
1816
|
+
m.value = await r.loader();
|
|
1817
1817
|
} catch {
|
|
1818
|
-
|
|
1818
|
+
v.value = "Failed to load items";
|
|
1819
1819
|
} finally {
|
|
1820
1820
|
_.value = !1;
|
|
1821
1821
|
}
|
|
1822
1822
|
}
|
|
1823
|
-
await
|
|
1823
|
+
await h(), C.value?.focus();
|
|
1824
1824
|
});
|
|
1825
1825
|
function te() {
|
|
1826
|
-
!b.value ||
|
|
1826
|
+
!b.value || r.submitting || u("confirm", b.value);
|
|
1827
1827
|
}
|
|
1828
|
-
function
|
|
1829
|
-
|
|
1828
|
+
function ne() {
|
|
1829
|
+
r.submitting || u("cancel");
|
|
1830
1830
|
}
|
|
1831
|
-
return (n, r) => (
|
|
1831
|
+
return (n, r) => (S(), a(Wt, {
|
|
1832
1832
|
title: t.title,
|
|
1833
|
-
icon:
|
|
1833
|
+
icon: j(ve),
|
|
1834
1834
|
"icon-bg-class": M.value.iconBg,
|
|
1835
1835
|
"icon-class": M.value.iconText,
|
|
1836
1836
|
"manual-close": t.submitting,
|
|
1837
|
-
onCancel:
|
|
1838
|
-
},
|
|
1839
|
-
footer: F(() => [
|
|
1837
|
+
onCancel: ne
|
|
1838
|
+
}, l({
|
|
1839
|
+
footer: F(() => [c("button", {
|
|
1840
1840
|
type: "button",
|
|
1841
1841
|
disabled: t.submitting,
|
|
1842
|
-
class:
|
|
1843
|
-
onClick:
|
|
1844
|
-
},
|
|
1842
|
+
class: g(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", j(p).ghostButton]),
|
|
1843
|
+
onClick: ne
|
|
1844
|
+
}, A(t.cancelText), 11, Fn), c("button", {
|
|
1845
1845
|
type: "button",
|
|
1846
1846
|
disabled: !b.value || t.submitting,
|
|
1847
|
-
class:
|
|
1847
|
+
class: g(["inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:ring-offset-2", !b.value || t.submitting ? M.value.confirmDisabled : M.value.confirmActive]),
|
|
1848
1848
|
onClick: te
|
|
1849
|
-
},
|
|
1849
|
+
}, A(t.submitting ? t.submittingText : t.confirmText), 11, In)]),
|
|
1850
1850
|
default: F(() => [
|
|
1851
|
-
t.message ? (
|
|
1851
|
+
t.message ? (S(), s("p", {
|
|
1852
1852
|
key: 0,
|
|
1853
|
-
class:
|
|
1854
|
-
},
|
|
1855
|
-
_.value ? (
|
|
1856
|
-
!_.value && !
|
|
1857
|
-
class:
|
|
1853
|
+
class: g(["text-sm", j(d) ? "text-gray-300" : "text-gray-600"])
|
|
1854
|
+
}, A(t.message), 3)) : o("", !0),
|
|
1855
|
+
_.value ? (S(), s("div", Tn, [f(dt, { color: "emerald" })])) : v.value ? (S(), s("div", En, A(v.value), 1)) : o("", !0),
|
|
1856
|
+
!_.value && !v.value && w.value.length > 0 ? (S(), s("div", Dn, [c("div", On, [f(j(be), {
|
|
1857
|
+
class: g(["absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4", j(p).dimText]),
|
|
1858
1858
|
"aria-hidden": "true"
|
|
1859
|
-
}, null, 8, ["class"]), I(
|
|
1859
|
+
}, null, 8, ["class"]), I(c("input", {
|
|
1860
1860
|
ref_key: "searchInputRef",
|
|
1861
1861
|
ref: C,
|
|
1862
|
-
"onUpdate:modelValue": r[0] ||= (e) =>
|
|
1862
|
+
"onUpdate:modelValue": r[0] ||= (e) => x.value = e,
|
|
1863
1863
|
type: "text",
|
|
1864
1864
|
placeholder: t.searchPlaceholder,
|
|
1865
|
-
class:
|
|
1866
|
-
}, null, 10,
|
|
1867
|
-
!_.value && !
|
|
1865
|
+
class: g(["w-full pl-9 pr-3 py-2 text-sm rounded-md border outline-none transition-colors", [j(d) ? "bg-gray-800 border-gray-600 text-gray-200 placeholder-gray-500" : "bg-white border-gray-300 text-gray-700 placeholder-gray-400", M.value.inputFocus]])
|
|
1866
|
+
}, null, 10, kn), [[N, x.value]])])])) : o("", !0),
|
|
1867
|
+
!_.value && !v.value ? (S(), s("div", An, [(S(!0), s(e, null, E(O.value, (e) => (S(), s("button", {
|
|
1868
1868
|
key: e.id,
|
|
1869
1869
|
type: "button",
|
|
1870
1870
|
"aria-pressed": b.value === e.id,
|
|
1871
|
-
class:
|
|
1871
|
+
class: g(["w-full text-left flex items-center gap-3 px-3 py-2.5 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500", [b.value === e.id ? M.value.selectedRow : j(d) ? "hover:bg-gray-800 border border-transparent" : "hover:bg-gray-50 border border-transparent"]]),
|
|
1872
1872
|
onClick: (t) => b.value = e.id
|
|
1873
1873
|
}, [
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
b.value === e.id ? (
|
|
1874
|
+
f(j(ve), { class: g(["w-5 h-5 flex-shrink-0", j(p).dimText]) }, null, 8, ["class"]),
|
|
1875
|
+
c("div", Mn, [c("p", { class: g(["text-sm font-medium truncate", j(p).bodyText]) }, A(e.label), 3)]),
|
|
1876
|
+
b.value === e.id ? (S(), s("div", {
|
|
1877
1877
|
key: 0,
|
|
1878
|
-
class:
|
|
1879
|
-
}, [...r[1] ||= [
|
|
1878
|
+
class: g(["w-5 h-5 rounded-full flex items-center justify-center", M.value.checkBg])
|
|
1879
|
+
}, [...r[1] ||= [c("svg", {
|
|
1880
1880
|
class: "w-3 h-3 text-white",
|
|
1881
1881
|
fill: "none",
|
|
1882
1882
|
viewBox: "0 0 24 24",
|
|
1883
1883
|
stroke: "currentColor",
|
|
1884
1884
|
"stroke-width": "3",
|
|
1885
1885
|
"aria-hidden": "true"
|
|
1886
|
-
}, [
|
|
1886
|
+
}, [c("path", {
|
|
1887
1887
|
"stroke-linecap": "round",
|
|
1888
1888
|
"stroke-linejoin": "round",
|
|
1889
1889
|
d: "M5 13l4 4L19 7"
|
|
1890
|
-
})], -1)]], 2)) :
|
|
1891
|
-
], 10,
|
|
1890
|
+
})], -1)]], 2)) : o("", !0)
|
|
1891
|
+
], 10, jn))), 128)), w.value.length === 0 ? (S(), s("div", Nn, [c("p", { class: g(["text-sm", j(p).dimText]) }, A(t.emptyMessage), 3)])) : O.value.length === 0 ? (S(), s("div", Pn, [c("p", { class: g(["text-sm", j(p).dimText]) }, A(t.noMatchMessage), 3)])) : o("", !0)])) : o("", !0)
|
|
1892
1892
|
]),
|
|
1893
1893
|
_: 2
|
|
1894
1894
|
}, [n.$slots.icon ? {
|
|
1895
1895
|
name: "icon",
|
|
1896
|
-
fn: F(() => [
|
|
1896
|
+
fn: F(() => [D(n.$slots, "icon")]),
|
|
1897
1897
|
key: "0"
|
|
1898
1898
|
} : void 0]), 1032, [
|
|
1899
1899
|
"title",
|
|
@@ -1903,10 +1903,10 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
1903
1903
|
"manual-close"
|
|
1904
1904
|
]));
|
|
1905
1905
|
}
|
|
1906
|
-
}),
|
|
1906
|
+
}), Rn = {
|
|
1907
1907
|
href: "#main-content",
|
|
1908
1908
|
class: "sr-only focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-[100] focus:px-3 focus:py-2 focus:rounded-md focus:bg-emerald-600 focus:text-white focus:shadow-lg"
|
|
1909
|
-
},
|
|
1909
|
+
}, zn = ["inert"], Bn = /* @__PURE__ */ p({
|
|
1910
1910
|
__name: "BaseAppLayout",
|
|
1911
1911
|
props: {
|
|
1912
1912
|
showSidebar: {
|
|
@@ -1916,19 +1916,19 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
1916
1916
|
skipLinkLabel: { default: "Skip to main content" }
|
|
1917
1917
|
},
|
|
1918
1918
|
setup(e) {
|
|
1919
|
-
let t = e, { isDark: n } = V(), { mobileOpen:
|
|
1920
|
-
return (t,
|
|
1921
|
-
|
|
1922
|
-
l.value ?
|
|
1923
|
-
|
|
1919
|
+
let t = e, { isDark: n } = V(), { mobileOpen: r } = sn(), { collapsed: a } = dn(), l = i(() => t.showSidebar);
|
|
1920
|
+
return (t, i) => (S(), s("div", { class: g(["min-h-screen transition-colors duration-300", j(n) ? "bg-gray-950 text-gray-100" : "bg-gray-50 text-gray-800"]) }, [
|
|
1921
|
+
c("a", Rn, A(e.skipLinkLabel), 1),
|
|
1922
|
+
l.value ? D(t.$slots, "sidebar", { key: 0 }) : o("", !0),
|
|
1923
|
+
c("main", {
|
|
1924
1924
|
id: "main-content",
|
|
1925
1925
|
tabindex: "-1",
|
|
1926
|
-
inert: l.value &&
|
|
1927
|
-
class:
|
|
1928
|
-
}, [
|
|
1926
|
+
inert: l.value && j(r) ? !0 : void 0,
|
|
1927
|
+
class: g(["transition-all duration-300", l.value ? j(a) ? "pt-14 lg:pt-0 lg:ml-16" : "pt-14 lg:pt-0 lg:ml-60" : ""])
|
|
1928
|
+
}, [D(t.$slots, "default")], 10, zn)
|
|
1929
1929
|
], 2));
|
|
1930
1930
|
}
|
|
1931
|
-
}),
|
|
1931
|
+
}), Vn = { class: "flex items-center gap-3 min-w-0" }, Hn = { class: "flex items-center gap-2" }, Un = /* @__PURE__ */ p({
|
|
1932
1932
|
__name: "BasePageHeader",
|
|
1933
1933
|
props: {
|
|
1934
1934
|
title: {},
|
|
@@ -1939,7 +1939,7 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
1939
1939
|
marginClass: { default: "mb-8" }
|
|
1940
1940
|
},
|
|
1941
1941
|
setup(e) {
|
|
1942
|
-
let t = e, { isDark: n } = V(),
|
|
1942
|
+
let t = e, { isDark: n } = V(), r = J(), a = i(() => {
|
|
1943
1943
|
let e = {
|
|
1944
1944
|
emerald: {
|
|
1945
1945
|
dark: "bg-emerald-500/10",
|
|
@@ -1959,7 +1959,7 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
1959
1959
|
}
|
|
1960
1960
|
}[t.iconColor];
|
|
1961
1961
|
return n.value ? e.dark : e.light;
|
|
1962
|
-
}), l =
|
|
1962
|
+
}), l = i(() => {
|
|
1963
1963
|
let e = {
|
|
1964
1964
|
emerald: {
|
|
1965
1965
|
dark: "text-emerald-400",
|
|
@@ -1980,19 +1980,19 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
1980
1980
|
}[t.iconColor];
|
|
1981
1981
|
return n.value ? e.dark : e.light;
|
|
1982
1982
|
});
|
|
1983
|
-
return (t, n) => (
|
|
1983
|
+
return (t, n) => (S(), s("header", { class: g(e.maxWidthClass ? ["mx-auto px-4 sm:px-6", e.maxWidthClass] : void 0) }, [c("div", { class: g(["flex flex-wrap justify-between gap-3", [e.align === "end" ? "items-end" : "items-center", e.marginClass]]) }, [c("div", Vn, [t.$slots.icon ? (S(), s("div", {
|
|
1984
1984
|
key: 0,
|
|
1985
|
-
class:
|
|
1986
|
-
}, [
|
|
1985
|
+
class: g(["w-10 h-10 rounded-lg flex items-center justify-center", a.value])
|
|
1986
|
+
}, [D(t.$slots, "icon", { iconClass: l.value })], 2)) : o("", !0), c("div", null, [c("h1", { class: g(["text-2xl font-bold", j(r).primaryTextSoft]) }, A(e.title), 3), e.subtitle || t.$slots.subtitle ? (S(), s("p", {
|
|
1987
1987
|
key: 0,
|
|
1988
|
-
class:
|
|
1989
|
-
}, [
|
|
1988
|
+
class: g(["text-sm", j(r).dimTextAlt])
|
|
1989
|
+
}, [D(t.$slots, "subtitle", {}, () => [d(A(e.subtitle), 1)])], 2)) : o("", !0)])]), c("div", Hn, [D(t.$slots, "actions")])], 2)], 2));
|
|
1990
1990
|
}
|
|
1991
|
-
}),
|
|
1991
|
+
}), Wn = [
|
|
1992
1992
|
"type",
|
|
1993
1993
|
"disabled",
|
|
1994
1994
|
"title"
|
|
1995
|
-
],
|
|
1995
|
+
], Gn = { key: 0 }, Kn = /* @__PURE__ */ p({
|
|
1996
1996
|
__name: "BaseToolbarButton",
|
|
1997
1997
|
props: {
|
|
1998
1998
|
label: { default: "" },
|
|
@@ -2006,11 +2006,11 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2006
2006
|
},
|
|
2007
2007
|
emits: ["click"],
|
|
2008
2008
|
setup(e) {
|
|
2009
|
-
let t = e, { isDark: n } = V(),
|
|
2009
|
+
let t = e, { isDark: n } = V(), r = {
|
|
2010
2010
|
neutral: "px-3 py-2 rounded-lg font-medium disabled:opacity-50",
|
|
2011
2011
|
danger: "px-3 py-2 rounded-lg font-medium disabled:opacity-50",
|
|
2012
2012
|
ghost: "h-9 px-4 rounded-md font-semibold disabled:opacity-40 disabled:hover:bg-slate-50 dark:disabled:hover:bg-slate-900"
|
|
2013
|
-
},
|
|
2013
|
+
}, a = i(() => {
|
|
2014
2014
|
let e = {
|
|
2015
2015
|
neutral: {
|
|
2016
2016
|
dark: "bg-gray-800 text-gray-100 border-gray-700 hover:bg-gray-700",
|
|
@@ -2025,22 +2025,22 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2025
2025
|
light: "border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-900 text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800"
|
|
2026
2026
|
}
|
|
2027
2027
|
}[t.variant];
|
|
2028
|
-
return [
|
|
2028
|
+
return [r[t.variant], n.value ? e.dark : e.light];
|
|
2029
2029
|
});
|
|
2030
|
-
return (t, n) => (
|
|
2030
|
+
return (t, n) => (S(), s("button", {
|
|
2031
2031
|
type: e.type,
|
|
2032
2032
|
disabled: e.disabled,
|
|
2033
2033
|
title: e.title,
|
|
2034
|
-
class:
|
|
2034
|
+
class: g(["inline-flex shrink-0 items-center gap-2 text-sm border transition-colors cursor-pointer disabled:cursor-not-allowed whitespace-nowrap focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", a.value]),
|
|
2035
2035
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
2036
|
-
}, [
|
|
2036
|
+
}, [D(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (S(), s("span", Gn, A(e.label), 1)) : o("", !0)], 10, Wn));
|
|
2037
2037
|
}
|
|
2038
|
-
}),
|
|
2038
|
+
}), qn = [
|
|
2039
2039
|
"type",
|
|
2040
2040
|
"disabled",
|
|
2041
2041
|
"title",
|
|
2042
2042
|
"aria-label"
|
|
2043
|
-
],
|
|
2043
|
+
], Jn = { key: 0 }, Yn = /* @__PURE__ */ p({
|
|
2044
2044
|
__name: "BaseActionButton",
|
|
2045
2045
|
props: {
|
|
2046
2046
|
label: { default: "" },
|
|
@@ -2059,7 +2059,7 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2059
2059
|
},
|
|
2060
2060
|
emits: ["click"],
|
|
2061
2061
|
setup(e) {
|
|
2062
|
-
let t = e, { isDark: n } = V(),
|
|
2062
|
+
let t = e, { isDark: n } = V(), r = i(() => {
|
|
2063
2063
|
let e = {
|
|
2064
2064
|
emerald: {
|
|
2065
2065
|
dark: "text-emerald-400 hover:bg-emerald-500/10",
|
|
@@ -2095,7 +2095,7 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2095
2095
|
}
|
|
2096
2096
|
}[t.color];
|
|
2097
2097
|
return n.value ? e.dark : e.light;
|
|
2098
|
-
}),
|
|
2098
|
+
}), a = i(() => {
|
|
2099
2099
|
let e = {
|
|
2100
2100
|
emerald: {
|
|
2101
2101
|
dark: "text-emerald-400",
|
|
@@ -2131,17 +2131,17 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2131
2131
|
}
|
|
2132
2132
|
}[t.color];
|
|
2133
2133
|
return n.value ? e.dark : e.light;
|
|
2134
|
-
}), c =
|
|
2135
|
-
return (t, n) => (
|
|
2134
|
+
}), c = i(() => t.disabled ? `${a.value} opacity-50 cursor-not-allowed` : `${r.value} cursor-pointer`);
|
|
2135
|
+
return (t, n) => (S(), s("button", {
|
|
2136
2136
|
type: e.type,
|
|
2137
2137
|
disabled: e.disabled,
|
|
2138
2138
|
title: e.title,
|
|
2139
2139
|
"aria-label": e.ariaLabel,
|
|
2140
|
-
class:
|
|
2140
|
+
class: g(["inline-flex items-center justify-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-current", [e.fullWidth ? "flex-1" : "", c.value]]),
|
|
2141
2141
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
2142
|
-
}, [
|
|
2142
|
+
}, [D(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (S(), s("span", Jn, A(e.label), 1)) : o("", !0)], 10, qn));
|
|
2143
2143
|
}
|
|
2144
|
-
}),
|
|
2144
|
+
}), Xn = ["title", "aria-label"], Zn = /* @__PURE__ */ p({
|
|
2145
2145
|
__name: "BaseCopyButton",
|
|
2146
2146
|
props: {
|
|
2147
2147
|
text: {},
|
|
@@ -2152,7 +2152,7 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2152
2152
|
},
|
|
2153
2153
|
emits: ["copied", "error"],
|
|
2154
2154
|
setup(e, { emit: t }) {
|
|
2155
|
-
let n = e,
|
|
2155
|
+
let n = e, r = t, { isDark: o } = V(), c = T(!1), l = null, u = i(() => c.value ? "Copied!" : n.label ? `Copy ${n.label}` : "Copy"), d = i(() => n.label ? `Copy ${n.label}` : "Copy"), f = i(() => n.variant === "bordered" ? `inline-flex items-center justify-center w-9 h-9 rounded-lg border transition-colors cursor-pointer shrink-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 ${c.value ? o.value ? "border-emerald-500/40 bg-emerald-500/10 text-emerald-400" : "border-emerald-300 bg-emerald-50 text-emerald-600" : o.value ? "border-gray-600 text-gray-400 hover:text-gray-200 hover:bg-gray-800" : "border-gray-300 text-gray-400 hover:text-gray-600 hover:bg-gray-50"}` : `p-1 rounded transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 ${o.value ? "text-gray-400 hover:text-emerald-300 hover:bg-emerald-500/10" : "text-gray-500 hover:text-emerald-600 hover:bg-emerald-50"}`);
|
|
2156
2156
|
async function p(e) {
|
|
2157
2157
|
try {
|
|
2158
2158
|
if (navigator.clipboard?.writeText) {
|
|
@@ -2169,41 +2169,41 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2169
2169
|
try {
|
|
2170
2170
|
await p(n.text), c.value = !0, l && clearTimeout(l), l = setTimeout(() => {
|
|
2171
2171
|
c.value = !1;
|
|
2172
|
-
}, n.resetMs),
|
|
2172
|
+
}, n.resetMs), r("copied");
|
|
2173
2173
|
} catch (e) {
|
|
2174
|
-
|
|
2174
|
+
r("error", e);
|
|
2175
2175
|
}
|
|
2176
2176
|
}
|
|
2177
|
-
return
|
|
2177
|
+
return x(() => {
|
|
2178
2178
|
l && clearTimeout(l);
|
|
2179
|
-
}), (t, n) => (
|
|
2179
|
+
}), (t, n) => (S(), s("button", {
|
|
2180
2180
|
type: "button",
|
|
2181
2181
|
title: u.value,
|
|
2182
2182
|
"aria-label": d.value,
|
|
2183
|
-
class:
|
|
2183
|
+
class: g(f.value),
|
|
2184
2184
|
onClick: m
|
|
2185
|
-
}, [c.value ? (
|
|
2185
|
+
}, [c.value ? (S(), a(j(pe), {
|
|
2186
2186
|
key: 0,
|
|
2187
|
-
class:
|
|
2187
|
+
class: g(e.iconClass),
|
|
2188
2188
|
"aria-hidden": "true"
|
|
2189
|
-
}, null, 8, ["class"])) : (
|
|
2189
|
+
}, null, 8, ["class"])) : (S(), a(j(me), {
|
|
2190
2190
|
key: 1,
|
|
2191
|
-
class:
|
|
2191
|
+
class: g(e.iconClass),
|
|
2192
2192
|
"aria-hidden": "true"
|
|
2193
|
-
}, null, 8, ["class"]))], 10,
|
|
2193
|
+
}, null, 8, ["class"]))], 10, Xn));
|
|
2194
2194
|
}
|
|
2195
|
-
}),
|
|
2195
|
+
}), Qn = ["disabled", "aria-busy"], $n = {
|
|
2196
2196
|
key: 0,
|
|
2197
2197
|
class: "w-5 h-5 animate-spin shrink-0",
|
|
2198
2198
|
viewBox: "0 0 24 24",
|
|
2199
2199
|
fill: "none",
|
|
2200
2200
|
"aria-hidden": "true"
|
|
2201
|
-
},
|
|
2201
|
+
}, er = {
|
|
2202
2202
|
key: 1,
|
|
2203
2203
|
class: "w-5 h-5 shrink-0",
|
|
2204
2204
|
viewBox: "0 0 48 48",
|
|
2205
2205
|
"aria-hidden": "true"
|
|
2206
|
-
},
|
|
2206
|
+
}, tr = /* @__PURE__ */ p({
|
|
2207
2207
|
__name: "BaseGoogleSignInButton",
|
|
2208
2208
|
props: {
|
|
2209
2209
|
label: { default: "Sign in with Google" },
|
|
@@ -2222,39 +2222,39 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2222
2222
|
},
|
|
2223
2223
|
emits: ["click"],
|
|
2224
2224
|
setup(e, { emit: t }) {
|
|
2225
|
-
let n = e,
|
|
2226
|
-
function
|
|
2227
|
-
|
|
2225
|
+
let n = e, r = t, { isDark: a } = V(), o = i(() => n.disabled || n.loading);
|
|
2226
|
+
function l() {
|
|
2227
|
+
o.value || r("click");
|
|
2228
2228
|
}
|
|
2229
|
-
return (t, n) => (
|
|
2229
|
+
return (t, n) => (S(), s("button", {
|
|
2230
2230
|
type: "button",
|
|
2231
|
-
disabled:
|
|
2231
|
+
disabled: o.value,
|
|
2232
2232
|
"aria-busy": e.loading,
|
|
2233
|
-
onClick:
|
|
2234
|
-
class:
|
|
2235
|
-
}, [e.loading ? (
|
|
2233
|
+
onClick: l,
|
|
2234
|
+
class: g(["inline-flex items-center justify-center gap-3 h-11 px-4 rounded-lg border text-sm font-medium transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 disabled:opacity-60 disabled:cursor-not-allowed", [e.block ? "w-full" : "", j(a) ? "bg-gray-900 border-gray-700 text-gray-100 hover:bg-gray-800" : "bg-white border-gray-300 text-gray-700 hover:bg-gray-50"]])
|
|
2235
|
+
}, [e.loading ? (S(), s("svg", $n, [...n[0] ||= [c("circle", {
|
|
2236
2236
|
class: "opacity-25",
|
|
2237
2237
|
cx: "12",
|
|
2238
2238
|
cy: "12",
|
|
2239
2239
|
r: "10",
|
|
2240
2240
|
stroke: "currentColor",
|
|
2241
2241
|
"stroke-width": "4"
|
|
2242
|
-
}, null, -1),
|
|
2242
|
+
}, null, -1), c("path", {
|
|
2243
2243
|
class: "opacity-75",
|
|
2244
2244
|
fill: "currentColor",
|
|
2245
2245
|
d: "M4 12a8 8 0 0 1 8-8V0C5.4 0 0 5.4 0 12h4z"
|
|
2246
|
-
}, null, -1)]])) : (
|
|
2246
|
+
}, null, -1)]])) : (S(), s("svg", er, [...n[1] ||= [u("<path fill=\"#EA4335\" d=\"M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z\"></path><path fill=\"#4285F4\" d=\"M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z\"></path><path fill=\"#FBBC05\" d=\"M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z\"></path><path fill=\"#34A853\" d=\"M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z\"></path><path fill=\"none\" d=\"M0 0h48v48H0z\"></path>", 5)]])), c("span", null, A(e.label), 1)], 10, Qn));
|
|
2247
2247
|
}
|
|
2248
|
-
}),
|
|
2248
|
+
}), nr = {
|
|
2249
2249
|
key: 0,
|
|
2250
2250
|
class: "flex justify-center mb-6"
|
|
2251
|
-
},
|
|
2251
|
+
}, rr = { class: "mb-6 text-center" }, ir = { class: "flex items-center gap-3 my-5" }, ar = ["disabled"], or = { class: "flex items-center justify-between mb-1.5" }, sr = { class: "relative" }, cr = ["type", "disabled"], lr = ["aria-label", "aria-pressed"], ur = ["disabled"], dr = ["disabled", "aria-busy"], fr = {
|
|
2252
2252
|
key: 0,
|
|
2253
2253
|
class: "w-4 h-4 animate-spin",
|
|
2254
2254
|
viewBox: "0 0 24 24",
|
|
2255
2255
|
fill: "none",
|
|
2256
2256
|
"aria-hidden": "true"
|
|
2257
|
-
},
|
|
2257
|
+
}, pr = /* @__PURE__ */ p({
|
|
2258
2258
|
__name: "BaseLoginForm",
|
|
2259
2259
|
props: {
|
|
2260
2260
|
title: { default: "Sign in" },
|
|
@@ -2280,42 +2280,42 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2280
2280
|
},
|
|
2281
2281
|
emits: ["submit", "google-sign-in"],
|
|
2282
2282
|
setup(t, { emit: n }) {
|
|
2283
|
-
let
|
|
2283
|
+
let r = t, a = n, { isDark: l } = V(), u = J(), p = T(""), m = T(""), h = T(!1), _ = T(!1), v = i(() => r.loading || r.googleLoading);
|
|
2284
2284
|
function y() {
|
|
2285
|
-
v.value ||
|
|
2285
|
+
v.value || a("submit", {
|
|
2286
2286
|
email: p.value,
|
|
2287
2287
|
password: m.value,
|
|
2288
|
-
...
|
|
2288
|
+
...r.showRemember ? { remember: h.value } : {}
|
|
2289
2289
|
});
|
|
2290
2290
|
}
|
|
2291
|
-
return (n, r) => (
|
|
2292
|
-
n.$slots.logo ? (
|
|
2293
|
-
|
|
2291
|
+
return (n, r) => (S(), s("div", { class: g(["w-full max-w-sm mx-auto rounded-xl border shadow-sm p-6 sm:p-8", j(u).card]) }, [
|
|
2292
|
+
n.$slots.logo ? (S(), s("div", nr, [D(n.$slots, "logo")])) : o("", !0),
|
|
2293
|
+
c("div", rr, [c("h1", { class: g(["text-xl font-semibold", j(u).primaryText]) }, A(t.title), 3), t.subtitle ? (S(), s("p", {
|
|
2294
2294
|
key: 0,
|
|
2295
|
-
class:
|
|
2296
|
-
},
|
|
2297
|
-
t.error ? (
|
|
2295
|
+
class: g(["mt-1 text-sm", j(u).mutedText])
|
|
2296
|
+
}, A(t.subtitle), 3)) : o("", !0)]),
|
|
2297
|
+
t.error ? (S(), s("div", {
|
|
2298
2298
|
key: 1,
|
|
2299
2299
|
role: "alert",
|
|
2300
|
-
class:
|
|
2301
|
-
},
|
|
2302
|
-
t.showGoogle ? (
|
|
2300
|
+
class: g(["mb-4 rounded-lg border px-3 py-2 text-sm", j(l) ? "bg-red-500/10 border-red-500/30 text-red-300" : "bg-red-50 border-red-200 text-red-700"])
|
|
2301
|
+
}, A(t.error), 3)) : o("", !0),
|
|
2302
|
+
t.showGoogle ? (S(), s(e, { key: 2 }, [f(tr, {
|
|
2303
2303
|
loading: t.googleLoading,
|
|
2304
2304
|
disabled: t.loading,
|
|
2305
|
-
onClick: r[0] ||= (e) =>
|
|
2306
|
-
}, null, 8, ["loading", "disabled"]),
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
])], 64)) :
|
|
2311
|
-
|
|
2305
|
+
onClick: r[0] ||= (e) => a("google-sign-in")
|
|
2306
|
+
}, null, 8, ["loading", "disabled"]), c("div", ir, [
|
|
2307
|
+
c("span", { class: g(["h-px flex-1", j(l) ? "bg-gray-700" : "bg-gray-200"]) }, null, 2),
|
|
2308
|
+
c("span", { class: g(["text-xs uppercase tracking-wider", j(u).dimTextAlt]) }, "or", 2),
|
|
2309
|
+
c("span", { class: g(["h-px flex-1", j(l) ? "bg-gray-700" : "bg-gray-200"]) }, null, 2)
|
|
2310
|
+
])], 64)) : o("", !0),
|
|
2311
|
+
c("form", {
|
|
2312
2312
|
class: "space-y-4",
|
|
2313
2313
|
onSubmit: L(y, ["prevent"])
|
|
2314
2314
|
}, [
|
|
2315
|
-
|
|
2315
|
+
c("div", null, [c("label", {
|
|
2316
2316
|
for: "login-email",
|
|
2317
|
-
class:
|
|
2318
|
-
}, " Email ", 2), I(
|
|
2317
|
+
class: g(["block mb-1.5 text-sm font-medium", j(u).label])
|
|
2318
|
+
}, " Email ", 2), I(c("input", {
|
|
2319
2319
|
id: "login-email",
|
|
2320
2320
|
"onUpdate:modelValue": r[1] ||= (e) => p.value = e,
|
|
2321
2321
|
type: "email",
|
|
@@ -2324,12 +2324,12 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2324
2324
|
required: "",
|
|
2325
2325
|
disabled: v.value,
|
|
2326
2326
|
placeholder: "you@example.com",
|
|
2327
|
-
class:
|
|
2328
|
-
}, null, 10,
|
|
2329
|
-
|
|
2327
|
+
class: g(["w-full h-11 px-3 rounded-lg border text-sm transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 disabled:opacity-60", j(u).inputWithPlaceholder])
|
|
2328
|
+
}, null, 10, ar), [[N, p.value]])]),
|
|
2329
|
+
c("div", null, [c("div", or, [c("label", {
|
|
2330
2330
|
for: "login-password",
|
|
2331
|
-
class:
|
|
2332
|
-
}, " Password ", 2),
|
|
2331
|
+
class: g(["block text-sm font-medium", j(u).label])
|
|
2332
|
+
}, " Password ", 2), D(n.$slots, "forgot")]), c("div", sr, [I(c("input", {
|
|
2333
2333
|
id: "login-password",
|
|
2334
2334
|
"onUpdate:modelValue": r[2] ||= (e) => m.value = e,
|
|
2335
2335
|
type: _.value ? "text" : "password",
|
|
@@ -2338,51 +2338,51 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2338
2338
|
required: "",
|
|
2339
2339
|
disabled: v.value,
|
|
2340
2340
|
placeholder: "••••••••",
|
|
2341
|
-
class:
|
|
2342
|
-
}, null, 10,
|
|
2341
|
+
class: g(["w-full h-11 pl-3 pr-16 rounded-lg border text-sm transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 disabled:opacity-60", j(u).inputWithPlaceholder])
|
|
2342
|
+
}, null, 10, cr), [[te, m.value]]), c("button", {
|
|
2343
2343
|
type: "button",
|
|
2344
2344
|
onClick: r[3] ||= (e) => _.value = !_.value,
|
|
2345
2345
|
"aria-label": _.value ? "Hide password" : "Show password",
|
|
2346
2346
|
"aria-pressed": _.value,
|
|
2347
|
-
class:
|
|
2348
|
-
},
|
|
2349
|
-
t.showRemember ? (
|
|
2347
|
+
class: g(["absolute inset-y-0 right-0 px-3 text-xs font-medium cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 rounded-r-lg", j(u).mutedText])
|
|
2348
|
+
}, A(_.value ? "Hide" : "Show"), 11, lr)])]),
|
|
2349
|
+
t.showRemember ? (S(), s("label", {
|
|
2350
2350
|
key: 0,
|
|
2351
|
-
class:
|
|
2352
|
-
}, [I(
|
|
2353
|
-
"onUpdate:modelValue": r[4] ||= (e) =>
|
|
2351
|
+
class: g(["flex items-center gap-2 text-sm cursor-pointer select-none", j(u).bodyText])
|
|
2352
|
+
}, [I(c("input", {
|
|
2353
|
+
"onUpdate:modelValue": r[4] ||= (e) => h.value = e,
|
|
2354
2354
|
type: "checkbox",
|
|
2355
2355
|
disabled: v.value,
|
|
2356
2356
|
class: "w-4 h-4 rounded border-gray-300 text-emerald-600 focus:ring-emerald-500"
|
|
2357
|
-
}, null, 8,
|
|
2358
|
-
|
|
2357
|
+
}, null, 8, ur), [[M, h.value]]), r[5] ||= d(" Remember me ", -1)], 2)) : o("", !0),
|
|
2358
|
+
c("button", {
|
|
2359
2359
|
type: "submit",
|
|
2360
2360
|
disabled: v.value,
|
|
2361
2361
|
"aria-busy": t.loading,
|
|
2362
2362
|
class: "inline-flex items-center justify-center gap-2 w-full h-11 px-4 rounded-lg text-sm font-semibold text-white bg-emerald-600 hover:bg-emerald-700 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 disabled:opacity-60 disabled:cursor-not-allowed"
|
|
2363
|
-
}, [t.loading ? (
|
|
2363
|
+
}, [t.loading ? (S(), s("svg", fr, [...r[6] ||= [c("circle", {
|
|
2364
2364
|
class: "opacity-25",
|
|
2365
2365
|
cx: "12",
|
|
2366
2366
|
cy: "12",
|
|
2367
2367
|
r: "10",
|
|
2368
2368
|
stroke: "currentColor",
|
|
2369
2369
|
"stroke-width": "4"
|
|
2370
|
-
}, null, -1),
|
|
2370
|
+
}, null, -1), c("path", {
|
|
2371
2371
|
class: "opacity-75",
|
|
2372
2372
|
fill: "currentColor",
|
|
2373
2373
|
d: "M4 12a8 8 0 0 1 8-8V0C5.4 0 0 5.4 0 12h4z"
|
|
2374
|
-
}, null, -1)]])) :
|
|
2374
|
+
}, null, -1)]])) : o("", !0), d(" " + A(t.submitLabel), 1)], 8, dr)
|
|
2375
2375
|
], 32),
|
|
2376
|
-
n.$slots.footer ? (
|
|
2376
|
+
n.$slots.footer ? (S(), s("div", {
|
|
2377
2377
|
key: 3,
|
|
2378
|
-
class:
|
|
2379
|
-
}, [
|
|
2378
|
+
class: g(["mt-6 text-center text-sm", j(u).mutedText])
|
|
2379
|
+
}, [D(n.$slots, "footer")], 2)) : o("", !0)
|
|
2380
2380
|
], 2));
|
|
2381
2381
|
}
|
|
2382
|
-
}),
|
|
2382
|
+
}), mr = ["aria-label"], hr = { class: "flex-1 overflow-y-auto" }, gr = {
|
|
2383
2383
|
key: 0,
|
|
2384
2384
|
class: "flex flex-col items-center justify-center text-center px-6 py-16 gap-3"
|
|
2385
|
-
},
|
|
2385
|
+
}, _r = ["onClick"], vr = { class: "min-w-0 flex-1" }, yr = { class: "flex items-baseline justify-between gap-2" }, br = /* @__PURE__ */ p({
|
|
2386
2386
|
__name: "BaseNotificationPanel",
|
|
2387
2387
|
props: {
|
|
2388
2388
|
title: { default: "Notifications" },
|
|
@@ -2393,86 +2393,86 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2393
2393
|
}
|
|
2394
2394
|
},
|
|
2395
2395
|
emits: ["select"],
|
|
2396
|
-
setup(
|
|
2397
|
-
let
|
|
2396
|
+
setup(n, { emit: l }) {
|
|
2397
|
+
let u = l, { isDark: p } = V(), m = J(), { notifications: h, unreadCount: _, open: v, closePanel: y, markAllRead: b, markRead: x } = pn(), C = {
|
|
2398
2398
|
info: "bg-sky-500",
|
|
2399
2399
|
success: "bg-emerald-500",
|
|
2400
2400
|
warning: "bg-amber-500",
|
|
2401
2401
|
error: "bg-red-500"
|
|
2402
|
-
}, w =
|
|
2403
|
-
function
|
|
2404
|
-
|
|
2402
|
+
}, w = i(() => h.value.length);
|
|
2403
|
+
function T(e) {
|
|
2404
|
+
x(e), u("select", e);
|
|
2405
2405
|
}
|
|
2406
|
-
return
|
|
2406
|
+
return Ft(() => {
|
|
2407
2407
|
v.value && y();
|
|
2408
|
-
}), (
|
|
2408
|
+
}), (i, l) => (S(), a(t, { to: "body" }, [f(r, {
|
|
2409
2409
|
"enter-active-class": "transition-opacity duration-200",
|
|
2410
2410
|
"enter-from-class": "opacity-0",
|
|
2411
2411
|
"leave-active-class": "transition-opacity duration-200",
|
|
2412
2412
|
"leave-to-class": "opacity-0"
|
|
2413
2413
|
}, {
|
|
2414
|
-
default: F(() => [
|
|
2414
|
+
default: F(() => [j(v) ? (S(), s("div", {
|
|
2415
2415
|
key: 0,
|
|
2416
2416
|
class: "fixed inset-0 z-[60] bg-black/50",
|
|
2417
2417
|
"aria-hidden": "true",
|
|
2418
|
-
onClick: l[0] ||= (...e) =>
|
|
2419
|
-
})) :
|
|
2418
|
+
onClick: l[0] ||= (...e) => j(y) && j(y)(...e)
|
|
2419
|
+
})) : o("", !0)]),
|
|
2420
2420
|
_: 1
|
|
2421
|
-
}),
|
|
2421
|
+
}), f(r, {
|
|
2422
2422
|
"enter-active-class": "transition-transform duration-300 ease-out",
|
|
2423
2423
|
"enter-from-class": "-translate-x-full",
|
|
2424
2424
|
"leave-active-class": "transition-transform duration-300 ease-in",
|
|
2425
2425
|
"leave-to-class": "-translate-x-full"
|
|
2426
2426
|
}, {
|
|
2427
|
-
default: F(() => [
|
|
2427
|
+
default: F(() => [j(v) ? (S(), s("aside", {
|
|
2428
2428
|
key: 0,
|
|
2429
2429
|
role: "dialog",
|
|
2430
2430
|
"aria-modal": "true",
|
|
2431
|
-
"aria-label":
|
|
2432
|
-
class:
|
|
2431
|
+
"aria-label": n.title,
|
|
2432
|
+
class: g(["fixed top-0 left-0 z-[70] h-screen w-full max-w-sm flex flex-col border-r shadow-xl", j(p) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200"])
|
|
2433
2433
|
}, [
|
|
2434
|
-
|
|
2434
|
+
c("div", { class: g(["flex items-center justify-between gap-3 px-5 py-4 border-b shrink-0", j(m).border]) }, [c("h2", { class: g(["text-lg font-semibold flex items-center gap-2", j(m).primaryText]) }, [d(A(n.title) + " ", 1), c("span", { class: g(["text-sm font-normal", j(m).dimTextAlt]) }, "— " + A(w.value), 3)], 2), c("button", {
|
|
2435
2435
|
type: "button",
|
|
2436
|
-
onClick: l[1] ||= (...e) =>
|
|
2436
|
+
onClick: l[1] ||= (...e) => j(y) && j(y)(...e),
|
|
2437
2437
|
"aria-label": "Close notifications",
|
|
2438
|
-
class:
|
|
2439
|
-
}, [
|
|
2438
|
+
class: g(["p-1.5 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", j(p) ? "text-gray-400 hover:bg-gray-800" : "text-gray-500 hover:bg-gray-100"])
|
|
2439
|
+
}, [f(j(we), {
|
|
2440
2440
|
class: "w-5 h-5",
|
|
2441
2441
|
"aria-hidden": "true"
|
|
2442
2442
|
})], 2)], 2),
|
|
2443
|
-
|
|
2443
|
+
n.showMarkAllRead && j(_) > 0 ? (S(), s("div", {
|
|
2444
2444
|
key: 0,
|
|
2445
|
-
class:
|
|
2446
|
-
}, [
|
|
2445
|
+
class: g(["px-5 py-2 border-b shrink-0 flex justify-end", j(m).border])
|
|
2446
|
+
}, [c("button", {
|
|
2447
2447
|
type: "button",
|
|
2448
|
-
onClick: l[2] ||= (...e) =>
|
|
2449
|
-
class:
|
|
2450
|
-
}, " Mark all as read ", 2)], 2)) :
|
|
2451
|
-
|
|
2452
|
-
class:
|
|
2448
|
+
onClick: l[2] ||= (...e) => j(b) && j(b)(...e),
|
|
2449
|
+
class: g(["text-xs font-medium cursor-pointer transition-colors focus:outline-none focus-visible:underline", j(m).emeraldText])
|
|
2450
|
+
}, " Mark all as read ", 2)], 2)) : o("", !0),
|
|
2451
|
+
c("div", hr, [w.value === 0 ? (S(), s("div", gr, [f(j(se), {
|
|
2452
|
+
class: g(["w-10 h-10", j(m).illustration]),
|
|
2453
2453
|
"aria-hidden": "true"
|
|
2454
|
-
}, null, 8, ["class"]),
|
|
2454
|
+
}, null, 8, ["class"]), c("p", { class: g(["text-sm", j(m).mutedText]) }, A(n.emptyText), 3)])) : (S(), s("ul", {
|
|
2455
2455
|
key: 1,
|
|
2456
|
-
class:
|
|
2457
|
-
}, [(
|
|
2456
|
+
class: g(["divide-y", j(p) ? "divide-gray-800" : "divide-gray-100"])
|
|
2457
|
+
}, [(S(!0), s(e, null, E(j(h), (e) => (S(), s("li", { key: e.id }, [c("button", {
|
|
2458
2458
|
type: "button",
|
|
2459
|
-
onClick: (t) =>
|
|
2460
|
-
class:
|
|
2461
|
-
}, [
|
|
2462
|
-
class:
|
|
2459
|
+
onClick: (t) => T(e.id),
|
|
2460
|
+
class: g(["w-full text-left px-5 py-4 flex gap-3 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500", [e.read ? "" : j(p) ? "bg-emerald-500/5" : "bg-emerald-50/60", j(p) ? "hover:bg-gray-800" : "hover:bg-gray-50"]])
|
|
2461
|
+
}, [c("span", {
|
|
2462
|
+
class: g(["mt-1.5 w-2 h-2 rounded-full shrink-0", e.read ? j(p) ? "bg-gray-700" : "bg-gray-300" : C[e.type ?? "info"]]),
|
|
2463
2463
|
"aria-hidden": "true"
|
|
2464
|
-
}, null, 2),
|
|
2464
|
+
}, null, 2), c("span", vr, [c("span", yr, [c("span", { class: g(["text-sm truncate", [e.read ? "font-medium" : "font-semibold", j(m).primaryTextSoft]]) }, A(e.title), 3), e.time ? (S(), s("span", {
|
|
2465
2465
|
key: 0,
|
|
2466
|
-
class:
|
|
2467
|
-
},
|
|
2466
|
+
class: g(["text-xs shrink-0", j(m).dimText])
|
|
2467
|
+
}, A(e.time), 3)) : o("", !0)]), e.message ? (S(), s("span", {
|
|
2468
2468
|
key: 0,
|
|
2469
|
-
class:
|
|
2470
|
-
},
|
|
2471
|
-
], 10,
|
|
2469
|
+
class: g(["mt-0.5 block text-sm", j(m).mutedText])
|
|
2470
|
+
}, A(e.message), 3)) : o("", !0)])], 10, _r)]))), 128))], 2))])
|
|
2471
|
+
], 10, mr)) : o("", !0)]),
|
|
2472
2472
|
_: 1
|
|
2473
2473
|
})]));
|
|
2474
2474
|
}
|
|
2475
|
-
}),
|
|
2475
|
+
}), xr = ["disabled"], Sr = /* @__PURE__ */ p({
|
|
2476
2476
|
__name: "BaseChipButton",
|
|
2477
2477
|
props: {
|
|
2478
2478
|
size: { default: "sm" },
|
|
@@ -2484,55 +2484,55 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2484
2484
|
emits: ["click"],
|
|
2485
2485
|
setup(e, { emit: t }) {
|
|
2486
2486
|
let n = t, { isDark: r } = V();
|
|
2487
|
-
return (t, i) => (
|
|
2487
|
+
return (t, i) => (S(), s("button", {
|
|
2488
2488
|
type: "button",
|
|
2489
2489
|
disabled: e.disabled,
|
|
2490
|
-
class:
|
|
2490
|
+
class: g(["inline-flex items-center gap-1 font-medium rounded-md border transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [e.size === "xs" ? "text-xs px-2 py-0.5" : "text-xs px-2.5 py-1", j(r) ? "text-emerald-300 border-emerald-700 bg-emerald-900/30 hover:bg-emerald-800/50" : "text-emerald-700 border-emerald-200 bg-emerald-50 hover:bg-emerald-100"]]),
|
|
2491
2491
|
onClick: i[0] ||= (e) => n("click")
|
|
2492
|
-
}, [
|
|
2492
|
+
}, [D(t.$slots, "default")], 10, xr));
|
|
2493
2493
|
}
|
|
2494
|
-
}),
|
|
2494
|
+
}), Cr = /* @__PURE__ */ p({
|
|
2495
2495
|
__name: "BaseRemoveButton",
|
|
2496
2496
|
emits: ["click"],
|
|
2497
2497
|
setup(e, { emit: t }) {
|
|
2498
2498
|
let n = t;
|
|
2499
|
-
return (e, t) => (
|
|
2499
|
+
return (e, t) => (S(), s("button", {
|
|
2500
2500
|
type: "button",
|
|
2501
2501
|
class: "px-2 text-lg leading-none text-red-400 hover:text-red-600 transition-colors cursor-pointer rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-red-400 disabled:cursor-not-allowed disabled:text-gray-400 disabled:hover:text-gray-400",
|
|
2502
2502
|
onClick: t[0] ||= (e) => n("click")
|
|
2503
2503
|
}, " × "));
|
|
2504
2504
|
}
|
|
2505
|
-
}),
|
|
2505
|
+
}), wr = { class: "relative flex h-2 w-2" }, Tr = {
|
|
2506
2506
|
key: 0,
|
|
2507
2507
|
class: "animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75",
|
|
2508
2508
|
"aria-hidden": "true"
|
|
2509
|
-
},
|
|
2509
|
+
}, Er = /* @__PURE__ */ p({
|
|
2510
2510
|
__name: "BaseStatusPill",
|
|
2511
2511
|
props: {
|
|
2512
2512
|
status: {},
|
|
2513
2513
|
label: {}
|
|
2514
2514
|
},
|
|
2515
2515
|
setup(e) {
|
|
2516
|
-
let t = e, { isDark: n } = V(),
|
|
2516
|
+
let t = e, { isDark: n } = V(), r = i(() => {
|
|
2517
2517
|
switch (t.status) {
|
|
2518
2518
|
case "ok": return n.value ? "bg-emerald-500/10 text-emerald-400" : "bg-emerald-50 text-emerald-700";
|
|
2519
2519
|
case "error": return n.value ? "bg-red-500/10 text-red-400" : "bg-red-50 text-red-700";
|
|
2520
2520
|
default: return n.value ? "bg-gray-700 text-gray-400" : "bg-gray-100 text-gray-500";
|
|
2521
2521
|
}
|
|
2522
|
-
}),
|
|
2522
|
+
}), a = i(() => {
|
|
2523
2523
|
switch (t.status) {
|
|
2524
2524
|
case "ok": return "bg-emerald-500";
|
|
2525
2525
|
case "error": return "bg-red-500";
|
|
2526
2526
|
default: return "bg-gray-400";
|
|
2527
2527
|
}
|
|
2528
2528
|
});
|
|
2529
|
-
return (t, n) => (
|
|
2529
|
+
return (t, n) => (S(), s("div", { class: g(["flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs", r.value]) }, [c("span", wr, [e.status === "ok" ? (S(), s("span", Tr)) : o("", !0), c("span", { class: g(["relative inline-flex rounded-full h-2 w-2", a.value]) }, null, 2)]), d(" " + A(e.label), 1)], 2));
|
|
2530
2530
|
}
|
|
2531
|
-
}),
|
|
2531
|
+
}), Dr = { class: "text-sm font-medium" }, Or = [
|
|
2532
2532
|
"accept",
|
|
2533
2533
|
"multiple",
|
|
2534
2534
|
"disabled"
|
|
2535
|
-
],
|
|
2535
|
+
], kr = /* @__PURE__ */ p({
|
|
2536
2536
|
__name: "BaseFileDropzone",
|
|
2537
2537
|
props: {
|
|
2538
2538
|
label: {},
|
|
@@ -2549,53 +2549,53 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2549
2549
|
},
|
|
2550
2550
|
emits: ["files"],
|
|
2551
2551
|
setup(e, { emit: t }) {
|
|
2552
|
-
let n = e, r = t, { isDark: i } = V(),
|
|
2552
|
+
let n = e, r = t, { isDark: i } = V(), a = T(!1);
|
|
2553
2553
|
function l(e) {
|
|
2554
2554
|
let t = e.target, n = Array.from(t.files ?? []);
|
|
2555
2555
|
t.value = "", n.length && r("files", n);
|
|
2556
2556
|
}
|
|
2557
2557
|
function u() {
|
|
2558
|
-
n.disabled || (
|
|
2558
|
+
n.disabled || (a.value = !0);
|
|
2559
2559
|
}
|
|
2560
2560
|
function d(e) {
|
|
2561
|
-
if (
|
|
2561
|
+
if (a.value = !1, n.disabled) return;
|
|
2562
2562
|
let t = Array.from(e.dataTransfer?.files ?? []);
|
|
2563
2563
|
t.length && r("files", n.multiple ? t : t.slice(0, 1));
|
|
2564
2564
|
}
|
|
2565
|
-
return (t, n) => (
|
|
2566
|
-
class:
|
|
2565
|
+
return (t, n) => (S(), s("label", {
|
|
2566
|
+
class: g(["flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed px-6 py-10 text-center transition-colors", [e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer", a.value ? j(i) ? "border-emerald-500 text-emerald-400" : "border-emerald-500 text-emerald-600" : j(i) ? "border-gray-700 hover:border-emerald-500 text-gray-400 hover:text-emerald-400" : "border-gray-300 hover:border-emerald-500 text-gray-500 hover:text-emerald-600"]]),
|
|
2567
2567
|
onDragover: L(u, ["prevent"]),
|
|
2568
|
-
onDragleave: n[0] ||= L((e) =>
|
|
2568
|
+
onDragleave: n[0] ||= L((e) => a.value = !1, ["prevent"]),
|
|
2569
2569
|
onDrop: L(d, ["prevent"])
|
|
2570
2570
|
}, [
|
|
2571
|
-
|
|
2571
|
+
D(t.$slots, "icon", {}, () => [n[1] ||= c("svg", {
|
|
2572
2572
|
class: "w-10 h-10",
|
|
2573
2573
|
fill: "none",
|
|
2574
2574
|
viewBox: "0 0 24 24",
|
|
2575
2575
|
stroke: "currentColor",
|
|
2576
2576
|
"stroke-width": "1.5",
|
|
2577
2577
|
"aria-hidden": "true"
|
|
2578
|
-
}, [
|
|
2578
|
+
}, [c("path", {
|
|
2579
2579
|
"stroke-linecap": "round",
|
|
2580
2580
|
"stroke-linejoin": "round",
|
|
2581
2581
|
d: "M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m6.75 12-3-3m0 0-3 3m3-3v6m-1.5-15H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"
|
|
2582
2582
|
})], -1)]),
|
|
2583
|
-
|
|
2584
|
-
e.hint ? (
|
|
2583
|
+
c("p", Dr, A(e.label), 1),
|
|
2584
|
+
e.hint ? (S(), s("p", {
|
|
2585
2585
|
key: 0,
|
|
2586
|
-
class:
|
|
2587
|
-
},
|
|
2588
|
-
|
|
2586
|
+
class: g(["text-xs", j(i) ? "text-gray-500" : "text-gray-400"])
|
|
2587
|
+
}, A(e.hint), 3)) : o("", !0),
|
|
2588
|
+
c("input", {
|
|
2589
2589
|
type: "file",
|
|
2590
2590
|
class: "hidden",
|
|
2591
2591
|
accept: e.accept,
|
|
2592
2592
|
multiple: e.multiple,
|
|
2593
2593
|
disabled: e.disabled,
|
|
2594
2594
|
onChange: l
|
|
2595
|
-
}, null, 40,
|
|
2595
|
+
}, null, 40, Or)
|
|
2596
2596
|
], 34));
|
|
2597
2597
|
}
|
|
2598
|
-
}),
|
|
2598
|
+
}), Ar = /* @__PURE__ */ p({
|
|
2599
2599
|
__name: "BaseCodeBlock",
|
|
2600
2600
|
props: {
|
|
2601
2601
|
code: {},
|
|
@@ -2604,7 +2604,7 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2604
2604
|
maxHeightClass: { default: "" }
|
|
2605
2605
|
},
|
|
2606
2606
|
setup(e) {
|
|
2607
|
-
let t = e, { isDark: n } = V(),
|
|
2607
|
+
let t = e, { isDark: n } = V(), r = {
|
|
2608
2608
|
soft: {
|
|
2609
2609
|
dark: "bg-gray-800/70 text-gray-300",
|
|
2610
2610
|
light: "bg-gray-100 text-gray-700"
|
|
@@ -2616,17 +2616,17 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2616
2616
|
}, a = {
|
|
2617
2617
|
sm: "text-sm px-5 py-4 rounded-lg",
|
|
2618
2618
|
xs: "text-xs p-3 rounded-lg"
|
|
2619
|
-
},
|
|
2620
|
-
let e =
|
|
2619
|
+
}, o = i(() => {
|
|
2620
|
+
let e = r[t.variant];
|
|
2621
2621
|
return n.value ? e.dark : e.light;
|
|
2622
|
-
}), c =
|
|
2623
|
-
return (t, n) => (
|
|
2622
|
+
}), c = i(() => a[t.size]);
|
|
2623
|
+
return (t, n) => (S(), s("pre", { class: g(["font-mono overflow-auto", [
|
|
2624
2624
|
c.value,
|
|
2625
|
-
|
|
2625
|
+
o.value,
|
|
2626
2626
|
e.maxHeightClass
|
|
2627
|
-
]]) },
|
|
2627
|
+
]]) }, A(e.code), 3));
|
|
2628
2628
|
}
|
|
2629
|
-
}),
|
|
2629
|
+
}), jr = ["value", "type"], Q = /* @__PURE__ */ p({
|
|
2630
2630
|
__name: "BaseInput",
|
|
2631
2631
|
props: {
|
|
2632
2632
|
modelValue: { default: "" },
|
|
@@ -2643,14 +2643,14 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2643
2643
|
function r(e) {
|
|
2644
2644
|
n("update:modelValue", e.target.value);
|
|
2645
2645
|
}
|
|
2646
|
-
return (t, n) => (
|
|
2646
|
+
return (t, n) => (S(), s("input", {
|
|
2647
2647
|
value: e.modelValue,
|
|
2648
2648
|
type: e.type,
|
|
2649
|
-
class:
|
|
2649
|
+
class: g(["rounded border border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-900 text-slate-900 dark:text-slate-100 text-sm placeholder:text-slate-400 dark:placeholder:text-slate-500 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:border-emerald-500 disabled:opacity-60 disabled:cursor-not-allowed", [e.block ? "w-full" : "", e.size === "sm" ? "px-2 py-1.5" : "px-3 py-2"]]),
|
|
2650
2650
|
onInput: r
|
|
2651
|
-
}, null, 42,
|
|
2651
|
+
}, null, 42, jr));
|
|
2652
2652
|
}
|
|
2653
|
-
}),
|
|
2653
|
+
}), Mr = ["value"], Nr = /* @__PURE__ */ p({
|
|
2654
2654
|
__name: "BaseSelect",
|
|
2655
2655
|
props: {
|
|
2656
2656
|
modelValue: { default: void 0 },
|
|
@@ -2666,17 +2666,17 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2666
2666
|
function r(e) {
|
|
2667
2667
|
n("update:modelValue", e.target.value);
|
|
2668
2668
|
}
|
|
2669
|
-
return (t, n) => (
|
|
2669
|
+
return (t, n) => (S(), s("select", {
|
|
2670
2670
|
value: e.modelValue,
|
|
2671
|
-
class:
|
|
2671
|
+
class: g(["rounded border border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-900 text-slate-900 dark:text-slate-100 text-sm cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:border-emerald-500 disabled:opacity-60 disabled:cursor-not-allowed", [e.block ? "w-full" : "", e.size === "md" ? "px-3 py-2" : "px-2 py-1.5"]]),
|
|
2672
2672
|
onChange: r
|
|
2673
|
-
}, [
|
|
2673
|
+
}, [D(t.$slots, "default")], 42, Mr));
|
|
2674
2674
|
}
|
|
2675
|
-
}),
|
|
2675
|
+
}), Pr = [
|
|
2676
2676
|
"disabled",
|
|
2677
2677
|
"aria-label",
|
|
2678
2678
|
"aria-expanded"
|
|
2679
|
-
],
|
|
2679
|
+
], Fr = ["aria-label"], Ir = ["aria-selected", "title"], Lr = ["disabled", "onClick"], Rr = /* @__PURE__ */ p({
|
|
2680
2680
|
__name: "BaseDropdown",
|
|
2681
2681
|
props: {
|
|
2682
2682
|
options: {},
|
|
@@ -2697,59 +2697,59 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2697
2697
|
},
|
|
2698
2698
|
emits: ["update:modelValue"],
|
|
2699
2699
|
setup(t, { emit: n }) {
|
|
2700
|
-
let
|
|
2700
|
+
let r = t, a = n, l = T(!1), u = T(null), d = i(() => r.options.find((e) => e.value === r.modelValue) ?? null), p = i(() => r.triggerClass ? "flex items-center justify-between gap-2 text-left transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed " + r.triggerClass : "flex items-center justify-between gap-2 text-left transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed rounded-lg border text-sm border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-900 text-slate-700 dark:text-slate-100 hover:bg-slate-50 dark:hover:bg-slate-800 " + (r.size === "sm" ? "px-3 py-2" : "px-4 py-2.5"));
|
|
2701
2701
|
function m(e) {
|
|
2702
|
-
return `block w-full px-4 py-2 text-left text-sm transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500 disabled:opacity-50 disabled:cursor-not-allowed ${e.value ===
|
|
2702
|
+
return `block w-full px-4 py-2 text-left text-sm transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500 disabled:opacity-50 disabled:cursor-not-allowed ${e.value === r.modelValue ? "bg-emerald-500 text-white" : "text-slate-700 dark:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800"}`;
|
|
2703
2703
|
}
|
|
2704
|
-
function
|
|
2705
|
-
|
|
2704
|
+
function h() {
|
|
2705
|
+
r.disabled || (l.value = !l.value);
|
|
2706
2706
|
}
|
|
2707
|
-
function
|
|
2708
|
-
e.disabled || (
|
|
2707
|
+
function _(e) {
|
|
2708
|
+
e.disabled || (a("update:modelValue", e.value), l.value = !1);
|
|
2709
2709
|
}
|
|
2710
|
-
|
|
2710
|
+
Ft(() => {
|
|
2711
2711
|
l.value = !1;
|
|
2712
2712
|
});
|
|
2713
2713
|
function b(e) {
|
|
2714
2714
|
l.value && u.value && !u.value.contains(e.target) && (l.value = !1);
|
|
2715
2715
|
}
|
|
2716
|
-
return
|
|
2716
|
+
return y(() => document.addEventListener("click", b)), v(() => document.removeEventListener("click", b)), (n, r) => (S(), s("div", {
|
|
2717
2717
|
ref_key: "rootEl",
|
|
2718
2718
|
ref: u,
|
|
2719
|
-
class:
|
|
2720
|
-
}, [
|
|
2719
|
+
class: g(t.block ? "relative w-full" : "relative inline-block")
|
|
2720
|
+
}, [c("button", {
|
|
2721
2721
|
type: "button",
|
|
2722
|
-
class:
|
|
2722
|
+
class: g([p.value, t.block ? "w-full" : ""]),
|
|
2723
2723
|
disabled: t.disabled,
|
|
2724
2724
|
"aria-label": t.ariaLabel || void 0,
|
|
2725
2725
|
"aria-haspopup": "listbox",
|
|
2726
2726
|
"aria-expanded": l.value,
|
|
2727
|
-
onClick:
|
|
2728
|
-
}, [
|
|
2729
|
-
class:
|
|
2727
|
+
onClick: h
|
|
2728
|
+
}, [c("span", { class: g(["min-w-0 truncate", d.value ? "" : "text-slate-400 dark:text-slate-500"]) }, A(d.value ? d.value.label : t.placeholder), 3), f(j(de), {
|
|
2729
|
+
class: g(["shrink-0 transition-transform", [t.chevronClass, l.value ? "rotate-180" : ""]]),
|
|
2730
2730
|
"aria-hidden": "true"
|
|
2731
|
-
}, null, 8, ["class"])], 10,
|
|
2731
|
+
}, null, 8, ["class"])], 10, Pr), l.value ? (S(), s("ul", {
|
|
2732
2732
|
key: 0,
|
|
2733
2733
|
role: "listbox",
|
|
2734
2734
|
"aria-label": t.ariaLabel || t.placeholder,
|
|
2735
2735
|
class: "absolute z-20 mt-1 w-full min-w-max max-w-xs max-h-60 overflow-auto rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-900 py-1 shadow-lg focus:outline-none"
|
|
2736
|
-
}, [(
|
|
2736
|
+
}, [(S(!0), s(e, null, E(t.options, (e) => (S(), s("li", {
|
|
2737
2737
|
key: String(e.value),
|
|
2738
2738
|
role: "option",
|
|
2739
2739
|
"aria-selected": e.value === t.modelValue,
|
|
2740
2740
|
title: e.title
|
|
2741
|
-
}, [
|
|
2741
|
+
}, [c("button", {
|
|
2742
2742
|
type: "button",
|
|
2743
2743
|
disabled: e.disabled,
|
|
2744
|
-
class:
|
|
2745
|
-
onClick: (t) =>
|
|
2746
|
-
},
|
|
2744
|
+
class: g(m(e)),
|
|
2745
|
+
onClick: (t) => _(e)
|
|
2746
|
+
}, A(e.label), 11, Lr)], 8, Ir))), 128))], 8, Fr)) : o("", !0)], 2));
|
|
2747
2747
|
}
|
|
2748
|
-
}),
|
|
2748
|
+
}), zr = ["role", "aria-label"], Br = [
|
|
2749
2749
|
"aria-pressed",
|
|
2750
2750
|
"title",
|
|
2751
2751
|
"onClick"
|
|
2752
|
-
],
|
|
2752
|
+
], Vr = "bg-slate-50 dark:bg-slate-900 text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800", Hr = /* @__PURE__ */ p({
|
|
2753
2753
|
__name: "BaseSegmentedControl",
|
|
2754
2754
|
props: {
|
|
2755
2755
|
options: {},
|
|
@@ -2763,25 +2763,25 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2763
2763
|
},
|
|
2764
2764
|
emits: ["update:modelValue"],
|
|
2765
2765
|
setup(t, { emit: n }) {
|
|
2766
|
-
let
|
|
2766
|
+
let r = t, a = n, o = i(() => r.variant === "toolbar" ? "inline-flex h-9 divide-x divide-slate-300 dark:divide-slate-600 rounded-md border border-slate-300 dark:border-slate-600 overflow-hidden" : "inline-flex rounded border border-slate-300 dark:border-slate-600 overflow-hidden"), c = i(() => r.variant === "toolbar" ? "flex items-center px-3.5 text-xs font-semibold uppercase tracking-wide transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500" : `${r.variant === "wide" ? "px-4 py-2" : "px-3 py-2"} text-sm font-medium transition-colors cursor-pointer border-l first:border-l-0 border-slate-300 dark:border-slate-600 focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500`), l = i(() => r.variant === "wide" ? "bg-emerald-600 text-white" : "bg-emerald-500 text-white");
|
|
2767
2767
|
function u(e) {
|
|
2768
|
-
let t = e.value ===
|
|
2769
|
-
return
|
|
2768
|
+
let t = e.value === r.modelValue;
|
|
2769
|
+
return r.optionClass ? r.optionClass(e, t) : t ? l.value : Vr;
|
|
2770
2770
|
}
|
|
2771
|
-
return (n, r) => (
|
|
2771
|
+
return (n, r) => (S(), s("div", {
|
|
2772
2772
|
role: t.ariaLabel ? "group" : void 0,
|
|
2773
2773
|
"aria-label": t.ariaLabel || void 0,
|
|
2774
|
-
class:
|
|
2775
|
-
}, [(
|
|
2774
|
+
class: g(o.value)
|
|
2775
|
+
}, [(S(!0), s(e, null, E(t.options, (e) => (S(), s("button", {
|
|
2776
2776
|
key: String(e.value),
|
|
2777
2777
|
type: "button",
|
|
2778
|
-
class:
|
|
2778
|
+
class: g([c.value, u(e)]),
|
|
2779
2779
|
"aria-pressed": e.value === t.modelValue,
|
|
2780
2780
|
title: e.title,
|
|
2781
2781
|
onClick: (t) => a("update:modelValue", e.value)
|
|
2782
|
-
},
|
|
2782
|
+
}, A(e.label), 11, Br))), 128))], 10, zr));
|
|
2783
2783
|
}
|
|
2784
|
-
}),
|
|
2784
|
+
}), Ur = { class: "w-full text-sm" }, Wr = { class: "bg-slate-50 dark:bg-slate-800/60 text-slate-600 dark:text-slate-300" }, Gr = { class: "text-left" }, Kr = { key: 0 }, qr = ["colspan"], Jr = /* @__PURE__ */ p({
|
|
2785
2785
|
__name: "BaseTable",
|
|
2786
2786
|
props: {
|
|
2787
2787
|
columns: {},
|
|
@@ -2792,24 +2792,24 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2792
2792
|
emptyText: { default: "No rows." }
|
|
2793
2793
|
},
|
|
2794
2794
|
setup(t) {
|
|
2795
|
-
return (n, r) => (
|
|
2795
|
+
return (n, r) => (S(), s("table", Ur, [c("thead", Wr, [c("tr", Gr, [(S(!0), s(e, null, E(t.columns, (e, t) => (S(), s("th", {
|
|
2796
2796
|
key: t,
|
|
2797
|
-
class:
|
|
2798
|
-
},
|
|
2797
|
+
class: g(["px-4 py-3", e.align === "right" ? "text-right" : ""])
|
|
2798
|
+
}, A(e.label), 3))), 128))])]), c("tbody", null, [t.empty ? (S(), s("tr", Kr, [c("td", {
|
|
2799
2799
|
colspan: t.columns.length,
|
|
2800
2800
|
class: "px-4 py-12 text-center text-slate-500"
|
|
2801
|
-
}, [
|
|
2801
|
+
}, [D(n.$slots, "empty", {}, () => [d(A(t.emptyText), 1)])], 8, qr)])) : o("", !0), D(n.$slots, "default")])]));
|
|
2802
2802
|
}
|
|
2803
|
-
}),
|
|
2803
|
+
}), Yr = { class: "grid gap-3 md:grid-cols-2" }, Xr = {
|
|
2804
2804
|
key: 0,
|
|
2805
2805
|
class: "block text-[11px] uppercase tracking-wide text-slate-500 mb-1"
|
|
2806
|
-
},
|
|
2806
|
+
}, Zr = ["value"], Qr = {
|
|
2807
2807
|
key: 2,
|
|
2808
2808
|
class: "flex items-center gap-2 mt-4"
|
|
2809
|
-
},
|
|
2809
|
+
}, $r = ["checked", "onChange"], ei = { class: "text-sm text-slate-900 dark:text-slate-100" }, ti = {
|
|
2810
2810
|
key: 4,
|
|
2811
2811
|
class: "text-[11px] text-slate-400 mt-1"
|
|
2812
|
-
},
|
|
2812
|
+
}, ni = /* @__PURE__ */ p({
|
|
2813
2813
|
__name: "BaseSpecFields",
|
|
2814
2814
|
props: {
|
|
2815
2815
|
specs: {},
|
|
@@ -2818,7 +2818,7 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2818
2818
|
emits: ["update"],
|
|
2819
2819
|
setup(t, { emit: n }) {
|
|
2820
2820
|
let r = n;
|
|
2821
|
-
function
|
|
2821
|
+
function i(e, t) {
|
|
2822
2822
|
r("update", e, t.target.checked);
|
|
2823
2823
|
}
|
|
2824
2824
|
function l(e, t) {
|
|
@@ -2836,24 +2836,24 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2836
2836
|
let t = e.clipboardData?.getData("text") ?? "";
|
|
2837
2837
|
/^-?\d*$/.test(t.trim()) || e.preventDefault();
|
|
2838
2838
|
}
|
|
2839
|
-
return (n, f) => (
|
|
2840
|
-
f.type === "boolean" ?
|
|
2841
|
-
f.type === "select" ? (
|
|
2839
|
+
return (n, f) => (S(), s("div", Yr, [(S(!0), s(e, null, E(t.specs, (f) => (S(), s("div", { key: f.key }, [
|
|
2840
|
+
f.type === "boolean" ? o("", !0) : (S(), s("label", Xr, A(f.label), 1)),
|
|
2841
|
+
f.type === "select" ? (S(), a(Nr, {
|
|
2842
2842
|
key: 1,
|
|
2843
2843
|
modelValue: String(t.params[f.key] ?? ""),
|
|
2844
2844
|
"onUpdate:modelValue": (e) => r("update", f.key, e)
|
|
2845
2845
|
}, {
|
|
2846
|
-
default: F(() => [(
|
|
2846
|
+
default: F(() => [(S(!0), s(e, null, E(f.options ?? [], (e) => (S(), s("option", {
|
|
2847
2847
|
key: e,
|
|
2848
2848
|
value: e
|
|
2849
|
-
},
|
|
2849
|
+
}, A(e), 9, Zr))), 128))]),
|
|
2850
2850
|
_: 2
|
|
2851
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) : f.type === "boolean" ? (
|
|
2851
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : f.type === "boolean" ? (S(), s("label", Qr, [c("input", {
|
|
2852
2852
|
checked: !!t.params[f.key],
|
|
2853
2853
|
type: "checkbox",
|
|
2854
2854
|
class: "h-4 w-4",
|
|
2855
|
-
onChange: (e) =>
|
|
2856
|
-
}, null, 40,
|
|
2855
|
+
onChange: (e) => i(f.key, e)
|
|
2856
|
+
}, null, 40, $r), c("span", ei, A(f.label), 1)])) : (S(), a(Q, {
|
|
2857
2857
|
key: 3,
|
|
2858
2858
|
modelValue: t.params[f.key],
|
|
2859
2859
|
type: "number",
|
|
@@ -2872,11 +2872,11 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2872
2872
|
"onPaste",
|
|
2873
2873
|
"onUpdate:modelValue"
|
|
2874
2874
|
])),
|
|
2875
|
-
f.help ? (
|
|
2876
|
-
|
|
2875
|
+
f.help ? (S(), s("p", ti, A(f.help), 1)) : o("", !0),
|
|
2876
|
+
D(n.$slots, "after", { spec: f })
|
|
2877
2877
|
]))), 128))]));
|
|
2878
2878
|
}
|
|
2879
|
-
}),
|
|
2879
|
+
}), ri = { class: "mt-1.5 space-y-0.5 px-1" }, ii = { class: "text-slate-400 dark:text-slate-500" }, ai = /* @__PURE__ */ p({
|
|
2880
2880
|
__name: "BaseStatBreakdown",
|
|
2881
2881
|
props: {
|
|
2882
2882
|
items: {},
|
|
@@ -2895,16 +2895,16 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2895
2895
|
function i(e) {
|
|
2896
2896
|
return !n.signed || e == null ? "text-slate-500 dark:text-slate-400" : e >= 0 ? "text-emerald-600 dark:text-emerald-400" : "text-red-600 dark:text-red-400";
|
|
2897
2897
|
}
|
|
2898
|
-
return (n, a) => (
|
|
2898
|
+
return (n, a) => (S(), s("div", ri, [(S(!0), s(e, null, E(t.items, (e) => (S(), s("div", {
|
|
2899
2899
|
key: e.label,
|
|
2900
2900
|
class: "flex items-center justify-between text-[11px]"
|
|
2901
|
-
}, [
|
|
2901
|
+
}, [c("span", ii, A(e.label), 1), c("span", { class: g(["font-mono tabular-nums font-medium", i(e.value)]) }, A(r(e.value)), 3)]))), 128))]));
|
|
2902
2902
|
}
|
|
2903
|
-
}),
|
|
2903
|
+
}), oi = [
|
|
2904
2904
|
"disabled",
|
|
2905
2905
|
"title",
|
|
2906
2906
|
"aria-pressed"
|
|
2907
|
-
],
|
|
2907
|
+
], si = /* @__PURE__ */ p({
|
|
2908
2908
|
__name: "BaseFilterChip",
|
|
2909
2909
|
props: {
|
|
2910
2910
|
label: { default: "" },
|
|
@@ -2933,21 +2933,21 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2933
2933
|
red: "border-red-500 bg-red-500 text-white hover:bg-red-600 focus-visible:ring-red-500",
|
|
2934
2934
|
slate: "border-slate-600 bg-slate-600 text-white hover:bg-slate-700 focus-visible:ring-emerald-500"
|
|
2935
2935
|
};
|
|
2936
|
-
return (r, i) => (
|
|
2936
|
+
return (r, i) => (S(), s("button", {
|
|
2937
2937
|
type: "button",
|
|
2938
2938
|
disabled: e.disabled,
|
|
2939
2939
|
title: e.title,
|
|
2940
2940
|
"aria-pressed": e.active,
|
|
2941
|
-
class:
|
|
2942
|
-
}, [
|
|
2941
|
+
class: g(["whitespace-nowrap rounded-md border px-3 text-sm font-semibold text-center transition-colors focus:outline-none focus-visible:ring-2 disabled:opacity-50 disabled:cursor-not-allowed", e.active ? n[e.color] : t[e.color]])
|
|
2942
|
+
}, [D(r.$slots, "default", {}, () => [d(A(e.label), 1)])], 10, oi));
|
|
2943
2943
|
}
|
|
2944
|
-
}),
|
|
2944
|
+
}), ci = { class: "flex items-center justify-between mb-4" }, li = { class: "text-lg font-semibold text-slate-900 dark:text-slate-100" }, ui = {
|
|
2945
2945
|
key: 0,
|
|
2946
2946
|
class: "text-xs text-slate-500 dark:text-slate-400"
|
|
2947
|
-
},
|
|
2947
|
+
}, di = {
|
|
2948
2948
|
key: 0,
|
|
2949
2949
|
class: "inline-flex items-center gap-2 text-xs text-slate-500"
|
|
2950
|
-
},
|
|
2950
|
+
}, fi = { class: "grid gap-4 md:grid-cols-2" }, pi = { class: "md:col-span-2" }, mi = ["for"], hi = { class: "md:col-span-2" }, gi = ["for"], _i = { class: "text-[11px] text-slate-500 mt-1" }, vi = { class: "md:col-span-2" }, yi = ["for"], bi = { class: "md:col-span-2" }, xi = ["for"], Si = { class: "md:col-span-2" }, Ci = "placeholder:text-slate-400 dark:placeholder:text-slate-500 font-mono", wi = /* @__PURE__ */ p({
|
|
2951
2951
|
__name: "BaseCredentialsForm",
|
|
2952
2952
|
props: {
|
|
2953
2953
|
title: {},
|
|
@@ -2973,16 +2973,16 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2973
2973
|
"load-error"
|
|
2974
2974
|
],
|
|
2975
2975
|
setup(t, { expose: n, emit: r }) {
|
|
2976
|
-
let
|
|
2976
|
+
let i = t, l = r, u = T(!1), p = T(!1), m = C({
|
|
2977
2977
|
keyId: "",
|
|
2978
2978
|
secretKey: "",
|
|
2979
|
-
baseUrl:
|
|
2980
|
-
dataUrl:
|
|
2979
|
+
baseUrl: i.defaults.baseUrl,
|
|
2980
|
+
dataUrl: i.defaults.dataUrl
|
|
2981
2981
|
});
|
|
2982
|
-
async function
|
|
2982
|
+
async function h() {
|
|
2983
2983
|
try {
|
|
2984
|
-
let e = await
|
|
2985
|
-
m.keyId = e.keyId ?? "", m.baseUrl = e.baseUrl ||
|
|
2984
|
+
let e = await i.fetchFn();
|
|
2985
|
+
m.keyId = e.keyId ?? "", m.baseUrl = e.baseUrl || i.defaults.baseUrl, m.dataUrl = e.dataUrl || i.defaults.dataUrl, m.secretKey = "", p.value = e.hasSecret;
|
|
2986
2986
|
} catch (e) {
|
|
2987
2987
|
l("load-error", e instanceof Error ? e.message : "");
|
|
2988
2988
|
}
|
|
@@ -2990,105 +2990,105 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
2990
2990
|
function _(e) {
|
|
2991
2991
|
return !e || !e.trim();
|
|
2992
2992
|
}
|
|
2993
|
-
async function
|
|
2994
|
-
if (!
|
|
2993
|
+
async function v() {
|
|
2994
|
+
if (!u.value) {
|
|
2995
2995
|
if (_(m.keyId)) {
|
|
2996
|
-
l("error",
|
|
2996
|
+
l("error", i.requiredKeyMessage);
|
|
2997
2997
|
return;
|
|
2998
2998
|
}
|
|
2999
2999
|
if (!p.value && _(m.secretKey)) {
|
|
3000
|
-
l("error",
|
|
3000
|
+
l("error", i.requiredSecretMessage);
|
|
3001
3001
|
return;
|
|
3002
3002
|
}
|
|
3003
3003
|
if (_(m.baseUrl) || _(m.dataUrl)) {
|
|
3004
3004
|
l("error", "Base URL and Data URL are required.");
|
|
3005
3005
|
return;
|
|
3006
3006
|
}
|
|
3007
|
-
|
|
3007
|
+
u.value = !0;
|
|
3008
3008
|
try {
|
|
3009
|
-
p.value = (await
|
|
3009
|
+
p.value = (await i.updateFn({
|
|
3010
3010
|
keyId: m.keyId.trim(),
|
|
3011
3011
|
secretKey: _(m.secretKey) ? void 0 : m.secretKey.trim(),
|
|
3012
3012
|
baseUrl: m.baseUrl.trim(),
|
|
3013
3013
|
dataUrl: m.dataUrl.trim()
|
|
3014
|
-
})).hasSecret, m.secretKey = "", l("saved",
|
|
3014
|
+
})).hasSecret, m.secretKey = "", l("saved", i.savedMessage);
|
|
3015
3015
|
} catch (e) {
|
|
3016
3016
|
l("error", e instanceof Error ? e.message : "Failed to save");
|
|
3017
3017
|
} finally {
|
|
3018
|
-
|
|
3018
|
+
u.value = !1;
|
|
3019
3019
|
}
|
|
3020
3020
|
}
|
|
3021
3021
|
}
|
|
3022
|
-
return
|
|
3022
|
+
return y(h), n({ load: h }), (n, r) => (S(), a(ut, { class: "!p-6" }, {
|
|
3023
3023
|
default: F(() => [
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3024
|
+
c("div", ci, [c("div", null, [c("h2", li, A(t.title), 1), t.subtitle ? (S(), s("p", ui, A(t.subtitle), 1)) : o("", !0)]), u.value ? (S(), s("span", di, [f(dt, { class: "!h-4 !w-4" }), r[4] ||= d(" Saving… ", -1)])) : o("", !0)]),
|
|
3025
|
+
c("div", fi, [
|
|
3026
|
+
c("div", pi, [c("label", {
|
|
3027
3027
|
for: `${t.idPrefix}-key-id`,
|
|
3028
3028
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3029
|
-
},
|
|
3029
|
+
}, A(t.keyLabel), 9, mi), f(Q, {
|
|
3030
3030
|
id: `${t.idPrefix}-key-id`,
|
|
3031
3031
|
modelValue: m.keyId,
|
|
3032
3032
|
"onUpdate:modelValue": r[0] ||= (e) => m.keyId = e,
|
|
3033
3033
|
type: "text",
|
|
3034
3034
|
autocomplete: "off",
|
|
3035
3035
|
placeholder: t.keyPlaceholder,
|
|
3036
|
-
class:
|
|
3036
|
+
class: g(Ci)
|
|
3037
3037
|
}, null, 8, [
|
|
3038
3038
|
"id",
|
|
3039
3039
|
"modelValue",
|
|
3040
3040
|
"placeholder"
|
|
3041
3041
|
])]),
|
|
3042
|
-
|
|
3043
|
-
|
|
3042
|
+
c("div", hi, [
|
|
3043
|
+
c("label", {
|
|
3044
3044
|
for: `${t.idPrefix}-secret`,
|
|
3045
3045
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3046
|
-
},
|
|
3047
|
-
|
|
3046
|
+
}, A(t.secretLabel), 9, gi),
|
|
3047
|
+
f(Q, {
|
|
3048
3048
|
id: `${t.idPrefix}-secret`,
|
|
3049
3049
|
modelValue: m.secretKey,
|
|
3050
3050
|
"onUpdate:modelValue": r[1] ||= (e) => m.secretKey = e,
|
|
3051
3051
|
type: "password",
|
|
3052
3052
|
autocomplete: "new-password",
|
|
3053
3053
|
placeholder: p.value ? "•••••••• (unchanged — type to replace)" : t.secretPlaceholder,
|
|
3054
|
-
class:
|
|
3054
|
+
class: g(Ci)
|
|
3055
3055
|
}, null, 8, [
|
|
3056
3056
|
"id",
|
|
3057
3057
|
"modelValue",
|
|
3058
3058
|
"placeholder"
|
|
3059
3059
|
]),
|
|
3060
|
-
|
|
3060
|
+
c("p", _i, [p.value ? (S(), s(e, { key: 0 }, [d(A(t.secretSetHint), 1)], 64)) : D(n.$slots, "no-secret-hint", { key: 1 }, () => [d(A(t.permissionsHint), 1)])])
|
|
3061
3061
|
]),
|
|
3062
|
-
|
|
3063
|
-
|
|
3062
|
+
c("div", vi, [
|
|
3063
|
+
c("label", {
|
|
3064
3064
|
for: `${t.idPrefix}-base-url`,
|
|
3065
3065
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3066
|
-
}, "Base URL (trading)", 8,
|
|
3067
|
-
|
|
3066
|
+
}, "Base URL (trading)", 8, yi),
|
|
3067
|
+
f(Q, {
|
|
3068
3068
|
id: `${t.idPrefix}-base-url`,
|
|
3069
3069
|
modelValue: m.baseUrl,
|
|
3070
3070
|
"onUpdate:modelValue": r[2] ||= (e) => m.baseUrl = e,
|
|
3071
3071
|
type: "text",
|
|
3072
|
-
class:
|
|
3072
|
+
class: g(Ci)
|
|
3073
3073
|
}, null, 8, ["id", "modelValue"]),
|
|
3074
|
-
|
|
3074
|
+
D(n.$slots, "base-url-extra", { form: m })
|
|
3075
3075
|
]),
|
|
3076
|
-
|
|
3076
|
+
c("div", bi, [c("label", {
|
|
3077
3077
|
for: `${t.idPrefix}-data-url`,
|
|
3078
3078
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3079
|
-
}, "Data URL (market data)", 8,
|
|
3079
|
+
}, "Data URL (market data)", 8, xi), f(Q, {
|
|
3080
3080
|
id: `${t.idPrefix}-data-url`,
|
|
3081
3081
|
modelValue: m.dataUrl,
|
|
3082
3082
|
"onUpdate:modelValue": r[3] ||= (e) => m.dataUrl = e,
|
|
3083
3083
|
type: "text",
|
|
3084
|
-
class:
|
|
3084
|
+
class: g(Ci)
|
|
3085
3085
|
}, null, 8, ["id", "modelValue"])]),
|
|
3086
|
-
|
|
3087
|
-
color:
|
|
3086
|
+
c("div", Si, [f(Je, {
|
|
3087
|
+
color: j(U).GREEN,
|
|
3088
3088
|
description: t.saveLabel,
|
|
3089
|
-
isDisable:
|
|
3090
|
-
isLoading:
|
|
3091
|
-
onClick:
|
|
3089
|
+
isDisable: u.value,
|
|
3090
|
+
isLoading: u.value,
|
|
3091
|
+
onClick: v
|
|
3092
3092
|
}, null, 8, [
|
|
3093
3093
|
"color",
|
|
3094
3094
|
"description",
|
|
@@ -3096,21 +3096,21 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
3096
3096
|
"isLoading"
|
|
3097
3097
|
])])
|
|
3098
3098
|
]),
|
|
3099
|
-
|
|
3099
|
+
D(n.$slots, "footer")
|
|
3100
3100
|
]),
|
|
3101
3101
|
_: 3
|
|
3102
3102
|
}));
|
|
3103
3103
|
}
|
|
3104
|
-
}),
|
|
3104
|
+
}), Ti = {
|
|
3105
3105
|
key: 0,
|
|
3106
3106
|
class: "text-sm text-slate-500 dark:text-slate-400"
|
|
3107
|
-
},
|
|
3107
|
+
}, Ei = { class: "mb-3 flex flex-wrap items-center gap-2" }, Di = { class: "relative min-w-[200px] flex-1" }, Oi = ["placeholder"], ki = {
|
|
3108
3108
|
key: 0,
|
|
3109
3109
|
class: "text-sm text-slate-500 dark:text-slate-400"
|
|
3110
|
-
},
|
|
3110
|
+
}, Ai = {
|
|
3111
3111
|
key: 1,
|
|
3112
3112
|
class: "flex flex-wrap gap-2"
|
|
3113
|
-
},
|
|
3113
|
+
}, ji = ["title", "onClick"], Mi = "h-9 rounded-md border border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-900 text-slate-900 dark:text-slate-100 text-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", Ni = "\0all", Pi = /* @__PURE__ */ p({
|
|
3114
3114
|
__name: "BasePillPickerModal",
|
|
3115
3115
|
props: {
|
|
3116
3116
|
title: {},
|
|
@@ -3132,11 +3132,11 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
3132
3132
|
},
|
|
3133
3133
|
emits: ["pick", "close"],
|
|
3134
3134
|
setup(t, { emit: n }) {
|
|
3135
|
-
let
|
|
3136
|
-
value:
|
|
3137
|
-
label:
|
|
3138
|
-
}, ...
|
|
3139
|
-
return (n, r) => (
|
|
3135
|
+
let r = t, l = n, u = i(() => r.icon ?? be), d = T(""), p = T(Ni), m = i(() => r.groups && r.groups.length > 0 ? [{
|
|
3136
|
+
value: Ni,
|
|
3137
|
+
label: r.allLabel
|
|
3138
|
+
}, ...r.groups] : []), h = i(() => r.items.filter((e) => (p.value === Ni || e.group === p.value) && e.label.toLowerCase().includes(d.value.trim().toLowerCase())));
|
|
3139
|
+
return (n, r) => (S(), a(Wt, {
|
|
3140
3140
|
title: t.title,
|
|
3141
3141
|
icon: u.value,
|
|
3142
3142
|
subtitle: t.subtitle,
|
|
@@ -3144,32 +3144,32 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
3144
3144
|
"max-width-class": t.maxWidthClass,
|
|
3145
3145
|
onCancel: r[4] ||= (e) => l("close")
|
|
3146
3146
|
}, {
|
|
3147
|
-
footer: F(() => [
|
|
3147
|
+
footer: F(() => [f(Kn, {
|
|
3148
3148
|
variant: "ghost",
|
|
3149
3149
|
label: t.closeText,
|
|
3150
3150
|
onClick: r[3] ||= (e) => l("close")
|
|
3151
3151
|
}, null, 8, ["label"])]),
|
|
3152
|
-
default: F(() => [t.items.length === 0 ? (
|
|
3153
|
-
|
|
3154
|
-
I(
|
|
3155
|
-
"onUpdate:modelValue": r[0] ||= (e) =>
|
|
3152
|
+
default: F(() => [t.items.length === 0 ? (S(), s("p", Ti, A(t.emptyMessage), 1)) : (S(), s(e, { key: 1 }, [c("div", Ei, [c("div", Di, [
|
|
3153
|
+
f(j(be), { class: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400" }),
|
|
3154
|
+
I(c("input", {
|
|
3155
|
+
"onUpdate:modelValue": r[0] ||= (e) => d.value = e,
|
|
3156
3156
|
type: "text",
|
|
3157
3157
|
placeholder: t.searchPlaceholder,
|
|
3158
3158
|
autocomplete: "off",
|
|
3159
|
-
class:
|
|
3160
|
-
|
|
3159
|
+
class: g([
|
|
3160
|
+
Mi,
|
|
3161
3161
|
"w-full pl-9 pr-8 placeholder:text-slate-400 dark:placeholder:text-slate-500",
|
|
3162
3162
|
t.mono ? "font-mono" : ""
|
|
3163
3163
|
])
|
|
3164
|
-
}, null, 10,
|
|
3165
|
-
|
|
3164
|
+
}, null, 10, Oi), [[N, d.value]]),
|
|
3165
|
+
d.value ? (S(), s("button", {
|
|
3166
3166
|
key: 0,
|
|
3167
3167
|
type: "button",
|
|
3168
3168
|
"aria-label": "Clear the filter",
|
|
3169
3169
|
class: "absolute right-2 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 dark:hover:text-slate-200",
|
|
3170
|
-
onClick: r[1] ||= (e) =>
|
|
3171
|
-
}, " ✕ ")) :
|
|
3172
|
-
]), m.value.length > 0 ? (
|
|
3170
|
+
onClick: r[1] ||= (e) => d.value = ""
|
|
3171
|
+
}, " ✕ ")) : o("", !0)
|
|
3172
|
+
]), m.value.length > 0 ? (S(), a(Hr, {
|
|
3173
3173
|
key: 0,
|
|
3174
3174
|
modelValue: p.value,
|
|
3175
3175
|
"onUpdate:modelValue": r[2] ||= (e) => p.value = e,
|
|
@@ -3179,13 +3179,13 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
3179
3179
|
"modelValue",
|
|
3180
3180
|
"options",
|
|
3181
3181
|
"aria-label"
|
|
3182
|
-
])) :
|
|
3182
|
+
])) : o("", !0)]), h.value.length === 0 ? (S(), s("p", ki, A(t.noMatchMessage), 1)) : (S(), s("div", Ai, [(S(!0), s(e, null, E(h.value, (e) => (S(), s("button", {
|
|
3183
3183
|
key: e.id,
|
|
3184
3184
|
type: "button",
|
|
3185
3185
|
title: e.title,
|
|
3186
|
-
class:
|
|
3186
|
+
class: g(["h-8 shrink-0 rounded-md border border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-900 px-3 text-sm text-slate-700 dark:text-slate-200 transition-colors hover:border-emerald-500 hover:bg-emerald-50 hover:text-emerald-700 dark:hover:bg-emerald-500/10 dark:hover:text-emerald-400 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", t.mono ? "font-mono" : ""]),
|
|
3187
3187
|
onClick: (t) => l("pick", e)
|
|
3188
|
-
},
|
|
3188
|
+
}, A(e.label), 11, ji))), 128))]))], 64))]),
|
|
3189
3189
|
_: 1
|
|
3190
3190
|
}, 8, [
|
|
3191
3191
|
"title",
|
|
@@ -3194,7 +3194,7 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
3194
3194
|
"max-width-class"
|
|
3195
3195
|
]));
|
|
3196
3196
|
}
|
|
3197
|
-
}),
|
|
3197
|
+
}), Fi = ["aria-label"], Ii = ["title"], Li = { class: "text-[10px] tabular-nums text-slate-400 dark:text-slate-500" }, Ri = ["title"], zi = /* @__PURE__ */ p({
|
|
3198
3198
|
__name: "BaseBarDistribution",
|
|
3199
3199
|
props: {
|
|
3200
3200
|
bars: {},
|
|
@@ -3205,53 +3205,53 @@ var pn = ["aria-label", "aria-expanded"], mn = { class: "flex flex-col h-full" }
|
|
|
3205
3205
|
barClass: { default: "bg-emerald-500/80 dark:bg-emerald-400/80" }
|
|
3206
3206
|
},
|
|
3207
3207
|
setup(t) {
|
|
3208
|
-
let n = t,
|
|
3209
|
-
return (n, r) => (
|
|
3208
|
+
let n = t, r = i(() => Math.max(1, ...n.bars.map((e) => e.count))), a = (e) => Math.max(3, Math.round(e.count / r.value * n.maxBarHeight)), o = (e) => `${n.titlePrefix ? `${n.titlePrefix} ` : ""}${e.label}: ${e.count} ${n.countNoun}${e.count === 1 ? "" : "s"}`;
|
|
3209
|
+
return (n, r) => (S(), s("div", {
|
|
3210
3210
|
class: "flex items-end gap-1.5 overflow-x-auto pb-1",
|
|
3211
3211
|
role: "img",
|
|
3212
3212
|
"aria-label": t.ariaLabel
|
|
3213
|
-
}, [(
|
|
3213
|
+
}, [(S(!0), s(e, null, E(t.bars, (e) => (S(), s("div", {
|
|
3214
3214
|
key: e.label,
|
|
3215
3215
|
class: "flex min-w-7 flex-1 flex-col items-center gap-0.5",
|
|
3216
|
-
title:
|
|
3216
|
+
title: o(e)
|
|
3217
3217
|
}, [
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
class:
|
|
3221
|
-
style:
|
|
3218
|
+
c("span", Li, A(e.count), 1),
|
|
3219
|
+
c("div", {
|
|
3220
|
+
class: g(["w-full max-w-8 rounded-t", t.barClass]),
|
|
3221
|
+
style: _({ height: `${a(e)}px` })
|
|
3222
3222
|
}, null, 6),
|
|
3223
|
-
|
|
3223
|
+
c("span", {
|
|
3224
3224
|
class: "max-w-full truncate font-mono text-[10px] text-slate-500 dark:text-slate-400",
|
|
3225
3225
|
title: e.label
|
|
3226
|
-
},
|
|
3227
|
-
], 8,
|
|
3226
|
+
}, A(e.label), 9, Ri)
|
|
3227
|
+
], 8, Ii))), 128))], 8, Fi));
|
|
3228
3228
|
}
|
|
3229
3229
|
});
|
|
3230
3230
|
//#endregion
|
|
3231
3231
|
//#region src/composables/useDebounce.ts
|
|
3232
|
-
function
|
|
3233
|
-
let n =
|
|
3232
|
+
function Bi(e, t = 300) {
|
|
3233
|
+
let n = T(e.value), r = null;
|
|
3234
3234
|
return P(e, (e) => {
|
|
3235
3235
|
r && clearTimeout(r), r = setTimeout(() => {
|
|
3236
3236
|
n.value = e, r = null;
|
|
3237
3237
|
}, t);
|
|
3238
|
-
}),
|
|
3238
|
+
}), b(() => {
|
|
3239
3239
|
r &&= (clearTimeout(r), null);
|
|
3240
3240
|
}), n;
|
|
3241
3241
|
}
|
|
3242
3242
|
//#endregion
|
|
3243
3243
|
//#region src/composables/useToast.ts
|
|
3244
|
-
function
|
|
3245
|
-
let t =
|
|
3244
|
+
function Vi(e = 3e3) {
|
|
3245
|
+
let t = T(!1), n = T(""), r = T(K.SUCCESS), i = null;
|
|
3246
3246
|
function a() {
|
|
3247
3247
|
i &&= (clearTimeout(i), null);
|
|
3248
3248
|
}
|
|
3249
|
-
function o(o, s =
|
|
3249
|
+
function o(o, s = K.SUCCESS, c = e) {
|
|
3250
3250
|
n.value = o, r.value = s, t.value = !0, a(), i = setTimeout(() => {
|
|
3251
3251
|
t.value = !1, i = null;
|
|
3252
3252
|
}, c);
|
|
3253
3253
|
}
|
|
3254
|
-
return
|
|
3254
|
+
return b(() => {
|
|
3255
3255
|
a();
|
|
3256
3256
|
}), {
|
|
3257
3257
|
showToast: t,
|
|
@@ -3262,8 +3262,8 @@ function Bi(e = 3e3) {
|
|
|
3262
3262
|
}
|
|
3263
3263
|
//#endregion
|
|
3264
3264
|
//#region src/composables/useQueryParamSync.ts
|
|
3265
|
-
function
|
|
3266
|
-
let e =
|
|
3265
|
+
function Hi() {
|
|
3266
|
+
let e = Ee(), t = De();
|
|
3267
3267
|
function n(t) {
|
|
3268
3268
|
let n = e.query[t];
|
|
3269
3269
|
return typeof n == "string" ? n : "";
|
|
@@ -3284,21 +3284,21 @@ function Vi() {
|
|
|
3284
3284
|
}
|
|
3285
3285
|
//#endregion
|
|
3286
3286
|
//#region src/composables/useFieldClasses.ts
|
|
3287
|
-
function
|
|
3288
|
-
let { isDark: e } = V(), t =
|
|
3289
|
-
function
|
|
3287
|
+
function Ui() {
|
|
3288
|
+
let { isDark: e } = V(), t = i(() => e.value ? "text-gray-300" : "text-gray-600"), n = i(() => e.value ? "bg-gray-800 border-gray-600 text-gray-100 placeholder-gray-500 focus:ring-emerald-500 focus:border-emerald-500" : "bg-white border-gray-300 text-gray-800 focus:ring-emerald-500 focus:border-emerald-500");
|
|
3289
|
+
function r(t) {
|
|
3290
3290
|
return t == null || String(t).trim() === "" ? e.value ? "bg-gray-800 border-red-500 text-gray-100 placeholder-gray-500 focus:ring-red-500 focus:border-red-500 ring-1 ring-red-500/30" : "bg-white border-red-400 text-gray-800 focus:ring-red-500 focus:border-red-500 ring-1 ring-red-400/30" : n.value;
|
|
3291
3291
|
}
|
|
3292
3292
|
return {
|
|
3293
3293
|
label: t,
|
|
3294
3294
|
input: n,
|
|
3295
|
-
requiredInput:
|
|
3295
|
+
requiredInput: r
|
|
3296
3296
|
};
|
|
3297
3297
|
}
|
|
3298
3298
|
//#endregion
|
|
3299
3299
|
//#region src/composables/usePolling.ts
|
|
3300
|
-
function
|
|
3301
|
-
let { immediate: r = !0, pauseWhenHidden: i = !0 } = n, a = null, o =
|
|
3300
|
+
function Wi(e, t, n = {}) {
|
|
3301
|
+
let { immediate: r = !0, pauseWhenHidden: i = !0 } = n, a = null, o = T(!1), s = !1;
|
|
3302
3302
|
function c() {
|
|
3303
3303
|
a !== null || t === null || (a = setInterval(() => void e(), t));
|
|
3304
3304
|
}
|
|
@@ -3320,24 +3320,24 @@ function Ui(e, t, n = {}) {
|
|
|
3320
3320
|
o.value = !1, l(), s = !0;
|
|
3321
3321
|
}
|
|
3322
3322
|
}
|
|
3323
|
-
return
|
|
3323
|
+
return y(() => {
|
|
3324
3324
|
u(), i && document.addEventListener("visibilitychange", f);
|
|
3325
|
-
}),
|
|
3325
|
+
}), x(() => {
|
|
3326
3326
|
d(), i && document.removeEventListener("visibilitychange", f);
|
|
3327
3327
|
}), {
|
|
3328
3328
|
start: u,
|
|
3329
3329
|
stop: d,
|
|
3330
|
-
active:
|
|
3330
|
+
active: w(o)
|
|
3331
3331
|
};
|
|
3332
3332
|
}
|
|
3333
3333
|
//#endregion
|
|
3334
3334
|
//#region src/enums/BaseBadgeEnum.ts
|
|
3335
|
-
var
|
|
3335
|
+
var Gi = /* @__PURE__ */ function(e) {
|
|
3336
3336
|
return e.WIN = "WIN", e.LOSE = "LOSE", e;
|
|
3337
3337
|
}({});
|
|
3338
3338
|
//#endregion
|
|
3339
3339
|
//#region src/utils/util.ts
|
|
3340
|
-
function
|
|
3340
|
+
function Ki(e) {
|
|
3341
3341
|
let t = "red";
|
|
3342
3342
|
switch (e) {
|
|
3343
3343
|
case R.ERROR:
|
|
@@ -3355,7 +3355,7 @@ function Gi(e) {
|
|
|
3355
3355
|
}
|
|
3356
3356
|
return t;
|
|
3357
3357
|
}
|
|
3358
|
-
function
|
|
3358
|
+
function qi(e) {
|
|
3359
3359
|
let t = "red";
|
|
3360
3360
|
switch (e) {
|
|
3361
3361
|
case H.GREEN:
|
|
@@ -3384,14 +3384,14 @@ function Ki(e) {
|
|
|
3384
3384
|
}
|
|
3385
3385
|
//#endregion
|
|
3386
3386
|
//#region src/utils/httpColors.ts
|
|
3387
|
-
var
|
|
3387
|
+
var Ji = {
|
|
3388
3388
|
GET: "bg-blue-600",
|
|
3389
3389
|
POST: "bg-emerald-600",
|
|
3390
3390
|
PUT: "bg-amber-600",
|
|
3391
3391
|
DELETE: "bg-red-600",
|
|
3392
3392
|
PATCH: "bg-purple-600",
|
|
3393
3393
|
HEAD: "bg-gray-600"
|
|
3394
|
-
},
|
|
3394
|
+
}, Yi = {
|
|
3395
3395
|
GET: "bg-blue-500",
|
|
3396
3396
|
POST: "bg-green-500",
|
|
3397
3397
|
PUT: "bg-yellow-500",
|
|
@@ -3399,39 +3399,39 @@ var qi = {
|
|
|
3399
3399
|
PATCH: "bg-purple-500",
|
|
3400
3400
|
HEAD: "bg-gray-500"
|
|
3401
3401
|
};
|
|
3402
|
-
function Yi(e) {
|
|
3403
|
-
return e ? qi[e.toUpperCase()] ?? "bg-gray-600" : "bg-gray-600";
|
|
3404
|
-
}
|
|
3405
3402
|
function Xi(e) {
|
|
3406
|
-
return e ? Ji[e.toUpperCase()] ?? "bg-gray-
|
|
3403
|
+
return e ? Ji[e.toUpperCase()] ?? "bg-gray-600" : "bg-gray-600";
|
|
3407
3404
|
}
|
|
3408
3405
|
function Zi(e) {
|
|
3406
|
+
return e ? Yi[e.toUpperCase()] ?? "bg-gray-500" : "bg-gray-500";
|
|
3407
|
+
}
|
|
3408
|
+
function Qi(e) {
|
|
3409
3409
|
let t = e ?? 0;
|
|
3410
3410
|
return t >= 200 && t < 300 ? "bg-emerald-600" : t >= 300 && t < 400 ? "bg-blue-600" : t >= 400 && t < 500 ? "bg-amber-600" : t >= 500 ? "bg-red-600" : "bg-gray-600";
|
|
3411
3411
|
}
|
|
3412
|
-
function
|
|
3412
|
+
function $i(e, t) {
|
|
3413
3413
|
let n = (e || "ANY").toUpperCase();
|
|
3414
3414
|
return n === "GET" ? t ? "bg-blue-500/15 text-blue-400" : "bg-blue-100 text-blue-700" : n === "POST" ? t ? "bg-emerald-500/15 text-emerald-400" : "bg-emerald-100 text-emerald-700" : n === "PUT" ? t ? "bg-amber-500/15 text-amber-400" : "bg-amber-100 text-amber-700" : n === "DELETE" ? t ? "bg-red-500/15 text-red-400" : "bg-red-100 text-red-700" : n === "PATCH" ? t ? "bg-purple-500/15 text-purple-400" : "bg-purple-100 text-purple-700" : n === "HEAD" ? t ? "bg-sky-500/15 text-sky-400" : "bg-sky-100 text-sky-700" : t ? "bg-gray-500/15 text-gray-400" : "bg-gray-100 text-gray-600";
|
|
3415
3415
|
}
|
|
3416
|
-
function
|
|
3416
|
+
function ea(e, t) {
|
|
3417
3417
|
let n = e ?? 200;
|
|
3418
3418
|
return n >= 200 && n < 300 ? t ? "bg-emerald-500/15 text-emerald-300" : "bg-emerald-100 text-emerald-700" : n >= 300 && n < 400 ? t ? "bg-sky-500/15 text-sky-300" : "bg-sky-100 text-sky-700" : n >= 400 && n < 500 ? t ? "bg-amber-500/15 text-amber-300" : "bg-amber-100 text-amber-700" : n >= 500 && n < 600 ? t ? "bg-red-500/15 text-red-300" : "bg-red-100 text-red-700" : t ? "bg-gray-800 text-gray-400" : "bg-gray-100 text-gray-600";
|
|
3419
3419
|
}
|
|
3420
|
-
function
|
|
3420
|
+
function ta(e, t) {
|
|
3421
3421
|
let n = e ?? 200;
|
|
3422
3422
|
return t ? n >= 200 && n < 300 ? "bg-green-500/15 text-green-400" : n >= 300 && n < 400 ? "bg-blue-500/15 text-blue-400" : n >= 400 && n < 500 ? "bg-yellow-500/15 text-yellow-400" : "bg-red-500/15 text-red-400" : n >= 200 && n < 300 ? "bg-green-100 text-green-800" : n >= 300 && n < 400 ? "bg-blue-100 text-blue-800" : n >= 400 && n < 500 ? "bg-yellow-100 text-yellow-800" : "bg-red-100 text-red-800";
|
|
3423
3423
|
}
|
|
3424
3424
|
//#endregion
|
|
3425
3425
|
//#region src/utils/kvRows.ts
|
|
3426
|
-
function
|
|
3426
|
+
function na(e) {
|
|
3427
3427
|
return !(e.key ?? "").trim() || e.matcherType === "absent" ? !1 : !(e.value ?? "").trim();
|
|
3428
3428
|
}
|
|
3429
|
-
function
|
|
3429
|
+
function ra(e) {
|
|
3430
3430
|
return e.matcherType === "absent" || !(e.value ?? "").trim() ? !1 : !(e.key ?? "").trim();
|
|
3431
3431
|
}
|
|
3432
3432
|
//#endregion
|
|
3433
3433
|
//#region src/utils/sanitizeHtml.ts
|
|
3434
|
-
var
|
|
3434
|
+
var ia = /* @__PURE__ */ new Set([
|
|
3435
3435
|
"A",
|
|
3436
3436
|
"B",
|
|
3437
3437
|
"STRONG",
|
|
@@ -3446,7 +3446,7 @@ var ra = /* @__PURE__ */ new Set([
|
|
|
3446
3446
|
"LI",
|
|
3447
3447
|
"SPAN",
|
|
3448
3448
|
"DIV"
|
|
3449
|
-
]),
|
|
3449
|
+
]), aa = /* @__PURE__ */ new Set([
|
|
3450
3450
|
"SCRIPT",
|
|
3451
3451
|
"STYLE",
|
|
3452
3452
|
"IFRAME",
|
|
@@ -3454,40 +3454,40 @@ var ra = /* @__PURE__ */ new Set([
|
|
|
3454
3454
|
"EMBED",
|
|
3455
3455
|
"NOSCRIPT",
|
|
3456
3456
|
"TEMPLATE"
|
|
3457
|
-
]),
|
|
3458
|
-
function
|
|
3457
|
+
]), oa = { A: /* @__PURE__ */ new Set(["href", "title"]) };
|
|
3458
|
+
function sa(e) {
|
|
3459
3459
|
let t = e.trim().toLowerCase();
|
|
3460
3460
|
return t.startsWith("http://") || t.startsWith("https://") || t.startsWith("mailto:") || t.startsWith("tel:") || t.startsWith("/") || t.startsWith("#") || t === "";
|
|
3461
3461
|
}
|
|
3462
|
-
function
|
|
3462
|
+
function ca(e) {
|
|
3463
3463
|
if (e.nodeType !== Node.ELEMENT_NODE) return;
|
|
3464
3464
|
let t = e, n = t.tagName.toUpperCase();
|
|
3465
|
-
if (!
|
|
3466
|
-
|
|
3465
|
+
if (!ia.has(n)) {
|
|
3466
|
+
aa.has(n) ? t.remove() : t.replaceWith(document.createTextNode(t.textContent ?? ""));
|
|
3467
3467
|
return;
|
|
3468
3468
|
}
|
|
3469
|
-
let r =
|
|
3469
|
+
let r = oa[n] ?? /* @__PURE__ */ new Set();
|
|
3470
3470
|
for (let e of Array.from(t.attributes)) {
|
|
3471
3471
|
if (!r.has(e.name.toLowerCase())) {
|
|
3472
3472
|
t.removeAttribute(e.name);
|
|
3473
3473
|
continue;
|
|
3474
3474
|
}
|
|
3475
|
-
n === "A" && e.name.toLowerCase() === "href" && !
|
|
3475
|
+
n === "A" && e.name.toLowerCase() === "href" && !sa(e.value) && t.removeAttribute(e.name);
|
|
3476
3476
|
}
|
|
3477
3477
|
n === "A" && t.hasAttribute("href") && (t.setAttribute("rel", "noopener noreferrer"), t.setAttribute("target", "_blank"));
|
|
3478
|
-
for (let e of Array.from(t.childNodes))
|
|
3478
|
+
for (let e of Array.from(t.childNodes)) ca(e);
|
|
3479
3479
|
}
|
|
3480
|
-
function
|
|
3480
|
+
function la(e) {
|
|
3481
3481
|
if (!e) return "";
|
|
3482
3482
|
let t = new DOMParser().parseFromString(`<div>${e}</div>`, "text/html").body.firstElementChild;
|
|
3483
3483
|
if (!t) return "";
|
|
3484
|
-
for (let e of Array.from(t.childNodes))
|
|
3484
|
+
for (let e of Array.from(t.childNodes)) ca(e);
|
|
3485
3485
|
return t.innerHTML;
|
|
3486
3486
|
}
|
|
3487
3487
|
//#endregion
|
|
3488
3488
|
//#region src/utils/format.ts
|
|
3489
3489
|
var $ = "—";
|
|
3490
|
-
function
|
|
3490
|
+
function ua(e, t = 4) {
|
|
3491
3491
|
if (e == null || typeof e == "string" && e.trim() === "") return $;
|
|
3492
3492
|
let n = typeof e == "string" ? Number(e) : e;
|
|
3493
3493
|
return isFinite(n) ? n.toLocaleString(void 0, {
|
|
@@ -3495,12 +3495,12 @@ function la(e, t = 4) {
|
|
|
3495
3495
|
maximumFractionDigits: t
|
|
3496
3496
|
}) : $;
|
|
3497
3497
|
}
|
|
3498
|
-
function
|
|
3498
|
+
function da(e) {
|
|
3499
3499
|
if (e == null || e === "") return $;
|
|
3500
3500
|
let t = new Date(e);
|
|
3501
3501
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleString();
|
|
3502
3502
|
}
|
|
3503
|
-
function
|
|
3503
|
+
function fa(e) {
|
|
3504
3504
|
return new Date(e).toLocaleString(void 0, {
|
|
3505
3505
|
month: "short",
|
|
3506
3506
|
day: "numeric",
|
|
@@ -3508,13 +3508,13 @@ function da(e) {
|
|
|
3508
3508
|
minute: "2-digit"
|
|
3509
3509
|
});
|
|
3510
3510
|
}
|
|
3511
|
-
function
|
|
3511
|
+
function pa(e) {
|
|
3512
3512
|
return new Date(e).toLocaleDateString(void 0, {
|
|
3513
3513
|
month: "short",
|
|
3514
3514
|
day: "numeric"
|
|
3515
3515
|
});
|
|
3516
3516
|
}
|
|
3517
|
-
function
|
|
3517
|
+
function ma(e) {
|
|
3518
3518
|
try {
|
|
3519
3519
|
return new Date(e).toLocaleString(void 0, {
|
|
3520
3520
|
year: "numeric",
|
|
@@ -3530,7 +3530,7 @@ function pa(e) {
|
|
|
3530
3530
|
return String(e);
|
|
3531
3531
|
}
|
|
3532
3532
|
}
|
|
3533
|
-
function
|
|
3533
|
+
function ha(e) {
|
|
3534
3534
|
if (!isFinite(e) || e === 0) return e.toFixed(2);
|
|
3535
3535
|
let t = Math.abs(e), n = 2;
|
|
3536
3536
|
return t < 1e-4 ? n = 8 : t < .01 ? n = 6 : t < 1 ? n = 4 : t < 100 && (n = 3), e.toLocaleString(void 0, {
|
|
@@ -3538,13 +3538,13 @@ function ma(e) {
|
|
|
3538
3538
|
maximumFractionDigits: n
|
|
3539
3539
|
});
|
|
3540
3540
|
}
|
|
3541
|
-
function
|
|
3541
|
+
function ga(e, t = 2) {
|
|
3542
3542
|
return `${e >= 0 ? "+" : ""}${e.toFixed(t)}%`;
|
|
3543
3543
|
}
|
|
3544
|
-
function
|
|
3544
|
+
function _a(e) {
|
|
3545
3545
|
return `${e < 0 ? "-" : "+"}$${Math.abs(e).toFixed(2)}`;
|
|
3546
3546
|
}
|
|
3547
|
-
function
|
|
3547
|
+
function va(e) {
|
|
3548
3548
|
if (e == null || e === "") return $;
|
|
3549
3549
|
let t = new Date(e);
|
|
3550
3550
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleDateString("en-US", {
|
|
@@ -3553,7 +3553,7 @@ function _a(e) {
|
|
|
3553
3553
|
day: "numeric"
|
|
3554
3554
|
});
|
|
3555
3555
|
}
|
|
3556
|
-
function
|
|
3556
|
+
function ya(e) {
|
|
3557
3557
|
if (e == null || e === "") return $;
|
|
3558
3558
|
let t = new Date(e);
|
|
3559
3559
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleDateString("en-US", {
|
|
@@ -3564,22 +3564,22 @@ function va(e) {
|
|
|
3564
3564
|
minute: "2-digit"
|
|
3565
3565
|
});
|
|
3566
3566
|
}
|
|
3567
|
-
function
|
|
3567
|
+
function ba(e) {
|
|
3568
3568
|
if (typeof e != "number" || !isFinite(e) || e <= 0) return "";
|
|
3569
3569
|
let t = e / 1e3, n = t < 1 ? 3 : 2;
|
|
3570
3570
|
return `= ${t.toFixed(n)} s`;
|
|
3571
3571
|
}
|
|
3572
|
-
function
|
|
3572
|
+
function xa(e) {
|
|
3573
3573
|
return e ? e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB` : "";
|
|
3574
3574
|
}
|
|
3575
|
-
function
|
|
3575
|
+
function Sa(e) {
|
|
3576
3576
|
try {
|
|
3577
3577
|
return JSON.stringify(JSON.parse(e), null, 2);
|
|
3578
3578
|
} catch {
|
|
3579
3579
|
return e;
|
|
3580
3580
|
}
|
|
3581
3581
|
}
|
|
3582
|
-
function
|
|
3582
|
+
function Ca(e) {
|
|
3583
3583
|
if (e == null) return "";
|
|
3584
3584
|
if (typeof e == "string") return e;
|
|
3585
3585
|
try {
|
|
@@ -3588,14 +3588,14 @@ function Sa(e) {
|
|
|
3588
3588
|
return String(e);
|
|
3589
3589
|
}
|
|
3590
3590
|
}
|
|
3591
|
-
function
|
|
3591
|
+
function wa(e, t = 2) {
|
|
3592
3592
|
if (e == null || !isFinite(e)) return $;
|
|
3593
3593
|
let n = Math.floor(Math.max(0, e) / 6e4), r = Math.floor(n / 1440), i = Math.floor(n % 1440 / 60), a = n % 60, o = [];
|
|
3594
3594
|
return r > 0 && o.push(`${r}d`), (r > 0 || i > 0) && o.push(`${i}h`), o.push(`${a}m`), o.slice(0, t).join(" ");
|
|
3595
3595
|
}
|
|
3596
3596
|
//#endregion
|
|
3597
3597
|
//#region src/utils/validate.ts
|
|
3598
|
-
function
|
|
3598
|
+
function Ta(e) {
|
|
3599
3599
|
let t = (e ?? "").trim();
|
|
3600
3600
|
if (!t) return !1;
|
|
3601
3601
|
try {
|
|
@@ -3605,7 +3605,7 @@ function wa(e) {
|
|
|
3605
3605
|
return !1;
|
|
3606
3606
|
}
|
|
3607
3607
|
}
|
|
3608
|
-
function
|
|
3608
|
+
function Ea(e) {
|
|
3609
3609
|
if (!e.trim()) return !0;
|
|
3610
3610
|
try {
|
|
3611
3611
|
return JSON.parse(e), !0;
|
|
@@ -3613,7 +3613,7 @@ function Ta(e) {
|
|
|
3613
3613
|
return !1;
|
|
3614
3614
|
}
|
|
3615
3615
|
}
|
|
3616
|
-
function
|
|
3616
|
+
function Da(e) {
|
|
3617
3617
|
if (!e.trim()) return !0;
|
|
3618
3618
|
try {
|
|
3619
3619
|
return !new DOMParser().parseFromString(e, "application/xml").getElementsByTagName("parsererror").length;
|
|
@@ -3621,7 +3621,7 @@ function Ea(e) {
|
|
|
3621
3621
|
return !1;
|
|
3622
3622
|
}
|
|
3623
3623
|
}
|
|
3624
|
-
function
|
|
3624
|
+
function Oa(e) {
|
|
3625
3625
|
if (!e.trim()) return !0;
|
|
3626
3626
|
let t = e.replace(/\s+/g, "");
|
|
3627
3627
|
if (!t) return !0;
|
|
@@ -3634,7 +3634,7 @@ function Da(e) {
|
|
|
3634
3634
|
}
|
|
3635
3635
|
//#endregion
|
|
3636
3636
|
//#region src/utils/specForm.ts
|
|
3637
|
-
function
|
|
3637
|
+
function ka(e, t) {
|
|
3638
3638
|
let n = {};
|
|
3639
3639
|
if (!e) return n;
|
|
3640
3640
|
for (let r of e) {
|
|
@@ -3643,7 +3643,7 @@ function Oa(e, t) {
|
|
|
3643
3643
|
}
|
|
3644
3644
|
return n;
|
|
3645
3645
|
}
|
|
3646
|
-
function
|
|
3646
|
+
function Aa(e, t) {
|
|
3647
3647
|
if (!e) return null;
|
|
3648
3648
|
for (let n of e) if (n.type === "decimal" || n.type === "integer") {
|
|
3649
3649
|
let e = t[n.key], r = e === "" || e == null;
|
|
@@ -3654,7 +3654,7 @@ function ka(e, t) {
|
|
|
3654
3654
|
}
|
|
3655
3655
|
//#endregion
|
|
3656
3656
|
//#region src/utils/pnl.ts
|
|
3657
|
-
function
|
|
3657
|
+
function ja(e) {
|
|
3658
3658
|
if (e.buyPrice == null || e.lastPrice == null || e.filledQty == null) return {
|
|
3659
3659
|
pnlUsd: null,
|
|
3660
3660
|
pnlPct: null
|
|
@@ -3669,4 +3669,4 @@ function Aa(e) {
|
|
|
3669
3669
|
};
|
|
3670
3670
|
}
|
|
3671
3671
|
//#endregion
|
|
3672
|
-
export { R as AlertEnum,
|
|
3672
|
+
export { R as AlertEnum, Yn as BaseActionButton, Ne as BaseAlert, Bn as BaseAppLayout, Fe as BaseBadge, Gi as BaseBadgeEnum, zi as BaseBarDistribution, ze as BaseBreadcrumb, Je as BaseButton, U as BaseButtonEnum, W as BaseButtonSizeEnum, Sr as BaseChipButton, Ar as BaseCodeBlock, qt as BaseCollapsibleSection, Zt as BaseConfirmModal, Zn as BaseCopyButton, wi as BaseCredentialsForm, Rr as BaseDropdown, Ln as BaseEntityPickerModal, kr as BaseFileDropzone, si as BaseFilterChip, tr as BaseGoogleSignInButton, Q as BaseInput, $e as BaseLine, et as BaseLoginEnum, pr as BaseLoginForm, nt as BaseLogo, G as BaseLogoEnum, lt as BaseModal, rt as BaseModalEnum, Wt as BaseModalShell, an as BaseNotFoundPage, br as BaseNotificationPanel, Un as BasePageHeader, Pi as BasePillPickerModal, Cr as BaseRemoveButton, ut as BaseRow, Hr as BaseSegmentedControl, Nr as BaseSelect, wn as BaseSidebar, ni as BaseSpecFields, dt as BaseSpinner, ai as BaseStatBreakdown, Er as BaseStatusPill, Jr as BaseTable, tn as BaseTextInputModal, mt as BaseToast, K as BaseToastEnum, Kn as BaseToolbarButton, gt as ColoredSquares, H as ColorsEnums, yt as EarningsCard, wt as EuroAmount, Ye as LineEnum, kt as Pagination, q as PositioningEnum, Pt as TrendArrow, ka as buildSpecParams, ja as computePnL, Aa as firstInvalidNumericSpec, xa as fmtBytes, va as fmtCalendarDate, ya as fmtCalendarDateTime, da as fmtDate, pa as fmtDateShort, fa as fmtDateTime, ma as fmtDateTimeMs, wa as fmtDuration, ba as fmtMsAsSeconds, ua as fmtNumber, ga as fmtPct, ha as fmtPrice, _a as fmtUsd, Sa as formatJson, Ki as getBaseColor, qi as getBaseColorOf, Ae as initTheme, sa as isSafeHref, Ta as isValidAbsoluteUrl, Oa as isValidBase64, Ea as isValidJson, Da as isValidXml, Zi as methodBadgeBright, Xi as methodBadgeSolid, $i as methodBadgeTinted, ra as rowKeyMissing, na as rowValueMissing, la as sanitizeHtml, ea as statusBadgeSoft, Qi as statusBadgeSolid, ta as statusBadgeTinted, Ca as stringifyValue, Bi as useDebouncedRef, Ft as useEscapeKey, Ui as useFieldClasses, sn as useMobileSidebar, pn as useNotifications, Wi as usePolling, Hi as useQueryParamSync, dn as useSidebarCollapse, V as useTheme, J as useThemeClasses, Vi as useToast };
|