react-aichatbot-widget 1.0.4 → 1.1.0

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.js CHANGED
@@ -1,89 +1,131 @@
1
- import { jsxs as R, jsx as y, Fragment as Ve } from "react/jsx-runtime";
2
- import { useState as L, useRef as St, useEffect as We } from "react";
3
- import { MessageCircle as Ke, Send as Xe, Ellipsis as Rt, X as Ot } from "lucide-react";
4
- import { v4 as Tt } from "uuid";
5
- const At = ({ onClick: e }) => /* @__PURE__ */ R(
6
- "button",
7
- {
8
- onClick: e,
9
- "aria-label": "Open chat support",
10
- className: "fixed bottom-8 right-8 z-50 w-14 h-14 bg-gradient-to-br from-sky-500 to-sky-600 hover:from-sky-600 hover:to-sky-700 text-white rounded-full shadow-2xl flex items-center justify-center transition-all duration-300 hover:scale-110 focus:outline-none focus:ring-4 focus:ring-sky-400/50",
11
- children: [
12
- /* @__PURE__ */ y(Ke, { size: 30, strokeWidth: 2.2 }),
13
- /* @__PURE__ */ y("span", { className: "absolute -top-1 -right-1 w-3 h-3 bg-emerald-400 rounded-full border-2 border-white animate-pulse shadow-lg" })
14
- ]
15
- }
16
- ), Nt = ({ onSendMessage: e, isLoading: t }) => {
17
- const [n, r] = L(""), s = () => {
18
- !n.trim() || t || (e(n.trim()), r(""));
1
+ import { jsxs as C, jsx as g, Fragment as Ve } from "react/jsx-runtime";
2
+ import { useState as L, useRef as Rt, useEffect as We } from "react";
3
+ import { X as Ke, MessageCircle as Xe, Send as Ge, Ellipsis as Ct } from "lucide-react";
4
+ import { v4 as Ot } from "uuid";
5
+ const Tt = ({ onClick: e, isOpen: t, theme: n, chatBotData: r }) => {
6
+ const s = r.position === "left" ? "left-8" : "right-8", o = {
7
+ background: `linear-gradient(135deg, ${n.primaryColor}, ${n.secondaryColor})`,
8
+ color: n.fontColor,
9
+ boxShadow: "0 20px 25px -5px rgba(0,0,0,0.15)"
10
+ // <- just the value
19
11
  };
20
- return /* @__PURE__ */ y("div", { className: "p-4 border-t bg-white flex-shrink-0", children: /* @__PURE__ */ R("div", { className: "flex gap-3", children: [
21
- /* @__PURE__ */ y(
22
- "input",
23
- {
24
- type: "text",
25
- placeholder: "Type a message...",
26
- value: n,
27
- onChange: (o) => r(o.target.value),
28
- onKeyPress: (o) => {
29
- o.key === "Enter" && !o.shiftKey && (o.preventDefault(), s());
30
- },
31
- disabled: t,
32
- className: "flex-1 px-4 py-3 border border-neutral-300 rounded-xl focus:outline-none focus:ring-2 focus:ring-sky-500 focus:border-transparent transition-shadow placeholder-neutral-400 text-sm disabled:opacity-50 disabled:cursor-not-allowed"
33
- }
34
- ),
35
- /* @__PURE__ */ y(
36
- "button",
37
- {
38
- onClick: s,
39
- disabled: t || !n.trim(),
40
- className: "bg-sky-600 hover:bg-sky-700 disabled:opacity-50 disabled:cursor-not-allowed text-white px-5 py-3 rounded-xl font-medium transition-colors shadow-md hover:shadow-lg flex items-center gap-2",
41
- "aria-label": "Send message",
42
- children: /* @__PURE__ */ y(Xe, { size: 18 })
43
- }
44
- )
45
- ] }) });
46
- }, Ct = ({ messages: e, isLoading: t }) => {
47
- const n = St(null), r = () => {
48
- var s;
49
- (s = n.current) == null || s.scrollIntoView({ behavior: "smooth" });
12
+ return /* @__PURE__ */ C(
13
+ "button",
14
+ {
15
+ onClick: e,
16
+ className: `fixed bottom-8 ${s} hover:cursor-pointer pointer-events-auto w-16 h-16 rounded-full shadow-2xl flex items-center justify-center transition-all duration-300 hover:scale-110 focus:outline-none focus:ring-4 focus:ring-offset-2`,
17
+ style: o,
18
+ children: [
19
+ t ? /* @__PURE__ */ g(Ke, { size: 30, strokeWidth: 2.5 }) : /* @__PURE__ */ g(Xe, { size: 30, strokeWidth: 2.5 }),
20
+ !t && /* @__PURE__ */ g("span", { className: "absolute -top-1 -right-1 w-4 h-4 bg-emerald-400 rounded-full border-4 border-white animate-pulse" })
21
+ ]
22
+ }
23
+ );
24
+ }, At = ({ onSendMessage: e, isLoading: t, theme: n }) => {
25
+ const [r, s] = L(""), o = () => {
26
+ !r.trim() || t || (e(r.trim()), s(""));
27
+ }, i = (l) => {
28
+ l.key === "Enter" && !l.shiftKey && (l.preventDefault(), o());
29
+ };
30
+ return /* @__PURE__ */ g(
31
+ "div",
32
+ {
33
+ className: "p-4 border-t border-white flex-shrink-0",
34
+ style: { background: n.backgroundColor },
35
+ children: /* @__PURE__ */ C("div", { className: "flex gap-3", children: [
36
+ /* @__PURE__ */ g(
37
+ "input",
38
+ {
39
+ type: "text",
40
+ placeholder: "Type a message...",
41
+ value: r,
42
+ onChange: (l) => s(l.target.value),
43
+ onKeyPress: i,
44
+ disabled: t,
45
+ className: "flex-1 px-4 py-3 border rounded-xl focus:outline-none focus:ring-2 focus:ring-sky-500 focus:border-transparent transition-shadow text-sm disabled:opacity-50 disabled:cursor-not-allowed",
46
+ style: {
47
+ background: n.inputBackgroundColor,
48
+ color: n.fontColor,
49
+ borderColor: n.fontColor
50
+ }
51
+ }
52
+ ),
53
+ /* @__PURE__ */ g(
54
+ "button",
55
+ {
56
+ onClick: o,
57
+ disabled: t || !r.trim(),
58
+ className: "disabled:opacity-50 disabled:cursor-not-allowed px-5 py-3 rounded-xl font-medium transition-colors flex items-center gap-2 hover:cursor-pointer",
59
+ style: {
60
+ background: `linear-gradient(135deg, ${n.primaryColor}, ${n.secondaryColor})`,
61
+ color: n.fontColor
62
+ },
63
+ "aria-label": "Send message",
64
+ children: /* @__PURE__ */ g(Ge, { size: 18 })
65
+ }
66
+ )
67
+ ] })
68
+ }
69
+ );
70
+ }, Nt = ({ messages: e, isLoading: t, theme: n }) => {
71
+ const r = Rt(null), s = () => {
72
+ var o;
73
+ (o = r.current) == null || o.scrollIntoView({ behavior: "smooth" });
50
74
  };
51
75
  return We(() => {
52
- r();
53
- }, [e, t]), /* @__PURE__ */ R("div", { className: "flex-1 overflow-y-auto p-5 space-y-4 bg-neutral-50", children: [
54
- e.map((s, i) => /* @__PURE__ */ y("div", { className: `flex ${s.type === "user" ? "justify-end" : ""}`, children: /* @__PURE__ */ y(
55
- "div",
56
- {
57
- className: `px-4 py-3 rounded-2xl shadow-sm border border-neutral-200 max-w-[80%] text-sm leading-relaxed ${s.type === "user" ? "bg-sky-600 text-white rounded-br-none" : "bg-white text-neutral-800 rounded-bl-none"}`,
58
- children: s.text
59
- }
60
- ) }, i)),
61
- t && /* @__PURE__ */ y("div", { className: "flex", children: /* @__PURE__ */ y("div", { className: "bg-white text-neutral-800 px-4 py-3 rounded-2xl rounded-bl-none shadow-sm border border-neutral-200 max-w-[80%] text-sm leading-relaxed", children: /* @__PURE__ */ y(Rt, { className: "animate-pulse" }) }) }),
62
- /* @__PURE__ */ y("div", { ref: n })
63
- ] });
76
+ s();
77
+ }, [e, t]), /* @__PURE__ */ C(
78
+ "div",
79
+ {
80
+ className: "flex-1 overflow-y-auto p-5 space-y-4 border-t border-white",
81
+ style: { background: n.backgroundColor, color: n.fontColor },
82
+ children: [
83
+ e.map((o, i) => /* @__PURE__ */ g("div", { className: `flex ${o.type === "user" ? "justify-end" : ""}`, children: /* @__PURE__ */ g(
84
+ "div",
85
+ {
86
+ className: "px-4 py-3 rounded-2xl shadow-sm border border-neutral-200 max-w-[80%] text-sm leading-relaxed",
87
+ style: {
88
+ background: o.type === "user" ? n.primaryColor : n.backgroundColor,
89
+ color: (o.type === "bot", n.fontColor)
90
+ },
91
+ children: o.text
92
+ }
93
+ ) }, i)),
94
+ t && /* @__PURE__ */ g("div", { className: "flex", children: /* @__PURE__ */ g(
95
+ "div",
96
+ {
97
+ className: "px-4 py-3 rounded-2xl rounded-bl-none shadow-sm border border-neutral-200 max-w-[80%] text-sm leading-relaxed",
98
+ style: { background: n.backgroundColor, color: n.fontColor },
99
+ children: /* @__PURE__ */ g(Ct, { className: "animate-pulse" })
100
+ }
101
+ ) }),
102
+ /* @__PURE__ */ g("div", { ref: r })
103
+ ]
104
+ }
105
+ );
64
106
  };
65
- function Ge(e, t) {
107
+ function Qe(e, t) {
66
108
  return function() {
67
109
  return e.apply(t, arguments);
68
110
  };
69
111
  }
70
- const { toString: Pt } = Object.prototype, { getPrototypeOf: Ee } = Object, { iterator: ie, toStringTag: Qe } = Symbol, ae = /* @__PURE__ */ ((e) => (t) => {
71
- const n = Pt.call(t);
112
+ const { toString: kt } = Object.prototype, { getPrototypeOf: Ee } = Object, { iterator: ie, toStringTag: Ze } = Symbol, ae = /* @__PURE__ */ ((e) => (t) => {
113
+ const n = kt.call(t);
72
114
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
73
- })(/* @__PURE__ */ Object.create(null)), k = (e) => (e = e.toLowerCase(), (t) => ae(t) === e), le = (e) => (t) => typeof t === e, { isArray: z } = Array, $ = le("undefined");
115
+ })(/* @__PURE__ */ Object.create(null)), F = (e) => (e = e.toLowerCase(), (t) => ae(t) === e), le = (e) => (t) => typeof t === e, { isArray: z } = Array, M = le("undefined");
74
116
  function K(e) {
75
- return e !== null && !$(e) && e.constructor !== null && !$(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
117
+ return e !== null && !M(e) && e.constructor !== null && !M(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
76
118
  }
77
- const Ze = k("ArrayBuffer");
78
- function Ft(e) {
119
+ const Ye = F("ArrayBuffer");
120
+ function Pt(e) {
79
121
  let t;
80
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ze(e.buffer), t;
122
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ye(e.buffer), t;
81
123
  }
82
- const kt = le("string"), A = le("function"), Ye = le("number"), X = (e) => e !== null && typeof e == "object", Ut = (e) => e === !0 || e === !1, ne = (e) => {
124
+ const Ft = le("string"), A = le("function"), et = le("number"), X = (e) => e !== null && typeof e == "object", Ut = (e) => e === !0 || e === !1, ne = (e) => {
83
125
  if (ae(e) !== "object")
84
126
  return !1;
85
127
  const t = Ee(e);
86
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Qe in e) && !(ie in e);
128
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Ze in e) && !(ie in e);
87
129
  }, _t = (e) => {
88
130
  if (!X(e) || K(e))
89
131
  return !1;
@@ -92,11 +134,11 @@ const kt = le("string"), A = le("function"), Ye = le("number"), X = (e) => e !==
92
134
  } catch {
93
135
  return !1;
94
136
  }
95
- }, Lt = k("Date"), Dt = k("File"), Bt = k("Blob"), jt = k("FileList"), It = (e) => X(e) && A(e.pipe), qt = (e) => {
137
+ }, Lt = F("Date"), Bt = F("File"), Dt = F("Blob"), jt = F("FileList"), $t = (e) => X(e) && A(e.pipe), It = (e) => {
96
138
  let t;
97
139
  return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = ae(e)) === "formdata" || // detect form-data instance
98
140
  t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
99
- }, vt = k("URLSearchParams"), [Ht, Mt, $t, zt] = ["ReadableStream", "Request", "Response", "Headers"].map(k), Jt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
141
+ }, qt = F("URLSearchParams"), [vt, Ht, Mt, zt] = ["ReadableStream", "Request", "Response", "Headers"].map(F), Jt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
100
142
  function G(e, t, { allOwnKeys: n = !1 } = {}) {
101
143
  if (e === null || typeof e > "u")
102
144
  return;
@@ -107,13 +149,13 @@ function G(e, t, { allOwnKeys: n = !1 } = {}) {
107
149
  else {
108
150
  if (K(e))
109
151
  return;
110
- const i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length;
152
+ const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
111
153
  let l;
112
- for (r = 0; r < o; r++)
113
- l = i[r], t.call(null, e[l], l, e);
154
+ for (r = 0; r < i; r++)
155
+ l = o[r], t.call(null, e[l], l, e);
114
156
  }
115
157
  }
116
- function et(e, t) {
158
+ function tt(e, t) {
117
159
  if (K(e))
118
160
  return null;
119
161
  t = t.toLowerCase();
@@ -124,29 +166,29 @@ function et(e, t) {
124
166
  return s;
125
167
  return null;
126
168
  }
127
- const q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, tt = (e) => !$(e) && e !== q;
169
+ const I = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, nt = (e) => !M(e) && e !== I;
128
170
  function be() {
129
- const { caseless: e, skipUndefined: t } = tt(this) && this || {}, n = {}, r = (s, i) => {
130
- const o = e && et(n, i) || i;
131
- ne(n[o]) && ne(s) ? n[o] = be(n[o], s) : ne(s) ? n[o] = be({}, s) : z(s) ? n[o] = s.slice() : (!t || !$(s)) && (n[o] = s);
171
+ const { caseless: e, skipUndefined: t } = nt(this) && this || {}, n = {}, r = (s, o) => {
172
+ const i = e && tt(n, o) || o;
173
+ ne(n[i]) && ne(s) ? n[i] = be(n[i], s) : ne(s) ? n[i] = be({}, s) : z(s) ? n[i] = s.slice() : (!t || !M(s)) && (n[i] = s);
132
174
  };
133
- for (let s = 0, i = arguments.length; s < i; s++)
175
+ for (let s = 0, o = arguments.length; s < o; s++)
134
176
  arguments[s] && G(arguments[s], r);
135
177
  return n;
136
178
  }
137
- const Vt = (e, t, n, { allOwnKeys: r } = {}) => (G(t, (s, i) => {
138
- n && A(s) ? e[i] = Ge(s, n) : e[i] = s;
179
+ const Vt = (e, t, n, { allOwnKeys: r } = {}) => (G(t, (s, o) => {
180
+ n && A(s) ? e[o] = Qe(s, n) : e[o] = s;
139
181
  }, { allOwnKeys: r }), e), Wt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Kt = (e, t, n, r) => {
140
182
  e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
141
183
  value: t.prototype
142
184
  }), n && Object.assign(e.prototype, n);
143
185
  }, Xt = (e, t, n, r) => {
144
- let s, i, o;
186
+ let s, o, i;
145
187
  const l = {};
146
188
  if (t = t || {}, e == null) return t;
147
189
  do {
148
- for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
149
- o = s[i], (!r || r(o, e, t)) && !l[o] && (t[o] = e[o], l[o] = !0);
190
+ for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
191
+ i = s[o], (!r || r(i, e, t)) && !l[i] && (t[i] = e[i], l[i] = !0);
150
192
  e = n !== !1 && Ee(e);
151
193
  } while (e && (!n || n(e, t)) && e !== Object.prototype);
152
194
  return t;
@@ -158,7 +200,7 @@ const Vt = (e, t, n, { allOwnKeys: r } = {}) => (G(t, (s, i) => {
158
200
  if (!e) return null;
159
201
  if (z(e)) return e;
160
202
  let t = e.length;
161
- if (!Ye(t)) return null;
203
+ if (!et(t)) return null;
162
204
  const n = new Array(t);
163
205
  for (; t-- > 0; )
164
206
  n[t] = e[t];
@@ -167,8 +209,8 @@ const Vt = (e, t, n, { allOwnKeys: r } = {}) => (G(t, (s, i) => {
167
209
  const r = (e && e[ie]).call(e);
168
210
  let s;
169
211
  for (; (s = r.next()) && !s.done; ) {
170
- const i = s.value;
171
- t.call(e, i[0], i[1]);
212
+ const o = s.value;
213
+ t.call(e, o[0], o[1]);
172
214
  }
173
215
  }, en = (e, t) => {
174
216
  let n;
@@ -176,19 +218,19 @@ const Vt = (e, t, n, { allOwnKeys: r } = {}) => (G(t, (s, i) => {
176
218
  for (; (n = e.exec(t)) !== null; )
177
219
  r.push(n);
178
220
  return r;
179
- }, tn = k("HTMLFormElement"), nn = (e) => e.toLowerCase().replace(
221
+ }, tn = F("HTMLFormElement"), nn = (e) => e.toLowerCase().replace(
180
222
  /[-_\s]([a-z\d])(\w*)/g,
181
223
  function(n, r, s) {
182
224
  return r.toUpperCase() + s;
183
225
  }
184
- ), Fe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), rn = k("RegExp"), nt = (e, t) => {
226
+ ), Pe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), rn = F("RegExp"), rt = (e, t) => {
185
227
  const n = Object.getOwnPropertyDescriptors(e), r = {};
186
- G(n, (s, i) => {
187
- let o;
188
- (o = t(s, i, e)) !== !1 && (r[i] = o || s);
228
+ G(n, (s, o) => {
229
+ let i;
230
+ (i = t(s, o, e)) !== !1 && (r[o] = i || s);
189
231
  }), Object.defineProperties(e, r);
190
232
  }, sn = (e) => {
191
- nt(e, (t, n) => {
233
+ rt(e, (t, n) => {
192
234
  if (A(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
193
235
  return !1;
194
236
  const r = e[n];
@@ -204,15 +246,15 @@ const Vt = (e, t, n, { allOwnKeys: r } = {}) => (G(t, (s, i) => {
204
246
  });
205
247
  }, on = (e, t) => {
206
248
  const n = {}, r = (s) => {
207
- s.forEach((i) => {
208
- n[i] = !0;
249
+ s.forEach((o) => {
250
+ n[o] = !0;
209
251
  });
210
252
  };
211
253
  return z(e) ? r(e) : r(String(e).split(t)), n;
212
254
  }, an = () => {
213
255
  }, ln = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
214
256
  function cn(e) {
215
- return !!(e && A(e.append) && e[Qe] === "FormData" && e[ie]);
257
+ return !!(e && A(e.append) && e[Ze] === "FormData" && e[ie]);
216
258
  }
217
259
  const un = (e) => {
218
260
  const t = new Array(10), n = (r, s) => {
@@ -223,47 +265,47 @@ const un = (e) => {
223
265
  return r;
224
266
  if (!("toJSON" in r)) {
225
267
  t[s] = r;
226
- const i = z(r) ? [] : {};
227
- return G(r, (o, l) => {
228
- const f = n(o, s + 1);
229
- !$(f) && (i[l] = f);
230
- }), t[s] = void 0, i;
268
+ const o = z(r) ? [] : {};
269
+ return G(r, (i, l) => {
270
+ const f = n(i, s + 1);
271
+ !M(f) && (o[l] = f);
272
+ }), t[s] = void 0, o;
231
273
  }
232
274
  }
233
275
  return r;
234
276
  };
235
277
  return n(e, 0);
236
- }, dn = k("AsyncFunction"), fn = (e) => e && (X(e) || A(e)) && A(e.then) && A(e.catch), rt = ((e, t) => e ? setImmediate : t ? ((n, r) => (q.addEventListener("message", ({ source: s, data: i }) => {
237
- s === q && i === n && r.length && r.shift()();
278
+ }, dn = F("AsyncFunction"), fn = (e) => e && (X(e) || A(e)) && A(e.then) && A(e.catch), st = ((e, t) => e ? setImmediate : t ? ((n, r) => (I.addEventListener("message", ({ source: s, data: o }) => {
279
+ s === I && o === n && r.length && r.shift()();
238
280
  }, !1), (s) => {
239
- r.push(s), q.postMessage(n, "*");
281
+ r.push(s), I.postMessage(n, "*");
240
282
  }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
241
283
  typeof setImmediate == "function",
242
- A(q.postMessage)
243
- ), hn = typeof queueMicrotask < "u" ? queueMicrotask.bind(q) : typeof process < "u" && process.nextTick || rt, pn = (e) => e != null && A(e[ie]), a = {
284
+ A(I.postMessage)
285
+ ), pn = typeof queueMicrotask < "u" ? queueMicrotask.bind(I) : typeof process < "u" && process.nextTick || st, hn = (e) => e != null && A(e[ie]), a = {
244
286
  isArray: z,
245
- isArrayBuffer: Ze,
287
+ isArrayBuffer: Ye,
246
288
  isBuffer: K,
247
- isFormData: qt,
248
- isArrayBufferView: Ft,
249
- isString: kt,
250
- isNumber: Ye,
289
+ isFormData: It,
290
+ isArrayBufferView: Pt,
291
+ isString: Ft,
292
+ isNumber: et,
251
293
  isBoolean: Ut,
252
294
  isObject: X,
253
295
  isPlainObject: ne,
254
296
  isEmptyObject: _t,
255
- isReadableStream: Ht,
256
- isRequest: Mt,
257
- isResponse: $t,
297
+ isReadableStream: vt,
298
+ isRequest: Ht,
299
+ isResponse: Mt,
258
300
  isHeaders: zt,
259
- isUndefined: $,
301
+ isUndefined: M,
260
302
  isDate: Lt,
261
- isFile: Dt,
262
- isBlob: Bt,
303
+ isFile: Bt,
304
+ isBlob: Dt,
263
305
  isRegExp: rn,
264
306
  isFunction: A,
265
- isStream: It,
266
- isURLSearchParams: vt,
307
+ isStream: $t,
308
+ isURLSearchParams: qt,
267
309
  isTypedArray: Zt,
268
310
  isFileList: jt,
269
311
  forEach: G,
@@ -274,31 +316,31 @@ const un = (e) => {
274
316
  inherits: Kt,
275
317
  toFlatObject: Xt,
276
318
  kindOf: ae,
277
- kindOfTest: k,
319
+ kindOfTest: F,
278
320
  endsWith: Gt,
279
321
  toArray: Qt,
280
322
  forEachEntry: Yt,
281
323
  matchAll: en,
282
324
  isHTMLForm: tn,
283
- hasOwnProperty: Fe,
284
- hasOwnProp: Fe,
325
+ hasOwnProperty: Pe,
326
+ hasOwnProp: Pe,
285
327
  // an alias to avoid ESLint no-prototype-builtins detection
286
- reduceDescriptors: nt,
328
+ reduceDescriptors: rt,
287
329
  freezeMethods: sn,
288
330
  toObjectSet: on,
289
331
  toCamelCase: nn,
290
332
  noop: an,
291
333
  toFiniteNumber: ln,
292
- findKey: et,
293
- global: q,
294
- isContextDefined: tt,
334
+ findKey: tt,
335
+ global: I,
336
+ isContextDefined: nt,
295
337
  isSpecCompliantForm: cn,
296
338
  toJSONObject: un,
297
339
  isAsyncFn: dn,
298
340
  isThenable: fn,
299
- setImmediate: rt,
300
- asap: hn,
301
- isIterable: pn
341
+ setImmediate: st,
342
+ asap: pn,
343
+ isIterable: hn
302
344
  };
303
345
  function b(e, t, n, r, s) {
304
346
  Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
@@ -324,7 +366,7 @@ a.inherits(b, Error, {
324
366
  };
325
367
  }
326
368
  });
327
- const st = b.prototype, ot = {};
369
+ const ot = b.prototype, it = {};
328
370
  [
329
371
  "ERR_BAD_OPTION_VALUE",
330
372
  "ERR_BAD_OPTION",
@@ -340,28 +382,28 @@ const st = b.prototype, ot = {};
340
382
  "ERR_INVALID_URL"
341
383
  // eslint-disable-next-line func-names
342
384
  ].forEach((e) => {
343
- ot[e] = { value: e };
385
+ it[e] = { value: e };
344
386
  });
345
- Object.defineProperties(b, ot);
346
- Object.defineProperty(st, "isAxiosError", { value: !0 });
347
- b.from = (e, t, n, r, s, i) => {
348
- const o = Object.create(st);
349
- a.toFlatObject(e, o, function(c) {
387
+ Object.defineProperties(b, it);
388
+ Object.defineProperty(ot, "isAxiosError", { value: !0 });
389
+ b.from = (e, t, n, r, s, o) => {
390
+ const i = Object.create(ot);
391
+ a.toFlatObject(e, i, function(c) {
350
392
  return c !== Error.prototype;
351
- }, (u) => u !== "isAxiosError");
393
+ }, (d) => d !== "isAxiosError");
352
394
  const l = e && e.message ? e.message : "Error", f = t == null && e ? e.code : t;
353
- return b.call(o, l, f, n, r, s), e && o.cause == null && Object.defineProperty(o, "cause", { value: e, configurable: !0 }), o.name = e && e.name || "Error", i && Object.assign(o, i), o;
395
+ return b.call(i, l, f, n, r, s), e && i.cause == null && Object.defineProperty(i, "cause", { value: e, configurable: !0 }), i.name = e && e.name || "Error", o && Object.assign(i, o), i;
354
396
  };
355
397
  const mn = null;
356
398
  function ye(e) {
357
399
  return a.isPlainObject(e) || a.isArray(e);
358
400
  }
359
- function it(e) {
401
+ function at(e) {
360
402
  return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
361
403
  }
362
- function ke(e, t, n) {
363
- return e ? e.concat(t).map(function(s, i) {
364
- return s = it(s), !n && i ? "[" + s + "]" : s;
404
+ function Fe(e, t, n) {
405
+ return e ? e.concat(t).map(function(s, o) {
406
+ return s = at(s), !n && o ? "[" + s + "]" : s;
365
407
  }).join(n ? "." : "") : t;
366
408
  }
367
409
  function bn(e) {
@@ -377,61 +419,61 @@ function ce(e, t, n) {
377
419
  metaTokens: !0,
378
420
  dots: !1,
379
421
  indexes: !1
380
- }, !1, function(m, h) {
381
- return !a.isUndefined(h[m]);
422
+ }, !1, function(m, p) {
423
+ return !a.isUndefined(p[m]);
382
424
  });
383
- const r = n.metaTokens, s = n.visitor || c, i = n.dots, o = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
425
+ const r = n.metaTokens, s = n.visitor || c, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
384
426
  if (!a.isFunction(s))
385
427
  throw new TypeError("visitor must be a function");
386
- function u(d) {
387
- if (d === null) return "";
388
- if (a.isDate(d))
389
- return d.toISOString();
390
- if (a.isBoolean(d))
391
- return d.toString();
392
- if (!f && a.isBlob(d))
428
+ function d(u) {
429
+ if (u === null) return "";
430
+ if (a.isDate(u))
431
+ return u.toISOString();
432
+ if (a.isBoolean(u))
433
+ return u.toString();
434
+ if (!f && a.isBlob(u))
393
435
  throw new b("Blob is not supported. Use a Buffer instead.");
394
- return a.isArrayBuffer(d) || a.isTypedArray(d) ? f && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
436
+ return a.isArrayBuffer(u) || a.isTypedArray(u) ? f && typeof Blob == "function" ? new Blob([u]) : Buffer.from(u) : u;
395
437
  }
396
- function c(d, m, h) {
397
- let x = d;
398
- if (d && !h && typeof d == "object") {
438
+ function c(u, m, p) {
439
+ let w = u;
440
+ if (u && !p && typeof u == "object") {
399
441
  if (a.endsWith(m, "{}"))
400
- m = r ? m : m.slice(0, -2), d = JSON.stringify(d);
401
- else if (a.isArray(d) && bn(d) || (a.isFileList(d) || a.endsWith(m, "[]")) && (x = a.toArray(d)))
402
- return m = it(m), x.forEach(function(S, T) {
442
+ m = r ? m : m.slice(0, -2), u = JSON.stringify(u);
443
+ else if (a.isArray(u) && bn(u) || (a.isFileList(u) || a.endsWith(m, "[]")) && (w = a.toArray(u)))
444
+ return m = at(m), w.forEach(function(S, T) {
403
445
  !(a.isUndefined(S) || S === null) && t.append(
404
446
  // eslint-disable-next-line no-nested-ternary
405
- o === !0 ? ke([m], T, i) : o === null ? m : m + "[]",
406
- u(S)
447
+ i === !0 ? Fe([m], T, o) : i === null ? m : m + "[]",
448
+ d(S)
407
449
  );
408
450
  }), !1;
409
451
  }
410
- return ye(d) ? !0 : (t.append(ke(h, m, i), u(d)), !1);
452
+ return ye(u) ? !0 : (t.append(Fe(p, m, o), d(u)), !1);
411
453
  }
412
- const p = [], w = Object.assign(yn, {
454
+ const h = [], y = Object.assign(yn, {
413
455
  defaultVisitor: c,
414
- convertValue: u,
456
+ convertValue: d,
415
457
  isVisitable: ye
416
458
  });
417
- function g(d, m) {
418
- if (!a.isUndefined(d)) {
419
- if (p.indexOf(d) !== -1)
459
+ function E(u, m) {
460
+ if (!a.isUndefined(u)) {
461
+ if (h.indexOf(u) !== -1)
420
462
  throw Error("Circular reference detected in " + m.join("."));
421
- p.push(d), a.forEach(d, function(x, C) {
422
- (!(a.isUndefined(x) || x === null) && s.call(
463
+ h.push(u), a.forEach(u, function(w, R) {
464
+ (!(a.isUndefined(w) || w === null) && s.call(
423
465
  t,
424
- x,
425
- a.isString(C) ? C.trim() : C,
466
+ w,
467
+ a.isString(R) ? R.trim() : R,
426
468
  m,
427
- w
428
- )) === !0 && g(x, m ? m.concat(C) : [C]);
429
- }), p.pop();
469
+ y
470
+ )) === !0 && E(w, m ? m.concat(R) : [R]);
471
+ }), h.pop();
430
472
  }
431
473
  }
432
474
  if (!a.isObject(e))
433
475
  throw new TypeError("data must be an object");
434
- return g(e), t;
476
+ return E(e), t;
435
477
  }
436
478
  function Ue(e) {
437
479
  const t = {
@@ -450,11 +492,11 @@ function Ue(e) {
450
492
  function xe(e, t) {
451
493
  this._pairs = [], e && ce(e, this, t);
452
494
  }
453
- const at = xe.prototype;
454
- at.append = function(t, n) {
495
+ const lt = xe.prototype;
496
+ lt.append = function(t, n) {
455
497
  this._pairs.push([t, n]);
456
498
  };
457
- at.toString = function(t) {
499
+ lt.toString = function(t) {
458
500
  const n = t ? function(r) {
459
501
  return t.call(this, r, Ue);
460
502
  } : Ue;
@@ -462,21 +504,21 @@ at.toString = function(t) {
462
504
  return n(s[0]) + "=" + n(s[1]);
463
505
  }, "").join("&");
464
506
  };
465
- function wn(e) {
507
+ function gn(e) {
466
508
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
467
509
  }
468
- function lt(e, t, n) {
510
+ function ct(e, t, n) {
469
511
  if (!t)
470
512
  return e;
471
- const r = n && n.encode || wn;
513
+ const r = n && n.encode || gn;
472
514
  a.isFunction(n) && (n = {
473
515
  serialize: n
474
516
  });
475
517
  const s = n && n.serialize;
476
- let i;
477
- if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new xe(t, n).toString(r), i) {
478
- const o = e.indexOf("#");
479
- o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
518
+ let o;
519
+ if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new xe(t, n).toString(r), o) {
520
+ const i = e.indexOf("#");
521
+ i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
480
522
  }
481
523
  return e;
482
524
  }
@@ -534,66 +576,66 @@ class _e {
534
576
  });
535
577
  }
536
578
  }
537
- const ct = {
579
+ const ut = {
538
580
  silentJSONParsing: !0,
539
581
  forcedJSONParsing: !0,
540
582
  clarifyTimeoutError: !1
541
- }, gn = typeof URLSearchParams < "u" ? URLSearchParams : xe, En = typeof FormData < "u" ? FormData : null, xn = typeof Blob < "u" ? Blob : null, Sn = {
583
+ }, wn = typeof URLSearchParams < "u" ? URLSearchParams : xe, En = typeof FormData < "u" ? FormData : null, xn = typeof Blob < "u" ? Blob : null, Sn = {
542
584
  isBrowser: !0,
543
585
  classes: {
544
- URLSearchParams: gn,
586
+ URLSearchParams: wn,
545
587
  FormData: En,
546
588
  Blob: xn
547
589
  },
548
590
  protocols: ["http", "https", "file", "blob", "url", "data"]
549
- }, Se = typeof window < "u" && typeof document < "u", we = typeof navigator == "object" && navigator || void 0, Rn = Se && (!we || ["ReactNative", "NativeScript", "NS"].indexOf(we.product) < 0), On = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
550
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Tn = Se && window.location.href || "http://localhost", An = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
591
+ }, Se = typeof window < "u" && typeof document < "u", ge = typeof navigator == "object" && navigator || void 0, Rn = Se && (!ge || ["ReactNative", "NativeScript", "NS"].indexOf(ge.product) < 0), Cn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
592
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", On = Se && window.location.href || "http://localhost", Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
551
593
  __proto__: null,
552
594
  hasBrowserEnv: Se,
553
595
  hasStandardBrowserEnv: Rn,
554
- hasStandardBrowserWebWorkerEnv: On,
555
- navigator: we,
556
- origin: Tn
596
+ hasStandardBrowserWebWorkerEnv: Cn,
597
+ navigator: ge,
598
+ origin: On
557
599
  }, Symbol.toStringTag, { value: "Module" })), O = {
558
- ...An,
600
+ ...Tn,
559
601
  ...Sn
560
602
  };
561
- function Nn(e, t) {
603
+ function An(e, t) {
562
604
  return ce(e, new O.classes.URLSearchParams(), {
563
- visitor: function(n, r, s, i) {
564
- return O.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
605
+ visitor: function(n, r, s, o) {
606
+ return O.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
565
607
  },
566
608
  ...t
567
609
  });
568
610
  }
569
- function Cn(e) {
611
+ function Nn(e) {
570
612
  return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
571
613
  }
572
- function Pn(e) {
614
+ function kn(e) {
573
615
  const t = {}, n = Object.keys(e);
574
616
  let r;
575
617
  const s = n.length;
576
- let i;
618
+ let o;
577
619
  for (r = 0; r < s; r++)
578
- i = n[r], t[i] = e[i];
620
+ o = n[r], t[o] = e[o];
579
621
  return t;
580
622
  }
581
- function ut(e) {
582
- function t(n, r, s, i) {
583
- let o = n[i++];
584
- if (o === "__proto__") return !0;
585
- const l = Number.isFinite(+o), f = i >= n.length;
586
- return o = !o && a.isArray(s) ? s.length : o, f ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !l) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] = Pn(s[o])), !l);
623
+ function dt(e) {
624
+ function t(n, r, s, o) {
625
+ let i = n[o++];
626
+ if (i === "__proto__") return !0;
627
+ const l = Number.isFinite(+i), f = o >= n.length;
628
+ return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !l) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = kn(s[i])), !l);
587
629
  }
588
630
  if (a.isFormData(e) && a.isFunction(e.entries)) {
589
631
  const n = {};
590
632
  return a.forEachEntry(e, (r, s) => {
591
- t(Cn(r), s, n, 0);
633
+ t(Nn(r), s, n, 0);
592
634
  }), n;
593
635
  }
594
636
  return null;
595
637
  }
596
- function Fn(e, t, n) {
638
+ function Pn(e, t, n) {
597
639
  if (a.isString(e))
598
640
  try {
599
641
  return (t || JSON.parse)(e), a.trim(e);
@@ -604,12 +646,12 @@ function Fn(e, t, n) {
604
646
  return (n || JSON.stringify)(e);
605
647
  }
606
648
  const Q = {
607
- transitional: ct,
649
+ transitional: ut,
608
650
  adapter: ["xhr", "http", "fetch"],
609
651
  transformRequest: [function(t, n) {
610
- const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = a.isObject(t);
611
- if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
612
- return s ? JSON.stringify(ut(t)) : t;
652
+ const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
653
+ if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
654
+ return s ? JSON.stringify(dt(t)) : t;
613
655
  if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
614
656
  return t;
615
657
  if (a.isArrayBufferView(t))
@@ -617,9 +659,9 @@ const Q = {
617
659
  if (a.isURLSearchParams(t))
618
660
  return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
619
661
  let l;
620
- if (i) {
662
+ if (o) {
621
663
  if (r.indexOf("application/x-www-form-urlencoded") > -1)
622
- return Nn(t, this.formSerializer).toString();
664
+ return An(t, this.formSerializer).toString();
623
665
  if ((l = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
624
666
  const f = this.env && this.env.FormData;
625
667
  return ce(
@@ -629,18 +671,18 @@ const Q = {
629
671
  );
630
672
  }
631
673
  }
632
- return i || s ? (n.setContentType("application/json", !1), Fn(t)) : t;
674
+ return o || s ? (n.setContentType("application/json", !1), Pn(t)) : t;
633
675
  }],
634
676
  transformResponse: [function(t) {
635
677
  const n = this.transitional || Q.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
636
678
  if (a.isResponse(t) || a.isReadableStream(t))
637
679
  return t;
638
680
  if (t && a.isString(t) && (r && !this.responseType || s)) {
639
- const o = !(n && n.silentJSONParsing) && s;
681
+ const i = !(n && n.silentJSONParsing) && s;
640
682
  try {
641
683
  return JSON.parse(t, this.parseReviver);
642
684
  } catch (l) {
643
- if (o)
685
+ if (i)
644
686
  throw l.name === "SyntaxError" ? b.from(l, b.ERR_BAD_RESPONSE, this, null, this.response) : l;
645
687
  }
646
688
  }
@@ -672,7 +714,7 @@ const Q = {
672
714
  a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
673
715
  Q.headers[e] = {};
674
716
  });
675
- const kn = a.toObjectSet([
717
+ const Fn = a.toObjectSet([
676
718
  "age",
677
719
  "authorization",
678
720
  "content-length",
@@ -694,8 +736,8 @@ const kn = a.toObjectSet([
694
736
  const t = {};
695
737
  let n, r, s;
696
738
  return e && e.split(`
697
- `).forEach(function(o) {
698
- s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && kn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
739
+ `).forEach(function(i) {
740
+ s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Fn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
699
741
  }), t;
700
742
  }, Le = Symbol("internals");
701
743
  function W(e) {
@@ -712,7 +754,7 @@ function _n(e) {
712
754
  return t;
713
755
  }
714
756
  const Ln = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
715
- function he(e, t, n, r, s) {
757
+ function pe(e, t, n, r, s) {
716
758
  if (a.isFunction(r))
717
759
  return r.call(this, t, n);
718
760
  if (s && (t = n), !!a.isString(t)) {
@@ -722,15 +764,15 @@ function he(e, t, n, r, s) {
722
764
  return r.test(t);
723
765
  }
724
766
  }
725
- function Dn(e) {
767
+ function Bn(e) {
726
768
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
727
769
  }
728
- function Bn(e, t) {
770
+ function Dn(e, t) {
729
771
  const n = a.toCamelCase(" " + t);
730
772
  ["get", "set", "has"].forEach((r) => {
731
773
  Object.defineProperty(e, r + n, {
732
- value: function(s, i, o) {
733
- return this[r].call(this, t, s, i, o);
774
+ value: function(s, o, i) {
775
+ return this[r].call(this, t, s, o, i);
734
776
  },
735
777
  configurable: !0
736
778
  });
@@ -742,28 +784,28 @@ let N = class {
742
784
  }
743
785
  set(t, n, r) {
744
786
  const s = this;
745
- function i(l, f, u) {
787
+ function o(l, f, d) {
746
788
  const c = W(f);
747
789
  if (!c)
748
790
  throw new Error("header name must be a non-empty string");
749
- const p = a.findKey(s, c);
750
- (!p || s[p] === void 0 || u === !0 || u === void 0 && s[p] !== !1) && (s[p || f] = re(l));
791
+ const h = a.findKey(s, c);
792
+ (!h || s[h] === void 0 || d === !0 || d === void 0 && s[h] !== !1) && (s[h || f] = re(l));
751
793
  }
752
- const o = (l, f) => a.forEach(l, (u, c) => i(u, c, f));
794
+ const i = (l, f) => a.forEach(l, (d, c) => o(d, c, f));
753
795
  if (a.isPlainObject(t) || t instanceof this.constructor)
754
- o(t, n);
796
+ i(t, n);
755
797
  else if (a.isString(t) && (t = t.trim()) && !Ln(t))
756
- o(Un(t), n);
798
+ i(Un(t), n);
757
799
  else if (a.isObject(t) && a.isIterable(t)) {
758
- let l = {}, f, u;
800
+ let l = {}, f, d;
759
801
  for (const c of t) {
760
802
  if (!a.isArray(c))
761
803
  throw TypeError("Object iterator must return a key-value pair");
762
- l[u = c[0]] = (f = l[u]) ? a.isArray(f) ? [...f, c[1]] : [f, c[1]] : c[1];
804
+ l[d = c[0]] = (f = l[d]) ? a.isArray(f) ? [...f, c[1]] : [f, c[1]] : c[1];
763
805
  }
764
- o(l, n);
806
+ i(l, n);
765
807
  } else
766
- t != null && i(n, t, r);
808
+ t != null && o(n, t, r);
767
809
  return this;
768
810
  }
769
811
  get(t, n) {
@@ -786,40 +828,40 @@ let N = class {
786
828
  has(t, n) {
787
829
  if (t = W(t), t) {
788
830
  const r = a.findKey(this, t);
789
- return !!(r && this[r] !== void 0 && (!n || he(this, this[r], r, n)));
831
+ return !!(r && this[r] !== void 0 && (!n || pe(this, this[r], r, n)));
790
832
  }
791
833
  return !1;
792
834
  }
793
835
  delete(t, n) {
794
836
  const r = this;
795
837
  let s = !1;
796
- function i(o) {
797
- if (o = W(o), o) {
798
- const l = a.findKey(r, o);
799
- l && (!n || he(r, r[l], l, n)) && (delete r[l], s = !0);
838
+ function o(i) {
839
+ if (i = W(i), i) {
840
+ const l = a.findKey(r, i);
841
+ l && (!n || pe(r, r[l], l, n)) && (delete r[l], s = !0);
800
842
  }
801
843
  }
802
- return a.isArray(t) ? t.forEach(i) : i(t), s;
844
+ return a.isArray(t) ? t.forEach(o) : o(t), s;
803
845
  }
804
846
  clear(t) {
805
847
  const n = Object.keys(this);
806
848
  let r = n.length, s = !1;
807
849
  for (; r--; ) {
808
- const i = n[r];
809
- (!t || he(this, this[i], i, t, !0)) && (delete this[i], s = !0);
850
+ const o = n[r];
851
+ (!t || pe(this, this[o], o, t, !0)) && (delete this[o], s = !0);
810
852
  }
811
853
  return s;
812
854
  }
813
855
  normalize(t) {
814
856
  const n = this, r = {};
815
- return a.forEach(this, (s, i) => {
816
- const o = a.findKey(r, i);
817
- if (o) {
818
- n[o] = re(s), delete n[i];
857
+ return a.forEach(this, (s, o) => {
858
+ const i = a.findKey(r, o);
859
+ if (i) {
860
+ n[i] = re(s), delete n[o];
819
861
  return;
820
862
  }
821
- const l = t ? Dn(i) : String(i).trim();
822
- l !== i && delete n[i], n[l] = re(s), r[l] = !0;
863
+ const l = t ? Bn(o) : String(o).trim();
864
+ l !== o && delete n[o], n[l] = re(s), r[l] = !0;
823
865
  }), this;
824
866
  }
825
867
  concat(...t) {
@@ -855,11 +897,11 @@ let N = class {
855
897
  const r = (this[Le] = this[Le] = {
856
898
  accessors: {}
857
899
  }).accessors, s = this.prototype;
858
- function i(o) {
859
- const l = W(o);
860
- r[l] || (Bn(s, o), r[l] = !0);
900
+ function o(i) {
901
+ const l = W(i);
902
+ r[l] || (Dn(s, i), r[l] = !0);
861
903
  }
862
- return a.isArray(t) ? t.forEach(i) : i(t), this;
904
+ return a.isArray(t) ? t.forEach(o) : o(t), this;
863
905
  }
864
906
  };
865
907
  N.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
@@ -873,14 +915,14 @@ a.reduceDescriptors(N.prototype, ({ value: e }, t) => {
873
915
  };
874
916
  });
875
917
  a.freezeMethods(N);
876
- function pe(e, t) {
918
+ function he(e, t) {
877
919
  const n = this || Q, r = t || n, s = N.from(r.headers);
878
- let i = r.data;
920
+ let o = r.data;
879
921
  return a.forEach(e, function(l) {
880
- i = l.call(n, i, s.normalize(), t ? t.status : void 0);
881
- }), s.normalize(), i;
922
+ o = l.call(n, o, s.normalize(), t ? t.status : void 0);
923
+ }), s.normalize(), o;
882
924
  }
883
- function dt(e) {
925
+ function ft(e) {
884
926
  return !!(e && e.__CANCEL__);
885
927
  }
886
928
  function J(e, t, n) {
@@ -889,7 +931,7 @@ function J(e, t, n) {
889
931
  a.inherits(J, b, {
890
932
  __CANCEL__: !0
891
933
  });
892
- function ft(e, t, n) {
934
+ function pt(e, t, n) {
893
935
  const r = n.config.validateStatus;
894
936
  !n.status || !r || r(n.status) ? e(n) : t(new b(
895
937
  "Request failed with status code " + n.status,
@@ -903,70 +945,70 @@ function jn(e) {
903
945
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
904
946
  return t && t[1] || "";
905
947
  }
906
- function In(e, t) {
948
+ function $n(e, t) {
907
949
  e = e || 10;
908
950
  const n = new Array(e), r = new Array(e);
909
- let s = 0, i = 0, o;
951
+ let s = 0, o = 0, i;
910
952
  return t = t !== void 0 ? t : 1e3, function(f) {
911
- const u = Date.now(), c = r[i];
912
- o || (o = u), n[s] = f, r[s] = u;
913
- let p = i, w = 0;
914
- for (; p !== s; )
915
- w += n[p++], p = p % e;
916
- if (s = (s + 1) % e, s === i && (i = (i + 1) % e), u - o < t)
953
+ const d = Date.now(), c = r[o];
954
+ i || (i = d), n[s] = f, r[s] = d;
955
+ let h = o, y = 0;
956
+ for (; h !== s; )
957
+ y += n[h++], h = h % e;
958
+ if (s = (s + 1) % e, s === o && (o = (o + 1) % e), d - i < t)
917
959
  return;
918
- const g = c && u - c;
919
- return g ? Math.round(w * 1e3 / g) : void 0;
960
+ const E = c && d - c;
961
+ return E ? Math.round(y * 1e3 / E) : void 0;
920
962
  };
921
963
  }
922
- function qn(e, t) {
923
- let n = 0, r = 1e3 / t, s, i;
924
- const o = (u, c = Date.now()) => {
925
- n = c, s = null, i && (clearTimeout(i), i = null), e(...u);
964
+ function In(e, t) {
965
+ let n = 0, r = 1e3 / t, s, o;
966
+ const i = (d, c = Date.now()) => {
967
+ n = c, s = null, o && (clearTimeout(o), o = null), e(...d);
926
968
  };
927
- return [(...u) => {
928
- const c = Date.now(), p = c - n;
929
- p >= r ? o(u, c) : (s = u, i || (i = setTimeout(() => {
930
- i = null, o(s);
931
- }, r - p)));
932
- }, () => s && o(s)];
969
+ return [(...d) => {
970
+ const c = Date.now(), h = c - n;
971
+ h >= r ? i(d, c) : (s = d, o || (o = setTimeout(() => {
972
+ o = null, i(s);
973
+ }, r - h)));
974
+ }, () => s && i(s)];
933
975
  }
934
976
  const oe = (e, t, n = 3) => {
935
977
  let r = 0;
936
- const s = In(50, 250);
937
- return qn((i) => {
938
- const o = i.loaded, l = i.lengthComputable ? i.total : void 0, f = o - r, u = s(f), c = o <= l;
939
- r = o;
940
- const p = {
941
- loaded: o,
978
+ const s = $n(50, 250);
979
+ return In((o) => {
980
+ const i = o.loaded, l = o.lengthComputable ? o.total : void 0, f = i - r, d = s(f), c = i <= l;
981
+ r = i;
982
+ const h = {
983
+ loaded: i,
942
984
  total: l,
943
- progress: l ? o / l : void 0,
985
+ progress: l ? i / l : void 0,
944
986
  bytes: f,
945
- rate: u || void 0,
946
- estimated: u && l && c ? (l - o) / u : void 0,
947
- event: i,
987
+ rate: d || void 0,
988
+ estimated: d && l && c ? (l - i) / d : void 0,
989
+ event: o,
948
990
  lengthComputable: l != null,
949
991
  [t ? "download" : "upload"]: !0
950
992
  };
951
- e(p);
993
+ e(h);
952
994
  }, n);
953
- }, De = (e, t) => {
995
+ }, Be = (e, t) => {
954
996
  const n = e != null;
955
997
  return [(r) => t[0]({
956
998
  lengthComputable: n,
957
999
  total: e,
958
1000
  loaded: r
959
1001
  }), t[1]];
960
- }, Be = (e) => (...t) => a.asap(() => e(...t)), vn = O.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, O.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1002
+ }, De = (e) => (...t) => a.asap(() => e(...t)), qn = O.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, O.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
961
1003
  new URL(O.origin),
962
1004
  O.navigator && /(msie|trident)/i.test(O.navigator.userAgent)
963
- ) : () => !0, Hn = O.hasStandardBrowserEnv ? (
1005
+ ) : () => !0, vn = O.hasStandardBrowserEnv ? (
964
1006
  // Standard browser envs support document.cookie
965
1007
  {
966
- write(e, t, n, r, s, i, o) {
1008
+ write(e, t, n, r, s, o, i) {
967
1009
  if (typeof document > "u") return;
968
1010
  const l = [`${e}=${encodeURIComponent(t)}`];
969
- a.isNumber(n) && l.push(`expires=${new Date(n).toUTCString()}`), a.isString(r) && l.push(`path=${r}`), a.isString(s) && l.push(`domain=${s}`), i === !0 && l.push("secure"), a.isString(o) && l.push(`SameSite=${o}`), document.cookie = l.join("; ");
1011
+ a.isNumber(n) && l.push(`expires=${new Date(n).toUTCString()}`), a.isString(r) && l.push(`path=${r}`), a.isString(s) && l.push(`domain=${s}`), o === !0 && l.push("secure"), a.isString(i) && l.push(`SameSite=${i}`), document.cookie = l.join("; ");
970
1012
  },
971
1013
  read(e) {
972
1014
  if (typeof document > "u") return null;
@@ -989,180 +1031,180 @@ const oe = (e, t, n = 3) => {
989
1031
  }
990
1032
  }
991
1033
  );
992
- function Mn(e) {
1034
+ function Hn(e) {
993
1035
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
994
1036
  }
995
- function $n(e, t) {
1037
+ function Mn(e, t) {
996
1038
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
997
1039
  }
998
1040
  function ht(e, t, n) {
999
- let r = !Mn(t);
1000
- return e && (r || n == !1) ? $n(e, t) : t;
1041
+ let r = !Hn(t);
1042
+ return e && (r || n == !1) ? Mn(e, t) : t;
1001
1043
  }
1002
1044
  const je = (e) => e instanceof N ? { ...e } : e;
1003
- function H(e, t) {
1045
+ function v(e, t) {
1004
1046
  t = t || {};
1005
1047
  const n = {};
1006
- function r(u, c, p, w) {
1007
- return a.isPlainObject(u) && a.isPlainObject(c) ? a.merge.call({ caseless: w }, u, c) : a.isPlainObject(c) ? a.merge({}, c) : a.isArray(c) ? c.slice() : c;
1048
+ function r(d, c, h, y) {
1049
+ return a.isPlainObject(d) && a.isPlainObject(c) ? a.merge.call({ caseless: y }, d, c) : a.isPlainObject(c) ? a.merge({}, c) : a.isArray(c) ? c.slice() : c;
1008
1050
  }
1009
- function s(u, c, p, w) {
1051
+ function s(d, c, h, y) {
1010
1052
  if (a.isUndefined(c)) {
1011
- if (!a.isUndefined(u))
1012
- return r(void 0, u, p, w);
1013
- } else return r(u, c, p, w);
1053
+ if (!a.isUndefined(d))
1054
+ return r(void 0, d, h, y);
1055
+ } else return r(d, c, h, y);
1014
1056
  }
1015
- function i(u, c) {
1057
+ function o(d, c) {
1016
1058
  if (!a.isUndefined(c))
1017
1059
  return r(void 0, c);
1018
1060
  }
1019
- function o(u, c) {
1061
+ function i(d, c) {
1020
1062
  if (a.isUndefined(c)) {
1021
- if (!a.isUndefined(u))
1022
- return r(void 0, u);
1063
+ if (!a.isUndefined(d))
1064
+ return r(void 0, d);
1023
1065
  } else return r(void 0, c);
1024
1066
  }
1025
- function l(u, c, p) {
1026
- if (p in t)
1027
- return r(u, c);
1028
- if (p in e)
1029
- return r(void 0, u);
1067
+ function l(d, c, h) {
1068
+ if (h in t)
1069
+ return r(d, c);
1070
+ if (h in e)
1071
+ return r(void 0, d);
1030
1072
  }
1031
1073
  const f = {
1032
- url: i,
1033
- method: i,
1034
- data: i,
1035
- baseURL: o,
1036
- transformRequest: o,
1037
- transformResponse: o,
1038
- paramsSerializer: o,
1039
- timeout: o,
1040
- timeoutMessage: o,
1041
- withCredentials: o,
1042
- withXSRFToken: o,
1043
- adapter: o,
1044
- responseType: o,
1045
- xsrfCookieName: o,
1046
- xsrfHeaderName: o,
1047
- onUploadProgress: o,
1048
- onDownloadProgress: o,
1049
- decompress: o,
1050
- maxContentLength: o,
1051
- maxBodyLength: o,
1052
- beforeRedirect: o,
1053
- transport: o,
1054
- httpAgent: o,
1055
- httpsAgent: o,
1056
- cancelToken: o,
1057
- socketPath: o,
1058
- responseEncoding: o,
1074
+ url: o,
1075
+ method: o,
1076
+ data: o,
1077
+ baseURL: i,
1078
+ transformRequest: i,
1079
+ transformResponse: i,
1080
+ paramsSerializer: i,
1081
+ timeout: i,
1082
+ timeoutMessage: i,
1083
+ withCredentials: i,
1084
+ withXSRFToken: i,
1085
+ adapter: i,
1086
+ responseType: i,
1087
+ xsrfCookieName: i,
1088
+ xsrfHeaderName: i,
1089
+ onUploadProgress: i,
1090
+ onDownloadProgress: i,
1091
+ decompress: i,
1092
+ maxContentLength: i,
1093
+ maxBodyLength: i,
1094
+ beforeRedirect: i,
1095
+ transport: i,
1096
+ httpAgent: i,
1097
+ httpsAgent: i,
1098
+ cancelToken: i,
1099
+ socketPath: i,
1100
+ responseEncoding: i,
1059
1101
  validateStatus: l,
1060
- headers: (u, c, p) => s(je(u), je(c), p, !0)
1102
+ headers: (d, c, h) => s(je(d), je(c), h, !0)
1061
1103
  };
1062
1104
  return a.forEach(Object.keys({ ...e, ...t }), function(c) {
1063
- const p = f[c] || s, w = p(e[c], t[c], c);
1064
- a.isUndefined(w) && p !== l || (n[c] = w);
1105
+ const h = f[c] || s, y = h(e[c], t[c], c);
1106
+ a.isUndefined(y) && h !== l || (n[c] = y);
1065
1107
  }), n;
1066
1108
  }
1067
- const pt = (e) => {
1068
- const t = H({}, e);
1069
- let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: l } = t;
1070
- if (t.headers = o = N.from(o), t.url = lt(ht(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), l && o.set(
1109
+ const mt = (e) => {
1110
+ const t = v({}, e);
1111
+ let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: l } = t;
1112
+ if (t.headers = i = N.from(i), t.url = ct(ht(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), l && i.set(
1071
1113
  "Authorization",
1072
1114
  "Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))
1073
1115
  ), a.isFormData(n)) {
1074
1116
  if (O.hasStandardBrowserEnv || O.hasStandardBrowserWebWorkerEnv)
1075
- o.setContentType(void 0);
1117
+ i.setContentType(void 0);
1076
1118
  else if (a.isFunction(n.getHeaders)) {
1077
- const f = n.getHeaders(), u = ["content-type", "content-length"];
1078
- Object.entries(f).forEach(([c, p]) => {
1079
- u.includes(c.toLowerCase()) && o.set(c, p);
1119
+ const f = n.getHeaders(), d = ["content-type", "content-length"];
1120
+ Object.entries(f).forEach(([c, h]) => {
1121
+ d.includes(c.toLowerCase()) && i.set(c, h);
1080
1122
  });
1081
1123
  }
1082
1124
  }
1083
- if (O.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && vn(t.url))) {
1084
- const f = s && i && Hn.read(i);
1085
- f && o.set(s, f);
1125
+ if (O.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && qn(t.url))) {
1126
+ const f = s && o && vn.read(o);
1127
+ f && i.set(s, f);
1086
1128
  }
1087
1129
  return t;
1088
1130
  }, zn = typeof XMLHttpRequest < "u", Jn = zn && function(e) {
1089
1131
  return new Promise(function(n, r) {
1090
- const s = pt(e);
1091
- let i = s.data;
1092
- const o = N.from(s.headers).normalize();
1093
- let { responseType: l, onUploadProgress: f, onDownloadProgress: u } = s, c, p, w, g, d;
1132
+ const s = mt(e);
1133
+ let o = s.data;
1134
+ const i = N.from(s.headers).normalize();
1135
+ let { responseType: l, onUploadProgress: f, onDownloadProgress: d } = s, c, h, y, E, u;
1094
1136
  function m() {
1095
- g && g(), d && d(), s.cancelToken && s.cancelToken.unsubscribe(c), s.signal && s.signal.removeEventListener("abort", c);
1137
+ E && E(), u && u(), s.cancelToken && s.cancelToken.unsubscribe(c), s.signal && s.signal.removeEventListener("abort", c);
1096
1138
  }
1097
- let h = new XMLHttpRequest();
1098
- h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
1099
- function x() {
1100
- if (!h)
1139
+ let p = new XMLHttpRequest();
1140
+ p.open(s.method.toUpperCase(), s.url, !0), p.timeout = s.timeout;
1141
+ function w() {
1142
+ if (!p)
1101
1143
  return;
1102
1144
  const S = N.from(
1103
- "getAllResponseHeaders" in h && h.getAllResponseHeaders()
1104
- ), F = {
1105
- data: !l || l === "text" || l === "json" ? h.responseText : h.response,
1106
- status: h.status,
1107
- statusText: h.statusText,
1145
+ "getAllResponseHeaders" in p && p.getAllResponseHeaders()
1146
+ ), P = {
1147
+ data: !l || l === "text" || l === "json" ? p.responseText : p.response,
1148
+ status: p.status,
1149
+ statusText: p.statusText,
1108
1150
  headers: S,
1109
1151
  config: e,
1110
- request: h
1152
+ request: p
1111
1153
  };
1112
- ft(function(P) {
1113
- n(P), m();
1114
- }, function(P) {
1115
- r(P), m();
1116
- }, F), h = null;
1154
+ pt(function(k) {
1155
+ n(k), m();
1156
+ }, function(k) {
1157
+ r(k), m();
1158
+ }, P), p = null;
1117
1159
  }
1118
- "onloadend" in h ? h.onloadend = x : h.onreadystatechange = function() {
1119
- !h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(x);
1120
- }, h.onabort = function() {
1121
- h && (r(new b("Request aborted", b.ECONNABORTED, e, h)), h = null);
1122
- }, h.onerror = function(T) {
1123
- const F = T && T.message ? T.message : "Network Error", j = new b(F, b.ERR_NETWORK, e, h);
1124
- j.event = T || null, r(j), h = null;
1125
- }, h.ontimeout = function() {
1160
+ "onloadend" in p ? p.onloadend = w : p.onreadystatechange = function() {
1161
+ !p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(w);
1162
+ }, p.onabort = function() {
1163
+ p && (r(new b("Request aborted", b.ECONNABORTED, e, p)), p = null);
1164
+ }, p.onerror = function(T) {
1165
+ const P = T && T.message ? T.message : "Network Error", j = new b(P, b.ERR_NETWORK, e, p);
1166
+ j.event = T || null, r(j), p = null;
1167
+ }, p.ontimeout = function() {
1126
1168
  let T = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1127
- const F = s.transitional || ct;
1169
+ const P = s.transitional || ut;
1128
1170
  s.timeoutErrorMessage && (T = s.timeoutErrorMessage), r(new b(
1129
1171
  T,
1130
- F.clarifyTimeoutError ? b.ETIMEDOUT : b.ECONNABORTED,
1172
+ P.clarifyTimeoutError ? b.ETIMEDOUT : b.ECONNABORTED,
1131
1173
  e,
1132
- h
1133
- )), h = null;
1134
- }, i === void 0 && o.setContentType(null), "setRequestHeader" in h && a.forEach(o.toJSON(), function(T, F) {
1135
- h.setRequestHeader(F, T);
1136
- }), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), l && l !== "json" && (h.responseType = s.responseType), u && ([w, d] = oe(u, !0), h.addEventListener("progress", w)), f && h.upload && ([p, g] = oe(f), h.upload.addEventListener("progress", p), h.upload.addEventListener("loadend", g)), (s.cancelToken || s.signal) && (c = (S) => {
1137
- h && (r(!S || S.type ? new J(null, e, h) : S), h.abort(), h = null);
1174
+ p
1175
+ )), p = null;
1176
+ }, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(T, P) {
1177
+ p.setRequestHeader(P, T);
1178
+ }), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), l && l !== "json" && (p.responseType = s.responseType), d && ([y, u] = oe(d, !0), p.addEventListener("progress", y)), f && p.upload && ([h, E] = oe(f), p.upload.addEventListener("progress", h), p.upload.addEventListener("loadend", E)), (s.cancelToken || s.signal) && (c = (S) => {
1179
+ p && (r(!S || S.type ? new J(null, e, p) : S), p.abort(), p = null);
1138
1180
  }, s.cancelToken && s.cancelToken.subscribe(c), s.signal && (s.signal.aborted ? c() : s.signal.addEventListener("abort", c)));
1139
- const C = jn(s.url);
1140
- if (C && O.protocols.indexOf(C) === -1) {
1141
- r(new b("Unsupported protocol " + C + ":", b.ERR_BAD_REQUEST, e));
1181
+ const R = jn(s.url);
1182
+ if (R && O.protocols.indexOf(R) === -1) {
1183
+ r(new b("Unsupported protocol " + R + ":", b.ERR_BAD_REQUEST, e));
1142
1184
  return;
1143
1185
  }
1144
- h.send(i || null);
1186
+ p.send(o || null);
1145
1187
  });
1146
1188
  }, Vn = (e, t) => {
1147
1189
  const { length: n } = e = e ? e.filter(Boolean) : [];
1148
1190
  if (t || n) {
1149
1191
  let r = new AbortController(), s;
1150
- const i = function(u) {
1192
+ const o = function(d) {
1151
1193
  if (!s) {
1152
1194
  s = !0, l();
1153
- const c = u instanceof Error ? u : this.reason;
1195
+ const c = d instanceof Error ? d : this.reason;
1154
1196
  r.abort(c instanceof b ? c : new J(c instanceof Error ? c.message : c));
1155
1197
  }
1156
1198
  };
1157
- let o = t && setTimeout(() => {
1158
- o = null, i(new b(`timeout ${t} of ms exceeded`, b.ETIMEDOUT));
1199
+ let i = t && setTimeout(() => {
1200
+ i = null, o(new b(`timeout ${t} of ms exceeded`, b.ETIMEDOUT));
1159
1201
  }, t);
1160
1202
  const l = () => {
1161
- e && (o && clearTimeout(o), o = null, e.forEach((u) => {
1162
- u.unsubscribe ? u.unsubscribe(i) : u.removeEventListener("abort", i);
1203
+ e && (i && clearTimeout(i), i = null, e.forEach((d) => {
1204
+ d.unsubscribe ? d.unsubscribe(o) : d.removeEventListener("abort", o);
1163
1205
  }), e = null);
1164
1206
  };
1165
- e.forEach((u) => u.addEventListener("abort", i));
1207
+ e.forEach((d) => d.addEventListener("abort", o));
1166
1208
  const { signal: f } = r;
1167
1209
  return f.unsubscribe = () => a.asap(l), f;
1168
1210
  }
@@ -1194,27 +1236,27 @@ const pt = (e) => {
1194
1236
  } finally {
1195
1237
  await t.cancel();
1196
1238
  }
1197
- }, Ie = (e, t, n, r) => {
1239
+ }, $e = (e, t, n, r) => {
1198
1240
  const s = Kn(e, t);
1199
- let i = 0, o, l = (f) => {
1200
- o || (o = !0, r && r(f));
1241
+ let o = 0, i, l = (f) => {
1242
+ i || (i = !0, r && r(f));
1201
1243
  };
1202
1244
  return new ReadableStream({
1203
1245
  async pull(f) {
1204
1246
  try {
1205
- const { done: u, value: c } = await s.next();
1206
- if (u) {
1247
+ const { done: d, value: c } = await s.next();
1248
+ if (d) {
1207
1249
  l(), f.close();
1208
1250
  return;
1209
1251
  }
1210
- let p = c.byteLength;
1252
+ let h = c.byteLength;
1211
1253
  if (n) {
1212
- let w = i += p;
1213
- n(w);
1254
+ let y = o += h;
1255
+ n(y);
1214
1256
  }
1215
1257
  f.enqueue(new Uint8Array(c));
1216
- } catch (u) {
1217
- throw l(u), u;
1258
+ } catch (d) {
1259
+ throw l(d), d;
1218
1260
  }
1219
1261
  },
1220
1262
  cancel(f) {
@@ -1223,13 +1265,13 @@ const pt = (e) => {
1223
1265
  }, {
1224
1266
  highWaterMark: 2
1225
1267
  });
1226
- }, qe = 64 * 1024, { isFunction: te } = a, Gn = (({ Request: e, Response: t }) => ({
1268
+ }, Ie = 64 * 1024, { isFunction: te } = a, Gn = (({ Request: e, Response: t }) => ({
1227
1269
  Request: e,
1228
1270
  Response: t
1229
1271
  }))(a.global), {
1230
- ReadableStream: ve,
1231
- TextEncoder: He
1232
- } = a.global, Me = (e, ...t) => {
1272
+ ReadableStream: qe,
1273
+ TextEncoder: ve
1274
+ } = a.global, He = (e, ...t) => {
1233
1275
  try {
1234
1276
  return !!e(...t);
1235
1277
  } catch {
@@ -1239,152 +1281,152 @@ const pt = (e) => {
1239
1281
  e = a.merge.call({
1240
1282
  skipUndefined: !0
1241
1283
  }, Gn, e);
1242
- const { fetch: t, Request: n, Response: r } = e, s = t ? te(t) : typeof fetch == "function", i = te(n), o = te(r);
1284
+ const { fetch: t, Request: n, Response: r } = e, s = t ? te(t) : typeof fetch == "function", o = te(n), i = te(r);
1243
1285
  if (!s)
1244
1286
  return !1;
1245
- const l = s && te(ve), f = s && (typeof He == "function" ? /* @__PURE__ */ ((d) => (m) => d.encode(m))(new He()) : async (d) => new Uint8Array(await new n(d).arrayBuffer())), u = i && l && Me(() => {
1246
- let d = !1;
1287
+ const l = s && te(qe), f = s && (typeof ve == "function" ? /* @__PURE__ */ ((u) => (m) => u.encode(m))(new ve()) : async (u) => new Uint8Array(await new n(u).arrayBuffer())), d = o && l && He(() => {
1288
+ let u = !1;
1247
1289
  const m = new n(O.origin, {
1248
- body: new ve(),
1290
+ body: new qe(),
1249
1291
  method: "POST",
1250
1292
  get duplex() {
1251
- return d = !0, "half";
1293
+ return u = !0, "half";
1252
1294
  }
1253
1295
  }).headers.has("Content-Type");
1254
- return d && !m;
1255
- }), c = o && l && Me(() => a.isReadableStream(new r("").body)), p = {
1256
- stream: c && ((d) => d.body)
1296
+ return u && !m;
1297
+ }), c = i && l && He(() => a.isReadableStream(new r("").body)), h = {
1298
+ stream: c && ((u) => u.body)
1257
1299
  };
1258
- s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
1259
- !p[d] && (p[d] = (m, h) => {
1260
- let x = m && m[d];
1261
- if (x)
1262
- return x.call(m);
1263
- throw new b(`Response type '${d}' is not supported`, b.ERR_NOT_SUPPORT, h);
1300
+ s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((u) => {
1301
+ !h[u] && (h[u] = (m, p) => {
1302
+ let w = m && m[u];
1303
+ if (w)
1304
+ return w.call(m);
1305
+ throw new b(`Response type '${u}' is not supported`, b.ERR_NOT_SUPPORT, p);
1264
1306
  });
1265
1307
  });
1266
- const w = async (d) => {
1267
- if (d == null)
1308
+ const y = async (u) => {
1309
+ if (u == null)
1268
1310
  return 0;
1269
- if (a.isBlob(d))
1270
- return d.size;
1271
- if (a.isSpecCompliantForm(d))
1311
+ if (a.isBlob(u))
1312
+ return u.size;
1313
+ if (a.isSpecCompliantForm(u))
1272
1314
  return (await new n(O.origin, {
1273
1315
  method: "POST",
1274
- body: d
1316
+ body: u
1275
1317
  }).arrayBuffer()).byteLength;
1276
- if (a.isArrayBufferView(d) || a.isArrayBuffer(d))
1277
- return d.byteLength;
1278
- if (a.isURLSearchParams(d) && (d = d + ""), a.isString(d))
1279
- return (await f(d)).byteLength;
1280
- }, g = async (d, m) => {
1281
- const h = a.toFiniteNumber(d.getContentLength());
1282
- return h ?? w(m);
1318
+ if (a.isArrayBufferView(u) || a.isArrayBuffer(u))
1319
+ return u.byteLength;
1320
+ if (a.isURLSearchParams(u) && (u = u + ""), a.isString(u))
1321
+ return (await f(u)).byteLength;
1322
+ }, E = async (u, m) => {
1323
+ const p = a.toFiniteNumber(u.getContentLength());
1324
+ return p ?? y(m);
1283
1325
  };
1284
- return async (d) => {
1326
+ return async (u) => {
1285
1327
  let {
1286
1328
  url: m,
1287
- method: h,
1288
- data: x,
1289
- signal: C,
1329
+ method: p,
1330
+ data: w,
1331
+ signal: R,
1290
1332
  cancelToken: S,
1291
1333
  timeout: T,
1292
- onDownloadProgress: F,
1334
+ onDownloadProgress: P,
1293
1335
  onUploadProgress: j,
1294
- responseType: P,
1336
+ responseType: k,
1295
1337
  headers: de,
1296
1338
  withCredentials: Z = "same-origin",
1297
- fetchOptions: Oe
1298
- } = pt(d), Te = t || fetch;
1299
- P = P ? (P + "").toLowerCase() : "text";
1300
- let Y = Vn([C, S && S.toAbortSignal()], T), V = null;
1301
- const I = Y && Y.unsubscribe && (() => {
1339
+ fetchOptions: Ce
1340
+ } = mt(u), Oe = t || fetch;
1341
+ k = k ? (k + "").toLowerCase() : "text";
1342
+ let Y = Vn([R, S && S.toAbortSignal()], T), V = null;
1343
+ const $ = Y && Y.unsubscribe && (() => {
1302
1344
  Y.unsubscribe();
1303
1345
  });
1304
- let Ae;
1346
+ let Te;
1305
1347
  try {
1306
- if (j && u && h !== "get" && h !== "head" && (Ae = await g(de, x)) !== 0) {
1307
- let B = new n(m, {
1348
+ if (j && d && p !== "get" && p !== "head" && (Te = await E(de, w)) !== 0) {
1349
+ let D = new n(m, {
1308
1350
  method: "POST",
1309
- body: x,
1351
+ body: w,
1310
1352
  duplex: "half"
1311
- }), M;
1312
- if (a.isFormData(x) && (M = B.headers.get("content-type")) && de.setContentType(M), B.body) {
1313
- const [fe, ee] = De(
1314
- Ae,
1315
- oe(Be(j))
1353
+ }), H;
1354
+ if (a.isFormData(w) && (H = D.headers.get("content-type")) && de.setContentType(H), D.body) {
1355
+ const [fe, ee] = Be(
1356
+ Te,
1357
+ oe(De(j))
1316
1358
  );
1317
- x = Ie(B.body, qe, fe, ee);
1359
+ w = $e(D.body, Ie, fe, ee);
1318
1360
  }
1319
1361
  }
1320
1362
  a.isString(Z) || (Z = Z ? "include" : "omit");
1321
- const U = i && "credentials" in n.prototype, Ne = {
1322
- ...Oe,
1363
+ const U = o && "credentials" in n.prototype, Ae = {
1364
+ ...Ce,
1323
1365
  signal: Y,
1324
- method: h.toUpperCase(),
1366
+ method: p.toUpperCase(),
1325
1367
  headers: de.normalize().toJSON(),
1326
- body: x,
1368
+ body: w,
1327
1369
  duplex: "half",
1328
1370
  credentials: U ? Z : void 0
1329
1371
  };
1330
- V = i && new n(m, Ne);
1331
- let D = await (i ? Te(V, Oe) : Te(m, Ne));
1332
- const Ce = c && (P === "stream" || P === "response");
1333
- if (c && (F || Ce && I)) {
1334
- const B = {};
1335
- ["status", "statusText", "headers"].forEach((Pe) => {
1336
- B[Pe] = D[Pe];
1372
+ V = o && new n(m, Ae);
1373
+ let B = await (o ? Oe(V, Ce) : Oe(m, Ae));
1374
+ const Ne = c && (k === "stream" || k === "response");
1375
+ if (c && (P || Ne && $)) {
1376
+ const D = {};
1377
+ ["status", "statusText", "headers"].forEach((ke) => {
1378
+ D[ke] = B[ke];
1337
1379
  });
1338
- const M = a.toFiniteNumber(D.headers.get("content-length")), [fe, ee] = F && De(
1339
- M,
1340
- oe(Be(F), !0)
1380
+ const H = a.toFiniteNumber(B.headers.get("content-length")), [fe, ee] = P && Be(
1381
+ H,
1382
+ oe(De(P), !0)
1341
1383
  ) || [];
1342
- D = new r(
1343
- Ie(D.body, qe, fe, () => {
1344
- ee && ee(), I && I();
1384
+ B = new r(
1385
+ $e(B.body, Ie, fe, () => {
1386
+ ee && ee(), $ && $();
1345
1387
  }),
1346
- B
1388
+ D
1347
1389
  );
1348
1390
  }
1349
- P = P || "text";
1350
- let xt = await p[a.findKey(p, P) || "text"](D, d);
1351
- return !Ce && I && I(), await new Promise((B, M) => {
1352
- ft(B, M, {
1353
- data: xt,
1354
- headers: N.from(D.headers),
1355
- status: D.status,
1356
- statusText: D.statusText,
1357
- config: d,
1391
+ k = k || "text";
1392
+ let St = await h[a.findKey(h, k) || "text"](B, u);
1393
+ return !Ne && $ && $(), await new Promise((D, H) => {
1394
+ pt(D, H, {
1395
+ data: St,
1396
+ headers: N.from(B.headers),
1397
+ status: B.status,
1398
+ statusText: B.statusText,
1399
+ config: u,
1358
1400
  request: V
1359
1401
  });
1360
1402
  });
1361
1403
  } catch (U) {
1362
- throw I && I(), U && U.name === "TypeError" && /Load failed|fetch/i.test(U.message) ? Object.assign(
1363
- new b("Network Error", b.ERR_NETWORK, d, V),
1404
+ throw $ && $(), U && U.name === "TypeError" && /Load failed|fetch/i.test(U.message) ? Object.assign(
1405
+ new b("Network Error", b.ERR_NETWORK, u, V),
1364
1406
  {
1365
1407
  cause: U.cause || U
1366
1408
  }
1367
- ) : b.from(U, U && U.code, d, V);
1409
+ ) : b.from(U, U && U.code, u, V);
1368
1410
  }
1369
1411
  };
1370
- }, Zn = /* @__PURE__ */ new Map(), mt = (e) => {
1412
+ }, Zn = /* @__PURE__ */ new Map(), bt = (e) => {
1371
1413
  let t = e && e.env || {};
1372
- const { fetch: n, Request: r, Response: s } = t, i = [
1414
+ const { fetch: n, Request: r, Response: s } = t, o = [
1373
1415
  r,
1374
1416
  s,
1375
1417
  n
1376
1418
  ];
1377
- let o = i.length, l = o, f, u, c = Zn;
1419
+ let i = o.length, l = i, f, d, c = Zn;
1378
1420
  for (; l--; )
1379
- f = i[l], u = c.get(f), u === void 0 && c.set(f, u = l ? /* @__PURE__ */ new Map() : Qn(t)), c = u;
1380
- return u;
1421
+ f = o[l], d = c.get(f), d === void 0 && c.set(f, d = l ? /* @__PURE__ */ new Map() : Qn(t)), c = d;
1422
+ return d;
1381
1423
  };
1382
- mt();
1424
+ bt();
1383
1425
  const Re = {
1384
1426
  http: mn,
1385
1427
  xhr: Jn,
1386
1428
  fetch: {
1387
- get: mt
1429
+ get: bt
1388
1430
  }
1389
1431
  };
1390
1432
  a.forEach(Re, (e, t) => {
@@ -1396,28 +1438,28 @@ a.forEach(Re, (e, t) => {
1396
1438
  Object.defineProperty(e, "adapterName", { value: t });
1397
1439
  }
1398
1440
  });
1399
- const $e = (e) => `- ${e}`, Yn = (e) => a.isFunction(e) || e === null || e === !1;
1441
+ const Me = (e) => `- ${e}`, Yn = (e) => a.isFunction(e) || e === null || e === !1;
1400
1442
  function er(e, t) {
1401
1443
  e = a.isArray(e) ? e : [e];
1402
1444
  const { length: n } = e;
1403
1445
  let r, s;
1404
- const i = {};
1405
- for (let o = 0; o < n; o++) {
1406
- r = e[o];
1446
+ const o = {};
1447
+ for (let i = 0; i < n; i++) {
1448
+ r = e[i];
1407
1449
  let l;
1408
1450
  if (s = r, !Yn(r) && (s = Re[(l = String(r)).toLowerCase()], s === void 0))
1409
1451
  throw new b(`Unknown adapter '${l}'`);
1410
1452
  if (s && (a.isFunction(s) || (s = s.get(t))))
1411
1453
  break;
1412
- i[l || "#" + o] = s;
1454
+ o[l || "#" + i] = s;
1413
1455
  }
1414
1456
  if (!s) {
1415
- const o = Object.entries(i).map(
1416
- ([f, u]) => `adapter ${f} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
1457
+ const i = Object.entries(o).map(
1458
+ ([f, d]) => `adapter ${f} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
1417
1459
  );
1418
- let l = n ? o.length > 1 ? `since :
1419
- ` + o.map($e).join(`
1420
- `) : " " + $e(o[0]) : "as no adapter specified";
1460
+ let l = n ? i.length > 1 ? `since :
1461
+ ` + i.map(Me).join(`
1462
+ `) : " " + Me(i[0]) : "as no adapter specified";
1421
1463
  throw new b(
1422
1464
  "There is no suitable adapter to dispatch the request " + l,
1423
1465
  "ERR_NOT_SUPPORT"
@@ -1425,7 +1467,7 @@ function er(e, t) {
1425
1467
  }
1426
1468
  return s;
1427
1469
  }
1428
- const bt = {
1470
+ const yt = {
1429
1471
  /**
1430
1472
  * Resolve an adapter from a list of adapter names or functions.
1431
1473
  * @type {Function}
@@ -1442,24 +1484,24 @@ function me(e) {
1442
1484
  throw new J(null, e);
1443
1485
  }
1444
1486
  function ze(e) {
1445
- return me(e), e.headers = N.from(e.headers), e.data = pe.call(
1487
+ return me(e), e.headers = N.from(e.headers), e.data = he.call(
1446
1488
  e,
1447
1489
  e.transformRequest
1448
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), bt.getAdapter(e.adapter || Q.adapter, e)(e).then(function(r) {
1449
- return me(e), r.data = pe.call(
1490
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), yt.getAdapter(e.adapter || Q.adapter, e)(e).then(function(r) {
1491
+ return me(e), r.data = he.call(
1450
1492
  e,
1451
1493
  e.transformResponse,
1452
1494
  r
1453
1495
  ), r.headers = N.from(r.headers), r;
1454
1496
  }, function(r) {
1455
- return dt(r) || (me(e), r && r.response && (r.response.data = pe.call(
1497
+ return ft(r) || (me(e), r && r.response && (r.response.data = he.call(
1456
1498
  e,
1457
1499
  e.transformResponse,
1458
1500
  r.response
1459
1501
  ), r.response.headers = N.from(r.response.headers))), Promise.reject(r);
1460
1502
  });
1461
1503
  }
1462
- const yt = "1.13.2", ue = {};
1504
+ const gt = "1.13.2", ue = {};
1463
1505
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1464
1506
  ue[e] = function(r) {
1465
1507
  return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
@@ -1467,21 +1509,21 @@ const yt = "1.13.2", ue = {};
1467
1509
  });
1468
1510
  const Je = {};
1469
1511
  ue.transitional = function(t, n, r) {
1470
- function s(i, o) {
1471
- return "[Axios v" + yt + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
1512
+ function s(o, i) {
1513
+ return "[Axios v" + gt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
1472
1514
  }
1473
- return (i, o, l) => {
1515
+ return (o, i, l) => {
1474
1516
  if (t === !1)
1475
1517
  throw new b(
1476
- s(o, " has been removed" + (n ? " in " + n : "")),
1518
+ s(i, " has been removed" + (n ? " in " + n : "")),
1477
1519
  b.ERR_DEPRECATED
1478
1520
  );
1479
- return n && !Je[o] && (Je[o] = !0, console.warn(
1521
+ return n && !Je[i] && (Je[i] = !0, console.warn(
1480
1522
  s(
1481
- o,
1523
+ i,
1482
1524
  " has been deprecated since v" + n + " and will be removed in the near future"
1483
1525
  )
1484
- )), t ? t(i, o, l) : !0;
1526
+ )), t ? t(o, i, l) : !0;
1485
1527
  };
1486
1528
  };
1487
1529
  ue.spelling = function(t) {
@@ -1493,22 +1535,22 @@ function tr(e, t, n) {
1493
1535
  const r = Object.keys(e);
1494
1536
  let s = r.length;
1495
1537
  for (; s-- > 0; ) {
1496
- const i = r[s], o = t[i];
1497
- if (o) {
1498
- const l = e[i], f = l === void 0 || o(l, i, e);
1538
+ const o = r[s], i = t[o];
1539
+ if (i) {
1540
+ const l = e[o], f = l === void 0 || i(l, o, e);
1499
1541
  if (f !== !0)
1500
- throw new b("option " + i + " must be " + f, b.ERR_BAD_OPTION_VALUE);
1542
+ throw new b("option " + o + " must be " + f, b.ERR_BAD_OPTION_VALUE);
1501
1543
  continue;
1502
1544
  }
1503
1545
  if (n !== !0)
1504
- throw new b("Unknown option " + i, b.ERR_BAD_OPTION);
1546
+ throw new b("Unknown option " + o, b.ERR_BAD_OPTION);
1505
1547
  }
1506
1548
  }
1507
1549
  const se = {
1508
1550
  assertOptions: tr,
1509
1551
  validators: ue
1510
1552
  }, _ = se.validators;
1511
- let v = class {
1553
+ let q = class {
1512
1554
  constructor(t) {
1513
1555
  this.defaults = t || {}, this.interceptors = {
1514
1556
  request: new _e(),
@@ -1530,10 +1572,10 @@ let v = class {
1530
1572
  if (r instanceof Error) {
1531
1573
  let s = {};
1532
1574
  Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
1533
- const i = s.stack ? s.stack.replace(/^.+\n/, "") : "";
1575
+ const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
1534
1576
  try {
1535
- r.stack ? i && !String(r.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (r.stack += `
1536
- ` + i) : r.stack = i;
1577
+ r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
1578
+ ` + o) : r.stack = o;
1537
1579
  } catch {
1538
1580
  }
1539
1581
  }
@@ -1541,8 +1583,8 @@ let v = class {
1541
1583
  }
1542
1584
  }
1543
1585
  _request(t, n) {
1544
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = H(this.defaults, n);
1545
- const { transitional: r, paramsSerializer: s, headers: i } = n;
1586
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = v(this.defaults, n);
1587
+ const { transitional: r, paramsSerializer: s, headers: o } = n;
1546
1588
  r !== void 0 && se.assertOptions(r, {
1547
1589
  silentJSONParsing: _.transitional(_.boolean),
1548
1590
  forcedJSONParsing: _.transitional(_.boolean),
@@ -1556,61 +1598,61 @@ let v = class {
1556
1598
  baseUrl: _.spelling("baseURL"),
1557
1599
  withXsrfToken: _.spelling("withXSRFToken")
1558
1600
  }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1559
- let o = i && a.merge(
1560
- i.common,
1561
- i[n.method]
1601
+ let i = o && a.merge(
1602
+ o.common,
1603
+ o[n.method]
1562
1604
  );
1563
- i && a.forEach(
1605
+ o && a.forEach(
1564
1606
  ["delete", "get", "head", "post", "put", "patch", "common"],
1565
- (d) => {
1566
- delete i[d];
1607
+ (u) => {
1608
+ delete o[u];
1567
1609
  }
1568
- ), n.headers = N.concat(o, i);
1610
+ ), n.headers = N.concat(i, o);
1569
1611
  const l = [];
1570
1612
  let f = !0;
1571
1613
  this.interceptors.request.forEach(function(m) {
1572
1614
  typeof m.runWhen == "function" && m.runWhen(n) === !1 || (f = f && m.synchronous, l.unshift(m.fulfilled, m.rejected));
1573
1615
  });
1574
- const u = [];
1616
+ const d = [];
1575
1617
  this.interceptors.response.forEach(function(m) {
1576
- u.push(m.fulfilled, m.rejected);
1618
+ d.push(m.fulfilled, m.rejected);
1577
1619
  });
1578
- let c, p = 0, w;
1620
+ let c, h = 0, y;
1579
1621
  if (!f) {
1580
- const d = [ze.bind(this), void 0];
1581
- for (d.unshift(...l), d.push(...u), w = d.length, c = Promise.resolve(n); p < w; )
1582
- c = c.then(d[p++], d[p++]);
1622
+ const u = [ze.bind(this), void 0];
1623
+ for (u.unshift(...l), u.push(...d), y = u.length, c = Promise.resolve(n); h < y; )
1624
+ c = c.then(u[h++], u[h++]);
1583
1625
  return c;
1584
1626
  }
1585
- w = l.length;
1586
- let g = n;
1587
- for (; p < w; ) {
1588
- const d = l[p++], m = l[p++];
1627
+ y = l.length;
1628
+ let E = n;
1629
+ for (; h < y; ) {
1630
+ const u = l[h++], m = l[h++];
1589
1631
  try {
1590
- g = d(g);
1591
- } catch (h) {
1592
- m.call(this, h);
1632
+ E = u(E);
1633
+ } catch (p) {
1634
+ m.call(this, p);
1593
1635
  break;
1594
1636
  }
1595
1637
  }
1596
1638
  try {
1597
- c = ze.call(this, g);
1598
- } catch (d) {
1599
- return Promise.reject(d);
1639
+ c = ze.call(this, E);
1640
+ } catch (u) {
1641
+ return Promise.reject(u);
1600
1642
  }
1601
- for (p = 0, w = u.length; p < w; )
1602
- c = c.then(u[p++], u[p++]);
1643
+ for (h = 0, y = d.length; h < y; )
1644
+ c = c.then(d[h++], d[h++]);
1603
1645
  return c;
1604
1646
  }
1605
1647
  getUri(t) {
1606
- t = H(this.defaults, t);
1648
+ t = v(this.defaults, t);
1607
1649
  const n = ht(t.baseURL, t.url, t.allowAbsoluteUrls);
1608
- return lt(n, t.params, t.paramsSerializer);
1650
+ return ct(n, t.params, t.paramsSerializer);
1609
1651
  }
1610
1652
  };
1611
1653
  a.forEach(["delete", "get", "head", "options"], function(t) {
1612
- v.prototype[t] = function(n, r) {
1613
- return this.request(H(r || {}, {
1654
+ q.prototype[t] = function(n, r) {
1655
+ return this.request(v(r || {}, {
1614
1656
  method: t,
1615
1657
  url: n,
1616
1658
  data: (r || {}).data
@@ -1619,44 +1661,44 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
1619
1661
  });
1620
1662
  a.forEach(["post", "put", "patch"], function(t) {
1621
1663
  function n(r) {
1622
- return function(i, o, l) {
1623
- return this.request(H(l || {}, {
1664
+ return function(o, i, l) {
1665
+ return this.request(v(l || {}, {
1624
1666
  method: t,
1625
1667
  headers: r ? {
1626
1668
  "Content-Type": "multipart/form-data"
1627
1669
  } : {},
1628
- url: i,
1629
- data: o
1670
+ url: o,
1671
+ data: i
1630
1672
  }));
1631
1673
  };
1632
1674
  }
1633
- v.prototype[t] = n(), v.prototype[t + "Form"] = n(!0);
1675
+ q.prototype[t] = n(), q.prototype[t + "Form"] = n(!0);
1634
1676
  });
1635
1677
  let nr = class wt {
1636
1678
  constructor(t) {
1637
1679
  if (typeof t != "function")
1638
1680
  throw new TypeError("executor must be a function.");
1639
1681
  let n;
1640
- this.promise = new Promise(function(i) {
1641
- n = i;
1682
+ this.promise = new Promise(function(o) {
1683
+ n = o;
1642
1684
  });
1643
1685
  const r = this;
1644
1686
  this.promise.then((s) => {
1645
1687
  if (!r._listeners) return;
1646
- let i = r._listeners.length;
1647
- for (; i-- > 0; )
1648
- r._listeners[i](s);
1688
+ let o = r._listeners.length;
1689
+ for (; o-- > 0; )
1690
+ r._listeners[o](s);
1649
1691
  r._listeners = null;
1650
1692
  }), this.promise.then = (s) => {
1651
- let i;
1652
- const o = new Promise((l) => {
1653
- r.subscribe(l), i = l;
1693
+ let o;
1694
+ const i = new Promise((l) => {
1695
+ r.subscribe(l), o = l;
1654
1696
  }).then(s);
1655
- return o.cancel = function() {
1656
- r.unsubscribe(i);
1657
- }, o;
1658
- }, t(function(i, o, l) {
1659
- r.reason || (r.reason = new J(i, o, l), n(r.reason));
1697
+ return i.cancel = function() {
1698
+ r.unsubscribe(o);
1699
+ }, i;
1700
+ }, t(function(o, i, l) {
1701
+ r.reason || (r.reason = new J(o, i, l), n(r.reason));
1660
1702
  });
1661
1703
  }
1662
1704
  /**
@@ -1713,7 +1755,7 @@ function rr(e) {
1713
1755
  function sr(e) {
1714
1756
  return a.isObject(e) && e.isAxiosError === !0;
1715
1757
  }
1716
- const ge = {
1758
+ const we = {
1717
1759
  Continue: 100,
1718
1760
  SwitchingProtocols: 101,
1719
1761
  Processing: 102,
@@ -1784,53 +1826,53 @@ const ge = {
1784
1826
  SslHandshakeFailed: 525,
1785
1827
  InvalidSslCertificate: 526
1786
1828
  };
1787
- Object.entries(ge).forEach(([e, t]) => {
1788
- ge[t] = e;
1829
+ Object.entries(we).forEach(([e, t]) => {
1830
+ we[t] = e;
1789
1831
  });
1790
- function gt(e) {
1791
- const t = new v(e), n = Ge(v.prototype.request, t);
1792
- return a.extend(n, v.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1793
- return gt(H(e, s));
1832
+ function Et(e) {
1833
+ const t = new q(e), n = Qe(q.prototype.request, t);
1834
+ return a.extend(n, q.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1835
+ return Et(v(e, s));
1794
1836
  }, n;
1795
1837
  }
1796
- const E = gt(Q);
1797
- E.Axios = v;
1798
- E.CanceledError = J;
1799
- E.CancelToken = nr;
1800
- E.isCancel = dt;
1801
- E.VERSION = yt;
1802
- E.toFormData = ce;
1803
- E.AxiosError = b;
1804
- E.Cancel = E.CanceledError;
1805
- E.all = function(t) {
1838
+ const x = Et(Q);
1839
+ x.Axios = q;
1840
+ x.CanceledError = J;
1841
+ x.CancelToken = nr;
1842
+ x.isCancel = ft;
1843
+ x.VERSION = gt;
1844
+ x.toFormData = ce;
1845
+ x.AxiosError = b;
1846
+ x.Cancel = x.CanceledError;
1847
+ x.all = function(t) {
1806
1848
  return Promise.all(t);
1807
1849
  };
1808
- E.spread = rr;
1809
- E.isAxiosError = sr;
1810
- E.mergeConfig = H;
1811
- E.AxiosHeaders = N;
1812
- E.formToJSON = (e) => ut(a.isHTMLForm(e) ? new FormData(e) : e);
1813
- E.getAdapter = bt.getAdapter;
1814
- E.HttpStatusCode = ge;
1815
- E.default = E;
1850
+ x.spread = rr;
1851
+ x.isAxiosError = sr;
1852
+ x.mergeConfig = v;
1853
+ x.AxiosHeaders = N;
1854
+ x.formToJSON = (e) => dt(a.isHTMLForm(e) ? new FormData(e) : e);
1855
+ x.getAdapter = yt.getAdapter;
1856
+ x.HttpStatusCode = we;
1857
+ x.default = x;
1816
1858
  const {
1817
- Axios: hr,
1818
- AxiosError: pr,
1859
+ Axios: pr,
1860
+ AxiosError: hr,
1819
1861
  CanceledError: mr,
1820
1862
  isCancel: br,
1821
1863
  CancelToken: yr,
1822
- VERSION: wr,
1823
- all: gr,
1864
+ VERSION: gr,
1865
+ all: wr,
1824
1866
  Cancel: Er,
1825
1867
  isAxiosError: xr,
1826
1868
  spread: Sr,
1827
1869
  toFormData: Rr,
1828
- AxiosHeaders: Or,
1829
- HttpStatusCode: Tr,
1830
- formToJSON: Ar,
1831
- getAdapter: Nr,
1832
- mergeConfig: Cr
1833
- } = E, Et = async (e, t, n, r) => {
1870
+ AxiosHeaders: Cr,
1871
+ HttpStatusCode: Or,
1872
+ formToJSON: Tr,
1873
+ getAdapter: Ar,
1874
+ mergeConfig: Nr
1875
+ } = x, xt = async (e, t, n, r) => {
1834
1876
  const s = {
1835
1877
  chatInput: e,
1836
1878
  sessionId: t,
@@ -1839,7 +1881,7 @@ const {
1839
1881
  }
1840
1882
  };
1841
1883
  try {
1842
- return (await E.post(
1884
+ return (await x.post(
1843
1885
  r,
1844
1886
  s,
1845
1887
  {
@@ -1848,148 +1890,254 @@ const {
1848
1890
  }
1849
1891
  }
1850
1892
  )).data.output;
1851
- } catch (i) {
1852
- throw console.error("Error communicating with chat API:", i), i;
1853
- }
1854
- }, or = ({ handleMessageFromForm: e, sessionId: t, pineconeNamespace: n, chatbotHostURL: r }) => {
1855
- const [s, i] = L(""), [o, l] = L(""), [f, u] = L(""), [c, p] = L(!1);
1856
- return /* @__PURE__ */ y("div", { className: "p-5 border-t bg-white flex-shrink-0", children: /* @__PURE__ */ R("form", { onSubmit: async (g) => {
1857
- if (g.preventDefault(), p(!0), u(""), !s.trim() || !o.trim()) {
1858
- u("Name and email are required");
1893
+ } catch (o) {
1894
+ throw console.error("Error communicating with chat API:", o), o;
1895
+ }
1896
+ }, or = ({ handleMessageFromForm: e, theme: t, chatBotData: n }) => {
1897
+ const [r, s] = L(""), [o, i] = L(""), [l, f] = L(""), [d, c] = L(!1), h = async (y) => {
1898
+ if (y.preventDefault(), c(!0), f(""), !r.trim() || !o.trim()) {
1899
+ f("Name and email are required");
1859
1900
  return;
1860
1901
  }
1861
- const d = `Hi, I am ${s} and my email is ${o}`;
1902
+ const E = `Hi, I am ${r} and my email is ${o}`;
1862
1903
  try {
1863
- const h = (await Et(d, t, n, r)).response;
1904
+ const m = (await xt(E, n.sessionId, n.pineconeNamespace, n.url)).response;
1864
1905
  e([
1865
- { type: "user", text: d },
1866
- { type: "bot", text: h }
1906
+ { type: "user", text: E },
1907
+ { type: "bot", text: m }
1867
1908
  ]);
1868
- } catch (m) {
1869
- console.log("error sending user details", m), u("Failed to submit. Please try again.");
1909
+ } catch (u) {
1910
+ console.log("error sending user details", u), f("Failed to submit. Please try again.");
1870
1911
  } finally {
1871
- p(!1);
1912
+ c(!1);
1872
1913
  }
1873
- i(""), l("");
1874
- }, className: "flex flex-col gap-6", children: [
1875
- f && /* @__PURE__ */ y("div", { className: "bg-red-100 text-neutral-800 p-2 rounded relative text-center text-sm", role: "alert", children: f }),
1876
- /* @__PURE__ */ y("p", { className: "text-neutral-700 text-sm font-medium", children: "Please enter your details to get started." }),
1877
- /* @__PURE__ */ R("div", { className: "flex flex-col gap-5", children: [
1878
- /* @__PURE__ */ R("div", { className: "flex flex-col gap-1", children: [
1879
- /* @__PURE__ */ y("label", { className: "text-sm text-neutral-700", children: "Full Name" }),
1880
- /* @__PURE__ */ y(
1881
- "input",
1914
+ s(""), i("");
1915
+ };
1916
+ return /* @__PURE__ */ g(
1917
+ "div",
1918
+ {
1919
+ className: "p-5 flex-shrink-0",
1920
+ style: { background: t.backgroundColor },
1921
+ children: /* @__PURE__ */ C("form", { onSubmit: h, className: "flex flex-col gap-6", children: [
1922
+ l && /* @__PURE__ */ g("div", { className: "bg-red-100 text-neutral-800 p-2 rounded relative text-center text-sm", role: "alert", children: l }),
1923
+ /* @__PURE__ */ g(
1924
+ "p",
1882
1925
  {
1883
- type: "text",
1884
- placeholder: "Enter your full name",
1885
- value: s,
1886
- onChange: (g) => {
1887
- i(g.target.value), u("");
1888
- },
1889
- className: "w-full px-3 py-2 border border-neutral-300 rounded-xl bg-neutral-50",
1890
- required: !0
1926
+ className: " text-sm font-medium",
1927
+ style: { color: `${t.fontColor}` },
1928
+ children: n.welcomeText
1891
1929
  }
1892
- )
1893
- ] }),
1894
- /* @__PURE__ */ R("div", { className: "flex flex-col gap-1", children: [
1895
- /* @__PURE__ */ y("label", { className: "text-sm text-neutral-700", children: "Email Address" }),
1896
- /* @__PURE__ */ y(
1897
- "input",
1930
+ ),
1931
+ /* @__PURE__ */ C("div", { className: "flex flex-col gap-5", children: [
1932
+ /* @__PURE__ */ C("div", { className: "flex flex-col gap-1", children: [
1933
+ /* @__PURE__ */ g(
1934
+ "label",
1935
+ {
1936
+ className: "text-sm",
1937
+ style: { color: `${t.fontColor}` },
1938
+ children: "Full Name"
1939
+ }
1940
+ ),
1941
+ /* @__PURE__ */ g(
1942
+ "input",
1943
+ {
1944
+ type: "text",
1945
+ placeholder: "Enter your full name",
1946
+ value: r,
1947
+ onChange: (y) => {
1948
+ s(y.target.value), f("");
1949
+ },
1950
+ className: "w-full px-3 py-2 border border-neutral-300 rounded-xl",
1951
+ style: { background: `${t.backgroundColor}`, color: `${t.fontColor}` },
1952
+ required: !0
1953
+ }
1954
+ )
1955
+ ] }),
1956
+ /* @__PURE__ */ C("div", { className: "flex flex-col gap-1", children: [
1957
+ /* @__PURE__ */ g(
1958
+ "label",
1959
+ {
1960
+ className: "text-sm",
1961
+ style: { color: `${t.fontColor}` },
1962
+ children: "Email Address"
1963
+ }
1964
+ ),
1965
+ /* @__PURE__ */ g(
1966
+ "input",
1967
+ {
1968
+ type: "email",
1969
+ placeholder: "Enter your email",
1970
+ value: o,
1971
+ onChange: (y) => {
1972
+ i(y.target.value), f("");
1973
+ },
1974
+ className: "w-full px-3 py-2 border border-neutral-300 rounded-xl",
1975
+ style: { background: `${t.backgroundColor}`, color: `${t.fontColor}` },
1976
+ required: !0
1977
+ }
1978
+ )
1979
+ ] })
1980
+ ] }),
1981
+ /* @__PURE__ */ g(
1982
+ "button",
1898
1983
  {
1899
- type: "email",
1900
- placeholder: "Enter your email",
1901
- value: o,
1902
- onChange: (g) => {
1903
- l(g.target.value), u("");
1984
+ type: "submit",
1985
+ disabled: !r.trim() || !o.trim() || d,
1986
+ className: "disabled:opacity-50 disabled:cursor-not-allowed px-5 py-3 rounded-xl font-medium flex items-center justify-center gap-2 mt-20",
1987
+ style: {
1988
+ background: `linear-gradient(135deg, ${t.primaryColor}, ${t.secondaryColor})`,
1989
+ color: t.fontColor
1904
1990
  },
1905
- className: "w-full px-3 py-2 border border-neutral-300 rounded-xl bg-neutral-50",
1906
- required: !0
1991
+ children: d ? "Submitting..." : /* @__PURE__ */ C(Ve, { children: [
1992
+ /* @__PURE__ */ g(Ge, { size: 18 }),
1993
+ " Submit"
1994
+ ] })
1907
1995
  }
1908
1996
  )
1909
1997
  ] })
1910
- ] }),
1911
- /* @__PURE__ */ y(
1912
- "button",
1998
+ }
1999
+ );
2000
+ }, ir = ({ onClose: e, theme: t, chatBotData: n }) => {
2001
+ const [r, s] = L([]), [o, i] = L(!1), [l, f] = L(!1), d = n.position === "left" ? "left-8" : "right-8", c = {
2002
+ boxShadow: "0 20px 25px -5px rgba(0,0,0,0.15)",
2003
+ background: t.backgroundColor
2004
+ }, h = {
2005
+ background: `linear-gradient(135deg, ${t.primaryColor}, ${t.secondaryColor})`,
2006
+ color: t.fontColor
2007
+ }, y = {
2008
+ background: t.backgroundColor,
2009
+ color: t.fontColor
2010
+ }, E = (m) => {
2011
+ s(m), f(!0);
2012
+ }, u = async (m) => {
2013
+ i(!0), s((p) => [...p, { type: "user", text: m }]);
2014
+ try {
2015
+ const w = (await xt(m, n.sessionId, n.pineconeNamespace, n.url)).response;
2016
+ s((R) => [...R, { type: "bot", text: w }]);
2017
+ } catch (p) {
2018
+ console.error("Chat error:", p), s((w) => [
2019
+ ...w,
2020
+ { type: "bot", text: "Sorry, something went wrong." }
2021
+ ]);
2022
+ } finally {
2023
+ i(!1);
2024
+ }
2025
+ };
2026
+ return /* @__PURE__ */ C(
2027
+ "div",
2028
+ {
2029
+ className: `fixed bottom-28 ${d} z-50 w-96 h-[520px] bg-white/90 backdrop-blur-xl rounded-2xl border border-white flex flex-col overflow-hidden`,
2030
+ style: c,
2031
+ children: [
2032
+ /* @__PURE__ */ C(
2033
+ "div",
2034
+ {
2035
+ className: "bg-gradient-to-r px-5 py-4 rounded-t-2xl flex items-center justify-between shadow-md",
2036
+ style: h,
2037
+ children: [
2038
+ /* @__PURE__ */ C("div", { className: "flex items-center gap-3", children: [
2039
+ /* @__PURE__ */ C("div", { className: "relative", children: [
2040
+ /* @__PURE__ */ g("div", { className: "w-11 h-11 rounded-full flex items-center justify-center", children: /* @__PURE__ */ g(Xe, { size: 22 }) }),
2041
+ /* @__PURE__ */ g("span", { className: "absolute bottom-0 right-0 w-3.5 h-3.5 bg-emerald-400 rounded-full border-1 border-white" })
2042
+ ] }),
2043
+ /* @__PURE__ */ C("div", { children: [
2044
+ /* @__PURE__ */ g("h3", { className: "font-semibold text-lg", children: n.name }),
2045
+ /* @__PURE__ */ g("p", { className: "text-xs opacity-90", children: n.subTitle })
2046
+ ] })
2047
+ ] }),
2048
+ /* @__PURE__ */ g(
2049
+ "button",
2050
+ {
2051
+ onClick: e,
2052
+ "aria-label": "Close chat",
2053
+ className: "p-2 hover:bg-white/20 rounded-full",
2054
+ children: /* @__PURE__ */ g(Ke, { size: 20 })
2055
+ }
2056
+ )
2057
+ ]
2058
+ }
2059
+ ),
2060
+ !l && /* @__PURE__ */ g(
2061
+ or,
2062
+ {
2063
+ handleMessageFromForm: E,
2064
+ theme: t,
2065
+ chatBotData: n
2066
+ }
2067
+ ),
2068
+ l && /* @__PURE__ */ C(Ve, { children: [
2069
+ /* @__PURE__ */ g(Nt, { messages: r, isLoading: o, theme: t }),
2070
+ /* @__PURE__ */ g(At, { onSendMessage: u, isLoading: o, theme: t })
2071
+ ] }),
2072
+ /* @__PURE__ */ g(
2073
+ "div",
2074
+ {
2075
+ className: "border-t border-neutral-200 px-5 py-3 text-center",
2076
+ style: y,
2077
+ children: /* @__PURE__ */ C(
2078
+ "p",
2079
+ {
2080
+ className: "text-[11px] tracking-wide",
2081
+ style: { color: `${t.fontColor}` },
2082
+ children: [
2083
+ "powered by ",
2084
+ /* @__PURE__ */ g(
2085
+ "span",
2086
+ {
2087
+ className: "font-semibold ",
2088
+ style: { color: `${t.fontColor}` },
2089
+ children: "clone67.com"
2090
+ }
2091
+ )
2092
+ ]
2093
+ }
2094
+ )
2095
+ }
2096
+ )
2097
+ ]
2098
+ }
2099
+ );
2100
+ }, kr = ({
2101
+ pineconeNamespace: e,
2102
+ url: t,
2103
+ primaryColor: n,
2104
+ secondaryColor: r,
2105
+ backgroundColor: s,
2106
+ fontColor: o,
2107
+ placeholderColor: i,
2108
+ position: l,
2109
+ name: f,
2110
+ subTitle: d,
2111
+ welcomeText: c
2112
+ }) => {
2113
+ const [h, y] = L(!1), [E, u] = L("");
2114
+ We(() => {
2115
+ u(Ot());
2116
+ }, []);
2117
+ const m = () => y((R) => !R), p = { primaryColor: n, secondaryColor: r, backgroundColor: s, fontColor: o, placeholderColor: i }, w = { name: f, subTitle: d, welcomeText: c, url: t, pineconeNamespace: e, position: l, sessionId: E };
2118
+ return /* @__PURE__ */ C("div", { className: "fixed inset-0 pointer-events-auto z-[9999]", children: [
2119
+ h && /* @__PURE__ */ g(
2120
+ ir,
1913
2121
  {
1914
- type: "submit",
1915
- disabled: !s.trim() || !o.trim() || c,
1916
- className: `bg-sky-600 hover:bg-sky-700 disabled:opacity-50
1917
- disabled:cursor-not-allowed text-white px-5 py-3
1918
- rounded-xl font-medium flex items-center justify-center gap-2 mt-20`,
1919
- children: c ? "Submitting..." : /* @__PURE__ */ R(Ve, { children: [
1920
- /* @__PURE__ */ y(Xe, { size: 18 }),
1921
- " Submit"
1922
- ] })
2122
+ onClose: m,
2123
+ sessionId: E,
2124
+ pineconeNamespace: e,
2125
+ url: t,
2126
+ theme: p,
2127
+ chatBotData: w
2128
+ }
2129
+ ),
2130
+ /* @__PURE__ */ g(
2131
+ Tt,
2132
+ {
2133
+ onClick: m,
2134
+ isOpen: h,
2135
+ theme: p,
2136
+ chatBotData: w
1923
2137
  }
1924
2138
  )
1925
- ] }) });
1926
- }, ir = ({ onClose: e, sessionId: t, pineconeNamespace: n, chatbotHostURL: r }) => {
1927
- const [s, i] = L([]), [o, l] = L(!1), [f, u] = L(!1);
1928
- return /* @__PURE__ */ R("div", { className: `fixed bottom-28 shadow-xl right-8 z-50 w-96 h-[520px] bg-white/90
1929
- backdrop-blur-xl rounded-2xl border border-neutral-100
1930
- flex flex-col overflow-hidden`, children: [
1931
- /* @__PURE__ */ R("div", { className: `bg-gradient-to-r from-sky-500 to-sky-600 text-white px-5 py-4
1932
- rounded-t-2xl flex items-center justify-between shadow-sm`, children: [
1933
- /* @__PURE__ */ R("div", { className: "flex items-center gap-3", children: [
1934
- /* @__PURE__ */ R("div", { className: "relative", children: [
1935
- /* @__PURE__ */ y("div", { className: "w-11 h-11 bg-white/25 rounded-full flex items-center justify-center", children: /* @__PURE__ */ y(Ke, { size: 22 }) }),
1936
- /* @__PURE__ */ y("span", { className: "absolute bottom-0 right-0 w-3.5 h-3.5 bg-emerald-400 rounded-full border-2 border-white" })
1937
- ] }),
1938
- /* @__PURE__ */ R("div", { children: [
1939
- /* @__PURE__ */ y("h3", { className: "font-semibold text-lg", children: "Swiggy" }),
1940
- /* @__PURE__ */ y("p", { className: "text-xs opacity-90", children: "Virtual assistance" })
1941
- ] })
1942
- ] }),
1943
- /* @__PURE__ */ y(
1944
- "button",
1945
- {
1946
- onClick: e,
1947
- "aria-label": "Close chat",
1948
- className: "p-2 hover:bg-white/20 rounded-full",
1949
- children: /* @__PURE__ */ y(Ot, { size: 20 })
1950
- }
1951
- )
1952
- ] }),
1953
- !f && /* @__PURE__ */ y(or, { handleMessageFromForm: (w) => {
1954
- i(w), u(!0);
1955
- }, sessionId: t, pineconeNamespace: n, chatbotHostURL: r }),
1956
- f && /* @__PURE__ */ R(Ve, { children: [
1957
- /* @__PURE__ */ y(Ct, { messages: s, isLoading: o }),
1958
- /* @__PURE__ */ y(Nt, { onSendMessage: async (w) => {
1959
- l(!0), i((g) => [...g, { type: "user", text: w }]);
1960
- try {
1961
- const d = (await Et(w, t, n, r)).response;
1962
- i((m) => [...m, { type: "bot", text: d }]);
1963
- } catch (g) {
1964
- console.error("Chat error:", g), i((d) => [
1965
- ...d,
1966
- { type: "bot", text: "Sorry, something went wrong." }
1967
- ]);
1968
- } finally {
1969
- l(!1);
1970
- }
1971
- }, isLoading: o })
1972
- ] }),
1973
- /* @__PURE__ */ y("div", { className: "bg-neutral-50 border-t border-neutral-200 px-5 py-3 text-center", children: /* @__PURE__ */ R("p", { className: "text-[11px] text-neutral-500 tracking-wide", children: [
1974
- "powered by ",
1975
- /* @__PURE__ */ y("span", { className: "font-semibold text-neutral-600", children: "clone67.com" })
1976
- ] }) })
1977
2139
  ] });
1978
2140
  };
1979
- function Pr({ pineconeNamespace: e, chatbotHostURL: t }) {
1980
- const [n, r] = L(!1), [s, i] = L("");
1981
- We(() => {
1982
- const l = Tt();
1983
- i(l);
1984
- }, []);
1985
- const o = () => {
1986
- r((l) => !l);
1987
- };
1988
- return /* @__PURE__ */ R("div", { className: "fixed bottom-7 right-7", children: [
1989
- n && /* @__PURE__ */ y(ir, { onClose: o, sessionId: s, pineconeNamespace: e, chatbotHostURL: t }),
1990
- /* @__PURE__ */ y(At, { onClick: o })
1991
- ] });
1992
- }
1993
2141
  export {
1994
- Pr as default
2142
+ kr as default
1995
2143
  };