@tarxemo/customer_support 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +637 -808
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +6 -51
- package/dist/index.umd.js.map +1 -1
- package/package.json +5 -4
package/dist/index.es.js
CHANGED
|
@@ -1,182 +1,52 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
* @license lucide-react v0.469.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/
|
|
12
|
-
const Nt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), tt = (...e) => e.filter((t, n, r) => !!t && t.trim() !== "" && r.indexOf(t) === n).join(" ").trim();
|
|
13
|
-
/**
|
|
14
|
-
* @license lucide-react v0.469.0 - ISC
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the ISC license.
|
|
17
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/
|
|
19
|
-
var xt = {
|
|
20
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
21
|
-
width: 24,
|
|
22
|
-
height: 24,
|
|
23
|
-
viewBox: "0 0 24 24",
|
|
24
|
-
fill: "none",
|
|
25
|
-
stroke: "currentColor",
|
|
26
|
-
strokeWidth: 2,
|
|
27
|
-
strokeLinecap: "round",
|
|
28
|
-
strokeLinejoin: "round"
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* @license lucide-react v0.469.0 - ISC
|
|
32
|
-
*
|
|
33
|
-
* This source code is licensed under the ISC license.
|
|
34
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
35
|
-
*/
|
|
36
|
-
const Pt = Ye(
|
|
37
|
-
({
|
|
38
|
-
color: e = "currentColor",
|
|
39
|
-
size: t = 24,
|
|
40
|
-
strokeWidth: n = 2,
|
|
41
|
-
absoluteStrokeWidth: r,
|
|
42
|
-
className: s = "",
|
|
43
|
-
children: o,
|
|
44
|
-
iconNode: i,
|
|
45
|
-
...a
|
|
46
|
-
}, d) => be(
|
|
47
|
-
"svg",
|
|
48
|
-
{
|
|
49
|
-
ref: d,
|
|
50
|
-
...xt,
|
|
51
|
-
width: t,
|
|
52
|
-
height: t,
|
|
53
|
-
stroke: e,
|
|
54
|
-
strokeWidth: r ? Number(n) * 24 / Number(t) : n,
|
|
55
|
-
className: tt("lucide", s),
|
|
56
|
-
...a
|
|
57
|
-
},
|
|
58
|
-
[
|
|
59
|
-
...i.map(([u, l]) => be(u, l)),
|
|
60
|
-
...Array.isArray(o) ? o : [o]
|
|
61
|
-
]
|
|
62
|
-
)
|
|
63
|
-
);
|
|
64
|
-
/**
|
|
65
|
-
* @license lucide-react v0.469.0 - ISC
|
|
66
|
-
*
|
|
67
|
-
* This source code is licensed under the ISC license.
|
|
68
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
-
*/
|
|
70
|
-
const V = (e, t) => {
|
|
71
|
-
const n = Ye(
|
|
72
|
-
({ className: r, ...s }, o) => be(Pt, {
|
|
73
|
-
ref: o,
|
|
74
|
-
iconNode: t,
|
|
75
|
-
className: tt(`lucide-${Nt(e)}`, r),
|
|
76
|
-
...s
|
|
77
|
-
})
|
|
78
|
-
);
|
|
79
|
-
return n.displayName = `${e}`, n;
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* @license lucide-react v0.469.0 - ISC
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the ISC license.
|
|
85
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/
|
|
87
|
-
const Dt = V("ExternalLink", [
|
|
88
|
-
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
89
|
-
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
90
|
-
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
91
|
-
]);
|
|
92
|
-
/**
|
|
93
|
-
* @license lucide-react v0.469.0 - ISC
|
|
94
|
-
*
|
|
95
|
-
* This source code is licensed under the ISC license.
|
|
96
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/
|
|
98
|
-
const Ft = V("LoaderCircle", [
|
|
99
|
-
["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
|
|
100
|
-
]);
|
|
101
|
-
/**
|
|
102
|
-
* @license lucide-react v0.469.0 - ISC
|
|
103
|
-
*
|
|
104
|
-
* This source code is licensed under the ISC license.
|
|
105
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/
|
|
107
|
-
const Ut = V("MessageCircle", [
|
|
108
|
-
["path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z", key: "vv11sd" }]
|
|
109
|
-
]);
|
|
110
|
-
/**
|
|
111
|
-
* @license lucide-react v0.469.0 - ISC
|
|
112
|
-
*
|
|
113
|
-
* This source code is licensed under the ISC license.
|
|
114
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/
|
|
116
|
-
const Lt = V("Send", [
|
|
117
|
-
[
|
|
118
|
-
"path",
|
|
119
|
-
{
|
|
120
|
-
d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",
|
|
121
|
-
key: "1ffxy3"
|
|
122
|
-
}
|
|
123
|
-
],
|
|
124
|
-
["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
|
|
125
|
-
]);
|
|
126
|
-
/**
|
|
127
|
-
* @license lucide-react v0.469.0 - ISC
|
|
128
|
-
*
|
|
129
|
-
* This source code is licensed under the ISC license.
|
|
130
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/
|
|
132
|
-
const kt = V("X", [
|
|
133
|
-
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
134
|
-
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
135
|
-
]);
|
|
136
|
-
function nt(e, t) {
|
|
1
|
+
var St = Object.defineProperty;
|
|
2
|
+
var Rt = (e, t, n) => t in e ? St(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var De = (e, t, n) => Rt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import b, { useState as J, useRef as Ge, useEffect as ge, useCallback as ee } from "react";
|
|
5
|
+
import { ExternalLink as Ot, Send as _t, X as Tt, Loader2 as At, MessageCircle as Ct } from "lucide-react";
|
|
6
|
+
function Qe(e, t) {
|
|
137
7
|
return function() {
|
|
138
8
|
return e.apply(t, arguments);
|
|
139
9
|
};
|
|
140
10
|
}
|
|
141
|
-
const { toString:
|
|
142
|
-
const n =
|
|
11
|
+
const { toString: Nt } = Object.prototype, { getPrototypeOf: Se } = Object, { iterator: ie, toStringTag: Ye } = Symbol, ae = /* @__PURE__ */ ((e) => (t) => {
|
|
12
|
+
const n = Nt.call(t);
|
|
143
13
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
144
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
145
|
-
function
|
|
14
|
+
})(/* @__PURE__ */ Object.create(null)), P = (e) => (e = e.toLowerCase(), (t) => ae(t) === e), ce = (e) => (t) => typeof t === e, { isArray: q } = Array, H = ce("undefined");
|
|
15
|
+
function V(e) {
|
|
146
16
|
return e !== null && !H(e) && e.constructor !== null && !H(e.constructor) && C(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
147
17
|
}
|
|
148
|
-
const
|
|
149
|
-
function
|
|
18
|
+
const Ze = P("ArrayBuffer");
|
|
19
|
+
function xt(e) {
|
|
150
20
|
let t;
|
|
151
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
21
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ze(e.buffer), t;
|
|
152
22
|
}
|
|
153
|
-
const
|
|
154
|
-
if (
|
|
23
|
+
const Pt = ce("string"), C = ce("function"), et = ce("number"), K = (e) => e !== null && typeof e == "object", Dt = (e) => e === !0 || e === !1, ne = (e) => {
|
|
24
|
+
if (ae(e) !== "object")
|
|
155
25
|
return !1;
|
|
156
|
-
const t =
|
|
157
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
158
|
-
},
|
|
159
|
-
if (!
|
|
26
|
+
const t = Se(e);
|
|
27
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Ye in e) && !(ie in e);
|
|
28
|
+
}, Ft = (e) => {
|
|
29
|
+
if (!K(e) || V(e))
|
|
160
30
|
return !1;
|
|
161
31
|
try {
|
|
162
32
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
163
33
|
} catch {
|
|
164
34
|
return !1;
|
|
165
35
|
}
|
|
166
|
-
},
|
|
36
|
+
}, Ut = P("Date"), Lt = P("File"), kt = P("Blob"), Bt = P("FileList"), It = (e) => K(e) && C(e.pipe), jt = (e) => {
|
|
167
37
|
let t;
|
|
168
|
-
return e && (typeof FormData == "function" && e instanceof FormData || C(e.append) && ((t =
|
|
38
|
+
return e && (typeof FormData == "function" && e instanceof FormData || C(e.append) && ((t = ae(e)) === "formdata" || // detect form-data instance
|
|
169
39
|
t === "object" && C(e.toString) && e.toString() === "[object FormData]"));
|
|
170
|
-
},
|
|
171
|
-
function
|
|
40
|
+
}, Mt = P("URLSearchParams"), [$t, Ht, qt, zt] = ["ReadableStream", "Request", "Response", "Headers"].map(P), vt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
41
|
+
function W(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
172
42
|
if (e === null || typeof e > "u")
|
|
173
43
|
return;
|
|
174
44
|
let r, s;
|
|
175
|
-
if (typeof e != "object" && (e = [e]),
|
|
45
|
+
if (typeof e != "object" && (e = [e]), q(e))
|
|
176
46
|
for (r = 0, s = e.length; r < s; r++)
|
|
177
47
|
t.call(null, e[r], r, e);
|
|
178
48
|
else {
|
|
179
|
-
if (
|
|
49
|
+
if (V(e))
|
|
180
50
|
return;
|
|
181
51
|
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
182
52
|
let a;
|
|
@@ -184,8 +54,8 @@ function G(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
184
54
|
a = o[r], t.call(null, e[a], a, e);
|
|
185
55
|
}
|
|
186
56
|
}
|
|
187
|
-
function
|
|
188
|
-
if (
|
|
57
|
+
function tt(e, t) {
|
|
58
|
+
if (V(e))
|
|
189
59
|
return null;
|
|
190
60
|
t = t.toLowerCase();
|
|
191
61
|
const n = Object.keys(e);
|
|
@@ -195,19 +65,19 @@ function it(e, t) {
|
|
|
195
65
|
return s;
|
|
196
66
|
return null;
|
|
197
67
|
}
|
|
198
|
-
const
|
|
199
|
-
function
|
|
200
|
-
const { caseless: e, skipUndefined: t } =
|
|
201
|
-
const i = e &&
|
|
202
|
-
|
|
68
|
+
const I = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, nt = (e) => !H(e) && e !== I;
|
|
69
|
+
function ye() {
|
|
70
|
+
const { caseless: e, skipUndefined: t } = nt(this) && this || {}, n = {}, r = (s, o) => {
|
|
71
|
+
const i = e && tt(n, o) || o;
|
|
72
|
+
ne(n[i]) && ne(s) ? n[i] = ye(n[i], s) : ne(s) ? n[i] = ye({}, s) : q(s) ? n[i] = s.slice() : (!t || !H(s)) && (n[i] = s);
|
|
203
73
|
};
|
|
204
74
|
for (let s = 0, o = arguments.length; s < o; s++)
|
|
205
|
-
arguments[s] &&
|
|
75
|
+
arguments[s] && W(arguments[s], r);
|
|
206
76
|
return n;
|
|
207
77
|
}
|
|
208
|
-
const
|
|
78
|
+
const Jt = (e, t, n, { allOwnKeys: r } = {}) => (W(t, (s, o) => {
|
|
209
79
|
n && C(s) ? Object.defineProperty(e, o, {
|
|
210
|
-
value:
|
|
80
|
+
value: Qe(s, n),
|
|
211
81
|
writable: !0,
|
|
212
82
|
enumerable: !0,
|
|
213
83
|
configurable: !0
|
|
@@ -217,7 +87,7 @@ const Yt = (e, t, n, { allOwnKeys: r } = {}) => (G(t, (s, o) => {
|
|
|
217
87
|
enumerable: !0,
|
|
218
88
|
configurable: !0
|
|
219
89
|
});
|
|
220
|
-
}, { allOwnKeys: r }), e),
|
|
90
|
+
}, { allOwnKeys: r }), e), Vt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Kt = (e, t, n, r) => {
|
|
221
91
|
e.prototype = Object.create(t.prototype, r), Object.defineProperty(e.prototype, "constructor", {
|
|
222
92
|
value: e,
|
|
223
93
|
writable: !0,
|
|
@@ -226,55 +96,55 @@ const Yt = (e, t, n, { allOwnKeys: r } = {}) => (G(t, (s, o) => {
|
|
|
226
96
|
}), Object.defineProperty(e, "super", {
|
|
227
97
|
value: t.prototype
|
|
228
98
|
}), n && Object.assign(e.prototype, n);
|
|
229
|
-
},
|
|
99
|
+
}, Wt = (e, t, n, r) => {
|
|
230
100
|
let s, o, i;
|
|
231
101
|
const a = {};
|
|
232
102
|
if (t = t || {}, e == null) return t;
|
|
233
103
|
do {
|
|
234
104
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
235
105
|
i = s[o], (!r || r(i, e, t)) && !a[i] && (t[i] = e[i], a[i] = !0);
|
|
236
|
-
e = n !== !1 &&
|
|
106
|
+
e = n !== !1 && Se(e);
|
|
237
107
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
238
108
|
return t;
|
|
239
|
-
},
|
|
109
|
+
}, Xt = (e, t, n) => {
|
|
240
110
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
241
111
|
const r = e.indexOf(t, n);
|
|
242
112
|
return r !== -1 && r === n;
|
|
243
|
-
},
|
|
113
|
+
}, Gt = (e) => {
|
|
244
114
|
if (!e) return null;
|
|
245
|
-
if (
|
|
115
|
+
if (q(e)) return e;
|
|
246
116
|
let t = e.length;
|
|
247
|
-
if (!
|
|
117
|
+
if (!et(t)) return null;
|
|
248
118
|
const n = new Array(t);
|
|
249
119
|
for (; t-- > 0; )
|
|
250
120
|
n[t] = e[t];
|
|
251
121
|
return n;
|
|
252
|
-
},
|
|
253
|
-
const r = (e && e[
|
|
122
|
+
}, Qt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Se(Uint8Array)), Yt = (e, t) => {
|
|
123
|
+
const r = (e && e[ie]).call(e);
|
|
254
124
|
let s;
|
|
255
125
|
for (; (s = r.next()) && !s.done; ) {
|
|
256
126
|
const o = s.value;
|
|
257
127
|
t.call(e, o[0], o[1]);
|
|
258
128
|
}
|
|
259
|
-
},
|
|
129
|
+
}, Zt = (e, t) => {
|
|
260
130
|
let n;
|
|
261
131
|
const r = [];
|
|
262
132
|
for (; (n = e.exec(t)) !== null; )
|
|
263
133
|
r.push(n);
|
|
264
134
|
return r;
|
|
265
|
-
},
|
|
135
|
+
}, en = P("HTMLFormElement"), tn = (e) => e.toLowerCase().replace(
|
|
266
136
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
267
137
|
function(n, r, s) {
|
|
268
138
|
return r.toUpperCase() + s;
|
|
269
139
|
}
|
|
270
|
-
),
|
|
140
|
+
), Fe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), nn = P("RegExp"), rt = (e, t) => {
|
|
271
141
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
272
|
-
|
|
142
|
+
W(n, (s, o) => {
|
|
273
143
|
let i;
|
|
274
144
|
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
275
145
|
}), Object.defineProperties(e, r);
|
|
276
|
-
},
|
|
277
|
-
|
|
146
|
+
}, rn = (e) => {
|
|
147
|
+
rt(e, (t, n) => {
|
|
278
148
|
if (C(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
279
149
|
return !1;
|
|
280
150
|
const r = e[n];
|
|
@@ -288,29 +158,29 @@ const Yt = (e, t, n, { allOwnKeys: r } = {}) => (G(t, (s, o) => {
|
|
|
288
158
|
});
|
|
289
159
|
}
|
|
290
160
|
});
|
|
291
|
-
},
|
|
161
|
+
}, sn = (e, t) => {
|
|
292
162
|
const n = {}, r = (s) => {
|
|
293
163
|
s.forEach((o) => {
|
|
294
164
|
n[o] = !0;
|
|
295
165
|
});
|
|
296
166
|
};
|
|
297
|
-
return
|
|
298
|
-
},
|
|
299
|
-
},
|
|
300
|
-
function
|
|
301
|
-
return !!(e && C(e.append) && e[
|
|
167
|
+
return q(e) ? r(e) : r(String(e).split(t)), n;
|
|
168
|
+
}, on = () => {
|
|
169
|
+
}, an = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
170
|
+
function cn(e) {
|
|
171
|
+
return !!(e && C(e.append) && e[Ye] === "FormData" && e[ie]);
|
|
302
172
|
}
|
|
303
|
-
const
|
|
173
|
+
const ln = (e) => {
|
|
304
174
|
const t = new Array(10), n = (r, s) => {
|
|
305
|
-
if (
|
|
175
|
+
if (K(r)) {
|
|
306
176
|
if (t.indexOf(r) >= 0)
|
|
307
177
|
return;
|
|
308
|
-
if (
|
|
178
|
+
if (V(r))
|
|
309
179
|
return r;
|
|
310
180
|
if (!("toJSON" in r)) {
|
|
311
181
|
t[s] = r;
|
|
312
|
-
const o =
|
|
313
|
-
return
|
|
182
|
+
const o = q(r) ? [] : {};
|
|
183
|
+
return W(r, (i, a) => {
|
|
314
184
|
const d = n(i, s + 1);
|
|
315
185
|
!H(d) && (o[a] = d);
|
|
316
186
|
}), t[s] = void 0, o;
|
|
@@ -319,76 +189,76 @@ const wn = (e) => {
|
|
|
319
189
|
return r;
|
|
320
190
|
};
|
|
321
191
|
return n(e, 0);
|
|
322
|
-
},
|
|
323
|
-
s ===
|
|
192
|
+
}, un = P("AsyncFunction"), fn = (e) => e && (K(e) || C(e)) && C(e.then) && C(e.catch), st = ((e, t) => e ? setImmediate : t ? ((n, r) => (I.addEventListener("message", ({ source: s, data: o }) => {
|
|
193
|
+
s === I && o === n && r.length && r.shift()();
|
|
324
194
|
}, !1), (s) => {
|
|
325
|
-
r.push(s),
|
|
195
|
+
r.push(s), I.postMessage(n, "*");
|
|
326
196
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
327
197
|
typeof setImmediate == "function",
|
|
328
|
-
C(
|
|
329
|
-
),
|
|
330
|
-
isArray:
|
|
331
|
-
isArrayBuffer:
|
|
332
|
-
isBuffer:
|
|
333
|
-
isFormData:
|
|
334
|
-
isArrayBufferView:
|
|
335
|
-
isString:
|
|
336
|
-
isNumber:
|
|
337
|
-
isBoolean:
|
|
338
|
-
isObject:
|
|
339
|
-
isPlainObject:
|
|
340
|
-
isEmptyObject:
|
|
341
|
-
isReadableStream:
|
|
342
|
-
isRequest:
|
|
343
|
-
isResponse:
|
|
344
|
-
isHeaders:
|
|
198
|
+
C(I.postMessage)
|
|
199
|
+
), dn = typeof queueMicrotask < "u" ? queueMicrotask.bind(I) : typeof process < "u" && process.nextTick || st, pn = (e) => e != null && C(e[ie]), c = {
|
|
200
|
+
isArray: q,
|
|
201
|
+
isArrayBuffer: Ze,
|
|
202
|
+
isBuffer: V,
|
|
203
|
+
isFormData: jt,
|
|
204
|
+
isArrayBufferView: xt,
|
|
205
|
+
isString: Pt,
|
|
206
|
+
isNumber: et,
|
|
207
|
+
isBoolean: Dt,
|
|
208
|
+
isObject: K,
|
|
209
|
+
isPlainObject: ne,
|
|
210
|
+
isEmptyObject: Ft,
|
|
211
|
+
isReadableStream: $t,
|
|
212
|
+
isRequest: Ht,
|
|
213
|
+
isResponse: qt,
|
|
214
|
+
isHeaders: zt,
|
|
345
215
|
isUndefined: H,
|
|
346
|
-
isDate:
|
|
347
|
-
isFile:
|
|
348
|
-
isBlob:
|
|
349
|
-
isRegExp:
|
|
216
|
+
isDate: Ut,
|
|
217
|
+
isFile: Lt,
|
|
218
|
+
isBlob: kt,
|
|
219
|
+
isRegExp: nn,
|
|
350
220
|
isFunction: C,
|
|
351
|
-
isStream:
|
|
352
|
-
isURLSearchParams:
|
|
353
|
-
isTypedArray:
|
|
354
|
-
isFileList:
|
|
355
|
-
forEach:
|
|
356
|
-
merge:
|
|
357
|
-
extend:
|
|
358
|
-
trim:
|
|
359
|
-
stripBOM:
|
|
360
|
-
inherits:
|
|
361
|
-
toFlatObject:
|
|
362
|
-
kindOf:
|
|
363
|
-
kindOfTest:
|
|
364
|
-
endsWith:
|
|
365
|
-
toArray:
|
|
366
|
-
forEachEntry:
|
|
367
|
-
matchAll:
|
|
368
|
-
isHTMLForm:
|
|
369
|
-
hasOwnProperty:
|
|
370
|
-
hasOwnProp:
|
|
221
|
+
isStream: It,
|
|
222
|
+
isURLSearchParams: Mt,
|
|
223
|
+
isTypedArray: Qt,
|
|
224
|
+
isFileList: Bt,
|
|
225
|
+
forEach: W,
|
|
226
|
+
merge: ye,
|
|
227
|
+
extend: Jt,
|
|
228
|
+
trim: vt,
|
|
229
|
+
stripBOM: Vt,
|
|
230
|
+
inherits: Kt,
|
|
231
|
+
toFlatObject: Wt,
|
|
232
|
+
kindOf: ae,
|
|
233
|
+
kindOfTest: P,
|
|
234
|
+
endsWith: Xt,
|
|
235
|
+
toArray: Gt,
|
|
236
|
+
forEachEntry: Yt,
|
|
237
|
+
matchAll: Zt,
|
|
238
|
+
isHTMLForm: en,
|
|
239
|
+
hasOwnProperty: Fe,
|
|
240
|
+
hasOwnProp: Fe,
|
|
371
241
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
372
|
-
reduceDescriptors:
|
|
373
|
-
freezeMethods:
|
|
374
|
-
toObjectSet:
|
|
375
|
-
toCamelCase:
|
|
376
|
-
noop:
|
|
377
|
-
toFiniteNumber:
|
|
378
|
-
findKey:
|
|
379
|
-
global:
|
|
380
|
-
isContextDefined:
|
|
381
|
-
isSpecCompliantForm:
|
|
382
|
-
toJSONObject:
|
|
383
|
-
isAsyncFn:
|
|
384
|
-
isThenable:
|
|
385
|
-
setImmediate:
|
|
386
|
-
asap:
|
|
387
|
-
isIterable:
|
|
242
|
+
reduceDescriptors: rt,
|
|
243
|
+
freezeMethods: rn,
|
|
244
|
+
toObjectSet: sn,
|
|
245
|
+
toCamelCase: tn,
|
|
246
|
+
noop: on,
|
|
247
|
+
toFiniteNumber: an,
|
|
248
|
+
findKey: tt,
|
|
249
|
+
global: I,
|
|
250
|
+
isContextDefined: nt,
|
|
251
|
+
isSpecCompliantForm: cn,
|
|
252
|
+
toJSONObject: ln,
|
|
253
|
+
isAsyncFn: un,
|
|
254
|
+
isThenable: fn,
|
|
255
|
+
setImmediate: st,
|
|
256
|
+
asap: dn,
|
|
257
|
+
isIterable: pn
|
|
388
258
|
};
|
|
389
|
-
let w = class
|
|
259
|
+
let w = class ot extends Error {
|
|
390
260
|
static from(t, n, r, s, o, i) {
|
|
391
|
-
const a = new
|
|
261
|
+
const a = new ot(t.message, n || t.code, r, s, o);
|
|
392
262
|
return a.cause = t, a.name = t.name, i && Object.assign(a, i), a;
|
|
393
263
|
}
|
|
394
264
|
/**
|
|
@@ -437,33 +307,33 @@ w.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
|
437
307
|
w.ERR_CANCELED = "ERR_CANCELED";
|
|
438
308
|
w.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
439
309
|
w.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
440
|
-
const
|
|
441
|
-
function
|
|
310
|
+
const mn = null;
|
|
311
|
+
function we(e) {
|
|
442
312
|
return c.isPlainObject(e) || c.isArray(e);
|
|
443
313
|
}
|
|
444
|
-
function
|
|
314
|
+
function it(e) {
|
|
445
315
|
return c.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
446
316
|
}
|
|
447
|
-
function
|
|
317
|
+
function Ue(e, t, n) {
|
|
448
318
|
return e ? e.concat(t).map(function(s, o) {
|
|
449
|
-
return s =
|
|
319
|
+
return s = it(s), !n && o ? "[" + s + "]" : s;
|
|
450
320
|
}).join(n ? "." : "") : t;
|
|
451
321
|
}
|
|
452
|
-
function
|
|
453
|
-
return c.isArray(e) && !e.some(
|
|
322
|
+
function hn(e) {
|
|
323
|
+
return c.isArray(e) && !e.some(we);
|
|
454
324
|
}
|
|
455
|
-
const
|
|
325
|
+
const yn = c.toFlatObject(c, {}, null, function(t) {
|
|
456
326
|
return /^is[A-Z]/.test(t);
|
|
457
327
|
});
|
|
458
|
-
function
|
|
328
|
+
function le(e, t, n) {
|
|
459
329
|
if (!c.isObject(e))
|
|
460
330
|
throw new TypeError("target must be an object");
|
|
461
331
|
t = t || new FormData(), n = c.toFlatObject(n, {
|
|
462
332
|
metaTokens: !0,
|
|
463
333
|
dots: !1,
|
|
464
334
|
indexes: !1
|
|
465
|
-
}, !1, function(
|
|
466
|
-
return !c.isUndefined(h
|
|
335
|
+
}, !1, function(h, m) {
|
|
336
|
+
return !c.isUndefined(m[h]);
|
|
467
337
|
});
|
|
468
338
|
const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
|
|
469
339
|
if (!c.isFunction(s))
|
|
@@ -478,39 +348,39 @@ function fe(e, t, n) {
|
|
|
478
348
|
throw new w("Blob is not supported. Use a Buffer instead.");
|
|
479
349
|
return c.isArrayBuffer(f) || c.isTypedArray(f) ? d && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
|
|
480
350
|
}
|
|
481
|
-
function l(f,
|
|
351
|
+
function l(f, h, m) {
|
|
482
352
|
let g = f;
|
|
483
|
-
if (f && !
|
|
484
|
-
if (c.endsWith(
|
|
485
|
-
|
|
486
|
-
else if (c.isArray(f) &&
|
|
487
|
-
return
|
|
353
|
+
if (f && !m && typeof f == "object") {
|
|
354
|
+
if (c.endsWith(h, "{}"))
|
|
355
|
+
h = r ? h : h.slice(0, -2), f = JSON.stringify(f);
|
|
356
|
+
else if (c.isArray(f) && hn(f) || (c.isFileList(f) || c.endsWith(h, "[]")) && (g = c.toArray(f)))
|
|
357
|
+
return h = it(h), g.forEach(function(y, S) {
|
|
488
358
|
!(c.isUndefined(y) || y === null) && t.append(
|
|
489
359
|
// eslint-disable-next-line no-nested-ternary
|
|
490
|
-
i === !0 ?
|
|
360
|
+
i === !0 ? Ue([h], S, o) : i === null ? h : h + "[]",
|
|
491
361
|
u(y)
|
|
492
362
|
);
|
|
493
363
|
}), !1;
|
|
494
364
|
}
|
|
495
|
-
return
|
|
365
|
+
return we(f) ? !0 : (t.append(Ue(m, h, o), u(f)), !1);
|
|
496
366
|
}
|
|
497
|
-
const p = [],
|
|
367
|
+
const p = [], E = Object.assign(yn, {
|
|
498
368
|
defaultVisitor: l,
|
|
499
369
|
convertValue: u,
|
|
500
|
-
isVisitable:
|
|
370
|
+
isVisitable: we
|
|
501
371
|
});
|
|
502
|
-
function _(f,
|
|
372
|
+
function _(f, h) {
|
|
503
373
|
if (!c.isUndefined(f)) {
|
|
504
374
|
if (p.indexOf(f) !== -1)
|
|
505
|
-
throw Error("Circular reference detected in " +
|
|
375
|
+
throw Error("Circular reference detected in " + h.join("."));
|
|
506
376
|
p.push(f), c.forEach(f, function(g, R) {
|
|
507
377
|
(!(c.isUndefined(g) || g === null) && s.call(
|
|
508
378
|
t,
|
|
509
379
|
g,
|
|
510
380
|
c.isString(R) ? R.trim() : R,
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
)) === !0 && _(g,
|
|
381
|
+
h,
|
|
382
|
+
E
|
|
383
|
+
)) === !0 && _(g, h ? h.concat(R) : [R]);
|
|
514
384
|
}), p.pop();
|
|
515
385
|
}
|
|
516
386
|
}
|
|
@@ -518,7 +388,7 @@ function fe(e, t, n) {
|
|
|
518
388
|
throw new TypeError("data must be an object");
|
|
519
389
|
return _(e), t;
|
|
520
390
|
}
|
|
521
|
-
function
|
|
391
|
+
function Le(e) {
|
|
522
392
|
const t = {
|
|
523
393
|
"!": "%21",
|
|
524
394
|
"'": "%27",
|
|
@@ -532,38 +402,38 @@ function Ie(e) {
|
|
|
532
402
|
return t[r];
|
|
533
403
|
});
|
|
534
404
|
}
|
|
535
|
-
function
|
|
536
|
-
this._pairs = [], e &&
|
|
405
|
+
function Re(e, t) {
|
|
406
|
+
this._pairs = [], e && le(e, this, t);
|
|
537
407
|
}
|
|
538
|
-
const
|
|
539
|
-
|
|
408
|
+
const at = Re.prototype;
|
|
409
|
+
at.append = function(t, n) {
|
|
540
410
|
this._pairs.push([t, n]);
|
|
541
411
|
};
|
|
542
|
-
|
|
412
|
+
at.toString = function(t) {
|
|
543
413
|
const n = t ? function(r) {
|
|
544
|
-
return t.call(this, r,
|
|
545
|
-
} :
|
|
414
|
+
return t.call(this, r, Le);
|
|
415
|
+
} : Le;
|
|
546
416
|
return this._pairs.map(function(s) {
|
|
547
417
|
return n(s[0]) + "=" + n(s[1]);
|
|
548
418
|
}, "").join("&");
|
|
549
419
|
};
|
|
550
|
-
function
|
|
420
|
+
function wn(e) {
|
|
551
421
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
552
422
|
}
|
|
553
|
-
function
|
|
423
|
+
function ct(e, t, n) {
|
|
554
424
|
if (!t)
|
|
555
425
|
return e;
|
|
556
|
-
const r = n && n.encode ||
|
|
426
|
+
const r = n && n.encode || wn, s = c.isFunction(n) ? {
|
|
557
427
|
serialize: n
|
|
558
428
|
} : n, o = s && s.serialize;
|
|
559
429
|
let i;
|
|
560
|
-
if (o ? i = o(t, s) : i = c.isURLSearchParams(t) ? t.toString() : new
|
|
430
|
+
if (o ? i = o(t, s) : i = c.isURLSearchParams(t) ? t.toString() : new Re(t, s).toString(r), i) {
|
|
561
431
|
const a = e.indexOf("#");
|
|
562
432
|
a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
563
433
|
}
|
|
564
434
|
return e;
|
|
565
435
|
}
|
|
566
|
-
class
|
|
436
|
+
class ke {
|
|
567
437
|
constructor() {
|
|
568
438
|
this.handlers = [];
|
|
569
439
|
}
|
|
@@ -618,42 +488,42 @@ class je {
|
|
|
618
488
|
});
|
|
619
489
|
}
|
|
620
490
|
}
|
|
621
|
-
const
|
|
491
|
+
const lt = {
|
|
622
492
|
silentJSONParsing: !0,
|
|
623
493
|
forcedJSONParsing: !0,
|
|
624
494
|
clarifyTimeoutError: !1
|
|
625
|
-
},
|
|
495
|
+
}, En = typeof URLSearchParams < "u" ? URLSearchParams : Re, bn = typeof FormData < "u" ? FormData : null, gn = typeof Blob < "u" ? Blob : null, Sn = {
|
|
626
496
|
isBrowser: !0,
|
|
627
497
|
classes: {
|
|
628
|
-
URLSearchParams:
|
|
629
|
-
FormData:
|
|
630
|
-
Blob:
|
|
498
|
+
URLSearchParams: En,
|
|
499
|
+
FormData: bn,
|
|
500
|
+
Blob: gn
|
|
631
501
|
},
|
|
632
502
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
633
|
-
},
|
|
634
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
503
|
+
}, Oe = typeof window < "u" && typeof document < "u", Ee = typeof navigator == "object" && navigator || void 0, Rn = Oe && (!Ee || ["ReactNative", "NativeScript", "NS"].indexOf(Ee.product) < 0), On = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
504
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", _n = Oe && window.location.href || "http://localhost", Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
635
505
|
__proto__: null,
|
|
636
|
-
hasBrowserEnv:
|
|
637
|
-
hasStandardBrowserEnv:
|
|
638
|
-
hasStandardBrowserWebWorkerEnv:
|
|
639
|
-
navigator:
|
|
640
|
-
origin:
|
|
641
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
642
|
-
...
|
|
643
|
-
...
|
|
506
|
+
hasBrowserEnv: Oe,
|
|
507
|
+
hasStandardBrowserEnv: Rn,
|
|
508
|
+
hasStandardBrowserWebWorkerEnv: On,
|
|
509
|
+
navigator: Ee,
|
|
510
|
+
origin: _n
|
|
511
|
+
}, Symbol.toStringTag, { value: "Module" })), T = {
|
|
512
|
+
...Tn,
|
|
513
|
+
...Sn
|
|
644
514
|
};
|
|
645
|
-
function
|
|
646
|
-
return
|
|
515
|
+
function An(e, t) {
|
|
516
|
+
return le(e, new T.classes.URLSearchParams(), {
|
|
647
517
|
visitor: function(n, r, s, o) {
|
|
648
|
-
return
|
|
518
|
+
return T.isNode && c.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
649
519
|
},
|
|
650
520
|
...t
|
|
651
521
|
});
|
|
652
522
|
}
|
|
653
|
-
function
|
|
523
|
+
function Cn(e) {
|
|
654
524
|
return c.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
655
525
|
}
|
|
656
|
-
function
|
|
526
|
+
function Nn(e) {
|
|
657
527
|
const t = {}, n = Object.keys(e);
|
|
658
528
|
let r;
|
|
659
529
|
const s = n.length;
|
|
@@ -662,22 +532,22 @@ function Bn(e) {
|
|
|
662
532
|
o = n[r], t[o] = e[o];
|
|
663
533
|
return t;
|
|
664
534
|
}
|
|
665
|
-
function
|
|
535
|
+
function ut(e) {
|
|
666
536
|
function t(n, r, s, o) {
|
|
667
537
|
let i = n[o++];
|
|
668
538
|
if (i === "__proto__") return !0;
|
|
669
539
|
const a = Number.isFinite(+i), d = o >= n.length;
|
|
670
|
-
return i = !i && c.isArray(s) ? s.length : i, d ? (c.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !a) : ((!s[i] || !c.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && c.isArray(s[i]) && (s[i] =
|
|
540
|
+
return i = !i && c.isArray(s) ? s.length : i, d ? (c.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !a) : ((!s[i] || !c.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && c.isArray(s[i]) && (s[i] = Nn(s[i])), !a);
|
|
671
541
|
}
|
|
672
542
|
if (c.isFormData(e) && c.isFunction(e.entries)) {
|
|
673
543
|
const n = {};
|
|
674
544
|
return c.forEachEntry(e, (r, s) => {
|
|
675
|
-
t(
|
|
545
|
+
t(Cn(r), s, n, 0);
|
|
676
546
|
}), n;
|
|
677
547
|
}
|
|
678
548
|
return null;
|
|
679
549
|
}
|
|
680
|
-
function
|
|
550
|
+
function xn(e, t, n) {
|
|
681
551
|
if (c.isString(e))
|
|
682
552
|
try {
|
|
683
553
|
return (t || JSON.parse)(e), c.trim(e);
|
|
@@ -687,13 +557,13 @@ function In(e, t, n) {
|
|
|
687
557
|
}
|
|
688
558
|
return (n || JSON.stringify)(e);
|
|
689
559
|
}
|
|
690
|
-
const
|
|
691
|
-
transitional:
|
|
560
|
+
const X = {
|
|
561
|
+
transitional: lt,
|
|
692
562
|
adapter: ["xhr", "http", "fetch"],
|
|
693
563
|
transformRequest: [function(t, n) {
|
|
694
564
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = c.isObject(t);
|
|
695
565
|
if (o && c.isHTMLForm(t) && (t = new FormData(t)), c.isFormData(t))
|
|
696
|
-
return s ? JSON.stringify(
|
|
566
|
+
return s ? JSON.stringify(ut(t)) : t;
|
|
697
567
|
if (c.isArrayBuffer(t) || c.isBuffer(t) || c.isStream(t) || c.isFile(t) || c.isBlob(t) || c.isReadableStream(t))
|
|
698
568
|
return t;
|
|
699
569
|
if (c.isArrayBufferView(t))
|
|
@@ -703,20 +573,20 @@ const Z = {
|
|
|
703
573
|
let a;
|
|
704
574
|
if (o) {
|
|
705
575
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
706
|
-
return
|
|
576
|
+
return An(t, this.formSerializer).toString();
|
|
707
577
|
if ((a = c.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
708
578
|
const d = this.env && this.env.FormData;
|
|
709
|
-
return
|
|
579
|
+
return le(
|
|
710
580
|
a ? { "files[]": t } : t,
|
|
711
581
|
d && new d(),
|
|
712
582
|
this.formSerializer
|
|
713
583
|
);
|
|
714
584
|
}
|
|
715
585
|
}
|
|
716
|
-
return o || s ? (n.setContentType("application/json", !1),
|
|
586
|
+
return o || s ? (n.setContentType("application/json", !1), xn(t)) : t;
|
|
717
587
|
}],
|
|
718
588
|
transformResponse: [function(t) {
|
|
719
|
-
const n = this.transitional ||
|
|
589
|
+
const n = this.transitional || X.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
720
590
|
if (c.isResponse(t) || c.isReadableStream(t))
|
|
721
591
|
return t;
|
|
722
592
|
if (t && c.isString(t) && (r && !this.responseType || s)) {
|
|
@@ -740,8 +610,8 @@ const Z = {
|
|
|
740
610
|
maxContentLength: -1,
|
|
741
611
|
maxBodyLength: -1,
|
|
742
612
|
env: {
|
|
743
|
-
FormData:
|
|
744
|
-
Blob:
|
|
613
|
+
FormData: T.classes.FormData,
|
|
614
|
+
Blob: T.classes.Blob
|
|
745
615
|
},
|
|
746
616
|
validateStatus: function(t) {
|
|
747
617
|
return t >= 200 && t < 300;
|
|
@@ -754,9 +624,9 @@ const Z = {
|
|
|
754
624
|
}
|
|
755
625
|
};
|
|
756
626
|
c.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
757
|
-
|
|
627
|
+
X.headers[e] = {};
|
|
758
628
|
});
|
|
759
|
-
const
|
|
629
|
+
const Pn = c.toObjectSet([
|
|
760
630
|
"age",
|
|
761
631
|
"authorization",
|
|
762
632
|
"content-length",
|
|
@@ -774,29 +644,29 @@ const jn = c.toObjectSet([
|
|
|
774
644
|
"referer",
|
|
775
645
|
"retry-after",
|
|
776
646
|
"user-agent"
|
|
777
|
-
]),
|
|
647
|
+
]), Dn = (e) => {
|
|
778
648
|
const t = {};
|
|
779
649
|
let n, r, s;
|
|
780
650
|
return e && e.split(`
|
|
781
651
|
`).forEach(function(i) {
|
|
782
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] &&
|
|
652
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Pn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
783
653
|
}), t;
|
|
784
|
-
},
|
|
785
|
-
function
|
|
654
|
+
}, Be = Symbol("internals");
|
|
655
|
+
function v(e) {
|
|
786
656
|
return e && String(e).trim().toLowerCase();
|
|
787
657
|
}
|
|
788
|
-
function
|
|
789
|
-
return e === !1 || e == null ? e : c.isArray(e) ? e.map(
|
|
658
|
+
function re(e) {
|
|
659
|
+
return e === !1 || e == null ? e : c.isArray(e) ? e.map(re) : String(e);
|
|
790
660
|
}
|
|
791
|
-
function
|
|
661
|
+
function Fn(e) {
|
|
792
662
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
793
663
|
let r;
|
|
794
664
|
for (; r = n.exec(e); )
|
|
795
665
|
t[r[1]] = r[2];
|
|
796
666
|
return t;
|
|
797
667
|
}
|
|
798
|
-
const
|
|
799
|
-
function
|
|
668
|
+
const Un = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
669
|
+
function pe(e, t, n, r, s) {
|
|
800
670
|
if (c.isFunction(r))
|
|
801
671
|
return r.call(this, t, n);
|
|
802
672
|
if (s && (t = n), !!c.isString(t)) {
|
|
@@ -806,10 +676,10 @@ function me(e, t, n, r, s) {
|
|
|
806
676
|
return r.test(t);
|
|
807
677
|
}
|
|
808
678
|
}
|
|
809
|
-
function
|
|
679
|
+
function Ln(e) {
|
|
810
680
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
811
681
|
}
|
|
812
|
-
function
|
|
682
|
+
function kn(e, t) {
|
|
813
683
|
const n = c.toCamelCase(" " + t);
|
|
814
684
|
["get", "set", "has"].forEach((r) => {
|
|
815
685
|
Object.defineProperty(e, r + n, {
|
|
@@ -827,17 +697,17 @@ let N = class {
|
|
|
827
697
|
set(t, n, r) {
|
|
828
698
|
const s = this;
|
|
829
699
|
function o(a, d, u) {
|
|
830
|
-
const l =
|
|
700
|
+
const l = v(d);
|
|
831
701
|
if (!l)
|
|
832
702
|
throw new Error("header name must be a non-empty string");
|
|
833
703
|
const p = c.findKey(s, l);
|
|
834
|
-
(!p || s[p] === void 0 || u === !0 || u === void 0 && s[p] !== !1) && (s[p || d] =
|
|
704
|
+
(!p || s[p] === void 0 || u === !0 || u === void 0 && s[p] !== !1) && (s[p || d] = re(a));
|
|
835
705
|
}
|
|
836
706
|
const i = (a, d) => c.forEach(a, (u, l) => o(u, l, d));
|
|
837
707
|
if (c.isPlainObject(t) || t instanceof this.constructor)
|
|
838
708
|
i(t, n);
|
|
839
|
-
else if (c.isString(t) && (t = t.trim()) && !
|
|
840
|
-
i(
|
|
709
|
+
else if (c.isString(t) && (t = t.trim()) && !Un(t))
|
|
710
|
+
i(Dn(t), n);
|
|
841
711
|
else if (c.isObject(t) && c.isIterable(t)) {
|
|
842
712
|
let a = {}, d, u;
|
|
843
713
|
for (const l of t) {
|
|
@@ -851,14 +721,14 @@ let N = class {
|
|
|
851
721
|
return this;
|
|
852
722
|
}
|
|
853
723
|
get(t, n) {
|
|
854
|
-
if (t =
|
|
724
|
+
if (t = v(t), t) {
|
|
855
725
|
const r = c.findKey(this, t);
|
|
856
726
|
if (r) {
|
|
857
727
|
const s = this[r];
|
|
858
728
|
if (!n)
|
|
859
729
|
return s;
|
|
860
730
|
if (n === !0)
|
|
861
|
-
return
|
|
731
|
+
return Fn(s);
|
|
862
732
|
if (c.isFunction(n))
|
|
863
733
|
return n.call(this, s, r);
|
|
864
734
|
if (c.isRegExp(n))
|
|
@@ -868,9 +738,9 @@ let N = class {
|
|
|
868
738
|
}
|
|
869
739
|
}
|
|
870
740
|
has(t, n) {
|
|
871
|
-
if (t =
|
|
741
|
+
if (t = v(t), t) {
|
|
872
742
|
const r = c.findKey(this, t);
|
|
873
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
743
|
+
return !!(r && this[r] !== void 0 && (!n || pe(this, this[r], r, n)));
|
|
874
744
|
}
|
|
875
745
|
return !1;
|
|
876
746
|
}
|
|
@@ -878,9 +748,9 @@ let N = class {
|
|
|
878
748
|
const r = this;
|
|
879
749
|
let s = !1;
|
|
880
750
|
function o(i) {
|
|
881
|
-
if (i =
|
|
751
|
+
if (i = v(i), i) {
|
|
882
752
|
const a = c.findKey(r, i);
|
|
883
|
-
a && (!n ||
|
|
753
|
+
a && (!n || pe(r, r[a], a, n)) && (delete r[a], s = !0);
|
|
884
754
|
}
|
|
885
755
|
}
|
|
886
756
|
return c.isArray(t) ? t.forEach(o) : o(t), s;
|
|
@@ -890,7 +760,7 @@ let N = class {
|
|
|
890
760
|
let r = n.length, s = !1;
|
|
891
761
|
for (; r--; ) {
|
|
892
762
|
const o = n[r];
|
|
893
|
-
(!t ||
|
|
763
|
+
(!t || pe(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
894
764
|
}
|
|
895
765
|
return s;
|
|
896
766
|
}
|
|
@@ -899,11 +769,11 @@ let N = class {
|
|
|
899
769
|
return c.forEach(this, (s, o) => {
|
|
900
770
|
const i = c.findKey(r, o);
|
|
901
771
|
if (i) {
|
|
902
|
-
n[i] =
|
|
772
|
+
n[i] = re(s), delete n[o];
|
|
903
773
|
return;
|
|
904
774
|
}
|
|
905
|
-
const a = t ?
|
|
906
|
-
a !== o && delete n[o], n[a] =
|
|
775
|
+
const a = t ? Ln(o) : String(o).trim();
|
|
776
|
+
a !== o && delete n[o], n[a] = re(s), r[a] = !0;
|
|
907
777
|
}), this;
|
|
908
778
|
}
|
|
909
779
|
concat(...t) {
|
|
@@ -936,12 +806,12 @@ let N = class {
|
|
|
936
806
|
return n.forEach((s) => r.set(s)), r;
|
|
937
807
|
}
|
|
938
808
|
static accessor(t) {
|
|
939
|
-
const r = (this[
|
|
809
|
+
const r = (this[Be] = this[Be] = {
|
|
940
810
|
accessors: {}
|
|
941
811
|
}).accessors, s = this.prototype;
|
|
942
812
|
function o(i) {
|
|
943
|
-
const a =
|
|
944
|
-
r[a] || (
|
|
813
|
+
const a = v(i);
|
|
814
|
+
r[a] || (kn(s, i), r[a] = !0);
|
|
945
815
|
}
|
|
946
816
|
return c.isArray(t) ? t.forEach(o) : o(t), this;
|
|
947
817
|
}
|
|
@@ -957,17 +827,17 @@ c.reduceDescriptors(N.prototype, ({ value: e }, t) => {
|
|
|
957
827
|
};
|
|
958
828
|
});
|
|
959
829
|
c.freezeMethods(N);
|
|
960
|
-
function
|
|
961
|
-
const n = this ||
|
|
830
|
+
function me(e, t) {
|
|
831
|
+
const n = this || X, r = t || n, s = N.from(r.headers);
|
|
962
832
|
let o = r.data;
|
|
963
833
|
return c.forEach(e, function(a) {
|
|
964
834
|
o = a.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
965
835
|
}), s.normalize(), o;
|
|
966
836
|
}
|
|
967
|
-
function
|
|
837
|
+
function ft(e) {
|
|
968
838
|
return !!(e && e.__CANCEL__);
|
|
969
839
|
}
|
|
970
|
-
let
|
|
840
|
+
let G = class extends w {
|
|
971
841
|
/**
|
|
972
842
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
973
843
|
*
|
|
@@ -981,7 +851,7 @@ let Q = class extends w {
|
|
|
981
851
|
super(t ?? "canceled", w.ERR_CANCELED, n, r), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
982
852
|
}
|
|
983
853
|
};
|
|
984
|
-
function
|
|
854
|
+
function dt(e, t, n) {
|
|
985
855
|
const r = n.config.validateStatus;
|
|
986
856
|
!n.status || !r || r(n.status) ? e(n) : t(new w(
|
|
987
857
|
"Request failed with status code " + n.status,
|
|
@@ -991,27 +861,27 @@ function wt(e, t, n) {
|
|
|
991
861
|
n
|
|
992
862
|
));
|
|
993
863
|
}
|
|
994
|
-
function
|
|
864
|
+
function Bn(e) {
|
|
995
865
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
996
866
|
return t && t[1] || "";
|
|
997
867
|
}
|
|
998
|
-
function
|
|
868
|
+
function In(e, t) {
|
|
999
869
|
e = e || 10;
|
|
1000
870
|
const n = new Array(e), r = new Array(e);
|
|
1001
871
|
let s = 0, o = 0, i;
|
|
1002
872
|
return t = t !== void 0 ? t : 1e3, function(d) {
|
|
1003
873
|
const u = Date.now(), l = r[o];
|
|
1004
874
|
i || (i = u), n[s] = d, r[s] = u;
|
|
1005
|
-
let p = o,
|
|
875
|
+
let p = o, E = 0;
|
|
1006
876
|
for (; p !== s; )
|
|
1007
|
-
|
|
877
|
+
E += n[p++], p = p % e;
|
|
1008
878
|
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
|
|
1009
879
|
return;
|
|
1010
880
|
const _ = l && u - l;
|
|
1011
|
-
return _ ? Math.round(
|
|
881
|
+
return _ ? Math.round(E * 1e3 / _) : void 0;
|
|
1012
882
|
};
|
|
1013
883
|
}
|
|
1014
|
-
function
|
|
884
|
+
function jn(e, t) {
|
|
1015
885
|
let n = 0, r = 1e3 / t, s, o;
|
|
1016
886
|
const i = (u, l = Date.now()) => {
|
|
1017
887
|
n = l, s = null, o && (clearTimeout(o), o = null), e(...u);
|
|
@@ -1023,10 +893,10 @@ function Kn(e, t) {
|
|
|
1023
893
|
}, r - p)));
|
|
1024
894
|
}, () => s && i(s)];
|
|
1025
895
|
}
|
|
1026
|
-
const
|
|
896
|
+
const oe = (e, t, n = 3) => {
|
|
1027
897
|
let r = 0;
|
|
1028
|
-
const s =
|
|
1029
|
-
return
|
|
898
|
+
const s = In(50, 250);
|
|
899
|
+
return jn((o) => {
|
|
1030
900
|
const i = o.loaded, a = o.lengthComputable ? o.total : void 0, d = i - r, u = s(d), l = i <= a;
|
|
1031
901
|
r = i;
|
|
1032
902
|
const p = {
|
|
@@ -1042,17 +912,17 @@ const ae = (e, t, n = 3) => {
|
|
|
1042
912
|
};
|
|
1043
913
|
e(p);
|
|
1044
914
|
}, n);
|
|
1045
|
-
},
|
|
915
|
+
}, Ie = (e, t) => {
|
|
1046
916
|
const n = e != null;
|
|
1047
917
|
return [(r) => t[0]({
|
|
1048
918
|
lengthComputable: n,
|
|
1049
919
|
total: e,
|
|
1050
920
|
loaded: r
|
|
1051
921
|
}), t[1]];
|
|
1052
|
-
},
|
|
1053
|
-
new URL(
|
|
1054
|
-
|
|
1055
|
-
) : () => !0,
|
|
922
|
+
}, je = (e) => (...t) => c.asap(() => e(...t)), Mn = T.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, T.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
923
|
+
new URL(T.origin),
|
|
924
|
+
T.navigator && /(msie|trident)/i.test(T.navigator.userAgent)
|
|
925
|
+
) : () => !0, $n = T.hasStandardBrowserEnv ? (
|
|
1056
926
|
// Standard browser envs support document.cookie
|
|
1057
927
|
{
|
|
1058
928
|
write(e, t, n, r, s, o, i) {
|
|
@@ -1081,28 +951,28 @@ const ae = (e, t, n = 3) => {
|
|
|
1081
951
|
}
|
|
1082
952
|
}
|
|
1083
953
|
);
|
|
1084
|
-
function
|
|
954
|
+
function Hn(e) {
|
|
1085
955
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1086
956
|
}
|
|
1087
|
-
function
|
|
957
|
+
function qn(e, t) {
|
|
1088
958
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1089
959
|
}
|
|
1090
|
-
function
|
|
1091
|
-
let r = !
|
|
1092
|
-
return e && (r || n == !1) ?
|
|
960
|
+
function pt(e, t, n) {
|
|
961
|
+
let r = !Hn(t);
|
|
962
|
+
return e && (r || n == !1) ? qn(e, t) : t;
|
|
1093
963
|
}
|
|
1094
|
-
const
|
|
1095
|
-
function
|
|
964
|
+
const Me = (e) => e instanceof N ? { ...e } : e;
|
|
965
|
+
function M(e, t) {
|
|
1096
966
|
t = t || {};
|
|
1097
967
|
const n = {};
|
|
1098
|
-
function r(u, l, p,
|
|
1099
|
-
return c.isPlainObject(u) && c.isPlainObject(l) ? c.merge.call({ caseless:
|
|
968
|
+
function r(u, l, p, E) {
|
|
969
|
+
return c.isPlainObject(u) && c.isPlainObject(l) ? c.merge.call({ caseless: E }, u, l) : c.isPlainObject(l) ? c.merge({}, l) : c.isArray(l) ? l.slice() : l;
|
|
1100
970
|
}
|
|
1101
|
-
function s(u, l, p,
|
|
971
|
+
function s(u, l, p, E) {
|
|
1102
972
|
if (c.isUndefined(l)) {
|
|
1103
973
|
if (!c.isUndefined(u))
|
|
1104
|
-
return r(void 0, u, p,
|
|
1105
|
-
} else return r(u, l, p,
|
|
974
|
+
return r(void 0, u, p, E);
|
|
975
|
+
} else return r(u, l, p, E);
|
|
1106
976
|
}
|
|
1107
977
|
function o(u, l) {
|
|
1108
978
|
if (!c.isUndefined(l))
|
|
@@ -1149,21 +1019,21 @@ function $(e, t) {
|
|
|
1149
1019
|
socketPath: i,
|
|
1150
1020
|
responseEncoding: i,
|
|
1151
1021
|
validateStatus: a,
|
|
1152
|
-
headers: (u, l, p) => s(
|
|
1022
|
+
headers: (u, l, p) => s(Me(u), Me(l), p, !0)
|
|
1153
1023
|
};
|
|
1154
1024
|
return c.forEach(Object.keys({ ...e, ...t }), function(l) {
|
|
1155
|
-
const p = d[l] || s,
|
|
1156
|
-
c.isUndefined(
|
|
1025
|
+
const p = d[l] || s, E = p(e[l], t[l], l);
|
|
1026
|
+
c.isUndefined(E) && p !== a || (n[l] = E);
|
|
1157
1027
|
}), n;
|
|
1158
1028
|
}
|
|
1159
|
-
const
|
|
1160
|
-
const t =
|
|
1029
|
+
const mt = (e) => {
|
|
1030
|
+
const t = M({}, e);
|
|
1161
1031
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: a } = t;
|
|
1162
|
-
if (t.headers = i = N.from(i), t.url = pt(
|
|
1032
|
+
if (t.headers = i = N.from(i), t.url = ct(pt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && i.set(
|
|
1163
1033
|
"Authorization",
|
|
1164
1034
|
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
1165
1035
|
), c.isFormData(n)) {
|
|
1166
|
-
if (
|
|
1036
|
+
if (T.hasStandardBrowserEnv || T.hasStandardBrowserWebWorkerEnv)
|
|
1167
1037
|
i.setContentType(void 0);
|
|
1168
1038
|
else if (c.isFunction(n.getHeaders)) {
|
|
1169
1039
|
const d = n.getHeaders(), u = ["content-type", "content-length"];
|
|
@@ -1172,70 +1042,70 @@ const gt = (e) => {
|
|
|
1172
1042
|
});
|
|
1173
1043
|
}
|
|
1174
1044
|
}
|
|
1175
|
-
if (
|
|
1176
|
-
const d = s && o &&
|
|
1045
|
+
if (T.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(t)), r || r !== !1 && Mn(t.url))) {
|
|
1046
|
+
const d = s && o && $n.read(o);
|
|
1177
1047
|
d && i.set(s, d);
|
|
1178
1048
|
}
|
|
1179
1049
|
return t;
|
|
1180
|
-
},
|
|
1050
|
+
}, zn = typeof XMLHttpRequest < "u", vn = zn && function(e) {
|
|
1181
1051
|
return new Promise(function(n, r) {
|
|
1182
|
-
const s =
|
|
1052
|
+
const s = mt(e);
|
|
1183
1053
|
let o = s.data;
|
|
1184
1054
|
const i = N.from(s.headers).normalize();
|
|
1185
|
-
let { responseType: a, onUploadProgress: d, onDownloadProgress: u } = s, l, p,
|
|
1186
|
-
function
|
|
1055
|
+
let { responseType: a, onUploadProgress: d, onDownloadProgress: u } = s, l, p, E, _, f;
|
|
1056
|
+
function h() {
|
|
1187
1057
|
_ && _(), f && f(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1188
1058
|
}
|
|
1189
|
-
let
|
|
1190
|
-
|
|
1059
|
+
let m = new XMLHttpRequest();
|
|
1060
|
+
m.open(s.method.toUpperCase(), s.url, !0), m.timeout = s.timeout;
|
|
1191
1061
|
function g() {
|
|
1192
|
-
if (!
|
|
1062
|
+
if (!m)
|
|
1193
1063
|
return;
|
|
1194
1064
|
const y = N.from(
|
|
1195
|
-
"getAllResponseHeaders" in
|
|
1196
|
-
),
|
|
1197
|
-
data: !a || a === "text" || a === "json" ?
|
|
1198
|
-
status:
|
|
1199
|
-
statusText:
|
|
1065
|
+
"getAllResponseHeaders" in m && m.getAllResponseHeaders()
|
|
1066
|
+
), A = {
|
|
1067
|
+
data: !a || a === "text" || a === "json" ? m.responseText : m.response,
|
|
1068
|
+
status: m.status,
|
|
1069
|
+
statusText: m.statusText,
|
|
1200
1070
|
headers: y,
|
|
1201
1071
|
config: e,
|
|
1202
|
-
request:
|
|
1072
|
+
request: m
|
|
1203
1073
|
};
|
|
1204
|
-
|
|
1205
|
-
n(
|
|
1206
|
-
}, function(
|
|
1207
|
-
r(
|
|
1208
|
-
},
|
|
1074
|
+
dt(function(x) {
|
|
1075
|
+
n(x), h();
|
|
1076
|
+
}, function(x) {
|
|
1077
|
+
r(x), h();
|
|
1078
|
+
}, A), m = null;
|
|
1209
1079
|
}
|
|
1210
|
-
"onloadend" in
|
|
1211
|
-
!
|
|
1212
|
-
},
|
|
1213
|
-
|
|
1214
|
-
},
|
|
1215
|
-
const
|
|
1216
|
-
|
|
1217
|
-
},
|
|
1218
|
-
let
|
|
1219
|
-
const
|
|
1220
|
-
s.timeoutErrorMessage && (
|
|
1221
|
-
|
|
1222
|
-
|
|
1080
|
+
"onloadend" in m ? m.onloadend = g : m.onreadystatechange = function() {
|
|
1081
|
+
!m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(g);
|
|
1082
|
+
}, m.onabort = function() {
|
|
1083
|
+
m && (r(new w("Request aborted", w.ECONNABORTED, e, m)), m = null);
|
|
1084
|
+
}, m.onerror = function(S) {
|
|
1085
|
+
const A = S && S.message ? S.message : "Network Error", U = new w(A, w.ERR_NETWORK, e, m);
|
|
1086
|
+
U.event = S || null, r(U), m = null;
|
|
1087
|
+
}, m.ontimeout = function() {
|
|
1088
|
+
let S = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1089
|
+
const A = s.transitional || lt;
|
|
1090
|
+
s.timeoutErrorMessage && (S = s.timeoutErrorMessage), r(new w(
|
|
1091
|
+
S,
|
|
1092
|
+
A.clarifyTimeoutError ? w.ETIMEDOUT : w.ECONNABORTED,
|
|
1223
1093
|
e,
|
|
1224
|
-
|
|
1225
|
-
)),
|
|
1226
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in
|
|
1227
|
-
|
|
1228
|
-
}), c.isUndefined(s.withCredentials) || (
|
|
1229
|
-
|
|
1094
|
+
m
|
|
1095
|
+
)), m = null;
|
|
1096
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in m && c.forEach(i.toJSON(), function(S, A) {
|
|
1097
|
+
m.setRequestHeader(A, S);
|
|
1098
|
+
}), c.isUndefined(s.withCredentials) || (m.withCredentials = !!s.withCredentials), a && a !== "json" && (m.responseType = s.responseType), u && ([E, f] = oe(u, !0), m.addEventListener("progress", E)), d && m.upload && ([p, _] = oe(d), m.upload.addEventListener("progress", p), m.upload.addEventListener("loadend", _)), (s.cancelToken || s.signal) && (l = (y) => {
|
|
1099
|
+
m && (r(!y || y.type ? new G(null, e, m) : y), m.abort(), m = null);
|
|
1230
1100
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1231
|
-
const R =
|
|
1232
|
-
if (R &&
|
|
1101
|
+
const R = Bn(s.url);
|
|
1102
|
+
if (R && T.protocols.indexOf(R) === -1) {
|
|
1233
1103
|
r(new w("Unsupported protocol " + R + ":", w.ERR_BAD_REQUEST, e));
|
|
1234
1104
|
return;
|
|
1235
1105
|
}
|
|
1236
|
-
|
|
1106
|
+
m.send(o || null);
|
|
1237
1107
|
});
|
|
1238
|
-
},
|
|
1108
|
+
}, Jn = (e, t) => {
|
|
1239
1109
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1240
1110
|
if (t || n) {
|
|
1241
1111
|
let r = new AbortController(), s;
|
|
@@ -1243,7 +1113,7 @@ const gt = (e) => {
|
|
|
1243
1113
|
if (!s) {
|
|
1244
1114
|
s = !0, a();
|
|
1245
1115
|
const l = u instanceof Error ? u : this.reason;
|
|
1246
|
-
r.abort(l instanceof w ? l : new
|
|
1116
|
+
r.abort(l instanceof w ? l : new G(l instanceof Error ? l.message : l));
|
|
1247
1117
|
}
|
|
1248
1118
|
};
|
|
1249
1119
|
let i = t && setTimeout(() => {
|
|
@@ -1258,7 +1128,7 @@ const gt = (e) => {
|
|
|
1258
1128
|
const { signal: d } = r;
|
|
1259
1129
|
return d.unsubscribe = () => c.asap(a), d;
|
|
1260
1130
|
}
|
|
1261
|
-
},
|
|
1131
|
+
}, Vn = function* (e, t) {
|
|
1262
1132
|
let n = e.byteLength;
|
|
1263
1133
|
if (n < t) {
|
|
1264
1134
|
yield e;
|
|
@@ -1267,10 +1137,10 @@ const gt = (e) => {
|
|
|
1267
1137
|
let r = 0, s;
|
|
1268
1138
|
for (; r < n; )
|
|
1269
1139
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1270
|
-
},
|
|
1271
|
-
for await (const n of
|
|
1272
|
-
yield*
|
|
1273
|
-
},
|
|
1140
|
+
}, Kn = async function* (e, t) {
|
|
1141
|
+
for await (const n of Wn(e))
|
|
1142
|
+
yield* Vn(n, t);
|
|
1143
|
+
}, Wn = async function* (e) {
|
|
1274
1144
|
if (e[Symbol.asyncIterator]) {
|
|
1275
1145
|
yield* e;
|
|
1276
1146
|
return;
|
|
@@ -1286,8 +1156,8 @@ const gt = (e) => {
|
|
|
1286
1156
|
} finally {
|
|
1287
1157
|
await t.cancel();
|
|
1288
1158
|
}
|
|
1289
|
-
},
|
|
1290
|
-
const s =
|
|
1159
|
+
}, $e = (e, t, n, r) => {
|
|
1160
|
+
const s = Kn(e, t);
|
|
1291
1161
|
let o = 0, i, a = (d) => {
|
|
1292
1162
|
i || (i = !0, r && r(d));
|
|
1293
1163
|
};
|
|
@@ -1301,8 +1171,8 @@ const gt = (e) => {
|
|
|
1301
1171
|
}
|
|
1302
1172
|
let p = l.byteLength;
|
|
1303
1173
|
if (n) {
|
|
1304
|
-
let
|
|
1305
|
-
n(
|
|
1174
|
+
let E = o += p;
|
|
1175
|
+
n(E);
|
|
1306
1176
|
}
|
|
1307
1177
|
d.enqueue(new Uint8Array(l));
|
|
1308
1178
|
} catch (u) {
|
|
@@ -1315,53 +1185,53 @@ const gt = (e) => {
|
|
|
1315
1185
|
}, {
|
|
1316
1186
|
highWaterMark: 2
|
|
1317
1187
|
});
|
|
1318
|
-
},
|
|
1188
|
+
}, He = 64 * 1024, { isFunction: te } = c, Xn = (({ Request: e, Response: t }) => ({
|
|
1319
1189
|
Request: e,
|
|
1320
1190
|
Response: t
|
|
1321
1191
|
}))(c.global), {
|
|
1322
|
-
ReadableStream:
|
|
1323
|
-
TextEncoder:
|
|
1324
|
-
} = c.global,
|
|
1192
|
+
ReadableStream: qe,
|
|
1193
|
+
TextEncoder: ze
|
|
1194
|
+
} = c.global, ve = (e, ...t) => {
|
|
1325
1195
|
try {
|
|
1326
1196
|
return !!e(...t);
|
|
1327
1197
|
} catch {
|
|
1328
1198
|
return !1;
|
|
1329
1199
|
}
|
|
1330
|
-
},
|
|
1200
|
+
}, Gn = (e) => {
|
|
1331
1201
|
e = c.merge.call({
|
|
1332
1202
|
skipUndefined: !0
|
|
1333
|
-
},
|
|
1334
|
-
const { fetch: t, Request: n, Response: r } = e, s = t ?
|
|
1203
|
+
}, Xn, e);
|
|
1204
|
+
const { fetch: t, Request: n, Response: r } = e, s = t ? te(t) : typeof fetch == "function", o = te(n), i = te(r);
|
|
1335
1205
|
if (!s)
|
|
1336
1206
|
return !1;
|
|
1337
|
-
const a = s &&
|
|
1207
|
+
const a = s && te(qe), d = s && (typeof ze == "function" ? /* @__PURE__ */ ((f) => (h) => f.encode(h))(new ze()) : async (f) => new Uint8Array(await new n(f).arrayBuffer())), u = o && a && ve(() => {
|
|
1338
1208
|
let f = !1;
|
|
1339
|
-
const
|
|
1340
|
-
body: new
|
|
1209
|
+
const h = new n(T.origin, {
|
|
1210
|
+
body: new qe(),
|
|
1341
1211
|
method: "POST",
|
|
1342
1212
|
get duplex() {
|
|
1343
1213
|
return f = !0, "half";
|
|
1344
1214
|
}
|
|
1345
1215
|
}).headers.has("Content-Type");
|
|
1346
|
-
return f && !
|
|
1347
|
-
}), l = i && a &&
|
|
1216
|
+
return f && !h;
|
|
1217
|
+
}), l = i && a && ve(() => c.isReadableStream(new r("").body)), p = {
|
|
1348
1218
|
stream: l && ((f) => f.body)
|
|
1349
1219
|
};
|
|
1350
1220
|
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((f) => {
|
|
1351
|
-
!p[f] && (p[f] = (
|
|
1352
|
-
let g =
|
|
1221
|
+
!p[f] && (p[f] = (h, m) => {
|
|
1222
|
+
let g = h && h[f];
|
|
1353
1223
|
if (g)
|
|
1354
|
-
return g.call(
|
|
1355
|
-
throw new w(`Response type '${f}' is not supported`, w.ERR_NOT_SUPPORT,
|
|
1224
|
+
return g.call(h);
|
|
1225
|
+
throw new w(`Response type '${f}' is not supported`, w.ERR_NOT_SUPPORT, m);
|
|
1356
1226
|
});
|
|
1357
1227
|
});
|
|
1358
|
-
const
|
|
1228
|
+
const E = async (f) => {
|
|
1359
1229
|
if (f == null)
|
|
1360
1230
|
return 0;
|
|
1361
1231
|
if (c.isBlob(f))
|
|
1362
1232
|
return f.size;
|
|
1363
1233
|
if (c.isSpecCompliantForm(f))
|
|
1364
|
-
return (await new n(
|
|
1234
|
+
return (await new n(T.origin, {
|
|
1365
1235
|
method: "POST",
|
|
1366
1236
|
body: f
|
|
1367
1237
|
}).arrayBuffer()).byteLength;
|
|
@@ -1369,117 +1239,117 @@ const gt = (e) => {
|
|
|
1369
1239
|
return f.byteLength;
|
|
1370
1240
|
if (c.isURLSearchParams(f) && (f = f + ""), c.isString(f))
|
|
1371
1241
|
return (await d(f)).byteLength;
|
|
1372
|
-
}, _ = async (f,
|
|
1373
|
-
const
|
|
1374
|
-
return
|
|
1242
|
+
}, _ = async (f, h) => {
|
|
1243
|
+
const m = c.toFiniteNumber(f.getContentLength());
|
|
1244
|
+
return m ?? E(h);
|
|
1375
1245
|
};
|
|
1376
1246
|
return async (f) => {
|
|
1377
1247
|
let {
|
|
1378
|
-
url:
|
|
1379
|
-
method:
|
|
1248
|
+
url: h,
|
|
1249
|
+
method: m,
|
|
1380
1250
|
data: g,
|
|
1381
1251
|
signal: R,
|
|
1382
1252
|
cancelToken: y,
|
|
1383
|
-
timeout:
|
|
1384
|
-
onDownloadProgress:
|
|
1385
|
-
onUploadProgress:
|
|
1386
|
-
responseType:
|
|
1387
|
-
headers:
|
|
1388
|
-
withCredentials:
|
|
1389
|
-
fetchOptions:
|
|
1390
|
-
} =
|
|
1391
|
-
|
|
1392
|
-
let
|
|
1393
|
-
const
|
|
1394
|
-
|
|
1253
|
+
timeout: S,
|
|
1254
|
+
onDownloadProgress: A,
|
|
1255
|
+
onUploadProgress: U,
|
|
1256
|
+
responseType: x,
|
|
1257
|
+
headers: fe,
|
|
1258
|
+
withCredentials: Q = "same-origin",
|
|
1259
|
+
fetchOptions: Te
|
|
1260
|
+
} = mt(f), Ae = t || fetch;
|
|
1261
|
+
x = x ? (x + "").toLowerCase() : "text";
|
|
1262
|
+
let Y = Jn([R, y && y.toAbortSignal()], S), z = null;
|
|
1263
|
+
const B = Y && Y.unsubscribe && (() => {
|
|
1264
|
+
Y.unsubscribe();
|
|
1395
1265
|
});
|
|
1396
|
-
let
|
|
1266
|
+
let Ce;
|
|
1397
1267
|
try {
|
|
1398
|
-
if (
|
|
1399
|
-
let
|
|
1268
|
+
if (U && u && m !== "get" && m !== "head" && (Ce = await _(fe, g)) !== 0) {
|
|
1269
|
+
let k = new n(h, {
|
|
1400
1270
|
method: "POST",
|
|
1401
1271
|
body: g,
|
|
1402
1272
|
duplex: "half"
|
|
1403
|
-
}),
|
|
1404
|
-
if (c.isFormData(g) && (
|
|
1405
|
-
const [
|
|
1406
|
-
|
|
1407
|
-
|
|
1273
|
+
}), $;
|
|
1274
|
+
if (c.isFormData(g) && ($ = k.headers.get("content-type")) && fe.setContentType($), k.body) {
|
|
1275
|
+
const [de, Z] = Ie(
|
|
1276
|
+
Ce,
|
|
1277
|
+
oe(je(U))
|
|
1408
1278
|
);
|
|
1409
|
-
g =
|
|
1279
|
+
g = $e(k.body, He, de, Z);
|
|
1410
1280
|
}
|
|
1411
1281
|
}
|
|
1412
|
-
c.isString(
|
|
1413
|
-
const
|
|
1414
|
-
...
|
|
1415
|
-
signal:
|
|
1416
|
-
method:
|
|
1417
|
-
headers:
|
|
1282
|
+
c.isString(Q) || (Q = Q ? "include" : "omit");
|
|
1283
|
+
const D = o && "credentials" in n.prototype, Ne = {
|
|
1284
|
+
...Te,
|
|
1285
|
+
signal: Y,
|
|
1286
|
+
method: m.toUpperCase(),
|
|
1287
|
+
headers: fe.normalize().toJSON(),
|
|
1418
1288
|
body: g,
|
|
1419
1289
|
duplex: "half",
|
|
1420
|
-
credentials:
|
|
1290
|
+
credentials: D ? Q : void 0
|
|
1421
1291
|
};
|
|
1422
|
-
|
|
1423
|
-
let
|
|
1424
|
-
const
|
|
1425
|
-
if (l && (
|
|
1426
|
-
const
|
|
1427
|
-
["status", "statusText", "headers"].forEach((
|
|
1428
|
-
|
|
1292
|
+
z = o && new n(h, Ne);
|
|
1293
|
+
let L = await (o ? Ae(z, Te) : Ae(h, Ne));
|
|
1294
|
+
const xe = l && (x === "stream" || x === "response");
|
|
1295
|
+
if (l && (A || xe && B)) {
|
|
1296
|
+
const k = {};
|
|
1297
|
+
["status", "statusText", "headers"].forEach((Pe) => {
|
|
1298
|
+
k[Pe] = L[Pe];
|
|
1429
1299
|
});
|
|
1430
|
-
const
|
|
1431
|
-
|
|
1432
|
-
|
|
1300
|
+
const $ = c.toFiniteNumber(L.headers.get("content-length")), [de, Z] = A && Ie(
|
|
1301
|
+
$,
|
|
1302
|
+
oe(je(A), !0)
|
|
1433
1303
|
) || [];
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1304
|
+
L = new r(
|
|
1305
|
+
$e(L.body, He, de, () => {
|
|
1306
|
+
Z && Z(), B && B();
|
|
1437
1307
|
}),
|
|
1438
|
-
|
|
1308
|
+
k
|
|
1439
1309
|
);
|
|
1440
1310
|
}
|
|
1441
|
-
|
|
1442
|
-
let
|
|
1443
|
-
return !
|
|
1444
|
-
|
|
1445
|
-
data:
|
|
1446
|
-
headers: N.from(
|
|
1447
|
-
status:
|
|
1448
|
-
statusText:
|
|
1311
|
+
x = x || "text";
|
|
1312
|
+
let gt = await p[c.findKey(p, x) || "text"](L, f);
|
|
1313
|
+
return !xe && B && B(), await new Promise((k, $) => {
|
|
1314
|
+
dt(k, $, {
|
|
1315
|
+
data: gt,
|
|
1316
|
+
headers: N.from(L.headers),
|
|
1317
|
+
status: L.status,
|
|
1318
|
+
statusText: L.statusText,
|
|
1449
1319
|
config: f,
|
|
1450
|
-
request:
|
|
1320
|
+
request: z
|
|
1451
1321
|
});
|
|
1452
1322
|
});
|
|
1453
|
-
} catch (
|
|
1454
|
-
throw
|
|
1455
|
-
new w("Network Error", w.ERR_NETWORK, f,
|
|
1323
|
+
} catch (D) {
|
|
1324
|
+
throw B && B(), D && D.name === "TypeError" && /Load failed|fetch/i.test(D.message) ? Object.assign(
|
|
1325
|
+
new w("Network Error", w.ERR_NETWORK, f, z),
|
|
1456
1326
|
{
|
|
1457
|
-
cause:
|
|
1327
|
+
cause: D.cause || D
|
|
1458
1328
|
}
|
|
1459
|
-
) : w.from(
|
|
1329
|
+
) : w.from(D, D && D.code, f, z);
|
|
1460
1330
|
}
|
|
1461
1331
|
};
|
|
1462
|
-
},
|
|
1332
|
+
}, Qn = /* @__PURE__ */ new Map(), ht = (e) => {
|
|
1463
1333
|
let t = e && e.env || {};
|
|
1464
1334
|
const { fetch: n, Request: r, Response: s } = t, o = [
|
|
1465
1335
|
r,
|
|
1466
1336
|
s,
|
|
1467
1337
|
n
|
|
1468
1338
|
];
|
|
1469
|
-
let i = o.length, a = i, d, u, l =
|
|
1339
|
+
let i = o.length, a = i, d, u, l = Qn;
|
|
1470
1340
|
for (; a--; )
|
|
1471
|
-
d = o[a], u = l.get(d), u === void 0 && l.set(d, u = a ? /* @__PURE__ */ new Map() :
|
|
1341
|
+
d = o[a], u = l.get(d), u === void 0 && l.set(d, u = a ? /* @__PURE__ */ new Map() : Gn(t)), l = u;
|
|
1472
1342
|
return u;
|
|
1473
1343
|
};
|
|
1474
|
-
|
|
1475
|
-
const
|
|
1476
|
-
http:
|
|
1477
|
-
xhr:
|
|
1344
|
+
ht();
|
|
1345
|
+
const _e = {
|
|
1346
|
+
http: mn,
|
|
1347
|
+
xhr: vn,
|
|
1478
1348
|
fetch: {
|
|
1479
|
-
get:
|
|
1349
|
+
get: ht
|
|
1480
1350
|
}
|
|
1481
1351
|
};
|
|
1482
|
-
c.forEach(
|
|
1352
|
+
c.forEach(_e, (e, t) => {
|
|
1483
1353
|
if (e) {
|
|
1484
1354
|
try {
|
|
1485
1355
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1488,8 +1358,8 @@ c.forEach(Ce, (e, t) => {
|
|
|
1488
1358
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1489
1359
|
}
|
|
1490
1360
|
});
|
|
1491
|
-
const
|
|
1492
|
-
function
|
|
1361
|
+
const Je = (e) => `- ${e}`, Yn = (e) => c.isFunction(e) || e === null || e === !1;
|
|
1362
|
+
function Zn(e, t) {
|
|
1493
1363
|
e = c.isArray(e) ? e : [e];
|
|
1494
1364
|
const { length: n } = e;
|
|
1495
1365
|
let r, s;
|
|
@@ -1497,7 +1367,7 @@ function ar(e, t) {
|
|
|
1497
1367
|
for (let i = 0; i < n; i++) {
|
|
1498
1368
|
r = e[i];
|
|
1499
1369
|
let a;
|
|
1500
|
-
if (s = r, !
|
|
1370
|
+
if (s = r, !Yn(r) && (s = _e[(a = String(r)).toLowerCase()], s === void 0))
|
|
1501
1371
|
throw new w(`Unknown adapter '${a}'`);
|
|
1502
1372
|
if (s && (c.isFunction(s) || (s = s.get(t))))
|
|
1503
1373
|
break;
|
|
@@ -1508,8 +1378,8 @@ function ar(e, t) {
|
|
|
1508
1378
|
([d, u]) => `adapter ${d} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1509
1379
|
);
|
|
1510
1380
|
let a = n ? i.length > 1 ? `since :
|
|
1511
|
-
` + i.map(
|
|
1512
|
-
`) : " " +
|
|
1381
|
+
` + i.map(Je).join(`
|
|
1382
|
+
`) : " " + Je(i[0]) : "as no adapter specified";
|
|
1513
1383
|
throw new w(
|
|
1514
1384
|
"There is no suitable adapter to dispatch the request " + a,
|
|
1515
1385
|
"ERR_NOT_SUPPORT"
|
|
@@ -1517,50 +1387,50 @@ function ar(e, t) {
|
|
|
1517
1387
|
}
|
|
1518
1388
|
return s;
|
|
1519
1389
|
}
|
|
1520
|
-
const
|
|
1390
|
+
const yt = {
|
|
1521
1391
|
/**
|
|
1522
1392
|
* Resolve an adapter from a list of adapter names or functions.
|
|
1523
1393
|
* @type {Function}
|
|
1524
1394
|
*/
|
|
1525
|
-
getAdapter:
|
|
1395
|
+
getAdapter: Zn,
|
|
1526
1396
|
/**
|
|
1527
1397
|
* Exposes all known adapters
|
|
1528
1398
|
* @type {Object<string, Function|Object>}
|
|
1529
1399
|
*/
|
|
1530
|
-
adapters:
|
|
1400
|
+
adapters: _e
|
|
1531
1401
|
};
|
|
1532
|
-
function
|
|
1402
|
+
function he(e) {
|
|
1533
1403
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1534
|
-
throw new
|
|
1404
|
+
throw new G(null, e);
|
|
1535
1405
|
}
|
|
1536
|
-
function
|
|
1537
|
-
return
|
|
1406
|
+
function Ve(e) {
|
|
1407
|
+
return he(e), e.headers = N.from(e.headers), e.data = me.call(
|
|
1538
1408
|
e,
|
|
1539
1409
|
e.transformRequest
|
|
1540
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1541
|
-
return
|
|
1410
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), yt.getAdapter(e.adapter || X.adapter, e)(e).then(function(r) {
|
|
1411
|
+
return he(e), r.data = me.call(
|
|
1542
1412
|
e,
|
|
1543
1413
|
e.transformResponse,
|
|
1544
1414
|
r
|
|
1545
1415
|
), r.headers = N.from(r.headers), r;
|
|
1546
1416
|
}, function(r) {
|
|
1547
|
-
return
|
|
1417
|
+
return ft(r) || (he(e), r && r.response && (r.response.data = me.call(
|
|
1548
1418
|
e,
|
|
1549
1419
|
e.transformResponse,
|
|
1550
1420
|
r.response
|
|
1551
1421
|
), r.response.headers = N.from(r.response.headers))), Promise.reject(r);
|
|
1552
1422
|
});
|
|
1553
1423
|
}
|
|
1554
|
-
const
|
|
1424
|
+
const wt = "1.13.4", ue = {};
|
|
1555
1425
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1556
|
-
|
|
1426
|
+
ue[e] = function(r) {
|
|
1557
1427
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1558
1428
|
};
|
|
1559
1429
|
});
|
|
1560
|
-
const
|
|
1561
|
-
|
|
1430
|
+
const Ke = {};
|
|
1431
|
+
ue.transitional = function(t, n, r) {
|
|
1562
1432
|
function s(o, i) {
|
|
1563
|
-
return "[Axios v" +
|
|
1433
|
+
return "[Axios v" + wt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1564
1434
|
}
|
|
1565
1435
|
return (o, i, a) => {
|
|
1566
1436
|
if (t === !1)
|
|
@@ -1568,7 +1438,7 @@ de.transitional = function(t, n, r) {
|
|
|
1568
1438
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1569
1439
|
w.ERR_DEPRECATED
|
|
1570
1440
|
);
|
|
1571
|
-
return n && !
|
|
1441
|
+
return n && !Ke[i] && (Ke[i] = !0, console.warn(
|
|
1572
1442
|
s(
|
|
1573
1443
|
i,
|
|
1574
1444
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1576,10 +1446,10 @@ de.transitional = function(t, n, r) {
|
|
|
1576
1446
|
)), t ? t(o, i, a) : !0;
|
|
1577
1447
|
};
|
|
1578
1448
|
};
|
|
1579
|
-
|
|
1449
|
+
ue.spelling = function(t) {
|
|
1580
1450
|
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1581
1451
|
};
|
|
1582
|
-
function
|
|
1452
|
+
function er(e, t, n) {
|
|
1583
1453
|
if (typeof e != "object")
|
|
1584
1454
|
throw new w("options must be an object", w.ERR_BAD_OPTION_VALUE);
|
|
1585
1455
|
const r = Object.keys(e);
|
|
@@ -1596,15 +1466,15 @@ function cr(e, t, n) {
|
|
|
1596
1466
|
throw new w("Unknown option " + o, w.ERR_BAD_OPTION);
|
|
1597
1467
|
}
|
|
1598
1468
|
}
|
|
1599
|
-
const
|
|
1600
|
-
assertOptions:
|
|
1601
|
-
validators:
|
|
1602
|
-
},
|
|
1603
|
-
let
|
|
1469
|
+
const se = {
|
|
1470
|
+
assertOptions: er,
|
|
1471
|
+
validators: ue
|
|
1472
|
+
}, F = se.validators;
|
|
1473
|
+
let j = class {
|
|
1604
1474
|
constructor(t) {
|
|
1605
1475
|
this.defaults = t || {}, this.interceptors = {
|
|
1606
|
-
request: new
|
|
1607
|
-
response: new
|
|
1476
|
+
request: new ke(),
|
|
1477
|
+
response: new ke()
|
|
1608
1478
|
};
|
|
1609
1479
|
}
|
|
1610
1480
|
/**
|
|
@@ -1633,20 +1503,20 @@ let M = class {
|
|
|
1633
1503
|
}
|
|
1634
1504
|
}
|
|
1635
1505
|
_request(t, n) {
|
|
1636
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1506
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = M(this.defaults, n);
|
|
1637
1507
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1638
|
-
r !== void 0 &&
|
|
1639
|
-
silentJSONParsing:
|
|
1640
|
-
forcedJSONParsing:
|
|
1641
|
-
clarifyTimeoutError:
|
|
1508
|
+
r !== void 0 && se.assertOptions(r, {
|
|
1509
|
+
silentJSONParsing: F.transitional(F.boolean),
|
|
1510
|
+
forcedJSONParsing: F.transitional(F.boolean),
|
|
1511
|
+
clarifyTimeoutError: F.transitional(F.boolean)
|
|
1642
1512
|
}, !1), s != null && (c.isFunction(s) ? n.paramsSerializer = {
|
|
1643
1513
|
serialize: s
|
|
1644
|
-
} :
|
|
1645
|
-
encode:
|
|
1646
|
-
serialize:
|
|
1647
|
-
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
1648
|
-
baseUrl:
|
|
1649
|
-
withXsrfToken:
|
|
1514
|
+
} : se.assertOptions(s, {
|
|
1515
|
+
encode: F.function,
|
|
1516
|
+
serialize: F.function
|
|
1517
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), se.assertOptions(n, {
|
|
1518
|
+
baseUrl: F.spelling("baseURL"),
|
|
1519
|
+
withXsrfToken: F.spelling("withXSRFToken")
|
|
1650
1520
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1651
1521
|
let i = o && c.merge(
|
|
1652
1522
|
o.common,
|
|
@@ -1660,49 +1530,49 @@ let M = class {
|
|
|
1660
1530
|
), n.headers = N.concat(i, o);
|
|
1661
1531
|
const a = [];
|
|
1662
1532
|
let d = !0;
|
|
1663
|
-
this.interceptors.request.forEach(function(
|
|
1664
|
-
typeof
|
|
1533
|
+
this.interceptors.request.forEach(function(h) {
|
|
1534
|
+
typeof h.runWhen == "function" && h.runWhen(n) === !1 || (d = d && h.synchronous, a.unshift(h.fulfilled, h.rejected));
|
|
1665
1535
|
});
|
|
1666
1536
|
const u = [];
|
|
1667
|
-
this.interceptors.response.forEach(function(
|
|
1668
|
-
u.push(
|
|
1537
|
+
this.interceptors.response.forEach(function(h) {
|
|
1538
|
+
u.push(h.fulfilled, h.rejected);
|
|
1669
1539
|
});
|
|
1670
|
-
let l, p = 0,
|
|
1540
|
+
let l, p = 0, E;
|
|
1671
1541
|
if (!d) {
|
|
1672
|
-
const f = [
|
|
1673
|
-
for (f.unshift(...a), f.push(...u),
|
|
1542
|
+
const f = [Ve.bind(this), void 0];
|
|
1543
|
+
for (f.unshift(...a), f.push(...u), E = f.length, l = Promise.resolve(n); p < E; )
|
|
1674
1544
|
l = l.then(f[p++], f[p++]);
|
|
1675
1545
|
return l;
|
|
1676
1546
|
}
|
|
1677
|
-
|
|
1547
|
+
E = a.length;
|
|
1678
1548
|
let _ = n;
|
|
1679
|
-
for (; p <
|
|
1680
|
-
const f = a[p++],
|
|
1549
|
+
for (; p < E; ) {
|
|
1550
|
+
const f = a[p++], h = a[p++];
|
|
1681
1551
|
try {
|
|
1682
1552
|
_ = f(_);
|
|
1683
|
-
} catch (
|
|
1684
|
-
|
|
1553
|
+
} catch (m) {
|
|
1554
|
+
h.call(this, m);
|
|
1685
1555
|
break;
|
|
1686
1556
|
}
|
|
1687
1557
|
}
|
|
1688
1558
|
try {
|
|
1689
|
-
l =
|
|
1559
|
+
l = Ve.call(this, _);
|
|
1690
1560
|
} catch (f) {
|
|
1691
1561
|
return Promise.reject(f);
|
|
1692
1562
|
}
|
|
1693
|
-
for (p = 0,
|
|
1563
|
+
for (p = 0, E = u.length; p < E; )
|
|
1694
1564
|
l = l.then(u[p++], u[p++]);
|
|
1695
1565
|
return l;
|
|
1696
1566
|
}
|
|
1697
1567
|
getUri(t) {
|
|
1698
|
-
t =
|
|
1699
|
-
const n =
|
|
1700
|
-
return
|
|
1568
|
+
t = M(this.defaults, t);
|
|
1569
|
+
const n = pt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1570
|
+
return ct(n, t.params, t.paramsSerializer);
|
|
1701
1571
|
}
|
|
1702
1572
|
};
|
|
1703
1573
|
c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1704
|
-
|
|
1705
|
-
return this.request(
|
|
1574
|
+
j.prototype[t] = function(n, r) {
|
|
1575
|
+
return this.request(M(r || {}, {
|
|
1706
1576
|
method: t,
|
|
1707
1577
|
url: n,
|
|
1708
1578
|
data: (r || {}).data
|
|
@@ -1712,7 +1582,7 @@ c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1712
1582
|
c.forEach(["post", "put", "patch"], function(t) {
|
|
1713
1583
|
function n(r) {
|
|
1714
1584
|
return function(o, i, a) {
|
|
1715
|
-
return this.request(
|
|
1585
|
+
return this.request(M(a || {}, {
|
|
1716
1586
|
method: t,
|
|
1717
1587
|
headers: r ? {
|
|
1718
1588
|
"Content-Type": "multipart/form-data"
|
|
@@ -1722,9 +1592,9 @@ c.forEach(["post", "put", "patch"], function(t) {
|
|
|
1722
1592
|
}));
|
|
1723
1593
|
};
|
|
1724
1594
|
}
|
|
1725
|
-
|
|
1595
|
+
j.prototype[t] = n(), j.prototype[t + "Form"] = n(!0);
|
|
1726
1596
|
});
|
|
1727
|
-
let
|
|
1597
|
+
let tr = class Et {
|
|
1728
1598
|
constructor(t) {
|
|
1729
1599
|
if (typeof t != "function")
|
|
1730
1600
|
throw new TypeError("executor must be a function.");
|
|
@@ -1748,7 +1618,7 @@ let lr = class Ot {
|
|
|
1748
1618
|
r.unsubscribe(o);
|
|
1749
1619
|
}, i;
|
|
1750
1620
|
}, t(function(o, i, a) {
|
|
1751
|
-
r.reason || (r.reason = new
|
|
1621
|
+
r.reason || (r.reason = new G(o, i, a), n(r.reason));
|
|
1752
1622
|
});
|
|
1753
1623
|
}
|
|
1754
1624
|
/**
|
|
@@ -1790,22 +1660,22 @@ let lr = class Ot {
|
|
|
1790
1660
|
static source() {
|
|
1791
1661
|
let t;
|
|
1792
1662
|
return {
|
|
1793
|
-
token: new
|
|
1663
|
+
token: new Et(function(s) {
|
|
1794
1664
|
t = s;
|
|
1795
1665
|
}),
|
|
1796
1666
|
cancel: t
|
|
1797
1667
|
};
|
|
1798
1668
|
}
|
|
1799
1669
|
};
|
|
1800
|
-
function
|
|
1670
|
+
function nr(e) {
|
|
1801
1671
|
return function(n) {
|
|
1802
1672
|
return e.apply(null, n);
|
|
1803
1673
|
};
|
|
1804
1674
|
}
|
|
1805
|
-
function
|
|
1675
|
+
function rr(e) {
|
|
1806
1676
|
return c.isObject(e) && e.isAxiosError === !0;
|
|
1807
1677
|
}
|
|
1808
|
-
const
|
|
1678
|
+
const be = {
|
|
1809
1679
|
Continue: 100,
|
|
1810
1680
|
SwitchingProtocols: 101,
|
|
1811
1681
|
Processing: 102,
|
|
@@ -1876,56 +1746,56 @@ const Re = {
|
|
|
1876
1746
|
SslHandshakeFailed: 525,
|
|
1877
1747
|
InvalidSslCertificate: 526
|
|
1878
1748
|
};
|
|
1879
|
-
Object.entries(
|
|
1880
|
-
|
|
1749
|
+
Object.entries(be).forEach(([e, t]) => {
|
|
1750
|
+
be[t] = e;
|
|
1881
1751
|
});
|
|
1882
|
-
function
|
|
1883
|
-
const t = new
|
|
1884
|
-
return c.extend(n,
|
|
1885
|
-
return
|
|
1752
|
+
function bt(e) {
|
|
1753
|
+
const t = new j(e), n = Qe(j.prototype.request, t);
|
|
1754
|
+
return c.extend(n, j.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1755
|
+
return bt(M(e, s));
|
|
1886
1756
|
}, n;
|
|
1887
1757
|
}
|
|
1888
|
-
const O =
|
|
1889
|
-
O.Axios =
|
|
1890
|
-
O.CanceledError =
|
|
1891
|
-
O.CancelToken =
|
|
1892
|
-
O.isCancel =
|
|
1893
|
-
O.VERSION =
|
|
1894
|
-
O.toFormData =
|
|
1758
|
+
const O = bt(X);
|
|
1759
|
+
O.Axios = j;
|
|
1760
|
+
O.CanceledError = G;
|
|
1761
|
+
O.CancelToken = tr;
|
|
1762
|
+
O.isCancel = ft;
|
|
1763
|
+
O.VERSION = wt;
|
|
1764
|
+
O.toFormData = le;
|
|
1895
1765
|
O.AxiosError = w;
|
|
1896
1766
|
O.Cancel = O.CanceledError;
|
|
1897
1767
|
O.all = function(t) {
|
|
1898
1768
|
return Promise.all(t);
|
|
1899
1769
|
};
|
|
1900
|
-
O.spread =
|
|
1901
|
-
O.isAxiosError =
|
|
1902
|
-
O.mergeConfig =
|
|
1770
|
+
O.spread = nr;
|
|
1771
|
+
O.isAxiosError = rr;
|
|
1772
|
+
O.mergeConfig = M;
|
|
1903
1773
|
O.AxiosHeaders = N;
|
|
1904
|
-
O.formToJSON = (e) =>
|
|
1905
|
-
O.getAdapter =
|
|
1906
|
-
O.HttpStatusCode =
|
|
1774
|
+
O.formToJSON = (e) => ut(c.isHTMLForm(e) ? new FormData(e) : e);
|
|
1775
|
+
O.getAdapter = yt.getAdapter;
|
|
1776
|
+
O.HttpStatusCode = be;
|
|
1907
1777
|
O.default = O;
|
|
1908
1778
|
const {
|
|
1909
|
-
Axios:
|
|
1910
|
-
AxiosError:
|
|
1911
|
-
CanceledError:
|
|
1912
|
-
isCancel:
|
|
1913
|
-
CancelToken:
|
|
1914
|
-
VERSION:
|
|
1915
|
-
all:
|
|
1916
|
-
Cancel:
|
|
1917
|
-
isAxiosError:
|
|
1918
|
-
spread:
|
|
1919
|
-
toFormData:
|
|
1920
|
-
AxiosHeaders:
|
|
1921
|
-
HttpStatusCode:
|
|
1922
|
-
formToJSON:
|
|
1923
|
-
getAdapter:
|
|
1924
|
-
mergeConfig:
|
|
1925
|
-
} = O,
|
|
1926
|
-
class
|
|
1927
|
-
constructor(t, n =
|
|
1928
|
-
|
|
1779
|
+
Axios: Er,
|
|
1780
|
+
AxiosError: br,
|
|
1781
|
+
CanceledError: gr,
|
|
1782
|
+
isCancel: Sr,
|
|
1783
|
+
CancelToken: Rr,
|
|
1784
|
+
VERSION: Or,
|
|
1785
|
+
all: _r,
|
|
1786
|
+
Cancel: Tr,
|
|
1787
|
+
isAxiosError: Ar,
|
|
1788
|
+
spread: Cr,
|
|
1789
|
+
toFormData: Nr,
|
|
1790
|
+
AxiosHeaders: xr,
|
|
1791
|
+
HttpStatusCode: Pr,
|
|
1792
|
+
formToJSON: Dr,
|
|
1793
|
+
getAdapter: Fr,
|
|
1794
|
+
mergeConfig: Ur
|
|
1795
|
+
} = O, sr = "http://localhost:8000/api";
|
|
1796
|
+
class or {
|
|
1797
|
+
constructor(t, n = sr) {
|
|
1798
|
+
De(this, "client");
|
|
1929
1799
|
this.client = O.create({
|
|
1930
1800
|
baseURL: n,
|
|
1931
1801
|
headers: {
|
|
@@ -1989,8 +1859,8 @@ class pr {
|
|
|
1989
1859
|
this.client.defaults.baseURL = t;
|
|
1990
1860
|
}
|
|
1991
1861
|
}
|
|
1992
|
-
function
|
|
1993
|
-
const [n, r] =
|
|
1862
|
+
function We(e, t) {
|
|
1863
|
+
const [n, r] = J(() => {
|
|
1994
1864
|
try {
|
|
1995
1865
|
const o = window.localStorage.getItem(e);
|
|
1996
1866
|
return o ? JSON.parse(o) : t;
|
|
@@ -2007,23 +1877,23 @@ function Ze(e, t) {
|
|
|
2007
1877
|
}
|
|
2008
1878
|
}];
|
|
2009
1879
|
}
|
|
2010
|
-
function
|
|
1880
|
+
function Xe() {
|
|
2011
1881
|
return `session_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`;
|
|
2012
1882
|
}
|
|
2013
|
-
const
|
|
2014
|
-
function
|
|
2015
|
-
const { apiKey: t, baseUrl: n, onError: r } = e, [s, o] =
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
), [d, u] =
|
|
2019
|
-
|
|
2020
|
-
|
|
1883
|
+
const ir = "customer_support_session_id", ar = "customer_support_messages";
|
|
1884
|
+
function cr(e) {
|
|
1885
|
+
const { apiKey: t, baseUrl: n, onError: r } = e, [s, o] = We(ar, []), [i, a] = We(
|
|
1886
|
+
ir,
|
|
1887
|
+
Xe()
|
|
1888
|
+
), [d, u] = J(!1), [l, p] = J(null), E = Ge(null);
|
|
1889
|
+
ge(() => {
|
|
1890
|
+
E.current = new or(t, n);
|
|
2021
1891
|
}, [t, n]);
|
|
2022
|
-
const _ =
|
|
1892
|
+
const _ = ee(() => {
|
|
2023
1893
|
p(null);
|
|
2024
|
-
}, []), f =
|
|
1894
|
+
}, []), f = ee(
|
|
2025
1895
|
async (g) => {
|
|
2026
|
-
if (!
|
|
1896
|
+
if (!E.current) {
|
|
2027
1897
|
const y = new Error("API client not initialized");
|
|
2028
1898
|
p(y), r == null || r(y);
|
|
2029
1899
|
return;
|
|
@@ -2038,35 +1908,35 @@ function yr(e) {
|
|
|
2038
1908
|
};
|
|
2039
1909
|
o((y) => [...y, R]), u(!0), p(null);
|
|
2040
1910
|
try {
|
|
2041
|
-
const y = await
|
|
1911
|
+
const y = await E.current.sendMessage(g, i), S = {
|
|
2042
1912
|
id: `assistant_${Date.now()}`,
|
|
2043
1913
|
role: "ASSISTANT",
|
|
2044
1914
|
content: y.answer,
|
|
2045
1915
|
timestamp: /* @__PURE__ */ new Date(),
|
|
2046
1916
|
sources: y.sources
|
|
2047
1917
|
};
|
|
2048
|
-
o((
|
|
1918
|
+
o((A) => [...A, S]), y.session_id !== i && a(y.session_id);
|
|
2049
1919
|
} catch (y) {
|
|
2050
|
-
const
|
|
2051
|
-
p(
|
|
2052
|
-
const
|
|
1920
|
+
const S = y instanceof Error ? y : new Error("Failed to send message");
|
|
1921
|
+
p(S), r == null || r(S);
|
|
1922
|
+
const A = {
|
|
2053
1923
|
id: `error_${Date.now()}`,
|
|
2054
1924
|
role: "ASSISTANT",
|
|
2055
|
-
content: `Sorry, I encountered an error: ${
|
|
1925
|
+
content: `Sorry, I encountered an error: ${S.message}`,
|
|
2056
1926
|
timestamp: /* @__PURE__ */ new Date()
|
|
2057
1927
|
};
|
|
2058
|
-
o((
|
|
1928
|
+
o((U) => [...U, A]);
|
|
2059
1929
|
} finally {
|
|
2060
1930
|
u(!1);
|
|
2061
1931
|
}
|
|
2062
1932
|
},
|
|
2063
1933
|
[i, r, o, a]
|
|
2064
|
-
),
|
|
2065
|
-
if (!(!
|
|
1934
|
+
), h = ee(async () => {
|
|
1935
|
+
if (!(!E.current || !i)) {
|
|
2066
1936
|
u(!0), p(null);
|
|
2067
1937
|
try {
|
|
2068
|
-
const R = (await
|
|
2069
|
-
id: `${y.role.toLowerCase()}_${
|
|
1938
|
+
const R = (await E.current.getConversationHistory(i)).messages.map((y, S) => ({
|
|
1939
|
+
id: `${y.role.toLowerCase()}_${S}_${Date.now()}`,
|
|
2070
1940
|
role: y.role,
|
|
2071
1941
|
content: y.content,
|
|
2072
1942
|
timestamp: new Date(y.created_at)
|
|
@@ -2079,8 +1949,8 @@ function yr(e) {
|
|
|
2079
1949
|
u(!1);
|
|
2080
1950
|
}
|
|
2081
1951
|
}
|
|
2082
|
-
}, [i, r, o]),
|
|
2083
|
-
o([]), a(
|
|
1952
|
+
}, [i, r, o]), m = ee(() => {
|
|
1953
|
+
o([]), a(Xe());
|
|
2084
1954
|
}, [o, a]);
|
|
2085
1955
|
return {
|
|
2086
1956
|
messages: s,
|
|
@@ -2089,76 +1959,56 @@ function yr(e) {
|
|
|
2089
1959
|
error: l,
|
|
2090
1960
|
clearError: _,
|
|
2091
1961
|
sessionId: i,
|
|
2092
|
-
loadHistory:
|
|
2093
|
-
clearHistory:
|
|
1962
|
+
loadHistory: h,
|
|
1963
|
+
clearHistory: m
|
|
2094
1964
|
};
|
|
2095
1965
|
}
|
|
2096
|
-
const
|
|
1966
|
+
const lr = ({ message: e }) => {
|
|
2097
1967
|
const t = e.role === "USER", n = e.timestamp instanceof Date ? e.timestamp : new Date(e.timestamp);
|
|
2098
|
-
return /* @__PURE__ */
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
className: "cs-message__source-link",
|
|
2111
|
-
children: [
|
|
2112
|
-
/* @__PURE__ */ S(Dt, { size: 12 }),
|
|
2113
|
-
/* @__PURE__ */ S("span", { children: r.title })
|
|
2114
|
-
]
|
|
2115
|
-
}
|
|
2116
|
-
),
|
|
2117
|
-
/* @__PURE__ */ x("span", { className: "cs-message__source-similarity", children: [
|
|
2118
|
-
Math.round(r.similarity * 100),
|
|
2119
|
-
"% match"
|
|
2120
|
-
] })
|
|
2121
|
-
] }, s)) })
|
|
2122
|
-
] })
|
|
2123
|
-
] }),
|
|
2124
|
-
/* @__PURE__ */ S("time", { className: "cs-message__time", dateTime: n.toISOString(), children: n.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) })
|
|
2125
|
-
] });
|
|
2126
|
-
}, br = ({
|
|
1968
|
+
return /* @__PURE__ */ b.createElement("div", { className: `cs-message ${t ? "cs-message--user" : "cs-message--assistant"}` }, /* @__PURE__ */ b.createElement("div", { className: "cs-message__content" }, /* @__PURE__ */ b.createElement("p", { className: "cs-message__text" }, e.content), e.sources && e.sources.length > 0 && /* @__PURE__ */ b.createElement("div", { className: "cs-message__sources" }, /* @__PURE__ */ b.createElement("p", { className: "cs-message__sources-title" }, "Sources:"), /* @__PURE__ */ b.createElement("ul", { className: "cs-message__sources-list" }, e.sources.map((r, s) => /* @__PURE__ */ b.createElement("li", { key: s, className: "cs-message__source-item" }, /* @__PURE__ */ b.createElement(
|
|
1969
|
+
"a",
|
|
1970
|
+
{
|
|
1971
|
+
href: r.url,
|
|
1972
|
+
target: "_blank",
|
|
1973
|
+
rel: "noopener noreferrer",
|
|
1974
|
+
className: "cs-message__source-link"
|
|
1975
|
+
},
|
|
1976
|
+
/* @__PURE__ */ b.createElement(Ot, { size: 12 }),
|
|
1977
|
+
/* @__PURE__ */ b.createElement("span", null, r.title)
|
|
1978
|
+
), /* @__PURE__ */ b.createElement("span", { className: "cs-message__source-similarity" }, Math.round(r.similarity * 100), "% match")))))), /* @__PURE__ */ b.createElement("time", { className: "cs-message__time", dateTime: n.toISOString() }, n.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })));
|
|
1979
|
+
}, ur = ({
|
|
2127
1980
|
onSendMessage: e,
|
|
2128
1981
|
isLoading: t,
|
|
2129
1982
|
placeholder: n = "Type your message..."
|
|
2130
1983
|
}) => {
|
|
2131
|
-
const [r, s] =
|
|
1984
|
+
const [r, s] = J(""), o = (a) => {
|
|
2132
1985
|
a.preventDefault(), r.trim() && !t && (e(r), s(""));
|
|
1986
|
+
}, i = (a) => {
|
|
1987
|
+
a.key === "Enter" && !a.shiftKey && (a.preventDefault(), o(a));
|
|
2133
1988
|
};
|
|
2134
|
-
return /* @__PURE__ */
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
children: /* @__PURE__ */ S(Lt, { size: 20 })
|
|
2158
|
-
}
|
|
2159
|
-
)
|
|
2160
|
-
] });
|
|
2161
|
-
}, gr = ({
|
|
1989
|
+
return /* @__PURE__ */ b.createElement("form", { className: "cs-input", onSubmit: o }, /* @__PURE__ */ b.createElement(
|
|
1990
|
+
"textarea",
|
|
1991
|
+
{
|
|
1992
|
+
className: "cs-input__textarea",
|
|
1993
|
+
value: r,
|
|
1994
|
+
onChange: (a) => s(a.target.value),
|
|
1995
|
+
onKeyDown: i,
|
|
1996
|
+
placeholder: n,
|
|
1997
|
+
disabled: t,
|
|
1998
|
+
rows: 1,
|
|
1999
|
+
"aria-label": "Message input"
|
|
2000
|
+
}
|
|
2001
|
+
), /* @__PURE__ */ b.createElement(
|
|
2002
|
+
"button",
|
|
2003
|
+
{
|
|
2004
|
+
type: "submit",
|
|
2005
|
+
className: "cs-input__button",
|
|
2006
|
+
disabled: !r.trim() || t,
|
|
2007
|
+
"aria-label": "Send message"
|
|
2008
|
+
},
|
|
2009
|
+
/* @__PURE__ */ b.createElement(_t, { size: 20 })
|
|
2010
|
+
));
|
|
2011
|
+
}, fr = ({
|
|
2162
2012
|
messages: e,
|
|
2163
2013
|
onSendMessage: t,
|
|
2164
2014
|
onClose: n,
|
|
@@ -2167,43 +2017,27 @@ const wr = ({ message: e }) => {
|
|
|
2167
2017
|
placeholder: o,
|
|
2168
2018
|
welcomeMessage: i = "Hi! How can I help you today?"
|
|
2169
2019
|
}) => {
|
|
2170
|
-
const a =
|
|
2171
|
-
return
|
|
2020
|
+
const a = Ge(null);
|
|
2021
|
+
return ge(() => {
|
|
2172
2022
|
var d;
|
|
2173
2023
|
(d = a.current) == null || d.scrollIntoView({ behavior: "smooth" });
|
|
2174
|
-
}, [e]), /* @__PURE__ */
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
/* @__PURE__ */ S(Ft, { size: 20, className: "cs-window__typing-icon" }),
|
|
2192
|
-
/* @__PURE__ */ S("span", { children: "Thinking..." })
|
|
2193
|
-
] }),
|
|
2194
|
-
s && /* @__PURE__ */ S("div", { className: "cs-window__error", children: /* @__PURE__ */ S("p", { children: s.message }) }),
|
|
2195
|
-
/* @__PURE__ */ S("div", { ref: a })
|
|
2196
|
-
] }),
|
|
2197
|
-
/* @__PURE__ */ S("div", { className: "cs-window__input-wrapper", children: /* @__PURE__ */ S(
|
|
2198
|
-
br,
|
|
2199
|
-
{
|
|
2200
|
-
onSendMessage: t,
|
|
2201
|
-
isLoading: r,
|
|
2202
|
-
placeholder: o
|
|
2203
|
-
}
|
|
2204
|
-
) })
|
|
2205
|
-
] });
|
|
2206
|
-
}, Hr = ({
|
|
2024
|
+
}, [e]), /* @__PURE__ */ b.createElement("div", { className: "cs-window" }, /* @__PURE__ */ b.createElement("div", { className: "cs-window__header" }, /* @__PURE__ */ b.createElement("h3", { className: "cs-window__title" }, "Customer Support"), /* @__PURE__ */ b.createElement(
|
|
2025
|
+
"button",
|
|
2026
|
+
{
|
|
2027
|
+
className: "cs-window__close",
|
|
2028
|
+
onClick: n,
|
|
2029
|
+
"aria-label": "Close chat"
|
|
2030
|
+
},
|
|
2031
|
+
/* @__PURE__ */ b.createElement(Tt, { size: 20 })
|
|
2032
|
+
)), /* @__PURE__ */ b.createElement("div", { className: "cs-window__messages" }, e.length === 0 && !r && /* @__PURE__ */ b.createElement("div", { className: "cs-window__welcome" }, /* @__PURE__ */ b.createElement("p", null, i)), e.map((d) => /* @__PURE__ */ b.createElement(lr, { key: d.id, message: d })), r && /* @__PURE__ */ b.createElement("div", { className: "cs-window__typing" }, /* @__PURE__ */ b.createElement(At, { size: 20, className: "cs-window__typing-icon" }), /* @__PURE__ */ b.createElement("span", null, "Thinking...")), s && /* @__PURE__ */ b.createElement("div", { className: "cs-window__error" }, /* @__PURE__ */ b.createElement("p", null, s.message)), /* @__PURE__ */ b.createElement("div", { ref: a })), /* @__PURE__ */ b.createElement("div", { className: "cs-window__input-wrapper" }, /* @__PURE__ */ b.createElement(
|
|
2033
|
+
ur,
|
|
2034
|
+
{
|
|
2035
|
+
onSendMessage: t,
|
|
2036
|
+
isLoading: r,
|
|
2037
|
+
placeholder: o
|
|
2038
|
+
}
|
|
2039
|
+
)));
|
|
2040
|
+
}, Lr = ({
|
|
2207
2041
|
apiKey: e,
|
|
2208
2042
|
baseUrl: t,
|
|
2209
2043
|
theme: n,
|
|
@@ -2215,66 +2049,61 @@ const wr = ({ message: e }) => {
|
|
|
2215
2049
|
onMessageSent: d,
|
|
2216
2050
|
onMessageReceived: u
|
|
2217
2051
|
}) => {
|
|
2218
|
-
const [l, p] =
|
|
2219
|
-
messages:
|
|
2052
|
+
const [l, p] = J(!1), {
|
|
2053
|
+
messages: E,
|
|
2220
2054
|
sendMessage: _,
|
|
2221
2055
|
isLoading: f,
|
|
2222
|
-
error:
|
|
2223
|
-
clearError:
|
|
2224
|
-
} =
|
|
2056
|
+
error: h,
|
|
2057
|
+
clearError: m
|
|
2058
|
+
} = cr({
|
|
2225
2059
|
apiKey: e,
|
|
2226
2060
|
baseUrl: t,
|
|
2227
2061
|
onError: a
|
|
2228
2062
|
});
|
|
2229
|
-
|
|
2063
|
+
ge(() => {
|
|
2230
2064
|
if (n) {
|
|
2231
2065
|
const y = document.documentElement;
|
|
2232
2066
|
n.primaryColor && y.style.setProperty("--cs-primary-color", n.primaryColor), n.secondaryColor && y.style.setProperty("--cs-secondary-color", n.secondaryColor), n.backgroundColor && y.style.setProperty("--cs-bg-color", n.backgroundColor), n.textColor && y.style.setProperty("--cs-text-color", n.textColor), n.fontFamily && y.style.setProperty("--cs-font-family", n.fontFamily), n.borderRadius && y.style.setProperty("--cs-border-radius", n.borderRadius), n.buttonColor && y.style.setProperty("--cs-button-color", n.buttonColor), n.userMessageColor && y.style.setProperty("--cs-user-message-color", n.userMessageColor), n.assistantMessageColor && y.style.setProperty("--cs-assistant-message-color", n.assistantMessageColor);
|
|
2233
2067
|
}
|
|
2234
2068
|
}, [n]);
|
|
2235
2069
|
const g = async (y) => {
|
|
2236
|
-
if (d == null || d(y), await _(y), !
|
|
2237
|
-
const
|
|
2238
|
-
(
|
|
2070
|
+
if (d == null || d(y), await _(y), !h) {
|
|
2071
|
+
const S = E[E.length - 1];
|
|
2072
|
+
(S == null ? void 0 : S.role) === "ASSISTANT" && (u == null || u(S.content));
|
|
2239
2073
|
}
|
|
2240
2074
|
}, R = () => {
|
|
2241
|
-
p(!l),
|
|
2075
|
+
p(!l), h && m();
|
|
2242
2076
|
};
|
|
2243
|
-
return /* @__PURE__ */
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
"
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
!l && b.length > 0 && /* @__PURE__ */ S("span", { className: "cs-widget__badge", children: b.filter((y) => y.role === "ASSISTANT").length })
|
|
2266
|
-
]
|
|
2267
|
-
}
|
|
2268
|
-
)
|
|
2269
|
-
] });
|
|
2077
|
+
return /* @__PURE__ */ b.createElement("div", { className: `cs-widget cs-widget--${r} ${i}` }, l && /* @__PURE__ */ b.createElement(
|
|
2078
|
+
fr,
|
|
2079
|
+
{
|
|
2080
|
+
messages: E,
|
|
2081
|
+
onSendMessage: g,
|
|
2082
|
+
onClose: () => p(!1),
|
|
2083
|
+
isLoading: f,
|
|
2084
|
+
error: h,
|
|
2085
|
+
placeholder: o,
|
|
2086
|
+
welcomeMessage: s
|
|
2087
|
+
}
|
|
2088
|
+
), /* @__PURE__ */ b.createElement(
|
|
2089
|
+
"button",
|
|
2090
|
+
{
|
|
2091
|
+
className: `cs-widget__toggle ${l ? "cs-widget__toggle--open" : ""}`,
|
|
2092
|
+
onClick: R,
|
|
2093
|
+
"aria-label": l ? "Close chat" : "Open chat",
|
|
2094
|
+
"aria-expanded": l
|
|
2095
|
+
},
|
|
2096
|
+
/* @__PURE__ */ b.createElement(Ct, { size: 24 }),
|
|
2097
|
+
!l && E.length > 0 && /* @__PURE__ */ b.createElement("span", { className: "cs-widget__badge" }, E.filter((y) => y.role === "ASSISTANT").length)
|
|
2098
|
+
));
|
|
2270
2099
|
};
|
|
2271
2100
|
export {
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2101
|
+
ur as ChatInput,
|
|
2102
|
+
lr as ChatMessage,
|
|
2103
|
+
fr as ChatWindow,
|
|
2104
|
+
or as CustomerSupportAPIClient,
|
|
2105
|
+
Lr as CustomerSupportWidget,
|
|
2106
|
+
cr as useCustomerSupport,
|
|
2107
|
+
We as useLocalStorage
|
|
2279
2108
|
};
|
|
2280
2109
|
//# sourceMappingURL=index.es.js.map
|