vuesp-components 2.2.0 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3099 @@
1
+ import { defineComponent as S, resolveComponent as Be, openBlock as f, createElementBlock as v, Fragment as I, createCommentVNode as T, createElementVNode as o, normalizeClass as V, createVNode as h, withCtx as y, createBlock as j, renderSlot as k, markRaw as N, computed as M, withModifiers as q, toDisplayString as $, unref as W, TransitionGroup as Le, renderList as R, mergeProps as H, ref as A, watch as re, resolveDynamicComponent as xe, Transition as _e, normalizeStyle as fe, createTextVNode as D, normalizeProps as F, guardReactiveProps as U, onMounted as le, onUnmounted as Me, reactive as Qe, useTemplateRef as Ae, withDirectives as De, vShow as et, vModelText as tt, createSlots as nt, isRef as st } from "vue";
2
+ import { a as lt, V as Ie, i as E, g as je, f as $e, j as ce, k as ot, c as at, h as it, d as se, _ as He, e as Z } from "../VDialog.vue_vue_type_script_setup_true_lang-BLLrcXdW.js";
3
+ import { b as ua, l as ma } from "../VDialog.vue_vue_type_script_setup_true_lang-BLLrcXdW.js";
4
+ import { f as rt, t as ct, g as dt, u as ue, s as ut, d as mt } from "../app-B45sALrX.js";
5
+ import { d as ke, e as ft, o as pt } from "../useDialog-ALG4kFE7.js";
6
+ import { getDataValue as vt } from "../dashboard/index.es.js";
7
+ import { useForm as gt } from "../composables/index.es.js";
8
+ import { required as ht, maxLen as bt } from "../validate/index.es.js";
9
+ const yt = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear h-full" }, Io = /* @__PURE__ */ S({
10
+ __name: "AppAside",
11
+ props: {
12
+ isSidebar: { type: Boolean, default: !1 }
13
+ },
14
+ emits: ["sidebar"],
15
+ setup(e, { emit: n }) {
16
+ const l = n, s = () => {
17
+ e.isSidebar && l("sidebar", !e.isSidebar);
18
+ };
19
+ return (t, a) => {
20
+ const c = Be("router-link");
21
+ return f(), v(I, null, [
22
+ e.isSidebar ? (f(), v("div", {
23
+ key: 0,
24
+ class: "lg:hidden overlay fixed left-0 top-0 h-full w-full bg-black/40 z-10 bg-blur",
25
+ onClick: s
26
+ })) : T("", !0),
27
+ o("aside", {
28
+ class: V([e.isSidebar ? "translate-x-0 lg:w-[90px]" : "-translate-x-full", "overflow-x-hidden fixed top-0 left-0 z-10 flex lg:static h-full w-[290px] flex-col overflow-y-auto border-r border-gray-200 px-5 transition-all duration-350 lg:translate-x-0 dark:border-gray-800 bg-white dark:bg-gray-900"])
29
+ }, [
30
+ o("div", {
31
+ class: V([e.isSidebar ? "justify-center" : "justify-between", "sidebar-header flex items-center gap-2 pt-6 pb-6 justify-between"])
32
+ }, [
33
+ h(c, { to: "/" }, {
34
+ default: y(() => [
35
+ e.isSidebar ? (f(), j(lt, {
36
+ key: 0,
37
+ class: "h-[30px] text-primary"
38
+ })) : (f(), j(Ie, {
39
+ key: 1,
40
+ class: "h-[30px] text-primary"
41
+ }))
42
+ ]),
43
+ _: 1
44
+ })
45
+ ], 2),
46
+ o("div", yt, [
47
+ k(t.$slots, "default")
48
+ ])
49
+ ], 2)
50
+ ], 64);
51
+ };
52
+ }
53
+ }), xt = {
54
+ viewBox: "0 0 24 24",
55
+ width: "1.2em",
56
+ height: "1.2em"
57
+ };
58
+ function _t(e, n) {
59
+ return f(), v("svg", xt, [...n[0] || (n[0] = [
60
+ o("path", {
61
+ fill: "currentColor",
62
+ d: "M4.5 10.5c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5S6 12.825 6 12s-.675-1.5-1.5-1.5m15 0c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5S21 12.825 21 12s-.675-1.5-1.5-1.5m-7.5 0c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5s1.5-.675 1.5-1.5s-.675-1.5-1.5-1.5"
63
+ }, null, -1)
64
+ ])]);
65
+ }
66
+ const Pe = N({ name: "ri-more-line", render: _t }), $t = {
67
+ viewBox: "0 0 24 24",
68
+ width: "1.2em",
69
+ height: "1.2em"
70
+ };
71
+ function kt(e, n) {
72
+ return f(), v("svg", $t, [...n[0] || (n[0] = [
73
+ o("path", {
74
+ fill: "currentColor",
75
+ d: "M4 18h2v2h12V4H6v2H4V3a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1zm2-7h7v2H6v3l-5-4l5-4z"
76
+ }, null, -1)
77
+ ])]);
78
+ }
79
+ const wt = N({ name: "ri-logout-box-line", render: kt }), Ct = {
80
+ viewBox: "0 0 24 24",
81
+ width: "1.2em",
82
+ height: "1.2em"
83
+ };
84
+ function St(e, n) {
85
+ return f(), v("svg", Ct, [...n[0] || (n[0] = [
86
+ o("path", {
87
+ fill: "currentColor",
88
+ d: "M5 18h14v-6.969C19 7.148 15.866 4 12 4s-7 3.148-7 7.031zm7-16c4.97 0 9 4.043 9 9.031V20H3v-8.969C3 6.043 7.03 2 12 2M9.5 21h5a2.5 2.5 0 0 1-5 0"
89
+ }, null, -1)
90
+ ])]);
91
+ }
92
+ const Ne = N({ name: "ri-notification-line", render: St }), zt = {
93
+ viewBox: "0 0 24 24",
94
+ width: "1.2em",
95
+ height: "1.2em"
96
+ };
97
+ function Vt(e, n) {
98
+ return f(), v("svg", zt, [...n[0] || (n[0] = [
99
+ o("path", {
100
+ fill: "currentColor",
101
+ d: "M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2h.1A6.98 6.98 0 0 0 10 7m-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938A8 8 0 0 0 4 12"
102
+ }, null, -1)
103
+ ])]);
104
+ }
105
+ const Tt = N({ name: "ri-moon-line", render: Vt }), Et = {
106
+ viewBox: "0 0 24 24",
107
+ width: "1.2em",
108
+ height: "1.2em"
109
+ };
110
+ function Bt(e, n) {
111
+ return f(), v("svg", Et, [...n[0] || (n[0] = [
112
+ o("path", {
113
+ fill: "currentColor",
114
+ d: "M12 18a6 6 0 1 1 0-12a6 6 0 0 1 0 12m0-2a4 4 0 1 0 0-8a4 4 0 0 0 0 8M11 1h2v3h-2zm0 19h2v3h-2zM3.515 4.929l1.414-1.414L7.05 5.636L5.636 7.05zM16.95 18.364l1.414-1.414l2.121 2.121l-1.414 1.414zm2.121-14.85l1.414 1.415l-2.121 2.121l-1.414-1.414zM5.636 16.95l1.414 1.414l-2.121 2.121l-1.414-1.414zM23 11v2h-3v-2zM4 11v2H1v-2z"
115
+ }, null, -1)
116
+ ])]);
117
+ }
118
+ const Lt = N({ name: "ri-sun-line", render: Bt }), Mt = {
119
+ viewBox: "0 0 24 24",
120
+ width: "1.2em",
121
+ height: "1.2em"
122
+ };
123
+ function At(e, n) {
124
+ return f(), v("svg", Mt, [...n[0] || (n[0] = [
125
+ o("path", {
126
+ fill: "currentColor",
127
+ d: "M3 4h18v2H3zm0 7h18v2H3zm0 7h18v2H3z"
128
+ }, null, -1)
129
+ ])]);
130
+ }
131
+ const Dt = N({ name: "ri-menu-line", render: At }), It = { class: "bg-white dark:bg-gray-900 border-b border-gray-300 dark:border-gray-700 left-0 w-full z-10 sticky top-0" }, jt = { class: "px-4 py-4 sm:px-6 lg:px-8" }, Ht = { class: "container mx-auto flex flex-auto items-center" }, Pt = { class: "lg:hidden h-[30px]" }, Nt = { class: "gap-4 hidden lg:flex" }, Ot = { class: "lg:hidden flex gap-4" }, Ft = { class: "ms-2" }, jo = /* @__PURE__ */ S({
132
+ __name: "AppHeader",
133
+ props: {
134
+ changeTheme: { type: Function },
135
+ notifications: {}
136
+ },
137
+ emits: ["sidebar", "notif"],
138
+ setup(e, { emit: n }) {
139
+ const l = n, s = [
140
+ { name: "Theme", value: 1 },
141
+ { name: "Notification", value: 2 },
142
+ { name: "Logout", value: 3 }
143
+ ], t = M(() => !!e.notifications.find((i) => i.isNew)), a = (i) => l("sidebar", i), c = (i) => l("notif", i), r = async () => await fetch("/", { headers: { Authorization: "Basic AAAAAAAAAAAAAAAAAAA=" } }), u = () => {
144
+ e.changeTheme && e.changeTheme();
145
+ }, d = ({ value: i }, m) => {
146
+ i == 1 && u(), i == 2 && c(m), i == 3 && r();
147
+ };
148
+ return (i, m) => {
149
+ const p = Dt, b = Be("router-link"), g = Lt, x = Tt, z = Ne, B = wt, w = Pe;
150
+ return f(), v("header", It, [
151
+ o("div", jt, [
152
+ o("div", Ht, [
153
+ h(E, {
154
+ type: "icon",
155
+ onClick: a
156
+ }, {
157
+ default: y(() => [
158
+ h(p, { class: "size-5" })
159
+ ]),
160
+ _: 1
161
+ }),
162
+ m[1] || (m[1] = o("div", { class: "lg:hidden flex-auto" }, null, -1)),
163
+ o("div", Pt, [
164
+ h(b, { to: "/" }, {
165
+ default: y(() => [
166
+ h(Ie, { class: "h-[30px] text-primary" })
167
+ ]),
168
+ _: 1
169
+ })
170
+ ]),
171
+ m[2] || (m[2] = o("div", { class: "flex-auto" }, null, -1)),
172
+ o("div", Nt, [
173
+ h(E, {
174
+ type: "icon",
175
+ onClick: u
176
+ }, {
177
+ default: y(() => [
178
+ h(g, { class: "dark:hidden" }),
179
+ h(x, { class: "hidden dark:flex" })
180
+ ]),
181
+ _: 1
182
+ }),
183
+ h(E, {
184
+ type: "icon",
185
+ onClick: c
186
+ }, {
187
+ default: y(() => [
188
+ o("span", {
189
+ class: V([t.value ? "flex" : "hidden", "absolute right-0 top-0.5 z-1 h-2 w-2 rounded-full bg-orange-400"])
190
+ }, [...m[0] || (m[0] = [
191
+ o("span", { class: "absolute -z-1 inline-flex h-full w-full animate-ping rounded-full bg-orange-400 opacity-75" }, null, -1)
192
+ ])], 2),
193
+ h(z, { class: "size-5" })
194
+ ]),
195
+ _: 1
196
+ }),
197
+ h(E, {
198
+ type: "icon",
199
+ onClick: q(r, ["prevent"])
200
+ }, {
201
+ default: y(() => [
202
+ h(B, { class: "size-5" })
203
+ ]),
204
+ _: 1
205
+ })
206
+ ]),
207
+ o("div", Ot, [
208
+ h(je, {
209
+ left: "unset",
210
+ right: "0",
211
+ top: "0"
212
+ }, {
213
+ activator: y(({ on: P }) => [
214
+ h(E, {
215
+ type: "icon",
216
+ class: "flex",
217
+ onClick: P.click
218
+ }, {
219
+ default: y(() => [
220
+ h(w)
221
+ ]),
222
+ _: 1
223
+ }, 8, ["onClick"])
224
+ ]),
225
+ default: y(() => [
226
+ h($e, {
227
+ items: s,
228
+ onClick: d
229
+ }, {
230
+ default: y(({ item: P }) => [
231
+ o("span", Ft, $(P.name), 1)
232
+ ]),
233
+ _: 1
234
+ })
235
+ ]),
236
+ _: 1
237
+ })
238
+ ])
239
+ ])
240
+ ])
241
+ ]);
242
+ };
243
+ }
244
+ }), Ut = { class: "relative flex items-center gap-2 w-full p-2 overflow-hidden" }, Rt = { class: "flex-auto text-xs" }, Kt = { class: "text-gray-500 dark:text-gray-400 mt-1" }, Wt = /* @__PURE__ */ S({
245
+ __name: "CardNotification",
246
+ props: {
247
+ empty: {},
248
+ key: {},
249
+ isNew: {},
250
+ color: {},
251
+ timeout: {},
252
+ date: {},
253
+ text: {}
254
+ },
255
+ emits: ["remove", "read"],
256
+ setup(e, { emit: n }) {
257
+ const l = e, s = n, t = ["", "bg-green-500", "bg-red-500", "bg-yellow-500", "bg-blue-500"], a = (u) => t[u], c = (u) => s("remove", u), r = (u) => s("read", u);
258
+ return (u, d) => {
259
+ const i = Ne, m = ce;
260
+ return f(), v("div", Ut, [
261
+ o("div", {
262
+ class: V(["absolute left-0 top-0 w-[3px] h-full", a(l.color)])
263
+ }, null, 2),
264
+ h(E, {
265
+ class: "shrink-0",
266
+ type: "icon",
267
+ onClick: r
268
+ }, {
269
+ default: y(() => [
270
+ o("span", {
271
+ class: V([l.isNew ? "flex" : "hidden", "absolute right-0 top-0.5 z-1 h-2 w-2 rounded-full bg-orange-400"])
272
+ }, [...d[0] || (d[0] = [
273
+ o("span", { class: "absolute -z-1 inline-flex h-full w-full animate-ping rounded-full bg-orange-400 opacity-75" }, null, -1)
274
+ ])], 2),
275
+ h(i, { class: "size-5" })
276
+ ]),
277
+ _: 1
278
+ }),
279
+ o("div", Rt, [
280
+ o("div", null, $(l.text), 1),
281
+ o("div", Kt, $(W(rt)(l.date)) + " (" + $(W(ct)(l.date)) + ")", 1)
282
+ ]),
283
+ h(E, {
284
+ class: "shrink-0",
285
+ type: "icon",
286
+ size: "sm",
287
+ onClick: c
288
+ }, {
289
+ default: y(() => [
290
+ h(m, { class: "size-4" })
291
+ ]),
292
+ _: 1
293
+ })
294
+ ]);
295
+ };
296
+ }
297
+ }), qt = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear h-full" }, Gt = {
298
+ key: 0,
299
+ class: "flex flex-col gap-2 p-2"
300
+ }, Ho = /* @__PURE__ */ S({
301
+ __name: "AppNotification",
302
+ props: {
303
+ value: { type: Boolean },
304
+ notifications: {}
305
+ },
306
+ emits: ["close", "remove", "read"],
307
+ setup(e, { emit: n }) {
308
+ const l = e, s = n, t = M(() => !!l.notifications.find((d) => d.isNew)), a = M(() => !!l.notifications.length), c = (d) => s("close", d), r = (d) => s("remove", d), u = (d) => s("read", d);
309
+ return (d, i) => (f(), v(I, null, [
310
+ l.value ? (f(), v("div", {
311
+ key: 0,
312
+ class: "overlay fixed left-0 top-0 h-full w-full bg-black/40 bg-blur",
313
+ onClick: c
314
+ })) : T("", !0),
315
+ o("aside", {
316
+ class: V([l.value ? "translate-x-0 " : "translate-x-full", "overflow-x-hidden fixed top-[73px] right-0 flex h-[calc(100%-73px)] w-[290px] md:w-80 border-l border-gray-200 flex-col overflow-y-auto transition-all duration-350 dark:border-gray-800 bg-white dark:bg-gray-900"])
317
+ }, [
318
+ o("div", qt, [
319
+ k(d.$slots, "header", { isNew: t.value }),
320
+ a.value ? (f(), v("div", Gt, [
321
+ h(Le, {
322
+ "enter-active-class": "transition-all duration-300 ",
323
+ "enter-from-class": "opacity-0 translate-x-1/2",
324
+ "enter-to-class": "opacity-100 translate-x-0",
325
+ "leave-active-class": "transition-all duration-300 absolute",
326
+ "leave-from-class": "opacity-100 translate-x-0",
327
+ "leave-to-class": "opacity-0 translate-x-1/2"
328
+ }, {
329
+ default: y(() => [
330
+ (f(!0), v(I, null, R(l.notifications, (m) => (f(), v("div", {
331
+ key: m.date,
332
+ class: "relative"
333
+ }, [
334
+ k(d.$slots, "card", { item: m }, () => [
335
+ h(Wt, H({ ref_for: !0 }, m, {
336
+ class: "bg-gray-200/50 dark:bg-gray-800/50 rounded-md",
337
+ onRemove: (p) => r(m),
338
+ onRead: (p) => u(m)
339
+ }), null, 16, ["onRemove", "onRead"])
340
+ ])
341
+ ]))), 128))
342
+ ]),
343
+ _: 3
344
+ })
345
+ ])) : k(d.$slots, "empty", {}, void 0, void 0, 1)
346
+ ])
347
+ ], 2)
348
+ ], 64));
349
+ }
350
+ }), Zt = {}, Jt = { class: "fixed h-full w-full top-0 left-0 z-20" }, Xt = { class: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2" };
351
+ function Yt(e, n) {
352
+ return f(), v("div", Jt, [
353
+ n[0] || (n[0] = o("div", { class: "absolute h-full w-full top-0 left-0 bg-black/60 bg-blur" }, null, -1)),
354
+ o("div", Xt, [
355
+ k(e.$slots, "default")
356
+ ])
357
+ ]);
358
+ }
359
+ const Po = /* @__PURE__ */ ot(Zt, [["render", Yt]]), Qt = {
360
+ viewBox: "0 0 24 24",
361
+ width: "1.2em",
362
+ height: "1.2em"
363
+ };
364
+ function en(e, n) {
365
+ return f(), v("svg", Qt, [...n[0] || (n[0] = [
366
+ o("path", {
367
+ fill: "currentColor",
368
+ d: "m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z"
369
+ }, null, -1)
370
+ ])]);
371
+ }
372
+ const tn = N({ name: "ri-arrow-right-s-line", render: en }), nn = { class: "mb-4 flex flex-col gap-2" }, sn = { class: "size-6 flex-[0_0_24px] opacity-60" }, ln = ["onClick"], on = { class: "flex flex-col gap-2" }, an = { class: "flex gap-2 ms-8" }, rn = { class: "size-5 flex-[0_0_24px]" }, cn = { class: "flex-1 first-letter:uppercase text-sm" }, No = /* @__PURE__ */ S({
373
+ __name: "AppNav",
374
+ props: {
375
+ menu: { default: () => [] },
376
+ fullPath: { default: "" },
377
+ isSidebar: { type: Boolean, default: !1 }
378
+ },
379
+ emits: ["sidebar"],
380
+ setup(e, { emit: n }) {
381
+ const l = n, s = A(""), t = ({ name: c }) => {
382
+ e.isSidebar && l("sidebar", !e.isSidebar), s.value !== c && (s.value = s.value === c ? "" : c);
383
+ }, a = (c) => e.fullPath === c;
384
+ return re(
385
+ () => e.menu,
386
+ () => {
387
+ var c;
388
+ return s.value = ((c = dt(e.menu, e.fullPath)) == null ? void 0 : c.name) || "";
389
+ }
390
+ ), (c, r) => {
391
+ const u = tn;
392
+ return f(), v("nav", null, [
393
+ o("ul", nn, [
394
+ (f(!0), v(I, null, R(e.menu, (d) => (f(), v("li", {
395
+ key: d.name
396
+ }, [
397
+ (f(), j(xe(d.path ? "router-link" : "span"), {
398
+ to: d.path,
399
+ class: V(["flex gap-2 items-center px-3 py-2 rounded", a(d.path) ? "bg-blue-500/10" : "hover:bg-gray-500/10"]),
400
+ onClick: q((i) => t(d), ["prevent", "stop"])
401
+ }, {
402
+ default: y(() => [
403
+ o("div", sn, [
404
+ k(c.$slots, "icon", { item: d })
405
+ ]),
406
+ o("span", {
407
+ class: V(["flex-1 first-letter:uppercase text-sm", e.isSidebar ? "lg:hidden" : ""])
408
+ }, $(d.name), 3),
409
+ o("button", {
410
+ class: V(["cursor-pointer", [e.isSidebar ? "lg:hidden" : ""]]),
411
+ onClick: q((i) => t(d), ["prevent", "stop"])
412
+ }, [
413
+ d.children ? (f(), j(u, { key: 0 })) : T("", !0)
414
+ ], 10, ln)
415
+ ]),
416
+ _: 2
417
+ }, 1032, ["to", "class", "onClick"])),
418
+ d.children ? (f(), v("div", {
419
+ key: 0,
420
+ class: V(["translate transform overflow-hidden mt-2", [e.isSidebar ? "lg:hidden" : "", s.value === d.name ? "block" : "hidden"]])
421
+ }, [
422
+ o("ul", on, [
423
+ (f(!0), v(I, null, R(d.children, ({ name: i, path: m, icon: p }) => (f(), v("li", { key: i }, [
424
+ (f(), j(xe(m ? "router-link" : "span"), {
425
+ to: m,
426
+ class: V(["flex gap-2 items-center px-3 py-2 rounded", a(m) ? "bg-blue-500/10" : "hover:bg-gray-500/10"])
427
+ }, {
428
+ default: y(() => [
429
+ o("div", an, [
430
+ o("div", rn, [
431
+ k(c.$slots, "icon-children", {
432
+ item: { name: i, path: m, icon: p }
433
+ })
434
+ ]),
435
+ o("span", cn, $(i), 1)
436
+ ])
437
+ ]),
438
+ _: 2
439
+ }, 1032, ["to", "class"]))
440
+ ]))), 128))
441
+ ])
442
+ ], 2)) : T("", !0)
443
+ ]))), 128))
444
+ ])
445
+ ]);
446
+ };
447
+ }
448
+ }), dn = {
449
+ key: 0,
450
+ class: "w-full min-w-[260px] max-w-xs p-4 bg-white rounded shadow-lg dark:bg-gray-800",
451
+ role: "alert"
452
+ }, un = { class: "flex items-center gap-4 text-sm" }, mn = {
453
+ key: 0,
454
+ class: "text-green-600"
455
+ }, fn = {
456
+ key: 1,
457
+ class: "relative block h-4 w-full rounded overflow-hidden bg-gray-200 dark:bg-gray-900/50 select-none mt-2"
458
+ }, pn = { class: "absolute left-[140px] top-1/2 -translate-1/2 text-sm font-bold text-black dark:text-white text-center leading-none" }, vn = { class: "absolute left-[140px] top-1/2 -translate-1/2 text-sm font-bold text-white text-center leading-none" }, Oo = /* @__PURE__ */ S({
459
+ __name: "AppProgress",
460
+ props: {
461
+ timeout: { default: 5e3 },
462
+ key: {},
463
+ status: { default: 0 },
464
+ empty: {},
465
+ size: { default: 0 },
466
+ length: { default: 0 }
467
+ },
468
+ setup(e) {
469
+ const n = A(!1), l = M(() => !!e.length), s = M(() => !!(l.value && t.value === 100 && !e.status)), t = M(() => e.status ? Math.ceil(e.size * 100 / e.length) : 100), a = ke(() => {
470
+ n.value = !1;
471
+ }, e.timeout);
472
+ return re(
473
+ () => [e.size, e.status],
474
+ () => {
475
+ n.value = !0, a();
476
+ }
477
+ ), (c, r) => {
478
+ const u = ce;
479
+ return f(), j(_e, {
480
+ "enter-active-class": "duration-300 ease-out",
481
+ "enter-from-class": "transform opacity-0 translate-x-full",
482
+ "enter-to-class": "opacity-100 translate-x-0",
483
+ "leave-active-class": "duration-200 ease-in",
484
+ "leave-from-class": "opacity-100 translate-y-0",
485
+ "leave-to-class": "transform opacity-0 -translate-y-8"
486
+ }, {
487
+ default: y(() => [
488
+ n.value ? (f(), v("div", dn, [
489
+ o("div", un, [
490
+ k(c.$slots, "default", { isDone: s.value }, () => [
491
+ r[1] || (r[1] = o("div", { class: "flex-auto" }, "Progress...", -1)),
492
+ s.value ? (f(), v("span", mn, "Done")) : T("", !0)
493
+ ]),
494
+ o("button", {
495
+ class: "cursor-pointer transition text-gray-700 dark:text-gray-400 self-start hover:text-gray-600",
496
+ onClick: r[0] || (r[0] = (d) => n.value = !1)
497
+ }, [
498
+ h(u, { class: "size-4" })
499
+ ])
500
+ ]),
501
+ l.value ? (f(), v("div", {
502
+ key: 0,
503
+ class: "h-[2px] fixed top-0 left-0 w-full bg-blue-600 transition-all duration-500",
504
+ style: fe(`width: ${t.value}%`)
505
+ }, null, 4)) : T("", !0),
506
+ l.value ? (f(), v("div", fn, [
507
+ o("div", pn, $(t.value) + "%", 1),
508
+ o("div", {
509
+ class: "bg-blue-600 rounded h-4 overflow-hidden relative transition-all duration-500",
510
+ style: fe(`width: ${t.value}%`)
511
+ }, [
512
+ o("div", vn, $(t.value) + "%", 1)
513
+ ], 4)
514
+ ])) : T("", !0)
515
+ ])) : T("", !0)
516
+ ]),
517
+ _: 3
518
+ });
519
+ };
520
+ }
521
+ }), gn = { class: "my-4 text-gray-700 dark:text-gray-400" }, hn = { class: "flex flex-col md:flex-row flex-wrap md:gap-4 text-sm" }, bn = { class: "flex gap-2" }, yn = { class: "text-gray-700 dark:text-gray-400" }, xn = { class: "flex gap-2" }, _n = { class: "flex gap-2" }, $n = { class: "text-gray-700 dark:text-gray-400" }, kn = { class: "flex gap-2" }, wn = { class: "text-gray-700 dark:text-gray-400" }, Cn = { class: "flex flex-col gap-4 text-sm" }, Sn = { class: "flex gap-4" }, Fo = /* @__PURE__ */ S({
522
+ __name: "BlockInfo",
523
+ props: {
524
+ pkg: {},
525
+ key: {},
526
+ id: { default: 0 },
527
+ firmware: { default: () => [] },
528
+ totalBytes: {},
529
+ usedBytes: {},
530
+ uptime: {},
531
+ name: {},
532
+ board: {}
533
+ },
534
+ setup(e) {
535
+ const n = M(() => e.firmware.join(".")), l = M(() => {
536
+ var t, a, c, r, u, d, i;
537
+ const s = [];
538
+ return (t = e.pkg) != null && t.homepage && s.push({ name: "homepage", href: e.pkg.homepage }), (c = (a = e.pkg) == null ? void 0 : a.repository) != null && c.url && s.push({ name: "repository", href: e.pkg.repository.url }), (u = (r = e.pkg) == null ? void 0 : r.bugs) != null && u.url && s.push({ name: "bugs", href: e.pkg.bugs.url }), (d = e.pkg) != null && d.author && s.push({ name: "author", href: `mailto:${(i = e.pkg) == null ? void 0 : i.author}` }), s;
539
+ });
540
+ return (s, t) => {
541
+ var a, c;
542
+ return f(), v("div", null, [
543
+ o("p", gn, $((a = e.pkg) == null ? void 0 : a.description), 1),
544
+ o("div", hn, [
545
+ o("div", bn, [
546
+ t[0] || (t[0] = D(" Firmware (hw): ", -1)),
547
+ o("span", yn, $(n.value), 1)
548
+ ]),
549
+ o("div", xn, [
550
+ o("div", _n, [
551
+ t[1] || (t[1] = D(" Version (web): ", -1)),
552
+ o("span", $n, $((c = e.pkg) == null ? void 0 : c.version), 1)
553
+ ])
554
+ ]),
555
+ t[3] || (t[3] = o("div", { class: "flex-auto" }, null, -1)),
556
+ o("div", kn, [
557
+ t[2] || (t[2] = D(" ID: ", -1)),
558
+ o("span", wn, $(e.id.toString(16)), 1)
559
+ ])
560
+ ]),
561
+ t[4] || (t[4] = o("hr", { class: "dark:text-gray-700 text-gray-200 my-2" }, null, -1)),
562
+ o("div", Cn, [
563
+ o("div", Sn, [
564
+ k(s.$slots, "links", { links: l.value })
565
+ ])
566
+ ])
567
+ ]);
568
+ };
569
+ }
570
+ }), zn = ["onClick"], Vn = { class: "mr-2" }, Tn = { class: "text-sm" }, En = { class: "text-gray-400 text-xs" }, Bn = {
571
+ key: 0,
572
+ class: "flex justify-center"
573
+ }, Ln = { class: "flex justify-end mt-4" }, Uo = /* @__PURE__ */ S({
574
+ __name: "BlockScan",
575
+ props: {
576
+ items: { default: () => [] }
577
+ },
578
+ emits: ["scan", "select"],
579
+ setup(e, { emit: n }) {
580
+ const l = n, s = ["OPEN", "WEP", "WPA_PSK", "WPA2_PSK", "WPA_WPA2_PSK", "MAX", "", "NO", "AUTO"], t = (c) => l("select", c), a = (c) => l("scan", c);
581
+ return (c, r) => {
582
+ const u = at, d = $e, i = it, m = E;
583
+ return f(), v("div", null, [
584
+ h(d, {
585
+ items: e.items,
586
+ class: "bg-transparent! ring-0!"
587
+ }, {
588
+ default: y(({ item: p }) => [
589
+ o("div", {
590
+ class: "flex items-center w-full",
591
+ onClick: (b) => t(p)
592
+ }, [
593
+ o("div", Vn, [
594
+ h(u, F(U(p)), null, 16)
595
+ ]),
596
+ o("div", null, [
597
+ o("div", Tn, $(p.ssid), 1),
598
+ o("div", En, $(c.$t("security")) + " : " + $(s[p.encryptionType] || "unknown"), 1)
599
+ ])
600
+ ], 8, zn)
601
+ ]),
602
+ _: 1
603
+ }, 8, ["items"]),
604
+ e.items.length ? T("", !0) : (f(), v("div", Bn, [
605
+ h(i, { class: "text-primary" })
606
+ ])),
607
+ o("div", Ln, [
608
+ h(m, {
609
+ color: "blue",
610
+ onClick: a
611
+ }, {
612
+ default: y(() => [
613
+ D($(c.$t("scan")), 1)
614
+ ]),
615
+ _: 1
616
+ })
617
+ ])
618
+ ]);
619
+ };
620
+ }
621
+ }), Mn = { class: "md:flex items-center mb-4" }, An = { class: "flex-auto text-gray-600 bg:text-gray-400 mb-2" }, Dn = { class: "md:max-w-50" }, In = { class: "flex items-center mb-4" }, jn = { class: "flex-auto text-gray-600 bg:text-gray-400" }, Hn = { class: "flex items-center mb-4" }, Pn = { class: "flex-auto text-gray-600 bg:text-gray-400" }, Ro = /* @__PURE__ */ S({
622
+ __name: "BlockService",
623
+ props: {
624
+ locale: {},
625
+ locales: {}
626
+ },
627
+ emits: ["reboot", "reset", "locale"],
628
+ setup(e, { emit: n }) {
629
+ const l = n, s = (a) => l("locale", a), t = (a) => {
630
+ var c;
631
+ return (c = e.locales.find((r) => r.value === a)) == null ? void 0 : c.name;
632
+ };
633
+ return (a, c) => {
634
+ const r = se, u = E;
635
+ return f(), v(I, null, [
636
+ o("div", Mn, [
637
+ o("div", An, $(a.$t("selectLang")), 1),
638
+ o("div", Dn, [
639
+ h(r, {
640
+ "model-value": t(e.locale),
641
+ label: a.$t("lang"),
642
+ items: e.locales,
643
+ onChange: s
644
+ }, null, 8, ["model-value", "label", "items"])
645
+ ])
646
+ ]),
647
+ o("div", In, [
648
+ o("div", jn, $(a.$t("rebootDev")), 1),
649
+ h(u, {
650
+ class: "min-w-[100px]",
651
+ color: "red",
652
+ outline: "",
653
+ onClick: c[0] || (c[0] = (d) => l("reboot", d))
654
+ }, {
655
+ default: y(() => [
656
+ D($(a.$t("reboot")), 1)
657
+ ]),
658
+ _: 1
659
+ })
660
+ ]),
661
+ o("div", Hn, [
662
+ o("div", Pn, $(a.$t("resetConf")), 1),
663
+ h(u, {
664
+ class: "min-w-[100px]",
665
+ color: "red",
666
+ onClick: c[1] || (c[1] = (d) => l("reset", d))
667
+ }, {
668
+ default: y(() => [
669
+ D($(a.$t("reset")), 1)
670
+ ]),
671
+ _: 1
672
+ })
673
+ ])
674
+ ], 64);
675
+ };
676
+ }
677
+ }), Nn = { class: "grid grid-cols-1 gap-4 lg:max-w-[360px] min-w-[250px]" }, On = { class: "flex flex-col w-full items-center gap-2" }, Fn = ["title"], Un = { class: "absolute left-[110px] top-1/2 -translate-1/2 text-sm font-bold text-black dark:text-white text-center leading-none" }, Rn = { class: "absolute left-[110px] top-1/2 -translate-1/2 text-sm font-bold text-white text-center leading-none" }, Kn = { class: "flex justify-between w-full text-xs" }, Wn = { class: "text-gray-500 dark:text-gray-400" }, qn = { class: "text-sm" }, Gn = { class: "text-gray-500 dark:text-gray-400 text-left" }, Zn = { class: "text-right text-xs" }, Ko = /* @__PURE__ */ S({
678
+ __name: "BlockStatus",
679
+ props: {
680
+ pkg: {},
681
+ key: {},
682
+ id: { default: 0 },
683
+ firmware: { default: () => [] },
684
+ totalBytes: { default: 0 },
685
+ usedBytes: { default: 0 },
686
+ uptime: { default: 0 },
687
+ name: {},
688
+ board: {}
689
+ },
690
+ setup(e) {
691
+ const n = A(e.uptime);
692
+ let l = null;
693
+ const s = M(() => e.firmware.join(".")), t = M(() => [
694
+ { name: "used", value: ue(e.usedBytes) },
695
+ { name: "available", value: ue(e.totalBytes - e.usedBytes) },
696
+ { name: "total", value: ue(e.totalBytes) }
697
+ ]), a = M(() => {
698
+ var u;
699
+ return [
700
+ { name: "uptime", value: ut(n.value) },
701
+ { name: "id", value: `${e.id.toString(16)} (${e.id})` },
702
+ { name: "firmware", value: s.value },
703
+ { name: "version", value: (u = e.pkg) == null ? void 0 : u.version }
704
+ ];
705
+ }), c = M(() => e.usedBytes ? Math.round(e.usedBytes * 100 / e.totalBytes) : 0), r = () => {
706
+ n.value++, l = setTimeout(r, 1e3);
707
+ };
708
+ return le(() => {
709
+ r();
710
+ }), Me(() => {
711
+ n.value = 0, l && clearTimeout(l);
712
+ }), (u, d) => {
713
+ var i, m, p;
714
+ return f(), v("div", Nn, [
715
+ o("div", On, [
716
+ o("div", {
717
+ class: "relative block h-4 w-full rounded overflow-hidden bg-gray-200 dark:bg-gray-800 select-none",
718
+ title: `${c.value}%`
719
+ }, [
720
+ o("div", Un, $(c.value) + "%", 1),
721
+ o("div", {
722
+ class: "bg-blue-600 rounded h-4 overflow-hidden relative transition-all duration-500",
723
+ style: fe(`width: ${c.value}%`)
724
+ }, [
725
+ o("div", Rn, $(c.value) + "%", 1)
726
+ ], 4)
727
+ ], 8, Fn),
728
+ o("div", Kn, [
729
+ (f(!0), v(I, null, R(t.value, (b) => (f(), v("div", {
730
+ key: b.name,
731
+ class: "flex-auto"
732
+ }, [
733
+ o("div", Wn, [
734
+ k(u.$slots, "name", { item: b })
735
+ ]),
736
+ o("div", null, $(b.value), 1)
737
+ ]))), 128))
738
+ ])
739
+ ]),
740
+ o("div", qn, [
741
+ (f(!0), v(I, null, R(a.value, (b) => (f(), v("div", {
742
+ key: b.name,
743
+ class: "flex justify-between items-center"
744
+ }, [
745
+ o("div", Gn, [
746
+ k(u.$slots, "name", { item: b })
747
+ ]),
748
+ o("div", Zn, $(b.value), 1)
749
+ ]))), 128))
750
+ ]),
751
+ o("div", null, [
752
+ k(u.$slots, "default", {
753
+ home: (i = e.pkg) == null ? void 0 : i.homepage,
754
+ repo: (p = (m = e.pkg) == null ? void 0 : m.repository) == null ? void 0 : p.url
755
+ })
756
+ ])
757
+ ]);
758
+ };
759
+ }
760
+ }), Jn = { class: "flex items-center cursor-pointer" }, Xn = /* @__PURE__ */ S({
761
+ __name: "VFile",
762
+ emits: ["change"],
763
+ setup(e, { emit: n }) {
764
+ const l = n, s = async (t) => {
765
+ const a = t.target;
766
+ a.files && l("change", a.files);
767
+ };
768
+ return (t, a) => (f(), v("label", Jn, [
769
+ o("input", H({
770
+ type: "file",
771
+ class: "hidden"
772
+ }, t.$attrs, { onChange: s }), null, 16),
773
+ k(t.$slots, "default")
774
+ ]));
775
+ }
776
+ }), Yn = { class: "md:flex" }, Qn = { class: "text-gray-600 bg:text-gray-400 first-letter:uppercase min-w-19" }, Wo = /* @__PURE__ */ S({
777
+ __name: "BlockUpdate",
778
+ emits: ["update"],
779
+ setup(e, { emit: n }) {
780
+ const l = n, s = Qe({ firmware: null, littlefs: null }), t = (r) => r ? Array.from(r).map((u) => `${u.name} (${ue(u.size)})`).join("") : "", a = (r, u) => {
781
+ const d = new FormData();
782
+ for (let i = 0; i < r.length; i++) {
783
+ const m = r.item(i);
784
+ if (!m) return;
785
+ d.append(`file[${i}]`, m, u);
786
+ }
787
+ return d;
788
+ }, c = (r, u) => {
789
+ if (!u) return;
790
+ const d = a(u, r);
791
+ d && l("update", r, d);
792
+ };
793
+ return (r, u) => {
794
+ const d = E;
795
+ return f(), v("div", null, [
796
+ (f(!0), v(I, null, R(s, (i, m) => (f(), v("div", {
797
+ key: m,
798
+ class: "mb-4 flex items-center"
799
+ }, [
800
+ h(Xn, {
801
+ accept: ".bin",
802
+ onChange: (p) => s[m] = p,
803
+ class: "flex-auto"
804
+ }, {
805
+ default: y(() => [
806
+ o("div", Yn, [
807
+ o("h6", Qn, $(m) + ":", 1),
808
+ k(r.$slots, "default", {
809
+ file: t(i)
810
+ })
811
+ ])
812
+ ]),
813
+ _: 2
814
+ }, 1032, ["onChange"]),
815
+ h(d, {
816
+ class: "min-w-[100px]",
817
+ color: "blue",
818
+ disabled: !i,
819
+ onClick: (p) => c(`${m}.bin`, i)
820
+ }, {
821
+ default: y(() => [
822
+ D($(r.$t("btnUpdate")), 1)
823
+ ]),
824
+ _: 1
825
+ }, 8, ["disabled", "onClick"])
826
+ ]))), 128))
827
+ ]);
828
+ };
829
+ }
830
+ }), es = {
831
+ viewBox: "0 0 24 24",
832
+ width: "1.2em",
833
+ height: "1.2em"
834
+ };
835
+ function ts(e, n) {
836
+ return f(), v("svg", es, [...n[0] || (n[0] = [
837
+ o("path", {
838
+ fill: "currentColor",
839
+ d: "M12.172 12L9.343 9.173l1.415-1.414L15 12l-4.242 4.242l-1.415-1.414z"
840
+ }, null, -1)
841
+ ])]);
842
+ }
843
+ const Oe = N({ name: "ri-arrow-drop-right-line", render: ts }), ns = { class: "flex items-center gap-1.5" }, qo = /* @__PURE__ */ S({
844
+ __name: "BlockBreadcrumb",
845
+ props: {
846
+ items: { default: () => [] }
847
+ },
848
+ emits: ["click"],
849
+ setup(e, { emit: n }) {
850
+ const l = n, s = (t) => l("click", t);
851
+ return (t, a) => {
852
+ const c = Oe;
853
+ return f(), v("nav", null, [
854
+ o("ol", ns, [
855
+ (f(!0), v(I, null, R(e.items, (r, u) => (f(), v("li", {
856
+ key: u,
857
+ class: V(["inline-flex items-center gap-1.5 text-sm text-gray-500 dark:text-gray-400", r.path ? "" : "text-gray-800 dark:text-white/90"])
858
+ }, [
859
+ k(t.$slots, "default", { item: r }, () => [
860
+ (f(), j(xe(r.path ? "a" : "span"), {
861
+ href: r.path,
862
+ onClick: (d) => s(r)
863
+ }, {
864
+ default: y(() => [
865
+ D($(r.name), 1)
866
+ ]),
867
+ _: 2
868
+ }, 1032, ["href", "onClick"]))
869
+ ]),
870
+ r.path ? (f(), j(c, {
871
+ key: 0,
872
+ class: "rotate-270"
873
+ })) : T("", !0)
874
+ ], 2))), 128))
875
+ ])
876
+ ]);
877
+ };
878
+ }
879
+ }), ss = {
880
+ viewBox: "0 0 24 24",
881
+ width: "1.2em",
882
+ height: "1.2em"
883
+ };
884
+ function ls(e, n) {
885
+ return f(), v("svg", ss, [...n[0] || (n[0] = [
886
+ o("path", {
887
+ fill: "currentColor",
888
+ d: "M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1 1 0 0 1 3 21l.003-14c0-.552.45-1 1.006-1zM5.002 8L5 20h10V8zM9 6h8v10h2V4H9zm-2 5h6v2H7zm0 4h6v2H7z"
889
+ }, null, -1)
890
+ ])]);
891
+ }
892
+ const os = N({ name: "ri-file-copy2-line", render: ls }), as = { class: "flex-auto flex justify-between" }, is = { class: "text-sm text-gray-500 font-medium line-clamp-2 overflow-hidden" }, rs = { class: "text-sm text-ellipsis overflow-hidden text-nowrap" }, cs = {
893
+ key: 0,
894
+ class: "absolute left-1/2 top-1/2 size-[calc(50%)] text-gray-200/30 dark:text-gray-800/30 -translate-1/2"
895
+ }, ds = { class: "min-h-60 relative" }, us = { class: "pt-6" }, ms = { class: "text-center text-3xl text-ellipsis overflow-hidden" }, fs = { class: "text-center text-xl mt-4" }, oe = /* @__PURE__ */ S({
896
+ __name: "CardBase",
897
+ props: {
898
+ size: {},
899
+ id: {},
900
+ name: {},
901
+ type: {},
902
+ icon: {},
903
+ value: {},
904
+ valueTo: {},
905
+ opts: {},
906
+ args: {},
907
+ set: {},
908
+ get: {},
909
+ getTo: {}
910
+ },
911
+ emits: ["edit", "close", "click", "clone", "open", "setState"],
912
+ setup(e, { emit: n }) {
913
+ const l = e, s = n, t = A(!1), a = M(() => ["button", "dimmer"].includes(l.type || "") && l.value ? "text-amber-500" : "text-gray-400"), c = (m) => s("edit", m), r = (m) => s("clone", m), u = () => t.value = !0, d = (m) => s("open", m), i = (m) => {
914
+ t.value = !1, s("close", m);
915
+ };
916
+ return (m, p) => {
917
+ const b = Pe, g = os;
918
+ return f(), v("div", {
919
+ class: "flex flex-col border relative aspect-square rounded-md bg-white dark:bg-gray-900 border-b border-gray-300 dark:border-gray-700 p-2 hover-effect transition-all cursor-pointer",
920
+ onClick: u
921
+ }, [
922
+ o("div", as, [
923
+ o("div", {
924
+ class: V([a.value, "size-8 animate-shake"])
925
+ }, [
926
+ k(m.$slots, "icon", F(U(l)))
927
+ ], 2),
928
+ k(m.$slots, "header", F(U(l)))
929
+ ]),
930
+ o("div", null, [
931
+ k(m.$slots, "body", F(U(l)), () => [
932
+ o("h6", is, [
933
+ k(m.$slots, "name", F(U(l)), () => [
934
+ D($(l.name), 1)
935
+ ])
936
+ ]),
937
+ o("div", rs, [
938
+ k(m.$slots, "value", F(U(l)), () => [
939
+ D($(l.valueTo || l.value), 1)
940
+ ])
941
+ ])
942
+ ])
943
+ ]),
944
+ l.icon ? (f(), v("div", cs, [
945
+ k(m.$slots, "icon", F(U(l)))
946
+ ])) : T("", !0),
947
+ t.value ? (f(), j(He, {
948
+ key: 1,
949
+ size: l.size || "sm",
950
+ title: e.name,
951
+ onClose: i,
952
+ onOpen: d
953
+ }, {
954
+ "header-btn": y(() => [
955
+ h(E, {
956
+ color: "transparent",
957
+ onClick: c
958
+ }, {
959
+ default: y(() => [
960
+ h(b)
961
+ ]),
962
+ _: 1
963
+ }),
964
+ h(E, {
965
+ color: "transparent",
966
+ onClick: r
967
+ }, {
968
+ default: y(() => [
969
+ h(g, { class: "size-4 text-gray-500" })
970
+ ]),
971
+ _: 1
972
+ })
973
+ ]),
974
+ default: y(() => [
975
+ o("div", ds, [
976
+ o("div", us, [
977
+ o("h3", ms, [
978
+ k(m.$slots, "dialog-name", F(U(l)), () => [
979
+ D($(l.name), 1)
980
+ ])
981
+ ]),
982
+ k(m.$slots, "dialog", F(U(l))),
983
+ o("p", fs, [
984
+ k(m.$slots, "dialog-value", F(U(l)), () => [
985
+ D($(l.valueTo || l.value), 1)
986
+ ])
987
+ ])
988
+ ])
989
+ ])
990
+ ]),
991
+ _: 3
992
+ }, 8, ["size", "title"])) : T("", !0)
993
+ ]);
994
+ };
995
+ }
996
+ }), ps = {
997
+ viewBox: "0 0 24 24",
998
+ width: "1.2em",
999
+ height: "1.2em"
1000
+ };
1001
+ function vs(e, n) {
1002
+ return f(), v("svg", ps, [...n[0] || (n[0] = [
1003
+ o("path", {
1004
+ fill: "currentColor",
1005
+ d: "m6.265 3.807l1.147 1.639a8 8 0 1 0 9.176 0l1.147-1.639A9.99 9.99 0 0 1 22 12c0 5.523-4.477 10-10 10S2 17.523 2 12a9.99 9.99 0 0 1 4.265-8.193M11 12V2h2v10z"
1006
+ }, null, -1)
1007
+ ])]);
1008
+ }
1009
+ const gs = N({ name: "ri-shut-down-line", render: vs }), hs = { class: "flex justify-end" }, bs = { class: "flex justify-center py-4" }, Go = /* @__PURE__ */ S({
1010
+ __name: "CardButton",
1011
+ props: {
1012
+ size: {},
1013
+ id: {},
1014
+ name: {},
1015
+ type: {},
1016
+ icon: {},
1017
+ value: {},
1018
+ valueTo: {},
1019
+ opts: {},
1020
+ args: {},
1021
+ set: {},
1022
+ get: {},
1023
+ getTo: {}
1024
+ },
1025
+ emits: ["edit", "close", "click", "clone", "open", "setState"],
1026
+ setup(e, { emit: n }) {
1027
+ const l = e, s = n, t = ({ opts: c = {} }) => {
1028
+ const { disabled: r } = c;
1029
+ return { disabled: r };
1030
+ }, a = () => s("setState", !l.value);
1031
+ return (c, r) => {
1032
+ const u = gs;
1033
+ return f(), j(oe, H(l, {
1034
+ onClick: r[0] || (r[0] = (d) => s("click", d)),
1035
+ onEdit: r[1] || (r[1] = (d) => s("edit", d)),
1036
+ onClone: r[2] || (r[2] = (d) => s("clone", d))
1037
+ }), {
1038
+ icon: y((d) => [
1039
+ k(c.$slots, "icon", F(U(d)))
1040
+ ]),
1041
+ header: y((d) => [
1042
+ o("div", hs, [
1043
+ h(E, H(t(d), {
1044
+ type: "icon",
1045
+ class: l.value ? "text-amber-500" : "text-gray-500",
1046
+ onClick: q(a, ["stop"])
1047
+ }), {
1048
+ default: y(() => [
1049
+ h(u, { class: "size-8" })
1050
+ ]),
1051
+ _: 1
1052
+ }, 16, ["class"])
1053
+ ])
1054
+ ]),
1055
+ dialog: y((d) => [
1056
+ o("div", bs, [
1057
+ h(E, H(t(d), {
1058
+ type: "icon",
1059
+ class: ["size-18", l.value ? "text-amber-500" : "text-gray-500"],
1060
+ onClick: q(a, ["stop"])
1061
+ }), {
1062
+ default: y(() => [
1063
+ h(u, { class: "size-16" })
1064
+ ]),
1065
+ _: 1
1066
+ }, 16, ["class"])
1067
+ ])
1068
+ ]),
1069
+ _: 3
1070
+ }, 16);
1071
+ };
1072
+ }
1073
+ }), ys = {
1074
+ viewBox: "0 0 24 24",
1075
+ width: "1.2em",
1076
+ height: "1.2em"
1077
+ };
1078
+ function xs(e, n) {
1079
+ return f(), v("svg", ys, [...n[0] || (n[0] = [
1080
+ o("path", {
1081
+ fill: "currentColor",
1082
+ d: "M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16m1-8h4v2h-6V7h2z"
1083
+ }, null, -1)
1084
+ ])]);
1085
+ }
1086
+ const _s = N({ name: "ri-time-line", render: xs }), $s = { class: "flex justify-center relative mx-2 my-6" }, Zo = /* @__PURE__ */ S({
1087
+ __name: "CardDate",
1088
+ props: {
1089
+ size: {},
1090
+ id: {},
1091
+ name: {},
1092
+ type: {},
1093
+ icon: {},
1094
+ value: {},
1095
+ valueTo: {},
1096
+ opts: {},
1097
+ args: {},
1098
+ set: {},
1099
+ get: {},
1100
+ getTo: {}
1101
+ },
1102
+ emits: ["edit", "close", "click", "clone", "open", "setState"],
1103
+ setup(e, { emit: n }) {
1104
+ const l = e, s = n, t = Ae("time"), a = (d) => new Date(+d * 1e3).toISOString().slice(0, 16), c = (d) => {
1105
+ var m;
1106
+ const i = (m = d == null ? void 0 : d.target) == null ? void 0 : m.valueAsNumber;
1107
+ i && s("setState", i / 1e3);
1108
+ }, r = ({ name: d, value: i, opts: m = {} }) => {
1109
+ const { disabled: p } = m;
1110
+ return { label: d, modelValue: a(i), disabled: p };
1111
+ }, u = () => {
1112
+ var i, m;
1113
+ const d = (m = (i = t.value) == null ? void 0 : i.$el) == null ? void 0 : m.querySelector("input");
1114
+ d != null && d.showPicker && d.showPicker();
1115
+ };
1116
+ return (d, i) => {
1117
+ const m = _s;
1118
+ return f(), j(oe, H(l, {
1119
+ onClick: i[0] || (i[0] = (p) => s("click", p)),
1120
+ onEdit: i[1] || (i[1] = (p) => s("edit", p)),
1121
+ onClone: i[2] || (i[2] = (p) => s("clone", p))
1122
+ }), {
1123
+ icon: y((p) => [
1124
+ k(d.$slots, "icon", F(U(p)))
1125
+ ]),
1126
+ header: y((p) => [
1127
+ o("div", null, [
1128
+ h(E, {
1129
+ type: "icon",
1130
+ class: "text-gray-500",
1131
+ onClick: q(u, ["stop"])
1132
+ }, {
1133
+ default: y(() => [
1134
+ h(m, { class: "size-7" })
1135
+ ]),
1136
+ _: 1
1137
+ }),
1138
+ h(Z, H({
1139
+ ref_key: "time",
1140
+ ref: t
1141
+ }, r(p), {
1142
+ type: "datetime-local",
1143
+ class: "size-0",
1144
+ hidden: "",
1145
+ onChange: c
1146
+ }), null, 16)
1147
+ ])
1148
+ ]),
1149
+ dialog: y((p) => [
1150
+ o("div", $s, [
1151
+ h(Z, H(r(p), {
1152
+ type: "datetime-local",
1153
+ onChange: c
1154
+ }), null, 16)
1155
+ ])
1156
+ ]),
1157
+ _: 3
1158
+ }, 16);
1159
+ };
1160
+ }
1161
+ }), ks = { class: "flex justify-end" }, ws = { class: "flex justify-end" }, Cs = {
1162
+ class: /* @__PURE__ */ V("text-blue-600 dark:text-blue-400")
1163
+ }, Ss = {
1164
+ width: "30",
1165
+ height: "30",
1166
+ viewBox: "-7.5 -7.5 75 75",
1167
+ version: "1.1",
1168
+ style: { transform: "rotate(-90deg)" }
1169
+ }, zs = ["stroke-dashoffset"], Vs = { class: "absolute top-1/2 left-1/2 -translate-1/2 text-white z-10 font-bold text-xl" }, Jo = /* @__PURE__ */ S({
1170
+ __name: "CardDimmer",
1171
+ props: {
1172
+ size: {},
1173
+ id: {},
1174
+ name: {},
1175
+ type: {},
1176
+ icon: {},
1177
+ value: {},
1178
+ valueTo: {},
1179
+ opts: {},
1180
+ args: {},
1181
+ set: {},
1182
+ get: {},
1183
+ getTo: {}
1184
+ },
1185
+ emits: ["edit", "close", "click", "clone", "open", "setState"],
1186
+ setup(e, { emit: n }) {
1187
+ const l = e, s = n, t = A(0), a = ({ opts: i, value: m }) => Math.round(100 * +m / ((i == null ? void 0 : i.max) || 255)), c = ({ opts: i, value: m }) => Math.round(187 - +m / ((i == null ? void 0 : i.max) || 255) * 187), r = ({ value: i, opts: m }) => {
1188
+ const { min: p = 0, max: b = 255, step: g = 1, disabled: x } = m || {};
1189
+ return { min: p, max: b, step: g, value: i, disabled: !!x, class: x ? "" : "cursor-pointer" };
1190
+ }, u = (i) => s("setState", +i.target.value || 0), d = ({ value: i }) => {
1191
+ +i != 0 ? (t.value = +i, s("setState", 0)) : s("setState", i ? 0 : t.value || 255);
1192
+ };
1193
+ return (i, m) => (f(), j(oe, H(l, {
1194
+ onClick: m[0] || (m[0] = (p) => s("click", p)),
1195
+ onEdit: m[1] || (m[1] = (p) => s("edit", p)),
1196
+ onClone: m[2] || (m[2] = (p) => s("clone", p))
1197
+ }), {
1198
+ icon: y((p) => [
1199
+ k(i.$slots, "icon", F(U(p)))
1200
+ ]),
1201
+ header: y((p) => [
1202
+ o("div", ks, [
1203
+ o("div", ws, [
1204
+ h(E, H(r(p), {
1205
+ type: "icon",
1206
+ onClick: q((b) => d(p), ["stop"])
1207
+ }), {
1208
+ default: y(() => [
1209
+ o("div", Cs, [
1210
+ (f(), v("svg", Ss, [
1211
+ m[3] || (m[3] = o("circle", {
1212
+ class: "stroke-gray-300 dark:stroke-gray-700",
1213
+ r: "30",
1214
+ cx: "30",
1215
+ cy: "30",
1216
+ fill: "transparent",
1217
+ "stroke-width": "10"
1218
+ }, null, -1)),
1219
+ o("circle", {
1220
+ r: "30",
1221
+ cx: "30",
1222
+ cy: "30",
1223
+ stroke: "currentColor",
1224
+ "stroke-width": "8",
1225
+ "stroke-linecap": "butt",
1226
+ "stroke-dashoffset": c(p),
1227
+ fill: "transparent",
1228
+ "stroke-dasharray": "187"
1229
+ }, null, 8, zs)
1230
+ ]))
1231
+ ])
1232
+ ]),
1233
+ _: 2
1234
+ }, 1040, ["onClick"])
1235
+ ])
1236
+ ])
1237
+ ]),
1238
+ dialog: y((p) => [
1239
+ o("div", {
1240
+ class: V(["flex justify-center relative mx-2 my-6", r(p).disabled ? "opacity-40" : ""])
1241
+ }, [
1242
+ m[4] || (m[4] = o("div", { class: "absolute h-10 w-full top-0 left-0 bg-gray-400 dark:bg-gray-700 z-0 rounded-md" }, null, -1)),
1243
+ o("div", {
1244
+ class: "absolute h-10 top-0 left-0 bg-blue-600 dark:bg-blue-400 z-0 rounded-md transition-[width_0.3s_linear]",
1245
+ style: fe(`width: ${a(p)}%`)
1246
+ }, null, 4),
1247
+ o("div", Vs, $(a(p)) + " %", 1),
1248
+ o("input", H({ type: "range" }, r(p), {
1249
+ class: "w-full h-10 z-10 appearance-none opacity-0",
1250
+ onChange: u
1251
+ }), null, 16)
1252
+ ], 2)
1253
+ ]),
1254
+ _: 3
1255
+ }, 16));
1256
+ }
1257
+ }), Xo = /* @__PURE__ */ S({
1258
+ __name: "CardInfo",
1259
+ props: {
1260
+ size: {},
1261
+ id: {},
1262
+ name: {},
1263
+ type: {},
1264
+ icon: {},
1265
+ value: {},
1266
+ valueTo: {},
1267
+ opts: {},
1268
+ args: {},
1269
+ set: {},
1270
+ get: {},
1271
+ getTo: {}
1272
+ },
1273
+ emits: ["edit", "close", "click", "clone", "open", "setState"],
1274
+ setup(e, { emit: n }) {
1275
+ const l = e, s = n;
1276
+ return (t, a) => (f(), j(oe, H(l, {
1277
+ onClick: a[0] || (a[0] = (c) => s("click", c)),
1278
+ onEdit: a[1] || (a[1] = (c) => s("edit", c)),
1279
+ onClone: a[2] || (a[2] = (c) => s("clone", c))
1280
+ }), {
1281
+ icon: y((c) => [
1282
+ k(t.$slots, "icon", F(U(c)))
1283
+ ]),
1284
+ default: y(() => [
1285
+ k(t.$slots, "dialog")
1286
+ ]),
1287
+ _: 3
1288
+ }, 16));
1289
+ }
1290
+ }), Ts = { class: "flex justify-center relative mx-2 my-6" }, Yo = /* @__PURE__ */ S({
1291
+ __name: "CardInput",
1292
+ props: {
1293
+ size: {},
1294
+ id: {},
1295
+ name: {},
1296
+ type: {},
1297
+ icon: {},
1298
+ value: {},
1299
+ valueTo: {},
1300
+ opts: {},
1301
+ args: {},
1302
+ set: {},
1303
+ get: {},
1304
+ getTo: {}
1305
+ },
1306
+ emits: ["edit", "close", "click", "clone", "open", "setState"],
1307
+ setup(e, { emit: n }) {
1308
+ const l = e, s = n, t = A(l.value || ""), a = ({ name: r, opts: u = {} }) => {
1309
+ const { disabled: d } = u;
1310
+ return { label: r, disabled: d };
1311
+ }, c = (r) => s("setState", r.target.value);
1312
+ return re(
1313
+ () => l.value,
1314
+ (r) => {
1315
+ t.value = r;
1316
+ }
1317
+ ), (r, u) => {
1318
+ const d = Oe;
1319
+ return f(), j(oe, H(l, {
1320
+ onClick: u[1] || (u[1] = (i) => s("click", i)),
1321
+ onEdit: u[2] || (u[2] = (i) => s("edit", i)),
1322
+ onClone: u[3] || (u[3] = (i) => s("clone", i))
1323
+ }), {
1324
+ icon: y((i) => [
1325
+ k(r.$slots, "icon", F(U(i)))
1326
+ ]),
1327
+ dialog: y((i) => [
1328
+ o("div", Ts, [
1329
+ h(Z, H({
1330
+ modelValue: t.value,
1331
+ "onUpdate:modelValue": u[0] || (u[0] = (m) => t.value = m)
1332
+ }, a(i), {
1333
+ onEnter: c,
1334
+ onBlur: c
1335
+ }), {
1336
+ icon: y(() => [
1337
+ h(d, { class: "size-8" })
1338
+ ]),
1339
+ _: 1
1340
+ }, 16, ["modelValue"])
1341
+ ])
1342
+ ]),
1343
+ _: 3
1344
+ }, 16);
1345
+ };
1346
+ }
1347
+ }), Es = {
1348
+ viewBox: "0 0 24 24",
1349
+ width: "1.2em",
1350
+ height: "1.2em"
1351
+ };
1352
+ function Bs(e, n) {
1353
+ return f(), v("svg", Es, [...n[0] || (n[0] = [
1354
+ o("path", {
1355
+ fill: "currentColor",
1356
+ d: "M8 4h13v2H8zm-5-.5h3v3H3zm0 7h3v3H3zm0 7h3v3H3zM8 11h13v2H8zm0 7h13v2H8z"
1357
+ }, null, -1)
1358
+ ])]);
1359
+ }
1360
+ const Ls = N({ name: "ri-list-check", render: Bs }), Ms = { class: "flex justify-center py-4" }, Qo = /* @__PURE__ */ S({
1361
+ __name: "CardList",
1362
+ props: {
1363
+ size: {},
1364
+ id: {},
1365
+ name: {},
1366
+ type: {},
1367
+ icon: {},
1368
+ value: {},
1369
+ valueTo: {},
1370
+ opts: {},
1371
+ args: {},
1372
+ set: {},
1373
+ get: {},
1374
+ getTo: {}
1375
+ },
1376
+ emits: ["edit", "close", "click", "clone", "open", "setState"],
1377
+ setup(e, { emit: n }) {
1378
+ const l = e, s = n, t = ({ value: r }) => s("setState", r), a = ({ opts: r, value: u }) => {
1379
+ var d;
1380
+ return Array.isArray(r == null ? void 0 : r.items) && ((d = r == null ? void 0 : r.items.find((i) => i.value == u)) == null ? void 0 : d.name) || u;
1381
+ }, c = ({ name: r, value: u, opts: d = {} }) => {
1382
+ var b;
1383
+ const { items: i = [], disabled: m } = d, p = ((b = i.find((g) => g.value == u)) == null ? void 0 : b.name) || u;
1384
+ return { label: r, modelValue: p, items: i, disabled: !!m };
1385
+ };
1386
+ return (r, u) => {
1387
+ const d = Ls;
1388
+ return f(), j(oe, H(l, {
1389
+ onClick: u[1] || (u[1] = (i) => s("click", i)),
1390
+ onEdit: u[2] || (u[2] = (i) => s("edit", i)),
1391
+ onClone: u[3] || (u[3] = (i) => s("clone", i))
1392
+ }), {
1393
+ icon: y((i) => [
1394
+ k(r.$slots, "icon", F(U(i)))
1395
+ ]),
1396
+ value: y((i) => [
1397
+ D($(a(i)), 1)
1398
+ ]),
1399
+ "dialog-value": y((i) => [
1400
+ D($(a(i)), 1)
1401
+ ]),
1402
+ header: y((i) => [
1403
+ o("div", {
1404
+ onClick: u[0] || (u[0] = q(() => {
1405
+ }, ["prevent", "stop"]))
1406
+ }, [
1407
+ h(se, H(c(i), {
1408
+ "is-popup": "",
1409
+ top: "0",
1410
+ left: "-115px",
1411
+ onChange: t
1412
+ }), {
1413
+ activator: y(({ on: m }) => [
1414
+ h(E, {
1415
+ type: "icon",
1416
+ class: "text-gray-500",
1417
+ onClick: q(m.click, ["stop"])
1418
+ }, {
1419
+ default: y(() => [
1420
+ h(d, { class: "size-6" })
1421
+ ]),
1422
+ _: 1
1423
+ }, 8, ["onClick"])
1424
+ ]),
1425
+ _: 1
1426
+ }, 16)
1427
+ ])
1428
+ ]),
1429
+ dialog: y((i) => [
1430
+ o("div", Ms, [
1431
+ h(se, H(c(i), {
1432
+ top: "-50%",
1433
+ left: "50%",
1434
+ onChange: t
1435
+ }), null, 16)
1436
+ ])
1437
+ ]),
1438
+ _: 3
1439
+ }, 16);
1440
+ };
1441
+ }
1442
+ }), As = {
1443
+ viewBox: "0 0 24 24",
1444
+ width: "1.2em",
1445
+ height: "1.2em"
1446
+ };
1447
+ function Ds(e, n) {
1448
+ return f(), v("svg", As, [...n[0] || (n[0] = [
1449
+ o("path", {
1450
+ fill: "currentColor",
1451
+ d: "M15.5 5a3.5 3.5 0 1 0 0 7a3.5 3.5 0 0 0 0-7M10 8.5a5.5 5.5 0 1 1 10.032 3.117l2.675 2.676l-1.414 1.414l-2.675-2.675A5.5 5.5 0 0 1 10 8.5M3 4h5v2H3zm0 7h5v2H3zm18 7v2H3v-2z"
1452
+ }, null, -1)
1453
+ ])]);
1454
+ }
1455
+ const Is = N({ name: "ri-menu-search-line", render: Ds }), js = {
1456
+ viewBox: "0 0 24 24",
1457
+ width: "1.2em",
1458
+ height: "1.2em"
1459
+ };
1460
+ function Hs(e, n) {
1461
+ return f(), v("svg", js, [...n[0] || (n[0] = [
1462
+ o("path", {
1463
+ fill: "currentColor",
1464
+ d: "M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"
1465
+ }, null, -1)
1466
+ ])]);
1467
+ }
1468
+ const pe = N({ name: "ri-add-line", render: Hs }), Ps = { class: "flex w-full relative" }, Ns = { class: "flex gap-2 flex-wrap flex-auto px-2 py-1" }, Os = ["disabled"], Fe = /* @__PURE__ */ S({
1469
+ __name: "VTextWrapper",
1470
+ props: {
1471
+ active: { type: Boolean },
1472
+ label: { default: "label" },
1473
+ disabled: { type: Boolean, default: !1 },
1474
+ hideIcon: { type: Boolean, default: !1 }
1475
+ },
1476
+ emits: ["icon"],
1477
+ setup(e, { emit: n }) {
1478
+ const l = n, s = M(() => e.active ? "top-0 left-3 text-xs" : "top-1/2"), t = M(() => [e.disabled ? "border-gray-400 opacity-40" : "border-gray-300 hover:border-gray-400 dark:border-gray-700/50 hover:dark:border-gray-600/50"]);
1479
+ return (a, c) => {
1480
+ const r = pe;
1481
+ return f(), v("div", Ps, [
1482
+ o("div", {
1483
+ class: V(["relative w-full min-h-[40px] border border-gray-300 dark:border-gray-700 flex items-center rounded transition bg-white dark:bg-gray-800", t.value])
1484
+ }, [
1485
+ o("span", {
1486
+ class: V(["absolute left-4 transition-all rounded -translate-y-1/2 text-gray-600 dark:text-gray-400", s.value])
1487
+ }, $(e.label), 3),
1488
+ o("div", Ns, [
1489
+ k(a.$slots, "default")
1490
+ ]),
1491
+ e.hideIcon ? T("", !0) : (f(), v("button", {
1492
+ key: 0,
1493
+ disabled: e.disabled,
1494
+ class: V([{ "cursor-pointer": !e.disabled }, "h-full flex items-center justify-center text-gray-400 border-l border-gray-300 dark:border-gray-700/50 flex-[0_0_50px]"]),
1495
+ onClick: c[0] || (c[0] = (u) => l("icon", u))
1496
+ }, [
1497
+ k(a.$slots, "icon", {}, () => [
1498
+ h(r, { class: "size-4" })
1499
+ ])
1500
+ ], 10, Os))
1501
+ ], 2)
1502
+ ]);
1503
+ };
1504
+ }
1505
+ }), Fs = {
1506
+ viewBox: "0 0 24 24",
1507
+ width: "1.2em",
1508
+ height: "1.2em"
1509
+ };
1510
+ function Us(e, n) {
1511
+ return f(), v("svg", Fs, [...n[0] || (n[0] = [
1512
+ o("path", {
1513
+ fill: "currentColor",
1514
+ d: "M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1 1 0 0 1 3 21l.003-14c0-.552.45-1 1.006-1zM5.002 8L5 20h10V8zM9 6h8v10h2V4H9z"
1515
+ }, null, -1)
1516
+ ])]);
1517
+ }
1518
+ const Rs = N({ name: "ri-file-copy-line", render: Us }), Ks = {
1519
+ viewBox: "0 0 24 24",
1520
+ width: "1.2em",
1521
+ height: "1.2em"
1522
+ };
1523
+ function Ws(e, n) {
1524
+ return f(), v("svg", Ks, [...n[0] || (n[0] = [
1525
+ o("path", {
1526
+ fill: "currentColor",
1527
+ d: "M2 4a1 1 0 0 1 1-1h7.414l2 2H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3c-.55 0-1-.45-1-1zm8.586 2l-1-1H4v2h5.586zM4 9v10h16V7h-7.586l-2 2z"
1528
+ }, null, -1)
1529
+ ])]);
1530
+ }
1531
+ const qs = N({ name: "ri-folder6-line", render: Ws }), Gs = ["onClick"], Zs = {
1532
+ key: 0,
1533
+ class: "me-1"
1534
+ }, Js = { class: "dark:text-gray-300" }, Xs = { class: "flex gap-3 items-center z-10" }, Ys = {
1535
+ key: 0,
1536
+ class: "flex ps-5"
1537
+ }, Qs = { class: "font-medium dark:text-gray-300" }, Ue = /* @__PURE__ */ S({
1538
+ __name: "VListObject",
1539
+ props: {
1540
+ items: { default: () => ({}) },
1541
+ path: { default: "" },
1542
+ onlyValue: { type: Boolean, default: !1 }
1543
+ },
1544
+ emits: ["click"],
1545
+ setup(e, { emit: n }) {
1546
+ const l = n, s = () => "before:absolute before:w-full before:h-8 before:t-0 before:left-0 before:border-b before:border-gray-200 dark:before:border-gray-800/50 hover:before:bg-gray-400/10", t = A({}), { text: a, copy: c, copied: r, isSupported: u } = ft(), d = (b) => {
1547
+ t.value[b] = !t.value[b];
1548
+ }, i = (b) => typeof b == "object", m = (b) => `${e.path ? e.path + "." : ""}${b}`, p = (b, g) => {
1549
+ l("click", { key: b, path: m(b), isObject: g });
1550
+ };
1551
+ return (b, g) => {
1552
+ const x = qs, z = Rs, B = pe;
1553
+ return f(), v("ul", null, [
1554
+ (f(!0), v(I, null, R(e.items, (w, P) => (f(), v("li", {
1555
+ key: P,
1556
+ class: V(i(w) ? "" : `flex items-center ${s()}`)
1557
+ }, [
1558
+ o("div", {
1559
+ class: V(["flex items-center cursor-pointer ps-2 h-8", i(w) ? `${s()}` : ""]),
1560
+ onClick: (J) => d(P)
1561
+ }, [
1562
+ i(w) ? (f(), v("div", Zs, [
1563
+ h(x, { class: "size-5" })
1564
+ ])) : T("", !0),
1565
+ o("div", Js, $(P), 1),
1566
+ W(u) ? (f(), j(E, {
1567
+ key: 1,
1568
+ class: "opacity-20 hover:opacity-70 transition-all",
1569
+ color: "transparent",
1570
+ size: "sm",
1571
+ onClick: q((J) => W(c)(m(P)), ["stop"])
1572
+ }, {
1573
+ default: y(() => [
1574
+ h(z, { class: "size-5" })
1575
+ ]),
1576
+ _: 1
1577
+ }, 8, ["onClick"])) : T("", !0),
1578
+ W(a) === m(P) ? (f(), v("span", {
1579
+ key: 2,
1580
+ class: V(["text-gray-500 transition-all duration-1000 text-sm", W(r) ? "opacity-100" : "opacity-0"])
1581
+ }, $(b.$t("copied")), 3)) : T("", !0),
1582
+ !e.onlyValue && i(w) ? (f(), v(I, { key: 3 }, [
1583
+ g[1] || (g[1] = o("div", { class: "flex-auto" }, null, -1)),
1584
+ o("div", Xs, [
1585
+ h(E, {
1586
+ class: "opacity-20 hover:opacity-70 transition-all",
1587
+ color: "transparent",
1588
+ size: "sm",
1589
+ title: b.$t("add"),
1590
+ onClick: q((J) => p(P, i(w)), ["stop"])
1591
+ }, {
1592
+ default: y(() => [
1593
+ h(B, { class: "size-5" })
1594
+ ]),
1595
+ _: 1
1596
+ }, 8, ["title", "onClick"])
1597
+ ])
1598
+ ], 64)) : T("", !0)
1599
+ ], 10, Gs),
1600
+ i(w) ? (f(), v("div", Ys, [
1601
+ De(h(Ue, {
1602
+ class: "flex-auto",
1603
+ path: m(P),
1604
+ items: w,
1605
+ onlyValue: e.onlyValue,
1606
+ onClick: g[0] || (g[0] = (J) => l("click", J))
1607
+ }, null, 8, ["path", "items", "onlyValue"]), [
1608
+ [et, t.value[P]]
1609
+ ])
1610
+ ])) : (f(), v(I, { key: 1 }, [
1611
+ g[2] || (g[2] = o("div", { class: "flex-auto gap-3" }, null, -1)),
1612
+ o("div", Qs, $(w), 1),
1613
+ h(E, {
1614
+ class: "opacity-20 hover:opacity-70 transition-all",
1615
+ color: "gray",
1616
+ size: "sm",
1617
+ title: b.$t("add"),
1618
+ onClick: q((J) => p(P, i(w)), ["stop"])
1619
+ }, {
1620
+ default: y(() => [
1621
+ h(B, { class: "size-5" })
1622
+ ]),
1623
+ _: 1
1624
+ }, 8, ["title", "onClick"])
1625
+ ], 64))
1626
+ ], 2))), 128))
1627
+ ]);
1628
+ };
1629
+ }
1630
+ }), el = { class: "" }, tl = { class: "flex border-b border-gray-200 dark:border-gray-700" }, nl = ["onClick"], sl = { class: "px-4 py-2" }, ll = { class: "relative my-4" }, ol = { key: 0 }, al = /* @__PURE__ */ S({
1631
+ __name: "VTabs",
1632
+ props: {
1633
+ value: {},
1634
+ items: {}
1635
+ },
1636
+ emits: ["click"],
1637
+ setup(e, { expose: n, emit: l }) {
1638
+ const s = l, t = A(e.value || 0), a = (r) => [t.value === r ? "" : "before:hidden"], c = (r) => {
1639
+ t.value = r, s("click", r);
1640
+ };
1641
+ return n({
1642
+ setActiveTab: c,
1643
+ activeTab: t
1644
+ }), (r, u) => (f(), v("div", el, [
1645
+ o("div", tl, [
1646
+ (f(!0), v(I, null, R(e.items, (d, i) => (f(), v("div", {
1647
+ key: i,
1648
+ class: "relative flex-auto"
1649
+ }, [
1650
+ o("button", {
1651
+ class: "w-full",
1652
+ onClick: (m) => c(i)
1653
+ }, [
1654
+ o("div", {
1655
+ class: V([a(i), "font-medium text-lg transition cursor-pointer before:h-[2px] before:absolute before:w-full before:bg-blue-700 before:left-0 before:bottom-0"])
1656
+ }, [
1657
+ k(r.$slots, "header", {
1658
+ tab: d,
1659
+ i
1660
+ }, () => [
1661
+ o("div", sl, $(d.title), 1)
1662
+ ])
1663
+ ], 2)
1664
+ ], 8, nl)
1665
+ ]))), 128))
1666
+ ]),
1667
+ o("div", ll, [
1668
+ (f(!0), v(I, null, R(e.items, (d, i) => (f(), v("div", {
1669
+ key: i,
1670
+ class: "tab-panel"
1671
+ }, [
1672
+ h(_e, {
1673
+ "enter-active-class": "transition-all duration-300 ease-out",
1674
+ "enter-from-class": "transform opacity-0 translate-x-2",
1675
+ "enter-to-class": "transform opacity-100 translate-x-0",
1676
+ "leave-active-class": "transition-all duration-0 ease-in absolute inset-0",
1677
+ "leave-from-class": "transform opacity-100 translate-x-0",
1678
+ "leave-to-class": "transform opacity-0 -translate-x-2"
1679
+ }, {
1680
+ default: y(() => [
1681
+ t.value === i ? (f(), v("div", ol, [
1682
+ k(r.$slots, `tab-${i}`)
1683
+ ])) : T("", !0)
1684
+ ]),
1685
+ _: 2
1686
+ }, 1024)
1687
+ ]))), 128))
1688
+ ])
1689
+ ]));
1690
+ }
1691
+ }), il = { class: "flex gap-1 text-amber-500 self-start text-nowrap select-none" }, rl = ["title", "onMouseenter", "onMouseleave"], cl = { class: "flex flex-auto" }, dl = ["disabled"], ge = /* @__PURE__ */ S({
1692
+ __name: "VFunc",
1693
+ props: {
1694
+ label: {},
1695
+ args: {},
1696
+ value: {},
1697
+ disabled: { type: Boolean, default: !1 },
1698
+ hideIcon: { type: Boolean, default: !1 }
1699
+ },
1700
+ emits: ["change", "icon", "hover"],
1701
+ setup(e, { emit: n }) {
1702
+ const l = n, s = ["v", "a", "b", "c"], t = A(e.value || ""), a = (u) => {
1703
+ try {
1704
+ return new Function(u), !0;
1705
+ } catch (d) {
1706
+ return console.warn(d), !1;
1707
+ }
1708
+ }, c = ke((u) => {
1709
+ const d = u.target;
1710
+ a(d.value) && l("change", d.value);
1711
+ }, 500), r = (u) => l("icon", u);
1712
+ return re(
1713
+ () => e.value,
1714
+ () => {
1715
+ e.value && (t.value = e.value);
1716
+ }
1717
+ ), (u, d) => {
1718
+ const i = ce, m = pe;
1719
+ return f(), j(Fe, {
1720
+ active: !!e.value,
1721
+ disabled: e.disabled,
1722
+ label: e.label,
1723
+ hideIcon: e.hideIcon,
1724
+ onIcon: r
1725
+ }, {
1726
+ icon: y(() => [
1727
+ e.value ? (f(), j(i, {
1728
+ key: 0,
1729
+ class: "size-4"
1730
+ })) : (f(), j(m, {
1731
+ key: 1,
1732
+ class: "size-4"
1733
+ }))
1734
+ ]),
1735
+ default: y(() => [
1736
+ e.value ? (f(), v(I, { key: 0 }, [
1737
+ o("div", il, [
1738
+ d[3] || (d[3] = D(" ( ", -1)),
1739
+ (f(!0), v(I, null, R(e.args, (p, b) => (f(), v(I, { key: p }, [
1740
+ o("span", {
1741
+ class: "text-blue-400/80",
1742
+ title: p,
1743
+ onMouseenter: (g) => l("hover", "enter", b),
1744
+ onMouseleave: (g) => l("hover", "leave", b)
1745
+ }, $(s[b]), 41, rl),
1746
+ d[2] || (d[2] = o("span", { class: "last:hidden" }, ",", -1))
1747
+ ], 64))), 128)),
1748
+ d[4] || (d[4] = D(" ) => ", -1))
1749
+ ]),
1750
+ o("div", cl, [
1751
+ De(o("textarea", {
1752
+ "onUpdate:modelValue": d[0] || (d[0] = (p) => t.value = p),
1753
+ class: "outline-0 w-full resize-none field-sizing-content",
1754
+ type: "text",
1755
+ disabled: e.disabled,
1756
+ onInput: d[1] || (d[1] = //@ts-ignore
1757
+ (...p) => W(c) && W(c)(...p))
1758
+ }, null, 40, dl), [
1759
+ [tt, t.value]
1760
+ ])
1761
+ ])
1762
+ ], 64)) : T("", !0)
1763
+ ]),
1764
+ _: 1
1765
+ }, 8, ["active", "disabled", "label", "hideIcon"]);
1766
+ };
1767
+ }
1768
+ }), ul = ["checked", "disabled"], ml = { class: "text-sm ms-2 peer-disabled:opacity-40" }, fl = /* @__PURE__ */ S({
1769
+ __name: "VCheckbox",
1770
+ props: {
1771
+ modelValue: { type: [Number, Boolean], default: !1 },
1772
+ disabled: { type: Boolean, default: !1 }
1773
+ },
1774
+ emits: ["update:modelValue", "click"],
1775
+ setup(e, { emit: n }) {
1776
+ const l = n, s = (a) => {
1777
+ const c = a.target;
1778
+ l("update:modelValue", c.checked);
1779
+ }, t = (a) => l("click", a);
1780
+ return (a, c) => (f(), v("label", {
1781
+ class: V(["inline-flex items-center relative", { "cursor-pointer": !e.disabled }]),
1782
+ onClick: t
1783
+ }, [
1784
+ o("input", {
1785
+ type: "checkbox",
1786
+ checked: !!e.modelValue,
1787
+ disabled: e.disabled,
1788
+ class: "peer size-5 transition-all appearance-none rounded border border-gray-300 dark:border-gray-700 disabled:opacity-40 not-disabled:cursor-pointer",
1789
+ onChange: s
1790
+ }, null, 40, ul),
1791
+ c[0] || (c[0] = o("button", { class: "absolute opacity-0 peer-checked:opacity-100 peer-disabled:opacity-40 top-1/2 left-[10px] transform -translate-x-1/2 -translate-y-1/2 pointer-events-none" }, [
1792
+ o("svg", {
1793
+ class: "h-3.5 w-3.5",
1794
+ viewBox: "0 0 20 20",
1795
+ fill: "currentColor",
1796
+ stroke: "currentColor",
1797
+ "stroke-width": "1"
1798
+ }, [
1799
+ o("path", {
1800
+ "fill-rule": "evenodd",
1801
+ d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
1802
+ "clip-rule": "evenodd"
1803
+ })
1804
+ ])
1805
+ ], -1)),
1806
+ o("span", ml, [
1807
+ k(a.$slots, "default")
1808
+ ])
1809
+ ], 2));
1810
+ }
1811
+ }), pl = { class: "flex flex-col" }, vl = { class: "flex gap-4 mb-6" }, gl = {
1812
+ key: 0,
1813
+ class: "flex gap-4"
1814
+ }, hl = {
1815
+ key: 1,
1816
+ class: ""
1817
+ }, bl = { class: "flex flex-col md:flex-row gap-4" }, yl = { class: "flex gap-4" }, xl = { class: "flex justify-between flex-auto" }, _l = ["onClick"], $l = /* @__PURE__ */ S({
1818
+ __name: "ItemOptions",
1819
+ props: {
1820
+ min: { default: 0 },
1821
+ max: { default: 255 },
1822
+ step: { default: 1 },
1823
+ disabled: {},
1824
+ items: { default: () => [] },
1825
+ value: {},
1826
+ type: {}
1827
+ },
1828
+ emits: ["update"],
1829
+ setup(e, { emit: n }) {
1830
+ const l = n, s = M(() => e.items.map((g, x) => ({ ...g, id: ++x }))), t = A({ name: "", value: "" }), a = M(() => e.items.length + 1), c = M(() => {
1831
+ var g;
1832
+ return !((g = t.value) != null && g.id);
1833
+ }), r = (g) => e.type === g, u = (g, x) => l("update", g, x), d = (g) => g.map(({ name: x, value: z }) => ({ name: x, value: z })), i = ({ id: g, name: x, value: z }) => t.value = { id: g, name: x, value: z }, m = () => {
1834
+ const g = a.value;
1835
+ t.value = { name: `New_${g}`, value: `${g}`, id: g }, u("items", d([...s.value, t.value]));
1836
+ }, p = (g) => {
1837
+ t.value.name === g.name && (t.value = { name: "", value: "" }), u("items", d(s.value.filter((x) => x.value !== g.value)));
1838
+ }, b = ke(() => {
1839
+ const g = t.value;
1840
+ if (!g.name || !g.value) return;
1841
+ const x = s.value.map((z) => z.id === g.id ? g : z);
1842
+ u("items", d(x));
1843
+ }, 300);
1844
+ return (g, x) => {
1845
+ const z = ce, B = pe;
1846
+ return f(), v("div", pl, [
1847
+ o("div", vl, [
1848
+ h(fl, {
1849
+ modelValue: e.disabled,
1850
+ "onUpdate:modelValue": x[0] || (x[0] = (w) => u("disabled", w ? 1 : 0))
1851
+ }, {
1852
+ default: y(() => [...x[6] || (x[6] = [
1853
+ D("Disabled", -1)
1854
+ ])]),
1855
+ _: 1
1856
+ }, 8, ["modelValue"])
1857
+ ]),
1858
+ r("dimmer") ? (f(), v("div", gl, [
1859
+ h(Z, {
1860
+ modelValue: e.min,
1861
+ label: "Min",
1862
+ "onUpdate:modelValue": x[1] || (x[1] = (w) => u("min", +w))
1863
+ }, null, 8, ["modelValue"]),
1864
+ h(Z, {
1865
+ modelValue: e.max,
1866
+ label: "Max",
1867
+ "onUpdate:modelValue": x[2] || (x[2] = (w) => u("max", +w))
1868
+ }, null, 8, ["modelValue"]),
1869
+ h(Z, {
1870
+ modelValue: e.step,
1871
+ label: "Step",
1872
+ "onUpdate:modelValue": x[3] || (x[3] = (w) => u("step", +w))
1873
+ }, null, 8, ["modelValue"])
1874
+ ])) : T("", !0),
1875
+ r("list") ? (f(), v("div", hl, [
1876
+ o("div", bl, [
1877
+ h(Z, {
1878
+ modelValue: t.value.name,
1879
+ "onUpdate:modelValue": [
1880
+ x[4] || (x[4] = (w) => t.value.name = w),
1881
+ W(b)
1882
+ ],
1883
+ disabled: c.value,
1884
+ label: "Name"
1885
+ }, null, 8, ["modelValue", "disabled", "onUpdate:modelValue"]),
1886
+ h(Z, {
1887
+ modelValue: t.value.value,
1888
+ "onUpdate:modelValue": [
1889
+ x[5] || (x[5] = (w) => t.value.value = w),
1890
+ W(b)
1891
+ ],
1892
+ disabled: c.value,
1893
+ label: "Value"
1894
+ }, null, 8, ["modelValue", "disabled", "onUpdate:modelValue"])
1895
+ ]),
1896
+ o("div", yl, [
1897
+ h(se, {
1898
+ "model-value": t.value.value,
1899
+ label: "List",
1900
+ items: s.value,
1901
+ top: "unset",
1902
+ bottom: "0",
1903
+ onChange: i
1904
+ }, {
1905
+ item: y(({ item: w }) => [
1906
+ o("div", xl, [
1907
+ o("span", null, $(w.name), 1),
1908
+ o("button", {
1909
+ class: "cursor-pointer size-4",
1910
+ onClick: q((P) => p(w), ["prevent", "stop"])
1911
+ }, [
1912
+ h(z)
1913
+ ], 8, _l)
1914
+ ])
1915
+ ]),
1916
+ _: 1
1917
+ }, 8, ["model-value", "items"]),
1918
+ h(E, {
1919
+ class: "px-4",
1920
+ color: "blue",
1921
+ onClick: m
1922
+ }, {
1923
+ default: y(() => [
1924
+ h(B)
1925
+ ]),
1926
+ _: 1
1927
+ })
1928
+ ])
1929
+ ])) : T("", !0)
1930
+ ]);
1931
+ };
1932
+ }
1933
+ }), kl = { class: "flex flex-col" }, wl = { class: "flex flex-col md:flex-row gap-6 min-h-[300px]" }, Cl = { class: "flex-auto order-1" }, Sl = { class: "flex-auto gap-x-2 order-1" }, zl = { class: "grid grid-cols-1 md:grid-cols-2 gap-6" }, Vl = { class: "flex gap-2 items-center" }, Tl = { class: "flex flex-col gap-4" }, El = { class: "flex gap-2 flex-wrap flex-auto px-2 py-1" }, Bl = { class: "relative group" }, Ll = { class: "select-none" }, Ml = ["onClick"], Al = { class: "flex justify-center order-0 md:order-1 md:mt-11" }, Dl = { class: "flex-[0_0_130px] size-[130px]" }, Il = { class: "flex gap-4 justify-end" }, jl = { class: "relative min-h-[200px] max-h-100dvh overflow-auto scrollbar" }, ea = /* @__PURE__ */ S({
1934
+ __name: "ItemEdit",
1935
+ props: {
1936
+ items: {},
1937
+ item: {},
1938
+ object: {},
1939
+ listDashboard: {},
1940
+ listIcons: {}
1941
+ },
1942
+ emits: ["button"],
1943
+ setup(e, { emit: n }) {
1944
+ const l = n, s = [{ title: "Main" }, { title: "Data" }, { title: "Options" }], t = A({
1945
+ id: "",
1946
+ name: "",
1947
+ type: "button",
1948
+ icon: "bulb",
1949
+ value: "",
1950
+ args: [],
1951
+ set: "",
1952
+ get: "",
1953
+ getTo: ""
1954
+ }), a = A(!1), c = M(() => {
1955
+ var _;
1956
+ return !((_ = e.item) != null && _.id);
1957
+ }), r = M(() => !!e.items.filter((_) => {
1958
+ var C;
1959
+ return _.id !== ((C = e.item) == null ? void 0 : C.id);
1960
+ }).find((_) => _.id === (t == null ? void 0 : t.value.id))), u = M(() => t.value.type === "info"), d = M(() => {
1961
+ var _;
1962
+ return (_ = t.value.args) == null ? void 0 : _.length;
1963
+ }), i = M(() => t.value.args.length > 3), m = M(() => {
1964
+ if (r.value) return !0;
1965
+ const { id: _, args: C } = t.value;
1966
+ return !_ || !C.length;
1967
+ }), p = ({ value: _ }) => t.value.icon = _, b = ({ value: _ }) => {
1968
+ const C = _;
1969
+ t.value.type = C, delete t.value.opts, ["button", "list", "dimmer"].includes(C) && (_ === "button" && (t.value.opts = {}), _ === "list" && (t.value.opts = { items: [] }), _ === "dimmer" && (t.value.opts = { min: 0, max: 255, step: 1 }));
1970
+ }, g = (_) => {
1971
+ _ === "get" && (t.value.get ? delete t.value.get : t.value.get = "v"), _ === "set" && (t.value.set ? delete t.value.set : t.value.set = "v"), _ === "getTo" && (t.value.getTo ? delete t.value.getTo : t.value.getTo = "v");
1972
+ }, x = (_) => l("button", _, t.value), z = (_) => t.value.args = t.value.args.filter((C) => C !== _), B = ({ path: _ }) => {
1973
+ !t.value.args.length && !t.value.id && (t.value.id = _), t.value.args.push(_), a.value = !1;
1974
+ }, w = A(-1), P = (_) => w.value === _, J = (_, C) => {
1975
+ _ === "enter" && (w.value = C), _ === "leave" && (w.value = -1);
1976
+ }, ve = (_, C) => {
1977
+ _ === "set" && (t.value.set = C), _ === "get" && (t.value.get = C), _ === "getTo" && (t.value.getTo = C), C || delete t.value[_];
1978
+ }, Ze = () => {
1979
+ a.value = !0;
1980
+ }, Je = (_, C) => {
1981
+ t.value.opts || (t.value.opts = {}), t.value.opts[_] = C, _ === "disabled" && !C && delete t.value.opts[_];
1982
+ };
1983
+ return le(() => {
1984
+ var _;
1985
+ (_ = e.item) != null && _.id && (t.value = mt(e.item));
1986
+ }), (_, C) => {
1987
+ const Xe = Is, Ye = ce;
1988
+ return f(), v("div", kl, [
1989
+ o("div", wl, [
1990
+ o("div", Cl, [
1991
+ h(al, {
1992
+ class: "flex-auto min-h-75",
1993
+ value: 0,
1994
+ items: s
1995
+ }, {
1996
+ "tab-0": y(() => [
1997
+ o("div", Sl, [
1998
+ h(Z, {
1999
+ modelValue: t.value.id,
2000
+ "onUpdate:modelValue": C[0] || (C[0] = (L) => t.value.id = L),
2001
+ label: "ID",
2002
+ message: r.value ? _.$t("used") : ""
2003
+ }, nt({ _: 2 }, [
2004
+ d.value ? void 0 : {
2005
+ name: "icon",
2006
+ fn: y(() => [
2007
+ h(E, {
2008
+ color: "transparent",
2009
+ onClick: Ze
2010
+ }, {
2011
+ default: y(() => [
2012
+ h(Xe)
2013
+ ]),
2014
+ _: 1
2015
+ })
2016
+ ]),
2017
+ key: "0"
2018
+ }
2019
+ ]), 1032, ["modelValue", "message"]),
2020
+ h(Z, {
2021
+ modelValue: t.value.name,
2022
+ "onUpdate:modelValue": C[1] || (C[1] = (L) => t.value.name = L),
2023
+ label: "Name"
2024
+ }, null, 8, ["modelValue"]),
2025
+ o("div", zl, [
2026
+ h(se, {
2027
+ "model-value": t.value.icon,
2028
+ bottom: "0",
2029
+ top: "unset",
2030
+ label: "Icon",
2031
+ class: "mb-6",
2032
+ items: e.listIcons,
2033
+ onChange: p
2034
+ }, {
2035
+ item: y(({ item: L }) => [
2036
+ o("div", Vl, [
2037
+ k(_.$slots, "icon", {
2038
+ icon: L.value
2039
+ }),
2040
+ o("div", null, $(L.name), 1)
2041
+ ])
2042
+ ]),
2043
+ _: 3
2044
+ }, 8, ["model-value", "items"]),
2045
+ h(se, {
2046
+ "model-value": t.value.type,
2047
+ bottom: "0",
2048
+ top: "unset",
2049
+ label: "Type",
2050
+ items: e.listDashboard,
2051
+ onChange: b
2052
+ }, null, 8, ["model-value", "items"])
2053
+ ])
2054
+ ])
2055
+ ]),
2056
+ "tab-1": y(() => [
2057
+ o("div", Tl, [
2058
+ h(Fe, {
2059
+ active: !!t.value.args.length,
2060
+ disabled: i.value,
2061
+ label: "Arguments",
2062
+ onIcon: C[2] || (C[2] = (L) => a.value = !0)
2063
+ }, {
2064
+ default: y(() => [
2065
+ o("div", El, [
2066
+ (f(!0), v(I, null, R(t.value.args, (L, Se) => (f(), v("div", {
2067
+ key: L,
2068
+ class: "flex items-center rounded-full bg-gray-200 dark:bg-gray-900/50 px-2 py-[2px] text-xs"
2069
+ }, [
2070
+ o("div", Bl, [
2071
+ o("span", Ll, $(L), 1),
2072
+ o("div", {
2073
+ class: V(["fixed left-1/2 top-1/2 p-4 text-white bg-gray-900 rounded-md group-hover:visible invisible opacity-0 group-hover:opacity-100 z-50 transition-all -translate-1/2", P(Se) ? "visible opacity-100" : ""])
2074
+ }, [
2075
+ o("pre", null, $(W(vt)(L, e.object)), 1)
2076
+ ], 2)
2077
+ ]),
2078
+ Se || t.value.args.length < 2 ? (f(), v("button", {
2079
+ key: 0,
2080
+ class: "cursor-pointer ms-1",
2081
+ onClick: (Vo) => z(L)
2082
+ }, [
2083
+ h(Ye, { class: "size-5" })
2084
+ ], 8, Ml)) : T("", !0)
2085
+ ]))), 128))
2086
+ ])
2087
+ ]),
2088
+ _: 1
2089
+ }, 8, ["active", "disabled"]),
2090
+ h(ge, {
2091
+ value: t.value.set,
2092
+ args: t.value.args,
2093
+ disabled: !d.value || u.value,
2094
+ label: "Set",
2095
+ onIcon: C[3] || (C[3] = (L) => g("set")),
2096
+ onHover: J,
2097
+ onChange: C[4] || (C[4] = (L) => ve("set", L))
2098
+ }, null, 8, ["value", "args", "disabled"]),
2099
+ h(ge, {
2100
+ value: t.value.get,
2101
+ args: t.value.args,
2102
+ disabled: !d.value,
2103
+ label: "Get",
2104
+ onIcon: C[5] || (C[5] = (L) => g("get")),
2105
+ onHover: J,
2106
+ onChange: C[6] || (C[6] = (L) => ve("get", L))
2107
+ }, null, 8, ["value", "args", "disabled"]),
2108
+ h(ge, {
2109
+ value: t.value.getTo,
2110
+ args: t.value.args,
2111
+ disabled: !d.value,
2112
+ label: "GetTo",
2113
+ onIcon: C[7] || (C[7] = (L) => g("getTo")),
2114
+ onHover: J,
2115
+ onChange: C[8] || (C[8] = (L) => ve("getTo", L))
2116
+ }, null, 8, ["value", "args", "disabled"])
2117
+ ])
2118
+ ]),
2119
+ "tab-2": y(() => [
2120
+ h($l, H(t.value.opts, {
2121
+ value: t.value.value,
2122
+ type: t.value.type,
2123
+ onUpdate: Je
2124
+ }), null, 16, ["value", "type"])
2125
+ ]),
2126
+ _: 3
2127
+ })
2128
+ ]),
2129
+ o("div", Al, [
2130
+ o("div", Dl, [
2131
+ k(_.$slots, "default", { item: t.value })
2132
+ ])
2133
+ ])
2134
+ ]),
2135
+ o("div", Il, [
2136
+ h(E, {
2137
+ class: "px-4",
2138
+ color: "blue",
2139
+ disabled: m.value,
2140
+ onClick: C[9] || (C[9] = (L) => x(c.value ? "add" : "save"))
2141
+ }, {
2142
+ default: y(() => [
2143
+ D($(c.value ? _.$t("add") : _.$t("save")), 1)
2144
+ ]),
2145
+ _: 1
2146
+ }, 8, ["disabled"]),
2147
+ h(E, {
2148
+ class: "px-4",
2149
+ color: "red",
2150
+ outline: "",
2151
+ onClick: C[10] || (C[10] = (L) => x("remove"))
2152
+ }, {
2153
+ default: y(() => [
2154
+ D($(_.$t("remove")), 1)
2155
+ ]),
2156
+ _: 1
2157
+ })
2158
+ ]),
2159
+ a.value ? (f(), j(He, {
2160
+ key: 0,
2161
+ size: "md",
2162
+ title: _.$t("select"),
2163
+ onClose: C[11] || (C[11] = (L) => a.value = !1)
2164
+ }, {
2165
+ default: y(() => [
2166
+ o("div", jl, [
2167
+ h(Ue, {
2168
+ items: e.object,
2169
+ onlyValue: !d.value,
2170
+ onClick: B
2171
+ }, null, 8, ["items", "onlyValue"])
2172
+ ])
2173
+ ]),
2174
+ _: 1
2175
+ }, 8, ["title"])) : T("", !0)
2176
+ ]);
2177
+ };
2178
+ }
2179
+ }), ze = { position: "relative", boxSizing: "border-box", overflow: "hidden", fontSize: "16px", fontFamily: 'Menlo, Consolas, "Liberation Mono", Monaco, "Lucida Console", monospace' }, Hl = { lineHeight: "inherit", whiteSpace: "pre-wrap", wordBreak: "keep-all", overflowWrap: "break-word", background: "none", position: "absolute", width: "100%", height: "100%", zIndex: "1", resize: "none", caretColor: "currentColor", padding: "inherit", outline: "none", fontSize: "inherit", fontFamily: "inherit", letterSpacing: "inherit", boxSizing: "border-box", border: "none", top: "0px", left: "0px", color: "inherit", overflow: "hidden", "-webkit-font-smoothing": "antialiased", "-webkit-text-fill-color": "transparent" }, Pl = { lineHeight: "inherit", position: "relative", whiteSpace: "pre-wrap", wordBreak: "keep-all", padding: "0", width: "100%", margin: "0", pointerEvents: "none", boxSizing: "border-box", overflowWrap: "break-word", fontFamily: "inherit" }, Nl = { lineHeight: "inherit", position: "absolute", width: "100%", height: "100%", whiteSpace: "pre-wrap", wordBreak: "keep-all", padding: "inherit", margin: "0", top: "0px", left: "0px", pointerEvents: "none", boxSizing: "border-box", overflowWrap: "break-word", fontFamily: "inherit" }, Re = (e) => Ke(e);
2180
+ function Ve(e) {
2181
+ const n = Array.isArray(e) ? e : [e];
2182
+ return n.length === 0 ? Re : (l) => n.reduce((s, t, a) => t(s, { html: a > 0 }), l);
2183
+ }
2184
+ class Ol {
2185
+ constructor(n, l = {}) {
2186
+ if (this.lines = null, !n) throw new Error("selector is not defined");
2187
+ if (this.root = n instanceof Node ? n : document.querySelector(n), !this.root) throw new Error(`element with "${n}" selector is not exist`);
2188
+ const s = { value: "", styles: {}, plugins: [], highlighter: Re }, { highlighters: t, ...a } = l;
2189
+ this.options = { ...s, ...a, highlighter: t ? Ve(t) : s.highlighter }, this.options.value = this.options.value == null ? "" : String(this.options.value), this.init();
2190
+ }
2191
+ init() {
2192
+ this.textarea = document.createElement("textarea"), this.textarea.setAttribute("spellcheck", "false"), this.textarea.setAttribute("autocapitalize", "off"), this.textarea.setAttribute("autocorrect", "off"), this.textarea.setAttribute("autocomplete", "off"), this.pre = document.createElement("pre");
2193
+ const n = Object.keys(ze).concat(Object.keys(this.options.styles)).concat(["paddingLeft"]);
2194
+ this.initialRootStyles = {};
2195
+ const l = this.root.style;
2196
+ n.forEach((s) => {
2197
+ this.initialRootStyles[s] = l[s] || "";
2198
+ }), Object.assign(this.root.style, ze, this.options.styles), Object.assign(this.textarea.style, Hl), Object.assign(this.pre.style, Pl), this.basePaddingLeft = this.root.style.paddingLeft || "", this.root.appendChild(this.textarea), this.root.appendChild(this.pre), this.addTextareaEvents(), this.update({ value: this.options.value }), this.updateLines();
2199
+ }
2200
+ addTextareaEvents() {
2201
+ this.handleEvent = (n) => {
2202
+ if (n.type === "keydown" && this.textarea.readOnly) return;
2203
+ const l = n;
2204
+ if (l.isComposing || l.keyCode === 229) return;
2205
+ const s = function(t, a) {
2206
+ const { value: c, selectionStart: r, selectionEnd: u } = a.target;
2207
+ return t.reduce((d, i) => ({ ...d, ...i(d, a) }), { value: c, selectionStart: r, selectionEnd: u });
2208
+ }(this.options.plugins, n);
2209
+ this.update(s);
2210
+ }, this.textarea.addEventListener("input", this.handleEvent), this.textarea.addEventListener("keydown", this.handleEvent), this.textarea.addEventListener("compositionend", this.handleEvent);
2211
+ }
2212
+ update(n) {
2213
+ if (!this.textarea) return;
2214
+ let { value: l, selectionStart: s, selectionEnd: t } = n;
2215
+ l != null && (l = String(l), s == null && (s = this.textarea.selectionStart), t == null && (t = this.textarea.selectionEnd), this.textarea.value !== l && (this.textarea.value = l)), s != null && (this.textarea.selectionStart = s), t != null && (this.textarea.selectionEnd = t), l !== this.value && l != null && (this.value = l, this.render(), this.updateCallback && this.updateCallback(l));
2216
+ }
2217
+ updateOptions(n) {
2218
+ if (!this.textarea) return;
2219
+ const { highlighters: l, ...s } = n;
2220
+ if (this.options = { ...this.options, ...s, highlighter: l ? Ve(l) : this.options.highlighter }, n.styles) {
2221
+ const t = this.root.style;
2222
+ Object.keys(n.styles).forEach((a) => {
2223
+ a in this.initialRootStyles || (this.initialRootStyles[a] = t[a] || "");
2224
+ }), Object.assign(this.root.style, n.styles), ("paddingLeft" in n.styles || "padding" in n.styles) && (this.basePaddingLeft = this.root.style.paddingLeft || "");
2225
+ }
2226
+ this.lines && !this.options.lineNumbers && (de(this.lines), this.lines = null, this.root.style.paddingLeft = this.basePaddingLeft), n.value != null && this.update({ value: n.value }), this.render();
2227
+ }
2228
+ render() {
2229
+ const n = this.options.highlighter(this.value);
2230
+ this.pre.innerHTML = n + "<br/>", this.updateLines();
2231
+ }
2232
+ updateLines() {
2233
+ if (!this.options.lineNumbers) return;
2234
+ this.lines || (this.lines = document.createElement("pre"), this.root.appendChild(this.lines), Object.assign(this.lines.style, Nl));
2235
+ const n = this.value.split(`
2236
+ `), l = n.length.toString().length;
2237
+ this.root.style.paddingLeft = `${l + 1}ch`, this.lines.innerHTML = n.map((s, t) => `${`<span class="yace-line" style="position: absolute; opacity: .3; left: 0; width: ${l}ch; text-align: right">${1 + t}</span>`}${`<span style="color: transparent; pointer-events: none">${Ke(s)}</span>`}`).join(`
2238
+ `);
2239
+ }
2240
+ destroy() {
2241
+ this.textarea && (this.textarea.removeEventListener("input", this.handleEvent), this.textarea.removeEventListener("keydown", this.handleEvent), this.textarea.removeEventListener("compositionend", this.handleEvent), de(this.textarea), de(this.pre), de(this.lines), Object.assign(this.root.style, this.initialRootStyles), Object.assign(this, { textarea: null, pre: null, lines: null, updateCallback: null, handleEvent: null, initialRootStyles: null, options: null, root: null }));
2242
+ }
2243
+ onUpdate(n) {
2244
+ this.updateCallback = n;
2245
+ }
2246
+ }
2247
+ function de(e) {
2248
+ e && e.parentNode && e.parentNode.removeChild(e);
2249
+ }
2250
+ function Ke(e) {
2251
+ return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
2252
+ }
2253
+ const Te = { alt: "altKey", control: "ctrlKey", ctrl: "ctrlKey", meta: "metaKey", shift: "shiftKey", "ctrl/cmd": typeof window < "u" && window.navigator && /Mac|iPod|iPhone|iPad/.test(window.navigator.platform) ? "metaKey" : "ctrlKey" }, Fl = { add: "=" }, Ul = { ";": "semicolon", "=": "equal", ",": "comma", "-": "minus", ".": "period", "/": "slash", "`": "backquote", "[": "bracketleft", "\\": "backslash", "]": "bracketright", "'": "quote" };
2254
+ function ie(e, n) {
2255
+ const l = e.split("+").reduce((u, d) => Te[d] ? (u.modifiers[Te[d]] = !0, u) : { ...u, key: Fl[d] || d.toLowerCase() }, { modifiers: { altKey: !1, ctrlKey: !1, metaKey: !1, shiftKey: !1 }, key: null }), s = Object.keys(l.modifiers).every((u) => l.modifiers[u] ? n[u] : !n[u]);
2256
+ if (!l.key) return s;
2257
+ const t = n.key != null && n.key.toLowerCase() === l.key, a = (c = l.key, /^[a-z]$/.test(c) ? `key${c}` : /^[0-9]$/.test(c) ? `digit${c}` : Ul[c] || null);
2258
+ var c;
2259
+ const r = !n.isComposing && a != null && n.code != null && n.code.toLowerCase() === a;
2260
+ return s && (t || r);
2261
+ }
2262
+ function Rl(e = {}) {
2263
+ const n = Math.max(1, e.limit == null ? 300 : e.limit), l = e.coalesceMs == null ? 300 : e.coalesceMs;
2264
+ let s = [], t = null, a = null;
2265
+ const c = (r) => {
2266
+ s = s.slice(0, t + 1), s.push(r), s.length > n && (s = s.slice(s.length - n)), t = s.length - 1;
2267
+ };
2268
+ return (r, u) => {
2269
+ const d = u.type === "keydown" && ie("ctrl/cmd+z", u), i = u.type === "keydown" && (ie("ctrl/cmd+shift+z", u) || ie("ctrl+y", u));
2270
+ if ((d || i) && u.preventDefault(), t === null) return s = [r], void (t = 0);
2271
+ if (d) return a = null, s[t].value !== r.value ? c(r) : s[t] = r, t = Math.max(0, t - 1), s[t];
2272
+ if (i) return a = null, s[t].value !== r.value ? void c(r) : (t = Math.min(s.length - 1, t + 1), s[t]);
2273
+ if (u.type === "keydown") return s[t].value !== r.value ? (a = null, void c(r)) : void (s[t] = r);
2274
+ if (u.type === "input") {
2275
+ const m = u.timeStamp, p = m != null && a != null && m - a <= l;
2276
+ if (a = m ?? null, p) return void (s[t] = r);
2277
+ c(r);
2278
+ }
2279
+ };
2280
+ }
2281
+ const Kl = () => (e, n) => {
2282
+ const { value: l, selectionStart: s, selectionEnd: t } = e;
2283
+ if (!ie("enter", n) || n.type !== "keydown") return;
2284
+ const a = l.substring(0, s).split(`
2285
+ `).pop(), c = /^\s+/.exec(a);
2286
+ if (!c) return;
2287
+ n.preventDefault();
2288
+ const r = `
2289
+ ` + c[0];
2290
+ return { value: l.substring(0, s) + r + l.substring(t), selectionStart: s + r.length, selectionEnd: s + r.length };
2291
+ }, Wl = () => (e, n) => {
2292
+ if (typeof KeyboardEvent > "u" || !(n instanceof KeyboardEvent) || n.key !== "Enter")
2293
+ return;
2294
+ const { value: l, selectionStart: s, selectionEnd: t } = e;
2295
+ if (s !== t)
2296
+ return;
2297
+ const a = l.lastIndexOf(`
2298
+ `, s - 1) + 1, c = l.indexOf(`
2299
+ `, s), r = c === -1 ? l.length : c;
2300
+ if (l.slice(s, r).trim().length > 0)
2301
+ return;
2302
+ const i = l.substring(a, r).trimEnd();
2303
+ if (i.endsWith(";") || i.length === 0)
2304
+ return;
2305
+ const m = l.slice(0, r) + ";" + l.slice(r), p = s + 1;
2306
+ return {
2307
+ value: m,
2308
+ selectionStart: p,
2309
+ selectionEnd: p
2310
+ };
2311
+ };
2312
+ let we = [], K = null, O = 0, X = [], Q = null, ee = null, Ce, We, G = null, ne = null;
2313
+ const ql = (e) => {
2314
+ const { customSuggestions: n = [], minPrefixLength: l = 1, maxSuggestions: s = 20, tabSize: t = 2, tooltip: a = { enabled: !0 }, i18n: c, renderMenu: r, renderTooltip: u } = e;
2315
+ if (!r || !u)
2316
+ throw new Error("renderMenu and renderTooltip are required");
2317
+ return we = [...n].map((d) => c(d)), Ce = r, We = u, (d, i) => {
2318
+ if (typeof KeyboardEvent > "u" || !(i instanceof KeyboardEvent))
2319
+ return;
2320
+ const { value: m, selectionStart: p } = d, b = i.target;
2321
+ if (ee = b, a.enabled !== !1 && !b.dataset.tooltipInitialized && (b.dataset.tooltipInitialized = "true", b.addEventListener("mouseup", () => {
2322
+ setTimeout(() => Ee(b), 100);
2323
+ }), b.addEventListener("keyup", () => {
2324
+ setTimeout(() => Ee(b), 100);
2325
+ })), K) {
2326
+ switch (i.key) {
2327
+ case "ArrowDown":
2328
+ return i.preventDefault(), O < X.length - 1 && (O++, te()), { ...d };
2329
+ case "ArrowUp":
2330
+ return i.preventDefault(), O > 0 && (O--, te()), { ...d };
2331
+ case "Enter":
2332
+ if (i.preventDefault(), X[O]) {
2333
+ const g = be(d, X[O]);
2334
+ return Y(), g;
2335
+ }
2336
+ return;
2337
+ case "Tab":
2338
+ if (i.preventDefault(), X[O]) {
2339
+ const g = be(d, X[O]);
2340
+ return Y(), g;
2341
+ }
2342
+ return;
2343
+ case "Escape":
2344
+ return i.preventDefault(), Y(), { ...d };
2345
+ case "Backspace":
2346
+ setTimeout(() => {
2347
+ if (ee) {
2348
+ const g = ee.value, x = ee.selectionStart, z = me(g, x), B = g.slice(z, x);
2349
+ if (B.length < l)
2350
+ Y();
2351
+ else {
2352
+ const w = he(B).slice(0, s);
2353
+ w.length === 0 ? Y() : (X = w, O = 0, te());
2354
+ }
2355
+ }
2356
+ }, 0);
2357
+ return;
2358
+ }
2359
+ if (["ArrowDown", "ArrowUp", "Enter", "Tab", "Escape", "Backspace"].includes(i.key))
2360
+ return { ...d };
2361
+ }
2362
+ if (ie("tab", i)) {
2363
+ i.preventDefault();
2364
+ const g = me(m, p), x = m.slice(g, p);
2365
+ if (x.length > 0) {
2366
+ const P = he(x);
2367
+ if (P.length > 0)
2368
+ return be(d, P[0]);
2369
+ }
2370
+ const z = " ".repeat(t), B = m.slice(0, p) + z + m.slice(p), w = p + t;
2371
+ return {
2372
+ value: B,
2373
+ selectionStart: w,
2374
+ selectionEnd: w
2375
+ };
2376
+ }
2377
+ if (!(i.key.length !== 1 || i.ctrlKey || i.metaKey || i.altKey))
2378
+ return Q && clearTimeout(Q), Q = setTimeout(() => {
2379
+ Q = null;
2380
+ const g = b.value, x = b.selectionStart, z = me(g, x), B = g.slice(z, x);
2381
+ if (B.length < l) {
2382
+ Y();
2383
+ return;
2384
+ }
2385
+ let w = he(B);
2386
+ if (w = w.slice(0, s), w.length === 0) {
2387
+ Y();
2388
+ return;
2389
+ }
2390
+ X = w, O = 0, K ? te() : Gl(b, w);
2391
+ }, 0), { ...d };
2392
+ };
2393
+ };
2394
+ function he(e) {
2395
+ const n = e.toLowerCase();
2396
+ return we.filter((l) => {
2397
+ const s = l.label.toLowerCase();
2398
+ return s.startsWith(n) || s.includes(n) || s.split("_").map((t) => t[0]).join("").startsWith(n);
2399
+ }).sort((l, s) => {
2400
+ const t = l.label.toLowerCase(), a = s.label.toLowerCase(), c = t.startsWith(n), r = a.startsWith(n);
2401
+ if (c && !r) return -1;
2402
+ if (!c && r) return 1;
2403
+ const u = t.indexOf(n), d = a.indexOf(n);
2404
+ return u !== d ? u - d : t.length !== a.length ? t.length - a.length : t.localeCompare(a);
2405
+ });
2406
+ }
2407
+ function me(e, n) {
2408
+ let l = n;
2409
+ for (; l > 0 && /[a-zA-Z0-9_$]/.test(e[l - 1]); )
2410
+ l--;
2411
+ return l;
2412
+ }
2413
+ function Gl(e, n) {
2414
+ Y(), X = n, O = 0;
2415
+ const l = qe(e);
2416
+ K = Ce(n, O, (s) => {
2417
+ O = s, te();
2418
+ }), Object.assign(K.style, {
2419
+ position: "fixed",
2420
+ left: `${l.left}px`,
2421
+ top: `${l.top + 24}px`,
2422
+ zIndex: "10000"
2423
+ }), document.body.appendChild(K);
2424
+ }
2425
+ function te() {
2426
+ if (!K || !ee) return;
2427
+ const e = Ce(X, O, (l) => {
2428
+ O = l, te();
2429
+ }), n = K.getBoundingClientRect();
2430
+ K.replaceWith(e), K = e, Object.assign(K.style, {
2431
+ position: "fixed",
2432
+ left: `${n.left}px`,
2433
+ top: `${n.top}px`,
2434
+ zIndex: "10000"
2435
+ });
2436
+ }
2437
+ function be(e, n) {
2438
+ const { value: l, selectionStart: s } = e, t = me(l, s), a = n.insert || n.label, c = /\$\{([^}]*)\}/g;
2439
+ let r = a;
2440
+ const u = [];
2441
+ let d;
2442
+ for (; (d = c.exec(a)) !== null; ) {
2443
+ const g = d[1], x = d.index, z = d[0].length;
2444
+ u.push({ index: x, text: g, length: z });
2445
+ }
2446
+ r = a.replace(/\$\{([^}]*)\}/g, "$1");
2447
+ const i = u[0];
2448
+ let m = t + r.length, p = t + r.length;
2449
+ if (i) {
2450
+ let g = 0, x = 0, z = !1;
2451
+ for (; x < a.length && !z; ) {
2452
+ const B = u.find((w) => w.index === x);
2453
+ B ? (g += B.text.length, x += B.length, B === i && (m = t + g - B.text.length, p = t + g, z = !0)) : (g++, x++);
2454
+ }
2455
+ }
2456
+ return {
2457
+ value: l.slice(0, t) + r + l.slice(s),
2458
+ selectionStart: m,
2459
+ selectionEnd: p
2460
+ };
2461
+ }
2462
+ function Y() {
2463
+ Q && (clearTimeout(Q), Q = null), K && (K.remove(), K = null, X = [], O = 0, ee = null);
2464
+ }
2465
+ function qe(e) {
2466
+ const n = e.getBoundingClientRect(), { value: l, selectionStart: s } = e, a = l.substring(0, s).split(`
2467
+ `), c = a.length, r = a[a.length - 1] || "", u = parseInt(getComputedStyle(e).lineHeight) || 20;
2468
+ return {
2469
+ left: n.left + 10 + r.length * 8,
2470
+ top: n.top + (c - 1) * u
2471
+ };
2472
+ }
2473
+ function Ee(e) {
2474
+ ne && clearTimeout(ne), ne = setTimeout(() => {
2475
+ const n = e.selectionStart, l = e.selectionEnd;
2476
+ if (n === l) {
2477
+ ae();
2478
+ return;
2479
+ }
2480
+ const s = e.value.substring(n, l).trim();
2481
+ if (!s) {
2482
+ ae();
2483
+ return;
2484
+ }
2485
+ const t = we.find((r) => r.label === s);
2486
+ if (!t) {
2487
+ ae();
2488
+ return;
2489
+ }
2490
+ const a = qe(e), c = We(t, a);
2491
+ c.style.opacity = "0", G && G.remove(), G = c, document.body.appendChild(G), requestAnimationFrame(() => {
2492
+ G && (G.style.opacity = "1");
2493
+ }), setTimeout(() => ae(), 3e3);
2494
+ }, 300);
2495
+ }
2496
+ function ae() {
2497
+ ne && (clearTimeout(ne), ne = null), G && (G.style.opacity = "0", setTimeout(() => {
2498
+ G && (G.remove(), G = null);
2499
+ }, 150));
2500
+ }
2501
+ typeof document < "u" && document.addEventListener("mousedown", (e) => {
2502
+ const n = e.target;
2503
+ K && !K.contains(n) && Y(), G && !G.contains(n) && ae();
2504
+ });
2505
+ const ye = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Zl = ["else", "end", "call", "fade"], Jl = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Xl = (e) => {
2506
+ const n = e.filter((r) => r.type !== "var").map((r) => r.label), c = `(\\/\\/[^\\n]*)|('[^'\\n]*')|(\\b\\d+(?:\\.\\d+)?\\b)|(\\b(?:${Array.from(/* @__PURE__ */ new Set([...Zl, ...n])).map(Jl).join("|")})\\b)|(\\$[a-zA-Z_][a-zA-Z0-9_]*)|(\\b(?:btn_\\d+(?:_\\d+)?)\\b)|([;:(){}])`;
2507
+ return new RegExp(c, "g");
2508
+ }, Yl = (e) => (n) => {
2509
+ const l = Xl(e);
2510
+ let s = "", t = 0;
2511
+ for (const a of n.matchAll(l)) {
2512
+ const [c, r, u, d, i, m, p, b] = a;
2513
+ let g = "";
2514
+ r ? g = "comment" : u ? g = "str" : d ? g = "num" : i ? g = "word" : m ? g = "var" : p ? g = "event" : b && (g = "operator"), s += ye(n.slice(t, a.index)), s += `<span class="tok--${g}">${ye(c)}</span>`, t = a.index + c.length;
2515
+ }
2516
+ return s += ye(n.slice(t)), s;
2517
+ }, Ge = {
2518
+ word: "text-blue-600 dark:text-blue-400",
2519
+ func: "text-yellow-600 dark:text-yellow-400",
2520
+ var: "text-cyan-600 dark:text-cyan-400",
2521
+ event: "text-purple-600 dark:text-purple-400"
2522
+ }, Ql = (e, n, l) => {
2523
+ const s = document.createElement("div");
2524
+ return s.className = `
2525
+ fixed z-[10000] min-w-[250px] max-w-[400px] max-h-[250px]
2526
+ overflow-y-auto p-1 rounded-lg shadow-lg border
2527
+ border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800
2528
+ text-sm font-mono scrollbar pointer-events-none
2529
+ `, e.forEach((t, a) => {
2530
+ const c = a === n, r = document.createElement("div");
2531
+ r.className = `
2532
+ flex items-center justify-between gap-2 px-3 py-1.5 cursor-pointer
2533
+ rounded transition-colors duration-100 border-l-2
2534
+ ${c ? "border-blue-500 dark:border-blue-400 bg-blue-50 dark:bg-blue-900/30" : "border-transparent hover:bg-gray-100 dark:hover:bg-gray-700"}
2535
+ `;
2536
+ const u = Ge[t.type] || "text-gray-700 dark:text-gray-300";
2537
+ r.innerHTML = `
2538
+ <div class="flex items-center gap-2 flex-1">
2539
+ <span class="${u} font-medium">${t.label}</span>
2540
+ ${t.detail ? `<span class="text-xs text-gray-500 dark:text-gray-400 ml-2">${t.detail}</span>` : ""}
2541
+ </div>
2542
+ ${t.description ? `<span class="text-xs text-gray-400 dark:text-gray-500">${t.description}</span>` : ""}
2543
+ `, r.addEventListener("click", () => l(a)), s.appendChild(r);
2544
+ }), s;
2545
+ }, eo = (e, n) => {
2546
+ const l = document.createElement("div");
2547
+ l.className = `
2548
+ fixed z-[10001] px-3 py-2 font-mono text-sm max-w-[300px]
2549
+ min-w-[50px] min-h-[20px] rounded-lg shadow-lg border
2550
+ pointer-events-none transition-opacity duration-150
2551
+ bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700
2552
+ text-gray-700 dark:text-gray-300 pointer-events-none
2553
+ `, l.style.cssText = `
2554
+ left: ${n.left + 40}px; top: ${n.top - 10}px;
2555
+ transform: translateX(-50%) translateY(-100%); opacity: 0;
2556
+ `;
2557
+ let t = `<div class="font-medium ${Ge[e.type] || "text-gray-700 dark:text-gray-300"}">${e.label}</div>`;
2558
+ e.detail && (t += `<div class="text-gray-500 dark:text-gray-400 mt-0.5 text-xs">${e.detail}</div>`), e.description && (t += `<div class="text-gray-400 dark:text-gray-500 text-xs mt-1 pt-1 border-t border-gray-200 dark:border-gray-700">${e.description}</div>`), l.innerHTML = t;
2559
+ const a = document.createElement("div");
2560
+ return a.className = `
2561
+ absolute bottom-[-6px] left-1/2 w-2.5 h-2.5 -translate-x-1/2 rotate-45
2562
+ bg-white dark:bg-gray-800 border-r border-b border-gray-200 dark:border-gray-700
2563
+ `, l.appendChild(a), l;
2564
+ }, to = [
2565
+ { label: "if", type: "word", insert: `if:\${$v0<10};
2566
+
2567
+ else;
2568
+
2569
+ end;`, detail: "if:${$v0<10};else;end;" },
2570
+ { label: "while", type: "word", insert: `$v0=0;
2571
+ while:\${$v0<10};
2572
+ log($v0);
2573
+ $v0=$v0+1;
2574
+ wait(1s);
2575
+ end;`, detail: "while:${$v0<2}; end;" },
2576
+ { label: "udp", type: "func", insert: "udp(${},'call(1)')", detail: "udp(id:number, text:string)" },
2577
+ { label: "on", type: "func", insert: `on('\${event}');
2578
+
2579
+ end;`, detail: "event(name: string)" },
2580
+ { label: "wait", type: "func", insert: "wait(${1s});", detail: "wait(10ms | 1s | 1m | 1h)" },
2581
+ { label: "log", type: "func", insert: "log(${});", detail: "log(text: string | number)" },
2582
+ { label: "len", type: "func", insert: "len(${$a0});", detail: "len(arr: array)" },
2583
+ { label: "set", type: "func", insert: "set(${$a0},${2},${10});", detail: "set(arr: array, index: number, value: number)" },
2584
+ { label: "get", type: "func", insert: "get(${$a0},${0});", detail: "get(arr: array, index: number)" },
2585
+ { label: "ord", type: "func", insert: "ord(${$s0});", detail: "ord(char: string)" },
2586
+ { label: "chr", type: "func", insert: "chr(${65});", detail: "chr(v: number)" },
2587
+ { label: "btn", type: "event", detail: "Change state " },
2588
+ { label: "btn_c", type: "event", detail: "Count click button <br>$e0=gpio:number<br>$e1=value:number<br>$e2=type?:number" },
2589
+ { label: "btn_l", type: "event", detail: "Long press of the button <br>$e0=gpio:number<br>$e1=value:number" },
2590
+ { label: "btn_r", type: "event", detail: "Repeat while holding the button <br>$e0=gpio:number<br>$e1=value:number" },
2591
+ { label: "$u", type: "var", insert: "$u${0}", detail: "var (uint) " },
2592
+ { label: "$i", type: "var", insert: "$i${0}", detail: "var (int)" },
2593
+ { label: "$f", type: "var", insert: "$f${0}", detail: "var (float)" },
2594
+ { label: "$s", type: "var", insert: "$s${0}", detail: "var (string)" },
2595
+ { label: "$a", type: "var", insert: "$a${0}", detail: "var (array)" },
2596
+ { label: "$e", type: "var", insert: "$e${0}", detail: "var event" },
2597
+ { label: "$c", type: "var", insert: "$c${0}", detail: "var call" },
2598
+ { label: "$p", type: "var", insert: "$p${0}", detail: "gpio" }
2599
+ ], ta = /* @__PURE__ */ S({
2600
+ __name: "ScriptEditor",
2601
+ props: {
2602
+ modelValue: {},
2603
+ suggestions: { default: () => [] }
2604
+ },
2605
+ emits: ["update:modelValue", "update"],
2606
+ setup(e, { emit: n }) {
2607
+ const l = n;
2608
+ let s;
2609
+ const t = [...to, ...e.suggestions];
2610
+ return re(
2611
+ () => e.modelValue,
2612
+ (a) => {
2613
+ s.update({ value: a });
2614
+ }
2615
+ ), le(() => {
2616
+ s = new Ol("#editor", {
2617
+ value: e.modelValue,
2618
+ lineNumbers: !0,
2619
+ highlighters: [Yl(t)],
2620
+ plugins: [
2621
+ Rl(),
2622
+ Kl(),
2623
+ ql({
2624
+ customSuggestions: t,
2625
+ minPrefixLength: 1,
2626
+ maxSuggestions: 20,
2627
+ i18n: (a) => a,
2628
+ tooltip: {
2629
+ enabled: !0
2630
+ },
2631
+ renderMenu: Ql,
2632
+ renderTooltip: eo
2633
+ }),
2634
+ Wl()
2635
+ ],
2636
+ styles: { fontSize: "14px" }
2637
+ }), s.onUpdate((a) => {
2638
+ l("update:modelValue", a);
2639
+ });
2640
+ }), Me(() => {
2641
+ s.destroy();
2642
+ }), (a, c) => (f(), v("div", null, [...c[0] || (c[0] = [
2643
+ o("div", {
2644
+ class: "",
2645
+ id: "editor"
2646
+ }, null, -1)
2647
+ ])]));
2648
+ }
2649
+ }), no = { class: "max-w-4xl mx-auto" }, so = {
2650
+ key: 0,
2651
+ class: "text-sm"
2652
+ }, lo = {
2653
+ key: 0,
2654
+ class: "text-gray-500"
2655
+ }, oo = {
2656
+ key: 1,
2657
+ class: "text-red-600"
2658
+ }, ao = ["innerHTML"], io = "https://raw.githubusercontent.com/bondrogeen/vuesp/refs/heads/master/github/docs/scriptrunner/", ro = "https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js", na = /* @__PURE__ */ S({
2659
+ __name: "ScriptViewDocs",
2660
+ props: {
2661
+ lang: { default: "en" }
2662
+ },
2663
+ setup(e) {
2664
+ const n = A(""), l = A(""), s = A(null), t = A(!1), a = A(null);
2665
+ let c = null;
2666
+ const r = () => new Promise((i, m) => {
2667
+ if (typeof window > "u" || typeof document > "u") {
2668
+ m(new Error("Markdown loading is available only in a browser"));
2669
+ return;
2670
+ }
2671
+ if (window.marked) {
2672
+ window.marked.setOptions({
2673
+ gfm: !0,
2674
+ breaks: !0,
2675
+ headerIds: !1
2676
+ }), i(window.marked);
2677
+ return;
2678
+ }
2679
+ const p = document.createElement("script");
2680
+ p.src = ro, p.async = !0, p.onload = () => {
2681
+ window.marked ? (window.marked.setOptions({
2682
+ gfm: !0,
2683
+ breaks: !0,
2684
+ headerIds: !1
2685
+ }), i(window.marked)) : m(new Error("Marked library not found after loading"));
2686
+ }, p.onerror = () => {
2687
+ m(new Error("Failed to load Marked library from CDN"));
2688
+ }, document.head.appendChild(p);
2689
+ }), u = (i) => {
2690
+ const m = i.split(`
2691
+ `), p = {};
2692
+ let b = !0;
2693
+ for (const g of m) {
2694
+ if (b && g.startsWith("#")) {
2695
+ b = !1;
2696
+ continue;
2697
+ }
2698
+ if (b && g.includes(":")) {
2699
+ const [x, z] = g.split(":").map((B) => B.trim());
2700
+ x && z && (x.toLowerCase().includes("version") && (p.version = z), (x.toLowerCase().includes("обновлено") || x.toLowerCase().includes("updated")) && (p.updated = z));
2701
+ }
2702
+ }
2703
+ return p;
2704
+ }, d = async (i) => {
2705
+ if (!c) {
2706
+ a.value = "error";
2707
+ return;
2708
+ }
2709
+ t.value = !0, a.value = null, l.value = "";
2710
+ try {
2711
+ const m = `${io}${i}.md`, p = await fetch(m);
2712
+ if (!p.ok)
2713
+ throw new Error(`HTTP ${p.status}: ${p.statusText}`);
2714
+ const b = await p.text();
2715
+ n.value = b, s.value = u(b), l.value = c.parse(b);
2716
+ } catch (m) {
2717
+ const p = m instanceof Error ? m.message : "";
2718
+ a.value = p, console.error("Error loading docs:", m);
2719
+ } finally {
2720
+ t.value = !1;
2721
+ }
2722
+ };
2723
+ return le(async () => {
2724
+ try {
2725
+ c = await r();
2726
+ const i = e.lang ? "ru" : "en";
2727
+ await d(i);
2728
+ } catch (i) {
2729
+ const m = i instanceof Error ? i.message : "";
2730
+ a.value = m, console.error("Initialization error:", i);
2731
+ }
2732
+ }), (i, m) => (f(), v("div", no, [
2733
+ t.value || a.value ? (f(), v("div", so, [
2734
+ t.value ? (f(), v("span", lo, "⏳")) : T("", !0),
2735
+ a.value ? (f(), v("span", oo, "❌ " + $(a.value), 1)) : T("", !0)
2736
+ ])) : T("", !0),
2737
+ o("div", {
2738
+ class: "docs-content",
2739
+ innerHTML: l.value
2740
+ }, null, 8, ao)
2741
+ ]));
2742
+ }
2743
+ }), co = { class: "my-4" }, sa = /* @__PURE__ */ S({
2744
+ __name: "ScriptDialog",
2745
+ props: {
2746
+ idScript: {}
2747
+ },
2748
+ emits: ["add", "close"],
2749
+ setup(e, { emit: n }) {
2750
+ const l = n, { defineField: s, handleSubmit: t, isValid: a } = gt({
2751
+ validationSchema: () => ({
2752
+ name: [ht, bt(8)]
2753
+ })
2754
+ }), [c, r] = s("name"), u = () => {
2755
+ l("add", c.value);
2756
+ }, d = t(() => {
2757
+ u(), c.value = "", l("close", new Event("close"));
2758
+ });
2759
+ return le(() => {
2760
+ e.idScript || (c.value = "boot");
2761
+ }), (i, m) => {
2762
+ const p = Z, b = E;
2763
+ return f(), v("div", co, [
2764
+ h(p, H({
2765
+ modelValue: W(c),
2766
+ "onUpdate:modelValue": m[0] || (m[0] = (g) => st(c) ? c.value = g : null)
2767
+ }, W(r), {
2768
+ disabled: !e.idScript,
2769
+ label: i.$t("name")
2770
+ }), null, 16, ["modelValue", "disabled", "label"]),
2771
+ h(b, {
2772
+ class: "w-full",
2773
+ color: "blue",
2774
+ disabled: !W(a),
2775
+ onClick: W(d)
2776
+ }, {
2777
+ default: y(() => [
2778
+ D($(i.$t("add")), 1)
2779
+ ]),
2780
+ _: 1
2781
+ }, 8, ["disabled", "onClick"])
2782
+ ]);
2783
+ };
2784
+ }
2785
+ }), la = /* @__PURE__ */ S({
2786
+ __name: "VAutocomplete",
2787
+ props: {
2788
+ modelValue: { default: "" },
2789
+ label: {},
2790
+ name: { default: "" },
2791
+ message: { default: "" },
2792
+ items: {}
2793
+ },
2794
+ emits: ["update:modelValue", "select"],
2795
+ setup(e, { emit: n }) {
2796
+ const l = n, s = (a) => l("update:modelValue", a), t = (a, c) => {
2797
+ a.click(new Event("click")), l("select", c);
2798
+ };
2799
+ return (a, c) => (f(), j(je, H(a.$attrs, {
2800
+ top: "50px",
2801
+ "hide-on-click": ""
2802
+ }), {
2803
+ activator: y(({ on: r }) => [
2804
+ h(Z, {
2805
+ "model-value": e.modelValue,
2806
+ name: e.name,
2807
+ message: e.message,
2808
+ label: e.label,
2809
+ "onUpdate:modelValue": s,
2810
+ onClick: r.open
2811
+ }, null, 8, ["model-value", "name", "message", "label", "onClick"])
2812
+ ]),
2813
+ default: y(({ on: r }) => [
2814
+ h($e, {
2815
+ items: e.items,
2816
+ onClick: (u) => t(r, u)
2817
+ }, {
2818
+ default: y(({ item: u }) => [
2819
+ k(a.$slots, "default", { item: u }, () => [
2820
+ D($(u.name), 1)
2821
+ ])
2822
+ ]),
2823
+ _: 3
2824
+ }, 8, ["items", "onClick"])
2825
+ ]),
2826
+ _: 3
2827
+ }, 16));
2828
+ }
2829
+ }), uo = {
2830
+ viewBox: "0 0 24 24",
2831
+ width: "1.2em",
2832
+ height: "1.2em"
2833
+ };
2834
+ function mo(e, n) {
2835
+ return f(), v("svg", uo, [...n[0] || (n[0] = [
2836
+ o("path", {
2837
+ fill: "currentColor",
2838
+ d: "m12 15l-4.243-4.242l1.415-1.414L12 12.172l2.828-2.828l1.415 1.414z"
2839
+ }, null, -1)
2840
+ ])]);
2841
+ }
2842
+ const fo = N({ name: "ri-arrow-drop-down-line", render: mo }), po = { class: "v-expansion__content max-h-0 overflow-hidden transition-all duration-300" }, vo = { class: "p-4" }, oa = /* @__PURE__ */ S({
2843
+ __name: "VExpansion",
2844
+ props: {
2845
+ label: { default: "" },
2846
+ value: { type: Boolean, default: !1 }
2847
+ },
2848
+ setup(e) {
2849
+ const n = A(null), l = A(e.value), s = () => {
2850
+ if (!n.value) return;
2851
+ const a = n.value.querySelector(".v-expansion__content");
2852
+ a && (a.style.maxHeight = l.value ? `${a.scrollHeight}px` : "0");
2853
+ }, t = () => {
2854
+ l.value = !l.value, s();
2855
+ };
2856
+ return le(() => {
2857
+ s();
2858
+ }), (a, c) => {
2859
+ const r = fo;
2860
+ return f(), v("div", {
2861
+ ref_key: "root",
2862
+ ref: n,
2863
+ class: "border-b dark:border-gray-700 border-gray-200"
2864
+ }, [
2865
+ o("div", {
2866
+ class: "cursor-pointer min-h-[60px] px-4 flex items-center justify-between",
2867
+ onClick: t
2868
+ }, [
2869
+ o("h4", null, $(e.label), 1),
2870
+ o("div", {
2871
+ class: V(["transition text-gray-400", { "rotate-x-180": l.value }])
2872
+ }, [
2873
+ h(r, { class: "size-6" })
2874
+ ], 2)
2875
+ ]),
2876
+ o("div", po, [
2877
+ o("div", vo, [
2878
+ k(a.$slots, "default")
2879
+ ])
2880
+ ])
2881
+ ], 512);
2882
+ };
2883
+ }
2884
+ }), go = ["onDragstart", "onDragenter"], ho = {
2885
+ key: 0,
2886
+ class: "absolute inset-0 border border-dashed border-blue-600 rounded"
2887
+ }, aa = /* @__PURE__ */ S({
2888
+ __name: "VDragDrop",
2889
+ props: {
2890
+ items: {},
2891
+ itemKey: { default: "id" }
2892
+ },
2893
+ emits: ["update:items", "order-change"],
2894
+ setup(e, { emit: n }) {
2895
+ const l = n, s = A(null), t = A(0), a = A(-1), c = ({ id: m }) => ({
2896
+ "opacity-30 scale-105 z-10": s.value === m,
2897
+ "transition-transform duration-200": s.value !== m
2898
+ }), r = (m, p, b) => {
2899
+ s.value = p, t.value = b, m.dataTransfer.effectAllowed = "move";
2900
+ }, u = (m) => {
2901
+ s.value !== null && (a.value = m);
2902
+ }, d = () => {
2903
+ s.value = null, a.value = -1;
2904
+ }, i = (m) => {
2905
+ if (m.preventDefault(), s.value && a.value !== -1) {
2906
+ const p = e.items.findIndex((g) => g[e.itemKey] === s.value), b = a.value;
2907
+ if (p !== b && b !== -1) {
2908
+ const g = [...e.items], [x] = g.splice(p, 1);
2909
+ g.splice(b, 0, x), l("update:items", g), l("order-change", { fromIndex: p, toIndex: b, movedItem: x, newOrder: g });
2910
+ }
2911
+ }
2912
+ a.value = -1;
2913
+ };
2914
+ return (m, p) => (f(), v("div", {
2915
+ onDragover: p[1] || (p[1] = q(() => {
2916
+ }, ["prevent"])),
2917
+ onDrop: i
2918
+ }, [
2919
+ h(Le, {
2920
+ "enter-active-class": "transition-all duration-300 ease",
2921
+ "enter-from-class": "opacity-0 translate-x-8",
2922
+ "enter-to-class": "opacity-100 translate-x-0",
2923
+ "leave-active-class": "transition-all duration-300 ease absolute",
2924
+ "leave-from-class": "opacity-100 translate-x-0",
2925
+ "leave-to-class": "opacity-0 translate-x-8",
2926
+ "move-class": "transition-all duration-300 ease"
2927
+ }, {
2928
+ default: y(() => [
2929
+ (f(!0), v(I, null, R(e.items, (b, g) => (f(), v("div", {
2930
+ key: `${b.id}_drug`,
2931
+ class: V(["relative group", c(b)]),
2932
+ draggable: "true",
2933
+ onDragstart: (x) => r(x, b.id, g),
2934
+ onDragenter: (x) => u(g),
2935
+ onDragend: d,
2936
+ onDragover: p[0] || (p[0] = q(() => {
2937
+ }, ["prevent"]))
2938
+ }, [
2939
+ k(m.$slots, "default", {
2940
+ item: b,
2941
+ key: b.id,
2942
+ index: g,
2943
+ isDragging: s.value === b.id
2944
+ }),
2945
+ a.value === g && s.value !== b.id ? (f(), v("div", ho)) : T("", !0)
2946
+ ], 42, go))), 128))
2947
+ ]),
2948
+ _: 3
2949
+ })
2950
+ ], 32));
2951
+ }
2952
+ }), bo = { class: "min-w-full" }, yo = { class: "border-y border-gray-200 py-3 dark:border-gray-800" }, xo = { class: "bg-gray-200 dark:bg-gray-800" }, _o = { class: "flex items-center" }, $o = { class: "divide-y divide-gray-100 dark:divide-gray-800" }, ko = ["onClick"], wo = { class: "flex items-center text-gray-700 dark:text-gray-400" }, Co = { key: 1 }, So = {
2953
+ class: "py-3 whitespace-nowrap",
2954
+ colspan: "9"
2955
+ }, zo = { class: "flex items-center justify-center text-theme-sm text-gray-700 dark:text-gray-400 px-2" }, ia = /* @__PURE__ */ S({
2956
+ __name: "VTable",
2957
+ props: {
2958
+ headers: { default: () => [] },
2959
+ items: { default: () => [] }
2960
+ },
2961
+ emits: ["click"],
2962
+ setup(e, { emit: n }) {
2963
+ const l = n, s = (c, r) => l("click", c, r), t = (c) => (c == null ? void 0 : c.className) || "", a = (c, { key: r }) => c == null ? void 0 : c[r];
2964
+ return (c, r) => (f(), v("table", bo, [
2965
+ o("thead", yo, [
2966
+ o("tr", xo, [
2967
+ (f(!0), v(I, null, R(e.headers, (u, d) => (f(), v("th", {
2968
+ key: d,
2969
+ class: V(["py-2 whitespace-nowrap text-gray-500 dark:text-gray-400 font-normal px-4", t(u)])
2970
+ }, [
2971
+ k(c.$slots, "header", {
2972
+ item: u,
2973
+ i: d
2974
+ }, () => [
2975
+ o("div", _o, $(u.name), 1)
2976
+ ])
2977
+ ], 2))), 128))
2978
+ ])
2979
+ ]),
2980
+ o("tbody", $o, [
2981
+ e.items.length ? (f(!0), v(I, { key: 0 }, R(e.items, (u, d) => (f(), v("tr", {
2982
+ key: d,
2983
+ class: "hover:bg-gray-50/50 dark:hover:bg-gray-800/50",
2984
+ onClick: (i) => s(u, i)
2985
+ }, [
2986
+ (f(!0), v(I, null, R(e.headers, (i, m) => (f(), v("td", {
2987
+ key: m,
2988
+ class: "py-2 px-4"
2989
+ }, [
2990
+ o("div", wo, [
2991
+ k(c.$slots, i.key, {
2992
+ item: u,
2993
+ i: d
2994
+ }, () => [
2995
+ D($(a(u, i)), 1)
2996
+ ])
2997
+ ])
2998
+ ]))), 128))
2999
+ ], 8, ko))), 128)) : (f(), v("tr", Co, [
3000
+ o("td", So, [
3001
+ o("div", zo, [
3002
+ k(c.$slots, "empty", {}, () => [
3003
+ r[0] || (r[0] = D("The list is empty", -1))
3004
+ ])
3005
+ ])
3006
+ ])
3007
+ ]))
3008
+ ])
3009
+ ]));
3010
+ }
3011
+ }), ra = /* @__PURE__ */ S({
3012
+ __name: "VTooltip",
3013
+ props: {
3014
+ timeout: {},
3015
+ disabled: { type: Boolean }
3016
+ },
3017
+ setup(e) {
3018
+ const n = A(!1), l = () => {
3019
+ e.disabled || (n.value = !0);
3020
+ }, s = () => {
3021
+ n.value = !1;
3022
+ }, t = Ae("tooltip");
3023
+ return pt(t, () => s()), (a, c) => (f(), v("div", {
3024
+ ref: "tooltip",
3025
+ class: "relative v-tooltip",
3026
+ onMouseenter: l,
3027
+ onMouseleave: s
3028
+ }, [
3029
+ o("button", {
3030
+ type: "button",
3031
+ onClick: l
3032
+ }, [
3033
+ k(a.$slots, "activator")
3034
+ ]),
3035
+ h(_e, {
3036
+ "enter-active-class": "duration-300 ease-out",
3037
+ "enter-from-class": "transform opacity-0 -translate-y-2",
3038
+ "enter-to-class": "opacity-100 translate-y-0",
3039
+ "leave-active-class": "duration-200 ease-in",
3040
+ "leave-from-class": "opacity-100 translate-y-0",
3041
+ "leave-to-class": "transform opacity-0 -translate-y-2"
3042
+ }, {
3043
+ default: y(() => [
3044
+ k(a.$slots, "default", { show: n.value })
3045
+ ]),
3046
+ _: 3
3047
+ })
3048
+ ], 544));
3049
+ }
3050
+ });
3051
+ export {
3052
+ Io as AppAside,
3053
+ jo as AppHeader,
3054
+ No as AppNav,
3055
+ Ho as AppNotification,
3056
+ Po as AppOverlay,
3057
+ Oo as AppProgress,
3058
+ qo as BlockBreadcrumb,
3059
+ Fo as BlockInfo,
3060
+ Uo as BlockScan,
3061
+ Ro as BlockService,
3062
+ Ko as BlockStatus,
3063
+ Wo as BlockUpdate,
3064
+ oe as CardBase,
3065
+ Go as CardButton,
3066
+ Zo as CardDate,
3067
+ Jo as CardDimmer,
3068
+ Xo as CardInfo,
3069
+ Yo as CardInput,
3070
+ Qo as CardList,
3071
+ ua as CardMain,
3072
+ Wt as CardNotification,
3073
+ ea as ItemEdit,
3074
+ sa as ScriptDialog,
3075
+ ta as ScriptEditor,
3076
+ na as ScriptViewDocs,
3077
+ la as VAutocomplete,
3078
+ E as VButton,
3079
+ fl as VCheckbox,
3080
+ He as VDialog,
3081
+ aa as VDragDrop,
3082
+ je as VDropdown,
3083
+ oa as VExpansion,
3084
+ Xn as VFile,
3085
+ ge as VFunc,
3086
+ Ie as VIconLogo,
3087
+ lt as VIconLogoMini,
3088
+ $e as VList,
3089
+ Ue as VListObject,
3090
+ it as VLoader,
3091
+ ma as VPopup,
3092
+ se as VSelect,
3093
+ ia as VTable,
3094
+ al as VTabs,
3095
+ Z as VTextField,
3096
+ Fe as VTextWrapper,
3097
+ ra as VTooltip,
3098
+ at as VWifiIcon
3099
+ };