mvframe 1.0.20 → 1.0.60
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/.cursor/rules/component-hierarchy.mdc +63 -0
- package/.cursor/rules/data.mdc +70 -0
- package/.cursor/rules/global-components.mdc +49 -0
- package/.cursor/rules/router.mdc +17 -0
- package/.cursor/rules/script-setup.mdc +33 -0
- package/.cursor/rules/style-system.mdc +219 -0
- package/.cursor/rules/util.mdc +60 -0
- package/.cursor/rules/views.mdc +69 -0
- package/.cursor/skills/mvframe-app-init/SKILL.md +1 -1
- package/README.cn.md +1 -1
- package/README.md +1 -1
- package/dist/Config.js +77 -160
- package/dist/composition.js +414 -244
- package/dist/css/cpt.css +1 -1
- package/dist/css/style.css +1 -1
- package/dist/index.js +1 -1
- package/dist/lodash.js +1 -1
- package/dist/maps.js +6 -5
- package/dist/store-shared.js +72 -58
- package/dist/util.js +67 -65
- package/dist/vendor.js +6274 -2232
- package/package.json +11 -4
- package/scripts/build-host.js +108 -0
- package/scripts/install-cursor-skill.js +0 -0
- package/scripts/scaffold-app.js +29 -0
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./util.js";
|
|
2
2
|
import "./directive.js";
|
|
3
3
|
import "./store-shared.js";
|
|
4
|
-
import {
|
|
4
|
+
import { j as m, k as o, g as n, a as r, m as g, b as l, c as u, n as L, p as M, u as c } from "./vendor.js";
|
|
5
5
|
import "./composition.js";
|
|
6
6
|
export {
|
|
7
7
|
m as builtinLocales,
|
package/dist/lodash.js
CHANGED
package/dist/maps.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as p, a as e, i as m, m as t, b as g, c as u, p as M, u as h } from "./vendor.js";
|
|
2
2
|
export {
|
|
3
3
|
p as default,
|
|
4
4
|
e as getMaps,
|
|
5
|
-
m as
|
|
6
|
-
t as
|
|
7
|
-
g as
|
|
5
|
+
m as mapJumpKeys,
|
|
6
|
+
t as mapLang,
|
|
7
|
+
g as mapLangPath,
|
|
8
|
+
u as mergeMaps,
|
|
8
9
|
M as patchMaps,
|
|
9
|
-
|
|
10
|
+
h as useMap
|
|
10
11
|
};
|
package/dist/store-shared.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { createPinia as
|
|
2
|
-
const
|
|
1
|
+
import { createPinia as w, defineStore as g } from "pinia";
|
|
2
|
+
const O = () => ({
|
|
3
3
|
lang: "en_us",
|
|
4
4
|
/** 路由切换 / 异步页面 chunk 加载期间为 true,由 router guard 维护 */
|
|
5
5
|
pageLoading: !1
|
|
6
|
-
}),
|
|
6
|
+
}), q = {
|
|
7
7
|
saveData(t, e) {
|
|
8
8
|
this[t] = e;
|
|
9
9
|
},
|
|
@@ -13,16 +13,16 @@ const T = () => ({
|
|
|
13
13
|
setPageLoading(t) {
|
|
14
14
|
this.pageLoading = !!t;
|
|
15
15
|
}
|
|
16
|
-
},
|
|
17
|
-
state:
|
|
18
|
-
actions:
|
|
19
|
-
},
|
|
16
|
+
}, E = {
|
|
17
|
+
state: O,
|
|
18
|
+
actions: q
|
|
19
|
+
}, m = (t) => t && typeof t == "object" ? t : {}, p = (t) => t && typeof t == "object" ? t : {}, L = () => ({
|
|
20
20
|
useTab: !1,
|
|
21
21
|
// 是否使用tab
|
|
22
22
|
tabs: [],
|
|
23
23
|
ctab: {}
|
|
24
24
|
// current tab
|
|
25
|
-
}),
|
|
25
|
+
}), N = {
|
|
26
26
|
saveData(t, e) {
|
|
27
27
|
this[t] = e;
|
|
28
28
|
},
|
|
@@ -31,26 +31,40 @@ const T = () => ({
|
|
|
31
31
|
},
|
|
32
32
|
saveTab(t) {
|
|
33
33
|
const { data: e, index: s } = this.tabs.filter1((r) => r.name === t.name);
|
|
34
|
-
if (e)
|
|
35
|
-
|
|
34
|
+
if (e) {
|
|
35
|
+
const r = JSON.stringify(m(e.params)) === JSON.stringify(m(t.params)), h = JSON.stringify(p(e.query)) === JSON.stringify(p(t.query));
|
|
36
|
+
if (r && h) {
|
|
36
37
|
this.saveCurrentTab(e);
|
|
37
38
|
return;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
}
|
|
40
|
+
const { fullPath: u, name: y, meta: c, params: S, query: v } = t, l = u.split("/");
|
|
41
|
+
let f;
|
|
42
|
+
l[l.length - 1] === "Home" ? f = l[l.length - 2] : f = l[l.length - 1], c != null && c.icon && (f = c.icon);
|
|
43
|
+
const T = {
|
|
44
|
+
name: y,
|
|
45
|
+
meta: c ?? e.meta,
|
|
46
|
+
path: l,
|
|
47
|
+
params: m(S),
|
|
48
|
+
query: p(v),
|
|
49
|
+
icon: f
|
|
50
|
+
};
|
|
51
|
+
this.tabs.splice(s, 1, T), this.saveCurrentTab(T);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const { fullPath: a, name: i, meta: n, params: b, query: $ } = t;
|
|
55
|
+
if (i !== "Login") {
|
|
42
56
|
const r = a.split("/");
|
|
43
|
-
let
|
|
44
|
-
r[r.length - 1] === "Home" ?
|
|
45
|
-
const
|
|
46
|
-
name:
|
|
47
|
-
meta:
|
|
57
|
+
let h;
|
|
58
|
+
r[r.length - 1] === "Home" ? h = r[r.length - 2] : h = r[r.length - 1], n != null && n.icon && (h = n.icon);
|
|
59
|
+
const u = {
|
|
60
|
+
name: i,
|
|
61
|
+
meta: n,
|
|
48
62
|
path: r,
|
|
49
|
-
params:
|
|
50
|
-
query:
|
|
51
|
-
icon:
|
|
52
|
-
}, { index:
|
|
53
|
-
this.tabs.splice(
|
|
63
|
+
params: m(b),
|
|
64
|
+
query: p($),
|
|
65
|
+
icon: h
|
|
66
|
+
}, { index: y } = this.tabs.filter1((c) => c.name === this.ctab.name);
|
|
67
|
+
this.tabs.splice(y + 1, 0, u), this.saveCurrentTab(u);
|
|
54
68
|
}
|
|
55
69
|
},
|
|
56
70
|
closeTab(t, e) {
|
|
@@ -58,20 +72,20 @@ const T = () => ({
|
|
|
58
72
|
this.tabs.splice(e, 1), t.name === this.ctab.name && ((s = globalThis.$router) == null || s.push({ name: this.tabs[e - 1 > 0 ? e - 1 : 0].name }));
|
|
59
73
|
},
|
|
60
74
|
closeRightTab(t, e) {
|
|
61
|
-
var
|
|
75
|
+
var i;
|
|
62
76
|
const s = [];
|
|
63
77
|
let a = !1;
|
|
64
|
-
this.tabs.forEach((
|
|
65
|
-
e >=
|
|
66
|
-
}), this.tabs = s, a && ((
|
|
78
|
+
this.tabs.forEach((n, b) => {
|
|
79
|
+
e >= b ? s.push(n) : n.name === this.ctab.name && (a = !0);
|
|
80
|
+
}), this.tabs = s, a && ((i = globalThis.$router) == null || i.push({ name: t.name }));
|
|
67
81
|
},
|
|
68
82
|
closeLeftTab(t, e) {
|
|
69
|
-
var
|
|
83
|
+
var i;
|
|
70
84
|
const s = [];
|
|
71
85
|
let a = !1;
|
|
72
|
-
this.tabs.forEach((
|
|
73
|
-
e <=
|
|
74
|
-
}), this.tabs = s, a && ((
|
|
86
|
+
this.tabs.forEach((n, b) => {
|
|
87
|
+
e <= b ? s.push(n) : n.name === this.ctab.name && (a = !0);
|
|
88
|
+
}), this.tabs = s, a && ((i = globalThis.$router) == null || i.push({ name: t.name }));
|
|
75
89
|
},
|
|
76
90
|
closeOtherTab(t, e) {
|
|
77
91
|
var s;
|
|
@@ -80,11 +94,11 @@ const T = () => ({
|
|
|
80
94
|
closeAllTab() {
|
|
81
95
|
this.tabs = [];
|
|
82
96
|
}
|
|
83
|
-
},
|
|
84
|
-
state:
|
|
85
|
-
actions:
|
|
86
|
-
getters:
|
|
87
|
-
},
|
|
97
|
+
}, J = {}, j = {
|
|
98
|
+
state: L,
|
|
99
|
+
actions: N,
|
|
100
|
+
getters: J
|
|
101
|
+
}, x = () => ({
|
|
88
102
|
type: "",
|
|
89
103
|
visible: !1,
|
|
90
104
|
options: [],
|
|
@@ -93,7 +107,7 @@ const T = () => ({
|
|
|
93
107
|
x: 0,
|
|
94
108
|
y: 0
|
|
95
109
|
}
|
|
96
|
-
}),
|
|
110
|
+
}), C = {
|
|
97
111
|
saveData(t, e) {
|
|
98
112
|
this[t] = e;
|
|
99
113
|
},
|
|
@@ -106,35 +120,35 @@ const T = () => ({
|
|
|
106
120
|
y: 0
|
|
107
121
|
}, this.type = "";
|
|
108
122
|
}
|
|
109
|
-
},
|
|
110
|
-
state:
|
|
111
|
-
actions:
|
|
112
|
-
getters:
|
|
113
|
-
},
|
|
123
|
+
}, D = {}, P = {
|
|
124
|
+
state: x,
|
|
125
|
+
actions: C,
|
|
126
|
+
getters: D
|
|
127
|
+
}, F = w(), o = {}, I = (t) => {
|
|
114
128
|
const e = t.match(/(?:^|[/\\])([^/\\]+)\.js$/);
|
|
115
129
|
return e ? e[1] : null;
|
|
116
|
-
},
|
|
130
|
+
}, A = (t) => {
|
|
117
131
|
Object.entries(t).forEach(([e, s]) => {
|
|
118
|
-
const a =
|
|
132
|
+
const a = I(e);
|
|
119
133
|
if (!a || !(s != null && s.default)) {
|
|
120
134
|
console.warn(`Invalid store module: ${e}`);
|
|
121
135
|
return;
|
|
122
136
|
}
|
|
123
137
|
try {
|
|
124
|
-
o[a] =
|
|
125
|
-
} catch (
|
|
126
|
-
console.error(`Failed to register store module '${a}':`,
|
|
138
|
+
o[a] = g(a, s.default);
|
|
139
|
+
} catch (i) {
|
|
140
|
+
console.error(`Failed to register store module '${a}':`, i);
|
|
127
141
|
}
|
|
128
142
|
});
|
|
129
143
|
};
|
|
130
|
-
o.init =
|
|
131
|
-
o.tab =
|
|
132
|
-
o.rmenu =
|
|
133
|
-
const
|
|
144
|
+
o.init = g("init", E);
|
|
145
|
+
o.tab = g("tab", j);
|
|
146
|
+
o.rmenu = g("rmenu", P);
|
|
147
|
+
const d = (t) => {
|
|
134
148
|
try {
|
|
135
149
|
switch (window.$getType(t)) {
|
|
136
150
|
case "Array":
|
|
137
|
-
t.forEach(
|
|
151
|
+
t.forEach(d);
|
|
138
152
|
break;
|
|
139
153
|
case "String":
|
|
140
154
|
const s = localStorage.getItem(t);
|
|
@@ -147,16 +161,16 @@ const f = (t) => {
|
|
|
147
161
|
} catch (e) {
|
|
148
162
|
console.error(`Failed to parse '${t}' from localStorage:`, e);
|
|
149
163
|
}
|
|
150
|
-
},
|
|
164
|
+
}, B = (t, { storeChips: e, useTab: s } = {}) => {
|
|
151
165
|
try {
|
|
152
|
-
t.use(
|
|
166
|
+
t.use(F).provide("store", o);
|
|
153
167
|
} catch (a) {
|
|
154
168
|
throw new Error("Failed to inject store into app:", a);
|
|
155
169
|
}
|
|
156
|
-
return s && (o.tab().saveData("useTab", !0),
|
|
170
|
+
return s && (o.tab().saveData("useTab", !0), d(["tabs", "ctab"])), e && A(e), o;
|
|
157
171
|
};
|
|
158
172
|
export {
|
|
159
|
-
|
|
160
|
-
|
|
173
|
+
B as a,
|
|
174
|
+
F as p,
|
|
161
175
|
o as s
|
|
162
176
|
};
|
package/dist/util.js
CHANGED
|
@@ -1,85 +1,88 @@
|
|
|
1
1
|
import { MVFRAME_STORAGE_LANG as N } from "./composition.js";
|
|
2
|
-
import {
|
|
3
|
-
f.
|
|
4
|
-
f.extend(
|
|
5
|
-
|
|
2
|
+
import { e as P } from "./vendor.js";
|
|
3
|
+
import { d as f, i as j, q as R } from "./dayjs.js";
|
|
4
|
+
f.extend(j);
|
|
5
|
+
f.extend(R);
|
|
6
|
+
const Q = (s) => {
|
|
6
7
|
globalThis.$d = f;
|
|
7
|
-
const u = (
|
|
8
|
+
const u = P();
|
|
9
|
+
s.config.globalProperties.$message = u, globalThis.$message = u;
|
|
10
|
+
const g = (e) => {
|
|
8
11
|
if (e.startsWith("/"))
|
|
9
12
|
return new URL(e, import.meta.url).href;
|
|
10
13
|
if (e)
|
|
11
14
|
return new URL((/* @__PURE__ */ Object.assign({}))[`/src/assets/img/${e}`], import.meta.url).href;
|
|
12
15
|
throw new Error("please provide an image url with getImg");
|
|
13
16
|
};
|
|
14
|
-
s.config.globalProperties.$getImg =
|
|
17
|
+
s.config.globalProperties.$getImg = g, globalThis.$getImg = g, globalThis.$getLang = () => {
|
|
15
18
|
var e;
|
|
16
19
|
return localStorage.getItem(N) || ((e = globalThis.$config) == null ? void 0 : e.lang) || "en_us";
|
|
17
20
|
}, globalThis.token = "WQpvrYIEnSzAxhOWrbUpGvElhGztdOjOGOdbrSlhUYlrQArOdpMhY1vYMSA7l4xMOUl9MAl1I6AvSrQ8vlE0bpChQ0UWMMlYt0hQC0M0pSz0rUhvlIllSWzMESnAMUlt";
|
|
18
|
-
const
|
|
19
|
-
globalThis.$md5 = (e) =>
|
|
20
|
-
const
|
|
21
|
+
const y = (e) => Number(e.match(/\d+(\.\d+)?/g).join(""));
|
|
22
|
+
globalThis.$md5 = (e) => y(e);
|
|
23
|
+
const T = (e, r = 0) => {
|
|
21
24
|
let o = parseInt(Math.random() * e);
|
|
22
25
|
return o += r, o;
|
|
23
26
|
};
|
|
24
|
-
globalThis.$rn =
|
|
25
|
-
const
|
|
27
|
+
globalThis.$rn = T;
|
|
28
|
+
const C = (e, r) => {
|
|
26
29
|
let o = [];
|
|
27
30
|
for (let t = 0; t < e; t++)
|
|
28
31
|
o.push(r(t));
|
|
29
32
|
return o;
|
|
30
33
|
};
|
|
31
|
-
globalThis.$fd =
|
|
32
|
-
const
|
|
33
|
-
s.config.globalProperties.$toUpperCamel =
|
|
34
|
-
const
|
|
34
|
+
globalThis.$fd = C;
|
|
35
|
+
const p = (e, r = !1) => e.substr(0, 1).toUpperCase() + (r ? e.substr(1, e.length).toLowerCase() : e.substr(1, e.length));
|
|
36
|
+
s.config.globalProperties.$toUpperCamel = p, globalThis.$toUpperCamel = p;
|
|
37
|
+
const b = (e, r = 2) => {
|
|
35
38
|
const o = globalThis.$getType(e);
|
|
36
39
|
let t;
|
|
37
40
|
o === "Number" ? (e = e.toFixed(r), t = String(e), e = String(Math.abs(e))) : o === "String" && (t = e, e = String(Math.abs(Number(e))));
|
|
38
|
-
const
|
|
39
|
-
let
|
|
40
|
-
|
|
41
|
+
const l = e.split(".");
|
|
42
|
+
let n = l[0].split("");
|
|
43
|
+
n = n.reverse();
|
|
41
44
|
let a = [];
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
n.forEach((I, $) => {
|
|
46
|
+
$ !== 0 && $ % 3 === 0 && a.push(","), a.push(I);
|
|
44
47
|
});
|
|
45
48
|
let i = a.reverse().join("");
|
|
46
|
-
return globalThis.$getType(r) === "Number" && r > 0 && (i += ".",
|
|
49
|
+
return globalThis.$getType(r) === "Number" && r > 0 && (i += ".", l[1] ? i += l[1].padEnd(r, 0).substr(0, r) : i += "0".padEnd(r, "0")), Number(t) !== Number(e) ? `-${i}` : i;
|
|
47
50
|
};
|
|
48
|
-
globalThis.$fa =
|
|
49
|
-
const
|
|
50
|
-
var
|
|
51
|
+
globalThis.$fa = b, s.config.globalProperties.$fa = b;
|
|
52
|
+
const M = (e, r) => {
|
|
53
|
+
var l, n;
|
|
51
54
|
const o = r == null ? void 0 : r[e];
|
|
52
55
|
if (o != null)
|
|
53
56
|
return o;
|
|
54
|
-
const t = (
|
|
57
|
+
const t = (n = (l = globalThis.$config) == null ? void 0 : l.table) == null ? void 0 : n.summaryMetric;
|
|
55
58
|
return t == null ? null : typeof t == "function" ? t(e) ?? null : t[e] ?? null;
|
|
56
|
-
},
|
|
57
|
-
const
|
|
58
|
-
if (
|
|
59
|
+
}, h = ({ prop: e, currency: r, value: o, obj: t }) => {
|
|
60
|
+
const l = M(e, t);
|
|
61
|
+
if (l == null || typeof l != "object")
|
|
59
62
|
return globalThis.$fa(o, 2);
|
|
60
|
-
if (
|
|
61
|
-
const
|
|
62
|
-
return
|
|
63
|
+
if (l.unit === "currency") {
|
|
64
|
+
const n = r ?? l.currency;
|
|
65
|
+
return n ? `${n} ${globalThis.$fa(o, l == null ? void 0 : l.precision)}` : globalThis.$fa(o, l == null ? void 0 : l.precision);
|
|
63
66
|
}
|
|
64
|
-
return
|
|
67
|
+
return l.unit === "%" ? `${globalThis.$fa(o, l == null ? void 0 : l.precision)}%` : globalThis.$fa(o, l == null ? void 0 : l.precision);
|
|
65
68
|
};
|
|
66
|
-
globalThis.$fu =
|
|
69
|
+
globalThis.$fu = h, s.config.globalProperties.$fu = h;
|
|
67
70
|
const k = (e = () => {
|
|
68
71
|
}, r = 2) => {
|
|
69
72
|
const o = Math.max(0, Number(r) || 2) * 100;
|
|
70
|
-
return new Promise((t,
|
|
73
|
+
return new Promise((t, l) => {
|
|
71
74
|
setTimeout(() => {
|
|
72
75
|
try {
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
} catch (
|
|
76
|
-
n
|
|
76
|
+
const n = e();
|
|
77
|
+
n != null && typeof n.then == "function" ? Promise.resolve(n).then((a) => t(a === void 0 ? !0 : a)).catch(l) : t(n === void 0 ? !0 : n);
|
|
78
|
+
} catch (n) {
|
|
79
|
+
l(n);
|
|
77
80
|
}
|
|
78
81
|
}, o);
|
|
79
82
|
});
|
|
80
83
|
};
|
|
81
84
|
globalThis.$pm = k;
|
|
82
|
-
const
|
|
85
|
+
const x = (e = () => {
|
|
83
86
|
}, r = 500) => {
|
|
84
87
|
let o;
|
|
85
88
|
return function(...t) {
|
|
@@ -88,7 +91,7 @@ const Y = (s) => {
|
|
|
88
91
|
}, r);
|
|
89
92
|
};
|
|
90
93
|
};
|
|
91
|
-
globalThis.$db =
|
|
94
|
+
globalThis.$db = x, Number.prototype.toFixedNumber = function(e) {
|
|
92
95
|
return Number(this.toFixed(e));
|
|
93
96
|
}, Array.prototype.filter1 = function(e) {
|
|
94
97
|
if (!e || typeof e != "function")
|
|
@@ -104,47 +107,46 @@ const Y = (s) => {
|
|
|
104
107
|
data: r
|
|
105
108
|
};
|
|
106
109
|
}, globalThis.$getType = (e) => Object.prototype.toString.call(e).slice(8, -1);
|
|
107
|
-
const
|
|
108
|
-
var
|
|
109
|
-
|
|
110
|
-
r != null && r.success && r.success({ message: e, center: !0, duration: 5e3 });
|
|
110
|
+
const m = (e) => {
|
|
111
|
+
var r;
|
|
112
|
+
(r = globalThis.$message) != null && r.success && globalThis.$message.success({ message: e, duration: 5e3 });
|
|
111
113
|
}, d = (e, r) => {
|
|
112
|
-
var
|
|
114
|
+
var l;
|
|
113
115
|
if (!e) {
|
|
114
116
|
console.info("No Value");
|
|
115
117
|
return;
|
|
116
118
|
}
|
|
117
|
-
const o = ((
|
|
119
|
+
const o = ((l = globalThis.$l) == null ? void 0 : l.call(globalThis, "Copied")) || "Copied";
|
|
118
120
|
let t;
|
|
119
121
|
if (r ? globalThis.$getType(r) !== "Boolean" ? t = `${o} ${r}: ${e}` : t = `${o}: ${e}` : t = o, navigator.clipboard && globalThis.isSecureContext)
|
|
120
|
-
navigator.clipboard.writeText(e).then(() =>
|
|
122
|
+
navigator.clipboard.writeText(e).then(() => m(t));
|
|
121
123
|
else {
|
|
122
|
-
let
|
|
123
|
-
|
|
124
|
+
let n = document.createElement("textarea");
|
|
125
|
+
n.value = e, n.style.position = "fixed", n.style.opacity = 0, document.body.appendChild(n), n.select(), document.execCommand("Copy"), n.remove(), m(t);
|
|
124
126
|
}
|
|
125
127
|
};
|
|
126
128
|
globalThis.$copy = d, s.config.globalProperties.$copy = d;
|
|
127
|
-
const
|
|
128
|
-
globalThis.$sc =
|
|
129
|
-
const
|
|
129
|
+
const F = (e) => e < 1e3 ? e : e < 1e6 ? parseInt(e / 1e3) + "k" : parseInt(e / 1e6) + "m";
|
|
130
|
+
globalThis.$sc = F;
|
|
131
|
+
const O = {
|
|
130
132
|
cpa: "avgCPA",
|
|
131
133
|
cpt: "avgCPT"
|
|
132
|
-
},
|
|
134
|
+
}, w = (e, r = O) => {
|
|
133
135
|
const o = r[e.name];
|
|
134
136
|
o && (e.name = o);
|
|
135
137
|
};
|
|
136
|
-
globalThis.$nr =
|
|
137
|
-
const
|
|
138
|
+
globalThis.$nr = w;
|
|
139
|
+
const A = (e, r) => (Object.keys(e).forEach((o) => {
|
|
138
140
|
objMap[o] && (e[objMap[o]] = e[o], delete e[o]);
|
|
139
141
|
}), e);
|
|
140
|
-
globalThis.$nro =
|
|
141
|
-
const
|
|
142
|
+
globalThis.$nro = A;
|
|
143
|
+
const S = (e) => {
|
|
142
144
|
let r = 0;
|
|
143
145
|
return Object.keys(e).forEach((o) => {
|
|
144
146
|
(globalThis.$getType(e[o]) === "Array" && e[o].length !== 0 || e[o]) && r++;
|
|
145
147
|
}), r;
|
|
146
148
|
};
|
|
147
|
-
globalThis.$pc =
|
|
149
|
+
globalThis.$pc = S;
|
|
148
150
|
const c = {
|
|
149
151
|
info: {
|
|
150
152
|
tag: "background-color:#0085FF; color:#f1f7ff; border-radius: 2px 0 0 2px;",
|
|
@@ -166,7 +168,7 @@ const Y = (s) => {
|
|
|
166
168
|
tag: "background-color:#20c997; color:#f6fffc; border-radius: 2px 0 0 2px;",
|
|
167
169
|
style: "background-color:#f6fffc; color:#20c997;"
|
|
168
170
|
}
|
|
169
|
-
},
|
|
171
|
+
}, E = (e) => {
|
|
170
172
|
let r = !1;
|
|
171
173
|
for (let o in e)
|
|
172
174
|
if (globalThis.$getType(e[o]) === "Object") {
|
|
@@ -174,11 +176,11 @@ const Y = (s) => {
|
|
|
174
176
|
break;
|
|
175
177
|
}
|
|
176
178
|
return r;
|
|
177
|
-
},
|
|
178
|
-
globalThis.$c = {},
|
|
179
|
+
}, U = ["info", "log", "warn", "error", "success"];
|
|
180
|
+
globalThis.$c = {}, U.forEach((e) => {
|
|
179
181
|
globalThis.$c[e] = (...r) => {
|
|
180
182
|
const o = e.toUpperCase();
|
|
181
|
-
|
|
183
|
+
E(r) ? (console.groupCollapsed(`%c ${o} `, `${c[e].tag}`), console[e](r), console.groupEnd()) : console.info(
|
|
182
184
|
`%c ${o} %c┆${r}┆`,
|
|
183
185
|
`${c[e].tag}`,
|
|
184
186
|
`${c[e].style}`
|
|
@@ -193,12 +195,12 @@ const Y = (s) => {
|
|
|
193
195
|
let o = r === "Array" ? [] : {};
|
|
194
196
|
for (let t in e)
|
|
195
197
|
if (Object.prototype.hasOwnProperty.call(e, t)) {
|
|
196
|
-
const
|
|
197
|
-
|
|
198
|
+
const l = window.$getType(e[t]);
|
|
199
|
+
l === "Object" || l === "Array" ? o[t] = window.$deepClone(e[t]) : o[t] = e[t];
|
|
198
200
|
}
|
|
199
201
|
return o;
|
|
200
202
|
};
|
|
201
203
|
};
|
|
202
204
|
export {
|
|
203
|
-
|
|
205
|
+
Q as u
|
|
204
206
|
};
|