@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 CHANGED
@@ -1,182 +1,52 @@
1
- var Tt = Object.defineProperty;
2
- var Ct = (e, t, n) => t in e ? Tt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var Le = (e, t, n) => Ct(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { jsxs as x, jsx as S } from "react/jsx-runtime";
5
- import { forwardRef as Ye, createElement as be, useState as K, useRef as et, useEffect as Oe, useCallback as ne } from "react";
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: Bt } = Object.prototype, { getPrototypeOf: _e } = Object, { iterator: ce, toStringTag: rt } = Symbol, le = /* @__PURE__ */ ((e) => (t) => {
142
- const n = Bt.call(t);
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)), D = (e) => (e = e.toLowerCase(), (t) => le(t) === e), ue = (e) => (t) => typeof t === e, { isArray: z } = Array, H = ue("undefined");
145
- function W(e) {
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 st = D("ArrayBuffer");
149
- function It(e) {
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 && st(e.buffer), t;
21
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ze(e.buffer), t;
152
22
  }
153
- const jt = ue("string"), C = ue("function"), ot = ue("number"), X = (e) => e !== null && typeof e == "object", Mt = (e) => e === !0 || e === !1, se = (e) => {
154
- if (le(e) !== "object")
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 = _e(e);
157
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(rt in e) && !(ce in e);
158
- }, $t = (e) => {
159
- if (!X(e) || W(e))
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
- }, qt = D("Date"), Ht = D("File"), zt = D("Blob"), vt = D("FileList"), Jt = (e) => X(e) && C(e.pipe), Kt = (e) => {
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 = le(e)) === "formdata" || // detect form-data instance
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
- }, Vt = D("URLSearchParams"), [Wt, Xt, Gt, Zt] = ["ReadableStream", "Request", "Response", "Headers"].map(D), Qt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
171
- function G(e, t, { allOwnKeys: n = !1 } = {}) {
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]), z(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 (W(e))
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 it(e, t) {
188
- if (W(e))
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 j = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, at = (e) => !H(e) && e !== j;
199
- function ge() {
200
- const { caseless: e, skipUndefined: t } = at(this) && this || {}, n = {}, r = (s, o) => {
201
- const i = e && it(n, o) || o;
202
- se(n[i]) && se(s) ? n[i] = ge(n[i], s) : se(s) ? n[i] = ge({}, s) : z(s) ? n[i] = s.slice() : (!t || !H(s)) && (n[i] = s);
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] && G(arguments[s], r);
75
+ arguments[s] && W(arguments[s], r);
206
76
  return n;
207
77
  }
208
- const Yt = (e, t, n, { allOwnKeys: r } = {}) => (G(t, (s, o) => {
78
+ const Jt = (e, t, n, { allOwnKeys: r } = {}) => (W(t, (s, o) => {
209
79
  n && C(s) ? Object.defineProperty(e, o, {
210
- value: nt(s, n),
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), en = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), tn = (e, t, n, r) => {
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
- }, nn = (e, t, n, r) => {
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 && _e(e);
106
+ e = n !== !1 && Se(e);
237
107
  } while (e && (!n || n(e, t)) && e !== Object.prototype);
238
108
  return t;
239
- }, rn = (e, t, n) => {
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
- }, sn = (e) => {
113
+ }, Gt = (e) => {
244
114
  if (!e) return null;
245
- if (z(e)) return e;
115
+ if (q(e)) return e;
246
116
  let t = e.length;
247
- if (!ot(t)) return null;
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
- }, on = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && _e(Uint8Array)), an = (e, t) => {
253
- const r = (e && e[ce]).call(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
- }, cn = (e, t) => {
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
- }, ln = D("HTMLFormElement"), un = (e) => e.toLowerCase().replace(
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
- ), ke = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), fn = D("RegExp"), ct = (e, t) => {
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
- G(n, (s, o) => {
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
- }, dn = (e) => {
277
- ct(e, (t, n) => {
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
- }, pn = (e, t) => {
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 z(e) ? r(e) : r(String(e).split(t)), n;
298
- }, hn = () => {
299
- }, mn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
300
- function yn(e) {
301
- return !!(e && C(e.append) && e[rt] === "FormData" && e[ce]);
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 wn = (e) => {
173
+ const ln = (e) => {
304
174
  const t = new Array(10), n = (r, s) => {
305
- if (X(r)) {
175
+ if (K(r)) {
306
176
  if (t.indexOf(r) >= 0)
307
177
  return;
308
- if (W(r))
178
+ if (V(r))
309
179
  return r;
310
180
  if (!("toJSON" in r)) {
311
181
  t[s] = r;
312
- const o = z(r) ? [] : {};
313
- return G(r, (i, a) => {
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
- }, bn = D("AsyncFunction"), gn = (e) => e && (X(e) || C(e)) && C(e.then) && C(e.catch), lt = ((e, t) => e ? setImmediate : t ? ((n, r) => (j.addEventListener("message", ({ source: s, data: o }) => {
323
- s === j && o === n && r.length && r.shift()();
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), j.postMessage(n, "*");
195
+ r.push(s), I.postMessage(n, "*");
326
196
  }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
327
197
  typeof setImmediate == "function",
328
- C(j.postMessage)
329
- ), En = typeof queueMicrotask < "u" ? queueMicrotask.bind(j) : typeof process < "u" && process.nextTick || lt, Sn = (e) => e != null && C(e[ce]), c = {
330
- isArray: z,
331
- isArrayBuffer: st,
332
- isBuffer: W,
333
- isFormData: Kt,
334
- isArrayBufferView: It,
335
- isString: jt,
336
- isNumber: ot,
337
- isBoolean: Mt,
338
- isObject: X,
339
- isPlainObject: se,
340
- isEmptyObject: $t,
341
- isReadableStream: Wt,
342
- isRequest: Xt,
343
- isResponse: Gt,
344
- isHeaders: Zt,
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: qt,
347
- isFile: Ht,
348
- isBlob: zt,
349
- isRegExp: fn,
216
+ isDate: Ut,
217
+ isFile: Lt,
218
+ isBlob: kt,
219
+ isRegExp: nn,
350
220
  isFunction: C,
351
- isStream: Jt,
352
- isURLSearchParams: Vt,
353
- isTypedArray: on,
354
- isFileList: vt,
355
- forEach: G,
356
- merge: ge,
357
- extend: Yt,
358
- trim: Qt,
359
- stripBOM: en,
360
- inherits: tn,
361
- toFlatObject: nn,
362
- kindOf: le,
363
- kindOfTest: D,
364
- endsWith: rn,
365
- toArray: sn,
366
- forEachEntry: an,
367
- matchAll: cn,
368
- isHTMLForm: ln,
369
- hasOwnProperty: ke,
370
- hasOwnProp: ke,
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: ct,
373
- freezeMethods: dn,
374
- toObjectSet: pn,
375
- toCamelCase: un,
376
- noop: hn,
377
- toFiniteNumber: mn,
378
- findKey: it,
379
- global: j,
380
- isContextDefined: at,
381
- isSpecCompliantForm: yn,
382
- toJSONObject: wn,
383
- isAsyncFn: bn,
384
- isThenable: gn,
385
- setImmediate: lt,
386
- asap: En,
387
- isIterable: Sn
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 ut extends Error {
259
+ let w = class ot extends Error {
390
260
  static from(t, n, r, s, o, i) {
391
- const a = new ut(t.message, n || t.code, r, s, o);
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 Rn = null;
441
- function Ee(e) {
310
+ const mn = null;
311
+ function we(e) {
442
312
  return c.isPlainObject(e) || c.isArray(e);
443
313
  }
444
- function ft(e) {
314
+ function it(e) {
445
315
  return c.endsWith(e, "[]") ? e.slice(0, -2) : e;
446
316
  }
447
- function Be(e, t, n) {
317
+ function Ue(e, t, n) {
448
318
  return e ? e.concat(t).map(function(s, o) {
449
- return s = ft(s), !n && o ? "[" + s + "]" : s;
319
+ return s = it(s), !n && o ? "[" + s + "]" : s;
450
320
  }).join(n ? "." : "") : t;
451
321
  }
452
- function On(e) {
453
- return c.isArray(e) && !e.some(Ee);
322
+ function hn(e) {
323
+ return c.isArray(e) && !e.some(we);
454
324
  }
455
- const _n = c.toFlatObject(c, {}, null, function(t) {
325
+ const yn = c.toFlatObject(c, {}, null, function(t) {
456
326
  return /^is[A-Z]/.test(t);
457
327
  });
458
- function fe(e, t, n) {
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(m, h) {
466
- return !c.isUndefined(h[m]);
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, m, h) {
351
+ function l(f, h, m) {
482
352
  let g = f;
483
- if (f && !h && typeof f == "object") {
484
- if (c.endsWith(m, "{}"))
485
- m = r ? m : m.slice(0, -2), f = JSON.stringify(f);
486
- else if (c.isArray(f) && On(f) || (c.isFileList(f) || c.endsWith(m, "[]")) && (g = c.toArray(f)))
487
- return m = ft(m), g.forEach(function(y, E) {
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 ? Be([m], E, o) : i === null ? m : m + "[]",
360
+ i === !0 ? Ue([h], S, o) : i === null ? h : h + "[]",
491
361
  u(y)
492
362
  );
493
363
  }), !1;
494
364
  }
495
- return Ee(f) ? !0 : (t.append(Be(h, m, o), u(f)), !1);
365
+ return we(f) ? !0 : (t.append(Ue(m, h, o), u(f)), !1);
496
366
  }
497
- const p = [], b = Object.assign(_n, {
367
+ const p = [], E = Object.assign(yn, {
498
368
  defaultVisitor: l,
499
369
  convertValue: u,
500
- isVisitable: Ee
370
+ isVisitable: we
501
371
  });
502
- function _(f, m) {
372
+ function _(f, h) {
503
373
  if (!c.isUndefined(f)) {
504
374
  if (p.indexOf(f) !== -1)
505
- throw Error("Circular reference detected in " + m.join("."));
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
- m,
512
- b
513
- )) === !0 && _(g, m ? m.concat(R) : [R]);
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 Ie(e) {
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 Ae(e, t) {
536
- this._pairs = [], e && fe(e, this, t);
405
+ function Re(e, t) {
406
+ this._pairs = [], e && le(e, this, t);
537
407
  }
538
- const dt = Ae.prototype;
539
- dt.append = function(t, n) {
408
+ const at = Re.prototype;
409
+ at.append = function(t, n) {
540
410
  this._pairs.push([t, n]);
541
411
  };
542
- dt.toString = function(t) {
412
+ at.toString = function(t) {
543
413
  const n = t ? function(r) {
544
- return t.call(this, r, Ie);
545
- } : Ie;
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 An(e) {
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 pt(e, t, n) {
423
+ function ct(e, t, n) {
554
424
  if (!t)
555
425
  return e;
556
- const r = n && n.encode || An, s = c.isFunction(n) ? {
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 Ae(t, s).toString(r), i) {
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 je {
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 ht = {
491
+ const lt = {
622
492
  silentJSONParsing: !0,
623
493
  forcedJSONParsing: !0,
624
494
  clarifyTimeoutError: !1
625
- }, Tn = typeof URLSearchParams < "u" ? URLSearchParams : Ae, Cn = typeof FormData < "u" ? FormData : null, Nn = typeof Blob < "u" ? Blob : null, xn = {
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: Tn,
629
- FormData: Cn,
630
- Blob: Nn
498
+ URLSearchParams: En,
499
+ FormData: bn,
500
+ Blob: gn
631
501
  },
632
502
  protocols: ["http", "https", "file", "blob", "url", "data"]
633
- }, Te = typeof window < "u" && typeof document < "u", Se = typeof navigator == "object" && navigator || void 0, Pn = Te && (!Se || ["ReactNative", "NativeScript", "NS"].indexOf(Se.product) < 0), Dn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
634
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Fn = Te && window.location.href || "http://localhost", Un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
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: Te,
637
- hasStandardBrowserEnv: Pn,
638
- hasStandardBrowserWebWorkerEnv: Dn,
639
- navigator: Se,
640
- origin: Fn
641
- }, Symbol.toStringTag, { value: "Module" })), A = {
642
- ...Un,
643
- ...xn
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 Ln(e, t) {
646
- return fe(e, new A.classes.URLSearchParams(), {
515
+ function An(e, t) {
516
+ return le(e, new T.classes.URLSearchParams(), {
647
517
  visitor: function(n, r, s, o) {
648
- return A.isNode && c.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
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 kn(e) {
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 Bn(e) {
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 mt(e) {
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] = Bn(s[i])), !a);
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(kn(r), s, n, 0);
545
+ t(Cn(r), s, n, 0);
676
546
  }), n;
677
547
  }
678
548
  return null;
679
549
  }
680
- function In(e, t, n) {
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 Z = {
691
- transitional: ht,
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(mt(t)) : t;
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 Ln(t, this.formSerializer).toString();
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 fe(
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), In(t)) : t;
586
+ return o || s ? (n.setContentType("application/json", !1), xn(t)) : t;
717
587
  }],
718
588
  transformResponse: [function(t) {
719
- const n = this.transitional || Z.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
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: A.classes.FormData,
744
- Blob: A.classes.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
- Z.headers[e] = {};
627
+ X.headers[e] = {};
758
628
  });
759
- const jn = c.toObjectSet([
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
- ]), Mn = (e) => {
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] && jn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
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
- }, Me = Symbol("internals");
785
- function J(e) {
654
+ }, Be = Symbol("internals");
655
+ function v(e) {
786
656
  return e && String(e).trim().toLowerCase();
787
657
  }
788
- function oe(e) {
789
- return e === !1 || e == null ? e : c.isArray(e) ? e.map(oe) : String(e);
658
+ function re(e) {
659
+ return e === !1 || e == null ? e : c.isArray(e) ? e.map(re) : String(e);
790
660
  }
791
- function $n(e) {
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 qn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
799
- function me(e, t, n, r, s) {
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 Hn(e) {
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 zn(e, t) {
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 = J(d);
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] = oe(a));
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()) && !qn(t))
840
- i(Mn(t), n);
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 = J(t), 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 $n(s);
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 = J(t), t) {
741
+ if (t = v(t), t) {
872
742
  const r = c.findKey(this, t);
873
- return !!(r && this[r] !== void 0 && (!n || me(this, this[r], r, 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 = J(i), i) {
751
+ if (i = v(i), i) {
882
752
  const a = c.findKey(r, i);
883
- a && (!n || me(r, r[a], a, n)) && (delete r[a], s = !0);
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 || me(this, this[o], o, t, !0)) && (delete this[o], s = !0);
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] = oe(s), delete n[o];
772
+ n[i] = re(s), delete n[o];
903
773
  return;
904
774
  }
905
- const a = t ? Hn(o) : String(o).trim();
906
- a !== o && delete n[o], n[a] = oe(s), r[a] = !0;
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[Me] = this[Me] = {
809
+ const r = (this[Be] = this[Be] = {
940
810
  accessors: {}
941
811
  }).accessors, s = this.prototype;
942
812
  function o(i) {
943
- const a = J(i);
944
- r[a] || (zn(s, i), r[a] = !0);
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 ye(e, t) {
961
- const n = this || Z, r = t || n, s = N.from(r.headers);
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 yt(e) {
837
+ function ft(e) {
968
838
  return !!(e && e.__CANCEL__);
969
839
  }
970
- let Q = class extends w {
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 wt(e, t, n) {
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 vn(e) {
864
+ function Bn(e) {
995
865
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
996
866
  return t && t[1] || "";
997
867
  }
998
- function Jn(e, t) {
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, b = 0;
875
+ let p = o, E = 0;
1006
876
  for (; p !== s; )
1007
- b += n[p++], p = p % e;
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(b * 1e3 / _) : void 0;
881
+ return _ ? Math.round(E * 1e3 / _) : void 0;
1012
882
  };
1013
883
  }
1014
- function Kn(e, t) {
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 ae = (e, t, n = 3) => {
896
+ const oe = (e, t, n = 3) => {
1027
897
  let r = 0;
1028
- const s = Jn(50, 250);
1029
- return Kn((o) => {
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
- }, $e = (e, t) => {
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
- }, qe = (e) => (...t) => c.asap(() => e(...t)), Vn = A.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, A.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1053
- new URL(A.origin),
1054
- A.navigator && /(msie|trident)/i.test(A.navigator.userAgent)
1055
- ) : () => !0, Wn = A.hasStandardBrowserEnv ? (
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 Xn(e) {
954
+ function Hn(e) {
1085
955
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
1086
956
  }
1087
- function Gn(e, t) {
957
+ function qn(e, t) {
1088
958
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
1089
959
  }
1090
- function bt(e, t, n) {
1091
- let r = !Xn(t);
1092
- return e && (r || n == !1) ? Gn(e, t) : t;
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 He = (e) => e instanceof N ? { ...e } : e;
1095
- function $(e, t) {
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, b) {
1099
- return c.isPlainObject(u) && c.isPlainObject(l) ? c.merge.call({ caseless: b }, u, l) : c.isPlainObject(l) ? c.merge({}, l) : c.isArray(l) ? l.slice() : l;
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, b) {
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, b);
1105
- } else return r(u, l, p, b);
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(He(u), He(l), p, !0)
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, b = p(e[l], t[l], l);
1156
- c.isUndefined(b) && p !== a || (n[l] = b);
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 gt = (e) => {
1160
- const t = $({}, e);
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(bt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && i.set(
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 (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
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 (A.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(t)), r || r !== !1 && Vn(t.url))) {
1176
- const d = s && o && Wn.read(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
- }, Zn = typeof XMLHttpRequest < "u", Qn = Zn && function(e) {
1050
+ }, zn = typeof XMLHttpRequest < "u", vn = zn && function(e) {
1181
1051
  return new Promise(function(n, r) {
1182
- const s = gt(e);
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, b, _, f;
1186
- function m() {
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 h = new XMLHttpRequest();
1190
- h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
1059
+ let m = new XMLHttpRequest();
1060
+ m.open(s.method.toUpperCase(), s.url, !0), m.timeout = s.timeout;
1191
1061
  function g() {
1192
- if (!h)
1062
+ if (!m)
1193
1063
  return;
1194
1064
  const y = N.from(
1195
- "getAllResponseHeaders" in h && h.getAllResponseHeaders()
1196
- ), T = {
1197
- data: !a || a === "text" || a === "json" ? h.responseText : h.response,
1198
- status: h.status,
1199
- statusText: h.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: h
1072
+ request: m
1203
1073
  };
1204
- wt(function(P) {
1205
- n(P), m();
1206
- }, function(P) {
1207
- r(P), m();
1208
- }, T), h = null;
1074
+ dt(function(x) {
1075
+ n(x), h();
1076
+ }, function(x) {
1077
+ r(x), h();
1078
+ }, A), m = null;
1209
1079
  }
1210
- "onloadend" in h ? h.onloadend = g : h.onreadystatechange = function() {
1211
- !h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(g);
1212
- }, h.onabort = function() {
1213
- h && (r(new w("Request aborted", w.ECONNABORTED, e, h)), h = null);
1214
- }, h.onerror = function(E) {
1215
- const T = E && E.message ? E.message : "Network Error", L = new w(T, w.ERR_NETWORK, e, h);
1216
- L.event = E || null, r(L), h = null;
1217
- }, h.ontimeout = function() {
1218
- let E = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1219
- const T = s.transitional || ht;
1220
- s.timeoutErrorMessage && (E = s.timeoutErrorMessage), r(new w(
1221
- E,
1222
- T.clarifyTimeoutError ? w.ETIMEDOUT : w.ECONNABORTED,
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
- h
1225
- )), h = null;
1226
- }, o === void 0 && i.setContentType(null), "setRequestHeader" in h && c.forEach(i.toJSON(), function(E, T) {
1227
- h.setRequestHeader(T, E);
1228
- }), c.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), a && a !== "json" && (h.responseType = s.responseType), u && ([b, f] = ae(u, !0), h.addEventListener("progress", b)), d && h.upload && ([p, _] = ae(d), h.upload.addEventListener("progress", p), h.upload.addEventListener("loadend", _)), (s.cancelToken || s.signal) && (l = (y) => {
1229
- h && (r(!y || y.type ? new Q(null, e, h) : y), h.abort(), h = null);
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 = vn(s.url);
1232
- if (R && A.protocols.indexOf(R) === -1) {
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
- h.send(o || null);
1106
+ m.send(o || null);
1237
1107
  });
1238
- }, Yn = (e, t) => {
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 Q(l instanceof Error ? l.message : l));
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
- }, er = function* (e, t) {
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
- }, tr = async function* (e, t) {
1271
- for await (const n of nr(e))
1272
- yield* er(n, t);
1273
- }, nr = async function* (e) {
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
- }, ze = (e, t, n, r) => {
1290
- const s = tr(e, t);
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 b = o += p;
1305
- n(b);
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
- }, ve = 64 * 1024, { isFunction: re } = c, rr = (({ Request: e, Response: t }) => ({
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: Je,
1323
- TextEncoder: Ke
1324
- } = c.global, Ve = (e, ...t) => {
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
- }, sr = (e) => {
1200
+ }, Gn = (e) => {
1331
1201
  e = c.merge.call({
1332
1202
  skipUndefined: !0
1333
- }, rr, e);
1334
- const { fetch: t, Request: n, Response: r } = e, s = t ? re(t) : typeof fetch == "function", o = re(n), i = re(r);
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 && re(Je), d = s && (typeof Ke == "function" ? /* @__PURE__ */ ((f) => (m) => f.encode(m))(new Ke()) : async (f) => new Uint8Array(await new n(f).arrayBuffer())), u = o && a && Ve(() => {
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 m = new n(A.origin, {
1340
- body: new Je(),
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 && !m;
1347
- }), l = i && a && Ve(() => c.isReadableStream(new r("").body)), p = {
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] = (m, h) => {
1352
- let g = m && m[f];
1221
+ !p[f] && (p[f] = (h, m) => {
1222
+ let g = h && h[f];
1353
1223
  if (g)
1354
- return g.call(m);
1355
- throw new w(`Response type '${f}' is not supported`, w.ERR_NOT_SUPPORT, h);
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 b = async (f) => {
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(A.origin, {
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, m) => {
1373
- const h = c.toFiniteNumber(f.getContentLength());
1374
- return h ?? b(m);
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: m,
1379
- method: h,
1248
+ url: h,
1249
+ method: m,
1380
1250
  data: g,
1381
1251
  signal: R,
1382
1252
  cancelToken: y,
1383
- timeout: E,
1384
- onDownloadProgress: T,
1385
- onUploadProgress: L,
1386
- responseType: P,
1387
- headers: pe,
1388
- withCredentials: Y = "same-origin",
1389
- fetchOptions: Ne
1390
- } = gt(f), xe = t || fetch;
1391
- P = P ? (P + "").toLowerCase() : "text";
1392
- let ee = Yn([R, y && y.toAbortSignal()], E), v = null;
1393
- const I = ee && ee.unsubscribe && (() => {
1394
- ee.unsubscribe();
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 Pe;
1266
+ let Ce;
1397
1267
  try {
1398
- if (L && u && h !== "get" && h !== "head" && (Pe = await _(pe, g)) !== 0) {
1399
- let B = new n(m, {
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
- }), q;
1404
- if (c.isFormData(g) && (q = B.headers.get("content-type")) && pe.setContentType(q), B.body) {
1405
- const [he, te] = $e(
1406
- Pe,
1407
- ae(qe(L))
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 = ze(B.body, ve, he, te);
1279
+ g = $e(k.body, He, de, Z);
1410
1280
  }
1411
1281
  }
1412
- c.isString(Y) || (Y = Y ? "include" : "omit");
1413
- const F = o && "credentials" in n.prototype, De = {
1414
- ...Ne,
1415
- signal: ee,
1416
- method: h.toUpperCase(),
1417
- headers: pe.normalize().toJSON(),
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: F ? Y : void 0
1290
+ credentials: D ? Q : void 0
1421
1291
  };
1422
- v = o && new n(m, De);
1423
- let k = await (o ? xe(v, Ne) : xe(m, De));
1424
- const Fe = l && (P === "stream" || P === "response");
1425
- if (l && (T || Fe && I)) {
1426
- const B = {};
1427
- ["status", "statusText", "headers"].forEach((Ue) => {
1428
- B[Ue] = k[Ue];
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 q = c.toFiniteNumber(k.headers.get("content-length")), [he, te] = T && $e(
1431
- q,
1432
- ae(qe(T), !0)
1300
+ const $ = c.toFiniteNumber(L.headers.get("content-length")), [de, Z] = A && Ie(
1301
+ $,
1302
+ oe(je(A), !0)
1433
1303
  ) || [];
1434
- k = new r(
1435
- ze(k.body, ve, he, () => {
1436
- te && te(), I && I();
1304
+ L = new r(
1305
+ $e(L.body, He, de, () => {
1306
+ Z && Z(), B && B();
1437
1307
  }),
1438
- B
1308
+ k
1439
1309
  );
1440
1310
  }
1441
- P = P || "text";
1442
- let At = await p[c.findKey(p, P) || "text"](k, f);
1443
- return !Fe && I && I(), await new Promise((B, q) => {
1444
- wt(B, q, {
1445
- data: At,
1446
- headers: N.from(k.headers),
1447
- status: k.status,
1448
- statusText: k.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: v
1320
+ request: z
1451
1321
  });
1452
1322
  });
1453
- } catch (F) {
1454
- throw I && I(), F && F.name === "TypeError" && /Load failed|fetch/i.test(F.message) ? Object.assign(
1455
- new w("Network Error", w.ERR_NETWORK, f, v),
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: F.cause || F
1327
+ cause: D.cause || D
1458
1328
  }
1459
- ) : w.from(F, F && F.code, f, v);
1329
+ ) : w.from(D, D && D.code, f, z);
1460
1330
  }
1461
1331
  };
1462
- }, or = /* @__PURE__ */ new Map(), Et = (e) => {
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 = or;
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() : sr(t)), l = u;
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
- Et();
1475
- const Ce = {
1476
- http: Rn,
1477
- xhr: Qn,
1344
+ ht();
1345
+ const _e = {
1346
+ http: mn,
1347
+ xhr: vn,
1478
1348
  fetch: {
1479
- get: Et
1349
+ get: ht
1480
1350
  }
1481
1351
  };
1482
- c.forEach(Ce, (e, t) => {
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 We = (e) => `- ${e}`, ir = (e) => c.isFunction(e) || e === null || e === !1;
1492
- function ar(e, t) {
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, !ir(r) && (s = Ce[(a = String(r)).toLowerCase()], s === void 0))
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(We).join(`
1512
- `) : " " + We(i[0]) : "as no adapter specified";
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 St = {
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: ar,
1395
+ getAdapter: Zn,
1526
1396
  /**
1527
1397
  * Exposes all known adapters
1528
1398
  * @type {Object<string, Function|Object>}
1529
1399
  */
1530
- adapters: Ce
1400
+ adapters: _e
1531
1401
  };
1532
- function we(e) {
1402
+ function he(e) {
1533
1403
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1534
- throw new Q(null, e);
1404
+ throw new G(null, e);
1535
1405
  }
1536
- function Xe(e) {
1537
- return we(e), e.headers = N.from(e.headers), e.data = ye.call(
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), St.getAdapter(e.adapter || Z.adapter, e)(e).then(function(r) {
1541
- return we(e), r.data = ye.call(
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 yt(r) || (we(e), r && r.response && (r.response.data = ye.call(
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 Rt = "1.13.4", de = {};
1424
+ const wt = "1.13.4", ue = {};
1555
1425
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1556
- de[e] = function(r) {
1426
+ ue[e] = function(r) {
1557
1427
  return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1558
1428
  };
1559
1429
  });
1560
- const Ge = {};
1561
- de.transitional = function(t, n, r) {
1430
+ const Ke = {};
1431
+ ue.transitional = function(t, n, r) {
1562
1432
  function s(o, i) {
1563
- return "[Axios v" + Rt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
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 && !Ge[i] && (Ge[i] = !0, console.warn(
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
- de.spelling = function(t) {
1449
+ ue.spelling = function(t) {
1580
1450
  return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
1581
1451
  };
1582
- function cr(e, t, n) {
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 ie = {
1600
- assertOptions: cr,
1601
- validators: de
1602
- }, U = ie.validators;
1603
- let M = class {
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 je(),
1607
- response: new je()
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 = $(this.defaults, 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 && ie.assertOptions(r, {
1639
- silentJSONParsing: U.transitional(U.boolean),
1640
- forcedJSONParsing: U.transitional(U.boolean),
1641
- clarifyTimeoutError: U.transitional(U.boolean)
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
- } : ie.assertOptions(s, {
1645
- encode: U.function,
1646
- serialize: U.function
1647
- }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), ie.assertOptions(n, {
1648
- baseUrl: U.spelling("baseURL"),
1649
- withXsrfToken: U.spelling("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(m) {
1664
- typeof m.runWhen == "function" && m.runWhen(n) === !1 || (d = d && m.synchronous, a.unshift(m.fulfilled, m.rejected));
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(m) {
1668
- u.push(m.fulfilled, m.rejected);
1537
+ this.interceptors.response.forEach(function(h) {
1538
+ u.push(h.fulfilled, h.rejected);
1669
1539
  });
1670
- let l, p = 0, b;
1540
+ let l, p = 0, E;
1671
1541
  if (!d) {
1672
- const f = [Xe.bind(this), void 0];
1673
- for (f.unshift(...a), f.push(...u), b = f.length, l = Promise.resolve(n); p < b; )
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
- b = a.length;
1547
+ E = a.length;
1678
1548
  let _ = n;
1679
- for (; p < b; ) {
1680
- const f = a[p++], m = a[p++];
1549
+ for (; p < E; ) {
1550
+ const f = a[p++], h = a[p++];
1681
1551
  try {
1682
1552
  _ = f(_);
1683
- } catch (h) {
1684
- m.call(this, h);
1553
+ } catch (m) {
1554
+ h.call(this, m);
1685
1555
  break;
1686
1556
  }
1687
1557
  }
1688
1558
  try {
1689
- l = Xe.call(this, _);
1559
+ l = Ve.call(this, _);
1690
1560
  } catch (f) {
1691
1561
  return Promise.reject(f);
1692
1562
  }
1693
- for (p = 0, b = u.length; p < b; )
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 = $(this.defaults, t);
1699
- const n = bt(t.baseURL, t.url, t.allowAbsoluteUrls);
1700
- return pt(n, t.params, t.paramsSerializer);
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
- M.prototype[t] = function(n, r) {
1705
- return this.request($(r || {}, {
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($(a || {}, {
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
- M.prototype[t] = n(), M.prototype[t + "Form"] = n(!0);
1595
+ j.prototype[t] = n(), j.prototype[t + "Form"] = n(!0);
1726
1596
  });
1727
- let lr = class Ot {
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 Q(o, i, a), n(r.reason));
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 Ot(function(s) {
1663
+ token: new Et(function(s) {
1794
1664
  t = s;
1795
1665
  }),
1796
1666
  cancel: t
1797
1667
  };
1798
1668
  }
1799
1669
  };
1800
- function ur(e) {
1670
+ function nr(e) {
1801
1671
  return function(n) {
1802
1672
  return e.apply(null, n);
1803
1673
  };
1804
1674
  }
1805
- function fr(e) {
1675
+ function rr(e) {
1806
1676
  return c.isObject(e) && e.isAxiosError === !0;
1807
1677
  }
1808
- const Re = {
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(Re).forEach(([e, t]) => {
1880
- Re[t] = e;
1749
+ Object.entries(be).forEach(([e, t]) => {
1750
+ be[t] = e;
1881
1751
  });
1882
- function _t(e) {
1883
- const t = new M(e), n = nt(M.prototype.request, t);
1884
- return c.extend(n, M.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1885
- return _t($(e, s));
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 = _t(Z);
1889
- O.Axios = M;
1890
- O.CanceledError = Q;
1891
- O.CancelToken = lr;
1892
- O.isCancel = yt;
1893
- O.VERSION = Rt;
1894
- O.toFormData = fe;
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 = ur;
1901
- O.isAxiosError = fr;
1902
- O.mergeConfig = $;
1770
+ O.spread = nr;
1771
+ O.isAxiosError = rr;
1772
+ O.mergeConfig = M;
1903
1773
  O.AxiosHeaders = N;
1904
- O.formToJSON = (e) => mt(c.isHTMLForm(e) ? new FormData(e) : e);
1905
- O.getAdapter = St.getAdapter;
1906
- O.HttpStatusCode = Re;
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: Tr,
1910
- AxiosError: Cr,
1911
- CanceledError: Nr,
1912
- isCancel: xr,
1913
- CancelToken: Pr,
1914
- VERSION: Dr,
1915
- all: Fr,
1916
- Cancel: Ur,
1917
- isAxiosError: Lr,
1918
- spread: kr,
1919
- toFormData: Br,
1920
- AxiosHeaders: Ir,
1921
- HttpStatusCode: jr,
1922
- formToJSON: Mr,
1923
- getAdapter: $r,
1924
- mergeConfig: qr
1925
- } = O, dr = "http://localhost:8000/api";
1926
- class pr {
1927
- constructor(t, n = dr) {
1928
- Le(this, "client");
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 Ze(e, t) {
1993
- const [n, r] = K(() => {
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 Qe() {
1880
+ function Xe() {
2011
1881
  return `session_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`;
2012
1882
  }
2013
- const hr = "customer_support_session_id", mr = "customer_support_messages";
2014
- function yr(e) {
2015
- const { apiKey: t, baseUrl: n, onError: r } = e, [s, o] = Ze(mr, []), [i, a] = Ze(
2016
- hr,
2017
- Qe()
2018
- ), [d, u] = K(!1), [l, p] = K(null), b = et(null);
2019
- Oe(() => {
2020
- b.current = new pr(t, n);
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 _ = ne(() => {
1892
+ const _ = ee(() => {
2023
1893
  p(null);
2024
- }, []), f = ne(
1894
+ }, []), f = ee(
2025
1895
  async (g) => {
2026
- if (!b.current) {
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 b.current.sendMessage(g, i), E = {
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((T) => [...T, E]), y.session_id !== i && a(y.session_id);
1918
+ o((A) => [...A, S]), y.session_id !== i && a(y.session_id);
2049
1919
  } catch (y) {
2050
- const E = y instanceof Error ? y : new Error("Failed to send message");
2051
- p(E), r == null || r(E);
2052
- const T = {
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: ${E.message}`,
1925
+ content: `Sorry, I encountered an error: ${S.message}`,
2056
1926
  timestamp: /* @__PURE__ */ new Date()
2057
1927
  };
2058
- o((L) => [...L, T]);
1928
+ o((U) => [...U, A]);
2059
1929
  } finally {
2060
1930
  u(!1);
2061
1931
  }
2062
1932
  },
2063
1933
  [i, r, o, a]
2064
- ), m = ne(async () => {
2065
- if (!(!b.current || !i)) {
1934
+ ), h = ee(async () => {
1935
+ if (!(!E.current || !i)) {
2066
1936
  u(!0), p(null);
2067
1937
  try {
2068
- const R = (await b.current.getConversationHistory(i)).messages.map((y, E) => ({
2069
- id: `${y.role.toLowerCase()}_${E}_${Date.now()}`,
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]), h = ne(() => {
2083
- o([]), a(Qe());
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: m,
2093
- clearHistory: h
1962
+ loadHistory: h,
1963
+ clearHistory: m
2094
1964
  };
2095
1965
  }
2096
- const wr = ({ message: e }) => {
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__ */ x("div", { className: `cs-message ${t ? "cs-message--user" : "cs-message--assistant"}`, children: [
2099
- /* @__PURE__ */ x("div", { className: "cs-message__content", children: [
2100
- /* @__PURE__ */ S("p", { className: "cs-message__text", children: e.content }),
2101
- e.sources && e.sources.length > 0 && /* @__PURE__ */ x("div", { className: "cs-message__sources", children: [
2102
- /* @__PURE__ */ S("p", { className: "cs-message__sources-title", children: "Sources:" }),
2103
- /* @__PURE__ */ S("ul", { className: "cs-message__sources-list", children: e.sources.map((r, s) => /* @__PURE__ */ x("li", { className: "cs-message__source-item", children: [
2104
- /* @__PURE__ */ x(
2105
- "a",
2106
- {
2107
- href: r.url,
2108
- target: "_blank",
2109
- rel: "noopener noreferrer",
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] = K(""), o = (a) => {
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__ */ x("form", { className: "cs-input", onSubmit: o, children: [
2135
- /* @__PURE__ */ S(
2136
- "textarea",
2137
- {
2138
- className: "cs-input__textarea",
2139
- value: r,
2140
- onChange: (a) => s(a.target.value),
2141
- onKeyDown: (a) => {
2142
- a.key === "Enter" && !a.shiftKey && (a.preventDefault(), o(a));
2143
- },
2144
- placeholder: n,
2145
- disabled: t,
2146
- rows: 1,
2147
- "aria-label": "Message input"
2148
- }
2149
- ),
2150
- /* @__PURE__ */ S(
2151
- "button",
2152
- {
2153
- type: "submit",
2154
- className: "cs-input__button",
2155
- disabled: !r.trim() || t,
2156
- "aria-label": "Send message",
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 = et(null);
2171
- return Oe(() => {
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__ */ x("div", { className: "cs-window", children: [
2175
- /* @__PURE__ */ x("div", { className: "cs-window__header", children: [
2176
- /* @__PURE__ */ S("h3", { className: "cs-window__title", children: "Customer Support" }),
2177
- /* @__PURE__ */ S(
2178
- "button",
2179
- {
2180
- className: "cs-window__close",
2181
- onClick: n,
2182
- "aria-label": "Close chat",
2183
- children: /* @__PURE__ */ S(kt, { size: 20 })
2184
- }
2185
- )
2186
- ] }),
2187
- /* @__PURE__ */ x("div", { className: "cs-window__messages", children: [
2188
- e.length === 0 && !r && /* @__PURE__ */ S("div", { className: "cs-window__welcome", children: /* @__PURE__ */ S("p", { children: i }) }),
2189
- e.map((d) => /* @__PURE__ */ S(wr, { message: d }, d.id)),
2190
- r && /* @__PURE__ */ x("div", { className: "cs-window__typing", children: [
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] = K(!1), {
2219
- messages: b,
2052
+ const [l, p] = J(!1), {
2053
+ messages: E,
2220
2054
  sendMessage: _,
2221
2055
  isLoading: f,
2222
- error: m,
2223
- clearError: h
2224
- } = yr({
2056
+ error: h,
2057
+ clearError: m
2058
+ } = cr({
2225
2059
  apiKey: e,
2226
2060
  baseUrl: t,
2227
2061
  onError: a
2228
2062
  });
2229
- Oe(() => {
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), !m) {
2237
- const E = b[b.length - 1];
2238
- (E == null ? void 0 : E.role) === "ASSISTANT" && (u == null || u(E.content));
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), m && h();
2075
+ p(!l), h && m();
2242
2076
  };
2243
- return /* @__PURE__ */ x("div", { className: `cs-widget cs-widget--${r} ${i}`, children: [
2244
- l && /* @__PURE__ */ S(
2245
- gr,
2246
- {
2247
- messages: b,
2248
- onSendMessage: g,
2249
- onClose: () => p(!1),
2250
- isLoading: f,
2251
- error: m,
2252
- placeholder: o,
2253
- welcomeMessage: s
2254
- }
2255
- ),
2256
- /* @__PURE__ */ x(
2257
- "button",
2258
- {
2259
- className: `cs-widget__toggle ${l ? "cs-widget__toggle--open" : ""}`,
2260
- onClick: R,
2261
- "aria-label": l ? "Close chat" : "Open chat",
2262
- "aria-expanded": l,
2263
- children: [
2264
- /* @__PURE__ */ S(Ut, { size: 24 }),
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
- br as ChatInput,
2273
- wr as ChatMessage,
2274
- gr as ChatWindow,
2275
- pr as CustomerSupportAPIClient,
2276
- Hr as CustomerSupportWidget,
2277
- yr as useCustomerSupport,
2278
- Ze as useLocalStorage
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