mgv-backoffice 1.0.13 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/README.md +735 -70
  2. package/dist/index.d.ts +1 -27
  3. package/dist/{components → src/components}/BaseAlert.vue.d.ts +2 -2
  4. package/dist/src/components/BaseAppLayout.vue.d.ts +31 -0
  5. package/dist/{components → src/components}/BaseButton.vue.d.ts +5 -2
  6. package/dist/src/components/BaseCollapsibleSection.vue.d.ts +35 -0
  7. package/dist/src/components/BaseConfirmModal.vue.d.ts +23 -0
  8. package/dist/src/components/BaseEntityPickerModal.vue.d.ts +58 -0
  9. package/dist/{components → src/components}/BaseLogo.vue.d.ts +3 -3
  10. package/dist/{components → src/components}/BaseModal.vue.d.ts +4 -3
  11. package/dist/src/components/BaseModalShell.vue.d.ts +43 -0
  12. package/dist/src/components/BaseNotFoundPage.vue.d.ts +17 -0
  13. package/dist/src/components/BaseSidebar.vue.d.ts +46 -0
  14. package/dist/src/components/BaseTextInputModal.vue.d.ts +46 -0
  15. package/dist/{components → src/components}/BaseToast.vue.d.ts +14 -2
  16. package/dist/{components → src/components}/Pagination.vue.d.ts +0 -3
  17. package/dist/src/composables/useDebounce.d.ts +10 -0
  18. package/dist/src/composables/useEscapeKey.d.ts +6 -0
  19. package/dist/src/composables/useMobileSidebar.d.ts +6 -0
  20. package/dist/src/composables/useTheme.d.ts +19 -0
  21. package/dist/src/composables/useThemeClasses.d.ts +62 -0
  22. package/dist/src/composables/useToast.d.ts +19 -0
  23. package/dist/{enums → src/enums}/AlertEnum.d.ts +1 -1
  24. package/dist/{enums → src/enums}/BaseButtonSizeEnum.d.ts +1 -1
  25. package/dist/src/enums/BaseLogoEnum.d.ts +7 -0
  26. package/dist/src/index.d.ts +46 -0
  27. package/dist/src/types/entityPicker.d.ts +11 -0
  28. package/dist/src/types/sidebar.d.ts +22 -0
  29. package/dist/src/utils/httpColors.d.ts +19 -0
  30. package/dist/ui-lib.css +3 -0
  31. package/dist/ui-lib.js +1624 -1011
  32. package/dist/ui-lib.umd.cjs +1 -1
  33. package/package.json +14 -14
  34. package/src/components/BaseAlert.vue +2 -2
  35. package/src/components/BaseAppLayout.vue +65 -0
  36. package/src/components/BaseBreadcrumb.vue +2 -1
  37. package/src/components/BaseButton.vue +152 -132
  38. package/src/components/BaseCollapsibleSection.vue +107 -0
  39. package/src/components/BaseConfirmModal.vue +110 -0
  40. package/src/components/BaseEntityPickerModal.vue +330 -0
  41. package/src/components/BaseLogo.vue +5 -5
  42. package/src/components/BaseModal.vue +95 -75
  43. package/src/components/BaseModalShell.vue +115 -0
  44. package/src/components/BaseNotFoundPage.vue +51 -0
  45. package/src/components/BaseSidebar.vue +223 -0
  46. package/src/components/BaseTextInputModal.vue +144 -0
  47. package/src/components/BaseToast.vue +41 -20
  48. package/src/components/ColoredSquares.vue +2 -4
  49. package/src/components/Pagination.vue +137 -136
  50. package/src/components/TrendArrow.vue +1 -1
  51. package/src/composables/useDebounce.ts +32 -0
  52. package/src/composables/useEscapeKey.ts +15 -0
  53. package/src/composables/useMobileSidebar.ts +23 -0
  54. package/src/composables/useTheme.ts +69 -0
  55. package/src/composables/useThemeClasses.ts +133 -0
  56. package/src/composables/useToast.ts +56 -0
  57. package/src/enums/AlertEnum.ts +1 -1
  58. package/src/enums/BaseButtonSizeEnum.ts +1 -1
  59. package/src/enums/BaseLogoEnum.ts +4 -1
  60. package/src/index.ts +64 -36
  61. package/src/types/entityPicker.ts +11 -0
  62. package/src/types/sidebar.ts +24 -0
  63. package/src/utils/httpColors.ts +68 -0
  64. package/src/utils/util.ts +61 -53
  65. package/dist/enums/BaseLogoEnum.d.ts +0 -5
  66. package/dist/style.css +0 -1
  67. /package/dist/{components → src/components}/BaseBadge.vue.d.ts +0 -0
  68. /package/dist/{components → src/components}/BaseBreadcrumb.vue.d.ts +0 -0
  69. /package/dist/{components → src/components}/BaseLine.vue.d.ts +0 -0
  70. /package/dist/{components → src/components}/BaseRow.vue.d.ts +0 -0
  71. /package/dist/{components → src/components}/BaseSpinner.vue.d.ts +0 -0
  72. /package/dist/{components → src/components}/ColoredSquares.vue.d.ts +0 -0
  73. /package/dist/{components → src/components}/EarningsCard.vue.d.ts +0 -0
  74. /package/dist/{components → src/components}/EuroAmount.vue.d.ts +0 -0
  75. /package/dist/{components → src/components}/TrendArrow.vue.d.ts +0 -0
  76. /package/dist/{enums → src/enums}/BaseBadgeEnum.d.ts +0 -0
  77. /package/dist/{enums → src/enums}/BaseButtonEnum.d.ts +0 -0
  78. /package/dist/{enums → src/enums}/BaseModalEnum.d.ts +0 -0
  79. /package/dist/{enums → src/enums}/BaseToastEnum.d.ts +0 -0
  80. /package/dist/{enums → src/enums}/ColorsEnums.d.ts +0 -0
  81. /package/dist/{enums → src/enums}/LineEnum.d.ts +0 -0
  82. /package/dist/{enums → src/enums}/PositioningEnum.d.ts +0 -0
  83. /package/dist/{utils → src/utils}/util.d.ts +0 -0
package/dist/ui-lib.js CHANGED
@@ -1,1016 +1,1629 @@
1
- import { defineComponent as y, openBlock as l, createElementBlock as i, normalizeClass as h, createVNode as m, unref as d, createElementVNode as s, toDisplayString as b, useSlots as F, computed as k, renderSlot as $, createCommentVNode as g, resolveComponent as G, withCtx as S, createTextVNode as C, Fragment as T, renderList as q, createBlock as D, ref as U, watch as Y } from "vue";
2
- import { InformationCircleIcon as j, ChevronRightIcon as X, ExclamationCircleIcon as z, CheckCircleIcon as K, ExclamationTriangleIcon as V, XMarkIcon as Q, ArrowDownIcon as Z, ArrowUpIcon as J } from "@heroicons/vue/24/outline";
3
- import { HomeIcon as ee } from "@heroicons/vue/24/solid";
4
- var E = /* @__PURE__ */ ((e) => (e.WARNING = "WARNING", e.ERROR = "ERROR", e.SUCCESS = "SUCCESS", e.INFROM = "INFROM", e))(E || {}), f = /* @__PURE__ */ ((e) => (e.NONE = "NONE", e.RED = "RED", e.YELLOW = "YELLOW", e.BLACK = "BLACK", e.GRAY = "GRAY", e.GREEN = "GREEN", e.BLUE = "BLUE", e))(f || {});
5
- function te(e) {
6
- let t = "red";
7
- switch (e) {
8
- case E.ERROR:
9
- t = "red";
10
- break;
11
- case E.SUCCESS:
12
- t = "green";
13
- break;
14
- case E.INFROM:
15
- t = "gray";
16
- break;
17
- case E.WARNING:
18
- t = "yellow";
19
- break;
20
- }
21
- return t;
1
+ import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, effectScope as u, nextTick as d, normalizeClass as f, onBeforeUnmount as p, onMounted as m, onScopeDispose as h, onUnmounted as g, openBlock as _, ref as v, renderList as y, renderSlot as b, resolveComponent as x, resolveDynamicComponent as S, toDisplayString as C, unref as w, useSlots as T, vModelText as E, vShow as D, watch as O, withCtx as k, withDirectives as A, withKeys as j, withModifiers as M } from "vue";
2
+ import { ArrowDownIcon as ee, ArrowUpIcon as te, Bars3Icon as N, CheckCircleIcon as ne, ChevronRightIcon as P, DocumentDuplicateIcon as re, ExclamationCircleIcon as ie, ExclamationTriangleIcon as ae, FolderIcon as oe, InformationCircleIcon as se, MagnifyingGlassIcon as ce, XMarkIcon as F } from "@heroicons/vue/24/outline";
3
+ import { HomeIcon as le } from "@heroicons/vue/24/solid";
4
+ import { useRoute as ue, useRouter as de } from "vue-router";
5
+ //#region src/enums/AlertEnum.ts
6
+ var I = /* @__PURE__ */ function(e) {
7
+ return e.WARNING = "WARNING", e.ERROR = "ERROR", e.SUCCESS = "SUCCESS", e.INFO = "INFO", e;
8
+ }({}), L = /* @__PURE__ */ function(e) {
9
+ return e.NONE = "NONE", e.RED = "RED", e.YELLOW = "YELLOW", e.BLACK = "BLACK", e.GRAY = "GRAY", e.GREEN = "GREEN", e.BLUE = "BLUE", e;
10
+ }({});
11
+ //#endregion
12
+ //#region src/utils/util.ts
13
+ function fe(e) {
14
+ let t = "red";
15
+ switch (e) {
16
+ case I.ERROR:
17
+ t = "red";
18
+ break;
19
+ case I.SUCCESS:
20
+ t = "green";
21
+ break;
22
+ case I.INFO:
23
+ t = "gray";
24
+ break;
25
+ case I.WARNING:
26
+ t = "yellow";
27
+ break;
28
+ }
29
+ return t;
22
30
  }
