mvframe 1.1.10 → 1.1.11
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/global-components.mdc +1 -1
- package/.cursor/rules/style-system.mdc +28 -3
- package/dist/composition.js +188 -184
- package/dist/css/cpt.css +1 -1
- package/dist/css/style.css +1 -1
- package/dist/vendor.js +2 -2
- package/package.json +1 -1
- package/scripts/install-codex-agents.js +1 -1
package/dist/composition.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { M as q, g as
|
|
2
|
-
import { a as
|
|
1
|
+
import { M as q, g as D, s as z } from "./vendor.js";
|
|
2
|
+
import { a as je, m as Ue, b as Be, c as Ne, p as Fe, u as We } from "./vendor.js";
|
|
3
3
|
import H from "axios";
|
|
4
|
-
const G = "lang",
|
|
4
|
+
const G = "lang", Se = (e, t) => {
|
|
5
5
|
var i, a;
|
|
6
6
|
const n = typeof window < "u", r = () => {
|
|
7
|
-
var
|
|
7
|
+
var p;
|
|
8
8
|
if (!n)
|
|
9
9
|
return { innerWidth: 1920, innerHeight: 1080 };
|
|
10
|
-
const
|
|
11
|
-
innerWidth:
|
|
12
|
-
innerHeight:
|
|
13
|
-
outerWidth:
|
|
14
|
-
outerHeight:
|
|
15
|
-
screenWidth: u.width ??
|
|
16
|
-
screenHeight: u.height ??
|
|
17
|
-
availWidth: u.availWidth ??
|
|
18
|
-
availHeight: u.availHeight ??
|
|
19
|
-
devicePixelRatio:
|
|
20
|
-
bodyHeight:
|
|
21
|
-
drawerHeight: parseInt(
|
|
22
|
-
pageHeight:
|
|
23
|
-
pageWidth:
|
|
10
|
+
const o = window, l = typeof navigator < "u" ? o.navigator : {}, u = o.screen || {}, m = o.visualViewport, c = {
|
|
11
|
+
innerWidth: o.innerWidth,
|
|
12
|
+
innerHeight: o.innerHeight,
|
|
13
|
+
outerWidth: o.outerWidth,
|
|
14
|
+
outerHeight: o.outerHeight,
|
|
15
|
+
screenWidth: u.width ?? o.innerWidth,
|
|
16
|
+
screenHeight: u.height ?? o.innerHeight,
|
|
17
|
+
availWidth: u.availWidth ?? o.innerWidth,
|
|
18
|
+
availHeight: u.availHeight ?? o.innerHeight,
|
|
19
|
+
devicePixelRatio: o.devicePixelRatio || 1,
|
|
20
|
+
bodyHeight: o.innerHeight - ((p = t.pinia) != null && p.useTab ? 36 : 0) - 64 - 32,
|
|
21
|
+
drawerHeight: parseInt(o.innerHeight * 0.9),
|
|
22
|
+
pageHeight: o.innerHeight - 64 - 32,
|
|
23
|
+
pageWidth: o.innerWidth
|
|
24
24
|
};
|
|
25
25
|
m && (c.visualViewportWidth = m.width, c.visualViewportHeight = m.height, c.visualViewportScale = m.scale);
|
|
26
26
|
const f = l.userAgent || "";
|
|
@@ -32,23 +32,23 @@ const G = "lang", ve = (e, t) => {
|
|
|
32
32
|
cookieEnabled: !!l.cookieEnabled,
|
|
33
33
|
onLine: l.onLine !== !1,
|
|
34
34
|
maxTouchPoints: l.maxTouchPoints || 0,
|
|
35
|
-
isTouch: "ontouchstart" in
|
|
35
|
+
isTouch: "ontouchstart" in o || (l.maxTouchPoints || 0) > 0,
|
|
36
36
|
isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile/i.test(
|
|
37
37
|
f
|
|
38
38
|
)
|
|
39
39
|
}, console.info(c), c;
|
|
40
|
-
},
|
|
40
|
+
}, s = () => {
|
|
41
41
|
var l;
|
|
42
|
-
const
|
|
42
|
+
const o = r();
|
|
43
43
|
globalThis.$config = globalThis.$config || {}, globalThis.$config.options = {
|
|
44
44
|
...globalThis.$config.options || {},
|
|
45
|
-
...
|
|
45
|
+
...o
|
|
46
46
|
}, (l = e == null ? void 0 : e.config) != null && l.globalProperties && (e.config.globalProperties.$config = globalThis.$config);
|
|
47
47
|
};
|
|
48
|
-
|
|
48
|
+
s(), n && (window.addEventListener("resize", s, { passive: !0 }), (a = (i = window.visualViewport) == null ? void 0 : i.addEventListener) == null || a.call(i, "resize", s, {
|
|
49
49
|
passive: !0
|
|
50
50
|
}));
|
|
51
|
-
},
|
|
51
|
+
}, $e = (e, t) => {
|
|
52
52
|
var l, u, m;
|
|
53
53
|
const n = t || {}, r = Array.isArray(n.use) && n.use.length > 0 ? n.use : q;
|
|
54
54
|
globalThis.$config = globalThis.$config || {}, globalThis.$config.langUse = r.filter(
|
|
@@ -56,16 +56,16 @@ const G = "lang", ve = (e, t) => {
|
|
|
56
56
|
), (l = e == null ? void 0 : e.config) != null && l.globalProperties && (e.config.globalProperties.$config = globalThis.$config);
|
|
57
57
|
const i = (typeof localStorage < "u" ? localStorage.getItem(G) : null) || ((u = globalThis.$config) == null ? void 0 : u.lang) || "en_us", a = Object.assign(
|
|
58
58
|
{},
|
|
59
|
-
|
|
59
|
+
D(i),
|
|
60
60
|
((m = globalThis.$config) == null ? void 0 : m.langMaps) || {},
|
|
61
61
|
n.langMaps || {}
|
|
62
|
-
),
|
|
62
|
+
), o = (c, f) => {
|
|
63
63
|
if (c)
|
|
64
64
|
if (f && globalThis.$getType(f) === "Object") {
|
|
65
|
-
let
|
|
65
|
+
let p = a[c] || c;
|
|
66
66
|
return Object.keys(f).forEach((d) => {
|
|
67
|
-
|
|
68
|
-
}),
|
|
67
|
+
p[`{${d}}`] = f[d];
|
|
68
|
+
}), p;
|
|
69
69
|
} else
|
|
70
70
|
return a[c] || c;
|
|
71
71
|
else
|
|
@@ -73,24 +73,24 @@ const G = "lang", ve = (e, t) => {
|
|
|
73
73
|
};
|
|
74
74
|
globalThis.$patchLangMaps = (c) => {
|
|
75
75
|
c && globalThis.$getType(c) === "Object" && Object.assign(a, c);
|
|
76
|
-
}, globalThis.$l =
|
|
76
|
+
}, globalThis.$l = o, e.config.globalProperties.$l = o, e.config.globalProperties.$patchLangMaps = globalThis.$patchLangMaps, String.prototype.$l = function() {
|
|
77
77
|
return $l(this);
|
|
78
78
|
};
|
|
79
|
-
},
|
|
79
|
+
}, Le = (e, t) => {
|
|
80
80
|
if (!e || !t) return !1;
|
|
81
|
-
const n = e.getBoundingClientRect(), r = t.getBoundingClientRect(),
|
|
82
|
-
return
|
|
81
|
+
const n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), s = r.right > n.left && r.left < n.right, i = r.bottom > n.top && r.top < n.bottom;
|
|
82
|
+
return s && i;
|
|
83
83
|
}, Y = (e, t) => {
|
|
84
84
|
if (e === t) return !0;
|
|
85
85
|
if (e == null || t == null || typeof e != "object" || typeof t != "object")
|
|
86
86
|
return JSON.stringify(e) === JSON.stringify(t);
|
|
87
87
|
const n = Object.keys(e), r = Object.keys(t);
|
|
88
88
|
if (n.length !== r.length) return !1;
|
|
89
|
-
for (const
|
|
90
|
-
if (!r.includes(
|
|
89
|
+
for (const s of n)
|
|
90
|
+
if (!r.includes(s) || !Y(e[s], t[s])) return !1;
|
|
91
91
|
return !0;
|
|
92
|
-
},
|
|
93
|
-
const n = t ||
|
|
92
|
+
}, k = "download", K = 150, X = (e, t = k) => {
|
|
93
|
+
const n = t || k, r = String(e ?? "").trim();
|
|
94
94
|
if (!r) return n;
|
|
95
95
|
const i = r.replace(/[/\\?%*:|"<>]/g, "_").replace(/\.\./g, "_").split(/[/\\]/).pop() || n, a = 200;
|
|
96
96
|
return i.length > a ? i.slice(0, a) : i;
|
|
@@ -98,17 +98,17 @@ const G = "lang", ve = (e, t) => {
|
|
|
98
98
|
const t = ((e == null ? void 0 : e.type) || "").toLowerCase();
|
|
99
99
|
return t ? t.includes("spreadsheet") || t.includes("ms-excel") || t.includes("excel") && t.includes("application") : !1;
|
|
100
100
|
}, S = (e, t) => {
|
|
101
|
-
const n = URL.createObjectURL(e), r = X(t),
|
|
102
|
-
|
|
101
|
+
const n = URL.createObjectURL(e), r = X(t), s = document.createElement("a");
|
|
102
|
+
s.href = n, s.download = r, s.style.display = "none", document.body.appendChild(s);
|
|
103
103
|
try {
|
|
104
|
-
|
|
104
|
+
s.click();
|
|
105
105
|
} finally {
|
|
106
|
-
document.body.removeChild(
|
|
106
|
+
document.body.removeChild(s), setTimeout(() => URL.revokeObjectURL(n), K);
|
|
107
107
|
}
|
|
108
108
|
}, Q = (e) => {
|
|
109
109
|
if (!e || e.source !== void 0 || e.type === void 0)
|
|
110
110
|
return e;
|
|
111
|
-
const { type: t, data: n, url: r, headers:
|
|
111
|
+
const { type: t, data: n, url: r, headers: s, name: i, filename: a, init: o, ...l } = e, u = a ?? i;
|
|
112
112
|
return t === "csv" ? {
|
|
113
113
|
...l,
|
|
114
114
|
source: "inline",
|
|
@@ -119,37 +119,37 @@ const G = "lang", ve = (e, t) => {
|
|
|
119
119
|
...l,
|
|
120
120
|
source: "fetch",
|
|
121
121
|
url: r,
|
|
122
|
-
init: { ...
|
|
122
|
+
init: { ...o || {}, headers: s ?? (o == null ? void 0 : o.headers) },
|
|
123
123
|
response: "blob",
|
|
124
124
|
expectExcel: !0,
|
|
125
125
|
filename: u
|
|
126
126
|
} : e;
|
|
127
|
-
},
|
|
127
|
+
}, Ae = async (e = {}) => {
|
|
128
128
|
const t = Q(e), {
|
|
129
129
|
source: n = "inline",
|
|
130
130
|
content: r,
|
|
131
|
-
blob:
|
|
131
|
+
blob: s,
|
|
132
132
|
bom: i = !0,
|
|
133
133
|
mime: a,
|
|
134
|
-
url:
|
|
134
|
+
url: o,
|
|
135
135
|
init: l,
|
|
136
136
|
response: u = "blob",
|
|
137
137
|
openIn: m = "self",
|
|
138
138
|
expectExcel: c,
|
|
139
139
|
filename: f,
|
|
140
|
-
name:
|
|
140
|
+
name: p,
|
|
141
141
|
error: d = () => {
|
|
142
142
|
},
|
|
143
143
|
// 避免 legacy 字段渗入后续逻辑
|
|
144
|
-
type:
|
|
145
|
-
data:
|
|
146
|
-
headers:
|
|
147
|
-
...
|
|
148
|
-
} = t, M = f ??
|
|
144
|
+
type: _e,
|
|
145
|
+
data: Te,
|
|
146
|
+
headers: we,
|
|
147
|
+
...Me
|
|
148
|
+
} = t, M = f ?? p;
|
|
149
149
|
try {
|
|
150
150
|
if (n === "inline") {
|
|
151
|
-
if (
|
|
152
|
-
S(
|
|
151
|
+
if (s instanceof Blob) {
|
|
152
|
+
S(s, M);
|
|
153
153
|
return;
|
|
154
154
|
}
|
|
155
155
|
if (r == null) {
|
|
@@ -161,18 +161,18 @@ const G = "lang", ve = (e, t) => {
|
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
163
|
if (n === "fetch") {
|
|
164
|
-
if (!
|
|
164
|
+
if (!o) {
|
|
165
165
|
d(new Error("url is required for fetch"));
|
|
166
166
|
return;
|
|
167
167
|
}
|
|
168
|
-
const h = await fetch(
|
|
168
|
+
const h = await fetch(o, l);
|
|
169
169
|
if (!h.ok) {
|
|
170
170
|
d(new Error(`fetch failed: ${h.status}`));
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
173
|
if (u === "text") {
|
|
174
|
-
const R = await h.text(),
|
|
175
|
-
S(new Blob([
|
|
174
|
+
const R = await h.text(), F = i ? "\uFEFF" + R : R, W = a || (i ? "text/csv;charset=utf-8" : "text/plain;charset=utf-8");
|
|
175
|
+
S(new Blob([F], { type: W }), M);
|
|
176
176
|
return;
|
|
177
177
|
}
|
|
178
178
|
const v = await h.blob();
|
|
@@ -184,11 +184,11 @@ const G = "lang", ve = (e, t) => {
|
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
186
|
if (n === "open") {
|
|
187
|
-
if (!
|
|
187
|
+
if (!o) {
|
|
188
188
|
d(new Error("url is required for open"));
|
|
189
189
|
return;
|
|
190
190
|
}
|
|
191
|
-
m === "blank" ? window.open(
|
|
191
|
+
m === "blank" ? window.open(o, "_blank", "noopener,noreferrer") : window.location.href = o;
|
|
192
192
|
return;
|
|
193
193
|
}
|
|
194
194
|
d(new Error(`unknown source: ${n}`));
|
|
@@ -199,20 +199,20 @@ const G = "lang", ve = (e, t) => {
|
|
|
199
199
|
function Z(e, t, n) {
|
|
200
200
|
if (t === "" || t === void 0 || t === null)
|
|
201
201
|
return "";
|
|
202
|
-
const r = globalThis.$fa,
|
|
203
|
-
if ((a === "currency" || a === "%") &&
|
|
204
|
-
const
|
|
202
|
+
const r = globalThis.$fa, s = globalThis.$fu, i = (n == null ? void 0 : n.precision) ?? 2, a = n == null ? void 0 : n.unit;
|
|
203
|
+
if ((a === "currency" || a === "%") && s) {
|
|
204
|
+
const o = {
|
|
205
205
|
[e]: {
|
|
206
206
|
unit: a === "currency" ? "currency" : "%",
|
|
207
207
|
precision: i
|
|
208
208
|
}
|
|
209
209
|
};
|
|
210
210
|
try {
|
|
211
|
-
return
|
|
211
|
+
return s({
|
|
212
212
|
prop: e,
|
|
213
213
|
currency: n == null ? void 0 : n.currency,
|
|
214
214
|
value: t,
|
|
215
|
-
obj:
|
|
215
|
+
obj: o
|
|
216
216
|
});
|
|
217
217
|
} catch {
|
|
218
218
|
}
|
|
@@ -226,33 +226,33 @@ function Z(e, t, n) {
|
|
|
226
226
|
return String(t);
|
|
227
227
|
}
|
|
228
228
|
function Pe(e, t, n = {}) {
|
|
229
|
-
const { columns: r = [] } = e || {}, { resolveMetric:
|
|
229
|
+
const { columns: r = [] } = e || {}, { resolveMetric: s } = n;
|
|
230
230
|
return !r.length || !t || typeof t != "object" ? [] : r.map((i) => {
|
|
231
231
|
const a = i.property ?? i.prop ?? "";
|
|
232
232
|
if (!a)
|
|
233
233
|
return "";
|
|
234
|
-
let
|
|
235
|
-
if (
|
|
234
|
+
let o = t[a];
|
|
235
|
+
if (o === void 0 && (o = ""), o === "")
|
|
236
236
|
return "";
|
|
237
|
-
const l = typeof
|
|
237
|
+
const l = typeof s == "function" ? s(a) : void 0;
|
|
238
238
|
try {
|
|
239
|
-
return Z(a,
|
|
239
|
+
return Z(a, o, l);
|
|
240
240
|
} catch {
|
|
241
|
-
return String(
|
|
241
|
+
return String(o);
|
|
242
242
|
}
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
|
-
const
|
|
245
|
+
const C = "mvframe_primary", V = "mvframe_theme", I = "mvframe_theme_name", ee = "dark", $ = "main", L = "mv-theme-", T = { r: 255, g: 255, b: 255 }, te = { r: 0, g: 0, b: 0 }, j = [1, 3, 5, 7, 9], ne = [
|
|
246
246
|
"--el-color-primary-light-3",
|
|
247
247
|
"--el-color-primary-light-5",
|
|
248
248
|
"--el-color-primary-light-7",
|
|
249
249
|
"--el-color-primary-light-8",
|
|
250
250
|
"--el-color-primary-light-9",
|
|
251
251
|
"--el-color-primary-dark-2"
|
|
252
|
-
],
|
|
252
|
+
], re = j.map(
|
|
253
253
|
(e) => `--color-primary${e}`
|
|
254
254
|
);
|
|
255
|
-
function
|
|
255
|
+
function A(e) {
|
|
256
256
|
let t = String(e).trim().replace(/^#/, "");
|
|
257
257
|
if (t.length === 3 && (t = t.split("").map((r) => r + r).join("")), t.length >= 8 && (t = t.slice(0, 6)), t.length !== 6 || Number.isNaN(parseInt(t, 16)))
|
|
258
258
|
return null;
|
|
@@ -264,44 +264,44 @@ function L(e) {
|
|
|
264
264
|
};
|
|
265
265
|
}
|
|
266
266
|
function y(e, t, n) {
|
|
267
|
-
const r = (
|
|
268
|
-
return `#${[r(e), r(t), r(n)].map((
|
|
267
|
+
const r = (s) => Math.max(0, Math.min(255, Math.round(s)));
|
|
268
|
+
return `#${[r(e), r(t), r(n)].map((s) => s.toString(16).padStart(2, "0")).join("")}`;
|
|
269
269
|
}
|
|
270
270
|
function U(e, t, n, r) {
|
|
271
|
-
const
|
|
272
|
-
return `rgba(${
|
|
271
|
+
const s = (a) => Math.max(0, Math.min(255, Math.round(a))), i = Math.max(0, Math.min(1, r));
|
|
272
|
+
return `rgba(${s(e)}, ${s(t)}, ${s(n)}, ${i})`;
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function se(e) {
|
|
275
275
|
const t = [e.r, e.g, e.b].map((n) => (n /= 255, n <= 0.03928 ? n / 12.92 : ((n + 0.055) / 1.055) ** 2.4));
|
|
276
276
|
return 0.2126 * t[0] + 0.7152 * t[1] + 0.0722 * t[2];
|
|
277
277
|
}
|
|
278
278
|
function B(e) {
|
|
279
|
-
return
|
|
279
|
+
return se(e) > 0.5 ? "#1a1a1a" : "#ffffff";
|
|
280
280
|
}
|
|
281
281
|
function b(e, t, n) {
|
|
282
|
-
const r = n / 100,
|
|
282
|
+
const r = n / 100, s = 1 - r;
|
|
283
283
|
return {
|
|
284
|
-
r: e.r * r + t.r *
|
|
285
|
-
g: e.g * r + t.g *
|
|
286
|
-
b: e.b * r + t.b *
|
|
284
|
+
r: e.r * r + t.r * s,
|
|
285
|
+
g: e.g * r + t.g * s,
|
|
286
|
+
b: e.b * r + t.b * s
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
289
|
function oe(e, t = "light") {
|
|
290
|
-
const n =
|
|
290
|
+
const n = A(e);
|
|
291
291
|
if (!n)
|
|
292
292
|
return null;
|
|
293
|
-
const r = b(T, n, 30),
|
|
293
|
+
const r = b(T, n, 30), s = b(T, n, 50), i = b(T, n, 70), a = b(T, n, 80), o = b(T, n, 90), l = b(te, n, 20);
|
|
294
294
|
return {
|
|
295
295
|
"--el-color-primary-light-3": y(r.r, r.g, r.b),
|
|
296
|
-
"--el-color-primary-light-5": y(
|
|
296
|
+
"--el-color-primary-light-5": y(s.r, s.g, s.b),
|
|
297
297
|
"--el-color-primary-light-7": t === "dark" ? U(n.r, n.g, n.b, 0.7) : y(i.r, i.g, i.b),
|
|
298
298
|
"--el-color-primary-light-8": y(a.r, a.g, a.b),
|
|
299
|
-
"--el-color-primary-light-9": y(
|
|
299
|
+
"--el-color-primary-light-9": y(o.r, o.g, o.b),
|
|
300
300
|
"--el-color-primary-dark-2": y(l.r, l.g, l.b)
|
|
301
301
|
};
|
|
302
302
|
}
|
|
303
|
-
function
|
|
304
|
-
const t =
|
|
303
|
+
function ie(e) {
|
|
304
|
+
const t = A(e);
|
|
305
305
|
return t ? Object.fromEntries(
|
|
306
306
|
j.map((n) => [
|
|
307
307
|
`--color-primary${n}`,
|
|
@@ -309,102 +309,105 @@ function se(e) {
|
|
|
309
309
|
])
|
|
310
310
|
) : null;
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function ae(e) {
|
|
313
313
|
e.style.removeProperty("--el-color-primary"), e.style.removeProperty("--color-on-primary-text");
|
|
314
|
-
for (const t of
|
|
314
|
+
for (const t of re)
|
|
315
315
|
e.style.removeProperty(t);
|
|
316
|
-
for (const t of
|
|
316
|
+
for (const t of ne)
|
|
317
317
|
e.style.removeProperty(t);
|
|
318
318
|
}
|
|
319
319
|
function N(e) {
|
|
320
320
|
const t = String(e ?? "").trim().toLowerCase();
|
|
321
321
|
return t && t.replace(/[^a-z0-9_-]/g, "-").replace(/-+/g, "-") || $;
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function le(e) {
|
|
324
324
|
const t = [...e.classList].find(
|
|
325
|
-
(n) => n.startsWith(
|
|
325
|
+
(n) => n.startsWith(L)
|
|
326
326
|
);
|
|
327
|
-
return t ? t.slice(
|
|
327
|
+
return t ? t.slice(L.length) : $;
|
|
328
328
|
}
|
|
329
|
-
function
|
|
330
|
-
[...e.classList].filter((t) => t.startsWith(
|
|
329
|
+
function ce(e) {
|
|
330
|
+
[...e.classList].filter((t) => t.startsWith(L)).forEach((t) => e.classList.remove(t));
|
|
331
|
+
}
|
|
332
|
+
function ue(e) {
|
|
333
|
+
return e.classList.contains("light") ? "light" : e.classList.contains("dark") ? "dark" : ee;
|
|
331
334
|
}
|
|
332
|
-
function
|
|
335
|
+
function he(e, t) {
|
|
333
336
|
const n = N(t);
|
|
334
|
-
return
|
|
337
|
+
return ce(e), e.classList.add(`${L}${n}`), n;
|
|
335
338
|
}
|
|
336
|
-
function
|
|
337
|
-
const r =
|
|
339
|
+
function de(e, t, n = "light") {
|
|
340
|
+
const r = A(t.startsWith("#") ? t : `#${t}`);
|
|
338
341
|
if (!r)
|
|
339
342
|
return !1;
|
|
340
|
-
const
|
|
341
|
-
e.style.setProperty("--color-primary",
|
|
342
|
-
const i =
|
|
343
|
-
i && Object.entries(i).forEach(([
|
|
344
|
-
const a = oe(
|
|
345
|
-
return a && Object.entries(a).forEach(([
|
|
343
|
+
const s = y(r.r, r.g, r.b);
|
|
344
|
+
e.style.setProperty("--color-primary", s), e.style.setProperty("--el-color-primary", s), e.style.setProperty("--color-on-primary-text", B(r));
|
|
345
|
+
const i = ie(s);
|
|
346
|
+
i && Object.entries(i).forEach(([o, l]) => e.style.setProperty(o, l));
|
|
347
|
+
const a = oe(s, n);
|
|
348
|
+
return a && Object.entries(a).forEach(([o, l]) => e.style.setProperty(o, l)), !0;
|
|
346
349
|
}
|
|
347
|
-
function
|
|
348
|
-
const t = document.documentElement, n = (e.mode ?? (t
|
|
349
|
-
if (
|
|
350
|
-
const
|
|
351
|
-
if (!
|
|
352
|
-
t.style.setProperty("--color-primary",
|
|
353
|
-
const i =
|
|
350
|
+
function me(e = {}) {
|
|
351
|
+
const t = document.documentElement, n = (e.mode ?? ue(t)) === "light" ? "light" : "dark", r = e.theme ?? le(t);
|
|
352
|
+
if (he(t, r), e.primary != null && e.primary !== "") {
|
|
353
|
+
const s = String(e.primary).trim();
|
|
354
|
+
if (!de(t, s, n)) {
|
|
355
|
+
t.style.setProperty("--color-primary", s), t.style.setProperty("--el-color-primary", s);
|
|
356
|
+
const i = A(s.startsWith("#") ? s : `#${s}`);
|
|
354
357
|
i && t.style.setProperty("--color-on-primary-text", B(i));
|
|
355
358
|
}
|
|
356
|
-
} else (e.primary === null || e.primary === "") && (t.style.removeProperty("--color-primary"),
|
|
359
|
+
} else (e.primary === null || e.primary === "") && (t.style.removeProperty("--color-primary"), ae(t));
|
|
357
360
|
t.classList.toggle("light", n === "light"), t.classList.toggle("dark", n === "dark");
|
|
358
361
|
}
|
|
359
|
-
function
|
|
360
|
-
e.primary !== void 0 && (e.primary == null || e.primary === "" ? localStorage.removeItem(
|
|
361
|
-
|
|
362
|
+
function Ce(e) {
|
|
363
|
+
e.primary !== void 0 && (e.primary == null || e.primary === "" ? localStorage.removeItem(C) : localStorage.setItem(C, String(e.primary))), e.mode !== void 0 && localStorage.setItem(V, e.mode), e.theme !== void 0 && (e.theme == null || e.theme === "" ? localStorage.removeItem(I) : localStorage.setItem(
|
|
364
|
+
I,
|
|
362
365
|
N(e.theme)
|
|
363
366
|
));
|
|
364
367
|
}
|
|
365
|
-
function
|
|
366
|
-
var
|
|
367
|
-
const e = localStorage.getItem(
|
|
368
|
-
|
|
368
|
+
function Ie() {
|
|
369
|
+
var s;
|
|
370
|
+
const e = localStorage.getItem(C), t = localStorage.getItem(V), n = localStorage.getItem(I) || ((s = globalThis.$config) == null ? void 0 : s.theme) || $, r = t === "light" ? "light" : "dark";
|
|
371
|
+
me({
|
|
369
372
|
primary: e != null && e !== "" ? e : null,
|
|
370
373
|
mode: r,
|
|
371
374
|
theme: n
|
|
372
375
|
});
|
|
373
376
|
}
|
|
374
|
-
const
|
|
377
|
+
const fe = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 };
|
|
375
378
|
let w = null;
|
|
376
379
|
function O(e) {
|
|
377
|
-
|
|
380
|
+
z("error", e);
|
|
378
381
|
}
|
|
379
|
-
function
|
|
382
|
+
function xe(e) {
|
|
380
383
|
w = e && typeof e == "object" ? e : null;
|
|
381
384
|
}
|
|
382
|
-
function
|
|
385
|
+
function P(e) {
|
|
383
386
|
if (w && w[e] != null && w[e] !== "")
|
|
384
387
|
return String(w[e]);
|
|
385
388
|
const t = typeof globalThis < "u" ? globalThis.__MVFRAME_ENV__ : null;
|
|
386
389
|
if (t && t[e] != null && t[e] !== "")
|
|
387
390
|
return String(t[e]);
|
|
388
|
-
const n = typeof import.meta < "u" ?
|
|
391
|
+
const n = typeof import.meta < "u" ? fe : null;
|
|
389
392
|
return n && n[e] != null && n[e] !== "" ? String(n[e]) : "";
|
|
390
393
|
}
|
|
391
394
|
const _ = H.create({
|
|
392
395
|
timeout: 0,
|
|
393
396
|
withCredentials: !1
|
|
394
397
|
});
|
|
395
|
-
let
|
|
396
|
-
const
|
|
398
|
+
let g = [];
|
|
399
|
+
const ge = H.CancelToken, pe = (e) => {
|
|
397
400
|
const t = e.url + "_" + e.headers["Content-HI"] + "_" + e.ex, n = [];
|
|
398
|
-
if (
|
|
399
|
-
for (let r in
|
|
400
|
-
|
|
401
|
-
n.length > 0 && (
|
|
401
|
+
if (g.length)
|
|
402
|
+
for (let r in g)
|
|
403
|
+
g[r].v === t && n.push(r);
|
|
404
|
+
n.length > 0 && (g[n[0]].cb(), g.splice(n[0], 1));
|
|
402
405
|
}, E = (e) => {
|
|
403
406
|
if (e != null && e.url) {
|
|
404
407
|
const t = e.url + "_" + e.headers["Content-HI"] + "_" + e.ex;
|
|
405
|
-
for (let n in
|
|
406
|
-
if (
|
|
407
|
-
|
|
408
|
+
for (let n in g)
|
|
409
|
+
if (g[n].v === t) {
|
|
410
|
+
g.splice(n, 1);
|
|
408
411
|
break;
|
|
409
412
|
}
|
|
410
413
|
}
|
|
@@ -413,10 +416,10 @@ _.interceptors.request.use(
|
|
|
413
416
|
(e) => {
|
|
414
417
|
e.headers = e.headers || {};
|
|
415
418
|
const { login: t, accountInfo: n = {} } = window.$store.launch(), { access_token: r } = t.info;
|
|
416
|
-
return r && e.headers["Content-HI"] && (e.headers.Authorization = `Bearer ${r}`), n.partner_org_id && noaccount !== !0 && (e.data ? e.method.toLowerCase() === "get" ? e.params.accountId = n.partner_org_id : e.data.accountId = n.partner_org_id : e.method.toLowerCase() === "get" ? e.params = { accountId: n.partner_org_id } : e.data = { accountId: n.partner_org_id }),
|
|
417
|
-
|
|
419
|
+
return r && e.headers["Content-HI"] && (e.headers.Authorization = `Bearer ${r}`), n.partner_org_id && noaccount !== !0 && (e.data ? e.method.toLowerCase() === "get" ? e.params.accountId = n.partner_org_id : e.data.accountId = n.partner_org_id : e.method.toLowerCase() === "get" ? e.params = { accountId: n.partner_org_id } : e.data = { accountId: n.partner_org_id }), pe(e), e.cancelToken = new ge((s) => {
|
|
420
|
+
g.push({
|
|
418
421
|
v: e.url + "_" + e.headers["Content-HI"] + "_" + e.ex,
|
|
419
|
-
cb:
|
|
422
|
+
cb: s
|
|
420
423
|
});
|
|
421
424
|
}), e;
|
|
422
425
|
},
|
|
@@ -427,8 +430,8 @@ _.interceptors.response.use(
|
|
|
427
430
|
var i;
|
|
428
431
|
if (e == null || typeof e != "object" || Array.isArray(e))
|
|
429
432
|
return E(t), e;
|
|
430
|
-
let { code: n, message: r, msg:
|
|
431
|
-
if (
|
|
433
|
+
let { code: n, message: r, msg: s } = e;
|
|
434
|
+
if (s = s || r, n === 200)
|
|
432
435
|
E(t);
|
|
433
436
|
else if (n === 500) {
|
|
434
437
|
if (t.showMsg !== !1) {
|
|
@@ -437,7 +440,7 @@ _.interceptors.response.use(
|
|
|
437
440
|
grouping: !0,
|
|
438
441
|
showClose: !0,
|
|
439
442
|
duration: 0,
|
|
440
|
-
message: [
|
|
443
|
+
message: [s, a].filter(Boolean).join(" ")
|
|
441
444
|
});
|
|
442
445
|
}
|
|
443
446
|
E(t);
|
|
@@ -445,7 +448,7 @@ _.interceptors.response.use(
|
|
|
445
448
|
return e;
|
|
446
449
|
},
|
|
447
450
|
(e) => {
|
|
448
|
-
var n, r,
|
|
451
|
+
var n, r, s, i, a;
|
|
449
452
|
let t = !1;
|
|
450
453
|
if (e && e.response)
|
|
451
454
|
switch (e.response.status) {
|
|
@@ -468,92 +471,93 @@ _.interceptors.response.use(
|
|
|
468
471
|
(n = e.stack) != null && n.includes("timeout") ? e.message = window.$l("Timeout, Please Refresh") : (e.message = window.$l("Connect Failed"), t = !0);
|
|
469
472
|
return t || ((r = e == null ? void 0 : e.response) == null ? void 0 : r.status) !== 403 && O({
|
|
470
473
|
grouping: !0,
|
|
471
|
-
message: `${e.message} ${(i = (
|
|
474
|
+
message: `${e.message} ${(i = (s = e.config) == null ? void 0 : s.headers) == null ? void 0 : i["Content-HI"]}`
|
|
472
475
|
}), E(e.config), e.code === "ERR_CANCELED" ? Promise.resolve({ code: e.code, msg: e.message }) : Promise.resolve({
|
|
473
476
|
code: (a = e.response) == null ? void 0 : a.status,
|
|
474
477
|
msg: e.message
|
|
475
478
|
});
|
|
476
479
|
}
|
|
477
480
|
);
|
|
478
|
-
function
|
|
479
|
-
return e.baseURL =
|
|
481
|
+
function ye(e) {
|
|
482
|
+
return e.baseURL = P("VITE_APP_BASEURL"), e.method = "get", e.headers = { "Content-Type": "application/x-www-form-urlencoded" }, e.data && (e.params = e.data), _(e);
|
|
480
483
|
}
|
|
481
|
-
function
|
|
482
|
-
return e.baseURL =
|
|
484
|
+
function be(e) {
|
|
485
|
+
return e.baseURL = P("VITE_APP_BASEURL"), e.method = "get", e.headers = {
|
|
483
486
|
...e.headers,
|
|
484
487
|
"Content-HI": e.url
|
|
485
488
|
}, e.url = e.ver ? `api/${e.ver}/ads` : "api/v3/ads", e.data && (e.params = e.data), _(e);
|
|
486
489
|
}
|
|
487
|
-
function
|
|
488
|
-
if (e.baseURL =
|
|
490
|
+
function Ee(e) {
|
|
491
|
+
if (e.baseURL = P("VITE_APP_BASEURL"), e.method = "post", e.headers = {
|
|
489
492
|
...e.headers,
|
|
490
493
|
"Content-HI": e.url
|
|
491
494
|
}, e.data && window.$getType(e.data) === "Object") {
|
|
492
495
|
const n = {};
|
|
493
496
|
Object.keys(e.data).forEach((r) => {
|
|
494
|
-
const
|
|
495
|
-
[null, "", void 0].includes(
|
|
497
|
+
const s = e.data[r];
|
|
498
|
+
[null, "", void 0].includes(s) || (n[r] = s);
|
|
496
499
|
}), e.data = n;
|
|
497
500
|
}
|
|
498
501
|
return e.url = e.ver ? `api/${e.ver}/ads` : "api/v3/ads", _(e);
|
|
499
502
|
}
|
|
500
|
-
function
|
|
503
|
+
function x({
|
|
501
504
|
data: e,
|
|
502
505
|
url: t,
|
|
503
506
|
ex: n,
|
|
504
507
|
method: r = "post",
|
|
505
|
-
emptyString:
|
|
508
|
+
emptyString: s = !1
|
|
506
509
|
}) {
|
|
507
510
|
const i = {}, a = [void 0, null];
|
|
508
|
-
|
|
511
|
+
s === !1 && a.push("");
|
|
509
512
|
for (let u in e)
|
|
510
513
|
a.indexOf(e[u]) === -1 && (i[u] = e[u]);
|
|
511
|
-
const { login:
|
|
514
|
+
const { login: o } = window.$store.launch(), { access_token: l } = o.info || {};
|
|
512
515
|
return _({
|
|
513
516
|
headers: {
|
|
514
517
|
"Content-Type": "application/json",
|
|
515
518
|
token: l != null ? String(l) : ""
|
|
516
519
|
},
|
|
517
|
-
baseURL:
|
|
520
|
+
baseURL: P("VITE_APP_AIURL"),
|
|
518
521
|
url: t,
|
|
519
522
|
method: r,
|
|
520
523
|
data: i,
|
|
521
524
|
ex: n
|
|
522
525
|
});
|
|
523
526
|
}
|
|
524
|
-
const
|
|
525
|
-
function
|
|
526
|
-
globalThis.$login =
|
|
527
|
+
const ke = x;
|
|
528
|
+
function Oe(e) {
|
|
529
|
+
globalThis.$login = ye, globalThis.$get = be, globalThis.$post = Ee, globalThis.$form = x, globalThis.$xform = x;
|
|
527
530
|
}
|
|
528
531
|
export {
|
|
532
|
+
ee as MVFRAME_DEFAULT_THEME_MODE,
|
|
529
533
|
$ as MVFRAME_DEFAULT_THEME_NAME,
|
|
530
534
|
G as MVFRAME_STORAGE_LANG,
|
|
531
|
-
|
|
535
|
+
C as MVFRAME_STORAGE_PRIMARY,
|
|
532
536
|
V as MVFRAME_STORAGE_THEME,
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
537
|
+
I as MVFRAME_STORAGE_THEME_NAME,
|
|
538
|
+
L as MVFRAME_THEME_CLASS_PREFIX,
|
|
539
|
+
me as applyMvframeTheme,
|
|
536
540
|
Y as deepEqual,
|
|
537
|
-
|
|
541
|
+
Ae as download,
|
|
538
542
|
Z as formatSummaryCell,
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
543
|
+
je as getMaps,
|
|
544
|
+
Oe as installRq,
|
|
545
|
+
Le as isInView,
|
|
546
|
+
Ie as loadMvframeTheme,
|
|
547
|
+
Ue as mapLang,
|
|
548
|
+
Be as mapLangPath,
|
|
549
|
+
Ne as mergeMaps,
|
|
550
|
+
Fe as patchMaps,
|
|
551
|
+
Ce as persistMvframeTheme,
|
|
548
552
|
X as sanitizeDownloadFileName,
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
553
|
+
xe as setMvframeRqEnv,
|
|
554
|
+
x as useForm,
|
|
555
|
+
be as useGet,
|
|
556
|
+
$e as useLang,
|
|
557
|
+
ye as useLogin,
|
|
558
|
+
We as useMap,
|
|
559
|
+
Se as useOptions,
|
|
560
|
+
Ee as usePost,
|
|
557
561
|
Pe as useRemoteSummary,
|
|
558
|
-
|
|
562
|
+
ke as useXform
|
|
559
563
|
};
|