vuesp-components 2.1.6 → 2.1.8
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 +2 -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/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/suggestions.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/types.d.ts +2 -1
- package/dist/components/script/editor/types.d.ts.map +1 -1
- package/dist/composables/index.es.js +50 -49
- package/dist/composables/types.d.ts +1 -0
- package/dist/composables/types.d.ts.map +1 -1
- package/dist/composables/useForms.d.ts.map +1 -1
- 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 +1346 -1392
- package/dist/style.css +1 -1
- package/dist/{useSwipeDown-CZyt34x6.js → useSwipeDown-BctVX4c1.js} +150 -164
- package/package.json +1 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
const c = (t) => {
|
|
2
|
+
try {
|
|
3
|
+
return t ? JSON.parse(t) : null;
|
|
4
|
+
} catch (e) {
|
|
5
|
+
return console.warn(e), t;
|
|
6
|
+
}
|
|
7
|
+
}, i = (t) => typeof t == "object" ? JSON.stringify(t) : t, h = (t) => c(i(t)), f = (t) => {
|
|
8
|
+
const e = ["B", "KB", "MB"];
|
|
9
|
+
if (t == 0) return "0 B";
|
|
10
|
+
let o = Math.floor(Math.log(t) / Math.log(1024));
|
|
11
|
+
return o > 1 && (o = 1), Math.round(t / Math.pow(1024, o)) + " " + e[o];
|
|
12
|
+
}, p = (t, e = { year: "numeric", month: "numeric", day: "numeric" }, o = []) => new Date(t).toLocaleDateString(o, e), S = (t, e = { minute: "2-digit", hour: "2-digit" }, o = []) => new Date(t).toLocaleTimeString(o, e), r = (t) => t >= 10 ? t : `0${t}`, w = (t) => {
|
|
13
|
+
const e = Math.floor(t % 31536e3 % 2628e3 / 86400), o = Math.floor(t % (3600 * 24) / 3600), n = Math.floor(t % 3600 / 60), u = Math.floor(t % 60);
|
|
14
|
+
return `${e ? e + " days " : ""} ${r(o)}:${r(n)}:${r(u)}`;
|
|
15
|
+
}, y = (t) => t.join("."), M = (t) => t.split(".").map((e) => +e), T = (t = 6) => [...Array(t)].map(() => "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"[Math.random() * 62 | 0]).join(""), j = (t, e = "file") => {
|
|
16
|
+
const o = document.createElement("a");
|
|
17
|
+
o.setAttribute("download", e), o.href = t, document.body.appendChild(o), o.click(), o.remove();
|
|
18
|
+
}, E = (t) => new Promise((e, o) => {
|
|
19
|
+
const n = document.createElement("script");
|
|
20
|
+
n.src = t, n.type = "text/javascript", n.async = !0, n.onload = () => e(n), n.onerror = () => o(new Error(`Ошибка загрузки скрипта: ${t}`)), document.head.appendChild(n);
|
|
21
|
+
}), s = typeof window < "u", a = (t) => (e, o) => o ? c(t.getItem(e)) : t.getItem(e), l = (t) => (e, o) => {
|
|
22
|
+
t.setItem(e, typeof o == "string" ? o : i(o));
|
|
23
|
+
}, d = s ? a(localStorage) : () => null, m = s ? l(localStorage) : () => {
|
|
24
|
+
}, L = s ? a(sessionStorage) : () => null, k = s ? l(sessionStorage) : () => {
|
|
25
|
+
}, B = (t = "isShow") => {
|
|
26
|
+
const e = d(t);
|
|
27
|
+
return e || m(t, "true"), !e;
|
|
28
|
+
}, $ = (t) => {
|
|
29
|
+
m("theme", t), document.documentElement.classList.remove("dark"), document.documentElement.classList.remove("light"), document.documentElement.classList.add(t);
|
|
30
|
+
}, g = (t, e) => {
|
|
31
|
+
if (!t) return null;
|
|
32
|
+
for (const o of t)
|
|
33
|
+
if (!(e === "/" || o.path === "/") && (o.path === e || e.includes(o.path)))
|
|
34
|
+
return o;
|
|
35
|
+
return null;
|
|
36
|
+
}, b = (t, e) => g(t, e);
|
|
37
|
+
export {
|
|
38
|
+
r as a,
|
|
39
|
+
y as b,
|
|
40
|
+
$ as c,
|
|
41
|
+
h as d,
|
|
42
|
+
j as e,
|
|
43
|
+
p as f,
|
|
44
|
+
g,
|
|
45
|
+
b as h,
|
|
46
|
+
B as i,
|
|
47
|
+
c as j,
|
|
48
|
+
i as k,
|
|
49
|
+
E as l,
|
|
50
|
+
d as m,
|
|
51
|
+
m as n,
|
|
52
|
+
L as o,
|
|
53
|
+
k as p,
|
|
54
|
+
M as q,
|
|
55
|
+
T as r,
|
|
56
|
+
w as s,
|
|
57
|
+
S as t,
|
|
58
|
+
f as u
|
|
59
|
+
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { IScriptEditorProps } from './types';
|
|
2
2
|
declare const _default: import('vue').DefineComponent<IScriptEditorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
3
|
+
"update:modelValue": (value: string) => any;
|
|
3
4
|
update: (value: string) => any;
|
|
4
5
|
}, string, import('vue').PublicProps, Readonly<IScriptEditorProps> & Readonly<{
|
|
6
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
5
7
|
onUpdate?: ((value: string) => any) | undefined;
|
|
6
8
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
7
9
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScriptEditor.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/script/editor/ScriptEditor.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScriptEditor.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/script/editor/ScriptEditor.vue"],"names":[],"mappings":"AAqGA,OAAO,KAAK,EAAE,kBAAkB,EAAqB,MAAM,SAAS,CAAC;;;;;;;;AAmGrE,wBAQG"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare
|
|
1
|
+
export declare const normalizeScript: (code: string) => string;
|
|
2
|
+
export declare function formatScript(codeString: string): string;
|
|
3
3
|
//# sourceMappingURL=format.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../src/components/script/editor/format.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../src/components/script/editor/format.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,WA6B3C,CAAC;AAOF,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAgEvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../../../../../src/components/script/editor/plugins/autocomplete.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../../../../../src/components/script/editor/plugins/autocomplete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,OAAO,KAAK,EAAe,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAgBjE,eAAO,MAAM,YAAY,GAAI,SAAS,oBAAoB,KAAG,MAyK5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/script/editor/plugins/render/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/script/editor/plugins/render/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAS5C,eAAO,MAAM,UAAU,GAAI,aAAa,WAAW,EAAE,EAAE,eAAe,MAAM,EAAE,UAAU,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,KAAG,WA+BjH,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,YAAY,WAAW,EAAE,UAAU;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,KAAG,WAiChG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestions.d.ts","sourceRoot":"","sources":["../../../../../src/components/script/editor/plugins/suggestions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"suggestions.d.ts","sourceRoot":"","sources":["../../../../../src/components/script/editor/plugins/suggestions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,mBAAmB,EAAE,WAAW,EAwB5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/script/editor/plugins/types.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/script/editor/plugins/types.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB;IACnC,iBAAiB,CAAC,EAAE,WAAW,EAAE,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAChC,IAAI,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,WAAW,CAAC;IACzC,UAAU,EAAE,CAAC,WAAW,EAAE,WAAW,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,KAAK,WAAW,CAAC;IAClH,aAAa,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,WAAW,CAAC;CAClG"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ISuggestion } from './plugins/types';
|
|
2
2
|
export interface IScriptEditorProps {
|
|
3
|
-
|
|
3
|
+
modelValue: string;
|
|
4
4
|
suggestions?: ISuggestion[];
|
|
5
5
|
}
|
|
6
6
|
export interface IScriptEditorEmit {
|
|
7
|
+
(e: 'update:modelValue', value: string): void;
|
|
7
8
|
(e: 'update', value: string): void;
|
|
8
9
|
}
|
|
9
10
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/script/editor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvE,MAAM,WAAW,kBAAkB;IACjC,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/script/editor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvE,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,WAAW,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,CAAC,CAAC,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9C,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC"}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { u as
|
|
3
|
-
function I(
|
|
4
|
-
const { validationSchema: l, initialValues:
|
|
5
|
-
|
|
6
|
-
),
|
|
7
|
-
|
|
1
|
+
import { ref as w, reactive as g, watch as B, computed as D } from "vue";
|
|
2
|
+
import { u as W, a as $ } from "../useSwipeDown-BctVX4c1.js";
|
|
3
|
+
function I(V) {
|
|
4
|
+
const { validationSchema: l, initialValues: v = {} } = V, b = typeof l == "function", m = w(
|
|
5
|
+
b ? l(v) : l
|
|
6
|
+
), y = w(!0), E = (t) => {
|
|
7
|
+
m.value = t;
|
|
8
8
|
const e = Object.keys(t), o = Object.keys(c);
|
|
9
9
|
e.forEach((s) => {
|
|
10
|
-
s in c || (c[s] =
|
|
10
|
+
s in c || (c[s] = v[s] ?? "", a[s] = [], u[s] = !1, h[s] = !1);
|
|
11
11
|
}), o.forEach((s) => {
|
|
12
12
|
e.includes(s) || (delete c[s], delete a[s], delete u[s], delete h[s]);
|
|
13
|
-
}),
|
|
14
|
-
}, c =
|
|
15
|
-
Object.keys(
|
|
16
|
-
c[t] =
|
|
17
|
-
});
|
|
18
|
-
}, i = () =>
|
|
13
|
+
}), j(), d();
|
|
14
|
+
}, c = g({}), a = g({}), u = g({}), h = g({}), f = /* @__PURE__ */ new Map(), R = () => {
|
|
15
|
+
Object.keys(m.value).forEach((t) => {
|
|
16
|
+
c[t] = v[t] ?? "", a[t] = [], u[t] = !1, h[t] = !1;
|
|
17
|
+
}), y.value = !0;
|
|
18
|
+
}, i = () => b ? l(c) : m.value, F = (t, e) => {
|
|
19
19
|
const s = i()[t] || [], n = [];
|
|
20
20
|
for (const r of s) {
|
|
21
21
|
const p = r(e, c);
|
|
22
22
|
p !== !0 && n.push(p);
|
|
23
23
|
}
|
|
24
24
|
return a[t] = n, n.length === 0;
|
|
25
|
-
},
|
|
25
|
+
}, O = (t, e) => {
|
|
26
26
|
const o = i();
|
|
27
27
|
if (!o[t]) return;
|
|
28
|
-
|
|
28
|
+
F(t, e);
|
|
29
29
|
const s = f.get(t);
|
|
30
30
|
s && s.forEach((n) => {
|
|
31
|
-
o[n] &&
|
|
32
|
-
});
|
|
33
|
-
},
|
|
31
|
+
o[n] && F(n, c[n]);
|
|
32
|
+
}), d();
|
|
33
|
+
}, j = () => {
|
|
34
34
|
f.clear();
|
|
35
35
|
const t = i();
|
|
36
36
|
Object.keys(t).forEach((e) => {
|
|
@@ -44,73 +44,74 @@ function I(w) {
|
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
});
|
|
47
|
-
},
|
|
47
|
+
}, d = () => {
|
|
48
48
|
const t = i();
|
|
49
49
|
let e = !0;
|
|
50
50
|
return Object.keys(t).forEach((o) => {
|
|
51
|
-
|
|
52
|
-
}), e;
|
|
53
|
-
},
|
|
51
|
+
F(o, c[o]) || (e = !1);
|
|
52
|
+
}), y.value = e, e;
|
|
53
|
+
}, x = (t, e = {}) => {
|
|
54
54
|
i()[t] || console.warn(`Field "${t}" not found in current validationSchema`);
|
|
55
|
-
const s =
|
|
55
|
+
const s = D({
|
|
56
56
|
get: () => c[t],
|
|
57
57
|
set: (r) => {
|
|
58
|
-
c[t] = r, h[t] = !0,
|
|
58
|
+
c[t] = r, h[t] = !0, O(t, r);
|
|
59
59
|
}
|
|
60
|
-
}), n =
|
|
61
|
-
var
|
|
60
|
+
}), n = D(() => {
|
|
61
|
+
var k;
|
|
62
62
|
const r = {
|
|
63
63
|
errors: a[t] || [],
|
|
64
64
|
touched: u[t] || !1,
|
|
65
65
|
dirty: h[t] || !1
|
|
66
66
|
}, p = {
|
|
67
|
-
message: (
|
|
68
|
-
onInput: (
|
|
69
|
-
const
|
|
70
|
-
s.value =
|
|
67
|
+
message: (k = a[t]) == null ? void 0 : k[0],
|
|
68
|
+
onInput: (S) => {
|
|
69
|
+
const z = S.target;
|
|
70
|
+
s.value = z.value;
|
|
71
71
|
},
|
|
72
72
|
onBlur: () => {
|
|
73
|
-
u[t] = !0,
|
|
73
|
+
u[t] = !0, O(t, c[t]);
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
76
|
if (e.props) {
|
|
77
|
-
const
|
|
78
|
-
return { ...p, ...
|
|
77
|
+
const S = e.props(r);
|
|
78
|
+
return { ...p, ...S };
|
|
79
79
|
}
|
|
80
80
|
return p;
|
|
81
81
|
});
|
|
82
82
|
return [s, n];
|
|
83
|
-
},
|
|
83
|
+
}, A = (t) => async (e) => {
|
|
84
84
|
e && e.preventDefault();
|
|
85
85
|
const o = i();
|
|
86
86
|
Object.keys(o).forEach((n) => {
|
|
87
87
|
u[n] = !0;
|
|
88
|
-
}),
|
|
89
|
-
},
|
|
88
|
+
}), d() && await t(c);
|
|
89
|
+
}, K = () => {
|
|
90
90
|
const t = i();
|
|
91
91
|
Object.keys(t).forEach((e) => {
|
|
92
|
-
c[e] =
|
|
93
|
-
});
|
|
92
|
+
c[e] = v[e] || "", a[e] = [], u[e] = !1, h[e] = !1;
|
|
93
|
+
}), y.value = !0;
|
|
94
94
|
};
|
|
95
|
-
return
|
|
95
|
+
return R(), j(), b && B(
|
|
96
96
|
() => c,
|
|
97
97
|
() => {
|
|
98
|
-
const t = l(c), e =
|
|
99
|
-
(o.length !== s.length || o.some((n) => !s.includes(n))) &&
|
|
98
|
+
const t = l(c), e = m.value, o = Object.keys(t), s = Object.keys(e);
|
|
99
|
+
(o.length !== s.length || o.some((n) => !s.includes(n))) && E(t);
|
|
100
100
|
},
|
|
101
101
|
{ deep: !0 }
|
|
102
102
|
), {
|
|
103
103
|
values: c,
|
|
104
104
|
errors: a,
|
|
105
|
-
defineField:
|
|
106
|
-
handleSubmit:
|
|
107
|
-
resetForm:
|
|
108
|
-
validate:
|
|
109
|
-
updateSchema:
|
|
105
|
+
defineField: x,
|
|
106
|
+
handleSubmit: A,
|
|
107
|
+
resetForm: K,
|
|
108
|
+
validate: d,
|
|
109
|
+
updateSchema: E,
|
|
110
|
+
isValid: y
|
|
110
111
|
};
|
|
111
112
|
}
|
|
112
113
|
export {
|
|
113
|
-
|
|
114
|
+
W as useDialog,
|
|
114
115
|
I as useForm,
|
|
115
|
-
|
|
116
|
+
$ as useSwipeDown
|
|
116
117
|
};
|
|
@@ -29,6 +29,7 @@ export interface UseFormOptions {
|
|
|
29
29
|
export interface UseFormReturn {
|
|
30
30
|
values: Record<string, unknown>;
|
|
31
31
|
errors: Record<string, string[]>;
|
|
32
|
+
isValid: Ref<boolean>;
|
|
32
33
|
defineField: <T = unknown>(name: string, options?: DefineFieldOptions) => [Ref<T>, ComputedRef<Record<string, unknown>>];
|
|
33
34
|
handleSubmit: (callback: (values: Record<string, unknown>) => void | Promise<void>) => (event?: Event) => Promise<void>;
|
|
34
35
|
resetForm: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/composables/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAE5C,MAAM,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,GAAG,MAAM,CAAC;AAC3F,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAC3D,MAAM,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OA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
{"version":3,"file":"useForms.d.ts","sourceRoot":"","sources":["../../src/composables/useForms.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EAKd,MAAM,qBAAqB,CAAC;AAG7B,wBAAgB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,aAAa,
|
|
1
|
+
{"version":3,"file":"useForms.d.ts","sourceRoot":"","sources":["../../src/composables/useForms.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EAKd,MAAM,qBAAqB,CAAC;AAG7B,wBAAgB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,aAAa,CAgP9D"}
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,mCAAmC,CAAC"}
|
package/dist/helpers/index.es.js
CHANGED
|
@@ -1,59 +1,81 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { a as f, b as m, c as d, d as k, e as b, f as S, g, h as y, i as T, j as v, k as W, l as _, m as w, n as j, r as q, s as x, o as z, p as G, q as P, t as U, u as A } from "../app-CG8zhRFf.js";
|
|
2
|
+
const c = (o) => {
|
|
3
|
+
let s = "", n = !1, i = "";
|
|
4
|
+
for (let a = 0; a < o.length; a++) {
|
|
5
|
+
const t = o[a];
|
|
6
|
+
if ((t === '"' || t === "'") && (a === 0 || o[a - 1] !== "\\")) {
|
|
7
|
+
n ? (t === i && (n = !1), s += t) : (n = !0, i = t, s += t);
|
|
8
|
+
continue;
|
|
9
|
+
}
|
|
10
|
+
if (n) {
|
|
11
|
+
s += t;
|
|
12
|
+
continue;
|
|
13
|
+
}
|
|
14
|
+
t === " " || t === " " || t === `
|
|
15
|
+
` || t === "\r" || (s += t);
|
|
6
16
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
17
|
+
return s;
|
|
18
|
+
};
|
|
19
|
+
function p(o) {
|
|
20
|
+
const s = [];
|
|
21
|
+
let n = "";
|
|
22
|
+
for (let e = 0; e < o.length; e++) {
|
|
23
|
+
const l = o[e];
|
|
24
|
+
if (l === ";") {
|
|
25
|
+
if (n.trim()) {
|
|
26
|
+
const r = n.trim();
|
|
27
|
+
r.startsWith("while:") || r.startsWith("if:") || r.startsWith("on(") ? s.push({ type: "block_start", value: r }) : r === "else" ? s.push({ type: "else", value: r }) : r === "end" ? s.push({ type: "block_end", value: r }) : s.push({ type: "command", value: r }), n = "";
|
|
28
|
+
}
|
|
29
|
+
} else
|
|
30
|
+
n += l;
|
|
31
|
+
}
|
|
32
|
+
if (n.trim()) {
|
|
33
|
+
const e = n.trim();
|
|
34
|
+
e.startsWith("while:") || e.startsWith("if:") || e.startsWith("on(") ? s.push({ type: "block_start", value: e }) : e === "else" ? s.push({ type: "else", value: e }) : e === "end" ? s.push({ type: "block_end", value: e }) : s.push({ type: "command", value: e });
|
|
35
|
+
}
|
|
36
|
+
const i = [];
|
|
37
|
+
let a = 0;
|
|
38
|
+
const t = 2;
|
|
39
|
+
for (const e of s)
|
|
40
|
+
switch (e.type) {
|
|
41
|
+
case "block_start":
|
|
42
|
+
i.push(" ".repeat(a * t) + e.value + ";"), a++;
|
|
43
|
+
break;
|
|
44
|
+
case "else":
|
|
45
|
+
a--, i.push(" ".repeat(a * t) + e.value + ";"), a++;
|
|
46
|
+
break;
|
|
47
|
+
case "block_end":
|
|
48
|
+
a--, i.push(" ".repeat(a * t) + e.value + ";");
|
|
49
|
+
break;
|
|
50
|
+
case "command":
|
|
51
|
+
i.push(" ".repeat(a * t) + e.value + ";");
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
return i.join(`
|
|
55
|
+
`);
|
|
56
|
+
}
|
|
37
57
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
58
|
+
f as addZero,
|
|
59
|
+
m as arrToStr,
|
|
60
|
+
d as changeTheme,
|
|
61
|
+
k as clone,
|
|
62
|
+
b as createDownloadLink,
|
|
43
63
|
S as dateUtcToString,
|
|
44
64
|
g as findMenuItem,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
65
|
+
p as formatScript,
|
|
66
|
+
y as getPageTitle,
|
|
67
|
+
T as isNewVersion,
|
|
68
|
+
v as jsonParse,
|
|
69
|
+
W as jsonString,
|
|
70
|
+
_ as loadScript,
|
|
71
|
+
w as localGet,
|
|
72
|
+
j as localSet,
|
|
73
|
+
c as normalizeScript,
|
|
74
|
+
q as randomString,
|
|
75
|
+
x as secToTime,
|
|
76
|
+
z as sessionGet,
|
|
77
|
+
G as sessionSet,
|
|
78
|
+
P as strToArr,
|
|
79
|
+
U as timeUtcToString,
|
|
80
|
+
A as toByte
|
|
59
81
|
};
|