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