@vtj/utils 0.9.15 → 0.9.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -6
- package/dist/index.iife.js +18 -18
- package/dist/index.mjs +82 -82
- package/dist/index.umd.js +18 -18
- package/package.json +1 -1
- package/types/version.d.ts +2 -2
package/dist/index.mjs
CHANGED
@@ -15,10 +15,10 @@ export * from "@vtj/base";
|
|
15
15
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
16
16
|
* @name @vtj/utils
|
17
17
|
* @author CHC chenhuachun1549@dingtalk.com
|
18
|
-
* @version 0.9.
|
18
|
+
* @version 0.9.16
|
19
19
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
20
20
|
*/
|
21
|
-
const Ys = "0.9.
|
21
|
+
const Ys = "0.9.16";
|
22
22
|
/**
|
23
23
|
* @vue/shared v3.5.13
|
24
24
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
@@ -31,7 +31,7 @@ function wn(e) {
|
|
31
31
|
for (const n of e.split(",")) t[n] = 1;
|
32
32
|
return (n) => n in t;
|
33
33
|
}
|
34
|
-
const yn = Object.assign, bn = Object.prototype.hasOwnProperty,
|
34
|
+
const yn = Object.assign, bn = Object.prototype.hasOwnProperty, De = (e, t) => bn.call(e, t), z = Array.isArray, le = (e) => St(e) === "[object Map]", Rn = (e) => typeof e == "string", re = (e) => typeof e == "symbol", we = (e) => e !== null && typeof e == "object", En = Object.prototype.toString, St = (e) => En.call(e), Sn = (e) => St(e).slice(8, -1), Ke = (e) => Rn(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, Z = (e, t) => !Object.is(e, t);
|
35
35
|
var _n = { ENV_TYPE: "local", NODE_ENV: "production" };
|
36
36
|
let On, _t = 0, Te;
|
37
37
|
function Ve() {
|
@@ -85,7 +85,7 @@ class Tt {
|
|
85
85
|
}
|
86
86
|
}
|
87
87
|
}
|
88
|
-
const
|
88
|
+
const ve = /* @__PURE__ */ new WeakMap(), M = Symbol(
|
89
89
|
""
|
90
90
|
), Ue = Symbol(
|
91
91
|
""
|
@@ -94,14 +94,14 @@ const De = /* @__PURE__ */ new WeakMap(), M = Symbol(
|
|
94
94
|
);
|
95
95
|
function A(e, t, n) {
|
96
96
|
if (pe && On) {
|
97
|
-
let r =
|
98
|
-
r ||
|
97
|
+
let r = ve.get(e);
|
98
|
+
r || ve.set(e, r = /* @__PURE__ */ new Map());
|
99
99
|
let s = r.get(n);
|
100
100
|
s || (r.set(n, s = new Tt()), s.map = r, s.key = n), s.track();
|
101
101
|
}
|
102
102
|
}
|
103
103
|
function U(e, t, n, r, s, o) {
|
104
|
-
const i =
|
104
|
+
const i = ve.get(e);
|
105
105
|
if (!i)
|
106
106
|
return;
|
107
107
|
const a = (f) => {
|
@@ -152,26 +152,26 @@ const An = {
|
|
152
152
|
return xe(this, "entries", (e) => (e[1] = x(e[1]), e));
|
153
153
|
},
|
154
154
|
every(e, t) {
|
155
|
-
return
|
155
|
+
return D(this, "every", e, t, void 0, arguments);
|
156
156
|
},
|
157
157
|
filter(e, t) {
|
158
|
-
return
|
158
|
+
return D(this, "filter", e, t, (n) => n.map(x), arguments);
|
159
159
|
},
|
160
160
|
find(e, t) {
|
161
|
-
return
|
161
|
+
return D(this, "find", e, t, x, arguments);
|
162
162
|
},
|
163
163
|
findIndex(e, t) {
|
164
|
-
return
|
164
|
+
return D(this, "findIndex", e, t, void 0, arguments);
|
165
165
|
},
|
166
166
|
findLast(e, t) {
|
167
|
-
return
|
167
|
+
return D(this, "findLast", e, t, x, arguments);
|
168
168
|
},
|
169
169
|
findLastIndex(e, t) {
|
170
|
-
return
|
170
|
+
return D(this, "findLastIndex", e, t, void 0, arguments);
|
171
171
|
},
|
172
172
|
// flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
|
173
173
|
forEach(e, t) {
|
174
|
-
return
|
174
|
+
return D(this, "forEach", e, t, void 0, arguments);
|
175
175
|
},
|
176
176
|
includes(...e) {
|
177
177
|
return Ae(this, "includes", e);
|
@@ -187,7 +187,7 @@ const An = {
|
|
187
187
|
return Ae(this, "lastIndexOf", e);
|
188
188
|
},
|
189
189
|
map(e, t) {
|
190
|
-
return
|
190
|
+
return D(this, "map", e, t, void 0, arguments);
|
191
191
|
},
|
192
192
|
pop() {
|
193
193
|
return G(this, "pop");
|
@@ -206,7 +206,7 @@ const An = {
|
|
206
206
|
},
|
207
207
|
// slice could use ARRAY_ITERATE but also seems to beg for range tracking
|
208
208
|
some(e, t) {
|
209
|
-
return
|
209
|
+
return D(this, "some", e, t, void 0, arguments);
|
210
210
|
},
|
211
211
|
splice(...e) {
|
212
212
|
return G(this, "splice", e);
|
@@ -235,7 +235,7 @@ function xe(e, t, n) {
|
|
235
235
|
}), s;
|
236
236
|
}
|
237
237
|
const Cn = Array.prototype;
|
238
|
-
function
|
238
|
+
function D(e, t, n, r, s, o) {
|
239
239
|
const i = Xe(e), a = i !== e && !B(e), f = i[t];
|
240
240
|
if (f !== Cn[t]) {
|
241
241
|
const d = f.apply(e, o);
|
@@ -311,7 +311,7 @@ class At {
|
|
311
311
|
// its class methods
|
312
312
|
W(t) ? t : r
|
313
313
|
);
|
314
|
-
return (re(n) ? xt.has(n) : Pn(n)) || (s || A(t, "get", n), o) ? a : W(a) ? i && Ke(n) ? a : a.value : we(a) ? s ?
|
314
|
+
return (re(n) ? xt.has(n) : Pn(n)) || (s || A(t, "get", n), o) ? a : W(a) ? i && Ke(n) ? a : a.value : we(a) ? s ? Nt(a) : Lt(a) : a;
|
315
315
|
}
|
316
316
|
}
|
317
317
|
class Ln extends At {
|
@@ -325,7 +325,7 @@ class Ln extends At {
|
|
325
325
|
if (!B(r) && !$(r) && (o = R(o), r = R(r)), !z(t) && W(o) && !W(r))
|
326
326
|
return f ? !1 : (o.value = r, !0);
|
327
327
|
}
|
328
|
-
const i = z(t) && Ke(n) ? Number(n) < t.length :
|
328
|
+
const i = z(t) && Ke(n) ? Number(n) < t.length : De(t, n), a = Reflect.set(
|
329
329
|
t,
|
330
330
|
n,
|
331
331
|
r,
|
@@ -334,7 +334,7 @@ class Ln extends At {
|
|
334
334
|
return t === R(s) && (i ? Z(r, o) && U(t, "set", n, r) : U(t, "add", n, r)), a;
|
335
335
|
}
|
336
336
|
deleteProperty(t, n) {
|
337
|
-
const r =
|
337
|
+
const r = De(t, n);
|
338
338
|
t[n];
|
339
339
|
const s = Reflect.deleteProperty(t, n);
|
340
340
|
return s && r && U(t, "delete", n, void 0), s;
|
@@ -351,7 +351,7 @@ class Ln extends At {
|
|
351
351
|
), Reflect.ownKeys(t);
|
352
352
|
}
|
353
353
|
}
|
354
|
-
class
|
354
|
+
class Nn extends At {
|
355
355
|
constructor(t = !1) {
|
356
356
|
super(!0, t);
|
357
357
|
}
|
@@ -362,8 +362,8 @@ class vn extends At {
|
|
362
362
|
return !0;
|
363
363
|
}
|
364
364
|
}
|
365
|
-
const
|
366
|
-
function
|
365
|
+
const Fn = /* @__PURE__ */ new Ln(), Dn = /* @__PURE__ */ new Nn(), Be = (e) => e, ae = (e) => Reflect.getPrototypeOf(e);
|
366
|
+
function vn(e, t, n) {
|
367
367
|
return function(...r) {
|
368
368
|
const s = this.__v_raw, o = R(s), i = le(o), a = e === "entries" || e === Symbol.iterator && i, f = e === "keys" && i, c = s[e](...r), l = n ? Be : t ? Ie : x;
|
369
369
|
return !t && A(
|
@@ -460,13 +460,13 @@ function Un(e, t) {
|
|
460
460
|
"entries",
|
461
461
|
Symbol.iterator
|
462
462
|
].forEach((s) => {
|
463
|
-
n[s] =
|
463
|
+
n[s] = vn(s, e, t);
|
464
464
|
}), n;
|
465
465
|
}
|
466
466
|
function Ct(e, t) {
|
467
467
|
const n = Un(e, t);
|
468
468
|
return (r, s, o) => s === "__v_isReactive" ? !e : s === "__v_isReadonly" ? e : s === "__v_raw" ? r : Reflect.get(
|
469
|
-
|
469
|
+
De(n, s) && s in r ? n : r,
|
470
470
|
s,
|
471
471
|
o
|
472
472
|
);
|
@@ -494,24 +494,24 @@ function Hn(e) {
|
|
494
494
|
return e.__v_skip || !Object.isExtensible(e) ? 0 : qn(Sn(e));
|
495
495
|
}
|
496
496
|
function Lt(e) {
|
497
|
-
return $(e) ? e :
|
497
|
+
return $(e) ? e : Ft(
|
498
498
|
e,
|
499
499
|
!1,
|
500
|
-
|
500
|
+
Fn,
|
501
501
|
Bn,
|
502
502
|
Pt
|
503
503
|
);
|
504
504
|
}
|
505
|
-
function
|
506
|
-
return
|
505
|
+
function Nt(e) {
|
506
|
+
return Ft(
|
507
507
|
e,
|
508
508
|
!0,
|
509
|
-
|
509
|
+
Dn,
|
510
510
|
In,
|
511
511
|
jt
|
512
512
|
);
|
513
513
|
}
|
514
|
-
function
|
514
|
+
function Ft(e, t, n, r, s) {
|
515
515
|
if (!we(e) || e.__v_raw && !(t && e.__v_isReactive))
|
516
516
|
return e;
|
517
517
|
const o = s.get(e);
|
@@ -539,7 +539,7 @@ function R(e) {
|
|
539
539
|
const t = e && e.__v_raw;
|
540
540
|
return t ? R(t) : e;
|
541
541
|
}
|
542
|
-
const x = (e) => we(e) ? Lt(e) : e, Ie = (e) => we(e) ?
|
542
|
+
const x = (e) => we(e) ? Lt(e) : e, Ie = (e) => we(e) ? Nt(e) : e;
|
543
543
|
function W(e) {
|
544
544
|
return e ? e.__v_isRef === !0 : !1;
|
545
545
|
}
|
@@ -561,7 +561,7 @@ class Wn {
|
|
561
561
|
t = r ? t : R(t), Z(t, n) && (this._rawValue = t, this._value = r ? t : x(t), this.dep.trigger());
|
562
562
|
}
|
563
563
|
}
|
564
|
-
function
|
564
|
+
function Dt(e, t) {
|
565
565
|
return function() {
|
566
566
|
return e.apply(t, arguments);
|
567
567
|
};
|
@@ -569,25 +569,25 @@ function Ft(e, t) {
|
|
569
569
|
const { toString: $n } = Object.prototype, { getPrototypeOf: Ye } = Object, ye = /* @__PURE__ */ ((e) => (t) => {
|
570
570
|
const n = $n.call(t);
|
571
571
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
572
|
-
})(/* @__PURE__ */ Object.create(null)),
|
572
|
+
})(/* @__PURE__ */ Object.create(null)), N = (e) => (e = e.toLowerCase(), (t) => ye(t) === e), be = (e) => (t) => typeof t === e, { isArray: K } = Array, te = be("undefined");
|
573
573
|
function Kn(e) {
|
574
574
|
return e !== null && !te(e) && e.constructor !== null && !te(e.constructor) && j(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
575
575
|
}
|
576
|
-
const
|
576
|
+
const vt = N("ArrayBuffer");
|
577
577
|
function Vn(e) {
|
578
578
|
let t;
|
579
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
579
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && vt(e.buffer), t;
|
580
580
|
}
|
581
581
|
const Gn = be("string"), j = be("function"), Ut = be("number"), Re = (e) => e !== null && typeof e == "object", Xn = (e) => e === !0 || e === !1, fe = (e) => {
|
582
582
|
if (ye(e) !== "object")
|
583
583
|
return !1;
|
584
584
|
const t = Ye(e);
|
585
585
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
586
|
-
}, Yn =
|
586
|
+
}, Yn = N("Date"), Qn = N("File"), Zn = N("Blob"), er = N("FileList"), tr = (e) => Re(e) && j(e.pipe), nr = (e) => {
|
587
587
|
let t;
|
588
588
|
return e && (typeof FormData == "function" && e instanceof FormData || j(e.append) && ((t = ye(e)) === "formdata" || // detect form-data instance
|
589
589
|
t === "object" && j(e.toString) && e.toString() === "[object FormData]"));
|
590
|
-
}, rr =
|
590
|
+
}, rr = N("URLSearchParams"), [sr, or, ir, ar] = ["ReadableStream", "Request", "Response", "Headers"].map(N), cr = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
591
591
|
function se(e, t, { allOwnKeys: n = !1 } = {}) {
|
592
592
|
if (e === null || typeof e > "u")
|
593
593
|
return;
|
@@ -622,7 +622,7 @@ function ke() {
|
|
622
622
|
return t;
|
623
623
|
}
|
624
624
|
const ur = (e, t, n, { allOwnKeys: r } = {}) => (se(t, (s, o) => {
|
625
|
-
n && j(s) ? e[o] =
|
625
|
+
n && j(s) ? e[o] = Dt(s, n) : e[o] = s;
|
626
626
|
}, { allOwnKeys: r }), e), lr = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), fr = (e, t, n, r) => {
|
627
627
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
628
628
|
value: t.prototype
|
@@ -663,12 +663,12 @@ const ur = (e, t, n, { allOwnKeys: r } = {}) => (se(t, (s, o) => {
|
|
663
663
|
for (; (n = e.exec(t)) !== null; )
|
664
664
|
r.push(n);
|
665
665
|
return r;
|
666
|
-
}, yr =
|
666
|
+
}, yr = N("HTMLFormElement"), br = (e) => e.toLowerCase().replace(
|
667
667
|
/[-_\s]([a-z\d])(\w*)/g,
|
668
668
|
function(n, r, s) {
|
669
669
|
return r.toUpperCase() + s;
|
670
670
|
}
|
671
|
-
), st = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Rr =
|
671
|
+
), st = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Rr = N("RegExp"), kt = (e, t) => {
|
672
672
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
673
673
|
se(n, (s, o) => {
|
674
674
|
let i;
|
@@ -728,7 +728,7 @@ const Ar = (e) => {
|
|
728
728
|
return r;
|
729
729
|
};
|
730
730
|
return n(e, 0);
|
731
|
-
}, Cr =
|
731
|
+
}, Cr = N("AsyncFunction"), Pr = (e) => e && (Re(e) || j(e)) && j(e.then) && j(e.catch), qt = ((e, t) => e ? setImmediate : t ? ((n, r) => (k.addEventListener("message", ({ source: s, data: o }) => {
|
732
732
|
s === k && o === n && r.length && r.shift()();
|
733
733
|
}, !1), (s) => {
|
734
734
|
r.push(s), k.postMessage(n, "*");
|
@@ -737,7 +737,7 @@ const Ar = (e) => {
|
|
737
737
|
j(k.postMessage)
|
738
738
|
), jr = typeof queueMicrotask < "u" ? queueMicrotask.bind(k) : typeof process < "u" && process.nextTick || qt, u = {
|
739
739
|
isArray: K,
|
740
|
-
isArrayBuffer:
|
740
|
+
isArrayBuffer: vt,
|
741
741
|
isBuffer: Kn,
|
742
742
|
isFormData: nr,
|
743
743
|
isArrayBufferView: Vn,
|
@@ -768,7 +768,7 @@ const Ar = (e) => {
|
|
768
768
|
inherits: fr,
|
769
769
|
toFlatObject: dr,
|
770
770
|
kindOf: ye,
|
771
|
-
kindOfTest:
|
771
|
+
kindOfTest: N,
|
772
772
|
endsWith: hr,
|
773
773
|
toArray: pr,
|
774
774
|
forEachEntry: gr,
|
@@ -857,10 +857,10 @@ function it(e, t, n) {
|
|
857
857
|
return s = zt(s), !n && o ? "[" + s + "]" : s;
|
858
858
|
}).join(n ? "." : "") : t;
|
859
859
|
}
|
860
|
-
function
|
860
|
+
function Nr(e) {
|
861
861
|
return u.isArray(e) && !e.some(Me);
|
862
862
|
}
|
863
|
-
const
|
863
|
+
const Fr = u.toFlatObject(u, {}, null, function(t) {
|
864
864
|
return /^is[A-Z]/.test(t);
|
865
865
|
});
|
866
866
|
function Ee(e, t, n) {
|
@@ -889,7 +889,7 @@ function Ee(e, t, n) {
|
|
889
889
|
if (h && !p && typeof h == "object") {
|
890
890
|
if (u.endsWith(g, "{}"))
|
891
891
|
g = r ? g : g.slice(0, -2), h = JSON.stringify(h);
|
892
|
-
else if (u.isArray(h) &&
|
892
|
+
else if (u.isArray(h) && Nr(h) || (u.isFileList(h) || u.endsWith(g, "[]")) && (y = u.toArray(h)))
|
893
893
|
return g = zt(g), y.forEach(function(b, L) {
|
894
894
|
!(u.isUndefined(b) || b === null) && t.append(
|
895
895
|
// eslint-disable-next-line no-nested-ternary
|
@@ -900,7 +900,7 @@ function Ee(e, t, n) {
|
|
900
900
|
}
|
901
901
|
return Me(h) ? !0 : (t.append(it(p, g, o), c(h)), !1);
|
902
902
|
}
|
903
|
-
const d = [], m = Object.assign(
|
903
|
+
const d = [], m = Object.assign(Fr, {
|
904
904
|
defaultVisitor: l,
|
905
905
|
convertValue: c,
|
906
906
|
isVisitable: Me
|
@@ -953,13 +953,13 @@ Wt.toString = function(t) {
|
|
953
953
|
return n(s[0]) + "=" + n(s[1]);
|
954
954
|
}, "").join("&");
|
955
955
|
};
|
956
|
-
function
|
956
|
+
function Dr(e) {
|
957
957
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
958
958
|
}
|
959
959
|
function $t(e, t, n) {
|
960
960
|
if (!t)
|
961
961
|
return e;
|
962
|
-
const r = n && n.encode ||
|
962
|
+
const r = n && n.encode || Dr;
|
963
963
|
u.isFunction(n) && (n = {
|
964
964
|
serialize: n
|
965
965
|
});
|
@@ -1029,10 +1029,10 @@ const Kt = {
|
|
1029
1029
|
silentJSONParsing: !0,
|
1030
1030
|
forcedJSONParsing: !0,
|
1031
1031
|
clarifyTimeoutError: !1
|
1032
|
-
},
|
1032
|
+
}, vr = typeof URLSearchParams < "u" ? URLSearchParams : Qe, Ur = typeof FormData < "u" ? FormData : null, Br = typeof Blob < "u" ? Blob : null, Ir = {
|
1033
1033
|
isBrowser: !0,
|
1034
1034
|
classes: {
|
1035
|
-
URLSearchParams:
|
1035
|
+
URLSearchParams: vr,
|
1036
1036
|
FormData: Ur,
|
1037
1037
|
Blob: Br
|
1038
1038
|
},
|
@@ -1771,8 +1771,8 @@ const ps = async (e) => {
|
|
1771
1771
|
method: "POST",
|
1772
1772
|
body: r,
|
1773
1773
|
duplex: "half"
|
1774
|
-
}),
|
1775
|
-
if (u.isFormData(r) && (
|
1774
|
+
}), v;
|
1775
|
+
if (u.isFormData(r) && (v = T.headers.get("content-type")) && l.setContentType(v), T.body) {
|
1776
1776
|
const [I, ie] = lt(
|
1777
1777
|
p,
|
1778
1778
|
me(ft(f))
|
@@ -1798,8 +1798,8 @@ const ps = async (e) => {
|
|
1798
1798
|
["status", "statusText", "headers"].forEach((nt) => {
|
1799
1799
|
T[nt] = S[nt];
|
1800
1800
|
});
|
1801
|
-
const
|
1802
|
-
|
1801
|
+
const v = u.toFiniteNumber(S.headers.get("content-length")), [I, ie] = a && lt(
|
1802
|
+
v,
|
1803
1803
|
me(ft(a), !0)
|
1804
1804
|
) || [];
|
1805
1805
|
S = new Response(
|
@@ -1811,8 +1811,8 @@ const ps = async (e) => {
|
|
1811
1811
|
}
|
1812
1812
|
c = c || "text";
|
1813
1813
|
let L = await ge[u.findKey(ge, c) || "text"](S, e);
|
1814
|
-
return !b && g && g(), await new Promise((T,
|
1815
|
-
Xt(T,
|
1814
|
+
return !b && g && g(), await new Promise((T, v) => {
|
1815
|
+
Xt(T, v, {
|
1816
1816
|
data: L,
|
1817
1817
|
headers: C.from(S.headers),
|
1818
1818
|
status: S.status,
|
@@ -1874,22 +1874,22 @@ const mt = (e) => `- ${e}`, ws = (e) => u.isFunction(e) || e === null || e === !
|
|
1874
1874
|
},
|
1875
1875
|
adapters: Je
|
1876
1876
|
};
|
1877
|
-
function
|
1877
|
+
function Ne(e) {
|
1878
1878
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
1879
1879
|
throw new V(null, e);
|
1880
1880
|
}
|
1881
1881
|
function gt(e) {
|
1882
|
-
return
|
1882
|
+
return Ne(e), e.headers = C.from(e.headers), e.data = Le.call(
|
1883
1883
|
e,
|
1884
1884
|
e.transformRequest
|
1885
1885
|
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), tn.getAdapter(e.adapter || oe.adapter)(e).then(function(r) {
|
1886
|
-
return
|
1886
|
+
return Ne(e), r.data = Le.call(
|
1887
1887
|
e,
|
1888
1888
|
e.transformResponse,
|
1889
1889
|
r
|
1890
1890
|
), r.headers = C.from(r.headers), r;
|
1891
1891
|
}, function(r) {
|
1892
|
-
return Gt(r) || (
|
1892
|
+
return Gt(r) || (Ne(e), r && r.response && (r.response.data = Le.call(
|
1893
1893
|
e,
|
1894
1894
|
e.transformResponse,
|
1895
1895
|
r.response
|
@@ -1944,7 +1944,7 @@ function ys(e, t, n) {
|
|
1944
1944
|
const he = {
|
1945
1945
|
assertOptions: ys,
|
1946
1946
|
validators: _e
|
1947
|
-
},
|
1947
|
+
}, F = he.validators;
|
1948
1948
|
class q {
|
1949
1949
|
constructor(t) {
|
1950
1950
|
this.defaults = t, this.interceptors = {
|
@@ -1981,17 +1981,17 @@ class q {
|
|
1981
1981
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = H(this.defaults, n);
|
1982
1982
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
1983
1983
|
r !== void 0 && he.assertOptions(r, {
|
1984
|
-
silentJSONParsing:
|
1985
|
-
forcedJSONParsing:
|
1986
|
-
clarifyTimeoutError:
|
1984
|
+
silentJSONParsing: F.transitional(F.boolean),
|
1985
|
+
forcedJSONParsing: F.transitional(F.boolean),
|
1986
|
+
clarifyTimeoutError: F.transitional(F.boolean)
|
1987
1987
|
}, !1), s != null && (u.isFunction(s) ? n.paramsSerializer = {
|
1988
1988
|
serialize: s
|
1989
1989
|
} : he.assertOptions(s, {
|
1990
|
-
encode:
|
1991
|
-
serialize:
|
1990
|
+
encode: F.function,
|
1991
|
+
serialize: F.function
|
1992
1992
|
}, !0)), he.assertOptions(n, {
|
1993
|
-
baseUrl:
|
1994
|
-
withXsrfToken:
|
1993
|
+
baseUrl: F.spelling("baseURL"),
|
1994
|
+
withXsrfToken: F.spelling("withXSRFToken")
|
1995
1995
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
1996
1996
|
let i = o && u.merge(
|
1997
1997
|
o.common,
|
@@ -2219,7 +2219,7 @@ Object.entries(ze).forEach(([e, t]) => {
|
|
2219
2219
|
ze[t] = e;
|
2220
2220
|
});
|
2221
2221
|
function rn(e) {
|
2222
|
-
const t = new q(e), n =
|
2222
|
+
const t = new q(e), n = Dt(q.prototype.request, t);
|
2223
2223
|
return u.extend(n, q.prototype, t, { allOwnKeys: !0 }), u.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
2224
2224
|
return rn(H(e, s));
|
2225
2225
|
}, n;
|
@@ -2600,16 +2600,16 @@ function Ls() {
|
|
2600
2600
|
});
|
2601
2601
|
}(Q, Q.exports)), Q.exports;
|
2602
2602
|
}
|
2603
|
-
var
|
2604
|
-
const
|
2605
|
-
function
|
2603
|
+
var Ns = Ls();
|
2604
|
+
const Fs = /* @__PURE__ */ sn(Ns);
|
2605
|
+
function Ds(e) {
|
2606
2606
|
if (ne) {
|
2607
2607
|
const { protocol: t, host: n, pathname: r } = location;
|
2608
2608
|
return `${t}//${n}${e ? r : ""}`;
|
2609
2609
|
} else
|
2610
2610
|
return null;
|
2611
2611
|
}
|
2612
|
-
function
|
2612
|
+
function vs(e = "") {
|
2613
2613
|
const t = e.match(mn);
|
2614
2614
|
return t ? t[0] : "";
|
2615
2615
|
}
|
@@ -2639,8 +2639,8 @@ function an(e, t) {
|
|
2639
2639
|
const co = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
2640
2640
|
__proto__: null,
|
2641
2641
|
append: an,
|
2642
|
-
getCurrentHost:
|
2643
|
-
getHost:
|
2642
|
+
getCurrentHost: Ds,
|
2643
|
+
getHost: vs,
|
2644
2644
|
parse: We,
|
2645
2645
|
stringify: on
|
2646
2646
|
}, Symbol.toStringTag, { value: "Module" }));
|
@@ -2648,12 +2648,12 @@ async function uo(e, t = {}) {
|
|
2648
2648
|
const { query: n = {} } = t;
|
2649
2649
|
e.includes("${") && (e = gn(e)(n || {}));
|
2650
2650
|
const r = an(e, n);
|
2651
|
-
return await (await
|
2651
|
+
return await (await Fs(r, t)).json();
|
2652
2652
|
}
|
2653
|
-
var
|
2653
|
+
var Fe, Rt;
|
2654
2654
|
function Us() {
|
2655
|
-
if (Rt) return
|
2656
|
-
Rt = 1,
|
2655
|
+
if (Rt) return Fe;
|
2656
|
+
Rt = 1, Fe = function(s, o, i) {
|
2657
2657
|
var a = document.head || document.getElementsByTagName("head")[0], f = document.createElement("script");
|
2658
2658
|
typeof o == "function" && (i = o, o = {}), o = o || {}, i = i || function() {
|
2659
2659
|
}, f.type = o.type || "text/javascript", f.charset = o.charset || "utf8", f.async = "async" in o ? !!o.async : !0, f.src = s, o.attrs && e(f, o.attrs), o.text && (f.text = "" + o.text);
|
@@ -2676,7 +2676,7 @@ function Us() {
|
|
2676
2676
|
this.readyState != "complete" && this.readyState != "loaded" || (this.onreadystatechange = null, s(null, r));
|
2677
2677
|
};
|
2678
2678
|
}
|
2679
|
-
return
|
2679
|
+
return Fe;
|
2680
2680
|
}
|
2681
2681
|
var Bs = Us();
|
2682
2682
|
const Is = /* @__PURE__ */ sn(Bs);
|