mvframe 1.1.35 → 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.
@@ -1,30 +1,31 @@
1
- import { M as z, g as D, s as G } from "./vendor.js";
2
- import { a as Ve, m as Ue, b as Be, c as Ne, p as Fe, u as We } from "./vendor.js";
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
- const Y = "lang", Re = (e, t) => {
5
- var i, a;
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 p;
8
+ var u;
8
9
  if (!n)
9
10
  return { innerWidth: 1920, innerHeight: 1080 };
10
- const o = window, l = typeof navigator < "u" ? o.navigator : {}, u = o.screen || {}, d = o.visualViewport, h = {
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
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 && (h.visualViewportWidth = d.width, h.visualViewportHeight = d.height, h.visualViewportScale = d.scale);
26
+ d && (m.visualViewportWidth = d.width, m.visualViewportHeight = d.height, m.visualViewportScale = d.scale);
26
27
  const c = l.userAgent || "";
27
- return h.env = {
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 o || (l.maxTouchPoints || 0) > 0,
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(h), h;
40
- }, s = () => {
40
+ }, console.info(m), m;
41
+ }, o = () => {
41
42
  var l;
42
- const o = r();
43
+ const s = r();
43
44
  globalThis.$config = globalThis.$config || {}, globalThis.$config.options = {
44
45
  ...globalThis.$config.options || {},
45
- ...o
46
+ ...s
46
47
  }, (l = e == null ? void 0 : e.config) != null && l.globalProperties && (e.config.globalProperties.$config = globalThis.$config);
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
+ 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
- }, ve = (e, t) => {
52
- var u, d, h;
53
- const n = t || {}, r = Array.isArray(n.use) && n.use.length > 0 ? n.use : z;
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
- ), (u = e == null ? void 0 : e.config) != null && u.globalProperties && (e.config.globalProperties.$config = globalThis.$config);
57
- const i = (typeof localStorage < "u" ? localStorage.getItem(Y) : null) || ((d = globalThis.$config) == null ? void 0 : d.lang) || "en_us", a = Object.assign(
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
- D(i),
60
- ((h = globalThis.$config) == null ? void 0 : h.langMaps) || {},
60
+ z(a),
61
+ ((m = globalThis.$config) == null ? void 0 : m.langMaps) || {},
61
62
  n.langMaps || {}
62
- ), o = (c, p) => !p || globalThis.$getType(p) !== "Object" ? c : String(c).replace(
63
+ ), s = (c, u) => !u || globalThis.$getType(u) !== "Object" ? c : String(c).replace(
63
64
  /\{([A-Za-z0-9_.$-]+)\}/g,
64
- (m, C) => Object.prototype.hasOwnProperty.call(p, C) ? p[C] : m
65
- ), l = (c, p) => {
65
+ (f, _) => Object.prototype.hasOwnProperty.call(u, _) ? u[_] : f
66
+ ), l = (c, u) => {
66
67
  if (c) {
67
- const m = a[c] || c;
68
- return o(m, p);
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(a, c);
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
- }, Ae = (e, t) => {
78
+ }, ke = (e, t) => {
78
79
  if (!e || !t) return !1;
79
- 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;
80
- return s && i;
81
- }, K = (e, t) => {
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 s of n)
88
- if (!r.includes(s) || !K(e[s], t[s])) return !1;
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", X = 150, J = (e, t = O) => {
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 i = r.replace(/[/\\?%*:|"<>]/g, "_").replace(/\.\./g, "_").split(/[/\\]/).pop() || n, a = 200;
94
- return i.length > a ? i.slice(0, a) : i;
95
- }, Z = (e) => {
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 = J(t), s = document.createElement("a");
100
- s.href = n, s.download = r, s.style.display = "none", document.body.appendChild(s);
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
- s.click();
103
+ o.click();
103
104
  } finally {
104
- document.body.removeChild(s), setTimeout(() => URL.revokeObjectURL(n), X);
105
+ document.body.removeChild(o), setTimeout(() => URL.revokeObjectURL(n), ee);
105
106
  }
106
- }, Q = (e) => {
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: s, name: i, filename: a, init: o, ...l } = e, u = a ?? i;
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: u,
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: { ...o || {}, headers: s ?? (o == null ? void 0 : o.headers) },
121
+ init: { ...s || {}, headers: o ?? (s == null ? void 0 : s.headers) },
121
122
  response: "blob",
122
123
  expectExcel: !0,
123
- filename: u
124
+ filename: h
124
125
  } : e;
125
- }, Le = async (e = {}) => {
126
- const t = Q(e), {
126
+ }, xe = async (e = {}) => {
127
+ const t = re(e), {
127
128
  source: n = "inline",
128
129
  content: r,
129
- blob: s,
130
- bom: i = !0,
131
- mime: a,
132
- url: o,
130
+ blob: o,
131
+ bom: a = !0,
132
+ mime: i,
133
+ url: s,
133
134
  init: l,
134
- response: u = "blob",
135
+ response: h = "blob",
135
136
  openIn: d = "self",
136
- expectExcel: h,
137
+ expectExcel: m,
137
138
  filename: c,
138
- name: p,
139
- error: m = () => {
139
+ name: u,
140
+ error: f = () => {
140
141
  },
141
142
  // 避免 legacy 字段渗入后续逻辑
142
- type: C,
143
- data: Te,
144
- headers: Me,
145
- ...we
146
- } = t, w = c ?? p;
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 (s instanceof Blob) {
150
- R(s, w);
150
+ if (o instanceof Blob) {
151
+ R(o, v);
151
152
  return;
152
153
  }
153
154
  if (r == null) {
154
- m(new Error("content or blob is required for inline"));
155
+ f(new Error("content or blob is required for inline"));
155
156
  return;
156
157
  }
157
- const g = typeof r == "string" ? r : String(r), S = i ? "\uFEFF" + g : g, $ = a || (i ? "text/csv;charset=utf-8" : "text/plain;charset=utf-8");
158
- R(new Blob([S], { type: $ }), w);
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 (!o) {
163
- m(new Error("url is required for fetch"));
163
+ if (!s) {
164
+ f(new Error("url is required for fetch"));
164
165
  return;
165
166
  }
166
- const g = await fetch(o, l);
167
- if (!g.ok) {
168
- m(new Error(`fetch failed: ${g.status}`));
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 (u === "text") {
172
- const $ = await g.text(), W = i ? "\uFEFF" + $ : $, q = a || (i ? "text/csv;charset=utf-8" : "text/plain;charset=utf-8");
173
- R(new Blob([W], { type: q }), w);
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 S = await g.blob();
177
- if (h && !Z(S)) {
178
- m(new Error("excel does not exist"));
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(S, w);
182
+ R(A, v);
182
183
  return;
183
184
  }
184
185
  if (n === "open") {
185
- if (!o) {
186
- m(new Error("url is required for open"));
186
+ if (!s) {
187
+ f(new Error("url is required for open"));
187
188
  return;
188
189
  }
189
- d === "blank" ? window.open(o, "_blank", "noopener,noreferrer") : window.location.href = o;
190
+ d === "blank" ? window.open(s, "_blank", "noopener,noreferrer") : window.location.href = s;
190
191
  return;
191
192
  }
192
- m(new Error(`unknown source: ${n}`));
193
- } catch (g) {
194
- m(g instanceof Error ? g : new Error(String(g)));
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 ee(e, t, n) {
198
+ function oe(e, t, n) {
198
199
  if (t === "" || t === void 0 || t === null)
199
200
  return "";
200
- const r = globalThis.$fa, s = globalThis.$fu, i = (n == null ? void 0 : n.precision) ?? 2, a = n == null ? void 0 : n.unit;
201
- if ((a === "currency" || a === "%") && s) {
202
- const o = {
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: a === "currency" ? "currency" : "%",
205
- precision: i
205
+ unit: i === "currency" ? "currency" : "%",
206
+ precision: a
206
207
  }
207
208
  };
208
209
  try {
209
- return s({
210
+ return o({
210
211
  prop: e,
211
212
  currency: n == null ? void 0 : n.currency,
212
213
  value: t,
213
- obj: o
214
+ obj: s
214
215
  });
215
216
  } catch {
216
217
  }
217
218
  }
218
219
  if (r)
219
220
  try {
220
- return r(t, i);
221
+ return r(t, a);
221
222
  } catch {
222
223
  return String(t);
223
224
  }
224
225
  return String(t);
225
226
  }
226
- function Pe(e, t, n = {}) {
227
- const { columns: r = [] } = e || {}, { resolveMetric: s } = n;
228
- return !r.length || !t || typeof t != "object" ? [] : r.map((i) => {
229
- const a = i.property ?? i.prop ?? "";
230
- if (!a)
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 o = t[a];
233
- if (o === void 0 && (o = ""), o === "")
233
+ let s = t[i];
234
+ if (s === void 0 && (s = ""), s === "")
234
235
  return "";
235
- const l = typeof s == "function" ? s(a) : void 0;
236
+ const l = typeof o == "function" ? o(i) : void 0;
236
237
  try {
237
- return ee(a, o, l);
238
+ return oe(i, s, l);
238
239
  } catch {
239
- return String(o);
240
+ return String(s);
240
241
  }
241
242
  });
242
243
  }
243
- const I = "mvframe_primary", V = "mvframe_theme", k = "mvframe_theme_name", te = "dark", v = "main", A = "mv-theme-", T = { r: 255, g: 255, b: 255 }, ne = { r: 0, g: 0, b: 0 }, U = [1, 3, 5, 7, 9], re = [
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
- ], se = U.map(
251
+ ], le = V.map(
251
252
  (e) => `--color-primary${e}`
252
253
  );
253
- function L(e) {
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 = (s) => Math.max(0, Math.min(255, Math.round(s)));
266
- return `#${[r(e), r(t), r(n)].map((s) => s.toString(16).padStart(2, "0")).join("")}`;
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 s = (a) => Math.max(0, Math.min(255, Math.round(a))), i = Math.max(0, Math.min(1, r));
270
- return `rgba(${s(e)}, ${s(t)}, ${s(n)}, ${i})`;
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 oe(e) {
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 N(e) {
277
- return oe(e) > 0.5 ? "#1a1a1a" : "#ffffff";
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, s = 1 - r;
281
+ const r = n / 100, o = 1 - r;
281
282
  return {
282
- r: e.r * r + t.r * s,
283
- g: e.g * r + t.g * s,
284
- b: e.b * r + t.b * s
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 ie(e, t = "light") {
288
- const n = L(e);
288
+ function ue(e, t = "light") {
289
+ const n = P(e);
289
290
  if (!n)
290
291
  return null;
291
- 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(ne, n, 20);
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(s.r, s.g, s.b),
295
- "--el-color-primary-light-7": t === "dark" ? B(n.r, n.g, n.b, 0.7) : y(i.r, i.g, i.b),
296
- "--el-color-primary-light-8": y(a.r, a.g, a.b),
297
- "--el-color-primary-light-9": y(o.r, o.g, o.b),
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 ae(e) {
302
- const t = L(e);
302
+ function he(e) {
303
+ const t = P(e);
303
304
  return t ? Object.fromEntries(
304
- U.map((n) => [
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 le(e) {
311
+ function me(e) {
311
312
  e.style.removeProperty("--el-color-primary"), e.style.removeProperty("--color-on-primary-text");
312
- for (const t of se)
313
+ for (const t of le)
313
314
  e.style.removeProperty(t);
314
- for (const t of re)
315
+ for (const t of ie)
315
316
  e.style.removeProperty(t);
316
317
  }
317
- function F(e) {
318
+ function N(e) {
318
319
  const t = String(e ?? "").trim().toLowerCase();
319
- return t && t.replace(/[^a-z0-9_-]/g, "-").replace(/-+/g, "-") || v;
320
+ return t && t.replace(/[^a-z0-9_-]/g, "-").replace(/-+/g, "-") || $;
320
321
  }
321
- function ce(e) {
322
+ function fe(e) {
322
323
  const t = [...e.classList].find(
323
- (n) => n.startsWith(A)
324
+ (n) => n.startsWith(L)
324
325
  );
325
- return t ? t.slice(A.length) : v;
326
+ return t ? t.slice(L.length) : $;
326
327
  }
327
- function ue(e) {
328
- [...e.classList].filter((t) => t.startsWith(A)).forEach((t) => e.classList.remove(t));
328
+ function de(e) {
329
+ [...e.classList].filter((t) => t.startsWith(L)).forEach((t) => e.classList.remove(t));
329
330
  }
330
- function he(e) {
331
- return e.classList.contains("light") ? "light" : e.classList.contains("dark") ? "dark" : te;
331
+ function pe(e) {
332
+ return e.classList.contains("light") ? "light" : e.classList.contains("dark") ? "dark" : se;
332
333
  }
333
- function de(e, t) {
334
- const n = F(t);
335
- return ue(e), e.classList.add(`${A}${n}`), n;
334
+ function ge(e, t) {
335
+ const n = N(t);
336
+ return de(e), e.classList.add(`${L}${n}`), n;
336
337
  }
337
- function pe(e, t, n = "light") {
338
- const r = L(t.startsWith("#") ? t : `#${t}`);
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 s = y(r.r, r.g, r.b);
342
- e.style.setProperty("--color-primary", s), e.style.setProperty("--el-color-primary", s), e.style.setProperty("--color-on-primary-text", N(r));
343
- const i = ae(s);
344
- i && Object.entries(i).forEach(([o, l]) => e.style.setProperty(o, l));
345
- const a = ie(s, n);
346
- return a && Object.entries(a).forEach(([o, l]) => e.style.setProperty(o, l)), !0;
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 me(e = {}) {
349
- const t = document.documentElement, n = (e.mode ?? he(t)) === "light" ? "light" : "dark", r = e.theme ?? ce(t);
350
- if (de(t, r), e.primary != null && e.primary !== "") {
351
- const s = String(e.primary).trim();
352
- if (!pe(t, s, n)) {
353
- t.style.setProperty("--color-primary", s), t.style.setProperty("--el-color-primary", s);
354
- const i = L(s.startsWith("#") ? s : `#${s}`);
355
- i && t.style.setProperty("--color-on-primary-text", N(i));
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"), le(t));
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 Ce(e) {
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(V, e.mode), e.theme !== void 0 && (e.theme == null || e.theme === "" ? localStorage.removeItem(k) : 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
- F(e.theme)
364
+ N(e.theme)
364
365
  ));
365
366
  }
366
- function Ie() {
367
- var s;
368
- const e = localStorage.getItem(I), t = localStorage.getItem(V), n = localStorage.getItem(k) || ((s = globalThis.$config) == null ? void 0 : s.theme) || v, r = t === "light" ? "light" : "dark";
369
- me({
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 ge = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 };
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 ke(e) {
381
+ function Ue(e) {
381
382
  M = e && typeof e == "object" ? e : null;
382
383
  }
383
- function P(e) {
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" ? ge : null;
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 _ = j.create({
393
+ const E = j.create({
393
394
  timeout: 0,
394
395
  withCredentials: !1
395
396
  });
396
- let f = [];
397
- const fe = j.CancelToken, ye = (e) => {
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 (f.length)
400
- for (let r in f)
401
- f[r].v === t && n.push(r);
402
- n.length > 0 && (f[n[0]].cb(), f.splice(n[0], 1));
403
- }, E = (e) => {
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 f)
407
- if (f[n].v === t) {
408
- f.splice(n, 1);
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
- _.interceptors.request.use(
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, s = e.noaccount === !0 || e.noAccount === !0;
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 && !s && (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 }), ye(e), e.cancelToken = new fe((i) => {
418
- f.push({
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: i
421
+ cb: a
421
422
  });
422
423
  }), e;
423
424
  },
424
425
  (e) => Promise.reject(e)
425
426
  );
426
- _.interceptors.response.use(
427
+ E.interceptors.response.use(
427
428
  ({ data: e, config: t }) => {
428
- var i;
429
+ var a;
429
430
  if (e == null || typeof e != "object" || Array.isArray(e))
430
- return E(t), e;
431
- let { code: n, message: r, msg: s } = e;
432
- if (s = s || r, n === 200)
433
- E(t);
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 a = (i = t == null ? void 0 : t.headers) != null && i.CONTACT_CUSTOMER_SERVICE ? window.$l("CONTACT_CUSTOMER_SERVICE") : "";
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: [s, a].filter(Boolean).join(" ")
442
+ message: [o, i].filter(Boolean).join(" ")
442
443
  });
443
444
  }
444
- E(t);
445
- } else n === 403 && window.location.replace("/"), E(t);
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, s, i, a;
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} ${(i = (s = e.config) == null ? void 0 : s.headers) == null ? void 0 : i["Content-HI"]}`
473
- }), E(e.config), e.code === "ERR_CANCELED" ? Promise.resolve({ code: e.code, msg: e.message }) : Promise.resolve({
474
- code: (a = e.response) == null ? void 0 : a.status,
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 be(e) {
480
- 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
+ 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 Ee(e) {
483
- return e.baseURL = P("VITE_APP_BASEURL"), e.method = "get", e.headers = {
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), _(e);
487
+ }, e.url = e.ver ? `api/${e.ver}/ads` : "api/v3/ads", e.data && (e.params = e.data), E(e);
487
488
  }
488
- function _e(e) {
489
- e.baseURL = P("VITE_APP_BASEURL"), e.method = "post", e.headers = {
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: s = !1 } = e;
497
- s && globalThis.$getType(r) === "Array" && r.push("");
498
- const i = {
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((a) => {
502
- const o = e.data[a];
503
- r.includes(o) || (i[a] = o);
504
- }), e.data = i);
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", _(e);
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: s = "post",
518
- emptyString: i = !1,
519
- emptyMap: a = [void 0, null],
520
- useToken: o = !0
518
+ method: o = "post",
519
+ emptyString: a = !1,
520
+ emptyMap: i = [void 0, null],
521
+ useToken: s = !0
521
522
  } = e;
522
- e.method = s;
523
- const { login: l } = globalThis.$store.launch(), { access_token: u } = l.info || {}, d = {};
524
- if (i && globalThis.$getType(a) === "Array" && a.push(""), a.length) {
525
- for (let h in t)
526
- a.indexOf(t[h]) === -1 && (d[h] = t[h]);
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 = P("VITE_APP_AIURL"), e.headers ? e.headers = {
530
+ return e.baseURL = C("VITE_APP_AIURL"), e.headers ? e.headers = {
530
531
  ...e.headers,
531
532
  "Content-Type": "application/json",
532
- token: o && u != null ? String(u) : ""
533
+ token: s && h != null ? String(h) : ""
533
534
  } : e.headers = {
534
535
  "Content-Type": "application/json",
535
- token: o && u != null ? String(u) : ""
536
- }, _(e);
536
+ token: s && h != null ? String(h) : ""
537
+ }, E(e);
537
538
  }
538
- const xe = x;
539
- function Oe(e) {
540
- globalThis.$login = be, globalThis.$get = Ee, globalThis.$post = _e, globalThis.$form = x, globalThis.$xform = x;
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
- te as MVFRAME_DEFAULT_THEME_MODE,
544
- v as MVFRAME_DEFAULT_THEME_NAME,
545
- Y as MVFRAME_STORAGE_LANG,
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
- V as MVFRAME_STORAGE_THEME,
570
+ U as MVFRAME_STORAGE_THEME,
548
571
  k as MVFRAME_STORAGE_THEME_NAME,
549
- A as MVFRAME_THEME_CLASS_PREFIX,
550
- me as applyMvframeTheme,
551
- K as deepEqual,
552
- Le as download,
553
- ee as formatSummaryCell,
554
- Ve as getMaps,
555
- Oe as installRq,
556
- Ae as isInView,
557
- Ie as loadMvframeTheme,
558
- Ue as mapLang,
559
- Be as mapLangPath,
560
- Ne as mergeMaps,
561
- Fe as patchMaps,
562
- Ce as persistMvframeTheme,
563
- J as sanitizeDownloadFileName,
564
- ke as setMvframeRqEnv,
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
- Ee as useGet,
567
- ve as useLang,
568
- be as useLogin,
569
- We as useMap,
570
- Re as useOptions,
571
- _e as usePost,
572
- Pe as useRemoteSummary,
573
- xe as useXform
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
  };