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