vuesp-components 2.1.7 → 2.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-CG8zhRFf.js +59 -0
- package/dist/components/script/editor/ScriptEditor.vue.d.ts.map +1 -1
- package/dist/components/script/editor/format.d.ts +2 -2
- package/dist/components/script/editor/format.d.ts.map +1 -1
- package/dist/components/script/editor/highlighters/index.d.ts +2 -1
- package/dist/components/script/editor/highlighters/index.d.ts.map +1 -1
- package/dist/components/script/editor/plugins/autocomplete.d.ts.map +1 -1
- package/dist/components/script/editor/plugins/render/index.d.ts.map +1 -1
- package/dist/components/script/editor/plugins/types.d.ts +2 -2
- package/dist/components/script/editor/plugins/types.d.ts.map +1 -1
- package/dist/components/script/editor/suggestions.d.ts +3 -0
- package/dist/components/script/editor/suggestions.d.ts.map +1 -0
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.es.js +76 -54
- package/dist/index.es.js +1322 -1311
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/components/script/editor/plugins/suggestions.d.ts +0 -3
- package/dist/components/script/editor/plugins/suggestions.d.ts.map +0 -1
package/dist/index.es.js
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
1
|
import { getDataValue as dt } from "./dashboard/index.es.js";
|
|
2
|
-
import { dashboardCards as
|
|
3
|
-
import { openBlock as f, createElementBlock as
|
|
4
|
-
import { u as
|
|
5
|
-
import {
|
|
2
|
+
import { dashboardCards as ni, getFunction as li, getParamsData as si, getStateItem as oi, setStateItem as ai } from "./dashboard/index.es.js";
|
|
3
|
+
import { openBlock as f, createElementBlock as v, createStaticVNode as ut, createElementVNode as a, defineComponent as V, resolveComponent as Pe, Fragment as O, createCommentVNode as E, normalizeClass as B, createVNode as b, withCtx as y, createBlock as M, renderSlot as $, markRaw as F, computed as L, resolveDynamicComponent as de, mergeProps as N, shallowRef as Me, Teleport as He, Transition as ae, unref as T, withModifiers as H, normalizeStyle as Q, ref as D, resolveDirective as ft, withDirectives as Ce, renderList as R, createTextVNode as I, toDisplayString as k, TransitionGroup as Ne, watch as ue, normalizeProps as U, guardReactiveProps as K, withKeys as mt, createPropsRestProxy as vt, onMounted as fe, onUnmounted as Fe, reactive as pt, useTemplateRef as Re, vShow as ht, vModelText as gt, createSlots as bt } from "vue";
|
|
4
|
+
import { u as Ue, a as yt, b as Ke, c as We, d as ze, e as xt, o as $t } from "./useSwipeDown-BctVX4c1.js";
|
|
5
|
+
import { f as kt, t as _t, g as wt, u as pe, s as Ct, d as zt } from "./app-CG8zhRFf.js";
|
|
6
6
|
const St = {
|
|
7
|
-
mounted(e,
|
|
8
|
-
e.clickOutsideEvent = function(
|
|
9
|
-
e ===
|
|
7
|
+
mounted(e, n) {
|
|
8
|
+
e.clickOutsideEvent = function(l) {
|
|
9
|
+
e === l.target || e.contains(l.target) || n.value(l, e);
|
|
10
10
|
}, document.addEventListener("click", e.clickOutsideEvent);
|
|
11
11
|
},
|
|
12
12
|
unmounted(e) {
|
|
13
13
|
document.removeEventListener("click", e.clickOutsideEvent), delete e.clickOutsideEvent;
|
|
14
14
|
}
|
|
15
|
-
}, Vt = [{ name: "outside", directive: St }], ge = (e,
|
|
16
|
-
const
|
|
17
|
-
for (const [s, t] of
|
|
18
|
-
|
|
19
|
-
return
|
|
20
|
-
}, Bt = {},
|
|
15
|
+
}, Vt = [{ name: "outside", directive: St }], ge = (e, n) => {
|
|
16
|
+
const l = e.__vccOpts || e;
|
|
17
|
+
for (const [s, t] of n)
|
|
18
|
+
l[s] = t;
|
|
19
|
+
return l;
|
|
20
|
+
}, Bt = {}, Et = {
|
|
21
21
|
viewBox: "0 0 179 40",
|
|
22
22
|
fill: "currentColor"
|
|
23
23
|
};
|
|
24
|
-
function
|
|
25
|
-
return f(),
|
|
24
|
+
function Tt(e, n) {
|
|
25
|
+
return f(), v("svg", Et, [...n[0] || (n[0] = [
|
|
26
26
|
ut('<g transform="matrix(0.13287749,0,0,0.13643171,26.823508,13.407673)"><path d="m -19.25933,-16.057909 c 0,39.1906 -14.287,86.055995 -38.669,116.999999 -7.898,10.024 -30.4718,32.819 -43.7731,17.695 -9.4823,-10.781 -3.53183,-36.917714 -0.86893,-48.907714 9.1618,-41.251693 19.72123,-78.8733849 30.31103,-119.787285 -27.50968,14.537655 -68.26323,-24.154322 -70.36602,-2.214449 -12.32038,69.23655 -28.82323,204.245118 16.36602,215.925448 81.802,10.63 120.333,-82.698004 129.4249996,-148.710999 2.182,-15.84009991 4.123,-31.9832 2.401,-48 -2.342,-21.78506 -24.7959996,-32.68227 -43.7859996,-21.58643 -11.424,6.67523 -12.148,29.93713 -1.935,38.01393 5.462,4.3199 14.927,3.091 20.895,0.5725 z"></path><path d="m 104.76548,-63.374174 0.008,91.15236 -26.35225,25.003926 26.35676,25.415735 4.8e-4,91.161403 4.03033,0.0237 c 0,0 0.0729,-90.913243 -0.0476,-91.163063 l 26.24012,-24.776315 -26.23835,-25.66073 0.007,-91.147024 z"></path><path d="m 803.85444,82.816565 c -5.5092,-1.69169 -15.7197,-2.12913 -19.9329,1.03114 -5.56,4.548 -0.63,22.670005 -0.76,28.973005 0.3943,19.76599 20.7146,30.35978 36.02,33 0,0 45.06,4.77 68,-5.439 35.89996,-15.975 40.75996,-63.180005 13.91,-89.457 -15.2385,-18.333755 -72.7584,-32.66908 -78.91,-50.10399958 -6.54,-7.52040002 -2.52,-22.38120042 5.1,-27.89120042 10.47,-7.5605 25.91,-7.3647 37.9,-5.017 13.11,2.5659 14.15,13.6285 18,24.9082004 1.48,4.3522 2.88,12.3564 8.1,13.6674 2.25,0.5623 4.67,-0.1094 6.9,-0.3827 16.42996,-2.011 11.28456,-11.418391 12.09456,-24.2037914 0.38,-6.0219 2.2254,-16.238609 -1.1246,-21.752209 -5.98996,-9.87979 -17.48276,-9.960049 -30.96996,-15.3287 -11.9944,-2.919504 -32.57,-5.50288 -50,-1.25772 -13.92,3.39017 -28.5,10.49772 -37.24,22.25772 -16.31,21.9622 -9.6,57.1861 10.26,74.6998 22.17,19.5582 58.4,21.7732 76.41,46.304195 16.9,23.013005 -18.71,37.732005 -37.1,36.158005 -39.9169,-0.34531 -23.6297,-30.723925 -36.6571,-40.166145 z"></path><path d="m 321.18154,-32.17929 21,9 -46,120.999995 c -13.02939,-49.349215 -25.65589,-93.5184936 -37,-121.999995 5.741,-1.2008 17.946,-4.1139 20.397,-10.1049 2.328,-5.6934 -1.142,-13.0456 -1.397,-18.8951 -9.12189,0.745226 -79.43846,-2.275099 -82.411,2.3179 -1.02172,5.2378 -3.84926,12.95938 -1.985,17.2878 4.036,8.5605 18.82154,3.517306 23.75154,13.866906 25.90475,54.255645 38.51776,106.713979 60.87446,156.527394 37.33703,54.02331 63.06896,-92.52485 72.275,-119 4.089,-11.8192996 7.212,-30.0265 15.194,-39.7724 15.1599,-17.433642 28.97616,-5.381825 21.868,-28.07945 -5.23694,-5.944366 -63.1086,-2.739072 -64.389,-1.54476 -3.452,4.31661 -7.5289,7.804293 -2.178,19.39661 z"></path><path d="m 401.18154,-53.17929 c -0.998,4.83681 -4.908,16.1206 -1.357,20.3511 4.914,5.8555 20.341,3.7676 21.463,12.689 3.596,28.5694004 -0.4,58.2962 0.855,86.9599 0.882,20.149995 3.491,41.865 17.134,57.961 36.351,42.885 114.137,25.661 128.322,-27.961005 9.142,-34.561995 3.01191,-80.803507 3.08491,-116.292007 0.033,-15.7886 15.53509,-3.553988 22.46909,-13.356888 3.337,-4.7169 -1.212,-15.187 -1.971,-20.3511 -20.45735,-0.261837 -40.85188,-0.262234 -61.258,1.02779 l -3.742,11.97221 c 0.84877,13.898543 11.37685,10.038234 23.90801,11.758642 0.32053,9.189207 0.091,48.923358 0.092,71.241358 10e-4,19.4 0.471,40.338995 -8.89,58 -15.56,29.358 -61.659,29.409 -74.878,-2.000005 -10.636,-25.273 -6.147,-56.234995 -6.233,-82.999995 -0.035,-10.9870996 -2.501,-25.3419996 0.319,-35.9568 2.549,-9.5978 16.626,-6.4297 22.064,-12.6921 3.287,-3.7858 -0.52,-15.71299 -1.382,-20.3511 z"></path><path d="m 760.05964,143.05268 c -5.1123,-31.58627 4.9497,-52.437285 -1.4781,-59.628975 -3.17,-3.163 -17.48,-3.877 -20.39,-0.285 -7.636,9.412 -6.012,27.571005 -14.737,36.079005 -3.136,3.058 -10.272,1.461 -14.273,1.689 -13.102,0.746 -25.895,-0.086 -39,-0.086 l -1,-68 c 7.223,0.913 21.685,-1.996 27.722,1.269 6.665,3.604 3.577,17.035995 10.556,20.532995 5.15472,-0.0642 13.05488,0.47604 17.494,-1.405 5.21328,-7.758815 3.74312,-60.612259 -0.015,-62.640795 -5.5141,-0.237113 -13.29293,-2.8563906 -17.543,-1.1527996 -6.595,2.8734996 -5.002,15.2292996 -10.608,19.7931996 -5.233,4.2609 -21.417,2.0768 -27.606,0.6034 l 0.018,-19.9999996 0.982,-42.0000004 h 36 c 4.195,0 11.017,-1.271 14.725,1.0278 9.479,5.8759 5.235,25.2669004 13.705,30.94060042 4.66,3.12049998 14.21,-2.03520002 19.57,-1.96840002 -1.7258,-10.0332024 5.1749,-44.7657364 -0.6,-49.9722104 -8.573,-0.17431 -123.95249,0.09746 -142.26,0.5756 -2.813,3.26479 -4.226,15.59871 -1.533,19.00621 4.834,6.1168 16.163,4.3646 20.481,9.9544 4.51586,28.5714044 7.89004,96.377815 0.594,132.328 -2.185,7.787 -16.181,5.969 -20.654,11.832 -1.59611,5.22999 -0.7409,13.33851 1.536,18.048 5.16025,7.51372 110.02916,3.17366 148.3141,3.45997 z"></path><path d="m 964.1815,-23.17929 c 0,43.4127 3.83,88.767 -0.06,131.985 -0.8,8.923 -14.88,7.544 -20.62,12.09 -4.2,3.326 -1.95,14.442 -0.17,18.777 15.7137,4.67091 86.3037,9.27518 89.39,-4.852 0.57,-3.057 2.36,-9.582 0.42,-12.297 -5.77,-8.041 -28.93,-2.391 -30.81,-13.747 -0.063,-55.41713 -0.3488,-55.25935 -0.15,-140.956 16.19,0 34.24,-2.9842 46.98,9.0934 18.26,17.2977004 11.94,53.4098 -8.98,65.6236 -7.67,4.477 -18.44,3.283 -27,3.283 v 23 c 23.19,0 50.85,-0.216 69,-17.093 28.42,-26.4403 19.73,-83.9314 -16,-99.7334 -4.6952,-8.320027 -96.8662,-17.196078 -120.68,-4.43208 -2.7,1.3721 -3.6701,5.98455 -3.17,8.34798 -3.3313,17.201533 8.54,18.6194 21.85,20.9105 z"></path></g>', 1)
|
|
27
27
|
])]);
|
|
28
28
|
}
|
|
29
|
-
const Se = /* @__PURE__ */ ge(Bt, [["render",
|
|
29
|
+
const Se = /* @__PURE__ */ ge(Bt, [["render", Tt]]), Lt = {}, Mt = {
|
|
30
30
|
width: "40",
|
|
31
31
|
height: "40",
|
|
32
32
|
viewBox: "0 0 40 40",
|
|
33
33
|
fill: "currentColor"
|
|
34
34
|
};
|
|
35
|
-
function At(e,
|
|
36
|
-
return f(),
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
function At(e, n) {
|
|
36
|
+
return f(), v("svg", Mt, [...n[0] || (n[0] = [
|
|
37
|
+
a("g", { transform: "matrix(0.13287749,0,0,0.13643171,26.823508,13.407673)" }, [
|
|
38
|
+
a("path", { d: "m -19.25933,-16.057909 c 0,39.1906 -14.287,86.055995 -38.669,116.999999 -7.898,10.024 -30.4718,32.819 -43.7731,17.695 -9.4823,-10.781 -3.53183,-36.917714 -0.86893,-48.907714 9.1618,-41.251693 19.72123,-78.8733849 30.31103,-119.787285 -27.50968,14.537655 -68.26323,-24.154322 -70.36602,-2.214449 -12.32038,69.23655 -28.82323,204.245118 16.36602,215.925448 81.802,10.63 120.333,-82.698004 129.4249996,-148.710999 2.182,-15.84009991 4.123,-31.9832 2.401,-48 -2.342,-21.78506 -24.7959996,-32.68227 -43.7859996,-21.58643 -11.424,6.67523 -12.148,29.93713 -1.935,38.01393 5.462,4.3199 14.927,3.091 20.895,0.5725 z" })
|
|
39
39
|
], -1)
|
|
40
40
|
])]);
|
|
41
41
|
}
|
|
42
|
-
const qe = /* @__PURE__ */ ge(Lt, [["render", At]]), Dt = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear h-full" },
|
|
42
|
+
const qe = /* @__PURE__ */ ge(Lt, [["render", At]]), Dt = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear h-full" }, Sa = /* @__PURE__ */ V({
|
|
43
43
|
__name: "AppAside",
|
|
44
44
|
props: {
|
|
45
45
|
isSidebar: { type: Boolean, default: !1 }
|
|
46
46
|
},
|
|
47
47
|
emits: ["sidebar"],
|
|
48
|
-
setup(e, { emit:
|
|
49
|
-
const
|
|
50
|
-
e.isSidebar &&
|
|
48
|
+
setup(e, { emit: n }) {
|
|
49
|
+
const l = n, s = () => {
|
|
50
|
+
e.isSidebar && l("sidebar", !e.isSidebar);
|
|
51
51
|
};
|
|
52
|
-
return (t,
|
|
53
|
-
const
|
|
54
|
-
return f(),
|
|
55
|
-
e.isSidebar ? (f(),
|
|
52
|
+
return (t, o) => {
|
|
53
|
+
const i = Pe("router-link");
|
|
54
|
+
return f(), v(O, null, [
|
|
55
|
+
e.isSidebar ? (f(), v("div", {
|
|
56
56
|
key: 0,
|
|
57
57
|
class: "lg:hidden overlay fixed left-0 top-0 h-full w-full bg-black/40 z-10 bg-blur",
|
|
58
58
|
onClick: s
|
|
59
|
-
})) :
|
|
60
|
-
|
|
59
|
+
})) : E("", !0),
|
|
60
|
+
a("aside", {
|
|
61
61
|
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 px-5 transition-all duration-350 lg:translate-x-0 dark:border-gray-800 bg-white dark:bg-gray-900"])
|
|
62
62
|
}, [
|
|
63
|
-
|
|
63
|
+
a("div", {
|
|
64
64
|
class: B([e.isSidebar ? "justify-center" : "justify-between", "sidebar-header flex items-center gap-2 pt-6 pb-6 justify-between"])
|
|
65
65
|
}, [
|
|
66
|
-
b(
|
|
66
|
+
b(i, { to: "/" }, {
|
|
67
67
|
default: y(() => [
|
|
68
68
|
e.isSidebar ? (f(), M(qe, {
|
|
69
69
|
key: 0,
|
|
@@ -76,8 +76,8 @@ const qe = /* @__PURE__ */ ge(Lt, [["render", At]]), Dt = { class: "no-scrollbar
|
|
|
76
76
|
_: 1
|
|
77
77
|
})
|
|
78
78
|
], 2),
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
a("div", Dt, [
|
|
80
|
+
$(t.$slots, "default")
|
|
81
81
|
])
|
|
82
82
|
], 2)
|
|
83
83
|
], 64);
|
|
@@ -88,9 +88,9 @@ const qe = /* @__PURE__ */ ge(Lt, [["render", At]]), Dt = { class: "no-scrollbar
|
|
|
88
88
|
width: "1.2em",
|
|
89
89
|
height: "1.2em"
|
|
90
90
|
};
|
|
91
|
-
function Ot(e,
|
|
92
|
-
return f(),
|
|
93
|
-
|
|
91
|
+
function Ot(e, n) {
|
|
92
|
+
return f(), v("svg", It, [...n[0] || (n[0] = [
|
|
93
|
+
a("path", {
|
|
94
94
|
fill: "currentColor",
|
|
95
95
|
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"
|
|
96
96
|
}, null, -1)
|
|
@@ -101,48 +101,48 @@ const Ge = F({ name: "ri-more-line", render: Ot }), jt = {
|
|
|
101
101
|
width: "1.2em",
|
|
102
102
|
height: "1.2em"
|
|
103
103
|
};
|
|
104
|
-
function
|
|
105
|
-
return f(),
|
|
106
|
-
|
|
104
|
+
function Pt(e, n) {
|
|
105
|
+
return f(), v("svg", jt, [...n[0] || (n[0] = [
|
|
106
|
+
a("path", {
|
|
107
107
|
fill: "currentColor",
|
|
108
108
|
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"
|
|
109
109
|
}, null, -1)
|
|
110
110
|
])]);
|
|
111
111
|
}
|
|
112
|
-
const
|
|
112
|
+
const Ht = F({ name: "ri-logout-box-line", render: Pt }), Nt = {
|
|
113
113
|
viewBox: "0 0 24 24",
|
|
114
114
|
width: "1.2em",
|
|
115
115
|
height: "1.2em"
|
|
116
116
|
};
|
|
117
|
-
function Ft(e,
|
|
118
|
-
return f(),
|
|
119
|
-
|
|
117
|
+
function Ft(e, n) {
|
|
118
|
+
return f(), v("svg", Nt, [...n[0] || (n[0] = [
|
|
119
|
+
a("path", {
|
|
120
120
|
fill: "currentColor",
|
|
121
121
|
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"
|
|
122
122
|
}, null, -1)
|
|
123
123
|
])]);
|
|
124
124
|
}
|
|
125
|
-
const Je = F({ name: "ri-notification-line", render: Ft }),
|
|
125
|
+
const Je = F({ name: "ri-notification-line", render: Ft }), Rt = {
|
|
126
126
|
viewBox: "0 0 24 24",
|
|
127
127
|
width: "1.2em",
|
|
128
128
|
height: "1.2em"
|
|
129
129
|
};
|
|
130
|
-
function
|
|
131
|
-
return f(),
|
|
132
|
-
|
|
130
|
+
function Ut(e, n) {
|
|
131
|
+
return f(), v("svg", Rt, [...n[0] || (n[0] = [
|
|
132
|
+
a("path", {
|
|
133
133
|
fill: "currentColor",
|
|
134
134
|
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"
|
|
135
135
|
}, null, -1)
|
|
136
136
|
])]);
|
|
137
137
|
}
|
|
138
|
-
const
|
|
138
|
+
const Kt = F({ name: "ri-moon-line", render: Ut }), Wt = {
|
|
139
139
|
viewBox: "0 0 24 24",
|
|
140
140
|
width: "1.2em",
|
|
141
141
|
height: "1.2em"
|
|
142
142
|
};
|
|
143
|
-
function qt(e,
|
|
144
|
-
return f(),
|
|
145
|
-
|
|
143
|
+
function qt(e, n) {
|
|
144
|
+
return f(), v("svg", Wt, [...n[0] || (n[0] = [
|
|
145
|
+
a("path", {
|
|
146
146
|
fill: "currentColor",
|
|
147
147
|
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"
|
|
148
148
|
}, null, -1)
|
|
@@ -153,22 +153,22 @@ const Gt = F({ name: "ri-sun-line", render: qt }), Jt = {
|
|
|
153
153
|
width: "1.2em",
|
|
154
154
|
height: "1.2em"
|
|
155
155
|
};
|
|
156
|
-
function Xt(e,
|
|
157
|
-
return f(),
|
|
158
|
-
|
|
156
|
+
function Xt(e, n) {
|
|
157
|
+
return f(), v("svg", Jt, [...n[0] || (n[0] = [
|
|
158
|
+
a("path", {
|
|
159
159
|
fill: "currentColor",
|
|
160
160
|
d: "M3 4h18v2H3zm0 7h18v2H3zm0 7h18v2H3z"
|
|
161
161
|
}, null, -1)
|
|
162
162
|
])]);
|
|
163
163
|
}
|
|
164
|
-
const Yt = F({ name: "ri-menu-line", render: Xt }),
|
|
164
|
+
const Yt = F({ name: "ri-menu-line", render: Xt }), Zt = {}, Qt = {
|
|
165
165
|
class: "animate-spin h-6 w-6",
|
|
166
166
|
fill: "none",
|
|
167
167
|
viewBox: "0 0 24 24"
|
|
168
168
|
};
|
|
169
|
-
function
|
|
170
|
-
return f(),
|
|
171
|
-
|
|
169
|
+
function en(e, n) {
|
|
170
|
+
return f(), v("svg", Qt, [...n[0] || (n[0] = [
|
|
171
|
+
a("circle", {
|
|
172
172
|
class: "opacity-25",
|
|
173
173
|
cx: "12",
|
|
174
174
|
cy: "12",
|
|
@@ -176,14 +176,14 @@ function el(e, l) {
|
|
|
176
176
|
stroke: "currentColor",
|
|
177
177
|
"stroke-width": "2"
|
|
178
178
|
}, null, -1),
|
|
179
|
-
|
|
179
|
+
a("path", {
|
|
180
180
|
class: "opacity-75",
|
|
181
181
|
fill: "currentColor",
|
|
182
182
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
183
183
|
}, null, -1)
|
|
184
184
|
])]);
|
|
185
185
|
}
|
|
186
|
-
const Ve = /* @__PURE__ */ ge(
|
|
186
|
+
const Ve = /* @__PURE__ */ ge(Zt, [["render", en]]), tn = "relative flex justify-center items-center transition not-disabled:cursor-pointer not-disabled:hover:opacity-90 disabled:opacity-40 rounded", A = /* @__PURE__ */ V({
|
|
187
187
|
__name: "VButton",
|
|
188
188
|
props: {
|
|
189
189
|
outline: { type: Boolean, default: !1 },
|
|
@@ -195,62 +195,62 @@ const Ve = /* @__PURE__ */ ge(Qt, [["render", el]]), tl = "relative flex justify
|
|
|
195
195
|
loading: { type: Boolean, default: !1 }
|
|
196
196
|
},
|
|
197
197
|
emits: ["click"],
|
|
198
|
-
setup(e, { emit:
|
|
199
|
-
const
|
|
198
|
+
setup(e, { emit: n }) {
|
|
199
|
+
const l = n, s = (C) => l("click", C), t = e.outline ? "dark:text-white border border-green-600 text-green-600" : "text-white bg-green-600 dark:bg-green-800", o = e.outline ? "dark:text-white border border-red-600 text-red-600" : "text-white bg-red-600 dark:bg-red-800", i = e.outline ? "dark:text-white border border-gray-600 text-gray-600" : "bg-gray-100 dark:bg-gray-800", d = e.outline ? "dark:text-white border border-blue-600 text-blue-600" : "text-white bg-blue-700 dark:bg-blue-800", u = (e.outline, ""), r = { green: t, red: o, gray: i, blue: d, transparent: u }, c = {
|
|
200
200
|
button: "px-3",
|
|
201
201
|
icon: "rounded-full border border-gray-200 dark:border-gray-800"
|
|
202
202
|
}, m = {
|
|
203
203
|
button: { sm: "h-8", md: "h-10", lg: "h-12", xl: "h-14" },
|
|
204
204
|
icon: { sm: "size-8", md: "size-10", lg: "size-12", xl: "size-14" }
|
|
205
|
-
},
|
|
205
|
+
}, p = L(() => [tn, _(e.color), x(e.type), h(e.type, e.size)]), g = L(() => e.href || e.to ? "router-link" : "button"), h = (C, z) => {
|
|
206
206
|
var j;
|
|
207
207
|
return ((j = m[C]) == null ? void 0 : j[z]) || "";
|
|
208
|
-
}, x = (C) => (c == null ? void 0 : c[C]) || "",
|
|
209
|
-
return (C, z) => (f(), M(de(g.value),
|
|
208
|
+
}, x = (C) => (c == null ? void 0 : c[C]) || "", _ = (C) => r == null ? void 0 : r[C];
|
|
209
|
+
return (C, z) => (f(), M(de(g.value), N(C.$attrs, {
|
|
210
210
|
href: e.href,
|
|
211
211
|
to: e.to,
|
|
212
|
-
class:
|
|
212
|
+
class: p.value,
|
|
213
213
|
onClick: s
|
|
214
214
|
}), {
|
|
215
215
|
default: y(() => [
|
|
216
|
-
|
|
216
|
+
a("span", {
|
|
217
217
|
class: B(e.loading ? "opacity-0" : "")
|
|
218
218
|
}, [
|
|
219
|
-
|
|
219
|
+
$(C.$slots, "default")
|
|
220
220
|
], 2),
|
|
221
221
|
e.loading ? (f(), M(Ve, {
|
|
222
222
|
key: 0,
|
|
223
223
|
class: "absolute left-1/2 -translate-x-1/2"
|
|
224
|
-
})) :
|
|
224
|
+
})) : E("", !0)
|
|
225
225
|
]),
|
|
226
226
|
_: 3
|
|
227
227
|
}, 16, ["href", "to", "class"]));
|
|
228
228
|
}
|
|
229
|
-
}),
|
|
229
|
+
}), nn = {
|
|
230
230
|
viewBox: "0 0 24 24",
|
|
231
231
|
width: "1.2em",
|
|
232
232
|
height: "1.2em"
|
|
233
233
|
};
|
|
234
|
-
function
|
|
235
|
-
return f(),
|
|
236
|
-
|
|
234
|
+
function ln(e, n) {
|
|
235
|
+
return f(), v("svg", nn, [...n[0] || (n[0] = [
|
|
236
|
+
a("path", {
|
|
237
237
|
fill: "currentColor",
|
|
238
238
|
d: "m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z"
|
|
239
239
|
}, null, -1)
|
|
240
240
|
])]);
|
|
241
241
|
}
|
|
242
|
-
const
|
|
242
|
+
const ne = F({ name: "ri-close-line", render: ln }), sn = { class: "flex items-center absolute right-3 top-5 z-10" }, Xe = /* @__PURE__ */ V({
|
|
243
243
|
__name: "VPopup",
|
|
244
244
|
props: {
|
|
245
245
|
hiddenCloser: { type: Boolean },
|
|
246
246
|
size: { default: "auto" }
|
|
247
247
|
},
|
|
248
248
|
emits: ["close", "click", "open"],
|
|
249
|
-
setup(e, { emit:
|
|
250
|
-
const
|
|
251
|
-
|
|
252
|
-
}, open:
|
|
253
|
-
|
|
249
|
+
setup(e, { emit: n }) {
|
|
250
|
+
const l = n, { show: s, overlay: t, onClose: o, onOpen: i } = Ue(l), d = Me(null), u = Me(null), { opacity: r, transform: c } = yt(d, u, o), g = { click: (_) => {
|
|
251
|
+
l("click", _);
|
|
252
|
+
}, open: i, set: (_) => {
|
|
253
|
+
_ ? i() : o(new Event("hide"));
|
|
254
254
|
} }, h = L(() => ({
|
|
255
255
|
auto: "max-h-[calc(100dvh-50px)]",
|
|
256
256
|
full: "h-[calc(100dvh-24px)] md:h-[calc(100dvh-100px)]",
|
|
@@ -260,10 +260,10 @@ const le = F({ name: "ri-close-line", render: nl }), sl = { class: "flex items-c
|
|
|
260
260
|
full: "h-[calc(100dvh-24px-16px)] md:h-[calc(100dvh-100px-16px)]",
|
|
261
261
|
screen: "h-[calc(100dvh-16px)]"
|
|
262
262
|
}));
|
|
263
|
-
return (
|
|
264
|
-
const z =
|
|
265
|
-
return f(), M(
|
|
266
|
-
b(
|
|
263
|
+
return (_, C) => {
|
|
264
|
+
const z = ne, j = A;
|
|
265
|
+
return f(), M(He, { to: "body" }, [
|
|
266
|
+
b(ae, {
|
|
267
267
|
"enter-active-class": "duration-300 ease-out",
|
|
268
268
|
"enter-from-class": "transform opacity-0 translate-y-full xl:-translate-y-2",
|
|
269
269
|
"enter-to-class": "opacity-100 translate-y-0",
|
|
@@ -272,47 +272,47 @@ const le = F({ name: "ri-close-line", render: nl }), sl = { class: "flex items-c
|
|
|
272
272
|
"leave-to-class": "transform opacity-0 translate-y-full xl:-translate-y-2"
|
|
273
273
|
}, {
|
|
274
274
|
default: y(() => [
|
|
275
|
-
|
|
275
|
+
T(s) ? (f(), v("div", {
|
|
276
276
|
key: 0,
|
|
277
277
|
ref_key: "container",
|
|
278
278
|
ref: u,
|
|
279
279
|
class: "fixed bottom-0 left-0 w-full z-15"
|
|
280
280
|
}, [
|
|
281
|
-
|
|
281
|
+
T(t) ? (f(), v("div", {
|
|
282
282
|
key: 0,
|
|
283
283
|
class: "fixed h-full w-full top-0 left-0 bg-black/40 bg-blur xl:hidden animate-opacity overscroll-contain",
|
|
284
|
-
style:
|
|
284
|
+
style: Q({ opacity: T(r) }),
|
|
285
285
|
onClick: C[0] || (C[0] = //@ts-ignore
|
|
286
|
-
(...X) =>
|
|
287
|
-
onWheel: C[1] || (C[1] =
|
|
286
|
+
(...X) => T(o) && T(o)(...X)),
|
|
287
|
+
onWheel: C[1] || (C[1] = H(() => {
|
|
288
288
|
}, ["prevent"])),
|
|
289
|
-
onTouchmove: C[2] || (C[2] =
|
|
289
|
+
onTouchmove: C[2] || (C[2] = H(() => {
|
|
290
290
|
}, ["prevent"]))
|
|
291
|
-
}, null, 36)) :
|
|
292
|
-
|
|
291
|
+
}, null, 36)) : E("", !0),
|
|
292
|
+
a("div", {
|
|
293
293
|
class: B(["bg-white dark:bg-gray-900 w-full shadow-nav relative", h.value[e.size]]),
|
|
294
|
-
style:
|
|
294
|
+
style: Q({ transform: T(c) })
|
|
295
295
|
}, [
|
|
296
|
-
|
|
296
|
+
a("div", {
|
|
297
297
|
ref_key: "target",
|
|
298
298
|
ref: d,
|
|
299
299
|
class: "flex justify-center py-3 md:pb-6",
|
|
300
|
-
onWheel: C[3] || (C[3] =
|
|
300
|
+
onWheel: C[3] || (C[3] = H(() => {
|
|
301
301
|
}, ["prevent"])),
|
|
302
|
-
onTouchmove: C[4] || (C[4] =
|
|
302
|
+
onTouchmove: C[4] || (C[4] = H(() => {
|
|
303
303
|
}, ["prevent"]))
|
|
304
304
|
}, [...C[5] || (C[5] = [
|
|
305
|
-
|
|
305
|
+
a("div", { class: "self-end h-1 w-12 bg-gray-400" }, null, -1)
|
|
306
306
|
])], 544),
|
|
307
|
-
|
|
308
|
-
_
|
|
307
|
+
a("div", sn, [
|
|
308
|
+
$(_.$slots, "button", { close: T(o) }),
|
|
309
309
|
b(j, {
|
|
310
310
|
class: "size-5 md:size-6",
|
|
311
311
|
color: "transparent",
|
|
312
312
|
size: "none",
|
|
313
313
|
icon: "",
|
|
314
314
|
"aria-label": "Close",
|
|
315
|
-
onClick:
|
|
315
|
+
onClick: T(o)
|
|
316
316
|
}, {
|
|
317
317
|
default: y(() => [
|
|
318
318
|
b(z, { class: "size-5" })
|
|
@@ -320,23 +320,23 @@ const le = F({ name: "ri-close-line", render: nl }), sl = { class: "flex items-c
|
|
|
320
320
|
_: 1
|
|
321
321
|
}, 8, ["onClick"])
|
|
322
322
|
]),
|
|
323
|
-
|
|
323
|
+
a("div", {
|
|
324
324
|
class: B(["overflow-y-auto max-h-[calc(100dvh-24px-16px)] overscroll-contain scrollbar", x.value[e.size]])
|
|
325
325
|
}, [
|
|
326
|
-
_
|
|
327
|
-
close:
|
|
326
|
+
$(_.$slots, "default", {
|
|
327
|
+
close: T(o),
|
|
328
328
|
on: g
|
|
329
329
|
})
|
|
330
330
|
], 2)
|
|
331
331
|
], 6)
|
|
332
|
-
], 512)) :
|
|
332
|
+
], 512)) : E("", !0)
|
|
333
333
|
]),
|
|
334
334
|
_: 3
|
|
335
335
|
})
|
|
336
336
|
]);
|
|
337
337
|
};
|
|
338
338
|
}
|
|
339
|
-
}),
|
|
339
|
+
}), on = { class: "relative" }, an = { class: "flex items-center cursor-pointer" }, be = /* @__PURE__ */ V({
|
|
340
340
|
__name: "VDropdown",
|
|
341
341
|
props: {
|
|
342
342
|
title: { default: "" },
|
|
@@ -350,30 +350,30 @@ const le = F({ name: "ri-close-line", render: nl }), sl = { class: "flex items-c
|
|
|
350
350
|
isPopup: { type: Boolean }
|
|
351
351
|
},
|
|
352
352
|
emits: ["click", "show", "close"],
|
|
353
|
-
setup(e, { emit:
|
|
354
|
-
const
|
|
355
|
-
t.value &&
|
|
353
|
+
setup(e, { emit: n }) {
|
|
354
|
+
const l = n, t = Ke(We).greaterOrEqual("lg"), o = D(!1), i = L(() => ({ top: e.top, left: e.left, right: e.right, bottom: e.bottom, "max-height": e.height })), d = (h) => {
|
|
355
|
+
t.value && o.value && c(h);
|
|
356
356
|
}, u = (h) => {
|
|
357
|
-
|
|
358
|
-
},
|
|
359
|
-
|
|
357
|
+
l("click", o.value), !e.disabled && (o.value ? e.hideOnClick && c(h) : r(h));
|
|
358
|
+
}, r = (h) => {
|
|
359
|
+
o.value = !0, l("show", h);
|
|
360
360
|
}, c = (h) => {
|
|
361
|
-
|
|
361
|
+
o.value = !1, l("close", h);
|
|
362
362
|
}, m = (h) => {
|
|
363
|
-
h ?
|
|
364
|
-
},
|
|
363
|
+
h ? r(new Event("show")) : c(new Event("hide"));
|
|
364
|
+
}, p = () => {
|
|
365
365
|
c(new Event("hide"));
|
|
366
|
-
}, g = { click: u, open:
|
|
366
|
+
}, g = { click: u, open: r, set: m };
|
|
367
367
|
return (h, x) => {
|
|
368
|
-
const
|
|
369
|
-
return Ce((f(),
|
|
370
|
-
|
|
371
|
-
|
|
368
|
+
const _ = ft("outside");
|
|
369
|
+
return Ce((f(), v("div", on, [
|
|
370
|
+
a("div", an, [
|
|
371
|
+
$(h.$slots, "activator", {
|
|
372
372
|
on: g,
|
|
373
|
-
isShow:
|
|
373
|
+
isShow: o.value
|
|
374
374
|
})
|
|
375
375
|
]),
|
|
376
|
-
|
|
376
|
+
T(t) ? (f(), M(ae, {
|
|
377
377
|
key: 0,
|
|
378
378
|
"enter-active-class": "duration-300 ease-out",
|
|
379
379
|
"enter-from-class": "transform opacity-0 -translate-y-2",
|
|
@@ -383,94 +383,94 @@ const le = F({ name: "ri-close-line", render: nl }), sl = { class: "flex items-c
|
|
|
383
383
|
"leave-to-class": "transform opacity-0 -translate-y-2"
|
|
384
384
|
}, {
|
|
385
385
|
default: y(() => [
|
|
386
|
-
|
|
386
|
+
o.value ? (f(), v("div", {
|
|
387
387
|
key: 0,
|
|
388
388
|
class: "z-30 min-w-full absolute",
|
|
389
|
-
style:
|
|
389
|
+
style: Q(i.value)
|
|
390
390
|
}, [
|
|
391
|
-
|
|
391
|
+
$(h.$slots, "default", {
|
|
392
392
|
on: g,
|
|
393
|
-
show:
|
|
393
|
+
show: r,
|
|
394
394
|
hide: c,
|
|
395
|
-
isShow:
|
|
395
|
+
isShow: o.value
|
|
396
396
|
})
|
|
397
|
-
], 4)) :
|
|
397
|
+
], 4)) : E("", !0)
|
|
398
398
|
]),
|
|
399
399
|
_: 3
|
|
400
|
-
})) :
|
|
401
|
-
!
|
|
400
|
+
})) : E("", !0),
|
|
401
|
+
!T(t) && o.value ? (f(), M(Xe, {
|
|
402
402
|
key: 1,
|
|
403
403
|
title: e.title,
|
|
404
|
-
onClose:
|
|
404
|
+
onClose: p
|
|
405
405
|
}, {
|
|
406
406
|
default: y(({ on: C }) => [
|
|
407
|
-
|
|
407
|
+
$(h.$slots, "default", {
|
|
408
408
|
on: C,
|
|
409
|
-
show:
|
|
409
|
+
show: r,
|
|
410
410
|
hide: c,
|
|
411
|
-
isShow:
|
|
411
|
+
isShow: o.value
|
|
412
412
|
})
|
|
413
413
|
]),
|
|
414
414
|
_: 3
|
|
415
|
-
}, 8, ["title"])) :
|
|
415
|
+
}, 8, ["title"])) : E("", !0)
|
|
416
416
|
])), [
|
|
417
|
-
[
|
|
417
|
+
[_, d]
|
|
418
418
|
]);
|
|
419
419
|
};
|
|
420
420
|
}
|
|
421
|
-
}),
|
|
421
|
+
}), rn = { class: "bg-white dark:bg-gray-900 ring-1 ring-gray-200 dark:ring-gray-800" }, cn = ["onClick"], me = /* @__PURE__ */ V({
|
|
422
422
|
__name: "VList",
|
|
423
423
|
props: {
|
|
424
424
|
items: {}
|
|
425
425
|
},
|
|
426
426
|
emits: ["click"],
|
|
427
|
-
setup(e, { emit:
|
|
428
|
-
const
|
|
429
|
-
return (t,
|
|
430
|
-
(f(!0),
|
|
431
|
-
key:
|
|
427
|
+
setup(e, { emit: n }) {
|
|
428
|
+
const l = n, s = (t, o) => l("click", t, o);
|
|
429
|
+
return (t, o) => (f(), v("ul", rn, [
|
|
430
|
+
(f(!0), v(O, null, R(e.items, (i) => (f(), v("li", {
|
|
431
|
+
key: i.name,
|
|
432
432
|
class: "whitespace-nowrap cursor-pointer flex items-center min-h-[40px] border-b last:border-b-0 dark:border-gray-700 border-gray-200 hover:bg-gray-50 dark:hover:bg-gray-700/30 w-full px-4",
|
|
433
|
-
onClick: (d) => s(
|
|
433
|
+
onClick: (d) => s(i, d)
|
|
434
434
|
}, [
|
|
435
|
-
|
|
436
|
-
I(k(
|
|
435
|
+
$(t.$slots, "default", { item: i }, () => [
|
|
436
|
+
I(k(i.name), 1)
|
|
437
437
|
])
|
|
438
|
-
], 8,
|
|
438
|
+
], 8, cn))), 128))
|
|
439
439
|
]));
|
|
440
440
|
}
|
|
441
|
-
}),
|
|
441
|
+
}), dn = { class: "bg-white dark:bg-gray-900 border-b border-gray-300 dark:border-gray-700 left-0 w-full z-10 sticky top-0" }, un = { class: "px-4 py-4 sm:px-6 lg:px-8" }, fn = { class: "container mx-auto flex flex-auto items-center" }, mn = { class: "lg:hidden h-[30px]" }, vn = { class: "gap-4 hidden lg:flex" }, pn = { class: "lg:hidden flex gap-4" }, hn = { class: "ms-2" }, Va = /* @__PURE__ */ V({
|
|
442
442
|
__name: "AppHeader",
|
|
443
443
|
props: {
|
|
444
444
|
changeTheme: { type: Function },
|
|
445
445
|
notifications: {}
|
|
446
446
|
},
|
|
447
447
|
emits: ["sidebar", "notif"],
|
|
448
|
-
setup(e, { emit:
|
|
449
|
-
const
|
|
448
|
+
setup(e, { emit: n }) {
|
|
449
|
+
const l = n, s = [
|
|
450
450
|
{ name: "Theme", value: 1 },
|
|
451
451
|
{ name: "Notification", value: 2 },
|
|
452
452
|
{ name: "Logout", value: 3 }
|
|
453
|
-
], t = L(() => !!e.notifications.find((c) => c.isNew)),
|
|
453
|
+
], t = L(() => !!e.notifications.find((c) => c.isNew)), o = (c) => l("sidebar", c), i = (c) => l("notif", c), d = async () => await fetch("/", { headers: { Authorization: "Basic AAAAAAAAAAAAAAAAAAA=" } }), u = () => {
|
|
454
454
|
e.changeTheme && e.changeTheme();
|
|
455
|
-
},
|
|
456
|
-
c == 1 && u(), c == 2 &&
|
|
455
|
+
}, r = ({ value: c }, m) => {
|
|
456
|
+
c == 1 && u(), c == 2 && i(m), c == 3 && d();
|
|
457
457
|
};
|
|
458
458
|
return (c, m) => {
|
|
459
|
-
const
|
|
460
|
-
return f(),
|
|
461
|
-
|
|
462
|
-
|
|
459
|
+
const p = Yt, g = Pe("router-link"), h = Gt, x = Kt, _ = Je, C = Ht, z = Ge;
|
|
460
|
+
return f(), v("header", dn, [
|
|
461
|
+
a("div", un, [
|
|
462
|
+
a("div", fn, [
|
|
463
463
|
b(A, {
|
|
464
464
|
type: "icon",
|
|
465
|
-
onClick:
|
|
465
|
+
onClick: o
|
|
466
466
|
}, {
|
|
467
467
|
default: y(() => [
|
|
468
|
-
b(
|
|
468
|
+
b(p, { class: "size-5" })
|
|
469
469
|
]),
|
|
470
470
|
_: 1
|
|
471
471
|
}),
|
|
472
|
-
m[1] || (m[1] =
|
|
473
|
-
|
|
472
|
+
m[1] || (m[1] = a("div", { class: "lg:hidden flex-auto" }, null, -1)),
|
|
473
|
+
a("div", mn, [
|
|
474
474
|
b(g, { to: "/" }, {
|
|
475
475
|
default: y(() => [
|
|
476
476
|
b(Se, { class: "h-[30px] text-primary" })
|
|
@@ -478,8 +478,8 @@ const le = F({ name: "ri-close-line", render: nl }), sl = { class: "flex items-c
|
|
|
478
478
|
_: 1
|
|
479
479
|
})
|
|
480
480
|
]),
|
|
481
|
-
m[2] || (m[2] =
|
|
482
|
-
|
|
481
|
+
m[2] || (m[2] = a("div", { class: "flex-auto" }, null, -1)),
|
|
482
|
+
a("div", vn, [
|
|
483
483
|
b(A, {
|
|
484
484
|
type: "icon",
|
|
485
485
|
onClick: u
|
|
@@ -492,21 +492,21 @@ const le = F({ name: "ri-close-line", render: nl }), sl = { class: "flex items-c
|
|
|
492
492
|
}),
|
|
493
493
|
b(A, {
|
|
494
494
|
type: "icon",
|
|
495
|
-
onClick:
|
|
495
|
+
onClick: i
|
|
496
496
|
}, {
|
|
497
497
|
default: y(() => [
|
|
498
|
-
|
|
498
|
+
a("span", {
|
|
499
499
|
class: B([t.value ? "flex" : "hidden", "absolute right-0 top-0.5 z-1 h-2 w-2 rounded-full bg-orange-400"])
|
|
500
500
|
}, [...m[0] || (m[0] = [
|
|
501
|
-
|
|
501
|
+
a("span", { class: "absolute -z-1 inline-flex h-full w-full animate-ping rounded-full bg-orange-400 opacity-75" }, null, -1)
|
|
502
502
|
])], 2),
|
|
503
|
-
b(
|
|
503
|
+
b(_, { class: "size-5" })
|
|
504
504
|
]),
|
|
505
505
|
_: 1
|
|
506
506
|
}),
|
|
507
507
|
b(A, {
|
|
508
508
|
type: "icon",
|
|
509
|
-
onClick:
|
|
509
|
+
onClick: H(d, ["prevent"])
|
|
510
510
|
}, {
|
|
511
511
|
default: y(() => [
|
|
512
512
|
b(C, { class: "size-5" })
|
|
@@ -514,7 +514,7 @@ const le = F({ name: "ri-close-line", render: nl }), sl = { class: "flex items-c
|
|
|
514
514
|
_: 1
|
|
515
515
|
})
|
|
516
516
|
]),
|
|
517
|
-
|
|
517
|
+
a("div", pn, [
|
|
518
518
|
b(be, {
|
|
519
519
|
left: "unset",
|
|
520
520
|
right: "0",
|
|
@@ -535,10 +535,10 @@ const le = F({ name: "ri-close-line", render: nl }), sl = { class: "flex items-c
|
|
|
535
535
|
default: y(() => [
|
|
536
536
|
b(me, {
|
|
537
537
|
items: s,
|
|
538
|
-
onClick:
|
|
538
|
+
onClick: r
|
|
539
539
|
}, {
|
|
540
540
|
default: y(({ item: j }) => [
|
|
541
|
-
|
|
541
|
+
a("span", hn, k(j.name), 1)
|
|
542
542
|
]),
|
|
543
543
|
_: 1
|
|
544
544
|
})
|
|
@@ -551,7 +551,7 @@ const le = F({ name: "ri-close-line", render: nl }), sl = { class: "flex items-c
|
|
|
551
551
|
]);
|
|
552
552
|
};
|
|
553
553
|
}
|
|
554
|
-
}),
|
|
554
|
+
}), gn = { class: "relative flex items-center gap-2 w-full p-2 overflow-hidden" }, bn = { class: "flex-auto text-xs" }, yn = { class: "text-gray-500 dark:text-gray-400 mt-1" }, xn = /* @__PURE__ */ V({
|
|
555
555
|
__name: "CardNotification",
|
|
556
556
|
props: {
|
|
557
557
|
empty: {},
|
|
@@ -563,13 +563,13 @@ const le = F({ name: "ri-close-line", render: nl }), sl = { class: "flex items-c
|
|
|
563
563
|
text: {}
|
|
564
564
|
},
|
|
565
565
|
emits: ["remove", "read"],
|
|
566
|
-
setup(e, { emit:
|
|
567
|
-
const
|
|
568
|
-
return (u,
|
|
569
|
-
const c = Je, m =
|
|
570
|
-
return f(),
|
|
571
|
-
|
|
572
|
-
class: B(["absolute left-0 top-0 w-[3px] h-full",
|
|
566
|
+
setup(e, { emit: n }) {
|
|
567
|
+
const l = e, s = n, t = ["", "bg-green-500", "bg-red-500", "bg-yellow-500", "bg-blue-500"], o = (u) => t[u], i = (u) => s("remove", u), d = (u) => s("read", u);
|
|
568
|
+
return (u, r) => {
|
|
569
|
+
const c = Je, m = ne;
|
|
570
|
+
return f(), v("div", gn, [
|
|
571
|
+
a("div", {
|
|
572
|
+
class: B(["absolute left-0 top-0 w-[3px] h-full", o(l.color)])
|
|
573
573
|
}, null, 2),
|
|
574
574
|
b(A, {
|
|
575
575
|
class: "shrink-0",
|
|
@@ -577,24 +577,24 @@ const le = F({ name: "ri-close-line", render: nl }), sl = { class: "flex items-c
|
|
|
577
577
|
onClick: d
|
|
578
578
|
}, {
|
|
579
579
|
default: y(() => [
|
|
580
|
-
|
|
581
|
-
class: B([
|
|
582
|
-
}, [...
|
|
583
|
-
|
|
580
|
+
a("span", {
|
|
581
|
+
class: B([l.isNew ? "flex" : "hidden", "absolute right-0 top-0.5 z-1 h-2 w-2 rounded-full bg-orange-400"])
|
|
582
|
+
}, [...r[0] || (r[0] = [
|
|
583
|
+
a("span", { class: "absolute -z-1 inline-flex h-full w-full animate-ping rounded-full bg-orange-400 opacity-75" }, null, -1)
|
|
584
584
|
])], 2),
|
|
585
585
|
b(c, { class: "size-5" })
|
|
586
586
|
]),
|
|
587
587
|
_: 1
|
|
588
588
|
}),
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
589
|
+
a("div", bn, [
|
|
590
|
+
a("div", null, k(l.text), 1),
|
|
591
|
+
a("div", yn, k(T(kt)(l.date)) + " (" + k(T(_t)(l.date)) + ")", 1)
|
|
592
592
|
]),
|
|
593
593
|
b(A, {
|
|
594
594
|
class: "shrink-0",
|
|
595
595
|
type: "icon",
|
|
596
596
|
size: "sm",
|
|
597
|
-
onClick:
|
|
597
|
+
onClick: i
|
|
598
598
|
}, {
|
|
599
599
|
default: y(() => [
|
|
600
600
|
b(m, { class: "size-4" })
|
|
@@ -604,31 +604,31 @@ const le = F({ name: "ri-close-line", render: nl }), sl = { class: "flex items-c
|
|
|
604
604
|
]);
|
|
605
605
|
};
|
|
606
606
|
}
|
|
607
|
-
}),
|
|
607
|
+
}), $n = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear h-full" }, kn = {
|
|
608
608
|
key: 0,
|
|
609
609
|
class: "flex flex-col gap-2 p-2"
|
|
610
|
-
},
|
|
610
|
+
}, Ba = /* @__PURE__ */ V({
|
|
611
611
|
__name: "AppNotification",
|
|
612
612
|
props: {
|
|
613
613
|
value: { type: Boolean },
|
|
614
614
|
notifications: {}
|
|
615
615
|
},
|
|
616
616
|
emits: ["close", "remove", "read"],
|
|
617
|
-
setup(e, { emit:
|
|
618
|
-
const
|
|
619
|
-
return (
|
|
620
|
-
|
|
617
|
+
setup(e, { emit: n }) {
|
|
618
|
+
const l = e, s = n, t = L(() => !!l.notifications.find((r) => r.isNew)), o = L(() => !!l.notifications.length), i = (r) => s("close", r), d = (r) => s("remove", r), u = (r) => s("read", r);
|
|
619
|
+
return (r, c) => (f(), v(O, null, [
|
|
620
|
+
l.value ? (f(), v("div", {
|
|
621
621
|
key: 0,
|
|
622
622
|
class: "overlay fixed left-0 top-0 h-full w-full bg-black/40 bg-blur",
|
|
623
|
-
onClick:
|
|
624
|
-
})) :
|
|
625
|
-
|
|
626
|
-
class: B([
|
|
623
|
+
onClick: i
|
|
624
|
+
})) : E("", !0),
|
|
625
|
+
a("aside", {
|
|
626
|
+
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 flex-col overflow-y-auto transition-all duration-350 dark:border-gray-800 bg-white dark:bg-gray-900"])
|
|
627
627
|
}, [
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
b(
|
|
628
|
+
a("div", $n, [
|
|
629
|
+
$(r.$slots, "header", { isNew: t.value }),
|
|
630
|
+
o.value ? (f(), v("div", kn, [
|
|
631
|
+
b(Ne, {
|
|
632
632
|
"enter-active-class": "transition-all duration-300 ",
|
|
633
633
|
"enter-from-class": "opacity-0 translate-x-1/2",
|
|
634
634
|
"enter-to-class": "opacity-100 translate-x-0",
|
|
@@ -637,49 +637,49 @@ const le = F({ name: "ri-close-line", render: nl }), sl = { class: "flex items-c
|
|
|
637
637
|
"leave-to-class": "opacity-0 translate-x-1/2"
|
|
638
638
|
}, {
|
|
639
639
|
default: y(() => [
|
|
640
|
-
(f(!0),
|
|
640
|
+
(f(!0), v(O, null, R(l.notifications, (m) => (f(), v("div", {
|
|
641
641
|
key: m.date,
|
|
642
642
|
class: "relative"
|
|
643
643
|
}, [
|
|
644
|
-
|
|
645
|
-
b(
|
|
644
|
+
$(r.$slots, "card", { item: m }, () => [
|
|
645
|
+
b(xn, N({ ref_for: !0 }, m, {
|
|
646
646
|
class: "bg-gray-200/50 dark:bg-gray-800/50 rounded-md",
|
|
647
|
-
onRemove: (
|
|
648
|
-
onRead: (
|
|
647
|
+
onRemove: (p) => d(m),
|
|
648
|
+
onRead: (p) => u(m)
|
|
649
649
|
}), null, 16, ["onRemove", "onRead"])
|
|
650
650
|
])
|
|
651
651
|
]))), 128))
|
|
652
652
|
]),
|
|
653
653
|
_: 3
|
|
654
654
|
})
|
|
655
|
-
])) :
|
|
655
|
+
])) : $(r.$slots, "empty", {}, void 0, void 0, 1)
|
|
656
656
|
])
|
|
657
657
|
], 2)
|
|
658
658
|
], 64));
|
|
659
659
|
}
|
|
660
|
-
}),
|
|
661
|
-
function
|
|
662
|
-
return f(),
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
660
|
+
}), _n = {}, wn = { class: "fixed h-full w-full top-0 left-0 z-20" }, Cn = { class: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2" };
|
|
661
|
+
function zn(e, n) {
|
|
662
|
+
return f(), v("div", wn, [
|
|
663
|
+
n[0] || (n[0] = a("div", { class: "absolute h-full w-full top-0 left-0 bg-black/60 bg-blur" }, null, -1)),
|
|
664
|
+
a("div", Cn, [
|
|
665
|
+
$(e.$slots, "default")
|
|
666
666
|
])
|
|
667
667
|
]);
|
|
668
668
|
}
|
|
669
|
-
const
|
|
669
|
+
const Ea = /* @__PURE__ */ ge(_n, [["render", zn]]), Sn = {
|
|
670
670
|
viewBox: "0 0 24 24",
|
|
671
671
|
width: "1.2em",
|
|
672
672
|
height: "1.2em"
|
|
673
673
|
};
|
|
674
|
-
function
|
|
675
|
-
return f(),
|
|
676
|
-
|
|
674
|
+
function Vn(e, n) {
|
|
675
|
+
return f(), v("svg", Sn, [...n[0] || (n[0] = [
|
|
676
|
+
a("path", {
|
|
677
677
|
fill: "currentColor",
|
|
678
678
|
d: "m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z"
|
|
679
679
|
}, null, -1)
|
|
680
680
|
])]);
|
|
681
681
|
}
|
|
682
|
-
const
|
|
682
|
+
const Bn = F({ name: "ri-arrow-right-s-line", render: Vn }), En = { class: "mb-4 flex flex-col gap-2" }, Tn = { class: "size-6 flex-[0_0_24px] opacity-60" }, Ln = ["onClick"], Mn = { class: "flex flex-col gap-2" }, An = { class: "flex gap-2 ms-8" }, Dn = { class: "size-5 flex-[0_0_24px]" }, In = { class: "flex-1 first-letter:uppercase text-sm" }, Ta = /* @__PURE__ */ V({
|
|
683
683
|
__name: "AppNav",
|
|
684
684
|
props: {
|
|
685
685
|
menu: { default: () => [] },
|
|
@@ -687,85 +687,85 @@ const Vl = F({ name: "ri-arrow-right-s-line", render: Sl }), Bl = { class: "mb-4
|
|
|
687
687
|
isSidebar: { type: Boolean, default: !1 }
|
|
688
688
|
},
|
|
689
689
|
emits: ["sidebar"],
|
|
690
|
-
setup(e, { emit:
|
|
691
|
-
const
|
|
692
|
-
e.isSidebar &&
|
|
693
|
-
},
|
|
690
|
+
setup(e, { emit: n }) {
|
|
691
|
+
const l = n, s = D(""), t = ({ name: i }) => {
|
|
692
|
+
e.isSidebar && l("sidebar", !e.isSidebar), s.value !== i && (s.value = s.value === i ? "" : i);
|
|
693
|
+
}, o = (i) => e.fullPath === i;
|
|
694
694
|
return ue(
|
|
695
695
|
() => e.menu,
|
|
696
696
|
() => {
|
|
697
|
-
var
|
|
698
|
-
return s.value = ((
|
|
697
|
+
var i;
|
|
698
|
+
return s.value = ((i = wt(e.menu, e.fullPath)) == null ? void 0 : i.name) || "";
|
|
699
699
|
}
|
|
700
|
-
), (
|
|
701
|
-
const u =
|
|
702
|
-
return f(),
|
|
703
|
-
|
|
704
|
-
(f(!0),
|
|
705
|
-
key:
|
|
700
|
+
), (i, d) => {
|
|
701
|
+
const u = Bn;
|
|
702
|
+
return f(), v("nav", null, [
|
|
703
|
+
a("ul", En, [
|
|
704
|
+
(f(!0), v(O, null, R(e.menu, (r) => (f(), v("li", {
|
|
705
|
+
key: r.name
|
|
706
706
|
}, [
|
|
707
|
-
(f(), M(de(
|
|
708
|
-
to:
|
|
709
|
-
class: B(["flex gap-2 items-center px-3 py-2 rounded",
|
|
710
|
-
onClick:
|
|
707
|
+
(f(), M(de(r.path ? "router-link" : "span"), {
|
|
708
|
+
to: r.path,
|
|
709
|
+
class: B(["flex gap-2 items-center px-3 py-2 rounded", o(r.path) ? "bg-blue-500/10" : "hover:bg-gray-500/10"]),
|
|
710
|
+
onClick: H((c) => t(r), ["prevent", "stop"])
|
|
711
711
|
}, {
|
|
712
712
|
default: y(() => [
|
|
713
|
-
|
|
714
|
-
|
|
713
|
+
a("div", Tn, [
|
|
714
|
+
$(i.$slots, "icon", { item: r })
|
|
715
715
|
]),
|
|
716
|
-
|
|
716
|
+
a("span", {
|
|
717
717
|
class: B(["flex-1 first-letter:uppercase text-sm", e.isSidebar ? "lg:hidden" : ""])
|
|
718
|
-
}, k(
|
|
719
|
-
|
|
718
|
+
}, k(r.name), 3),
|
|
719
|
+
a("button", {
|
|
720
720
|
class: B(["cursor-pointer", [e.isSidebar ? "lg:hidden" : ""]]),
|
|
721
|
-
onClick:
|
|
721
|
+
onClick: H((c) => t(r), ["prevent", "stop"])
|
|
722
722
|
}, [
|
|
723
|
-
|
|
724
|
-
], 10,
|
|
723
|
+
r.children ? (f(), M(u, { key: 0 })) : E("", !0)
|
|
724
|
+
], 10, Ln)
|
|
725
725
|
]),
|
|
726
726
|
_: 2
|
|
727
727
|
}, 1032, ["to", "class", "onClick"])),
|
|
728
|
-
|
|
728
|
+
r.children ? (f(), v("div", {
|
|
729
729
|
key: 0,
|
|
730
|
-
class: B(["translate transform overflow-hidden mt-2", [e.isSidebar ? "lg:hidden" : "", s.value ===
|
|
730
|
+
class: B(["translate transform overflow-hidden mt-2", [e.isSidebar ? "lg:hidden" : "", s.value === r.name ? "block" : "hidden"]])
|
|
731
731
|
}, [
|
|
732
|
-
|
|
733
|
-
(f(!0),
|
|
732
|
+
a("ul", Mn, [
|
|
733
|
+
(f(!0), v(O, null, R(r.children, ({ name: c, path: m, icon: p }) => (f(), v("li", { key: c }, [
|
|
734
734
|
(f(), M(de(m ? "router-link" : "span"), {
|
|
735
735
|
to: m,
|
|
736
|
-
class: B(["flex gap-2 items-center px-3 py-2 rounded",
|
|
736
|
+
class: B(["flex gap-2 items-center px-3 py-2 rounded", o(m) ? "bg-blue-500/10" : "hover:bg-gray-500/10"])
|
|
737
737
|
}, {
|
|
738
738
|
default: y(() => [
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
item: { name: c, path: m, icon:
|
|
739
|
+
a("div", An, [
|
|
740
|
+
a("div", Dn, [
|
|
741
|
+
$(i.$slots, "icon-children", {
|
|
742
|
+
item: { name: c, path: m, icon: p }
|
|
743
743
|
})
|
|
744
744
|
]),
|
|
745
|
-
|
|
745
|
+
a("span", In, k(c), 1)
|
|
746
746
|
])
|
|
747
747
|
]),
|
|
748
748
|
_: 2
|
|
749
749
|
}, 1032, ["to", "class"]))
|
|
750
750
|
]))), 128))
|
|
751
751
|
])
|
|
752
|
-
], 2)) :
|
|
752
|
+
], 2)) : E("", !0)
|
|
753
753
|
]))), 128))
|
|
754
754
|
])
|
|
755
755
|
]);
|
|
756
756
|
};
|
|
757
757
|
}
|
|
758
|
-
}),
|
|
758
|
+
}), On = {
|
|
759
759
|
key: 0,
|
|
760
760
|
class: "w-full min-w-[260px] max-w-xs p-4 bg-white rounded shadow-lg dark:bg-gray-800",
|
|
761
761
|
role: "alert"
|
|
762
|
-
},
|
|
762
|
+
}, jn = { class: "flex items-center gap-4 text-sm" }, Pn = {
|
|
763
763
|
key: 0,
|
|
764
764
|
class: "text-green-600"
|
|
765
|
-
},
|
|
765
|
+
}, Hn = {
|
|
766
766
|
key: 1,
|
|
767
767
|
class: "relative block h-4 w-full rounded overflow-hidden bg-gray-200 dark:bg-gray-900/50 select-none mt-2"
|
|
768
|
-
},
|
|
768
|
+
}, Nn = { class: "absolute left-[140px] top-1/2 -translate-1/2 text-sm font-bold text-black dark:text-white text-center leading-none" }, Fn = { class: "absolute left-[140px] top-1/2 -translate-1/2 text-sm font-bold text-white text-center leading-none" }, La = /* @__PURE__ */ V({
|
|
769
769
|
__name: "AppProgress",
|
|
770
770
|
props: {
|
|
771
771
|
timeout: { default: 5e3 },
|
|
@@ -776,17 +776,17 @@ const Vl = F({ name: "ri-arrow-right-s-line", render: Sl }), Bl = { class: "mb-4
|
|
|
776
776
|
length: { default: 0 }
|
|
777
777
|
},
|
|
778
778
|
setup(e) {
|
|
779
|
-
const
|
|
780
|
-
|
|
779
|
+
const n = D(!1), l = L(() => !!e.length), s = L(() => !!(l.value && t.value === 100 && !e.status)), t = L(() => e.status ? Math.ceil(e.size * 100 / e.length) : 100), o = ze(() => {
|
|
780
|
+
n.value = !1;
|
|
781
781
|
}, e.timeout);
|
|
782
782
|
return ue(
|
|
783
783
|
() => [e.size, e.status],
|
|
784
784
|
() => {
|
|
785
|
-
|
|
785
|
+
n.value = !0, o();
|
|
786
786
|
}
|
|
787
|
-
), (
|
|
788
|
-
const u =
|
|
789
|
-
return f(), M(
|
|
787
|
+
), (i, d) => {
|
|
788
|
+
const u = ne;
|
|
789
|
+
return f(), M(ae, {
|
|
790
790
|
"enter-active-class": "duration-300 ease-out",
|
|
791
791
|
"enter-from-class": "transform opacity-0 translate-x-full",
|
|
792
792
|
"enter-to-class": "opacity-100 translate-x-0",
|
|
@@ -795,40 +795,40 @@ const Vl = F({ name: "ri-arrow-right-s-line", render: Sl }), Bl = { class: "mb-4
|
|
|
795
795
|
"leave-to-class": "transform opacity-0 -translate-y-8"
|
|
796
796
|
}, {
|
|
797
797
|
default: y(() => [
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
d[1] || (d[1] =
|
|
802
|
-
s.value ? (f(),
|
|
798
|
+
n.value ? (f(), v("div", On, [
|
|
799
|
+
a("div", jn, [
|
|
800
|
+
$(i.$slots, "default", { isDone: s.value }, () => [
|
|
801
|
+
d[1] || (d[1] = a("div", { class: "flex-auto" }, "Progress...", -1)),
|
|
802
|
+
s.value ? (f(), v("span", Pn, "Done")) : E("", !0)
|
|
803
803
|
]),
|
|
804
|
-
|
|
804
|
+
a("button", {
|
|
805
805
|
class: "cursor-pointer transition text-gray-700 dark:text-gray-400 self-start hover:text-gray-600",
|
|
806
|
-
onClick: d[0] || (d[0] = (
|
|
806
|
+
onClick: d[0] || (d[0] = (r) => n.value = !1)
|
|
807
807
|
}, [
|
|
808
808
|
b(u, { class: "size-4" })
|
|
809
809
|
])
|
|
810
810
|
]),
|
|
811
|
-
|
|
811
|
+
l.value ? (f(), v("div", {
|
|
812
812
|
key: 0,
|
|
813
813
|
class: "h-[2px] fixed top-0 left-0 w-full bg-blue-600 transition-all duration-500",
|
|
814
|
-
style:
|
|
815
|
-
}, null, 4)) :
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
814
|
+
style: Q(`width: ${t.value}%`)
|
|
815
|
+
}, null, 4)) : E("", !0),
|
|
816
|
+
l.value ? (f(), v("div", Hn, [
|
|
817
|
+
a("div", Nn, k(t.value) + "%", 1),
|
|
818
|
+
a("div", {
|
|
819
819
|
class: "bg-blue-600 rounded h-4 overflow-hidden relative transition-all duration-500",
|
|
820
|
-
style:
|
|
820
|
+
style: Q(`width: ${t.value}%`)
|
|
821
821
|
}, [
|
|
822
|
-
|
|
822
|
+
a("div", Fn, k(t.value) + "%", 1)
|
|
823
823
|
], 4)
|
|
824
|
-
])) :
|
|
825
|
-
])) :
|
|
824
|
+
])) : E("", !0)
|
|
825
|
+
])) : E("", !0)
|
|
826
826
|
]),
|
|
827
827
|
_: 3
|
|
828
828
|
});
|
|
829
829
|
};
|
|
830
830
|
}
|
|
831
|
-
}),
|
|
831
|
+
}), Rn = { class: "my-4 text-gray-700 dark:text-gray-400" }, Un = { class: "flex flex-col md:flex-row flex-wrap md:gap-4 text-sm" }, Kn = { class: "flex gap-2" }, Wn = { class: "text-gray-700 dark:text-gray-400" }, qn = { class: "flex gap-2" }, Gn = { class: "flex gap-2" }, Jn = { class: "text-gray-700 dark:text-gray-400" }, Xn = { class: "flex gap-2" }, Yn = { class: "text-gray-700 dark:text-gray-400" }, Zn = { class: "flex flex-col gap-4 text-sm" }, Qn = { class: "flex gap-4" }, Ma = /* @__PURE__ */ V({
|
|
832
832
|
__name: "BlockInfo",
|
|
833
833
|
props: {
|
|
834
834
|
pkg: {},
|
|
@@ -842,103 +842,103 @@ const Vl = F({ name: "ri-arrow-right-s-line", render: Sl }), Bl = { class: "mb-4
|
|
|
842
842
|
board: {}
|
|
843
843
|
},
|
|
844
844
|
setup(e) {
|
|
845
|
-
const
|
|
846
|
-
var t,
|
|
845
|
+
const n = L(() => e.firmware.join(".")), l = L(() => {
|
|
846
|
+
var t, o, i, d, u, r, c;
|
|
847
847
|
const s = [];
|
|
848
|
-
return (t = e.pkg) != null && t.homepage && s.push({ name: "homepage", href: e.pkg.homepage }), (
|
|
848
|
+
return (t = e.pkg) != null && t.homepage && s.push({ name: "homepage", href: e.pkg.homepage }), (i = (o = e.pkg) == null ? void 0 : o.repository) != null && i.url && s.push({ name: "repository", href: e.pkg.repository.url }), (u = (d = e.pkg) == null ? void 0 : d.bugs) != null && u.url && s.push({ name: "bugs", href: e.pkg.bugs.url }), (r = e.pkg) != null && r.author && s.push({ name: "author", href: `mailto:${(c = e.pkg) == null ? void 0 : c.author}` }), s;
|
|
849
849
|
});
|
|
850
850
|
return (s, t) => {
|
|
851
|
-
var
|
|
852
|
-
return f(),
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
851
|
+
var o, i;
|
|
852
|
+
return f(), v("div", null, [
|
|
853
|
+
a("p", Rn, k((o = e.pkg) == null ? void 0 : o.description), 1),
|
|
854
|
+
a("div", Un, [
|
|
855
|
+
a("div", Kn, [
|
|
856
856
|
t[0] || (t[0] = I(" Firmware (hw): ", -1)),
|
|
857
|
-
|
|
857
|
+
a("span", Wn, k(n.value), 1)
|
|
858
858
|
]),
|
|
859
|
-
|
|
860
|
-
|
|
859
|
+
a("div", qn, [
|
|
860
|
+
a("div", Gn, [
|
|
861
861
|
t[1] || (t[1] = I(" Version (web): ", -1)),
|
|
862
|
-
|
|
862
|
+
a("span", Jn, k((i = e.pkg) == null ? void 0 : i.version), 1)
|
|
863
863
|
])
|
|
864
864
|
]),
|
|
865
|
-
t[3] || (t[3] =
|
|
866
|
-
|
|
865
|
+
t[3] || (t[3] = a("div", { class: "flex-auto" }, null, -1)),
|
|
866
|
+
a("div", Xn, [
|
|
867
867
|
t[2] || (t[2] = I(" ID: ", -1)),
|
|
868
|
-
|
|
868
|
+
a("span", Yn, k(e.id.toString(16)), 1)
|
|
869
869
|
])
|
|
870
870
|
]),
|
|
871
|
-
t[4] || (t[4] =
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
871
|
+
t[4] || (t[4] = a("hr", { class: "dark:text-gray-700 text-gray-200 my-2" }, null, -1)),
|
|
872
|
+
a("div", Zn, [
|
|
873
|
+
a("div", Qn, [
|
|
874
|
+
$(s.$slots, "links", { links: l.value })
|
|
875
875
|
])
|
|
876
876
|
])
|
|
877
877
|
]);
|
|
878
878
|
};
|
|
879
879
|
}
|
|
880
|
-
}),
|
|
880
|
+
}), el = { class: "relative flex items-end gap-0.5 w-10" }, tl = ["title"], nl = { class: "absolute -top-1 -left-1 text-xs text-gray-600 dark:text-gray-300" }, Ye = /* @__PURE__ */ V({
|
|
881
881
|
__name: "VWifiIcon",
|
|
882
882
|
props: {
|
|
883
883
|
rssi: { default: 0 },
|
|
884
884
|
channel: { default: 0 }
|
|
885
885
|
},
|
|
886
886
|
setup(e) {
|
|
887
|
-
const
|
|
888
|
-
return (s, t) => (f(),
|
|
889
|
-
(f(),
|
|
890
|
-
key:
|
|
891
|
-
class: B(["w-1 h-5 rounded-lg", [
|
|
892
|
-
style:
|
|
887
|
+
const n = 2 * (e.rssi + 100), l = (s) => s < n;
|
|
888
|
+
return (s, t) => (f(), v("div", el, [
|
|
889
|
+
(f(), v(O, null, R([10, 15, 25, 40, 70], (o, i) => a("div", {
|
|
890
|
+
key: o,
|
|
891
|
+
class: B(["w-1 h-5 rounded-lg", [l(o) ? "bg-gray-900 dark:bg-gray-100" : "bg-gray-300 dark:bg-gray-700"]]),
|
|
892
|
+
style: Q(`height: ${(i + 1) * 5}px`),
|
|
893
893
|
title: `rssi: ${e.rssi} channel: ${e.channel}`
|
|
894
|
-
}, null, 14,
|
|
895
|
-
|
|
894
|
+
}, null, 14, tl)), 64)),
|
|
895
|
+
a("div", nl, k(e.channel), 1)
|
|
896
896
|
]));
|
|
897
897
|
}
|
|
898
|
-
}),
|
|
898
|
+
}), ll = ["onClick"], sl = { class: "mr-2" }, ol = { class: "text-sm" }, al = { class: "text-gray-400 text-xs" }, il = {
|
|
899
899
|
key: 0,
|
|
900
900
|
class: "flex justify-center"
|
|
901
|
-
},
|
|
901
|
+
}, rl = { class: "flex justify-end mt-4" }, Aa = /* @__PURE__ */ V({
|
|
902
902
|
__name: "BlockScan",
|
|
903
903
|
props: {
|
|
904
904
|
items: { default: () => [] }
|
|
905
905
|
},
|
|
906
906
|
emits: ["scan", "select"],
|
|
907
|
-
setup(e, { emit:
|
|
908
|
-
const
|
|
909
|
-
return (
|
|
910
|
-
const u = Ye,
|
|
911
|
-
return f(),
|
|
912
|
-
b(
|
|
907
|
+
setup(e, { emit: n }) {
|
|
908
|
+
const l = n, s = ["OPEN", "WEP", "WPA_PSK", "WPA2_PSK", "WPA_WPA2_PSK", "MAX", "", "NO", "AUTO"], t = (i) => l("select", i), o = (i) => l("scan", i);
|
|
909
|
+
return (i, d) => {
|
|
910
|
+
const u = Ye, r = me, c = Ve, m = A;
|
|
911
|
+
return f(), v("div", null, [
|
|
912
|
+
b(r, {
|
|
913
913
|
items: e.items,
|
|
914
914
|
class: "bg-transparent! ring-0!"
|
|
915
915
|
}, {
|
|
916
|
-
default: y(({ item:
|
|
917
|
-
|
|
916
|
+
default: y(({ item: p }) => [
|
|
917
|
+
a("div", {
|
|
918
918
|
class: "flex items-center w-full",
|
|
919
|
-
onClick: (g) => t(
|
|
919
|
+
onClick: (g) => t(p)
|
|
920
920
|
}, [
|
|
921
|
-
|
|
922
|
-
b(u,
|
|
921
|
+
a("div", sl, [
|
|
922
|
+
b(u, U(K(p)), null, 16)
|
|
923
923
|
]),
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
924
|
+
a("div", null, [
|
|
925
|
+
a("div", ol, k(p.ssid), 1),
|
|
926
|
+
a("div", al, k(i.$t("security")) + " : " + k(s[p.encryptionType] || "unknown"), 1)
|
|
927
927
|
])
|
|
928
|
-
], 8,
|
|
928
|
+
], 8, ll)
|
|
929
929
|
]),
|
|
930
930
|
_: 1
|
|
931
931
|
}, 8, ["items"]),
|
|
932
|
-
e.items.length ?
|
|
932
|
+
e.items.length ? E("", !0) : (f(), v("div", il, [
|
|
933
933
|
b(c, { class: "text-primary" })
|
|
934
934
|
])),
|
|
935
|
-
|
|
935
|
+
a("div", rl, [
|
|
936
936
|
b(m, {
|
|
937
937
|
color: "blue",
|
|
938
|
-
onClick:
|
|
938
|
+
onClick: o
|
|
939
939
|
}, {
|
|
940
940
|
default: y(() => [
|
|
941
|
-
I(k(
|
|
941
|
+
I(k(i.$t("scan")), 1)
|
|
942
942
|
]),
|
|
943
943
|
_: 1
|
|
944
944
|
})
|
|
@@ -946,23 +946,23 @@ const Vl = F({ name: "ri-arrow-right-s-line", render: Sl }), Bl = { class: "mb-4
|
|
|
946
946
|
]);
|
|
947
947
|
};
|
|
948
948
|
}
|
|
949
|
-
}),
|
|
949
|
+
}), cl = {
|
|
950
950
|
viewBox: "0 0 24 24",
|
|
951
951
|
width: "1.2em",
|
|
952
952
|
height: "1.2em"
|
|
953
953
|
};
|
|
954
|
-
function
|
|
955
|
-
return f(),
|
|
956
|
-
|
|
954
|
+
function dl(e, n) {
|
|
955
|
+
return f(), v("svg", cl, [...n[0] || (n[0] = [
|
|
956
|
+
a("path", {
|
|
957
957
|
fill: "currentColor",
|
|
958
958
|
d: "m12 10.828l-4.95 4.95l-1.414-1.414L12 8l6.364 6.364l-1.414 1.414z"
|
|
959
959
|
}, null, -1)
|
|
960
960
|
])]);
|
|
961
961
|
}
|
|
962
|
-
const
|
|
962
|
+
const ul = F({ name: "ri-arrow-up-s-line", render: dl }), fl = { class: "w-full relative" }, ml = ["disabled"], vl = {
|
|
963
963
|
key: 0,
|
|
964
964
|
class: "text-red-400 h-[24px] px-2 text-xs"
|
|
965
|
-
},
|
|
965
|
+
}, pl = "after:absolute after:h-1 after:w-full after:left-0 after:translate-y-[6px] after:-z-10 dark:after:bg-gray-800 after:bg-white after:transition-all", J = /* @__PURE__ */ V({
|
|
966
966
|
__name: "VTextField",
|
|
967
967
|
props: {
|
|
968
968
|
modelValue: { default: null },
|
|
@@ -976,62 +976,62 @@ const un = F({ name: "ri-arrow-up-s-line", render: dn }), fn = { class: "w-full
|
|
|
976
976
|
hideMessage: { type: Boolean, default: !1 }
|
|
977
977
|
},
|
|
978
978
|
emits: ["update:modelValue", "click", "on-icon", "enter", "blur", "focus"],
|
|
979
|
-
setup(e, { emit:
|
|
980
|
-
const
|
|
979
|
+
setup(e, { emit: n }) {
|
|
980
|
+
const l = n, s = {
|
|
981
981
|
input: "w-full h-full px-4 outline-none overflow-ellipsis flex-auto overflow-hidden w-[calc(100% - 20px)] bg-transparent",
|
|
982
982
|
textarea: "h-full w-full px-4 py-2 outline-none flex-auto bg-transparent"
|
|
983
|
-
}, t = D(!1),
|
|
983
|
+
}, t = D(!1), o = L(() => [
|
|
984
984
|
e.component === "input" ? "h-[40px]" : "min-h-[40px]",
|
|
985
985
|
e.message ? "border-red-500 hover:border-red-400" : "",
|
|
986
986
|
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"
|
|
987
|
-
]),
|
|
988
|
-
t.value = !1,
|
|
989
|
-
}, m = (
|
|
990
|
-
t.value = !0,
|
|
991
|
-
},
|
|
992
|
-
e.disabled ||
|
|
987
|
+
]), i = L(() => s[e.component]), d = (_) => _ || _ === 0, u = L(() => [pl, t.value || d(e.modelValue) || e.active ? "top-0 left-3 text-xs" : "top-1/2"]), r = L(() => e.component === "input"), c = (_) => {
|
|
988
|
+
t.value = !1, l("blur", _);
|
|
989
|
+
}, m = (_) => {
|
|
990
|
+
t.value = !0, l("focus", _);
|
|
991
|
+
}, p = ({ target: _ }) => l("update:modelValue", _.value), g = (_) => l("enter", _), h = (_) => l("click", _), x = (_) => {
|
|
992
|
+
e.disabled || l("on-icon", _);
|
|
993
993
|
};
|
|
994
|
-
return (
|
|
995
|
-
|
|
996
|
-
class: B(["relative w-full border border-gray-300 dark:border-gray-700 flex items-center rounded transition bg-white dark:bg-gray-800",
|
|
994
|
+
return (_, C) => (f(), v("div", fl, [
|
|
995
|
+
a("label", {
|
|
996
|
+
class: B(["relative w-full border border-gray-300 dark:border-gray-700 flex items-center rounded transition bg-white dark:bg-gray-800", o.value])
|
|
997
997
|
}, [
|
|
998
|
-
|
|
998
|
+
a("span", {
|
|
999
999
|
class: B(["absolute left-4 transition-all rounded -translate-y-1/2 text-gray-600 dark:text-gray-400", u.value])
|
|
1000
1000
|
}, k(e.label), 3),
|
|
1001
|
-
(f(), M(de(e.component),
|
|
1001
|
+
(f(), M(de(e.component), N(_.$attrs, {
|
|
1002
1002
|
value: e.modelValue,
|
|
1003
1003
|
disabled: !!e.disabled,
|
|
1004
1004
|
type: e.type,
|
|
1005
1005
|
readonly: e.readonly,
|
|
1006
|
-
rows:
|
|
1007
|
-
wrap:
|
|
1008
|
-
class:
|
|
1006
|
+
rows: r.value ? null : "2",
|
|
1007
|
+
wrap: r.value ? null : "soft",
|
|
1008
|
+
class: i.value,
|
|
1009
1009
|
onFocus: m,
|
|
1010
1010
|
onBlur: c,
|
|
1011
|
-
onInput:
|
|
1011
|
+
onInput: p,
|
|
1012
1012
|
onClick: h,
|
|
1013
1013
|
onKeypress: mt(g, ["enter"])
|
|
1014
1014
|
}), null, 16, ["value", "disabled", "type", "readonly", "rows", "wrap", "class"])),
|
|
1015
|
-
|
|
1015
|
+
_.$slots.icon ? (f(), v("button", {
|
|
1016
1016
|
key: 0,
|
|
1017
1017
|
disabled: !!e.disabled,
|
|
1018
1018
|
class: B([{ "cursor-pointer": !e.disabled }, "flex-[0_0_50px] h-full flex items-center justify-center text-gray-400 border-l border-gray-300 dark:border-gray-700/50"]),
|
|
1019
1019
|
onClick: x
|
|
1020
1020
|
}, [
|
|
1021
|
-
_
|
|
1022
|
-
], 10,
|
|
1021
|
+
$(_.$slots, "icon")
|
|
1022
|
+
], 10, ml)) : E("", !0)
|
|
1023
1023
|
], 2),
|
|
1024
|
-
e.hideMessage ?
|
|
1025
|
-
_
|
|
1024
|
+
e.hideMessage ? E("", !0) : (f(), v("div", vl, [
|
|
1025
|
+
$(_.$slots, "message", {}, () => [
|
|
1026
1026
|
I(k(e.message), 1)
|
|
1027
1027
|
])
|
|
1028
1028
|
]))
|
|
1029
1029
|
]));
|
|
1030
1030
|
}
|
|
1031
|
-
}),
|
|
1031
|
+
}), hl = { class: "bg-white dark:bg-gray-900 rounded min-w-50 shadow-nav transition-all duration-400 dark:shadow-lg dark:shadow-primary/20 pb-6 lg:pb-0" }, gl = {
|
|
1032
1032
|
key: 0,
|
|
1033
1033
|
class: "lg:hidden text-title-md font-bold mb-4 uppercase px-4 sticky top-0"
|
|
1034
|
-
},
|
|
1034
|
+
}, bl = { class: "h-full h-hull lg:max-h-44 lg:overflow-auto scrollbar lg:overscroll-contain" }, te = /* @__PURE__ */ V({
|
|
1035
1035
|
inheritAttrs: !1,
|
|
1036
1036
|
__name: "VSelect",
|
|
1037
1037
|
props: {
|
|
@@ -1049,19 +1049,19 @@ const un = F({ name: "ri-arrow-up-s-line", render: dn }), fn = { class: "w-full
|
|
|
1049
1049
|
isPopup: { type: Boolean }
|
|
1050
1050
|
},
|
|
1051
1051
|
emits: ["change"],
|
|
1052
|
-
setup(e, { emit:
|
|
1053
|
-
const
|
|
1054
|
-
function t(
|
|
1055
|
-
s("change",
|
|
1052
|
+
setup(e, { emit: n }) {
|
|
1053
|
+
const l = vt(e, ["modelValue", "label", "items", "disabled"]), s = n;
|
|
1054
|
+
function t(o, i) {
|
|
1055
|
+
s("change", o), i == null || i.set(!1);
|
|
1056
1056
|
}
|
|
1057
|
-
return (
|
|
1058
|
-
const d =
|
|
1059
|
-
return f(), M(be,
|
|
1057
|
+
return (o, i) => {
|
|
1058
|
+
const d = ul;
|
|
1059
|
+
return f(), M(be, N(l, {
|
|
1060
1060
|
"hide-on-click": !1,
|
|
1061
1061
|
class: "relative"
|
|
1062
1062
|
}), {
|
|
1063
|
-
activator: y(({ on: u, isShow:
|
|
1064
|
-
|
|
1063
|
+
activator: y(({ on: u, isShow: r }) => [
|
|
1064
|
+
$(o.$slots, "activator", U(K({ on: u, isShow: r })), () => [
|
|
1065
1065
|
b(J, {
|
|
1066
1066
|
"model-value": e.modelValue,
|
|
1067
1067
|
disabled: e.disabled,
|
|
@@ -1074,7 +1074,7 @@ const un = F({ name: "ri-arrow-up-s-line", render: dn }), fn = { class: "w-full
|
|
|
1074
1074
|
}, {
|
|
1075
1075
|
icon: y(() => [
|
|
1076
1076
|
b(d, {
|
|
1077
|
-
class: B(["transition duration-300",
|
|
1077
|
+
class: B(["transition duration-300", r ? "rotate-x-180" : ""])
|
|
1078
1078
|
}, null, 8, ["class"])
|
|
1079
1079
|
]),
|
|
1080
1080
|
_: 2
|
|
@@ -1082,16 +1082,16 @@ const un = F({ name: "ri-arrow-up-s-line", render: dn }), fn = { class: "w-full
|
|
|
1082
1082
|
])
|
|
1083
1083
|
]),
|
|
1084
1084
|
default: y(({ on: u }) => [
|
|
1085
|
-
|
|
1086
|
-
e.label ? (f(),
|
|
1087
|
-
|
|
1085
|
+
a("div", hl, [
|
|
1086
|
+
e.label ? (f(), v("h4", gl, k(e.label), 1)) : E("", !0),
|
|
1087
|
+
a("div", bl, [
|
|
1088
1088
|
b(me, {
|
|
1089
1089
|
items: e.items,
|
|
1090
|
-
onClick: (
|
|
1090
|
+
onClick: (r) => t(r, u)
|
|
1091
1091
|
}, {
|
|
1092
|
-
default: y(({ item:
|
|
1093
|
-
|
|
1094
|
-
I(k(
|
|
1092
|
+
default: y(({ item: r }) => [
|
|
1093
|
+
$(o.$slots, "item", { item: r }, () => [
|
|
1094
|
+
I(k(r.name), 1)
|
|
1095
1095
|
])
|
|
1096
1096
|
]),
|
|
1097
1097
|
_: 3
|
|
@@ -1103,55 +1103,55 @@ const un = F({ name: "ri-arrow-up-s-line", render: dn }), fn = { class: "w-full
|
|
|
1103
1103
|
}, 16);
|
|
1104
1104
|
};
|
|
1105
1105
|
}
|
|
1106
|
-
}),
|
|
1106
|
+
}), yl = { class: "md:flex items-center mb-4" }, xl = { class: "flex-auto text-gray-600 bg:text-gray-400 mb-2" }, $l = { class: "md:max-w-50" }, kl = { class: "flex items-center mb-4" }, _l = { class: "flex-auto text-gray-600 bg:text-gray-400" }, wl = { class: "flex items-center mb-4" }, Cl = { class: "flex-auto text-gray-600 bg:text-gray-400" }, Da = /* @__PURE__ */ V({
|
|
1107
1107
|
__name: "BlockService",
|
|
1108
1108
|
props: {
|
|
1109
1109
|
locale: {},
|
|
1110
1110
|
locales: {}
|
|
1111
1111
|
},
|
|
1112
1112
|
emits: ["reboot", "reset", "locale"],
|
|
1113
|
-
setup(e, { emit:
|
|
1114
|
-
const
|
|
1115
|
-
var
|
|
1116
|
-
return (
|
|
1113
|
+
setup(e, { emit: n }) {
|
|
1114
|
+
const l = n, s = (o) => l("locale", o), t = (o) => {
|
|
1115
|
+
var i;
|
|
1116
|
+
return (i = e.locales.find((d) => d.value === o)) == null ? void 0 : i.name;
|
|
1117
1117
|
};
|
|
1118
|
-
return (
|
|
1118
|
+
return (o, i) => {
|
|
1119
1119
|
const d = te, u = A;
|
|
1120
|
-
return f(),
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1120
|
+
return f(), v(O, null, [
|
|
1121
|
+
a("div", yl, [
|
|
1122
|
+
a("div", xl, k(o.$t("selectLang")), 1),
|
|
1123
|
+
a("div", $l, [
|
|
1124
1124
|
b(d, {
|
|
1125
1125
|
"model-value": t(e.locale),
|
|
1126
|
-
label:
|
|
1126
|
+
label: o.$t("lang"),
|
|
1127
1127
|
items: e.locales,
|
|
1128
1128
|
onChange: s
|
|
1129
1129
|
}, null, 8, ["model-value", "label", "items"])
|
|
1130
1130
|
])
|
|
1131
1131
|
]),
|
|
1132
|
-
|
|
1133
|
-
|
|
1132
|
+
a("div", kl, [
|
|
1133
|
+
a("div", _l, k(o.$t("rebootDev")), 1),
|
|
1134
1134
|
b(u, {
|
|
1135
1135
|
class: "min-w-[100px]",
|
|
1136
1136
|
color: "red",
|
|
1137
1137
|
outline: "",
|
|
1138
|
-
onClick:
|
|
1138
|
+
onClick: i[0] || (i[0] = (r) => l("reboot", r))
|
|
1139
1139
|
}, {
|
|
1140
1140
|
default: y(() => [
|
|
1141
|
-
I(k(
|
|
1141
|
+
I(k(o.$t("reboot")), 1)
|
|
1142
1142
|
]),
|
|
1143
1143
|
_: 1
|
|
1144
1144
|
})
|
|
1145
1145
|
]),
|
|
1146
|
-
|
|
1147
|
-
|
|
1146
|
+
a("div", wl, [
|
|
1147
|
+
a("div", Cl, k(o.$t("resetConf")), 1),
|
|
1148
1148
|
b(u, {
|
|
1149
1149
|
class: "min-w-[100px]",
|
|
1150
1150
|
color: "red",
|
|
1151
|
-
onClick:
|
|
1151
|
+
onClick: i[1] || (i[1] = (r) => l("reset", r))
|
|
1152
1152
|
}, {
|
|
1153
1153
|
default: y(() => [
|
|
1154
|
-
I(k(
|
|
1154
|
+
I(k(o.$t("reset")), 1)
|
|
1155
1155
|
]),
|
|
1156
1156
|
_: 1
|
|
1157
1157
|
})
|
|
@@ -1159,7 +1159,7 @@ const un = F({ name: "ri-arrow-up-s-line", render: dn }), fn = { class: "w-full
|
|
|
1159
1159
|
], 64);
|
|
1160
1160
|
};
|
|
1161
1161
|
}
|
|
1162
|
-
}),
|
|
1162
|
+
}), zl = { class: "grid grid-cols-1 gap-4 lg:max-w-[360px] min-w-[250px]" }, Sl = { class: "flex flex-col w-full items-center gap-2" }, Vl = ["title"], Bl = { class: "absolute left-[110px] top-1/2 -translate-1/2 text-sm font-bold text-black dark:text-white text-center leading-none" }, El = { class: "absolute left-[110px] top-1/2 -translate-1/2 text-sm font-bold text-white text-center leading-none" }, Tl = { class: "flex justify-between w-full text-xs" }, Ll = { class: "text-gray-500 dark:text-gray-400" }, Ml = { class: "text-sm" }, Al = { class: "text-gray-500 dark:text-gray-400 text-left" }, Dl = { class: "text-right text-xs" }, Ia = /* @__PURE__ */ V({
|
|
1163
1163
|
__name: "BlockStatus",
|
|
1164
1164
|
props: {
|
|
1165
1165
|
pkg: {},
|
|
@@ -1173,135 +1173,135 @@ const un = F({ name: "ri-arrow-up-s-line", render: dn }), fn = { class: "w-full
|
|
|
1173
1173
|
board: {}
|
|
1174
1174
|
},
|
|
1175
1175
|
setup(e) {
|
|
1176
|
-
const
|
|
1177
|
-
let
|
|
1176
|
+
const n = D(e.uptime);
|
|
1177
|
+
let l = null;
|
|
1178
1178
|
const s = L(() => e.firmware.join(".")), t = L(() => [
|
|
1179
1179
|
{ name: "used", value: pe(e.usedBytes) },
|
|
1180
1180
|
{ name: "available", value: pe(e.totalBytes - e.usedBytes) },
|
|
1181
1181
|
{ name: "total", value: pe(e.totalBytes) }
|
|
1182
|
-
]),
|
|
1182
|
+
]), o = L(() => {
|
|
1183
1183
|
var u;
|
|
1184
1184
|
return [
|
|
1185
|
-
{ name: "uptime", value: Ct(
|
|
1185
|
+
{ name: "uptime", value: Ct(n.value) },
|
|
1186
1186
|
{ name: "id", value: `${e.id.toString(16)} (${e.id})` },
|
|
1187
1187
|
{ name: "firmware", value: s.value },
|
|
1188
1188
|
{ name: "version", value: (u = e.pkg) == null ? void 0 : u.version }
|
|
1189
1189
|
];
|
|
1190
|
-
}),
|
|
1191
|
-
|
|
1190
|
+
}), i = L(() => e.usedBytes ? Math.round(e.usedBytes * 100 / e.totalBytes) : 0), d = () => {
|
|
1191
|
+
n.value++, l = setTimeout(d, 1e3);
|
|
1192
1192
|
};
|
|
1193
1193
|
return fe(() => {
|
|
1194
1194
|
d();
|
|
1195
1195
|
}), Fe(() => {
|
|
1196
|
-
|
|
1197
|
-
}), (u,
|
|
1198
|
-
var c, m,
|
|
1199
|
-
return f(),
|
|
1200
|
-
|
|
1201
|
-
|
|
1196
|
+
n.value = 0, l && clearTimeout(l);
|
|
1197
|
+
}), (u, r) => {
|
|
1198
|
+
var c, m, p;
|
|
1199
|
+
return f(), v("div", zl, [
|
|
1200
|
+
a("div", Sl, [
|
|
1201
|
+
a("div", {
|
|
1202
1202
|
class: "relative block h-4 w-full rounded overflow-hidden bg-gray-200 dark:bg-gray-800 select-none",
|
|
1203
|
-
title: `${
|
|
1203
|
+
title: `${i.value}%`
|
|
1204
1204
|
}, [
|
|
1205
|
-
|
|
1206
|
-
|
|
1205
|
+
a("div", Bl, k(i.value) + "%", 1),
|
|
1206
|
+
a("div", {
|
|
1207
1207
|
class: "bg-blue-600 rounded h-4 overflow-hidden relative transition-all duration-500",
|
|
1208
|
-
style:
|
|
1208
|
+
style: Q(`width: ${i.value}%`)
|
|
1209
1209
|
}, [
|
|
1210
|
-
|
|
1210
|
+
a("div", El, k(i.value) + "%", 1)
|
|
1211
1211
|
], 4)
|
|
1212
|
-
], 8,
|
|
1213
|
-
|
|
1214
|
-
(f(!0),
|
|
1212
|
+
], 8, Vl),
|
|
1213
|
+
a("div", Tl, [
|
|
1214
|
+
(f(!0), v(O, null, R(t.value, (g) => (f(), v("div", {
|
|
1215
1215
|
key: g.name,
|
|
1216
1216
|
class: "flex-auto"
|
|
1217
1217
|
}, [
|
|
1218
|
-
|
|
1219
|
-
|
|
1218
|
+
a("div", Ll, [
|
|
1219
|
+
$(u.$slots, "name", { item: g })
|
|
1220
1220
|
]),
|
|
1221
|
-
|
|
1221
|
+
a("div", null, k(g.value), 1)
|
|
1222
1222
|
]))), 128))
|
|
1223
1223
|
])
|
|
1224
1224
|
]),
|
|
1225
|
-
|
|
1226
|
-
(f(!0),
|
|
1225
|
+
a("div", Ml, [
|
|
1226
|
+
(f(!0), v(O, null, R(o.value, (g) => (f(), v("div", {
|
|
1227
1227
|
key: g.name,
|
|
1228
1228
|
class: "flex justify-between items-center"
|
|
1229
1229
|
}, [
|
|
1230
|
-
|
|
1231
|
-
|
|
1230
|
+
a("div", Al, [
|
|
1231
|
+
$(u.$slots, "name", { item: g })
|
|
1232
1232
|
]),
|
|
1233
|
-
|
|
1233
|
+
a("div", Dl, k(g.value), 1)
|
|
1234
1234
|
]))), 128))
|
|
1235
1235
|
]),
|
|
1236
|
-
|
|
1237
|
-
|
|
1236
|
+
a("div", null, [
|
|
1237
|
+
$(u.$slots, "default", {
|
|
1238
1238
|
home: (c = e.pkg) == null ? void 0 : c.homepage,
|
|
1239
|
-
repo: (
|
|
1239
|
+
repo: (p = (m = e.pkg) == null ? void 0 : m.repository) == null ? void 0 : p.url
|
|
1240
1240
|
})
|
|
1241
1241
|
])
|
|
1242
1242
|
]);
|
|
1243
1243
|
};
|
|
1244
1244
|
}
|
|
1245
|
-
}),
|
|
1245
|
+
}), Il = { class: "flex items-center cursor-pointer" }, Ol = /* @__PURE__ */ V({
|
|
1246
1246
|
__name: "VFile",
|
|
1247
1247
|
emits: ["change"],
|
|
1248
|
-
setup(e, { emit:
|
|
1249
|
-
const
|
|
1250
|
-
const
|
|
1251
|
-
|
|
1248
|
+
setup(e, { emit: n }) {
|
|
1249
|
+
const l = n, s = async (t) => {
|
|
1250
|
+
const o = t.target;
|
|
1251
|
+
o.files && l("change", o.files);
|
|
1252
1252
|
};
|
|
1253
|
-
return (t,
|
|
1254
|
-
|
|
1253
|
+
return (t, o) => (f(), v("label", Il, [
|
|
1254
|
+
a("input", N({
|
|
1255
1255
|
type: "file",
|
|
1256
1256
|
class: "hidden"
|
|
1257
1257
|
}, t.$attrs, { onChange: s }), null, 16),
|
|
1258
|
-
|
|
1258
|
+
$(t.$slots, "default")
|
|
1259
1259
|
]));
|
|
1260
1260
|
}
|
|
1261
|
-
}),
|
|
1261
|
+
}), jl = { class: "md:flex" }, Pl = { class: "text-gray-600 bg:text-gray-400 first-letter:uppercase min-w-19" }, Oa = /* @__PURE__ */ V({
|
|
1262
1262
|
__name: "BlockUpdate",
|
|
1263
1263
|
emits: ["update"],
|
|
1264
|
-
setup(e, { emit:
|
|
1265
|
-
const
|
|
1266
|
-
const
|
|
1264
|
+
setup(e, { emit: n }) {
|
|
1265
|
+
const l = n, s = pt({ firmware: null, littlefs: null }), t = (d) => d ? Array.from(d).map((u) => `${u.name} (${pe(u.size)})`).join("") : "", o = (d, u) => {
|
|
1266
|
+
const r = new FormData();
|
|
1267
1267
|
for (let c = 0; c < d.length; c++) {
|
|
1268
1268
|
const m = d.item(c);
|
|
1269
1269
|
if (!m) return;
|
|
1270
|
-
|
|
1270
|
+
r.append(`file[${c}]`, m, u);
|
|
1271
1271
|
}
|
|
1272
|
-
return
|
|
1273
|
-
},
|
|
1272
|
+
return r;
|
|
1273
|
+
}, i = (d, u) => {
|
|
1274
1274
|
if (!u) return;
|
|
1275
|
-
const
|
|
1276
|
-
|
|
1275
|
+
const r = o(u, d);
|
|
1276
|
+
r && l("update", d, r);
|
|
1277
1277
|
};
|
|
1278
1278
|
return (d, u) => {
|
|
1279
|
-
const
|
|
1280
|
-
return f(),
|
|
1281
|
-
(f(!0),
|
|
1279
|
+
const r = A;
|
|
1280
|
+
return f(), v("div", null, [
|
|
1281
|
+
(f(!0), v(O, null, R(s, (c, m) => (f(), v("div", {
|
|
1282
1282
|
key: m,
|
|
1283
1283
|
class: "mb-4 flex items-center"
|
|
1284
1284
|
}, [
|
|
1285
|
-
b(
|
|
1285
|
+
b(Ol, {
|
|
1286
1286
|
accept: ".bin",
|
|
1287
|
-
onChange: (
|
|
1287
|
+
onChange: (p) => s[m] = p,
|
|
1288
1288
|
class: "flex-auto"
|
|
1289
1289
|
}, {
|
|
1290
1290
|
default: y(() => [
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1291
|
+
a("div", jl, [
|
|
1292
|
+
a("h6", Pl, k(m) + ":", 1),
|
|
1293
|
+
$(d.$slots, "default", {
|
|
1294
1294
|
file: t(c)
|
|
1295
1295
|
})
|
|
1296
1296
|
])
|
|
1297
1297
|
]),
|
|
1298
1298
|
_: 2
|
|
1299
1299
|
}, 1032, ["onChange"]),
|
|
1300
|
-
b(
|
|
1300
|
+
b(r, {
|
|
1301
1301
|
class: "min-w-[100px]",
|
|
1302
1302
|
color: "blue",
|
|
1303
1303
|
disabled: !c,
|
|
1304
|
-
onClick: (
|
|
1304
|
+
onClick: (p) => i(`${m}.bin`, c)
|
|
1305
1305
|
}, {
|
|
1306
1306
|
default: y(() => [
|
|
1307
1307
|
I(k(d.$t("btnUpdate")), 1)
|
|
@@ -1312,39 +1312,39 @@ const un = F({ name: "ri-arrow-up-s-line", render: dn }), fn = { class: "w-full
|
|
|
1312
1312
|
]);
|
|
1313
1313
|
};
|
|
1314
1314
|
}
|
|
1315
|
-
}),
|
|
1315
|
+
}), Hl = {
|
|
1316
1316
|
viewBox: "0 0 24 24",
|
|
1317
1317
|
width: "1.2em",
|
|
1318
1318
|
height: "1.2em"
|
|
1319
1319
|
};
|
|
1320
|
-
function
|
|
1321
|
-
return f(),
|
|
1322
|
-
|
|
1320
|
+
function Nl(e, n) {
|
|
1321
|
+
return f(), v("svg", Hl, [...n[0] || (n[0] = [
|
|
1322
|
+
a("path", {
|
|
1323
1323
|
fill: "currentColor",
|
|
1324
1324
|
d: "M12.172 12L9.343 9.173l1.415-1.414L15 12l-4.242 4.242l-1.415-1.414z"
|
|
1325
1325
|
}, null, -1)
|
|
1326
1326
|
])]);
|
|
1327
1327
|
}
|
|
1328
|
-
const
|
|
1328
|
+
const Ze = F({ name: "ri-arrow-drop-right-line", render: Nl }), Fl = { class: "flex items-center gap-1.5" }, ja = /* @__PURE__ */ V({
|
|
1329
1329
|
__name: "BlockBreadcrumb",
|
|
1330
1330
|
props: {
|
|
1331
1331
|
items: { default: () => [] }
|
|
1332
1332
|
},
|
|
1333
1333
|
emits: ["click"],
|
|
1334
|
-
setup(e, { emit:
|
|
1335
|
-
const
|
|
1336
|
-
return (t,
|
|
1337
|
-
const
|
|
1338
|
-
return f(),
|
|
1339
|
-
|
|
1340
|
-
(f(!0),
|
|
1334
|
+
setup(e, { emit: n }) {
|
|
1335
|
+
const l = n, s = (t) => l("click", t);
|
|
1336
|
+
return (t, o) => {
|
|
1337
|
+
const i = Ze;
|
|
1338
|
+
return f(), v("nav", null, [
|
|
1339
|
+
a("ol", Fl, [
|
|
1340
|
+
(f(!0), v(O, null, R(e.items, (d, u) => (f(), v("li", {
|
|
1341
1341
|
key: u,
|
|
1342
1342
|
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"])
|
|
1343
1343
|
}, [
|
|
1344
|
-
|
|
1344
|
+
$(t.$slots, "default", { item: d }, () => [
|
|
1345
1345
|
(f(), M(de(d.path ? "a" : "span"), {
|
|
1346
1346
|
href: d.path,
|
|
1347
|
-
onClick: (
|
|
1347
|
+
onClick: (r) => s(d)
|
|
1348
1348
|
}, {
|
|
1349
1349
|
default: y(() => [
|
|
1350
1350
|
I(k(d.name), 1)
|
|
@@ -1352,61 +1352,61 @@ const Qe = F({ name: "ri-arrow-drop-right-line", render: Pn }), Fn = { class: "f
|
|
|
1352
1352
|
_: 2
|
|
1353
1353
|
}, 1032, ["href", "onClick"]))
|
|
1354
1354
|
]),
|
|
1355
|
-
d.path ? (f(), M(
|
|
1355
|
+
d.path ? (f(), M(i, {
|
|
1356
1356
|
key: 0,
|
|
1357
1357
|
class: "rotate-270"
|
|
1358
|
-
})) :
|
|
1358
|
+
})) : E("", !0)
|
|
1359
1359
|
], 2))), 128))
|
|
1360
1360
|
])
|
|
1361
1361
|
]);
|
|
1362
1362
|
};
|
|
1363
1363
|
}
|
|
1364
|
-
}),
|
|
1364
|
+
}), Rl = {
|
|
1365
1365
|
key: 0,
|
|
1366
1366
|
class: "loader-line w-full absolute top-0 left-0 h-[3px] bg-gray-100 dark:bg-gray-800 before:bg-blue-600 dark:before:bg-blue-800 before:h-1 rounded-xl z-20 before:absolute before:w-[40%] before:-left-1/2 before:content-[''] before:animate-[lineAnim_1s_linear_infinite]"
|
|
1367
|
-
},
|
|
1367
|
+
}, Ul = {
|
|
1368
1368
|
key: 1,
|
|
1369
1369
|
class: "absolute top-0 left-0 w-full h-full bg-gray-50 dark:bg-gray-900 z-10 opacity-50"
|
|
1370
|
-
},
|
|
1370
|
+
}, Kl = {
|
|
1371
1371
|
key: 2,
|
|
1372
1372
|
class: "mb-4 flex items-center justify-between"
|
|
1373
|
-
},
|
|
1373
|
+
}, Wl = { class: "text-lg font-semibold text-gray-800 dark:text-white/90 mb-0" }, ql = { class: "max-w-full" }, Gl = /* @__PURE__ */ V({
|
|
1374
1374
|
__name: "CardMain",
|
|
1375
1375
|
props: {
|
|
1376
1376
|
title: {},
|
|
1377
1377
|
loading: { type: Boolean }
|
|
1378
1378
|
},
|
|
1379
1379
|
setup(e) {
|
|
1380
|
-
return (
|
|
1380
|
+
return (n, l) => (f(), v("div", {
|
|
1381
1381
|
class: B(["relative rounded-md border border-gray-200 dark:border-gray-800 bg-white dark:bg-white/[0.03] p-5 sm:p-6 hover-effect", { "overflow-hidden": e.loading }])
|
|
1382
1382
|
}, [
|
|
1383
|
-
e.loading ? (f(),
|
|
1384
|
-
e.loading ? (f(),
|
|
1385
|
-
e.title ? (f(),
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1383
|
+
e.loading ? (f(), v("div", Rl)) : E("", !0),
|
|
1384
|
+
e.loading ? (f(), v("div", Ul)) : E("", !0),
|
|
1385
|
+
e.title ? (f(), v("div", Kl, [
|
|
1386
|
+
a("h3", Wl, k(e.title), 1),
|
|
1387
|
+
a("div", null, [
|
|
1388
|
+
$(n.$slots, "header")
|
|
1389
1389
|
])
|
|
1390
|
-
])) :
|
|
1391
|
-
|
|
1392
|
-
|
|
1390
|
+
])) : E("", !0),
|
|
1391
|
+
a("div", ql, [
|
|
1392
|
+
$(n.$slots, "default")
|
|
1393
1393
|
])
|
|
1394
1394
|
], 2));
|
|
1395
1395
|
}
|
|
1396
|
-
}),
|
|
1396
|
+
}), Jl = {
|
|
1397
1397
|
viewBox: "0 0 24 24",
|
|
1398
1398
|
width: "1.2em",
|
|
1399
1399
|
height: "1.2em"
|
|
1400
1400
|
};
|
|
1401
|
-
function
|
|
1402
|
-
return f(),
|
|
1403
|
-
|
|
1401
|
+
function Xl(e, n) {
|
|
1402
|
+
return f(), v("svg", Jl, [...n[0] || (n[0] = [
|
|
1403
|
+
a("path", {
|
|
1404
1404
|
fill: "currentColor",
|
|
1405
1405
|
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"
|
|
1406
1406
|
}, null, -1)
|
|
1407
1407
|
])]);
|
|
1408
1408
|
}
|
|
1409
|
-
const
|
|
1409
|
+
const Yl = F({ name: "ri-file-copy2-line", render: Xl }), Zl = { class: "text-title-md uppercase font-bold flex-auto" }, Ql = { class: "px-4 pb-4 md:px-6" }, es = {
|
|
1410
1410
|
key: 0,
|
|
1411
1411
|
class: "text-title-md uppercase font-bold"
|
|
1412
1412
|
}, Be = /* @__PURE__ */ V({
|
|
@@ -1422,66 +1422,66 @@ const Yn = F({ name: "ri-file-copy2-line", render: Xn }), Qn = { class: "text-ti
|
|
|
1422
1422
|
timeout: {}
|
|
1423
1423
|
},
|
|
1424
1424
|
emits: ["close", "click", "open"],
|
|
1425
|
-
setup(e, { expose:
|
|
1426
|
-
const s =
|
|
1425
|
+
setup(e, { expose: n, emit: l }) {
|
|
1426
|
+
const s = l, t = Ke(We), { show: o, onClose: i, onOpen: d } = Ue(s, e.timeout), u = {
|
|
1427
1427
|
sm: "max-w-full md:max-w-[330px] h-full md:h-[unset]",
|
|
1428
1428
|
md: "max-w-full md:max-w-[672px] h-full md:h-[unset]",
|
|
1429
1429
|
lg: "max-w-full md:max-w-[960px] h-full md:h-[unset]",
|
|
1430
1430
|
full: "relative max-w-full w-full h-3/4 "
|
|
1431
|
-
},
|
|
1431
|
+
}, r = {
|
|
1432
1432
|
none: "",
|
|
1433
1433
|
white: "bg-white dark:bg-gray-900",
|
|
1434
1434
|
gray: ""
|
|
1435
|
-
}, c = L(() => [u[e.size],
|
|
1436
|
-
return
|
|
1437
|
-
show:
|
|
1438
|
-
onClose:
|
|
1439
|
-
}), (
|
|
1440
|
-
const h =
|
|
1441
|
-
return e.isOnlyDialog ||
|
|
1435
|
+
}, c = L(() => [u[e.size], r[e.color]]), m = t.greaterOrEqual("lg");
|
|
1436
|
+
return n({
|
|
1437
|
+
show: o,
|
|
1438
|
+
onClose: i
|
|
1439
|
+
}), (p, g) => {
|
|
1440
|
+
const h = ne;
|
|
1441
|
+
return e.isOnlyDialog || T(m) ? (f(), M(He, {
|
|
1442
1442
|
key: 0,
|
|
1443
1443
|
to: "body"
|
|
1444
1444
|
}, [
|
|
1445
|
-
b(
|
|
1445
|
+
b(ae, {
|
|
1446
1446
|
"enter-active-class": "duration-300 ease-out",
|
|
1447
1447
|
"enter-from-class": "transform opacity-0 -translate-y-2",
|
|
1448
1448
|
"enter-to-class": "opacity-100 translate-y-0",
|
|
1449
1449
|
"leave-active-class": "duration-200 ease-in",
|
|
1450
1450
|
"leave-from-class": "opacity-100 translate-y-0",
|
|
1451
1451
|
"leave-to-class": "transform opacity-0 -translate-y-2",
|
|
1452
|
-
onAfterEnter:
|
|
1452
|
+
onAfterEnter: T(d)
|
|
1453
1453
|
}, {
|
|
1454
1454
|
default: y(() => [
|
|
1455
|
-
|
|
1455
|
+
T(o) ? (f(), v("div", {
|
|
1456
1456
|
key: 0,
|
|
1457
1457
|
class: "z-20 fixed top-0 h-dvh w-full left-0 flex flex-col",
|
|
1458
|
-
onWheel: g[4] || (g[4] =
|
|
1458
|
+
onWheel: g[4] || (g[4] = H(() => {
|
|
1459
1459
|
}, ["stop"]))
|
|
1460
1460
|
}, [
|
|
1461
|
-
|
|
1461
|
+
a("div", {
|
|
1462
1462
|
class: "absolute h-full w-full top-0 left-0 bg-black/40 bg-blur",
|
|
1463
1463
|
onClick: g[0] || (g[0] = //@ts-ignore
|
|
1464
|
-
(...x) =>
|
|
1464
|
+
(...x) => T(i) && T(i)(...x))
|
|
1465
1465
|
}),
|
|
1466
|
-
|
|
1466
|
+
a("div", {
|
|
1467
1467
|
class: B(["flex-auto flex align-center overflow-y-auto overscroll-contain", (e.size === "full", "")])
|
|
1468
1468
|
}, [
|
|
1469
|
-
|
|
1469
|
+
a("div", {
|
|
1470
1470
|
class: B(["m-auto w-full flex flex-col z-20 overflow-auto h-full scrollbar overscroll-contain bg-gray-50 dark:bg-gray-900 shadow-lg rounded-sm", c.value])
|
|
1471
1471
|
}, [
|
|
1472
|
-
|
|
1472
|
+
a("div", {
|
|
1473
1473
|
class: B(["flex items-center min-h-14 ps-6 pe-3", e.size === "full" ? "absolute top-0 right-4" : ""]),
|
|
1474
|
-
onWheel: g[1] || (g[1] =
|
|
1474
|
+
onWheel: g[1] || (g[1] = H(() => {
|
|
1475
1475
|
}, ["prevent"])),
|
|
1476
|
-
onTouchmove: g[2] || (g[2] =
|
|
1476
|
+
onTouchmove: g[2] || (g[2] = H(() => {
|
|
1477
1477
|
}, ["prevent"]))
|
|
1478
1478
|
}, [
|
|
1479
|
-
|
|
1480
|
-
|
|
1479
|
+
a("h4", Zl, k(e.title), 1),
|
|
1480
|
+
$(p.$slots, "header-btn", { close: T(i) }),
|
|
1481
1481
|
b(A, {
|
|
1482
1482
|
color: "transparent",
|
|
1483
1483
|
size: "md",
|
|
1484
|
-
onClick:
|
|
1484
|
+
onClick: T(i)
|
|
1485
1485
|
}, {
|
|
1486
1486
|
default: y(() => [
|
|
1487
1487
|
b(h)
|
|
@@ -1489,49 +1489,49 @@ const Yn = F({ name: "ri-file-copy2-line", render: Xn }), Qn = { class: "text-ti
|
|
|
1489
1489
|
_: 1
|
|
1490
1490
|
}, 8, ["onClick"])
|
|
1491
1491
|
], 34),
|
|
1492
|
-
|
|
1492
|
+
a("div", {
|
|
1493
1493
|
class: B(["relative overflow-auto h-full md:h-auto max-h-dvh scrollbar overflow-y-auto overscroll-contain", e.size === "full" ? "flex-auto" : "md:max-h-147.5 px-6 pb-6"]),
|
|
1494
1494
|
onClose: g[3] || (g[3] = //@ts-ignore
|
|
1495
|
-
(...x) =>
|
|
1495
|
+
(...x) => T(i) && T(i)(...x))
|
|
1496
1496
|
}, [
|
|
1497
|
-
|
|
1497
|
+
$(p.$slots, "default", { close: T(i) })
|
|
1498
1498
|
], 34)
|
|
1499
1499
|
], 2)
|
|
1500
1500
|
], 2)
|
|
1501
|
-
], 32)) :
|
|
1501
|
+
], 32)) : E("", !0)
|
|
1502
1502
|
]),
|
|
1503
1503
|
_: 3
|
|
1504
1504
|
}, 8, ["onAfterEnter"])
|
|
1505
1505
|
])) : (f(), M(Xe, {
|
|
1506
1506
|
key: 1,
|
|
1507
1507
|
size: e.popupSize,
|
|
1508
|
-
onClose:
|
|
1508
|
+
onClose: T(i)
|
|
1509
1509
|
}, {
|
|
1510
1510
|
button: y(() => [
|
|
1511
|
-
|
|
1511
|
+
$(p.$slots, "header-btn", { close: T(i) })
|
|
1512
1512
|
]),
|
|
1513
1513
|
default: y(({ close: x }) => [
|
|
1514
|
-
|
|
1515
|
-
|
|
1514
|
+
a("div", Ql, [
|
|
1515
|
+
a("div", {
|
|
1516
1516
|
class: B(["flex items-center mb-4", e.size === "full" ? "absolute top-0 right-4" : ""]),
|
|
1517
|
-
onWheel: g[5] || (g[5] =
|
|
1517
|
+
onWheel: g[5] || (g[5] = H(() => {
|
|
1518
1518
|
}, ["prevent"])),
|
|
1519
|
-
onTouchmove: g[6] || (g[6] =
|
|
1519
|
+
onTouchmove: g[6] || (g[6] = H(() => {
|
|
1520
1520
|
}, ["prevent"]))
|
|
1521
1521
|
}, [
|
|
1522
|
-
e.title ? (f(),
|
|
1522
|
+
e.title ? (f(), v("h4", es, k(e.title), 1)) : E("", !0)
|
|
1523
1523
|
], 34),
|
|
1524
|
-
|
|
1524
|
+
$(p.$slots, "default", { close: x })
|
|
1525
1525
|
])
|
|
1526
1526
|
]),
|
|
1527
1527
|
_: 3
|
|
1528
1528
|
}, 8, ["size", "onClose"]));
|
|
1529
1529
|
};
|
|
1530
1530
|
}
|
|
1531
|
-
}), ts = { class: "flex-auto flex justify-between" },
|
|
1531
|
+
}), ts = { class: "flex-auto flex justify-between" }, ns = { class: "text-sm text-gray-500 font-medium line-clamp-2 overflow-hidden" }, ls = { class: "text-sm text-ellipsis overflow-hidden text-nowrap" }, ss = {
|
|
1532
1532
|
key: 0,
|
|
1533
1533
|
class: "absolute left-1/2 top-1/2 size-[calc(50%)] text-gray-200/30 dark:text-gray-800/30 -translate-1/2"
|
|
1534
|
-
}, os = { class: "min-h-60 relative" }, as = { class: "pt-6" }, is = { class: "text-center text-3xl text-ellipsis overflow-hidden" }, rs = { class: "text-center text-xl mt-4" },
|
|
1534
|
+
}, os = { class: "min-h-60 relative" }, as = { class: "pt-6" }, is = { class: "text-center text-3xl text-ellipsis overflow-hidden" }, rs = { class: "text-center text-xl mt-4" }, ie = /* @__PURE__ */ V({
|
|
1535
1535
|
__name: "CardBase",
|
|
1536
1536
|
props: {
|
|
1537
1537
|
size: {},
|
|
@@ -1548,52 +1548,52 @@ const Yn = F({ name: "ri-file-copy2-line", render: Xn }), Qn = { class: "text-ti
|
|
|
1548
1548
|
getTo: {}
|
|
1549
1549
|
},
|
|
1550
1550
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
1551
|
-
setup(e, { emit:
|
|
1552
|
-
const
|
|
1551
|
+
setup(e, { emit: n }) {
|
|
1552
|
+
const l = e, s = n, t = D(!1), o = L(() => ["button", "dimmer"].includes(l.type || "") && l.value ? "text-amber-500" : "text-gray-400"), i = (m) => s("edit", m), d = (m) => s("clone", m), u = () => t.value = !0, r = (m) => s("open", m), c = (m) => {
|
|
1553
1553
|
t.value = !1, s("close", m);
|
|
1554
1554
|
};
|
|
1555
|
-
return (m,
|
|
1556
|
-
const g = Ge, h =
|
|
1557
|
-
return f(),
|
|
1555
|
+
return (m, p) => {
|
|
1556
|
+
const g = Ge, h = Yl;
|
|
1557
|
+
return f(), v("div", {
|
|
1558
1558
|
class: "flex flex-col border relative aspect-square rounded-md bg-white dark:bg-gray-900 border-b border-gray-300 dark:border-gray-700 p-2 hover-effect transition-all cursor-pointer",
|
|
1559
1559
|
onClick: u
|
|
1560
1560
|
}, [
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
class: B([
|
|
1561
|
+
a("div", ts, [
|
|
1562
|
+
a("div", {
|
|
1563
|
+
class: B([o.value, "size-8 animate-shake"])
|
|
1564
1564
|
}, [
|
|
1565
|
-
|
|
1565
|
+
$(m.$slots, "icon", U(K(l)))
|
|
1566
1566
|
], 2),
|
|
1567
|
-
|
|
1567
|
+
$(m.$slots, "header", U(K(l)))
|
|
1568
1568
|
]),
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
I(k(
|
|
1569
|
+
a("div", null, [
|
|
1570
|
+
$(m.$slots, "body", U(K(l)), () => [
|
|
1571
|
+
a("h6", ns, [
|
|
1572
|
+
$(m.$slots, "name", U(K(l)), () => [
|
|
1573
|
+
I(k(l.name), 1)
|
|
1574
1574
|
])
|
|
1575
1575
|
]),
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
I(k(
|
|
1576
|
+
a("div", ls, [
|
|
1577
|
+
$(m.$slots, "value", U(K(l)), () => [
|
|
1578
|
+
I(k(l.valueTo || l.value), 1)
|
|
1579
1579
|
])
|
|
1580
1580
|
])
|
|
1581
1581
|
])
|
|
1582
1582
|
]),
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
])) :
|
|
1583
|
+
l.icon ? (f(), v("div", ss, [
|
|
1584
|
+
$(m.$slots, "icon", U(K(l)))
|
|
1585
|
+
])) : E("", !0),
|
|
1586
1586
|
t.value ? (f(), M(Be, {
|
|
1587
1587
|
key: 1,
|
|
1588
|
-
size:
|
|
1588
|
+
size: l.size || "sm",
|
|
1589
1589
|
title: e.name,
|
|
1590
1590
|
onClose: c,
|
|
1591
|
-
onOpen:
|
|
1591
|
+
onOpen: r
|
|
1592
1592
|
}, {
|
|
1593
1593
|
"header-btn": y(() => [
|
|
1594
1594
|
b(A, {
|
|
1595
1595
|
color: "transparent",
|
|
1596
|
-
onClick:
|
|
1596
|
+
onClick: i
|
|
1597
1597
|
}, {
|
|
1598
1598
|
default: y(() => [
|
|
1599
1599
|
b(g)
|
|
@@ -1611,24 +1611,24 @@ const Yn = F({ name: "ri-file-copy2-line", render: Xn }), Qn = { class: "text-ti
|
|
|
1611
1611
|
})
|
|
1612
1612
|
]),
|
|
1613
1613
|
default: y(() => [
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
I(k(
|
|
1614
|
+
a("div", os, [
|
|
1615
|
+
a("div", as, [
|
|
1616
|
+
a("h3", is, [
|
|
1617
|
+
$(m.$slots, "dialog-name", U(K(l)), () => [
|
|
1618
|
+
I(k(l.name), 1)
|
|
1619
1619
|
])
|
|
1620
1620
|
]),
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
I(k(
|
|
1621
|
+
$(m.$slots, "dialog", U(K(l))),
|
|
1622
|
+
a("p", rs, [
|
|
1623
|
+
$(m.$slots, "dialog-value", U(K(l)), () => [
|
|
1624
|
+
I(k(l.valueTo || l.value), 1)
|
|
1625
1625
|
])
|
|
1626
1626
|
])
|
|
1627
1627
|
])
|
|
1628
1628
|
])
|
|
1629
1629
|
]),
|
|
1630
1630
|
_: 3
|
|
1631
|
-
}, 8, ["size", "title"])) :
|
|
1631
|
+
}, 8, ["size", "title"])) : E("", !0)
|
|
1632
1632
|
]);
|
|
1633
1633
|
};
|
|
1634
1634
|
}
|
|
@@ -1637,15 +1637,15 @@ const Yn = F({ name: "ri-file-copy2-line", render: Xn }), Qn = { class: "text-ti
|
|
|
1637
1637
|
width: "1.2em",
|
|
1638
1638
|
height: "1.2em"
|
|
1639
1639
|
};
|
|
1640
|
-
function ds(e,
|
|
1641
|
-
return f(),
|
|
1642
|
-
|
|
1640
|
+
function ds(e, n) {
|
|
1641
|
+
return f(), v("svg", cs, [...n[0] || (n[0] = [
|
|
1642
|
+
a("path", {
|
|
1643
1643
|
fill: "currentColor",
|
|
1644
1644
|
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"
|
|
1645
1645
|
}, null, -1)
|
|
1646
1646
|
])]);
|
|
1647
1647
|
}
|
|
1648
|
-
const us = F({ name: "ri-shut-down-line", render: ds }), fs = { class: "flex justify-end" }, ms = { class: "flex justify-center py-4" },
|
|
1648
|
+
const us = F({ name: "ri-shut-down-line", render: ds }), fs = { class: "flex justify-end" }, ms = { class: "flex justify-center py-4" }, Pa = /* @__PURE__ */ V({
|
|
1649
1649
|
__name: "CardButton",
|
|
1650
1650
|
props: {
|
|
1651
1651
|
size: {},
|
|
@@ -1662,27 +1662,27 @@ const us = F({ name: "ri-shut-down-line", render: ds }), fs = { class: "flex jus
|
|
|
1662
1662
|
getTo: {}
|
|
1663
1663
|
},
|
|
1664
1664
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
1665
|
-
setup(e, { emit:
|
|
1666
|
-
const
|
|
1667
|
-
const { disabled: d } =
|
|
1665
|
+
setup(e, { emit: n }) {
|
|
1666
|
+
const l = e, s = n, t = ({ opts: i = {} }) => {
|
|
1667
|
+
const { disabled: d } = i;
|
|
1668
1668
|
return { disabled: d };
|
|
1669
|
-
},
|
|
1670
|
-
return (
|
|
1669
|
+
}, o = () => s("setState", !l.value);
|
|
1670
|
+
return (i, d) => {
|
|
1671
1671
|
const u = us;
|
|
1672
|
-
return f(), M(
|
|
1673
|
-
onClick: d[0] || (d[0] = (
|
|
1674
|
-
onEdit: d[1] || (d[1] = (
|
|
1675
|
-
onClone: d[2] || (d[2] = (
|
|
1672
|
+
return f(), M(ie, N(l, {
|
|
1673
|
+
onClick: d[0] || (d[0] = (r) => s("click", r)),
|
|
1674
|
+
onEdit: d[1] || (d[1] = (r) => s("edit", r)),
|
|
1675
|
+
onClone: d[2] || (d[2] = (r) => s("clone", r))
|
|
1676
1676
|
}), {
|
|
1677
|
-
icon: y((
|
|
1678
|
-
|
|
1677
|
+
icon: y((r) => [
|
|
1678
|
+
$(i.$slots, "icon", U(K(r)))
|
|
1679
1679
|
]),
|
|
1680
|
-
header: y((
|
|
1681
|
-
|
|
1682
|
-
b(A,
|
|
1680
|
+
header: y((r) => [
|
|
1681
|
+
a("div", fs, [
|
|
1682
|
+
b(A, N(t(r), {
|
|
1683
1683
|
type: "icon",
|
|
1684
|
-
class:
|
|
1685
|
-
onClick:
|
|
1684
|
+
class: l.value ? "text-amber-500" : "text-gray-500",
|
|
1685
|
+
onClick: H(o, ["stop"])
|
|
1686
1686
|
}), {
|
|
1687
1687
|
default: y(() => [
|
|
1688
1688
|
b(u, { class: "size-8" })
|
|
@@ -1691,12 +1691,12 @@ const us = F({ name: "ri-shut-down-line", render: ds }), fs = { class: "flex jus
|
|
|
1691
1691
|
}, 16, ["class"])
|
|
1692
1692
|
])
|
|
1693
1693
|
]),
|
|
1694
|
-
dialog: y((
|
|
1695
|
-
|
|
1696
|
-
b(A,
|
|
1694
|
+
dialog: y((r) => [
|
|
1695
|
+
a("div", ms, [
|
|
1696
|
+
b(A, N(t(r), {
|
|
1697
1697
|
type: "icon",
|
|
1698
|
-
class: ["size-18",
|
|
1699
|
-
onClick:
|
|
1698
|
+
class: ["size-18", l.value ? "text-amber-500" : "text-gray-500"],
|
|
1699
|
+
onClick: H(o, ["stop"])
|
|
1700
1700
|
}), {
|
|
1701
1701
|
default: y(() => [
|
|
1702
1702
|
b(u, { class: "size-16" })
|
|
@@ -1714,15 +1714,15 @@ const us = F({ name: "ri-shut-down-line", render: ds }), fs = { class: "flex jus
|
|
|
1714
1714
|
width: "1.2em",
|
|
1715
1715
|
height: "1.2em"
|
|
1716
1716
|
};
|
|
1717
|
-
function ps(e,
|
|
1718
|
-
return f(),
|
|
1719
|
-
|
|
1717
|
+
function ps(e, n) {
|
|
1718
|
+
return f(), v("svg", vs, [...n[0] || (n[0] = [
|
|
1719
|
+
a("path", {
|
|
1720
1720
|
fill: "currentColor",
|
|
1721
1721
|
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"
|
|
1722
1722
|
}, null, -1)
|
|
1723
1723
|
])]);
|
|
1724
1724
|
}
|
|
1725
|
-
const hs = F({ name: "ri-time-line", render: ps }), gs = { class: "flex justify-center relative mx-2 my-6" },
|
|
1725
|
+
const hs = F({ name: "ri-time-line", render: ps }), gs = { class: "flex justify-center relative mx-2 my-6" }, Ha = /* @__PURE__ */ V({
|
|
1726
1726
|
__name: "CardDate",
|
|
1727
1727
|
props: {
|
|
1728
1728
|
size: {},
|
|
@@ -1739,57 +1739,57 @@ const hs = F({ name: "ri-time-line", render: ps }), gs = { class: "flex justify-
|
|
|
1739
1739
|
getTo: {}
|
|
1740
1740
|
},
|
|
1741
1741
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
1742
|
-
setup(e, { emit:
|
|
1743
|
-
const
|
|
1742
|
+
setup(e, { emit: n }) {
|
|
1743
|
+
const l = e, s = n, t = Re("time"), o = (r) => new Date(+r * 1e3).toISOString().slice(0, 16), i = (r) => {
|
|
1744
1744
|
var m;
|
|
1745
|
-
const c = (m =
|
|
1745
|
+
const c = (m = r == null ? void 0 : r.target) == null ? void 0 : m.valueAsNumber;
|
|
1746
1746
|
c && s("setState", c / 1e3);
|
|
1747
|
-
}, d = ({ name:
|
|
1748
|
-
const { disabled:
|
|
1749
|
-
return { label:
|
|
1747
|
+
}, d = ({ name: r, value: c, opts: m = {} }) => {
|
|
1748
|
+
const { disabled: p } = m;
|
|
1749
|
+
return { label: r, modelValue: o(c), disabled: p };
|
|
1750
1750
|
}, u = () => {
|
|
1751
1751
|
var c, m;
|
|
1752
|
-
const
|
|
1753
|
-
|
|
1752
|
+
const r = (m = (c = t.value) == null ? void 0 : c.$el) == null ? void 0 : m.querySelector("input");
|
|
1753
|
+
r != null && r.showPicker && r.showPicker();
|
|
1754
1754
|
};
|
|
1755
|
-
return (
|
|
1755
|
+
return (r, c) => {
|
|
1756
1756
|
const m = hs;
|
|
1757
|
-
return f(), M(
|
|
1758
|
-
onClick: c[0] || (c[0] = (
|
|
1759
|
-
onEdit: c[1] || (c[1] = (
|
|
1760
|
-
onClone: c[2] || (c[2] = (
|
|
1757
|
+
return f(), M(ie, N(l, {
|
|
1758
|
+
onClick: c[0] || (c[0] = (p) => s("click", p)),
|
|
1759
|
+
onEdit: c[1] || (c[1] = (p) => s("edit", p)),
|
|
1760
|
+
onClone: c[2] || (c[2] = (p) => s("clone", p))
|
|
1761
1761
|
}), {
|
|
1762
|
-
icon: y((
|
|
1763
|
-
|
|
1762
|
+
icon: y((p) => [
|
|
1763
|
+
$(r.$slots, "icon", U(K(p)))
|
|
1764
1764
|
]),
|
|
1765
|
-
header: y((
|
|
1766
|
-
|
|
1765
|
+
header: y((p) => [
|
|
1766
|
+
a("div", null, [
|
|
1767
1767
|
b(A, {
|
|
1768
1768
|
type: "icon",
|
|
1769
1769
|
class: "text-gray-500",
|
|
1770
|
-
onClick:
|
|
1770
|
+
onClick: H(u, ["stop"])
|
|
1771
1771
|
}, {
|
|
1772
1772
|
default: y(() => [
|
|
1773
1773
|
b(m, { class: "size-7" })
|
|
1774
1774
|
]),
|
|
1775
1775
|
_: 1
|
|
1776
1776
|
}),
|
|
1777
|
-
b(J,
|
|
1777
|
+
b(J, N({
|
|
1778
1778
|
ref_key: "time",
|
|
1779
1779
|
ref: t
|
|
1780
|
-
}, d(
|
|
1780
|
+
}, d(p), {
|
|
1781
1781
|
type: "datetime-local",
|
|
1782
1782
|
class: "size-0",
|
|
1783
1783
|
hidden: "",
|
|
1784
|
-
onChange:
|
|
1784
|
+
onChange: i
|
|
1785
1785
|
}), null, 16)
|
|
1786
1786
|
])
|
|
1787
1787
|
]),
|
|
1788
|
-
dialog: y((
|
|
1789
|
-
|
|
1790
|
-
b(J,
|
|
1788
|
+
dialog: y((p) => [
|
|
1789
|
+
a("div", gs, [
|
|
1790
|
+
b(J, N(d(p), {
|
|
1791
1791
|
type: "datetime-local",
|
|
1792
|
-
onChange:
|
|
1792
|
+
onChange: i
|
|
1793
1793
|
}), null, 16)
|
|
1794
1794
|
])
|
|
1795
1795
|
]),
|
|
@@ -1799,13 +1799,13 @@ const hs = F({ name: "ri-time-line", render: ps }), gs = { class: "flex justify-
|
|
|
1799
1799
|
}
|
|
1800
1800
|
}), bs = { class: "flex justify-end" }, ys = { class: "flex justify-end" }, xs = {
|
|
1801
1801
|
class: /* @__PURE__ */ B("text-blue-600 dark:text-blue-400")
|
|
1802
|
-
},
|
|
1802
|
+
}, $s = {
|
|
1803
1803
|
width: "30",
|
|
1804
1804
|
height: "30",
|
|
1805
1805
|
viewBox: "-7.5 -7.5 75 75",
|
|
1806
1806
|
version: "1.1",
|
|
1807
1807
|
style: { transform: "rotate(-90deg)" }
|
|
1808
|
-
}, ks = ["stroke-dashoffset"],
|
|
1808
|
+
}, ks = ["stroke-dashoffset"], _s = { class: "absolute top-1/2 left-1/2 -translate-1/2 text-white z-10 font-bold text-xl" }, Na = /* @__PURE__ */ V({
|
|
1809
1809
|
__name: "CardDimmer",
|
|
1810
1810
|
props: {
|
|
1811
1811
|
size: {},
|
|
@@ -1822,32 +1822,32 @@ const hs = F({ name: "ri-time-line", render: ps }), gs = { class: "flex justify-
|
|
|
1822
1822
|
getTo: {}
|
|
1823
1823
|
},
|
|
1824
1824
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
1825
|
-
setup(e, { emit:
|
|
1826
|
-
const
|
|
1827
|
-
const { min:
|
|
1828
|
-
return { min:
|
|
1829
|
-
}, u = (c) => s("setState", +c.target.value || 0),
|
|
1825
|
+
setup(e, { emit: n }) {
|
|
1826
|
+
const l = e, s = n, t = D(0), o = ({ opts: c, value: m }) => Math.round(100 * +m / ((c == null ? void 0 : c.max) || 255)), i = ({ opts: c, value: m }) => Math.round(187 - +m / ((c == null ? void 0 : c.max) || 255) * 187), d = ({ value: c, opts: m }) => {
|
|
1827
|
+
const { min: p = 0, max: g = 255, step: h = 1, disabled: x } = m || {};
|
|
1828
|
+
return { min: p, max: g, step: h, value: c, disabled: !!x, class: x ? "" : "cursor-pointer" };
|
|
1829
|
+
}, u = (c) => s("setState", +c.target.value || 0), r = ({ value: c }) => {
|
|
1830
1830
|
+c != 0 ? (t.value = +c, s("setState", 0)) : s("setState", c ? 0 : t.value || 255);
|
|
1831
1831
|
};
|
|
1832
|
-
return (c, m) => (f(), M(
|
|
1833
|
-
onClick: m[0] || (m[0] = (
|
|
1834
|
-
onEdit: m[1] || (m[1] = (
|
|
1835
|
-
onClone: m[2] || (m[2] = (
|
|
1832
|
+
return (c, m) => (f(), M(ie, N(l, {
|
|
1833
|
+
onClick: m[0] || (m[0] = (p) => s("click", p)),
|
|
1834
|
+
onEdit: m[1] || (m[1] = (p) => s("edit", p)),
|
|
1835
|
+
onClone: m[2] || (m[2] = (p) => s("clone", p))
|
|
1836
1836
|
}), {
|
|
1837
|
-
icon: y((
|
|
1838
|
-
|
|
1837
|
+
icon: y((p) => [
|
|
1838
|
+
$(c.$slots, "icon", U(K(p)))
|
|
1839
1839
|
]),
|
|
1840
|
-
header: y((
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
b(A,
|
|
1840
|
+
header: y((p) => [
|
|
1841
|
+
a("div", bs, [
|
|
1842
|
+
a("div", ys, [
|
|
1843
|
+
b(A, N(d(p), {
|
|
1844
1844
|
type: "icon",
|
|
1845
|
-
onClick:
|
|
1845
|
+
onClick: H((g) => r(p), ["stop"])
|
|
1846
1846
|
}), {
|
|
1847
1847
|
default: y(() => [
|
|
1848
|
-
|
|
1849
|
-
(f(),
|
|
1850
|
-
m[3] || (m[3] =
|
|
1848
|
+
a("div", xs, [
|
|
1849
|
+
(f(), v("svg", $s, [
|
|
1850
|
+
m[3] || (m[3] = a("circle", {
|
|
1851
1851
|
class: "stroke-gray-300 dark:stroke-gray-700",
|
|
1852
1852
|
r: "30",
|
|
1853
1853
|
cx: "30",
|
|
@@ -1855,14 +1855,14 @@ const hs = F({ name: "ri-time-line", render: ps }), gs = { class: "flex justify-
|
|
|
1855
1855
|
fill: "transparent",
|
|
1856
1856
|
"stroke-width": "10"
|
|
1857
1857
|
}, null, -1)),
|
|
1858
|
-
|
|
1858
|
+
a("circle", {
|
|
1859
1859
|
r: "30",
|
|
1860
1860
|
cx: "30",
|
|
1861
1861
|
cy: "30",
|
|
1862
1862
|
stroke: "currentColor",
|
|
1863
1863
|
"stroke-width": "8",
|
|
1864
1864
|
"stroke-linecap": "butt",
|
|
1865
|
-
"stroke-dashoffset":
|
|
1865
|
+
"stroke-dashoffset": i(p),
|
|
1866
1866
|
fill: "transparent",
|
|
1867
1867
|
"stroke-dasharray": "187"
|
|
1868
1868
|
}, null, 8, ks)
|
|
@@ -1874,17 +1874,17 @@ const hs = F({ name: "ri-time-line", render: ps }), gs = { class: "flex justify-
|
|
|
1874
1874
|
])
|
|
1875
1875
|
])
|
|
1876
1876
|
]),
|
|
1877
|
-
dialog: y((
|
|
1878
|
-
|
|
1879
|
-
class: B(["flex justify-center relative mx-2 my-6", d(
|
|
1877
|
+
dialog: y((p) => [
|
|
1878
|
+
a("div", {
|
|
1879
|
+
class: B(["flex justify-center relative mx-2 my-6", d(p).disabled ? "opacity-40" : ""])
|
|
1880
1880
|
}, [
|
|
1881
|
-
m[4] || (m[4] =
|
|
1882
|
-
|
|
1881
|
+
m[4] || (m[4] = a("div", { class: "absolute h-10 w-full top-0 left-0 bg-gray-400 dark:bg-gray-700 z-0 rounded-md" }, null, -1)),
|
|
1882
|
+
a("div", {
|
|
1883
1883
|
class: "absolute h-10 top-0 left-0 bg-blue-600 dark:bg-blue-400 z-0 rounded-md transition-[width_0.3s_linear]",
|
|
1884
|
-
style:
|
|
1884
|
+
style: Q(`width: ${o(p)}%`)
|
|
1885
1885
|
}, null, 4),
|
|
1886
|
-
|
|
1887
|
-
|
|
1886
|
+
a("div", _s, k(o(p)) + " %", 1),
|
|
1887
|
+
a("input", N({ type: "range" }, d(p), {
|
|
1888
1888
|
class: "w-full h-10 z-10 appearance-none opacity-0",
|
|
1889
1889
|
onChange: u
|
|
1890
1890
|
}), null, 16)
|
|
@@ -1893,7 +1893,7 @@ const hs = F({ name: "ri-time-line", render: ps }), gs = { class: "flex justify-
|
|
|
1893
1893
|
_: 3
|
|
1894
1894
|
}, 16));
|
|
1895
1895
|
}
|
|
1896
|
-
}),
|
|
1896
|
+
}), Fa = /* @__PURE__ */ V({
|
|
1897
1897
|
__name: "CardInfo",
|
|
1898
1898
|
props: {
|
|
1899
1899
|
size: {},
|
|
@@ -1910,23 +1910,23 @@ const hs = F({ name: "ri-time-line", render: ps }), gs = { class: "flex justify-
|
|
|
1910
1910
|
getTo: {}
|
|
1911
1911
|
},
|
|
1912
1912
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
1913
|
-
setup(e, { emit:
|
|
1914
|
-
const
|
|
1915
|
-
return (t,
|
|
1916
|
-
onClick:
|
|
1917
|
-
onEdit:
|
|
1918
|
-
onClone:
|
|
1913
|
+
setup(e, { emit: n }) {
|
|
1914
|
+
const l = e, s = n;
|
|
1915
|
+
return (t, o) => (f(), M(ie, N(l, {
|
|
1916
|
+
onClick: o[0] || (o[0] = (i) => s("click", i)),
|
|
1917
|
+
onEdit: o[1] || (o[1] = (i) => s("edit", i)),
|
|
1918
|
+
onClone: o[2] || (o[2] = (i) => s("clone", i))
|
|
1919
1919
|
}), {
|
|
1920
|
-
icon: y((
|
|
1921
|
-
|
|
1920
|
+
icon: y((i) => [
|
|
1921
|
+
$(t.$slots, "icon", U(K(i)))
|
|
1922
1922
|
]),
|
|
1923
1923
|
default: y(() => [
|
|
1924
|
-
|
|
1924
|
+
$(t.$slots, "dialog")
|
|
1925
1925
|
]),
|
|
1926
1926
|
_: 3
|
|
1927
1927
|
}, 16));
|
|
1928
1928
|
}
|
|
1929
|
-
}), ws = { class: "flex justify-center relative mx-2 my-6" },
|
|
1929
|
+
}), ws = { class: "flex justify-center relative mx-2 my-6" }, Ra = /* @__PURE__ */ V({
|
|
1930
1930
|
__name: "CardInput",
|
|
1931
1931
|
props: {
|
|
1932
1932
|
size: {},
|
|
@@ -1943,37 +1943,37 @@ const hs = F({ name: "ri-time-line", render: ps }), gs = { class: "flex justify-
|
|
|
1943
1943
|
getTo: {}
|
|
1944
1944
|
},
|
|
1945
1945
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
1946
|
-
setup(e, { emit:
|
|
1947
|
-
const
|
|
1948
|
-
const { disabled:
|
|
1949
|
-
return { label: d, disabled:
|
|
1950
|
-
},
|
|
1946
|
+
setup(e, { emit: n }) {
|
|
1947
|
+
const l = e, s = n, t = D(l.value || ""), o = ({ name: d, opts: u = {} }) => {
|
|
1948
|
+
const { disabled: r } = u;
|
|
1949
|
+
return { label: d, disabled: r };
|
|
1950
|
+
}, i = (d) => s("setState", d.target.value);
|
|
1951
1951
|
return ue(
|
|
1952
|
-
() =>
|
|
1952
|
+
() => l.value,
|
|
1953
1953
|
(d) => {
|
|
1954
1954
|
t.value = d;
|
|
1955
1955
|
}
|
|
1956
1956
|
), (d, u) => {
|
|
1957
|
-
const
|
|
1958
|
-
return f(), M(
|
|
1957
|
+
const r = Ze;
|
|
1958
|
+
return f(), M(ie, N(l, {
|
|
1959
1959
|
onClick: u[1] || (u[1] = (c) => s("click", c)),
|
|
1960
1960
|
onEdit: u[2] || (u[2] = (c) => s("edit", c)),
|
|
1961
1961
|
onClone: u[3] || (u[3] = (c) => s("clone", c))
|
|
1962
1962
|
}), {
|
|
1963
1963
|
icon: y((c) => [
|
|
1964
|
-
|
|
1964
|
+
$(d.$slots, "icon", U(K(c)))
|
|
1965
1965
|
]),
|
|
1966
1966
|
dialog: y((c) => [
|
|
1967
|
-
|
|
1968
|
-
b(J,
|
|
1967
|
+
a("div", ws, [
|
|
1968
|
+
b(J, N({
|
|
1969
1969
|
modelValue: t.value,
|
|
1970
1970
|
"onUpdate:modelValue": u[0] || (u[0] = (m) => t.value = m)
|
|
1971
|
-
},
|
|
1972
|
-
onEnter:
|
|
1973
|
-
onBlur:
|
|
1971
|
+
}, o(c), {
|
|
1972
|
+
onEnter: i,
|
|
1973
|
+
onBlur: i
|
|
1974
1974
|
}), {
|
|
1975
1975
|
icon: y(() => [
|
|
1976
|
-
b(
|
|
1976
|
+
b(r, { class: "size-8" })
|
|
1977
1977
|
]),
|
|
1978
1978
|
_: 1
|
|
1979
1979
|
}, 16, ["modelValue"])
|
|
@@ -1988,15 +1988,15 @@ const hs = F({ name: "ri-time-line", render: ps }), gs = { class: "flex justify-
|
|
|
1988
1988
|
width: "1.2em",
|
|
1989
1989
|
height: "1.2em"
|
|
1990
1990
|
};
|
|
1991
|
-
function zs(e,
|
|
1992
|
-
return f(),
|
|
1993
|
-
|
|
1991
|
+
function zs(e, n) {
|
|
1992
|
+
return f(), v("svg", Cs, [...n[0] || (n[0] = [
|
|
1993
|
+
a("path", {
|
|
1994
1994
|
fill: "currentColor",
|
|
1995
1995
|
d: "M8 4h13v2H8zm-5-.5h3v3H3zm0 7h3v3H3zm0 7h3v3H3zM8 11h13v2H8zm0 7h13v2H8z"
|
|
1996
1996
|
}, null, -1)
|
|
1997
1997
|
])]);
|
|
1998
1998
|
}
|
|
1999
|
-
const Ss = F({ name: "ri-list-check", render: zs }), Vs = { class: "flex justify-center py-4" },
|
|
1999
|
+
const Ss = F({ name: "ri-list-check", render: zs }), Vs = { class: "flex justify-center py-4" }, Ua = /* @__PURE__ */ V({
|
|
2000
2000
|
__name: "CardList",
|
|
2001
2001
|
props: {
|
|
2002
2002
|
size: {},
|
|
@@ -2013,37 +2013,37 @@ const Ss = F({ name: "ri-list-check", render: zs }), Vs = { class: "flex justify
|
|
|
2013
2013
|
getTo: {}
|
|
2014
2014
|
},
|
|
2015
2015
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
2016
|
-
setup(e, { emit:
|
|
2017
|
-
const
|
|
2018
|
-
var
|
|
2019
|
-
return Array.isArray(d == null ? void 0 : d.items) && ((
|
|
2020
|
-
},
|
|
2016
|
+
setup(e, { emit: n }) {
|
|
2017
|
+
const l = e, s = n, t = ({ value: d }) => s("setState", d), o = ({ opts: d, value: u }) => {
|
|
2018
|
+
var r;
|
|
2019
|
+
return Array.isArray(d == null ? void 0 : d.items) && ((r = d == null ? void 0 : d.items.find((c) => c.value == u)) == null ? void 0 : r.name) || u;
|
|
2020
|
+
}, i = ({ name: d, value: u, opts: r = {} }) => {
|
|
2021
2021
|
var g;
|
|
2022
|
-
const { items: c = [], disabled: m } =
|
|
2023
|
-
return { label: d, modelValue:
|
|
2022
|
+
const { items: c = [], disabled: m } = r, p = ((g = c.find((h) => h.value == u)) == null ? void 0 : g.name) || u;
|
|
2023
|
+
return { label: d, modelValue: p, items: c, disabled: !!m };
|
|
2024
2024
|
};
|
|
2025
2025
|
return (d, u) => {
|
|
2026
|
-
const
|
|
2027
|
-
return f(), M(
|
|
2026
|
+
const r = Ss;
|
|
2027
|
+
return f(), M(ie, N(l, {
|
|
2028
2028
|
onClick: u[1] || (u[1] = (c) => s("click", c)),
|
|
2029
2029
|
onEdit: u[2] || (u[2] = (c) => s("edit", c)),
|
|
2030
2030
|
onClone: u[3] || (u[3] = (c) => s("clone", c))
|
|
2031
2031
|
}), {
|
|
2032
2032
|
icon: y((c) => [
|
|
2033
|
-
|
|
2033
|
+
$(d.$slots, "icon", U(K(c)))
|
|
2034
2034
|
]),
|
|
2035
2035
|
value: y((c) => [
|
|
2036
|
-
I(k(
|
|
2036
|
+
I(k(o(c)), 1)
|
|
2037
2037
|
]),
|
|
2038
2038
|
"dialog-value": y((c) => [
|
|
2039
|
-
I(k(
|
|
2039
|
+
I(k(o(c)), 1)
|
|
2040
2040
|
]),
|
|
2041
2041
|
header: y((c) => [
|
|
2042
|
-
|
|
2043
|
-
onClick: u[0] || (u[0] =
|
|
2042
|
+
a("div", {
|
|
2043
|
+
onClick: u[0] || (u[0] = H(() => {
|
|
2044
2044
|
}, ["prevent", "stop"]))
|
|
2045
2045
|
}, [
|
|
2046
|
-
b(te,
|
|
2046
|
+
b(te, N(i(c), {
|
|
2047
2047
|
"is-popup": "",
|
|
2048
2048
|
top: "0",
|
|
2049
2049
|
left: "-115px",
|
|
@@ -2053,10 +2053,10 @@ const Ss = F({ name: "ri-list-check", render: zs }), Vs = { class: "flex justify
|
|
|
2053
2053
|
b(A, {
|
|
2054
2054
|
type: "icon",
|
|
2055
2055
|
class: "text-gray-500",
|
|
2056
|
-
onClick:
|
|
2056
|
+
onClick: H(m.click, ["stop"])
|
|
2057
2057
|
}, {
|
|
2058
2058
|
default: y(() => [
|
|
2059
|
-
b(
|
|
2059
|
+
b(r, { class: "size-6" })
|
|
2060
2060
|
]),
|
|
2061
2061
|
_: 1
|
|
2062
2062
|
}, 8, ["onClick"])
|
|
@@ -2066,8 +2066,8 @@ const Ss = F({ name: "ri-list-check", render: zs }), Vs = { class: "flex justify
|
|
|
2066
2066
|
])
|
|
2067
2067
|
]),
|
|
2068
2068
|
dialog: y((c) => [
|
|
2069
|
-
|
|
2070
|
-
b(te,
|
|
2069
|
+
a("div", Vs, [
|
|
2070
|
+
b(te, N(i(c), {
|
|
2071
2071
|
top: "-50%",
|
|
2072
2072
|
left: "50%",
|
|
2073
2073
|
onChange: t
|
|
@@ -2083,28 +2083,28 @@ const Ss = F({ name: "ri-list-check", render: zs }), Vs = { class: "flex justify
|
|
|
2083
2083
|
width: "1.2em",
|
|
2084
2084
|
height: "1.2em"
|
|
2085
2085
|
};
|
|
2086
|
-
function
|
|
2087
|
-
return f(),
|
|
2088
|
-
|
|
2086
|
+
function Es(e, n) {
|
|
2087
|
+
return f(), v("svg", Bs, [...n[0] || (n[0] = [
|
|
2088
|
+
a("path", {
|
|
2089
2089
|
fill: "currentColor",
|
|
2090
2090
|
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"
|
|
2091
2091
|
}, null, -1)
|
|
2092
2092
|
])]);
|
|
2093
2093
|
}
|
|
2094
|
-
const
|
|
2094
|
+
const Ts = F({ name: "ri-menu-search-line", render: Es }), Ls = {
|
|
2095
2095
|
viewBox: "0 0 24 24",
|
|
2096
2096
|
width: "1.2em",
|
|
2097
2097
|
height: "1.2em"
|
|
2098
2098
|
};
|
|
2099
|
-
function Ms(e,
|
|
2100
|
-
return f(),
|
|
2101
|
-
|
|
2099
|
+
function Ms(e, n) {
|
|
2100
|
+
return f(), v("svg", Ls, [...n[0] || (n[0] = [
|
|
2101
|
+
a("path", {
|
|
2102
2102
|
fill: "currentColor",
|
|
2103
2103
|
d: "M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"
|
|
2104
2104
|
}, null, -1)
|
|
2105
2105
|
])]);
|
|
2106
2106
|
}
|
|
2107
|
-
const ye = F({ name: "ri-add-line", render: Ms }), As = { class: "flex w-full relative" }, Ds = { class: "flex gap-2 flex-wrap flex-auto px-2 py-1" }, Is = ["disabled"],
|
|
2107
|
+
const ye = F({ name: "ri-add-line", render: Ms }), As = { class: "flex w-full relative" }, Ds = { class: "flex gap-2 flex-wrap flex-auto px-2 py-1" }, Is = ["disabled"], Qe = /* @__PURE__ */ V({
|
|
2108
2108
|
__name: "VTextWrapper",
|
|
2109
2109
|
props: {
|
|
2110
2110
|
active: { type: Boolean },
|
|
@@ -2113,27 +2113,27 @@ const ye = F({ name: "ri-add-line", render: Ms }), As = { class: "flex w-full re
|
|
|
2113
2113
|
hideIcon: { type: Boolean, default: !1 }
|
|
2114
2114
|
},
|
|
2115
2115
|
emits: ["icon"],
|
|
2116
|
-
setup(e, { emit:
|
|
2117
|
-
const
|
|
2118
|
-
return (
|
|
2116
|
+
setup(e, { emit: n }) {
|
|
2117
|
+
const l = n, s = L(() => e.active ? "top-0 left-3 text-xs" : "top-1/2"), t = L(() => [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"]);
|
|
2118
|
+
return (o, i) => {
|
|
2119
2119
|
const d = ye;
|
|
2120
|
-
return f(),
|
|
2121
|
-
|
|
2120
|
+
return f(), v("div", As, [
|
|
2121
|
+
a("div", {
|
|
2122
2122
|
class: B(["relative w-full min-h-[40px] border border-gray-300 dark:border-gray-700 flex items-center rounded transition bg-white dark:bg-gray-800", t.value])
|
|
2123
2123
|
}, [
|
|
2124
|
-
|
|
2124
|
+
a("span", {
|
|
2125
2125
|
class: B(["absolute left-4 transition-all rounded -translate-y-1/2 text-gray-600 dark:text-gray-400", s.value])
|
|
2126
2126
|
}, k(e.label), 3),
|
|
2127
|
-
|
|
2128
|
-
|
|
2127
|
+
a("div", Ds, [
|
|
2128
|
+
$(o.$slots, "default")
|
|
2129
2129
|
]),
|
|
2130
|
-
e.hideIcon ?
|
|
2130
|
+
e.hideIcon ? E("", !0) : (f(), v("button", {
|
|
2131
2131
|
key: 0,
|
|
2132
2132
|
disabled: e.disabled,
|
|
2133
2133
|
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]"]),
|
|
2134
|
-
onClick:
|
|
2134
|
+
onClick: i[0] || (i[0] = (u) => l("icon", u))
|
|
2135
2135
|
}, [
|
|
2136
|
-
|
|
2136
|
+
$(o.$slots, "icon", {}, () => [
|
|
2137
2137
|
b(d, { class: "size-4" })
|
|
2138
2138
|
])
|
|
2139
2139
|
], 10, Is))
|
|
@@ -2146,31 +2146,31 @@ const ye = F({ name: "ri-add-line", render: Ms }), As = { class: "flex w-full re
|
|
|
2146
2146
|
width: "1.2em",
|
|
2147
2147
|
height: "1.2em"
|
|
2148
2148
|
};
|
|
2149
|
-
function js(e,
|
|
2150
|
-
return f(),
|
|
2151
|
-
|
|
2149
|
+
function js(e, n) {
|
|
2150
|
+
return f(), v("svg", Os, [...n[0] || (n[0] = [
|
|
2151
|
+
a("path", {
|
|
2152
2152
|
fill: "currentColor",
|
|
2153
2153
|
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"
|
|
2154
2154
|
}, null, -1)
|
|
2155
2155
|
])]);
|
|
2156
2156
|
}
|
|
2157
|
-
const
|
|
2157
|
+
const Ps = F({ name: "ri-file-copy-line", render: js }), Hs = {
|
|
2158
2158
|
viewBox: "0 0 24 24",
|
|
2159
2159
|
width: "1.2em",
|
|
2160
2160
|
height: "1.2em"
|
|
2161
2161
|
};
|
|
2162
|
-
function
|
|
2163
|
-
return f(),
|
|
2164
|
-
|
|
2162
|
+
function Ns(e, n) {
|
|
2163
|
+
return f(), v("svg", Hs, [...n[0] || (n[0] = [
|
|
2164
|
+
a("path", {
|
|
2165
2165
|
fill: "currentColor",
|
|
2166
2166
|
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"
|
|
2167
2167
|
}, null, -1)
|
|
2168
2168
|
])]);
|
|
2169
2169
|
}
|
|
2170
|
-
const Fs = F({ name: "ri-folder6-line", render:
|
|
2170
|
+
const Fs = F({ name: "ri-folder6-line", render: Ns }), Rs = ["onClick"], Us = {
|
|
2171
2171
|
key: 0,
|
|
2172
2172
|
class: "me-1"
|
|
2173
|
-
},
|
|
2173
|
+
}, Ks = { class: "dark:text-gray-300" }, Ws = { class: "flex gap-3 items-center z-10" }, qs = {
|
|
2174
2174
|
key: 0,
|
|
2175
2175
|
class: "flex ps-5"
|
|
2176
2176
|
}, Gs = { class: "font-medium dark:text-gray-300" }, et = /* @__PURE__ */ V({
|
|
@@ -2181,52 +2181,52 @@ const Fs = F({ name: "ri-folder6-line", render: Ps }), Us = ["onClick"], Rs = {
|
|
|
2181
2181
|
onlyValue: { type: Boolean, default: !1 }
|
|
2182
2182
|
},
|
|
2183
2183
|
emits: ["click"],
|
|
2184
|
-
setup(e, { emit:
|
|
2185
|
-
const
|
|
2184
|
+
setup(e, { emit: n }) {
|
|
2185
|
+
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 = D({}), { text: o, copy: i, copied: d, isSupported: u } = xt(), r = (g) => {
|
|
2186
2186
|
t.value[g] = !t.value[g];
|
|
2187
|
-
}, c = (g) => typeof g == "object", m = (g) => `${e.path ? e.path + "." : ""}${g}`,
|
|
2188
|
-
|
|
2187
|
+
}, c = (g) => typeof g == "object", m = (g) => `${e.path ? e.path + "." : ""}${g}`, p = (g, h) => {
|
|
2188
|
+
l("click", { key: g, path: m(g), isObject: h });
|
|
2189
2189
|
};
|
|
2190
2190
|
return (g, h) => {
|
|
2191
|
-
const x = Fs,
|
|
2192
|
-
return f(),
|
|
2193
|
-
(f(!0),
|
|
2191
|
+
const x = Fs, _ = Ps, C = ye;
|
|
2192
|
+
return f(), v("ul", null, [
|
|
2193
|
+
(f(!0), v(O, null, R(e.items, (z, j) => (f(), v("li", {
|
|
2194
2194
|
key: j,
|
|
2195
2195
|
class: B(c(z) ? "" : `flex items-center ${s()}`)
|
|
2196
2196
|
}, [
|
|
2197
|
-
|
|
2197
|
+
a("div", {
|
|
2198
2198
|
class: B(["flex items-center cursor-pointer ps-2 h-8", c(z) ? `${s()}` : ""]),
|
|
2199
|
-
onClick: (X) =>
|
|
2199
|
+
onClick: (X) => r(j)
|
|
2200
2200
|
}, [
|
|
2201
|
-
c(z) ? (f(),
|
|
2201
|
+
c(z) ? (f(), v("div", Us, [
|
|
2202
2202
|
b(x, { class: "size-5" })
|
|
2203
|
-
])) :
|
|
2204
|
-
|
|
2205
|
-
|
|
2203
|
+
])) : E("", !0),
|
|
2204
|
+
a("div", Ks, k(j), 1),
|
|
2205
|
+
T(u) ? (f(), M(A, {
|
|
2206
2206
|
key: 1,
|
|
2207
2207
|
class: "opacity-20 hover:opacity-70 transition-all",
|
|
2208
2208
|
color: "transparent",
|
|
2209
2209
|
size: "sm",
|
|
2210
|
-
onClick:
|
|
2210
|
+
onClick: H((X) => T(i)(m(j)), ["stop"])
|
|
2211
2211
|
}, {
|
|
2212
2212
|
default: y(() => [
|
|
2213
|
-
b(
|
|
2213
|
+
b(_, { class: "size-5" })
|
|
2214
2214
|
]),
|
|
2215
2215
|
_: 1
|
|
2216
|
-
}, 8, ["onClick"])) :
|
|
2217
|
-
|
|
2216
|
+
}, 8, ["onClick"])) : E("", !0),
|
|
2217
|
+
T(o) === m(j) ? (f(), v("span", {
|
|
2218
2218
|
key: 2,
|
|
2219
|
-
class: B(["text-gray-500 transition-all duration-1000 text-sm",
|
|
2220
|
-
}, k(g.$t("copied")), 3)) :
|
|
2221
|
-
!e.onlyValue && c(z) ? (f(),
|
|
2222
|
-
h[1] || (h[1] =
|
|
2223
|
-
|
|
2219
|
+
class: B(["text-gray-500 transition-all duration-1000 text-sm", T(d) ? "opacity-100" : "opacity-0"])
|
|
2220
|
+
}, k(g.$t("copied")), 3)) : E("", !0),
|
|
2221
|
+
!e.onlyValue && c(z) ? (f(), v(O, { key: 3 }, [
|
|
2222
|
+
h[1] || (h[1] = a("div", { class: "flex-auto" }, null, -1)),
|
|
2223
|
+
a("div", Ws, [
|
|
2224
2224
|
b(A, {
|
|
2225
2225
|
class: "opacity-20 hover:opacity-70 transition-all",
|
|
2226
2226
|
color: "transparent",
|
|
2227
2227
|
size: "sm",
|
|
2228
2228
|
title: g.$t("add"),
|
|
2229
|
-
onClick:
|
|
2229
|
+
onClick: H((X) => p(j, c(z)), ["stop"])
|
|
2230
2230
|
}, {
|
|
2231
2231
|
default: y(() => [
|
|
2232
2232
|
b(C, { class: "size-5" })
|
|
@@ -2234,27 +2234,27 @@ const Fs = F({ name: "ri-folder6-line", render: Ps }), Us = ["onClick"], Rs = {
|
|
|
2234
2234
|
_: 1
|
|
2235
2235
|
}, 8, ["title", "onClick"])
|
|
2236
2236
|
])
|
|
2237
|
-
], 64)) :
|
|
2238
|
-
], 10,
|
|
2239
|
-
c(z) ? (f(),
|
|
2237
|
+
], 64)) : E("", !0)
|
|
2238
|
+
], 10, Rs),
|
|
2239
|
+
c(z) ? (f(), v("div", qs, [
|
|
2240
2240
|
Ce(b(et, {
|
|
2241
2241
|
class: "flex-auto",
|
|
2242
2242
|
path: m(j),
|
|
2243
2243
|
items: z,
|
|
2244
2244
|
onlyValue: e.onlyValue,
|
|
2245
|
-
onClick: h[0] || (h[0] = (X) =>
|
|
2245
|
+
onClick: h[0] || (h[0] = (X) => l("click", X))
|
|
2246
2246
|
}, null, 8, ["path", "items", "onlyValue"]), [
|
|
2247
2247
|
[ht, t.value[j]]
|
|
2248
2248
|
])
|
|
2249
|
-
])) : (f(),
|
|
2250
|
-
h[2] || (h[2] =
|
|
2251
|
-
|
|
2249
|
+
])) : (f(), v(O, { key: 1 }, [
|
|
2250
|
+
h[2] || (h[2] = a("div", { class: "flex-auto gap-3" }, null, -1)),
|
|
2251
|
+
a("div", Gs, k(z), 1),
|
|
2252
2252
|
b(A, {
|
|
2253
2253
|
class: "opacity-20 hover:opacity-70 transition-all",
|
|
2254
2254
|
color: "gray",
|
|
2255
2255
|
size: "sm",
|
|
2256
2256
|
title: g.$t("add"),
|
|
2257
|
-
onClick:
|
|
2257
|
+
onClick: H((X) => p(j, c(z)), ["stop"])
|
|
2258
2258
|
}, {
|
|
2259
2259
|
default: y(() => [
|
|
2260
2260
|
b(C, { class: "size-5" })
|
|
@@ -2266,49 +2266,49 @@ const Fs = F({ name: "ri-folder6-line", render: Ps }), Us = ["onClick"], Rs = {
|
|
|
2266
2266
|
]);
|
|
2267
2267
|
};
|
|
2268
2268
|
}
|
|
2269
|
-
}), Js = { class: "" }, Xs = { class: "flex border-b border-gray-200 dark:border-gray-700" }, Ys = ["onClick"],
|
|
2269
|
+
}), Js = { class: "" }, Xs = { class: "flex border-b border-gray-200 dark:border-gray-700" }, Ys = ["onClick"], Zs = { class: "px-4 py-2" }, Qs = { class: "relative my-4" }, eo = { key: 0 }, to = /* @__PURE__ */ V({
|
|
2270
2270
|
__name: "VTabs",
|
|
2271
2271
|
props: {
|
|
2272
2272
|
value: {},
|
|
2273
2273
|
items: {}
|
|
2274
2274
|
},
|
|
2275
2275
|
emits: ["click"],
|
|
2276
|
-
setup(e, { expose:
|
|
2277
|
-
const s =
|
|
2276
|
+
setup(e, { expose: n, emit: l }) {
|
|
2277
|
+
const s = l, t = D(e.value || 0), o = (d) => [t.value === d ? "" : "before:hidden"], i = (d) => {
|
|
2278
2278
|
t.value = d, s("click", d);
|
|
2279
2279
|
};
|
|
2280
|
-
return
|
|
2281
|
-
setActiveTab:
|
|
2280
|
+
return n({
|
|
2281
|
+
setActiveTab: i,
|
|
2282
2282
|
activeTab: t
|
|
2283
|
-
}), (d, u) => (f(),
|
|
2284
|
-
|
|
2285
|
-
(f(!0),
|
|
2283
|
+
}), (d, u) => (f(), v("div", Js, [
|
|
2284
|
+
a("div", Xs, [
|
|
2285
|
+
(f(!0), v(O, null, R(e.items, (r, c) => (f(), v("div", {
|
|
2286
2286
|
key: c,
|
|
2287
2287
|
class: "relative flex-auto"
|
|
2288
2288
|
}, [
|
|
2289
|
-
|
|
2289
|
+
a("button", {
|
|
2290
2290
|
class: "w-full",
|
|
2291
|
-
onClick: (m) =>
|
|
2291
|
+
onClick: (m) => i(c)
|
|
2292
2292
|
}, [
|
|
2293
|
-
|
|
2294
|
-
class: B([
|
|
2293
|
+
a("div", {
|
|
2294
|
+
class: B([o(c), "font-medium text-lg transition cursor-pointer before:h-[2px] before:absolute before:w-full before:bg-blue-700 before:left-0 before:bottom-0"])
|
|
2295
2295
|
}, [
|
|
2296
|
-
|
|
2297
|
-
tab:
|
|
2296
|
+
$(d.$slots, "header", {
|
|
2297
|
+
tab: r,
|
|
2298
2298
|
i: c
|
|
2299
2299
|
}, () => [
|
|
2300
|
-
|
|
2300
|
+
a("div", Zs, k(r.title), 1)
|
|
2301
2301
|
])
|
|
2302
2302
|
], 2)
|
|
2303
2303
|
], 8, Ys)
|
|
2304
2304
|
]))), 128))
|
|
2305
2305
|
]),
|
|
2306
|
-
|
|
2307
|
-
(f(!0),
|
|
2306
|
+
a("div", Qs, [
|
|
2307
|
+
(f(!0), v(O, null, R(e.items, (r, c) => (f(), v("div", {
|
|
2308
2308
|
key: c,
|
|
2309
2309
|
class: "tab-panel"
|
|
2310
2310
|
}, [
|
|
2311
|
-
b(
|
|
2311
|
+
b(ae, {
|
|
2312
2312
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
2313
2313
|
"enter-from-class": "transform opacity-0 translate-x-2",
|
|
2314
2314
|
"enter-to-class": "transform opacity-100 translate-x-0",
|
|
@@ -2317,9 +2317,9 @@ const Fs = F({ name: "ri-folder6-line", render: Ps }), Us = ["onClick"], Rs = {
|
|
|
2317
2317
|
"leave-to-class": "transform opacity-0 -translate-x-2"
|
|
2318
2318
|
}, {
|
|
2319
2319
|
default: y(() => [
|
|
2320
|
-
t.value === c ? (f(),
|
|
2321
|
-
|
|
2322
|
-
])) :
|
|
2320
|
+
t.value === c ? (f(), v("div", eo, [
|
|
2321
|
+
$(d.$slots, `tab-${c}`)
|
|
2322
|
+
])) : E("", !0)
|
|
2323
2323
|
]),
|
|
2324
2324
|
_: 2
|
|
2325
2325
|
}, 1024)
|
|
@@ -2327,7 +2327,7 @@ const Fs = F({ name: "ri-folder6-line", render: Ps }), Us = ["onClick"], Rs = {
|
|
|
2327
2327
|
])
|
|
2328
2328
|
]));
|
|
2329
2329
|
}
|
|
2330
|
-
}),
|
|
2330
|
+
}), no = { class: "flex gap-1 text-amber-500 self-start text-nowrap select-none" }, lo = ["title", "onMouseenter", "onMouseleave"], so = { class: "flex flex-auto" }, oo = ["disabled"], $e = /* @__PURE__ */ V({
|
|
2331
2331
|
__name: "VFunc",
|
|
2332
2332
|
props: {
|
|
2333
2333
|
label: {},
|
|
@@ -2337,25 +2337,25 @@ const Fs = F({ name: "ri-folder6-line", render: Ps }), Us = ["onClick"], Rs = {
|
|
|
2337
2337
|
hideIcon: { type: Boolean, default: !1 }
|
|
2338
2338
|
},
|
|
2339
2339
|
emits: ["change", "icon", "hover"],
|
|
2340
|
-
setup(e, { emit:
|
|
2341
|
-
const
|
|
2340
|
+
setup(e, { emit: n }) {
|
|
2341
|
+
const l = n, s = ["v", "a", "b", "c"], t = D(e.value || ""), o = (u) => {
|
|
2342
2342
|
try {
|
|
2343
2343
|
return new Function(u), !0;
|
|
2344
|
-
} catch (
|
|
2345
|
-
return console.warn(
|
|
2344
|
+
} catch (r) {
|
|
2345
|
+
return console.warn(r), !1;
|
|
2346
2346
|
}
|
|
2347
|
-
},
|
|
2348
|
-
const
|
|
2349
|
-
|
|
2350
|
-
}, 500), d = (u) =>
|
|
2347
|
+
}, i = ze((u) => {
|
|
2348
|
+
const r = u.target;
|
|
2349
|
+
o(r.value) && l("change", r.value);
|
|
2350
|
+
}, 500), d = (u) => l("icon", u);
|
|
2351
2351
|
return ue(
|
|
2352
2352
|
() => e.value,
|
|
2353
2353
|
() => {
|
|
2354
2354
|
e.value && (t.value = e.value);
|
|
2355
2355
|
}
|
|
2356
|
-
), (u,
|
|
2357
|
-
const c =
|
|
2358
|
-
return f(), M(
|
|
2356
|
+
), (u, r) => {
|
|
2357
|
+
const c = ne, m = ye;
|
|
2358
|
+
return f(), M(Qe, {
|
|
2359
2359
|
active: !!e.value,
|
|
2360
2360
|
disabled: e.disabled,
|
|
2361
2361
|
label: e.label,
|
|
@@ -2372,33 +2372,33 @@ const Fs = F({ name: "ri-folder6-line", render: Ps }), Us = ["onClick"], Rs = {
|
|
|
2372
2372
|
}))
|
|
2373
2373
|
]),
|
|
2374
2374
|
default: y(() => [
|
|
2375
|
-
e.value ? (f(),
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
(f(!0),
|
|
2379
|
-
|
|
2375
|
+
e.value ? (f(), v(O, { key: 0 }, [
|
|
2376
|
+
a("div", no, [
|
|
2377
|
+
r[3] || (r[3] = I(" ( ", -1)),
|
|
2378
|
+
(f(!0), v(O, null, R(e.args, (p, g) => (f(), v(O, { key: p }, [
|
|
2379
|
+
a("span", {
|
|
2380
2380
|
class: "text-blue-400/80",
|
|
2381
|
-
title:
|
|
2382
|
-
onMouseenter: (h) =>
|
|
2383
|
-
onMouseleave: (h) =>
|
|
2384
|
-
}, k(s[g]), 41,
|
|
2385
|
-
|
|
2381
|
+
title: p,
|
|
2382
|
+
onMouseenter: (h) => l("hover", "enter", g),
|
|
2383
|
+
onMouseleave: (h) => l("hover", "leave", g)
|
|
2384
|
+
}, k(s[g]), 41, lo),
|
|
2385
|
+
r[2] || (r[2] = a("span", { class: "last:hidden" }, ",", -1))
|
|
2386
2386
|
], 64))), 128)),
|
|
2387
|
-
|
|
2387
|
+
r[4] || (r[4] = I(" ) => ", -1))
|
|
2388
2388
|
]),
|
|
2389
|
-
|
|
2390
|
-
Ce(
|
|
2391
|
-
"onUpdate:modelValue":
|
|
2389
|
+
a("div", so, [
|
|
2390
|
+
Ce(a("textarea", {
|
|
2391
|
+
"onUpdate:modelValue": r[0] || (r[0] = (p) => t.value = p),
|
|
2392
2392
|
class: "outline-0 w-full resize-none field-sizing-content",
|
|
2393
2393
|
type: "text",
|
|
2394
2394
|
disabled: e.disabled,
|
|
2395
|
-
onInput:
|
|
2396
|
-
(...
|
|
2395
|
+
onInput: r[1] || (r[1] = //@ts-ignore
|
|
2396
|
+
(...p) => T(i) && T(i)(...p))
|
|
2397
2397
|
}, null, 40, oo), [
|
|
2398
2398
|
[gt, t.value]
|
|
2399
2399
|
])
|
|
2400
2400
|
])
|
|
2401
|
-
], 64)) :
|
|
2401
|
+
], 64)) : E("", !0)
|
|
2402
2402
|
]),
|
|
2403
2403
|
_: 1
|
|
2404
2404
|
}, 8, ["active", "disabled", "label", "hideIcon"]);
|
|
@@ -2411,39 +2411,39 @@ const Fs = F({ name: "ri-folder6-line", render: Ps }), Us = ["onClick"], Rs = {
|
|
|
2411
2411
|
disabled: { type: Boolean, default: !1 }
|
|
2412
2412
|
},
|
|
2413
2413
|
emits: ["update:modelValue", "click"],
|
|
2414
|
-
setup(e, { emit:
|
|
2415
|
-
const
|
|
2416
|
-
const
|
|
2417
|
-
|
|
2418
|
-
}, t = (
|
|
2419
|
-
return (
|
|
2414
|
+
setup(e, { emit: n }) {
|
|
2415
|
+
const l = n, s = (o) => {
|
|
2416
|
+
const i = o.target;
|
|
2417
|
+
l("update:modelValue", i.checked);
|
|
2418
|
+
}, t = (o) => l("click", o);
|
|
2419
|
+
return (o, i) => (f(), v("label", {
|
|
2420
2420
|
class: B(["inline-flex items-center relative", { "cursor-pointer": !e.disabled }]),
|
|
2421
2421
|
onClick: t
|
|
2422
2422
|
}, [
|
|
2423
|
-
|
|
2423
|
+
a("input", {
|
|
2424
2424
|
type: "checkbox",
|
|
2425
2425
|
checked: !!e.modelValue,
|
|
2426
2426
|
disabled: e.disabled,
|
|
2427
2427
|
class: "peer size-5 transition-all appearance-none rounded border border-gray-300 dark:border-gray-700 disabled:opacity-40 not-disabled:cursor-pointer",
|
|
2428
2428
|
onChange: s
|
|
2429
2429
|
}, null, 40, ao),
|
|
2430
|
-
|
|
2431
|
-
|
|
2430
|
+
i[0] || (i[0] = a("button", { class: "absolute opacity-0 peer-checked:opacity-100 peer-disabled:opacity-40 top-1/2 left-[10px] transform -translate-x-1/2 -translate-y-1/2 pointer-events-none" }, [
|
|
2431
|
+
a("svg", {
|
|
2432
2432
|
class: "h-3.5 w-3.5",
|
|
2433
2433
|
viewBox: "0 0 20 20",
|
|
2434
2434
|
fill: "currentColor",
|
|
2435
2435
|
stroke: "currentColor",
|
|
2436
2436
|
"stroke-width": "1"
|
|
2437
2437
|
}, [
|
|
2438
|
-
|
|
2438
|
+
a("path", {
|
|
2439
2439
|
"fill-rule": "evenodd",
|
|
2440
2440
|
d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
|
|
2441
2441
|
"clip-rule": "evenodd"
|
|
2442
2442
|
})
|
|
2443
2443
|
])
|
|
2444
2444
|
], -1)),
|
|
2445
|
-
|
|
2446
|
-
|
|
2445
|
+
a("span", io, [
|
|
2446
|
+
$(o.$slots, "default")
|
|
2447
2447
|
])
|
|
2448
2448
|
], 2));
|
|
2449
2449
|
}
|
|
@@ -2465,25 +2465,25 @@ const Fs = F({ name: "ri-folder6-line", render: Ps }), Us = ["onClick"], Rs = {
|
|
|
2465
2465
|
type: {}
|
|
2466
2466
|
},
|
|
2467
2467
|
emits: ["update"],
|
|
2468
|
-
setup(e, { emit:
|
|
2469
|
-
const
|
|
2468
|
+
setup(e, { emit: n }) {
|
|
2469
|
+
const l = n, s = L(() => e.items.map((h, x) => ({ ...h, id: ++x }))), t = D({ name: "", value: "" }), o = L(() => e.items.length + 1), i = L(() => {
|
|
2470
2470
|
var h;
|
|
2471
2471
|
return !((h = t.value) != null && h.id);
|
|
2472
|
-
}), d = (h) => e.type === h, u = (h, x) =>
|
|
2473
|
-
const h =
|
|
2474
|
-
t.value = { name: `New_${h}`, value: `${h}`, id: h }, u("items",
|
|
2475
|
-
},
|
|
2476
|
-
t.value.name === h.name && (t.value = { name: "", value: "" }), u("items",
|
|
2472
|
+
}), d = (h) => e.type === h, u = (h, x) => l("update", h, x), r = (h) => h.map(({ name: x, value: _ }) => ({ name: x, value: _ })), c = ({ id: h, name: x, value: _ }) => t.value = { id: h, name: x, value: _ }, m = () => {
|
|
2473
|
+
const h = o.value;
|
|
2474
|
+
t.value = { name: `New_${h}`, value: `${h}`, id: h }, u("items", r([...s.value, t.value]));
|
|
2475
|
+
}, p = (h) => {
|
|
2476
|
+
t.value.name === h.name && (t.value = { name: "", value: "" }), u("items", r(s.value.filter((x) => x.value !== h.value)));
|
|
2477
2477
|
}, g = ze(() => {
|
|
2478
2478
|
const h = t.value;
|
|
2479
2479
|
if (!h.name || !h.value) return;
|
|
2480
|
-
const x = s.value.map((
|
|
2481
|
-
u("items",
|
|
2480
|
+
const x = s.value.map((_) => _.id === h.id ? h : _);
|
|
2481
|
+
u("items", r(x));
|
|
2482
2482
|
}, 300);
|
|
2483
2483
|
return (h, x) => {
|
|
2484
|
-
const
|
|
2485
|
-
return f(),
|
|
2486
|
-
|
|
2484
|
+
const _ = ne, C = ye;
|
|
2485
|
+
return f(), v("div", co, [
|
|
2486
|
+
a("div", uo, [
|
|
2487
2487
|
b(ro, {
|
|
2488
2488
|
modelValue: e.disabled,
|
|
2489
2489
|
"onUpdate:modelValue": x[0] || (x[0] = (z) => u("disabled", z ? 1 : 0))
|
|
@@ -2494,7 +2494,7 @@ const Fs = F({ name: "ri-folder6-line", render: Ps }), Us = ["onClick"], Rs = {
|
|
|
2494
2494
|
_: 1
|
|
2495
2495
|
}, 8, ["modelValue"])
|
|
2496
2496
|
]),
|
|
2497
|
-
d("dimmer") ? (f(),
|
|
2497
|
+
d("dimmer") ? (f(), v("div", fo, [
|
|
2498
2498
|
b(J, {
|
|
2499
2499
|
modelValue: e.min,
|
|
2500
2500
|
label: "Min",
|
|
@@ -2510,29 +2510,29 @@ const Fs = F({ name: "ri-folder6-line", render: Ps }), Us = ["onClick"], Rs = {
|
|
|
2510
2510
|
label: "Step",
|
|
2511
2511
|
"onUpdate:modelValue": x[3] || (x[3] = (z) => u("step", +z))
|
|
2512
2512
|
}, null, 8, ["modelValue"])
|
|
2513
|
-
])) :
|
|
2514
|
-
d("list") ? (f(),
|
|
2515
|
-
|
|
2513
|
+
])) : E("", !0),
|
|
2514
|
+
d("list") ? (f(), v("div", mo, [
|
|
2515
|
+
a("div", vo, [
|
|
2516
2516
|
b(J, {
|
|
2517
2517
|
modelValue: t.value.name,
|
|
2518
2518
|
"onUpdate:modelValue": [
|
|
2519
2519
|
x[4] || (x[4] = (z) => t.value.name = z),
|
|
2520
|
-
|
|
2520
|
+
T(g)
|
|
2521
2521
|
],
|
|
2522
|
-
disabled:
|
|
2522
|
+
disabled: i.value,
|
|
2523
2523
|
label: "Name"
|
|
2524
2524
|
}, null, 8, ["modelValue", "disabled", "onUpdate:modelValue"]),
|
|
2525
2525
|
b(J, {
|
|
2526
2526
|
modelValue: t.value.value,
|
|
2527
2527
|
"onUpdate:modelValue": [
|
|
2528
2528
|
x[5] || (x[5] = (z) => t.value.value = z),
|
|
2529
|
-
|
|
2529
|
+
T(g)
|
|
2530
2530
|
],
|
|
2531
|
-
disabled:
|
|
2531
|
+
disabled: i.value,
|
|
2532
2532
|
label: "Value"
|
|
2533
2533
|
}, null, 8, ["modelValue", "disabled", "onUpdate:modelValue"])
|
|
2534
2534
|
]),
|
|
2535
|
-
|
|
2535
|
+
a("div", po, [
|
|
2536
2536
|
b(te, {
|
|
2537
2537
|
"model-value": t.value.value,
|
|
2538
2538
|
label: "List",
|
|
@@ -2542,13 +2542,13 @@ const Fs = F({ name: "ri-folder6-line", render: Ps }), Us = ["onClick"], Rs = {
|
|
|
2542
2542
|
onChange: c
|
|
2543
2543
|
}, {
|
|
2544
2544
|
item: y(({ item: z }) => [
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2545
|
+
a("div", ho, [
|
|
2546
|
+
a("span", null, k(z.name), 1),
|
|
2547
|
+
a("button", {
|
|
2548
2548
|
class: "cursor-pointer size-4",
|
|
2549
|
-
onClick:
|
|
2549
|
+
onClick: H((j) => p(z), ["prevent", "stop"])
|
|
2550
2550
|
}, [
|
|
2551
|
-
b(
|
|
2551
|
+
b(_)
|
|
2552
2552
|
], 8, go)
|
|
2553
2553
|
])
|
|
2554
2554
|
]),
|
|
@@ -2565,11 +2565,11 @@ const Fs = F({ name: "ri-folder6-line", render: Ps }), Us = ["onClick"], Rs = {
|
|
|
2565
2565
|
_: 1
|
|
2566
2566
|
})
|
|
2567
2567
|
])
|
|
2568
|
-
])) :
|
|
2568
|
+
])) : E("", !0)
|
|
2569
2569
|
]);
|
|
2570
2570
|
};
|
|
2571
2571
|
}
|
|
2572
|
-
}), yo = { class: "flex flex-col" }, xo = { class: "flex flex-col md:flex-row gap-6 min-h-[300px]" },
|
|
2572
|
+
}), yo = { class: "flex flex-col" }, xo = { class: "flex flex-col md:flex-row gap-6 min-h-[300px]" }, $o = { class: "flex-auto order-1" }, ko = { class: "flex-auto gap-x-2 order-1" }, _o = { class: "grid grid-cols-1 md:grid-cols-2 gap-6" }, wo = { class: "flex gap-2 items-center" }, Co = { class: "flex flex-col gap-4" }, zo = { class: "flex gap-2 flex-wrap flex-auto px-2 py-1" }, So = { class: "relative group" }, Vo = { class: "select-none" }, Bo = ["onClick"], Eo = { class: "flex justify-center order-0 md:order-1 md:mt-11" }, To = { class: "flex-[0_0_130px] size-[130px]" }, Lo = { class: "flex gap-4 justify-end" }, Mo = { class: "relative min-h-[200px] max-h-100dvh overflow-auto scrollbar" }, Ka = /* @__PURE__ */ V({
|
|
2573
2573
|
__name: "ItemEdit",
|
|
2574
2574
|
props: {
|
|
2575
2575
|
items: {},
|
|
@@ -2579,8 +2579,8 @@ const Fs = F({ name: "ri-folder6-line", render: Ps }), Us = ["onClick"], Rs = {
|
|
|
2579
2579
|
listIcons: {}
|
|
2580
2580
|
},
|
|
2581
2581
|
emits: ["button"],
|
|
2582
|
-
setup(e, { emit:
|
|
2583
|
-
const
|
|
2582
|
+
setup(e, { emit: n }) {
|
|
2583
|
+
const l = n, s = [{ title: "Main" }, { title: "Data" }, { title: "Options" }], t = D({
|
|
2584
2584
|
id: "",
|
|
2585
2585
|
name: "",
|
|
2586
2586
|
type: "button",
|
|
@@ -2590,32 +2590,32 @@ const Fs = F({ name: "ri-folder6-line", render: Ps }), Us = ["onClick"], Rs = {
|
|
|
2590
2590
|
set: "",
|
|
2591
2591
|
get: "",
|
|
2592
2592
|
getTo: ""
|
|
2593
|
-
}),
|
|
2593
|
+
}), o = D(!1), i = L(() => {
|
|
2594
2594
|
var w;
|
|
2595
2595
|
return !((w = e.item) != null && w.id);
|
|
2596
2596
|
}), d = L(() => !!e.items.filter((w) => {
|
|
2597
2597
|
var S;
|
|
2598
2598
|
return w.id !== ((S = e.item) == null ? void 0 : S.id);
|
|
2599
|
-
}).find((w) => w.id === (t == null ? void 0 : t.value.id))), u = L(() => t.value.type === "info"),
|
|
2599
|
+
}).find((w) => w.id === (t == null ? void 0 : t.value.id))), u = L(() => t.value.type === "info"), r = L(() => {
|
|
2600
2600
|
var w;
|
|
2601
2601
|
return (w = t.value.args) == null ? void 0 : w.length;
|
|
2602
2602
|
}), c = L(() => t.value.args.length > 3), m = L(() => {
|
|
2603
2603
|
if (d.value) return !0;
|
|
2604
2604
|
const { id: w, args: S } = t.value;
|
|
2605
2605
|
return !w || !S.length;
|
|
2606
|
-
}),
|
|
2606
|
+
}), p = ({ value: w }) => t.value.icon = w, g = ({ value: w }) => {
|
|
2607
2607
|
const S = w;
|
|
2608
2608
|
t.value.type = S, delete t.value.opts, ["button", "list", "dimmer"].includes(S) && (w === "button" && (t.value.opts = {}), w === "list" && (t.value.opts = { items: [] }), w === "dimmer" && (t.value.opts = { min: 0, max: 255, step: 1 }));
|
|
2609
2609
|
}, h = (w) => {
|
|
2610
2610
|
w === "get" && (t.value.get ? delete t.value.get : t.value.get = "v"), w === "set" && (t.value.set ? delete t.value.set : t.value.set = "v"), w === "getTo" && (t.value.getTo ? delete t.value.getTo : t.value.getTo = "v");
|
|
2611
|
-
}, x = (w) =>
|
|
2612
|
-
!t.value.args.length && !t.value.id && (t.value.id = w), t.value.args.push(w),
|
|
2611
|
+
}, x = (w) => l("button", w, t.value), _ = (w) => t.value.args = t.value.args.filter((S) => S !== w), C = ({ path: w }) => {
|
|
2612
|
+
!t.value.args.length && !t.value.id && (t.value.id = w), t.value.args.push(w), o.value = !1;
|
|
2613
2613
|
}, z = D(-1), j = (w) => z.value === w, X = (w, S) => {
|
|
2614
2614
|
w === "enter" && (z.value = S), w === "leave" && (z.value = -1);
|
|
2615
2615
|
}, xe = (w, S) => {
|
|
2616
2616
|
w === "set" && (t.value.set = S), w === "get" && (t.value.get = S), w === "getTo" && (t.value.getTo = S), S || delete t.value[w];
|
|
2617
2617
|
}, at = () => {
|
|
2618
|
-
|
|
2618
|
+
o.value = !0;
|
|
2619
2619
|
}, it = (w, S) => {
|
|
2620
2620
|
t.value.opts || (t.value.opts = {}), t.value.opts[w] = S, w === "disabled" && !S && delete t.value.opts[w];
|
|
2621
2621
|
};
|
|
@@ -2623,24 +2623,24 @@ const Fs = F({ name: "ri-folder6-line", render: Ps }), Us = ["onClick"], Rs = {
|
|
|
2623
2623
|
var w;
|
|
2624
2624
|
(w = e.item) != null && w.id && (t.value = zt(e.item));
|
|
2625
2625
|
}), (w, S) => {
|
|
2626
|
-
const rt =
|
|
2627
|
-
return f(),
|
|
2628
|
-
|
|
2629
|
-
|
|
2626
|
+
const rt = Ts, ct = ne;
|
|
2627
|
+
return f(), v("div", yo, [
|
|
2628
|
+
a("div", xo, [
|
|
2629
|
+
a("div", $o, [
|
|
2630
2630
|
b(to, {
|
|
2631
2631
|
class: "flex-auto min-h-75",
|
|
2632
2632
|
value: 0,
|
|
2633
2633
|
items: s
|
|
2634
2634
|
}, {
|
|
2635
2635
|
"tab-0": y(() => [
|
|
2636
|
-
|
|
2636
|
+
a("div", ko, [
|
|
2637
2637
|
b(J, {
|
|
2638
2638
|
modelValue: t.value.id,
|
|
2639
|
-
"onUpdate:modelValue": S[0] || (S[0] = (
|
|
2639
|
+
"onUpdate:modelValue": S[0] || (S[0] = (P) => t.value.id = P),
|
|
2640
2640
|
label: "ID",
|
|
2641
2641
|
message: d.value ? w.$t("used") : ""
|
|
2642
2642
|
}, bt({ _: 2 }, [
|
|
2643
|
-
|
|
2643
|
+
r.value ? void 0 : {
|
|
2644
2644
|
name: "icon",
|
|
2645
2645
|
fn: y(() => [
|
|
2646
2646
|
b(A, {
|
|
@@ -2658,10 +2658,10 @@ const Fs = F({ name: "ri-folder6-line", render: Ps }), Us = ["onClick"], Rs = {
|
|
|
2658
2658
|
]), 1032, ["modelValue", "message"]),
|
|
2659
2659
|
b(J, {
|
|
2660
2660
|
modelValue: t.value.name,
|
|
2661
|
-
"onUpdate:modelValue": S[1] || (S[1] = (
|
|
2661
|
+
"onUpdate:modelValue": S[1] || (S[1] = (P) => t.value.name = P),
|
|
2662
2662
|
label: "Name"
|
|
2663
2663
|
}, null, 8, ["modelValue"]),
|
|
2664
|
-
|
|
2664
|
+
a("div", _o, [
|
|
2665
2665
|
b(te, {
|
|
2666
2666
|
"model-value": t.value.icon,
|
|
2667
2667
|
bottom: "0",
|
|
@@ -2669,14 +2669,14 @@ const Fs = F({ name: "ri-folder6-line", render: Ps }), Us = ["onClick"], Rs = {
|
|
|
2669
2669
|
label: "Icon",
|
|
2670
2670
|
class: "mb-6",
|
|
2671
2671
|
items: e.listIcons,
|
|
2672
|
-
onChange:
|
|
2672
|
+
onChange: p
|
|
2673
2673
|
}, {
|
|
2674
|
-
item: y(({ item:
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
icon:
|
|
2674
|
+
item: y(({ item: P }) => [
|
|
2675
|
+
a("div", wo, [
|
|
2676
|
+
$(w.$slots, "icon", {
|
|
2677
|
+
icon: P.value
|
|
2678
2678
|
}),
|
|
2679
|
-
|
|
2679
|
+
a("div", null, k(P.name), 1)
|
|
2680
2680
|
])
|
|
2681
2681
|
]),
|
|
2682
2682
|
_: 3
|
|
@@ -2693,70 +2693,70 @@ const Fs = F({ name: "ri-folder6-line", render: Ps }), Us = ["onClick"], Rs = {
|
|
|
2693
2693
|
])
|
|
2694
2694
|
]),
|
|
2695
2695
|
"tab-1": y(() => [
|
|
2696
|
-
|
|
2697
|
-
b(
|
|
2696
|
+
a("div", Co, [
|
|
2697
|
+
b(Qe, {
|
|
2698
2698
|
active: !!t.value.args.length,
|
|
2699
2699
|
disabled: c.value,
|
|
2700
2700
|
label: "Arguments",
|
|
2701
|
-
onIcon: S[2] || (S[2] = (
|
|
2701
|
+
onIcon: S[2] || (S[2] = (P) => o.value = !0)
|
|
2702
2702
|
}, {
|
|
2703
2703
|
default: y(() => [
|
|
2704
|
-
|
|
2705
|
-
(f(!0),
|
|
2706
|
-
key:
|
|
2704
|
+
a("div", zo, [
|
|
2705
|
+
(f(!0), v(O, null, R(t.value.args, (P, Le) => (f(), v("div", {
|
|
2706
|
+
key: P,
|
|
2707
2707
|
class: "flex items-center rounded-full bg-gray-200 dark:bg-gray-900/50 px-2 py-[2px] text-xs"
|
|
2708
2708
|
}, [
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2709
|
+
a("div", So, [
|
|
2710
|
+
a("span", Vo, k(P), 1),
|
|
2711
|
+
a("div", {
|
|
2712
2712
|
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", j(Le) ? "visible opacity-100" : ""])
|
|
2713
2713
|
}, [
|
|
2714
|
-
|
|
2714
|
+
a("pre", null, k(T(dt)(P, e.object)), 1)
|
|
2715
2715
|
], 2)
|
|
2716
2716
|
]),
|
|
2717
|
-
Le || t.value.args.length < 2 ? (f(),
|
|
2717
|
+
Le || t.value.args.length < 2 ? (f(), v("button", {
|
|
2718
2718
|
key: 0,
|
|
2719
2719
|
class: "cursor-pointer ms-1",
|
|
2720
|
-
onClick: (
|
|
2720
|
+
onClick: (ka) => _(P)
|
|
2721
2721
|
}, [
|
|
2722
2722
|
b(ct, { class: "size-5" })
|
|
2723
|
-
], 8, Bo)) :
|
|
2723
|
+
], 8, Bo)) : E("", !0)
|
|
2724
2724
|
]))), 128))
|
|
2725
2725
|
])
|
|
2726
2726
|
]),
|
|
2727
2727
|
_: 1
|
|
2728
2728
|
}, 8, ["active", "disabled"]),
|
|
2729
|
-
b(
|
|
2729
|
+
b($e, {
|
|
2730
2730
|
value: t.value.set,
|
|
2731
2731
|
args: t.value.args,
|
|
2732
|
-
disabled: !
|
|
2732
|
+
disabled: !r.value || u.value,
|
|
2733
2733
|
label: "Set",
|
|
2734
|
-
onIcon: S[3] || (S[3] = (
|
|
2734
|
+
onIcon: S[3] || (S[3] = (P) => h("set")),
|
|
2735
2735
|
onHover: X,
|
|
2736
|
-
onChange: S[4] || (S[4] = (
|
|
2736
|
+
onChange: S[4] || (S[4] = (P) => xe("set", P))
|
|
2737
2737
|
}, null, 8, ["value", "args", "disabled"]),
|
|
2738
|
-
b(
|
|
2738
|
+
b($e, {
|
|
2739
2739
|
value: t.value.get,
|
|
2740
2740
|
args: t.value.args,
|
|
2741
|
-
disabled: !
|
|
2741
|
+
disabled: !r.value,
|
|
2742
2742
|
label: "Get",
|
|
2743
|
-
onIcon: S[5] || (S[5] = (
|
|
2743
|
+
onIcon: S[5] || (S[5] = (P) => h("get")),
|
|
2744
2744
|
onHover: X,
|
|
2745
|
-
onChange: S[6] || (S[6] = (
|
|
2745
|
+
onChange: S[6] || (S[6] = (P) => xe("get", P))
|
|
2746
2746
|
}, null, 8, ["value", "args", "disabled"]),
|
|
2747
|
-
b(
|
|
2747
|
+
b($e, {
|
|
2748
2748
|
value: t.value.getTo,
|
|
2749
2749
|
args: t.value.args,
|
|
2750
|
-
disabled: !
|
|
2750
|
+
disabled: !r.value,
|
|
2751
2751
|
label: "GetTo",
|
|
2752
|
-
onIcon: S[7] || (S[7] = (
|
|
2752
|
+
onIcon: S[7] || (S[7] = (P) => h("getTo")),
|
|
2753
2753
|
onHover: X,
|
|
2754
|
-
onChange: S[8] || (S[8] = (
|
|
2754
|
+
onChange: S[8] || (S[8] = (P) => xe("getTo", P))
|
|
2755
2755
|
}, null, 8, ["value", "args", "disabled"])
|
|
2756
2756
|
])
|
|
2757
2757
|
]),
|
|
2758
2758
|
"tab-2": y(() => [
|
|
2759
|
-
b(bo,
|
|
2759
|
+
b(bo, N(t.value.opts, {
|
|
2760
2760
|
value: t.value.value,
|
|
2761
2761
|
type: t.value.type,
|
|
2762
2762
|
onUpdate: it
|
|
@@ -2765,21 +2765,21 @@ const Fs = F({ name: "ri-folder6-line", render: Ps }), Us = ["onClick"], Rs = {
|
|
|
2765
2765
|
_: 3
|
|
2766
2766
|
})
|
|
2767
2767
|
]),
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2768
|
+
a("div", Eo, [
|
|
2769
|
+
a("div", To, [
|
|
2770
|
+
$(w.$slots, "default", { item: t.value })
|
|
2771
2771
|
])
|
|
2772
2772
|
])
|
|
2773
2773
|
]),
|
|
2774
|
-
|
|
2774
|
+
a("div", Lo, [
|
|
2775
2775
|
b(A, {
|
|
2776
2776
|
class: "px-4",
|
|
2777
2777
|
color: "blue",
|
|
2778
2778
|
disabled: m.value,
|
|
2779
|
-
onClick: S[9] || (S[9] = (
|
|
2779
|
+
onClick: S[9] || (S[9] = (P) => x(i.value ? "add" : "save"))
|
|
2780
2780
|
}, {
|
|
2781
2781
|
default: y(() => [
|
|
2782
|
-
I(k(
|
|
2782
|
+
I(k(i.value ? w.$t("add") : w.$t("save")), 1)
|
|
2783
2783
|
]),
|
|
2784
2784
|
_: 1
|
|
2785
2785
|
}, 8, ["disabled"]),
|
|
@@ -2787,7 +2787,7 @@ const Fs = F({ name: "ri-folder6-line", render: Ps }), Us = ["onClick"], Rs = {
|
|
|
2787
2787
|
class: "px-4",
|
|
2788
2788
|
color: "red",
|
|
2789
2789
|
outline: "",
|
|
2790
|
-
onClick: S[10] || (S[10] = (
|
|
2790
|
+
onClick: S[10] || (S[10] = (P) => x("remove"))
|
|
2791
2791
|
}, {
|
|
2792
2792
|
default: y(() => [
|
|
2793
2793
|
I(k(w.$t("remove")), 1)
|
|
@@ -2795,246 +2795,218 @@ const Fs = F({ name: "ri-folder6-line", render: Ps }), Us = ["onClick"], Rs = {
|
|
|
2795
2795
|
_: 1
|
|
2796
2796
|
})
|
|
2797
2797
|
]),
|
|
2798
|
-
|
|
2798
|
+
o.value ? (f(), M(Be, {
|
|
2799
2799
|
key: 0,
|
|
2800
2800
|
size: "md",
|
|
2801
2801
|
title: w.$t("select"),
|
|
2802
|
-
onClose: S[11] || (S[11] = (
|
|
2802
|
+
onClose: S[11] || (S[11] = (P) => o.value = !1)
|
|
2803
2803
|
}, {
|
|
2804
2804
|
default: y(() => [
|
|
2805
|
-
|
|
2805
|
+
a("div", Mo, [
|
|
2806
2806
|
b(et, {
|
|
2807
2807
|
items: e.object,
|
|
2808
|
-
onlyValue: !
|
|
2808
|
+
onlyValue: !r.value,
|
|
2809
2809
|
onClick: C
|
|
2810
2810
|
}, null, 8, ["items", "onlyValue"])
|
|
2811
2811
|
])
|
|
2812
2812
|
]),
|
|
2813
2813
|
_: 1
|
|
2814
|
-
}, 8, ["title"])) :
|
|
2814
|
+
}, 8, ["title"])) : E("", !0)
|
|
2815
2815
|
]);
|
|
2816
2816
|
};
|
|
2817
2817
|
}
|
|
2818
|
-
}), Ae = { position: "relative", boxSizing: "border-box", overflow: "hidden", fontSize: "16px", fontFamily: 'Menlo, Consolas, "Liberation Mono", Monaco, "Lucida Console", monospace' }, Ao = { 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" }, Do = { 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" }, Io = { 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" }, tt = (e) =>
|
|
2818
|
+
}), Ae = { position: "relative", boxSizing: "border-box", overflow: "hidden", fontSize: "16px", fontFamily: 'Menlo, Consolas, "Liberation Mono", Monaco, "Lucida Console", monospace' }, Ao = { 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" }, Do = { 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" }, Io = { 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" }, tt = (e) => nt(e);
|
|
2819
2819
|
function De(e) {
|
|
2820
|
-
const
|
|
2821
|
-
return
|
|
2820
|
+
const n = Array.isArray(e) ? e : [e];
|
|
2821
|
+
return n.length === 0 ? tt : (l) => n.reduce((s, t, o) => t(s, { html: o > 0 }), l);
|
|
2822
2822
|
}
|
|
2823
2823
|
class Oo {
|
|
2824
|
-
constructor(
|
|
2825
|
-
if (this.lines = null, !
|
|
2826
|
-
if (this.root =
|
|
2827
|
-
const s = { value: "", styles: {}, plugins: [], highlighter: tt }, { highlighters: t, ...
|
|
2828
|
-
this.options = { ...s, ...
|
|
2824
|
+
constructor(n, l = {}) {
|
|
2825
|
+
if (this.lines = null, !n) throw new Error("selector is not defined");
|
|
2826
|
+
if (this.root = n instanceof Node ? n : document.querySelector(n), !this.root) throw new Error(`element with "${n}" selector is not exist`);
|
|
2827
|
+
const s = { value: "", styles: {}, plugins: [], highlighter: tt }, { highlighters: t, ...o } = l;
|
|
2828
|
+
this.options = { ...s, ...o, highlighter: t ? De(t) : s.highlighter }, this.options.value = this.options.value == null ? "" : String(this.options.value), this.init();
|
|
2829
2829
|
}
|
|
2830
2830
|
init() {
|
|
2831
2831
|
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");
|
|
2832
|
-
const
|
|
2832
|
+
const n = Object.keys(Ae).concat(Object.keys(this.options.styles)).concat(["paddingLeft"]);
|
|
2833
2833
|
this.initialRootStyles = {};
|
|
2834
|
-
const
|
|
2835
|
-
|
|
2836
|
-
this.initialRootStyles[s] =
|
|
2834
|
+
const l = this.root.style;
|
|
2835
|
+
n.forEach((s) => {
|
|
2836
|
+
this.initialRootStyles[s] = l[s] || "";
|
|
2837
2837
|
}), Object.assign(this.root.style, Ae, this.options.styles), Object.assign(this.textarea.style, Ao), Object.assign(this.pre.style, Do), 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();
|
|
2838
2838
|
}
|
|
2839
2839
|
addTextareaEvents() {
|
|
2840
|
-
this.handleEvent = (
|
|
2841
|
-
if (
|
|
2842
|
-
const
|
|
2843
|
-
if (
|
|
2844
|
-
const s = function(t,
|
|
2845
|
-
const { value:
|
|
2846
|
-
return t.reduce((
|
|
2847
|
-
}(this.options.plugins,
|
|
2840
|
+
this.handleEvent = (n) => {
|
|
2841
|
+
if (n.type === "keydown" && this.textarea.readOnly) return;
|
|
2842
|
+
const l = n;
|
|
2843
|
+
if (l.isComposing || l.keyCode === 229) return;
|
|
2844
|
+
const s = function(t, o) {
|
|
2845
|
+
const { value: i, selectionStart: d, selectionEnd: u } = o.target;
|
|
2846
|
+
return t.reduce((r, c) => ({ ...r, ...c(r, o) }), { value: i, selectionStart: d, selectionEnd: u });
|
|
2847
|
+
}(this.options.plugins, n);
|
|
2848
2848
|
this.update(s);
|
|
2849
2849
|
}, this.textarea.addEventListener("input", this.handleEvent), this.textarea.addEventListener("keydown", this.handleEvent), this.textarea.addEventListener("compositionend", this.handleEvent);
|
|
2850
2850
|
}
|
|
2851
|
-
update(
|
|
2851
|
+
update(n) {
|
|
2852
2852
|
if (!this.textarea) return;
|
|
2853
|
-
let { value:
|
|
2854
|
-
|
|
2853
|
+
let { value: l, selectionStart: s, selectionEnd: t } = n;
|
|
2854
|
+
l != null && (l = String(l), s == null && (s = this.textarea.selectionStart), t == null && (t = this.textarea.selectionEnd), this.textarea.value !== l && (this.textarea.value = l)), s != null && (this.textarea.selectionStart = s), t != null && (this.textarea.selectionEnd = t), l !== this.value && l != null && (this.value = l, this.render(), this.updateCallback && this.updateCallback(l));
|
|
2855
2855
|
}
|
|
2856
|
-
updateOptions(
|
|
2856
|
+
updateOptions(n) {
|
|
2857
2857
|
if (!this.textarea) return;
|
|
2858
|
-
const { highlighters:
|
|
2859
|
-
if (this.options = { ...this.options, ...s, highlighter:
|
|
2858
|
+
const { highlighters: l, ...s } = n;
|
|
2859
|
+
if (this.options = { ...this.options, ...s, highlighter: l ? De(l) : this.options.highlighter }, n.styles) {
|
|
2860
2860
|
const t = this.root.style;
|
|
2861
|
-
Object.keys(
|
|
2862
|
-
|
|
2863
|
-
}), Object.assign(this.root.style,
|
|
2861
|
+
Object.keys(n.styles).forEach((o) => {
|
|
2862
|
+
o in this.initialRootStyles || (this.initialRootStyles[o] = t[o] || "");
|
|
2863
|
+
}), Object.assign(this.root.style, n.styles), ("paddingLeft" in n.styles || "padding" in n.styles) && (this.basePaddingLeft = this.root.style.paddingLeft || "");
|
|
2864
2864
|
}
|
|
2865
|
-
this.lines && !this.options.lineNumbers && (ve(this.lines), this.lines = null, this.root.style.paddingLeft = this.basePaddingLeft),
|
|
2865
|
+
this.lines && !this.options.lineNumbers && (ve(this.lines), this.lines = null, this.root.style.paddingLeft = this.basePaddingLeft), n.value != null && this.update({ value: n.value }), this.render();
|
|
2866
2866
|
}
|
|
2867
2867
|
render() {
|
|
2868
|
-
const
|
|
2869
|
-
this.pre.innerHTML =
|
|
2868
|
+
const n = this.options.highlighter(this.value);
|
|
2869
|
+
this.pre.innerHTML = n + "<br/>", this.updateLines();
|
|
2870
2870
|
}
|
|
2871
2871
|
updateLines() {
|
|
2872
2872
|
if (!this.options.lineNumbers) return;
|
|
2873
2873
|
this.lines || (this.lines = document.createElement("pre"), this.root.appendChild(this.lines), Object.assign(this.lines.style, Io));
|
|
2874
|
-
const
|
|
2875
|
-
`),
|
|
2876
|
-
this.root.style.paddingLeft = `${
|
|
2874
|
+
const n = this.value.split(`
|
|
2875
|
+
`), l = n.length.toString().length;
|
|
2876
|
+
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">${nt(s)}</span>`}`).join(`
|
|
2877
2877
|
`);
|
|
2878
2878
|
}
|
|
2879
2879
|
destroy() {
|
|
2880
2880
|
this.textarea && (this.textarea.removeEventListener("input", this.handleEvent), this.textarea.removeEventListener("keydown", this.handleEvent), this.textarea.removeEventListener("compositionend", this.handleEvent), ve(this.textarea), ve(this.pre), ve(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 }));
|
|
2881
2881
|
}
|
|
2882
|
-
onUpdate(
|
|
2883
|
-
this.updateCallback =
|
|
2882
|
+
onUpdate(n) {
|
|
2883
|
+
this.updateCallback = n;
|
|
2884
2884
|
}
|
|
2885
2885
|
}
|
|
2886
2886
|
function ve(e) {
|
|
2887
2887
|
e && e.parentNode && e.parentNode.removeChild(e);
|
|
2888
2888
|
}
|
|
2889
|
-
function
|
|
2889
|
+
function nt(e) {
|
|
2890
2890
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2891
2891
|
}
|
|
2892
|
-
const Ie = { 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" }, jo = { add: "=" },
|
|
2893
|
-
function ce(e,
|
|
2894
|
-
const
|
|
2895
|
-
if (!
|
|
2896
|
-
const t =
|
|
2897
|
-
var
|
|
2898
|
-
const d = !
|
|
2892
|
+
const Ie = { 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" }, jo = { add: "=" }, Po = { ";": "semicolon", "=": "equal", ",": "comma", "-": "minus", ".": "period", "/": "slash", "`": "backquote", "[": "bracketleft", "\\": "backslash", "]": "bracketright", "'": "quote" };
|
|
2893
|
+
function ce(e, n) {
|
|
2894
|
+
const l = e.split("+").reduce((u, r) => Ie[r] ? (u.modifiers[Ie[r]] = !0, u) : { ...u, key: jo[r] || r.toLowerCase() }, { modifiers: { altKey: !1, ctrlKey: !1, metaKey: !1, shiftKey: !1 }, key: null }), s = Object.keys(l.modifiers).every((u) => l.modifiers[u] ? n[u] : !n[u]);
|
|
2895
|
+
if (!l.key) return s;
|
|
2896
|
+
const t = n.key != null && n.key.toLowerCase() === l.key, o = (i = l.key, /^[a-z]$/.test(i) ? `key${i}` : /^[0-9]$/.test(i) ? `digit${i}` : Po[i] || null);
|
|
2897
|
+
var i;
|
|
2898
|
+
const d = !n.isComposing && o != null && n.code != null && n.code.toLowerCase() === o;
|
|
2899
2899
|
return s && (t || d);
|
|
2900
2900
|
}
|
|
2901
|
-
function
|
|
2902
|
-
const
|
|
2903
|
-
let s = [], t = null,
|
|
2904
|
-
const
|
|
2905
|
-
s = s.slice(0, t + 1), s.push(d), s.length >
|
|
2901
|
+
function Ho(e = {}) {
|
|
2902
|
+
const n = Math.max(1, e.limit == null ? 300 : e.limit), l = e.coalesceMs == null ? 300 : e.coalesceMs;
|
|
2903
|
+
let s = [], t = null, o = null;
|
|
2904
|
+
const i = (d) => {
|
|
2905
|
+
s = s.slice(0, t + 1), s.push(d), s.length > n && (s = s.slice(s.length - n)), t = s.length - 1;
|
|
2906
2906
|
};
|
|
2907
2907
|
return (d, u) => {
|
|
2908
|
-
const
|
|
2909
|
-
if ((
|
|
2910
|
-
if (
|
|
2911
|
-
if (c) return
|
|
2912
|
-
if (u.type === "keydown") return s[t].value !== d.value ? (
|
|
2908
|
+
const r = u.type === "keydown" && ce("ctrl/cmd+z", u), c = u.type === "keydown" && (ce("ctrl/cmd+shift+z", u) || ce("ctrl+y", u));
|
|
2909
|
+
if ((r || c) && u.preventDefault(), t === null) return s = [d], void (t = 0);
|
|
2910
|
+
if (r) return o = null, s[t].value !== d.value ? i(d) : s[t] = d, t = Math.max(0, t - 1), s[t];
|
|
2911
|
+
if (c) return o = null, s[t].value !== d.value ? void i(d) : (t = Math.min(s.length - 1, t + 1), s[t]);
|
|
2912
|
+
if (u.type === "keydown") return s[t].value !== d.value ? (o = null, void i(d)) : void (s[t] = d);
|
|
2913
2913
|
if (u.type === "input") {
|
|
2914
|
-
const m = u.timeStamp,
|
|
2915
|
-
if (
|
|
2916
|
-
|
|
2914
|
+
const m = u.timeStamp, p = m != null && o != null && m - o <= l;
|
|
2915
|
+
if (o = m ?? null, p) return void (s[t] = d);
|
|
2916
|
+
i(d);
|
|
2917
2917
|
}
|
|
2918
2918
|
};
|
|
2919
2919
|
}
|
|
2920
|
-
const
|
|
2921
|
-
const { value:
|
|
2922
|
-
if (!ce("enter",
|
|
2923
|
-
const
|
|
2924
|
-
`).pop(),
|
|
2925
|
-
if (!
|
|
2926
|
-
|
|
2920
|
+
const No = () => (e, n) => {
|
|
2921
|
+
const { value: l, selectionStart: s, selectionEnd: t } = e;
|
|
2922
|
+
if (!ce("enter", n) || n.type !== "keydown") return;
|
|
2923
|
+
const o = l.substring(0, s).split(`
|
|
2924
|
+
`).pop(), i = /^\s+/.exec(o);
|
|
2925
|
+
if (!i) return;
|
|
2926
|
+
n.preventDefault();
|
|
2927
2927
|
const d = `
|
|
2928
|
-
` +
|
|
2929
|
-
return { value:
|
|
2930
|
-
}, Fo = () => (e,
|
|
2931
|
-
if (!(
|
|
2928
|
+
` + i[0];
|
|
2929
|
+
return { value: l.substring(0, s) + d + l.substring(t), selectionStart: s + d.length, selectionEnd: s + d.length };
|
|
2930
|
+
}, Fo = () => (e, n) => {
|
|
2931
|
+
if (!(n instanceof KeyboardEvent) || n.key !== "Enter")
|
|
2932
2932
|
return;
|
|
2933
|
-
const { value:
|
|
2933
|
+
const { value: l, selectionStart: s, selectionEnd: t } = e;
|
|
2934
2934
|
if (s !== t)
|
|
2935
2935
|
return;
|
|
2936
|
-
const
|
|
2937
|
-
`, s - 1) + 1,
|
|
2938
|
-
`, s), d =
|
|
2939
|
-
if (
|
|
2936
|
+
const o = l.lastIndexOf(`
|
|
2937
|
+
`, s - 1) + 1, i = l.indexOf(`
|
|
2938
|
+
`, s), d = i === -1 ? l.length : i;
|
|
2939
|
+
if (l.slice(s, d).trim().length > 0)
|
|
2940
2940
|
return;
|
|
2941
|
-
const c =
|
|
2941
|
+
const c = l.substring(o, d).trimEnd();
|
|
2942
2942
|
if (c.endsWith(";") || c.length === 0)
|
|
2943
2943
|
return;
|
|
2944
|
-
const m =
|
|
2944
|
+
const m = l.slice(0, d) + ";" + l.slice(d), p = s + 1;
|
|
2945
2945
|
return {
|
|
2946
2946
|
value: m,
|
|
2947
|
-
selectionStart:
|
|
2948
|
-
selectionEnd:
|
|
2947
|
+
selectionStart: p,
|
|
2948
|
+
selectionEnd: p
|
|
2949
2949
|
};
|
|
2950
|
-
}
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
else;
|
|
2954
|
-
|
|
2955
|
-
end;`, detail: "if:${$v0<10};else;end;" },
|
|
2956
|
-
{ label: "while", type: "keyword", insertText: `$v0=0;
|
|
2957
|
-
while:\${$v0<10};
|
|
2958
|
-
log($v0);
|
|
2959
|
-
$v0=$v0+1;
|
|
2960
|
-
wait(1s);
|
|
2961
|
-
end;`, detail: "while" },
|
|
2962
|
-
{ label: "on", type: "function", insertText: "on('${event}')\nend;", detail: "event" },
|
|
2963
|
-
{ label: "wait", type: "function", insertText: "wait(${1s})", detail: "delay 1s" },
|
|
2964
|
-
{ label: "log", type: "function", insertText: "log('${test}')", detail: "log" },
|
|
2965
|
-
{ label: "len", type: "function", insertText: "len(${$a0})", detail: "length" },
|
|
2966
|
-
{ label: "set", type: "function", insertText: "set(${$a0}, ${2}, ${10})", detail: "array" },
|
|
2967
|
-
{ label: "get", type: "function", insertText: "get(${$a0}, ${0})", detail: "array" },
|
|
2968
|
-
{ label: "ord", type: "function", insertText: "ord(${$s0})", detail: "ord" },
|
|
2969
|
-
{ label: "chr", type: "function", insertText: "chr(${65})", detail: "chr" },
|
|
2970
|
-
{ label: "btn_13", type: "event", detail: "btn" },
|
|
2971
|
-
{ label: "btn_13_1", type: "event", detail: "btn" },
|
|
2972
|
-
{ label: "btn_13_0", type: "event", detail: "btn" },
|
|
2973
|
-
{ label: "$v${0}=", type: "variable", detail: "uint" },
|
|
2974
|
-
{ label: "$i${0}=", type: "variable", detail: "int" },
|
|
2975
|
-
{ label: "$f${0}=", type: "variable", detail: "float" },
|
|
2976
|
-
{ label: "$s${0}=", type: "variable", detail: "string" },
|
|
2977
|
-
{ label: "$p${13}=", type: "variable", detail: "gpio" }
|
|
2978
|
-
];
|
|
2979
|
-
let Te = [], q = null, K = 0, Y = [], ee = null, ne = null, Ee, nt, G = null, ae = null;
|
|
2950
|
+
};
|
|
2951
|
+
let Ee = [], q = null, W = 0, Y = [], ee = null, le = null, Te, lt, G = null, oe = null;
|
|
2980
2952
|
const Ro = (e) => {
|
|
2981
|
-
const { customSuggestions:
|
|
2953
|
+
const { customSuggestions: n = [], minPrefixLength: l = 1, maxSuggestions: s = 20, tabSize: t = 2, tooltip: o = { enabled: !0 }, i18n: i, renderMenu: d, renderTooltip: u } = e;
|
|
2982
2954
|
if (!d || !u)
|
|
2983
2955
|
throw new Error("renderMenu and renderTooltip are required");
|
|
2984
|
-
return
|
|
2956
|
+
return Ee = [...n].map((r) => i(r)), Te = d, lt = u, (r, c) => {
|
|
2985
2957
|
if (!(c instanceof KeyboardEvent))
|
|
2986
2958
|
return;
|
|
2987
|
-
const { value: m, selectionStart:
|
|
2988
|
-
if (
|
|
2959
|
+
const { value: m, selectionStart: p } = r, g = c.target;
|
|
2960
|
+
if (le = g, o.enabled !== !1 && !g.dataset.tooltipInitialized && (g.dataset.tooltipInitialized = "true", g.addEventListener("mouseup", () => {
|
|
2989
2961
|
setTimeout(() => Oe(g), 100);
|
|
2990
2962
|
}), g.addEventListener("keyup", () => {
|
|
2991
2963
|
setTimeout(() => Oe(g), 100);
|
|
2992
2964
|
})), q) {
|
|
2993
2965
|
switch (c.key) {
|
|
2994
2966
|
case "ArrowDown":
|
|
2995
|
-
return c.preventDefault(),
|
|
2967
|
+
return c.preventDefault(), W < Y.length - 1 && (W++, se()), { ...r };
|
|
2996
2968
|
case "ArrowUp":
|
|
2997
|
-
return c.preventDefault(),
|
|
2969
|
+
return c.preventDefault(), W > 0 && (W--, se()), { ...r };
|
|
2998
2970
|
case "Enter":
|
|
2999
|
-
if (c.preventDefault(), Y[
|
|
3000
|
-
const h =
|
|
3001
|
-
return
|
|
2971
|
+
if (c.preventDefault(), Y[W]) {
|
|
2972
|
+
const h = _e(r, Y[W]);
|
|
2973
|
+
return Z(), h;
|
|
3002
2974
|
}
|
|
3003
2975
|
return;
|
|
3004
2976
|
case "Tab":
|
|
3005
|
-
if (c.preventDefault(), Y[
|
|
3006
|
-
const h =
|
|
3007
|
-
return
|
|
2977
|
+
if (c.preventDefault(), Y[W]) {
|
|
2978
|
+
const h = _e(r, Y[W]);
|
|
2979
|
+
return Z(), h;
|
|
3008
2980
|
}
|
|
3009
2981
|
return;
|
|
3010
2982
|
case "Escape":
|
|
3011
|
-
return c.preventDefault(),
|
|
2983
|
+
return c.preventDefault(), Z(), { ...r };
|
|
3012
2984
|
case "Backspace":
|
|
3013
2985
|
setTimeout(() => {
|
|
3014
|
-
if (
|
|
3015
|
-
const h =
|
|
3016
|
-
if (C.length <
|
|
3017
|
-
|
|
2986
|
+
if (le) {
|
|
2987
|
+
const h = le.value, x = le.selectionStart, _ = he(h, x), C = h.slice(_, x);
|
|
2988
|
+
if (C.length < l)
|
|
2989
|
+
Z();
|
|
3018
2990
|
else {
|
|
3019
2991
|
const z = ke(C).slice(0, s);
|
|
3020
|
-
z.length === 0 ?
|
|
2992
|
+
z.length === 0 ? Z() : (Y = z, W = 0, se());
|
|
3021
2993
|
}
|
|
3022
2994
|
}
|
|
3023
2995
|
}, 0);
|
|
3024
2996
|
return;
|
|
3025
2997
|
}
|
|
3026
2998
|
if (["ArrowDown", "ArrowUp", "Enter", "Tab", "Escape", "Backspace"].includes(c.key))
|
|
3027
|
-
return { ...
|
|
2999
|
+
return { ...r };
|
|
3028
3000
|
}
|
|
3029
3001
|
if (ce("tab", c)) {
|
|
3030
3002
|
c.preventDefault();
|
|
3031
|
-
const h = he(m,
|
|
3003
|
+
const h = he(m, p), x = m.slice(h, p);
|
|
3032
3004
|
if (x.length > 0) {
|
|
3033
3005
|
const j = ke(x);
|
|
3034
3006
|
if (j.length > 0)
|
|
3035
|
-
return
|
|
3007
|
+
return _e(r, j[0]);
|
|
3036
3008
|
}
|
|
3037
|
-
const
|
|
3009
|
+
const _ = " ".repeat(t), C = m.slice(0, p) + _ + m.slice(p), z = p + t;
|
|
3038
3010
|
return {
|
|
3039
3011
|
value: C,
|
|
3040
3012
|
selectionStart: z,
|
|
@@ -3044,158 +3016,161 @@ const Ro = (e) => {
|
|
|
3044
3016
|
if (!(c.key.length !== 1 || c.ctrlKey || c.metaKey || c.altKey))
|
|
3045
3017
|
return ee && clearTimeout(ee), ee = setTimeout(() => {
|
|
3046
3018
|
ee = null;
|
|
3047
|
-
const h = g.value, x = g.selectionStart,
|
|
3048
|
-
if (C.length <
|
|
3049
|
-
|
|
3019
|
+
const h = g.value, x = g.selectionStart, _ = he(h, x), C = h.slice(_, x);
|
|
3020
|
+
if (C.length < l) {
|
|
3021
|
+
Z();
|
|
3050
3022
|
return;
|
|
3051
3023
|
}
|
|
3052
3024
|
let z = ke(C);
|
|
3053
3025
|
if (z = z.slice(0, s), z.length === 0) {
|
|
3054
|
-
|
|
3026
|
+
Z();
|
|
3055
3027
|
return;
|
|
3056
3028
|
}
|
|
3057
|
-
Y = z,
|
|
3058
|
-
}, 0), { ...
|
|
3029
|
+
Y = z, W = 0, q ? se() : Uo(g, z);
|
|
3030
|
+
}, 0), { ...r };
|
|
3059
3031
|
};
|
|
3060
3032
|
};
|
|
3061
3033
|
function ke(e) {
|
|
3062
|
-
const
|
|
3063
|
-
return
|
|
3064
|
-
const s =
|
|
3065
|
-
return s.startsWith(
|
|
3066
|
-
}).sort((
|
|
3067
|
-
const t =
|
|
3068
|
-
if (
|
|
3069
|
-
if (!
|
|
3070
|
-
const u = t.indexOf(
|
|
3071
|
-
return u !==
|
|
3034
|
+
const n = e.toLowerCase();
|
|
3035
|
+
return Ee.filter((l) => {
|
|
3036
|
+
const s = l.label.toLowerCase();
|
|
3037
|
+
return s.startsWith(n) || s.includes(n) || s.split("_").map((t) => t[0]).join("").startsWith(n);
|
|
3038
|
+
}).sort((l, s) => {
|
|
3039
|
+
const t = l.label.toLowerCase(), o = s.label.toLowerCase(), i = t.startsWith(n), d = o.startsWith(n);
|
|
3040
|
+
if (i && !d) return -1;
|
|
3041
|
+
if (!i && d) return 1;
|
|
3042
|
+
const u = t.indexOf(n), r = o.indexOf(n);
|
|
3043
|
+
return u !== r ? u - r : t.length !== o.length ? t.length - o.length : t.localeCompare(o);
|
|
3072
3044
|
});
|
|
3073
3045
|
}
|
|
3074
|
-
function he(e,
|
|
3075
|
-
let
|
|
3076
|
-
for (;
|
|
3077
|
-
|
|
3078
|
-
return
|
|
3046
|
+
function he(e, n) {
|
|
3047
|
+
let l = n;
|
|
3048
|
+
for (; l > 0 && /[a-zA-Z0-9_$]/.test(e[l - 1]); )
|
|
3049
|
+
l--;
|
|
3050
|
+
return l;
|
|
3079
3051
|
}
|
|
3080
|
-
function
|
|
3081
|
-
|
|
3082
|
-
const
|
|
3083
|
-
q =
|
|
3084
|
-
|
|
3052
|
+
function Uo(e, n) {
|
|
3053
|
+
Z(), Y = n, W = 0;
|
|
3054
|
+
const l = st(e);
|
|
3055
|
+
q = Te(n, W, (s) => {
|
|
3056
|
+
W = s, se();
|
|
3085
3057
|
}), Object.assign(q.style, {
|
|
3086
3058
|
position: "fixed",
|
|
3087
|
-
left: `${
|
|
3088
|
-
top: `${
|
|
3059
|
+
left: `${l.left}px`,
|
|
3060
|
+
top: `${l.top + 24}px`,
|
|
3089
3061
|
zIndex: "10000"
|
|
3090
3062
|
}), document.body.appendChild(q);
|
|
3091
3063
|
}
|
|
3092
3064
|
function se() {
|
|
3093
|
-
if (!q || !
|
|
3094
|
-
const e =
|
|
3095
|
-
|
|
3096
|
-
}),
|
|
3065
|
+
if (!q || !le) return;
|
|
3066
|
+
const e = Te(Y, W, (l) => {
|
|
3067
|
+
W = l, se();
|
|
3068
|
+
}), n = q.getBoundingClientRect();
|
|
3097
3069
|
q.replaceWith(e), q = e, Object.assign(q.style, {
|
|
3098
3070
|
position: "fixed",
|
|
3099
|
-
left: `${
|
|
3100
|
-
top: `${
|
|
3071
|
+
left: `${n.left}px`,
|
|
3072
|
+
top: `${n.top}px`,
|
|
3101
3073
|
zIndex: "10000"
|
|
3102
3074
|
});
|
|
3103
3075
|
}
|
|
3104
|
-
function
|
|
3105
|
-
const { value:
|
|
3106
|
-
let d =
|
|
3076
|
+
function _e(e, n) {
|
|
3077
|
+
const { value: l, selectionStart: s } = e, t = he(l, s), o = n.insert || n.label, i = /\$\{([^}]*)\}/g;
|
|
3078
|
+
let d = o;
|
|
3107
3079
|
const u = [];
|
|
3108
|
-
let
|
|
3109
|
-
for (; (
|
|
3110
|
-
const h =
|
|
3111
|
-
u.push({ index: x, text: h, length:
|
|
3080
|
+
let r;
|
|
3081
|
+
for (; (r = i.exec(o)) !== null; ) {
|
|
3082
|
+
const h = r[1], x = r.index, _ = r[0].length;
|
|
3083
|
+
u.push({ index: x, text: h, length: _ });
|
|
3112
3084
|
}
|
|
3113
|
-
d =
|
|
3085
|
+
d = o.replace(/\$\{([^}]*)\}/g, "$1");
|
|
3114
3086
|
const c = u[0];
|
|
3115
|
-
let m = t + d.length,
|
|
3087
|
+
let m = t + d.length, p = t + d.length;
|
|
3116
3088
|
if (c) {
|
|
3117
|
-
let h = 0, x = 0,
|
|
3118
|
-
for (; x <
|
|
3089
|
+
let h = 0, x = 0, _ = !1;
|
|
3090
|
+
for (; x < o.length && !_; ) {
|
|
3119
3091
|
const C = u.find((z) => z.index === x);
|
|
3120
|
-
C ? (h += C.text.length, x += C.length, C === c && (m = t + h - C.text.length,
|
|
3092
|
+
C ? (h += C.text.length, x += C.length, C === c && (m = t + h - C.text.length, p = t + h, _ = !0)) : (h++, x++);
|
|
3121
3093
|
}
|
|
3122
3094
|
}
|
|
3123
3095
|
return {
|
|
3124
|
-
value:
|
|
3096
|
+
value: l.slice(0, t) + d + l.slice(s),
|
|
3125
3097
|
selectionStart: m,
|
|
3126
|
-
selectionEnd:
|
|
3098
|
+
selectionEnd: p
|
|
3127
3099
|
};
|
|
3128
3100
|
}
|
|
3129
|
-
function
|
|
3130
|
-
ee && (clearTimeout(ee), ee = null), q && (q.remove(), q = null, Y = [],
|
|
3101
|
+
function Z() {
|
|
3102
|
+
ee && (clearTimeout(ee), ee = null), q && (q.remove(), q = null, Y = [], W = 0, le = null);
|
|
3131
3103
|
}
|
|
3132
3104
|
function st(e) {
|
|
3133
|
-
const
|
|
3134
|
-
`),
|
|
3105
|
+
const n = e.getBoundingClientRect(), { value: l, selectionStart: s } = e, o = l.substring(0, s).split(`
|
|
3106
|
+
`), i = o.length, d = o[o.length - 1] || "", u = parseInt(getComputedStyle(e).lineHeight) || 20;
|
|
3135
3107
|
return {
|
|
3136
|
-
left:
|
|
3137
|
-
top:
|
|
3108
|
+
left: n.left + 10 + d.length * 8,
|
|
3109
|
+
top: n.top + (i - 1) * u
|
|
3138
3110
|
};
|
|
3139
3111
|
}
|
|
3140
3112
|
function Oe(e) {
|
|
3141
|
-
|
|
3142
|
-
const
|
|
3143
|
-
if (
|
|
3144
|
-
|
|
3113
|
+
oe && clearTimeout(oe), oe = setTimeout(() => {
|
|
3114
|
+
const n = e.selectionStart, l = e.selectionEnd;
|
|
3115
|
+
if (n === l) {
|
|
3116
|
+
re();
|
|
3145
3117
|
return;
|
|
3146
3118
|
}
|
|
3147
|
-
const s = e.value.substring(
|
|
3119
|
+
const s = e.value.substring(n, l).trim();
|
|
3148
3120
|
if (!s) {
|
|
3149
|
-
|
|
3121
|
+
re();
|
|
3150
3122
|
return;
|
|
3151
3123
|
}
|
|
3152
|
-
const t =
|
|
3124
|
+
const t = Ee.find((d) => d.label === s);
|
|
3153
3125
|
if (!t) {
|
|
3154
|
-
|
|
3126
|
+
re();
|
|
3155
3127
|
return;
|
|
3156
3128
|
}
|
|
3157
|
-
const
|
|
3158
|
-
|
|
3129
|
+
const o = st(e), i = lt(t, o);
|
|
3130
|
+
i.style.opacity = "0", G && G.remove(), G = i, document.body.appendChild(G), requestAnimationFrame(() => {
|
|
3159
3131
|
G && (G.style.opacity = "1");
|
|
3160
|
-
}), setTimeout(() =>
|
|
3132
|
+
}), setTimeout(() => re(), 3e3);
|
|
3161
3133
|
}, 300);
|
|
3162
3134
|
}
|
|
3163
|
-
function
|
|
3164
|
-
|
|
3135
|
+
function re() {
|
|
3136
|
+
oe && (clearTimeout(oe), oe = null), G && (G.style.opacity = "0", setTimeout(() => {
|
|
3165
3137
|
G && (G.remove(), G = null);
|
|
3166
3138
|
}, 150));
|
|
3167
3139
|
}
|
|
3168
3140
|
document.addEventListener("mousedown", (e) => {
|
|
3169
|
-
const
|
|
3170
|
-
q && !q.contains(
|
|
3141
|
+
const n = e.target;
|
|
3142
|
+
q && !q.contains(n) && Z(), G && !G.contains(n) && re();
|
|
3171
3143
|
});
|
|
3172
|
-
|
|
3173
|
-
const
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3144
|
+
const we = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), Ko = ["else", "end", "call", "fade"], Wo = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), qo = (e) => {
|
|
3145
|
+
const n = e.filter((d) => d.type !== "var").map((d) => d.label), i = `(\\/\\/[^\\n]*)|('[^'\\n]*')|(\\b\\d+(?:\\.\\d+)?\\b)|(\\b(?:${Array.from(/* @__PURE__ */ new Set([...Ko, ...n])).map(Wo).join("|")})\\b)|(\\$[a-zA-Z_][a-zA-Z0-9_]*)|(\\b(?:btn_\\d+(?:_\\d+)?)\\b)|([;:(){}])`;
|
|
3146
|
+
return new RegExp(i, "g");
|
|
3147
|
+
}, Go = (e) => (n) => {
|
|
3148
|
+
const l = qo(e);
|
|
3149
|
+
let s = "", t = 0;
|
|
3150
|
+
for (const o of n.matchAll(l)) {
|
|
3151
|
+
const [i, d, u, r, c, m, p, g] = o;
|
|
3152
|
+
let h = "";
|
|
3153
|
+
d ? h = "comment" : u ? h = "str" : r ? h = "num" : c ? h = "word" : m ? h = "var" : p ? h = "event" : g && (h = "operator"), s += we(n.slice(t, o.index)), s += `<span class="tok--${h}">${we(i)}</span>`, t = o.index + i.length;
|
|
3179
3154
|
}
|
|
3180
|
-
return
|
|
3155
|
+
return s += we(n.slice(t)), s;
|
|
3181
3156
|
}, ot = {
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3157
|
+
word: "text-blue-600 dark:text-blue-400",
|
|
3158
|
+
func: "text-yellow-600 dark:text-yellow-400",
|
|
3159
|
+
var: "text-cyan-600 dark:text-cyan-400",
|
|
3185
3160
|
event: "text-purple-600 dark:text-purple-400"
|
|
3186
|
-
},
|
|
3161
|
+
}, Jo = (e, n, l) => {
|
|
3187
3162
|
const s = document.createElement("div");
|
|
3188
3163
|
return s.className = `
|
|
3189
3164
|
fixed z-[10000] min-w-[250px] max-w-[400px] max-h-[250px]
|
|
3190
3165
|
overflow-y-auto p-1 rounded-lg shadow-lg border
|
|
3191
3166
|
border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800
|
|
3192
3167
|
text-sm font-mono scrollbar pointer-events-none
|
|
3193
|
-
`, e.forEach((t,
|
|
3194
|
-
const
|
|
3168
|
+
`, e.forEach((t, o) => {
|
|
3169
|
+
const i = o === n, d = document.createElement("div");
|
|
3195
3170
|
d.className = `
|
|
3196
3171
|
flex items-center justify-between gap-2 px-3 py-1.5 cursor-pointer
|
|
3197
3172
|
rounded transition-colors duration-100 border-l-2
|
|
3198
|
-
${
|
|
3173
|
+
${i ? "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"}
|
|
3199
3174
|
`;
|
|
3200
3175
|
const u = ot[t.type] || "text-gray-700 dark:text-gray-300";
|
|
3201
3176
|
d.innerHTML = `
|
|
@@ -3204,93 +3179,129 @@ const we = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, "
|
|
|
3204
3179
|
${t.detail ? `<span class="text-xs text-gray-500 dark:text-gray-400 ml-2">${t.detail}</span>` : ""}
|
|
3205
3180
|
</div>
|
|
3206
3181
|
${t.description ? `<span class="text-xs text-gray-400 dark:text-gray-500">${t.description}</span>` : ""}
|
|
3207
|
-
`, d.addEventListener("click", () =>
|
|
3182
|
+
`, d.addEventListener("click", () => l(o)), s.appendChild(d);
|
|
3208
3183
|
}), s;
|
|
3209
|
-
},
|
|
3210
|
-
const
|
|
3211
|
-
|
|
3184
|
+
}, Xo = (e, n) => {
|
|
3185
|
+
const l = document.createElement("div");
|
|
3186
|
+
l.className = `
|
|
3212
3187
|
fixed z-[10001] px-3 py-2 font-mono text-sm max-w-[300px]
|
|
3213
3188
|
min-w-[50px] min-h-[20px] rounded-lg shadow-lg border
|
|
3214
3189
|
pointer-events-none transition-opacity duration-150
|
|
3215
3190
|
bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700
|
|
3216
3191
|
text-gray-700 dark:text-gray-300 pointer-events-none
|
|
3217
|
-
`,
|
|
3218
|
-
left: ${
|
|
3192
|
+
`, l.style.cssText = `
|
|
3193
|
+
left: ${n.left + 40}px; top: ${n.top - 10}px;
|
|
3219
3194
|
transform: translateX(-50%) translateY(-100%); opacity: 0;
|
|
3220
3195
|
`;
|
|
3221
3196
|
let t = `<div class="font-medium ${ot[e.type] || "text-gray-700 dark:text-gray-300"}">${e.label}</div>`;
|
|
3222
|
-
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>`),
|
|
3223
|
-
const
|
|
3224
|
-
return
|
|
3197
|
+
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;
|
|
3198
|
+
const o = document.createElement("div");
|
|
3199
|
+
return o.className = `
|
|
3225
3200
|
absolute bottom-[-6px] left-1/2 w-2.5 h-2.5 -translate-x-1/2 rotate-45
|
|
3226
3201
|
bg-white dark:bg-gray-800 border-r border-b border-gray-200 dark:border-gray-700
|
|
3227
|
-
`,
|
|
3228
|
-
},
|
|
3202
|
+
`, l.appendChild(o), l;
|
|
3203
|
+
}, Yo = [
|
|
3204
|
+
{ label: "if", type: "word", insert: `if:\${$v0<10};
|
|
3205
|
+
|
|
3206
|
+
else;
|
|
3207
|
+
|
|
3208
|
+
end;`, detail: "if:${$v0<10};else;end;" },
|
|
3209
|
+
{ label: "while", type: "word", insert: `$v0=0;
|
|
3210
|
+
while:\${$v0<10};
|
|
3211
|
+
log($v0);
|
|
3212
|
+
$v0=$v0+1;
|
|
3213
|
+
wait(1s);
|
|
3214
|
+
end;`, detail: "while:${$v0<2}; end;" },
|
|
3215
|
+
{ label: "udp", type: "func", insert: "udp(${},'call(1)')", detail: "udp(id:number, text:string)" },
|
|
3216
|
+
{ label: "on", type: "func", insert: `on('\${event}');
|
|
3217
|
+
|
|
3218
|
+
end;`, detail: "event(name: string)" },
|
|
3219
|
+
{ label: "wait", type: "func", insert: "wait(${1s});", detail: "wait(10ms | 1s | 1m | 1h)" },
|
|
3220
|
+
{ label: "log", type: "func", insert: "log(${});", detail: "log(text: string | number)" },
|
|
3221
|
+
{ label: "len", type: "func", insert: "len(${$a0});", detail: "len(arr: array)" },
|
|
3222
|
+
{ label: "set", type: "func", insert: "set(${$a0},${2},${10});", detail: "set(arr: array, index: number, value: number)" },
|
|
3223
|
+
{ label: "get", type: "func", insert: "get(${$a0},${0});", detail: "get(arr: array, index: number)" },
|
|
3224
|
+
{ label: "ord", type: "func", insert: "ord(${$s0});", detail: "ord(char: string)" },
|
|
3225
|
+
{ label: "chr", type: "func", insert: "chr(${65});", detail: "chr(v: number)" },
|
|
3226
|
+
{ label: "btn", type: "event", detail: "Change state " },
|
|
3227
|
+
{ label: "btn_c", type: "event", detail: "Count click button <br>$e0=gpio:number<br>$e1=value:number<br>$e2=type?:number" },
|
|
3228
|
+
{ label: "btn_l", type: "event", detail: "Long press of the button <br>$e0=gpio:number<br>$e1=value:number" },
|
|
3229
|
+
{ label: "btn_r", type: "event", detail: "Repeat while holding the button <br>$e0=gpio:number<br>$e1=value:number" },
|
|
3230
|
+
{ label: "$u", type: "var", insert: "$u${0}", detail: "var (uint) " },
|
|
3231
|
+
{ label: "$i", type: "var", insert: "$i${0}", detail: "var (int)" },
|
|
3232
|
+
{ label: "$f", type: "var", insert: "$f${0}", detail: "var (float)" },
|
|
3233
|
+
{ label: "$s", type: "var", insert: "$s${0}", detail: "var (string)" },
|
|
3234
|
+
{ label: "$a", type: "var", insert: "$a${0}", detail: "var (array)" },
|
|
3235
|
+
{ label: "$e", type: "var", insert: "$e${0}", detail: "var event" },
|
|
3236
|
+
{ label: "$c", type: "var", insert: "$c${0}", detail: "var call" },
|
|
3237
|
+
{ label: "$p", type: "var", insert: "$p${0}", detail: "gpio" }
|
|
3238
|
+
], Wa = /* @__PURE__ */ V({
|
|
3229
3239
|
__name: "ScriptEditor",
|
|
3230
3240
|
props: {
|
|
3231
3241
|
modelValue: {},
|
|
3232
3242
|
suggestions: { default: () => [] }
|
|
3233
3243
|
},
|
|
3234
3244
|
emits: ["update:modelValue", "update"],
|
|
3235
|
-
setup(e, { emit:
|
|
3236
|
-
const
|
|
3245
|
+
setup(e, { emit: n }) {
|
|
3246
|
+
const l = n;
|
|
3237
3247
|
let s;
|
|
3248
|
+
const t = [...Yo, ...e.suggestions];
|
|
3238
3249
|
return ue(
|
|
3239
3250
|
() => e.modelValue,
|
|
3240
|
-
(
|
|
3241
|
-
s.update({ value:
|
|
3251
|
+
(o) => {
|
|
3252
|
+
s.update({ value: o });
|
|
3242
3253
|
}
|
|
3243
3254
|
), fe(() => {
|
|
3244
3255
|
s = new Oo("#editor", {
|
|
3245
3256
|
value: e.modelValue,
|
|
3246
3257
|
lineNumbers: !0,
|
|
3247
|
-
highlighters: [
|
|
3258
|
+
highlighters: [Go(t)],
|
|
3248
3259
|
plugins: [
|
|
3260
|
+
Ho(),
|
|
3249
3261
|
No(),
|
|
3250
|
-
Po(),
|
|
3251
3262
|
Ro({
|
|
3252
|
-
customSuggestions:
|
|
3263
|
+
customSuggestions: t,
|
|
3253
3264
|
minPrefixLength: 1,
|
|
3254
3265
|
maxSuggestions: 20,
|
|
3255
|
-
i18n: (
|
|
3266
|
+
i18n: (o) => o,
|
|
3256
3267
|
tooltip: {
|
|
3257
3268
|
enabled: !0
|
|
3258
3269
|
},
|
|
3259
|
-
renderMenu:
|
|
3260
|
-
renderTooltip:
|
|
3270
|
+
renderMenu: Jo,
|
|
3271
|
+
renderTooltip: Xo
|
|
3261
3272
|
}),
|
|
3262
3273
|
Fo()
|
|
3263
3274
|
],
|
|
3264
3275
|
styles: { fontSize: "14px" }
|
|
3265
|
-
}), s.onUpdate((
|
|
3266
|
-
|
|
3276
|
+
}), s.onUpdate((o) => {
|
|
3277
|
+
l("update:modelValue", o);
|
|
3267
3278
|
});
|
|
3268
3279
|
}), Fe(() => {
|
|
3269
3280
|
s.destroy();
|
|
3270
|
-
}), (
|
|
3271
|
-
|
|
3281
|
+
}), (o, i) => (f(), v("div", null, [...i[0] || (i[0] = [
|
|
3282
|
+
a("div", {
|
|
3272
3283
|
class: "",
|
|
3273
3284
|
id: "editor"
|
|
3274
3285
|
}, null, -1)
|
|
3275
3286
|
])]));
|
|
3276
3287
|
}
|
|
3277
|
-
}),
|
|
3288
|
+
}), Zo = { class: "max-w-4xl mx-auto" }, Qo = {
|
|
3278
3289
|
key: 0,
|
|
3279
3290
|
class: "text-sm"
|
|
3280
|
-
},
|
|
3291
|
+
}, ea = {
|
|
3281
3292
|
key: 0,
|
|
3282
3293
|
class: "text-gray-500"
|
|
3283
|
-
},
|
|
3294
|
+
}, ta = {
|
|
3284
3295
|
key: 1,
|
|
3285
3296
|
class: "text-red-600"
|
|
3286
|
-
},
|
|
3297
|
+
}, na = ["innerHTML"], la = "https://raw.githubusercontent.com/bondrogeen/vuesp/refs/heads/master/github/docs/scriptrunner/", sa = "https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js", qa = /* @__PURE__ */ V({
|
|
3287
3298
|
__name: "ScriptViewDocs",
|
|
3288
3299
|
props: {
|
|
3289
3300
|
lang: { default: "en" }
|
|
3290
3301
|
},
|
|
3291
3302
|
setup(e) {
|
|
3292
|
-
const
|
|
3293
|
-
let
|
|
3303
|
+
const n = D(""), l = D(""), s = D(null), t = D(!1), o = D(null);
|
|
3304
|
+
let i = null;
|
|
3294
3305
|
const d = () => new Promise((c, m) => {
|
|
3295
3306
|
if (window.marked) {
|
|
3296
3307
|
window.marked.setOptions({
|
|
@@ -3300,19 +3311,19 @@ const we = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, "
|
|
|
3300
3311
|
}), c(window.marked);
|
|
3301
3312
|
return;
|
|
3302
3313
|
}
|
|
3303
|
-
const
|
|
3304
|
-
|
|
3314
|
+
const p = document.createElement("script");
|
|
3315
|
+
p.src = sa, p.async = !0, p.onload = () => {
|
|
3305
3316
|
window.marked ? (window.marked.setOptions({
|
|
3306
3317
|
gfm: !0,
|
|
3307
3318
|
breaks: !0,
|
|
3308
3319
|
headerIds: !1
|
|
3309
3320
|
}), c(window.marked)) : m(new Error("Marked library not found after loading"));
|
|
3310
|
-
},
|
|
3321
|
+
}, p.onerror = () => {
|
|
3311
3322
|
m(new Error("Failed to load Marked library from CDN"));
|
|
3312
|
-
}, document.head.appendChild(
|
|
3323
|
+
}, document.head.appendChild(p);
|
|
3313
3324
|
}), u = (c) => {
|
|
3314
3325
|
const m = c.split(`
|
|
3315
|
-
`),
|
|
3326
|
+
`), p = {};
|
|
3316
3327
|
let g = !0;
|
|
3317
3328
|
for (const h of m) {
|
|
3318
3329
|
if (g && h.startsWith("#")) {
|
|
@@ -3320,51 +3331,51 @@ const we = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, "
|
|
|
3320
3331
|
continue;
|
|
3321
3332
|
}
|
|
3322
3333
|
if (g && h.includes(":")) {
|
|
3323
|
-
const [x,
|
|
3324
|
-
x &&
|
|
3334
|
+
const [x, _] = h.split(":").map((C) => C.trim());
|
|
3335
|
+
x && _ && (x.toLowerCase().includes("version") && (p.version = _), (x.toLowerCase().includes("обновлено") || x.toLowerCase().includes("updated")) && (p.updated = _));
|
|
3325
3336
|
}
|
|
3326
3337
|
}
|
|
3327
|
-
return
|
|
3328
|
-
},
|
|
3329
|
-
if (!
|
|
3330
|
-
|
|
3338
|
+
return p;
|
|
3339
|
+
}, r = async (c) => {
|
|
3340
|
+
if (!i) {
|
|
3341
|
+
o.value = "error";
|
|
3331
3342
|
return;
|
|
3332
3343
|
}
|
|
3333
|
-
t.value = !0,
|
|
3344
|
+
t.value = !0, o.value = null, l.value = "";
|
|
3334
3345
|
try {
|
|
3335
|
-
const m = `${
|
|
3336
|
-
if (!
|
|
3337
|
-
throw new Error(`HTTP ${
|
|
3338
|
-
const g = await
|
|
3339
|
-
|
|
3346
|
+
const m = `${la}${c}.md`, p = await fetch(m);
|
|
3347
|
+
if (!p.ok)
|
|
3348
|
+
throw new Error(`HTTP ${p.status}: ${p.statusText}`);
|
|
3349
|
+
const g = await p.text();
|
|
3350
|
+
n.value = g, s.value = u(g), l.value = i.parse(g);
|
|
3340
3351
|
} catch (m) {
|
|
3341
|
-
const
|
|
3342
|
-
|
|
3352
|
+
const p = m instanceof Error ? m.message : "";
|
|
3353
|
+
o.value = p, console.error("Error loading docs:", m);
|
|
3343
3354
|
} finally {
|
|
3344
3355
|
t.value = !1;
|
|
3345
3356
|
}
|
|
3346
3357
|
};
|
|
3347
3358
|
return fe(async () => {
|
|
3348
3359
|
try {
|
|
3349
|
-
|
|
3360
|
+
i = await d();
|
|
3350
3361
|
const c = e.lang ? "ru" : "en";
|
|
3351
|
-
await
|
|
3362
|
+
await r(c);
|
|
3352
3363
|
} catch (c) {
|
|
3353
3364
|
const m = c instanceof Error ? c.message : "";
|
|
3354
|
-
|
|
3365
|
+
o.value = m, console.error("Initialization error:", c);
|
|
3355
3366
|
}
|
|
3356
|
-
}), (c, m) => (f(),
|
|
3357
|
-
t.value ||
|
|
3358
|
-
t.value ? (f(),
|
|
3359
|
-
|
|
3360
|
-
])) :
|
|
3361
|
-
|
|
3367
|
+
}), (c, m) => (f(), v("div", Zo, [
|
|
3368
|
+
t.value || o.value ? (f(), v("div", Qo, [
|
|
3369
|
+
t.value ? (f(), v("span", ea, "⏳")) : E("", !0),
|
|
3370
|
+
o.value ? (f(), v("span", ta, "❌ " + k(o.value), 1)) : E("", !0)
|
|
3371
|
+
])) : E("", !0),
|
|
3372
|
+
a("div", {
|
|
3362
3373
|
class: "docs-content",
|
|
3363
|
-
innerHTML:
|
|
3364
|
-
}, null, 8,
|
|
3374
|
+
innerHTML: l.value
|
|
3375
|
+
}, null, 8, na)
|
|
3365
3376
|
]));
|
|
3366
3377
|
}
|
|
3367
|
-
}),
|
|
3378
|
+
}), Ga = /* @__PURE__ */ V({
|
|
3368
3379
|
__name: "VAutocomplete",
|
|
3369
3380
|
props: {
|
|
3370
3381
|
modelValue: { default: "" },
|
|
@@ -3374,11 +3385,11 @@ const we = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, "
|
|
|
3374
3385
|
items: {}
|
|
3375
3386
|
},
|
|
3376
3387
|
emits: ["update:modelValue", "select"],
|
|
3377
|
-
setup(e, { emit:
|
|
3378
|
-
const
|
|
3379
|
-
|
|
3388
|
+
setup(e, { emit: n }) {
|
|
3389
|
+
const l = n, s = (o) => l("update:modelValue", o), t = (o, i) => {
|
|
3390
|
+
o.click(new Event("click")), l("select", i);
|
|
3380
3391
|
};
|
|
3381
|
-
return (
|
|
3392
|
+
return (o, i) => (f(), M(be, N(o.$attrs, {
|
|
3382
3393
|
top: "50px",
|
|
3383
3394
|
"hide-on-click": ""
|
|
3384
3395
|
}), {
|
|
@@ -3398,7 +3409,7 @@ const we = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, "
|
|
|
3398
3409
|
onClick: (u) => t(d, u)
|
|
3399
3410
|
}, {
|
|
3400
3411
|
default: y(({ item: u }) => [
|
|
3401
|
-
|
|
3412
|
+
$(o.$slots, "default", { item: u }, () => [
|
|
3402
3413
|
I(k(u.name), 1)
|
|
3403
3414
|
])
|
|
3404
3415
|
]),
|
|
@@ -3408,97 +3419,97 @@ const we = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, "
|
|
|
3408
3419
|
_: 3
|
|
3409
3420
|
}, 16));
|
|
3410
3421
|
}
|
|
3411
|
-
}),
|
|
3422
|
+
}), oa = {
|
|
3412
3423
|
viewBox: "0 0 24 24",
|
|
3413
3424
|
width: "1.2em",
|
|
3414
3425
|
height: "1.2em"
|
|
3415
3426
|
};
|
|
3416
|
-
function
|
|
3417
|
-
return f(),
|
|
3418
|
-
|
|
3427
|
+
function aa(e, n) {
|
|
3428
|
+
return f(), v("svg", oa, [...n[0] || (n[0] = [
|
|
3429
|
+
a("path", {
|
|
3419
3430
|
fill: "currentColor",
|
|
3420
3431
|
d: "m12 15l-4.243-4.242l1.415-1.414L12 12.172l2.828-2.828l1.415 1.414z"
|
|
3421
3432
|
}, null, -1)
|
|
3422
3433
|
])]);
|
|
3423
3434
|
}
|
|
3424
|
-
const
|
|
3435
|
+
const ia = F({ name: "ri-arrow-drop-down-line", render: aa }), ra = { class: "v-expansion__content max-h-0 overflow-hidden transition-all duration-300" }, ca = { class: "p-4" }, Ja = /* @__PURE__ */ V({
|
|
3425
3436
|
__name: "VExpansion",
|
|
3426
3437
|
props: {
|
|
3427
3438
|
label: { default: "" },
|
|
3428
3439
|
value: { type: Boolean, default: !1 }
|
|
3429
3440
|
},
|
|
3430
3441
|
setup(e) {
|
|
3431
|
-
const
|
|
3432
|
-
if (!
|
|
3433
|
-
const
|
|
3434
|
-
|
|
3442
|
+
const n = D(null), l = D(e.value), s = () => {
|
|
3443
|
+
if (!n.value) return;
|
|
3444
|
+
const o = n.value.querySelector(".v-expansion__content");
|
|
3445
|
+
o && (o.style.maxHeight = l.value ? `${o.scrollHeight}px` : "0");
|
|
3435
3446
|
}, t = () => {
|
|
3436
|
-
|
|
3447
|
+
l.value = !l.value, s();
|
|
3437
3448
|
};
|
|
3438
3449
|
return fe(() => {
|
|
3439
3450
|
s();
|
|
3440
|
-
}), (
|
|
3441
|
-
const d =
|
|
3442
|
-
return f(),
|
|
3451
|
+
}), (o, i) => {
|
|
3452
|
+
const d = ia;
|
|
3453
|
+
return f(), v("div", {
|
|
3443
3454
|
ref_key: "root",
|
|
3444
|
-
ref:
|
|
3455
|
+
ref: n,
|
|
3445
3456
|
class: "border-b dark:border-gray-700 border-gray-200"
|
|
3446
3457
|
}, [
|
|
3447
|
-
|
|
3458
|
+
a("div", {
|
|
3448
3459
|
class: "cursor-pointer min-h-[60px] px-4 flex items-center justify-between",
|
|
3449
3460
|
onClick: t
|
|
3450
3461
|
}, [
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
class: B(["transition text-gray-400", { "rotate-x-180":
|
|
3462
|
+
a("h4", null, k(e.label), 1),
|
|
3463
|
+
a("div", {
|
|
3464
|
+
class: B(["transition text-gray-400", { "rotate-x-180": l.value }])
|
|
3454
3465
|
}, [
|
|
3455
3466
|
b(d, { class: "size-6" })
|
|
3456
3467
|
], 2)
|
|
3457
3468
|
]),
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3469
|
+
a("div", ra, [
|
|
3470
|
+
a("div", ca, [
|
|
3471
|
+
$(o.$slots, "default")
|
|
3461
3472
|
])
|
|
3462
3473
|
])
|
|
3463
3474
|
], 512);
|
|
3464
3475
|
};
|
|
3465
3476
|
}
|
|
3466
|
-
}),
|
|
3477
|
+
}), da = ["onDragstart", "onDragenter"], ua = {
|
|
3467
3478
|
key: 0,
|
|
3468
3479
|
class: "absolute inset-0 border border-dashed border-blue-600 rounded"
|
|
3469
|
-
},
|
|
3480
|
+
}, Xa = /* @__PURE__ */ V({
|
|
3470
3481
|
__name: "VDragDrop",
|
|
3471
3482
|
props: {
|
|
3472
3483
|
items: {},
|
|
3473
3484
|
itemKey: { default: "id" }
|
|
3474
3485
|
},
|
|
3475
3486
|
emits: ["update:items", "order-change"],
|
|
3476
|
-
setup(e, { emit:
|
|
3477
|
-
const
|
|
3487
|
+
setup(e, { emit: n }) {
|
|
3488
|
+
const l = n, s = D(null), t = D(0), o = D(-1), i = ({ id: m }) => ({
|
|
3478
3489
|
"opacity-30 scale-105 z-10": s.value === m,
|
|
3479
3490
|
"transition-transform duration-200": s.value !== m
|
|
3480
|
-
}), d = (m,
|
|
3481
|
-
s.value =
|
|
3491
|
+
}), d = (m, p, g) => {
|
|
3492
|
+
s.value = p, t.value = g, m.dataTransfer.effectAllowed = "move";
|
|
3482
3493
|
}, u = (m) => {
|
|
3483
|
-
s.value !== null && (
|
|
3484
|
-
},
|
|
3485
|
-
s.value = null,
|
|
3494
|
+
s.value !== null && (o.value = m);
|
|
3495
|
+
}, r = () => {
|
|
3496
|
+
s.value = null, o.value = -1;
|
|
3486
3497
|
}, c = (m) => {
|
|
3487
|
-
if (m.preventDefault(), s.value &&
|
|
3488
|
-
const
|
|
3489
|
-
if (
|
|
3490
|
-
const h = [...e.items], [x] = h.splice(
|
|
3491
|
-
h.splice(g, 0, x),
|
|
3498
|
+
if (m.preventDefault(), s.value && o.value !== -1) {
|
|
3499
|
+
const p = e.items.findIndex((h) => h[e.itemKey] === s.value), g = o.value;
|
|
3500
|
+
if (p !== g && g !== -1) {
|
|
3501
|
+
const h = [...e.items], [x] = h.splice(p, 1);
|
|
3502
|
+
h.splice(g, 0, x), l("update:items", h), l("order-change", { fromIndex: p, toIndex: g, movedItem: x, newOrder: h });
|
|
3492
3503
|
}
|
|
3493
3504
|
}
|
|
3494
|
-
|
|
3505
|
+
o.value = -1;
|
|
3495
3506
|
};
|
|
3496
|
-
return (m,
|
|
3497
|
-
onDragover:
|
|
3507
|
+
return (m, p) => (f(), v("div", {
|
|
3508
|
+
onDragover: p[1] || (p[1] = H(() => {
|
|
3498
3509
|
}, ["prevent"])),
|
|
3499
3510
|
onDrop: c
|
|
3500
3511
|
}, [
|
|
3501
|
-
b(
|
|
3512
|
+
b(Ne, {
|
|
3502
3513
|
"enter-active-class": "transition-all duration-300 ease",
|
|
3503
3514
|
"enter-from-class": "opacity-0 translate-x-8",
|
|
3504
3515
|
"enter-to-class": "opacity-100 translate-x-0",
|
|
@@ -3508,80 +3519,80 @@ const oa = F({ name: "ri-arrow-drop-down-line", render: sa }), aa = { class: "v-
|
|
|
3508
3519
|
"move-class": "transition-all duration-300 ease"
|
|
3509
3520
|
}, {
|
|
3510
3521
|
default: y(() => [
|
|
3511
|
-
(f(!0),
|
|
3522
|
+
(f(!0), v(O, null, R(e.items, (g, h) => (f(), v("div", {
|
|
3512
3523
|
key: `${g.id}_drug`,
|
|
3513
|
-
class: B(["relative group",
|
|
3524
|
+
class: B(["relative group", i(g)]),
|
|
3514
3525
|
draggable: "true",
|
|
3515
3526
|
onDragstart: (x) => d(x, g.id, h),
|
|
3516
3527
|
onDragenter: (x) => u(h),
|
|
3517
|
-
onDragend:
|
|
3518
|
-
onDragover:
|
|
3528
|
+
onDragend: r,
|
|
3529
|
+
onDragover: p[0] || (p[0] = H(() => {
|
|
3519
3530
|
}, ["prevent"]))
|
|
3520
3531
|
}, [
|
|
3521
|
-
|
|
3532
|
+
$(m.$slots, "default", {
|
|
3522
3533
|
item: g,
|
|
3523
3534
|
key: g.id,
|
|
3524
3535
|
index: h,
|
|
3525
3536
|
isDragging: s.value === g.id
|
|
3526
3537
|
}),
|
|
3527
|
-
|
|
3528
|
-
], 42,
|
|
3538
|
+
o.value === h && s.value !== g.id ? (f(), v("div", ua)) : E("", !0)
|
|
3539
|
+
], 42, da))), 128))
|
|
3529
3540
|
]),
|
|
3530
3541
|
_: 3
|
|
3531
3542
|
})
|
|
3532
3543
|
], 32));
|
|
3533
3544
|
}
|
|
3534
|
-
}),
|
|
3545
|
+
}), fa = { class: "min-w-full" }, ma = { class: "border-y border-gray-200 py-3 dark:border-gray-800" }, va = { class: "bg-gray-200 dark:bg-gray-800" }, pa = { class: "flex items-center" }, ha = { class: "divide-y divide-gray-100 dark:divide-gray-800" }, ga = ["onClick"], ba = { class: "flex items-center text-gray-700 dark:text-gray-400" }, ya = { key: 1 }, xa = {
|
|
3535
3546
|
class: "py-3 whitespace-nowrap",
|
|
3536
3547
|
colspan: "9"
|
|
3537
|
-
},
|
|
3548
|
+
}, $a = { class: "flex items-center justify-center text-theme-sm text-gray-700 dark:text-gray-400 px-2" }, Ya = /* @__PURE__ */ V({
|
|
3538
3549
|
__name: "VTable",
|
|
3539
3550
|
props: {
|
|
3540
3551
|
headers: { default: () => [] },
|
|
3541
3552
|
items: { default: () => [] }
|
|
3542
3553
|
},
|
|
3543
3554
|
emits: ["click"],
|
|
3544
|
-
setup(e, { emit:
|
|
3545
|
-
const
|
|
3546
|
-
return (
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
(f(!0),
|
|
3550
|
-
key:
|
|
3555
|
+
setup(e, { emit: n }) {
|
|
3556
|
+
const l = n, s = (i, d) => l("click", i, d), t = (i) => (i == null ? void 0 : i.className) || "", o = (i, { key: d }) => i == null ? void 0 : i[d];
|
|
3557
|
+
return (i, d) => (f(), v("table", fa, [
|
|
3558
|
+
a("thead", ma, [
|
|
3559
|
+
a("tr", va, [
|
|
3560
|
+
(f(!0), v(O, null, R(e.headers, (u, r) => (f(), v("th", {
|
|
3561
|
+
key: r,
|
|
3551
3562
|
class: B(["py-2 whitespace-nowrap text-gray-500 dark:text-gray-400 font-normal px-4", t(u)])
|
|
3552
3563
|
}, [
|
|
3553
|
-
|
|
3564
|
+
$(i.$slots, "header", {
|
|
3554
3565
|
item: u,
|
|
3555
|
-
i
|
|
3566
|
+
i: r
|
|
3556
3567
|
}, () => [
|
|
3557
|
-
|
|
3568
|
+
a("div", pa, k(u.name), 1)
|
|
3558
3569
|
])
|
|
3559
3570
|
], 2))), 128))
|
|
3560
3571
|
])
|
|
3561
3572
|
]),
|
|
3562
|
-
|
|
3563
|
-
e.items.length ? (f(!0),
|
|
3564
|
-
key:
|
|
3573
|
+
a("tbody", ha, [
|
|
3574
|
+
e.items.length ? (f(!0), v(O, { key: 0 }, R(e.items, (u, r) => (f(), v("tr", {
|
|
3575
|
+
key: r,
|
|
3565
3576
|
class: "hover:bg-gray-50/50 dark:hover:bg-gray-800/50",
|
|
3566
3577
|
onClick: (c) => s(u, c)
|
|
3567
3578
|
}, [
|
|
3568
|
-
(f(!0),
|
|
3579
|
+
(f(!0), v(O, null, R(e.headers, (c, m) => (f(), v("td", {
|
|
3569
3580
|
key: m,
|
|
3570
3581
|
class: "py-2 px-4"
|
|
3571
3582
|
}, [
|
|
3572
|
-
|
|
3573
|
-
|
|
3583
|
+
a("div", ba, [
|
|
3584
|
+
$(i.$slots, c.key, {
|
|
3574
3585
|
item: u,
|
|
3575
|
-
i
|
|
3586
|
+
i: r
|
|
3576
3587
|
}, () => [
|
|
3577
|
-
I(k(
|
|
3588
|
+
I(k(o(u, c)), 1)
|
|
3578
3589
|
])
|
|
3579
3590
|
])
|
|
3580
3591
|
]))), 128))
|
|
3581
|
-
], 8,
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3592
|
+
], 8, ga))), 128)) : (f(), v("tr", ya, [
|
|
3593
|
+
a("td", xa, [
|
|
3594
|
+
a("div", $a, [
|
|
3595
|
+
$(i.$slots, "empty", {}, () => [
|
|
3585
3596
|
d[0] || (d[0] = I("The list is empty", -1))
|
|
3586
3597
|
])
|
|
3587
3598
|
])
|
|
@@ -3590,31 +3601,31 @@ const oa = F({ name: "ri-arrow-drop-down-line", render: sa }), aa = { class: "v-
|
|
|
3590
3601
|
])
|
|
3591
3602
|
]));
|
|
3592
3603
|
}
|
|
3593
|
-
}),
|
|
3604
|
+
}), Za = /* @__PURE__ */ V({
|
|
3594
3605
|
__name: "VTooltip",
|
|
3595
3606
|
props: {
|
|
3596
3607
|
timeout: {},
|
|
3597
3608
|
disabled: { type: Boolean }
|
|
3598
3609
|
},
|
|
3599
3610
|
setup(e) {
|
|
3600
|
-
const
|
|
3601
|
-
e.disabled || (
|
|
3611
|
+
const n = D(!1), l = () => {
|
|
3612
|
+
e.disabled || (n.value = !0);
|
|
3602
3613
|
}, s = () => {
|
|
3603
|
-
|
|
3604
|
-
}, t =
|
|
3605
|
-
return
|
|
3614
|
+
n.value = !1;
|
|
3615
|
+
}, t = Re("tooltip");
|
|
3616
|
+
return $t(t, () => s()), (o, i) => (f(), v("div", {
|
|
3606
3617
|
ref: "tooltip",
|
|
3607
3618
|
class: "relative v-tooltip",
|
|
3608
|
-
onMouseenter:
|
|
3619
|
+
onMouseenter: l,
|
|
3609
3620
|
onMouseleave: s
|
|
3610
3621
|
}, [
|
|
3611
|
-
|
|
3622
|
+
a("button", {
|
|
3612
3623
|
type: "button",
|
|
3613
|
-
onClick:
|
|
3624
|
+
onClick: l
|
|
3614
3625
|
}, [
|
|
3615
|
-
|
|
3626
|
+
$(o.$slots, "activator")
|
|
3616
3627
|
]),
|
|
3617
|
-
b(
|
|
3628
|
+
b(ae, {
|
|
3618
3629
|
"enter-active-class": "duration-300 ease-out",
|
|
3619
3630
|
"enter-from-class": "transform opacity-0 -translate-y-2",
|
|
3620
3631
|
"enter-to-class": "opacity-100 translate-y-0",
|
|
@@ -3623,7 +3634,7 @@ const oa = F({ name: "ri-arrow-drop-down-line", render: sa }), aa = { class: "v-
|
|
|
3623
3634
|
"leave-to-class": "transform opacity-0 -translate-y-2"
|
|
3624
3635
|
}, {
|
|
3625
3636
|
default: y(() => [
|
|
3626
|
-
|
|
3637
|
+
$(o.$slots, "default", { show: n.value })
|
|
3627
3638
|
]),
|
|
3628
3639
|
_: 3
|
|
3629
3640
|
})
|
|
@@ -3637,51 +3648,51 @@ const oa = F({ name: "ri-arrow-drop-down-line", render: sa }), aa = { class: "v-
|
|
|
3637
3648
|
VTextField: J,
|
|
3638
3649
|
VSelect: te,
|
|
3639
3650
|
VWifiIcon: Ye,
|
|
3640
|
-
CardMain:
|
|
3651
|
+
CardMain: Gl,
|
|
3641
3652
|
VIconLogoMini: qe,
|
|
3642
3653
|
VIconLogo: Se,
|
|
3643
3654
|
VDialog: Be
|
|
3644
|
-
},
|
|
3655
|
+
}, Qa = {
|
|
3645
3656
|
install: (e) => {
|
|
3646
|
-
Object.keys(je).forEach((
|
|
3647
|
-
e.component(
|
|
3648
|
-
}), Vt.forEach(({ name:
|
|
3657
|
+
Object.keys(je).forEach((n) => {
|
|
3658
|
+
e.component(n, je[n]);
|
|
3659
|
+
}), Vt.forEach(({ name: n, directive: l }) => e.directive(n, l));
|
|
3649
3660
|
}
|
|
3650
3661
|
};
|
|
3651
3662
|
export {
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3663
|
+
Sa as AppAside,
|
|
3664
|
+
Va as AppHeader,
|
|
3665
|
+
Ta as AppNav,
|
|
3666
|
+
Ba as AppNotification,
|
|
3667
|
+
Ea as AppOverlay,
|
|
3668
|
+
La as AppProgress,
|
|
3669
|
+
ja as BlockBreadcrumb,
|
|
3670
|
+
Ma as BlockInfo,
|
|
3671
|
+
Aa as BlockScan,
|
|
3672
|
+
Da as BlockService,
|
|
3673
|
+
Ia as BlockStatus,
|
|
3674
|
+
Oa as BlockUpdate,
|
|
3675
|
+
ie as CardBase,
|
|
3676
|
+
Pa as CardButton,
|
|
3677
|
+
Ha as CardDate,
|
|
3678
|
+
Na as CardDimmer,
|
|
3679
|
+
Fa as CardInfo,
|
|
3680
|
+
Ra as CardInput,
|
|
3681
|
+
Ua as CardList,
|
|
3682
|
+
Gl as CardMain,
|
|
3683
|
+
xn as CardNotification,
|
|
3684
|
+
Ka as ItemEdit,
|
|
3685
|
+
Wa as ScriptEditor,
|
|
3686
|
+
qa as ScriptViewDocs,
|
|
3687
|
+
Ga as VAutocomplete,
|
|
3677
3688
|
A as VButton,
|
|
3678
3689
|
ro as VCheckbox,
|
|
3679
3690
|
Be as VDialog,
|
|
3680
|
-
|
|
3691
|
+
Xa as VDragDrop,
|
|
3681
3692
|
be as VDropdown,
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3693
|
+
Ja as VExpansion,
|
|
3694
|
+
Ol as VFile,
|
|
3695
|
+
$e as VFunc,
|
|
3685
3696
|
Se as VIconLogo,
|
|
3686
3697
|
qe as VIconLogoMini,
|
|
3687
3698
|
me as VList,
|
|
@@ -3689,17 +3700,17 @@ export {
|
|
|
3689
3700
|
Ve as VLoader,
|
|
3690
3701
|
Xe as VPopup,
|
|
3691
3702
|
te as VSelect,
|
|
3692
|
-
|
|
3703
|
+
Ya as VTable,
|
|
3693
3704
|
to as VTabs,
|
|
3694
3705
|
J as VTextField,
|
|
3695
|
-
|
|
3696
|
-
|
|
3706
|
+
Qe as VTextWrapper,
|
|
3707
|
+
Za as VTooltip,
|
|
3697
3708
|
Ye as VWifiIcon,
|
|
3698
|
-
|
|
3699
|
-
|
|
3709
|
+
ni as dashboardCards,
|
|
3710
|
+
Qa as default,
|
|
3700
3711
|
dt as getDataValue,
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3712
|
+
li as getFunction,
|
|
3713
|
+
si as getParamsData,
|
|
3714
|
+
oi as getStateItem,
|
|
3715
|
+
ai as setStateItem
|
|
3705
3716
|
};
|