mvframe 1.0.67 → 1.0.68

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,13 +1,13 @@
1
1
  import { M as B, g as U, s as V } from "./vendor.js";
2
- import { a as Se, m as $e, b as Pe, c as Me, p as Le, u as Ae } from "./vendor.js";
3
- import C from "axios";
2
+ import { a as Se, m as $e, b as Pe, c as Le, p as Me, u as Ae } from "./vendor.js";
3
+ import k from "axios";
4
4
  const W = "lang", fe = (e, t) => {
5
- var i, l;
6
- const n = typeof window < "u", r = () => {
5
+ var i, a;
6
+ const r = typeof window < "u", n = () => {
7
7
  var m;
8
- if (!n)
8
+ if (!r)
9
9
  return { innerWidth: 1920, innerHeight: 1080 };
10
- const s = window, a = typeof navigator < "u" ? s.navigator : {}, u = s.screen || {}, f = s.visualViewport, c = {
10
+ const s = window, l = typeof navigator < "u" ? s.navigator : {}, u = s.screen || {}, f = s.visualViewport, c = {
11
11
  innerWidth: s.innerWidth,
12
12
  innerHeight: s.innerHeight,
13
13
  outerWidth: s.outerWidth,
@@ -23,102 +23,102 @@ const W = "lang", fe = (e, t) => {
23
23
  pageWidth: s.innerWidth
24
24
  };
25
25
  f && (c.visualViewportWidth = f.width, c.visualViewportHeight = f.height, c.visualViewportScale = f.scale);
26
- const g = a.userAgent || "";
26
+ const g = l.userAgent || "";
27
27
  return c.env = {
28
28
  userAgent: g,
29
- language: a.language || "",
30
- languages: a.languages ? [...a.languages] : [],
31
- platform: a.platform || "",
32
- cookieEnabled: !!a.cookieEnabled,
33
- onLine: a.onLine !== !1,
34
- maxTouchPoints: a.maxTouchPoints || 0,
35
- isTouch: "ontouchstart" in s || (a.maxTouchPoints || 0) > 0,
29
+ language: l.language || "",
30
+ languages: l.languages ? [...l.languages] : [],
31
+ platform: l.platform || "",
32
+ cookieEnabled: !!l.cookieEnabled,
33
+ onLine: l.onLine !== !1,
34
+ maxTouchPoints: l.maxTouchPoints || 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
37
  g
38
38
  )
39
39
  }, console.info(c), c;
40
40
  }, o = () => {
41
- var a;
42
- const s = r();
41
+ var l;
42
+ const s = n();
43
43
  globalThis.$config = globalThis.$config || {}, globalThis.$config.options = {
44
44
  ...globalThis.$config.options || {},
45
45
  ...s
46
- }, (a = e == null ? void 0 : e.config) != null && a.globalProperties && (e.config.globalProperties.$config = globalThis.$config);
46
+ }, (l = e == null ? void 0 : e.config) != null && l.globalProperties && (e.config.globalProperties.$config = globalThis.$config);
47
47
  };
48
- o(), n && (window.addEventListener("resize", o, { passive: !0 }), (l = (i = window.visualViewport) == null ? void 0 : i.addEventListener) == null || l.call(i, "resize", o, {
48
+ o(), r && (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
  }, ge = (e, t) => {
52
- var a, u, f;
53
- const n = t || {}, r = Array.isArray(n.use) && n.use.length > 0 ? n.use : B;
54
- globalThis.$config = globalThis.$config || {}, globalThis.$config.langUse = r.filter(
52
+ var l, u, f;
53
+ const r = t || {}, n = Array.isArray(r.use) && r.use.length > 0 ? r.use : B;
54
+ globalThis.$config = globalThis.$config || {}, globalThis.$config.langUse = n.filter(
55
55
  (c) => c && c.use !== !1 && c.value
56
- ), (a = e == null ? void 0 : e.config) != null && a.globalProperties && (e.config.globalProperties.$config = globalThis.$config);
57
- const i = (typeof localStorage < "u" ? localStorage.getItem(W) : null) || ((u = globalThis.$config) == null ? void 0 : u.lang) || "en_us", l = Object.assign(
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(W) : null) || ((u = globalThis.$config) == null ? void 0 : u.lang) || "en_us", a = Object.assign(
58
58
  {},
59
59
  U(i),
60
60
  ((f = globalThis.$config) == null ? void 0 : f.langMaps) || {},
61
- n.langMaps || {}
61
+ r.langMaps || {}
62
62
  ), s = (c, g) => {
63
63
  if (c)
64
64
  if (g && globalThis.$getType(g) === "Object") {
65
- let m = l[c] || c;
65
+ let m = a[c] || c;
66
66
  return Object.keys(g).forEach((p) => {
67
67
  m[`{${p}}`] = g[p];
68
68
  }), m;
69
69
  } else
70
- return l[c] || c;
70
+ return a[c] || c;
71
71
  else
72
72
  return c ?? "";
73
73
  };
74
74
  globalThis.$patchLangMaps = (c) => {
75
- c && globalThis.$getType(c) === "Object" && Object.assign(l, c);
75
+ c && globalThis.$getType(c) === "Object" && Object.assign(a, c);
76
76
  }, globalThis.$l = s, e.config.globalProperties.$l = s, e.config.globalProperties.$patchLangMaps = globalThis.$patchLangMaps, String.prototype.$l = function() {
77
77
  return $l(this);
78
78
  };
79
79
  }, he = (e, t) => {
80
80
  if (!e || !t) return !1;
81
- 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;
81
+ const r = e.getBoundingClientRect(), n = t.getBoundingClientRect(), o = n.right > r.left && n.left < r.right, i = n.bottom > r.top && n.top < r.bottom;
82
82
  return o && i;
83
83
  }, N = (e, t) => {
84
84
  if (e === t) return !0;
85
85
  if (e == null || t == null || typeof e != "object" || typeof t != "object")
86
86
  return JSON.stringify(e) === JSON.stringify(t);
87
- const n = Object.keys(e), r = Object.keys(t);
88
- if (n.length !== r.length) return !1;
89
- for (const o of n)
90
- if (!r.includes(o) || !N(e[o], t[o])) return !1;
87
+ const r = Object.keys(e), n = Object.keys(t);
88
+ if (r.length !== n.length) return !1;
89
+ for (const o of r)
90
+ if (!n.includes(o) || !N(e[o], t[o])) return !1;
91
91
  return !0;
92
92
  }, x = "download", q = 150, F = (e, t = x) => {
93
- const n = t || x, r = String(e ?? "").trim();
94
- if (!r) return n;
95
- const i = r.replace(/[/\\?%*:|"<>]/g, "_").replace(/\.\./g, "_").split(/[/\\]/).pop() || n, l = 200;
96
- return i.length > l ? i.slice(0, l) : i;
93
+ const r = t || x, n = String(e ?? "").trim();
94
+ if (!n) return r;
95
+ const i = n.replace(/[/\\?%*:|"<>]/g, "_").replace(/\.\./g, "_").split(/[/\\]/).pop() || r, a = 200;
96
+ return i.length > a ? i.slice(0, a) : i;
97
97
  }, D = (e) => {
98
98
  const t = ((e == null ? void 0 : e.type) || "").toLowerCase();
99
99
  return t ? t.includes("spreadsheet") || t.includes("ms-excel") || t.includes("excel") && t.includes("application") : !1;
100
100
  }, $ = (e, t) => {
101
- const n = URL.createObjectURL(e), r = F(t), o = document.createElement("a");
102
- o.href = n, o.download = r, o.style.display = "none", document.body.appendChild(o);
101
+ const r = URL.createObjectURL(e), n = F(t), o = document.createElement("a");
102
+ o.href = r, o.download = n, o.style.display = "none", document.body.appendChild(o);
103
103
  try {
104
104
  o.click();
105
105
  } finally {
106
- document.body.removeChild(o), setTimeout(() => URL.revokeObjectURL(n), q);
106
+ document.body.removeChild(o), setTimeout(() => URL.revokeObjectURL(r), q);
107
107
  }
108
108
  }, z = (e) => {
109
109
  if (!e || e.source !== void 0 || e.type === void 0)
110
110
  return e;
111
- const { type: t, data: n, url: r, headers: o, name: i, filename: l, init: s, ...a } = e, u = l ?? i;
111
+ const { type: t, data: r, url: n, headers: o, name: i, filename: a, init: s, ...l } = e, u = a ?? i;
112
112
  return t === "csv" ? {
113
- ...a,
113
+ ...l,
114
114
  source: "inline",
115
- content: n,
115
+ content: r,
116
116
  filename: u,
117
117
  bom: e.bom
118
118
  } : t === "excel" ? {
119
- ...a,
119
+ ...l,
120
120
  source: "fetch",
121
- url: r,
121
+ url: n,
122
122
  init: { ...s || {}, headers: o ?? (s == null ? void 0 : s.headers) },
123
123
  response: "blob",
124
124
  expectExcel: !0,
@@ -126,13 +126,13 @@ const W = "lang", fe = (e, t) => {
126
126
  } : e;
127
127
  }, me = async (e = {}) => {
128
128
  const t = z(e), {
129
- source: n = "inline",
130
- content: r,
129
+ source: r = "inline",
130
+ content: n,
131
131
  blob: o,
132
132
  bom: i = !0,
133
- mime: l,
133
+ mime: a,
134
134
  url: s,
135
- init: a,
135
+ init: l,
136
136
  response: u = "blob",
137
137
  openIn: f = "self",
138
138
  expectExcel: c,
@@ -141,37 +141,37 @@ const W = "lang", fe = (e, t) => {
141
141
  error: p = () => {
142
142
  },
143
143
  // 避免 legacy 字段渗入后续逻辑
144
- type: le,
145
- data: ae,
144
+ type: ae,
145
+ data: le,
146
146
  headers: ce,
147
147
  ...ue
148
148
  } = t, v = g ?? m;
149
149
  try {
150
- if (n === "inline") {
150
+ if (r === "inline") {
151
151
  if (o instanceof Blob) {
152
152
  $(o, v);
153
153
  return;
154
154
  }
155
- if (r == null) {
155
+ if (n == null) {
156
156
  p(new Error("content or blob is required for inline"));
157
157
  return;
158
158
  }
159
- const d = typeof r == "string" ? r : String(r), R = i ? "\uFEFF" + d : d, S = l || (i ? "text/csv;charset=utf-8" : "text/plain;charset=utf-8");
159
+ const d = typeof n == "string" ? n : String(n), R = i ? "\uFEFF" + d : d, S = a || (i ? "text/csv;charset=utf-8" : "text/plain;charset=utf-8");
160
160
  $(new Blob([R], { type: S }), v);
161
161
  return;
162
162
  }
163
- if (n === "fetch") {
163
+ if (r === "fetch") {
164
164
  if (!s) {
165
165
  p(new Error("url is required for fetch"));
166
166
  return;
167
167
  }
168
- const d = await fetch(s, a);
168
+ const d = await fetch(s, l);
169
169
  if (!d.ok) {
170
170
  p(new Error(`fetch failed: ${d.status}`));
171
171
  return;
172
172
  }
173
173
  if (u === "text") {
174
- const S = await d.text(), H = i ? "\uFEFF" + S : S, j = l || (i ? "text/csv;charset=utf-8" : "text/plain;charset=utf-8");
174
+ const S = await d.text(), H = i ? "\uFEFF" + S : S, j = a || (i ? "text/csv;charset=utf-8" : "text/plain;charset=utf-8");
175
175
  $(new Blob([H], { type: j }), v);
176
176
  return;
177
177
  }
@@ -183,7 +183,7 @@ const W = "lang", fe = (e, t) => {
183
183
  $(R, v);
184
184
  return;
185
185
  }
186
- if (n === "open") {
186
+ if (r === "open") {
187
187
  if (!s) {
188
188
  p(new Error("url is required for open"));
189
189
  return;
@@ -191,58 +191,58 @@ const W = "lang", fe = (e, t) => {
191
191
  f === "blank" ? window.open(s, "_blank", "noopener,noreferrer") : window.location.href = s;
192
192
  return;
193
193
  }
194
- p(new Error(`unknown source: ${n}`));
194
+ p(new Error(`unknown source: ${r}`));
195
195
  } catch (d) {
196
196
  p(d instanceof Error ? d : new Error(String(d)));
197
197
  }
198
198
  };
199
- function G(e, t, n) {
199
+ function G(e, t, r) {
200
200
  if (t === "" || t === void 0 || t === null)
201
201
  return "";
202
- const r = globalThis.$fa, o = globalThis.$fu, i = (n == null ? void 0 : n.precision) ?? 2, l = n == null ? void 0 : n.unit;
203
- if ((l === "currency" || l === "%") && o) {
202
+ const n = globalThis.$fa, o = globalThis.$fu, i = (r == null ? void 0 : r.precision) ?? 2, a = r == null ? void 0 : r.unit;
203
+ if ((a === "currency" || a === "%") && o) {
204
204
  const s = {
205
205
  [e]: {
206
- unit: l === "currency" ? "currency" : "%",
206
+ unit: a === "currency" ? "currency" : "%",
207
207
  precision: i
208
208
  }
209
209
  };
210
210
  try {
211
211
  return o({
212
212
  prop: e,
213
- currency: n == null ? void 0 : n.currency,
213
+ currency: r == null ? void 0 : r.currency,
214
214
  value: t,
215
215
  obj: s
216
216
  });
217
217
  } catch {
218
218
  }
219
219
  }
220
- if (r)
220
+ if (n)
221
221
  try {
222
- return r(t, i);
222
+ return n(t, i);
223
223
  } catch {
224
224
  return String(t);
225
225
  }
226
226
  return String(t);
227
227
  }
228
- function ye(e, t, n = {}) {
229
- const { columns: r = [] } = e || {}, { resolveMetric: o } = n;
230
- return !r.length || !t || typeof t != "object" ? [] : r.map((i) => {
231
- const l = i.property ?? i.prop ?? "";
232
- if (!l)
228
+ function ye(e, t, r = {}) {
229
+ const { columns: n = [] } = e || {}, { resolveMetric: o } = r;
230
+ return !n.length || !t || typeof t != "object" ? [] : n.map((i) => {
231
+ const a = i.property ?? i.prop ?? "";
232
+ if (!a)
233
233
  return "";
234
- let s = t[l];
234
+ let s = t[a];
235
235
  if (s === void 0 && (s = ""), s === "")
236
236
  return "";
237
- const a = typeof o == "function" ? o(l) : void 0;
237
+ const l = typeof o == "function" ? o(a) : void 0;
238
238
  try {
239
- return G(l, s, a);
239
+ return G(a, s, l);
240
240
  } catch {
241
241
  return String(s);
242
242
  }
243
243
  });
244
244
  }
245
- const M = "mvframe_primary", I = "mvframe_theme", T = { r: 255, g: 255, b: 255 }, Y = { r: 0, g: 0, b: 0 }, J = [
245
+ const L = "mvframe_primary", I = "mvframe_theme", w = { r: 255, g: 255, b: 255 }, Y = { r: 0, g: 0, b: 0 }, J = [
246
246
  "--el-color-primary-light-3",
247
247
  "--el-color-primary-light-5",
248
248
  "--el-color-primary-light-7",
@@ -252,45 +252,45 @@ const M = "mvframe_primary", I = "mvframe_theme", T = { r: 255, g: 255, b: 255 }
252
252
  ];
253
253
  function A(e) {
254
254
  let t = String(e).trim().replace(/^#/, "");
255
- 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)))
255
+ if (t.length === 3 && (t = t.split("").map((n) => n + n).join("")), t.length >= 8 && (t = t.slice(0, 6)), t.length !== 6 || Number.isNaN(parseInt(t, 16)))
256
256
  return null;
257
- const n = parseInt(t, 16);
257
+ const r = parseInt(t, 16);
258
258
  return {
259
- r: n >> 16 & 255,
260
- g: n >> 8 & 255,
261
- b: n & 255
259
+ r: r >> 16 & 255,
260
+ g: r >> 8 & 255,
261
+ b: r & 255
262
262
  };
263
263
  }
264
- function y(e, t, n) {
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("")}`;
264
+ function y(e, t, r) {
265
+ const n = (o) => Math.max(0, Math.min(255, Math.round(o)));
266
+ return `#${[n(e), n(t), n(r)].map((o) => o.toString(16).padStart(2, "0")).join("")}`;
267
267
  }
268
268
  function K(e) {
269
- 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));
269
+ const t = [e.r, e.g, e.b].map((r) => (r /= 255, r <= 0.03928 ? r / 12.92 : ((r + 0.055) / 1.055) ** 2.4));
270
270
  return 0.2126 * t[0] + 0.7152 * t[1] + 0.0722 * t[2];
271
271
  }
272
272
  function O(e) {
273
273
  return K(e) > 0.5 ? "#1a1a1a" : "#ffffff";
274
274
  }
275
- function b(e, t, n) {
276
- const r = n / 100, o = 1 - r;
275
+ function b(e, t, r) {
276
+ const n = r / 100, o = 1 - n;
277
277
  return {
278
- r: e.r * r + t.r * o,
279
- g: e.g * r + t.g * o,
280
- b: e.b * r + t.b * o
278
+ r: e.r * n + t.r * o,
279
+ g: e.g * n + t.g * o,
280
+ b: e.b * n + t.b * o
281
281
  };
282
282
  }
283
283
  function X(e) {
284
284
  const t = A(e);
285
285
  if (!t)
286
286
  return null;
287
- const n = b(T, t, 30), r = b(T, t, 50), o = b(T, t, 70), i = b(T, t, 80), l = b(T, t, 90), s = b(Y, t, 20);
287
+ const r = b(w, t, 30), n = b(w, t, 50), o = b(w, t, 70), i = b(w, t, 80), a = b(w, t, 90), s = b(Y, t, 20);
288
288
  return {
289
- "--el-color-primary-light-3": y(n.r, n.g, n.b),
290
- "--el-color-primary-light-5": y(r.r, r.g, r.b),
289
+ "--el-color-primary-light-3": y(r.r, r.g, r.b),
290
+ "--el-color-primary-light-5": y(n.r, n.g, n.b),
291
291
  "--el-color-primary-light-7": y(o.r, o.g, o.b),
292
292
  "--el-color-primary-light-8": y(i.r, i.g, i.b),
293
- "--el-color-primary-light-9": y(l.r, l.g, l.b),
293
+ "--el-color-primary-light-9": y(a.r, a.g, a.b),
294
294
  "--el-color-primary-dark-2": y(s.r, s.g, s.b)
295
295
  };
296
296
  }
@@ -300,80 +300,80 @@ function Q(e) {
300
300
  e.style.removeProperty(t);
301
301
  }
302
302
  function Z(e, t) {
303
- const n = A(t.startsWith("#") ? t : `#${t}`);
304
- if (!n)
303
+ const r = A(t.startsWith("#") ? t : `#${t}`);
304
+ if (!r)
305
305
  return !1;
306
- const r = y(n.r, n.g, n.b);
307
- e.style.setProperty("--color-primary", r), e.style.setProperty("--el-color-primary", r), e.style.setProperty("--color-on-primary-text", O(n));
308
- const o = X(r);
309
- return o && Object.entries(o).forEach(([i, l]) => e.style.setProperty(i, l)), !0;
306
+ const n = y(r.r, r.g, r.b);
307
+ e.style.setProperty("--color-primary", n), e.style.setProperty("--el-color-primary", n), e.style.setProperty("--color-on-primary-text", O(r));
308
+ const o = X(n);
309
+ return o && Object.entries(o).forEach(([i, a]) => e.style.setProperty(i, a)), !0;
310
310
  }
311
311
  function ee(e = {}) {
312
312
  const t = document.documentElement;
313
313
  if (e.primary != null && e.primary !== "") {
314
- const r = String(e.primary).trim();
315
- if (!Z(t, r)) {
316
- t.style.setProperty("--color-primary", r), t.style.setProperty("--el-color-primary", r);
317
- const o = A(r.startsWith("#") ? r : `#${r}`);
314
+ const n = String(e.primary).trim();
315
+ if (!Z(t, n)) {
316
+ t.style.setProperty("--color-primary", n), t.style.setProperty("--el-color-primary", n);
317
+ const o = A(n.startsWith("#") ? n : `#${n}`);
318
318
  o && t.style.setProperty("--color-on-primary-text", O(o));
319
319
  }
320
320
  } else (e.primary === null || e.primary === "") && (t.style.removeProperty("--color-primary"), Q(t));
321
- const n = e.mode ?? (t.classList.contains("dark") ? "dark" : "light");
322
- t.classList.toggle("dark", n === "dark");
321
+ const r = e.mode ?? (t.classList.contains("dark") ? "dark" : "light");
322
+ t.classList.toggle("dark", r === "dark");
323
323
  }
324
324
  function be(e) {
325
- e.primary !== void 0 && (e.primary == null || e.primary === "" ? localStorage.removeItem(M) : localStorage.setItem(M, String(e.primary))), e.mode !== void 0 && localStorage.setItem(I, e.mode);
325
+ e.primary !== void 0 && (e.primary == null || e.primary === "" ? localStorage.removeItem(L) : localStorage.setItem(L, String(e.primary))), e.mode !== void 0 && localStorage.setItem(I, e.mode);
326
326
  }
327
- function Ee() {
328
- const e = localStorage.getItem(M), n = localStorage.getItem(I) === "dark" ? "dark" : "light";
327
+ function _e() {
328
+ const e = localStorage.getItem(L), r = localStorage.getItem(I) === "dark" ? "dark" : "light";
329
329
  ee({
330
330
  primary: e != null && e !== "" ? e : null,
331
- mode: n
331
+ mode: r
332
332
  });
333
333
  }
334
334
  const te = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 };
335
- let w = null;
336
- function k(e) {
335
+ let T = null;
336
+ function C(e) {
337
337
  V("error", e);
338
338
  }
339
- function _e(e) {
340
- w = e && typeof e == "object" ? e : null;
339
+ function Ee(e) {
340
+ T = e && typeof e == "object" ? e : null;
341
341
  }
342
342
  function P(e) {
343
- if (w && w[e] != null && w[e] !== "")
344
- return String(w[e]);
343
+ if (T && T[e] != null && T[e] !== "")
344
+ return String(T[e]);
345
345
  const t = typeof globalThis < "u" ? globalThis.__MVFRAME_ENV__ : null;
346
346
  if (t && t[e] != null && t[e] !== "")
347
347
  return String(t[e]);
348
- const n = typeof import.meta < "u" ? te : null;
349
- return n && n[e] != null && n[e] !== "" ? String(n[e]) : "";
348
+ const r = typeof import.meta < "u" ? te : null;
349
+ return r && r[e] != null && r[e] !== "" ? String(r[e]) : "";
350
350
  }
351
- const _ = C.create({
351
+ const E = k.create({
352
352
  timeout: 0,
353
353
  withCredentials: !1
354
354
  });
355
355
  let h = [];
356
- const ne = C.CancelToken, re = (e) => {
357
- const t = e.url + "_" + e.headers["Content-HI"] + "_" + e.ex, n = [];
356
+ const re = k.CancelToken, ne = (e) => {
357
+ const t = e.url + "_" + e.headers["Content-HI"] + "_" + e.ex, r = [];
358
358
  if (h.length)
359
- for (let r in h)
360
- h[r].v === t && n.push(r);
361
- n.length > 0 && (h[n[0]].cb(), h.splice(n[0], 1));
362
- }, E = (e) => {
359
+ for (let n in h)
360
+ h[n].v === t && r.push(n);
361
+ r.length > 0 && (h[r[0]].cb(), h.splice(r[0], 1));
362
+ }, _ = (e) => {
363
363
  if (e != null && e.url) {
364
364
  const t = e.url + "_" + e.headers["Content-HI"] + "_" + e.ex;
365
- for (let n in h)
366
- if (h[n].v === t) {
367
- h.splice(n, 1);
365
+ for (let r in h)
366
+ if (h[r].v === t) {
367
+ h.splice(r, 1);
368
368
  break;
369
369
  }
370
370
  }
371
371
  };
372
- _.interceptors.request.use(
372
+ E.interceptors.request.use(
373
373
  (e) => {
374
374
  e.headers = e.headers || {};
375
- const { login: t, accountInfo: n = {} } = window.$store.launch(), { access_token: r } = t.info;
376
- return r && e.headers["Content-HI"] && (e.headers.Authorization = `Bearer ${r}`), n.parent_org_id && (e.data ? e.data.parent_org_id = n.parent_org_id : e.data = { parent_org_id: n.parent_org_id }), re(e), e.cancelToken = new ne((o) => {
375
+ const { login: t, accountInfo: r = {} } = window.$store.launch(), { access_token: n } = t.info;
376
+ return n && e.headers["Content-HI"] && (e.headers.Authorization = `Bearer ${n}`), r.partner_org_id && (e.data ? e.method.toLowerCase() === "get" ? e.params.partner_org_id = r.partner_org_id : e.data.partner_org_id = r.partner_org_id : e.method.toLowerCase() === "get" ? e.params = { partner_org_id: r.partner_org_id } : e.data = { partner_org_id: r.partner_org_id }), ne(e), e.cancelToken = new re((o) => {
377
377
  h.push({
378
378
  v: e.url + "_" + e.headers["Content-HI"] + "_" + e.ex,
379
379
  cb: o
@@ -382,30 +382,30 @@ _.interceptors.request.use(
382
382
  },
383
383
  (e) => Promise.reject(e)
384
384
  );
385
- _.interceptors.response.use(
385
+ E.interceptors.response.use(
386
386
  ({ data: e, config: t }) => {
387
387
  var i;
388
388
  if (e == null || typeof e != "object" || Array.isArray(e))
389
- return E(t), e;
390
- let { code: n, message: r, msg: o } = e;
391
- if (o = o || r, n === 200)
392
- E(t);
393
- else if (n === 500) {
389
+ return _(t), e;
390
+ let { code: r, message: n, msg: o } = e;
391
+ if (o = o || n, r === 200)
392
+ _(t);
393
+ else if (r === 500) {
394
394
  if (t.showMsg !== !1) {
395
- const l = (i = t == null ? void 0 : t.headers) != null && i.CONTACT_CUSTOMER_SERVICE ? window.$l("CONTACT_CUSTOMER_SERVICE") : "";
396
- k({
395
+ const a = (i = t == null ? void 0 : t.headers) != null && i.CONTACT_CUSTOMER_SERVICE ? window.$l("CONTACT_CUSTOMER_SERVICE") : "";
396
+ C({
397
397
  grouping: !0,
398
398
  showClose: !0,
399
399
  duration: 0,
400
- message: [o, l].filter(Boolean).join(" ")
400
+ message: [o, a].filter(Boolean).join(" ")
401
401
  });
402
402
  }
403
- E(t);
404
- } else n === 403 && window.location.replace("/"), E(t);
403
+ _(t);
404
+ } else r === 403 && window.location.replace("/"), _(t);
405
405
  return e;
406
406
  },
407
407
  (e) => {
408
- var n, r, o, i, l;
408
+ var r, n, o, i, a;
409
409
  let t = !1;
410
410
  if (e && e.response)
411
411
  switch (e.response.status) {
@@ -425,86 +425,86 @@ _.interceptors.response.use(
425
425
  e.message = `Connection Error-${e.response.status}`;
426
426
  }
427
427
  else
428
- (n = e.stack) != null && n.includes("timeout") ? e.message = window.$l("Timeout, Please Refresh") : (e.message = window.$l("Connect Failed"), t = !0);
429
- return t || ((r = e == null ? void 0 : e.response) == null ? void 0 : r.status) !== 403 && k({
428
+ (r = e.stack) != null && r.includes("timeout") ? e.message = window.$l("Timeout, Please Refresh") : (e.message = window.$l("Connect Failed"), t = !0);
429
+ return t || ((n = e == null ? void 0 : e.response) == null ? void 0 : n.status) !== 403 && C({
430
430
  grouping: !0,
431
431
  message: `${e.message} ${(i = (o = e.config) == null ? void 0 : o.headers) == null ? void 0 : i["Content-HI"]}`
432
- }), E(e.config), e.code === "ERR_CANCELED" ? Promise.resolve({ code: e.code, msg: e.message }) : Promise.resolve({
433
- code: (l = e.response) == null ? void 0 : l.status,
432
+ }), _(e.config), e.code === "ERR_CANCELED" ? Promise.resolve({ code: e.code, msg: e.message }) : Promise.resolve({
433
+ code: (a = e.response) == null ? void 0 : a.status,
434
434
  msg: e.message
435
435
  });
436
436
  }
437
437
  );
438
438
  function oe(e) {
439
- 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);
439
+ 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(e);
440
440
  }
441
441
  function se(e) {
442
442
  return e.baseURL = P("VITE_APP_BASEURL"), e.method = "get", e.headers = {
443
443
  ...e.headers,
444
444
  "Content-HI": e.url
445
- }, e.url = e.ver ? `api/${e.ver}/ads` : "api/v3/ads", e.data && (e.params = e.data), _(e);
445
+ }, e.url = e.ver ? `api/${e.ver}/ads` : "api/v3/ads", e.data && (e.params = e.data), E(e);
446
446
  }
447
447
  function ie(e) {
448
448
  if (e.baseURL = P("VITE_APP_BASEURL"), e.method = "post", e.headers = {
449
449
  ...e.headers,
450
450
  "Content-HI": e.url
451
451
  }, e.data && window.$getType(e.data) === "Object") {
452
- const n = {};
453
- Object.keys(e.data).forEach((r) => {
454
- const o = e.data[r];
455
- [null, "", void 0].includes(o) || (n[r] = o);
456
- }), e.data = n;
452
+ const r = {};
453
+ Object.keys(e.data).forEach((n) => {
454
+ const o = e.data[n];
455
+ [null, "", void 0].includes(o) || (r[n] = o);
456
+ }), e.data = r;
457
457
  }
458
- return e.url = e.ver ? `api/${e.ver}/ads` : "api/v2/ads", _(e);
458
+ return e.url = e.ver ? `api/${e.ver}/ads` : "api/v3/ads", E(e);
459
459
  }
460
- function L({
460
+ function M({
461
461
  data: e,
462
462
  url: t,
463
- ex: n,
464
- method: r = "post",
463
+ ex: r,
464
+ method: n = "post",
465
465
  emptyString: o = !1
466
466
  }) {
467
- const i = {}, l = [void 0, null];
468
- o === !1 && l.push("");
467
+ const i = {}, a = [void 0, null];
468
+ o === !1 && a.push("");
469
469
  for (let u in e)
470
- l.indexOf(e[u]) === -1 && (i[u] = e[u]);
471
- const { login: s } = window.$store.launch(), { access_token: a } = s.info || {};
472
- return _({
470
+ a.indexOf(e[u]) === -1 && (i[u] = e[u]);
471
+ const { login: s } = window.$store.launch(), { access_token: l } = s.info || {};
472
+ return E({
473
473
  headers: {
474
474
  "Content-Type": "application/json",
475
- token: a != null ? String(a) : ""
475
+ token: l != null ? String(l) : ""
476
476
  },
477
477
  baseURL: P("VITE_APP_AIURL"),
478
478
  url: t,
479
- method: r,
479
+ method: n,
480
480
  data: i,
481
- ex: n
481
+ ex: r
482
482
  });
483
483
  }
484
- const Te = L;
485
- function we(e) {
486
- globalThis.$login = oe, globalThis.$get = se, globalThis.$post = ie, globalThis.$form = L, globalThis.$xform = L;
484
+ const we = M;
485
+ function Te(e) {
486
+ globalThis.$login = oe, globalThis.$get = se, globalThis.$post = ie, globalThis.$form = M, globalThis.$xform = M;
487
487
  }
488
488
  export {
489
489
  W as MVFRAME_STORAGE_LANG,
490
- M as MVFRAME_STORAGE_PRIMARY,
490
+ L as MVFRAME_STORAGE_PRIMARY,
491
491
  I as MVFRAME_STORAGE_THEME,
492
492
  ee as applyMvframeTheme,
493
493
  N as deepEqual,
494
494
  me as download,
495
495
  G as formatSummaryCell,
496
496
  Se as getMaps,
497
- we as installRq,
497
+ Te as installRq,
498
498
  he as isInView,
499
- Ee as loadMvframeTheme,
499
+ _e as loadMvframeTheme,
500
500
  $e as mapLang,
501
501
  Pe as mapLangPath,
502
- Me as mergeMaps,
503
- Le as patchMaps,
502
+ Le as mergeMaps,
503
+ Me as patchMaps,
504
504
  be as persistMvframeTheme,
505
505
  F as sanitizeDownloadFileName,
506
- _e as setMvframeRqEnv,
507
- L as useForm,
506
+ Ee as setMvframeRqEnv,
507
+ M as useForm,
508
508
  se as useGet,
509
509
  ge as useLang,
510
510
  oe as useLogin,
@@ -512,5 +512,5 @@ export {
512
512
  fe as useOptions,
513
513
  ie as usePost,
514
514
  ye as useRemoteSummary,
515
- Te as useXform
515
+ we as useXform
516
516
  };
package/dist/vendor.js CHANGED
@@ -9320,7 +9320,7 @@ const gi = {
9320
9320
  }, Ai = {
9321
9321
  name: "Matt Avias Frame",
9322
9322
  copyright: "©2026",
9323
- version: "1.0.67",
9323
+ version: "1.0.68",
9324
9324
  author: "Matt Avias",
9325
9325
  date: "2026-02-26",
9326
9326
  /** 默认语言 key,与 `$getLang`、localStorage `lang` 一致;业务在 app.use(mvframe, { config }) 里覆盖 */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mvframe",
3
3
  "packageManager": "yarn@4.4.1",
4
- "version": "1.0.67",
4
+ "version": "1.0.68",
5
5
  "author": "matt avis",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",