mvframe 1.1.16 → 1.1.18

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