vuesp-components 2.2.6 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -1
- package/dist/{VDialog.vue_vue_type_script_setup_true_lang-CNTOjVfB.js → VDialog.vue_vue_type_script_setup_true_lang-D6rmM0u5.js} +137 -133
- package/dist/components/index.es.js +1523 -1228
- package/dist/components/script/index.d.ts +2 -0
- package/dist/components/script/index.d.ts.map +1 -1
- package/dist/components/ui/dialog/VDialog.vue.d.ts.map +1 -1
- package/dist/components/ui/index.d.ts +7 -1
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/text-field/VTextField.vue.d.ts.map +1 -1
- package/dist/components/ui/vision/VisionButton.vue.d.ts +27 -0
- package/dist/components/ui/vision/VisionButton.vue.d.ts.map +1 -0
- package/dist/components/ui/vision/VisionCard.vue.d.ts +21 -0
- package/dist/components/ui/vision/VisionCard.vue.d.ts.map +1 -0
- package/dist/components/ui/vision/VisionIcon.vue.d.ts +7 -0
- package/dist/components/ui/vision/VisionIcon.vue.d.ts.map +1 -0
- package/dist/components/ui/vision/VisionInput.vue.d.ts +19 -0
- package/dist/components/ui/vision/VisionInput.vue.d.ts.map +1 -0
- package/dist/components/ui/vision/VisionSearch.vue.d.ts +15 -0
- package/dist/components/ui/vision/VisionSearch.vue.d.ts.map +1 -0
- package/dist/components/ui/vision/VisionThemeToggle.vue.d.ts +3 -0
- package/dist/components/ui/vision/VisionThemeToggle.vue.d.ts.map +1 -0
- package/dist/index.es.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { a as
|
|
3
|
-
import { b as
|
|
4
|
-
import { f as
|
|
5
|
-
import { d as
|
|
6
|
-
import { getDataValue as
|
|
7
|
-
import { useForm as
|
|
8
|
-
import { required as
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as M, resolveComponent as Ae, openBlock as f, createElementBlock as v, Fragment as L, createCommentVNode as z, createElementVNode as o, normalizeClass as B, createVNode as g, withCtx as x, createBlock as D, renderSlot as k, markRaw as O, computed as T, withModifiers as F, toDisplayString as _, unref as q, TransitionGroup as De, renderList as N, mergeProps as j, ref as E, watch as oe, resolveDynamicComponent as re, Transition as ke, normalizeStyle as ve, createTextVNode as H, normalizeProps as K, guardReactiveProps as R, onMounted as Q, onUnmounted as we, reactive as nt, useTemplateRef as Ie, withDirectives as he, vShow as st, vModelText as He, createSlots as lt, isRef as ot, useModel as at, vModelDynamic as it, mergeModels as rt, Teleport as dt, nextTick as je } from "vue";
|
|
2
|
+
import { a as ct, V as Pe, j as A, h as Ne, g as Ce, k as ue, l as ut, d as mt, i as ft, e as le, _ as Oe, f as J } from "../VDialog.vue_vue_type_script_setup_true_lang-D6rmM0u5.js";
|
|
3
|
+
import { b as Ga, m as Ja } from "../VDialog.vue_vue_type_script_setup_true_lang-D6rmM0u5.js";
|
|
4
|
+
import { f as pt, t as vt, g as ht, u as fe, s as gt, d as bt, m as xt, c as yt } from "../app-B45sALrX.js";
|
|
5
|
+
import { d as Me, e as _t, o as $t } from "../useDialog-ALG4kFE7.js";
|
|
6
|
+
import { getDataValue as kt } from "../dashboard/index.es.js";
|
|
7
|
+
import { useForm as wt } from "../composables/index.es.js";
|
|
8
|
+
import { required as Ct, maxLen as Mt } from "../validate/index.es.js";
|
|
9
|
+
const zt = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear h-full" }, pa = /* @__PURE__ */ M({
|
|
10
10
|
__name: "AppAside",
|
|
11
11
|
props: {
|
|
12
12
|
isSidebar: { type: Boolean, default: !1 }
|
|
@@ -16,26 +16,26 @@ const yt = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
|
|
|
16
16
|
const l = n, s = () => {
|
|
17
17
|
e.isSidebar && l("sidebar", !e.isSidebar);
|
|
18
18
|
};
|
|
19
|
-
return (t,
|
|
20
|
-
const
|
|
21
|
-
return f(), v(
|
|
19
|
+
return (t, r) => {
|
|
20
|
+
const c = Ae("router-link");
|
|
21
|
+
return f(), v(L, null, [
|
|
22
22
|
e.isSidebar ? (f(), v("div", {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "lg:hidden overlay fixed left-0 top-0 h-full w-full bg-black/40 z-10 bg-blur",
|
|
25
25
|
onClick: s
|
|
26
|
-
})) :
|
|
26
|
+
})) : z("", !0),
|
|
27
27
|
o("aside", {
|
|
28
|
-
class:
|
|
28
|
+
class: B([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/70 bg-white/70 px-5 backdrop-blur-2xl transition-all duration-350 lg:translate-x-0 dark:border-white/10 dark:bg-[#07112c]/70"])
|
|
29
29
|
}, [
|
|
30
30
|
o("div", {
|
|
31
|
-
class:
|
|
31
|
+
class: B([e.isSidebar ? "justify-center" : "justify-between", "sidebar-header flex items-center gap-2 border-b border-gray-200/60 pt-6 pb-6 justify-between dark:border-white/5"])
|
|
32
32
|
}, [
|
|
33
|
-
g(
|
|
34
|
-
default:
|
|
35
|
-
e.isSidebar ? (f(),
|
|
33
|
+
g(c, { to: "/" }, {
|
|
34
|
+
default: x(() => [
|
|
35
|
+
e.isSidebar ? (f(), D(ct, {
|
|
36
36
|
key: 0,
|
|
37
37
|
class: "h-[30px] text-primary"
|
|
38
|
-
})) : (f(),
|
|
38
|
+
})) : (f(), D(Pe, {
|
|
39
39
|
key: 1,
|
|
40
40
|
class: "h-[30px] text-primary"
|
|
41
41
|
}))
|
|
@@ -43,92 +43,92 @@ const yt = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
|
|
|
43
43
|
_: 1
|
|
44
44
|
})
|
|
45
45
|
], 2),
|
|
46
|
-
o("div",
|
|
46
|
+
o("div", zt, [
|
|
47
47
|
k(t.$slots, "default")
|
|
48
48
|
])
|
|
49
49
|
], 2)
|
|
50
50
|
], 64);
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
}),
|
|
53
|
+
}), St = {
|
|
54
54
|
viewBox: "0 0 24 24",
|
|
55
55
|
width: "1.2em",
|
|
56
56
|
height: "1.2em"
|
|
57
57
|
};
|
|
58
|
-
function
|
|
59
|
-
return f(), v("svg",
|
|
58
|
+
function Vt(e, n) {
|
|
59
|
+
return f(), v("svg", St, [...n[0] || (n[0] = [
|
|
60
60
|
o("path", {
|
|
61
61
|
fill: "currentColor",
|
|
62
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
63
|
}, null, -1)
|
|
64
64
|
])]);
|
|
65
65
|
}
|
|
66
|
-
const
|
|
66
|
+
const Ue = O({ name: "ri-more-line", render: Vt }), Tt = {
|
|
67
67
|
viewBox: "0 0 24 24",
|
|
68
68
|
width: "1.2em",
|
|
69
69
|
height: "1.2em"
|
|
70
70
|
};
|
|
71
|
-
function
|
|
72
|
-
return f(), v("svg",
|
|
71
|
+
function Bt(e, n) {
|
|
72
|
+
return f(), v("svg", Tt, [...n[0] || (n[0] = [
|
|
73
73
|
o("path", {
|
|
74
74
|
fill: "currentColor",
|
|
75
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
76
|
}, null, -1)
|
|
77
77
|
])]);
|
|
78
78
|
}
|
|
79
|
-
const
|
|
79
|
+
const Et = O({ name: "ri-logout-box-line", render: Bt }), Lt = {
|
|
80
80
|
viewBox: "0 0 24 24",
|
|
81
81
|
width: "1.2em",
|
|
82
82
|
height: "1.2em"
|
|
83
83
|
};
|
|
84
|
-
function
|
|
85
|
-
return f(), v("svg",
|
|
84
|
+
function At(e, n) {
|
|
85
|
+
return f(), v("svg", Lt, [...n[0] || (n[0] = [
|
|
86
86
|
o("path", {
|
|
87
87
|
fill: "currentColor",
|
|
88
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
89
|
}, null, -1)
|
|
90
90
|
])]);
|
|
91
91
|
}
|
|
92
|
-
const
|
|
92
|
+
const Ke = O({ name: "ri-notification-line", render: At }), Dt = {
|
|
93
93
|
viewBox: "0 0 24 24",
|
|
94
94
|
width: "1.2em",
|
|
95
95
|
height: "1.2em"
|
|
96
96
|
};
|
|
97
|
-
function
|
|
98
|
-
return f(), v("svg",
|
|
97
|
+
function It(e, n) {
|
|
98
|
+
return f(), v("svg", Dt, [...n[0] || (n[0] = [
|
|
99
99
|
o("path", {
|
|
100
100
|
fill: "currentColor",
|
|
101
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
102
|
}, null, -1)
|
|
103
103
|
])]);
|
|
104
104
|
}
|
|
105
|
-
const
|
|
105
|
+
const Ht = O({ name: "ri-moon-line", render: It }), jt = {
|
|
106
106
|
viewBox: "0 0 24 24",
|
|
107
107
|
width: "1.2em",
|
|
108
108
|
height: "1.2em"
|
|
109
109
|
};
|
|
110
|
-
function
|
|
111
|
-
return f(), v("svg",
|
|
110
|
+
function Pt(e, n) {
|
|
111
|
+
return f(), v("svg", jt, [...n[0] || (n[0] = [
|
|
112
112
|
o("path", {
|
|
113
113
|
fill: "currentColor",
|
|
114
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
115
|
}, null, -1)
|
|
116
116
|
])]);
|
|
117
117
|
}
|
|
118
|
-
const
|
|
118
|
+
const Nt = O({ name: "ri-sun-line", render: Pt }), Ot = {
|
|
119
119
|
viewBox: "0 0 24 24",
|
|
120
120
|
width: "1.2em",
|
|
121
121
|
height: "1.2em"
|
|
122
122
|
};
|
|
123
|
-
function
|
|
124
|
-
return f(), v("svg",
|
|
123
|
+
function Ut(e, n) {
|
|
124
|
+
return f(), v("svg", Ot, [...n[0] || (n[0] = [
|
|
125
125
|
o("path", {
|
|
126
126
|
fill: "currentColor",
|
|
127
127
|
d: "M3 4h18v2H3zm0 7h18v2H3zm0 7h18v2H3z"
|
|
128
128
|
}, null, -1)
|
|
129
129
|
])]);
|
|
130
130
|
}
|
|
131
|
-
const
|
|
131
|
+
const Kt = O({ name: "ri-menu-line", render: Ut }), Rt = { class: "glass-header relative sticky top-0 left-0 z-10 w-full border-b shadow-[0_20px_60px_-35px_rgba(0,0,0,0.9)]" }, Ft = { class: "px-4 py-4 sm:px-6 lg:px-8" }, Wt = { class: "container mx-auto flex flex-auto items-center" }, qt = { class: "lg:hidden h-[30px]" }, Gt = { class: "gap-4 hidden lg:flex" }, Jt = { class: "lg:hidden flex gap-4" }, Zt = { class: "ms-2" }, va = /* @__PURE__ */ M({
|
|
132
132
|
__name: "AppHeader",
|
|
133
133
|
props: {
|
|
134
134
|
changeTheme: { type: Function },
|
|
@@ -140,96 +140,96 @@ const Dt = O({ name: "ri-menu-line", render: At }), It = { class: "glass-header
|
|
|
140
140
|
{ name: "Theme", value: 1 },
|
|
141
141
|
{ name: "Notification", value: 2 },
|
|
142
142
|
{ name: "Logout", value: 3 }
|
|
143
|
-
], t =
|
|
143
|
+
], t = T(() => !!e.notifications.find((i) => i.isNew)), r = (i) => l("sidebar", i), c = (i) => l("notif", i), d = async () => await fetch("/", { headers: { Authorization: "Basic AAAAAAAAAAAAAAAAAAA=" } }), m = () => {
|
|
144
144
|
e.changeTheme && e.changeTheme();
|
|
145
|
-
}, a = ({ value:
|
|
146
|
-
|
|
145
|
+
}, a = ({ value: i }, u) => {
|
|
146
|
+
i == 1 && m(), i == 2 && c(u), i == 3 && d();
|
|
147
147
|
};
|
|
148
|
-
return (
|
|
149
|
-
const p =
|
|
150
|
-
return f(), v("header",
|
|
151
|
-
|
|
152
|
-
o("div",
|
|
153
|
-
o("div",
|
|
154
|
-
g(
|
|
148
|
+
return (i, u) => {
|
|
149
|
+
const p = Kt, b = Ae("router-link"), h = Nt, y = Ht, S = Ke, V = Et, w = Ue;
|
|
150
|
+
return f(), v("header", Rt, [
|
|
151
|
+
u[3] || (u[3] = o("div", { class: "pointer-events-none absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-white/35 to-transparent" }, null, -1)),
|
|
152
|
+
o("div", Ft, [
|
|
153
|
+
o("div", Wt, [
|
|
154
|
+
g(A, {
|
|
155
155
|
type: "icon",
|
|
156
|
-
onClick:
|
|
156
|
+
onClick: r
|
|
157
157
|
}, {
|
|
158
|
-
default:
|
|
158
|
+
default: x(() => [
|
|
159
159
|
g(p, { class: "size-5" })
|
|
160
160
|
]),
|
|
161
161
|
_: 1
|
|
162
162
|
}),
|
|
163
|
-
|
|
164
|
-
o("div",
|
|
163
|
+
u[1] || (u[1] = o("div", { class: "lg:hidden flex-auto" }, null, -1)),
|
|
164
|
+
o("div", qt, [
|
|
165
165
|
g(b, { to: "/" }, {
|
|
166
|
-
default:
|
|
167
|
-
g(
|
|
166
|
+
default: x(() => [
|
|
167
|
+
g(Pe, { class: "h-[30px] text-primary" })
|
|
168
168
|
]),
|
|
169
169
|
_: 1
|
|
170
170
|
})
|
|
171
171
|
]),
|
|
172
|
-
|
|
173
|
-
o("div",
|
|
174
|
-
g(
|
|
172
|
+
u[2] || (u[2] = o("div", { class: "flex-auto" }, null, -1)),
|
|
173
|
+
o("div", Gt, [
|
|
174
|
+
g(A, {
|
|
175
175
|
type: "icon",
|
|
176
|
-
onClick:
|
|
176
|
+
onClick: m
|
|
177
177
|
}, {
|
|
178
|
-
default:
|
|
178
|
+
default: x(() => [
|
|
179
179
|
g(h, { class: "dark:hidden" }),
|
|
180
|
-
g(
|
|
180
|
+
g(y, { class: "hidden dark:flex" })
|
|
181
181
|
]),
|
|
182
182
|
_: 1
|
|
183
183
|
}),
|
|
184
|
-
g(
|
|
184
|
+
g(A, {
|
|
185
185
|
type: "icon",
|
|
186
|
-
onClick:
|
|
186
|
+
onClick: c
|
|
187
187
|
}, {
|
|
188
|
-
default:
|
|
188
|
+
default: x(() => [
|
|
189
189
|
o("span", {
|
|
190
|
-
class:
|
|
191
|
-
}, [...
|
|
190
|
+
class: B([t.value ? "flex" : "hidden", "absolute right-0 top-0.5 z-1 h-2 w-2 rounded-full bg-orange-400"])
|
|
191
|
+
}, [...u[0] || (u[0] = [
|
|
192
192
|
o("span", { class: "absolute -z-1 inline-flex h-full w-full animate-ping rounded-full bg-orange-400 opacity-75" }, null, -1)
|
|
193
193
|
])], 2),
|
|
194
|
-
g(
|
|
194
|
+
g(S, { class: "size-5" })
|
|
195
195
|
]),
|
|
196
196
|
_: 1
|
|
197
197
|
}),
|
|
198
|
-
g(
|
|
198
|
+
g(A, {
|
|
199
199
|
type: "icon",
|
|
200
|
-
onClick:
|
|
200
|
+
onClick: F(d, ["prevent"])
|
|
201
201
|
}, {
|
|
202
|
-
default:
|
|
202
|
+
default: x(() => [
|
|
203
203
|
g(V, { class: "size-5" })
|
|
204
204
|
]),
|
|
205
205
|
_: 1
|
|
206
206
|
})
|
|
207
207
|
]),
|
|
208
|
-
o("div",
|
|
209
|
-
g(
|
|
208
|
+
o("div", Jt, [
|
|
209
|
+
g(Ne, {
|
|
210
210
|
left: "unset",
|
|
211
211
|
right: "0",
|
|
212
212
|
top: "0"
|
|
213
213
|
}, {
|
|
214
|
-
activator:
|
|
215
|
-
g(
|
|
214
|
+
activator: x(({ on: P }) => [
|
|
215
|
+
g(A, {
|
|
216
216
|
type: "icon",
|
|
217
217
|
class: "flex",
|
|
218
|
-
onClick:
|
|
218
|
+
onClick: P.click
|
|
219
219
|
}, {
|
|
220
|
-
default:
|
|
220
|
+
default: x(() => [
|
|
221
221
|
g(w)
|
|
222
222
|
]),
|
|
223
223
|
_: 1
|
|
224
224
|
}, 8, ["onClick"])
|
|
225
225
|
]),
|
|
226
|
-
default:
|
|
227
|
-
g(
|
|
226
|
+
default: x(() => [
|
|
227
|
+
g(Ce, {
|
|
228
228
|
items: s,
|
|
229
229
|
onClick: a
|
|
230
230
|
}, {
|
|
231
|
-
default:
|
|
232
|
-
o("span",
|
|
231
|
+
default: x(({ item: P }) => [
|
|
232
|
+
o("span", Zt, _(P.name), 1)
|
|
233
233
|
]),
|
|
234
234
|
_: 1
|
|
235
235
|
})
|
|
@@ -242,7 +242,7 @@ const Dt = O({ name: "ri-menu-line", render: At }), It = { class: "glass-header
|
|
|
242
242
|
]);
|
|
243
243
|
};
|
|
244
244
|
}
|
|
245
|
-
}),
|
|
245
|
+
}), Xt = { class: "relative flex items-center gap-2 w-full p-2 overflow-hidden" }, Yt = { class: "flex-auto text-xs" }, Qt = { class: "text-gray-500 dark:text-gray-400 mt-1" }, en = /* @__PURE__ */ M({
|
|
246
246
|
__name: "CardNotification",
|
|
247
247
|
props: {
|
|
248
248
|
empty: {},
|
|
@@ -255,50 +255,50 @@ const Dt = O({ name: "ri-menu-line", render: At }), It = { class: "glass-header
|
|
|
255
255
|
},
|
|
256
256
|
emits: ["remove", "read"],
|
|
257
257
|
setup(e, { emit: n }) {
|
|
258
|
-
const l = e, s = n, t = ["", "bg-green-500", "bg-red-500", "bg-yellow-500", "bg-blue-500"],
|
|
259
|
-
return (
|
|
260
|
-
const
|
|
261
|
-
return f(), v("div",
|
|
258
|
+
const l = e, s = n, t = ["", "bg-green-500", "bg-red-500", "bg-yellow-500", "bg-blue-500"], r = (m) => t[m], c = (m) => s("remove", m), d = (m) => s("read", m);
|
|
259
|
+
return (m, a) => {
|
|
260
|
+
const i = Ke, u = ue;
|
|
261
|
+
return f(), v("div", Xt, [
|
|
262
262
|
o("div", {
|
|
263
|
-
class:
|
|
263
|
+
class: B(["absolute left-0 top-0 w-[3px] h-full", r(l.color)])
|
|
264
264
|
}, null, 2),
|
|
265
|
-
g(
|
|
265
|
+
g(A, {
|
|
266
266
|
class: "shrink-0",
|
|
267
267
|
type: "icon",
|
|
268
|
-
onClick:
|
|
268
|
+
onClick: d
|
|
269
269
|
}, {
|
|
270
|
-
default:
|
|
270
|
+
default: x(() => [
|
|
271
271
|
o("span", {
|
|
272
|
-
class:
|
|
272
|
+
class: B([l.isNew ? "flex" : "hidden", "absolute right-0 top-0.5 z-1 h-2 w-2 rounded-full bg-orange-400"])
|
|
273
273
|
}, [...a[0] || (a[0] = [
|
|
274
274
|
o("span", { class: "absolute -z-1 inline-flex h-full w-full animate-ping rounded-full bg-orange-400 opacity-75" }, null, -1)
|
|
275
275
|
])], 2),
|
|
276
|
-
g(
|
|
276
|
+
g(i, { class: "size-5" })
|
|
277
277
|
]),
|
|
278
278
|
_: 1
|
|
279
279
|
}),
|
|
280
|
-
o("div",
|
|
281
|
-
o("div", null,
|
|
282
|
-
o("div",
|
|
280
|
+
o("div", Yt, [
|
|
281
|
+
o("div", null, _(l.text), 1),
|
|
282
|
+
o("div", Qt, _(q(pt)(l.date)) + " (" + _(q(vt)(l.date)) + ")", 1)
|
|
283
283
|
]),
|
|
284
|
-
g(
|
|
284
|
+
g(A, {
|
|
285
285
|
class: "shrink-0",
|
|
286
286
|
type: "icon",
|
|
287
287
|
size: "sm",
|
|
288
|
-
onClick:
|
|
288
|
+
onClick: c
|
|
289
289
|
}, {
|
|
290
|
-
default:
|
|
291
|
-
g(
|
|
290
|
+
default: x(() => [
|
|
291
|
+
g(u, { class: "size-4" })
|
|
292
292
|
]),
|
|
293
293
|
_: 1
|
|
294
294
|
})
|
|
295
295
|
]);
|
|
296
296
|
};
|
|
297
297
|
}
|
|
298
|
-
}),
|
|
298
|
+
}), tn = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear h-full" }, nn = {
|
|
299
299
|
key: 0,
|
|
300
300
|
class: "flex flex-col gap-2 p-2"
|
|
301
|
-
},
|
|
301
|
+
}, ha = /* @__PURE__ */ M({
|
|
302
302
|
__name: "AppNotification",
|
|
303
303
|
props: {
|
|
304
304
|
value: { type: Boolean },
|
|
@@ -306,20 +306,20 @@ const Dt = O({ name: "ri-menu-line", render: At }), It = { class: "glass-header
|
|
|
306
306
|
},
|
|
307
307
|
emits: ["close", "remove", "read"],
|
|
308
308
|
setup(e, { emit: n }) {
|
|
309
|
-
const l = e, s = n, t =
|
|
310
|
-
return (a,
|
|
309
|
+
const l = e, s = n, t = T(() => !!l.notifications.find((a) => a.isNew)), r = T(() => !!l.notifications.length), c = (a) => s("close", a), d = (a) => s("remove", a), m = (a) => s("read", a);
|
|
310
|
+
return (a, i) => (f(), v(L, null, [
|
|
311
311
|
l.value ? (f(), v("div", {
|
|
312
312
|
key: 0,
|
|
313
313
|
class: "overlay fixed left-0 top-0 h-full w-full bg-black/40 bg-blur",
|
|
314
|
-
onClick:
|
|
315
|
-
})) :
|
|
314
|
+
onClick: c
|
|
315
|
+
})) : z("", !0),
|
|
316
316
|
o("aside", {
|
|
317
|
-
class:
|
|
317
|
+
class: B([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/70 flex-col overflow-y-auto transition-all duration-350 dark:border-white/10 bg-white/90 backdrop-blur-2xl dark:bg-[#07112c]/80"])
|
|
318
318
|
}, [
|
|
319
|
-
o("div",
|
|
319
|
+
o("div", tn, [
|
|
320
320
|
k(a.$slots, "header", { isNew: t.value }),
|
|
321
|
-
|
|
322
|
-
g(
|
|
321
|
+
r.value ? (f(), v("div", nn, [
|
|
322
|
+
g(De, {
|
|
323
323
|
"enter-active-class": "transition-all duration-300 ",
|
|
324
324
|
"enter-from-class": "opacity-0 translate-x-1/2",
|
|
325
325
|
"enter-to-class": "opacity-100 translate-x-0",
|
|
@@ -327,16 +327,16 @@ const Dt = O({ name: "ri-menu-line", render: At }), It = { class: "glass-header
|
|
|
327
327
|
"leave-from-class": "opacity-100 translate-x-0",
|
|
328
328
|
"leave-to-class": "opacity-0 translate-x-1/2"
|
|
329
329
|
}, {
|
|
330
|
-
default:
|
|
331
|
-
(f(!0), v(
|
|
332
|
-
key:
|
|
330
|
+
default: x(() => [
|
|
331
|
+
(f(!0), v(L, null, N(l.notifications, (u) => (f(), v("div", {
|
|
332
|
+
key: u.date,
|
|
333
333
|
class: "relative"
|
|
334
334
|
}, [
|
|
335
|
-
k(a.$slots, "card", { item:
|
|
336
|
-
g(
|
|
335
|
+
k(a.$slots, "card", { item: u }, () => [
|
|
336
|
+
g(en, j({ ref_for: !0 }, u, {
|
|
337
337
|
class: "rounded-md border border-gray-200/60 bg-white/50 dark:border-white/5 dark:bg-white/[0.03]",
|
|
338
|
-
onRemove: (p) =>
|
|
339
|
-
onRead: (p) => u
|
|
338
|
+
onRemove: (p) => d(u),
|
|
339
|
+
onRead: (p) => m(u)
|
|
340
340
|
}), null, 16, ["onRemove", "onRead"])
|
|
341
341
|
])
|
|
342
342
|
]))), 128))
|
|
@@ -348,32 +348,32 @@ const Dt = O({ name: "ri-menu-line", render: At }), It = { class: "glass-header
|
|
|
348
348
|
], 2)
|
|
349
349
|
], 64));
|
|
350
350
|
}
|
|
351
|
-
}),
|
|
352
|
-
function
|
|
353
|
-
return f(), v("div",
|
|
351
|
+
}), sn = {}, ln = { class: "fixed h-full w-full top-0 left-0 z-20" }, on = { class: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2" };
|
|
352
|
+
function an(e, n) {
|
|
353
|
+
return f(), v("div", ln, [
|
|
354
354
|
n[0] || (n[0] = o("div", { class: "absolute h-full w-full top-0 left-0 bg-black/60 bg-blur" }, null, -1)),
|
|
355
|
-
o("div",
|
|
355
|
+
o("div", on, [
|
|
356
356
|
k(e.$slots, "default")
|
|
357
357
|
])
|
|
358
358
|
]);
|
|
359
359
|
}
|
|
360
|
-
const
|
|
360
|
+
const ga = /* @__PURE__ */ ut(sn, [["render", an]]), rn = {
|
|
361
361
|
viewBox: "0 0 24 24",
|
|
362
362
|
width: "1.2em",
|
|
363
363
|
height: "1.2em"
|
|
364
364
|
};
|
|
365
|
-
function
|
|
366
|
-
return f(), v("svg",
|
|
365
|
+
function dn(e, n) {
|
|
366
|
+
return f(), v("svg", rn, [...n[0] || (n[0] = [
|
|
367
367
|
o("path", {
|
|
368
368
|
fill: "currentColor",
|
|
369
369
|
d: "m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z"
|
|
370
370
|
}, null, -1)
|
|
371
371
|
])]);
|
|
372
372
|
}
|
|
373
|
-
const
|
|
373
|
+
const cn = O({ name: "ri-arrow-right-s-line", render: dn }), un = { class: "mb-4 flex flex-col gap-2" }, mn = { class: "size-6 flex-[0_0_24px] opacity-60" }, fn = ["onClick"], pn = { class: "flex flex-col gap-2" }, vn = { class: "flex gap-2 ms-8" }, hn = { class: "size-5 flex-[0_0_24px]" }, gn = { class: "flex-1 first-letter:uppercase text-sm" }, bn = {
|
|
374
374
|
key: 0,
|
|
375
375
|
class: "mt-2"
|
|
376
|
-
},
|
|
376
|
+
}, xn = { class: "flex flex-col gap-2" }, yn = { class: "flex gap-2 ms-14" }, _n = { class: "size-5 flex-[0_0_24px]" }, $n = { class: "flex-1 first-letter:uppercase text-sm" }, ba = /* @__PURE__ */ M({
|
|
377
377
|
__name: "AppNav",
|
|
378
378
|
props: {
|
|
379
379
|
menu: { default: () => [] },
|
|
@@ -382,116 +382,116 @@ const tn = O({ name: "ri-arrow-right-s-line", render: en }), nn = { class: "mb-4
|
|
|
382
382
|
},
|
|
383
383
|
emits: ["sidebar"],
|
|
384
384
|
setup(e, { emit: n }) {
|
|
385
|
-
const l = n, s =
|
|
385
|
+
const l = n, s = E(""), t = ({ name: a }) => {
|
|
386
386
|
e.isSidebar && l("sidebar", !e.isSidebar), s.value !== a && (s.value = s.value === a ? "" : a);
|
|
387
|
-
},
|
|
388
|
-
(
|
|
387
|
+
}, r = (a) => e.fullPath === a, c = (a) => a ? e.fullPath === a || e.fullPath.startsWith(a) : !1, d = (a, i) => !a.path || i === "/" || a.path === "/" ? !1 : a.path === i || i.includes(a.path), m = (a, i) => (a == null ? void 0 : a.find(
|
|
388
|
+
(u) => {
|
|
389
389
|
var p;
|
|
390
|
-
return
|
|
390
|
+
return d(u, i) || ((p = u.children) == null ? void 0 : p.some(
|
|
391
391
|
(b) => {
|
|
392
392
|
var h;
|
|
393
|
-
return
|
|
393
|
+
return d(b, i) || ((h = b.children) == null ? void 0 : h.some((y) => d(y, i)));
|
|
394
394
|
}
|
|
395
395
|
));
|
|
396
396
|
}
|
|
397
397
|
)) ?? null;
|
|
398
|
-
return
|
|
398
|
+
return oe(
|
|
399
399
|
() => e.menu,
|
|
400
400
|
() => {
|
|
401
401
|
var a;
|
|
402
|
-
return s.value = ((a =
|
|
402
|
+
return s.value = ((a = m(e.menu, e.fullPath) ?? ht(e.menu, e.fullPath)) == null ? void 0 : a.name) || "";
|
|
403
403
|
}
|
|
404
|
-
), (a,
|
|
405
|
-
const
|
|
404
|
+
), (a, i) => {
|
|
405
|
+
const u = cn;
|
|
406
406
|
return f(), v("nav", null, [
|
|
407
|
-
o("ul",
|
|
408
|
-
(f(!0), v(
|
|
407
|
+
o("ul", un, [
|
|
408
|
+
(f(!0), v(L, null, N(e.menu, (p) => (f(), v("li", {
|
|
409
409
|
key: p.name
|
|
410
410
|
}, [
|
|
411
|
-
(f(),
|
|
411
|
+
(f(), D(re(p.path ? "router-link" : "span"), {
|
|
412
412
|
to: p.path,
|
|
413
|
-
class:
|
|
414
|
-
onClick:
|
|
413
|
+
class: B(["flex gap-2 items-center px-3 py-2 rounded", r(p.path) ? "bg-primary/10 text-primary" : "hover:bg-white/5"]),
|
|
414
|
+
onClick: F((b) => t(p), ["prevent", "stop"])
|
|
415
415
|
}, {
|
|
416
|
-
default:
|
|
417
|
-
o("div",
|
|
416
|
+
default: x(() => [
|
|
417
|
+
o("div", mn, [
|
|
418
418
|
k(a.$slots, "icon", { item: p })
|
|
419
419
|
]),
|
|
420
420
|
o("span", {
|
|
421
|
-
class:
|
|
422
|
-
},
|
|
421
|
+
class: B(["flex-1 first-letter:uppercase text-sm", e.isSidebar ? "lg:hidden" : ""])
|
|
422
|
+
}, _(p.name), 3),
|
|
423
423
|
o("button", {
|
|
424
|
-
class:
|
|
425
|
-
onClick:
|
|
424
|
+
class: B(["cursor-pointer", [e.isSidebar ? "lg:hidden" : ""]]),
|
|
425
|
+
onClick: F((b) => t(p), ["prevent", "stop"])
|
|
426
426
|
}, [
|
|
427
|
-
p.children ? (f(),
|
|
428
|
-
], 10,
|
|
427
|
+
p.children ? (f(), D(u, { key: 0 })) : z("", !0)
|
|
428
|
+
], 10, fn)
|
|
429
429
|
]),
|
|
430
430
|
_: 2
|
|
431
431
|
}, 1032, ["to", "class", "onClick"])),
|
|
432
432
|
p.children ? (f(), v("div", {
|
|
433
433
|
key: 0,
|
|
434
|
-
class:
|
|
434
|
+
class: B(["translate transform overflow-hidden mt-2", [e.isSidebar ? "lg:hidden" : "", s.value === p.name ? "block" : "hidden"]])
|
|
435
435
|
}, [
|
|
436
|
-
o("ul",
|
|
437
|
-
(f(!0), v(
|
|
438
|
-
(f(),
|
|
436
|
+
o("ul", pn, [
|
|
437
|
+
(f(!0), v(L, null, N(p.children, ({ name: b, path: h, icon: y, children: S }) => (f(), v("li", { key: b }, [
|
|
438
|
+
(f(), D(re(h ? "router-link" : "span"), {
|
|
439
439
|
to: h,
|
|
440
|
-
class:
|
|
440
|
+
class: B(["flex gap-2 items-center px-3 py-2 rounded", r(h) ? "bg-primary/10 text-primary" : "hover:bg-white/5"])
|
|
441
441
|
}, {
|
|
442
|
-
default:
|
|
443
|
-
o("div",
|
|
444
|
-
o("div",
|
|
442
|
+
default: x(() => [
|
|
443
|
+
o("div", vn, [
|
|
444
|
+
o("div", hn, [
|
|
445
445
|
k(a.$slots, "icon-children", {
|
|
446
|
-
item: { name: b, path: h, icon:
|
|
446
|
+
item: { name: b, path: h, icon: y }
|
|
447
447
|
})
|
|
448
448
|
]),
|
|
449
|
-
o("span",
|
|
449
|
+
o("span", gn, _(b), 1)
|
|
450
450
|
])
|
|
451
451
|
]),
|
|
452
452
|
_: 2
|
|
453
453
|
}, 1032, ["to", "class"])),
|
|
454
|
-
|
|
455
|
-
o("ul",
|
|
456
|
-
(f(!0), v(
|
|
454
|
+
S != null && S.length && c(h) ? (f(), v("div", bn, [
|
|
455
|
+
o("ul", xn, [
|
|
456
|
+
(f(!0), v(L, null, N(S, (V) => (f(), v("li", {
|
|
457
457
|
key: V.name
|
|
458
458
|
}, [
|
|
459
|
-
(f(),
|
|
459
|
+
(f(), D(re(V.path ? "router-link" : "span"), {
|
|
460
460
|
to: V.path,
|
|
461
|
-
class:
|
|
461
|
+
class: B(["flex gap-2 items-center px-3 py-2 rounded", r(V.path) ? "bg-primary/10 text-primary" : "hover:bg-white/5"])
|
|
462
462
|
}, {
|
|
463
|
-
default:
|
|
464
|
-
o("div",
|
|
465
|
-
o("div",
|
|
463
|
+
default: x(() => [
|
|
464
|
+
o("div", yn, [
|
|
465
|
+
o("div", _n, [
|
|
466
466
|
k(a.$slots, "icon-children", { item: V })
|
|
467
467
|
]),
|
|
468
|
-
o("span",
|
|
468
|
+
o("span", $n, _(V.name), 1)
|
|
469
469
|
])
|
|
470
470
|
]),
|
|
471
471
|
_: 2
|
|
472
472
|
}, 1032, ["to", "class"]))
|
|
473
473
|
]))), 128))
|
|
474
474
|
])
|
|
475
|
-
])) :
|
|
475
|
+
])) : z("", !0)
|
|
476
476
|
]))), 128))
|
|
477
477
|
])
|
|
478
|
-
], 2)) :
|
|
478
|
+
], 2)) : z("", !0)
|
|
479
479
|
]))), 128))
|
|
480
480
|
])
|
|
481
481
|
]);
|
|
482
482
|
};
|
|
483
483
|
}
|
|
484
|
-
}),
|
|
484
|
+
}), kn = {
|
|
485
485
|
key: 0,
|
|
486
486
|
class: "glass-panel w-full min-w-[260px] max-w-xs p-4 shadow-lg",
|
|
487
487
|
role: "alert"
|
|
488
|
-
},
|
|
488
|
+
}, wn = { class: "flex items-center gap-4 text-sm" }, Cn = {
|
|
489
489
|
key: 0,
|
|
490
490
|
class: "text-green-600"
|
|
491
|
-
},
|
|
491
|
+
}, Mn = {
|
|
492
492
|
key: 1,
|
|
493
493
|
class: "relative mt-2 block h-4 w-full select-none overflow-hidden rounded-md bg-gray-200/70 dark:bg-white/10"
|
|
494
|
-
},
|
|
494
|
+
}, zn = { class: "absolute left-[140px] top-1/2 -translate-1/2 text-sm font-bold text-black dark:text-white text-center leading-none" }, Sn = { class: "absolute left-[140px] top-1/2 -translate-1/2 text-sm font-bold text-white text-center leading-none" }, xa = /* @__PURE__ */ M({
|
|
495
495
|
__name: "AppProgress",
|
|
496
496
|
props: {
|
|
497
497
|
timeout: { default: 5e3 },
|
|
@@ -502,17 +502,17 @@ const tn = O({ name: "ri-arrow-right-s-line", render: en }), nn = { class: "mb-4
|
|
|
502
502
|
length: { default: 0 }
|
|
503
503
|
},
|
|
504
504
|
setup(e) {
|
|
505
|
-
const n =
|
|
505
|
+
const n = E(!1), l = T(() => !!e.length), s = T(() => !!(l.value && t.value === 100 && !e.status)), t = T(() => e.status ? Math.ceil(e.size * 100 / e.length) : 100), r = Me(() => {
|
|
506
506
|
n.value = !1;
|
|
507
507
|
}, e.timeout);
|
|
508
|
-
return
|
|
508
|
+
return oe(
|
|
509
509
|
() => [e.size, e.status],
|
|
510
510
|
() => {
|
|
511
|
-
n.value = !0,
|
|
511
|
+
n.value = !0, r();
|
|
512
512
|
}
|
|
513
|
-
), (
|
|
514
|
-
const
|
|
515
|
-
return f(),
|
|
513
|
+
), (c, d) => {
|
|
514
|
+
const m = ue;
|
|
515
|
+
return f(), D(ke, {
|
|
516
516
|
"enter-active-class": "duration-300 ease-out",
|
|
517
517
|
"enter-from-class": "transform opacity-0 translate-x-full",
|
|
518
518
|
"enter-to-class": "opacity-100 translate-x-0",
|
|
@@ -520,41 +520,41 @@ const tn = O({ name: "ri-arrow-right-s-line", render: en }), nn = { class: "mb-4
|
|
|
520
520
|
"leave-from-class": "opacity-100 translate-y-0",
|
|
521
521
|
"leave-to-class": "transform opacity-0 -translate-y-8"
|
|
522
522
|
}, {
|
|
523
|
-
default:
|
|
524
|
-
n.value ? (f(), v("div",
|
|
525
|
-
o("div",
|
|
526
|
-
k(
|
|
527
|
-
|
|
528
|
-
s.value ? (f(), v("span",
|
|
523
|
+
default: x(() => [
|
|
524
|
+
n.value ? (f(), v("div", kn, [
|
|
525
|
+
o("div", wn, [
|
|
526
|
+
k(c.$slots, "default", { isDone: s.value }, () => [
|
|
527
|
+
d[1] || (d[1] = o("div", { class: "flex-auto" }, "Progress...", -1)),
|
|
528
|
+
s.value ? (f(), v("span", Cn, "Done")) : z("", !0)
|
|
529
529
|
]),
|
|
530
530
|
o("button", {
|
|
531
531
|
class: "cursor-pointer transition text-gray-700 dark:text-gray-400 self-start hover:text-gray-600",
|
|
532
|
-
onClick:
|
|
532
|
+
onClick: d[0] || (d[0] = (a) => n.value = !1)
|
|
533
533
|
}, [
|
|
534
|
-
g(
|
|
534
|
+
g(m, { class: "size-4" })
|
|
535
535
|
])
|
|
536
536
|
]),
|
|
537
537
|
l.value ? (f(), v("div", {
|
|
538
538
|
key: 0,
|
|
539
539
|
class: "h-[2px] fixed top-0 left-0 w-full bg-blue-600 transition-all duration-500",
|
|
540
|
-
style:
|
|
541
|
-
}, null, 4)) :
|
|
542
|
-
l.value ? (f(), v("div",
|
|
543
|
-
o("div",
|
|
540
|
+
style: ve(`width: ${t.value}%`)
|
|
541
|
+
}, null, 4)) : z("", !0),
|
|
542
|
+
l.value ? (f(), v("div", Mn, [
|
|
543
|
+
o("div", zn, _(t.value) + "%", 1),
|
|
544
544
|
o("div", {
|
|
545
545
|
class: "bg-blue-600 rounded h-4 overflow-hidden relative transition-all duration-500",
|
|
546
|
-
style:
|
|
546
|
+
style: ve(`width: ${t.value}%`)
|
|
547
547
|
}, [
|
|
548
|
-
o("div",
|
|
548
|
+
o("div", Sn, _(t.value) + "%", 1)
|
|
549
549
|
], 4)
|
|
550
|
-
])) :
|
|
551
|
-
])) :
|
|
550
|
+
])) : z("", !0)
|
|
551
|
+
])) : z("", !0)
|
|
552
552
|
]),
|
|
553
553
|
_: 3
|
|
554
554
|
});
|
|
555
555
|
};
|
|
556
556
|
}
|
|
557
|
-
}),
|
|
557
|
+
}), Vn = { class: "my-4 text-gray-700 dark:text-gray-400" }, Tn = { class: "flex flex-col md:flex-row flex-wrap md:gap-4 text-sm" }, Bn = { class: "flex gap-2" }, En = { class: "text-gray-700 dark:text-gray-400" }, Ln = { class: "flex gap-2" }, An = { class: "flex gap-2" }, Dn = { class: "text-gray-700 dark:text-gray-400" }, In = { class: "flex gap-2" }, Hn = { class: "text-gray-700 dark:text-gray-400" }, jn = { class: "flex flex-col gap-4 text-sm" }, Pn = { class: "flex gap-4" }, ya = /* @__PURE__ */ M({
|
|
558
558
|
__name: "BlockInfo",
|
|
559
559
|
props: {
|
|
560
560
|
pkg: {},
|
|
@@ -568,85 +568,85 @@ const tn = O({ name: "ri-arrow-right-s-line", render: en }), nn = { class: "mb-4
|
|
|
568
568
|
board: {}
|
|
569
569
|
},
|
|
570
570
|
setup(e) {
|
|
571
|
-
const n =
|
|
572
|
-
var t,
|
|
571
|
+
const n = T(() => e.firmware.join(".")), l = T(() => {
|
|
572
|
+
var t, r, c, d, m, a, i;
|
|
573
573
|
const s = [];
|
|
574
|
-
return (t = e.pkg) != null && t.homepage && s.push({ name: "homepage", href: e.pkg.homepage }), (
|
|
574
|
+
return (t = e.pkg) != null && t.homepage && s.push({ name: "homepage", href: e.pkg.homepage }), (c = (r = e.pkg) == null ? void 0 : r.repository) != null && c.url && s.push({ name: "repository", href: e.pkg.repository.url }), (m = (d = e.pkg) == null ? void 0 : d.bugs) != null && m.url && s.push({ name: "bugs", href: e.pkg.bugs.url }), (a = e.pkg) != null && a.author && s.push({ name: "author", href: `mailto:${(i = e.pkg) == null ? void 0 : i.author}` }), s;
|
|
575
575
|
});
|
|
576
576
|
return (s, t) => {
|
|
577
|
-
var
|
|
577
|
+
var r, c;
|
|
578
578
|
return f(), v("div", null, [
|
|
579
|
-
o("p",
|
|
580
|
-
o("div",
|
|
581
|
-
o("div",
|
|
582
|
-
t[0] || (t[0] =
|
|
583
|
-
o("span",
|
|
579
|
+
o("p", Vn, _((r = e.pkg) == null ? void 0 : r.description), 1),
|
|
580
|
+
o("div", Tn, [
|
|
581
|
+
o("div", Bn, [
|
|
582
|
+
t[0] || (t[0] = H(" Firmware (hw): ", -1)),
|
|
583
|
+
o("span", En, _(n.value), 1)
|
|
584
584
|
]),
|
|
585
|
-
o("div",
|
|
586
|
-
o("div",
|
|
587
|
-
t[1] || (t[1] =
|
|
588
|
-
o("span",
|
|
585
|
+
o("div", Ln, [
|
|
586
|
+
o("div", An, [
|
|
587
|
+
t[1] || (t[1] = H(" Version (web): ", -1)),
|
|
588
|
+
o("span", Dn, _((c = e.pkg) == null ? void 0 : c.version), 1)
|
|
589
589
|
])
|
|
590
590
|
]),
|
|
591
591
|
t[3] || (t[3] = o("div", { class: "flex-auto" }, null, -1)),
|
|
592
|
-
o("div",
|
|
593
|
-
t[2] || (t[2] =
|
|
594
|
-
o("span",
|
|
592
|
+
o("div", In, [
|
|
593
|
+
t[2] || (t[2] = H(" ID: ", -1)),
|
|
594
|
+
o("span", Hn, _(e.id.toString(16)), 1)
|
|
595
595
|
])
|
|
596
596
|
]),
|
|
597
597
|
t[4] || (t[4] = o("hr", { class: "dark:text-gray-700 text-gray-200 my-2" }, null, -1)),
|
|
598
|
-
o("div",
|
|
599
|
-
o("div",
|
|
598
|
+
o("div", jn, [
|
|
599
|
+
o("div", Pn, [
|
|
600
600
|
k(s.$slots, "links", { links: l.value })
|
|
601
601
|
])
|
|
602
602
|
])
|
|
603
603
|
]);
|
|
604
604
|
};
|
|
605
605
|
}
|
|
606
|
-
}),
|
|
606
|
+
}), Nn = ["onClick"], On = { class: "mr-2" }, Un = { class: "text-sm" }, Kn = { class: "text-gray-400 text-xs" }, Rn = {
|
|
607
607
|
key: 0,
|
|
608
608
|
class: "flex justify-center"
|
|
609
|
-
},
|
|
609
|
+
}, Fn = { class: "flex justify-end mt-4" }, _a = /* @__PURE__ */ M({
|
|
610
610
|
__name: "BlockScan",
|
|
611
611
|
props: {
|
|
612
612
|
items: { default: () => [] }
|
|
613
613
|
},
|
|
614
614
|
emits: ["scan", "select"],
|
|
615
615
|
setup(e, { emit: n }) {
|
|
616
|
-
const l = n, s = ["OPEN", "WEP", "WPA_PSK", "WPA2_PSK", "WPA_WPA2_PSK", "MAX", "", "NO", "AUTO"], t = (
|
|
617
|
-
return (
|
|
618
|
-
const
|
|
616
|
+
const l = n, s = ["OPEN", "WEP", "WPA_PSK", "WPA2_PSK", "WPA_WPA2_PSK", "MAX", "", "NO", "AUTO"], t = (c) => l("select", c), r = (c) => l("scan", c);
|
|
617
|
+
return (c, d) => {
|
|
618
|
+
const m = mt, a = Ce, i = ft, u = A;
|
|
619
619
|
return f(), v("div", null, [
|
|
620
620
|
g(a, {
|
|
621
621
|
items: e.items,
|
|
622
622
|
class: "bg-transparent! ring-0!"
|
|
623
623
|
}, {
|
|
624
|
-
default:
|
|
624
|
+
default: x(({ item: p }) => [
|
|
625
625
|
o("div", {
|
|
626
626
|
class: "flex items-center w-full",
|
|
627
627
|
onClick: (b) => t(p)
|
|
628
628
|
}, [
|
|
629
|
-
o("div",
|
|
630
|
-
g(
|
|
629
|
+
o("div", On, [
|
|
630
|
+
g(m, K(R(p)), null, 16)
|
|
631
631
|
]),
|
|
632
632
|
o("div", null, [
|
|
633
|
-
o("div",
|
|
634
|
-
o("div",
|
|
633
|
+
o("div", Un, _(p.ssid), 1),
|
|
634
|
+
o("div", Kn, _(c.$t("security")) + " : " + _(s[p.encryptionType] || "unknown"), 1)
|
|
635
635
|
])
|
|
636
|
-
], 8,
|
|
636
|
+
], 8, Nn)
|
|
637
637
|
]),
|
|
638
638
|
_: 1
|
|
639
639
|
}, 8, ["items"]),
|
|
640
|
-
e.items.length ?
|
|
641
|
-
g(
|
|
640
|
+
e.items.length ? z("", !0) : (f(), v("div", Rn, [
|
|
641
|
+
g(i, { class: "text-primary" })
|
|
642
642
|
])),
|
|
643
|
-
o("div",
|
|
644
|
-
g(
|
|
643
|
+
o("div", Fn, [
|
|
644
|
+
g(u, {
|
|
645
645
|
color: "blue",
|
|
646
|
-
onClick:
|
|
646
|
+
onClick: r
|
|
647
647
|
}, {
|
|
648
|
-
default:
|
|
649
|
-
|
|
648
|
+
default: x(() => [
|
|
649
|
+
H(_(c.$t("scan")), 1)
|
|
650
650
|
]),
|
|
651
651
|
_: 1
|
|
652
652
|
})
|
|
@@ -654,7 +654,7 @@ const tn = O({ name: "ri-arrow-right-s-line", render: en }), nn = { class: "mb-4
|
|
|
654
654
|
]);
|
|
655
655
|
};
|
|
656
656
|
}
|
|
657
|
-
}),
|
|
657
|
+
}), Wn = { class: "md:flex items-center mb-4" }, qn = { class: "flex-auto text-gray-600 bg:text-gray-400 mb-2" }, Gn = { class: "md:max-w-50" }, Jn = { class: "flex items-center mb-4" }, Zn = { class: "flex-auto text-gray-600 bg:text-gray-400" }, Xn = { class: "flex items-center mb-4" }, Yn = { class: "flex-auto text-gray-600 bg:text-gray-400" }, $a = /* @__PURE__ */ M({
|
|
658
658
|
__name: "BlockService",
|
|
659
659
|
props: {
|
|
660
660
|
locale: {},
|
|
@@ -662,47 +662,47 @@ const tn = O({ name: "ri-arrow-right-s-line", render: en }), nn = { class: "mb-4
|
|
|
662
662
|
},
|
|
663
663
|
emits: ["reboot", "reset", "locale"],
|
|
664
664
|
setup(e, { emit: n }) {
|
|
665
|
-
const l = n, s = (
|
|
666
|
-
var
|
|
667
|
-
return (
|
|
665
|
+
const l = n, s = (r) => l("locale", r), t = (r) => {
|
|
666
|
+
var c;
|
|
667
|
+
return (c = e.locales.find((d) => d.value === r)) == null ? void 0 : c.name;
|
|
668
668
|
};
|
|
669
|
-
return (
|
|
670
|
-
const
|
|
671
|
-
return f(), v(
|
|
672
|
-
o("div",
|
|
673
|
-
o("div",
|
|
674
|
-
o("div",
|
|
675
|
-
g(
|
|
669
|
+
return (r, c) => {
|
|
670
|
+
const d = le, m = A;
|
|
671
|
+
return f(), v(L, null, [
|
|
672
|
+
o("div", Wn, [
|
|
673
|
+
o("div", qn, _(r.$t("selectLang")), 1),
|
|
674
|
+
o("div", Gn, [
|
|
675
|
+
g(d, {
|
|
676
676
|
"model-value": t(e.locale),
|
|
677
|
-
label:
|
|
677
|
+
label: r.$t("lang"),
|
|
678
678
|
items: e.locales,
|
|
679
679
|
onChange: s
|
|
680
680
|
}, null, 8, ["model-value", "label", "items"])
|
|
681
681
|
])
|
|
682
682
|
]),
|
|
683
|
-
o("div",
|
|
684
|
-
o("div",
|
|
685
|
-
g(
|
|
683
|
+
o("div", Jn, [
|
|
684
|
+
o("div", Zn, _(r.$t("rebootDev")), 1),
|
|
685
|
+
g(m, {
|
|
686
686
|
class: "min-w-[100px]",
|
|
687
687
|
color: "red",
|
|
688
688
|
outline: "",
|
|
689
|
-
onClick:
|
|
689
|
+
onClick: c[0] || (c[0] = (a) => l("reboot", a))
|
|
690
690
|
}, {
|
|
691
|
-
default:
|
|
692
|
-
|
|
691
|
+
default: x(() => [
|
|
692
|
+
H(_(r.$t("reboot")), 1)
|
|
693
693
|
]),
|
|
694
694
|
_: 1
|
|
695
695
|
})
|
|
696
696
|
]),
|
|
697
|
-
o("div",
|
|
698
|
-
o("div",
|
|
699
|
-
g(
|
|
697
|
+
o("div", Xn, [
|
|
698
|
+
o("div", Yn, _(r.$t("resetConf")), 1),
|
|
699
|
+
g(m, {
|
|
700
700
|
class: "min-w-[100px]",
|
|
701
701
|
color: "red",
|
|
702
|
-
onClick:
|
|
702
|
+
onClick: c[1] || (c[1] = (a) => l("reset", a))
|
|
703
703
|
}, {
|
|
704
|
-
default:
|
|
705
|
-
|
|
704
|
+
default: x(() => [
|
|
705
|
+
H(_(r.$t("reset")), 1)
|
|
706
706
|
]),
|
|
707
707
|
_: 1
|
|
708
708
|
})
|
|
@@ -710,7 +710,7 @@ const tn = O({ name: "ri-arrow-right-s-line", render: en }), nn = { class: "mb-4
|
|
|
710
710
|
], 64);
|
|
711
711
|
};
|
|
712
712
|
}
|
|
713
|
-
}),
|
|
713
|
+
}), Qn = { class: "grid grid-cols-1 gap-4 lg:max-w-[360px] min-w-[250px]" }, es = { class: "flex flex-col w-full items-center gap-2" }, ts = ["title"], ns = { class: "absolute left-[110px] top-1/2 -translate-1/2 text-center text-sm font-bold leading-none text-gray-900 dark:text-white" }, ss = { class: "absolute left-[110px] top-1/2 -translate-1/2 text-sm font-bold text-white text-center leading-none" }, ls = { class: "flex justify-between w-full text-xs" }, os = { class: "text-gray-500 dark:text-white/50" }, as = { class: "text-sm" }, is = { class: "text-gray-500 dark:text-white/50 text-left" }, rs = { class: "text-right text-xs" }, ka = /* @__PURE__ */ M({
|
|
714
714
|
__name: "BlockStatus",
|
|
715
715
|
props: {
|
|
716
716
|
pkg: {},
|
|
@@ -724,125 +724,125 @@ const tn = O({ name: "ri-arrow-right-s-line", render: en }), nn = { class: "mb-4
|
|
|
724
724
|
board: {}
|
|
725
725
|
},
|
|
726
726
|
setup(e) {
|
|
727
|
-
const n =
|
|
727
|
+
const n = E(e.uptime);
|
|
728
728
|
let l = null;
|
|
729
|
-
const s =
|
|
730
|
-
{ name: "used", value:
|
|
731
|
-
{ name: "available", value:
|
|
732
|
-
{ name: "total", value:
|
|
733
|
-
]),
|
|
734
|
-
var
|
|
729
|
+
const s = T(() => e.firmware.join(".")), t = T(() => [
|
|
730
|
+
{ name: "used", value: fe(e.usedBytes) },
|
|
731
|
+
{ name: "available", value: fe(e.totalBytes - e.usedBytes) },
|
|
732
|
+
{ name: "total", value: fe(e.totalBytes) }
|
|
733
|
+
]), r = T(() => {
|
|
734
|
+
var m;
|
|
735
735
|
return [
|
|
736
|
-
{ name: "uptime", value:
|
|
736
|
+
{ name: "uptime", value: gt(n.value) },
|
|
737
737
|
{ name: "id", value: `${e.id.toString(16)} (${e.id})` },
|
|
738
738
|
{ name: "firmware", value: s.value },
|
|
739
|
-
{ name: "version", value: (
|
|
739
|
+
{ name: "version", value: (m = e.pkg) == null ? void 0 : m.version }
|
|
740
740
|
];
|
|
741
|
-
}),
|
|
742
|
-
n.value++, l = setTimeout(
|
|
741
|
+
}), c = T(() => e.usedBytes ? Math.round(e.usedBytes * 100 / e.totalBytes) : 0), d = () => {
|
|
742
|
+
n.value++, l = setTimeout(d, 1e3);
|
|
743
743
|
};
|
|
744
|
-
return
|
|
745
|
-
|
|
746
|
-
}),
|
|
744
|
+
return Q(() => {
|
|
745
|
+
d();
|
|
746
|
+
}), we(() => {
|
|
747
747
|
n.value = 0, l && clearTimeout(l);
|
|
748
|
-
}), (
|
|
749
|
-
var
|
|
750
|
-
return f(), v("div",
|
|
751
|
-
o("div",
|
|
748
|
+
}), (m, a) => {
|
|
749
|
+
var i, u, p;
|
|
750
|
+
return f(), v("div", Qn, [
|
|
751
|
+
o("div", es, [
|
|
752
752
|
o("div", {
|
|
753
753
|
class: "relative block h-4 w-full select-none overflow-hidden rounded-md bg-gray-200/70 dark:bg-white/10",
|
|
754
|
-
title: `${
|
|
754
|
+
title: `${c.value}%`
|
|
755
755
|
}, [
|
|
756
|
-
o("div",
|
|
756
|
+
o("div", ns, _(c.value) + "%", 1),
|
|
757
757
|
o("div", {
|
|
758
758
|
class: "relative h-4 overflow-hidden rounded-md bg-primary transition-all duration-500",
|
|
759
|
-
style:
|
|
759
|
+
style: ve(`width: ${c.value}%`)
|
|
760
760
|
}, [
|
|
761
|
-
o("div",
|
|
761
|
+
o("div", ss, _(c.value) + "%", 1)
|
|
762
762
|
], 4)
|
|
763
|
-
], 8,
|
|
764
|
-
o("div",
|
|
765
|
-
(f(!0), v(
|
|
763
|
+
], 8, ts),
|
|
764
|
+
o("div", ls, [
|
|
765
|
+
(f(!0), v(L, null, N(t.value, (b) => (f(), v("div", {
|
|
766
766
|
key: b.name,
|
|
767
767
|
class: "flex-auto"
|
|
768
768
|
}, [
|
|
769
|
-
o("div",
|
|
770
|
-
k(
|
|
769
|
+
o("div", os, [
|
|
770
|
+
k(m.$slots, "name", { item: b })
|
|
771
771
|
]),
|
|
772
|
-
o("div", null,
|
|
772
|
+
o("div", null, _(b.value), 1)
|
|
773
773
|
]))), 128))
|
|
774
774
|
])
|
|
775
775
|
]),
|
|
776
|
-
o("div",
|
|
777
|
-
(f(!0), v(
|
|
776
|
+
o("div", as, [
|
|
777
|
+
(f(!0), v(L, null, N(r.value, (b) => (f(), v("div", {
|
|
778
778
|
key: b.name,
|
|
779
779
|
class: "flex justify-between items-center"
|
|
780
780
|
}, [
|
|
781
|
-
o("div",
|
|
782
|
-
k(
|
|
781
|
+
o("div", is, [
|
|
782
|
+
k(m.$slots, "name", { item: b })
|
|
783
783
|
]),
|
|
784
|
-
o("div",
|
|
784
|
+
o("div", rs, _(b.value), 1)
|
|
785
785
|
]))), 128))
|
|
786
786
|
]),
|
|
787
787
|
o("div", null, [
|
|
788
|
-
k(
|
|
789
|
-
home: (
|
|
790
|
-
repo: (p = (
|
|
788
|
+
k(m.$slots, "default", {
|
|
789
|
+
home: (i = e.pkg) == null ? void 0 : i.homepage,
|
|
790
|
+
repo: (p = (u = e.pkg) == null ? void 0 : u.repository) == null ? void 0 : p.url
|
|
791
791
|
})
|
|
792
792
|
])
|
|
793
793
|
]);
|
|
794
794
|
};
|
|
795
795
|
}
|
|
796
|
-
}),
|
|
796
|
+
}), ds = { class: "flex items-center cursor-pointer" }, cs = /* @__PURE__ */ M({
|
|
797
797
|
__name: "VFile",
|
|
798
798
|
emits: ["change"],
|
|
799
799
|
setup(e, { emit: n }) {
|
|
800
800
|
const l = n, s = async (t) => {
|
|
801
|
-
const
|
|
802
|
-
|
|
801
|
+
const r = t.target;
|
|
802
|
+
r.files && l("change", r.files);
|
|
803
803
|
};
|
|
804
|
-
return (t,
|
|
805
|
-
o("input",
|
|
804
|
+
return (t, r) => (f(), v("label", ds, [
|
|
805
|
+
o("input", j({
|
|
806
806
|
type: "file",
|
|
807
807
|
class: "hidden"
|
|
808
808
|
}, t.$attrs, { onChange: s }), null, 16),
|
|
809
809
|
k(t.$slots, "default")
|
|
810
810
|
]));
|
|
811
811
|
}
|
|
812
|
-
}),
|
|
812
|
+
}), us = { class: "md:flex" }, ms = { class: "text-gray-600 bg:text-gray-400 first-letter:uppercase min-w-19" }, wa = /* @__PURE__ */ M({
|
|
813
813
|
__name: "BlockUpdate",
|
|
814
814
|
emits: ["update"],
|
|
815
815
|
setup(e, { emit: n }) {
|
|
816
|
-
const l = n, s =
|
|
816
|
+
const l = n, s = nt({ firmware: null, littlefs: null }), t = (d) => d ? Array.from(d).map((m) => `${m.name} (${fe(m.size)})`).join("") : "", r = (d, m) => {
|
|
817
817
|
const a = new FormData();
|
|
818
|
-
for (let
|
|
819
|
-
const
|
|
820
|
-
if (!
|
|
821
|
-
a.append(`file[${
|
|
818
|
+
for (let i = 0; i < d.length; i++) {
|
|
819
|
+
const u = d.item(i);
|
|
820
|
+
if (!u) return;
|
|
821
|
+
a.append(`file[${i}]`, u, m);
|
|
822
822
|
}
|
|
823
823
|
return a;
|
|
824
|
-
},
|
|
825
|
-
if (!
|
|
826
|
-
const a =
|
|
827
|
-
a && l("update",
|
|
824
|
+
}, c = (d, m) => {
|
|
825
|
+
if (!m) return;
|
|
826
|
+
const a = r(m, d);
|
|
827
|
+
a && l("update", d, a);
|
|
828
828
|
};
|
|
829
|
-
return (
|
|
830
|
-
const a =
|
|
829
|
+
return (d, m) => {
|
|
830
|
+
const a = A;
|
|
831
831
|
return f(), v("div", null, [
|
|
832
|
-
(f(!0), v(
|
|
833
|
-
key:
|
|
832
|
+
(f(!0), v(L, null, N(s, (i, u) => (f(), v("div", {
|
|
833
|
+
key: u,
|
|
834
834
|
class: "mb-4 flex items-center"
|
|
835
835
|
}, [
|
|
836
|
-
g(
|
|
836
|
+
g(cs, {
|
|
837
837
|
accept: ".bin",
|
|
838
|
-
onChange: (p) => s[
|
|
838
|
+
onChange: (p) => s[u] = p,
|
|
839
839
|
class: "flex-auto"
|
|
840
840
|
}, {
|
|
841
|
-
default:
|
|
842
|
-
o("div",
|
|
843
|
-
o("h6",
|
|
844
|
-
k(
|
|
845
|
-
file: t(
|
|
841
|
+
default: x(() => [
|
|
842
|
+
o("div", us, [
|
|
843
|
+
o("h6", ms, _(u) + ":", 1),
|
|
844
|
+
k(d.$slots, "default", {
|
|
845
|
+
file: t(i)
|
|
846
846
|
})
|
|
847
847
|
])
|
|
848
848
|
]),
|
|
@@ -851,11 +851,11 @@ const tn = O({ name: "ri-arrow-right-s-line", render: en }), nn = { class: "mb-4
|
|
|
851
851
|
g(a, {
|
|
852
852
|
class: "min-w-[100px]",
|
|
853
853
|
color: "blue",
|
|
854
|
-
disabled: !
|
|
855
|
-
onClick: (p) =>
|
|
854
|
+
disabled: !i,
|
|
855
|
+
onClick: (p) => c(`${u}.bin`, i)
|
|
856
856
|
}, {
|
|
857
|
-
default:
|
|
858
|
-
|
|
857
|
+
default: x(() => [
|
|
858
|
+
H(_(d.$t("btnUpdate")), 1)
|
|
859
859
|
]),
|
|
860
860
|
_: 1
|
|
861
861
|
}, 8, ["disabled", "onClick"])
|
|
@@ -863,20 +863,20 @@ const tn = O({ name: "ri-arrow-right-s-line", render: en }), nn = { class: "mb-4
|
|
|
863
863
|
]);
|
|
864
864
|
};
|
|
865
865
|
}
|
|
866
|
-
}),
|
|
866
|
+
}), fs = {
|
|
867
867
|
viewBox: "0 0 24 24",
|
|
868
868
|
width: "1.2em",
|
|
869
869
|
height: "1.2em"
|
|
870
870
|
};
|
|
871
|
-
function
|
|
872
|
-
return f(), v("svg",
|
|
871
|
+
function ps(e, n) {
|
|
872
|
+
return f(), v("svg", fs, [...n[0] || (n[0] = [
|
|
873
873
|
o("path", {
|
|
874
874
|
fill: "currentColor",
|
|
875
875
|
d: "M12.172 12L9.343 9.173l1.415-1.414L15 12l-4.242 4.242l-1.415-1.414z"
|
|
876
876
|
}, null, -1)
|
|
877
877
|
])]);
|
|
878
878
|
}
|
|
879
|
-
const
|
|
879
|
+
const Re = O({ name: "ri-arrow-drop-right-line", render: ps }), vs = { class: "flex items-center gap-1.5" }, Ca = /* @__PURE__ */ M({
|
|
880
880
|
__name: "BlockBreadcrumb",
|
|
881
881
|
props: {
|
|
882
882
|
items: { default: () => [] }
|
|
@@ -884,51 +884,51 @@ const Oe = O({ name: "ri-arrow-drop-right-line", render: as }), is = { class: "f
|
|
|
884
884
|
emits: ["click"],
|
|
885
885
|
setup(e, { emit: n }) {
|
|
886
886
|
const l = n, s = (t) => l("click", t);
|
|
887
|
-
return (t,
|
|
888
|
-
const
|
|
887
|
+
return (t, r) => {
|
|
888
|
+
const c = Re;
|
|
889
889
|
return f(), v("nav", null, [
|
|
890
|
-
o("ol",
|
|
891
|
-
(f(!0), v(
|
|
892
|
-
key:
|
|
893
|
-
class:
|
|
890
|
+
o("ol", vs, [
|
|
891
|
+
(f(!0), v(L, null, N(e.items, (d, m) => (f(), v("li", {
|
|
892
|
+
key: m,
|
|
893
|
+
class: B(["inline-flex items-center gap-1.5 text-sm text-gray-500 dark:text-gray-400", d.path ? "" : "text-gray-800 dark:text-white/90"])
|
|
894
894
|
}, [
|
|
895
|
-
k(t.$slots, "default", { item:
|
|
896
|
-
(f(),
|
|
897
|
-
href:
|
|
898
|
-
onClick: (a) => s(
|
|
895
|
+
k(t.$slots, "default", { item: d }, () => [
|
|
896
|
+
(f(), D(re(d.path ? "a" : "span"), {
|
|
897
|
+
href: d.path,
|
|
898
|
+
onClick: (a) => s(d)
|
|
899
899
|
}, {
|
|
900
|
-
default:
|
|
901
|
-
|
|
900
|
+
default: x(() => [
|
|
901
|
+
H(_(d.name), 1)
|
|
902
902
|
]),
|
|
903
903
|
_: 2
|
|
904
904
|
}, 1032, ["href", "onClick"]))
|
|
905
905
|
]),
|
|
906
|
-
|
|
906
|
+
d.path ? (f(), D(c, {
|
|
907
907
|
key: 0,
|
|
908
908
|
class: "rotate-270"
|
|
909
|
-
})) :
|
|
909
|
+
})) : z("", !0)
|
|
910
910
|
], 2))), 128))
|
|
911
911
|
])
|
|
912
912
|
]);
|
|
913
913
|
};
|
|
914
914
|
}
|
|
915
|
-
}),
|
|
915
|
+
}), hs = {
|
|
916
916
|
viewBox: "0 0 24 24",
|
|
917
917
|
width: "1.2em",
|
|
918
918
|
height: "1.2em"
|
|
919
919
|
};
|
|
920
|
-
function
|
|
921
|
-
return f(), v("svg",
|
|
920
|
+
function gs(e, n) {
|
|
921
|
+
return f(), v("svg", hs, [...n[0] || (n[0] = [
|
|
922
922
|
o("path", {
|
|
923
923
|
fill: "currentColor",
|
|
924
924
|
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"
|
|
925
925
|
}, null, -1)
|
|
926
926
|
])]);
|
|
927
927
|
}
|
|
928
|
-
const
|
|
928
|
+
const bs = O({ name: "ri-file-copy2-line", render: gs }), xs = { class: "flex-auto flex justify-between" }, ys = { class: "text-sm text-gray-500 font-medium line-clamp-2 overflow-hidden" }, _s = { class: "text-sm text-ellipsis overflow-hidden text-nowrap" }, $s = {
|
|
929
929
|
key: 0,
|
|
930
930
|
class: "absolute left-1/2 top-1/2 size-[calc(50%)] text-gray-200/30 dark:text-gray-800/30 -translate-1/2"
|
|
931
|
-
},
|
|
931
|
+
}, ks = { class: "min-h-60 relative" }, ws = { class: "pt-6" }, Cs = { class: "text-center text-3xl text-ellipsis overflow-hidden" }, Ms = { class: "text-center text-xl mt-4" }, ae = /* @__PURE__ */ M({
|
|
932
932
|
__name: "CardBase",
|
|
933
933
|
props: {
|
|
934
934
|
size: {},
|
|
@@ -948,103 +948,103 @@ const ds = O({ name: "ri-file-copy2-line", render: cs }), us = { class: "flex-au
|
|
|
948
948
|
},
|
|
949
949
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
950
950
|
setup(e, { emit: n }) {
|
|
951
|
-
const l = e, s = n, t =
|
|
952
|
-
t.value = !1, s("close",
|
|
951
|
+
const l = e, s = n, t = E(!1), r = T(() => ["button", "dimmer"].includes(l.type || "") && l.value ? "text-amber-500" : "text-gray-400"), c = (u) => s("edit", u), d = (u) => s("clone", u), m = () => t.value = !0, a = (u) => s("open", u), i = (u) => {
|
|
952
|
+
t.value = !1, s("close", u);
|
|
953
953
|
};
|
|
954
|
-
return (
|
|
955
|
-
const b =
|
|
954
|
+
return (u, p) => {
|
|
955
|
+
const b = Ue, h = bs;
|
|
956
956
|
return f(), v("div", {
|
|
957
957
|
class: "glass-panel relative flex aspect-square cursor-pointer flex-col p-2 transition-all hover:border-primary/25 hover:shadow-[inset_0_1px_0_rgba(255,255,255,0.18),0_0_50px_-18px_rgba(40,183,240,0.25)]",
|
|
958
|
-
onClick:
|
|
958
|
+
onClick: m
|
|
959
959
|
}, [
|
|
960
|
-
o("div",
|
|
960
|
+
o("div", xs, [
|
|
961
961
|
o("div", {
|
|
962
|
-
class:
|
|
962
|
+
class: B([r.value, "size-8 animate-shake"])
|
|
963
963
|
}, [
|
|
964
|
-
k(
|
|
964
|
+
k(u.$slots, "icon", K(R(l)))
|
|
965
965
|
], 2),
|
|
966
|
-
k(
|
|
966
|
+
k(u.$slots, "header", K(R(l)))
|
|
967
967
|
]),
|
|
968
968
|
o("div", null, [
|
|
969
|
-
k(
|
|
970
|
-
o("h6",
|
|
971
|
-
k(
|
|
972
|
-
|
|
969
|
+
k(u.$slots, "body", K(R(l)), () => [
|
|
970
|
+
o("h6", ys, [
|
|
971
|
+
k(u.$slots, "name", K(R(l)), () => [
|
|
972
|
+
H(_(l.name), 1)
|
|
973
973
|
])
|
|
974
974
|
]),
|
|
975
|
-
o("div",
|
|
976
|
-
k(
|
|
977
|
-
|
|
975
|
+
o("div", _s, [
|
|
976
|
+
k(u.$slots, "value", K(R(l)), () => [
|
|
977
|
+
H(_(l.valueTo || l.value), 1)
|
|
978
978
|
])
|
|
979
979
|
])
|
|
980
980
|
])
|
|
981
981
|
]),
|
|
982
|
-
l.icon ? (f(), v("div",
|
|
983
|
-
k(
|
|
984
|
-
])) :
|
|
985
|
-
t.value ? (f(),
|
|
982
|
+
l.icon ? (f(), v("div", $s, [
|
|
983
|
+
k(u.$slots, "icon", K(R(l)))
|
|
984
|
+
])) : z("", !0),
|
|
985
|
+
t.value ? (f(), D(Oe, {
|
|
986
986
|
key: 1,
|
|
987
987
|
size: l.size || "sm",
|
|
988
988
|
title: e.name,
|
|
989
|
-
onClose:
|
|
989
|
+
onClose: i,
|
|
990
990
|
onOpen: a
|
|
991
991
|
}, {
|
|
992
|
-
"header-btn":
|
|
993
|
-
g(
|
|
992
|
+
"header-btn": x(() => [
|
|
993
|
+
g(A, {
|
|
994
994
|
color: "transparent",
|
|
995
|
-
onClick:
|
|
995
|
+
onClick: c
|
|
996
996
|
}, {
|
|
997
|
-
default:
|
|
997
|
+
default: x(() => [
|
|
998
998
|
g(b)
|
|
999
999
|
]),
|
|
1000
1000
|
_: 1
|
|
1001
1001
|
}),
|
|
1002
|
-
g(
|
|
1002
|
+
g(A, {
|
|
1003
1003
|
color: "transparent",
|
|
1004
|
-
onClick:
|
|
1004
|
+
onClick: d
|
|
1005
1005
|
}, {
|
|
1006
|
-
default:
|
|
1006
|
+
default: x(() => [
|
|
1007
1007
|
g(h, { class: "size-4 text-gray-500" })
|
|
1008
1008
|
]),
|
|
1009
1009
|
_: 1
|
|
1010
1010
|
})
|
|
1011
1011
|
]),
|
|
1012
|
-
default:
|
|
1013
|
-
o("div",
|
|
1014
|
-
o("div",
|
|
1015
|
-
o("h3",
|
|
1016
|
-
k(
|
|
1017
|
-
|
|
1012
|
+
default: x(() => [
|
|
1013
|
+
o("div", ks, [
|
|
1014
|
+
o("div", ws, [
|
|
1015
|
+
o("h3", Cs, [
|
|
1016
|
+
k(u.$slots, "dialog-name", K(R(l)), () => [
|
|
1017
|
+
H(_(l.name), 1)
|
|
1018
1018
|
])
|
|
1019
1019
|
]),
|
|
1020
|
-
k(
|
|
1021
|
-
o("p",
|
|
1022
|
-
k(
|
|
1023
|
-
|
|
1020
|
+
k(u.$slots, "dialog", K(R(l))),
|
|
1021
|
+
o("p", Ms, [
|
|
1022
|
+
k(u.$slots, "dialog-value", K(R(l)), () => [
|
|
1023
|
+
H(_(l.valueTo || l.value), 1)
|
|
1024
1024
|
])
|
|
1025
1025
|
])
|
|
1026
1026
|
])
|
|
1027
1027
|
])
|
|
1028
1028
|
]),
|
|
1029
1029
|
_: 3
|
|
1030
|
-
}, 8, ["size", "title"])) :
|
|
1030
|
+
}, 8, ["size", "title"])) : z("", !0)
|
|
1031
1031
|
]);
|
|
1032
1032
|
};
|
|
1033
1033
|
}
|
|
1034
|
-
}),
|
|
1034
|
+
}), zs = {
|
|
1035
1035
|
viewBox: "0 0 24 24",
|
|
1036
1036
|
width: "1.2em",
|
|
1037
1037
|
height: "1.2em"
|
|
1038
1038
|
};
|
|
1039
|
-
function
|
|
1040
|
-
return f(), v("svg",
|
|
1039
|
+
function Ss(e, n) {
|
|
1040
|
+
return f(), v("svg", zs, [...n[0] || (n[0] = [
|
|
1041
1041
|
o("path", {
|
|
1042
1042
|
fill: "currentColor",
|
|
1043
1043
|
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"
|
|
1044
1044
|
}, null, -1)
|
|
1045
1045
|
])]);
|
|
1046
1046
|
}
|
|
1047
|
-
const
|
|
1047
|
+
const Vs = O({ name: "ri-shut-down-line", render: Ss }), Ts = { class: "flex justify-end" }, Bs = { class: "flex justify-center py-4" }, Ma = /* @__PURE__ */ M({
|
|
1048
1048
|
__name: "CardButton",
|
|
1049
1049
|
props: {
|
|
1050
1050
|
size: {},
|
|
@@ -1064,43 +1064,43 @@ const _s = O({ name: "ri-shut-down-line", render: xs }), $s = { class: "flex jus
|
|
|
1064
1064
|
},
|
|
1065
1065
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
1066
1066
|
setup(e, { emit: n }) {
|
|
1067
|
-
const l = e, s = n, t = ({ opts:
|
|
1068
|
-
const { disabled:
|
|
1069
|
-
return { disabled:
|
|
1070
|
-
},
|
|
1071
|
-
return (
|
|
1072
|
-
const
|
|
1073
|
-
return f(),
|
|
1074
|
-
onClick:
|
|
1075
|
-
onEdit:
|
|
1076
|
-
onClone:
|
|
1067
|
+
const l = e, s = n, t = ({ opts: c = {} }) => {
|
|
1068
|
+
const { disabled: d } = c;
|
|
1069
|
+
return { disabled: d };
|
|
1070
|
+
}, r = () => s("setState", !l.value);
|
|
1071
|
+
return (c, d) => {
|
|
1072
|
+
const m = Vs;
|
|
1073
|
+
return f(), D(ae, j(l, {
|
|
1074
|
+
onClick: d[0] || (d[0] = (a) => s("click", a)),
|
|
1075
|
+
onEdit: d[1] || (d[1] = (a) => s("edit", a)),
|
|
1076
|
+
onClone: d[2] || (d[2] = (a) => s("clone", a))
|
|
1077
1077
|
}), {
|
|
1078
|
-
icon:
|
|
1079
|
-
k(
|
|
1078
|
+
icon: x((a) => [
|
|
1079
|
+
k(c.$slots, "icon", K(R(a)))
|
|
1080
1080
|
]),
|
|
1081
|
-
header:
|
|
1082
|
-
o("div",
|
|
1083
|
-
g(
|
|
1081
|
+
header: x((a) => [
|
|
1082
|
+
o("div", Ts, [
|
|
1083
|
+
g(A, j(t(a), {
|
|
1084
1084
|
type: "icon",
|
|
1085
1085
|
class: l.value ? "text-amber-500" : "text-gray-500",
|
|
1086
|
-
onClick:
|
|
1086
|
+
onClick: F(r, ["stop"])
|
|
1087
1087
|
}), {
|
|
1088
|
-
default:
|
|
1089
|
-
g(
|
|
1088
|
+
default: x(() => [
|
|
1089
|
+
g(m, { class: "size-8" })
|
|
1090
1090
|
]),
|
|
1091
1091
|
_: 1
|
|
1092
1092
|
}, 16, ["class"])
|
|
1093
1093
|
])
|
|
1094
1094
|
]),
|
|
1095
|
-
dialog:
|
|
1096
|
-
o("div",
|
|
1097
|
-
g(
|
|
1095
|
+
dialog: x((a) => [
|
|
1096
|
+
o("div", Bs, [
|
|
1097
|
+
g(A, j(t(a), {
|
|
1098
1098
|
type: "icon",
|
|
1099
1099
|
class: ["size-18", l.value ? "text-amber-500" : "text-gray-500"],
|
|
1100
|
-
onClick:
|
|
1100
|
+
onClick: F(r, ["stop"])
|
|
1101
1101
|
}), {
|
|
1102
|
-
default:
|
|
1103
|
-
g(
|
|
1102
|
+
default: x(() => [
|
|
1103
|
+
g(m, { class: "size-16" })
|
|
1104
1104
|
]),
|
|
1105
1105
|
_: 1
|
|
1106
1106
|
}, 16, ["class"])
|
|
@@ -1110,20 +1110,20 @@ const _s = O({ name: "ri-shut-down-line", render: xs }), $s = { class: "flex jus
|
|
|
1110
1110
|
}, 16);
|
|
1111
1111
|
};
|
|
1112
1112
|
}
|
|
1113
|
-
}),
|
|
1113
|
+
}), Es = {
|
|
1114
1114
|
viewBox: "0 0 24 24",
|
|
1115
1115
|
width: "1.2em",
|
|
1116
1116
|
height: "1.2em"
|
|
1117
1117
|
};
|
|
1118
|
-
function
|
|
1119
|
-
return f(), v("svg",
|
|
1118
|
+
function Ls(e, n) {
|
|
1119
|
+
return f(), v("svg", Es, [...n[0] || (n[0] = [
|
|
1120
1120
|
o("path", {
|
|
1121
1121
|
fill: "currentColor",
|
|
1122
1122
|
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"
|
|
1123
1123
|
}, null, -1)
|
|
1124
1124
|
])]);
|
|
1125
1125
|
}
|
|
1126
|
-
const
|
|
1126
|
+
const As = O({ name: "ri-time-line", render: Ls }), Ds = { class: "flex justify-center relative mx-2 my-6" }, za = /* @__PURE__ */ M({
|
|
1127
1127
|
__name: "CardDate",
|
|
1128
1128
|
props: {
|
|
1129
1129
|
size: {},
|
|
@@ -1143,56 +1143,56 @@ const Ss = O({ name: "ri-time-line", render: Cs }), zs = { class: "flex justify-
|
|
|
1143
1143
|
},
|
|
1144
1144
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
1145
1145
|
setup(e, { emit: n }) {
|
|
1146
|
-
const l = e, s = n, t =
|
|
1147
|
-
var
|
|
1148
|
-
const
|
|
1149
|
-
|
|
1150
|
-
},
|
|
1151
|
-
const { disabled: p } =
|
|
1152
|
-
return { label: a, modelValue: i
|
|
1153
|
-
},
|
|
1154
|
-
var
|
|
1155
|
-
const a = (
|
|
1146
|
+
const l = e, s = n, t = Ie("time"), r = (a) => new Date(+a * 1e3).toISOString().slice(0, 16), c = (a) => {
|
|
1147
|
+
var u;
|
|
1148
|
+
const i = (u = a == null ? void 0 : a.target) == null ? void 0 : u.valueAsNumber;
|
|
1149
|
+
i && s("setState", i / 1e3);
|
|
1150
|
+
}, d = ({ name: a, value: i, opts: u = {} }) => {
|
|
1151
|
+
const { disabled: p } = u;
|
|
1152
|
+
return { label: a, modelValue: r(i), disabled: p };
|
|
1153
|
+
}, m = () => {
|
|
1154
|
+
var i, u;
|
|
1155
|
+
const a = (u = (i = t.value) == null ? void 0 : i.$el) == null ? void 0 : u.querySelector("input");
|
|
1156
1156
|
a != null && a.showPicker && a.showPicker();
|
|
1157
1157
|
};
|
|
1158
|
-
return (a,
|
|
1159
|
-
const
|
|
1160
|
-
return f(),
|
|
1161
|
-
onClick:
|
|
1162
|
-
onEdit:
|
|
1163
|
-
onClone:
|
|
1158
|
+
return (a, i) => {
|
|
1159
|
+
const u = As;
|
|
1160
|
+
return f(), D(ae, j(l, {
|
|
1161
|
+
onClick: i[0] || (i[0] = (p) => s("click", p)),
|
|
1162
|
+
onEdit: i[1] || (i[1] = (p) => s("edit", p)),
|
|
1163
|
+
onClone: i[2] || (i[2] = (p) => s("clone", p))
|
|
1164
1164
|
}), {
|
|
1165
|
-
icon:
|
|
1166
|
-
k(a.$slots, "icon",
|
|
1165
|
+
icon: x((p) => [
|
|
1166
|
+
k(a.$slots, "icon", K(R(p)))
|
|
1167
1167
|
]),
|
|
1168
|
-
header:
|
|
1168
|
+
header: x((p) => [
|
|
1169
1169
|
o("div", null, [
|
|
1170
|
-
g(
|
|
1170
|
+
g(A, {
|
|
1171
1171
|
type: "icon",
|
|
1172
1172
|
class: "text-gray-500",
|
|
1173
|
-
onClick:
|
|
1173
|
+
onClick: F(m, ["stop"])
|
|
1174
1174
|
}, {
|
|
1175
|
-
default:
|
|
1176
|
-
g(
|
|
1175
|
+
default: x(() => [
|
|
1176
|
+
g(u, { class: "size-7" })
|
|
1177
1177
|
]),
|
|
1178
1178
|
_: 1
|
|
1179
1179
|
}),
|
|
1180
|
-
g(
|
|
1180
|
+
g(J, j({
|
|
1181
1181
|
ref_key: "time",
|
|
1182
1182
|
ref: t
|
|
1183
|
-
},
|
|
1183
|
+
}, d(p), {
|
|
1184
1184
|
type: "datetime-local",
|
|
1185
1185
|
class: "size-0",
|
|
1186
1186
|
hidden: "",
|
|
1187
|
-
onChange:
|
|
1187
|
+
onChange: c
|
|
1188
1188
|
}), null, 16)
|
|
1189
1189
|
])
|
|
1190
1190
|
]),
|
|
1191
|
-
dialog:
|
|
1192
|
-
o("div",
|
|
1193
|
-
g(
|
|
1191
|
+
dialog: x((p) => [
|
|
1192
|
+
o("div", Ds, [
|
|
1193
|
+
g(J, j(d(p), {
|
|
1194
1194
|
type: "datetime-local",
|
|
1195
|
-
onChange:
|
|
1195
|
+
onChange: c
|
|
1196
1196
|
}), null, 16)
|
|
1197
1197
|
])
|
|
1198
1198
|
]),
|
|
@@ -1200,15 +1200,15 @@ const Ss = O({ name: "ri-time-line", render: Cs }), zs = { class: "flex justify-
|
|
|
1200
1200
|
}, 16);
|
|
1201
1201
|
};
|
|
1202
1202
|
}
|
|
1203
|
-
}),
|
|
1204
|
-
class: /* @__PURE__ */
|
|
1205
|
-
},
|
|
1203
|
+
}), Is = { class: "flex justify-end" }, Hs = { class: "flex justify-end" }, js = {
|
|
1204
|
+
class: /* @__PURE__ */ B("text-blue-600 dark:text-blue-400")
|
|
1205
|
+
}, Ps = {
|
|
1206
1206
|
width: "30",
|
|
1207
1207
|
height: "30",
|
|
1208
1208
|
viewBox: "-7.5 -7.5 75 75",
|
|
1209
1209
|
version: "1.1",
|
|
1210
1210
|
style: { transform: "rotate(-90deg)" }
|
|
1211
|
-
},
|
|
1211
|
+
}, Ns = ["stroke-dashoffset"], Os = { class: "absolute top-1/2 left-1/2 -translate-1/2 text-white z-10 font-bold text-xl" }, Sa = /* @__PURE__ */ M({
|
|
1212
1212
|
__name: "CardDimmer",
|
|
1213
1213
|
props: {
|
|
1214
1214
|
size: {},
|
|
@@ -1228,31 +1228,31 @@ const Ss = O({ name: "ri-time-line", render: Cs }), zs = { class: "flex justify-
|
|
|
1228
1228
|
},
|
|
1229
1229
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
1230
1230
|
setup(e, { emit: n }) {
|
|
1231
|
-
const l = e, s = n, t =
|
|
1232
|
-
const { min: p = 0, max: b = 255, step: h = 1, disabled:
|
|
1233
|
-
return { min: p, max: b, step: h, value:
|
|
1234
|
-
},
|
|
1235
|
-
+
|
|
1231
|
+
const l = e, s = n, t = E(0), r = ({ opts: i, value: u }) => Math.round(100 * +u / ((i == null ? void 0 : i.max) || 255)), c = ({ opts: i, value: u }) => Math.round(187 - +u / ((i == null ? void 0 : i.max) || 255) * 187), d = ({ value: i, opts: u }) => {
|
|
1232
|
+
const { min: p = 0, max: b = 255, step: h = 1, disabled: y } = u || {};
|
|
1233
|
+
return { min: p, max: b, step: h, value: i, disabled: !!y, class: y ? "" : "cursor-pointer" };
|
|
1234
|
+
}, m = (i) => s("setState", +i.target.value || 0), a = ({ value: i }) => {
|
|
1235
|
+
+i != 0 ? (t.value = +i, s("setState", 0)) : s("setState", i ? 0 : t.value || 255);
|
|
1236
1236
|
};
|
|
1237
|
-
return (
|
|
1238
|
-
onClick:
|
|
1239
|
-
onEdit:
|
|
1240
|
-
onClone:
|
|
1237
|
+
return (i, u) => (f(), D(ae, j(l, {
|
|
1238
|
+
onClick: u[0] || (u[0] = (p) => s("click", p)),
|
|
1239
|
+
onEdit: u[1] || (u[1] = (p) => s("edit", p)),
|
|
1240
|
+
onClone: u[2] || (u[2] = (p) => s("clone", p))
|
|
1241
1241
|
}), {
|
|
1242
|
-
icon:
|
|
1243
|
-
k(
|
|
1242
|
+
icon: x((p) => [
|
|
1243
|
+
k(i.$slots, "icon", K(R(p)))
|
|
1244
1244
|
]),
|
|
1245
|
-
header:
|
|
1246
|
-
o("div",
|
|
1247
|
-
o("div",
|
|
1248
|
-
g(
|
|
1245
|
+
header: x((p) => [
|
|
1246
|
+
o("div", Is, [
|
|
1247
|
+
o("div", Hs, [
|
|
1248
|
+
g(A, j(d(p), {
|
|
1249
1249
|
type: "icon",
|
|
1250
|
-
onClick:
|
|
1250
|
+
onClick: F((b) => a(p), ["stop"])
|
|
1251
1251
|
}), {
|
|
1252
|
-
default:
|
|
1253
|
-
o("div",
|
|
1254
|
-
(f(), v("svg",
|
|
1255
|
-
|
|
1252
|
+
default: x(() => [
|
|
1253
|
+
o("div", js, [
|
|
1254
|
+
(f(), v("svg", Ps, [
|
|
1255
|
+
u[3] || (u[3] = o("circle", {
|
|
1256
1256
|
class: "stroke-gray-300 dark:stroke-gray-700",
|
|
1257
1257
|
r: "30",
|
|
1258
1258
|
cx: "30",
|
|
@@ -1267,10 +1267,10 @@ const Ss = O({ name: "ri-time-line", render: Cs }), zs = { class: "flex justify-
|
|
|
1267
1267
|
stroke: "currentColor",
|
|
1268
1268
|
"stroke-width": "8",
|
|
1269
1269
|
"stroke-linecap": "butt",
|
|
1270
|
-
"stroke-dashoffset":
|
|
1270
|
+
"stroke-dashoffset": c(p),
|
|
1271
1271
|
fill: "transparent",
|
|
1272
1272
|
"stroke-dasharray": "187"
|
|
1273
|
-
}, null, 8,
|
|
1273
|
+
}, null, 8, Ns)
|
|
1274
1274
|
]))
|
|
1275
1275
|
])
|
|
1276
1276
|
]),
|
|
@@ -1279,26 +1279,26 @@ const Ss = O({ name: "ri-time-line", render: Cs }), zs = { class: "flex justify-
|
|
|
1279
1279
|
])
|
|
1280
1280
|
])
|
|
1281
1281
|
]),
|
|
1282
|
-
dialog:
|
|
1282
|
+
dialog: x((p) => [
|
|
1283
1283
|
o("div", {
|
|
1284
|
-
class:
|
|
1284
|
+
class: B(["flex justify-center relative mx-2 my-6", d(p).disabled ? "opacity-40" : ""])
|
|
1285
1285
|
}, [
|
|
1286
|
-
|
|
1286
|
+
u[4] || (u[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)),
|
|
1287
1287
|
o("div", {
|
|
1288
1288
|
class: "absolute h-10 top-0 left-0 bg-blue-600 dark:bg-blue-400 z-0 rounded-md transition-[width_0.3s_linear]",
|
|
1289
|
-
style:
|
|
1289
|
+
style: ve(`width: ${r(p)}%`)
|
|
1290
1290
|
}, null, 4),
|
|
1291
|
-
o("div",
|
|
1292
|
-
o("input",
|
|
1291
|
+
o("div", Os, _(r(p)) + " %", 1),
|
|
1292
|
+
o("input", j({ type: "range" }, d(p), {
|
|
1293
1293
|
class: "w-full h-10 z-10 appearance-none opacity-0",
|
|
1294
|
-
onChange:
|
|
1294
|
+
onChange: m
|
|
1295
1295
|
}), null, 16)
|
|
1296
1296
|
], 2)
|
|
1297
1297
|
]),
|
|
1298
1298
|
_: 3
|
|
1299
1299
|
}, 16));
|
|
1300
1300
|
}
|
|
1301
|
-
}),
|
|
1301
|
+
}), Va = /* @__PURE__ */ M({
|
|
1302
1302
|
__name: "CardInfo",
|
|
1303
1303
|
props: {
|
|
1304
1304
|
size: {},
|
|
@@ -1319,21 +1319,21 @@ const Ss = O({ name: "ri-time-line", render: Cs }), zs = { class: "flex justify-
|
|
|
1319
1319
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
1320
1320
|
setup(e, { emit: n }) {
|
|
1321
1321
|
const l = e, s = n;
|
|
1322
|
-
return (t,
|
|
1323
|
-
onClick:
|
|
1324
|
-
onEdit:
|
|
1325
|
-
onClone:
|
|
1322
|
+
return (t, r) => (f(), D(ae, j(l, {
|
|
1323
|
+
onClick: r[0] || (r[0] = (c) => s("click", c)),
|
|
1324
|
+
onEdit: r[1] || (r[1] = (c) => s("edit", c)),
|
|
1325
|
+
onClone: r[2] || (r[2] = (c) => s("clone", c))
|
|
1326
1326
|
}), {
|
|
1327
|
-
icon:
|
|
1328
|
-
k(t.$slots, "icon",
|
|
1327
|
+
icon: x((c) => [
|
|
1328
|
+
k(t.$slots, "icon", K(R(c)))
|
|
1329
1329
|
]),
|
|
1330
|
-
default:
|
|
1330
|
+
default: x(() => [
|
|
1331
1331
|
k(t.$slots, "dialog")
|
|
1332
1332
|
]),
|
|
1333
1333
|
_: 3
|
|
1334
1334
|
}, 16));
|
|
1335
1335
|
}
|
|
1336
|
-
}),
|
|
1336
|
+
}), Us = { class: "flex justify-center relative mx-2 my-6" }, Ta = /* @__PURE__ */ M({
|
|
1337
1337
|
__name: "CardInput",
|
|
1338
1338
|
props: {
|
|
1339
1339
|
size: {},
|
|
@@ -1353,35 +1353,35 @@ const Ss = O({ name: "ri-time-line", render: Cs }), zs = { class: "flex justify-
|
|
|
1353
1353
|
},
|
|
1354
1354
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
1355
1355
|
setup(e, { emit: n }) {
|
|
1356
|
-
const l = e, s = n, t =
|
|
1357
|
-
const { disabled: a } =
|
|
1358
|
-
return { label:
|
|
1359
|
-
},
|
|
1360
|
-
return
|
|
1356
|
+
const l = e, s = n, t = E(l.value || ""), r = ({ name: d, opts: m = {} }) => {
|
|
1357
|
+
const { disabled: a } = m;
|
|
1358
|
+
return { label: d, disabled: a };
|
|
1359
|
+
}, c = (d) => s("setState", d.target.value);
|
|
1360
|
+
return oe(
|
|
1361
1361
|
() => l.value,
|
|
1362
|
-
(
|
|
1363
|
-
t.value =
|
|
1362
|
+
(d) => {
|
|
1363
|
+
t.value = d;
|
|
1364
1364
|
}
|
|
1365
|
-
), (
|
|
1366
|
-
const a =
|
|
1367
|
-
return f(),
|
|
1368
|
-
onClick:
|
|
1369
|
-
onEdit:
|
|
1370
|
-
onClone:
|
|
1365
|
+
), (d, m) => {
|
|
1366
|
+
const a = Re;
|
|
1367
|
+
return f(), D(ae, j(l, {
|
|
1368
|
+
onClick: m[1] || (m[1] = (i) => s("click", i)),
|
|
1369
|
+
onEdit: m[2] || (m[2] = (i) => s("edit", i)),
|
|
1370
|
+
onClone: m[3] || (m[3] = (i) => s("clone", i))
|
|
1371
1371
|
}), {
|
|
1372
|
-
icon:
|
|
1373
|
-
k(
|
|
1372
|
+
icon: x((i) => [
|
|
1373
|
+
k(d.$slots, "icon", K(R(i)))
|
|
1374
1374
|
]),
|
|
1375
|
-
dialog:
|
|
1376
|
-
o("div",
|
|
1377
|
-
g(
|
|
1375
|
+
dialog: x((i) => [
|
|
1376
|
+
o("div", Us, [
|
|
1377
|
+
g(J, j({
|
|
1378
1378
|
modelValue: t.value,
|
|
1379
|
-
"onUpdate:modelValue":
|
|
1380
|
-
}, i
|
|
1381
|
-
onEnter:
|
|
1382
|
-
onBlur:
|
|
1379
|
+
"onUpdate:modelValue": m[0] || (m[0] = (u) => t.value = u)
|
|
1380
|
+
}, r(i), {
|
|
1381
|
+
onEnter: c,
|
|
1382
|
+
onBlur: c
|
|
1383
1383
|
}), {
|
|
1384
|
-
icon:
|
|
1384
|
+
icon: x(() => [
|
|
1385
1385
|
g(a, { class: "size-8" })
|
|
1386
1386
|
]),
|
|
1387
1387
|
_: 1
|
|
@@ -1392,20 +1392,20 @@ const Ss = O({ name: "ri-time-line", render: Cs }), zs = { class: "flex justify-
|
|
|
1392
1392
|
}, 16);
|
|
1393
1393
|
};
|
|
1394
1394
|
}
|
|
1395
|
-
}),
|
|
1395
|
+
}), Ks = {
|
|
1396
1396
|
viewBox: "0 0 24 24",
|
|
1397
1397
|
width: "1.2em",
|
|
1398
1398
|
height: "1.2em"
|
|
1399
1399
|
};
|
|
1400
|
-
function
|
|
1401
|
-
return f(), v("svg",
|
|
1400
|
+
function Rs(e, n) {
|
|
1401
|
+
return f(), v("svg", Ks, [...n[0] || (n[0] = [
|
|
1402
1402
|
o("path", {
|
|
1403
1403
|
fill: "currentColor",
|
|
1404
1404
|
d: "M8 4h13v2H8zm-5-.5h3v3H3zm0 7h3v3H3zm0 7h3v3H3zM8 11h13v2H8zm0 7h13v2H8z"
|
|
1405
1405
|
}, null, -1)
|
|
1406
1406
|
])]);
|
|
1407
1407
|
}
|
|
1408
|
-
const
|
|
1408
|
+
const Fs = O({ name: "ri-list-check", render: Rs }), Ws = { class: "flex justify-center py-4" }, Ba = /* @__PURE__ */ M({
|
|
1409
1409
|
__name: "CardList",
|
|
1410
1410
|
props: {
|
|
1411
1411
|
size: {},
|
|
@@ -1425,48 +1425,48 @@ const js = O({ name: "ri-list-check", render: Is }), Ps = { class: "flex justify
|
|
|
1425
1425
|
},
|
|
1426
1426
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
1427
1427
|
setup(e, { emit: n }) {
|
|
1428
|
-
const l = e, s = n, t = ({ value:
|
|
1428
|
+
const l = e, s = n, t = ({ value: d }) => s("setState", d), r = ({ opts: d, value: m }) => {
|
|
1429
1429
|
var a;
|
|
1430
|
-
return Array.isArray(
|
|
1431
|
-
},
|
|
1430
|
+
return Array.isArray(d == null ? void 0 : d.items) && ((a = d == null ? void 0 : d.items.find((i) => i.value == m)) == null ? void 0 : a.name) || m;
|
|
1431
|
+
}, c = ({ name: d, value: m, opts: a = {} }) => {
|
|
1432
1432
|
var b;
|
|
1433
|
-
const { items:
|
|
1434
|
-
return { label:
|
|
1433
|
+
const { items: i = [], disabled: u } = a, p = ((b = i.find((h) => h.value == m)) == null ? void 0 : b.name) || m;
|
|
1434
|
+
return { label: d, modelValue: p, items: i, disabled: !!u };
|
|
1435
1435
|
};
|
|
1436
|
-
return (
|
|
1437
|
-
const a =
|
|
1438
|
-
return f(),
|
|
1439
|
-
onClick:
|
|
1440
|
-
onEdit:
|
|
1441
|
-
onClone:
|
|
1436
|
+
return (d, m) => {
|
|
1437
|
+
const a = Fs;
|
|
1438
|
+
return f(), D(ae, j(l, {
|
|
1439
|
+
onClick: m[1] || (m[1] = (i) => s("click", i)),
|
|
1440
|
+
onEdit: m[2] || (m[2] = (i) => s("edit", i)),
|
|
1441
|
+
onClone: m[3] || (m[3] = (i) => s("clone", i))
|
|
1442
1442
|
}), {
|
|
1443
|
-
icon:
|
|
1444
|
-
k(
|
|
1443
|
+
icon: x((i) => [
|
|
1444
|
+
k(d.$slots, "icon", K(R(i)))
|
|
1445
1445
|
]),
|
|
1446
|
-
value:
|
|
1447
|
-
|
|
1446
|
+
value: x((i) => [
|
|
1447
|
+
H(_(r(i)), 1)
|
|
1448
1448
|
]),
|
|
1449
|
-
"dialog-value":
|
|
1450
|
-
|
|
1449
|
+
"dialog-value": x((i) => [
|
|
1450
|
+
H(_(r(i)), 1)
|
|
1451
1451
|
]),
|
|
1452
|
-
header:
|
|
1452
|
+
header: x((i) => [
|
|
1453
1453
|
o("div", {
|
|
1454
|
-
onClick:
|
|
1454
|
+
onClick: m[0] || (m[0] = F(() => {
|
|
1455
1455
|
}, ["prevent", "stop"]))
|
|
1456
1456
|
}, [
|
|
1457
|
-
g(
|
|
1457
|
+
g(le, j(c(i), {
|
|
1458
1458
|
"is-popup": "",
|
|
1459
1459
|
top: "0",
|
|
1460
1460
|
left: "-115px",
|
|
1461
1461
|
onChange: t
|
|
1462
1462
|
}), {
|
|
1463
|
-
activator:
|
|
1464
|
-
g(
|
|
1463
|
+
activator: x(({ on: u }) => [
|
|
1464
|
+
g(A, {
|
|
1465
1465
|
type: "icon",
|
|
1466
1466
|
class: "text-gray-500",
|
|
1467
|
-
onClick:
|
|
1467
|
+
onClick: F(u.click, ["stop"])
|
|
1468
1468
|
}, {
|
|
1469
|
-
default:
|
|
1469
|
+
default: x(() => [
|
|
1470
1470
|
g(a, { class: "size-6" })
|
|
1471
1471
|
]),
|
|
1472
1472
|
_: 1
|
|
@@ -1476,9 +1476,9 @@ const js = O({ name: "ri-list-check", render: Is }), Ps = { class: "flex justify
|
|
|
1476
1476
|
}, 16)
|
|
1477
1477
|
])
|
|
1478
1478
|
]),
|
|
1479
|
-
dialog:
|
|
1480
|
-
o("div",
|
|
1481
|
-
g(
|
|
1479
|
+
dialog: x((i) => [
|
|
1480
|
+
o("div", Ws, [
|
|
1481
|
+
g(le, j(c(i), {
|
|
1482
1482
|
top: "-50%",
|
|
1483
1483
|
left: "50%",
|
|
1484
1484
|
onChange: t
|
|
@@ -1489,33 +1489,33 @@ const js = O({ name: "ri-list-check", render: Is }), Ps = { class: "flex justify
|
|
|
1489
1489
|
}, 16);
|
|
1490
1490
|
};
|
|
1491
1491
|
}
|
|
1492
|
-
}),
|
|
1492
|
+
}), qs = {
|
|
1493
1493
|
viewBox: "0 0 24 24",
|
|
1494
1494
|
width: "1.2em",
|
|
1495
1495
|
height: "1.2em"
|
|
1496
1496
|
};
|
|
1497
|
-
function
|
|
1498
|
-
return f(), v("svg",
|
|
1497
|
+
function Gs(e, n) {
|
|
1498
|
+
return f(), v("svg", qs, [...n[0] || (n[0] = [
|
|
1499
1499
|
o("path", {
|
|
1500
1500
|
fill: "currentColor",
|
|
1501
1501
|
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"
|
|
1502
1502
|
}, null, -1)
|
|
1503
1503
|
])]);
|
|
1504
1504
|
}
|
|
1505
|
-
const
|
|
1505
|
+
const Js = O({ name: "ri-menu-search-line", render: Gs }), Zs = {
|
|
1506
1506
|
viewBox: "0 0 24 24",
|
|
1507
1507
|
width: "1.2em",
|
|
1508
1508
|
height: "1.2em"
|
|
1509
1509
|
};
|
|
1510
|
-
function
|
|
1511
|
-
return f(), v("svg",
|
|
1510
|
+
function Xs(e, n) {
|
|
1511
|
+
return f(), v("svg", Zs, [...n[0] || (n[0] = [
|
|
1512
1512
|
o("path", {
|
|
1513
1513
|
fill: "currentColor",
|
|
1514
1514
|
d: "M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"
|
|
1515
1515
|
}, null, -1)
|
|
1516
1516
|
])]);
|
|
1517
1517
|
}
|
|
1518
|
-
const
|
|
1518
|
+
const ge = O({ name: "ri-add-line", render: Xs }), Ys = { class: "flex w-full relative" }, Qs = { class: "flex gap-2 flex-wrap flex-auto px-2 py-1" }, el = ["disabled"], Fe = /* @__PURE__ */ M({
|
|
1519
1519
|
__name: "VTextWrapper",
|
|
1520
1520
|
props: {
|
|
1521
1521
|
active: { type: Boolean },
|
|
@@ -1525,66 +1525,66 @@ const ve = O({ name: "ri-add-line", render: Us }), Rs = { class: "flex w-full re
|
|
|
1525
1525
|
},
|
|
1526
1526
|
emits: ["icon"],
|
|
1527
1527
|
setup(e, { emit: n }) {
|
|
1528
|
-
const l = n, s =
|
|
1529
|
-
return (
|
|
1530
|
-
const
|
|
1531
|
-
return f(), v("div",
|
|
1528
|
+
const l = n, s = T(() => e.active ? "top-0 left-3 text-xs" : "top-1/2"), t = T(() => [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"]);
|
|
1529
|
+
return (r, c) => {
|
|
1530
|
+
const d = ge;
|
|
1531
|
+
return f(), v("div", Ys, [
|
|
1532
1532
|
o("div", {
|
|
1533
|
-
class:
|
|
1533
|
+
class: B(["glass-inset relative flex min-h-[40px] w-full items-center rounded-md transition focus-within:border-primary/60", t.value])
|
|
1534
1534
|
}, [
|
|
1535
1535
|
o("span", {
|
|
1536
|
-
class:
|
|
1537
|
-
},
|
|
1538
|
-
o("div",
|
|
1539
|
-
k(
|
|
1536
|
+
class: B(["absolute left-4 transition-all rounded -translate-y-1/2 text-gray-600 dark:text-gray-400", s.value])
|
|
1537
|
+
}, _(e.label), 3),
|
|
1538
|
+
o("div", Qs, [
|
|
1539
|
+
k(r.$slots, "default")
|
|
1540
1540
|
]),
|
|
1541
|
-
e.hideIcon ?
|
|
1541
|
+
e.hideIcon ? z("", !0) : (f(), v("button", {
|
|
1542
1542
|
key: 0,
|
|
1543
1543
|
disabled: e.disabled,
|
|
1544
|
-
class:
|
|
1545
|
-
onClick:
|
|
1544
|
+
class: B([{ "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]"]),
|
|
1545
|
+
onClick: c[0] || (c[0] = (m) => l("icon", m))
|
|
1546
1546
|
}, [
|
|
1547
|
-
k(
|
|
1548
|
-
g(
|
|
1547
|
+
k(r.$slots, "icon", {}, () => [
|
|
1548
|
+
g(d, { class: "size-4" })
|
|
1549
1549
|
])
|
|
1550
|
-
], 10,
|
|
1550
|
+
], 10, el))
|
|
1551
1551
|
], 2)
|
|
1552
1552
|
]);
|
|
1553
1553
|
};
|
|
1554
1554
|
}
|
|
1555
|
-
}),
|
|
1555
|
+
}), tl = {
|
|
1556
1556
|
viewBox: "0 0 24 24",
|
|
1557
1557
|
width: "1.2em",
|
|
1558
1558
|
height: "1.2em"
|
|
1559
1559
|
};
|
|
1560
|
-
function
|
|
1561
|
-
return f(), v("svg",
|
|
1560
|
+
function nl(e, n) {
|
|
1561
|
+
return f(), v("svg", tl, [...n[0] || (n[0] = [
|
|
1562
1562
|
o("path", {
|
|
1563
1563
|
fill: "currentColor",
|
|
1564
1564
|
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"
|
|
1565
1565
|
}, null, -1)
|
|
1566
1566
|
])]);
|
|
1567
1567
|
}
|
|
1568
|
-
const
|
|
1568
|
+
const sl = O({ name: "ri-file-copy-line", render: nl }), ll = {
|
|
1569
1569
|
viewBox: "0 0 24 24",
|
|
1570
1570
|
width: "1.2em",
|
|
1571
1571
|
height: "1.2em"
|
|
1572
1572
|
};
|
|
1573
|
-
function
|
|
1574
|
-
return f(), v("svg",
|
|
1573
|
+
function ol(e, n) {
|
|
1574
|
+
return f(), v("svg", ll, [...n[0] || (n[0] = [
|
|
1575
1575
|
o("path", {
|
|
1576
1576
|
fill: "currentColor",
|
|
1577
1577
|
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"
|
|
1578
1578
|
}, null, -1)
|
|
1579
1579
|
])]);
|
|
1580
1580
|
}
|
|
1581
|
-
const
|
|
1581
|
+
const al = O({ name: "ri-folder6-line", render: ol }), il = ["onClick"], rl = {
|
|
1582
1582
|
key: 0,
|
|
1583
1583
|
class: "me-1"
|
|
1584
|
-
},
|
|
1584
|
+
}, dl = { class: "dark:text-gray-300" }, cl = { class: "flex gap-3 items-center z-10" }, ul = {
|
|
1585
1585
|
key: 0,
|
|
1586
1586
|
class: "flex ps-5"
|
|
1587
|
-
},
|
|
1587
|
+
}, ml = { class: "font-medium dark:text-gray-300" }, We = /* @__PURE__ */ M({
|
|
1588
1588
|
__name: "VListObject",
|
|
1589
1589
|
props: {
|
|
1590
1590
|
items: { default: () => ({}) },
|
|
@@ -1593,81 +1593,81 @@ const Ys = O({ name: "ri-folder6-line", render: Xs }), Qs = ["onClick"], el = {
|
|
|
1593
1593
|
},
|
|
1594
1594
|
emits: ["click"],
|
|
1595
1595
|
setup(e, { emit: n }) {
|
|
1596
|
-
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 =
|
|
1596
|
+
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 = E({}), { text: r, copy: c, copied: d, isSupported: m } = _t(), a = (b) => {
|
|
1597
1597
|
t.value[b] = !t.value[b];
|
|
1598
|
-
},
|
|
1599
|
-
l("click", { key: b, path:
|
|
1598
|
+
}, i = (b) => typeof b == "object", u = (b) => `${e.path ? e.path + "." : ""}${b}`, p = (b, h) => {
|
|
1599
|
+
l("click", { key: b, path: u(b), isObject: h });
|
|
1600
1600
|
};
|
|
1601
1601
|
return (b, h) => {
|
|
1602
|
-
const
|
|
1602
|
+
const y = al, S = sl, V = ge;
|
|
1603
1603
|
return f(), v("ul", null, [
|
|
1604
|
-
(f(!0), v(
|
|
1605
|
-
key:
|
|
1606
|
-
class:
|
|
1604
|
+
(f(!0), v(L, null, N(e.items, (w, P) => (f(), v("li", {
|
|
1605
|
+
key: P,
|
|
1606
|
+
class: B(i(w) ? "" : `flex items-center ${s()}`)
|
|
1607
1607
|
}, [
|
|
1608
1608
|
o("div", {
|
|
1609
|
-
class:
|
|
1610
|
-
onClick: (
|
|
1609
|
+
class: B(["flex items-center cursor-pointer ps-2 h-8", i(w) ? `${s()}` : ""]),
|
|
1610
|
+
onClick: (Z) => a(P)
|
|
1611
1611
|
}, [
|
|
1612
|
-
|
|
1613
|
-
g(
|
|
1614
|
-
])) :
|
|
1615
|
-
o("div",
|
|
1616
|
-
|
|
1612
|
+
i(w) ? (f(), v("div", rl, [
|
|
1613
|
+
g(y, { class: "size-5" })
|
|
1614
|
+
])) : z("", !0),
|
|
1615
|
+
o("div", dl, _(P), 1),
|
|
1616
|
+
q(m) ? (f(), D(A, {
|
|
1617
1617
|
key: 1,
|
|
1618
1618
|
class: "opacity-20 hover:opacity-70 transition-all",
|
|
1619
1619
|
color: "transparent",
|
|
1620
1620
|
size: "sm",
|
|
1621
|
-
onClick:
|
|
1621
|
+
onClick: F((Z) => q(c)(u(P)), ["stop"])
|
|
1622
1622
|
}, {
|
|
1623
|
-
default:
|
|
1624
|
-
g(
|
|
1623
|
+
default: x(() => [
|
|
1624
|
+
g(S, { class: "size-5" })
|
|
1625
1625
|
]),
|
|
1626
1626
|
_: 1
|
|
1627
|
-
}, 8, ["onClick"])) :
|
|
1628
|
-
|
|
1627
|
+
}, 8, ["onClick"])) : z("", !0),
|
|
1628
|
+
q(r) === u(P) ? (f(), v("span", {
|
|
1629
1629
|
key: 2,
|
|
1630
|
-
class:
|
|
1631
|
-
},
|
|
1632
|
-
!e.onlyValue &&
|
|
1630
|
+
class: B(["text-gray-500 transition-all duration-1000 text-sm", q(d) ? "opacity-100" : "opacity-0"])
|
|
1631
|
+
}, _(b.$t("copied")), 3)) : z("", !0),
|
|
1632
|
+
!e.onlyValue && i(w) ? (f(), v(L, { key: 3 }, [
|
|
1633
1633
|
h[1] || (h[1] = o("div", { class: "flex-auto" }, null, -1)),
|
|
1634
|
-
o("div",
|
|
1635
|
-
g(
|
|
1634
|
+
o("div", cl, [
|
|
1635
|
+
g(A, {
|
|
1636
1636
|
class: "opacity-20 hover:opacity-70 transition-all",
|
|
1637
1637
|
color: "transparent",
|
|
1638
1638
|
size: "sm",
|
|
1639
1639
|
title: b.$t("add"),
|
|
1640
|
-
onClick:
|
|
1640
|
+
onClick: F((Z) => p(P, i(w)), ["stop"])
|
|
1641
1641
|
}, {
|
|
1642
|
-
default:
|
|
1642
|
+
default: x(() => [
|
|
1643
1643
|
g(V, { class: "size-5" })
|
|
1644
1644
|
]),
|
|
1645
1645
|
_: 1
|
|
1646
1646
|
}, 8, ["title", "onClick"])
|
|
1647
1647
|
])
|
|
1648
|
-
], 64)) :
|
|
1649
|
-
], 10,
|
|
1650
|
-
|
|
1651
|
-
|
|
1648
|
+
], 64)) : z("", !0)
|
|
1649
|
+
], 10, il),
|
|
1650
|
+
i(w) ? (f(), v("div", ul, [
|
|
1651
|
+
he(g(We, {
|
|
1652
1652
|
class: "flex-auto",
|
|
1653
|
-
path:
|
|
1653
|
+
path: u(P),
|
|
1654
1654
|
items: w,
|
|
1655
1655
|
onlyValue: e.onlyValue,
|
|
1656
|
-
onClick: h[0] || (h[0] = (
|
|
1656
|
+
onClick: h[0] || (h[0] = (Z) => l("click", Z))
|
|
1657
1657
|
}, null, 8, ["path", "items", "onlyValue"]), [
|
|
1658
|
-
[
|
|
1658
|
+
[st, t.value[P]]
|
|
1659
1659
|
])
|
|
1660
|
-
])) : (f(), v(
|
|
1660
|
+
])) : (f(), v(L, { key: 1 }, [
|
|
1661
1661
|
h[2] || (h[2] = o("div", { class: "flex-auto gap-3" }, null, -1)),
|
|
1662
|
-
o("div",
|
|
1663
|
-
g(
|
|
1662
|
+
o("div", ml, _(w), 1),
|
|
1663
|
+
g(A, {
|
|
1664
1664
|
class: "opacity-20 hover:opacity-70 transition-all",
|
|
1665
1665
|
color: "gray",
|
|
1666
1666
|
size: "sm",
|
|
1667
1667
|
title: b.$t("add"),
|
|
1668
|
-
onClick:
|
|
1668
|
+
onClick: F((Z) => p(P, i(w)), ["stop"])
|
|
1669
1669
|
}, {
|
|
1670
|
-
default:
|
|
1670
|
+
default: x(() => [
|
|
1671
1671
|
g(V, { class: "size-5" })
|
|
1672
1672
|
]),
|
|
1673
1673
|
_: 1
|
|
@@ -1677,7 +1677,7 @@ const Ys = O({ name: "ri-folder6-line", render: Xs }), Qs = ["onClick"], el = {
|
|
|
1677
1677
|
]);
|
|
1678
1678
|
};
|
|
1679
1679
|
}
|
|
1680
|
-
}),
|
|
1680
|
+
}), fl = { class: "glass-inset rounded-md p-1" }, pl = { class: "flex gap-1" }, vl = ["onClick"], hl = { class: "px-4 py-2" }, gl = { class: "relative my-4" }, bl = { key: 0 }, xl = /* @__PURE__ */ M({
|
|
1681
1681
|
__name: "VTabs",
|
|
1682
1682
|
props: {
|
|
1683
1683
|
value: {},
|
|
@@ -1685,46 +1685,46 @@ const Ys = O({ name: "ri-folder6-line", render: Xs }), Qs = ["onClick"], el = {
|
|
|
1685
1685
|
},
|
|
1686
1686
|
emits: ["click"],
|
|
1687
1687
|
setup(e, { expose: n, emit: l }) {
|
|
1688
|
-
const s = l, t =
|
|
1689
|
-
t.value ===
|
|
1690
|
-
],
|
|
1691
|
-
t.value =
|
|
1688
|
+
const s = l, t = E(e.value || 0), r = (d) => [
|
|
1689
|
+
t.value === d ? "bg-primary/10 text-primary" : "text-gray-500 hover:bg-white/5 dark:text-white/50 dark:hover:bg-white/5"
|
|
1690
|
+
], c = (d) => {
|
|
1691
|
+
t.value = d, s("click", d);
|
|
1692
1692
|
};
|
|
1693
1693
|
return n({
|
|
1694
|
-
setActiveTab:
|
|
1694
|
+
setActiveTab: c,
|
|
1695
1695
|
activeTab: t
|
|
1696
|
-
}), (
|
|
1697
|
-
o("div",
|
|
1698
|
-
o("div",
|
|
1699
|
-
(f(!0), v(
|
|
1700
|
-
key:
|
|
1696
|
+
}), (d, m) => (f(), v("div", null, [
|
|
1697
|
+
o("div", fl, [
|
|
1698
|
+
o("div", pl, [
|
|
1699
|
+
(f(!0), v(L, null, N(e.items, (a, i) => (f(), v("div", {
|
|
1700
|
+
key: i,
|
|
1701
1701
|
class: "relative flex-auto"
|
|
1702
1702
|
}, [
|
|
1703
1703
|
o("button", {
|
|
1704
1704
|
type: "button",
|
|
1705
1705
|
class: "w-full",
|
|
1706
|
-
onClick: (
|
|
1706
|
+
onClick: (u) => c(i)
|
|
1707
1707
|
}, [
|
|
1708
1708
|
o("div", {
|
|
1709
|
-
class:
|
|
1709
|
+
class: B([r(i), "rounded-md px-3 py-2 font-medium text-lg transition"])
|
|
1710
1710
|
}, [
|
|
1711
|
-
k(
|
|
1711
|
+
k(d.$slots, "header", {
|
|
1712
1712
|
tab: a,
|
|
1713
|
-
i
|
|
1713
|
+
i
|
|
1714
1714
|
}, () => [
|
|
1715
|
-
o("div",
|
|
1715
|
+
o("div", hl, _(a.title), 1)
|
|
1716
1716
|
])
|
|
1717
1717
|
], 2)
|
|
1718
|
-
], 8,
|
|
1718
|
+
], 8, vl)
|
|
1719
1719
|
]))), 128))
|
|
1720
1720
|
])
|
|
1721
1721
|
]),
|
|
1722
|
-
o("div",
|
|
1723
|
-
(f(!0), v(
|
|
1724
|
-
key:
|
|
1722
|
+
o("div", gl, [
|
|
1723
|
+
(f(!0), v(L, null, N(e.items, (a, i) => (f(), v("div", {
|
|
1724
|
+
key: i,
|
|
1725
1725
|
class: "tab-panel"
|
|
1726
1726
|
}, [
|
|
1727
|
-
g(
|
|
1727
|
+
g(ke, {
|
|
1728
1728
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
1729
1729
|
"enter-from-class": "transform opacity-0 translate-x-2",
|
|
1730
1730
|
"enter-to-class": "transform opacity-100 translate-x-0",
|
|
@@ -1732,10 +1732,10 @@ const Ys = O({ name: "ri-folder6-line", render: Xs }), Qs = ["onClick"], el = {
|
|
|
1732
1732
|
"leave-from-class": "transform opacity-100 translate-x-0",
|
|
1733
1733
|
"leave-to-class": "transform opacity-0 -translate-x-2"
|
|
1734
1734
|
}, {
|
|
1735
|
-
default:
|
|
1736
|
-
t.value ===
|
|
1737
|
-
k(
|
|
1738
|
-
])) :
|
|
1735
|
+
default: x(() => [
|
|
1736
|
+
t.value === i ? (f(), v("div", bl, [
|
|
1737
|
+
k(d.$slots, `tab-${i}`)
|
|
1738
|
+
])) : z("", !0)
|
|
1739
1739
|
]),
|
|
1740
1740
|
_: 2
|
|
1741
1741
|
}, 1024)
|
|
@@ -1743,7 +1743,7 @@ const Ys = O({ name: "ri-folder6-line", render: Xs }), Qs = ["onClick"], el = {
|
|
|
1743
1743
|
])
|
|
1744
1744
|
]));
|
|
1745
1745
|
}
|
|
1746
|
-
}),
|
|
1746
|
+
}), yl = { class: "flex gap-1 text-amber-500 self-start text-nowrap select-none" }, _l = ["title", "onMouseenter", "onMouseleave"], $l = { class: "flex flex-auto" }, kl = ["disabled"], xe = /* @__PURE__ */ M({
|
|
1747
1747
|
__name: "VFunc",
|
|
1748
1748
|
props: {
|
|
1749
1749
|
label: {},
|
|
@@ -1754,73 +1754,73 @@ const Ys = O({ name: "ri-folder6-line", render: Xs }), Qs = ["onClick"], el = {
|
|
|
1754
1754
|
},
|
|
1755
1755
|
emits: ["change", "icon", "hover"],
|
|
1756
1756
|
setup(e, { emit: n }) {
|
|
1757
|
-
const l = n, s = ["v", "a", "b", "c"], t =
|
|
1757
|
+
const l = n, s = ["v", "a", "b", "c"], t = E(e.value || ""), r = (m) => {
|
|
1758
1758
|
try {
|
|
1759
|
-
return new Function(
|
|
1759
|
+
return new Function(m), !0;
|
|
1760
1760
|
} catch (a) {
|
|
1761
1761
|
return console.warn(a), !1;
|
|
1762
1762
|
}
|
|
1763
|
-
},
|
|
1764
|
-
const a =
|
|
1765
|
-
|
|
1766
|
-
}, 500),
|
|
1767
|
-
return
|
|
1763
|
+
}, c = Me((m) => {
|
|
1764
|
+
const a = m.target;
|
|
1765
|
+
r(a.value) && l("change", a.value);
|
|
1766
|
+
}, 500), d = (m) => l("icon", m);
|
|
1767
|
+
return oe(
|
|
1768
1768
|
() => e.value,
|
|
1769
1769
|
() => {
|
|
1770
1770
|
e.value && (t.value = e.value);
|
|
1771
1771
|
}
|
|
1772
|
-
), (
|
|
1773
|
-
const
|
|
1774
|
-
return f(),
|
|
1772
|
+
), (m, a) => {
|
|
1773
|
+
const i = ue, u = ge;
|
|
1774
|
+
return f(), D(Fe, {
|
|
1775
1775
|
active: !!e.value,
|
|
1776
1776
|
disabled: e.disabled,
|
|
1777
1777
|
label: e.label,
|
|
1778
1778
|
hideIcon: e.hideIcon,
|
|
1779
|
-
onIcon:
|
|
1779
|
+
onIcon: d
|
|
1780
1780
|
}, {
|
|
1781
|
-
icon:
|
|
1782
|
-
e.value ? (f(),
|
|
1781
|
+
icon: x(() => [
|
|
1782
|
+
e.value ? (f(), D(i, {
|
|
1783
1783
|
key: 0,
|
|
1784
1784
|
class: "size-4"
|
|
1785
|
-
})) : (f(),
|
|
1785
|
+
})) : (f(), D(u, {
|
|
1786
1786
|
key: 1,
|
|
1787
1787
|
class: "size-4"
|
|
1788
1788
|
}))
|
|
1789
1789
|
]),
|
|
1790
|
-
default:
|
|
1791
|
-
e.value ? (f(), v(
|
|
1792
|
-
o("div",
|
|
1793
|
-
a[3] || (a[3] =
|
|
1794
|
-
(f(!0), v(
|
|
1790
|
+
default: x(() => [
|
|
1791
|
+
e.value ? (f(), v(L, { key: 0 }, [
|
|
1792
|
+
o("div", yl, [
|
|
1793
|
+
a[3] || (a[3] = H(" ( ", -1)),
|
|
1794
|
+
(f(!0), v(L, null, N(e.args, (p, b) => (f(), v(L, { key: p }, [
|
|
1795
1795
|
o("span", {
|
|
1796
1796
|
class: "text-blue-400/80",
|
|
1797
1797
|
title: p,
|
|
1798
1798
|
onMouseenter: (h) => l("hover", "enter", b),
|
|
1799
1799
|
onMouseleave: (h) => l("hover", "leave", b)
|
|
1800
|
-
},
|
|
1800
|
+
}, _(s[b]), 41, _l),
|
|
1801
1801
|
a[2] || (a[2] = o("span", { class: "last:hidden" }, ",", -1))
|
|
1802
1802
|
], 64))), 128)),
|
|
1803
|
-
a[4] || (a[4] =
|
|
1803
|
+
a[4] || (a[4] = H(" ) => ", -1))
|
|
1804
1804
|
]),
|
|
1805
|
-
o("div",
|
|
1806
|
-
|
|
1805
|
+
o("div", $l, [
|
|
1806
|
+
he(o("textarea", {
|
|
1807
1807
|
"onUpdate:modelValue": a[0] || (a[0] = (p) => t.value = p),
|
|
1808
1808
|
class: "outline-0 w-full resize-none field-sizing-content",
|
|
1809
1809
|
type: "text",
|
|
1810
1810
|
disabled: e.disabled,
|
|
1811
1811
|
onInput: a[1] || (a[1] = //@ts-ignore
|
|
1812
|
-
(...p) =>
|
|
1813
|
-
}, null, 40,
|
|
1814
|
-
[
|
|
1812
|
+
(...p) => q(c) && q(c)(...p))
|
|
1813
|
+
}, null, 40, kl), [
|
|
1814
|
+
[He, t.value]
|
|
1815
1815
|
])
|
|
1816
1816
|
])
|
|
1817
|
-
], 64)) :
|
|
1817
|
+
], 64)) : z("", !0)
|
|
1818
1818
|
]),
|
|
1819
1819
|
_: 1
|
|
1820
1820
|
}, 8, ["active", "disabled", "label", "hideIcon"]);
|
|
1821
1821
|
};
|
|
1822
1822
|
}
|
|
1823
|
-
}),
|
|
1823
|
+
}), wl = ["checked", "disabled"], Cl = { class: "text-sm ms-2 peer-disabled:opacity-40" }, Ml = /* @__PURE__ */ M({
|
|
1824
1824
|
__name: "VCheckbox",
|
|
1825
1825
|
props: {
|
|
1826
1826
|
modelValue: { type: [Number, Boolean], default: !1 },
|
|
@@ -1828,12 +1828,12 @@ const Ys = O({ name: "ri-folder6-line", render: Xs }), Qs = ["onClick"], el = {
|
|
|
1828
1828
|
},
|
|
1829
1829
|
emits: ["update:modelValue", "click"],
|
|
1830
1830
|
setup(e, { emit: n }) {
|
|
1831
|
-
const l = n, s = (
|
|
1832
|
-
const
|
|
1833
|
-
l("update:modelValue",
|
|
1834
|
-
}, t = (
|
|
1835
|
-
return (
|
|
1836
|
-
class:
|
|
1831
|
+
const l = n, s = (r) => {
|
|
1832
|
+
const c = r.target;
|
|
1833
|
+
l("update:modelValue", c.checked);
|
|
1834
|
+
}, t = (r) => l("click", r);
|
|
1835
|
+
return (r, c) => (f(), v("label", {
|
|
1836
|
+
class: B(["inline-flex items-center relative", { "cursor-pointer": !e.disabled }]),
|
|
1837
1837
|
onClick: t
|
|
1838
1838
|
}, [
|
|
1839
1839
|
o("input", {
|
|
@@ -1842,8 +1842,8 @@ const Ys = O({ name: "ri-folder6-line", render: Xs }), Qs = ["onClick"], el = {
|
|
|
1842
1842
|
disabled: e.disabled,
|
|
1843
1843
|
class: "peer size-5 appearance-none rounded-md border border-gray-300/80 bg-white/50 transition-all checked:border-[var(--accent-blue)] checked:bg-blue-50 dark:checked:border-[var(--accent-blue)] dark:checked:bg-[var(--accent-blue)] disabled:opacity-40 not-disabled:cursor-pointer dark:border-white/15 dark:bg-white/[0.04]",
|
|
1844
1844
|
onChange: s
|
|
1845
|
-
}, null, 40,
|
|
1846
|
-
|
|
1845
|
+
}, null, 40, wl),
|
|
1846
|
+
c[0] || (c[0] = o("button", { class: "pointer-events-none absolute left-[10px] top-1/2 -translate-x-1/2 -translate-y-1/2 text-[var(--accent-blue)] opacity-0 peer-checked:opacity-100 peer-disabled:opacity-40 dark:text-white" }, [
|
|
1847
1847
|
o("svg", {
|
|
1848
1848
|
class: "h-3.5 w-3.5",
|
|
1849
1849
|
viewBox: "0 0 20 20",
|
|
@@ -1858,18 +1858,18 @@ const Ys = O({ name: "ri-folder6-line", render: Xs }), Qs = ["onClick"], el = {
|
|
|
1858
1858
|
})
|
|
1859
1859
|
])
|
|
1860
1860
|
], -1)),
|
|
1861
|
-
o("span",
|
|
1862
|
-
k(
|
|
1861
|
+
o("span", Cl, [
|
|
1862
|
+
k(r.$slots, "default")
|
|
1863
1863
|
])
|
|
1864
1864
|
], 2));
|
|
1865
1865
|
}
|
|
1866
|
-
}),
|
|
1866
|
+
}), zl = { class: "flex flex-col" }, Sl = { class: "flex gap-4 mb-6" }, Vl = {
|
|
1867
1867
|
key: 0,
|
|
1868
1868
|
class: "flex gap-4"
|
|
1869
|
-
},
|
|
1869
|
+
}, Tl = {
|
|
1870
1870
|
key: 1,
|
|
1871
1871
|
class: ""
|
|
1872
|
-
},
|
|
1872
|
+
}, Bl = { class: "flex flex-col md:flex-row gap-4" }, El = { class: "flex gap-4" }, Ll = { class: "flex justify-between flex-auto" }, Al = ["onClick"], Dl = /* @__PURE__ */ M({
|
|
1873
1873
|
__name: "ItemOptions",
|
|
1874
1874
|
props: {
|
|
1875
1875
|
min: { default: 0 },
|
|
@@ -1882,110 +1882,110 @@ const Ys = O({ name: "ri-folder6-line", render: Xs }), Qs = ["onClick"], el = {
|
|
|
1882
1882
|
},
|
|
1883
1883
|
emits: ["update"],
|
|
1884
1884
|
setup(e, { emit: n }) {
|
|
1885
|
-
const l = n, s =
|
|
1885
|
+
const l = n, s = T(() => e.items.map((h, y) => ({ ...h, id: ++y }))), t = E({ name: "", value: "" }), r = T(() => e.items.length + 1), c = T(() => {
|
|
1886
1886
|
var h;
|
|
1887
1887
|
return !((h = t.value) != null && h.id);
|
|
1888
|
-
}),
|
|
1889
|
-
const h =
|
|
1890
|
-
t.value = { name: `New_${h}`, value: `${h}`, id: h },
|
|
1888
|
+
}), d = (h) => e.type === h, m = (h, y) => l("update", h, y), a = (h) => h.map(({ name: y, value: S }) => ({ name: y, value: S })), i = ({ id: h, name: y, value: S }) => t.value = { id: h, name: y, value: S }, u = () => {
|
|
1889
|
+
const h = r.value;
|
|
1890
|
+
t.value = { name: `New_${h}`, value: `${h}`, id: h }, m("items", a([...s.value, t.value]));
|
|
1891
1891
|
}, p = (h) => {
|
|
1892
|
-
t.value.name === h.name && (t.value = { name: "", value: "" }),
|
|
1893
|
-
}, b =
|
|
1892
|
+
t.value.name === h.name && (t.value = { name: "", value: "" }), m("items", a(s.value.filter((y) => y.value !== h.value)));
|
|
1893
|
+
}, b = Me(() => {
|
|
1894
1894
|
const h = t.value;
|
|
1895
1895
|
if (!h.name || !h.value) return;
|
|
1896
|
-
const
|
|
1897
|
-
|
|
1896
|
+
const y = s.value.map((S) => S.id === h.id ? h : S);
|
|
1897
|
+
m("items", a(y));
|
|
1898
1898
|
}, 300);
|
|
1899
|
-
return (h,
|
|
1900
|
-
const
|
|
1901
|
-
return f(), v("div",
|
|
1902
|
-
o("div",
|
|
1903
|
-
g(
|
|
1899
|
+
return (h, y) => {
|
|
1900
|
+
const S = ue, V = ge;
|
|
1901
|
+
return f(), v("div", zl, [
|
|
1902
|
+
o("div", Sl, [
|
|
1903
|
+
g(Ml, {
|
|
1904
1904
|
modelValue: e.disabled,
|
|
1905
|
-
"onUpdate:modelValue":
|
|
1905
|
+
"onUpdate:modelValue": y[0] || (y[0] = (w) => m("disabled", w ? 1 : 0))
|
|
1906
1906
|
}, {
|
|
1907
|
-
default:
|
|
1908
|
-
|
|
1907
|
+
default: x(() => [...y[6] || (y[6] = [
|
|
1908
|
+
H("Disabled", -1)
|
|
1909
1909
|
])]),
|
|
1910
1910
|
_: 1
|
|
1911
1911
|
}, 8, ["modelValue"])
|
|
1912
1912
|
]),
|
|
1913
|
-
|
|
1914
|
-
g(
|
|
1913
|
+
d("dimmer") ? (f(), v("div", Vl, [
|
|
1914
|
+
g(J, {
|
|
1915
1915
|
modelValue: e.min,
|
|
1916
1916
|
label: "Min",
|
|
1917
|
-
"onUpdate:modelValue":
|
|
1917
|
+
"onUpdate:modelValue": y[1] || (y[1] = (w) => m("min", +w))
|
|
1918
1918
|
}, null, 8, ["modelValue"]),
|
|
1919
|
-
g(
|
|
1919
|
+
g(J, {
|
|
1920
1920
|
modelValue: e.max,
|
|
1921
1921
|
label: "Max",
|
|
1922
|
-
"onUpdate:modelValue":
|
|
1922
|
+
"onUpdate:modelValue": y[2] || (y[2] = (w) => m("max", +w))
|
|
1923
1923
|
}, null, 8, ["modelValue"]),
|
|
1924
|
-
g(
|
|
1924
|
+
g(J, {
|
|
1925
1925
|
modelValue: e.step,
|
|
1926
1926
|
label: "Step",
|
|
1927
|
-
"onUpdate:modelValue":
|
|
1927
|
+
"onUpdate:modelValue": y[3] || (y[3] = (w) => m("step", +w))
|
|
1928
1928
|
}, null, 8, ["modelValue"])
|
|
1929
|
-
])) :
|
|
1930
|
-
|
|
1931
|
-
o("div",
|
|
1932
|
-
g(
|
|
1929
|
+
])) : z("", !0),
|
|
1930
|
+
d("list") ? (f(), v("div", Tl, [
|
|
1931
|
+
o("div", Bl, [
|
|
1932
|
+
g(J, {
|
|
1933
1933
|
modelValue: t.value.name,
|
|
1934
1934
|
"onUpdate:modelValue": [
|
|
1935
|
-
|
|
1936
|
-
|
|
1935
|
+
y[4] || (y[4] = (w) => t.value.name = w),
|
|
1936
|
+
q(b)
|
|
1937
1937
|
],
|
|
1938
|
-
disabled:
|
|
1938
|
+
disabled: c.value,
|
|
1939
1939
|
label: "Name"
|
|
1940
1940
|
}, null, 8, ["modelValue", "disabled", "onUpdate:modelValue"]),
|
|
1941
|
-
g(
|
|
1941
|
+
g(J, {
|
|
1942
1942
|
modelValue: t.value.value,
|
|
1943
1943
|
"onUpdate:modelValue": [
|
|
1944
|
-
|
|
1945
|
-
|
|
1944
|
+
y[5] || (y[5] = (w) => t.value.value = w),
|
|
1945
|
+
q(b)
|
|
1946
1946
|
],
|
|
1947
|
-
disabled:
|
|
1947
|
+
disabled: c.value,
|
|
1948
1948
|
label: "Value"
|
|
1949
1949
|
}, null, 8, ["modelValue", "disabled", "onUpdate:modelValue"])
|
|
1950
1950
|
]),
|
|
1951
|
-
o("div",
|
|
1952
|
-
g(
|
|
1951
|
+
o("div", El, [
|
|
1952
|
+
g(le, {
|
|
1953
1953
|
"model-value": t.value.value,
|
|
1954
1954
|
label: "List",
|
|
1955
1955
|
items: s.value,
|
|
1956
1956
|
top: "unset",
|
|
1957
1957
|
bottom: "0",
|
|
1958
|
-
onChange:
|
|
1958
|
+
onChange: i
|
|
1959
1959
|
}, {
|
|
1960
|
-
item:
|
|
1961
|
-
o("div",
|
|
1962
|
-
o("span", null,
|
|
1960
|
+
item: x(({ item: w }) => [
|
|
1961
|
+
o("div", Ll, [
|
|
1962
|
+
o("span", null, _(w.name), 1),
|
|
1963
1963
|
o("button", {
|
|
1964
1964
|
class: "cursor-pointer size-4",
|
|
1965
|
-
onClick:
|
|
1965
|
+
onClick: F((P) => p(w), ["prevent", "stop"])
|
|
1966
1966
|
}, [
|
|
1967
|
-
g(
|
|
1968
|
-
], 8,
|
|
1967
|
+
g(S)
|
|
1968
|
+
], 8, Al)
|
|
1969
1969
|
])
|
|
1970
1970
|
]),
|
|
1971
1971
|
_: 1
|
|
1972
1972
|
}, 8, ["model-value", "items"]),
|
|
1973
|
-
g(
|
|
1973
|
+
g(A, {
|
|
1974
1974
|
class: "px-4",
|
|
1975
1975
|
color: "blue",
|
|
1976
|
-
onClick:
|
|
1976
|
+
onClick: u
|
|
1977
1977
|
}, {
|
|
1978
|
-
default:
|
|
1978
|
+
default: x(() => [
|
|
1979
1979
|
g(V)
|
|
1980
1980
|
]),
|
|
1981
1981
|
_: 1
|
|
1982
1982
|
})
|
|
1983
1983
|
])
|
|
1984
|
-
])) :
|
|
1984
|
+
])) : z("", !0)
|
|
1985
1985
|
]);
|
|
1986
1986
|
};
|
|
1987
1987
|
}
|
|
1988
|
-
}),
|
|
1988
|
+
}), Il = { class: "flex flex-col" }, Hl = { class: "flex flex-col md:flex-row gap-6 min-h-[300px]" }, jl = { class: "flex-auto order-1" }, Pl = { class: "flex-auto gap-x-2 order-1" }, Nl = { class: "grid grid-cols-1 md:grid-cols-2 gap-6" }, Ol = { class: "flex gap-2 items-center" }, Ul = { class: "flex flex-col gap-4" }, Kl = { class: "flex gap-2 flex-wrap flex-auto px-2 py-1" }, Rl = { class: "relative group" }, Fl = { class: "select-none" }, Wl = ["onClick"], ql = { class: "flex justify-center order-0 md:order-1 md:mt-11" }, Gl = { class: "flex-[0_0_130px] size-[130px]" }, Jl = { class: "flex gap-4 justify-end" }, Zl = { class: "relative min-h-[200px] max-h-100dvh overflow-auto scrollbar" }, Ea = /* @__PURE__ */ M({
|
|
1989
1989
|
__name: "ItemEdit",
|
|
1990
1990
|
props: {
|
|
1991
1991
|
items: {},
|
|
@@ -1996,7 +1996,7 @@ const Ys = O({ name: "ri-folder6-line", render: Xs }), Qs = ["onClick"], el = {
|
|
|
1996
1996
|
},
|
|
1997
1997
|
emits: ["button"],
|
|
1998
1998
|
setup(e, { emit: n }) {
|
|
1999
|
-
const l = n, s = [{ title: "Main" }, { title: "Data" }, { title: "Options" }], t =
|
|
1999
|
+
const l = n, s = [{ title: "Main" }, { title: "Data" }, { title: "Options" }], t = E({
|
|
2000
2000
|
id: "",
|
|
2001
2001
|
name: "",
|
|
2002
2002
|
type: "button",
|
|
@@ -2006,65 +2006,65 @@ const Ys = O({ name: "ri-folder6-line", render: Xs }), Qs = ["onClick"], el = {
|
|
|
2006
2006
|
set: "",
|
|
2007
2007
|
get: "",
|
|
2008
2008
|
getTo: ""
|
|
2009
|
-
}),
|
|
2010
|
-
var
|
|
2011
|
-
return !((
|
|
2012
|
-
}),
|
|
2009
|
+
}), r = E(!1), c = T(() => {
|
|
2010
|
+
var $;
|
|
2011
|
+
return !(($ = e.item) != null && $.id);
|
|
2012
|
+
}), d = T(() => !!e.items.filter(($) => {
|
|
2013
2013
|
var C;
|
|
2014
|
-
return
|
|
2015
|
-
}).find((
|
|
2016
|
-
var
|
|
2017
|
-
return (
|
|
2018
|
-
}),
|
|
2019
|
-
if (
|
|
2020
|
-
const { id:
|
|
2021
|
-
return
|
|
2022
|
-
}), p = ({ value:
|
|
2023
|
-
const C =
|
|
2024
|
-
t.value.type = C, delete t.value.opts, ["button", "list", "dimmer"].includes(C) && (
|
|
2025
|
-
}, h = (
|
|
2026
|
-
|
|
2027
|
-
},
|
|
2028
|
-
!t.value.args.length && !t.value.id && (t.value.id =
|
|
2029
|
-
}, w =
|
|
2030
|
-
|
|
2031
|
-
},
|
|
2032
|
-
|
|
2033
|
-
},
|
|
2034
|
-
|
|
2035
|
-
},
|
|
2036
|
-
t.value.opts || (t.value.opts = {}), t.value.opts[
|
|
2014
|
+
return $.id !== ((C = e.item) == null ? void 0 : C.id);
|
|
2015
|
+
}).find(($) => $.id === (t == null ? void 0 : t.value.id))), m = T(() => t.value.type === "info"), a = T(() => {
|
|
2016
|
+
var $;
|
|
2017
|
+
return ($ = t.value.args) == null ? void 0 : $.length;
|
|
2018
|
+
}), i = T(() => t.value.args.length > 3), u = T(() => {
|
|
2019
|
+
if (d.value) return !0;
|
|
2020
|
+
const { id: $, args: C } = t.value;
|
|
2021
|
+
return !$ || !C.length;
|
|
2022
|
+
}), p = ({ value: $ }) => t.value.icon = $, b = ({ value: $ }) => {
|
|
2023
|
+
const C = $;
|
|
2024
|
+
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 }));
|
|
2025
|
+
}, h = ($) => {
|
|
2026
|
+
$ === "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");
|
|
2027
|
+
}, y = ($) => l("button", $, t.value), S = ($) => t.value.args = t.value.args.filter((C) => C !== $), V = ({ path: $ }) => {
|
|
2028
|
+
!t.value.args.length && !t.value.id && (t.value.id = $), t.value.args.push($), r.value = !1;
|
|
2029
|
+
}, w = E(-1), P = ($) => w.value === $, Z = ($, C) => {
|
|
2030
|
+
$ === "enter" && (w.value = C), $ === "leave" && (w.value = -1);
|
|
2031
|
+
}, be = ($, C) => {
|
|
2032
|
+
$ === "set" && (t.value.set = C), $ === "get" && (t.value.get = C), $ === "getTo" && (t.value.getTo = C), C || delete t.value[$];
|
|
2033
|
+
}, Ye = () => {
|
|
2034
|
+
r.value = !0;
|
|
2035
|
+
}, Qe = ($, C) => {
|
|
2036
|
+
t.value.opts || (t.value.opts = {}), t.value.opts[$] = C, $ === "disabled" && !C && delete t.value.opts[$];
|
|
2037
2037
|
};
|
|
2038
|
-
return
|
|
2039
|
-
var
|
|
2040
|
-
(
|
|
2041
|
-
}), (
|
|
2042
|
-
const
|
|
2043
|
-
return f(), v("div",
|
|
2044
|
-
o("div",
|
|
2045
|
-
o("div",
|
|
2046
|
-
g(
|
|
2038
|
+
return Q(() => {
|
|
2039
|
+
var $;
|
|
2040
|
+
($ = e.item) != null && $.id && (t.value = bt(e.item));
|
|
2041
|
+
}), ($, C) => {
|
|
2042
|
+
const et = Js, tt = ue;
|
|
2043
|
+
return f(), v("div", Il, [
|
|
2044
|
+
o("div", Hl, [
|
|
2045
|
+
o("div", jl, [
|
|
2046
|
+
g(xl, {
|
|
2047
2047
|
class: "flex-auto min-h-75",
|
|
2048
2048
|
value: 0,
|
|
2049
2049
|
items: s
|
|
2050
2050
|
}, {
|
|
2051
|
-
"tab-0":
|
|
2052
|
-
o("div",
|
|
2053
|
-
g(
|
|
2051
|
+
"tab-0": x(() => [
|
|
2052
|
+
o("div", Pl, [
|
|
2053
|
+
g(J, {
|
|
2054
2054
|
modelValue: t.value.id,
|
|
2055
|
-
"onUpdate:modelValue": C[0] || (C[0] = (
|
|
2055
|
+
"onUpdate:modelValue": C[0] || (C[0] = (I) => t.value.id = I),
|
|
2056
2056
|
label: "ID",
|
|
2057
|
-
message:
|
|
2058
|
-
},
|
|
2057
|
+
message: d.value ? $.$t("used") : ""
|
|
2058
|
+
}, lt({ _: 2 }, [
|
|
2059
2059
|
a.value ? void 0 : {
|
|
2060
2060
|
name: "icon",
|
|
2061
|
-
fn:
|
|
2062
|
-
g(
|
|
2061
|
+
fn: x(() => [
|
|
2062
|
+
g(A, {
|
|
2063
2063
|
color: "transparent",
|
|
2064
|
-
onClick:
|
|
2064
|
+
onClick: Ye
|
|
2065
2065
|
}, {
|
|
2066
|
-
default:
|
|
2067
|
-
g(
|
|
2066
|
+
default: x(() => [
|
|
2067
|
+
g(et)
|
|
2068
2068
|
]),
|
|
2069
2069
|
_: 1
|
|
2070
2070
|
})
|
|
@@ -2072,13 +2072,13 @@ const Ys = O({ name: "ri-folder6-line", render: Xs }), Qs = ["onClick"], el = {
|
|
|
2072
2072
|
key: "0"
|
|
2073
2073
|
}
|
|
2074
2074
|
]), 1032, ["modelValue", "message"]),
|
|
2075
|
-
g(
|
|
2075
|
+
g(J, {
|
|
2076
2076
|
modelValue: t.value.name,
|
|
2077
|
-
"onUpdate:modelValue": C[1] || (C[1] = (
|
|
2077
|
+
"onUpdate:modelValue": C[1] || (C[1] = (I) => t.value.name = I),
|
|
2078
2078
|
label: "Name"
|
|
2079
2079
|
}, null, 8, ["modelValue"]),
|
|
2080
|
-
o("div",
|
|
2081
|
-
g(
|
|
2080
|
+
o("div", Nl, [
|
|
2081
|
+
g(le, {
|
|
2082
2082
|
"model-value": t.value.icon,
|
|
2083
2083
|
bottom: "0",
|
|
2084
2084
|
top: "unset",
|
|
@@ -2087,17 +2087,17 @@ const Ys = O({ name: "ri-folder6-line", render: Xs }), Qs = ["onClick"], el = {
|
|
|
2087
2087
|
items: e.listIcons,
|
|
2088
2088
|
onChange: p
|
|
2089
2089
|
}, {
|
|
2090
|
-
item:
|
|
2091
|
-
o("div",
|
|
2092
|
-
k(
|
|
2093
|
-
icon:
|
|
2090
|
+
item: x(({ item: I }) => [
|
|
2091
|
+
o("div", Ol, [
|
|
2092
|
+
k($.$slots, "icon", {
|
|
2093
|
+
icon: I.value
|
|
2094
2094
|
}),
|
|
2095
|
-
o("div", null,
|
|
2095
|
+
o("div", null, _(I.name), 1)
|
|
2096
2096
|
])
|
|
2097
2097
|
]),
|
|
2098
2098
|
_: 3
|
|
2099
2099
|
}, 8, ["model-value", "items"]),
|
|
2100
|
-
g(
|
|
2100
|
+
g(le, {
|
|
2101
2101
|
"model-value": t.value.type,
|
|
2102
2102
|
bottom: "0",
|
|
2103
2103
|
top: "unset",
|
|
@@ -2108,118 +2108,118 @@ const Ys = O({ name: "ri-folder6-line", render: Xs }), Qs = ["onClick"], el = {
|
|
|
2108
2108
|
])
|
|
2109
2109
|
])
|
|
2110
2110
|
]),
|
|
2111
|
-
"tab-1":
|
|
2112
|
-
o("div",
|
|
2111
|
+
"tab-1": x(() => [
|
|
2112
|
+
o("div", Ul, [
|
|
2113
2113
|
g(Fe, {
|
|
2114
2114
|
active: !!t.value.args.length,
|
|
2115
|
-
disabled:
|
|
2115
|
+
disabled: i.value,
|
|
2116
2116
|
label: "Arguments",
|
|
2117
|
-
onIcon: C[2] || (C[2] = (
|
|
2117
|
+
onIcon: C[2] || (C[2] = (I) => r.value = !0)
|
|
2118
2118
|
}, {
|
|
2119
|
-
default:
|
|
2120
|
-
o("div",
|
|
2121
|
-
(f(!0), v(
|
|
2122
|
-
key:
|
|
2119
|
+
default: x(() => [
|
|
2120
|
+
o("div", Kl, [
|
|
2121
|
+
(f(!0), v(L, null, N(t.value.args, (I, Ve) => (f(), v("div", {
|
|
2122
|
+
key: I,
|
|
2123
2123
|
class: "flex items-center rounded-full bg-gray-200 dark:bg-gray-900/50 px-2 py-[2px] text-xs"
|
|
2124
2124
|
}, [
|
|
2125
|
-
o("div",
|
|
2126
|
-
o("span",
|
|
2125
|
+
o("div", Rl, [
|
|
2126
|
+
o("span", Fl, _(I), 1),
|
|
2127
2127
|
o("div", {
|
|
2128
|
-
class:
|
|
2128
|
+
class: B(["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(Ve) ? "visible opacity-100" : ""])
|
|
2129
2129
|
}, [
|
|
2130
|
-
o("pre", null,
|
|
2130
|
+
o("pre", null, _(q(kt)(I, e.object)), 1)
|
|
2131
2131
|
], 2)
|
|
2132
2132
|
]),
|
|
2133
|
-
|
|
2133
|
+
Ve || t.value.args.length < 2 ? (f(), v("button", {
|
|
2134
2134
|
key: 0,
|
|
2135
2135
|
class: "cursor-pointer ms-1",
|
|
2136
|
-
onClick: (
|
|
2136
|
+
onClick: (aa) => S(I)
|
|
2137
2137
|
}, [
|
|
2138
|
-
g(
|
|
2139
|
-
], 8,
|
|
2138
|
+
g(tt, { class: "size-5" })
|
|
2139
|
+
], 8, Wl)) : z("", !0)
|
|
2140
2140
|
]))), 128))
|
|
2141
2141
|
])
|
|
2142
2142
|
]),
|
|
2143
2143
|
_: 1
|
|
2144
2144
|
}, 8, ["active", "disabled"]),
|
|
2145
|
-
g(
|
|
2145
|
+
g(xe, {
|
|
2146
2146
|
value: t.value.set,
|
|
2147
2147
|
args: t.value.args,
|
|
2148
|
-
disabled: !a.value ||
|
|
2148
|
+
disabled: !a.value || m.value,
|
|
2149
2149
|
label: "Set",
|
|
2150
|
-
onIcon: C[3] || (C[3] = (
|
|
2151
|
-
onHover:
|
|
2152
|
-
onChange: C[4] || (C[4] = (
|
|
2150
|
+
onIcon: C[3] || (C[3] = (I) => h("set")),
|
|
2151
|
+
onHover: Z,
|
|
2152
|
+
onChange: C[4] || (C[4] = (I) => be("set", I))
|
|
2153
2153
|
}, null, 8, ["value", "args", "disabled"]),
|
|
2154
|
-
g(
|
|
2154
|
+
g(xe, {
|
|
2155
2155
|
value: t.value.get,
|
|
2156
2156
|
args: t.value.args,
|
|
2157
2157
|
disabled: !a.value,
|
|
2158
2158
|
label: "Get",
|
|
2159
|
-
onIcon: C[5] || (C[5] = (
|
|
2160
|
-
onHover:
|
|
2161
|
-
onChange: C[6] || (C[6] = (
|
|
2159
|
+
onIcon: C[5] || (C[5] = (I) => h("get")),
|
|
2160
|
+
onHover: Z,
|
|
2161
|
+
onChange: C[6] || (C[6] = (I) => be("get", I))
|
|
2162
2162
|
}, null, 8, ["value", "args", "disabled"]),
|
|
2163
|
-
g(
|
|
2163
|
+
g(xe, {
|
|
2164
2164
|
value: t.value.getTo,
|
|
2165
2165
|
args: t.value.args,
|
|
2166
2166
|
disabled: !a.value,
|
|
2167
2167
|
label: "GetTo",
|
|
2168
|
-
onIcon: C[7] || (C[7] = (
|
|
2169
|
-
onHover:
|
|
2170
|
-
onChange: C[8] || (C[8] = (
|
|
2168
|
+
onIcon: C[7] || (C[7] = (I) => h("getTo")),
|
|
2169
|
+
onHover: Z,
|
|
2170
|
+
onChange: C[8] || (C[8] = (I) => be("getTo", I))
|
|
2171
2171
|
}, null, 8, ["value", "args", "disabled"])
|
|
2172
2172
|
])
|
|
2173
2173
|
]),
|
|
2174
|
-
"tab-2":
|
|
2175
|
-
g(
|
|
2174
|
+
"tab-2": x(() => [
|
|
2175
|
+
g(Dl, j(t.value.opts, {
|
|
2176
2176
|
value: t.value.value,
|
|
2177
2177
|
type: t.value.type,
|
|
2178
|
-
onUpdate:
|
|
2178
|
+
onUpdate: Qe
|
|
2179
2179
|
}), null, 16, ["value", "type"])
|
|
2180
2180
|
]),
|
|
2181
2181
|
_: 3
|
|
2182
2182
|
})
|
|
2183
2183
|
]),
|
|
2184
|
-
o("div",
|
|
2185
|
-
o("div",
|
|
2186
|
-
k(
|
|
2184
|
+
o("div", ql, [
|
|
2185
|
+
o("div", Gl, [
|
|
2186
|
+
k($.$slots, "default", { item: t.value })
|
|
2187
2187
|
])
|
|
2188
2188
|
])
|
|
2189
2189
|
]),
|
|
2190
|
-
o("div",
|
|
2191
|
-
g(
|
|
2190
|
+
o("div", Jl, [
|
|
2191
|
+
g(A, {
|
|
2192
2192
|
class: "px-4",
|
|
2193
2193
|
color: "blue",
|
|
2194
|
-
disabled:
|
|
2195
|
-
onClick: C[9] || (C[9] = (
|
|
2194
|
+
disabled: u.value,
|
|
2195
|
+
onClick: C[9] || (C[9] = (I) => y(c.value ? "add" : "save"))
|
|
2196
2196
|
}, {
|
|
2197
|
-
default:
|
|
2198
|
-
|
|
2197
|
+
default: x(() => [
|
|
2198
|
+
H(_(c.value ? $.$t("add") : $.$t("save")), 1)
|
|
2199
2199
|
]),
|
|
2200
2200
|
_: 1
|
|
2201
2201
|
}, 8, ["disabled"]),
|
|
2202
|
-
g(
|
|
2202
|
+
g(A, {
|
|
2203
2203
|
class: "px-4",
|
|
2204
2204
|
color: "red",
|
|
2205
2205
|
outline: "",
|
|
2206
|
-
onClick: C[10] || (C[10] = (
|
|
2206
|
+
onClick: C[10] || (C[10] = (I) => y("remove"))
|
|
2207
2207
|
}, {
|
|
2208
|
-
default:
|
|
2209
|
-
|
|
2208
|
+
default: x(() => [
|
|
2209
|
+
H(_($.$t("remove")), 1)
|
|
2210
2210
|
]),
|
|
2211
2211
|
_: 1
|
|
2212
2212
|
})
|
|
2213
2213
|
]),
|
|
2214
|
-
|
|
2214
|
+
r.value ? (f(), D(Oe, {
|
|
2215
2215
|
key: 0,
|
|
2216
2216
|
size: "md",
|
|
2217
|
-
title:
|
|
2218
|
-
onClose: C[11] || (C[11] = (
|
|
2217
|
+
title: $.$t("select"),
|
|
2218
|
+
onClose: C[11] || (C[11] = (I) => r.value = !1)
|
|
2219
2219
|
}, {
|
|
2220
|
-
default:
|
|
2221
|
-
o("div",
|
|
2222
|
-
g(
|
|
2220
|
+
default: x(() => [
|
|
2221
|
+
o("div", Zl, [
|
|
2222
|
+
g(We, {
|
|
2223
2223
|
items: e.object,
|
|
2224
2224
|
onlyValue: !a.value,
|
|
2225
2225
|
onClick: V
|
|
@@ -2227,39 +2227,39 @@ const Ys = O({ name: "ri-folder6-line", render: Xs }), Qs = ["onClick"], el = {
|
|
|
2227
2227
|
])
|
|
2228
2228
|
]),
|
|
2229
2229
|
_: 1
|
|
2230
|
-
}, 8, ["title"])) :
|
|
2230
|
+
}, 8, ["title"])) : z("", !0)
|
|
2231
2231
|
]);
|
|
2232
2232
|
};
|
|
2233
2233
|
}
|
|
2234
|
-
}),
|
|
2235
|
-
function
|
|
2234
|
+
}), Te = { position: "relative", boxSizing: "border-box", overflow: "hidden", fontSize: "16px", fontFamily: 'Menlo, Consolas, "Liberation Mono", Monaco, "Lucida Console", monospace' }, Xl = { 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" }, Yl = { 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" }, Ql = { 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" }, qe = (e) => Ge(e);
|
|
2235
|
+
function Be(e) {
|
|
2236
2236
|
const n = Array.isArray(e) ? e : [e];
|
|
2237
|
-
return n.length === 0 ?
|
|
2237
|
+
return n.length === 0 ? qe : (l) => n.reduce((s, t, r) => t(s, { html: r > 0 }), l);
|
|
2238
2238
|
}
|
|
2239
|
-
class
|
|
2239
|
+
class eo {
|
|
2240
2240
|
constructor(n, l = {}) {
|
|
2241
2241
|
if (this.lines = null, !n) throw new Error("selector is not defined");
|
|
2242
2242
|
if (this.root = n instanceof Node ? n : document.querySelector(n), !this.root) throw new Error(`element with "${n}" selector is not exist`);
|
|
2243
|
-
const s = { value: "", styles: {}, plugins: [], highlighter:
|
|
2244
|
-
this.options = { ...s, ...
|
|
2243
|
+
const s = { value: "", styles: {}, plugins: [], highlighter: qe }, { highlighters: t, ...r } = l;
|
|
2244
|
+
this.options = { ...s, ...r, highlighter: t ? Be(t) : s.highlighter }, this.options.value = this.options.value == null ? "" : String(this.options.value), this.init();
|
|
2245
2245
|
}
|
|
2246
2246
|
init() {
|
|
2247
2247
|
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");
|
|
2248
|
-
const n = Object.keys(
|
|
2248
|
+
const n = Object.keys(Te).concat(Object.keys(this.options.styles)).concat(["paddingLeft"]);
|
|
2249
2249
|
this.initialRootStyles = {};
|
|
2250
2250
|
const l = this.root.style;
|
|
2251
2251
|
n.forEach((s) => {
|
|
2252
2252
|
this.initialRootStyles[s] = l[s] || "";
|
|
2253
|
-
}), Object.assign(this.root.style,
|
|
2253
|
+
}), Object.assign(this.root.style, Te, this.options.styles), Object.assign(this.textarea.style, Xl), Object.assign(this.pre.style, Yl), 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();
|
|
2254
2254
|
}
|
|
2255
2255
|
addTextareaEvents() {
|
|
2256
2256
|
this.handleEvent = (n) => {
|
|
2257
2257
|
if (n.type === "keydown" && this.textarea.readOnly) return;
|
|
2258
2258
|
const l = n;
|
|
2259
2259
|
if (l.isComposing || l.keyCode === 229) return;
|
|
2260
|
-
const s = function(t,
|
|
2261
|
-
const { value:
|
|
2262
|
-
return t.reduce((a,
|
|
2260
|
+
const s = function(t, r) {
|
|
2261
|
+
const { value: c, selectionStart: d, selectionEnd: m } = r.target;
|
|
2262
|
+
return t.reduce((a, i) => ({ ...a, ...i(a, r) }), { value: c, selectionStart: d, selectionEnd: m });
|
|
2263
2263
|
}(this.options.plugins, n);
|
|
2264
2264
|
this.update(s);
|
|
2265
2265
|
}, this.textarea.addEventListener("input", this.handleEvent), this.textarea.addEventListener("keydown", this.handleEvent), this.textarea.addEventListener("compositionend", this.handleEvent);
|
|
@@ -2272,13 +2272,13 @@ class Wl {
|
|
|
2272
2272
|
updateOptions(n) {
|
|
2273
2273
|
if (!this.textarea) return;
|
|
2274
2274
|
const { highlighters: l, ...s } = n;
|
|
2275
|
-
if (this.options = { ...this.options, ...s, highlighter: l ?
|
|
2275
|
+
if (this.options = { ...this.options, ...s, highlighter: l ? Be(l) : this.options.highlighter }, n.styles) {
|
|
2276
2276
|
const t = this.root.style;
|
|
2277
|
-
Object.keys(n.styles).forEach((
|
|
2278
|
-
|
|
2277
|
+
Object.keys(n.styles).forEach((r) => {
|
|
2278
|
+
r in this.initialRootStyles || (this.initialRootStyles[r] = t[r] || "");
|
|
2279
2279
|
}), Object.assign(this.root.style, n.styles), ("paddingLeft" in n.styles || "padding" in n.styles) && (this.basePaddingLeft = this.root.style.paddingLeft || "");
|
|
2280
2280
|
}
|
|
2281
|
-
this.lines && !this.options.lineNumbers && (
|
|
2281
|
+
this.lines && !this.options.lineNumbers && (me(this.lines), this.lines = null, this.root.style.paddingLeft = this.basePaddingLeft), n.value != null && this.update({ value: n.value }), this.render();
|
|
2282
2282
|
}
|
|
2283
2283
|
render() {
|
|
2284
2284
|
const n = this.options.highlighter(this.value);
|
|
@@ -2286,318 +2286,318 @@ class Wl {
|
|
|
2286
2286
|
}
|
|
2287
2287
|
updateLines() {
|
|
2288
2288
|
if (!this.options.lineNumbers) return;
|
|
2289
|
-
this.lines || (this.lines = document.createElement("pre"), this.root.appendChild(this.lines), Object.assign(this.lines.style,
|
|
2289
|
+
this.lines || (this.lines = document.createElement("pre"), this.root.appendChild(this.lines), Object.assign(this.lines.style, Ql));
|
|
2290
2290
|
const n = this.value.split(`
|
|
2291
2291
|
`), l = n.length.toString().length;
|
|
2292
|
-
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">${
|
|
2292
|
+
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">${Ge(s)}</span>`}`).join(`
|
|
2293
2293
|
`);
|
|
2294
2294
|
}
|
|
2295
2295
|
destroy() {
|
|
2296
|
-
this.textarea && (this.textarea.removeEventListener("input", this.handleEvent), this.textarea.removeEventListener("keydown", this.handleEvent), this.textarea.removeEventListener("compositionend", this.handleEvent),
|
|
2296
|
+
this.textarea && (this.textarea.removeEventListener("input", this.handleEvent), this.textarea.removeEventListener("keydown", this.handleEvent), this.textarea.removeEventListener("compositionend", this.handleEvent), me(this.textarea), me(this.pre), me(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 }));
|
|
2297
2297
|
}
|
|
2298
2298
|
onUpdate(n) {
|
|
2299
2299
|
this.updateCallback = n;
|
|
2300
2300
|
}
|
|
2301
2301
|
}
|
|
2302
|
-
function
|
|
2302
|
+
function me(e) {
|
|
2303
2303
|
e && e.parentNode && e.parentNode.removeChild(e);
|
|
2304
2304
|
}
|
|
2305
|
-
function
|
|
2305
|
+
function Ge(e) {
|
|
2306
2306
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2307
2307
|
}
|
|
2308
|
-
const
|
|
2309
|
-
function
|
|
2310
|
-
const l = e.split("+").reduce((
|
|
2308
|
+
const Ee = { 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" }, to = { add: "=" }, no = { ";": "semicolon", "=": "equal", ",": "comma", "-": "minus", ".": "period", "/": "slash", "`": "backquote", "[": "bracketleft", "\\": "backslash", "]": "bracketright", "'": "quote" };
|
|
2309
|
+
function de(e, n) {
|
|
2310
|
+
const l = e.split("+").reduce((m, a) => Ee[a] ? (m.modifiers[Ee[a]] = !0, m) : { ...m, key: to[a] || a.toLowerCase() }, { modifiers: { altKey: !1, ctrlKey: !1, metaKey: !1, shiftKey: !1 }, key: null }), s = Object.keys(l.modifiers).every((m) => l.modifiers[m] ? n[m] : !n[m]);
|
|
2311
2311
|
if (!l.key) return s;
|
|
2312
|
-
const t = n.key != null && n.key.toLowerCase() === l.key,
|
|
2313
|
-
var
|
|
2314
|
-
const
|
|
2315
|
-
return s && (t ||
|
|
2312
|
+
const t = n.key != null && n.key.toLowerCase() === l.key, r = (c = l.key, /^[a-z]$/.test(c) ? `key${c}` : /^[0-9]$/.test(c) ? `digit${c}` : no[c] || null);
|
|
2313
|
+
var c;
|
|
2314
|
+
const d = !n.isComposing && r != null && n.code != null && n.code.toLowerCase() === r;
|
|
2315
|
+
return s && (t || d);
|
|
2316
2316
|
}
|
|
2317
|
-
function
|
|
2317
|
+
function so(e = {}) {
|
|
2318
2318
|
const n = Math.max(1, e.limit == null ? 300 : e.limit), l = e.coalesceMs == null ? 300 : e.coalesceMs;
|
|
2319
|
-
let s = [], t = null,
|
|
2320
|
-
const
|
|
2321
|
-
s = s.slice(0, t + 1), s.push(
|
|
2319
|
+
let s = [], t = null, r = null;
|
|
2320
|
+
const c = (d) => {
|
|
2321
|
+
s = s.slice(0, t + 1), s.push(d), s.length > n && (s = s.slice(s.length - n)), t = s.length - 1;
|
|
2322
2322
|
};
|
|
2323
|
-
return (
|
|
2324
|
-
const a =
|
|
2325
|
-
if ((a ||
|
|
2326
|
-
if (a) return
|
|
2327
|
-
if (
|
|
2328
|
-
if (
|
|
2329
|
-
if (
|
|
2330
|
-
const
|
|
2331
|
-
if (
|
|
2332
|
-
d
|
|
2323
|
+
return (d, m) => {
|
|
2324
|
+
const a = m.type === "keydown" && de("ctrl/cmd+z", m), i = m.type === "keydown" && (de("ctrl/cmd+shift+z", m) || de("ctrl+y", m));
|
|
2325
|
+
if ((a || i) && m.preventDefault(), t === null) return s = [d], void (t = 0);
|
|
2326
|
+
if (a) return r = null, s[t].value !== d.value ? c(d) : s[t] = d, t = Math.max(0, t - 1), s[t];
|
|
2327
|
+
if (i) return r = null, s[t].value !== d.value ? void c(d) : (t = Math.min(s.length - 1, t + 1), s[t]);
|
|
2328
|
+
if (m.type === "keydown") return s[t].value !== d.value ? (r = null, void c(d)) : void (s[t] = d);
|
|
2329
|
+
if (m.type === "input") {
|
|
2330
|
+
const u = m.timeStamp, p = u != null && r != null && u - r <= l;
|
|
2331
|
+
if (r = u ?? null, p) return void (s[t] = d);
|
|
2332
|
+
c(d);
|
|
2333
2333
|
}
|
|
2334
2334
|
};
|
|
2335
2335
|
}
|
|
2336
|
-
const
|
|
2336
|
+
const lo = () => (e, n) => {
|
|
2337
2337
|
const { value: l, selectionStart: s, selectionEnd: t } = e;
|
|
2338
|
-
if (!
|
|
2339
|
-
const
|
|
2340
|
-
`).pop(),
|
|
2341
|
-
if (!
|
|
2338
|
+
if (!de("enter", n) || n.type !== "keydown") return;
|
|
2339
|
+
const r = l.substring(0, s).split(`
|
|
2340
|
+
`).pop(), c = /^\s+/.exec(r);
|
|
2341
|
+
if (!c) return;
|
|
2342
2342
|
n.preventDefault();
|
|
2343
|
-
const
|
|
2344
|
-
` +
|
|
2345
|
-
return { value: l.substring(0, s) +
|
|
2346
|
-
},
|
|
2343
|
+
const d = `
|
|
2344
|
+
` + c[0];
|
|
2345
|
+
return { value: l.substring(0, s) + d + l.substring(t), selectionStart: s + d.length, selectionEnd: s + d.length };
|
|
2346
|
+
}, oo = () => (e, n) => {
|
|
2347
2347
|
if (typeof KeyboardEvent > "u" || !(n instanceof KeyboardEvent) || n.key !== "Enter")
|
|
2348
2348
|
return;
|
|
2349
2349
|
const { value: l, selectionStart: s, selectionEnd: t } = e;
|
|
2350
2350
|
if (s !== t)
|
|
2351
2351
|
return;
|
|
2352
|
-
const
|
|
2353
|
-
`, s - 1) + 1,
|
|
2354
|
-
`, s),
|
|
2355
|
-
if (l.slice(s,
|
|
2352
|
+
const r = l.lastIndexOf(`
|
|
2353
|
+
`, s - 1) + 1, c = l.indexOf(`
|
|
2354
|
+
`, s), d = c === -1 ? l.length : c;
|
|
2355
|
+
if (l.slice(s, d).trim().length > 0)
|
|
2356
2356
|
return;
|
|
2357
|
-
const
|
|
2358
|
-
if (
|
|
2357
|
+
const i = l.substring(r, d).trimEnd();
|
|
2358
|
+
if (i.endsWith(";") || i.length === 0)
|
|
2359
2359
|
return;
|
|
2360
|
-
const
|
|
2360
|
+
const u = l.slice(0, d) + ";" + l.slice(d), p = s + 1;
|
|
2361
2361
|
return {
|
|
2362
|
-
value:
|
|
2362
|
+
value: u,
|
|
2363
2363
|
selectionStart: p,
|
|
2364
2364
|
selectionEnd: p
|
|
2365
2365
|
};
|
|
2366
2366
|
};
|
|
2367
|
-
let
|
|
2368
|
-
const
|
|
2369
|
-
const { customSuggestions: n = [], minPrefixLength: l = 1, maxSuggestions: s = 20, tabSize: t = 2, tooltip:
|
|
2370
|
-
if (!
|
|
2367
|
+
let ze = [], W = null, U = 0, X = [], ee = null, te = null, Se, Je, G = null, se = null;
|
|
2368
|
+
const ao = (e) => {
|
|
2369
|
+
const { customSuggestions: n = [], minPrefixLength: l = 1, maxSuggestions: s = 20, tabSize: t = 2, tooltip: r = { enabled: !0 }, i18n: c, renderMenu: d, renderTooltip: m } = e;
|
|
2370
|
+
if (!d || !m)
|
|
2371
2371
|
throw new Error("renderMenu and renderTooltip are required");
|
|
2372
|
-
return
|
|
2373
|
-
if (typeof KeyboardEvent > "u" || !(
|
|
2372
|
+
return ze = [...n].map((a) => c(a)), Se = d, Je = m, (a, i) => {
|
|
2373
|
+
if (typeof KeyboardEvent > "u" || !(i instanceof KeyboardEvent))
|
|
2374
2374
|
return;
|
|
2375
|
-
const { value:
|
|
2376
|
-
if (
|
|
2377
|
-
setTimeout(() =>
|
|
2375
|
+
const { value: u, selectionStart: p } = a, b = i.target;
|
|
2376
|
+
if (te = b, r.enabled !== !1 && !b.dataset.tooltipInitialized && (b.dataset.tooltipInitialized = "true", b.addEventListener("mouseup", () => {
|
|
2377
|
+
setTimeout(() => Le(b), 100);
|
|
2378
2378
|
}), b.addEventListener("keyup", () => {
|
|
2379
|
-
setTimeout(() =>
|
|
2380
|
-
})),
|
|
2381
|
-
switch (
|
|
2379
|
+
setTimeout(() => Le(b), 100);
|
|
2380
|
+
})), W) {
|
|
2381
|
+
switch (i.key) {
|
|
2382
2382
|
case "ArrowDown":
|
|
2383
|
-
return
|
|
2383
|
+
return i.preventDefault(), U < X.length - 1 && (U++, ne()), { ...a };
|
|
2384
2384
|
case "ArrowUp":
|
|
2385
|
-
return
|
|
2385
|
+
return i.preventDefault(), U > 0 && (U--, ne()), { ...a };
|
|
2386
2386
|
case "Enter":
|
|
2387
|
-
if (
|
|
2388
|
-
const h =
|
|
2387
|
+
if (i.preventDefault(), X[U]) {
|
|
2388
|
+
const h = _e(a, X[U]);
|
|
2389
2389
|
return Y(), h;
|
|
2390
2390
|
}
|
|
2391
2391
|
return;
|
|
2392
2392
|
case "Tab":
|
|
2393
|
-
if (
|
|
2394
|
-
const h =
|
|
2393
|
+
if (i.preventDefault(), X[U]) {
|
|
2394
|
+
const h = _e(a, X[U]);
|
|
2395
2395
|
return Y(), h;
|
|
2396
2396
|
}
|
|
2397
2397
|
return;
|
|
2398
2398
|
case "Escape":
|
|
2399
|
-
return
|
|
2399
|
+
return i.preventDefault(), Y(), { ...a };
|
|
2400
2400
|
case "Backspace":
|
|
2401
2401
|
setTimeout(() => {
|
|
2402
|
-
if (
|
|
2403
|
-
const h =
|
|
2402
|
+
if (te) {
|
|
2403
|
+
const h = te.value, y = te.selectionStart, S = pe(h, y), V = h.slice(S, y);
|
|
2404
2404
|
if (V.length < l)
|
|
2405
2405
|
Y();
|
|
2406
2406
|
else {
|
|
2407
|
-
const w =
|
|
2408
|
-
w.length === 0 ? Y() : (X = w,
|
|
2407
|
+
const w = ye(V).slice(0, s);
|
|
2408
|
+
w.length === 0 ? Y() : (X = w, U = 0, ne());
|
|
2409
2409
|
}
|
|
2410
2410
|
}
|
|
2411
2411
|
}, 0);
|
|
2412
2412
|
return;
|
|
2413
2413
|
}
|
|
2414
|
-
if (["ArrowDown", "ArrowUp", "Enter", "Tab", "Escape", "Backspace"].includes(
|
|
2414
|
+
if (["ArrowDown", "ArrowUp", "Enter", "Tab", "Escape", "Backspace"].includes(i.key))
|
|
2415
2415
|
return { ...a };
|
|
2416
2416
|
}
|
|
2417
|
-
if (
|
|
2418
|
-
|
|
2419
|
-
const h =
|
|
2420
|
-
if (
|
|
2421
|
-
const
|
|
2422
|
-
if (
|
|
2423
|
-
return
|
|
2417
|
+
if (de("tab", i)) {
|
|
2418
|
+
i.preventDefault();
|
|
2419
|
+
const h = pe(u, p), y = u.slice(h, p);
|
|
2420
|
+
if (y.length > 0) {
|
|
2421
|
+
const P = ye(y);
|
|
2422
|
+
if (P.length > 0)
|
|
2423
|
+
return _e(a, P[0]);
|
|
2424
2424
|
}
|
|
2425
|
-
const
|
|
2425
|
+
const S = " ".repeat(t), V = u.slice(0, p) + S + u.slice(p), w = p + t;
|
|
2426
2426
|
return {
|
|
2427
2427
|
value: V,
|
|
2428
2428
|
selectionStart: w,
|
|
2429
2429
|
selectionEnd: w
|
|
2430
2430
|
};
|
|
2431
2431
|
}
|
|
2432
|
-
if (!(
|
|
2433
|
-
return
|
|
2434
|
-
|
|
2435
|
-
const h = b.value,
|
|
2432
|
+
if (!(i.key.length !== 1 || i.ctrlKey || i.metaKey || i.altKey))
|
|
2433
|
+
return ee && clearTimeout(ee), ee = setTimeout(() => {
|
|
2434
|
+
ee = null;
|
|
2435
|
+
const h = b.value, y = b.selectionStart, S = pe(h, y), V = h.slice(S, y);
|
|
2436
2436
|
if (V.length < l) {
|
|
2437
2437
|
Y();
|
|
2438
2438
|
return;
|
|
2439
2439
|
}
|
|
2440
|
-
let w =
|
|
2440
|
+
let w = ye(V);
|
|
2441
2441
|
if (w = w.slice(0, s), w.length === 0) {
|
|
2442
2442
|
Y();
|
|
2443
2443
|
return;
|
|
2444
2444
|
}
|
|
2445
|
-
X = w,
|
|
2445
|
+
X = w, U = 0, W ? ne() : io(b, w);
|
|
2446
2446
|
}, 0), { ...a };
|
|
2447
2447
|
};
|
|
2448
2448
|
};
|
|
2449
|
-
function
|
|
2449
|
+
function ye(e) {
|
|
2450
2450
|
const n = e.toLowerCase();
|
|
2451
|
-
return
|
|
2451
|
+
return ze.filter((l) => {
|
|
2452
2452
|
const s = l.label.toLowerCase();
|
|
2453
2453
|
return s.startsWith(n) || s.includes(n) || s.split("_").map((t) => t[0]).join("").startsWith(n);
|
|
2454
2454
|
}).sort((l, s) => {
|
|
2455
|
-
const t = l.label.toLowerCase(),
|
|
2456
|
-
if (
|
|
2457
|
-
if (!
|
|
2458
|
-
const
|
|
2459
|
-
return
|
|
2455
|
+
const t = l.label.toLowerCase(), r = s.label.toLowerCase(), c = t.startsWith(n), d = r.startsWith(n);
|
|
2456
|
+
if (c && !d) return -1;
|
|
2457
|
+
if (!c && d) return 1;
|
|
2458
|
+
const m = t.indexOf(n), a = r.indexOf(n);
|
|
2459
|
+
return m !== a ? m - a : t.length !== r.length ? t.length - r.length : t.localeCompare(r);
|
|
2460
2460
|
});
|
|
2461
2461
|
}
|
|
2462
|
-
function
|
|
2462
|
+
function pe(e, n) {
|
|
2463
2463
|
let l = n;
|
|
2464
2464
|
for (; l > 0 && /[a-zA-Z0-9_$]/.test(e[l - 1]); )
|
|
2465
2465
|
l--;
|
|
2466
2466
|
return l;
|
|
2467
2467
|
}
|
|
2468
|
-
function
|
|
2469
|
-
Y(), X = n,
|
|
2470
|
-
const l =
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
}), Object.assign(
|
|
2468
|
+
function io(e, n) {
|
|
2469
|
+
Y(), X = n, U = 0;
|
|
2470
|
+
const l = Ze(e);
|
|
2471
|
+
W = Se(n, U, (s) => {
|
|
2472
|
+
U = s, ne();
|
|
2473
|
+
}), Object.assign(W.style, {
|
|
2474
2474
|
position: "fixed",
|
|
2475
2475
|
left: `${l.left}px`,
|
|
2476
2476
|
top: `${l.top + 24}px`,
|
|
2477
2477
|
zIndex: "10000"
|
|
2478
|
-
}), document.body.appendChild(
|
|
2478
|
+
}), document.body.appendChild(W);
|
|
2479
2479
|
}
|
|
2480
|
-
function
|
|
2481
|
-
if (!
|
|
2482
|
-
const e =
|
|
2483
|
-
|
|
2484
|
-
}), n =
|
|
2485
|
-
|
|
2480
|
+
function ne() {
|
|
2481
|
+
if (!W || !te) return;
|
|
2482
|
+
const e = Se(X, U, (l) => {
|
|
2483
|
+
U = l, ne();
|
|
2484
|
+
}), n = W.getBoundingClientRect();
|
|
2485
|
+
W.replaceWith(e), W = e, Object.assign(W.style, {
|
|
2486
2486
|
position: "fixed",
|
|
2487
2487
|
left: `${n.left}px`,
|
|
2488
2488
|
top: `${n.top}px`,
|
|
2489
2489
|
zIndex: "10000"
|
|
2490
2490
|
});
|
|
2491
2491
|
}
|
|
2492
|
-
function
|
|
2493
|
-
const { value: l, selectionStart: s } = e, t =
|
|
2494
|
-
let
|
|
2495
|
-
const
|
|
2492
|
+
function _e(e, n) {
|
|
2493
|
+
const { value: l, selectionStart: s } = e, t = pe(l, s), r = n.insert || n.label, c = /\$\{([^}]*)\}/g;
|
|
2494
|
+
let d = r;
|
|
2495
|
+
const m = [];
|
|
2496
2496
|
let a;
|
|
2497
|
-
for (; (a =
|
|
2498
|
-
const h = a[1],
|
|
2499
|
-
|
|
2497
|
+
for (; (a = c.exec(r)) !== null; ) {
|
|
2498
|
+
const h = a[1], y = a.index, S = a[0].length;
|
|
2499
|
+
m.push({ index: y, text: h, length: S });
|
|
2500
2500
|
}
|
|
2501
|
-
|
|
2502
|
-
const
|
|
2503
|
-
let
|
|
2504
|
-
if (
|
|
2505
|
-
let h = 0,
|
|
2506
|
-
for (;
|
|
2507
|
-
const V =
|
|
2508
|
-
V ? (h += V.text.length,
|
|
2501
|
+
d = r.replace(/\$\{([^}]*)\}/g, "$1");
|
|
2502
|
+
const i = m[0];
|
|
2503
|
+
let u = t + d.length, p = t + d.length;
|
|
2504
|
+
if (i) {
|
|
2505
|
+
let h = 0, y = 0, S = !1;
|
|
2506
|
+
for (; y < r.length && !S; ) {
|
|
2507
|
+
const V = m.find((w) => w.index === y);
|
|
2508
|
+
V ? (h += V.text.length, y += V.length, V === i && (u = t + h - V.text.length, p = t + h, S = !0)) : (h++, y++);
|
|
2509
2509
|
}
|
|
2510
2510
|
}
|
|
2511
2511
|
return {
|
|
2512
|
-
value: l.slice(0, t) +
|
|
2513
|
-
selectionStart:
|
|
2512
|
+
value: l.slice(0, t) + d + l.slice(s),
|
|
2513
|
+
selectionStart: u,
|
|
2514
2514
|
selectionEnd: p
|
|
2515
2515
|
};
|
|
2516
2516
|
}
|
|
2517
2517
|
function Y() {
|
|
2518
|
-
|
|
2518
|
+
ee && (clearTimeout(ee), ee = null), W && (W.remove(), W = null, X = [], U = 0, te = null);
|
|
2519
2519
|
}
|
|
2520
|
-
function
|
|
2521
|
-
const n = e.getBoundingClientRect(), { value: l, selectionStart: s } = e,
|
|
2522
|
-
`),
|
|
2520
|
+
function Ze(e) {
|
|
2521
|
+
const n = e.getBoundingClientRect(), { value: l, selectionStart: s } = e, r = l.substring(0, s).split(`
|
|
2522
|
+
`), c = r.length, d = r[r.length - 1] || "", m = parseInt(getComputedStyle(e).lineHeight) || 20;
|
|
2523
2523
|
return {
|
|
2524
|
-
left: n.left + 10 +
|
|
2525
|
-
top: n.top + (
|
|
2524
|
+
left: n.left + 10 + d.length * 8,
|
|
2525
|
+
top: n.top + (c - 1) * m
|
|
2526
2526
|
};
|
|
2527
2527
|
}
|
|
2528
|
-
function
|
|
2529
|
-
|
|
2528
|
+
function Le(e) {
|
|
2529
|
+
se && clearTimeout(se), se = setTimeout(() => {
|
|
2530
2530
|
const n = e.selectionStart, l = e.selectionEnd;
|
|
2531
2531
|
if (n === l) {
|
|
2532
|
-
|
|
2532
|
+
ie();
|
|
2533
2533
|
return;
|
|
2534
2534
|
}
|
|
2535
2535
|
const s = e.value.substring(n, l).trim();
|
|
2536
2536
|
if (!s) {
|
|
2537
|
-
|
|
2537
|
+
ie();
|
|
2538
2538
|
return;
|
|
2539
2539
|
}
|
|
2540
|
-
const t =
|
|
2540
|
+
const t = ze.find((d) => d.label === s);
|
|
2541
2541
|
if (!t) {
|
|
2542
|
-
|
|
2542
|
+
ie();
|
|
2543
2543
|
return;
|
|
2544
2544
|
}
|
|
2545
|
-
const
|
|
2546
|
-
|
|
2545
|
+
const r = Ze(e), c = Je(t, r);
|
|
2546
|
+
c.style.opacity = "0", G && G.remove(), G = c, document.body.appendChild(G), requestAnimationFrame(() => {
|
|
2547
2547
|
G && (G.style.opacity = "1");
|
|
2548
|
-
}), setTimeout(() =>
|
|
2548
|
+
}), setTimeout(() => ie(), 3e3);
|
|
2549
2549
|
}, 300);
|
|
2550
2550
|
}
|
|
2551
|
-
function
|
|
2552
|
-
|
|
2551
|
+
function ie() {
|
|
2552
|
+
se && (clearTimeout(se), se = null), G && (G.style.opacity = "0", setTimeout(() => {
|
|
2553
2553
|
G && (G.remove(), G = null);
|
|
2554
2554
|
}, 150));
|
|
2555
2555
|
}
|
|
2556
2556
|
typeof document < "u" && document.addEventListener("mousedown", (e) => {
|
|
2557
2557
|
const n = e.target;
|
|
2558
|
-
|
|
2558
|
+
W && !W.contains(n) && Y(), G && !G.contains(n) && ie();
|
|
2559
2559
|
});
|
|
2560
|
-
const
|
|
2561
|
-
const n = e.filter((
|
|
2562
|
-
return new RegExp(
|
|
2563
|
-
},
|
|
2564
|
-
const l =
|
|
2560
|
+
const $e = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), ro = ["else", "end", "call", "fade"], co = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), uo = (e) => {
|
|
2561
|
+
const n = e.filter((d) => d.type !== "var").map((d) => d.label), c = `(\\/\\/[^\\n]*)|('[^'\\n]*')|(\\b\\d+(?:\\.\\d+)?\\b)|(\\b(?:${Array.from(/* @__PURE__ */ new Set([...ro, ...n])).map(co).join("|")})\\b)|(\\$[a-zA-Z_][a-zA-Z0-9_]*)|(\\b(?:btn_\\d+(?:_\\d+)?)\\b)|([;:(){}])`;
|
|
2562
|
+
return new RegExp(c, "g");
|
|
2563
|
+
}, mo = (e) => (n) => {
|
|
2564
|
+
const l = uo(e);
|
|
2565
2565
|
let s = "", t = 0;
|
|
2566
|
-
for (const
|
|
2567
|
-
const [
|
|
2566
|
+
for (const r of n.matchAll(l)) {
|
|
2567
|
+
const [c, d, m, a, i, u, p, b] = r;
|
|
2568
2568
|
let h = "";
|
|
2569
|
-
|
|
2569
|
+
d ? h = "comment" : m ? h = "str" : a ? h = "num" : i ? h = "word" : u ? h = "var" : p ? h = "event" : b && (h = "operator"), s += $e(n.slice(t, r.index)), s += `<span class="tok--${h}">${$e(c)}</span>`, t = r.index + c.length;
|
|
2570
2570
|
}
|
|
2571
|
-
return s +=
|
|
2572
|
-
},
|
|
2571
|
+
return s += $e(n.slice(t)), s;
|
|
2572
|
+
}, Xe = {
|
|
2573
2573
|
word: "text-blue-600 dark:text-blue-400",
|
|
2574
2574
|
func: "text-yellow-600 dark:text-yellow-400",
|
|
2575
2575
|
var: "text-cyan-600 dark:text-cyan-400",
|
|
2576
2576
|
event: "text-purple-600 dark:text-purple-400"
|
|
2577
|
-
},
|
|
2577
|
+
}, fo = (e, n, l) => {
|
|
2578
2578
|
const s = document.createElement("div");
|
|
2579
2579
|
return s.className = `
|
|
2580
2580
|
fixed z-[10000] min-w-[250px] max-w-[400px] max-h-[250px]
|
|
2581
2581
|
overflow-y-auto p-1 rounded-lg shadow-lg border
|
|
2582
2582
|
border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800
|
|
2583
2583
|
text-sm font-mono scrollbar pointer-events-none
|
|
2584
|
-
`, e.forEach((t,
|
|
2585
|
-
const
|
|
2586
|
-
|
|
2584
|
+
`, e.forEach((t, r) => {
|
|
2585
|
+
const c = r === n, d = document.createElement("div");
|
|
2586
|
+
d.className = `
|
|
2587
2587
|
flex items-center justify-between gap-2 px-3 py-1.5 cursor-pointer
|
|
2588
2588
|
rounded transition-colors duration-100 border-l-2
|
|
2589
|
-
${
|
|
2589
|
+
${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"}
|
|
2590
2590
|
`;
|
|
2591
|
-
const
|
|
2592
|
-
|
|
2591
|
+
const m = Xe[t.type] || "text-gray-700 dark:text-gray-300";
|
|
2592
|
+
d.innerHTML = `
|
|
2593
2593
|
<div class="flex items-center gap-2 flex-1">
|
|
2594
|
-
<span class="${
|
|
2594
|
+
<span class="${m} font-medium">${t.label}</span>
|
|
2595
2595
|
${t.detail ? `<span class="text-xs text-gray-500 dark:text-gray-400 ml-2">${t.detail}</span>` : ""}
|
|
2596
2596
|
</div>
|
|
2597
2597
|
${t.description ? `<span class="text-xs text-gray-400 dark:text-gray-500">${t.description}</span>` : ""}
|
|
2598
|
-
`,
|
|
2598
|
+
`, d.addEventListener("click", () => l(r)), s.appendChild(d);
|
|
2599
2599
|
}), s;
|
|
2600
|
-
},
|
|
2600
|
+
}, po = (e, n) => {
|
|
2601
2601
|
const l = document.createElement("div");
|
|
2602
2602
|
l.className = `
|
|
2603
2603
|
fixed z-[10001] px-3 py-2 font-mono text-sm max-w-[300px]
|
|
@@ -2609,14 +2609,14 @@ const xe = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, "
|
|
|
2609
2609
|
left: ${n.left + 40}px; top: ${n.top - 10}px;
|
|
2610
2610
|
transform: translateX(-50%) translateY(-100%); opacity: 0;
|
|
2611
2611
|
`;
|
|
2612
|
-
let t = `<div class="font-medium ${
|
|
2612
|
+
let t = `<div class="font-medium ${Xe[e.type] || "text-gray-700 dark:text-gray-300"}">${e.label}</div>`;
|
|
2613
2613
|
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;
|
|
2614
|
-
const
|
|
2615
|
-
return
|
|
2614
|
+
const r = document.createElement("div");
|
|
2615
|
+
return r.className = `
|
|
2616
2616
|
absolute bottom-[-6px] left-1/2 w-2.5 h-2.5 -translate-x-1/2 rotate-45
|
|
2617
2617
|
bg-white dark:bg-gray-800 border-r border-b border-gray-200 dark:border-gray-700
|
|
2618
|
-
`, l.appendChild(
|
|
2619
|
-
},
|
|
2618
|
+
`, l.appendChild(r), l;
|
|
2619
|
+
}, vo = [
|
|
2620
2620
|
{ label: "if", type: "word", insert: `if:\${$v0<10};
|
|
2621
2621
|
|
|
2622
2622
|
else;
|
|
@@ -2651,7 +2651,7 @@ end;`, detail: "event(name: string)" },
|
|
|
2651
2651
|
{ label: "$e", type: "var", insert: "$e${0}", detail: "var event" },
|
|
2652
2652
|
{ label: "$c", type: "var", insert: "$c${0}", detail: "var call" },
|
|
2653
2653
|
{ label: "$p", type: "var", insert: "$p${0}", detail: "gpio" }
|
|
2654
|
-
],
|
|
2654
|
+
], La = /* @__PURE__ */ M({
|
|
2655
2655
|
__name: "ScriptEditor",
|
|
2656
2656
|
props: {
|
|
2657
2657
|
modelValue: {},
|
|
@@ -2661,66 +2661,66 @@ end;`, detail: "event(name: string)" },
|
|
|
2661
2661
|
setup(e, { emit: n }) {
|
|
2662
2662
|
const l = n;
|
|
2663
2663
|
let s;
|
|
2664
|
-
const t = [...
|
|
2665
|
-
return
|
|
2664
|
+
const t = [...vo, ...e.suggestions];
|
|
2665
|
+
return oe(
|
|
2666
2666
|
() => e.modelValue,
|
|
2667
|
-
(
|
|
2668
|
-
s.update({ value:
|
|
2667
|
+
(r) => {
|
|
2668
|
+
s.update({ value: r });
|
|
2669
2669
|
}
|
|
2670
|
-
),
|
|
2671
|
-
s = new
|
|
2670
|
+
), Q(() => {
|
|
2671
|
+
s = new eo("#editor", {
|
|
2672
2672
|
value: e.modelValue,
|
|
2673
2673
|
lineNumbers: !0,
|
|
2674
|
-
highlighters: [
|
|
2674
|
+
highlighters: [mo(t)],
|
|
2675
2675
|
plugins: [
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2676
|
+
so(),
|
|
2677
|
+
lo(),
|
|
2678
|
+
ao({
|
|
2679
2679
|
customSuggestions: t,
|
|
2680
2680
|
minPrefixLength: 1,
|
|
2681
2681
|
maxSuggestions: 20,
|
|
2682
|
-
i18n: (
|
|
2682
|
+
i18n: (r) => r,
|
|
2683
2683
|
tooltip: {
|
|
2684
2684
|
enabled: !0
|
|
2685
2685
|
},
|
|
2686
|
-
renderMenu:
|
|
2687
|
-
renderTooltip:
|
|
2686
|
+
renderMenu: fo,
|
|
2687
|
+
renderTooltip: po
|
|
2688
2688
|
}),
|
|
2689
|
-
|
|
2689
|
+
oo()
|
|
2690
2690
|
],
|
|
2691
2691
|
styles: { fontSize: "14px" }
|
|
2692
|
-
}), s.onUpdate((
|
|
2693
|
-
l("update:modelValue",
|
|
2692
|
+
}), s.onUpdate((r) => {
|
|
2693
|
+
l("update:modelValue", r);
|
|
2694
2694
|
});
|
|
2695
|
-
}),
|
|
2695
|
+
}), we(() => {
|
|
2696
2696
|
s.destroy();
|
|
2697
|
-
}), (
|
|
2697
|
+
}), (r, c) => (f(), v("div", null, [...c[0] || (c[0] = [
|
|
2698
2698
|
o("div", {
|
|
2699
2699
|
class: "",
|
|
2700
2700
|
id: "editor"
|
|
2701
2701
|
}, null, -1)
|
|
2702
2702
|
])]));
|
|
2703
2703
|
}
|
|
2704
|
-
}),
|
|
2704
|
+
}), ho = { class: "max-w-4xl mx-auto" }, go = {
|
|
2705
2705
|
key: 0,
|
|
2706
2706
|
class: "text-sm"
|
|
2707
|
-
},
|
|
2707
|
+
}, bo = {
|
|
2708
2708
|
key: 0,
|
|
2709
2709
|
class: "text-gray-500"
|
|
2710
|
-
},
|
|
2710
|
+
}, xo = {
|
|
2711
2711
|
key: 1,
|
|
2712
2712
|
class: "text-red-600"
|
|
2713
|
-
},
|
|
2713
|
+
}, yo = ["innerHTML"], _o = "https://raw.githubusercontent.com/bondrogeen/vuesp/refs/heads/master/github/docs/scriptrunner/", $o = "https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js", Aa = /* @__PURE__ */ M({
|
|
2714
2714
|
__name: "ScriptViewDocs",
|
|
2715
2715
|
props: {
|
|
2716
2716
|
lang: { default: "en" }
|
|
2717
2717
|
},
|
|
2718
2718
|
setup(e) {
|
|
2719
|
-
const n =
|
|
2720
|
-
let
|
|
2721
|
-
const
|
|
2719
|
+
const n = E(""), l = E(""), s = E(null), t = E(!1), r = E(null);
|
|
2720
|
+
let c = null;
|
|
2721
|
+
const d = () => new Promise((i, u) => {
|
|
2722
2722
|
if (typeof window > "u" || typeof document > "u") {
|
|
2723
|
-
|
|
2723
|
+
u(new Error("Markdown loading is available only in a browser"));
|
|
2724
2724
|
return;
|
|
2725
2725
|
}
|
|
2726
2726
|
if (window.marked) {
|
|
@@ -2728,116 +2728,403 @@ end;`, detail: "event(name: string)" },
|
|
|
2728
2728
|
gfm: !0,
|
|
2729
2729
|
breaks: !0,
|
|
2730
2730
|
headerIds: !1
|
|
2731
|
-
}),
|
|
2731
|
+
}), i(window.marked);
|
|
2732
2732
|
return;
|
|
2733
2733
|
}
|
|
2734
2734
|
const p = document.createElement("script");
|
|
2735
|
-
p.src =
|
|
2735
|
+
p.src = $o, p.async = !0, p.onload = () => {
|
|
2736
2736
|
window.marked ? (window.marked.setOptions({
|
|
2737
2737
|
gfm: !0,
|
|
2738
2738
|
breaks: !0,
|
|
2739
2739
|
headerIds: !1
|
|
2740
|
-
}),
|
|
2740
|
+
}), i(window.marked)) : u(new Error("Marked library not found after loading"));
|
|
2741
2741
|
}, p.onerror = () => {
|
|
2742
|
-
|
|
2742
|
+
u(new Error("Failed to load Marked library from CDN"));
|
|
2743
2743
|
}, document.head.appendChild(p);
|
|
2744
|
-
}),
|
|
2745
|
-
const
|
|
2744
|
+
}), m = (i) => {
|
|
2745
|
+
const u = i.split(`
|
|
2746
2746
|
`), p = {};
|
|
2747
2747
|
let b = !0;
|
|
2748
|
-
for (const h of
|
|
2748
|
+
for (const h of u) {
|
|
2749
2749
|
if (b && h.startsWith("#")) {
|
|
2750
2750
|
b = !1;
|
|
2751
2751
|
continue;
|
|
2752
2752
|
}
|
|
2753
2753
|
if (b && h.includes(":")) {
|
|
2754
|
-
const [
|
|
2755
|
-
|
|
2754
|
+
const [y, S] = h.split(":").map((V) => V.trim());
|
|
2755
|
+
y && S && (y.toLowerCase().includes("version") && (p.version = S), (y.toLowerCase().includes("обновлено") || y.toLowerCase().includes("updated")) && (p.updated = S));
|
|
2756
2756
|
}
|
|
2757
2757
|
}
|
|
2758
2758
|
return p;
|
|
2759
|
-
}, a = async (
|
|
2760
|
-
if (!
|
|
2761
|
-
|
|
2759
|
+
}, a = async (i) => {
|
|
2760
|
+
if (!c) {
|
|
2761
|
+
r.value = "error";
|
|
2762
2762
|
return;
|
|
2763
2763
|
}
|
|
2764
|
-
t.value = !0,
|
|
2764
|
+
t.value = !0, r.value = null, l.value = "";
|
|
2765
2765
|
try {
|
|
2766
|
-
const
|
|
2766
|
+
const u = `${_o}${i}.md`, p = await fetch(u);
|
|
2767
2767
|
if (!p.ok)
|
|
2768
2768
|
throw new Error(`HTTP ${p.status}: ${p.statusText}`);
|
|
2769
2769
|
const b = await p.text();
|
|
2770
|
-
n.value = b, s.value =
|
|
2771
|
-
} catch (
|
|
2772
|
-
const p =
|
|
2773
|
-
|
|
2770
|
+
n.value = b, s.value = m(b), l.value = c.parse(b);
|
|
2771
|
+
} catch (u) {
|
|
2772
|
+
const p = u instanceof Error ? u.message : "";
|
|
2773
|
+
r.value = p, console.error("Error loading docs:", u);
|
|
2774
2774
|
} finally {
|
|
2775
2775
|
t.value = !1;
|
|
2776
2776
|
}
|
|
2777
2777
|
};
|
|
2778
|
-
return
|
|
2778
|
+
return Q(async () => {
|
|
2779
2779
|
try {
|
|
2780
|
-
|
|
2781
|
-
const
|
|
2782
|
-
await a(
|
|
2783
|
-
} catch (
|
|
2784
|
-
const
|
|
2785
|
-
|
|
2780
|
+
c = await d();
|
|
2781
|
+
const i = e.lang ? "ru" : "en";
|
|
2782
|
+
await a(i);
|
|
2783
|
+
} catch (i) {
|
|
2784
|
+
const u = i instanceof Error ? i.message : "";
|
|
2785
|
+
r.value = u, console.error("Initialization error:", i);
|
|
2786
2786
|
}
|
|
2787
|
-
}), (
|
|
2788
|
-
t.value ||
|
|
2789
|
-
t.value ? (f(), v("span",
|
|
2790
|
-
|
|
2791
|
-
])) :
|
|
2787
|
+
}), (i, u) => (f(), v("div", ho, [
|
|
2788
|
+
t.value || r.value ? (f(), v("div", go, [
|
|
2789
|
+
t.value ? (f(), v("span", bo, "⏳")) : z("", !0),
|
|
2790
|
+
r.value ? (f(), v("span", xo, "❌ " + _(r.value), 1)) : z("", !0)
|
|
2791
|
+
])) : z("", !0),
|
|
2792
2792
|
o("div", {
|
|
2793
2793
|
class: "docs-content",
|
|
2794
2794
|
innerHTML: l.value
|
|
2795
|
-
}, null, 8,
|
|
2795
|
+
}, null, 8, yo)
|
|
2796
2796
|
]));
|
|
2797
2797
|
}
|
|
2798
|
-
}),
|
|
2798
|
+
}), ko = { class: "my-4" }, Da = /* @__PURE__ */ M({
|
|
2799
2799
|
__name: "ScriptDialog",
|
|
2800
2800
|
props: {
|
|
2801
2801
|
idScript: {}
|
|
2802
2802
|
},
|
|
2803
2803
|
emits: ["add", "close"],
|
|
2804
2804
|
setup(e, { emit: n }) {
|
|
2805
|
-
const l = n, { defineField: s, handleSubmit: t, isValid:
|
|
2805
|
+
const l = n, { defineField: s, handleSubmit: t, isValid: r } = wt({
|
|
2806
2806
|
validationSchema: () => ({
|
|
2807
|
-
name: [
|
|
2807
|
+
name: [Ct, Mt(8)]
|
|
2808
2808
|
})
|
|
2809
|
-
}), [
|
|
2810
|
-
l("add",
|
|
2809
|
+
}), [c, d] = s("name"), m = () => {
|
|
2810
|
+
l("add", c.value);
|
|
2811
2811
|
}, a = t(() => {
|
|
2812
|
-
|
|
2812
|
+
m(), c.value = "", l("close", new Event("close"));
|
|
2813
2813
|
});
|
|
2814
|
-
return
|
|
2815
|
-
e.idScript || (
|
|
2816
|
-
}), (
|
|
2817
|
-
const p =
|
|
2818
|
-
return f(), v("div",
|
|
2819
|
-
g(p,
|
|
2820
|
-
modelValue:
|
|
2821
|
-
"onUpdate:modelValue":
|
|
2822
|
-
},
|
|
2814
|
+
return Q(() => {
|
|
2815
|
+
e.idScript || (c.value = "boot");
|
|
2816
|
+
}), (i, u) => {
|
|
2817
|
+
const p = J, b = A;
|
|
2818
|
+
return f(), v("div", ko, [
|
|
2819
|
+
g(p, j({
|
|
2820
|
+
modelValue: q(c),
|
|
2821
|
+
"onUpdate:modelValue": u[0] || (u[0] = (h) => ot(c) ? c.value = h : null)
|
|
2822
|
+
}, q(d), {
|
|
2823
2823
|
disabled: !e.idScript,
|
|
2824
|
-
label:
|
|
2824
|
+
label: i.$t("name")
|
|
2825
2825
|
}), null, 16, ["modelValue", "disabled", "label"]),
|
|
2826
2826
|
g(b, {
|
|
2827
2827
|
class: "w-full",
|
|
2828
2828
|
color: "blue",
|
|
2829
|
-
disabled: !
|
|
2830
|
-
onClick:
|
|
2829
|
+
disabled: !q(r),
|
|
2830
|
+
onClick: q(a)
|
|
2831
2831
|
}, {
|
|
2832
|
-
default:
|
|
2833
|
-
|
|
2832
|
+
default: x(() => [
|
|
2833
|
+
H(_(i.$t("add")), 1)
|
|
2834
2834
|
]),
|
|
2835
2835
|
_: 1
|
|
2836
2836
|
}, 8, ["disabled", "onClick"])
|
|
2837
2837
|
]);
|
|
2838
2838
|
};
|
|
2839
2839
|
}
|
|
2840
|
-
}),
|
|
2840
|
+
}), wo = ["width", "height"], Co = ["d"], ce = /* @__PURE__ */ M({
|
|
2841
|
+
__name: "VisionIcon",
|
|
2842
|
+
props: {
|
|
2843
|
+
name: {},
|
|
2844
|
+
size: { default: 20 }
|
|
2845
|
+
},
|
|
2846
|
+
setup(e) {
|
|
2847
|
+
const n = {
|
|
2848
|
+
home: ["M3 10.5 12 3l9 7.5", "M5 9.5V21h14V9.5"],
|
|
2849
|
+
chart: ["M4 19V5", "M4 19h16", "M8 16v-5", "M12 16V8", "M16 16v-3", "M20 16V6"],
|
|
2850
|
+
card: ["M3 6h18v12H3z", "M3 10h18"],
|
|
2851
|
+
user: ["M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8", "M4 21a8 8 0 0 1 16 0"],
|
|
2852
|
+
users: ["M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", "M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8", "M22 21v-2a4 4 0 0 0-3-3.9", "M16 3.1a4 4 0 0 1 0 7.8"],
|
|
2853
|
+
document: ["M6 3h8l4 4v14H6z", "M14 3v4h4", "M9 12h6", "M9 16h6"],
|
|
2854
|
+
rocket: ["M5 15c-1 3-1 4-1 5 1 0 2 0 5-1", "M9 15l-3-3c4-8 8-9 12-9 0 4-1 8-9 12z", "M14 10a1 1 0 1 0 2 0 1 1 0 0 0-2 0"],
|
|
2855
|
+
search: ["M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16", "M21 21l-4.3-4.3"],
|
|
2856
|
+
settings: ["M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7", "M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1-2 2-.1-.1a1.7 1.7 0 0 0-1.9-.3 1.7 1.7 0 0 0-1 1.6V21h-2.8v-.2a1.7 1.7 0 0 0-1-1.6 1.7 1.7 0 0 0-1.9.3l-.1.1-2-2 .1-.1a1.7 1.7 0 0 0 .3-1.9 1.7 1.7 0 0 0-1.6-1H3v-2.8h.2a1.7 1.7 0 0 0 1.6-1 1.7 1.7 0 0 0-.3-1.9l-.1-.1 2-2 .1.1a1.7 1.7 0 0 0 1.9.3 1.7 1.7 0 0 0 1-1.6V3h2.8v.2a1.7 1.7 0 0 0 1 1.6 1.7 1.7 0 0 0 1.9-.3l.1-.1 2 2-.1.1a1.7 1.7 0 0 0-.3 1.9 1.7 1.7 0 0 0 1.6 1h.2V12h-.2a1.7 1.7 0 0 0-1.6 1z"],
|
|
2857
|
+
bell: ["M18 8a6 6 0 1 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9", "M13.7 21a2 2 0 0 1-3.4 0"],
|
|
2858
|
+
arrowRight: ["M5 12h14", "M13 6l6 6-6 6"],
|
|
2859
|
+
arrowUpRight: ["M7 17 17 7", "M8 7h9v9"],
|
|
2860
|
+
check: ["M20 6 9 17l-5-5"],
|
|
2861
|
+
plus: ["M12 5v14", "M5 12h14"],
|
|
2862
|
+
dots: ["M5 12h.01", "M12 12h.01", "M19 12h.01"],
|
|
2863
|
+
logout: ["M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4", "M16 17l5-5-5-5", "M21 12H9"],
|
|
2864
|
+
sun: ["M12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10", "M12 1v2", "M12 21v2", "M4.2 4.2l1.4 1.4", "M18.4 18.4l1.4 1.4", "M1 12h2", "M21 12h2", "M4.2 19.8l1.4-1.4", "M18.4 5.6l1.4-1.4"],
|
|
2865
|
+
moon: ["M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8"],
|
|
2866
|
+
help: ["M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20", "M9.1 9a3 3 0 1 1 5.8 1c0 2-3 2-3 4", "M12 17h.01"],
|
|
2867
|
+
wallet: ["M3 7h18v12H3z", "M3 7l2-3h14l2 3", "M16 13h2"],
|
|
2868
|
+
trendUp: ["M3 17l6-6 4 4 8-8", "M15 7h6v6"],
|
|
2869
|
+
trendDown: ["M3 7l6 6 4-4 8 8", "M15 17h6v-6"],
|
|
2870
|
+
menu: ["M4 6h16", "M4 12h16", "M4 18h16"],
|
|
2871
|
+
close: ["M6 6l12 12", "M18 6 6 18"],
|
|
2872
|
+
chevronDown: ["M6 9l6 6 6-6"],
|
|
2873
|
+
download: ["M12 3v12", "M7 10l5 5 5-5", "M5 21h14"],
|
|
2874
|
+
edit: ["M12 20h9", "M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z"],
|
|
2875
|
+
trash: ["M3 6h18", "M8 6V4h8v2", "M19 6l-1 15H6L5 6", "M10 11v6", "M14 11v6"],
|
|
2876
|
+
calendar: ["M4 5h16v16H4z", "M16 3v4", "M8 3v4", "M4 10h16"],
|
|
2877
|
+
filter: ["M3 5h18", "M6 12h12", "M10 19h4"],
|
|
2878
|
+
star: ["M12 3l2.8 5.7 6.2.9-4.5 4.4 1.1 6.2L12 17.3 6.4 20.2l1.1-6.2L3 9.6l6.2-.9z"],
|
|
2879
|
+
bolt: ["M13 2 3 14h8l-1 8 11-13h-8z"],
|
|
2880
|
+
wifi: ["M5 12.5a10 10 0 0 1 14 0", "M8.5 16a5 5 0 0 1 7 0", "M12 20h.01"],
|
|
2881
|
+
click: ["M9 9l10 4-4 2-2 4z", "M4 4l3 3"],
|
|
2882
|
+
shopping: ["M6 6h15l-1.5 9h-12z", "M6 6 5 3H2", "M9 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2", "M18 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2"],
|
|
2883
|
+
box: ["M21 8l-9-5-9 5 9 5 9-5", "M3 8v8l9 5 9-5V8", "M12 13v8"],
|
|
2884
|
+
external: ["M14 3h7v7", "M10 14 21 3", "M21 14v7H3V3h7"],
|
|
2885
|
+
github: ["M15 22v-4a4.8 4.8 0 0 0-1-3.5c3.3-.4 6.8-1.6 6.8-7A5.4 5.4 0 0 0 19.5 4 5 5 0 0 0 19.4.5S18.2.1 15 1.8a13.4 13.4 0 0 0-7 0C4.8.1 3.6.5 3.6.5A5 5 0 0 0 3.5 4 5.4 5.4 0 0 0 2 7.5c0 5.4 3.5 6.6 6.8 7A4.8 4.8 0 0 0 8 18v4", "M8 19c-3 .9-3-1.5-4-2"]
|
|
2886
|
+
}, l = T(() => n[e.name] ?? n.help);
|
|
2887
|
+
return (s, t) => (f(), v("svg", {
|
|
2888
|
+
width: e.size,
|
|
2889
|
+
height: e.size,
|
|
2890
|
+
viewBox: "0 0 24 24",
|
|
2891
|
+
fill: "none",
|
|
2892
|
+
stroke: "currentColor",
|
|
2893
|
+
"stroke-width": "1.8",
|
|
2894
|
+
"stroke-linecap": "round",
|
|
2895
|
+
"stroke-linejoin": "round",
|
|
2896
|
+
"aria-hidden": "true"
|
|
2897
|
+
}, [
|
|
2898
|
+
(f(!0), v(L, null, N(l.value, (r, c) => (f(), v("path", {
|
|
2899
|
+
key: c,
|
|
2900
|
+
d: r
|
|
2901
|
+
}, null, 8, Co))), 128))
|
|
2902
|
+
], 8, wo));
|
|
2903
|
+
}
|
|
2904
|
+
}), Ia = /* @__PURE__ */ M({
|
|
2905
|
+
__name: "VisionButton",
|
|
2906
|
+
props: {
|
|
2907
|
+
to: { default: null },
|
|
2908
|
+
href: { default: null },
|
|
2909
|
+
type: { default: "button" },
|
|
2910
|
+
variant: { default: "primary" },
|
|
2911
|
+
size: { default: "md" },
|
|
2912
|
+
block: { type: Boolean, default: !1 },
|
|
2913
|
+
disabled: { type: Boolean, default: !1 }
|
|
2914
|
+
},
|
|
2915
|
+
setup(e) {
|
|
2916
|
+
const n = T(() => e.to ? "router-link" : e.href ? "a" : "button"), l = T(() => ({
|
|
2917
|
+
sm: "h-9 px-3 text-xs",
|
|
2918
|
+
md: "h-11 px-4 text-sm",
|
|
2919
|
+
lg: "h-12 px-6 text-sm"
|
|
2920
|
+
})[e.size]), s = T(() => ({
|
|
2921
|
+
primary: "bg-vision-primary text-white shadow-[0_12px_32px_-14px_var(--app-accent-shadow,rgba(37,99,235,0.9))] hover:brightness-110",
|
|
2922
|
+
cyan: "bg-[#28b7f0] text-[#03111f] shadow-[0_12px_32px_-14px_rgba(40,183,240,0.9)] hover:bg-[#66d3f1]",
|
|
2923
|
+
outline: "border border-white/15 bg-transparent text-white hover:border-white/25 hover:bg-white/5",
|
|
2924
|
+
ghost: "bg-transparent text-vision-muted hover:bg-white/5 hover:text-white",
|
|
2925
|
+
dark: "border border-white/10 bg-vision-card-2 text-white hover:bg-white/5",
|
|
2926
|
+
danger: "border border-vision-danger/25 bg-vision-danger/10 text-vision-danger hover:bg-vision-danger/15",
|
|
2927
|
+
success: "border border-vision-success/25 bg-vision-success/10 text-vision-success hover:bg-vision-success/15",
|
|
2928
|
+
white: "bg-white text-[#060b28] hover:bg-white/90"
|
|
2929
|
+
})[e.variant]), t = T(() => e.to ? { to: e.to } : e.href ? { href: e.href, target: e.href.startsWith("http") ? "_blank" : void 0, rel: e.href.startsWith("http") ? "noreferrer" : void 0 } : { type: e.type, disabled: e.disabled });
|
|
2930
|
+
return (r, c) => (f(), D(re(n.value), j(t.value, {
|
|
2931
|
+
class: ["inline-flex items-center justify-center gap-2 rounded-md font-medium transition-colors disabled:pointer-events-none disabled:opacity-50", [l.value, s.value, e.block ? "w-full" : ""]]
|
|
2932
|
+
}), {
|
|
2933
|
+
default: x(() => [
|
|
2934
|
+
k(r.$slots, "default")
|
|
2935
|
+
]),
|
|
2936
|
+
_: 3
|
|
2937
|
+
}, 16, ["class"]));
|
|
2938
|
+
}
|
|
2939
|
+
}), Ha = /* @__PURE__ */ M({
|
|
2940
|
+
__name: "VisionCard",
|
|
2941
|
+
props: {
|
|
2942
|
+
padded: { type: Boolean, default: !0 }
|
|
2943
|
+
},
|
|
2944
|
+
setup(e) {
|
|
2945
|
+
const n = T(() => e.padded ? "p-5 md:p-6" : "");
|
|
2946
|
+
return (l, s) => (f(), v("div", {
|
|
2947
|
+
class: B(["glass-panel", n.value])
|
|
2948
|
+
}, [
|
|
2949
|
+
k(l.$slots, "default")
|
|
2950
|
+
], 2));
|
|
2951
|
+
}
|
|
2952
|
+
}), Mo = { class: "block" }, zo = {
|
|
2953
|
+
key: 0,
|
|
2954
|
+
class: "mb-2 block text-xs font-medium text-vision-muted"
|
|
2955
|
+
}, So = ["type", "name", "placeholder", "autocomplete"], Vo = {
|
|
2956
|
+
key: 1,
|
|
2957
|
+
class: "mt-1 block text-xs text-vision-danger"
|
|
2958
|
+
}, ja = /* @__PURE__ */ M({
|
|
2959
|
+
__name: "VisionInput",
|
|
2960
|
+
props: /* @__PURE__ */ rt({
|
|
2961
|
+
label: { default: "" },
|
|
2962
|
+
placeholder: { default: "" },
|
|
2963
|
+
type: { default: "text" },
|
|
2964
|
+
name: { default: "" },
|
|
2965
|
+
autocomplete: { default: "off" },
|
|
2966
|
+
icon: { default: "" },
|
|
2967
|
+
error: { default: "" }
|
|
2968
|
+
}, {
|
|
2969
|
+
modelValue: { default: "" },
|
|
2970
|
+
modelModifiers: {}
|
|
2971
|
+
}),
|
|
2972
|
+
emits: ["update:modelValue"],
|
|
2973
|
+
setup(e) {
|
|
2974
|
+
const n = at(e, "modelValue");
|
|
2975
|
+
return (l, s) => (f(), v("label", Mo, [
|
|
2976
|
+
e.label ? (f(), v("span", zo, _(e.label), 1)) : z("", !0),
|
|
2977
|
+
o("span", {
|
|
2978
|
+
class: B(["glass-inset flex items-center gap-3 rounded-md px-4 transition-colors focus-within:border-vision-primary/60", e.error ? "border-vision-danger/50" : "border-white/10 hover:border-white/20"])
|
|
2979
|
+
}, [
|
|
2980
|
+
e.icon ? (f(), D(ce, {
|
|
2981
|
+
key: 0,
|
|
2982
|
+
name: e.icon,
|
|
2983
|
+
size: 18,
|
|
2984
|
+
class: "shrink-0 text-vision-muted"
|
|
2985
|
+
}, null, 8, ["name"])) : z("", !0),
|
|
2986
|
+
he(o("input", {
|
|
2987
|
+
"onUpdate:modelValue": s[0] || (s[0] = (t) => n.value = t),
|
|
2988
|
+
type: e.type,
|
|
2989
|
+
name: e.name,
|
|
2990
|
+
placeholder: e.placeholder,
|
|
2991
|
+
autocomplete: e.autocomplete,
|
|
2992
|
+
class: "h-11 min-w-0 flex-1 bg-transparent text-sm text-white placeholder:text-vision-muted/70 focus:outline-none"
|
|
2993
|
+
}, null, 8, So), [
|
|
2994
|
+
[it, n.value]
|
|
2995
|
+
])
|
|
2996
|
+
], 2),
|
|
2997
|
+
e.error ? (f(), v("span", Vo, _(e.error), 1)) : z("", !0)
|
|
2998
|
+
]));
|
|
2999
|
+
}
|
|
3000
|
+
}), To = {
|
|
3001
|
+
class: "glass-panel w-full max-w-2xl overflow-hidden rounded-[12px] border border-gray-200/70 bg-white/95 dark:border-white/10 dark:bg-[#0b1235]/95",
|
|
3002
|
+
role: "dialog",
|
|
3003
|
+
"aria-modal": "true",
|
|
3004
|
+
"aria-label": "Поиск"
|
|
3005
|
+
}, Bo = { class: "flex items-center gap-3 border-b border-gray-200/70 px-4 dark:border-white/10" }, Eo = ["placeholder"], Lo = { class: "max-h-[55vh] overflow-y-auto p-2" }, Ao = ["href"], Do = { class: "min-w-0" }, Io = { class: "flex flex-wrap items-baseline gap-2" }, Ho = { class: "text-sm font-medium text-gray-900 dark:text-white" }, jo = {
|
|
3006
|
+
key: 0,
|
|
3007
|
+
class: "text-[10px] uppercase tracking-wider text-gray-400"
|
|
3008
|
+
}, Po = {
|
|
3009
|
+
key: 0,
|
|
3010
|
+
class: "mt-0.5 block truncate text-xs text-gray-500 dark:text-gray-400"
|
|
3011
|
+
}, No = {
|
|
3012
|
+
key: 0,
|
|
3013
|
+
class: "px-4 py-10 text-center text-sm text-gray-500 dark:text-gray-400"
|
|
3014
|
+
}, Pa = /* @__PURE__ */ M({
|
|
3015
|
+
__name: "VisionSearch",
|
|
3016
|
+
props: {
|
|
3017
|
+
items: {},
|
|
3018
|
+
placeholder: {}
|
|
3019
|
+
},
|
|
3020
|
+
setup(e) {
|
|
3021
|
+
const n = e, l = E(!1), s = E(""), t = E(null), r = T(() => {
|
|
3022
|
+
const a = s.value.trim().toLowerCase();
|
|
3023
|
+
return (a ? n.items.filter((u) => `${u.title} ${u.description ?? ""} ${u.group ?? ""}`.toLowerCase().includes(a)) : n.items).slice(0, 14);
|
|
3024
|
+
}), c = async () => {
|
|
3025
|
+
var a;
|
|
3026
|
+
l.value = !0, s.value = "", await je(), (a = t.value) == null || a.focus();
|
|
3027
|
+
}, d = () => {
|
|
3028
|
+
l.value = !1, s.value = "";
|
|
3029
|
+
}, m = (a) => {
|
|
3030
|
+
if ((a.metaKey || a.ctrlKey) && a.key.toLowerCase() === "k") {
|
|
3031
|
+
a.preventDefault(), l.value ? d() : c();
|
|
3032
|
+
return;
|
|
3033
|
+
}
|
|
3034
|
+
a.key === "Escape" && l.value && d();
|
|
3035
|
+
};
|
|
3036
|
+
return oe(l, (a) => {
|
|
3037
|
+
typeof document < "u" && (document.body.style.overflow = a ? "hidden" : "");
|
|
3038
|
+
}), Q(() => window.addEventListener("keydown", m)), we(() => {
|
|
3039
|
+
window.removeEventListener("keydown", m), typeof document < "u" && (document.body.style.overflow = "");
|
|
3040
|
+
}), (a, i) => (f(), v(L, null, [
|
|
3041
|
+
o("button", {
|
|
3042
|
+
type: "button",
|
|
3043
|
+
class: "inline-flex h-9 items-center gap-2 rounded-md px-2.5 text-xs text-gray-500 transition-colors hover:bg-white/50 hover:text-[var(--app-accent)] dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-white",
|
|
3044
|
+
"aria-label": "Поиск",
|
|
3045
|
+
onClick: c
|
|
3046
|
+
}, [
|
|
3047
|
+
g(ce, {
|
|
3048
|
+
name: "search",
|
|
3049
|
+
size: 17
|
|
3050
|
+
}),
|
|
3051
|
+
i[1] || (i[1] = o("span", { class: "hidden lg:inline" }, "Поиск", -1)),
|
|
3052
|
+
i[2] || (i[2] = o("kbd", { class: "hidden rounded border border-gray-300/60 px-1.5 py-0.5 font-mono text-[10px] text-gray-400 dark:border-white/10 dark:text-gray-500 lg:inline" }, "⌘K", -1))
|
|
3053
|
+
]),
|
|
3054
|
+
(f(), D(dt, { to: "body" }, [
|
|
3055
|
+
l.value ? (f(), v("div", {
|
|
3056
|
+
key: 0,
|
|
3057
|
+
class: "fixed inset-0 z-[100] flex items-start justify-center overflow-y-auto bg-slate-900/40 px-4 pt-[12vh] backdrop-blur-sm dark:bg-black/60",
|
|
3058
|
+
onClick: F(d, ["self"])
|
|
3059
|
+
}, [
|
|
3060
|
+
o("div", To, [
|
|
3061
|
+
o("div", Bo, [
|
|
3062
|
+
g(ce, {
|
|
3063
|
+
name: "search",
|
|
3064
|
+
size: 18,
|
|
3065
|
+
class: "shrink-0 text-gray-400"
|
|
3066
|
+
}),
|
|
3067
|
+
he(o("input", {
|
|
3068
|
+
ref_key: "input",
|
|
3069
|
+
ref: t,
|
|
3070
|
+
"onUpdate:modelValue": i[0] || (i[0] = (u) => s.value = u),
|
|
3071
|
+
type: "search",
|
|
3072
|
+
placeholder: e.placeholder ?? "Поиск по документации и страницам…",
|
|
3073
|
+
class: "h-14 min-w-0 flex-1 bg-transparent text-sm text-gray-900 placeholder:text-gray-400 focus:outline-none dark:text-white dark:placeholder:text-gray-500"
|
|
3074
|
+
}, null, 8, Eo), [
|
|
3075
|
+
[He, s.value]
|
|
3076
|
+
]),
|
|
3077
|
+
i[3] || (i[3] = o("kbd", { class: "hidden rounded border border-gray-300/60 px-1.5 py-0.5 font-mono text-[10px] text-gray-400 dark:border-white/10 dark:text-gray-500 sm:inline" }, "Esc", -1))
|
|
3078
|
+
]),
|
|
3079
|
+
o("div", Lo, [
|
|
3080
|
+
(f(!0), v(L, null, N(r.value, (u) => (f(), v("a", {
|
|
3081
|
+
key: `${u.group}-${u.to}-${u.title}`,
|
|
3082
|
+
href: u.to,
|
|
3083
|
+
class: "flex items-start gap-3 rounded-md px-3 py-2.5 transition-colors hover:bg-white/50 dark:hover:bg-white/5",
|
|
3084
|
+
onClick: d
|
|
3085
|
+
}, [
|
|
3086
|
+
g(ce, {
|
|
3087
|
+
name: "arrowRight",
|
|
3088
|
+
size: 16,
|
|
3089
|
+
class: "mt-0.5 shrink-0 text-gray-400"
|
|
3090
|
+
}),
|
|
3091
|
+
o("span", Do, [
|
|
3092
|
+
o("span", Io, [
|
|
3093
|
+
o("span", Ho, _(u.title), 1),
|
|
3094
|
+
u.group ? (f(), v("span", jo, _(u.group), 1)) : z("", !0)
|
|
3095
|
+
]),
|
|
3096
|
+
u.description ? (f(), v("span", Po, _(u.description), 1)) : z("", !0)
|
|
3097
|
+
])
|
|
3098
|
+
], 8, Ao))), 128)),
|
|
3099
|
+
r.value.length ? z("", !0) : (f(), v("p", No, " Ничего не найдено. Попробуйте другой запрос. "))
|
|
3100
|
+
])
|
|
3101
|
+
])
|
|
3102
|
+
])) : z("", !0)
|
|
3103
|
+
]))
|
|
3104
|
+
], 64));
|
|
3105
|
+
}
|
|
3106
|
+
}), Oo = ["aria-label", "title"], Na = /* @__PURE__ */ M({
|
|
3107
|
+
__name: "VisionThemeToggle",
|
|
3108
|
+
setup(e) {
|
|
3109
|
+
const n = E(xt("theme") === "light" ? "light" : "dark"), l = (s) => {
|
|
3110
|
+
n.value = s, yt(s);
|
|
3111
|
+
};
|
|
3112
|
+
return Q(async () => {
|
|
3113
|
+
await je(), setTimeout(() => l(n.value), 0);
|
|
3114
|
+
}), (s, t) => (f(), v("button", {
|
|
3115
|
+
type: "button",
|
|
3116
|
+
class: "grid size-9 place-items-center rounded-md text-gray-600 transition-colors hover:bg-white/50 hover:text-[var(--app-accent)] dark:text-gray-300 dark:hover:bg-white/5 dark:hover:text-white",
|
|
3117
|
+
"aria-label": n.value === "dark" ? "Включить светлую тему" : "Включить тёмную тему",
|
|
3118
|
+
title: n.value === "dark" ? "Светлая тема" : "Тёмная тема",
|
|
3119
|
+
onClick: t[0] || (t[0] = (r) => l(n.value === "dark" ? "light" : "dark"))
|
|
3120
|
+
}, [
|
|
3121
|
+
g(ce, {
|
|
3122
|
+
name: n.value === "dark" ? "sun" : "moon",
|
|
3123
|
+
size: 18
|
|
3124
|
+
}, null, 8, ["name"])
|
|
3125
|
+
], 8, Oo));
|
|
3126
|
+
}
|
|
3127
|
+
}), Oa = /* @__PURE__ */ M({
|
|
2841
3128
|
__name: "VAutocomplete",
|
|
2842
3129
|
props: {
|
|
2843
3130
|
modelValue: { default: "" },
|
|
@@ -2848,31 +3135,31 @@ end;`, detail: "event(name: string)" },
|
|
|
2848
3135
|
},
|
|
2849
3136
|
emits: ["update:modelValue", "select"],
|
|
2850
3137
|
setup(e, { emit: n }) {
|
|
2851
|
-
const l = n, s = (
|
|
2852
|
-
|
|
3138
|
+
const l = n, s = (r) => l("update:modelValue", r), t = (r, c) => {
|
|
3139
|
+
r.click(new Event("click")), l("select", c);
|
|
2853
3140
|
};
|
|
2854
|
-
return (
|
|
3141
|
+
return (r, c) => (f(), D(Ne, j(r.$attrs, {
|
|
2855
3142
|
top: "50px",
|
|
2856
3143
|
"hide-on-click": ""
|
|
2857
3144
|
}), {
|
|
2858
|
-
activator:
|
|
2859
|
-
g(
|
|
3145
|
+
activator: x(({ on: d }) => [
|
|
3146
|
+
g(J, {
|
|
2860
3147
|
"model-value": e.modelValue,
|
|
2861
3148
|
name: e.name,
|
|
2862
3149
|
message: e.message,
|
|
2863
3150
|
label: e.label,
|
|
2864
3151
|
"onUpdate:modelValue": s,
|
|
2865
|
-
onClick:
|
|
3152
|
+
onClick: d.open
|
|
2866
3153
|
}, null, 8, ["model-value", "name", "message", "label", "onClick"])
|
|
2867
3154
|
]),
|
|
2868
|
-
default:
|
|
2869
|
-
g(
|
|
3155
|
+
default: x(({ on: d }) => [
|
|
3156
|
+
g(Ce, {
|
|
2870
3157
|
items: e.items,
|
|
2871
|
-
onClick: (
|
|
3158
|
+
onClick: (m) => t(d, m)
|
|
2872
3159
|
}, {
|
|
2873
|
-
default:
|
|
2874
|
-
k(
|
|
2875
|
-
|
|
3160
|
+
default: x(({ item: m }) => [
|
|
3161
|
+
k(r.$slots, "default", { item: m }, () => [
|
|
3162
|
+
H(_(m.name), 1)
|
|
2876
3163
|
])
|
|
2877
3164
|
]),
|
|
2878
3165
|
_: 3
|
|
@@ -2881,37 +3168,37 @@ end;`, detail: "event(name: string)" },
|
|
|
2881
3168
|
_: 3
|
|
2882
3169
|
}, 16));
|
|
2883
3170
|
}
|
|
2884
|
-
}),
|
|
3171
|
+
}), Uo = {
|
|
2885
3172
|
viewBox: "0 0 24 24",
|
|
2886
3173
|
width: "1.2em",
|
|
2887
3174
|
height: "1.2em"
|
|
2888
3175
|
};
|
|
2889
|
-
function
|
|
2890
|
-
return f(), v("svg",
|
|
3176
|
+
function Ko(e, n) {
|
|
3177
|
+
return f(), v("svg", Uo, [...n[0] || (n[0] = [
|
|
2891
3178
|
o("path", {
|
|
2892
3179
|
fill: "currentColor",
|
|
2893
3180
|
d: "m12 15l-4.243-4.242l1.415-1.414L12 12.172l2.828-2.828l1.415 1.414z"
|
|
2894
3181
|
}, null, -1)
|
|
2895
3182
|
])]);
|
|
2896
3183
|
}
|
|
2897
|
-
const
|
|
3184
|
+
const Ro = O({ name: "ri-arrow-drop-down-line", render: Ko }), Fo = { class: "v-expansion__content max-h-0 overflow-hidden transition-all duration-300" }, Wo = { class: "p-4" }, Ua = /* @__PURE__ */ M({
|
|
2898
3185
|
__name: "VExpansion",
|
|
2899
3186
|
props: {
|
|
2900
3187
|
label: { default: "" },
|
|
2901
3188
|
value: { type: Boolean, default: !1 }
|
|
2902
3189
|
},
|
|
2903
3190
|
setup(e) {
|
|
2904
|
-
const n =
|
|
3191
|
+
const n = E(null), l = E(e.value), s = () => {
|
|
2905
3192
|
if (!n.value) return;
|
|
2906
|
-
const
|
|
2907
|
-
|
|
3193
|
+
const r = n.value.querySelector(".v-expansion__content");
|
|
3194
|
+
r && (r.style.maxHeight = l.value ? `${r.scrollHeight}px` : "0");
|
|
2908
3195
|
}, t = () => {
|
|
2909
3196
|
l.value = !l.value, s();
|
|
2910
3197
|
};
|
|
2911
|
-
return
|
|
3198
|
+
return Q(() => {
|
|
2912
3199
|
s();
|
|
2913
|
-
}), (
|
|
2914
|
-
const
|
|
3200
|
+
}), (r, c) => {
|
|
3201
|
+
const d = Ro;
|
|
2915
3202
|
return f(), v("div", {
|
|
2916
3203
|
ref_key: "root",
|
|
2917
3204
|
ref: n,
|
|
@@ -2921,25 +3208,25 @@ const bo = O({ name: "ri-arrow-drop-down-line", render: go }), yo = { class: "v-
|
|
|
2921
3208
|
class: "cursor-pointer min-h-[60px] px-4 flex items-center justify-between",
|
|
2922
3209
|
onClick: t
|
|
2923
3210
|
}, [
|
|
2924
|
-
o("h4", null,
|
|
3211
|
+
o("h4", null, _(e.label), 1),
|
|
2925
3212
|
o("div", {
|
|
2926
|
-
class:
|
|
3213
|
+
class: B(["transition text-gray-400", { "rotate-x-180": l.value }])
|
|
2927
3214
|
}, [
|
|
2928
|
-
g(
|
|
3215
|
+
g(d, { class: "size-6" })
|
|
2929
3216
|
], 2)
|
|
2930
3217
|
]),
|
|
2931
|
-
o("div",
|
|
2932
|
-
o("div",
|
|
2933
|
-
k(
|
|
3218
|
+
o("div", Fo, [
|
|
3219
|
+
o("div", Wo, [
|
|
3220
|
+
k(r.$slots, "default")
|
|
2934
3221
|
])
|
|
2935
3222
|
])
|
|
2936
3223
|
], 512);
|
|
2937
3224
|
};
|
|
2938
3225
|
}
|
|
2939
|
-
}),
|
|
3226
|
+
}), qo = ["onDragstart", "onDragenter"], Go = {
|
|
2940
3227
|
key: 0,
|
|
2941
3228
|
class: "absolute inset-0 border border-dashed border-blue-600 rounded"
|
|
2942
|
-
},
|
|
3229
|
+
}, Ka = /* @__PURE__ */ M({
|
|
2943
3230
|
__name: "VDragDrop",
|
|
2944
3231
|
props: {
|
|
2945
3232
|
items: {},
|
|
@@ -2947,31 +3234,31 @@ const bo = O({ name: "ri-arrow-drop-down-line", render: go }), yo = { class: "v-
|
|
|
2947
3234
|
},
|
|
2948
3235
|
emits: ["update:items", "order-change"],
|
|
2949
3236
|
setup(e, { emit: n }) {
|
|
2950
|
-
const l = n, s =
|
|
2951
|
-
"opacity-30 scale-105 z-10": s.value ===
|
|
2952
|
-
"transition-transform duration-200": s.value !==
|
|
2953
|
-
}),
|
|
2954
|
-
s.value = p, t.value = b,
|
|
2955
|
-
},
|
|
2956
|
-
s.value !== null && (
|
|
3237
|
+
const l = n, s = E(null), t = E(0), r = E(-1), c = ({ id: u }) => ({
|
|
3238
|
+
"opacity-30 scale-105 z-10": s.value === u,
|
|
3239
|
+
"transition-transform duration-200": s.value !== u
|
|
3240
|
+
}), d = (u, p, b) => {
|
|
3241
|
+
s.value = p, t.value = b, u.dataTransfer.effectAllowed = "move";
|
|
3242
|
+
}, m = (u) => {
|
|
3243
|
+
s.value !== null && (r.value = u);
|
|
2957
3244
|
}, a = () => {
|
|
2958
|
-
s.value = null,
|
|
2959
|
-
},
|
|
2960
|
-
if (
|
|
2961
|
-
const p = e.items.findIndex((h) => h[e.itemKey] === s.value), b =
|
|
3245
|
+
s.value = null, r.value = -1;
|
|
3246
|
+
}, i = (u) => {
|
|
3247
|
+
if (u.preventDefault(), s.value && r.value !== -1) {
|
|
3248
|
+
const p = e.items.findIndex((h) => h[e.itemKey] === s.value), b = r.value;
|
|
2962
3249
|
if (p !== b && b !== -1) {
|
|
2963
|
-
const h = [...e.items], [
|
|
2964
|
-
h.splice(b, 0,
|
|
3250
|
+
const h = [...e.items], [y] = h.splice(p, 1);
|
|
3251
|
+
h.splice(b, 0, y), l("update:items", h), l("order-change", { fromIndex: p, toIndex: b, movedItem: y, newOrder: h });
|
|
2965
3252
|
}
|
|
2966
3253
|
}
|
|
2967
|
-
|
|
3254
|
+
r.value = -1;
|
|
2968
3255
|
};
|
|
2969
|
-
return (
|
|
2970
|
-
onDragover: p[1] || (p[1] =
|
|
3256
|
+
return (u, p) => (f(), v("div", {
|
|
3257
|
+
onDragover: p[1] || (p[1] = F(() => {
|
|
2971
3258
|
}, ["prevent"])),
|
|
2972
|
-
onDrop:
|
|
3259
|
+
onDrop: i
|
|
2973
3260
|
}, [
|
|
2974
|
-
g(
|
|
3261
|
+
g(De, {
|
|
2975
3262
|
"enter-active-class": "transition-all duration-300 ease",
|
|
2976
3263
|
"enter-from-class": "opacity-0 translate-x-8",
|
|
2977
3264
|
"enter-to-class": "opacity-100 translate-x-0",
|
|
@@ -2980,34 +3267,34 @@ const bo = O({ name: "ri-arrow-drop-down-line", render: go }), yo = { class: "v-
|
|
|
2980
3267
|
"leave-to-class": "opacity-0 translate-x-8",
|
|
2981
3268
|
"move-class": "transition-all duration-300 ease"
|
|
2982
3269
|
}, {
|
|
2983
|
-
default:
|
|
2984
|
-
(f(!0), v(
|
|
3270
|
+
default: x(() => [
|
|
3271
|
+
(f(!0), v(L, null, N(e.items, (b, h) => (f(), v("div", {
|
|
2985
3272
|
key: `${b.id}_drug`,
|
|
2986
|
-
class:
|
|
3273
|
+
class: B(["relative group", c(b)]),
|
|
2987
3274
|
draggable: "true",
|
|
2988
|
-
onDragstart: (
|
|
2989
|
-
onDragenter: (
|
|
3275
|
+
onDragstart: (y) => d(y, b.id, h),
|
|
3276
|
+
onDragenter: (y) => m(h),
|
|
2990
3277
|
onDragend: a,
|
|
2991
|
-
onDragover: p[0] || (p[0] =
|
|
3278
|
+
onDragover: p[0] || (p[0] = F(() => {
|
|
2992
3279
|
}, ["prevent"]))
|
|
2993
3280
|
}, [
|
|
2994
|
-
k(
|
|
3281
|
+
k(u.$slots, "default", {
|
|
2995
3282
|
item: b,
|
|
2996
3283
|
key: b.id,
|
|
2997
3284
|
index: h,
|
|
2998
3285
|
isDragging: s.value === b.id
|
|
2999
3286
|
}),
|
|
3000
|
-
|
|
3001
|
-
], 42,
|
|
3287
|
+
r.value === h && s.value !== b.id ? (f(), v("div", Go)) : z("", !0)
|
|
3288
|
+
], 42, qo))), 128))
|
|
3002
3289
|
]),
|
|
3003
3290
|
_: 3
|
|
3004
3291
|
})
|
|
3005
3292
|
], 32));
|
|
3006
3293
|
}
|
|
3007
|
-
}),
|
|
3294
|
+
}), Jo = { class: "glass-inset overflow-hidden rounded-md" }, Zo = { class: "min-w-full" }, Xo = { class: "border-y border-gray-200/70 py-3 dark:border-white/10" }, Yo = { class: "bg-gray-100/70 dark:bg-white/[0.04]" }, Qo = { class: "flex items-center" }, ea = { class: "divide-y divide-gray-100 dark:divide-white/5" }, ta = ["onClick"], na = { class: "flex items-center text-gray-700 dark:text-white/70" }, sa = { key: 1 }, la = {
|
|
3008
3295
|
class: "py-3 whitespace-nowrap",
|
|
3009
3296
|
colspan: "9"
|
|
3010
|
-
},
|
|
3297
|
+
}, oa = { class: "flex items-center justify-center px-2 text-sm text-gray-500 dark:text-white/50" }, Ra = /* @__PURE__ */ M({
|
|
3011
3298
|
__name: "VTable",
|
|
3012
3299
|
props: {
|
|
3013
3300
|
headers: { default: () => [] },
|
|
@@ -3015,48 +3302,48 @@ const bo = O({ name: "ri-arrow-drop-down-line", render: go }), yo = { class: "v-
|
|
|
3015
3302
|
},
|
|
3016
3303
|
emits: ["click"],
|
|
3017
3304
|
setup(e, { emit: n }) {
|
|
3018
|
-
const l = n, s = (
|
|
3019
|
-
return (
|
|
3020
|
-
o("table",
|
|
3021
|
-
o("thead",
|
|
3022
|
-
o("tr",
|
|
3023
|
-
(f(!0), v(
|
|
3305
|
+
const l = n, s = (c, d) => l("click", c, d), t = (c) => (c == null ? void 0 : c.className) || "", r = (c, { key: d }) => c == null ? void 0 : c[d];
|
|
3306
|
+
return (c, d) => (f(), v("div", Jo, [
|
|
3307
|
+
o("table", Zo, [
|
|
3308
|
+
o("thead", Xo, [
|
|
3309
|
+
o("tr", Yo, [
|
|
3310
|
+
(f(!0), v(L, null, N(e.headers, (m, a) => (f(), v("th", {
|
|
3024
3311
|
key: a,
|
|
3025
|
-
class:
|
|
3312
|
+
class: B(["px-4 py-2 whitespace-nowrap font-normal text-gray-500 dark:text-white/50", t(m)])
|
|
3026
3313
|
}, [
|
|
3027
|
-
k(
|
|
3028
|
-
item:
|
|
3314
|
+
k(c.$slots, "header", {
|
|
3315
|
+
item: m,
|
|
3029
3316
|
i: a
|
|
3030
3317
|
}, () => [
|
|
3031
|
-
o("div",
|
|
3318
|
+
o("div", Qo, _(m.name), 1)
|
|
3032
3319
|
])
|
|
3033
3320
|
], 2))), 128))
|
|
3034
3321
|
])
|
|
3035
3322
|
]),
|
|
3036
|
-
o("tbody",
|
|
3037
|
-
e.items.length ? (f(!0), v(
|
|
3323
|
+
o("tbody", ea, [
|
|
3324
|
+
e.items.length ? (f(!0), v(L, { key: 0 }, N(e.items, (m, a) => (f(), v("tr", {
|
|
3038
3325
|
key: a,
|
|
3039
3326
|
class: "transition-colors hover:bg-primary/[0.04] dark:hover:bg-white/[0.04]",
|
|
3040
|
-
onClick: (
|
|
3327
|
+
onClick: (i) => s(m, i)
|
|
3041
3328
|
}, [
|
|
3042
|
-
(f(!0), v(
|
|
3043
|
-
key:
|
|
3329
|
+
(f(!0), v(L, null, N(e.headers, (i, u) => (f(), v("td", {
|
|
3330
|
+
key: u,
|
|
3044
3331
|
class: "py-2 px-4"
|
|
3045
3332
|
}, [
|
|
3046
|
-
o("div",
|
|
3047
|
-
k(
|
|
3048
|
-
item:
|
|
3333
|
+
o("div", na, [
|
|
3334
|
+
k(c.$slots, i.key, {
|
|
3335
|
+
item: m,
|
|
3049
3336
|
i: a
|
|
3050
3337
|
}, () => [
|
|
3051
|
-
|
|
3338
|
+
H(_(r(m, i)), 1)
|
|
3052
3339
|
])
|
|
3053
3340
|
])
|
|
3054
3341
|
]))), 128))
|
|
3055
|
-
], 8,
|
|
3056
|
-
o("td",
|
|
3057
|
-
o("div",
|
|
3058
|
-
k(
|
|
3059
|
-
|
|
3342
|
+
], 8, ta))), 128)) : (f(), v("tr", sa, [
|
|
3343
|
+
o("td", la, [
|
|
3344
|
+
o("div", oa, [
|
|
3345
|
+
k(c.$slots, "empty", {}, () => [
|
|
3346
|
+
d[0] || (d[0] = H("The list is empty", -1))
|
|
3060
3347
|
])
|
|
3061
3348
|
])
|
|
3062
3349
|
])
|
|
@@ -3065,19 +3352,19 @@ const bo = O({ name: "ri-arrow-drop-down-line", render: go }), yo = { class: "v-
|
|
|
3065
3352
|
])
|
|
3066
3353
|
]));
|
|
3067
3354
|
}
|
|
3068
|
-
}),
|
|
3355
|
+
}), Fa = /* @__PURE__ */ M({
|
|
3069
3356
|
__name: "VTooltip",
|
|
3070
3357
|
props: {
|
|
3071
3358
|
timeout: {},
|
|
3072
3359
|
disabled: { type: Boolean }
|
|
3073
3360
|
},
|
|
3074
3361
|
setup(e) {
|
|
3075
|
-
const n =
|
|
3362
|
+
const n = E(!1), l = () => {
|
|
3076
3363
|
e.disabled || (n.value = !0);
|
|
3077
3364
|
}, s = () => {
|
|
3078
3365
|
n.value = !1;
|
|
3079
|
-
}, t =
|
|
3080
|
-
return
|
|
3366
|
+
}, t = Ie("tooltip");
|
|
3367
|
+
return $t(t, () => s()), (r, c) => (f(), v("div", {
|
|
3081
3368
|
ref: "tooltip",
|
|
3082
3369
|
class: "relative v-tooltip",
|
|
3083
3370
|
onMouseenter: l,
|
|
@@ -3087,9 +3374,9 @@ const bo = O({ name: "ri-arrow-drop-down-line", render: go }), yo = { class: "v-
|
|
|
3087
3374
|
type: "button",
|
|
3088
3375
|
onClick: l
|
|
3089
3376
|
}, [
|
|
3090
|
-
k(
|
|
3377
|
+
k(r.$slots, "activator")
|
|
3091
3378
|
]),
|
|
3092
|
-
g(
|
|
3379
|
+
g(ke, {
|
|
3093
3380
|
"enter-active-class": "duration-300 ease-out",
|
|
3094
3381
|
"enter-from-class": "transform opacity-0 -translate-y-2",
|
|
3095
3382
|
"enter-to-class": "opacity-100 translate-y-0",
|
|
@@ -3097,8 +3384,8 @@ const bo = O({ name: "ri-arrow-drop-down-line", render: go }), yo = { class: "v-
|
|
|
3097
3384
|
"leave-from-class": "opacity-100 translate-y-0",
|
|
3098
3385
|
"leave-to-class": "transform opacity-0 -translate-y-2"
|
|
3099
3386
|
}, {
|
|
3100
|
-
default:
|
|
3101
|
-
k(
|
|
3387
|
+
default: x(() => [
|
|
3388
|
+
k(r.$slots, "default", { show: n.value })
|
|
3102
3389
|
]),
|
|
3103
3390
|
_: 3
|
|
3104
3391
|
})
|
|
@@ -3106,51 +3393,59 @@ const bo = O({ name: "ri-arrow-drop-down-line", render: go }), yo = { class: "v-
|
|
|
3106
3393
|
}
|
|
3107
3394
|
});
|
|
3108
3395
|
export {
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3396
|
+
pa as AppAside,
|
|
3397
|
+
va as AppHeader,
|
|
3398
|
+
ba as AppNav,
|
|
3399
|
+
ha as AppNotification,
|
|
3400
|
+
ga as AppOverlay,
|
|
3401
|
+
xa as AppProgress,
|
|
3402
|
+
Ca as BlockBreadcrumb,
|
|
3403
|
+
ya as BlockInfo,
|
|
3404
|
+
_a as BlockScan,
|
|
3405
|
+
$a as BlockService,
|
|
3406
|
+
ka as BlockStatus,
|
|
3407
|
+
wa as BlockUpdate,
|
|
3408
|
+
ae as CardBase,
|
|
3409
|
+
Ma as CardButton,
|
|
3410
|
+
za as CardDate,
|
|
3411
|
+
Sa as CardDimmer,
|
|
3412
|
+
Va as CardInfo,
|
|
3413
|
+
Ta as CardInput,
|
|
3414
|
+
Ba as CardList,
|
|
3415
|
+
Ga as CardMain,
|
|
3416
|
+
en as CardNotification,
|
|
3417
|
+
vo as DEFAULT_SUGGESTIONS,
|
|
3418
|
+
Ea as ItemEdit,
|
|
3419
|
+
Da as ScriptDialog,
|
|
3420
|
+
La as ScriptEditor,
|
|
3421
|
+
Aa as ScriptViewDocs,
|
|
3422
|
+
Oa as VAutocomplete,
|
|
3423
|
+
A as VButton,
|
|
3424
|
+
Ml as VCheckbox,
|
|
3425
|
+
Oe as VDialog,
|
|
3426
|
+
Ka as VDragDrop,
|
|
3427
|
+
Ne as VDropdown,
|
|
3428
|
+
Ua as VExpansion,
|
|
3429
|
+
cs as VFile,
|
|
3430
|
+
xe as VFunc,
|
|
3431
|
+
Pe as VIconLogo,
|
|
3432
|
+
ct as VIconLogoMini,
|
|
3433
|
+
Ce as VList,
|
|
3434
|
+
We as VListObject,
|
|
3435
|
+
ft as VLoader,
|
|
3436
|
+
Ja as VPopup,
|
|
3437
|
+
le as VSelect,
|
|
3438
|
+
Ra as VTable,
|
|
3439
|
+
xl as VTabs,
|
|
3440
|
+
J as VTextField,
|
|
3153
3441
|
Fe as VTextWrapper,
|
|
3154
|
-
|
|
3155
|
-
|
|
3442
|
+
Fa as VTooltip,
|
|
3443
|
+
mt as VWifiIcon,
|
|
3444
|
+
Ia as VisionButton,
|
|
3445
|
+
Ha as VisionCard,
|
|
3446
|
+
ce as VisionIcon,
|
|
3447
|
+
ja as VisionInput,
|
|
3448
|
+
Pa as VisionSearch,
|
|
3449
|
+
Na as VisionThemeToggle,
|
|
3450
|
+
mo as fullHighlighter
|
|
3156
3451
|
};
|