@akad/sdk 1.0.21 → 1.0.23
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/auth/index.d.ts +8 -0
- package/auth/types.d.ts +2 -1
- package/base.d.ts +15 -6
- package/helpers/TokenRefreshManager.d.ts +8 -6
- package/main.d.ts +7 -3
- package/package.json +1 -1
- package/ts-lib.js +1026 -958
- package/ts-lib.umd.cjs +6 -6
package/ts-lib.js
CHANGED
|
@@ -1,236 +1,236 @@
|
|
|
1
|
-
function
|
|
1
|
+
function Ue(e, t) {
|
|
2
2
|
return function() {
|
|
3
3
|
return e.apply(t, arguments);
|
|
4
4
|
};
|
|
5
5
|
}
|
|
6
|
-
const { toString: nt } = Object.prototype, { getPrototypeOf:
|
|
7
|
-
const
|
|
8
|
-
return e[
|
|
9
|
-
})(/* @__PURE__ */ Object.create(null)), P = (e) => (e = e.toLowerCase(), (t) =>
|
|
10
|
-
function
|
|
6
|
+
const { toString: nt } = Object.prototype, { getPrototypeOf: ue } = Object, v = /* @__PURE__ */ ((e) => (t) => {
|
|
7
|
+
const r = nt.call(t);
|
|
8
|
+
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
9
|
+
})(/* @__PURE__ */ Object.create(null)), P = (e) => (e = e.toLowerCase(), (t) => v(t) === e), G = (e) => (t) => typeof t === e, { isArray: L } = Array, $ = G("undefined");
|
|
10
|
+
function st(e) {
|
|
11
11
|
return e !== null && !$(e) && e.constructor !== null && !$(e.constructor) && R(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
12
12
|
}
|
|
13
|
-
const
|
|
14
|
-
function
|
|
13
|
+
const qe = P("ArrayBuffer");
|
|
14
|
+
function ot(e) {
|
|
15
15
|
let t;
|
|
16
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
16
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && qe(e.buffer), t;
|
|
17
17
|
}
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
18
|
+
const it = G("string"), R = G("function"), Be = G("number"), K = (e) => e !== null && typeof e == "object", at = (e) => e === !0 || e === !1, J = (e) => {
|
|
19
|
+
if (v(e) !== "object")
|
|
20
20
|
return !1;
|
|
21
|
-
const t =
|
|
21
|
+
const t = ue(e);
|
|
22
22
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
23
|
-
},
|
|
23
|
+
}, ct = P("Date"), ut = P("File"), lt = P("Blob"), ft = P("FileList"), dt = (e) => K(e) && R(e.pipe), ht = (e) => {
|
|
24
24
|
let t;
|
|
25
|
-
return e && (typeof FormData == "function" && e instanceof FormData || R(e.append) && ((t =
|
|
25
|
+
return e && (typeof FormData == "function" && e instanceof FormData || R(e.append) && ((t = v(e)) === "formdata" || // detect form-data instance
|
|
26
26
|
t === "object" && R(e.toString) && e.toString() === "[object FormData]"));
|
|
27
|
-
},
|
|
28
|
-
function I(e, t, { allOwnKeys:
|
|
27
|
+
}, pt = P("URLSearchParams"), [mt, yt, gt, wt] = ["ReadableStream", "Request", "Response", "Headers"].map(P), bt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
28
|
+
function I(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
29
29
|
if (e === null || typeof e > "u")
|
|
30
30
|
return;
|
|
31
|
-
let
|
|
32
|
-
if (typeof e != "object" && (e = [e]),
|
|
33
|
-
for (
|
|
34
|
-
t.call(null, e[
|
|
31
|
+
let n, s;
|
|
32
|
+
if (typeof e != "object" && (e = [e]), L(e))
|
|
33
|
+
for (n = 0, s = e.length; n < s; n++)
|
|
34
|
+
t.call(null, e[n], n, e);
|
|
35
35
|
else {
|
|
36
|
-
const o =
|
|
37
|
-
let
|
|
38
|
-
for (
|
|
39
|
-
|
|
36
|
+
const o = r ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
37
|
+
let c;
|
|
38
|
+
for (n = 0; n < i; n++)
|
|
39
|
+
c = o[n], t.call(null, e[c], c, e);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function Le(e, t) {
|
|
43
43
|
t = t.toLowerCase();
|
|
44
|
-
const
|
|
45
|
-
let
|
|
46
|
-
for (;
|
|
47
|
-
if (s = n
|
|
44
|
+
const r = Object.keys(e);
|
|
45
|
+
let n = r.length, s;
|
|
46
|
+
for (; n-- > 0; )
|
|
47
|
+
if (s = r[n], t === s.toLowerCase())
|
|
48
48
|
return s;
|
|
49
49
|
return null;
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const _e = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Fe = (e) => !$(e) && e !== _e;
|
|
52
52
|
function re() {
|
|
53
|
-
const { caseless: e } =
|
|
54
|
-
const o = e &&
|
|
55
|
-
|
|
53
|
+
const { caseless: e } = Fe(this) && this || {}, t = {}, r = (n, s) => {
|
|
54
|
+
const o = e && Le(t, s) || s;
|
|
55
|
+
J(t[o]) && J(n) ? t[o] = re(t[o], n) : J(n) ? t[o] = re({}, n) : L(n) ? t[o] = n.slice() : t[o] = n;
|
|
56
56
|
};
|
|
57
|
-
for (let
|
|
58
|
-
arguments[
|
|
57
|
+
for (let n = 0, s = arguments.length; n < s; n++)
|
|
58
|
+
arguments[n] && I(arguments[n], r);
|
|
59
59
|
return t;
|
|
60
60
|
}
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
}, { allOwnKeys:
|
|
64
|
-
e.prototype = Object.create(t.prototype,
|
|
61
|
+
const Tt = (e, t, r, { allOwnKeys: n } = {}) => (I(t, (s, o) => {
|
|
62
|
+
r && R(s) ? e[o] = Ue(s, r) : e[o] = s;
|
|
63
|
+
}, { allOwnKeys: n }), e), St = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Et = (e, t, r, n) => {
|
|
64
|
+
e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
65
65
|
value: t.prototype
|
|
66
|
-
}),
|
|
67
|
-
},
|
|
66
|
+
}), r && Object.assign(e.prototype, r);
|
|
67
|
+
}, Rt = (e, t, r, n) => {
|
|
68
68
|
let s, o, i;
|
|
69
|
-
const
|
|
69
|
+
const c = {};
|
|
70
70
|
if (t = t || {}, e == null)
|
|
71
71
|
return t;
|
|
72
72
|
do {
|
|
73
73
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
74
|
-
i = s[o], (!
|
|
75
|
-
e =
|
|
76
|
-
} while (e && (!
|
|
74
|
+
i = s[o], (!n || n(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
75
|
+
e = r !== !1 && ue(e);
|
|
76
|
+
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
77
77
|
return t;
|
|
78
|
-
},
|
|
79
|
-
e = String(e), (
|
|
80
|
-
const
|
|
81
|
-
return
|
|
82
|
-
},
|
|
78
|
+
}, Ot = (e, t, r) => {
|
|
79
|
+
e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
|
|
80
|
+
const n = e.indexOf(t, r);
|
|
81
|
+
return n !== -1 && n === r;
|
|
82
|
+
}, At = (e) => {
|
|
83
83
|
if (!e)
|
|
84
84
|
return null;
|
|
85
|
-
if (
|
|
85
|
+
if (L(e))
|
|
86
86
|
return e;
|
|
87
87
|
let t = e.length;
|
|
88
|
-
if (!
|
|
88
|
+
if (!Be(t))
|
|
89
89
|
return null;
|
|
90
|
-
const
|
|
90
|
+
const r = new Array(t);
|
|
91
91
|
for (; t-- > 0; )
|
|
92
|
-
|
|
93
|
-
return
|
|
94
|
-
},
|
|
95
|
-
const
|
|
92
|
+
r[t] = e[t];
|
|
93
|
+
return r;
|
|
94
|
+
}, Pt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ue(Uint8Array)), Nt = (e, t) => {
|
|
95
|
+
const n = (e && e[Symbol.iterator]).call(e);
|
|
96
96
|
let s;
|
|
97
|
-
for (; (s =
|
|
97
|
+
for (; (s = n.next()) && !s.done; ) {
|
|
98
98
|
const o = s.value;
|
|
99
99
|
t.call(e, o[0], o[1]);
|
|
100
100
|
}
|
|
101
|
-
},
|
|
102
|
-
let
|
|
103
|
-
const
|
|
104
|
-
for (; (
|
|
105
|
-
|
|
106
|
-
return
|
|
107
|
-
}, Ct = P("HTMLFormElement"),
|
|
101
|
+
}, kt = (e, t) => {
|
|
102
|
+
let r;
|
|
103
|
+
const n = [];
|
|
104
|
+
for (; (r = e.exec(t)) !== null; )
|
|
105
|
+
n.push(r);
|
|
106
|
+
return n;
|
|
107
|
+
}, Ct = P("HTMLFormElement"), xt = (e) => e.toLowerCase().replace(
|
|
108
108
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
109
|
-
function(
|
|
110
|
-
return
|
|
109
|
+
function(r, n, s) {
|
|
110
|
+
return n.toUpperCase() + s;
|
|
111
111
|
}
|
|
112
|
-
),
|
|
113
|
-
const
|
|
114
|
-
I(
|
|
112
|
+
), pe = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), Ut = P("RegExp"), De = (e, t) => {
|
|
113
|
+
const r = Object.getOwnPropertyDescriptors(e), n = {};
|
|
114
|
+
I(r, (s, o) => {
|
|
115
115
|
let i;
|
|
116
|
-
(i = t(s, o, e)) !== !1 && (
|
|
117
|
-
}), Object.defineProperties(e,
|
|
118
|
-
},
|
|
119
|
-
De(e, (t,
|
|
120
|
-
if (R(e) && ["arguments", "caller", "callee"].indexOf(
|
|
116
|
+
(i = t(s, o, e)) !== !1 && (n[o] = i || s);
|
|
117
|
+
}), Object.defineProperties(e, n);
|
|
118
|
+
}, qt = (e) => {
|
|
119
|
+
De(e, (t, r) => {
|
|
120
|
+
if (R(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
121
121
|
return !1;
|
|
122
|
-
const
|
|
123
|
-
if (R(
|
|
122
|
+
const n = e[r];
|
|
123
|
+
if (R(n)) {
|
|
124
124
|
if (t.enumerable = !1, "writable" in t) {
|
|
125
125
|
t.writable = !1;
|
|
126
126
|
return;
|
|
127
127
|
}
|
|
128
128
|
t.set || (t.set = () => {
|
|
129
|
-
throw Error("Can not rewrite read-only method '" +
|
|
129
|
+
throw Error("Can not rewrite read-only method '" + r + "'");
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
|
-
},
|
|
134
|
-
const
|
|
133
|
+
}, Bt = (e, t) => {
|
|
134
|
+
const r = {}, n = (s) => {
|
|
135
135
|
s.forEach((o) => {
|
|
136
|
-
|
|
136
|
+
r[o] = !0;
|
|
137
137
|
});
|
|
138
138
|
};
|
|
139
|
-
return
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
DIGIT:
|
|
143
|
-
ALPHA:
|
|
144
|
-
ALPHA_DIGIT:
|
|
145
|
-
},
|
|
146
|
-
let
|
|
147
|
-
const { length:
|
|
139
|
+
return L(e) ? n(e) : n(String(e).split(t)), r;
|
|
140
|
+
}, Lt = () => {
|
|
141
|
+
}, _t = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, X = "abcdefghijklmnopqrstuvwxyz", me = "0123456789", $e = {
|
|
142
|
+
DIGIT: me,
|
|
143
|
+
ALPHA: X,
|
|
144
|
+
ALPHA_DIGIT: X + X.toUpperCase() + me
|
|
145
|
+
}, Ft = (e = 16, t = $e.ALPHA_DIGIT) => {
|
|
146
|
+
let r = "";
|
|
147
|
+
const { length: n } = t;
|
|
148
148
|
for (; e--; )
|
|
149
|
-
|
|
150
|
-
return
|
|
149
|
+
r += t[Math.random() * n | 0];
|
|
150
|
+
return r;
|
|
151
151
|
};
|
|
152
|
-
function
|
|
152
|
+
function Dt(e) {
|
|
153
153
|
return !!(e && R(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
154
154
|
}
|
|
155
|
-
const
|
|
156
|
-
const t = new Array(10),
|
|
157
|
-
if (
|
|
158
|
-
if (t.indexOf(
|
|
155
|
+
const $t = (e) => {
|
|
156
|
+
const t = new Array(10), r = (n, s) => {
|
|
157
|
+
if (K(n)) {
|
|
158
|
+
if (t.indexOf(n) >= 0)
|
|
159
159
|
return;
|
|
160
|
-
if (!("toJSON" in
|
|
161
|
-
t[s] =
|
|
162
|
-
const o =
|
|
163
|
-
return I(
|
|
164
|
-
const
|
|
165
|
-
!$(
|
|
160
|
+
if (!("toJSON" in n)) {
|
|
161
|
+
t[s] = n;
|
|
162
|
+
const o = L(n) ? [] : {};
|
|
163
|
+
return I(n, (i, c) => {
|
|
164
|
+
const l = r(i, s + 1);
|
|
165
|
+
!$(l) && (o[c] = l);
|
|
166
166
|
}), t[s] = void 0, o;
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
return
|
|
169
|
+
return n;
|
|
170
170
|
};
|
|
171
|
-
return
|
|
172
|
-
},
|
|
173
|
-
isArray:
|
|
174
|
-
isArrayBuffer:
|
|
175
|
-
isBuffer:
|
|
176
|
-
isFormData:
|
|
177
|
-
isArrayBufferView:
|
|
178
|
-
isString:
|
|
179
|
-
isNumber:
|
|
180
|
-
isBoolean:
|
|
181
|
-
isObject:
|
|
182
|
-
isPlainObject:
|
|
183
|
-
isReadableStream:
|
|
184
|
-
isRequest:
|
|
185
|
-
isResponse:
|
|
186
|
-
isHeaders:
|
|
171
|
+
return r(e, 0);
|
|
172
|
+
}, It = P("AsyncFunction"), jt = (e) => e && (K(e) || R(e)) && R(e.then) && R(e.catch), u = {
|
|
173
|
+
isArray: L,
|
|
174
|
+
isArrayBuffer: qe,
|
|
175
|
+
isBuffer: st,
|
|
176
|
+
isFormData: ht,
|
|
177
|
+
isArrayBufferView: ot,
|
|
178
|
+
isString: it,
|
|
179
|
+
isNumber: Be,
|
|
180
|
+
isBoolean: at,
|
|
181
|
+
isObject: K,
|
|
182
|
+
isPlainObject: J,
|
|
183
|
+
isReadableStream: mt,
|
|
184
|
+
isRequest: yt,
|
|
185
|
+
isResponse: gt,
|
|
186
|
+
isHeaders: wt,
|
|
187
187
|
isUndefined: $,
|
|
188
|
-
isDate:
|
|
189
|
-
isFile:
|
|
190
|
-
isBlob:
|
|
191
|
-
isRegExp:
|
|
188
|
+
isDate: ct,
|
|
189
|
+
isFile: ut,
|
|
190
|
+
isBlob: lt,
|
|
191
|
+
isRegExp: Ut,
|
|
192
192
|
isFunction: R,
|
|
193
|
-
isStream:
|
|
194
|
-
isURLSearchParams:
|
|
195
|
-
isTypedArray:
|
|
196
|
-
isFileList:
|
|
193
|
+
isStream: dt,
|
|
194
|
+
isURLSearchParams: pt,
|
|
195
|
+
isTypedArray: Pt,
|
|
196
|
+
isFileList: ft,
|
|
197
197
|
forEach: I,
|
|
198
198
|
merge: re,
|
|
199
|
-
extend:
|
|
200
|
-
trim:
|
|
199
|
+
extend: Tt,
|
|
200
|
+
trim: bt,
|
|
201
201
|
stripBOM: St,
|
|
202
|
-
inherits:
|
|
203
|
-
toFlatObject:
|
|
204
|
-
kindOf:
|
|
202
|
+
inherits: Et,
|
|
203
|
+
toFlatObject: Rt,
|
|
204
|
+
kindOf: v,
|
|
205
205
|
kindOfTest: P,
|
|
206
|
-
endsWith:
|
|
207
|
-
toArray:
|
|
208
|
-
forEachEntry:
|
|
209
|
-
matchAll:
|
|
206
|
+
endsWith: Ot,
|
|
207
|
+
toArray: At,
|
|
208
|
+
forEachEntry: Nt,
|
|
209
|
+
matchAll: kt,
|
|
210
210
|
isHTMLForm: Ct,
|
|
211
|
-
hasOwnProperty:
|
|
212
|
-
hasOwnProp:
|
|
211
|
+
hasOwnProperty: pe,
|
|
212
|
+
hasOwnProp: pe,
|
|
213
213
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
214
214
|
reduceDescriptors: De,
|
|
215
|
-
freezeMethods:
|
|
216
|
-
toObjectSet:
|
|
217
|
-
toCamelCase:
|
|
218
|
-
noop:
|
|
219
|
-
toFiniteNumber:
|
|
220
|
-
findKey:
|
|
221
|
-
global:
|
|
222
|
-
isContextDefined:
|
|
215
|
+
freezeMethods: qt,
|
|
216
|
+
toObjectSet: Bt,
|
|
217
|
+
toCamelCase: xt,
|
|
218
|
+
noop: Lt,
|
|
219
|
+
toFiniteNumber: _t,
|
|
220
|
+
findKey: Le,
|
|
221
|
+
global: _e,
|
|
222
|
+
isContextDefined: Fe,
|
|
223
223
|
ALPHABET: $e,
|
|
224
|
-
generateString:
|
|
225
|
-
isSpecCompliantForm:
|
|
226
|
-
toJSONObject:
|
|
227
|
-
isAsyncFn:
|
|
228
|
-
isThenable:
|
|
224
|
+
generateString: Ft,
|
|
225
|
+
isSpecCompliantForm: Dt,
|
|
226
|
+
toJSONObject: $t,
|
|
227
|
+
isAsyncFn: It,
|
|
228
|
+
isThenable: jt
|
|
229
229
|
};
|
|
230
|
-
function
|
|
231
|
-
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t),
|
|
230
|
+
function p(e, t, r, n, s) {
|
|
231
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), r && (this.config = r), n && (this.request = n), s && (this.response = s);
|
|
232
232
|
}
|
|
233
|
-
|
|
233
|
+
u.inherits(p, Error, {
|
|
234
234
|
toJSON: function() {
|
|
235
235
|
return {
|
|
236
236
|
// Standard
|
|
@@ -245,13 +245,13 @@ c.inherits(y, Error, {
|
|
|
245
245
|
columnNumber: this.columnNumber,
|
|
246
246
|
stack: this.stack,
|
|
247
247
|
// Axios
|
|
248
|
-
config:
|
|
248
|
+
config: u.toJSONObject(this.config),
|
|
249
249
|
code: this.code,
|
|
250
250
|
status: this.response && this.response.status ? this.response.status : null
|
|
251
251
|
};
|
|
252
252
|
}
|
|
253
253
|
});
|
|
254
|
-
const Ie =
|
|
254
|
+
const Ie = p.prototype, je = {};
|
|
255
255
|
[
|
|
256
256
|
"ERR_BAD_OPTION_VALUE",
|
|
257
257
|
"ERR_BAD_OPTION",
|
|
@@ -269,95 +269,95 @@ const Ie = y.prototype, je = {};
|
|
|
269
269
|
].forEach((e) => {
|
|
270
270
|
je[e] = { value: e };
|
|
271
271
|
});
|
|
272
|
-
Object.defineProperties(
|
|
272
|
+
Object.defineProperties(p, je);
|
|
273
273
|
Object.defineProperty(Ie, "isAxiosError", { value: !0 });
|
|
274
|
-
|
|
274
|
+
p.from = (e, t, r, n, s, o) => {
|
|
275
275
|
const i = Object.create(Ie);
|
|
276
|
-
return
|
|
277
|
-
return
|
|
278
|
-
}, (
|
|
276
|
+
return u.toFlatObject(e, i, function(l) {
|
|
277
|
+
return l !== Error.prototype;
|
|
278
|
+
}, (c) => c !== "isAxiosError"), p.call(i, e.message, t, r, n, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
279
279
|
};
|
|
280
|
-
const
|
|
281
|
-
function
|
|
282
|
-
return
|
|
280
|
+
const Ht = null;
|
|
281
|
+
function ne(e) {
|
|
282
|
+
return u.isPlainObject(e) || u.isArray(e);
|
|
283
283
|
}
|
|
284
284
|
function He(e) {
|
|
285
|
-
return
|
|
285
|
+
return u.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function ye(e, t, r) {
|
|
288
288
|
return e ? e.concat(t).map(function(s, o) {
|
|
289
|
-
return s = He(s), !
|
|
290
|
-
}).join(
|
|
289
|
+
return s = He(s), !r && o ? "[" + s + "]" : s;
|
|
290
|
+
}).join(r ? "." : "") : t;
|
|
291
291
|
}
|
|
292
|
-
function
|
|
293
|
-
return
|
|
292
|
+
function Jt(e) {
|
|
293
|
+
return u.isArray(e) && !e.some(ne);
|
|
294
294
|
}
|
|
295
|
-
const
|
|
295
|
+
const zt = u.toFlatObject(u, {}, null, function(t) {
|
|
296
296
|
return /^is[A-Z]/.test(t);
|
|
297
297
|
});
|
|
298
|
-
function
|
|
299
|
-
if (!
|
|
298
|
+
function W(e, t, r) {
|
|
299
|
+
if (!u.isObject(e))
|
|
300
300
|
throw new TypeError("target must be an object");
|
|
301
|
-
t = t || new FormData(),
|
|
301
|
+
t = t || new FormData(), r = u.toFlatObject(r, {
|
|
302
302
|
metaTokens: !0,
|
|
303
303
|
dots: !1,
|
|
304
304
|
indexes: !1
|
|
305
|
-
}, !1, function(
|
|
306
|
-
return !
|
|
305
|
+
}, !1, function(y, T) {
|
|
306
|
+
return !u.isUndefined(T[y]);
|
|
307
307
|
});
|
|
308
|
-
const
|
|
309
|
-
if (!
|
|
308
|
+
const n = r.metaTokens, s = r.visitor || a, o = r.dots, i = r.indexes, l = (r.Blob || typeof Blob < "u" && Blob) && u.isSpecCompliantForm(t);
|
|
309
|
+
if (!u.isFunction(s))
|
|
310
310
|
throw new TypeError("visitor must be a function");
|
|
311
|
-
function
|
|
311
|
+
function f(h) {
|
|
312
312
|
if (h === null)
|
|
313
313
|
return "";
|
|
314
|
-
if (
|
|
314
|
+
if (u.isDate(h))
|
|
315
315
|
return h.toISOString();
|
|
316
|
-
if (!
|
|
317
|
-
throw new
|
|
318
|
-
return
|
|
316
|
+
if (!l && u.isBlob(h))
|
|
317
|
+
throw new p("Blob is not supported. Use a Buffer instead.");
|
|
318
|
+
return u.isArrayBuffer(h) || u.isTypedArray(h) ? l && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
319
319
|
}
|
|
320
|
-
function a(h,
|
|
321
|
-
let
|
|
322
|
-
if (h && !
|
|
323
|
-
if (
|
|
324
|
-
|
|
325
|
-
else if (
|
|
326
|
-
return
|
|
327
|
-
!(
|
|
320
|
+
function a(h, y, T) {
|
|
321
|
+
let S = h;
|
|
322
|
+
if (h && !T && typeof h == "object") {
|
|
323
|
+
if (u.endsWith(y, "{}"))
|
|
324
|
+
y = n ? y : y.slice(0, -2), h = JSON.stringify(h);
|
|
325
|
+
else if (u.isArray(h) && Jt(h) || (u.isFileList(h) || u.endsWith(y, "[]")) && (S = u.toArray(h)))
|
|
326
|
+
return y = He(y), S.forEach(function(w, F) {
|
|
327
|
+
!(u.isUndefined(w) || w === null) && t.append(
|
|
328
328
|
// eslint-disable-next-line no-nested-ternary
|
|
329
|
-
i === !0 ?
|
|
330
|
-
|
|
329
|
+
i === !0 ? ye([y], F, o) : i === null ? y : y + "[]",
|
|
330
|
+
f(w)
|
|
331
331
|
);
|
|
332
332
|
}), !1;
|
|
333
333
|
}
|
|
334
|
-
return
|
|
334
|
+
return ne(h) ? !0 : (t.append(ye(T, y, o), f(h)), !1);
|
|
335
335
|
}
|
|
336
|
-
const d = [],
|
|
336
|
+
const d = [], g = Object.assign(zt, {
|
|
337
337
|
defaultVisitor: a,
|
|
338
|
-
convertValue:
|
|
339
|
-
isVisitable:
|
|
338
|
+
convertValue: f,
|
|
339
|
+
isVisitable: ne
|
|
340
340
|
});
|
|
341
|
-
function
|
|
342
|
-
if (!
|
|
341
|
+
function m(h, y) {
|
|
342
|
+
if (!u.isUndefined(h)) {
|
|
343
343
|
if (d.indexOf(h) !== -1)
|
|
344
|
-
throw Error("Circular reference detected in " +
|
|
345
|
-
d.push(h),
|
|
346
|
-
(!(
|
|
344
|
+
throw Error("Circular reference detected in " + y.join("."));
|
|
345
|
+
d.push(h), u.forEach(h, function(S, N) {
|
|
346
|
+
(!(u.isUndefined(S) || S === null) && s.call(
|
|
347
347
|
t,
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
)) === !0 &&
|
|
348
|
+
S,
|
|
349
|
+
u.isString(N) ? N.trim() : N,
|
|
350
|
+
y,
|
|
351
|
+
g
|
|
352
|
+
)) === !0 && m(S, y ? y.concat(N) : [N]);
|
|
353
353
|
}), d.pop();
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
|
-
if (!
|
|
356
|
+
if (!u.isObject(e))
|
|
357
357
|
throw new TypeError("data must be an object");
|
|
358
|
-
return
|
|
358
|
+
return m(e), t;
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function ge(e) {
|
|
361
361
|
const t = {
|
|
362
362
|
"!": "%21",
|
|
363
363
|
"'": "%27",
|
|
@@ -367,40 +367,40 @@ function we(e) {
|
|
|
367
367
|
"%20": "+",
|
|
368
368
|
"%00": "\0"
|
|
369
369
|
};
|
|
370
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(
|
|
371
|
-
return t[
|
|
370
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) {
|
|
371
|
+
return t[n];
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
|
-
function
|
|
375
|
-
this._pairs = [], e &&
|
|
374
|
+
function le(e, t) {
|
|
375
|
+
this._pairs = [], e && W(e, this, t);
|
|
376
376
|
}
|
|
377
|
-
const Je =
|
|
378
|
-
Je.append = function(t,
|
|
379
|
-
this._pairs.push([t,
|
|
377
|
+
const Je = le.prototype;
|
|
378
|
+
Je.append = function(t, r) {
|
|
379
|
+
this._pairs.push([t, r]);
|
|
380
380
|
};
|
|
381
381
|
Je.toString = function(t) {
|
|
382
|
-
const
|
|
383
|
-
return t.call(this,
|
|
384
|
-
} :
|
|
382
|
+
const r = t ? function(n) {
|
|
383
|
+
return t.call(this, n, ge);
|
|
384
|
+
} : ge;
|
|
385
385
|
return this._pairs.map(function(s) {
|
|
386
|
-
return
|
|
386
|
+
return r(s[0]) + "=" + r(s[1]);
|
|
387
387
|
}, "").join("&");
|
|
388
388
|
};
|
|
389
389
|
function Mt(e) {
|
|
390
390
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function ze(e, t, r) {
|
|
393
393
|
if (!t)
|
|
394
394
|
return e;
|
|
395
|
-
const
|
|
395
|
+
const n = r && r.encode || Mt, s = r && r.serialize;
|
|
396
396
|
let o;
|
|
397
|
-
if (s ? o = s(t,
|
|
397
|
+
if (s ? o = s(t, r) : o = u.isURLSearchParams(t) ? t.toString() : new le(t, r).toString(n), o) {
|
|
398
398
|
const i = e.indexOf("#");
|
|
399
399
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
400
400
|
}
|
|
401
401
|
return e;
|
|
402
402
|
}
|
|
403
|
-
class
|
|
403
|
+
class we {
|
|
404
404
|
constructor() {
|
|
405
405
|
this.handlers = [];
|
|
406
406
|
}
|
|
@@ -412,12 +412,12 @@ class be {
|
|
|
412
412
|
*
|
|
413
413
|
* @return {Number} An ID used to remove interceptor later
|
|
414
414
|
*/
|
|
415
|
-
use(t,
|
|
415
|
+
use(t, r, n) {
|
|
416
416
|
return this.handlers.push({
|
|
417
417
|
fulfilled: t,
|
|
418
|
-
rejected:
|
|
419
|
-
synchronous:
|
|
420
|
-
runWhen:
|
|
418
|
+
rejected: r,
|
|
419
|
+
synchronous: n ? n.synchronous : !1,
|
|
420
|
+
runWhen: n ? n.runWhen : null
|
|
421
421
|
}), this.handlers.length - 1;
|
|
422
422
|
}
|
|
423
423
|
/**
|
|
@@ -449,118 +449,118 @@ class be {
|
|
|
449
449
|
* @returns {void}
|
|
450
450
|
*/
|
|
451
451
|
forEach(t) {
|
|
452
|
-
|
|
453
|
-
|
|
452
|
+
u.forEach(this.handlers, function(n) {
|
|
453
|
+
n !== null && t(n);
|
|
454
454
|
});
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
|
-
const
|
|
457
|
+
const Me = {
|
|
458
458
|
silentJSONParsing: !0,
|
|
459
459
|
forcedJSONParsing: !0,
|
|
460
460
|
clarifyTimeoutError: !1
|
|
461
|
-
},
|
|
461
|
+
}, Vt = typeof URLSearchParams < "u" ? URLSearchParams : le, vt = typeof FormData < "u" ? FormData : null, Gt = typeof Blob < "u" ? Blob : null, Kt = {
|
|
462
462
|
isBrowser: !0,
|
|
463
463
|
classes: {
|
|
464
|
-
URLSearchParams:
|
|
465
|
-
FormData:
|
|
464
|
+
URLSearchParams: Vt,
|
|
465
|
+
FormData: vt,
|
|
466
466
|
Blob: Gt
|
|
467
467
|
},
|
|
468
468
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
469
|
-
},
|
|
470
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
469
|
+
}, fe = typeof window < "u" && typeof document < "u", Wt = ((e) => fe && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), Qt = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
470
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Xt = fe && window.location.href || "http://localhost", Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
471
471
|
__proto__: null,
|
|
472
|
-
hasBrowserEnv:
|
|
473
|
-
hasStandardBrowserEnv:
|
|
474
|
-
hasStandardBrowserWebWorkerEnv:
|
|
475
|
-
origin:
|
|
472
|
+
hasBrowserEnv: fe,
|
|
473
|
+
hasStandardBrowserEnv: Wt,
|
|
474
|
+
hasStandardBrowserWebWorkerEnv: Qt,
|
|
475
|
+
origin: Xt
|
|
476
476
|
}, Symbol.toStringTag, { value: "Module" })), A = {
|
|
477
|
-
...
|
|
477
|
+
...Zt,
|
|
478
478
|
...Kt
|
|
479
479
|
};
|
|
480
|
-
function
|
|
481
|
-
return
|
|
482
|
-
visitor: function(
|
|
483
|
-
return A.isNode &&
|
|
480
|
+
function Yt(e, t) {
|
|
481
|
+
return W(e, new A.classes.URLSearchParams(), Object.assign({
|
|
482
|
+
visitor: function(r, n, s, o) {
|
|
483
|
+
return A.isNode && u.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
484
484
|
}
|
|
485
485
|
}, t));
|
|
486
486
|
}
|
|
487
|
-
function
|
|
488
|
-
return
|
|
487
|
+
function er(e) {
|
|
488
|
+
return u.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
489
489
|
}
|
|
490
|
-
function
|
|
491
|
-
const t = {},
|
|
492
|
-
let
|
|
493
|
-
const s =
|
|
490
|
+
function tr(e) {
|
|
491
|
+
const t = {}, r = Object.keys(e);
|
|
492
|
+
let n;
|
|
493
|
+
const s = r.length;
|
|
494
494
|
let o;
|
|
495
|
-
for (
|
|
496
|
-
o = n
|
|
495
|
+
for (n = 0; n < s; n++)
|
|
496
|
+
o = r[n], t[o] = e[o];
|
|
497
497
|
return t;
|
|
498
498
|
}
|
|
499
499
|
function Ve(e) {
|
|
500
|
-
function t(
|
|
501
|
-
let i =
|
|
500
|
+
function t(r, n, s, o) {
|
|
501
|
+
let i = r[o++];
|
|
502
502
|
if (i === "__proto__")
|
|
503
503
|
return !0;
|
|
504
|
-
const
|
|
505
|
-
return i = !i &&
|
|
504
|
+
const c = Number.isFinite(+i), l = o >= r.length;
|
|
505
|
+
return i = !i && u.isArray(s) ? s.length : i, l ? (u.hasOwnProp(s, i) ? s[i] = [s[i], n] : s[i] = n, !c) : ((!s[i] || !u.isObject(s[i])) && (s[i] = []), t(r, n, s[i], o) && u.isArray(s[i]) && (s[i] = tr(s[i])), !c);
|
|
506
506
|
}
|
|
507
|
-
if (
|
|
508
|
-
const
|
|
509
|
-
return
|
|
510
|
-
t(
|
|
511
|
-
}),
|
|
507
|
+
if (u.isFormData(e) && u.isFunction(e.entries)) {
|
|
508
|
+
const r = {};
|
|
509
|
+
return u.forEachEntry(e, (n, s) => {
|
|
510
|
+
t(er(n), s, r, 0);
|
|
511
|
+
}), r;
|
|
512
512
|
}
|
|
513
513
|
return null;
|
|
514
514
|
}
|
|
515
|
-
function
|
|
516
|
-
if (
|
|
515
|
+
function rr(e, t, r) {
|
|
516
|
+
if (u.isString(e))
|
|
517
517
|
try {
|
|
518
|
-
return (t || JSON.parse)(e),
|
|
519
|
-
} catch (
|
|
520
|
-
if (
|
|
521
|
-
throw
|
|
518
|
+
return (t || JSON.parse)(e), u.trim(e);
|
|
519
|
+
} catch (n) {
|
|
520
|
+
if (n.name !== "SyntaxError")
|
|
521
|
+
throw n;
|
|
522
522
|
}
|
|
523
|
-
return (
|
|
523
|
+
return (r || JSON.stringify)(e);
|
|
524
524
|
}
|
|
525
525
|
const j = {
|
|
526
|
-
transitional:
|
|
526
|
+
transitional: Me,
|
|
527
527
|
adapter: ["xhr", "http", "fetch"],
|
|
528
|
-
transformRequest: [function(t,
|
|
529
|
-
const
|
|
530
|
-
if (o &&
|
|
528
|
+
transformRequest: [function(t, r) {
|
|
529
|
+
const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, o = u.isObject(t);
|
|
530
|
+
if (o && u.isHTMLForm(t) && (t = new FormData(t)), u.isFormData(t))
|
|
531
531
|
return s ? JSON.stringify(Ve(t)) : t;
|
|
532
|
-
if (
|
|
532
|
+
if (u.isArrayBuffer(t) || u.isBuffer(t) || u.isStream(t) || u.isFile(t) || u.isBlob(t) || u.isReadableStream(t))
|
|
533
533
|
return t;
|
|
534
|
-
if (
|
|
534
|
+
if (u.isArrayBufferView(t))
|
|
535
535
|
return t.buffer;
|
|
536
|
-
if (
|
|
537
|
-
return
|
|
538
|
-
let
|
|
536
|
+
if (u.isURLSearchParams(t))
|
|
537
|
+
return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
538
|
+
let c;
|
|
539
539
|
if (o) {
|
|
540
|
-
if (
|
|
541
|
-
return
|
|
542
|
-
if ((
|
|
543
|
-
const
|
|
544
|
-
return
|
|
545
|
-
|
|
546
|
-
|
|
540
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
541
|
+
return Yt(t, this.formSerializer).toString();
|
|
542
|
+
if ((c = u.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
543
|
+
const l = this.env && this.env.FormData;
|
|
544
|
+
return W(
|
|
545
|
+
c ? { "files[]": t } : t,
|
|
546
|
+
l && new l(),
|
|
547
547
|
this.formSerializer
|
|
548
548
|
);
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
return o || s ? (
|
|
551
|
+
return o || s ? (r.setContentType("application/json", !1), rr(t)) : t;
|
|
552
552
|
}],
|
|
553
553
|
transformResponse: [function(t) {
|
|
554
|
-
const
|
|
555
|
-
if (
|
|
554
|
+
const r = this.transitional || j.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
|
|
555
|
+
if (u.isResponse(t) || u.isReadableStream(t))
|
|
556
556
|
return t;
|
|
557
|
-
if (t &&
|
|
558
|
-
const i = !(
|
|
557
|
+
if (t && u.isString(t) && (n && !this.responseType || s)) {
|
|
558
|
+
const i = !(r && r.silentJSONParsing) && s;
|
|
559
559
|
try {
|
|
560
560
|
return JSON.parse(t);
|
|
561
|
-
} catch (
|
|
561
|
+
} catch (c) {
|
|
562
562
|
if (i)
|
|
563
|
-
throw
|
|
563
|
+
throw c.name === "SyntaxError" ? p.from(c, p.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
566
|
return t;
|
|
@@ -588,10 +588,10 @@ const j = {
|
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
590
|
};
|
|
591
|
-
|
|
591
|
+
u.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
592
592
|
j.headers[e] = {};
|
|
593
593
|
});
|
|
594
|
-
const
|
|
594
|
+
const nr = u.toObjectSet([
|
|
595
595
|
"age",
|
|
596
596
|
"authorization",
|
|
597
597
|
"content-length",
|
|
@@ -609,47 +609,47 @@ const nn = c.toObjectSet([
|
|
|
609
609
|
"referer",
|
|
610
610
|
"retry-after",
|
|
611
611
|
"user-agent"
|
|
612
|
-
]),
|
|
612
|
+
]), sr = (e) => {
|
|
613
613
|
const t = {};
|
|
614
|
-
let
|
|
614
|
+
let r, n, s;
|
|
615
615
|
return e && e.split(`
|
|
616
616
|
`).forEach(function(i) {
|
|
617
|
-
s = i.indexOf(":"),
|
|
617
|
+
s = i.indexOf(":"), r = i.substring(0, s).trim().toLowerCase(), n = i.substring(s + 1).trim(), !(!r || t[r] && nr[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
|
|
618
618
|
}), t;
|
|
619
|
-
},
|
|
619
|
+
}, be = Symbol("internals");
|
|
620
620
|
function D(e) {
|
|
621
621
|
return e && String(e).trim().toLowerCase();
|
|
622
622
|
}
|
|
623
623
|
function z(e) {
|
|
624
|
-
return e === !1 || e == null ? e :
|
|
624
|
+
return e === !1 || e == null ? e : u.isArray(e) ? e.map(z) : String(e);
|
|
625
625
|
}
|
|
626
|
-
function
|
|
627
|
-
const t = /* @__PURE__ */ Object.create(null),
|
|
628
|
-
let
|
|
629
|
-
for (;
|
|
630
|
-
t[
|
|
626
|
+
function or(e) {
|
|
627
|
+
const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
628
|
+
let n;
|
|
629
|
+
for (; n = r.exec(e); )
|
|
630
|
+
t[n[1]] = n[2];
|
|
631
631
|
return t;
|
|
632
632
|
}
|
|
633
|
-
const
|
|
634
|
-
function
|
|
635
|
-
if (
|
|
636
|
-
return
|
|
637
|
-
if (s && (t =
|
|
638
|
-
if (
|
|
639
|
-
return t.indexOf(
|
|
640
|
-
if (
|
|
641
|
-
return
|
|
633
|
+
const ir = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
634
|
+
function Z(e, t, r, n, s) {
|
|
635
|
+
if (u.isFunction(n))
|
|
636
|
+
return n.call(this, t, r);
|
|
637
|
+
if (s && (t = r), !!u.isString(t)) {
|
|
638
|
+
if (u.isString(n))
|
|
639
|
+
return t.indexOf(n) !== -1;
|
|
640
|
+
if (u.isRegExp(n))
|
|
641
|
+
return n.test(t);
|
|
642
642
|
}
|
|
643
643
|
}
|
|
644
|
-
function
|
|
645
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t,
|
|
644
|
+
function ar(e) {
|
|
645
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
|
|
646
646
|
}
|
|
647
|
-
function
|
|
648
|
-
const
|
|
649
|
-
["get", "set", "has"].forEach((
|
|
650
|
-
Object.defineProperty(e,
|
|
647
|
+
function cr(e, t) {
|
|
648
|
+
const r = u.toCamelCase(" " + t);
|
|
649
|
+
["get", "set", "has"].forEach((n) => {
|
|
650
|
+
Object.defineProperty(e, n + r, {
|
|
651
651
|
value: function(s, o, i) {
|
|
652
|
-
return this[
|
|
652
|
+
return this[n].call(this, t, s, o, i);
|
|
653
653
|
},
|
|
654
654
|
configurable: !0
|
|
655
655
|
});
|
|
@@ -659,97 +659,97 @@ let E = class {
|
|
|
659
659
|
constructor(t) {
|
|
660
660
|
t && this.set(t);
|
|
661
661
|
}
|
|
662
|
-
set(t,
|
|
662
|
+
set(t, r, n) {
|
|
663
663
|
const s = this;
|
|
664
|
-
function o(
|
|
665
|
-
const a = D(
|
|
664
|
+
function o(c, l, f) {
|
|
665
|
+
const a = D(l);
|
|
666
666
|
if (!a)
|
|
667
667
|
throw new Error("header name must be a non-empty string");
|
|
668
|
-
const d =
|
|
669
|
-
(!d || s[d] === void 0 ||
|
|
668
|
+
const d = u.findKey(s, a);
|
|
669
|
+
(!d || s[d] === void 0 || f === !0 || f === void 0 && s[d] !== !1) && (s[d || l] = z(c));
|
|
670
670
|
}
|
|
671
|
-
const i = (
|
|
672
|
-
if (
|
|
673
|
-
i(t,
|
|
674
|
-
else if (
|
|
675
|
-
i(
|
|
676
|
-
else if (
|
|
677
|
-
for (const [
|
|
678
|
-
o(
|
|
671
|
+
const i = (c, l) => u.forEach(c, (f, a) => o(f, a, l));
|
|
672
|
+
if (u.isPlainObject(t) || t instanceof this.constructor)
|
|
673
|
+
i(t, r);
|
|
674
|
+
else if (u.isString(t) && (t = t.trim()) && !ir(t))
|
|
675
|
+
i(sr(t), r);
|
|
676
|
+
else if (u.isHeaders(t))
|
|
677
|
+
for (const [c, l] of t.entries())
|
|
678
|
+
o(l, c, n);
|
|
679
679
|
else
|
|
680
|
-
t != null && o(
|
|
680
|
+
t != null && o(r, t, n);
|
|
681
681
|
return this;
|
|
682
682
|
}
|
|
683
|
-
get(t,
|
|
683
|
+
get(t, r) {
|
|
684
684
|
if (t = D(t), t) {
|
|
685
|
-
const
|
|
686
|
-
if (
|
|
687
|
-
const s = this[
|
|
688
|
-
if (!
|
|
685
|
+
const n = u.findKey(this, t);
|
|
686
|
+
if (n) {
|
|
687
|
+
const s = this[n];
|
|
688
|
+
if (!r)
|
|
689
689
|
return s;
|
|
690
|
-
if (
|
|
691
|
-
return
|
|
692
|
-
if (
|
|
693
|
-
return
|
|
694
|
-
if (
|
|
695
|
-
return
|
|
690
|
+
if (r === !0)
|
|
691
|
+
return or(s);
|
|
692
|
+
if (u.isFunction(r))
|
|
693
|
+
return r.call(this, s, n);
|
|
694
|
+
if (u.isRegExp(r))
|
|
695
|
+
return r.exec(s);
|
|
696
696
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
|
-
has(t,
|
|
700
|
+
has(t, r) {
|
|
701
701
|
if (t = D(t), t) {
|
|
702
|
-
const
|
|
703
|
-
return !!(
|
|
702
|
+
const n = u.findKey(this, t);
|
|
703
|
+
return !!(n && this[n] !== void 0 && (!r || Z(this, this[n], n, r)));
|
|
704
704
|
}
|
|
705
705
|
return !1;
|
|
706
706
|
}
|
|
707
|
-
delete(t,
|
|
708
|
-
const
|
|
707
|
+
delete(t, r) {
|
|
708
|
+
const n = this;
|
|
709
709
|
let s = !1;
|
|
710
710
|
function o(i) {
|
|
711
711
|
if (i = D(i), i) {
|
|
712
|
-
const
|
|
713
|
-
|
|
712
|
+
const c = u.findKey(n, i);
|
|
713
|
+
c && (!r || Z(n, n[c], c, r)) && (delete n[c], s = !0);
|
|
714
714
|
}
|
|
715
715
|
}
|
|
716
|
-
return
|
|
716
|
+
return u.isArray(t) ? t.forEach(o) : o(t), s;
|
|
717
717
|
}
|
|
718
718
|
clear(t) {
|
|
719
|
-
const
|
|
720
|
-
let
|
|
721
|
-
for (;
|
|
722
|
-
const o = n
|
|
723
|
-
(!t ||
|
|
719
|
+
const r = Object.keys(this);
|
|
720
|
+
let n = r.length, s = !1;
|
|
721
|
+
for (; n--; ) {
|
|
722
|
+
const o = r[n];
|
|
723
|
+
(!t || Z(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
724
724
|
}
|
|
725
725
|
return s;
|
|
726
726
|
}
|
|
727
727
|
normalize(t) {
|
|
728
|
-
const
|
|
729
|
-
return
|
|
730
|
-
const i =
|
|
728
|
+
const r = this, n = {};
|
|
729
|
+
return u.forEach(this, (s, o) => {
|
|
730
|
+
const i = u.findKey(n, o);
|
|
731
731
|
if (i) {
|
|
732
|
-
|
|
732
|
+
r[i] = z(s), delete r[o];
|
|
733
733
|
return;
|
|
734
734
|
}
|
|
735
|
-
const
|
|
736
|
-
|
|
735
|
+
const c = t ? ar(o) : String(o).trim();
|
|
736
|
+
c !== o && delete r[o], r[c] = z(s), n[c] = !0;
|
|
737
737
|
}), this;
|
|
738
738
|
}
|
|
739
739
|
concat(...t) {
|
|
740
740
|
return this.constructor.concat(this, ...t);
|
|
741
741
|
}
|
|
742
742
|
toJSON(t) {
|
|
743
|
-
const
|
|
744
|
-
return
|
|
745
|
-
|
|
746
|
-
}),
|
|
743
|
+
const r = /* @__PURE__ */ Object.create(null);
|
|
744
|
+
return u.forEach(this, (n, s) => {
|
|
745
|
+
n != null && n !== !1 && (r[s] = t && u.isArray(n) ? n.join(", ") : n);
|
|
746
|
+
}), r;
|
|
747
747
|
}
|
|
748
748
|
[Symbol.iterator]() {
|
|
749
749
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
750
750
|
}
|
|
751
751
|
toString() {
|
|
752
|
-
return Object.entries(this.toJSON()).map(([t,
|
|
752
|
+
return Object.entries(this.toJSON()).map(([t, r]) => t + ": " + r).join(`
|
|
753
753
|
`);
|
|
754
754
|
}
|
|
755
755
|
get [Symbol.toStringTag]() {
|
|
@@ -758,129 +758,129 @@ let E = class {
|
|
|
758
758
|
static from(t) {
|
|
759
759
|
return t instanceof this ? t : new this(t);
|
|
760
760
|
}
|
|
761
|
-
static concat(t, ...
|
|
762
|
-
const
|
|
763
|
-
return
|
|
761
|
+
static concat(t, ...r) {
|
|
762
|
+
const n = new this(t);
|
|
763
|
+
return r.forEach((s) => n.set(s)), n;
|
|
764
764
|
}
|
|
765
765
|
static accessor(t) {
|
|
766
|
-
const
|
|
766
|
+
const n = (this[be] = this[be] = {
|
|
767
767
|
accessors: {}
|
|
768
768
|
}).accessors, s = this.prototype;
|
|
769
769
|
function o(i) {
|
|
770
|
-
const
|
|
771
|
-
|
|
770
|
+
const c = D(i);
|
|
771
|
+
n[c] || (cr(s, i), n[c] = !0);
|
|
772
772
|
}
|
|
773
|
-
return
|
|
773
|
+
return u.isArray(t) ? t.forEach(o) : o(t), this;
|
|
774
774
|
}
|
|
775
775
|
};
|
|
776
776
|
E.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
777
|
-
|
|
778
|
-
let
|
|
777
|
+
u.reduceDescriptors(E.prototype, ({ value: e }, t) => {
|
|
778
|
+
let r = t[0].toUpperCase() + t.slice(1);
|
|
779
779
|
return {
|
|
780
780
|
get: () => e,
|
|
781
|
-
set(
|
|
782
|
-
this[
|
|
781
|
+
set(n) {
|
|
782
|
+
this[r] = n;
|
|
783
783
|
}
|
|
784
784
|
};
|
|
785
785
|
});
|
|
786
|
-
|
|
787
|
-
function
|
|
788
|
-
const
|
|
789
|
-
let o =
|
|
790
|
-
return
|
|
791
|
-
o =
|
|
786
|
+
u.freezeMethods(E);
|
|
787
|
+
function Y(e, t) {
|
|
788
|
+
const r = this || j, n = t || r, s = E.from(n.headers);
|
|
789
|
+
let o = n.data;
|
|
790
|
+
return u.forEach(e, function(c) {
|
|
791
|
+
o = c.call(r, o, s.normalize(), t ? t.status : void 0);
|
|
792
792
|
}), s.normalize(), o;
|
|
793
793
|
}
|
|
794
|
-
function
|
|
794
|
+
function ve(e) {
|
|
795
795
|
return !!(e && e.__CANCEL__);
|
|
796
796
|
}
|
|
797
|
-
function
|
|
798
|
-
|
|
797
|
+
function _(e, t, r) {
|
|
798
|
+
p.call(this, e ?? "canceled", p.ERR_CANCELED, t, r), this.name = "CanceledError";
|
|
799
799
|
}
|
|
800
|
-
|
|
800
|
+
u.inherits(_, p, {
|
|
801
801
|
__CANCEL__: !0
|
|
802
802
|
});
|
|
803
|
-
function
|
|
804
|
-
const
|
|
805
|
-
!
|
|
806
|
-
"Request failed with status code " +
|
|
807
|
-
[
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
803
|
+
function Ge(e, t, r) {
|
|
804
|
+
const n = r.config.validateStatus;
|
|
805
|
+
!r.status || !n || n(r.status) ? e(r) : t(new p(
|
|
806
|
+
"Request failed with status code " + r.status,
|
|
807
|
+
[p.ERR_BAD_REQUEST, p.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
|
|
808
|
+
r.config,
|
|
809
|
+
r.request,
|
|
810
|
+
r
|
|
811
811
|
));
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function ur(e) {
|
|
814
814
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
815
815
|
return t && t[1] || "";
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function lr(e, t) {
|
|
818
818
|
e = e || 10;
|
|
819
|
-
const
|
|
819
|
+
const r = new Array(e), n = new Array(e);
|
|
820
820
|
let s = 0, o = 0, i;
|
|
821
|
-
return t = t !== void 0 ? t : 1e3, function(
|
|
822
|
-
const
|
|
823
|
-
i || (i =
|
|
824
|
-
let d = o,
|
|
821
|
+
return t = t !== void 0 ? t : 1e3, function(l) {
|
|
822
|
+
const f = Date.now(), a = n[o];
|
|
823
|
+
i || (i = f), r[s] = l, n[s] = f;
|
|
824
|
+
let d = o, g = 0;
|
|
825
825
|
for (; d !== s; )
|
|
826
|
-
|
|
827
|
-
if (s = (s + 1) % e, s === o && (o = (o + 1) % e),
|
|
826
|
+
g += r[d++], d = d % e;
|
|
827
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), f - i < t)
|
|
828
828
|
return;
|
|
829
|
-
const
|
|
830
|
-
return
|
|
829
|
+
const m = a && f - a;
|
|
830
|
+
return m ? Math.round(g * 1e3 / m) : void 0;
|
|
831
831
|
};
|
|
832
832
|
}
|
|
833
|
-
function
|
|
834
|
-
let
|
|
835
|
-
const
|
|
833
|
+
function fr(e, t) {
|
|
834
|
+
let r = 0;
|
|
835
|
+
const n = 1e3 / t;
|
|
836
836
|
let s = null;
|
|
837
837
|
return function() {
|
|
838
|
-
const i = this === !0,
|
|
839
|
-
if (i ||
|
|
840
|
-
return s && (clearTimeout(s), s = null),
|
|
841
|
-
s || (s = setTimeout(() => (s = null,
|
|
838
|
+
const i = this === !0, c = Date.now();
|
|
839
|
+
if (i || c - r > n)
|
|
840
|
+
return s && (clearTimeout(s), s = null), r = c, e.apply(null, arguments);
|
|
841
|
+
s || (s = setTimeout(() => (s = null, r = Date.now(), e.apply(null, arguments)), n - (c - r)));
|
|
842
842
|
};
|
|
843
843
|
}
|
|
844
|
-
const
|
|
845
|
-
let
|
|
846
|
-
const s =
|
|
847
|
-
return
|
|
848
|
-
const i = o.loaded,
|
|
849
|
-
|
|
844
|
+
const M = (e, t, r = 3) => {
|
|
845
|
+
let n = 0;
|
|
846
|
+
const s = lr(50, 250);
|
|
847
|
+
return fr((o) => {
|
|
848
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, l = i - n, f = s(l), a = i <= c;
|
|
849
|
+
n = i;
|
|
850
850
|
const d = {
|
|
851
851
|
loaded: i,
|
|
852
|
-
total:
|
|
853
|
-
progress:
|
|
854
|
-
bytes:
|
|
855
|
-
rate:
|
|
856
|
-
estimated:
|
|
852
|
+
total: c,
|
|
853
|
+
progress: c ? i / c : void 0,
|
|
854
|
+
bytes: l,
|
|
855
|
+
rate: f || void 0,
|
|
856
|
+
estimated: f && c && a ? (c - i) / f : void 0,
|
|
857
857
|
event: o,
|
|
858
|
-
lengthComputable:
|
|
858
|
+
lengthComputable: c != null
|
|
859
859
|
};
|
|
860
860
|
d[t ? "download" : "upload"] = !0, e(d);
|
|
861
|
-
},
|
|
862
|
-
},
|
|
861
|
+
}, r);
|
|
862
|
+
}, dr = A.hasStandardBrowserEnv ? (
|
|
863
863
|
// Standard browser envs have full support of the APIs needed to test
|
|
864
864
|
// whether the request URL is of the same origin as current location.
|
|
865
865
|
function() {
|
|
866
|
-
const t = /(msie|trident)/i.test(navigator.userAgent),
|
|
867
|
-
let
|
|
866
|
+
const t = /(msie|trident)/i.test(navigator.userAgent), r = document.createElement("a");
|
|
867
|
+
let n;
|
|
868
868
|
function s(o) {
|
|
869
869
|
let i = o;
|
|
870
|
-
return t && (
|
|
871
|
-
href:
|
|
872
|
-
protocol:
|
|
873
|
-
host:
|
|
874
|
-
search:
|
|
875
|
-
hash:
|
|
876
|
-
hostname:
|
|
877
|
-
port:
|
|
878
|
-
pathname:
|
|
870
|
+
return t && (r.setAttribute("href", i), i = r.href), r.setAttribute("href", i), {
|
|
871
|
+
href: r.href,
|
|
872
|
+
protocol: r.protocol ? r.protocol.replace(/:$/, "") : "",
|
|
873
|
+
host: r.host,
|
|
874
|
+
search: r.search ? r.search.replace(/^\?/, "") : "",
|
|
875
|
+
hash: r.hash ? r.hash.replace(/^#/, "") : "",
|
|
876
|
+
hostname: r.hostname,
|
|
877
|
+
port: r.port,
|
|
878
|
+
pathname: r.pathname.charAt(0) === "/" ? r.pathname : "/" + r.pathname
|
|
879
879
|
};
|
|
880
880
|
}
|
|
881
|
-
return
|
|
882
|
-
const
|
|
883
|
-
return
|
|
881
|
+
return n = s(window.location.href), function(i) {
|
|
882
|
+
const c = u.isString(i) ? s(i) : i;
|
|
883
|
+
return c.protocol === n.protocol && c.host === n.host;
|
|
884
884
|
};
|
|
885
885
|
}()
|
|
886
886
|
) : (
|
|
@@ -890,12 +890,12 @@ const V = (e, t, n = 3) => {
|
|
|
890
890
|
return !0;
|
|
891
891
|
};
|
|
892
892
|
}()
|
|
893
|
-
),
|
|
893
|
+
), hr = A.hasStandardBrowserEnv ? (
|
|
894
894
|
// Standard browser envs support document.cookie
|
|
895
895
|
{
|
|
896
|
-
write(e, t,
|
|
896
|
+
write(e, t, r, n, s, o) {
|
|
897
897
|
const i = [e + "=" + encodeURIComponent(t)];
|
|
898
|
-
|
|
898
|
+
u.isNumber(r) && i.push("expires=" + new Date(r).toGMTString()), u.isString(n) && i.push("path=" + n), u.isString(s) && i.push("domain=" + s), o === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
899
899
|
},
|
|
900
900
|
read(e) {
|
|
901
901
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -917,47 +917,47 @@ const V = (e, t, n = 3) => {
|
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
919
|
);
|
|
920
|
-
function
|
|
920
|
+
function pr(e) {
|
|
921
921
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function mr(e, t) {
|
|
924
924
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
925
925
|
}
|
|
926
|
-
function
|
|
927
|
-
return e && !
|
|
926
|
+
function Ke(e, t) {
|
|
927
|
+
return e && !pr(t) ? mr(e, t) : t;
|
|
928
928
|
}
|
|
929
929
|
const Te = (e) => e instanceof E ? { ...e } : e;
|
|
930
|
-
function
|
|
930
|
+
function q(e, t) {
|
|
931
931
|
t = t || {};
|
|
932
|
-
const
|
|
933
|
-
function
|
|
934
|
-
return
|
|
932
|
+
const r = {};
|
|
933
|
+
function n(f, a, d) {
|
|
934
|
+
return u.isPlainObject(f) && u.isPlainObject(a) ? u.merge.call({ caseless: d }, f, a) : u.isPlainObject(a) ? u.merge({}, a) : u.isArray(a) ? a.slice() : a;
|
|
935
935
|
}
|
|
936
|
-
function s(
|
|
937
|
-
if (
|
|
938
|
-
if (!
|
|
939
|
-
return
|
|
936
|
+
function s(f, a, d) {
|
|
937
|
+
if (u.isUndefined(a)) {
|
|
938
|
+
if (!u.isUndefined(f))
|
|
939
|
+
return n(void 0, f, d);
|
|
940
940
|
} else
|
|
941
|
-
return
|
|
941
|
+
return n(f, a, d);
|
|
942
942
|
}
|
|
943
|
-
function o(
|
|
944
|
-
if (!
|
|
945
|
-
return
|
|
943
|
+
function o(f, a) {
|
|
944
|
+
if (!u.isUndefined(a))
|
|
945
|
+
return n(void 0, a);
|
|
946
946
|
}
|
|
947
|
-
function i(
|
|
948
|
-
if (
|
|
949
|
-
if (!
|
|
950
|
-
return
|
|
947
|
+
function i(f, a) {
|
|
948
|
+
if (u.isUndefined(a)) {
|
|
949
|
+
if (!u.isUndefined(f))
|
|
950
|
+
return n(void 0, f);
|
|
951
951
|
} else
|
|
952
|
-
return
|
|
952
|
+
return n(void 0, a);
|
|
953
953
|
}
|
|
954
|
-
function
|
|
954
|
+
function c(f, a, d) {
|
|
955
955
|
if (d in t)
|
|
956
|
-
return
|
|
956
|
+
return n(f, a);
|
|
957
957
|
if (d in e)
|
|
958
|
-
return
|
|
958
|
+
return n(void 0, f);
|
|
959
959
|
}
|
|
960
|
-
const
|
|
960
|
+
const l = {
|
|
961
961
|
url: o,
|
|
962
962
|
method: o,
|
|
963
963
|
data: o,
|
|
@@ -985,154 +985,154 @@ function U(e, t) {
|
|
|
985
985
|
cancelToken: i,
|
|
986
986
|
socketPath: i,
|
|
987
987
|
responseEncoding: i,
|
|
988
|
-
validateStatus:
|
|
989
|
-
headers: (
|
|
988
|
+
validateStatus: c,
|
|
989
|
+
headers: (f, a) => s(Te(f), Te(a), !0)
|
|
990
990
|
};
|
|
991
|
-
return
|
|
992
|
-
const d =
|
|
993
|
-
|
|
994
|
-
}),
|
|
991
|
+
return u.forEach(Object.keys(Object.assign({}, e, t)), function(a) {
|
|
992
|
+
const d = l[a] || s, g = d(e[a], t[a], a);
|
|
993
|
+
u.isUndefined(g) && d !== c || (r[a] = g);
|
|
994
|
+
}), r;
|
|
995
995
|
}
|
|
996
996
|
const We = (e) => {
|
|
997
|
-
const t =
|
|
998
|
-
let { data:
|
|
999
|
-
t.headers = i = E.from(i), t.url =
|
|
997
|
+
const t = q({}, e);
|
|
998
|
+
let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
999
|
+
t.headers = i = E.from(i), t.url = ze(Ke(t.baseURL, t.url), e.params, e.paramsSerializer), c && i.set(
|
|
1000
1000
|
"Authorization",
|
|
1001
|
-
"Basic " + btoa((
|
|
1001
|
+
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1002
1002
|
);
|
|
1003
|
-
let
|
|
1004
|
-
if (
|
|
1003
|
+
let l;
|
|
1004
|
+
if (u.isFormData(r)) {
|
|
1005
1005
|
if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
|
|
1006
1006
|
i.setContentType(void 0);
|
|
1007
|
-
else if ((
|
|
1008
|
-
const [
|
|
1009
|
-
i.setContentType([
|
|
1007
|
+
else if ((l = i.getContentType()) !== !1) {
|
|
1008
|
+
const [f, ...a] = l ? l.split(";").map((d) => d.trim()).filter(Boolean) : [];
|
|
1009
|
+
i.setContentType([f || "multipart/form-data", ...a].join("; "));
|
|
1010
1010
|
}
|
|
1011
1011
|
}
|
|
1012
|
-
if (A.hasStandardBrowserEnv && (
|
|
1013
|
-
const
|
|
1014
|
-
|
|
1012
|
+
if (A.hasStandardBrowserEnv && (n && u.isFunction(n) && (n = n(t)), n || n !== !1 && dr(t.url))) {
|
|
1013
|
+
const f = s && o && hr.read(o);
|
|
1014
|
+
f && i.set(s, f);
|
|
1015
1015
|
}
|
|
1016
1016
|
return t;
|
|
1017
|
-
},
|
|
1018
|
-
return new Promise(function(
|
|
1017
|
+
}, yr = typeof XMLHttpRequest < "u", gr = yr && function(e) {
|
|
1018
|
+
return new Promise(function(r, n) {
|
|
1019
1019
|
const s = We(e);
|
|
1020
1020
|
let o = s.data;
|
|
1021
1021
|
const i = E.from(s.headers).normalize();
|
|
1022
|
-
let { responseType:
|
|
1023
|
-
function
|
|
1024
|
-
s.cancelToken && s.cancelToken.unsubscribe(
|
|
1022
|
+
let { responseType: c } = s, l;
|
|
1023
|
+
function f() {
|
|
1024
|
+
s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1025
1025
|
}
|
|
1026
1026
|
let a = new XMLHttpRequest();
|
|
1027
1027
|
a.open(s.method.toUpperCase(), s.url, !0), a.timeout = s.timeout;
|
|
1028
1028
|
function d() {
|
|
1029
1029
|
if (!a)
|
|
1030
1030
|
return;
|
|
1031
|
-
const
|
|
1031
|
+
const m = E.from(
|
|
1032
1032
|
"getAllResponseHeaders" in a && a.getAllResponseHeaders()
|
|
1033
|
-
),
|
|
1034
|
-
data: !
|
|
1033
|
+
), y = {
|
|
1034
|
+
data: !c || c === "text" || c === "json" ? a.responseText : a.response,
|
|
1035
1035
|
status: a.status,
|
|
1036
1036
|
statusText: a.statusText,
|
|
1037
|
-
headers:
|
|
1037
|
+
headers: m,
|
|
1038
1038
|
config: e,
|
|
1039
1039
|
request: a
|
|
1040
1040
|
};
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
}, function(
|
|
1044
|
-
|
|
1045
|
-
},
|
|
1041
|
+
Ge(function(S) {
|
|
1042
|
+
r(S), f();
|
|
1043
|
+
}, function(S) {
|
|
1044
|
+
n(S), f();
|
|
1045
|
+
}, y), a = null;
|
|
1046
1046
|
}
|
|
1047
1047
|
"onloadend" in a ? a.onloadend = d : a.onreadystatechange = function() {
|
|
1048
1048
|
!a || a.readyState !== 4 || a.status === 0 && !(a.responseURL && a.responseURL.indexOf("file:") === 0) || setTimeout(d);
|
|
1049
1049
|
}, a.onabort = function() {
|
|
1050
|
-
a && (
|
|
1050
|
+
a && (n(new p("Request aborted", p.ECONNABORTED, s, a)), a = null);
|
|
1051
1051
|
}, a.onerror = function() {
|
|
1052
|
-
|
|
1052
|
+
n(new p("Network Error", p.ERR_NETWORK, s, a)), a = null;
|
|
1053
1053
|
}, a.ontimeout = function() {
|
|
1054
1054
|
let h = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1055
|
-
const
|
|
1056
|
-
s.timeoutErrorMessage && (h = s.timeoutErrorMessage),
|
|
1055
|
+
const y = s.transitional || Me;
|
|
1056
|
+
s.timeoutErrorMessage && (h = s.timeoutErrorMessage), n(new p(
|
|
1057
1057
|
h,
|
|
1058
|
-
|
|
1058
|
+
y.clarifyTimeoutError ? p.ETIMEDOUT : p.ECONNABORTED,
|
|
1059
1059
|
s,
|
|
1060
1060
|
a
|
|
1061
1061
|
)), a = null;
|
|
1062
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in a &&
|
|
1063
|
-
a.setRequestHeader(
|
|
1064
|
-
}),
|
|
1065
|
-
a && (
|
|
1066
|
-
}, s.cancelToken && s.cancelToken.subscribe(
|
|
1067
|
-
const
|
|
1068
|
-
if (
|
|
1069
|
-
|
|
1062
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in a && u.forEach(i.toJSON(), function(h, y) {
|
|
1063
|
+
a.setRequestHeader(y, h);
|
|
1064
|
+
}), u.isUndefined(s.withCredentials) || (a.withCredentials = !!s.withCredentials), c && c !== "json" && (a.responseType = s.responseType), typeof s.onDownloadProgress == "function" && a.addEventListener("progress", M(s.onDownloadProgress, !0)), typeof s.onUploadProgress == "function" && a.upload && a.upload.addEventListener("progress", M(s.onUploadProgress)), (s.cancelToken || s.signal) && (l = (m) => {
|
|
1065
|
+
a && (n(!m || m.type ? new _(null, e, a) : m), a.abort(), a = null);
|
|
1066
|
+
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1067
|
+
const g = ur(s.url);
|
|
1068
|
+
if (g && A.protocols.indexOf(g) === -1) {
|
|
1069
|
+
n(new p("Unsupported protocol " + g + ":", p.ERR_BAD_REQUEST, e));
|
|
1070
1070
|
return;
|
|
1071
1071
|
}
|
|
1072
1072
|
a.send(o || null);
|
|
1073
1073
|
});
|
|
1074
|
-
},
|
|
1075
|
-
let
|
|
1076
|
-
const s = function(
|
|
1077
|
-
if (!
|
|
1078
|
-
|
|
1079
|
-
const
|
|
1080
|
-
|
|
1074
|
+
}, wr = (e, t) => {
|
|
1075
|
+
let r = new AbortController(), n;
|
|
1076
|
+
const s = function(l) {
|
|
1077
|
+
if (!n) {
|
|
1078
|
+
n = !0, i();
|
|
1079
|
+
const f = l instanceof Error ? l : this.reason;
|
|
1080
|
+
r.abort(f instanceof p ? f : new _(f instanceof Error ? f.message : f));
|
|
1081
1081
|
}
|
|
1082
1082
|
};
|
|
1083
1083
|
let o = t && setTimeout(() => {
|
|
1084
|
-
s(new
|
|
1084
|
+
s(new p(`timeout ${t} of ms exceeded`, p.ETIMEDOUT));
|
|
1085
1085
|
}, t);
|
|
1086
1086
|
const i = () => {
|
|
1087
|
-
e && (o && clearTimeout(o), o = null, e.forEach((
|
|
1088
|
-
|
|
1087
|
+
e && (o && clearTimeout(o), o = null, e.forEach((l) => {
|
|
1088
|
+
l && (l.removeEventListener ? l.removeEventListener("abort", s) : l.unsubscribe(s));
|
|
1089
1089
|
}), e = null);
|
|
1090
1090
|
};
|
|
1091
|
-
e.forEach((
|
|
1092
|
-
const { signal:
|
|
1093
|
-
return
|
|
1091
|
+
e.forEach((l) => l && l.addEventListener && l.addEventListener("abort", s));
|
|
1092
|
+
const { signal: c } = r;
|
|
1093
|
+
return c.unsubscribe = i, [c, () => {
|
|
1094
1094
|
o && clearTimeout(o), o = null;
|
|
1095
1095
|
}];
|
|
1096
|
-
},
|
|
1097
|
-
let
|
|
1098
|
-
if (!t ||
|
|
1096
|
+
}, br = function* (e, t) {
|
|
1097
|
+
let r = e.byteLength;
|
|
1098
|
+
if (!t || r < t) {
|
|
1099
1099
|
yield e;
|
|
1100
1100
|
return;
|
|
1101
1101
|
}
|
|
1102
|
-
let
|
|
1103
|
-
for (;
|
|
1104
|
-
s =
|
|
1105
|
-
},
|
|
1106
|
-
for await (const
|
|
1107
|
-
yield*
|
|
1108
|
-
},
|
|
1109
|
-
const o =
|
|
1102
|
+
let n = 0, s;
|
|
1103
|
+
for (; n < r; )
|
|
1104
|
+
s = n + t, yield e.slice(n, s), n = s;
|
|
1105
|
+
}, Tr = async function* (e, t, r) {
|
|
1106
|
+
for await (const n of e)
|
|
1107
|
+
yield* br(ArrayBuffer.isView(n) ? n : await r(String(n)), t);
|
|
1108
|
+
}, Se = (e, t, r, n, s) => {
|
|
1109
|
+
const o = Tr(e, t, s);
|
|
1110
1110
|
let i = 0;
|
|
1111
1111
|
return new ReadableStream({
|
|
1112
1112
|
type: "bytes",
|
|
1113
|
-
async pull(
|
|
1114
|
-
const { done:
|
|
1115
|
-
if (
|
|
1116
|
-
|
|
1113
|
+
async pull(c) {
|
|
1114
|
+
const { done: l, value: f } = await o.next();
|
|
1115
|
+
if (l) {
|
|
1116
|
+
c.close(), n();
|
|
1117
1117
|
return;
|
|
1118
1118
|
}
|
|
1119
|
-
let a =
|
|
1120
|
-
|
|
1119
|
+
let a = f.byteLength;
|
|
1120
|
+
r && r(i += a), c.enqueue(new Uint8Array(f));
|
|
1121
1121
|
},
|
|
1122
|
-
cancel(
|
|
1123
|
-
return
|
|
1122
|
+
cancel(c) {
|
|
1123
|
+
return n(c), o.return();
|
|
1124
1124
|
}
|
|
1125
1125
|
}, {
|
|
1126
1126
|
highWaterMark: 2
|
|
1127
1127
|
});
|
|
1128
|
-
},
|
|
1129
|
-
const
|
|
1130
|
-
return (
|
|
1131
|
-
lengthComputable:
|
|
1128
|
+
}, Ee = (e, t) => {
|
|
1129
|
+
const r = e != null;
|
|
1130
|
+
return (n) => setTimeout(() => t({
|
|
1131
|
+
lengthComputable: r,
|
|
1132
1132
|
total: e,
|
|
1133
|
-
loaded:
|
|
1133
|
+
loaded: n
|
|
1134
1134
|
}));
|
|
1135
|
-
},
|
|
1135
|
+
}, Q = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Qe = Q && typeof ReadableStream == "function", se = Q && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Sr = Qe && (() => {
|
|
1136
1136
|
let e = !1;
|
|
1137
1137
|
const t = new Request(A.origin, {
|
|
1138
1138
|
body: new ReadableStream(),
|
|
@@ -1142,121 +1142,121 @@ const We = (e) => {
|
|
|
1142
1142
|
}
|
|
1143
1143
|
}).headers.has("Content-Type");
|
|
1144
1144
|
return e && !t;
|
|
1145
|
-
})(),
|
|
1145
|
+
})(), Re = 64 * 1024, oe = Qe && !!(() => {
|
|
1146
1146
|
try {
|
|
1147
|
-
return
|
|
1147
|
+
return u.isReadableStream(new Response("").body);
|
|
1148
1148
|
} catch {
|
|
1149
1149
|
}
|
|
1150
|
-
})(),
|
|
1151
|
-
stream:
|
|
1150
|
+
})(), V = {
|
|
1151
|
+
stream: oe && ((e) => e.body)
|
|
1152
1152
|
};
|
|
1153
|
-
|
|
1153
|
+
Q && ((e) => {
|
|
1154
1154
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1155
|
-
!
|
|
1156
|
-
throw new
|
|
1155
|
+
!V[t] && (V[t] = u.isFunction(e[t]) ? (r) => r[t]() : (r, n) => {
|
|
1156
|
+
throw new p(`Response type '${t}' is not supported`, p.ERR_NOT_SUPPORT, n);
|
|
1157
1157
|
});
|
|
1158
1158
|
});
|
|
1159
1159
|
})(new Response());
|
|
1160
|
-
const
|
|
1160
|
+
const Er = async (e) => {
|
|
1161
1161
|
if (e == null)
|
|
1162
1162
|
return 0;
|
|
1163
|
-
if (
|
|
1163
|
+
if (u.isBlob(e))
|
|
1164
1164
|
return e.size;
|
|
1165
|
-
if (
|
|
1165
|
+
if (u.isSpecCompliantForm(e))
|
|
1166
1166
|
return (await new Request(e).arrayBuffer()).byteLength;
|
|
1167
|
-
if (
|
|
1167
|
+
if (u.isArrayBufferView(e))
|
|
1168
1168
|
return e.byteLength;
|
|
1169
|
-
if (
|
|
1170
|
-
return (await
|
|
1171
|
-
},
|
|
1172
|
-
const
|
|
1173
|
-
return
|
|
1174
|
-
},
|
|
1169
|
+
if (u.isURLSearchParams(e) && (e = e + ""), u.isString(e))
|
|
1170
|
+
return (await se(e)).byteLength;
|
|
1171
|
+
}, Rr = async (e, t) => {
|
|
1172
|
+
const r = u.toFiniteNumber(e.getContentLength());
|
|
1173
|
+
return r ?? Er(t);
|
|
1174
|
+
}, Or = Q && (async (e) => {
|
|
1175
1175
|
let {
|
|
1176
1176
|
url: t,
|
|
1177
|
-
method:
|
|
1178
|
-
data:
|
|
1177
|
+
method: r,
|
|
1178
|
+
data: n,
|
|
1179
1179
|
signal: s,
|
|
1180
1180
|
cancelToken: o,
|
|
1181
1181
|
timeout: i,
|
|
1182
|
-
onDownloadProgress:
|
|
1183
|
-
onUploadProgress:
|
|
1184
|
-
responseType:
|
|
1182
|
+
onDownloadProgress: c,
|
|
1183
|
+
onUploadProgress: l,
|
|
1184
|
+
responseType: f,
|
|
1185
1185
|
headers: a,
|
|
1186
1186
|
withCredentials: d = "same-origin",
|
|
1187
|
-
fetchOptions:
|
|
1187
|
+
fetchOptions: g
|
|
1188
1188
|
} = We(e);
|
|
1189
|
-
|
|
1190
|
-
let [
|
|
1191
|
-
const
|
|
1192
|
-
!
|
|
1193
|
-
|
|
1194
|
-
}),
|
|
1189
|
+
f = f ? (f + "").toLowerCase() : "text";
|
|
1190
|
+
let [m, h] = s || o || i ? wr([s, o], i) : [], y, T;
|
|
1191
|
+
const S = () => {
|
|
1192
|
+
!y && setTimeout(() => {
|
|
1193
|
+
m && m.unsubscribe();
|
|
1194
|
+
}), y = !0;
|
|
1195
1195
|
};
|
|
1196
1196
|
let N;
|
|
1197
1197
|
try {
|
|
1198
|
-
if (
|
|
1199
|
-
let
|
|
1198
|
+
if (l && Sr && r !== "get" && r !== "head" && (N = await Rr(a, n)) !== 0) {
|
|
1199
|
+
let k = new Request(t, {
|
|
1200
1200
|
method: "POST",
|
|
1201
|
-
body:
|
|
1201
|
+
body: n,
|
|
1202
1202
|
duplex: "half"
|
|
1203
|
-
}),
|
|
1204
|
-
|
|
1203
|
+
}), B;
|
|
1204
|
+
u.isFormData(n) && (B = k.headers.get("content-type")) && a.setContentType(B), k.body && (n = Se(k.body, Re, Ee(
|
|
1205
1205
|
N,
|
|
1206
|
-
|
|
1207
|
-
), null,
|
|
1206
|
+
M(l)
|
|
1207
|
+
), null, se));
|
|
1208
1208
|
}
|
|
1209
|
-
|
|
1210
|
-
...
|
|
1211
|
-
signal:
|
|
1212
|
-
method:
|
|
1209
|
+
u.isString(d) || (d = d ? "cors" : "omit"), T = new Request(t, {
|
|
1210
|
+
...g,
|
|
1211
|
+
signal: m,
|
|
1212
|
+
method: r.toUpperCase(),
|
|
1213
1213
|
headers: a.normalize().toJSON(),
|
|
1214
|
-
body:
|
|
1214
|
+
body: n,
|
|
1215
1215
|
duplex: "half",
|
|
1216
1216
|
withCredentials: d
|
|
1217
1217
|
});
|
|
1218
|
-
let
|
|
1219
|
-
const
|
|
1220
|
-
if (
|
|
1221
|
-
const
|
|
1222
|
-
["status", "statusText", "headers"].forEach((
|
|
1223
|
-
|
|
1218
|
+
let w = await fetch(T);
|
|
1219
|
+
const F = oe && (f === "stream" || f === "response");
|
|
1220
|
+
if (oe && (c || F)) {
|
|
1221
|
+
const k = {};
|
|
1222
|
+
["status", "statusText", "headers"].forEach((he) => {
|
|
1223
|
+
k[he] = w[he];
|
|
1224
1224
|
});
|
|
1225
|
-
const
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
),
|
|
1231
|
-
|
|
1225
|
+
const B = u.toFiniteNumber(w.headers.get("content-length"));
|
|
1226
|
+
w = new Response(
|
|
1227
|
+
Se(w.body, Re, c && Ee(
|
|
1228
|
+
B,
|
|
1229
|
+
M(c, !0)
|
|
1230
|
+
), F && S, se),
|
|
1231
|
+
k
|
|
1232
1232
|
);
|
|
1233
1233
|
}
|
|
1234
|
-
|
|
1235
|
-
let
|
|
1236
|
-
return !
|
|
1237
|
-
|
|
1238
|
-
data:
|
|
1239
|
-
headers: E.from(
|
|
1240
|
-
status:
|
|
1241
|
-
statusText:
|
|
1234
|
+
f = f || "text";
|
|
1235
|
+
let rt = await V[u.findKey(V, f) || "text"](w, e);
|
|
1236
|
+
return !F && S(), h && h(), await new Promise((k, B) => {
|
|
1237
|
+
Ge(k, B, {
|
|
1238
|
+
data: rt,
|
|
1239
|
+
headers: E.from(w.headers),
|
|
1240
|
+
status: w.status,
|
|
1241
|
+
statusText: w.statusText,
|
|
1242
1242
|
config: e,
|
|
1243
|
-
request:
|
|
1243
|
+
request: T
|
|
1244
1244
|
});
|
|
1245
1245
|
});
|
|
1246
|
-
} catch (
|
|
1247
|
-
throw
|
|
1248
|
-
new
|
|
1246
|
+
} catch (w) {
|
|
1247
|
+
throw S(), w && w.name === "TypeError" && /fetch/i.test(w.message) ? Object.assign(
|
|
1248
|
+
new p("Network Error", p.ERR_NETWORK, e, T),
|
|
1249
1249
|
{
|
|
1250
|
-
cause:
|
|
1250
|
+
cause: w.cause || w
|
|
1251
1251
|
}
|
|
1252
|
-
) :
|
|
1252
|
+
) : p.from(w, w && w.code, e, T);
|
|
1253
1253
|
}
|
|
1254
|
-
}),
|
|
1255
|
-
http:
|
|
1256
|
-
xhr:
|
|
1257
|
-
fetch:
|
|
1254
|
+
}), ie = {
|
|
1255
|
+
http: Ht,
|
|
1256
|
+
xhr: gr,
|
|
1257
|
+
fetch: Or
|
|
1258
1258
|
};
|
|
1259
|
-
|
|
1259
|
+
u.forEach(ie, (e, t) => {
|
|
1260
1260
|
if (e) {
|
|
1261
1261
|
try {
|
|
1262
1262
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1265,110 +1265,110 @@ c.forEach(ae, (e, t) => {
|
|
|
1265
1265
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1266
1266
|
}
|
|
1267
1267
|
});
|
|
1268
|
-
const
|
|
1268
|
+
const Oe = (e) => `- ${e}`, Ar = (e) => u.isFunction(e) || e === null || e === !1, Xe = {
|
|
1269
1269
|
getAdapter: (e) => {
|
|
1270
|
-
e =
|
|
1270
|
+
e = u.isArray(e) ? e : [e];
|
|
1271
1271
|
const { length: t } = e;
|
|
1272
|
-
let
|
|
1272
|
+
let r, n;
|
|
1273
1273
|
const s = {};
|
|
1274
1274
|
for (let o = 0; o < t; o++) {
|
|
1275
|
-
|
|
1275
|
+
r = e[o];
|
|
1276
1276
|
let i;
|
|
1277
|
-
if (
|
|
1278
|
-
throw new
|
|
1279
|
-
if (
|
|
1277
|
+
if (n = r, !Ar(r) && (n = ie[(i = String(r)).toLowerCase()], n === void 0))
|
|
1278
|
+
throw new p(`Unknown adapter '${i}'`);
|
|
1279
|
+
if (n)
|
|
1280
1280
|
break;
|
|
1281
|
-
s[i || "#" + o] =
|
|
1281
|
+
s[i || "#" + o] = n;
|
|
1282
1282
|
}
|
|
1283
|
-
if (!
|
|
1283
|
+
if (!n) {
|
|
1284
1284
|
const o = Object.entries(s).map(
|
|
1285
|
-
([
|
|
1285
|
+
([c, l]) => `adapter ${c} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1286
1286
|
);
|
|
1287
1287
|
let i = t ? o.length > 1 ? `since :
|
|
1288
|
-
` + o.map(
|
|
1289
|
-
`) : " " +
|
|
1290
|
-
throw new
|
|
1288
|
+
` + o.map(Oe).join(`
|
|
1289
|
+
`) : " " + Oe(o[0]) : "as no adapter specified";
|
|
1290
|
+
throw new p(
|
|
1291
1291
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1292
1292
|
"ERR_NOT_SUPPORT"
|
|
1293
1293
|
);
|
|
1294
1294
|
}
|
|
1295
|
-
return
|
|
1295
|
+
return n;
|
|
1296
1296
|
},
|
|
1297
|
-
adapters:
|
|
1297
|
+
adapters: ie
|
|
1298
1298
|
};
|
|
1299
|
-
function
|
|
1299
|
+
function ee(e) {
|
|
1300
1300
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1301
|
-
throw new
|
|
1301
|
+
throw new _(null, e);
|
|
1302
1302
|
}
|
|
1303
|
-
function
|
|
1304
|
-
return
|
|
1303
|
+
function Ae(e) {
|
|
1304
|
+
return ee(e), e.headers = E.from(e.headers), e.data = Y.call(
|
|
1305
1305
|
e,
|
|
1306
1306
|
e.transformRequest
|
|
1307
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Xe.getAdapter(e.adapter || j.adapter)(e).then(function(
|
|
1308
|
-
return
|
|
1307
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Xe.getAdapter(e.adapter || j.adapter)(e).then(function(n) {
|
|
1308
|
+
return ee(e), n.data = Y.call(
|
|
1309
1309
|
e,
|
|
1310
1310
|
e.transformResponse,
|
|
1311
|
-
|
|
1312
|
-
),
|
|
1313
|
-
}, function(
|
|
1314
|
-
return
|
|
1311
|
+
n
|
|
1312
|
+
), n.headers = E.from(n.headers), n;
|
|
1313
|
+
}, function(n) {
|
|
1314
|
+
return ve(n) || (ee(e), n && n.response && (n.response.data = Y.call(
|
|
1315
1315
|
e,
|
|
1316
1316
|
e.transformResponse,
|
|
1317
|
-
|
|
1318
|
-
),
|
|
1317
|
+
n.response
|
|
1318
|
+
), n.response.headers = E.from(n.response.headers))), Promise.reject(n);
|
|
1319
1319
|
});
|
|
1320
1320
|
}
|
|
1321
|
-
const Ze = "1.7.2",
|
|
1321
|
+
const Ze = "1.7.2", de = {};
|
|
1322
1322
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1323
|
-
|
|
1324
|
-
return typeof
|
|
1323
|
+
de[e] = function(n) {
|
|
1324
|
+
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1325
1325
|
};
|
|
1326
1326
|
});
|
|
1327
|
-
const
|
|
1328
|
-
|
|
1327
|
+
const Pe = {};
|
|
1328
|
+
de.transitional = function(t, r, n) {
|
|
1329
1329
|
function s(o, i) {
|
|
1330
|
-
return "[Axios v" + Ze + "] Transitional option '" + o + "'" + i + (
|
|
1330
|
+
return "[Axios v" + Ze + "] Transitional option '" + o + "'" + i + (n ? ". " + n : "");
|
|
1331
1331
|
}
|
|
1332
|
-
return (o, i,
|
|
1332
|
+
return (o, i, c) => {
|
|
1333
1333
|
if (t === !1)
|
|
1334
|
-
throw new
|
|
1335
|
-
s(i, " has been removed" + (
|
|
1336
|
-
|
|
1334
|
+
throw new p(
|
|
1335
|
+
s(i, " has been removed" + (r ? " in " + r : "")),
|
|
1336
|
+
p.ERR_DEPRECATED
|
|
1337
1337
|
);
|
|
1338
|
-
return
|
|
1338
|
+
return r && !Pe[i] && (Pe[i] = !0, console.warn(
|
|
1339
1339
|
s(
|
|
1340
1340
|
i,
|
|
1341
|
-
" has been deprecated since v" +
|
|
1341
|
+
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
1342
1342
|
)
|
|
1343
|
-
)), t ? t(o, i,
|
|
1343
|
+
)), t ? t(o, i, c) : !0;
|
|
1344
1344
|
};
|
|
1345
1345
|
};
|
|
1346
|
-
function
|
|
1346
|
+
function Pr(e, t, r) {
|
|
1347
1347
|
if (typeof e != "object")
|
|
1348
|
-
throw new
|
|
1349
|
-
const
|
|
1350
|
-
let s =
|
|
1348
|
+
throw new p("options must be an object", p.ERR_BAD_OPTION_VALUE);
|
|
1349
|
+
const n = Object.keys(e);
|
|
1350
|
+
let s = n.length;
|
|
1351
1351
|
for (; s-- > 0; ) {
|
|
1352
|
-
const o =
|
|
1352
|
+
const o = n[s], i = t[o];
|
|
1353
1353
|
if (i) {
|
|
1354
|
-
const
|
|
1355
|
-
if (
|
|
1356
|
-
throw new
|
|
1354
|
+
const c = e[o], l = c === void 0 || i(c, o, e);
|
|
1355
|
+
if (l !== !0)
|
|
1356
|
+
throw new p("option " + o + " must be " + l, p.ERR_BAD_OPTION_VALUE);
|
|
1357
1357
|
continue;
|
|
1358
1358
|
}
|
|
1359
|
-
if (
|
|
1360
|
-
throw new
|
|
1359
|
+
if (r !== !0)
|
|
1360
|
+
throw new p("Unknown option " + o, p.ERR_BAD_OPTION);
|
|
1361
1361
|
}
|
|
1362
1362
|
}
|
|
1363
|
-
const
|
|
1364
|
-
assertOptions:
|
|
1365
|
-
validators:
|
|
1366
|
-
},
|
|
1367
|
-
let
|
|
1363
|
+
const ae = {
|
|
1364
|
+
assertOptions: Pr,
|
|
1365
|
+
validators: de
|
|
1366
|
+
}, C = ae.validators;
|
|
1367
|
+
let U = class {
|
|
1368
1368
|
constructor(t) {
|
|
1369
1369
|
this.defaults = t, this.interceptors = {
|
|
1370
|
-
request: new
|
|
1371
|
-
response: new
|
|
1370
|
+
request: new we(),
|
|
1371
|
+
response: new we()
|
|
1372
1372
|
};
|
|
1373
1373
|
}
|
|
1374
1374
|
/**
|
|
@@ -1379,103 +1379,103 @@ let B = class {
|
|
|
1379
1379
|
*
|
|
1380
1380
|
* @returns {Promise} The Promise to be fulfilled
|
|
1381
1381
|
*/
|
|
1382
|
-
async request(t,
|
|
1382
|
+
async request(t, r) {
|
|
1383
1383
|
try {
|
|
1384
|
-
return await this._request(t,
|
|
1385
|
-
} catch (
|
|
1386
|
-
if (
|
|
1384
|
+
return await this._request(t, r);
|
|
1385
|
+
} catch (n) {
|
|
1386
|
+
if (n instanceof Error) {
|
|
1387
1387
|
let s;
|
|
1388
1388
|
Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error();
|
|
1389
1389
|
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1390
1390
|
try {
|
|
1391
|
-
|
|
1392
|
-
` + o) :
|
|
1391
|
+
n.stack ? o && !String(n.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (n.stack += `
|
|
1392
|
+
` + o) : n.stack = o;
|
|
1393
1393
|
} catch {
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
1396
|
-
throw
|
|
1396
|
+
throw n;
|
|
1397
1397
|
}
|
|
1398
1398
|
}
|
|
1399
|
-
_request(t,
|
|
1400
|
-
typeof t == "string" ? (
|
|
1401
|
-
const { transitional:
|
|
1402
|
-
|
|
1403
|
-
silentJSONParsing:
|
|
1404
|
-
forcedJSONParsing:
|
|
1405
|
-
clarifyTimeoutError:
|
|
1406
|
-
}, !1), s != null && (
|
|
1399
|
+
_request(t, r) {
|
|
1400
|
+
typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = q(this.defaults, r);
|
|
1401
|
+
const { transitional: n, paramsSerializer: s, headers: o } = r;
|
|
1402
|
+
n !== void 0 && ae.assertOptions(n, {
|
|
1403
|
+
silentJSONParsing: C.transitional(C.boolean),
|
|
1404
|
+
forcedJSONParsing: C.transitional(C.boolean),
|
|
1405
|
+
clarifyTimeoutError: C.transitional(C.boolean)
|
|
1406
|
+
}, !1), s != null && (u.isFunction(s) ? r.paramsSerializer = {
|
|
1407
1407
|
serialize: s
|
|
1408
|
-
} :
|
|
1409
|
-
encode:
|
|
1410
|
-
serialize:
|
|
1411
|
-
}, !0)),
|
|
1412
|
-
let i = o &&
|
|
1408
|
+
} : ae.assertOptions(s, {
|
|
1409
|
+
encode: C.function,
|
|
1410
|
+
serialize: C.function
|
|
1411
|
+
}, !0)), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
1412
|
+
let i = o && u.merge(
|
|
1413
1413
|
o.common,
|
|
1414
|
-
o[
|
|
1414
|
+
o[r.method]
|
|
1415
1415
|
);
|
|
1416
|
-
o &&
|
|
1416
|
+
o && u.forEach(
|
|
1417
1417
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1418
1418
|
(h) => {
|
|
1419
1419
|
delete o[h];
|
|
1420
1420
|
}
|
|
1421
|
-
),
|
|
1422
|
-
const
|
|
1423
|
-
let
|
|
1424
|
-
this.interceptors.request.forEach(function(
|
|
1425
|
-
typeof
|
|
1421
|
+
), r.headers = E.concat(i, o);
|
|
1422
|
+
const c = [];
|
|
1423
|
+
let l = !0;
|
|
1424
|
+
this.interceptors.request.forEach(function(y) {
|
|
1425
|
+
typeof y.runWhen == "function" && y.runWhen(r) === !1 || (l = l && y.synchronous, c.unshift(y.fulfilled, y.rejected));
|
|
1426
1426
|
});
|
|
1427
|
-
const
|
|
1428
|
-
this.interceptors.response.forEach(function(
|
|
1429
|
-
|
|
1427
|
+
const f = [];
|
|
1428
|
+
this.interceptors.response.forEach(function(y) {
|
|
1429
|
+
f.push(y.fulfilled, y.rejected);
|
|
1430
1430
|
});
|
|
1431
|
-
let a, d = 0,
|
|
1432
|
-
if (!
|
|
1433
|
-
const h = [
|
|
1434
|
-
for (h.unshift.apply(h,
|
|
1431
|
+
let a, d = 0, g;
|
|
1432
|
+
if (!l) {
|
|
1433
|
+
const h = [Ae.bind(this), void 0];
|
|
1434
|
+
for (h.unshift.apply(h, c), h.push.apply(h, f), g = h.length, a = Promise.resolve(r); d < g; )
|
|
1435
1435
|
a = a.then(h[d++], h[d++]);
|
|
1436
1436
|
return a;
|
|
1437
1437
|
}
|
|
1438
|
-
|
|
1439
|
-
let
|
|
1440
|
-
for (d = 0; d <
|
|
1441
|
-
const h =
|
|
1438
|
+
g = c.length;
|
|
1439
|
+
let m = r;
|
|
1440
|
+
for (d = 0; d < g; ) {
|
|
1441
|
+
const h = c[d++], y = c[d++];
|
|
1442
1442
|
try {
|
|
1443
|
-
|
|
1444
|
-
} catch (
|
|
1445
|
-
|
|
1443
|
+
m = h(m);
|
|
1444
|
+
} catch (T) {
|
|
1445
|
+
y.call(this, T);
|
|
1446
1446
|
break;
|
|
1447
1447
|
}
|
|
1448
1448
|
}
|
|
1449
1449
|
try {
|
|
1450
|
-
a =
|
|
1450
|
+
a = Ae.call(this, m);
|
|
1451
1451
|
} catch (h) {
|
|
1452
1452
|
return Promise.reject(h);
|
|
1453
1453
|
}
|
|
1454
|
-
for (d = 0,
|
|
1455
|
-
a = a.then(
|
|
1454
|
+
for (d = 0, g = f.length; d < g; )
|
|
1455
|
+
a = a.then(f[d++], f[d++]);
|
|
1456
1456
|
return a;
|
|
1457
1457
|
}
|
|
1458
1458
|
getUri(t) {
|
|
1459
|
-
t =
|
|
1460
|
-
const
|
|
1461
|
-
return
|
|
1459
|
+
t = q(this.defaults, t);
|
|
1460
|
+
const r = Ke(t.baseURL, t.url);
|
|
1461
|
+
return ze(r, t.params, t.paramsSerializer);
|
|
1462
1462
|
}
|
|
1463
1463
|
};
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
return this.request(
|
|
1464
|
+
u.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1465
|
+
U.prototype[t] = function(r, n) {
|
|
1466
|
+
return this.request(q(n || {}, {
|
|
1467
1467
|
method: t,
|
|
1468
|
-
url:
|
|
1469
|
-
data: (
|
|
1468
|
+
url: r,
|
|
1469
|
+
data: (n || {}).data
|
|
1470
1470
|
}));
|
|
1471
1471
|
};
|
|
1472
1472
|
});
|
|
1473
|
-
|
|
1474
|
-
function n
|
|
1475
|
-
return function(o, i,
|
|
1476
|
-
return this.request(
|
|
1473
|
+
u.forEach(["post", "put", "patch"], function(t) {
|
|
1474
|
+
function r(n) {
|
|
1475
|
+
return function(o, i, c) {
|
|
1476
|
+
return this.request(q(c || {}, {
|
|
1477
1477
|
method: t,
|
|
1478
|
-
headers:
|
|
1478
|
+
headers: n ? {
|
|
1479
1479
|
"Content-Type": "multipart/form-data"
|
|
1480
1480
|
} : {},
|
|
1481
1481
|
url: o,
|
|
@@ -1483,34 +1483,34 @@ c.forEach(["post", "put", "patch"], function(t) {
|
|
|
1483
1483
|
}));
|
|
1484
1484
|
};
|
|
1485
1485
|
}
|
|
1486
|
-
|
|
1486
|
+
U.prototype[t] = r(), U.prototype[t + "Form"] = r(!0);
|
|
1487
1487
|
});
|
|
1488
|
-
let
|
|
1488
|
+
let Nr = class Ye {
|
|
1489
1489
|
constructor(t) {
|
|
1490
1490
|
if (typeof t != "function")
|
|
1491
1491
|
throw new TypeError("executor must be a function.");
|
|
1492
|
-
let
|
|
1492
|
+
let r;
|
|
1493
1493
|
this.promise = new Promise(function(o) {
|
|
1494
|
-
|
|
1494
|
+
r = o;
|
|
1495
1495
|
});
|
|
1496
|
-
const
|
|
1496
|
+
const n = this;
|
|
1497
1497
|
this.promise.then((s) => {
|
|
1498
|
-
if (!
|
|
1498
|
+
if (!n._listeners)
|
|
1499
1499
|
return;
|
|
1500
|
-
let o =
|
|
1500
|
+
let o = n._listeners.length;
|
|
1501
1501
|
for (; o-- > 0; )
|
|
1502
|
-
|
|
1503
|
-
|
|
1502
|
+
n._listeners[o](s);
|
|
1503
|
+
n._listeners = null;
|
|
1504
1504
|
}), this.promise.then = (s) => {
|
|
1505
1505
|
let o;
|
|
1506
|
-
const i = new Promise((
|
|
1507
|
-
|
|
1506
|
+
const i = new Promise((c) => {
|
|
1507
|
+
n.subscribe(c), o = c;
|
|
1508
1508
|
}).then(s);
|
|
1509
1509
|
return i.cancel = function() {
|
|
1510
|
-
|
|
1510
|
+
n.unsubscribe(o);
|
|
1511
1511
|
}, i;
|
|
1512
|
-
}, t(function(o, i,
|
|
1513
|
-
|
|
1512
|
+
}, t(function(o, i, c) {
|
|
1513
|
+
n.reason || (n.reason = new _(o, i, c), r(n.reason));
|
|
1514
1514
|
});
|
|
1515
1515
|
}
|
|
1516
1516
|
/**
|
|
@@ -1536,8 +1536,8 @@ let Nn = class Ye {
|
|
|
1536
1536
|
unsubscribe(t) {
|
|
1537
1537
|
if (!this._listeners)
|
|
1538
1538
|
return;
|
|
1539
|
-
const
|
|
1540
|
-
|
|
1539
|
+
const r = this._listeners.indexOf(t);
|
|
1540
|
+
r !== -1 && this._listeners.splice(r, 1);
|
|
1541
1541
|
}
|
|
1542
1542
|
/**
|
|
1543
1543
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
@@ -1553,15 +1553,15 @@ let Nn = class Ye {
|
|
|
1553
1553
|
};
|
|
1554
1554
|
}
|
|
1555
1555
|
};
|
|
1556
|
-
function
|
|
1557
|
-
return function(
|
|
1558
|
-
return e.apply(null,
|
|
1556
|
+
function kr(e) {
|
|
1557
|
+
return function(r) {
|
|
1558
|
+
return e.apply(null, r);
|
|
1559
1559
|
};
|
|
1560
1560
|
}
|
|
1561
|
-
function
|
|
1562
|
-
return
|
|
1561
|
+
function Cr(e) {
|
|
1562
|
+
return u.isObject(e) && e.isAxiosError === !0;
|
|
1563
1563
|
}
|
|
1564
|
-
const
|
|
1564
|
+
const ce = {
|
|
1565
1565
|
Continue: 100,
|
|
1566
1566
|
SwitchingProtocols: 101,
|
|
1567
1567
|
Processing: 102,
|
|
@@ -1626,116 +1626,151 @@ const ue = {
|
|
|
1626
1626
|
NotExtended: 510,
|
|
1627
1627
|
NetworkAuthenticationRequired: 511
|
|
1628
1628
|
};
|
|
1629
|
-
Object.entries(
|
|
1630
|
-
|
|
1629
|
+
Object.entries(ce).forEach(([e, t]) => {
|
|
1630
|
+
ce[t] = e;
|
|
1631
1631
|
});
|
|
1632
1632
|
function et(e) {
|
|
1633
|
-
const t = new
|
|
1634
|
-
return
|
|
1635
|
-
return et(
|
|
1636
|
-
},
|
|
1633
|
+
const t = new U(e), r = Ue(U.prototype.request, t);
|
|
1634
|
+
return u.extend(r, U.prototype, t, { allOwnKeys: !0 }), u.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {
|
|
1635
|
+
return et(q(e, s));
|
|
1636
|
+
}, r;
|
|
1637
1637
|
}
|
|
1638
|
-
const
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1638
|
+
const b = et(j);
|
|
1639
|
+
b.Axios = U;
|
|
1640
|
+
b.CanceledError = _;
|
|
1641
|
+
b.CancelToken = Nr;
|
|
1642
|
+
b.isCancel = ve;
|
|
1643
|
+
b.VERSION = Ze;
|
|
1644
|
+
b.toFormData = W;
|
|
1645
|
+
b.AxiosError = p;
|
|
1646
|
+
b.Cancel = b.CanceledError;
|
|
1647
|
+
b.all = function(t) {
|
|
1648
1648
|
return Promise.all(t);
|
|
1649
1649
|
};
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1650
|
+
b.spread = kr;
|
|
1651
|
+
b.isAxiosError = Cr;
|
|
1652
|
+
b.mergeConfig = q;
|
|
1653
|
+
b.AxiosHeaders = E;
|
|
1654
|
+
b.formToJSON = (e) => Ve(u.isHTMLForm(e) ? new FormData(e) : e);
|
|
1655
|
+
b.getAdapter = Xe.getAdapter;
|
|
1656
|
+
b.HttpStatusCode = ce;
|
|
1657
|
+
b.default = b;
|
|
1658
1658
|
const {
|
|
1659
|
-
Axios:
|
|
1660
|
-
AxiosError:
|
|
1661
|
-
CanceledError:
|
|
1662
|
-
isCancel:
|
|
1663
|
-
CancelToken:
|
|
1664
|
-
VERSION:
|
|
1665
|
-
all:
|
|
1666
|
-
Cancel:
|
|
1667
|
-
isAxiosError:
|
|
1668
|
-
spread:
|
|
1669
|
-
toFormData:
|
|
1670
|
-
AxiosHeaders:
|
|
1671
|
-
HttpStatusCode:
|
|
1672
|
-
formToJSON:
|
|
1673
|
-
getAdapter:
|
|
1674
|
-
mergeConfig:
|
|
1675
|
-
} =
|
|
1659
|
+
Axios: rn,
|
|
1660
|
+
AxiosError: xr,
|
|
1661
|
+
CanceledError: nn,
|
|
1662
|
+
isCancel: sn,
|
|
1663
|
+
CancelToken: on,
|
|
1664
|
+
VERSION: an,
|
|
1665
|
+
all: cn,
|
|
1666
|
+
Cancel: un,
|
|
1667
|
+
isAxiosError: ln,
|
|
1668
|
+
spread: fn,
|
|
1669
|
+
toFormData: dn,
|
|
1670
|
+
AxiosHeaders: Ne,
|
|
1671
|
+
HttpStatusCode: hn,
|
|
1672
|
+
formToJSON: pn,
|
|
1673
|
+
getAdapter: mn,
|
|
1674
|
+
mergeConfig: yn
|
|
1675
|
+
} = b, ke = "auth", tt = async (e, t, r) => {
|
|
1676
|
+
const n = {
|
|
1677
|
+
client_id: e.clientId,
|
|
1678
|
+
client_secret: e.clientSecret
|
|
1679
|
+
}, s = await r.post(
|
|
1680
|
+
`${e.url}/security/connect/token/refresh`,
|
|
1681
|
+
n,
|
|
1682
|
+
{ withCredentials: !0, headers: t || {} }
|
|
1683
|
+
), o = {
|
|
1684
|
+
...s.data,
|
|
1685
|
+
accessToken: s.data.access_token
|
|
1686
|
+
};
|
|
1687
|
+
return "access_token" in o && delete o.access_token, s.status === 200 && o.accessToken && localStorage.setItem("accessToken", o.accessToken), o;
|
|
1688
|
+
}, Ur = (e) => {
|
|
1689
|
+
const t = O(e), r = e.digitalRefresh, n = async (c) => {
|
|
1690
|
+
var f;
|
|
1691
|
+
const l = await t.request(`/${ke}/login`, {
|
|
1692
|
+
method: "POST",
|
|
1693
|
+
data: JSON.stringify(c)
|
|
1694
|
+
});
|
|
1695
|
+
return l.status === 200 && ((f = l.data) != null && f.accessToken) && localStorage.setItem("accessToken", l.data.accessToken), l;
|
|
1696
|
+
}, s = async (c) => await t.request(`/${ke}?code=${c}`, {
|
|
1697
|
+
method: "GET",
|
|
1698
|
+
data: ""
|
|
1699
|
+
}), o = async () => {
|
|
1700
|
+
try {
|
|
1701
|
+
await t.request("/security/api/authorization/logout", {
|
|
1702
|
+
method: "POST",
|
|
1703
|
+
data: "",
|
|
1704
|
+
withCredentials: !0
|
|
1705
|
+
});
|
|
1706
|
+
} catch (c) {
|
|
1707
|
+
console.error("Error during logout:", c);
|
|
1708
|
+
} finally {
|
|
1709
|
+
t.clearTokens();
|
|
1710
|
+
const c = e.refreshLogoutUrl ?? "";
|
|
1711
|
+
c && (globalThis.location.href = `${c}?logout`);
|
|
1712
|
+
}
|
|
1713
|
+
}, i = t.axiosClient;
|
|
1714
|
+
return {
|
|
1715
|
+
postLogin: n,
|
|
1716
|
+
getToken: s,
|
|
1717
|
+
postToken: r ? () => tt(r, e.headers, i) : void 0,
|
|
1718
|
+
postLogout: o
|
|
1719
|
+
};
|
|
1720
|
+
}, Ce = () => new xr(
|
|
1676
1721
|
"Unauthorized",
|
|
1677
1722
|
"ERR_UNAUTHORIZED",
|
|
1678
|
-
{ headers: new
|
|
1723
|
+
{ headers: new Ne() },
|
|
1679
1724
|
null,
|
|
1680
1725
|
{
|
|
1681
1726
|
status: 401,
|
|
1682
1727
|
data: null,
|
|
1683
1728
|
statusText: "UNAUTHORIZED",
|
|
1684
1729
|
headers: {},
|
|
1685
|
-
config: { headers: new
|
|
1730
|
+
config: { headers: new Ne() }
|
|
1686
1731
|
}
|
|
1687
|
-
),
|
|
1732
|
+
), qr = (e) => {
|
|
1688
1733
|
let t = !1;
|
|
1689
|
-
const
|
|
1690
|
-
|
|
1734
|
+
const r = [], n = () => localStorage.getItem("accessToken"), s = () => localStorage.getItem("refreshToken"), o = (a) => {
|
|
1735
|
+
const d = a.accessToken, g = a.refreshToken;
|
|
1736
|
+
d && localStorage.setItem("accessToken", d), g && localStorage.setItem("refreshToken", g);
|
|
1691
1737
|
}, i = () => {
|
|
1692
1738
|
localStorage.removeItem("accessToken"), localStorage.removeItem("refreshToken");
|
|
1693
|
-
},
|
|
1694
|
-
|
|
1695
|
-
|
|
1739
|
+
}, c = (a, d = null) => {
|
|
1740
|
+
var g;
|
|
1741
|
+
for (const m of r)
|
|
1696
1742
|
a ? m.reject(a) : ((g = m.requestConfig).headers ?? (g.headers = {}), m.requestConfig.headers.Authorization = `Bearer ${d}`, m.resolve(m.requestConfig));
|
|
1697
|
-
|
|
1743
|
+
r.length = 0;
|
|
1698
1744
|
};
|
|
1699
1745
|
return {
|
|
1700
|
-
getAccessToken:
|
|
1746
|
+
getAccessToken: n,
|
|
1701
1747
|
setTokens: o,
|
|
1702
1748
|
clearTokens: i,
|
|
1703
1749
|
handleTokenRefresh: async (a) => {
|
|
1704
|
-
var
|
|
1705
|
-
if ((
|
|
1750
|
+
var d;
|
|
1751
|
+
if (e.refreshTokenEndpointPath && ((d = a.url) == null ? void 0 : d.includes(
|
|
1706
1752
|
e.refreshTokenEndpointPath
|
|
1707
|
-
)) {
|
|
1753
|
+
))) {
|
|
1708
1754
|
i();
|
|
1709
|
-
const
|
|
1710
|
-
throw
|
|
1711
|
-
}
|
|
1712
|
-
if (!r()) {
|
|
1713
|
-
i();
|
|
1714
|
-
const p = H();
|
|
1715
|
-
throw u(p), p;
|
|
1755
|
+
const m = Ce();
|
|
1756
|
+
throw c(m), e.refreshLogoutUrl && (globalThis.location.href = `${e.refreshLogoutUrl}?logout`), m;
|
|
1716
1757
|
}
|
|
1717
1758
|
if (t)
|
|
1718
|
-
return new Promise((
|
|
1719
|
-
|
|
1720
|
-
resolve:
|
|
1721
|
-
reject:
|
|
1759
|
+
return new Promise((g, m) => {
|
|
1760
|
+
r.push({
|
|
1761
|
+
resolve: g,
|
|
1762
|
+
reject: m,
|
|
1722
1763
|
requestConfig: a
|
|
1723
1764
|
});
|
|
1724
1765
|
});
|
|
1725
|
-
const g = s();
|
|
1726
|
-
if (!g) {
|
|
1727
|
-
i();
|
|
1728
|
-
const p = H();
|
|
1729
|
-
throw u(p), p;
|
|
1730
|
-
}
|
|
1731
1766
|
t = !0;
|
|
1732
1767
|
try {
|
|
1733
|
-
const
|
|
1734
|
-
return o(
|
|
1768
|
+
const g = s(), m = await e.onRefreshToken(g);
|
|
1769
|
+
return o(m), a.headers ?? (a.headers = {}), a.headers.Authorization = `Bearer ${m.accessToken}`, c(null, m.accessToken), t = !1, a;
|
|
1735
1770
|
} catch {
|
|
1736
1771
|
i();
|
|
1737
|
-
const
|
|
1738
|
-
throw
|
|
1772
|
+
const g = Ce();
|
|
1773
|
+
throw c(g), t = !1, g;
|
|
1739
1774
|
}
|
|
1740
1775
|
},
|
|
1741
1776
|
isAuthError: (a) => {
|
|
@@ -1743,113 +1778,146 @@ const {
|
|
|
1743
1778
|
return ((d = a == null ? void 0 : a.response) == null ? void 0 : d.status) === 401;
|
|
1744
1779
|
}
|
|
1745
1780
|
};
|
|
1746
|
-
},
|
|
1747
|
-
const t =
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1781
|
+
}, Br = (e) => {
|
|
1782
|
+
const t = (n) => n ? n.toString().replace(/(^\/{1,2})|(\/{1,2}$)/g, "") : null;
|
|
1783
|
+
return [
|
|
1784
|
+
t(e.baseUrl),
|
|
1785
|
+
t(e.productCode),
|
|
1786
|
+
t(e.apiVersion),
|
|
1787
|
+
t(e.endpoint)
|
|
1788
|
+
].filter(Boolean).join("/");
|
|
1789
|
+
}, Lr = (e, t, r, n, s) => {
|
|
1790
|
+
var f;
|
|
1791
|
+
if (!t)
|
|
1792
|
+
return null;
|
|
1793
|
+
const o = !!e.digitalRefresh, i = e.refreshTokenApiVersion ?? s, c = e.refreshTokenEndpointPath ?? (o ? "/security/connect/token/refresh" : "/refresh-token"), l = `${n}/auth/${i}${c}`;
|
|
1794
|
+
return qr({
|
|
1795
|
+
baseUrl: e.baseUrl,
|
|
1796
|
+
refreshTokenEndpointPath: c,
|
|
1797
|
+
digitalRefreshUrl: (f = e.digitalRefresh) == null ? void 0 : f.url,
|
|
1798
|
+
refreshLogoutUrl: e.refreshLogoutUrl ?? void 0,
|
|
1799
|
+
onRefreshToken: async (a) => o ? await tt(
|
|
1800
|
+
e.digitalRefresh,
|
|
1801
|
+
e.headers,
|
|
1802
|
+
r
|
|
1803
|
+
) : (await r.post(l, {
|
|
1804
|
+
refreshToken: a
|
|
1753
1805
|
})).data
|
|
1754
1806
|
});
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
} catch (g) {
|
|
1766
|
-
return Promise.reject(g);
|
|
1767
|
-
}
|
|
1807
|
+
}, _r = (e, t) => {
|
|
1808
|
+
e.interceptors.response.use(
|
|
1809
|
+
(r) => r,
|
|
1810
|
+
async (r) => {
|
|
1811
|
+
const n = r.config;
|
|
1812
|
+
if (!t.isAuthError(r) || n._retry)
|
|
1813
|
+
throw r;
|
|
1814
|
+
n._retry = !0;
|
|
1815
|
+
const s = await t.handleTokenRefresh(n);
|
|
1816
|
+
return e.request(s);
|
|
1768
1817
|
}
|
|
1769
|
-
)
|
|
1818
|
+
);
|
|
1819
|
+
}, Fr = (e, t, r, n, s) => {
|
|
1820
|
+
const o = {
|
|
1821
|
+
"Content-Type": (e == null ? void 0 : e.contentType) ?? "application/json",
|
|
1822
|
+
apiVersion: t ?? "",
|
|
1823
|
+
Authorization: "",
|
|
1824
|
+
...r,
|
|
1825
|
+
...e == null ? void 0 : e.headers
|
|
1826
|
+
};
|
|
1827
|
+
if (s && n) {
|
|
1828
|
+
const i = n.getAccessToken();
|
|
1829
|
+
i && (o.Authorization = `Bearer ${i}`);
|
|
1830
|
+
}
|
|
1831
|
+
return o;
|
|
1832
|
+
}, Dr = (e, t, r) => {
|
|
1833
|
+
const n = {
|
|
1834
|
+
method: (e == null ? void 0 : e.method) ?? "GET",
|
|
1835
|
+
headers: t,
|
|
1836
|
+
url: r,
|
|
1837
|
+
data: (e == null ? void 0 : e.data) ?? {},
|
|
1838
|
+
responseType: e == null ? void 0 : e.responseType
|
|
1839
|
+
};
|
|
1840
|
+
return (e == null ? void 0 : e.withCredentials) !== void 0 && (n.withCredentials = e.withCredentials), n;
|
|
1841
|
+
}, $r = (e, t) => ({
|
|
1842
|
+
getAccessToken: e && t ? t.getAccessToken : () => null,
|
|
1843
|
+
setTokens: e && t ? t.setTokens : () => {
|
|
1844
|
+
},
|
|
1845
|
+
clearTokens: e && t ? t.clearTokens : () => {
|
|
1846
|
+
}
|
|
1847
|
+
}), O = (e) => {
|
|
1848
|
+
const t = b.create(), r = e.apiVersion, n = e.productCode, o = e.baseUrl.replace(/\/$/, ""), i = e.hasTokenManager !== !1, c = Lr(
|
|
1849
|
+
e,
|
|
1850
|
+
i,
|
|
1851
|
+
t,
|
|
1852
|
+
o,
|
|
1853
|
+
r
|
|
1854
|
+
);
|
|
1855
|
+
i && c && _r(t, c), e.responseInterceptor && t.interceptors.response.use(
|
|
1770
1856
|
e.responseInterceptor.onFulfilled,
|
|
1771
1857
|
e.responseInterceptor.onReject
|
|
1772
|
-
)
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
setTokens: l.setTokens,
|
|
1793
|
-
clearTokens: l.clearTokens
|
|
1858
|
+
);
|
|
1859
|
+
const l = async (a, d) => {
|
|
1860
|
+
const g = a.startsWith("/") ? a.substring(1) : a, m = Br({
|
|
1861
|
+
baseUrl: o,
|
|
1862
|
+
productCode: n,
|
|
1863
|
+
apiVersion: r,
|
|
1864
|
+
endpoint: g
|
|
1865
|
+
}), h = Fr(
|
|
1866
|
+
d,
|
|
1867
|
+
r,
|
|
1868
|
+
e.headers,
|
|
1869
|
+
c,
|
|
1870
|
+
i
|
|
1871
|
+
), y = Dr(d, h, m);
|
|
1872
|
+
return await t.request(y);
|
|
1873
|
+
}, f = $r(i, c);
|
|
1874
|
+
return {
|
|
1875
|
+
request: l,
|
|
1876
|
+
...f,
|
|
1877
|
+
axiosClient: t
|
|
1794
1878
|
};
|
|
1795
|
-
},
|
|
1796
|
-
function
|
|
1879
|
+
}, Ir = "cep";
|
|
1880
|
+
function jr(e) {
|
|
1797
1881
|
const t = O(e);
|
|
1798
|
-
function n
|
|
1799
|
-
return t.request(`/${
|
|
1882
|
+
function r(n) {
|
|
1883
|
+
return t.request(`/${Ir}`, {
|
|
1800
1884
|
method: "POST",
|
|
1801
|
-
data: JSON.stringify(
|
|
1885
|
+
data: JSON.stringify(n)
|
|
1802
1886
|
});
|
|
1803
1887
|
}
|
|
1804
1888
|
return {
|
|
1805
|
-
getAddress:
|
|
1889
|
+
getAddress: r
|
|
1806
1890
|
};
|
|
1807
1891
|
}
|
|
1808
|
-
const
|
|
1809
|
-
const t = O(e);
|
|
1810
|
-
return {
|
|
1811
|
-
postLogin: async (s) => {
|
|
1812
|
-
var i;
|
|
1813
|
-
const o = await t.request(`/${ke}/login`, {
|
|
1814
|
-
method: "POST",
|
|
1815
|
-
data: JSON.stringify(s)
|
|
1816
|
-
});
|
|
1817
|
-
return o.status === 200 && ((i = o.data) != null && i.accessToken) && localStorage.setItem("accessToken", o.data.accessToken), o;
|
|
1818
|
-
},
|
|
1819
|
-
getToken: async (s) => await t.request(`/${ke}?code=${s}`, {
|
|
1820
|
-
method: "GET",
|
|
1821
|
-
data: ""
|
|
1822
|
-
})
|
|
1823
|
-
};
|
|
1824
|
-
}, Ln = (e) => {
|
|
1892
|
+
const Hr = (e) => {
|
|
1825
1893
|
const t = O(e);
|
|
1826
1894
|
return {
|
|
1827
|
-
signUp: async (
|
|
1895
|
+
signUp: async (c) => await t.request("/sign-up", {
|
|
1828
1896
|
method: "POST",
|
|
1829
|
-
data: JSON.stringify(
|
|
1897
|
+
data: JSON.stringify(c)
|
|
1830
1898
|
}),
|
|
1831
|
-
signIn: async (
|
|
1832
|
-
var
|
|
1833
|
-
const
|
|
1899
|
+
signIn: async (c) => {
|
|
1900
|
+
var f, a;
|
|
1901
|
+
const l = await t.request("/sign-in", {
|
|
1834
1902
|
method: "POST",
|
|
1835
|
-
data: JSON.stringify(
|
|
1903
|
+
data: JSON.stringify(c)
|
|
1836
1904
|
});
|
|
1837
|
-
return
|
|
1905
|
+
return l.status === 200 && ((f = l.data) != null && f.accessToken) && ((a = l.data) != null && a.refreshToken) && t.setTokens(l.data), l;
|
|
1838
1906
|
},
|
|
1839
1907
|
getProfile: async () => await t.request("/me", {
|
|
1840
1908
|
method: "GET",
|
|
1841
1909
|
data: ""
|
|
1842
1910
|
}),
|
|
1843
|
-
recoverPassword: async (
|
|
1911
|
+
recoverPassword: async (c) => await t.request("/recovery", {
|
|
1844
1912
|
method: "POST",
|
|
1845
|
-
data: JSON.stringify(
|
|
1913
|
+
data: JSON.stringify(c)
|
|
1846
1914
|
}),
|
|
1847
|
-
updatePassword: async (
|
|
1915
|
+
updatePassword: async (c) => await t.request("/update-password", {
|
|
1848
1916
|
method: "POST",
|
|
1849
|
-
data: JSON.stringify(
|
|
1917
|
+
data: JSON.stringify(c)
|
|
1850
1918
|
})
|
|
1851
1919
|
};
|
|
1852
|
-
}, xe = "digital",
|
|
1920
|
+
}, xe = "digital", Jr = (e) => {
|
|
1853
1921
|
const t = O(e);
|
|
1854
1922
|
return {
|
|
1855
1923
|
getBroker: () => t.request(`/${xe}/getBroker`, {
|
|
@@ -1864,86 +1932,86 @@ const ke = "auth", Fn = (e) => {
|
|
|
1864
1932
|
}
|
|
1865
1933
|
)
|
|
1866
1934
|
};
|
|
1867
|
-
},
|
|
1935
|
+
}, zr = "data", Mr = (e) => {
|
|
1868
1936
|
const t = O(e);
|
|
1869
1937
|
return {
|
|
1870
|
-
postData: async (
|
|
1938
|
+
postData: async (n) => await t.request(`/${zr}`, {
|
|
1871
1939
|
method: "POST",
|
|
1872
|
-
data: JSON.stringify(
|
|
1940
|
+
data: JSON.stringify(n)
|
|
1873
1941
|
})
|
|
1874
1942
|
};
|
|
1875
|
-
},
|
|
1943
|
+
}, Vr = "endorsement", vr = (e) => {
|
|
1876
1944
|
const t = O(e);
|
|
1877
1945
|
return {
|
|
1878
|
-
putEndorsement: (
|
|
1946
|
+
putEndorsement: (n, s) => {
|
|
1879
1947
|
const o = new FormData();
|
|
1880
|
-
return o.append("data", JSON.stringify(
|
|
1948
|
+
return o.append("data", JSON.stringify(n)), s && (Array.isArray(s) ? s.forEach((i) => {
|
|
1881
1949
|
o.append("attachments", i);
|
|
1882
|
-
}) : o.append("attachments", s)), t.request(`/${
|
|
1950
|
+
}) : o.append("attachments", s)), t.request(`/${Vr}`, {
|
|
1883
1951
|
method: "PUT",
|
|
1884
1952
|
data: o,
|
|
1885
1953
|
contentType: "multipart/form-data"
|
|
1886
1954
|
});
|
|
1887
1955
|
}
|
|
1888
1956
|
};
|
|
1889
|
-
},
|
|
1957
|
+
}, te = "payment", Gr = (e) => {
|
|
1890
1958
|
const t = O(e);
|
|
1891
1959
|
return {
|
|
1892
|
-
postPayment: (o) => t.request(`/${
|
|
1960
|
+
postPayment: (o) => t.request(`/${te}`, {
|
|
1893
1961
|
method: "POST",
|
|
1894
1962
|
data: JSON.stringify(o)
|
|
1895
1963
|
}),
|
|
1896
1964
|
getPaymentStatus: (o) => t.request(
|
|
1897
|
-
`/${
|
|
1965
|
+
`/${te}/status?policyId=${o.policyId}`,
|
|
1898
1966
|
{
|
|
1899
1967
|
method: "GET",
|
|
1900
1968
|
data: ""
|
|
1901
1969
|
}
|
|
1902
1970
|
),
|
|
1903
1971
|
getPaymentSummary: (o) => t.request(
|
|
1904
|
-
`/${
|
|
1972
|
+
`/${te}/summary?policyId=${o.policyId}`,
|
|
1905
1973
|
{
|
|
1906
1974
|
method: "GET",
|
|
1907
1975
|
data: ""
|
|
1908
1976
|
}
|
|
1909
1977
|
)
|
|
1910
1978
|
};
|
|
1911
|
-
},
|
|
1979
|
+
}, H = "product/action", Kr = (e) => {
|
|
1912
1980
|
const t = O(e);
|
|
1913
1981
|
return {
|
|
1914
|
-
getCnpjStatus: (i,
|
|
1982
|
+
getCnpjStatus: (i, c, l) => {
|
|
1915
1983
|
const a = new URLSearchParams({
|
|
1916
1984
|
...i && { cnpj: i },
|
|
1917
|
-
...
|
|
1918
|
-
...
|
|
1919
|
-
isBrokerageDefinedAtStart: String(
|
|
1985
|
+
...c && { brokerageIdentity: c },
|
|
1986
|
+
...l !== void 0 && {
|
|
1987
|
+
isBrokerageDefinedAtStart: String(l)
|
|
1920
1988
|
}
|
|
1921
|
-
}).toString(), d = `/${
|
|
1989
|
+
}).toString(), d = `/${H}/Custom/CnpjCheck?${a}`;
|
|
1922
1990
|
return t.request(d, {
|
|
1923
1991
|
method: "GET",
|
|
1924
1992
|
data: ""
|
|
1925
1993
|
});
|
|
1926
1994
|
},
|
|
1927
|
-
getKeyNumber: () => t.request(`/${
|
|
1995
|
+
getKeyNumber: () => t.request(`/${H}/Custom/GetKeyNumber`, {
|
|
1928
1996
|
method: "GET",
|
|
1929
1997
|
data: ""
|
|
1930
1998
|
}),
|
|
1931
1999
|
getProposalNumberByKeyNumber: (i) => t.request(
|
|
1932
|
-
`/${
|
|
2000
|
+
`/${H}/Custom/GetProposalNoByKeyNumber?keyNumber=${i.keyNumber}`,
|
|
1933
2001
|
{
|
|
1934
2002
|
method: "GET",
|
|
1935
2003
|
data: ""
|
|
1936
2004
|
}
|
|
1937
2005
|
),
|
|
1938
2006
|
postCoveragesAndClausesRules: (i) => t.request(
|
|
1939
|
-
`/${
|
|
2007
|
+
`/${H}/Custom/LoadRules`,
|
|
1940
2008
|
{
|
|
1941
2009
|
method: "POST",
|
|
1942
2010
|
data: JSON.stringify(i)
|
|
1943
2011
|
}
|
|
1944
2012
|
)
|
|
1945
2013
|
};
|
|
1946
|
-
}, x = "quotation",
|
|
2014
|
+
}, x = "quotation", Wr = (e) => {
|
|
1947
2015
|
const t = O(e);
|
|
1948
2016
|
return {
|
|
1949
2017
|
getQuotations: (a) => {
|
|
@@ -1997,17 +2065,17 @@ const ke = "auth", Fn = (e) => {
|
|
|
1997
2065
|
}
|
|
1998
2066
|
)
|
|
1999
2067
|
};
|
|
2000
|
-
},
|
|
2068
|
+
}, Qr = "report", Xr = (e) => {
|
|
2001
2069
|
const t = O(e);
|
|
2002
2070
|
return {
|
|
2003
|
-
getReportStream: (
|
|
2071
|
+
getReportStream: (n) => {
|
|
2004
2072
|
const s = new URLSearchParams({
|
|
2005
|
-
policyId:
|
|
2006
|
-
documentType:
|
|
2007
|
-
...
|
|
2073
|
+
policyId: n.policyId,
|
|
2074
|
+
documentType: n.documentType ?? "certificate",
|
|
2075
|
+
...n.additionalParams
|
|
2008
2076
|
});
|
|
2009
2077
|
return t.request(
|
|
2010
|
-
`/${
|
|
2078
|
+
`/${Qr}/generate-stream?${s.toString()}`,
|
|
2011
2079
|
{
|
|
2012
2080
|
method: "GET",
|
|
2013
2081
|
data: "",
|
|
@@ -2016,11 +2084,11 @@ const ke = "auth", Fn = (e) => {
|
|
|
2016
2084
|
);
|
|
2017
2085
|
}
|
|
2018
2086
|
};
|
|
2019
|
-
},
|
|
2087
|
+
}, Zr = "SubscriberData", Yr = (e) => {
|
|
2020
2088
|
const t = O(e);
|
|
2021
2089
|
return {
|
|
2022
|
-
getSubscriber: (
|
|
2023
|
-
`/${
|
|
2090
|
+
getSubscriber: (n) => t.request(
|
|
2091
|
+
`/${Zr}/get-subscriber-data?cnpj=${n}`,
|
|
2024
2092
|
{
|
|
2025
2093
|
method: "GET",
|
|
2026
2094
|
data: ""
|
|
@@ -2028,23 +2096,23 @@ const ke = "auth", Fn = (e) => {
|
|
|
2028
2096
|
)
|
|
2029
2097
|
};
|
|
2030
2098
|
};
|
|
2031
|
-
function
|
|
2032
|
-
const t =
|
|
2099
|
+
function gn(e) {
|
|
2100
|
+
const t = Ur(e), r = Hr(e), n = Mr(e), s = Wr(e), o = Gr(e), i = jr(e), c = Jr(e), l = vr(e), f = Kr(e), a = Xr(e), d = Yr(e), g = O(e);
|
|
2033
2101
|
return {
|
|
2034
2102
|
auth: t,
|
|
2035
|
-
authAkad:
|
|
2036
|
-
data:
|
|
2103
|
+
authAkad: r,
|
|
2104
|
+
data: n,
|
|
2037
2105
|
quotation: s,
|
|
2038
2106
|
payment: o,
|
|
2039
2107
|
address: i,
|
|
2040
|
-
broker:
|
|
2041
|
-
endorsement:
|
|
2042
|
-
plugin:
|
|
2108
|
+
broker: c,
|
|
2109
|
+
endorsement: l,
|
|
2110
|
+
plugin: f,
|
|
2043
2111
|
report: a,
|
|
2044
2112
|
subscriber: d,
|
|
2045
|
-
base:
|
|
2113
|
+
base: g
|
|
2046
2114
|
};
|
|
2047
2115
|
}
|
|
2048
2116
|
export {
|
|
2049
|
-
|
|
2117
|
+
gn as default
|
|
2050
2118
|
};
|