dev-classes 1.3.16 → 1.3.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.
- package/dist/classes/HTTPSApi/deps/apiRequest/ErrorsHandler/ErrorsHandler.d.ts +3 -0
- package/dist/classes/HTTPSApi/deps/apiRequest/ErrorsHandler/ErrorsHandler.js +14 -4
- package/dist/classes/HTTPSApi/deps/apiRequest/apiRequest.d.ts +10 -2
- package/dist/classes/HTTPSApi/deps/apiRequest/apiRequest.js +374 -350
- package/dist/classes/Utils/NetworkInformation/classes/InternetWatchers.js +13 -13
- package/dist/classes/Utils/Utils.d.ts +1 -0
- package/dist/classes/Utils/Utils.js +15 -8
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ErrorsHandler as
|
|
1
|
+
var ut = Object.defineProperty;
|
|
2
|
+
var lt = (e, t, n) => t in e ? ut(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var N = (e, t, n) => (lt(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
+
import { ErrorsHandler as ft } from "./ErrorsHandler/ErrorsHandler.js";
|
|
5
5
|
import { SaveRequest as Re } from "./SaveRequest/SaveRequest.js";
|
|
6
|
-
import { Utils as
|
|
7
|
-
function
|
|
6
|
+
import { Utils as Oe } from "../../../Utils/Utils.js";
|
|
7
|
+
function Ie(e, t) {
|
|
8
8
|
return function() {
|
|
9
9
|
return e.apply(t, arguments);
|
|
10
10
|
};
|
|
@@ -12,25 +12,25 @@ function qe(e, t) {
|
|
|
12
12
|
const { toString: dt } = Object.prototype, { getPrototypeOf: he } = Object, G = /* @__PURE__ */ ((e) => (t) => {
|
|
13
13
|
const n = dt.call(t);
|
|
14
14
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
15
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
15
|
+
})(/* @__PURE__ */ Object.create(null)), F = (e) => (e = e.toLowerCase(), (t) => G(t) === e), X = (e) => (t) => typeof t === e, { isArray: j } = Array, I = X("undefined");
|
|
16
16
|
function pt(e) {
|
|
17
|
-
return e !== null && !I(e) && e.constructor !== null && !I(e.constructor) &&
|
|
17
|
+
return e !== null && !I(e) && e.constructor !== null && !I(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
18
18
|
}
|
|
19
|
-
const
|
|
19
|
+
const He = F("ArrayBuffer");
|
|
20
20
|
function ht(e) {
|
|
21
21
|
let t;
|
|
22
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
22
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && He(e.buffer), t;
|
|
23
23
|
}
|
|
24
|
-
const mt = X("string"),
|
|
24
|
+
const mt = X("string"), P = X("function"), ve = X("number"), Q = (e) => e !== null && typeof e == "object", yt = (e) => e === !0 || e === !1, z = (e) => {
|
|
25
25
|
if (G(e) !== "object")
|
|
26
26
|
return !1;
|
|
27
27
|
const t = he(e);
|
|
28
28
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
29
|
-
}, wt =
|
|
29
|
+
}, wt = F("Date"), gt = F("File"), bt = F("Blob"), Et = F("FileList"), St = (e) => Q(e) && P(e.pipe), Rt = (e) => {
|
|
30
30
|
let t;
|
|
31
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
32
|
-
t === "object" &&
|
|
33
|
-
}, Ot =
|
|
31
|
+
return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = G(e)) === "formdata" || // detect form-data instance
|
|
32
|
+
t === "object" && P(e.toString) && e.toString() === "[object FormData]"));
|
|
33
|
+
}, Ot = F("URLSearchParams"), [Tt, At, Ct, xt] = ["ReadableStream", "Request", "Response", "Headers"].map(F), Nt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
34
34
|
function H(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
35
35
|
if (e === null || typeof e > "u")
|
|
36
36
|
return;
|
|
@@ -45,7 +45,7 @@ function H(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
45
45
|
c = o[r], t.call(null, e[c], c, e);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function Me(e, t) {
|
|
49
49
|
t = t.toLowerCase();
|
|
50
50
|
const n = Object.keys(e);
|
|
51
51
|
let r = n.length, s;
|
|
@@ -54,18 +54,18 @@ function ve(e, t) {
|
|
|
54
54
|
return s;
|
|
55
55
|
return null;
|
|
56
56
|
}
|
|
57
|
-
const
|
|
57
|
+
const L = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ze = (e) => !I(e) && e !== L;
|
|
58
58
|
function ie() {
|
|
59
|
-
const { caseless: e } =
|
|
60
|
-
const o = e &&
|
|
59
|
+
const { caseless: e } = ze(this) && this || {}, t = {}, n = (r, s) => {
|
|
60
|
+
const o = e && Me(t, s) || s;
|
|
61
61
|
z(t[o]) && z(r) ? t[o] = ie(t[o], r) : z(r) ? t[o] = ie({}, r) : j(r) ? t[o] = r.slice() : t[o] = r;
|
|
62
62
|
};
|
|
63
63
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
64
64
|
arguments[r] && H(arguments[r], n);
|
|
65
65
|
return t;
|
|
66
66
|
}
|
|
67
|
-
const
|
|
68
|
-
n &&
|
|
67
|
+
const Pt = (e, t, n, { allOwnKeys: r } = {}) => (H(t, (s, o) => {
|
|
68
|
+
n && P(s) ? e[o] = Ie(s, n) : e[o] = s;
|
|
69
69
|
}, { allOwnKeys: r }), e), kt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ft = (e, t, n, r) => {
|
|
70
70
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
71
71
|
value: t.prototype
|
|
@@ -81,23 +81,23 @@ const Nt = (e, t, n, { allOwnKeys: r } = {}) => (H(t, (s, o) => {
|
|
|
81
81
|
e = n !== !1 && he(e);
|
|
82
82
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
83
83
|
return t;
|
|
84
|
-
},
|
|
84
|
+
}, Dt = (e, t, n) => {
|
|
85
85
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
86
86
|
const r = e.indexOf(t, n);
|
|
87
87
|
return r !== -1 && r === n;
|
|
88
|
-
},
|
|
88
|
+
}, Lt = (e) => {
|
|
89
89
|
if (!e)
|
|
90
90
|
return null;
|
|
91
91
|
if (j(e))
|
|
92
92
|
return e;
|
|
93
93
|
let t = e.length;
|
|
94
|
-
if (!
|
|
94
|
+
if (!ve(t))
|
|
95
95
|
return null;
|
|
96
96
|
const n = new Array(t);
|
|
97
97
|
for (; t-- > 0; )
|
|
98
98
|
n[t] = e[t];
|
|
99
99
|
return n;
|
|
100
|
-
},
|
|
100
|
+
}, Bt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && he(Uint8Array)), jt = (e, t) => {
|
|
101
101
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
102
102
|
let s;
|
|
103
103
|
for (; (s = r.next()) && !s.done; ) {
|
|
@@ -110,23 +110,23 @@ const Nt = (e, t, n, { allOwnKeys: r } = {}) => (H(t, (s, o) => {
|
|
|
110
110
|
for (; (n = e.exec(t)) !== null; )
|
|
111
111
|
r.push(n);
|
|
112
112
|
return r;
|
|
113
|
-
}, qt =
|
|
113
|
+
}, qt = F("HTMLFormElement"), It = (e) => e.toLowerCase().replace(
|
|
114
114
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
115
115
|
function(n, r, s) {
|
|
116
116
|
return r.toUpperCase() + s;
|
|
117
117
|
}
|
|
118
|
-
),
|
|
118
|
+
), Te = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Ht = F("RegExp"), Je = (e, t) => {
|
|
119
119
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
120
120
|
H(n, (s, o) => {
|
|
121
121
|
let i;
|
|
122
122
|
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
123
123
|
}), Object.defineProperties(e, r);
|
|
124
124
|
}, vt = (e) => {
|
|
125
|
-
|
|
126
|
-
if (
|
|
125
|
+
Je(e, (t, n) => {
|
|
126
|
+
if (P(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
127
127
|
return !1;
|
|
128
128
|
const r = e[n];
|
|
129
|
-
if (
|
|
129
|
+
if (P(r)) {
|
|
130
130
|
if (t.enumerable = !1, "writable" in t) {
|
|
131
131
|
t.writable = !1;
|
|
132
132
|
return;
|
|
@@ -144,11 +144,11 @@ const Nt = (e, t, n, { allOwnKeys: r } = {}) => (H(t, (s, o) => {
|
|
|
144
144
|
};
|
|
145
145
|
return j(e) ? r(e) : r(String(e).split(t)), n;
|
|
146
146
|
}, zt = () => {
|
|
147
|
-
}, Jt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, te = "abcdefghijklmnopqrstuvwxyz",
|
|
148
|
-
DIGIT:
|
|
147
|
+
}, Jt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, te = "abcdefghijklmnopqrstuvwxyz", Ae = "0123456789", $e = {
|
|
148
|
+
DIGIT: Ae,
|
|
149
149
|
ALPHA: te,
|
|
150
|
-
ALPHA_DIGIT: te + te.toUpperCase() +
|
|
151
|
-
}, $t = (e = 16, t =
|
|
150
|
+
ALPHA_DIGIT: te + te.toUpperCase() + Ae
|
|
151
|
+
}, $t = (e = 16, t = $e.ALPHA_DIGIT) => {
|
|
152
152
|
let n = "";
|
|
153
153
|
const { length: r } = t;
|
|
154
154
|
for (; e--; )
|
|
@@ -156,7 +156,7 @@ const Nt = (e, t, n, { allOwnKeys: r } = {}) => (H(t, (s, o) => {
|
|
|
156
156
|
return n;
|
|
157
157
|
};
|
|
158
158
|
function Vt(e) {
|
|
159
|
-
return !!(e &&
|
|
159
|
+
return !!(e && P(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
160
160
|
}
|
|
161
161
|
const Wt = (e) => {
|
|
162
162
|
const t = new Array(10), n = (r, s) => {
|
|
@@ -175,21 +175,21 @@ const Wt = (e) => {
|
|
|
175
175
|
return r;
|
|
176
176
|
};
|
|
177
177
|
return n(e, 0);
|
|
178
|
-
}, Kt =
|
|
179
|
-
s ===
|
|
178
|
+
}, Kt = F("AsyncFunction"), Gt = (e) => e && (Q(e) || P(e)) && P(e.then) && P(e.catch), Ve = ((e, t) => e ? setImmediate : t ? ((n, r) => (L.addEventListener("message", ({ source: s, data: o }) => {
|
|
179
|
+
s === L && o === n && r.length && r.shift()();
|
|
180
180
|
}, !1), (s) => {
|
|
181
|
-
r.push(s),
|
|
181
|
+
r.push(s), L.postMessage(n, "*");
|
|
182
182
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
183
183
|
typeof setImmediate == "function",
|
|
184
|
-
|
|
185
|
-
), Xt = typeof queueMicrotask < "u" ? queueMicrotask.bind(
|
|
184
|
+
P(L.postMessage)
|
|
185
|
+
), Xt = typeof queueMicrotask < "u" ? queueMicrotask.bind(L) : typeof process < "u" && process.nextTick || Ve, a = {
|
|
186
186
|
isArray: j,
|
|
187
|
-
isArrayBuffer:
|
|
187
|
+
isArrayBuffer: He,
|
|
188
188
|
isBuffer: pt,
|
|
189
189
|
isFormData: Rt,
|
|
190
190
|
isArrayBufferView: ht,
|
|
191
191
|
isString: mt,
|
|
192
|
-
isNumber:
|
|
192
|
+
isNumber: ve,
|
|
193
193
|
isBoolean: yt,
|
|
194
194
|
isObject: Q,
|
|
195
195
|
isPlainObject: z,
|
|
@@ -202,44 +202,44 @@ const Wt = (e) => {
|
|
|
202
202
|
isFile: gt,
|
|
203
203
|
isBlob: bt,
|
|
204
204
|
isRegExp: Ht,
|
|
205
|
-
isFunction:
|
|
205
|
+
isFunction: P,
|
|
206
206
|
isStream: St,
|
|
207
207
|
isURLSearchParams: Ot,
|
|
208
|
-
isTypedArray:
|
|
208
|
+
isTypedArray: Bt,
|
|
209
209
|
isFileList: Et,
|
|
210
210
|
forEach: H,
|
|
211
211
|
merge: ie,
|
|
212
|
-
extend:
|
|
213
|
-
trim:
|
|
212
|
+
extend: Pt,
|
|
213
|
+
trim: Nt,
|
|
214
214
|
stripBOM: kt,
|
|
215
215
|
inherits: Ft,
|
|
216
216
|
toFlatObject: Ut,
|
|
217
217
|
kindOf: G,
|
|
218
|
-
kindOfTest:
|
|
219
|
-
endsWith:
|
|
220
|
-
toArray:
|
|
218
|
+
kindOfTest: F,
|
|
219
|
+
endsWith: Dt,
|
|
220
|
+
toArray: Lt,
|
|
221
221
|
forEachEntry: jt,
|
|
222
222
|
matchAll: _t,
|
|
223
223
|
isHTMLForm: qt,
|
|
224
|
-
hasOwnProperty:
|
|
225
|
-
hasOwnProp:
|
|
224
|
+
hasOwnProperty: Te,
|
|
225
|
+
hasOwnProp: Te,
|
|
226
226
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
227
|
-
reduceDescriptors:
|
|
227
|
+
reduceDescriptors: Je,
|
|
228
228
|
freezeMethods: vt,
|
|
229
229
|
toObjectSet: Mt,
|
|
230
230
|
toCamelCase: It,
|
|
231
231
|
noop: zt,
|
|
232
232
|
toFiniteNumber: Jt,
|
|
233
|
-
findKey:
|
|
234
|
-
global:
|
|
235
|
-
isContextDefined:
|
|
236
|
-
ALPHABET:
|
|
233
|
+
findKey: Me,
|
|
234
|
+
global: L,
|
|
235
|
+
isContextDefined: ze,
|
|
236
|
+
ALPHABET: $e,
|
|
237
237
|
generateString: $t,
|
|
238
238
|
isSpecCompliantForm: Vt,
|
|
239
239
|
toJSONObject: Wt,
|
|
240
240
|
isAsyncFn: Kt,
|
|
241
241
|
isThenable: Gt,
|
|
242
|
-
setImmediate:
|
|
242
|
+
setImmediate: Ve,
|
|
243
243
|
asap: Xt
|
|
244
244
|
};
|
|
245
245
|
function y(e, t, n, r, s) {
|
|
@@ -266,7 +266,7 @@ a.inherits(y, Error, {
|
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
268
|
});
|
|
269
|
-
const
|
|
269
|
+
const We = y.prototype, Ke = {};
|
|
270
270
|
[
|
|
271
271
|
"ERR_BAD_OPTION_VALUE",
|
|
272
272
|
"ERR_BAD_OPTION",
|
|
@@ -282,12 +282,12 @@ const Ve = y.prototype, We = {};
|
|
|
282
282
|
"ERR_INVALID_URL"
|
|
283
283
|
// eslint-disable-next-line func-names
|
|
284
284
|
].forEach((e) => {
|
|
285
|
-
|
|
285
|
+
Ke[e] = { value: e };
|
|
286
286
|
});
|
|
287
|
-
Object.defineProperties(y,
|
|
288
|
-
Object.defineProperty(
|
|
287
|
+
Object.defineProperties(y, Ke);
|
|
288
|
+
Object.defineProperty(We, "isAxiosError", { value: !0 });
|
|
289
289
|
y.from = (e, t, n, r, s, o) => {
|
|
290
|
-
const i = Object.create(
|
|
290
|
+
const i = Object.create(We);
|
|
291
291
|
return a.toFlatObject(e, i, function(f) {
|
|
292
292
|
return f !== Error.prototype;
|
|
293
293
|
}, (c) => c !== "isAxiosError"), y.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
@@ -296,12 +296,12 @@ const Qt = null;
|
|
|
296
296
|
function ae(e) {
|
|
297
297
|
return a.isPlainObject(e) || a.isArray(e);
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function Ge(e) {
|
|
300
300
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function Ce(e, t, n) {
|
|
303
303
|
return e ? e.concat(t).map(function(s, o) {
|
|
304
|
-
return s =
|
|
304
|
+
return s = Ge(s), !n && o ? "[" + s + "]" : s;
|
|
305
305
|
}).join(n ? "." : "") : t;
|
|
306
306
|
}
|
|
307
307
|
function Zt(e) {
|
|
@@ -317,8 +317,8 @@ function Z(e, t, n) {
|
|
|
317
317
|
metaTokens: !0,
|
|
318
318
|
dots: !1,
|
|
319
319
|
indexes: !1
|
|
320
|
-
}, !1, function(
|
|
321
|
-
return !a.isUndefined(h
|
|
320
|
+
}, !1, function(h, p) {
|
|
321
|
+
return !a.isUndefined(p[h]);
|
|
322
322
|
});
|
|
323
323
|
const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
324
324
|
if (!a.isFunction(s))
|
|
@@ -332,47 +332,47 @@ function Z(e, t, n) {
|
|
|
332
332
|
throw new y("Blob is not supported. Use a Buffer instead.");
|
|
333
333
|
return a.isArrayBuffer(d) || a.isTypedArray(d) ? f && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
|
|
334
334
|
}
|
|
335
|
-
function l(d,
|
|
336
|
-
let
|
|
337
|
-
if (d && !
|
|
338
|
-
if (a.endsWith(
|
|
339
|
-
|
|
340
|
-
else if (a.isArray(d) && Zt(d) || (a.isFileList(d) || a.endsWith(
|
|
341
|
-
return
|
|
335
|
+
function l(d, h, p) {
|
|
336
|
+
let g = d;
|
|
337
|
+
if (d && !p && typeof d == "object") {
|
|
338
|
+
if (a.endsWith(h, "{}"))
|
|
339
|
+
h = r ? h : h.slice(0, -2), d = JSON.stringify(d);
|
|
340
|
+
else if (a.isArray(d) && Zt(d) || (a.isFileList(d) || a.endsWith(h, "[]")) && (g = a.toArray(d)))
|
|
341
|
+
return h = Ge(h), g.forEach(function(O, S) {
|
|
342
342
|
!(a.isUndefined(O) || O === null) && t.append(
|
|
343
343
|
// eslint-disable-next-line no-nested-ternary
|
|
344
|
-
i === !0 ?
|
|
344
|
+
i === !0 ? Ce([h], S, o) : i === null ? h : h + "[]",
|
|
345
345
|
u(O)
|
|
346
346
|
);
|
|
347
347
|
}), !1;
|
|
348
348
|
}
|
|
349
|
-
return ae(d) ? !0 : (t.append(
|
|
349
|
+
return ae(d) ? !0 : (t.append(Ce(p, h, o), u(d)), !1);
|
|
350
350
|
}
|
|
351
|
-
const
|
|
351
|
+
const m = [], E = Object.assign(Yt, {
|
|
352
352
|
defaultVisitor: l,
|
|
353
353
|
convertValue: u,
|
|
354
354
|
isVisitable: ae
|
|
355
355
|
});
|
|
356
|
-
function
|
|
356
|
+
function R(d, h) {
|
|
357
357
|
if (!a.isUndefined(d)) {
|
|
358
|
-
if (
|
|
359
|
-
throw Error("Circular reference detected in " +
|
|
360
|
-
|
|
361
|
-
(!(a.isUndefined(
|
|
358
|
+
if (m.indexOf(d) !== -1)
|
|
359
|
+
throw Error("Circular reference detected in " + h.join("."));
|
|
360
|
+
m.push(d), a.forEach(d, function(g, b) {
|
|
361
|
+
(!(a.isUndefined(g) || g === null) && s.call(
|
|
362
362
|
t,
|
|
363
|
-
|
|
364
|
-
a.isString(
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
)) === !0 &&
|
|
368
|
-
}),
|
|
363
|
+
g,
|
|
364
|
+
a.isString(b) ? b.trim() : b,
|
|
365
|
+
h,
|
|
366
|
+
E
|
|
367
|
+
)) === !0 && R(g, h ? h.concat(b) : [b]);
|
|
368
|
+
}), m.pop();
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
371
|
if (!a.isObject(e))
|
|
372
372
|
throw new TypeError("data must be an object");
|
|
373
|
-
return
|
|
373
|
+
return R(e), t;
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function xe(e) {
|
|
376
376
|
const t = {
|
|
377
377
|
"!": "%21",
|
|
378
378
|
"'": "%27",
|
|
@@ -389,14 +389,14 @@ function Ce(e) {
|
|
|
389
389
|
function me(e, t) {
|
|
390
390
|
this._pairs = [], e && Z(e, this, t);
|
|
391
391
|
}
|
|
392
|
-
const
|
|
393
|
-
|
|
392
|
+
const Xe = me.prototype;
|
|
393
|
+
Xe.append = function(t, n) {
|
|
394
394
|
this._pairs.push([t, n]);
|
|
395
395
|
};
|
|
396
|
-
|
|
396
|
+
Xe.toString = function(t) {
|
|
397
397
|
const n = t ? function(r) {
|
|
398
|
-
return t.call(this, r,
|
|
399
|
-
} :
|
|
398
|
+
return t.call(this, r, xe);
|
|
399
|
+
} : xe;
|
|
400
400
|
return this._pairs.map(function(s) {
|
|
401
401
|
return n(s[0]) + "=" + n(s[1]);
|
|
402
402
|
}, "").join("&");
|
|
@@ -404,7 +404,7 @@ Ge.toString = function(t) {
|
|
|
404
404
|
function en(e) {
|
|
405
405
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function Qe(e, t, n) {
|
|
408
408
|
if (!t)
|
|
409
409
|
return e;
|
|
410
410
|
const r = n && n.encode || en, s = n && n.serialize;
|
|
@@ -415,7 +415,7 @@ function Xe(e, t, n) {
|
|
|
415
415
|
}
|
|
416
416
|
return e;
|
|
417
417
|
}
|
|
418
|
-
class
|
|
418
|
+
class Ne {
|
|
419
419
|
constructor() {
|
|
420
420
|
this.handlers = [];
|
|
421
421
|
}
|
|
@@ -469,7 +469,7 @@ class xe {
|
|
|
469
469
|
});
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
const
|
|
472
|
+
const Ze = {
|
|
473
473
|
silentJSONParsing: !0,
|
|
474
474
|
forcedJSONParsing: !0,
|
|
475
475
|
clarifyTimeoutError: !1
|
|
@@ -489,14 +489,14 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", cn
|
|
|
489
489
|
hasStandardBrowserWebWorkerEnv: an,
|
|
490
490
|
navigator: ce,
|
|
491
491
|
origin: cn
|
|
492
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
492
|
+
}, Symbol.toStringTag, { value: "Module" })), x = {
|
|
493
493
|
...un,
|
|
494
494
|
...sn
|
|
495
495
|
};
|
|
496
496
|
function ln(e, t) {
|
|
497
|
-
return Z(e, new
|
|
497
|
+
return Z(e, new x.classes.URLSearchParams(), Object.assign({
|
|
498
498
|
visitor: function(n, r, s, o) {
|
|
499
|
-
return
|
|
499
|
+
return x.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
500
500
|
}
|
|
501
501
|
}, t));
|
|
502
502
|
}
|
|
@@ -512,7 +512,7 @@ function dn(e) {
|
|
|
512
512
|
o = n[r], t[o] = e[o];
|
|
513
513
|
return t;
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function Ye(e) {
|
|
516
516
|
function t(n, r, s, o) {
|
|
517
517
|
let i = n[o++];
|
|
518
518
|
if (i === "__proto__")
|
|
@@ -539,12 +539,12 @@ function pn(e, t, n) {
|
|
|
539
539
|
return (n || JSON.stringify)(e);
|
|
540
540
|
}
|
|
541
541
|
const we = {
|
|
542
|
-
transitional:
|
|
542
|
+
transitional: Ze,
|
|
543
543
|
adapter: ["xhr", "http", "fetch"],
|
|
544
544
|
transformRequest: [function(t, n) {
|
|
545
545
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
546
546
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
547
|
-
return s ? JSON.stringify(
|
|
547
|
+
return s ? JSON.stringify(Ye(t)) : t;
|
|
548
548
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
549
549
|
return t;
|
|
550
550
|
if (a.isArrayBufferView(t))
|
|
@@ -591,8 +591,8 @@ const we = {
|
|
|
591
591
|
maxContentLength: -1,
|
|
592
592
|
maxBodyLength: -1,
|
|
593
593
|
env: {
|
|
594
|
-
FormData:
|
|
595
|
-
Blob:
|
|
594
|
+
FormData: x.classes.FormData,
|
|
595
|
+
Blob: x.classes.Blob
|
|
596
596
|
},
|
|
597
597
|
validateStatus: function(t) {
|
|
598
598
|
return t >= 200 && t < 300;
|
|
@@ -681,8 +681,8 @@ class Y {
|
|
|
681
681
|
const l = q(f);
|
|
682
682
|
if (!l)
|
|
683
683
|
throw new Error("header name must be a non-empty string");
|
|
684
|
-
const
|
|
685
|
-
(!
|
|
684
|
+
const m = a.findKey(s, l);
|
|
685
|
+
(!m || s[m] === void 0 || u === !0 || u === void 0 && s[m] !== !1) && (s[m || f] = J(c));
|
|
686
686
|
}
|
|
687
687
|
const i = (c, f) => a.forEach(c, (u, l) => o(u, l, f));
|
|
688
688
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
@@ -800,15 +800,15 @@ a.reduceDescriptors(Y.prototype, ({ value: e }, t) => {
|
|
|
800
800
|
};
|
|
801
801
|
});
|
|
802
802
|
a.freezeMethods(Y);
|
|
803
|
-
const
|
|
803
|
+
const k = Y;
|
|
804
804
|
function re(e, t) {
|
|
805
|
-
const n = this || ge, r = t || n, s =
|
|
805
|
+
const n = this || ge, r = t || n, s = k.from(r.headers);
|
|
806
806
|
let o = r.data;
|
|
807
807
|
return a.forEach(e, function(c) {
|
|
808
808
|
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
809
809
|
}), s.normalize(), o;
|
|
810
810
|
}
|
|
811
|
-
function
|
|
811
|
+
function et(e) {
|
|
812
812
|
return !!(e && e.__CANCEL__);
|
|
813
813
|
}
|
|
814
814
|
function _(e, t, n) {
|
|
@@ -817,7 +817,7 @@ function _(e, t, n) {
|
|
|
817
817
|
a.inherits(_, y, {
|
|
818
818
|
__CANCEL__: !0
|
|
819
819
|
});
|
|
820
|
-
function
|
|
820
|
+
function tt(e, t, n) {
|
|
821
821
|
const r = n.config.validateStatus;
|
|
822
822
|
!n.status || !r || r(n.status) ? e(n) : t(new y(
|
|
823
823
|
"Request failed with status code " + n.status,
|
|
@@ -838,13 +838,13 @@ function Sn(e, t) {
|
|
|
838
838
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
839
839
|
const u = Date.now(), l = r[o];
|
|
840
840
|
i || (i = u), n[s] = f, r[s] = u;
|
|
841
|
-
let
|
|
842
|
-
for (;
|
|
843
|
-
|
|
841
|
+
let m = o, E = 0;
|
|
842
|
+
for (; m !== s; )
|
|
843
|
+
E += n[m++], m = m % e;
|
|
844
844
|
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
|
|
845
845
|
return;
|
|
846
|
-
const
|
|
847
|
-
return
|
|
846
|
+
const R = l && u - l;
|
|
847
|
+
return R ? Math.round(E * 1e3 / R) : void 0;
|
|
848
848
|
};
|
|
849
849
|
}
|
|
850
850
|
function Rn(e, t) {
|
|
@@ -853,10 +853,10 @@ function Rn(e, t) {
|
|
|
853
853
|
n = l, s = null, o && (clearTimeout(o), o = null), e.apply(null, u);
|
|
854
854
|
};
|
|
855
855
|
return [(...u) => {
|
|
856
|
-
const l = Date.now(),
|
|
857
|
-
|
|
856
|
+
const l = Date.now(), m = l - n;
|
|
857
|
+
m >= r ? i(u, l) : (s = u, o || (o = setTimeout(() => {
|
|
858
858
|
o = null, i(s);
|
|
859
|
-
}, r -
|
|
859
|
+
}, r - m)));
|
|
860
860
|
}, () => s && i(s)];
|
|
861
861
|
}
|
|
862
862
|
const V = (e, t, n = 3) => {
|
|
@@ -865,7 +865,7 @@ const V = (e, t, n = 3) => {
|
|
|
865
865
|
return Rn((o) => {
|
|
866
866
|
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r, u = s(f), l = i <= c;
|
|
867
867
|
r = i;
|
|
868
|
-
const
|
|
868
|
+
const m = {
|
|
869
869
|
loaded: i,
|
|
870
870
|
total: c,
|
|
871
871
|
progress: c ? i / c : void 0,
|
|
@@ -876,20 +876,20 @@ const V = (e, t, n = 3) => {
|
|
|
876
876
|
lengthComputable: c != null,
|
|
877
877
|
[t ? "download" : "upload"]: !0
|
|
878
878
|
};
|
|
879
|
-
e(
|
|
879
|
+
e(m);
|
|
880
880
|
}, n);
|
|
881
|
-
},
|
|
881
|
+
}, ke = (e, t) => {
|
|
882
882
|
const n = e != null;
|
|
883
883
|
return [(r) => t[0]({
|
|
884
884
|
lengthComputable: n,
|
|
885
885
|
total: e,
|
|
886
886
|
loaded: r
|
|
887
887
|
}), t[1]];
|
|
888
|
-
},
|
|
888
|
+
}, Fe = (e) => (...t) => a.asap(() => e(...t)), On = x.hasStandardBrowserEnv ? (
|
|
889
889
|
// Standard browser envs have full support of the APIs needed to test
|
|
890
890
|
// whether the request URL is of the same origin as current location.
|
|
891
891
|
function() {
|
|
892
|
-
const t =
|
|
892
|
+
const t = x.navigator && /(msie|trident)/i.test(x.navigator.userAgent), n = document.createElement("a");
|
|
893
893
|
let r;
|
|
894
894
|
function s(o) {
|
|
895
895
|
let i = o;
|
|
@@ -916,7 +916,7 @@ const V = (e, t, n = 3) => {
|
|
|
916
916
|
return !0;
|
|
917
917
|
};
|
|
918
918
|
}()
|
|
919
|
-
), Tn =
|
|
919
|
+
), Tn = x.hasStandardBrowserEnv ? (
|
|
920
920
|
// Standard browser envs support document.cookie
|
|
921
921
|
{
|
|
922
922
|
write(e, t, n, r, s, o) {
|
|
@@ -949,22 +949,22 @@ function An(e) {
|
|
|
949
949
|
function Cn(e, t) {
|
|
950
950
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
951
951
|
}
|
|
952
|
-
function
|
|
952
|
+
function nt(e, t) {
|
|
953
953
|
return e && !An(t) ? Cn(e, t) : t;
|
|
954
954
|
}
|
|
955
|
-
const
|
|
956
|
-
function
|
|
955
|
+
const Ue = (e) => e instanceof k ? { ...e } : e;
|
|
956
|
+
function B(e, t) {
|
|
957
957
|
t = t || {};
|
|
958
958
|
const n = {};
|
|
959
|
-
function r(u, l,
|
|
960
|
-
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless:
|
|
959
|
+
function r(u, l, m) {
|
|
960
|
+
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: m }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
961
961
|
}
|
|
962
|
-
function s(u, l,
|
|
962
|
+
function s(u, l, m) {
|
|
963
963
|
if (a.isUndefined(l)) {
|
|
964
964
|
if (!a.isUndefined(u))
|
|
965
|
-
return r(void 0, u,
|
|
965
|
+
return r(void 0, u, m);
|
|
966
966
|
} else
|
|
967
|
-
return r(u, l,
|
|
967
|
+
return r(u, l, m);
|
|
968
968
|
}
|
|
969
969
|
function o(u, l) {
|
|
970
970
|
if (!a.isUndefined(l))
|
|
@@ -977,10 +977,10 @@ function D(e, t) {
|
|
|
977
977
|
} else
|
|
978
978
|
return r(void 0, l);
|
|
979
979
|
}
|
|
980
|
-
function c(u, l,
|
|
981
|
-
if (
|
|
980
|
+
function c(u, l, m) {
|
|
981
|
+
if (m in t)
|
|
982
982
|
return r(u, l);
|
|
983
|
-
if (
|
|
983
|
+
if (m in e)
|
|
984
984
|
return r(void 0, u);
|
|
985
985
|
}
|
|
986
986
|
const f = {
|
|
@@ -1012,92 +1012,92 @@ function D(e, t) {
|
|
|
1012
1012
|
socketPath: i,
|
|
1013
1013
|
responseEncoding: i,
|
|
1014
1014
|
validateStatus: c,
|
|
1015
|
-
headers: (u, l) => s(
|
|
1015
|
+
headers: (u, l) => s(Ue(u), Ue(l), !0)
|
|
1016
1016
|
};
|
|
1017
1017
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1018
|
-
const
|
|
1019
|
-
a.isUndefined(
|
|
1018
|
+
const m = f[l] || s, E = m(e[l], t[l], l);
|
|
1019
|
+
a.isUndefined(E) && m !== c || (n[l] = E);
|
|
1020
1020
|
}), n;
|
|
1021
1021
|
}
|
|
1022
|
-
const
|
|
1023
|
-
const t =
|
|
1022
|
+
const rt = (e) => {
|
|
1023
|
+
const t = B({}, e);
|
|
1024
1024
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1025
|
-
t.headers = i =
|
|
1025
|
+
t.headers = i = k.from(i), t.url = Qe(nt(t.baseURL, t.url), e.params, e.paramsSerializer), c && i.set(
|
|
1026
1026
|
"Authorization",
|
|
1027
1027
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1028
1028
|
);
|
|
1029
1029
|
let f;
|
|
1030
1030
|
if (a.isFormData(n)) {
|
|
1031
|
-
if (
|
|
1031
|
+
if (x.hasStandardBrowserEnv || x.hasStandardBrowserWebWorkerEnv)
|
|
1032
1032
|
i.setContentType(void 0);
|
|
1033
1033
|
else if ((f = i.getContentType()) !== !1) {
|
|
1034
|
-
const [u, ...l] = f ? f.split(";").map((
|
|
1034
|
+
const [u, ...l] = f ? f.split(";").map((m) => m.trim()).filter(Boolean) : [];
|
|
1035
1035
|
i.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1036
1036
|
}
|
|
1037
1037
|
}
|
|
1038
|
-
if (
|
|
1038
|
+
if (x.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && On(t.url))) {
|
|
1039
1039
|
const u = s && o && Tn.read(o);
|
|
1040
1040
|
u && i.set(s, u);
|
|
1041
1041
|
}
|
|
1042
1042
|
return t;
|
|
1043
|
-
}, xn = typeof XMLHttpRequest < "u",
|
|
1043
|
+
}, xn = typeof XMLHttpRequest < "u", Nn = xn && function(e) {
|
|
1044
1044
|
return new Promise(function(n, r) {
|
|
1045
|
-
const s =
|
|
1045
|
+
const s = rt(e);
|
|
1046
1046
|
let o = s.data;
|
|
1047
|
-
const i =
|
|
1048
|
-
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l,
|
|
1049
|
-
function
|
|
1050
|
-
|
|
1047
|
+
const i = k.from(s.headers).normalize();
|
|
1048
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, m, E, R, d;
|
|
1049
|
+
function h() {
|
|
1050
|
+
R && R(), d && d(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1051
1051
|
}
|
|
1052
|
-
let
|
|
1053
|
-
|
|
1054
|
-
function
|
|
1055
|
-
if (!
|
|
1052
|
+
let p = new XMLHttpRequest();
|
|
1053
|
+
p.open(s.method.toUpperCase(), s.url, !0), p.timeout = s.timeout;
|
|
1054
|
+
function g() {
|
|
1055
|
+
if (!p)
|
|
1056
1056
|
return;
|
|
1057
|
-
const O =
|
|
1058
|
-
"getAllResponseHeaders" in
|
|
1059
|
-
),
|
|
1060
|
-
data: !c || c === "text" || c === "json" ?
|
|
1061
|
-
status:
|
|
1062
|
-
statusText:
|
|
1057
|
+
const O = k.from(
|
|
1058
|
+
"getAllResponseHeaders" in p && p.getAllResponseHeaders()
|
|
1059
|
+
), A = {
|
|
1060
|
+
data: !c || c === "text" || c === "json" ? p.responseText : p.response,
|
|
1061
|
+
status: p.status,
|
|
1062
|
+
statusText: p.statusText,
|
|
1063
1063
|
headers: O,
|
|
1064
1064
|
config: e,
|
|
1065
|
-
request:
|
|
1065
|
+
request: p
|
|
1066
1066
|
};
|
|
1067
|
-
|
|
1068
|
-
n(
|
|
1069
|
-
}, function(
|
|
1070
|
-
r(
|
|
1071
|
-
},
|
|
1067
|
+
tt(function(U) {
|
|
1068
|
+
n(U), h();
|
|
1069
|
+
}, function(U) {
|
|
1070
|
+
r(U), h();
|
|
1071
|
+
}, A), p = null;
|
|
1072
1072
|
}
|
|
1073
|
-
"onloadend" in
|
|
1074
|
-
!
|
|
1075
|
-
},
|
|
1076
|
-
|
|
1077
|
-
},
|
|
1078
|
-
r(new y("Network Error", y.ERR_NETWORK, e,
|
|
1079
|
-
},
|
|
1080
|
-
let
|
|
1081
|
-
const
|
|
1082
|
-
s.timeoutErrorMessage && (
|
|
1083
|
-
|
|
1084
|
-
|
|
1073
|
+
"onloadend" in p ? p.onloadend = g : p.onreadystatechange = function() {
|
|
1074
|
+
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(g);
|
|
1075
|
+
}, p.onabort = function() {
|
|
1076
|
+
p && (r(new y("Request aborted", y.ECONNABORTED, e, p)), p = null);
|
|
1077
|
+
}, p.onerror = function() {
|
|
1078
|
+
r(new y("Network Error", y.ERR_NETWORK, e, p)), p = null;
|
|
1079
|
+
}, p.ontimeout = function() {
|
|
1080
|
+
let S = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1081
|
+
const A = s.transitional || Ze;
|
|
1082
|
+
s.timeoutErrorMessage && (S = s.timeoutErrorMessage), r(new y(
|
|
1083
|
+
S,
|
|
1084
|
+
A.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1085
1085
|
e,
|
|
1086
|
-
|
|
1087
|
-
)),
|
|
1088
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in
|
|
1089
|
-
|
|
1090
|
-
}), a.isUndefined(s.withCredentials) || (
|
|
1091
|
-
|
|
1086
|
+
p
|
|
1087
|
+
)), p = null;
|
|
1088
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(S, A) {
|
|
1089
|
+
p.setRequestHeader(A, S);
|
|
1090
|
+
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([E, d] = V(u, !0), p.addEventListener("progress", E)), f && p.upload && ([m, R] = V(f), p.upload.addEventListener("progress", m), p.upload.addEventListener("loadend", R)), (s.cancelToken || s.signal) && (l = (O) => {
|
|
1091
|
+
p && (r(!O || O.type ? new _(null, e, p) : O), p.abort(), p = null);
|
|
1092
1092
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1093
|
-
const
|
|
1094
|
-
if (
|
|
1095
|
-
r(new y("Unsupported protocol " +
|
|
1093
|
+
const b = En(s.url);
|
|
1094
|
+
if (b && x.protocols.indexOf(b) === -1) {
|
|
1095
|
+
r(new y("Unsupported protocol " + b + ":", y.ERR_BAD_REQUEST, e));
|
|
1096
1096
|
return;
|
|
1097
1097
|
}
|
|
1098
|
-
|
|
1098
|
+
p.send(o || null);
|
|
1099
1099
|
});
|
|
1100
|
-
},
|
|
1100
|
+
}, Pn = (e, t) => {
|
|
1101
1101
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1102
1102
|
if (t || n) {
|
|
1103
1103
|
let r = new AbortController(), s;
|
|
@@ -1120,7 +1120,7 @@ const nt = (e) => {
|
|
|
1120
1120
|
const { signal: f } = r;
|
|
1121
1121
|
return f.unsubscribe = () => a.asap(c), f;
|
|
1122
1122
|
}
|
|
1123
|
-
}, kn =
|
|
1123
|
+
}, kn = Pn, Fn = function* (e, t) {
|
|
1124
1124
|
let n = e.byteLength;
|
|
1125
1125
|
if (!t || n < t) {
|
|
1126
1126
|
yield e;
|
|
@@ -1130,9 +1130,9 @@ const nt = (e) => {
|
|
|
1130
1130
|
for (; r < n; )
|
|
1131
1131
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1132
1132
|
}, Un = async function* (e, t) {
|
|
1133
|
-
for await (const n of
|
|
1133
|
+
for await (const n of Dn(e))
|
|
1134
1134
|
yield* Fn(n, t);
|
|
1135
|
-
},
|
|
1135
|
+
}, Dn = async function* (e) {
|
|
1136
1136
|
if (e[Symbol.asyncIterator]) {
|
|
1137
1137
|
yield* e;
|
|
1138
1138
|
return;
|
|
@@ -1148,7 +1148,7 @@ const nt = (e) => {
|
|
|
1148
1148
|
} finally {
|
|
1149
1149
|
await t.cancel();
|
|
1150
1150
|
}
|
|
1151
|
-
},
|
|
1151
|
+
}, De = (e, t, n, r) => {
|
|
1152
1152
|
const s = Un(e, t);
|
|
1153
1153
|
let o = 0, i, c = (f) => {
|
|
1154
1154
|
i || (i = !0, r && r(f));
|
|
@@ -1161,10 +1161,10 @@ const nt = (e) => {
|
|
|
1161
1161
|
c(), f.close();
|
|
1162
1162
|
return;
|
|
1163
1163
|
}
|
|
1164
|
-
let
|
|
1164
|
+
let m = l.byteLength;
|
|
1165
1165
|
if (n) {
|
|
1166
|
-
let
|
|
1167
|
-
n(
|
|
1166
|
+
let E = o += m;
|
|
1167
|
+
n(E);
|
|
1168
1168
|
}
|
|
1169
1169
|
f.enqueue(new Uint8Array(l));
|
|
1170
1170
|
} catch (u) {
|
|
@@ -1177,15 +1177,15 @@ const nt = (e) => {
|
|
|
1177
1177
|
}, {
|
|
1178
1178
|
highWaterMark: 2
|
|
1179
1179
|
});
|
|
1180
|
-
}, ee = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
1180
|
+
}, ee = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", st = ee && typeof ReadableStream == "function", Ln = ee && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), ot = (e, ...t) => {
|
|
1181
1181
|
try {
|
|
1182
1182
|
return !!e(...t);
|
|
1183
1183
|
} catch {
|
|
1184
1184
|
return !1;
|
|
1185
1185
|
}
|
|
1186
|
-
},
|
|
1186
|
+
}, Bn = st && ot(() => {
|
|
1187
1187
|
let e = !1;
|
|
1188
|
-
const t = new Request(
|
|
1188
|
+
const t = new Request(x.origin, {
|
|
1189
1189
|
body: new ReadableStream(),
|
|
1190
1190
|
method: "POST",
|
|
1191
1191
|
get duplex() {
|
|
@@ -1193,7 +1193,7 @@ const nt = (e) => {
|
|
|
1193
1193
|
}
|
|
1194
1194
|
}).headers.has("Content-Type");
|
|
1195
1195
|
return e && !t;
|
|
1196
|
-
}), Le = 64 * 1024, ue =
|
|
1196
|
+
}), Le = 64 * 1024, ue = st && ot(() => a.isReadableStream(new Response("").body)), W = {
|
|
1197
1197
|
stream: ue && ((e) => e.body)
|
|
1198
1198
|
};
|
|
1199
1199
|
ee && ((e) => {
|
|
@@ -1209,14 +1209,14 @@ const jn = async (e) => {
|
|
|
1209
1209
|
if (a.isBlob(e))
|
|
1210
1210
|
return e.size;
|
|
1211
1211
|
if (a.isSpecCompliantForm(e))
|
|
1212
|
-
return (await new Request(
|
|
1212
|
+
return (await new Request(x.origin, {
|
|
1213
1213
|
method: "POST",
|
|
1214
1214
|
body: e
|
|
1215
1215
|
}).arrayBuffer()).byteLength;
|
|
1216
1216
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1217
1217
|
return e.byteLength;
|
|
1218
1218
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1219
|
-
return (await
|
|
1219
|
+
return (await Ln(e)).byteLength;
|
|
1220
1220
|
}, _n = async (e, t) => {
|
|
1221
1221
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1222
1222
|
return n ?? jn(t);
|
|
@@ -1232,82 +1232,82 @@ const jn = async (e) => {
|
|
|
1232
1232
|
onUploadProgress: f,
|
|
1233
1233
|
responseType: u,
|
|
1234
1234
|
headers: l,
|
|
1235
|
-
withCredentials:
|
|
1236
|
-
fetchOptions:
|
|
1237
|
-
} =
|
|
1235
|
+
withCredentials: m = "same-origin",
|
|
1236
|
+
fetchOptions: E
|
|
1237
|
+
} = rt(e);
|
|
1238
1238
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1239
|
-
let
|
|
1240
|
-
const
|
|
1241
|
-
|
|
1239
|
+
let R = kn([s, o && o.toAbortSignal()], i), d;
|
|
1240
|
+
const h = R && R.unsubscribe && (() => {
|
|
1241
|
+
R.unsubscribe();
|
|
1242
1242
|
});
|
|
1243
|
-
let
|
|
1243
|
+
let p;
|
|
1244
1244
|
try {
|
|
1245
|
-
if (f &&
|
|
1246
|
-
let
|
|
1245
|
+
if (f && Bn && n !== "get" && n !== "head" && (p = await _n(l, r)) !== 0) {
|
|
1246
|
+
let A = new Request(t, {
|
|
1247
1247
|
method: "POST",
|
|
1248
1248
|
body: r,
|
|
1249
1249
|
duplex: "half"
|
|
1250
|
-
}),
|
|
1251
|
-
if (a.isFormData(r) && (
|
|
1252
|
-
const [
|
|
1253
|
-
|
|
1254
|
-
V(
|
|
1250
|
+
}), C;
|
|
1251
|
+
if (a.isFormData(r) && (C = A.headers.get("content-type")) && l.setContentType(C), A.body) {
|
|
1252
|
+
const [U, v] = ke(
|
|
1253
|
+
p,
|
|
1254
|
+
V(Fe(f))
|
|
1255
1255
|
);
|
|
1256
|
-
r =
|
|
1256
|
+
r = De(A.body, Le, U, v);
|
|
1257
1257
|
}
|
|
1258
1258
|
}
|
|
1259
|
-
a.isString(
|
|
1260
|
-
const
|
|
1259
|
+
a.isString(m) || (m = m ? "include" : "omit");
|
|
1260
|
+
const g = "credentials" in Request.prototype;
|
|
1261
1261
|
d = new Request(t, {
|
|
1262
|
-
...
|
|
1263
|
-
signal:
|
|
1262
|
+
...E,
|
|
1263
|
+
signal: R,
|
|
1264
1264
|
method: n.toUpperCase(),
|
|
1265
1265
|
headers: l.normalize().toJSON(),
|
|
1266
1266
|
body: r,
|
|
1267
1267
|
duplex: "half",
|
|
1268
|
-
credentials:
|
|
1268
|
+
credentials: g ? m : void 0
|
|
1269
1269
|
});
|
|
1270
|
-
let
|
|
1270
|
+
let b = await fetch(d);
|
|
1271
1271
|
const O = ue && (u === "stream" || u === "response");
|
|
1272
|
-
if (ue && (c || O &&
|
|
1273
|
-
const
|
|
1272
|
+
if (ue && (c || O && h)) {
|
|
1273
|
+
const A = {};
|
|
1274
1274
|
["status", "statusText", "headers"].forEach((Se) => {
|
|
1275
|
-
|
|
1275
|
+
A[Se] = b[Se];
|
|
1276
1276
|
});
|
|
1277
|
-
const
|
|
1278
|
-
|
|
1279
|
-
V(
|
|
1277
|
+
const C = a.toFiniteNumber(b.headers.get("content-length")), [U, v] = c && ke(
|
|
1278
|
+
C,
|
|
1279
|
+
V(Fe(c), !0)
|
|
1280
1280
|
) || [];
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
v && v(),
|
|
1281
|
+
b = new Response(
|
|
1282
|
+
De(b.body, Le, U, () => {
|
|
1283
|
+
v && v(), h && h();
|
|
1284
1284
|
}),
|
|
1285
|
-
|
|
1285
|
+
A
|
|
1286
1286
|
);
|
|
1287
1287
|
}
|
|
1288
1288
|
u = u || "text";
|
|
1289
|
-
let
|
|
1290
|
-
return !O &&
|
|
1291
|
-
|
|
1292
|
-
data:
|
|
1293
|
-
headers:
|
|
1294
|
-
status:
|
|
1295
|
-
statusText:
|
|
1289
|
+
let S = await W[a.findKey(W, u) || "text"](b, e);
|
|
1290
|
+
return !O && h && h(), await new Promise((A, C) => {
|
|
1291
|
+
tt(A, C, {
|
|
1292
|
+
data: S,
|
|
1293
|
+
headers: k.from(b.headers),
|
|
1294
|
+
status: b.status,
|
|
1295
|
+
statusText: b.statusText,
|
|
1296
1296
|
config: e,
|
|
1297
1297
|
request: d
|
|
1298
1298
|
});
|
|
1299
1299
|
});
|
|
1300
|
-
} catch (
|
|
1301
|
-
throw
|
|
1300
|
+
} catch (g) {
|
|
1301
|
+
throw h && h(), g && g.name === "TypeError" && /fetch/i.test(g.message) ? Object.assign(
|
|
1302
1302
|
new y("Network Error", y.ERR_NETWORK, e, d),
|
|
1303
1303
|
{
|
|
1304
|
-
cause:
|
|
1304
|
+
cause: g.cause || g
|
|
1305
1305
|
}
|
|
1306
|
-
) : y.from(
|
|
1306
|
+
) : y.from(g, g && g.code, e, d);
|
|
1307
1307
|
}
|
|
1308
1308
|
}), le = {
|
|
1309
1309
|
http: Qt,
|
|
1310
|
-
xhr:
|
|
1310
|
+
xhr: Nn,
|
|
1311
1311
|
fetch: qn
|
|
1312
1312
|
};
|
|
1313
1313
|
a.forEach(le, (e, t) => {
|
|
@@ -1319,7 +1319,7 @@ a.forEach(le, (e, t) => {
|
|
|
1319
1319
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1320
1320
|
}
|
|
1321
1321
|
});
|
|
1322
|
-
const Be = (e) => `- ${e}`, In = (e) => a.isFunction(e) || e === null || e === !1,
|
|
1322
|
+
const Be = (e) => `- ${e}`, In = (e) => a.isFunction(e) || e === null || e === !1, it = {
|
|
1323
1323
|
getAdapter: (e) => {
|
|
1324
1324
|
e = a.isArray(e) ? e : [e];
|
|
1325
1325
|
const { length: t } = e;
|
|
@@ -1354,34 +1354,34 @@ function se(e) {
|
|
|
1354
1354
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1355
1355
|
throw new _(null, e);
|
|
1356
1356
|
}
|
|
1357
|
-
function
|
|
1358
|
-
return se(e), e.headers =
|
|
1357
|
+
function je(e) {
|
|
1358
|
+
return se(e), e.headers = k.from(e.headers), e.data = re.call(
|
|
1359
1359
|
e,
|
|
1360
1360
|
e.transformRequest
|
|
1361
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1361
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), it.getAdapter(e.adapter || ge.adapter)(e).then(function(r) {
|
|
1362
1362
|
return se(e), r.data = re.call(
|
|
1363
1363
|
e,
|
|
1364
1364
|
e.transformResponse,
|
|
1365
1365
|
r
|
|
1366
|
-
), r.headers =
|
|
1366
|
+
), r.headers = k.from(r.headers), r;
|
|
1367
1367
|
}, function(r) {
|
|
1368
|
-
return
|
|
1368
|
+
return et(r) || (se(e), r && r.response && (r.response.data = re.call(
|
|
1369
1369
|
e,
|
|
1370
1370
|
e.transformResponse,
|
|
1371
1371
|
r.response
|
|
1372
|
-
), r.response.headers =
|
|
1372
|
+
), r.response.headers = k.from(r.response.headers))), Promise.reject(r);
|
|
1373
1373
|
});
|
|
1374
1374
|
}
|
|
1375
|
-
const
|
|
1375
|
+
const at = "1.7.7", be = {};
|
|
1376
1376
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1377
1377
|
be[e] = function(r) {
|
|
1378
1378
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1379
1379
|
};
|
|
1380
1380
|
});
|
|
1381
|
-
const
|
|
1381
|
+
const _e = {};
|
|
1382
1382
|
be.transitional = function(t, n, r) {
|
|
1383
1383
|
function s(o, i) {
|
|
1384
|
-
return "[Axios v" +
|
|
1384
|
+
return "[Axios v" + at + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1385
1385
|
}
|
|
1386
1386
|
return (o, i, c) => {
|
|
1387
1387
|
if (t === !1)
|
|
@@ -1389,7 +1389,7 @@ be.transitional = function(t, n, r) {
|
|
|
1389
1389
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1390
1390
|
y.ERR_DEPRECATED
|
|
1391
1391
|
);
|
|
1392
|
-
return n && !
|
|
1392
|
+
return n && !_e[i] && (_e[i] = !0, console.warn(
|
|
1393
1393
|
s(
|
|
1394
1394
|
i,
|
|
1395
1395
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1417,12 +1417,12 @@ function Hn(e, t, n) {
|
|
|
1417
1417
|
const fe = {
|
|
1418
1418
|
assertOptions: Hn,
|
|
1419
1419
|
validators: be
|
|
1420
|
-
},
|
|
1420
|
+
}, D = fe.validators;
|
|
1421
1421
|
class K {
|
|
1422
1422
|
constructor(t) {
|
|
1423
1423
|
this.defaults = t, this.interceptors = {
|
|
1424
|
-
request: new
|
|
1425
|
-
response: new
|
|
1424
|
+
request: new Ne(),
|
|
1425
|
+
response: new Ne()
|
|
1426
1426
|
};
|
|
1427
1427
|
}
|
|
1428
1428
|
/**
|
|
@@ -1451,17 +1451,17 @@ class K {
|
|
|
1451
1451
|
}
|
|
1452
1452
|
}
|
|
1453
1453
|
_request(t, n) {
|
|
1454
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1454
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = B(this.defaults, n);
|
|
1455
1455
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1456
1456
|
r !== void 0 && fe.assertOptions(r, {
|
|
1457
|
-
silentJSONParsing:
|
|
1458
|
-
forcedJSONParsing:
|
|
1459
|
-
clarifyTimeoutError:
|
|
1457
|
+
silentJSONParsing: D.transitional(D.boolean),
|
|
1458
|
+
forcedJSONParsing: D.transitional(D.boolean),
|
|
1459
|
+
clarifyTimeoutError: D.transitional(D.boolean)
|
|
1460
1460
|
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1461
1461
|
serialize: s
|
|
1462
1462
|
} : fe.assertOptions(s, {
|
|
1463
|
-
encode:
|
|
1464
|
-
serialize:
|
|
1463
|
+
encode: D.function,
|
|
1464
|
+
serialize: D.function
|
|
1465
1465
|
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1466
1466
|
let i = o && a.merge(
|
|
1467
1467
|
o.common,
|
|
@@ -1472,52 +1472,52 @@ class K {
|
|
|
1472
1472
|
(d) => {
|
|
1473
1473
|
delete o[d];
|
|
1474
1474
|
}
|
|
1475
|
-
), n.headers =
|
|
1475
|
+
), n.headers = k.concat(i, o);
|
|
1476
1476
|
const c = [];
|
|
1477
1477
|
let f = !0;
|
|
1478
|
-
this.interceptors.request.forEach(function(
|
|
1479
|
-
typeof
|
|
1478
|
+
this.interceptors.request.forEach(function(h) {
|
|
1479
|
+
typeof h.runWhen == "function" && h.runWhen(n) === !1 || (f = f && h.synchronous, c.unshift(h.fulfilled, h.rejected));
|
|
1480
1480
|
});
|
|
1481
1481
|
const u = [];
|
|
1482
|
-
this.interceptors.response.forEach(function(
|
|
1483
|
-
u.push(
|
|
1482
|
+
this.interceptors.response.forEach(function(h) {
|
|
1483
|
+
u.push(h.fulfilled, h.rejected);
|
|
1484
1484
|
});
|
|
1485
|
-
let l,
|
|
1485
|
+
let l, m = 0, E;
|
|
1486
1486
|
if (!f) {
|
|
1487
|
-
const d = [
|
|
1488
|
-
for (d.unshift.apply(d, c), d.push.apply(d, u),
|
|
1489
|
-
l = l.then(d[
|
|
1487
|
+
const d = [je.bind(this), void 0];
|
|
1488
|
+
for (d.unshift.apply(d, c), d.push.apply(d, u), E = d.length, l = Promise.resolve(n); m < E; )
|
|
1489
|
+
l = l.then(d[m++], d[m++]);
|
|
1490
1490
|
return l;
|
|
1491
1491
|
}
|
|
1492
|
-
|
|
1493
|
-
let
|
|
1494
|
-
for (
|
|
1495
|
-
const d = c[
|
|
1492
|
+
E = c.length;
|
|
1493
|
+
let R = n;
|
|
1494
|
+
for (m = 0; m < E; ) {
|
|
1495
|
+
const d = c[m++], h = c[m++];
|
|
1496
1496
|
try {
|
|
1497
|
-
|
|
1498
|
-
} catch (
|
|
1499
|
-
|
|
1497
|
+
R = d(R);
|
|
1498
|
+
} catch (p) {
|
|
1499
|
+
h.call(this, p);
|
|
1500
1500
|
break;
|
|
1501
1501
|
}
|
|
1502
1502
|
}
|
|
1503
1503
|
try {
|
|
1504
|
-
l =
|
|
1504
|
+
l = je.call(this, R);
|
|
1505
1505
|
} catch (d) {
|
|
1506
1506
|
return Promise.reject(d);
|
|
1507
1507
|
}
|
|
1508
|
-
for (
|
|
1509
|
-
l = l.then(u[
|
|
1508
|
+
for (m = 0, E = u.length; m < E; )
|
|
1509
|
+
l = l.then(u[m++], u[m++]);
|
|
1510
1510
|
return l;
|
|
1511
1511
|
}
|
|
1512
1512
|
getUri(t) {
|
|
1513
|
-
t =
|
|
1514
|
-
const n =
|
|
1515
|
-
return
|
|
1513
|
+
t = B(this.defaults, t);
|
|
1514
|
+
const n = nt(t.baseURL, t.url);
|
|
1515
|
+
return Qe(n, t.params, t.paramsSerializer);
|
|
1516
1516
|
}
|
|
1517
1517
|
}
|
|
1518
1518
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1519
1519
|
K.prototype[t] = function(n, r) {
|
|
1520
|
-
return this.request(
|
|
1520
|
+
return this.request(B(r || {}, {
|
|
1521
1521
|
method: t,
|
|
1522
1522
|
url: n,
|
|
1523
1523
|
data: (r || {}).data
|
|
@@ -1527,7 +1527,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1527
1527
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1528
1528
|
function n(r) {
|
|
1529
1529
|
return function(o, i, c) {
|
|
1530
|
-
return this.request(
|
|
1530
|
+
return this.request(B(c || {}, {
|
|
1531
1531
|
method: t,
|
|
1532
1532
|
headers: r ? {
|
|
1533
1533
|
"Content-Type": "multipart/form-data"
|
|
@@ -1692,32 +1692,32 @@ Object.entries(de).forEach(([e, t]) => {
|
|
|
1692
1692
|
de[t] = e;
|
|
1693
1693
|
});
|
|
1694
1694
|
const Jn = de;
|
|
1695
|
-
function
|
|
1696
|
-
const t = new $(e), n =
|
|
1695
|
+
function ct(e) {
|
|
1696
|
+
const t = new $(e), n = Ie($.prototype.request, t);
|
|
1697
1697
|
return a.extend(n, $.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1698
|
-
return
|
|
1698
|
+
return ct(B(e, s));
|
|
1699
1699
|
}, n;
|
|
1700
1700
|
}
|
|
1701
|
-
const
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1701
|
+
const T = ct(ge);
|
|
1702
|
+
T.Axios = $;
|
|
1703
|
+
T.CanceledError = _;
|
|
1704
|
+
T.CancelToken = vn;
|
|
1705
|
+
T.isCancel = et;
|
|
1706
|
+
T.VERSION = at;
|
|
1707
|
+
T.toFormData = Z;
|
|
1708
|
+
T.AxiosError = y;
|
|
1709
|
+
T.Cancel = T.CanceledError;
|
|
1710
|
+
T.all = function(t) {
|
|
1711
1711
|
return Promise.all(t);
|
|
1712
1712
|
};
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1713
|
+
T.spread = Mn;
|
|
1714
|
+
T.isAxiosError = zn;
|
|
1715
|
+
T.mergeConfig = B;
|
|
1716
|
+
T.AxiosHeaders = k;
|
|
1717
|
+
T.formToJSON = (e) => Ye(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1718
|
+
T.getAdapter = it.getAdapter;
|
|
1719
|
+
T.HttpStatusCode = Jn;
|
|
1720
|
+
T.default = T;
|
|
1721
1721
|
/*! js-cookie v3.0.5 | MIT */
|
|
1722
1722
|
function M(e) {
|
|
1723
1723
|
for (var t = 1; t < arguments.length; t++) {
|
|
@@ -1789,60 +1789,84 @@ function pe(e, t) {
|
|
|
1789
1789
|
);
|
|
1790
1790
|
}
|
|
1791
1791
|
var oe = pe($n, { path: "/" });
|
|
1792
|
-
const
|
|
1792
|
+
const w = class w {
|
|
1793
1793
|
static setErrorsHandler(t) {
|
|
1794
|
-
|
|
1794
|
+
w.errorsHandler = t;
|
|
1795
1795
|
}
|
|
1796
1796
|
};
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
}),
|
|
1800
|
-
var
|
|
1797
|
+
N(w, "keyCookie", "AuthCookie"), N(w, "cookieOptions", {}), N(w, "registerRequest", new Re()), N(w, "registerFailedRequests", new Re()), N(w, "requestUploadToken", null), N(w, "errorsHandler", new ft()), N(w, "setMethodUploadToken", (t) => {
|
|
1798
|
+
w.requestUploadToken = t;
|
|
1799
|
+
}), N(w, "requestInServer", (t, n = {}) => new Promise((r, s) => {
|
|
1800
|
+
var m, E, R;
|
|
1801
1801
|
let o = { url: t, statusCode: 0, data: {}, res: {} };
|
|
1802
|
-
const i = {
|
|
1802
|
+
const i = {
|
|
1803
1803
|
method: "get",
|
|
1804
1804
|
headers: {
|
|
1805
|
-
cookie:
|
|
1805
|
+
cookie: w.getAuthCookies()
|
|
1806
1806
|
},
|
|
1807
1807
|
timeout: 6e4
|
|
1808
|
-
},
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1808
|
+
}, c = Oe.deepMerge(i, n), f = 520, u = "", l = {
|
|
1809
|
+
url: t,
|
|
1810
|
+
statusCode: f,
|
|
1811
|
+
msg: u,
|
|
1812
|
+
isErr: !0,
|
|
1813
|
+
request: c,
|
|
1814
|
+
errExt: { message: u, status: f }
|
|
1815
|
+
};
|
|
1816
|
+
if (window != null && window.cordova && ((E = (m = window == null ? void 0 : window.cordova) == null ? void 0 : m.plugin) != null && E.http)) {
|
|
1817
|
+
const { http: d } = (R = window == null ? void 0 : window.cordova) == null ? void 0 : R.plugin;
|
|
1818
|
+
d.setDataSerializer("json"), d.setRequestTimeout(Number(c.timeout) / 1e3), w.registerRequest.setList({ url: t, options: c }), d.sendRequest(
|
|
1812
1819
|
t,
|
|
1813
|
-
|
|
1814
|
-
(
|
|
1815
|
-
console.log("http.sendRequest success: ",
|
|
1816
|
-
const
|
|
1817
|
-
o = { ...o, statusCode:
|
|
1820
|
+
c,
|
|
1821
|
+
(h) => {
|
|
1822
|
+
console.log("http.sendRequest success: ", h), w.registerFailedRequests.removeItem(t), w.registerRequest.removeItem(t);
|
|
1823
|
+
const p = (h == null ? void 0 : h.headers) && h.headers["set-cookie"], g = h.status, b = h == null ? void 0 : h.data;
|
|
1824
|
+
o = { ...o, statusCode: g, data: b, res: h }, g === 200 && p && (w.saveToken(p), o.data = { ...o.data, token: p }), r(o);
|
|
1818
1825
|
},
|
|
1819
|
-
(
|
|
1820
|
-
console.log("http.sendRequest error: ",
|
|
1821
|
-
const
|
|
1822
|
-
|
|
1826
|
+
(h) => {
|
|
1827
|
+
console.log("http.sendRequest error: ", h);
|
|
1828
|
+
const p = w.errorsHandler.handleError(h), { url: g, status: b, headers: O, error: S } = h, A = Oe.isJSON(S), C = {
|
|
1829
|
+
headers: O,
|
|
1830
|
+
status: b,
|
|
1831
|
+
message: ""
|
|
1832
|
+
};
|
|
1833
|
+
if (A) {
|
|
1834
|
+
const U = JSON.parse(S);
|
|
1835
|
+
C.message = w.errorsHandler.getErrorMessageFromData(U), C.data = U;
|
|
1836
|
+
}
|
|
1837
|
+
typeof S == "string" && (C.message = S), s({ ...l, ...p, errExt: C });
|
|
1823
1838
|
}
|
|
1824
1839
|
);
|
|
1825
1840
|
} else
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
const
|
|
1829
|
-
o = { ...o, statusCode:
|
|
1830
|
-
}).catch((
|
|
1831
|
-
const
|
|
1832
|
-
|
|
1841
|
+
w.registerRequest.setList({ url: t, options: c }), T({ url: t, ...c }).then((d) => {
|
|
1842
|
+
w.registerRequest.removeItem(t);
|
|
1843
|
+
const h = d.status, p = d == null ? void 0 : d.data;
|
|
1844
|
+
o = { ...o, statusCode: h, data: p, res: d }, r(o);
|
|
1845
|
+
}).catch((d) => {
|
|
1846
|
+
const h = w.errorsHandler.handleError(d), { code: p, config: g, status: b, message: O, response: S, stack: A } = d, C = {
|
|
1847
|
+
code: p,
|
|
1848
|
+
config: g,
|
|
1849
|
+
status: b || f,
|
|
1850
|
+
message: O,
|
|
1851
|
+
headers: S == null ? void 0 : S.headers,
|
|
1852
|
+
statusText: S == null ? void 0 : S.statusText,
|
|
1853
|
+
data: S == null ? void 0 : S.data,
|
|
1854
|
+
stack: A
|
|
1855
|
+
};
|
|
1856
|
+
s({ ...l, ...h, errExt: C });
|
|
1833
1857
|
});
|
|
1834
|
-
})),
|
|
1858
|
+
})), N(w, "getAuthCookies", () => {
|
|
1835
1859
|
var n, r, s;
|
|
1836
|
-
const { keyCookie: t } =
|
|
1860
|
+
const { keyCookie: t } = w;
|
|
1837
1861
|
if ((r = (n = window == null ? void 0 : window.cordova) == null ? void 0 : n.plugin) != null && r.http) {
|
|
1838
1862
|
const { http: o } = (s = window == null ? void 0 : window.cordova) == null ? void 0 : s.plugin;
|
|
1839
1863
|
return o.getCookieString(t);
|
|
1840
1864
|
}
|
|
1841
1865
|
return oe.get(t);
|
|
1842
|
-
}),
|
|
1866
|
+
}), N(w, "saveToken", (t) => {
|
|
1843
1867
|
var n, r, s;
|
|
1844
1868
|
if (t) {
|
|
1845
|
-
const { keyCookie: o, cookieOptions: i } =
|
|
1869
|
+
const { keyCookie: o, cookieOptions: i } = w;
|
|
1846
1870
|
if ((r = (n = window == null ? void 0 : window.cordova) == null ? void 0 : n.plugin) != null && r.http) {
|
|
1847
1871
|
const { http: c } = (s = window == null ? void 0 : window.cordova) == null ? void 0 : s.plugin;
|
|
1848
1872
|
c.setCookie(o, t, i);
|
|
@@ -1850,19 +1874,19 @@ C(b, "keyCookie", "AuthCookie"), C(b, "cookieOptions", {}), C(b, "registerReques
|
|
|
1850
1874
|
}
|
|
1851
1875
|
oe.set(o, t, i);
|
|
1852
1876
|
}
|
|
1853
|
-
}),
|
|
1877
|
+
}), N(w, "removeAuthCookie", () => {
|
|
1854
1878
|
var n, r, s;
|
|
1855
|
-
const { keyCookie: t } =
|
|
1879
|
+
const { keyCookie: t } = w;
|
|
1856
1880
|
if ((r = (n = window == null ? void 0 : window.cordova) == null ? void 0 : n.plugin) != null && r.http) {
|
|
1857
1881
|
const { http: o } = (s = window == null ? void 0 : window.cordova) == null ? void 0 : s.plugin;
|
|
1858
1882
|
o.clearCookies();
|
|
1859
1883
|
return;
|
|
1860
1884
|
}
|
|
1861
1885
|
oe.remove(t);
|
|
1862
|
-
}),
|
|
1863
|
-
|
|
1886
|
+
}), N(w, "setCookieOptions", (t) => {
|
|
1887
|
+
w.cookieOptions = t;
|
|
1864
1888
|
});
|
|
1865
|
-
let
|
|
1889
|
+
let qe = w;
|
|
1866
1890
|
export {
|
|
1867
|
-
|
|
1891
|
+
qe as apiRequest
|
|
1868
1892
|
};
|