23
- function Ve(e) {
24
- let t = "red";
25
- switch (e) {
26
- case f.GREEN: {
27
- t = "green";
28
- break;
29
- }
30
- case f.RED: {
31
- t = "red";
32
- break;
33
- }
34
- case f.BLUE: {
35
- t = "blue";
36
- break;
37
- }
38
- case f.YELLOW: {
39
- t = "yellow";
40
- break;
41
- }
42
- case f.NONE: {
43
- t = "";
44
- break;
45
- }
46
- }
47
- return t;
31
+ function pe(e) {
32
+ let t = "red";
33
+ switch (e) {
34
+ case L.GREEN:
35
+ t = "green";
36
+ break;
37
+ case L.RED:
38
+ t = "red";
39
+ break;
40
+ case L.BLUE:
41
+ t = "blue";
42
+ break;
43
+ case L.YELLOW:
44
+ t = "yellow";
45
+ break;
46
+ case L.BLACK:
47
+ t = "black";
48
+ break;
49
+ case L.GRAY:
50
+ t = "gray";
51
+ break;
52
+ case L.NONE:
53
+ t = "";
54
+ break;
55
+ }
56
+ return t;
48
57
  }
49
- const re = { class: "font-medium pl-1" }, Qe = /* @__PURE__ */ y({
50
- __name: "BaseAlert",
51
- props: {
52
- title: {
53
- type: String,
54
- required: !1,
55
- default: E.ERROR
56
- },
57
- color: {
58
- type: Object,
59
- required: !1,
60
- default: E.ERROR
61
- }
62
- },
63
- setup(e) {
64
- const t = e;
65
- function a() {
66
- let n = te(t.color);
67
- return "flex items-center p-4 mb-4 text-sm text-" + n + "-800 border border-" + n + "-300 rounded-lg bg-" + n + "-50 dark:bg-gray-800 dark:text-" + n + "-400 dark:border-" + n + "-800";
68
- }
69
- return (n, r) => (l(), i("div", {
70
- class: h(a()),
71
- role: "alert"
72
- }, [
73
- m(d(j), { class: "w-6 h-6 text-gray-400" }),
74
- s("div", null, [
75
- s("span", re, b(e.title), 1)
76
- ])
77
- ], 2));
78
- }
79
- }), se = "bg-red-100 text-red-700 border-red-200", M = /* @__PURE__ */ y({
80
- __name: "BaseBadge",
81
- props: {
82
- color: {
83
- type: String,
84
- required: !1
85
- }
86
- },
87
- setup(e) {
88
- const t = F(), a = k(() => !!t.default), n = e, r = {
89
- [f.RED]: "bg-red-100 text-red-700 border-red-200",
90
- [f.GREEN]: "bg-green-100 text-green-700 border-green-200",
91
- [f.BLUE]: "bg-blue-100 text-blue-700 border-blue-200",
92
- [f.YELLOW]: "bg-yellow-100 text-yellow-700 border-yellow-200",
93
- [f.GRAY]: "bg-gray-100 text-gray-700 border-gray-200",
94
- [f.NONE]: "bg-gray-50 text-gray-600 border-gray-200"
95
- }, o = k(() => `inline-flex items-center gap-1 font-semibold text-xs leading-none px-3 py-1.5 rounded-full border ${n.color && r[n.color] || se}`);
96
- return (c, p) => a.value ? (l(), i("span", {
97
- key: 0,
98
- class: h(o.value)
99
- }, [
100
- $(c.$slots, "default")
101
- ], 2)) : g("", !0);
102
- }
103
- }), oe = {
104
- 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",
105
- "aria-label": "Breadcrumb"
106
- }, ae = { class: "inline-flex items-center space-x-1 md:space-x-3" }, ne = {
107
- class: "inline-flex items-center",
108
- style: { "margin-left": "0" }
109
- }, Ze = /* @__PURE__ */ y({
110
- __name: "BaseBreadcrumb",
111
- props: {
112
- items: {
113
- type: Array,
114
- required: !1,
115
- default: void 0
116
- },
117
- path: {
118
- type: String,
119
- required: !1,
120
- default: void 0
121
- }
122
- },
123
- setup(e) {
124
- const t = e, a = k(() => {
125
- if (t.items && t.items.length > 0)
126
- return t.items;
127
- const r = (t.path ?? (typeof window < "u" ? window.location.pathname : "/")).split("/").filter((c) => c !== "");
128
- let o = "";
129
- return r.map((c) => (o += "/" + c, { name: Number(c) ? c : (c.charAt(0).toUpperCase() + c.slice(1)).replaceAll("-", " "), url: o }));
130
- });
131
- return (n, r) => {
132
- const o = G("router-link");
133
- return l(), i("nav", oe, [
134
- s("ol", ae, [
135
- s("li", ne, [
136
- m(o, {
137
- to: "/",
138
- class: "inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white"
139
- }, {
140
- default: S(() => [
141
- m(d(ee), { class: "h-4 w-4 text-gray-500 mr-2" }),
142
- r[0] || (r[0] = C(" Home ", -1))
143
- ]),
144
- _: 1
145
- })
146
- ]),
147
- (l(!0), i(T, null, q(a.value, (c, p) => (l(), i("li", {
148
- key: p,
149
- class: "inline-flex items-center",
150
- style: { "margin-left": "0" }
151
- }, [
152
- m(d(X), { class: "h-4 w-4 text-gray-500" }),
153
- m(o, {
154
- to: c.url,
155
- 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"
156
- }, {
157
- default: S(() => [
158
- C(b(c.name), 1)
159
- ]),
160
- _: 2
161
- }, 1032, ["to"])
162
- ]))), 128))
163
- ])
164
- ]);
165
- };
166
- }
167
- });
168
- var v = /* @__PURE__ */ ((e) => (e.RED = "RED", e.BLUE = "BLUE", e.WHITE = "WHITE", e.DARK = "DARK", e.GREEN = "GREEN", e.YELLOW = "YELLOW", e.PURPLE = "PURPLE", e))(v || {}), R = /* @__PURE__ */ ((e) => (e.EXTRA_SMALL = "EXTRA SMALL", e.SMALL = "SMALL", e.BASE = "BASE", e.LARGE = "LARGE", e.EXTRA_LARGE = "EXTRA_LARGE", e))(R || {});
169
- const le = ["type", "disabled"], ie = { key: 0 }, ce = { key: 1 }, ue = ["type", "disabled"], de = { key: 0 }, ge = { key: 1 }, fe = { key: 2 }, Je = /* @__PURE__ */ y({
170
- __name: "BaseButton",
171
- props: {
172
- description: {
173
- type: String,
174
- required: !0
175
- },
176
- color: {
177
- type: String,
178
- required: !1,
179
- default: v.BLUE
180
- },
181
- to: {
182
- type: String,
183
- required: !1
184
- },
185
- type: {
186
- type: String,
187
- required: !1,
188
- default: "button"
189
- },
190
- icon: {
191
- type: String,
192
- required: !1
193
- },
194
- iconSize: {
195
- type: String,
196
- required: !1
197
- },
198
- iconLeft: {
199
- type: String,
200
- required: !1
201
- },
202
- isRounded: {
203
- type: Boolean,
204
- required: !1
205
- },
206
- isDisable: {
207
- type: Boolean,
208
- required: !1
209
- },
210
- size: {
211
- type: String,
212
- required: !1
213
- },
214
- isLoading: {
215
- type: Boolean,
216
- required: !1
217
- }
218
- },
219
- setup(e) {
220
- const t = e;
221
- function a() {
222
- let n = "inline-flex items-center", r;
223
- switch (t.color) {
224
- case v.BLUE: {
225
- r = "focus:outline-none text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300", t.isDisable && (r += " bg-blue-400");
226
- break;
227
- }
228
- case v.WHITE: {
229
- r = "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", t.isDisable && (r += " bg-gray-400");
230
- break;
231
- }
232
- case v.DARK: {
233
- r = "focus:outline-none text-white bg-gray-800 hover:bg-gray-900 focus:ring-4 focus:ring-gray-300 ", t.isDisable && (r += " bg-gray-400");
234
- break;
235
- }
236
- case v.GREEN: {
237
- r = "focus:outline-none text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300", t.isDisable && (r += " bg-green-400");
238
- break;
239
- }
240
- case v.RED: {
241
- r = "focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300", t.isDisable && (r += " bg-red-400");
242
- break;
243
- }
244
- case v.YELLOW: {
245
- r = "focus:outline-none text-white bg-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300", t.isDisable && (r += " bg-yellow-400");
246
- break;
247
- }
248
- case v.PURPLE: {
249
- r = "focus:outline-none text-white bg-purple-700 hover:bg-purple-800 focus:ring-4 focus:ring-purple-300 px-5 py-2.5 mb-2", t.isDisable && (r += " bg-purple-400");
250
- break;
251
- }
252
- }
253
- let o = "px-5 py-2.5 mr-2 mb-2 text-sm";
254
- switch (t.size) {
255
- case R.EXTRA_SMALL: {
256
- o = "px-3 py-2 text-xs";
257
- break;
258
- }
259
- case R.SMALL: {
260
- o = "px-3 py-2 text-sm";
261
- break;
262
- }
263
- case R.BASE: {
264
- o = "px-5 py-2.5 text-sm";
265
- break;
266
- }
267
- case R.LARGE: {
268
- o = "px-5 py-3 text-base";
269
- break;
270
- }
271
- case R.EXTRA_LARGE: {
272
- o = "px-6 py-3.5 text-base";
273
- break;
274
- }
275
- }
276
- let c = "rounded-lg";
277
- return t.isRounded && (c = "rounded-full"), t.isDisable && (r += " cursor-not-allowed"), n + " " + o + " " + r + " " + "font-medium" + " " + c;
278
- }
279
- return (n, r) => {
280
- const o = G("router-link");
281
- return e.to ? (l(), D(o, {
282
- key: 0,
283
- to: e.to
284
- }, {
285
- default: S(() => [
286
- s("button", {
287
- type: t.type,
288
- class: h(a()),
289
- disabled: e.isDisable
290
- }, [
291
- e.iconLeft ? g("", !0) : (l(), i("span", ie, b(e.description), 1)),
292
- $(n.$slots, "default"),
293
- e.iconLeft ? (l(), i("span", ce, b(e.description), 1)) : g("", !0)
294
- ], 10, le)
295
- ]),
296
- _: 3
297
- }, 8, ["to"])) : (l(), i("button", {
298
- key: 1,
299
- type: t.type,
300
- class: h(a()),
301
- disabled: e.isDisable
302
- }, [
303
- e.isLoading ? (l(), i("div", de, [...r[0] || (r[0] = [
304
- s("svg", {
305
- "aria-hidden": "true",
306
- role: "status",
307
- class: "inline w-4 h-4 me-3 text-white animate-spin",
308
- viewBox: "0 0 100 101",
309
- fill: "none",
310
- xmlns: "http://www.w3.org/2000/svg"
311
- }, [
312
- s("path", {
313
- 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",
314
- fill: "#E5E7EB"
315
- }),
316
- s("path", {
317
- 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",
318
- fill: "currentColor"
319
- })
320
- ], -1)
321
- ])])) : g("", !0),
322
- e.iconLeft ? g("", !0) : (l(), i("span", ge, b(e.description), 1)),
323
- $(n.$slots, "default"),
324
- e.iconLeft ? (l(), i("span", fe, b(e.description), 1)) : g("", !0)
325
- ], 10, ue));
326
- };
327
- }
328
- });
329
- var L = /* @__PURE__ */ ((e) => (e.BASE = "BASE", e.BASE_SHORTER = "BASE_SHORTER", e.SQUARE = "SQUARE", e))(L || {});
330
- const be = {
331
- key: 0,
332
- class: "h-px my-8 bg-gray-200 border-0 dark:bg-gray-700"
333
- }, pe = {
334
- key: 1,
335
- class: "w-48 h-1 mx-auto my-4 bg-gray-100 border-0 rounded md:my-10 dark:bg-gray-700"
336
- }, me = {
337
- key: 2,
338
- class: "w-8 h-8 mx-auto my-8 bg-gray-200 border-0 rounded md:my-12 dark:bg-gray-700"
339
- }, et = /* @__PURE__ */ y({
340
- __name: "BaseLine",
341
- props: {
342
- mode: {
343
- type: String,
344
- required: !1,
345
- default: L.BASE
346
- }
347
- },
348
- setup(e) {
349
- return (t, a) => (l(), i(T, null, [
350
- e.mode === d(L).BASE ? (l(), i("hr", be)) : g("", !0),
351
- e.mode === d(L).BASE_SHORTER ? (l(), i("hr", pe)) : g("", !0),
352
- e.mode === d(L).SQUARE ? (l(), i("hr", me)) : g("", !0)
353
- ], 64));
354
- }
355
- });
356
- var A = /* @__PURE__ */ ((e) => (e.SMALL = "SMALL", e.MEDIUM = "MEDIUM", e.LARGE = "LARGE", e))(A || {});
357
- const ye = ["height", "width"], tt = /* @__PURE__ */ y({
358
- __name: "BaseLogo",
359
- props: {
360
- size: {
361
- type: String,
362
- required: !1,
363
- default: A.MEDIUM
364
- }
365
- },
366
- setup(e) {
367
- const t = e;
368
- function a() {
369
- let n = "";
370
- switch (t.size) {
371
- case A.SMALL: {
372
- n = "50px";
373
- break;
374
- }
375
- case A.MEDIUM: {
376
- n = "100px";
377
- break;
378
- }
379
- case A.LARGE: {
380
- n = "150px";
381
- break;
382
- }
383
- }
384
- return n;
385
- }
386
- return (n, r) => {
387
- const o = G("router-link");
388
- return l(), D(o, {
389
- to: "/",
390
- class: "flex items-center mb-6 text-2xl font-semibold text-gray-900 dark:text-white"
391
- }, {
392
- default: S(() => [
393
- (l(), i("svg", {
394
- height: a(),
395
- width: a(),
396
- viewBox: "33.6 130.6 499.7 242.9",
397
- xmlns: "http://www.w3.org/2000/svg",
398
- "xmlns:xlink": "http://www.w3.org/1999/xlink"
399
- }, [...r[0] || (r[0] = [
400
- s("linearGradient", { id: "a" }, [
401
- s("stop", {
402
- offset: ".085",
403
- "stop-color": "#469e43"
404
- }),
405
- s("stop", {
406
- offset: "1",
407
- "stop-color": "#132d13"
408
- })
409
- ], -1),
410
- s("linearGradient", {
411
- id: "b",
412
- gradientUnits: "userSpaceOnUse",
413
- x1: "64.863",
414
- x2: "64.863",
415
- "xlink:href": "#a",
416
- y1: "288.291",
417
- y2: "369.4"
418
- }, null, -1),
419
- s("linearGradient", {
420
- id: "c",
421
- gradientUnits: "userSpaceOnUse",
422
- x1: "138.367",
423
- x2: "138.367",
424
- "xlink:href": "#a",
425
- y1: "308.454",
426
- y2: "370.601"
427
- }, null, -1),
428
- s("linearGradient", {
429
- id: "d",
430
- gradientUnits: "userSpaceOnUse",
431
- x1: "195.475",
432
- x2: "195.475",
433
- "xlink:href": "#a",
434
- y1: "288.291",
435
- y2: "369.85"
436
- }, null, -1),
437
- s("linearGradient", {
438
- id: "e",
439
- gradientUnits: "userSpaceOnUse",
440
- x1: "249.634",
441
- x2: "249.634",
442
- "xlink:href": "#a",
443
- y1: "307.312",
444
- y2: "369.511"
445
- }, null, -1),
446
- s("linearGradient", {
447
- id: "f",
448
- gradientUnits: "userSpaceOnUse",
449
- x1: "302.884",
450
- x2: "302.884",
451
- "xlink:href": "#a",
452
- y1: "288.291",
453
- y2: "367.857"
454
- }, null, -1),
455
- s("linearGradient", {
456
- id: "g",
457
- gradientUnits: "userSpaceOnUse",
458
- x1: "354.118",
459
- x2: "354.118",
460
- "xlink:href": "#a",
461
- y1: "307.312",
462
- y2: "369.511"
463
- }, null, -1),
464
- s("linearGradient", {
465
- id: "h",
466
- gradientUnits: "userSpaceOnUse",
467
- x1: "428.02",
468
- x2: "428.02",
469
- "xlink:href": "#a",
470
- y1: "306.156",
471
- y2: "367.742"
472
- }, null, -1),
473
- s("linearGradient", {
474
- id: "i",
475
- gradientUnits: "userSpaceOnUse",
476
- x1: "502.066",
477
- x2: "502.066",
478
- "xlink:href": "#a",
479
- y1: "288.291",
480
- y2: "369.4"
481
- }, null, -1),
482
- s("linearGradient", {
483
- id: "j",
484
- gradientUnits: "userSpaceOnUse",
485
- x1: "283.264",
486
- x2: "283.264",
487
- "xlink:href": "#a",
488
- y1: "131.629",
489
- y2: "232.559"
490
- }, null, -1),
491
- s("linearGradient", {
492
- id: "k",
493
- gradientUnits: "userSpaceOnUse",
494
- x1: "283.46",
495
- x2: "283.46",
496
- y1: "202.275",
497
- y2: "183.785"
498
- }, [
499
- s("stop", {
500
- offset: "0",
501
- "stop-color": "#969799",
502
- "stop-opacity": "0"
503
- }),
504
- s("stop", {
505
- offset: "1",
506
- "stop-color": "#808183"
507
- })
508
- ], -1),
509
- s("path", {
510
- 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",
511
- fill: "url(#b)"
512
- }, null, -1),
513
- s("path", {
514
- 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",
515
- fill: "url(#c)"
516
- }, null, -1),
517
- s("path", {
518
- 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",
519
- fill: "url(#d)"
520
- }, null, -1),
521
- s("path", {
522
- 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",
523
- fill: "url(#e)"
524
- }, null, -1),
525
- s("path", {
526
- d: "m296.4 288.3h13v79.6h-13z",
527
- fill: "url(#f)"
528
- }, null, -1),
529
- s("path", {
530
- 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",
531
- fill: "url(#g)"
532
- }, null, -1),
533
- s("path", {
534
- 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",
535
- fill: "url(#h)"
536
- }, null, -1),
537
- s("path", {
538
- 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",
539
- fill: "url(#i)"
540
- }, null, -1),
541
- s("path", {
542
- 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",
543
- fill: "url(#j)"
544
- }, null, -1),
545
- s("path", {
546
- d: "m281.7 183.8h3.6v18.5h-3.6z",
547
- fill: "url(#k)"
548
- }, null, -1)
549
- ])], 8, ye))
550
- ]),
551
- _: 1
552
- });
553
- };
554
- }
555
- });
556
- var P = /* @__PURE__ */ ((e) => (e.DELETE = "DELETE", e.SUCCESS = "SUCCESS", e))(P || {});
557
- const he = { class: "dialog relative top-20 mx-auto p-5 border w-96 shadow-lg rounded-md bg-white" }, xe = {
558
- key: 0,
559
- class: "p-6 text-center"
560
- }, ve = { class: "mb-5 text-lg font-normal text-gray-500 dark:text-gray-400" }, ke = { class: "flex justify-center" }, _e = /* @__PURE__ */ y({
561
- __name: "BaseModal",
562
- props: {
563
- title: {
564
- type: String,
565
- required: !0
566
- },
567
- description: {
568
- type: String,
569
- required: !1
570
- },
571
- to: {
572
- type: String,
573
- required: !1,
574
- default: "/"
575
- },
576
- mode: {
577
- type: String,
578
- required: !1,
579
- default: "SUCCESS"
580
- }
581
- },
582
- emits: ["closeModal", "confirmModal"],
583
- setup(e) {
584
- return (t, a) => {
585
- const n = G("base-button");
586
- return l(), i(T, null, [
587
- s("div", {
588
- class: "outside",
589
- onClick: a[0] || (a[0] = (r) => t.$emit("closeModal"))
590
- }),
591
- s("div", he, [
592
- e.mode === d(P).DELETE ? (l(), i("div", xe, [
593
- m(d(z), { class: "w-12 h-12 text-gray-400 mx-auto mb-4" }),
594
- s("h3", ve, " Are you sure you want to delete this " + b(e.title) + "? ", 1),
595
- s("div", ke, [
596
- m(n, {
597
- color: d(v).RED,
598
- onClick: a[1] || (a[1] = (r) => t.$emit("confirmModal")),
599
- description: "Yes, I'm sure"
600
- }, null, 8, ["color"]),
601
- m(n, {
602
- color: d(v).WHITE,
603
- onClick: a[2] || (a[2] = (r) => t.$emit("closeModal")),
604
- description: "No, cancel"
605
- }, null, 8, ["color"])
606
- ])
607
- ])) : g("", !0)
608
- ])
609
- ], 64);
610
- };
611
- }
612
- }), I = (e, t) => {
613
- const a = e.__vccOpts || e;
614
- for (const [n, r] of t)
615
- a[n] = r;
616
- return a;
617
- }, rt = /* @__PURE__ */ I(_e, [["__scopeId", "data-v-492169b3"]]), st = /* @__PURE__ */ y({
618
- __name: "BaseRow",
619
- props: {
620
- bgColor: {
621
- type: String,
622
- required: !1,
623
- default: "white"
624
- }
625
- },
626
- setup(e) {
627
- const t = e;
628
- function a() {
629
- return "block p-8 border border-gray-200 rounded-xl shadow-sm dark:bg-gray-800 dark:border-gray-700 " + t.bgColor;
630
- }
631
- return (n, r) => (l(), i("div", {
632
- class: h(a())
633
- }, [
634
- $(n.$slots, "default")
635
- ], 2));
636
- }
637
- }), we = {}, Ee = { class: "w-4 h-4 border-2 border-gray-200 border-t-blue-500 rounded-full animate-spin" };
638
- function Re(e, t) {
639
- return l(), i("div", Ee);
58
+ //#endregion
59
+ //#region src/components/BaseAlert.vue?vue&type=script&setup=true&lang.ts
60
+ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
61
+ __name: "BaseAlert",
62
+ props: {
63
+ title: {
64
+ type: String,
65
+ required: !1,
66
+ default: ""
67
+ },
68
+ color: {
69
+ type: String,
70
+ required: !1,
71
+ default: I.ERROR
72
+ }
73
+ },
74
+ setup(e) {
75
+ let t = e;
76
+ function n() {
77
+ let e = fe(t.color);
78
+ return "flex items-center p-4 mb-4 text-sm text-" + e + "-800 border border-" + e + "-300 rounded-lg bg-" + e + "-50 dark:bg-gray-800 dark:text-" + e + "-400 dark:border-" + e + "-800";
79
+ }
80
+ return (t, r) => (_(), a("div", {
81
+ class: f(n()),
82
+ role: "alert"
83
+ }, [c(w(se), { class: "w-6 h-6 text-gray-400" }), o("div", null, [o("span", me, C(e.title), 1)])], 2));
84
+ }
85
+ }), ge = "bg-red-100 text-red-700 border-red-200", R = /* @__PURE__ */ l({
86
+ __name: "BaseBadge",
87
+ props: { color: {
88
+ type: String,
89
+ required: !1
90
+ } },
91
+ setup(e) {
92
+ let t = T(), r = n(() => !!t.default), o = e, s = {
93
+ [L.RED]: "bg-red-100 text-red-700 border-red-200",
94
+ [L.GREEN]: "bg-green-100 text-green-700 border-green-200",
95
+ [L.BLUE]: "bg-blue-100 text-blue-700 border-blue-200",
96
+ [L.YELLOW]: "bg-yellow-100 text-yellow-700 border-yellow-200",
97
+ [L.GRAY]: "bg-gray-100 text-gray-700 border-gray-200",
98
+ [L.NONE]: "bg-gray-50 text-gray-600 border-gray-200"
99
+ }, c = n(() => `inline-flex items-center gap-1 font-semibold text-xs leading-none px-3 py-1.5 rounded-full border ${o.color && s[o.color] || ge}`);
100
+ return (e, t) => r.value ? (_(), a("span", {
101
+ key: 0,
102
+ class: f(c.value)
103
+ }, [b(e.$slots, "default")], 2)) : i("", !0);
104
+ }
105
+ }), _e = {
106
+ 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",
107
+ "aria-label": "Breadcrumb"
108
+ }, ve = { class: "inline-flex items-center space-x-1 md:space-x-3" }, ye = {
109
+ class: "inline-flex items-center",
110
+ style: { "margin-left": "0" }
111
+ }, be = /* @__PURE__ */ l({
112
+ __name: "BaseBreadcrumb",
113
+ props: {
114
+ items: {
115
+ type: Array,
116
+ required: !1,
117
+ default: void 0
118
+ },
119
+ path: {
120
+ type: String,
121
+ required: !1,
122
+ default: void 0
123
+ }
124
+ },
125
+ setup(t) {
126
+ let r = t, i = n(() => {
127
+ if (r.items && r.items.length > 0) return r.items;
128
+ let e = (r.path ?? (typeof window < "u" ? window.location.pathname : "/")).split("/").filter((e) => e !== ""), t = "";
129
+ return e.map((e) => (t += "/" + e, {
130
+ name: Number.isNaN(Number(e)) ? (e.charAt(0).toUpperCase() + e.slice(1)).replaceAll("-", " ") : e,
131
+ url: t
132
+ }));
133
+ });
134
+ return (t, n) => {
135
+ let r = x("router-link");
136
+ return _(), a("nav", _e, [o("ol", ve, [o("li", ye, [c(r, {
137
+ to: "/",
138
+ class: "inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white"
139
+ }, {
140
+ default: k(() => [c(w(le), { class: "h-4 w-4 text-gray-500 mr-2" }), n[0] ||= s(" Home ", -1)]),
141
+ _: 1
142
+ })]), (_(!0), a(e, null, y(i.value, (e, t) => (_(), a("li", {
143
+ key: t,
144
+ class: "inline-flex items-center",
145
+ style: { "margin-left": "0" }
146
+ }, [c(w(P), { class: "h-4 w-4 text-gray-500" }), c(r, {
147
+ to: e.url,
148
+ 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"
149
+ }, {
150
+ default: k(() => [s(C(e.name), 1)]),
151
+ _: 2
152
+ }, 1032, ["to"])]))), 128))])]);
153
+ };
154
+ }
155
+ }), z = /* @__PURE__ */ function(e) {
156
+ return e.RED = "RED", e.BLUE = "BLUE", e.WHITE = "WHITE", e.DARK = "DARK", e.GREEN = "GREEN", e.YELLOW = "YELLOW", e.PURPLE = "PURPLE", e;
157
+ }({}), B = /* @__PURE__ */ function(e) {
158
+ return e.EXTRA_SMALL = "EXTRA_SMALL", e.SMALL = "SMALL", e.BASE = "BASE", e.LARGE = "LARGE", e.EXTRA_LARGE = "EXTRA_LARGE", e;
159
+ }({}), xe = [
160
+ "type",
161
+ "disabled",
162
+ "onClick"
163
+ ], Se = {
164
+ key: 0,
165
+ class: "inline-flex items-center"
166
+ }, Ce = { key: 1 }, we = { key: 2 }, Te = ["type", "disabled"], Ee = {
167
+ key: 0,
168
+ class: "inline-flex items-center"
169
+ }, De = { key: 1 }, Oe = { key: 2 }, ke = /* @__PURE__ */ l({
170
+ __name: "BaseButton",
171
+ props: {
172
+ description: {
173
+ type: String,
174
+ required: !0
175
+ },
176
+ color: {
177
+ type: String,
178
+ required: !1,
179
+ default: z.BLUE
180
+ },
181
+ to: {
182
+ type: String,
183
+ required: !1
184
+ },
185
+ type: {
186
+ type: String,
187
+ required: !1,
188
+ default: "button"
189
+ },
190
+ icon: {
191
+ type: String,
192
+ required: !1
193
+ },
194
+ iconSize: {
195
+ type: String,
196
+ required: !1
197
+ },
198
+ iconLeft: {
199
+ type: Boolean,
200
+ required: !1,
201
+ default: !1
202
+ },
203
+ isRounded: {
204
+ type: Boolean,
205
+ required: !1
206
+ },
207
+ isDisable: {
208
+ type: Boolean,
209
+ required: !1
210
+ },
211
+ size: {
212
+ type: String,
213
+ required: !1
214
+ },
215
+ isLoading: {
216
+ type: Boolean,
217
+ required: !1
218
+ }
219
+ },
220
+ setup(e) {
221
+ let t = e;
222
+ function n() {
223
+ let e = t.isDisable || t.isLoading, n;
224
+ switch (t.color) {
225
+ case z.BLUE:
226
+ n = 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";
227
+ break;
228
+ case z.WHITE:
229
+ n = 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";
230
+ break;
231
+ case z.DARK:
232
+ n = 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";
233
+ break;
234
+ case z.GREEN:
235
+ n = 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";
236
+ break;
237
+ case z.RED:
238
+ n = 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";
239
+ break;
240
+ case z.YELLOW:
241
+ n = 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";
242
+ break;
243
+ case z.PURPLE:
244
+ n = 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 px-5 py-2.5 mb-2";
245
+ break;
246
+ default:
247
+ n = 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";
248
+ break;
249
+ }
250
+ let r = "px-5 py-2.5 mr-2 mb-2 text-sm";
251
+ switch (t.size) {
252
+ case B.EXTRA_SMALL:
253
+ r = "px-3 py-2 text-xs";
254
+ break;
255
+ case B.SMALL:
256
+ r = "px-3 py-2 text-sm";
257
+ break;
258
+ case B.BASE:
259
+ r = "px-5 py-2.5 text-sm";
260
+ break;
261
+ case B.LARGE:
262
+ r = "px-5 py-3 text-base";
263
+ break;
264
+ case B.EXTRA_LARGE:
265
+ r = "px-6 py-3.5 text-base";
266
+ break;
267
+ }
268
+ let i = "rounded-lg";
269
+ return t.isRounded && (i = "rounded-full"), "inline-flex items-center " + r + " " + n + " font-medium " + i;
270
+ }
271
+ return (s, c) => {
272
+ let l = x("router-link");
273
+ return e.to ? (_(), r(l, {
274
+ key: 0,
275
+ to: e.to,
276
+ custom: ""
277
+ }, {
278
+ default: k(({ navigate: r }) => [o("button", {
279
+ type: t.type,
280
+ class: f(n()),
281
+ disabled: e.isDisable || e.isLoading,
282
+ onClick: r
283
+ }, [
284
+ e.isLoading ? (_(), a("div", Se, [...c[0] ||= [o("svg", {
285
+ "aria-hidden": "true",
286
+ role: "status",
287
+ class: "inline w-4 h-4 me-3 text-white animate-spin",
288
+ viewBox: "0 0 100 101",
289
+ fill: "none",
290
+ xmlns: "http://www.w3.org/2000/svg"
291
+ }, [o("path", {
292
+ 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",
293
+ fill: "#E5E7EB"
294
+ }), o("path", {
295
+ 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",
296
+ fill: "currentColor"
297
+ })], -1)]])) : i("", !0),
298
+ e.iconLeft ? i("", !0) : (_(), a("span", Ce, C(e.description), 1)),
299
+ b(s.$slots, "default"),
300
+ e.iconLeft ? (_(), a("span", we, C(e.description), 1)) : i("", !0)
301
+ ], 10, xe)]),
302
+ _: 3
303
+ }, 8, ["to"])) : (_(), a("button", {
304
+ key: 1,
305
+ type: t.type,
306
+ class: f(n()),
307
+ disabled: e.isDisable || e.isLoading
308
+ }, [
309
+ e.isLoading ? (_(), a("div", Ee, [...c[1] ||= [o("svg", {
310
+ "aria-hidden": "true",
311
+ role: "status",
312
+ class: "inline w-4 h-4 me-3 text-white animate-spin",
313
+ viewBox: "0 0 100 101",
314
+ fill: "none",
315
+ xmlns: "http://www.w3.org/2000/svg"
316
+ }, [o("path", {
317
+ 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",
318
+ fill: "#E5E7EB"
319
+ }), o("path", {
320
+ 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",
321
+ fill: "currentColor"
322
+ })], -1)]])) : i("", !0),
323
+ e.iconLeft ? i("", !0) : (_(), a("span", De, C(e.description), 1)),
324
+ b(s.$slots, "default"),
325
+ e.iconLeft ? (_(), a("span", Oe, C(e.description), 1)) : i("", !0)
326
+ ], 10, Te));
327
+ };
328
+ }
329
+ }), V = /* @__PURE__ */ function(e) {
330
+ return e.BASE = "BASE", e.BASE_SHORTER = "BASE_SHORTER", e.SQUARE = "SQUARE", e;
331
+ }({}), Ae = {
332
+ key: 0,
333
+ class: "h-px my-8 bg-gray-200 border-0 dark:bg-gray-700"
334
+ }, je = {
335
+ key: 1,
336
+ class: "w-48 h-1 mx-auto my-4 bg-gray-100 border-0 rounded md:my-10 dark:bg-gray-700"
337
+ }, Me = {
338
+ key: 2,
339
+ class: "w-8 h-8 mx-auto my-8 bg-gray-200 border-0 rounded md:my-12 dark:bg-gray-700"
340
+ }, Ne = /* @__PURE__ */ l({
341
+ __name: "BaseLine",
342
+ props: { mode: {
343
+ type: String,
344
+ required: !1,
345
+ default: V.BASE
346
+ } },
347
+ setup(t) {
348
+ return (n, r) => (_(), a(e, null, [
349
+ t.mode === w(V).BASE ? (_(), a("hr", Ae)) : i("", !0),
350
+ t.mode === w(V).BASE_SHORTER ? (_(), a("hr", je)) : i("", !0),
351
+ t.mode === w(V).SQUARE ? (_(), a("hr", Me)) : i("", !0)
352
+ ], 64));
353
+ }
354
+ }), H = /* @__PURE__ */ function(e) {
355
+ return e.SMALL = "SMALL", e.MEDIUM = "MEDIUM", e.LARGE = "LARGE", e;
356
+ }({}), Pe = H, Fe = ["height", "width"], Ie = /* @__PURE__ */ l({
357
+ __name: "BaseLogo",
358
+ props: { size: {
359
+ type: String,
360
+ required: !1,
361
+ default: H.MEDIUM
362
+ } },
363
+ setup(e) {
364
+ let t = e;
365
+ function n() {
366
+ let e = "";
367
+ switch (t.size) {
368
+ case H.SMALL:
369
+ e = "50px";
370
+ break;
371
+ case H.MEDIUM:
372
+ e = "100px";
373
+ break;
374
+ case H.LARGE:
375
+ e = "150px";
376
+ break;
377
+ }
378
+ return e;
379
+ }
380
+ return (e, t) => {
381
+ let i = x("router-link");
382
+ return _(), r(i, {
383
+ to: "/",
384
+ class: "flex items-center mb-6 text-2xl font-semibold text-gray-900 dark:text-white"
385
+ }, {
386
+ default: k(() => [(_(), a("svg", {
387
+ height: n(),
388
+ width: n(),
389
+ viewBox: "33.6 130.6 499.7 242.9",
390
+ xmlns: "http://www.w3.org/2000/svg",
391
+ "xmlns:xlink": "http://www.w3.org/1999/xlink"
392
+ }, [...t[0] ||= [
393
+ o("linearGradient", { id: "a" }, [o("stop", {
394
+ offset: ".085",
395
+ "stop-color": "#469e43"
396
+ }), o("stop", {
397
+ offset: "1",
398
+ "stop-color": "#132d13"
399
+ })], -1),
400
+ o("linearGradient", {
401
+ id: "b",
402
+ gradientUnits: "userSpaceOnUse",
403
+ x1: "64.863",
404
+ x2: "64.863",
405
+ "xlink:href": "#a",
406
+ y1: "288.291",
407
+ y2: "369.4"
408
+ }, null, -1),
409
+ o("linearGradient", {
410
+ id: "c",
411
+ gradientUnits: "userSpaceOnUse",
412
+ x1: "138.367",
413
+ x2: "138.367",
414
+ "xlink:href": "#a",
415
+ y1: "308.454",
416
+ y2: "370.601"
417
+ }, null, -1),
418
+ o("linearGradient", {
419
+ id: "d",
420
+ gradientUnits: "userSpaceOnUse",
421
+ x1: "195.475",
422
+ x2: "195.475",
423
+ "xlink:href": "#a",
424
+ y1: "288.291",
425
+ y2: "369.85"
426
+ }, null, -1),
427
+ o("linearGradient", {
428
+ id: "e",
429
+ gradientUnits: "userSpaceOnUse",
430
+ x1: "249.634",
431
+ x2: "249.634",
432
+ "xlink:href": "#a",
433
+ y1: "307.312",
434
+ y2: "369.511"
435
+ }, null, -1),
436
+ o("linearGradient", {
437
+ id: "f",
438
+ gradientUnits: "userSpaceOnUse",
439
+ x1: "302.884",
440
+ x2: "302.884",
441
+ "xlink:href": "#a",
442
+ y1: "288.291",
443
+ y2: "367.857"
444
+ }, null, -1),
445
+ o("linearGradient", {
446
+ id: "g",
447
+ gradientUnits: "userSpaceOnUse",
448
+ x1: "354.118",
449
+ x2: "354.118",
450
+ "xlink:href": "#a",
451
+ y1: "307.312",
452
+ y2: "369.511"
453
+ }, null, -1),
454
+ o("linearGradient", {
455
+ id: "h",
456
+ gradientUnits: "userSpaceOnUse",
457
+ x1: "428.02",
458
+ x2: "428.02",
459
+ "xlink:href": "#a",
460
+ y1: "306.156",
461
+ y2: "367.742"
462
+ }, null, -1),
463
+ o("linearGradient", {
464
+ id: "i",
465
+ gradientUnits: "userSpaceOnUse",
466
+ x1: "502.066",
467
+ x2: "502.066",
468
+ "xlink:href": "#a",
469
+ y1: "288.291",
470
+ y2: "369.4"
471
+ }, null, -1),
472
+ o("linearGradient", {
473
+ id: "j",
474
+ gradientUnits: "userSpaceOnUse",
475
+ x1: "283.264",
476
+ x2: "283.264",
477
+ "xlink:href": "#a",
478
+ y1: "131.629",
479
+ y2: "232.559"
480
+ }, null, -1),
481
+ o("linearGradient", {
482
+ id: "k",
483
+ gradientUnits: "userSpaceOnUse",
484
+ x1: "283.46",
485
+ x2: "283.46",
486
+ y1: "202.275",
487
+ y2: "183.785"
488
+ }, [o("stop", {
489
+ offset: "0",
490
+ "stop-color": "#969799",
491
+ "stop-opacity": "0"
492
+ }), o("stop", {
493
+ offset: "1",
494
+ "stop-color": "#808183"
495
+ })], -1),
496
+ o("path", {
497
+ 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",
498
+ fill: "url(#b)"
499
+ }, null, -1),
500
+ o("path", {
501
+ 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",
502
+ fill: "url(#c)"
503
+ }, null, -1),
504
+ o("path", {
505
+ 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",
506
+ fill: "url(#d)"
507
+ }, null, -1),
508
+ o("path", {
509
+ 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",
510
+ fill: "url(#e)"
511
+ }, null, -1),
512
+ o("path", {
513
+ d: "m296.4 288.3h13v79.6h-13z",
514
+ fill: "url(#f)"
515
+ }, null, -1),
516
+ o("path", {
517
+ 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",
518
+ fill: "url(#g)"
519
+ }, null, -1),
520
+ o("path", {
521
+ 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",
522
+ fill: "url(#h)"
523
+ }, null, -1),
524
+ o("path", {
525
+ 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",
526
+ fill: "url(#i)"
527
+ }, null, -1),
528
+ o("path", {
529
+ 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",
530
+ fill: "url(#j)"
531
+ }, null, -1),
532
+ o("path", {
533
+ d: "m281.7 183.8h3.6v18.5h-3.6z",
534
+ fill: "url(#k)"
535
+ }, null, -1)
536
+ ]], 8, Fe))]),
537
+ _: 1
538
+ });
539
+ };
540
+ }
541
+ }), U = /* @__PURE__ */ function(e) {
542
+ return e.DELETE = "DELETE", e.SUCCESS = "SUCCESS", e;
543
+ }({}), Le = ["aria-labelledby"], Re = {
544
+ key: 0,
545
+ class: "p-6 text-center"
546
+ }, ze = ["id"], Be = { class: "flex justify-center" }, Ve = /* @__PURE__ */ l({
547
+ __name: "BaseModal",
548
+ props: {
549
+ title: {
550
+ type: String,
551
+ required: !0
552
+ },
553
+ description: {
554
+ type: String,
555
+ required: !1
556
+ },
557
+ to: {
558
+ type: String,
559
+ required: !1,
560
+ default: "/"
561
+ },
562
+ mode: {
563
+ type: String,
564
+ required: !1,
565
+ default: U.SUCCESS
566
+ }
567
+ },
568
+ emits: ["closeModal", "confirmModal"],
569
+ setup(t, { emit: n }) {
570
+ let r = n;
571
+ function s(e) {
572
+ e.key === "Escape" && r("closeModal");
573
+ }
574
+ return m(() => {
575
+ document.addEventListener("keydown", s);
576
+ }), g(() => {
577
+ document.removeEventListener("keydown", s);
578
+ }), (n, r) => {
579
+ let s = x("base-button");
580
+ return _(), a(e, null, [o("div", {
581
+ class: "outside",
582
+ onClick: r[0] ||= (e) => n.$emit("closeModal")
583
+ }), o("div", {
584
+ class: "dialog relative top-20 mx-auto p-5 border w-96 shadow-lg rounded-md bg-white",
585
+ role: "dialog",
586
+ "aria-modal": "true",
587
+ "aria-labelledby": "modal-title-" + t.title
588
+ }, [t.mode === w(U).DELETE ? (_(), a("div", Re, [
589
+ c(w(ie), { class: "w-12 h-12 text-gray-400 mx-auto mb-4" }),
590
+ o("h3", {
591
+ id: "modal-title-" + t.title,
592
+ class: "mb-5 text-lg font-normal text-gray-500 dark:text-gray-400"
593
+ }, " Are you sure you want to delete this " + C(t.title) + "? ", 9, ze),
594
+ o("div", Be, [c(s, {
595
+ color: w(z).RED,
596
+ onClick: r[1] ||= (e) => n.$emit("confirmModal"),
597
+ description: "Yes, I'm sure"
598
+ }, null, 8, ["color"]), c(s, {
599
+ color: w(z).WHITE,
600
+ onClick: r[2] ||= (e) => n.$emit("closeModal"),
601
+ description: "No, cancel"
602
+ }, null, 8, ["color"])])
603
+ ])) : i("", !0)], 8, Le)], 64);
604
+ };
605
+ }
606
+ }), W = (e, t) => {
607
+ let n = e.__vccOpts || e;
608
+ for (let [e, r] of t) n[e] = r;
609
+ return n;
610
+ }, He = /* @__PURE__ */ W(Ve, [["__scopeId", "data-v-1db4f0ac"]]), Ue = /* @__PURE__ */ l({
611
+ __name: "BaseRow",
612
+ props: { bgColor: {
613
+ type: String,
614
+ required: !1,
615
+ default: "white"
616
+ } },
617
+ setup(e) {
618
+ let t = e;
619
+ function n() {
620
+ return "block p-8 border border-gray-200 rounded-xl shadow-sm dark:bg-gray-800 dark:border-gray-700 " + t.bgColor;
621
+ }
622
+ return (e, t) => (_(), a("div", { class: f(n()) }, [b(e.$slots, "default")], 2));
623
+ }
624
+ }), We = {}, Ge = { class: "w-4 h-4 border-2 border-gray-200 border-t-blue-500 rounded-full animate-spin" };
625
+ function Ke(e, t) {
626
+ return _(), a("div", Ge);
627
+ }
628
+ var qe = /* @__PURE__ */ W(We, [["render", Ke]]), G = /* @__PURE__ */ function(e) {
629
+ return e.SUCCESS = "SUCCESS", e.WARNING = "WARNING", e.ERROR = "ERROR", e;
630
+ }({}), K = /* @__PURE__ */ function(e) {
631
+ return e.TOP_LEFT = "TOP_LEFT", e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e.BOTTOM_RIGHT = "BOTTOM_RIGHT", e;
632
+ }({}), Je = { 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" }, Ye = { class: "ml-3 text-sm font-normal" }, Xe = {
633
+ key: 3,
634
+ type: "button",
635
+ 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",
636
+ "data-dismiss-target": "#toast-danger",
637
+ "aria-label": "Close"
638
+ }, Ze = /* @__PURE__ */ l({
639
+ __name: "BaseToast",
640
+ props: {
641
+ mode: {
642
+ type: Object,
643
+ required: !0
644
+ },
645
+ description: {
646
+ type: String,
647
+ required: !0
648
+ },
649
+ hasCloseIcon: {
650
+ type: Boolean,
651
+ required: !1,
652
+ default: !0
653
+ },
654
+ positioning: {
655
+ type: String,
656
+ required: !1,
657
+ default: K.TOP_RIGHT
658
+ },
659
+ duration: {
660
+ type: Number,
661
+ required: !1,
662
+ default: 5e3
663
+ }
664
+ },
665
+ setup(e) {
666
+ let t = e, n = v(!0), r = null;
667
+ function s() {
668
+ n.value = !1, r &&= (clearTimeout(r), null);
669
+ }
670
+ m(() => {
671
+ r = setTimeout(() => n.value = !1, t.duration);
672
+ }), g(() => {
673
+ r && clearTimeout(r);
674
+ });
675
+ function l() {
676
+ let e = "";
677
+ switch (t.mode) {
678
+ case G.ERROR:
679
+ e = "text-red-500 bg-red-100 dark:bg-red-800 dark:text-red-200";
680
+ break;
681
+ case G.SUCCESS:
682
+ e = "text-green-500 bg-green-100 dark:bg-green-800 dark:text-green-200";
683
+ break;
684
+ case G.WARNING:
685
+ e = "text-orange-500 bg-orange-100 dark:bg-orange-700 dark:text-orange-200";
686
+ break;
687
+ default:
688
+ e = "text-gray-500 bg-gray-100 dark:bg-gray-800 dark:text-gray-200";
689
+ break;
690
+ }
691
+ return "inline-flex items-center justify-center flex-shrink-0 w-8 h-8 rounded-lg " + e;
692
+ }
693
+ function u() {
694
+ let e = "top-5 right-5";
695
+ switch (t.positioning) {
696
+ case K.BOTTOM_LEFT:
697
+ e = "bottom-5 left-5";
698
+ break;
699
+ case K.TOP_LEFT:
700
+ e = "top-5 left-5";
701
+ break;
702
+ case K.TOP_RIGHT:
703
+ e = "top-5 right-5";
704
+ break;
705
+ case K.BOTTOM_RIGHT:
706
+ e = "bottom-5 right-5";
707
+ break;
708
+ }
709
+ return "fixed flex items-center w-full max-w-md p-4 space-x-4 divide-x rounded-lg " + e;
710
+ }
711
+ return (t, r) => n.value ? (_(), a("div", {
712
+ key: 0,
713
+ id: "toast-top-right",
714
+ class: f(u()),
715
+ role: "alert"
716
+ }, [o("div", Je, [
717
+ e.mode == w(G).ERROR ? (_(), a("div", {
718
+ key: 0,
719
+ class: f(l())
720
+ }, [c(w(ie), { class: "h-6 w-6 text-red-500" }), r[0] ||= o("span", { class: "sr-only" }, "Error icon", -1)], 2)) : e.mode == w(G).SUCCESS ? (_(), a("div", {
721
+ key: 1,
722
+ class: f(l())
723
+ }, [c(w(ne), { class: "h-6 w-6 text-green-500" }), r[1] ||= o("span", { class: "sr-only" }, "Check icon", -1)], 2)) : e.mode == w(G).WARNING ? (_(), a("div", {
724
+ key: 2,
725
+ class: f(l())
726
+ }, [c(w(ae), { class: "h-6 w-6 text-yellow-500" }), r[2] ||= o("span", { class: "sr-only" }, "Warning icon", -1)], 2)) : i("", !0),
727
+ o("div", Ye, C(e.description), 1),
728
+ e.hasCloseIcon ? (_(), a("button", Xe, [r[3] ||= o("span", { class: "sr-only" }, "Close", -1), c(w(F), {
729
+ class: "h-6 w-6 text-gray-500 cursor-pointer",
730
+ onClick: s
731
+ })])) : i("", !0)
732
+ ])], 2)) : i("", !0);
733
+ }
734
+ }), Qe = { class: "w-13" }, $e = /* @__PURE__ */ l({
735
+ __name: "ColoredSquares",
736
+ props: { color: {
737
+ type: String,
738
+ required: !1
739
+ } },
740
+ setup(e) {
741
+ let t = e, n = [
742
+ "bg-slate-300",
743
+ "bg-zinc-300",
744
+ "bg-neutral-300",
745
+ "bg-stone-300",
746
+ "bg-blue-300",
747
+ "bg-green-300",
748
+ "bg-yellow-300",
749
+ "bg-purple-300",
750
+ "bg-pink-300"
751
+ ], r = v(n[Math.floor(Math.random() * n.length)]);
752
+ function i() {
753
+ let e = "gray";
754
+ switch (t.color) {
755
+ case L.GREEN:
756
+ e = "green";
757
+ break;
758
+ case L.RED:
759
+ e = "red";
760
+ break;
761
+ case L.BLUE:
762
+ e = "blue";
763
+ break;
764
+ case L.YELLOW:
765
+ e = "yellow";
766
+ break;
767
+ case L.NONE:
768
+ e = "";
769
+ break;
770
+ }
771
+ return "font-bold bg-" + e + "-100 text-" + e + "-800 text-xs mr-2 px-2.5 py-0.5 rounded-full";
772
+ }
773
+ return (e, t) => (_(), a("div", Qe, [o("div", { class: f(["border border-gray-300 relative aspect-square rounded-lg bg-white shadow-sm overflow-hidden flex items-center justify-center text-center", i()]) }, [b(e.$slots, "default"), o("div", { class: f(["absolute bottom-0 left-0 h-1 w-full", r.value]) }, null, 2)], 2)]));
774
+ }
775
+ }), et = { class: "relative rounded-xl border-2 border-dashed border-orange-300 bg-white p-6" }, tt = {
776
+ key: 0,
777
+ class: "absolute right-4 top-4 rounded-md bg-orange-100 px-3 py-1 text-xs font-bold tracking-wide text-orange-500"
778
+ }, nt = { class: "flex items-start justify-between" }, rt = { class: "text-sm font-bold tracking-wide text-gray-800" }, it = { class: "mt-1 text-4xl font-bold text-gray-400" }, at = { class: "mt-1 text-sm font-medium text-orange-400" }, ot = /* @__PURE__ */ l({
779
+ __name: "EarningsCard",
780
+ props: {
781
+ title: { default: "TOTAL EARNINGS" },
782
+ amount: { default: 0 },
783
+ subtitle: { default: "Lifetime commission" },
784
+ badge: { default: "" },
785
+ currency: { default: "$" }
786
+ },
787
+ setup(e) {
788
+ let t = e, r = n(() => t.currency + t.amount.toLocaleString("en-US", {
789
+ minimumFractionDigits: 2,
790
+ maximumFractionDigits: 2
791
+ }));
792
+ return (t, n) => (_(), a("div", et, [e.badge ? (_(), a("div", tt, C(e.badge), 1)) : i("", !0), o("div", nt, [o("div", null, [
793
+ o("p", rt, C(e.title), 1),
794
+ o("p", it, C(r.value), 1),
795
+ o("p", at, C(e.subtitle), 1)
796
+ ]), n[0] ||= o("div", { class: "mt-6 flex h-12 w-12 items-center justify-center rounded-xl bg-orange-50" }, [o("svg", {
797
+ class: "h-6 w-6 text-orange-400",
798
+ viewBox: "0 0 24 24",
799
+ fill: "none",
800
+ stroke: "currentColor",
801
+ "stroke-width": "2.5",
802
+ "stroke-linecap": "round",
803
+ "stroke-linejoin": "round"
804
+ }, [o("polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17" }), o("polyline", { points: "16 7 22 7 22 13" })])], -1)])]));
805
+ }
806
+ }), st = {
807
+ key: 0,
808
+ class: "font-bold text-green-800"
809
+ }, ct = { key: 0 }, lt = { key: 0 }, ut = "font-bold", dt = /* @__PURE__ */ l({
810
+ __name: "EuroAmount",
811
+ props: {
812
+ amount: {
813
+ type: Number,
814
+ required: !1
815
+ },
816
+ beforeAmount: {
817
+ type: Number,
818
+ default: null,
819
+ required: !1
820
+ },
821
+ showCurrency: {
822
+ type: Boolean,
823
+ default: !0,
824
+ required: !1
825
+ }
826
+ },
827
+ setup(t) {
828
+ let r = t, o = n(() => r.amount !== null && r.amount !== void 0), c = n(() => o.value && r.amount < 0), l = n(() => r.beforeAmount === null || r.beforeAmount === void 0 ? !1 : r.amount < r.beforeAmount), u = n(() => c.value || l.value), d = n(() => !c.value && !l.value && !(r.beforeAmount === null || r.beforeAmount === void 0));
829
+ return (n, r) => (_(), a(e, null, [o.value && d.value ? (_(), a("span", st, [s(C(t.amount) + " ", 1), t.showCurrency ? (_(), a("span", ct, "€")) : i("", !0)])) : i("", !0), o.value && !d.value ? (_(), a("span", {
830
+ key: 1,
831
+ class: f([ut, u.value ? "text-red-800" : "text-gray-800"])
832
+ }, [s(C(t.amount) + " ", 1), t.showCurrency ? (_(), a("span", lt, "€")) : i("", !0)], 2)) : i("", !0)], 64));
833
+ }
834
+ }), ft = ["onClick", "onKeydown"], pt = {
835
+ key: 1,
836
+ style: { cursor: "not-allowed" }
837
+ }, mt = /* @__PURE__ */ W(/* @__PURE__ */ l({
838
+ __name: "Pagination",
839
+ props: {
840
+ totalItems: {
841
+ type: Number,
842
+ required: !0
843
+ },
844
+ itemsPerPage: {
845
+ type: Number,
846
+ default: 20
847
+ }
848
+ },
849
+ emits: ["page-changed"],
850
+ setup(t, { emit: n }) {
851
+ let r = t, s = v(1), c = v(0), l = v([]), u = n;
852
+ function d(e) {
853
+ if (e !== s.value && e >= 1 && e <= c.value && (s.value = e), c.value > 5) {
854
+ l.value = [], e - 3 > 0 && (l.value.push(1), l.value.push(0));
855
+ for (let t = 1; t <= 2; t++) {
856
+ let n = e - t;
857
+ n > 0 && l.value.push(n);
858
+ }
859
+ l.value.length, l.value.push(s.value);
860
+ let t = c.value - e;
861
+ if (t > 2) {
862
+ for (let t = 1; t <= 2; t++) l.value.push(e + t);
863
+ l.value.push(0), l.value.push(c.value);
864
+ } else for (let n = 1; n <= t; n++) l.value.push(e + n);
865
+ }
866
+ u("page-changed", e);
867
+ }
868
+ return O(() => r.totalItems, () => {
869
+ if (c.value = Math.ceil(r.totalItems / r.itemsPerPage), l.value = [], c.value > 5) {
870
+ for (let e = 1; e < 5; e++) l.value.push(e);
871
+ l.value.push(0), l.value.push(c.value);
872
+ } else for (let e = 1; e <= c.value; e++) l.value.push(e);
873
+ }, { immediate: !0 }), (t, n) => (_(), a("div", null, [o("ul", null, [(_(!0), a(e, null, y(l.value, (e, t) => (_(), a("li", { key: t }, [e === 0 ? i("", !0) : (_(), a("a", {
874
+ key: 0,
875
+ role: "button",
876
+ tabindex: "0",
877
+ onClick: (t) => d(e),
878
+ onKeydown: j((t) => d(e), ["enter"]),
879
+ class: f({ active: e === s.value })
880
+ }, C(e), 43, ft)), e === 0 ? (_(), a("span", pt, "...")) : i("", !0)]))), 128))])]));
881
+ }
882
+ }), [["__scopeId", "data-v-d7ebb6ac"]]), ht = { key: 0 }, gt = {
883
+ key: 0,
884
+ class: "flex items-center space-x-2"
885
+ }, _t = {
886
+ key: 1,
887
+ class: "flex items-center space-x-2"
888
+ }, vt = /* @__PURE__ */ l({
889
+ __name: "TrendArrow",
890
+ props: {
891
+ number: {
892
+ type: Number,
893
+ required: !1
894
+ },
895
+ icon: {
896
+ type: String,
897
+ required: !1
898
+ }
899
+ },
900
+ setup(e) {
901
+ let t = e, r = n(() => t.number !== null && t.number !== void 0 && t.number < 0);
902
+ return (n, o) => e.number !== null && e.number !== void 0 ? (_(), a("div", ht, [r.value ? (_(), a("span", gt, [c(R, { color: w(L).RED }, {
903
+ default: k(() => [s(C(e.number) + C(t.icon), 1)]),
904
+ _: 1
905
+ }, 8, ["color"]), c(w(ee), { class: "h-5 w-5 text-red-500" })])) : (_(), a("span", _t, [c(R, { color: w(L).GREEN }, {
906
+ default: k(() => [s(C(e.number) + C(t.icon), 1)]),
907
+ _: 1
908
+ }, 8, ["color"]), c(w(te), { class: "h-5 w-5 text-green-500" })]))])) : i("", !0);
909
+ }
910
+ }), q = v(!1), yt = !1, J = "mgv-theme";
911
+ function bt(e) {
912
+ if (!yt) {
913
+ if (yt = !0, J = e, typeof window < "u") {
914
+ let e = window.localStorage?.getItem(J);
915
+ e ? q.value = e === "dark" : typeof window.matchMedia == "function" && (q.value = window.matchMedia("(prefers-color-scheme: dark)").matches);
916
+ }
917
+ typeof document < "u" && u(!0).run(() => {
918
+ O(q, (e) => {
919
+ document.documentElement.classList.toggle("dark", e), window.localStorage?.setItem(J, e ? "dark" : "light");
920
+ }, { immediate: !0 });
921
+ });
922
+ }
923
+ }
924
+ function Y(e) {
925
+ bt(e?.storageKey ?? J);
926
+ function t() {
927
+ q.value = !q.value;
928
+ }
929
+ return {
930
+ isDark: q,
931
+ toggleTheme: t
932
+ };
933
+ }
934
+ //#endregion
935
+ //#region src/composables/useThemeClasses.ts
936
+ function X() {
937
+ let { isDark: e } = Y();
938
+ return {
939
+ card: n(() => e.value ? "bg-gray-800 border-gray-700" : "bg-white border-gray-200"),
940
+ cardAlt: n(() => e.value ? "bg-gray-900 border-gray-700" : "bg-white border-gray-200"),
941
+ pageBg: n(() => e.value ? "bg-gray-900" : "bg-gray-50"),
942
+ border: n(() => e.value ? "border-gray-700" : "border-gray-200"),
943
+ divider: n(() => e.value ? "border-gray-800" : "border-gray-100"),
944
+ primaryText: n(() => e.value ? "text-white" : "text-gray-900"),
945
+ primaryTextSoft: n(() => e.value ? "text-gray-100" : "text-gray-800"),
946
+ bodyText: n(() => e.value ? "text-gray-200" : "text-gray-700"),
947
+ label: n(() => e.value ? "text-gray-300" : "text-gray-700"),
948
+ mutedText: n(() => e.value ? "text-gray-400" : "text-gray-600"),
949
+ subtleText: n(() => e.value ? "text-gray-500" : "text-gray-600"),
950
+ dimText: n(() => e.value ? "text-gray-500" : "text-gray-400"),
951
+ dimTextAlt: n(() => e.value ? "text-gray-400" : "text-gray-500"),
952
+ illustration: n(() => e.value ? "text-gray-600" : "text-gray-300"),
953
+ input: n(() => e.value ? "bg-gray-700 border-gray-600 text-white" : "bg-gray-50 border-gray-300 text-gray-900"),
954
+ inputWithPlaceholder: n(() => 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"),
955
+ ghostButton: n(() => 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"),
956
+ emeraldText: n(() => e.value ? "text-emerald-400" : "text-emerald-600"),
957
+ amberText: n(() => e.value ? "text-amber-400" : "text-amber-600"),
958
+ amberTextStrong: n(() => e.value ? "text-amber-300" : "text-amber-700"),
959
+ redText: n(() => e.value ? "text-red-400" : "text-red-500")
960
+ };
961
+ }
962
+ //#endregion
963
+ //#region src/composables/useEscapeKey.ts
964
+ function Z(e) {
965
+ function t(t) {
966
+ t.key === "Escape" && e();
967
+ }
968
+ m(() => document.addEventListener("keydown", t)), p(() => document.removeEventListener("keydown", t));
640
969
  }
641
- const ot = /* @__PURE__ */ I(we, [["render", Re]]);
642
- var w = /* @__PURE__ */ ((e) => (e.SUCCESS = "SUCCESS", e.WARNING = "WARNING", e.ERROR = "ERROR", e))(w || {}), O = /* @__PURE__ */ ((e) => (e.TOP_LEFT = "TOP_LEFT", e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e.BOTTOM_RIGHT = "BOTTOM_RIGHT", e))(O || {});
643
- const Se = { 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" }, Ce = { class: "ml-3 text-sm font-normal" }, Le = {
644
- key: 3,
645
- type: "button",
646
- 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",
647
- "data-dismiss-target": "#toast-danger",
648
- "aria-label": "Close"
649
- }, at = /* @__PURE__ */ y({
650
- __name: "BaseToast",
651
- props: {
652
- mode: {
653
- type: Object,
654
- required: !0
655
- },
656
- description: {
657
- type: String,
658
- required: !0
659
- },
660
- hasCloseIcon: {
661
- type: Boolean,
662
- required: !1,
663
- default: !0
664
- },
665
- positioning: {
666
- type: String,
667
- required: !1,
668
- default: "right"
669
- }
670
- },
671
- setup(e) {
672
- const t = e;
673
- function a() {
674
- let c = "";
675
- switch (t.mode) {
676
- case w.ERROR:
677
- c = "text-red-500 bg-red-100 dark:bg-red-800 dark:text-red-200";
678
- break;
679
- case w.SUCCESS:
680
- c = "text-green-500 bg-green-100 dark:bg-green-800 dark:text-green-200";
681
- break;
682
- case w.WARNING:
683
- c = "text-orange-500 bg-orange-100 dark:bg-orange-700 dark:text-orange-200";
684
- break;
685
- }
686
- return "inline-flex items-center justify-center flex-shrink-0 w-8 h-8 rounded-lg " + c;
687
- }
688
- function n() {
689
- let c = "top-5 right-5";
690
- switch (t.positioning) {
691
- case O.BOTTOM_LEFT:
692
- c = "bottom-5";
693
- break;
694
- case O.TOP_LEFT:
695
- c = "top-5";
696
- break;
697
- case O.TOP_RIGHT:
698
- c = "top-5 right-5";
699
- break;
700
- case O.BOTTOM_RIGHT:
701
- c = "bottom-5 right-5";
702
- break;
703
- }
704
- return "fixed flex items-center w-full max-w-md p-4 space-x-4 divide-x rounded-lg " + c + " space-x";
705
- }
706
- const r = U(!0);
707
- function o() {
708
- setTimeout(() => r.value = !1, 1e6);
709
- }
710
- return o(), (c, p) => r.value ? (l(), i("div", {
711
- key: 0,
712
- id: "toast-top-right",
713
- class: h(n()),
714
- role: "alert"
715
- }, [
716
- s("div", Se, [
717
- e.mode == d(w).ERROR ? (l(), i("div", {
718
- key: 0,
719
- class: h(a())
720
- }, [
721
- m(d(z), { class: "h-6 w-6 text-red-500" }),
722
- p[1] || (p[1] = s("span", { class: "sr-only" }, "Error icon", -1))
723
- ], 2)) : e.mode == d(w).SUCCESS ? (l(), i("div", {
724
- key: 1,
725
- class: h(a())
726
- }, [
727
- m(d(K), { class: "h-6 w-6 text-green-500" }),
728
- p[2] || (p[2] = s("span", { class: "sr-only" }, "Check icon", -1))
729
- ], 2)) : e.mode == d(w).WARNING ? (l(), i("div", {
730
- key: 2,
731
- class: h(a())
732
- }, [
733
- m(d(V), { class: "h-6 w-6 text-yellow-500" }),
734
- p[3] || (p[3] = s("span", { class: "sr-only" }, "Warning icon", -1))
735
- ], 2)) : g("", !0),
736
- s("div", Ce, b(e.description), 1),
737
- e.hasCloseIcon ? (l(), i("button", Le, [
738
- p[4] || (p[4] = s("span", { class: "sr-only" }, "Close", -1)),
739
- m(d(Q), {
740
- class: "h-6 w-6 text-gray-500 cursor-pointer",
741
- onClick: p[0] || (p[0] = (u) => r.value = !r.value)
742
- })
743
- ])) : g("", !0)
744
- ])
745
- ], 2)) : g("", !0);
746
- }
747
- }), Ae = { class: "w-13" }, nt = /* @__PURE__ */ y({
748
- __name: "ColoredSquares",
749
- props: {
750
- color: {
751
- type: String,
752
- required: !1
753
- }
754
- },
755
- setup(e) {
756
- const t = e, a = [
757
- "bg-slate-300",
758
- "bg-zinc-300",
759
- "bg-neutral-300",
760
- "bg-stone-300",
761
- "bg-blue-300",
762
- "bg-green-300",
763
- "bg-yellow-300",
764
- "bg-purple-300",
765
- "bg-pink-300"
766
- ], n = k(() => a[Math.floor(Math.random() * a.length)]);
767
- function r() {
768
- let o = "gray";
769
- switch (t.color) {
770
- case f.GREEN: {
771
- o = "green";
772
- break;
773
- }
774
- case f.RED: {
775
- o = "red";
776
- break;
777
- }
778
- case f.BLUE: {
779
- o = "blue";
780
- break;
781
- }
782
- case f.YELLOW: {
783
- o = "yellow";
784
- break;
785
- }
786
- case f.NONE: {
787
- o = "";
788
- break;
789
- }
790
- }
791
- return "font-bold bg-" + o + "-100 text-" + o + "-800 text-xs mr-2 px-2.5 py-0.5 rounded-full";
792
- }
793
- return (o, c) => (l(), i("div", Ae, [
794
- s("div", {
795
- class: h(["border border-gray-300 relative aspect-square rounded-lg bg-white shadow-sm overflow-hidden flex items-center justify-center text-center", r()])
796
- }, [
797
- $(o.$slots, "default"),
798
- s("div", {
799
- class: h(["absolute bottom-0 left-0 h-1 w-full", n.value])
800
- }, null, 2)
801
- ], 2)
802
- ]));
803
- }
804
- }), Oe = { class: "relative rounded-xl border-2 border-dashed border-orange-300 bg-white p-6" }, $e = {
805
- key: 0,
806
- class: "absolute right-4 top-4 rounded-md bg-orange-100 px-3 py-1 text-xs font-bold tracking-wide text-orange-500"
807
- }, Te = { class: "flex items-start justify-between" }, Ue = { class: "text-sm font-bold tracking-wide text-gray-800" }, Ge = { class: "mt-1 text-4xl font-bold text-gray-400" }, Ie = { class: "mt-1 text-sm font-medium text-orange-400" }, lt = /* @__PURE__ */ y({
808
- __name: "EarningsCard",
809
- props: {
810
- title: { default: "TOTAL EARNINGS" },
811
- amount: { default: 0 },
812
- subtitle: { default: "Lifetime commission" },
813
- badge: { default: "" },
814
- currency: { default: "$" }
815
- },
816
- setup(e) {
817
- const t = e, a = k(() => t.currency + t.amount.toLocaleString("en-US", {
818
- minimumFractionDigits: 2,
819
- maximumFractionDigits: 2
820
- }));
821
- return (n, r) => (l(), i("div", Oe, [
822
- e.badge ? (l(), i("div", $e, b(e.badge), 1)) : g("", !0),
823
- s("div", Te, [
824
- s("div", null, [
825
- s("p", Ue, b(e.title), 1),
826
- s("p", Ge, b(a.value), 1),
827
- s("p", Ie, b(e.subtitle), 1)
828
- ]),
829
- r[0] || (r[0] = s("div", { class: "mt-6 flex h-12 w-12 items-center justify-center rounded-xl bg-orange-50" }, [
830
- s("svg", {
831
- class: "h-6 w-6 text-orange-400",
832
- viewBox: "0 0 24 24",
833
- fill: "none",
834
- stroke: "currentColor",
835
- "stroke-width": "2.5",
836
- "stroke-linecap": "round",
837
- "stroke-linejoin": "round"
838
- }, [
839
- s("polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17" }),
840
- s("polyline", { points: "16 7 22 7 22 13" })
841
- ])
842
- ], -1))
843
- ])
844
- ]));
845
- }
846
- }), Ne = {
847
- key: 0,
848
- class: "font-bold text-green-800"
849
- }, Be = { key: 0 }, Me = { key: 0 }, qe = "font-bold", it = /* @__PURE__ */ y({
850
- __name: "EuroAmount",
851
- props: {
852
- amount: {
853
- type: Number,
854
- required: !1
855
- },
856
- beforeAmount: {
857
- type: Number,
858
- default: null,
859
- required: !1
860
- },
861
- showCurrency: {
862
- type: Boolean,
863
- default: !0,
864
- required: !1
865
- }
866
- },
867
- setup(e) {
868
- const t = e, a = k(() => t.amount !== null && t.amount !== void 0), n = k(() => a.value && t.amount < 0), r = k(() => t.beforeAmount === null || t.beforeAmount === void 0 ? !1 : t.amount < t.beforeAmount), o = k(() => n.value || r.value), c = k(() => !n.value && !r.value && !(t.beforeAmount === null || t.beforeAmount === void 0));
869
- return (p, u) => (l(), i(T, null, [
870
- a.value && c.value ? (l(), i("span", Ne, [
871
- C(b(e.amount) + " ", 1),
872
- e.showCurrency ? (l(), i("span", Be, "€")) : g("", !0)
873
- ])) : g("", !0),
874
- a.value && !c.value ? (l(), i("span", {
875
- key: 1,
876
- class: h([qe, o.value ? "text-red-800" : "text-gray-800"])
877
- }, [
878
- C(b(e.amount) + " ", 1),
879
- e.showCurrency ? (l(), i("span", Me, "€")) : g("", !0)
880
- ], 2)) : g("", !0)
881
- ], 64));
882
- }
883
- }), De = ["onClick"], ze = {
884
- key: 1,
885
- style: { cursor: "not-allowed" }
886
- }, Pe = /* @__PURE__ */ y({
887
- __name: "Pagination",
888
- props: {
889
- totalItems: {
890
- type: Number,
891
- required: !0,
892
- default: 10
893
- },
894
- itemsPerPage: {
895
- type: Number,
896
- default: 20
897
- }
898
- },
899
- emits: ["page-changed"],
900
- setup(e, { emit: t }) {
901
- const a = e, n = U(1), r = U(0), o = U([]), c = t;
902
- function p(u) {
903
- if (u !== n.value && u >= 1 && u <= r.value && (n.value = u), r.value > 5) {
904
- o.value = [], u - 3 > 0 && (o.value.push(1), o.value.push(0));
905
- for (let x = 2; x >= 1; x--) {
906
- let B = u - x;
907
- B > 0 && o.value.push(B);
908
- }
909
- o.value.push(n.value);
910
- let _ = r.value - u, N = _ > 2, H = 2;
911
- if (N) {
912
- for (let x = 1; x <= H; x++)
913
- o.value.push(u + x);
914
- o.value.push(0), o.value.push(r.value);
915
- } else
916
- for (let x = 1; x <= _; x++)
917
- o.value.push(u + x);
918
- }
919
- c("page-changed", u);
920
- }
921
- return Y(() => a.totalItems, () => {
922
- if (r.value = Math.ceil(a.totalItems / a.itemsPerPage), o.value = [], r.value > 5) {
923
- for (let u = 1; u < 5; u++)
924
- o.value.push(u);
925
- o.value.push(0), o.value.push(r.value);
926
- } else
927
- for (let u = 1; u <= r.value; u++)
928
- o.value.push(u);
929
- }), (u, W) => (l(), i("div", null, [
930
- s("ul", null, [
931
- (l(!0), i(T, null, q(o.value, (_) => (l(), i("li", { key: _ }, [
932
- _ !== 0 ? (l(), i("a", {
933
- key: 0,
934
- onClick: (N) => p(_),
935
- class: h({ active: _ === n.value })
936
- }, b(_), 11, De)) : g("", !0),
937
- _ === 0 ? (l(), i("span", ze, "...")) : g("", !0)
938
- ]))), 128))
939
- ])
940
- ]));
941
- }
942
- }), ct = /* @__PURE__ */ I(Pe, [["__scopeId", "data-v-248e09af"]]), We = { key: 0 }, He = {
943
- key: 0,
944
- class: "flex items-center space-x-2"
945
- }, Fe = {
946
- key: 1,
947
- class: "flex items-center space-x-2"
948
- }, ut = /* @__PURE__ */ y({
949
- __name: "TrendArrow",
950
- props: {
951
- number: {
952
- type: Number,
953
- required: !1
954
- },
955
- icon: {
956
- type: String,
957
- required: !1
958
- }
959
- },
960
- setup(e) {
961
- const t = e, a = k(() => t.number !== null && t.number !== void 0 && t.number < 0);
962
- return (n, r) => e.number ? (l(), i("div", We, [
963
- a.value ? (l(), i("span", He, [
964
- m(M, {
965
- color: d(f).RED
966
- }, {
967
- default: S(() => [
968
- C(b(e.number) + b(t.icon), 1)
969
- ]),
970
- _: 1
971
- }, 8, ["color"]),
972
- m(d(Z), { class: "h-5 w-5 text-red-500" })
973
- ])) : (l(), i("span", Fe, [
974
- m(M, {
975
- color: d(f).GREEN
976
- }, {
977
- default: S(() => [
978
- C(b(e.number) + b(t.icon), 1)
979
- ]),
980
- _: 1
981
- }, 8, ["color"]),
982
- m(d(J), { class: "h-5 w-5 text-green-500" })
983
- ]))
984
- ])) : g("", !0);
985
- }
970
+ //#endregion
971
+ //#region src/components/BaseModalShell.vue?vue&type=script&setup=true&lang.ts
972
+ var xt = { class: "p-6" }, St = { class: "flex items-start gap-4" }, Ct = { class: "flex-1" }, wt = { class: "mt-4" }, Tt = { class: "mt-6 flex gap-3 justify-end" }, Q = /* @__PURE__ */ l({
973
+ __name: "BaseModalShell",
974
+ props: {
975
+ title: {},
976
+ maxWidthClass: { default: "max-w-md" },
977
+ manualClose: {
978
+ type: Boolean,
979
+ default: !1
980
+ }
981
+ },
982
+ emits: ["cancel", "backdrop"],
983
+ setup(e, { emit: i }) {
984
+ let a = e, s = i, { isDark: c } = Y(), l = X(), u = `modal-title-${Math.random().toString(36).slice(2, 9)}`, d = n(() => c.value ? "bg-gray-900 border border-gray-700" : "bg-white border border-gray-200");
985
+ function p() {
986
+ s("backdrop"), a.manualClose || s("cancel");
987
+ }
988
+ return Z(() => {
989
+ a.manualClose || s("cancel");
990
+ }), (n, i) => (_(), r(t, { to: "body" }, [o("div", {
991
+ class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50",
992
+ role: "dialog",
993
+ "aria-modal": "true",
994
+ "aria-labelledby": u,
995
+ onClick: p
996
+ }, [o("div", {
997
+ class: f(["relative w-full mx-4 rounded-lg shadow-xl", [e.maxWidthClass, d.value]]),
998
+ onClick: i[0] ||= M(() => {}, ["stop"])
999
+ }, [o("div", xt, [
1000
+ o("div", St, [b(n.$slots, "icon"), o("div", Ct, [o("h3", {
1001
+ id: u,
1002
+ class: f(["text-lg font-medium", w(l).primaryText])
1003
+ }, C(e.title), 3)])]),
1004
+ o("div", wt, [b(n.$slots, "default")]),
1005
+ o("div", Tt, [b(n.$slots, "footer")])
1006
+ ])], 2)])]));
1007
+ }
1008
+ }), Et = ["aria-expanded"], Dt = { class: "flex items-center gap-3" }, Ot = /* @__PURE__ */ l({
1009
+ __name: "BaseCollapsibleSection",
1010
+ props: {
1011
+ title: {},
1012
+ collapsed: { type: Boolean },
1013
+ badge: {},
1014
+ bodyClass: {}
1015
+ },
1016
+ emits: ["toggle"],
1017
+ setup(e, { emit: t }) {
1018
+ let r = e, s = t, { isDark: c } = Y(), l = X(), u = n(() => c.value ? "text-gray-100" : "text-gray-700"), d = n(() => c.value ? "bg-gray-800/50 hover:bg-gray-800 border-gray-700" : "bg-gray-50 hover:bg-gray-100 border-gray-200"), p = n(() => c.value ? "bg-emerald-500/15 text-emerald-400" : "bg-emerald-50 text-emerald-700"), m = n(() => r.bodyClass === void 0 ? c.value ? "bg-gray-800" : "bg-white" : r.bodyClass);
1019
+ return (t, n) => (_(), a("section", { class: f(["rounded-xl border overflow-hidden transition-colors", w(l).cardAlt]) }, [o("button", {
1020
+ type: "button",
1021
+ class: f(["w-full flex items-center justify-between p-4 text-left transition-colors", d.value]),
1022
+ "aria-expanded": !e.collapsed,
1023
+ onClick: n[0] ||= (e) => s("toggle")
1024
+ }, [o("div", Dt, [o("h2", { class: f(["text-base font-semibold", u.value]) }, C(e.title), 3), e.badge ? (_(), a("span", {
1025
+ key: 0,
1026
+ class: f(["text-xs px-2 py-0.5 rounded-full", p.value])
1027
+ }, C(e.badge), 3)) : i("", !0)]), (_(), a("svg", {
1028
+ class: f(["w-5 h-5 transition-transform", [e.collapsed ? "" : "rotate-180", w(l).dimTextAlt]]),
1029
+ fill: "none",
1030
+ viewBox: "0 0 24 24",
1031
+ stroke: "currentColor",
1032
+ "stroke-width": "2",
1033
+ "aria-hidden": "true"
1034
+ }, [...n[1] ||= [o("path", {
1035
+ "stroke-linecap": "round",
1036
+ "stroke-linejoin": "round",
1037
+ d: "M19 9l-7 7-7-7"
1038
+ }, null, -1)]], 2))], 10, Et), A(o("div", { class: f(["p-6 border-t", [w(l).border, m.value]]) }, [b(t.$slots, "default")], 2), [[D, !e.collapsed]])], 2));
1039
+ }
1040
+ }), kt = ["disabled"], At = ["disabled"], jt = {
1041
+ key: 0,
1042
+ class: "w-4 h-4 animate-spin",
1043
+ fill: "none",
1044
+ viewBox: "0 0 24 24",
1045
+ "aria-hidden": "true"
1046
+ }, Mt = /* @__PURE__ */ l({
1047
+ __name: "BaseConfirmModal",
1048
+ props: {
1049
+ title: {},
1050
+ message: {},
1051
+ confirmText: { default: "Yes, I'm sure" },
1052
+ cancelText: { default: "No, cancel" },
1053
+ submittingText: { default: "Working..." },
1054
+ variant: { default: "danger" },
1055
+ submitting: {
1056
+ type: Boolean,
1057
+ default: !1
1058
+ }
1059
+ },
1060
+ emits: ["confirm", "cancel"],
1061
+ setup(e, { emit: t }) {
1062
+ let n = e, l = t, { isDark: u } = Y(), d = X();
1063
+ function p() {
1064
+ n.submitting || l("confirm");
1065
+ }
1066
+ function m() {
1067
+ n.submitting || l("cancel");
1068
+ }
1069
+ return (t, n) => (_(), r(Q, {
1070
+ title: e.title,
1071
+ "manual-close": e.submitting,
1072
+ onCancel: m
1073
+ }, {
1074
+ icon: k(() => [o("div", { class: f(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", [e.variant === "danger" ? w(u) ? "bg-red-900/30" : "bg-red-50" : w(u) ? "bg-amber-900/30" : "bg-amber-50"]]) }, [c(w(ae), {
1075
+ class: f(["h-6 w-6", e.variant === "danger" ? "text-red-600" : "text-amber-600"]),
1076
+ "aria-hidden": "true"
1077
+ }, null, 8, ["class"])], 2)]),
1078
+ footer: k(() => [o("button", {
1079
+ type: "button",
1080
+ disabled: e.submitting,
1081
+ class: f(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150", [w(d).ghostButton, e.submitting ? "opacity-60 cursor-not-allowed" : "cursor-pointer"]]),
1082
+ onClick: m
1083
+ }, C(e.cancelText), 11, kt), o("button", {
1084
+ type: "button",
1085
+ disabled: e.submitting,
1086
+ class: f(["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", [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"]]),
1087
+ onClick: p
1088
+ }, [e.submitting ? (_(), a("svg", jt, [...n[0] ||= [o("circle", {
1089
+ class: "opacity-25",
1090
+ cx: "12",
1091
+ cy: "12",
1092
+ r: "10",
1093
+ stroke: "currentColor",
1094
+ "stroke-width": "4"
1095
+ }, null, -1), o("path", {
1096
+ class: "opacity-75",
1097
+ fill: "currentColor",
1098
+ d: "M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"
1099
+ }, null, -1)]])) : i("", !0), s(" " + C(e.submitting ? e.submittingText : e.confirmText), 1)], 10, At)]),
1100
+ default: k(() => [o("p", { class: f(["text-sm", w(u) ? "text-gray-300" : "text-gray-600"]) }, C(e.message), 3)]),
1101
+ _: 1
1102
+ }, 8, ["title", "manual-close"]));
1103
+ }
1104
+ }), Nt = { class: "mt-4" }, Pt = ["placeholder"], Ft = ["disabled"], It = /* @__PURE__ */ l({
1105
+ __name: "BaseTextInputModal",
1106
+ props: {
1107
+ title: {},
1108
+ message: {},
1109
+ initialValue: { default: "" },
1110
+ placeholder: { default: "Enter value..." },
1111
+ inputLabel: { default: "Name" },
1112
+ confirmText: { default: "Confirm" },
1113
+ cancelText: { default: "Cancel" },
1114
+ submittingText: { default: "Working..." },
1115
+ submitting: {
1116
+ type: Boolean,
1117
+ default: !1
1118
+ }
1119
+ },
1120
+ emits: ["confirm", "cancel"],
1121
+ setup(e, { emit: t }) {
1122
+ let n = e, i = t, { isDark: a } = Y(), s = X(), l = v(n.initialValue), u = v(null);
1123
+ m(async () => {
1124
+ await d(), u.value?.focus();
1125
+ });
1126
+ function p() {
1127
+ !l.value.trim() || n.submitting || i("confirm", l.value.trim());
1128
+ }
1129
+ function h() {
1130
+ i("cancel");
1131
+ }
1132
+ function g() {
1133
+ l.value.trim() === (n.initialValue ?? "").trim() && h();
1134
+ }
1135
+ return Z(h), (t, n) => (_(), r(Q, {
1136
+ title: e.title,
1137
+ "manual-close": "",
1138
+ onBackdrop: g
1139
+ }, {
1140
+ icon: k(() => [b(t.$slots, "icon", {}, () => [o("div", { class: f(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", w(a) ? "bg-emerald-900/30" : "bg-emerald-50"]) }, [c(w(re), {
1141
+ class: "h-6 w-6 text-emerald-600",
1142
+ "aria-hidden": "true"
1143
+ })], 2)])]),
1144
+ footer: k(() => [o("button", {
1145
+ type: "button",
1146
+ class: f(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150", w(s).ghostButton]),
1147
+ onClick: h
1148
+ }, C(e.cancelText), 3), o("button", {
1149
+ type: "button",
1150
+ disabled: !l.value.trim() || e.submitting,
1151
+ class: f(["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", [!l.value.trim() || e.submitting ? "bg-emerald-400 cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 cursor-pointer"]]),
1152
+ onClick: p
1153
+ }, C(e.submitting ? e.submittingText : e.confirmText), 11, Ft)]),
1154
+ default: k(() => [o("p", { class: f(["text-sm", w(a) ? "text-gray-300" : "text-gray-600"]) }, C(e.message), 3), o("div", Nt, [o("label", { class: f(["block text-sm font-medium mb-1", w(s).label]) }, C(e.inputLabel), 3), A(o("input", {
1155
+ ref_key: "nameInput",
1156
+ ref: u,
1157
+ "onUpdate:modelValue": n[0] ||= (e) => l.value = e,
1158
+ type: "text",
1159
+ placeholder: e.placeholder,
1160
+ class: f(["w-full px-3 py-2 rounded-md border text-sm transition-colors", w(a) ? "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"]),
1161
+ onKeyup: j(p, ["enter"])
1162
+ }, null, 42, Pt), [[E, l.value]])])]),
1163
+ _: 3
1164
+ }, 8, ["title"]));
1165
+ }
1166
+ }), Lt = { class: "flex items-center justify-center min-h-[60vh]" }, Rt = { class: "text-center px-6" }, zt = /* @__PURE__ */ l({
1167
+ __name: "BaseNotFoundPage",
1168
+ props: {
1169
+ code: { default: "404" },
1170
+ message: { default: "Page not found" },
1171
+ homeRouteName: { default: "home" },
1172
+ homeLabel: { default: "Go home" }
1173
+ },
1174
+ setup(e) {
1175
+ let t = e, n = de(), { isDark: r } = Y(), i = X();
1176
+ function s() {
1177
+ n.push({ name: t.homeRouteName });
1178
+ }
1179
+ return (t, n) => (_(), a("div", Lt, [o("div", Rt, [
1180
+ c(w(ae), { class: f(["w-16 h-16 mx-auto mb-4", w(i).illustration]) }, null, 8, ["class"]),
1181
+ o("h1", { class: f(["text-4xl font-bold mb-2", w(r) ? "text-gray-200" : "text-gray-800"]) }, C(e.code), 3),
1182
+ o("p", { class: f(["text-lg mb-6", w(i).dimTextAlt]) }, C(e.message), 3),
1183
+ o("button", {
1184
+ onClick: s,
1185
+ class: f(["inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium text-white transition-colors cursor-pointer", w(r) ? "bg-emerald-600 hover:bg-emerald-500" : "bg-emerald-600 hover:bg-emerald-700"])
1186
+ }, C(e.homeLabel), 3)
1187
+ ])]));
1188
+ }
1189
+ }), $ = v(!1);
1190
+ function Bt() {
1191
+ function e() {
1192
+ $.value = !0;
1193
+ }
1194
+ function t() {
1195
+ $.value = !1;
1196
+ }
1197
+ function n() {
1198
+ $.value = !$.value;
1199
+ }
1200
+ return {
1201
+ mobileOpen: $,
1202
+ open: e,
1203
+ close: t,
1204
+ toggle: n
1205
+ };
1206
+ }
1207
+ //#endregion
1208
+ //#region src/components/BaseSidebar.vue?vue&type=script&setup=true&lang.ts
1209
+ var Vt = ["aria-label", "aria-expanded"], Ht = { class: "flex flex-col h-full" }, Ut = { class: "px-5 pt-5 pb-4 flex items-center justify-center relative" }, Wt = { class: "flex-1 overflow-y-auto px-3 space-y-6" }, Gt = { class: "px-2 mb-2 text-[10px] font-semibold uppercase tracking-wider text-gray-500" }, Kt = { class: "space-y-0.5" }, qt = ["aria-current", "onClick"], Jt = [
1210
+ "title",
1211
+ "aria-label",
1212
+ "aria-pressed"
1213
+ ], Yt = /* @__PURE__ */ W(/* @__PURE__ */ l({
1214
+ __name: "BaseSidebar",
1215
+ props: {
1216
+ sections: {},
1217
+ homeRouteName: { default: "home" },
1218
+ appName: { default: "" },
1219
+ version: { default: "" },
1220
+ showThemeToggle: {
1221
+ type: Boolean,
1222
+ default: !0
1223
+ }
1224
+ },
1225
+ setup(t) {
1226
+ let n = t, l = de(), u = ue(), { isDark: p, toggleTheme: h } = Y(), { mobileOpen: x, close: T, toggle: E } = Bt(), D = v(null), k = null;
1227
+ O(x, async (e) => {
1228
+ e ? (k = document.activeElement instanceof HTMLElement ? document.activeElement : null, await d(), D.value?.focus()) : (k?.focus(), k = null);
1229
+ }), m(() => {}), g(() => {});
1230
+ function A() {
1231
+ l.push({ name: n.homeRouteName }), T();
1232
+ }
1233
+ function j(e) {
1234
+ return u.name === e;
1235
+ }
1236
+ function M(e) {
1237
+ l.push({ name: e }), T();
1238
+ }
1239
+ return (n, l) => (_(), a("div", null, [
1240
+ o("div", { class: f(["mobile-topbar fixed top-0 inset-x-0 z-30 flex items-center justify-between px-4 py-3 border-b transition-colors", w(p) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200"]) }, [o("button", {
1241
+ type: "button",
1242
+ onClick: A,
1243
+ class: "cursor-pointer",
1244
+ "aria-label": "Go to home"
1245
+ }, [b(n.$slots, "logo", { size: 28 }, void 0, !0)]), o("button", {
1246
+ type: "button",
1247
+ onClick: l[0] ||= (...e) => w(E) && w(E)(...e),
1248
+ class: f(["p-2 rounded-lg cursor-pointer", w(p) ? "text-gray-400 hover:bg-gray-800" : "text-gray-600 hover:bg-gray-100"]),
1249
+ "aria-label": w(x) ? "Close navigation menu" : "Open navigation menu",
1250
+ "aria-expanded": w(x)
1251
+ }, [w(x) ? (_(), r(w(F), {
1252
+ key: 1,
1253
+ class: "w-6 h-6",
1254
+ "aria-hidden": "true"
1255
+ })) : (_(), r(w(N), {
1256
+ key: 0,
1257
+ class: "w-6 h-6",
1258
+ "aria-hidden": "true"
1259
+ }))], 10, Vt)], 2),
1260
+ w(x) ? (_(), a("div", {
1261
+ key: 0,
1262
+ class: "mobile-overlay fixed inset-0 z-40 bg-black/50",
1263
+ "aria-hidden": "true",
1264
+ onClick: l[1] ||= (...e) => w(T) && w(T)(...e)
1265
+ })) : i("", !0),
1266
+ o("aside", {
1267
+ role: "navigation",
1268
+ "aria-label": "Main navigation",
1269
+ class: f(["fixed top-0 left-0 h-screen w-60 flex flex-col border-r transition-transform duration-300 lg:pointer-events-auto", [w(p) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200", w(x) ? "translate-x-0 z-50" : "-translate-x-full max-lg:pointer-events-none lg:translate-x-0 z-50"]])
1270
+ }, [o("div", Ht, [
1271
+ o("div", Ut, [o("button", {
1272
+ type: "button",
1273
+ onClick: A,
1274
+ class: "cursor-pointer",
1275
+ "aria-label": "Go to home"
1276
+ }, [b(n.$slots, "logo", { size: 52 }, void 0, !0)]), o("button", {
1277
+ ref_key: "closeMobileButton",
1278
+ ref: D,
1279
+ type: "button",
1280
+ onClick: l[2] ||= (...e) => w(T) && w(T)(...e),
1281
+ class: f(["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", w(p) ? "text-gray-400 hover:bg-gray-800" : "text-gray-500 hover:bg-gray-100"]),
1282
+ "aria-label": "Close navigation menu"
1283
+ }, [c(w(F), {
1284
+ class: "w-5 h-5",
1285
+ "aria-hidden": "true"
1286
+ })], 2)]),
1287
+ o("nav", Wt, [(_(!0), a(e, null, y(t.sections, (t) => (_(), a("div", { key: t.title }, [o("p", Gt, C(t.title), 1), o("ul", Kt, [(_(!0), a(e, null, y(t.items, (e) => (_(), a("li", { key: e.name }, [o("button", {
1288
+ type: "button",
1289
+ "aria-current": j(e.name) ? "page" : void 0,
1290
+ onClick: (t) => M(e.name),
1291
+ class: f(["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", j(e.name) ? w(p) ? "bg-emerald-500/15 text-emerald-300" : "bg-emerald-50 text-emerald-700" : w(p) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100"])
1292
+ }, [(_(), r(S(e.icon), { class: "w-[18px] h-[18px] shrink-0" })), s(" " + C(e.label), 1)], 10, qt)]))), 128))])]))), 128))]),
1293
+ o("div", { class: f(["px-4 py-4 border-t transition-colors space-y-3", w(p) ? "border-gray-800" : "border-gray-200"]) }, [
1294
+ t.showThemeToggle ? (_(), a("button", {
1295
+ key: 0,
1296
+ type: "button",
1297
+ onClick: l[3] ||= (...e) => w(h) && w(h)(...e),
1298
+ title: w(p) ? "Switch to light mode" : "Switch to dark mode",
1299
+ "aria-label": w(p) ? "Switch to light mode" : "Switch to dark mode",
1300
+ "aria-pressed": w(p),
1301
+ class: f(["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", w(p) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100"])
1302
+ }, [s(C(w(p) ? "Switch to light" : "Switch to dark") + " ", 1), o("span", { class: f(["ml-auto relative w-9 h-5 rounded-full transition-colors", w(p) ? "bg-emerald-600" : "bg-gray-300"]) }, [o("span", { class: f(["absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-300", w(p) ? "translate-x-4" : "translate-x-0"]) }, null, 2)], 2)], 10, Jt)) : i("", !0),
1303
+ b(n.$slots, "status", {}, void 0, !0),
1304
+ b(n.$slots, "footer", {}, () => [t.appName || t.version ? (_(), a("div", {
1305
+ key: 0,
1306
+ class: f(["flex items-center justify-center gap-2 text-xs", (w(p), "text-gray-500")])
1307
+ }, [o("span", null, [
1308
+ s(C(t.appName), 1),
1309
+ t.appName && t.version ? (_(), a(e, { key: 0 }, [], 64)) : i("", !0),
1310
+ t.version ? (_(), a(e, { key: 1 }, [s("v" + C(t.version), 1)], 64)) : i("", !0)
1311
+ ])], 2)) : i("", !0)], !0)
1312
+ ], 2)
1313
+ ])], 2)
1314
+ ]));
1315
+ }
1316
+ }), [["__scopeId", "data-v-e27f267e"]]), Xt = {
1317
+ key: 1,
1318
+ class: "mt-4 flex justify-center py-6"
1319
+ }, Zt = {
1320
+ key: 2,
1321
+ class: "mt-4 text-sm text-red-500",
1322
+ role: "alert"
1323
+ }, Qt = {
1324
+ key: 3,
1325
+ class: "mt-4"
1326
+ }, $t = { class: "relative" }, en = ["placeholder"], tn = {
1327
+ key: 4,
1328
+ class: "mt-3 max-h-64 overflow-y-auto"
1329
+ }, nn = ["onClick"], rn = { class: "flex-1 min-w-0" }, an = {
1330
+ key: 0,
1331
+ class: "text-center py-6"
1332
+ }, on = {
1333
+ key: 1,
1334
+ class: "text-center py-6"
1335
+ }, sn = ["disabled"], cn = ["disabled"], ln = /* @__PURE__ */ l({
1336
+ __name: "BaseEntityPickerModal",
1337
+ props: {
1338
+ title: {},
1339
+ message: {},
1340
+ items: { default: () => [] },
1341
+ loader: {},
1342
+ excludeId: {},
1343
+ variant: { default: "emerald" },
1344
+ searchPlaceholder: { default: "Search..." },
1345
+ emptyMessage: { default: "No items available." },
1346
+ noMatchMessage: { default: "No items match your search." },
1347
+ confirmText: { default: "Select" },
1348
+ cancelText: { default: "Cancel" },
1349
+ submittingText: { default: "Working..." },
1350
+ submitting: {
1351
+ type: Boolean,
1352
+ default: !1
1353
+ }
1354
+ },
1355
+ emits: ["confirm", "cancel"],
1356
+ setup(t, { emit: s }) {
1357
+ let l = t, u = s, { isDark: p } = Y(), h = X(), g = v([]), x = v(!1), S = v(""), T = v(null), D = v(""), O = v(null), j = n(() => {
1358
+ let e = l.loader ? g.value : l.items;
1359
+ return l.excludeId ? e.filter((e) => e.id !== l.excludeId) : e;
1360
+ }), M = n(() => j.value.filter((e) => e.label.toLowerCase().includes(D.value.toLowerCase()))), ee = {
1361
+ emerald: {
1362
+ iconBg: "bg-emerald-50",
1363
+ iconText: "text-emerald-600",
1364
+ inputFocus: "focus:border-emerald-500",
1365
+ selectedRow: "bg-emerald-50 border border-emerald-200",
1366
+ checkBg: "bg-emerald-600",
1367
+ confirmActive: "bg-emerald-600 hover:bg-emerald-700 cursor-pointer",
1368
+ confirmDisabled: "bg-emerald-400 cursor-not-allowed"
1369
+ },
1370
+ purple: {
1371
+ iconBg: "bg-purple-50",
1372
+ iconText: "text-purple-600",
1373
+ inputFocus: "focus:border-purple-500",
1374
+ selectedRow: "bg-purple-50 border border-purple-200",
1375
+ checkBg: "bg-purple-600",
1376
+ confirmActive: "bg-purple-600 hover:bg-purple-700 cursor-pointer",
1377
+ confirmDisabled: "bg-purple-400 cursor-not-allowed"
1378
+ },
1379
+ blue: {
1380
+ iconBg: "bg-blue-50",
1381
+ iconText: "text-blue-600",
1382
+ inputFocus: "focus:border-blue-500",
1383
+ selectedRow: "bg-blue-50 border border-blue-200",
1384
+ checkBg: "bg-blue-600",
1385
+ confirmActive: "bg-blue-600 hover:bg-blue-700 cursor-pointer",
1386
+ confirmDisabled: "bg-blue-400 cursor-not-allowed"
1387
+ },
1388
+ red: {
1389
+ iconBg: "bg-red-50",
1390
+ iconText: "text-red-600",
1391
+ inputFocus: "focus:border-red-500",
1392
+ selectedRow: "bg-red-50 border border-red-200",
1393
+ checkBg: "bg-red-600",
1394
+ confirmActive: "bg-red-600 hover:bg-red-700 cursor-pointer",
1395
+ confirmDisabled: "bg-red-400 cursor-not-allowed"
1396
+ },
1397
+ amber: {
1398
+ iconBg: "bg-amber-50",
1399
+ iconText: "text-amber-600",
1400
+ inputFocus: "focus:border-amber-500",
1401
+ selectedRow: "bg-amber-50 border border-amber-200",
1402
+ checkBg: "bg-amber-600",
1403
+ confirmActive: "bg-amber-600 hover:bg-amber-700 cursor-pointer",
1404
+ confirmDisabled: "bg-amber-400 cursor-not-allowed"
1405
+ }
1406
+ }, te = {
1407
+ emerald: {
1408
+ iconBg: "bg-emerald-900/30",
1409
+ iconText: "text-emerald-400",
1410
+ inputFocus: "focus:border-emerald-500",
1411
+ selectedRow: "bg-emerald-500/15 border border-emerald-500/30",
1412
+ checkBg: "bg-emerald-600",
1413
+ confirmActive: "bg-emerald-600 hover:bg-emerald-700 cursor-pointer",
1414
+ confirmDisabled: "bg-emerald-400 cursor-not-allowed"
1415
+ },
1416
+ purple: {
1417
+ iconBg: "bg-purple-900/30",
1418
+ iconText: "text-purple-400",
1419
+ inputFocus: "focus:border-purple-500",
1420
+ selectedRow: "bg-purple-500/15 border border-purple-500/30",
1421
+ checkBg: "bg-purple-600",
1422
+ confirmActive: "bg-purple-600 hover:bg-purple-700 cursor-pointer",
1423
+ confirmDisabled: "bg-purple-400 cursor-not-allowed"
1424
+ },
1425
+ blue: {
1426
+ iconBg: "bg-blue-900/30",
1427
+ iconText: "text-blue-400",
1428
+ inputFocus: "focus:border-blue-500",
1429
+ selectedRow: "bg-blue-500/15 border border-blue-500/30",
1430
+ checkBg: "bg-blue-600",
1431
+ confirmActive: "bg-blue-600 hover:bg-blue-700 cursor-pointer",
1432
+ confirmDisabled: "bg-blue-400 cursor-not-allowed"
1433
+ },
1434
+ red: {
1435
+ iconBg: "bg-red-900/30",
1436
+ iconText: "text-red-400",
1437
+ inputFocus: "focus:border-red-500",
1438
+ selectedRow: "bg-red-500/15 border border-red-500/30",
1439
+ checkBg: "bg-red-600",
1440
+ confirmActive: "bg-red-600 hover:bg-red-700 cursor-pointer",
1441
+ confirmDisabled: "bg-red-400 cursor-not-allowed"
1442
+ },
1443
+ amber: {
1444
+ iconBg: "bg-amber-900/30",
1445
+ iconText: "text-amber-400",
1446
+ inputFocus: "focus:border-amber-500",
1447
+ selectedRow: "bg-amber-500/15 border border-amber-500/30",
1448
+ checkBg: "bg-amber-600",
1449
+ confirmActive: "bg-amber-600 hover:bg-amber-700 cursor-pointer",
1450
+ confirmDisabled: "bg-amber-400 cursor-not-allowed"
1451
+ }
1452
+ }, N = n(() => (p.value ? te : ee)[l.variant]);
1453
+ m(async () => {
1454
+ if (l.loader) {
1455
+ x.value = !0;
1456
+ try {
1457
+ g.value = await l.loader();
1458
+ } catch {
1459
+ S.value = "Failed to load items";
1460
+ } finally {
1461
+ x.value = !1;
1462
+ }
1463
+ }
1464
+ await d(), O.value?.focus();
1465
+ });
1466
+ function ne() {
1467
+ !T.value || l.submitting || u("confirm", T.value);
1468
+ }
1469
+ function P() {
1470
+ l.submitting || u("cancel");
1471
+ }
1472
+ return (n, s) => (_(), r(Q, {
1473
+ title: t.title,
1474
+ "manual-close": t.submitting,
1475
+ onCancel: P
1476
+ }, {
1477
+ icon: k(() => [b(n.$slots, "icon", {}, () => [o("div", { class: f(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", N.value.iconBg]) }, [c(w(oe), {
1478
+ class: f(["h-6 w-6", N.value.iconText]),
1479
+ "aria-hidden": "true"
1480
+ }, null, 8, ["class"])], 2)])]),
1481
+ footer: k(() => [o("button", {
1482
+ type: "button",
1483
+ disabled: t.submitting,
1484
+ class: f(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150 disabled:opacity-50 disabled:cursor-not-allowed", w(h).ghostButton]),
1485
+ onClick: P
1486
+ }, C(t.cancelText), 11, sn), o("button", {
1487
+ type: "button",
1488
+ disabled: !T.value || t.submitting,
1489
+ class: f(["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", !T.value || t.submitting ? N.value.confirmDisabled : N.value.confirmActive]),
1490
+ onClick: ne
1491
+ }, C(t.submitting ? t.submittingText : t.confirmText), 11, cn)]),
1492
+ default: k(() => [
1493
+ t.message ? (_(), a("p", {
1494
+ key: 0,
1495
+ class: f(["text-sm", w(p) ? "text-gray-300" : "text-gray-600"])
1496
+ }, C(t.message), 3)) : i("", !0),
1497
+ x.value ? (_(), a("div", Xt, [c(qe)])) : S.value ? (_(), a("div", Zt, C(S.value), 1)) : i("", !0),
1498
+ !x.value && !S.value && j.value.length > 0 ? (_(), a("div", Qt, [o("div", $t, [c(w(ce), {
1499
+ class: f(["absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4", w(h).dimText]),
1500
+ "aria-hidden": "true"
1501
+ }, null, 8, ["class"]), A(o("input", {
1502
+ ref_key: "searchInputRef",
1503
+ ref: O,
1504
+ "onUpdate:modelValue": s[0] ||= (e) => D.value = e,
1505
+ type: "text",
1506
+ placeholder: t.searchPlaceholder,
1507
+ class: f(["w-full pl-9 pr-3 py-2 text-sm rounded-md border outline-none transition-colors", [w(p) ? "bg-gray-800 border-gray-600 text-gray-200 placeholder-gray-500" : "bg-white border-gray-300 text-gray-700 placeholder-gray-400", N.value.inputFocus]])
1508
+ }, null, 10, en), [[E, D.value]])])])) : i("", !0),
1509
+ !x.value && !S.value ? (_(), a("div", tn, [(_(!0), a(e, null, y(M.value, (e) => (_(), a("div", {
1510
+ key: e.id,
1511
+ class: f(["flex items-center gap-3 px-3 py-2.5 rounded-lg cursor-pointer transition-colors", [T.value === e.id ? N.value.selectedRow : w(p) ? "hover:bg-gray-800 border border-transparent" : "hover:bg-gray-50 border border-transparent"]]),
1512
+ onClick: (t) => T.value = e.id
1513
+ }, [
1514
+ c(w(oe), { class: f(["w-5 h-5 flex-shrink-0", w(h).dimText]) }, null, 8, ["class"]),
1515
+ o("div", rn, [o("p", { class: f(["text-sm font-medium truncate", w(h).bodyText]) }, C(e.label), 3)]),
1516
+ T.value === e.id ? (_(), a("div", {
1517
+ key: 0,
1518
+ class: f(["w-5 h-5 rounded-full flex items-center justify-center", N.value.checkBg])
1519
+ }, [...s[1] ||= [o("svg", {
1520
+ class: "w-3 h-3 text-white",
1521
+ fill: "none",
1522
+ viewBox: "0 0 24 24",
1523
+ stroke: "currentColor",
1524
+ "stroke-width": "3",
1525
+ "aria-hidden": "true"
1526
+ }, [o("path", {
1527
+ "stroke-linecap": "round",
1528
+ "stroke-linejoin": "round",
1529
+ d: "M5 13l4 4L19 7"
1530
+ })], -1)]], 2)) : i("", !0)
1531
+ ], 10, nn))), 128)), j.value.length === 0 ? (_(), a("div", an, [o("p", { class: f(["text-sm", w(h).dimText]) }, C(t.emptyMessage), 3)])) : M.value.length === 0 ? (_(), a("div", on, [o("p", { class: f(["text-sm", w(h).dimText]) }, C(t.noMatchMessage), 3)])) : i("", !0)])) : i("", !0)
1532
+ ]),
1533
+ _: 3
1534
+ }, 8, ["title", "manual-close"]));
1535
+ }
1536
+ }), un = {
1537
+ href: "#main-content",
1538
+ 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"
1539
+ }, dn = ["inert"], fn = /* @__PURE__ */ l({
1540
+ __name: "BaseAppLayout",
1541
+ props: {
1542
+ showSidebar: {
1543
+ type: Boolean,
1544
+ default: !0
1545
+ },
1546
+ skipLinkLabel: { default: "Skip to main content" }
1547
+ },
1548
+ setup(e) {
1549
+ let t = e, { isDark: r } = Y(), { mobileOpen: s } = Bt(), c = n(() => t.showSidebar);
1550
+ return (t, n) => (_(), a("div", { class: f(["min-h-screen transition-colors duration-300", w(r) ? "bg-gray-950 text-gray-100" : "bg-gray-50 text-gray-800"]) }, [
1551
+ o("a", un, C(e.skipLinkLabel), 1),
1552
+ c.value ? b(t.$slots, "sidebar", { key: 0 }) : i("", !0),
1553
+ o("main", {
1554
+ id: "main-content",
1555
+ tabindex: "-1",
1556
+ inert: c.value && w(s) ? !0 : void 0,
1557
+ class: f(c.value ? "pt-14 lg:pt-0 lg:ml-60" : "")
1558
+ }, [b(t.$slots, "default")], 10, dn)
1559
+ ], 2));
1560
+ }
986
1561
  });
987
- var Ye = /* @__PURE__ */ ((e) => (e.WIN = "WIN", e.LOSE = "LOSE", e))(Ye || {});
988
- export {
989
- E as AlertEnum,
990
- Qe as BaseAlert,
991
- M as BaseBadge,
992
- Ye as BaseBadgeEnum,
993
- Ze as BaseBreadcrumb,
994
- Je as BaseButton,
995
- v as BaseButtonEnum,
996
- R as BaseButtonSizeEnum,
997
- et as BaseLine,
998
- A as BaseLoginEnum,
999
- tt as BaseLogo,
1000
- rt as BaseModal,
1001
- P as BaseModalEnum,
1002
- st as BaseRow,
1003
- ot as BaseSpinner,
1004
- at as BaseToast,
1005
- w as BaseToastEnum,
1006
- nt as ColoredSquares,
1007
- f as ColorsEnums,
1008
- lt as EarningsCard,
1009
- it as EuroAmount,
1010
- L as LineEnum,
1011
- ct as Pagination,
1012
- O as PositioningEnum,
1013
- ut as TrendArrow,
1014
- te as getBaseColor,
1015
- Ve as getBaseColorOf
1562
+ //#endregion
1563
+ //#region src/composables/useDebounce.ts
1564
+ function pn(e, t = 300) {
1565
+ let n = v(e.value), r = null;
1566
+ return O(e, (e) => {
1567
+ r && clearTimeout(r), r = setTimeout(() => {
1568
+ n.value = e, r = null;
1569
+ }, t);
1570
+ }), h(() => {
1571
+ r &&= (clearTimeout(r), null);
1572
+ }), n;
1573
+ }
1574
+ //#endregion
1575
+ //#region src/composables/useToast.ts
1576
+ function mn(e = 3e3) {
1577
+ let t = v(!1), n = v(""), r = v(G.SUCCESS), i = null;
1578
+ function a() {
1579
+ i &&= (clearTimeout(i), null);
1580
+ }
1581
+ function o(o, s = G.SUCCESS, c = e) {
1582
+ n.value = o, r.value = s, t.value = !0, a(), i = setTimeout(() => {
1583
+ t.value = !1, i = null;
1584
+ }, c);
1585
+ }
1586
+ return h(() => {
1587
+ a();
1588
+ }), {
1589
+ showToast: t,
1590
+ toastMessage: n,
1591
+ toastType: r,
1592
+ showToastMessage: o
1593
+ };
1594
+ }
1595
+ //#endregion
1596
+ //#region src/enums/BaseBadgeEnum.ts
1597
+ var hn = /* @__PURE__ */ function(e) {
1598
+ return e.WIN = "WIN", e.LOSE = "LOSE", e;
1599
+ }({}), gn = {
1600
+ GET: "bg-blue-600",
1601
+ POST: "bg-emerald-600",
1602
+ PUT: "bg-amber-600",
1603
+ DELETE: "bg-red-600",
1604
+ PATCH: "bg-purple-600",
1605
+ HEAD: "bg-gray-600"
1606
+ }, _n = {
1607
+ GET: "bg-blue-500",
1608
+ POST: "bg-green-500",
1609
+ PUT: "bg-yellow-500",
1610
+ DELETE: "bg-red-500",
1611
+ PATCH: "bg-purple-500",
1612
+ HEAD: "bg-gray-500"
1016
1613
  };
1614
+ function vn(e) {
1615
+ return e ? gn[e.toUpperCase()] ?? "bg-gray-600" : "bg-gray-600";
1616
+ }
1617
+ function yn(e) {
1618
+ return e ? _n[e.toUpperCase()] ?? "bg-gray-500" : "bg-gray-500";
1619
+ }
1620
+ function bn(e) {
1621
+ let t = e ?? 0;
1622
+ 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";
1623
+ }
1624
+ function xn(e, t) {
1625
+ let n = e ?? 200;
1626
+ 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";
1627
+ }
1628
+ //#endregion
1629
+ export { I as AlertEnum, he as BaseAlert, fn as BaseAppLayout, R as BaseBadge, hn as BaseBadgeEnum, be as BaseBreadcrumb, ke as BaseButton, z as BaseButtonEnum, B as BaseButtonSizeEnum, Ot as BaseCollapsibleSection, Mt as BaseConfirmModal, ln as BaseEntityPickerModal, Ne as BaseLine, Pe as BaseLoginEnum, Ie as BaseLogo, H as BaseLogoEnum, He as BaseModal, U as BaseModalEnum, Q as BaseModalShell, zt as BaseNotFoundPage, Ue as BaseRow, Yt as BaseSidebar, qe as BaseSpinner, It as BaseTextInputModal, Ze as BaseToast, G as BaseToastEnum, $e as ColoredSquares, L as ColorsEnums, ot as EarningsCard, dt as EuroAmount, V as LineEnum, mt as Pagination, K as PositioningEnum, vt as TrendArrow, fe as getBaseColor, pe as getBaseColorOf, yn as methodBadgeBright, vn as methodBadgeSolid, bn as statusBadgeSolid, xn as statusBadgeTinted, pn as useDebouncedRef, Z as useEscapeKey, Bt as useMobileSidebar, Y as useTheme, X as useThemeClasses, mn as useToast };