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