@tarxemo/customer_support 1.0.15 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var Et = Object.defineProperty;
|
|
2
2
|
var _t = (e, t, r) => t in e ? Et(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
-
var
|
|
3
|
+
var ke = (e, t, r) => _t(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
import b, { useState as G, useEffect as _e, useRef as Ge, useCallback as se } from "react";
|
|
5
5
|
import { ExternalLink as St, Send as Rt, X as Ot, Loader2 as Tt, MessageCircle as At } from "lucide-react";
|
|
6
6
|
function Ye(e, t) {
|
|
@@ -11,16 +11,16 @@ function Ye(e, t) {
|
|
|
11
11
|
const { toString: Ct } = Object.prototype, { getPrototypeOf: Se } = Object, { iterator: le, toStringTag: Qe } = Symbol, ue = /* @__PURE__ */ ((e) => (t) => {
|
|
12
12
|
const r = Ct.call(t);
|
|
13
13
|
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
14
|
-
})(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) => ue(t) === e), de = (e) => (t) => typeof t === e, { isArray:
|
|
14
|
+
})(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) => ue(t) === e), de = (e) => (t) => typeof t === e, { isArray: V } = Array, W = de("undefined");
|
|
15
15
|
function Y(e) {
|
|
16
|
-
return e !== null && !
|
|
16
|
+
return e !== null && !W(e) && e.constructor !== null && !W(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
17
17
|
}
|
|
18
18
|
const Ze = D("ArrayBuffer");
|
|
19
19
|
function Nt(e) {
|
|
20
20
|
let t;
|
|
21
21
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ze(e.buffer), t;
|
|
22
22
|
}
|
|
23
|
-
const
|
|
23
|
+
const vt = de("string"), P = de("function"), et = de("number"), Q = (e) => e !== null && typeof e == "object", kt = (e) => e === !0 || e === !1, oe = (e) => {
|
|
24
24
|
if (ue(e) !== "object")
|
|
25
25
|
return !1;
|
|
26
26
|
const t = Se(e);
|
|
@@ -33,16 +33,16 @@ const kt = de("string"), v = de("function"), et = de("number"), Q = (e) => e !==
|
|
|
33
33
|
} catch {
|
|
34
34
|
return !1;
|
|
35
35
|
}
|
|
36
|
-
}, Ut = D("Date"), Dt = D("File"), Ft = D("Blob"), Lt = D("FileList"), It = (e) => Q(e) &&
|
|
36
|
+
}, Ut = D("Date"), Dt = D("File"), Ft = D("Blob"), Lt = D("FileList"), It = (e) => Q(e) && P(e.pipe), Bt = (e) => {
|
|
37
37
|
let t;
|
|
38
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
39
|
-
t === "object" &&
|
|
38
|
+
return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = ue(e)) === "formdata" || // detect form-data instance
|
|
39
|
+
t === "object" && P(e.toString) && e.toString() === "[object FormData]"));
|
|
40
40
|
}, jt = D("URLSearchParams"), [$t, Mt, Ht, qt] = ["ReadableStream", "Request", "Response", "Headers"].map(D), zt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
41
41
|
function Z(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
42
42
|
if (e === null || typeof e > "u")
|
|
43
43
|
return;
|
|
44
44
|
let s, n;
|
|
45
|
-
if (typeof e != "object" && (e = [e]),
|
|
45
|
+
if (typeof e != "object" && (e = [e]), V(e))
|
|
46
46
|
for (s = 0, n = e.length; s < n; s++)
|
|
47
47
|
t.call(null, e[s], s, e);
|
|
48
48
|
else {
|
|
@@ -65,18 +65,18 @@ function tt(e, t) {
|
|
|
65
65
|
return n;
|
|
66
66
|
return null;
|
|
67
67
|
}
|
|
68
|
-
const
|
|
68
|
+
const H = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, rt = (e) => !W(e) && e !== H;
|
|
69
69
|
function be() {
|
|
70
70
|
const { caseless: e, skipUndefined: t } = rt(this) && this || {}, r = {}, s = (n, o) => {
|
|
71
71
|
const i = e && tt(r, o) || o;
|
|
72
|
-
oe(r[i]) && oe(n) ? r[i] = be(r[i], n) : oe(n) ? r[i] = be({}, n) :
|
|
72
|
+
oe(r[i]) && oe(n) ? r[i] = be(r[i], n) : oe(n) ? r[i] = be({}, n) : V(n) ? r[i] = n.slice() : (!t || !W(n)) && (r[i] = n);
|
|
73
73
|
};
|
|
74
74
|
for (let n = 0, o = arguments.length; n < o; n++)
|
|
75
75
|
arguments[n] && Z(arguments[n], s);
|
|
76
76
|
return r;
|
|
77
77
|
}
|
|
78
78
|
const Jt = (e, t, r, { allOwnKeys: s } = {}) => (Z(t, (n, o) => {
|
|
79
|
-
r &&
|
|
79
|
+
r && P(n) ? Object.defineProperty(e, o, {
|
|
80
80
|
value: Ye(n, r),
|
|
81
81
|
writable: !0,
|
|
82
82
|
enumerable: !0,
|
|
@@ -87,7 +87,7 @@ const Jt = (e, t, r, { allOwnKeys: s } = {}) => (Z(t, (n, o) => {
|
|
|
87
87
|
enumerable: !0,
|
|
88
88
|
configurable: !0
|
|
89
89
|
});
|
|
90
|
-
}, { allOwnKeys: s }), e), Kt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e),
|
|
90
|
+
}, { allOwnKeys: s }), e), Kt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Wt = (e, t, r, s) => {
|
|
91
91
|
e.prototype = Object.create(t.prototype, s), Object.defineProperty(e.prototype, "constructor", {
|
|
92
92
|
value: e,
|
|
93
93
|
writable: !0,
|
|
@@ -96,7 +96,7 @@ const Jt = (e, t, r, { allOwnKeys: s } = {}) => (Z(t, (n, o) => {
|
|
|
96
96
|
}), Object.defineProperty(e, "super", {
|
|
97
97
|
value: t.prototype
|
|
98
98
|
}), r && Object.assign(e.prototype, r);
|
|
99
|
-
},
|
|
99
|
+
}, Vt = (e, t, r, s) => {
|
|
100
100
|
let n, o, i;
|
|
101
101
|
const a = {};
|
|
102
102
|
if (t = t || {}, e == null) return t;
|
|
@@ -112,7 +112,7 @@ const Jt = (e, t, r, { allOwnKeys: s } = {}) => (Z(t, (n, o) => {
|
|
|
112
112
|
return s !== -1 && s === r;
|
|
113
113
|
}, Gt = (e) => {
|
|
114
114
|
if (!e) return null;
|
|
115
|
-
if (
|
|
115
|
+
if (V(e)) return e;
|
|
116
116
|
let t = e.length;
|
|
117
117
|
if (!et(t)) return null;
|
|
118
118
|
const r = new Array(t);
|
|
@@ -145,10 +145,10 @@ const Jt = (e, t, r, { allOwnKeys: s } = {}) => (Z(t, (n, o) => {
|
|
|
145
145
|
}), Object.defineProperties(e, s);
|
|
146
146
|
}, sr = (e) => {
|
|
147
147
|
st(e, (t, r) => {
|
|
148
|
-
if (
|
|
148
|
+
if (P(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
149
149
|
return !1;
|
|
150
150
|
const s = e[r];
|
|
151
|
-
if (
|
|
151
|
+
if (P(s)) {
|
|
152
152
|
if (t.enumerable = !1, "writable" in t) {
|
|
153
153
|
t.writable = !1;
|
|
154
154
|
return;
|
|
@@ -164,11 +164,11 @@ const Jt = (e, t, r, { allOwnKeys: s } = {}) => (Z(t, (n, o) => {
|
|
|
164
164
|
r[o] = !0;
|
|
165
165
|
});
|
|
166
166
|
};
|
|
167
|
-
return
|
|
167
|
+
return V(e) ? s(e) : s(String(e).split(t)), r;
|
|
168
168
|
}, or = () => {
|
|
169
169
|
}, ir = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
170
170
|
function ar(e) {
|
|
171
|
-
return !!(e &&
|
|
171
|
+
return !!(e && P(e.append) && e[Qe] === "FormData" && e[le]);
|
|
172
172
|
}
|
|
173
173
|
const cr = (e) => {
|
|
174
174
|
const t = new Array(10), r = (s, n) => {
|
|
@@ -179,32 +179,32 @@ const cr = (e) => {
|
|
|
179
179
|
return s;
|
|
180
180
|
if (!("toJSON" in s)) {
|
|
181
181
|
t[n] = s;
|
|
182
|
-
const o =
|
|
182
|
+
const o = V(s) ? [] : {};
|
|
183
183
|
return Z(s, (i, a) => {
|
|
184
184
|
const f = r(i, n + 1);
|
|
185
|
-
!
|
|
185
|
+
!W(f) && (o[a] = f);
|
|
186
186
|
}), t[n] = void 0, o;
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
return s;
|
|
190
190
|
};
|
|
191
191
|
return r(e, 0);
|
|
192
|
-
}, lr = D("AsyncFunction"), ur = (e) => e && (Q(e) ||
|
|
193
|
-
n ===
|
|
192
|
+
}, lr = D("AsyncFunction"), ur = (e) => e && (Q(e) || P(e)) && P(e.then) && P(e.catch), nt = ((e, t) => e ? setImmediate : t ? ((r, s) => (H.addEventListener("message", ({ source: n, data: o }) => {
|
|
193
|
+
n === H && o === r && s.length && s.shift()();
|
|
194
194
|
}, !1), (n) => {
|
|
195
|
-
s.push(n),
|
|
195
|
+
s.push(n), H.postMessage(r, "*");
|
|
196
196
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
197
197
|
typeof setImmediate == "function",
|
|
198
|
-
|
|
199
|
-
), dr = typeof queueMicrotask < "u" ? queueMicrotask.bind(
|
|
200
|
-
isArray:
|
|
198
|
+
P(H.postMessage)
|
|
199
|
+
), dr = typeof queueMicrotask < "u" ? queueMicrotask.bind(H) : typeof process < "u" && process.nextTick || nt, fr = (e) => e != null && P(e[le]), c = {
|
|
200
|
+
isArray: V,
|
|
201
201
|
isArrayBuffer: Ze,
|
|
202
202
|
isBuffer: Y,
|
|
203
203
|
isFormData: Bt,
|
|
204
204
|
isArrayBufferView: Nt,
|
|
205
|
-
isString:
|
|
205
|
+
isString: vt,
|
|
206
206
|
isNumber: et,
|
|
207
|
-
isBoolean:
|
|
207
|
+
isBoolean: kt,
|
|
208
208
|
isObject: Q,
|
|
209
209
|
isPlainObject: oe,
|
|
210
210
|
isEmptyObject: Pt,
|
|
@@ -212,12 +212,12 @@ const cr = (e) => {
|
|
|
212
212
|
isRequest: Mt,
|
|
213
213
|
isResponse: Ht,
|
|
214
214
|
isHeaders: qt,
|
|
215
|
-
isUndefined:
|
|
215
|
+
isUndefined: W,
|
|
216
216
|
isDate: Ut,
|
|
217
217
|
isFile: Dt,
|
|
218
218
|
isBlob: Ft,
|
|
219
219
|
isRegExp: rr,
|
|
220
|
-
isFunction:
|
|
220
|
+
isFunction: P,
|
|
221
221
|
isStream: It,
|
|
222
222
|
isURLSearchParams: jt,
|
|
223
223
|
isTypedArray: Yt,
|
|
@@ -227,8 +227,8 @@ const cr = (e) => {
|
|
|
227
227
|
extend: Jt,
|
|
228
228
|
trim: zt,
|
|
229
229
|
stripBOM: Kt,
|
|
230
|
-
inherits:
|
|
231
|
-
toFlatObject:
|
|
230
|
+
inherits: Wt,
|
|
231
|
+
toFlatObject: Vt,
|
|
232
232
|
kindOf: ue,
|
|
233
233
|
kindOfTest: D,
|
|
234
234
|
endsWith: Xt,
|
|
@@ -246,7 +246,7 @@ const cr = (e) => {
|
|
|
246
246
|
noop: or,
|
|
247
247
|
toFiniteNumber: ir,
|
|
248
248
|
findKey: tt,
|
|
249
|
-
global:
|
|
249
|
+
global: H,
|
|
250
250
|
isContextDefined: rt,
|
|
251
251
|
isSpecCompliantForm: ar,
|
|
252
252
|
toJSONObject: cr,
|
|
@@ -256,7 +256,7 @@ const cr = (e) => {
|
|
|
256
256
|
asap: dr,
|
|
257
257
|
isIterable: fr
|
|
258
258
|
};
|
|
259
|
-
let
|
|
259
|
+
let w = class ot extends Error {
|
|
260
260
|
static from(t, r, s, n, o, i) {
|
|
261
261
|
const a = new ot(t.message, r || t.code, s, n, o);
|
|
262
262
|
return a.cause = t, a.name = t.name, i && Object.assign(a, i), a;
|
|
@@ -295,18 +295,18 @@ let g = class ot extends Error {
|
|
|
295
295
|
};
|
|
296
296
|
}
|
|
297
297
|
};
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
298
|
+
w.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
299
|
+
w.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
300
|
+
w.ECONNABORTED = "ECONNABORTED";
|
|
301
|
+
w.ETIMEDOUT = "ETIMEDOUT";
|
|
302
|
+
w.ERR_NETWORK = "ERR_NETWORK";
|
|
303
|
+
w.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
304
|
+
w.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
305
|
+
w.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
306
|
+
w.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
307
|
+
w.ERR_CANCELED = "ERR_CANCELED";
|
|
308
|
+
w.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
309
|
+
w.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
310
310
|
const pr = null;
|
|
311
311
|
function ye(e) {
|
|
312
312
|
return c.isPlainObject(e) || c.isArray(e);
|
|
@@ -345,19 +345,19 @@ function fe(e, t, r) {
|
|
|
345
345
|
if (c.isBoolean(d))
|
|
346
346
|
return d.toString();
|
|
347
347
|
if (!f && c.isBlob(d))
|
|
348
|
-
throw new
|
|
348
|
+
throw new w("Blob is not supported. Use a Buffer instead.");
|
|
349
349
|
return c.isArrayBuffer(d) || c.isTypedArray(d) ? f && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
|
|
350
350
|
}
|
|
351
351
|
function l(d, h, m) {
|
|
352
|
-
let
|
|
352
|
+
let E = d;
|
|
353
353
|
if (d && !m && typeof d == "object") {
|
|
354
354
|
if (c.endsWith(h, "{}"))
|
|
355
355
|
h = s ? h : h.slice(0, -2), d = JSON.stringify(d);
|
|
356
|
-
else if (c.isArray(d) && mr(d) || (c.isFileList(d) || c.endsWith(h, "[]")) && (
|
|
357
|
-
return h = it(h),
|
|
356
|
+
else if (c.isArray(d) && mr(d) || (c.isFileList(d) || c.endsWith(h, "[]")) && (E = c.toArray(d)))
|
|
357
|
+
return h = it(h), E.forEach(function(x, O) {
|
|
358
358
|
!(c.isUndefined(x) || x === null) && t.append(
|
|
359
359
|
// eslint-disable-next-line no-nested-ternary
|
|
360
|
-
i === !0 ? Ue([h],
|
|
360
|
+
i === !0 ? Ue([h], O, o) : i === null ? h : h + "[]",
|
|
361
361
|
u(x)
|
|
362
362
|
);
|
|
363
363
|
}), !1;
|
|
@@ -369,24 +369,24 @@ function fe(e, t, r) {
|
|
|
369
369
|
convertValue: u,
|
|
370
370
|
isVisitable: ye
|
|
371
371
|
});
|
|
372
|
-
function
|
|
372
|
+
function A(d, h) {
|
|
373
373
|
if (!c.isUndefined(d)) {
|
|
374
374
|
if (p.indexOf(d) !== -1)
|
|
375
375
|
throw Error("Circular reference detected in " + h.join("."));
|
|
376
|
-
p.push(d), c.forEach(d, function(
|
|
377
|
-
(!(c.isUndefined(
|
|
376
|
+
p.push(d), c.forEach(d, function(E, R) {
|
|
377
|
+
(!(c.isUndefined(E) || E === null) && n.call(
|
|
378
378
|
t,
|
|
379
|
-
|
|
380
|
-
c.isString(
|
|
379
|
+
E,
|
|
380
|
+
c.isString(R) ? R.trim() : R,
|
|
381
381
|
h,
|
|
382
382
|
y
|
|
383
|
-
)) === !0 &&
|
|
383
|
+
)) === !0 && A(E, h ? h.concat(R) : [R]);
|
|
384
384
|
}), p.pop();
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
387
|
if (!c.isObject(e))
|
|
388
388
|
throw new TypeError("data must be an object");
|
|
389
|
-
return
|
|
389
|
+
return A(e), t;
|
|
390
390
|
}
|
|
391
391
|
function De(e) {
|
|
392
392
|
const t = {
|
|
@@ -508,14 +508,14 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Sr
|
|
|
508
508
|
hasStandardBrowserWebWorkerEnv: _r,
|
|
509
509
|
navigator: xe,
|
|
510
510
|
origin: Sr
|
|
511
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
511
|
+
}, Symbol.toStringTag, { value: "Module" })), k = {
|
|
512
512
|
...Rr,
|
|
513
513
|
...xr
|
|
514
514
|
};
|
|
515
515
|
function Or(e, t) {
|
|
516
|
-
return fe(e, new
|
|
516
|
+
return fe(e, new k.classes.URLSearchParams(), {
|
|
517
517
|
visitor: function(r, s, n, o) {
|
|
518
|
-
return
|
|
518
|
+
return k.isNode && c.isBuffer(r) ? (this.append(s, r.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
519
519
|
},
|
|
520
520
|
...t
|
|
521
521
|
});
|
|
@@ -595,7 +595,7 @@ const ee = {
|
|
|
595
595
|
return JSON.parse(t, this.parseReviver);
|
|
596
596
|
} catch (a) {
|
|
597
597
|
if (i)
|
|
598
|
-
throw a.name === "SyntaxError" ?
|
|
598
|
+
throw a.name === "SyntaxError" ? w.from(a, w.ERR_BAD_RESPONSE, this, null, this.response) : a;
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
return t;
|
|
@@ -610,8 +610,8 @@ const ee = {
|
|
|
610
610
|
maxContentLength: -1,
|
|
611
611
|
maxBodyLength: -1,
|
|
612
612
|
env: {
|
|
613
|
-
FormData:
|
|
614
|
-
Blob:
|
|
613
|
+
FormData: k.classes.FormData,
|
|
614
|
+
Blob: k.classes.Blob
|
|
615
615
|
},
|
|
616
616
|
validateStatus: function(t) {
|
|
617
617
|
return t >= 200 && t < 300;
|
|
@@ -644,7 +644,7 @@ const Nr = c.toObjectSet([
|
|
|
644
644
|
"referer",
|
|
645
645
|
"retry-after",
|
|
646
646
|
"user-agent"
|
|
647
|
-
]),
|
|
647
|
+
]), vr = (e) => {
|
|
648
648
|
const t = {};
|
|
649
649
|
let r, s, n;
|
|
650
650
|
return e && e.split(`
|
|
@@ -658,7 +658,7 @@ function X(e) {
|
|
|
658
658
|
function ie(e) {
|
|
659
659
|
return e === !1 || e == null ? e : c.isArray(e) ? e.map(ie) : String(e);
|
|
660
660
|
}
|
|
661
|
-
function
|
|
661
|
+
function kr(e) {
|
|
662
662
|
const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
663
663
|
let s;
|
|
664
664
|
for (; s = r.exec(e); )
|
|
@@ -690,7 +690,7 @@ function Dr(e, t) {
|
|
|
690
690
|
});
|
|
691
691
|
});
|
|
692
692
|
}
|
|
693
|
-
let
|
|
693
|
+
let U = class {
|
|
694
694
|
constructor(t) {
|
|
695
695
|
t && this.set(t);
|
|
696
696
|
}
|
|
@@ -707,7 +707,7 @@ let P = class {
|
|
|
707
707
|
if (c.isPlainObject(t) || t instanceof this.constructor)
|
|
708
708
|
i(t, r);
|
|
709
709
|
else if (c.isString(t) && (t = t.trim()) && !Pr(t))
|
|
710
|
-
i(
|
|
710
|
+
i(vr(t), r);
|
|
711
711
|
else if (c.isObject(t) && c.isIterable(t)) {
|
|
712
712
|
let a = {}, f, u;
|
|
713
713
|
for (const l of t) {
|
|
@@ -728,7 +728,7 @@ let P = class {
|
|
|
728
728
|
if (!r)
|
|
729
729
|
return n;
|
|
730
730
|
if (r === !0)
|
|
731
|
-
return
|
|
731
|
+
return kr(n);
|
|
732
732
|
if (c.isFunction(r))
|
|
733
733
|
return r.call(this, n, s);
|
|
734
734
|
if (c.isRegExp(r))
|
|
@@ -816,8 +816,8 @@ let P = class {
|
|
|
816
816
|
return c.isArray(t) ? t.forEach(o) : o(t), this;
|
|
817
817
|
}
|
|
818
818
|
};
|
|
819
|
-
|
|
820
|
-
c.reduceDescriptors(
|
|
819
|
+
U.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
820
|
+
c.reduceDescriptors(U.prototype, ({ value: e }, t) => {
|
|
821
821
|
let r = t[0].toUpperCase() + t.slice(1);
|
|
822
822
|
return {
|
|
823
823
|
get: () => e,
|
|
@@ -826,9 +826,9 @@ c.reduceDescriptors(P.prototype, ({ value: e }, t) => {
|
|
|
826
826
|
}
|
|
827
827
|
};
|
|
828
828
|
});
|
|
829
|
-
c.freezeMethods(
|
|
829
|
+
c.freezeMethods(U);
|
|
830
830
|
function ge(e, t) {
|
|
831
|
-
const r = this || ee, s = t || r, n =
|
|
831
|
+
const r = this || ee, s = t || r, n = U.from(s.headers);
|
|
832
832
|
let o = s.data;
|
|
833
833
|
return c.forEach(e, function(a) {
|
|
834
834
|
o = a.call(r, o, n.normalize(), t ? t.status : void 0);
|
|
@@ -837,7 +837,7 @@ function ge(e, t) {
|
|
|
837
837
|
function dt(e) {
|
|
838
838
|
return !!(e && e.__CANCEL__);
|
|
839
839
|
}
|
|
840
|
-
let te = class extends
|
|
840
|
+
let te = class extends w {
|
|
841
841
|
/**
|
|
842
842
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
843
843
|
*
|
|
@@ -848,14 +848,14 @@ let te = class extends g {
|
|
|
848
848
|
* @returns {CanceledError} The created error.
|
|
849
849
|
*/
|
|
850
850
|
constructor(t, r, s) {
|
|
851
|
-
super(t ?? "canceled",
|
|
851
|
+
super(t ?? "canceled", w.ERR_CANCELED, r, s), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
852
852
|
}
|
|
853
853
|
};
|
|
854
854
|
function ft(e, t, r) {
|
|
855
855
|
const s = r.config.validateStatus;
|
|
856
|
-
!r.status || !s || s(r.status) ? e(r) : t(new
|
|
856
|
+
!r.status || !s || s(r.status) ? e(r) : t(new w(
|
|
857
857
|
"Request failed with status code " + r.status,
|
|
858
|
-
[
|
|
858
|
+
[w.ERR_BAD_REQUEST, w.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
|
|
859
859
|
r.config,
|
|
860
860
|
r.request,
|
|
861
861
|
r
|
|
@@ -877,8 +877,8 @@ function Lr(e, t) {
|
|
|
877
877
|
y += r[p++], p = p % e;
|
|
878
878
|
if (n = (n + 1) % e, n === o && (o = (o + 1) % e), u - i < t)
|
|
879
879
|
return;
|
|
880
|
-
const
|
|
881
|
-
return
|
|
880
|
+
const A = l && u - l;
|
|
881
|
+
return A ? Math.round(y * 1e3 / A) : void 0;
|
|
882
882
|
};
|
|
883
883
|
}
|
|
884
884
|
function Ir(e, t) {
|
|
@@ -919,10 +919,10 @@ const ce = (e, t, r = 3) => {
|
|
|
919
919
|
total: e,
|
|
920
920
|
loaded: s
|
|
921
921
|
}), t[1]];
|
|
922
|
-
}, Be = (e) => (...t) => c.asap(() => e(...t)), Br =
|
|
923
|
-
new URL(
|
|
924
|
-
|
|
925
|
-
) : () => !0, jr =
|
|
922
|
+
}, Be = (e) => (...t) => c.asap(() => e(...t)), Br = k.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (r) => (r = new URL(r, k.origin), e.protocol === r.protocol && e.host === r.host && (t || e.port === r.port)))(
|
|
923
|
+
new URL(k.origin),
|
|
924
|
+
k.navigator && /(msie|trident)/i.test(k.navigator.userAgent)
|
|
925
|
+
) : () => !0, jr = k.hasStandardBrowserEnv ? (
|
|
926
926
|
// Standard browser envs support document.cookie
|
|
927
927
|
{
|
|
928
928
|
write(e, t, r, s, n, o, i) {
|
|
@@ -961,8 +961,8 @@ function pt(e, t, r) {
|
|
|
961
961
|
let s = !$r(t);
|
|
962
962
|
return e && (s || r == !1) ? Mr(e, t) : t;
|
|
963
963
|
}
|
|
964
|
-
const je = (e) => e instanceof
|
|
965
|
-
function
|
|
964
|
+
const je = (e) => e instanceof U ? { ...e } : e;
|
|
965
|
+
function z(e, t) {
|
|
966
966
|
t = t || {};
|
|
967
967
|
const r = {};
|
|
968
968
|
function s(u, l, p, y) {
|
|
@@ -1027,13 +1027,13 @@ function J(e, t) {
|
|
|
1027
1027
|
}), r;
|
|
1028
1028
|
}
|
|
1029
1029
|
const mt = (e) => {
|
|
1030
|
-
const t =
|
|
1030
|
+
const t = z({}, e);
|
|
1031
1031
|
let { data: r, withXSRFToken: s, xsrfHeaderName: n, xsrfCookieName: o, headers: i, auth: a } = t;
|
|
1032
|
-
if (t.headers = i =
|
|
1032
|
+
if (t.headers = i = U.from(i), t.url = ct(pt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && i.set(
|
|
1033
1033
|
"Authorization",
|
|
1034
1034
|
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
1035
1035
|
), c.isFormData(r)) {
|
|
1036
|
-
if (
|
|
1036
|
+
if (k.hasStandardBrowserEnv || k.hasStandardBrowserWebWorkerEnv)
|
|
1037
1037
|
i.setContentType(void 0);
|
|
1038
1038
|
else if (c.isFunction(r.getHeaders)) {
|
|
1039
1039
|
const f = r.getHeaders(), u = ["content-type", "content-length"];
|
|
@@ -1042,7 +1042,7 @@ const mt = (e) => {
|
|
|
1042
1042
|
});
|
|
1043
1043
|
}
|
|
1044
1044
|
}
|
|
1045
|
-
if (
|
|
1045
|
+
if (k.hasStandardBrowserEnv && (s && c.isFunction(s) && (s = s(t)), s || s !== !1 && Br(t.url))) {
|
|
1046
1046
|
const f = n && o && jr.read(o);
|
|
1047
1047
|
f && i.set(n, f);
|
|
1048
1048
|
}
|
|
@@ -1051,19 +1051,19 @@ const mt = (e) => {
|
|
|
1051
1051
|
return new Promise(function(r, s) {
|
|
1052
1052
|
const n = mt(e);
|
|
1053
1053
|
let o = n.data;
|
|
1054
|
-
const i =
|
|
1055
|
-
let { responseType: a, onUploadProgress: f, onDownloadProgress: u } = n, l, p, y,
|
|
1054
|
+
const i = U.from(n.headers).normalize();
|
|
1055
|
+
let { responseType: a, onUploadProgress: f, onDownloadProgress: u } = n, l, p, y, A, d;
|
|
1056
1056
|
function h() {
|
|
1057
|
-
|
|
1057
|
+
A && A(), d && d(), n.cancelToken && n.cancelToken.unsubscribe(l), n.signal && n.signal.removeEventListener("abort", l);
|
|
1058
1058
|
}
|
|
1059
1059
|
let m = new XMLHttpRequest();
|
|
1060
1060
|
m.open(n.method.toUpperCase(), n.url, !0), m.timeout = n.timeout;
|
|
1061
|
-
function
|
|
1061
|
+
function E() {
|
|
1062
1062
|
if (!m)
|
|
1063
1063
|
return;
|
|
1064
|
-
const x =
|
|
1064
|
+
const x = U.from(
|
|
1065
1065
|
"getAllResponseHeaders" in m && m.getAllResponseHeaders()
|
|
1066
|
-
),
|
|
1066
|
+
), N = {
|
|
1067
1067
|
data: !a || a === "text" || a === "json" ? m.responseText : m.response,
|
|
1068
1068
|
status: m.status,
|
|
1069
1069
|
statusText: m.statusText,
|
|
@@ -1071,36 +1071,36 @@ const mt = (e) => {
|
|
|
1071
1071
|
config: e,
|
|
1072
1072
|
request: m
|
|
1073
1073
|
};
|
|
1074
|
-
ft(function(
|
|
1075
|
-
r(
|
|
1076
|
-
}, function(
|
|
1077
|
-
s(
|
|
1078
|
-
},
|
|
1074
|
+
ft(function(_) {
|
|
1075
|
+
r(_), h();
|
|
1076
|
+
}, function(_) {
|
|
1077
|
+
s(_), h();
|
|
1078
|
+
}, N), m = null;
|
|
1079
1079
|
}
|
|
1080
|
-
"onloadend" in m ? m.onloadend =
|
|
1081
|
-
!m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1080
|
+
"onloadend" in m ? m.onloadend = E : m.onreadystatechange = function() {
|
|
1081
|
+
!m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(E);
|
|
1082
1082
|
}, m.onabort = function() {
|
|
1083
|
-
m && (s(new
|
|
1084
|
-
}, m.onerror = function(
|
|
1085
|
-
const
|
|
1086
|
-
|
|
1083
|
+
m && (s(new w("Request aborted", w.ECONNABORTED, e, m)), m = null);
|
|
1084
|
+
}, m.onerror = function(O) {
|
|
1085
|
+
const N = O && O.message ? O.message : "Network Error", g = new w(N, w.ERR_NETWORK, e, m);
|
|
1086
|
+
g.event = O || null, s(g), m = null;
|
|
1087
1087
|
}, m.ontimeout = function() {
|
|
1088
|
-
let
|
|
1089
|
-
const
|
|
1090
|
-
n.timeoutErrorMessage && (
|
|
1091
|
-
|
|
1092
|
-
|
|
1088
|
+
let O = n.timeout ? "timeout of " + n.timeout + "ms exceeded" : "timeout exceeded";
|
|
1089
|
+
const N = n.transitional || lt;
|
|
1090
|
+
n.timeoutErrorMessage && (O = n.timeoutErrorMessage), s(new w(
|
|
1091
|
+
O,
|
|
1092
|
+
N.clarifyTimeoutError ? w.ETIMEDOUT : w.ECONNABORTED,
|
|
1093
1093
|
e,
|
|
1094
1094
|
m
|
|
1095
1095
|
)), m = null;
|
|
1096
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in m && c.forEach(i.toJSON(), function(
|
|
1097
|
-
m.setRequestHeader(
|
|
1098
|
-
}), c.isUndefined(n.withCredentials) || (m.withCredentials = !!n.withCredentials), a && a !== "json" && (m.responseType = n.responseType), u && ([y, d] = ce(u, !0), m.addEventListener("progress", y)), f && m.upload && ([p,
|
|
1096
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in m && c.forEach(i.toJSON(), function(O, N) {
|
|
1097
|
+
m.setRequestHeader(N, O);
|
|
1098
|
+
}), c.isUndefined(n.withCredentials) || (m.withCredentials = !!n.withCredentials), a && a !== "json" && (m.responseType = n.responseType), u && ([y, d] = ce(u, !0), m.addEventListener("progress", y)), f && m.upload && ([p, A] = ce(f), m.upload.addEventListener("progress", p), m.upload.addEventListener("loadend", A)), (n.cancelToken || n.signal) && (l = (x) => {
|
|
1099
1099
|
m && (s(!x || x.type ? new te(null, e, m) : x), m.abort(), m = null);
|
|
1100
1100
|
}, n.cancelToken && n.cancelToken.subscribe(l), n.signal && (n.signal.aborted ? l() : n.signal.addEventListener("abort", l)));
|
|
1101
|
-
const
|
|
1102
|
-
if (
|
|
1103
|
-
s(new
|
|
1101
|
+
const R = Fr(n.url);
|
|
1102
|
+
if (R && k.protocols.indexOf(R) === -1) {
|
|
1103
|
+
s(new w("Unsupported protocol " + R + ":", w.ERR_BAD_REQUEST, e));
|
|
1104
1104
|
return;
|
|
1105
1105
|
}
|
|
1106
1106
|
m.send(o || null);
|
|
@@ -1113,11 +1113,11 @@ const mt = (e) => {
|
|
|
1113
1113
|
if (!n) {
|
|
1114
1114
|
n = !0, a();
|
|
1115
1115
|
const l = u instanceof Error ? u : this.reason;
|
|
1116
|
-
s.abort(l instanceof
|
|
1116
|
+
s.abort(l instanceof w ? l : new te(l instanceof Error ? l.message : l));
|
|
1117
1117
|
}
|
|
1118
1118
|
};
|
|
1119
1119
|
let i = t && setTimeout(() => {
|
|
1120
|
-
i = null, o(new
|
|
1120
|
+
i = null, o(new w(`timeout of ${t}ms exceeded`, w.ETIMEDOUT));
|
|
1121
1121
|
}, t);
|
|
1122
1122
|
const a = () => {
|
|
1123
1123
|
e && (i && clearTimeout(i), i = null, e.forEach((u) => {
|
|
@@ -1138,9 +1138,9 @@ const mt = (e) => {
|
|
|
1138
1138
|
for (; s < r; )
|
|
1139
1139
|
n = s + t, yield e.slice(s, n), s = n;
|
|
1140
1140
|
}, Kr = async function* (e, t) {
|
|
1141
|
-
for await (const r of
|
|
1141
|
+
for await (const r of Wr(e))
|
|
1142
1142
|
yield* Jr(r, t);
|
|
1143
|
-
},
|
|
1143
|
+
}, Wr = async function* (e) {
|
|
1144
1144
|
if (e[Symbol.asyncIterator]) {
|
|
1145
1145
|
yield* e;
|
|
1146
1146
|
return;
|
|
@@ -1185,7 +1185,7 @@ const mt = (e) => {
|
|
|
1185
1185
|
}, {
|
|
1186
1186
|
highWaterMark: 2
|
|
1187
1187
|
});
|
|
1188
|
-
}, Me = 64 * 1024, { isFunction: ne } = c,
|
|
1188
|
+
}, Me = 64 * 1024, { isFunction: ne } = c, Vr = (({ Request: e, Response: t }) => ({
|
|
1189
1189
|
Request: e,
|
|
1190
1190
|
Response: t
|
|
1191
1191
|
}))(c.global), {
|
|
@@ -1200,13 +1200,13 @@ const mt = (e) => {
|
|
|
1200
1200
|
}, Xr = (e) => {
|
|
1201
1201
|
e = c.merge.call({
|
|
1202
1202
|
skipUndefined: !0
|
|
1203
|
-
},
|
|
1203
|
+
}, Vr, e);
|
|
1204
1204
|
const { fetch: t, Request: r, Response: s } = e, n = t ? ne(t) : typeof fetch == "function", o = ne(r), i = ne(s);
|
|
1205
1205
|
if (!n)
|
|
1206
1206
|
return !1;
|
|
1207
1207
|
const a = n && ne(He), f = n && (typeof qe == "function" ? /* @__PURE__ */ ((d) => (h) => d.encode(h))(new qe()) : async (d) => new Uint8Array(await new r(d).arrayBuffer())), u = o && a && ze(() => {
|
|
1208
1208
|
let d = !1;
|
|
1209
|
-
const h = new r(
|
|
1209
|
+
const h = new r(k.origin, {
|
|
1210
1210
|
body: new He(),
|
|
1211
1211
|
method: "POST",
|
|
1212
1212
|
get duplex() {
|
|
@@ -1219,10 +1219,10 @@ const mt = (e) => {
|
|
|
1219
1219
|
};
|
|
1220
1220
|
n && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
|
|
1221
1221
|
!p[d] && (p[d] = (h, m) => {
|
|
1222
|
-
let
|
|
1223
|
-
if (
|
|
1224
|
-
return
|
|
1225
|
-
throw new
|
|
1222
|
+
let E = h && h[d];
|
|
1223
|
+
if (E)
|
|
1224
|
+
return E.call(h);
|
|
1225
|
+
throw new w(`Response type '${d}' is not supported`, w.ERR_NOT_SUPPORT, m);
|
|
1226
1226
|
});
|
|
1227
1227
|
});
|
|
1228
1228
|
const y = async (d) => {
|
|
@@ -1231,7 +1231,7 @@ const mt = (e) => {
|
|
|
1231
1231
|
if (c.isBlob(d))
|
|
1232
1232
|
return d.size;
|
|
1233
1233
|
if (c.isSpecCompliantForm(d))
|
|
1234
|
-
return (await new r(
|
|
1234
|
+
return (await new r(k.origin, {
|
|
1235
1235
|
method: "POST",
|
|
1236
1236
|
body: d
|
|
1237
1237
|
}).arrayBuffer()).byteLength;
|
|
@@ -1239,7 +1239,7 @@ const mt = (e) => {
|
|
|
1239
1239
|
return d.byteLength;
|
|
1240
1240
|
if (c.isURLSearchParams(d) && (d = d + ""), c.isString(d))
|
|
1241
1241
|
return (await f(d)).byteLength;
|
|
1242
|
-
},
|
|
1242
|
+
}, A = async (d, h) => {
|
|
1243
1243
|
const m = c.toFiniteNumber(d.getContentLength());
|
|
1244
1244
|
return m ?? y(h);
|
|
1245
1245
|
};
|
|
@@ -1247,86 +1247,86 @@ const mt = (e) => {
|
|
|
1247
1247
|
let {
|
|
1248
1248
|
url: h,
|
|
1249
1249
|
method: m,
|
|
1250
|
-
data:
|
|
1251
|
-
signal:
|
|
1250
|
+
data: E,
|
|
1251
|
+
signal: R,
|
|
1252
1252
|
cancelToken: x,
|
|
1253
|
-
timeout:
|
|
1254
|
-
onDownloadProgress:
|
|
1255
|
-
onUploadProgress:
|
|
1256
|
-
responseType:
|
|
1257
|
-
headers:
|
|
1258
|
-
withCredentials:
|
|
1259
|
-
fetchOptions:
|
|
1260
|
-
} = mt(d),
|
|
1261
|
-
|
|
1262
|
-
let
|
|
1263
|
-
const
|
|
1264
|
-
|
|
1253
|
+
timeout: O,
|
|
1254
|
+
onDownloadProgress: N,
|
|
1255
|
+
onUploadProgress: g,
|
|
1256
|
+
responseType: _,
|
|
1257
|
+
headers: v,
|
|
1258
|
+
withCredentials: C = "same-origin",
|
|
1259
|
+
fetchOptions: F
|
|
1260
|
+
} = mt(d), S = t || fetch;
|
|
1261
|
+
_ = _ ? (_ + "").toLowerCase() : "text";
|
|
1262
|
+
let J = zr([R, x && x.toAbortSignal()], O), M = null;
|
|
1263
|
+
const B = J && J.unsubscribe && (() => {
|
|
1264
|
+
J.unsubscribe();
|
|
1265
1265
|
});
|
|
1266
1266
|
let Ae;
|
|
1267
1267
|
try {
|
|
1268
|
-
if (
|
|
1269
|
-
let
|
|
1268
|
+
if (g && u && m !== "get" && m !== "head" && (Ae = await A(v, E)) !== 0) {
|
|
1269
|
+
let $ = new r(h, {
|
|
1270
1270
|
method: "POST",
|
|
1271
|
-
body:
|
|
1271
|
+
body: E,
|
|
1272
1272
|
duplex: "half"
|
|
1273
1273
|
}), K;
|
|
1274
|
-
if (c.isFormData(
|
|
1274
|
+
if (c.isFormData(E) && (K = $.headers.get("content-type")) && v.setContentType(K), $.body) {
|
|
1275
1275
|
const [me, re] = Ie(
|
|
1276
1276
|
Ae,
|
|
1277
|
-
ce(Be(
|
|
1277
|
+
ce(Be(g))
|
|
1278
1278
|
);
|
|
1279
|
-
|
|
1279
|
+
E = $e($.body, Me, me, re);
|
|
1280
1280
|
}
|
|
1281
1281
|
}
|
|
1282
|
-
c.isString(
|
|
1283
|
-
const
|
|
1284
|
-
...
|
|
1285
|
-
signal:
|
|
1282
|
+
c.isString(C) || (C = C ? "include" : "omit");
|
|
1283
|
+
const L = o && "credentials" in r.prototype, Ce = {
|
|
1284
|
+
...F,
|
|
1285
|
+
signal: J,
|
|
1286
1286
|
method: m.toUpperCase(),
|
|
1287
|
-
headers:
|
|
1288
|
-
body:
|
|
1287
|
+
headers: v.normalize().toJSON(),
|
|
1288
|
+
body: E,
|
|
1289
1289
|
duplex: "half",
|
|
1290
|
-
credentials:
|
|
1290
|
+
credentials: L ? C : void 0
|
|
1291
1291
|
};
|
|
1292
|
-
|
|
1293
|
-
let
|
|
1294
|
-
const Ne = l && (
|
|
1295
|
-
if (l && (
|
|
1296
|
-
const
|
|
1297
|
-
["status", "statusText", "headers"].forEach((
|
|
1298
|
-
|
|
1292
|
+
M = o && new r(h, Ce);
|
|
1293
|
+
let j = await (o ? S(M, F) : S(h, Ce));
|
|
1294
|
+
const Ne = l && (_ === "stream" || _ === "response");
|
|
1295
|
+
if (l && (N || Ne && B)) {
|
|
1296
|
+
const $ = {};
|
|
1297
|
+
["status", "statusText", "headers"].forEach((ve) => {
|
|
1298
|
+
$[ve] = j[ve];
|
|
1299
1299
|
});
|
|
1300
|
-
const K = c.toFiniteNumber(
|
|
1300
|
+
const K = c.toFiniteNumber(j.headers.get("content-length")), [me, re] = N && Ie(
|
|
1301
1301
|
K,
|
|
1302
|
-
ce(Be(
|
|
1302
|
+
ce(Be(N), !0)
|
|
1303
1303
|
) || [];
|
|
1304
|
-
|
|
1305
|
-
$e(
|
|
1306
|
-
re && re(),
|
|
1304
|
+
j = new s(
|
|
1305
|
+
$e(j.body, Me, me, () => {
|
|
1306
|
+
re && re(), B && B();
|
|
1307
1307
|
}),
|
|
1308
|
-
|
|
1308
|
+
$
|
|
1309
1309
|
);
|
|
1310
1310
|
}
|
|
1311
|
-
|
|
1312
|
-
let xt = await p[c.findKey(p,
|
|
1313
|
-
return !Ne &&
|
|
1314
|
-
ft(
|
|
1311
|
+
_ = _ || "text";
|
|
1312
|
+
let xt = await p[c.findKey(p, _) || "text"](j, d);
|
|
1313
|
+
return !Ne && B && B(), await new Promise(($, K) => {
|
|
1314
|
+
ft($, K, {
|
|
1315
1315
|
data: xt,
|
|
1316
|
-
headers:
|
|
1317
|
-
status:
|
|
1318
|
-
statusText:
|
|
1316
|
+
headers: U.from(j.headers),
|
|
1317
|
+
status: j.status,
|
|
1318
|
+
statusText: j.statusText,
|
|
1319
1319
|
config: d,
|
|
1320
|
-
request:
|
|
1320
|
+
request: M
|
|
1321
1321
|
});
|
|
1322
1322
|
});
|
|
1323
|
-
} catch (
|
|
1324
|
-
throw
|
|
1325
|
-
new
|
|
1323
|
+
} catch (L) {
|
|
1324
|
+
throw B && B(), L && L.name === "TypeError" && /Load failed|fetch/i.test(L.message) ? Object.assign(
|
|
1325
|
+
new w("Network Error", w.ERR_NETWORK, d, M),
|
|
1326
1326
|
{
|
|
1327
|
-
cause:
|
|
1327
|
+
cause: L.cause || L
|
|
1328
1328
|
}
|
|
1329
|
-
) :
|
|
1329
|
+
) : w.from(L, L && L.code, d, M);
|
|
1330
1330
|
}
|
|
1331
1331
|
};
|
|
1332
1332
|
}, Gr = /* @__PURE__ */ new Map(), ht = (e) => {
|
|
@@ -1368,7 +1368,7 @@ function Qr(e, t) {
|
|
|
1368
1368
|
s = e[i];
|
|
1369
1369
|
let a;
|
|
1370
1370
|
if (n = s, !Yr(s) && (n = Te[(a = String(s)).toLowerCase()], n === void 0))
|
|
1371
|
-
throw new
|
|
1371
|
+
throw new w(`Unknown adapter '${a}'`);
|
|
1372
1372
|
if (n && (c.isFunction(n) || (n = n.get(t))))
|
|
1373
1373
|
break;
|
|
1374
1374
|
o[a || "#" + i] = n;
|
|
@@ -1380,7 +1380,7 @@ function Qr(e, t) {
|
|
|
1380
1380
|
let a = r ? i.length > 1 ? `since :
|
|
1381
1381
|
` + i.map(Je).join(`
|
|
1382
1382
|
`) : " " + Je(i[0]) : "as no adapter specified";
|
|
1383
|
-
throw new
|
|
1383
|
+
throw new w(
|
|
1384
1384
|
"There is no suitable adapter to dispatch the request " + a,
|
|
1385
1385
|
"ERR_NOT_SUPPORT"
|
|
1386
1386
|
);
|
|
@@ -1404,7 +1404,7 @@ function we(e) {
|
|
|
1404
1404
|
throw new te(null, e);
|
|
1405
1405
|
}
|
|
1406
1406
|
function Ke(e) {
|
|
1407
|
-
return we(e), e.headers =
|
|
1407
|
+
return we(e), e.headers = U.from(e.headers), e.data = ge.call(
|
|
1408
1408
|
e,
|
|
1409
1409
|
e.transformRequest
|
|
1410
1410
|
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), gt.getAdapter(e.adapter || ee.adapter, e)(e).then(function(s) {
|
|
@@ -1412,13 +1412,13 @@ function Ke(e) {
|
|
|
1412
1412
|
e,
|
|
1413
1413
|
e.transformResponse,
|
|
1414
1414
|
s
|
|
1415
|
-
), s.headers =
|
|
1415
|
+
), s.headers = U.from(s.headers), s;
|
|
1416
1416
|
}, function(s) {
|
|
1417
1417
|
return dt(s) || (we(e), s && s.response && (s.response.data = ge.call(
|
|
1418
1418
|
e,
|
|
1419
1419
|
e.transformResponse,
|
|
1420
1420
|
s.response
|
|
1421
|
-
), s.response.headers =
|
|
1421
|
+
), s.response.headers = U.from(s.response.headers))), Promise.reject(s);
|
|
1422
1422
|
});
|
|
1423
1423
|
}
|
|
1424
1424
|
const wt = "1.13.4", pe = {};
|
|
@@ -1427,18 +1427,18 @@ const wt = "1.13.4", pe = {};
|
|
|
1427
1427
|
return typeof s === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1428
1428
|
};
|
|
1429
1429
|
});
|
|
1430
|
-
const
|
|
1430
|
+
const We = {};
|
|
1431
1431
|
pe.transitional = function(t, r, s) {
|
|
1432
1432
|
function n(o, i) {
|
|
1433
1433
|
return "[Axios v" + wt + "] Transitional option '" + o + "'" + i + (s ? ". " + s : "");
|
|
1434
1434
|
}
|
|
1435
1435
|
return (o, i, a) => {
|
|
1436
1436
|
if (t === !1)
|
|
1437
|
-
throw new
|
|
1437
|
+
throw new w(
|
|
1438
1438
|
n(i, " has been removed" + (r ? " in " + r : "")),
|
|
1439
|
-
|
|
1439
|
+
w.ERR_DEPRECATED
|
|
1440
1440
|
);
|
|
1441
|
-
return r && !
|
|
1441
|
+
return r && !We[i] && (We[i] = !0, console.warn(
|
|
1442
1442
|
n(
|
|
1443
1443
|
i,
|
|
1444
1444
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
@@ -1451,7 +1451,7 @@ pe.spelling = function(t) {
|
|
|
1451
1451
|
};
|
|
1452
1452
|
function Zr(e, t, r) {
|
|
1453
1453
|
if (typeof e != "object")
|
|
1454
|
-
throw new
|
|
1454
|
+
throw new w("options must be an object", w.ERR_BAD_OPTION_VALUE);
|
|
1455
1455
|
const s = Object.keys(e);
|
|
1456
1456
|
let n = s.length;
|
|
1457
1457
|
for (; n-- > 0; ) {
|
|
@@ -1459,18 +1459,18 @@ function Zr(e, t, r) {
|
|
|
1459
1459
|
if (i) {
|
|
1460
1460
|
const a = e[o], f = a === void 0 || i(a, o, e);
|
|
1461
1461
|
if (f !== !0)
|
|
1462
|
-
throw new
|
|
1462
|
+
throw new w("option " + o + " must be " + f, w.ERR_BAD_OPTION_VALUE);
|
|
1463
1463
|
continue;
|
|
1464
1464
|
}
|
|
1465
1465
|
if (r !== !0)
|
|
1466
|
-
throw new
|
|
1466
|
+
throw new w("Unknown option " + o, w.ERR_BAD_OPTION);
|
|
1467
1467
|
}
|
|
1468
1468
|
}
|
|
1469
1469
|
const ae = {
|
|
1470
1470
|
assertOptions: Zr,
|
|
1471
1471
|
validators: pe
|
|
1472
|
-
},
|
|
1473
|
-
let
|
|
1472
|
+
}, I = ae.validators;
|
|
1473
|
+
let q = class {
|
|
1474
1474
|
constructor(t) {
|
|
1475
1475
|
this.defaults = t || {}, this.interceptors = {
|
|
1476
1476
|
request: new Fe(),
|
|
@@ -1503,20 +1503,20 @@ let z = class {
|
|
|
1503
1503
|
}
|
|
1504
1504
|
}
|
|
1505
1505
|
_request(t, r) {
|
|
1506
|
-
typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r =
|
|
1506
|
+
typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = z(this.defaults, r);
|
|
1507
1507
|
const { transitional: s, paramsSerializer: n, headers: o } = r;
|
|
1508
1508
|
s !== void 0 && ae.assertOptions(s, {
|
|
1509
|
-
silentJSONParsing:
|
|
1510
|
-
forcedJSONParsing:
|
|
1511
|
-
clarifyTimeoutError:
|
|
1509
|
+
silentJSONParsing: I.transitional(I.boolean),
|
|
1510
|
+
forcedJSONParsing: I.transitional(I.boolean),
|
|
1511
|
+
clarifyTimeoutError: I.transitional(I.boolean)
|
|
1512
1512
|
}, !1), n != null && (c.isFunction(n) ? r.paramsSerializer = {
|
|
1513
1513
|
serialize: n
|
|
1514
1514
|
} : ae.assertOptions(n, {
|
|
1515
|
-
encode:
|
|
1516
|
-
serialize:
|
|
1515
|
+
encode: I.function,
|
|
1516
|
+
serialize: I.function
|
|
1517
1517
|
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), ae.assertOptions(r, {
|
|
1518
|
-
baseUrl:
|
|
1519
|
-
withXsrfToken:
|
|
1518
|
+
baseUrl: I.spelling("baseURL"),
|
|
1519
|
+
withXsrfToken: I.spelling("withXSRFToken")
|
|
1520
1520
|
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
1521
1521
|
let i = o && c.merge(
|
|
1522
1522
|
o.common,
|
|
@@ -1527,7 +1527,7 @@ let z = class {
|
|
|
1527
1527
|
(d) => {
|
|
1528
1528
|
delete o[d];
|
|
1529
1529
|
}
|
|
1530
|
-
), r.headers =
|
|
1530
|
+
), r.headers = U.concat(i, o);
|
|
1531
1531
|
const a = [];
|
|
1532
1532
|
let f = !0;
|
|
1533
1533
|
this.interceptors.request.forEach(function(h) {
|
|
@@ -1545,18 +1545,18 @@ let z = class {
|
|
|
1545
1545
|
return l;
|
|
1546
1546
|
}
|
|
1547
1547
|
y = a.length;
|
|
1548
|
-
let
|
|
1548
|
+
let A = r;
|
|
1549
1549
|
for (; p < y; ) {
|
|
1550
1550
|
const d = a[p++], h = a[p++];
|
|
1551
1551
|
try {
|
|
1552
|
-
|
|
1552
|
+
A = d(A);
|
|
1553
1553
|
} catch (m) {
|
|
1554
1554
|
h.call(this, m);
|
|
1555
1555
|
break;
|
|
1556
1556
|
}
|
|
1557
1557
|
}
|
|
1558
1558
|
try {
|
|
1559
|
-
l = Ke.call(this,
|
|
1559
|
+
l = Ke.call(this, A);
|
|
1560
1560
|
} catch (d) {
|
|
1561
1561
|
return Promise.reject(d);
|
|
1562
1562
|
}
|
|
@@ -1565,14 +1565,14 @@ let z = class {
|
|
|
1565
1565
|
return l;
|
|
1566
1566
|
}
|
|
1567
1567
|
getUri(t) {
|
|
1568
|
-
t =
|
|
1568
|
+
t = z(this.defaults, t);
|
|
1569
1569
|
const r = pt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1570
1570
|
return ct(r, t.params, t.paramsSerializer);
|
|
1571
1571
|
}
|
|
1572
1572
|
};
|
|
1573
1573
|
c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1574
|
-
|
|
1575
|
-
return this.request(
|
|
1574
|
+
q.prototype[t] = function(r, s) {
|
|
1575
|
+
return this.request(z(s || {}, {
|
|
1576
1576
|
method: t,
|
|
1577
1577
|
url: r,
|
|
1578
1578
|
data: (s || {}).data
|
|
@@ -1582,7 +1582,7 @@ c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1582
1582
|
c.forEach(["post", "put", "patch"], function(t) {
|
|
1583
1583
|
function r(s) {
|
|
1584
1584
|
return function(o, i, a) {
|
|
1585
|
-
return this.request(
|
|
1585
|
+
return this.request(z(a || {}, {
|
|
1586
1586
|
method: t,
|
|
1587
1587
|
headers: s ? {
|
|
1588
1588
|
"Content-Type": "multipart/form-data"
|
|
@@ -1592,7 +1592,7 @@ c.forEach(["post", "put", "patch"], function(t) {
|
|
|
1592
1592
|
}));
|
|
1593
1593
|
};
|
|
1594
1594
|
}
|
|
1595
|
-
|
|
1595
|
+
q.prototype[t] = r(), q.prototype[t + "Form"] = r(!0);
|
|
1596
1596
|
});
|
|
1597
1597
|
let es = class bt {
|
|
1598
1598
|
constructor(t) {
|
|
@@ -1750,31 +1750,31 @@ Object.entries(Ee).forEach(([e, t]) => {
|
|
|
1750
1750
|
Ee[t] = e;
|
|
1751
1751
|
});
|
|
1752
1752
|
function yt(e) {
|
|
1753
|
-
const t = new
|
|
1754
|
-
return c.extend(r,
|
|
1755
|
-
return yt(
|
|
1753
|
+
const t = new q(e), r = Ye(q.prototype.request, t);
|
|
1754
|
+
return c.extend(r, q.prototype, t, { allOwnKeys: !0 }), c.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(n) {
|
|
1755
|
+
return yt(z(e, n));
|
|
1756
1756
|
}, r;
|
|
1757
1757
|
}
|
|
1758
|
-
const
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1758
|
+
const T = yt(ee);
|
|
1759
|
+
T.Axios = q;
|
|
1760
|
+
T.CanceledError = te;
|
|
1761
|
+
T.CancelToken = es;
|
|
1762
|
+
T.isCancel = dt;
|
|
1763
|
+
T.VERSION = wt;
|
|
1764
|
+
T.toFormData = fe;
|
|
1765
|
+
T.AxiosError = w;
|
|
1766
|
+
T.Cancel = T.CanceledError;
|
|
1767
|
+
T.all = function(t) {
|
|
1768
1768
|
return Promise.all(t);
|
|
1769
1769
|
};
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1770
|
+
T.spread = ts;
|
|
1771
|
+
T.isAxiosError = rs;
|
|
1772
|
+
T.mergeConfig = z;
|
|
1773
|
+
T.AxiosHeaders = U;
|
|
1774
|
+
T.formToJSON = (e) => ut(c.isHTMLForm(e) ? new FormData(e) : e);
|
|
1775
|
+
T.getAdapter = gt.getAdapter;
|
|
1776
|
+
T.HttpStatusCode = Ee;
|
|
1777
|
+
T.default = T;
|
|
1778
1778
|
const {
|
|
1779
1779
|
Axios: bs,
|
|
1780
1780
|
AxiosError: ys,
|
|
@@ -1788,15 +1788,15 @@ const {
|
|
|
1788
1788
|
spread: As,
|
|
1789
1789
|
toFormData: Cs,
|
|
1790
1790
|
AxiosHeaders: Ns,
|
|
1791
|
-
HttpStatusCode:
|
|
1792
|
-
formToJSON:
|
|
1791
|
+
HttpStatusCode: vs,
|
|
1792
|
+
formToJSON: ks,
|
|
1793
1793
|
getAdapter: Ps,
|
|
1794
1794
|
mergeConfig: Us
|
|
1795
|
-
} =
|
|
1795
|
+
} = T, ss = "https://customers-services.tarxemo.com/api";
|
|
1796
1796
|
class ns {
|
|
1797
1797
|
constructor(t, r = ss) {
|
|
1798
|
-
|
|
1799
|
-
this.client =
|
|
1798
|
+
ke(this, "client");
|
|
1799
|
+
this.client = T.create({
|
|
1800
1800
|
baseURL: r,
|
|
1801
1801
|
headers: {
|
|
1802
1802
|
"Content-Type": "application/json",
|
|
@@ -1859,7 +1859,7 @@ class ns {
|
|
|
1859
1859
|
this.client.defaults.baseURL = t;
|
|
1860
1860
|
}
|
|
1861
1861
|
}
|
|
1862
|
-
function
|
|
1862
|
+
function Ve(e, t) {
|
|
1863
1863
|
const [r, s] = G(() => {
|
|
1864
1864
|
try {
|
|
1865
1865
|
const n = window.localStorage.getItem(e);
|
|
@@ -1881,50 +1881,50 @@ function Xe() {
|
|
|
1881
1881
|
}
|
|
1882
1882
|
const os = "customer_support_session_id", is = "customer_support_messages";
|
|
1883
1883
|
function as(e) {
|
|
1884
|
-
const { apiKey: t, baseUrl: r, onError: s } = e, [n, o] =
|
|
1884
|
+
const { apiKey: t, baseUrl: r, onError: s } = e, [n, o] = Ve(is, []), [i, a] = Ve(
|
|
1885
1885
|
os,
|
|
1886
1886
|
Xe()
|
|
1887
1887
|
), [f, u] = G(!1), [l, p] = G(null), y = Ge(null);
|
|
1888
1888
|
_e(() => {
|
|
1889
1889
|
y.current = new ns(t, r);
|
|
1890
1890
|
}, [t, r]);
|
|
1891
|
-
const
|
|
1891
|
+
const A = se(() => {
|
|
1892
1892
|
p(null);
|
|
1893
1893
|
}, []), d = se(
|
|
1894
|
-
async (
|
|
1894
|
+
async (E) => {
|
|
1895
1895
|
if (!y.current) {
|
|
1896
1896
|
const x = new Error("API client not initialized");
|
|
1897
1897
|
p(x), s == null || s(x);
|
|
1898
1898
|
return;
|
|
1899
1899
|
}
|
|
1900
|
-
if (!
|
|
1900
|
+
if (!E.trim())
|
|
1901
1901
|
return;
|
|
1902
|
-
const
|
|
1902
|
+
const R = {
|
|
1903
1903
|
id: `user_${Date.now()}`,
|
|
1904
1904
|
role: "USER",
|
|
1905
|
-
content:
|
|
1905
|
+
content: E,
|
|
1906
1906
|
timestamp: /* @__PURE__ */ new Date()
|
|
1907
1907
|
};
|
|
1908
|
-
o((x) => [...x,
|
|
1908
|
+
o((x) => [...x, R]), u(!0), p(null);
|
|
1909
1909
|
try {
|
|
1910
|
-
const x = await y.current.sendMessage(
|
|
1910
|
+
const x = await y.current.sendMessage(E, i), O = {
|
|
1911
1911
|
id: `assistant_${Date.now()}`,
|
|
1912
1912
|
role: "ASSISTANT",
|
|
1913
1913
|
content: x.answer,
|
|
1914
1914
|
timestamp: /* @__PURE__ */ new Date(),
|
|
1915
1915
|
sources: x.sources
|
|
1916
1916
|
};
|
|
1917
|
-
o((
|
|
1917
|
+
o((N) => [...N, O]), x.session_id !== i && a(x.session_id);
|
|
1918
1918
|
} catch (x) {
|
|
1919
|
-
const
|
|
1920
|
-
p(
|
|
1921
|
-
const
|
|
1919
|
+
const O = x instanceof Error ? x : new Error("Failed to send message");
|
|
1920
|
+
p(O), s == null || s(O);
|
|
1921
|
+
const N = {
|
|
1922
1922
|
id: `error_${Date.now()}`,
|
|
1923
1923
|
role: "ASSISTANT",
|
|
1924
|
-
content: `Sorry, I encountered an error: ${
|
|
1924
|
+
content: `Sorry, I encountered an error: ${O.message}`,
|
|
1925
1925
|
timestamp: /* @__PURE__ */ new Date()
|
|
1926
1926
|
};
|
|
1927
|
-
o((
|
|
1927
|
+
o((g) => [...g, N]);
|
|
1928
1928
|
} finally {
|
|
1929
1929
|
u(!1);
|
|
1930
1930
|
}
|
|
@@ -1934,16 +1934,16 @@ function as(e) {
|
|
|
1934
1934
|
if (!(!y.current || !i)) {
|
|
1935
1935
|
u(!0), p(null);
|
|
1936
1936
|
try {
|
|
1937
|
-
const
|
|
1938
|
-
id: `${x.role.toLowerCase()}_${
|
|
1937
|
+
const R = (await y.current.getConversationHistory(i)).messages.map((x, O) => ({
|
|
1938
|
+
id: `${x.role.toLowerCase()}_${O}_${Date.now()}`,
|
|
1939
1939
|
role: x.role.toUpperCase(),
|
|
1940
1940
|
content: x.content,
|
|
1941
1941
|
timestamp: new Date(x.created_at)
|
|
1942
1942
|
}));
|
|
1943
|
-
o(
|
|
1944
|
-
} catch (
|
|
1945
|
-
const
|
|
1946
|
-
p(
|
|
1943
|
+
o(R);
|
|
1944
|
+
} catch (E) {
|
|
1945
|
+
const R = E instanceof Error ? E : new Error("Failed to load history");
|
|
1946
|
+
p(R), s == null || s(R);
|
|
1947
1947
|
} finally {
|
|
1948
1948
|
u(!1);
|
|
1949
1949
|
}
|
|
@@ -1956,7 +1956,7 @@ function as(e) {
|
|
|
1956
1956
|
sendMessage: d,
|
|
1957
1957
|
isLoading: f,
|
|
1958
1958
|
error: l,
|
|
1959
|
-
clearError:
|
|
1959
|
+
clearError: A,
|
|
1960
1960
|
sessionId: i,
|
|
1961
1961
|
loadHistory: h,
|
|
1962
1962
|
clearHistory: m
|
|
@@ -2036,7 +2036,7 @@ const cs = ({ message: e }) => {
|
|
|
2036
2036
|
placeholder: o
|
|
2037
2037
|
}
|
|
2038
2038
|
)));
|
|
2039
|
-
}, ds = ':root{--cs-primary-color: inherit;--cs-secondary-color: inherit;--cs-bg-color: inherit;--cs-text-color: inherit;--cs-font-family: inherit;--cs-border-radius: 12px;--cs-button-color: var(--cs-primary-color);--cs-user-message-color: var(--cs-primary-color);--cs-assistant-message-color: rgba(0, 0, 0, .05);--cs-header-gradient: linear-gradient(135deg, var(--cs-primary-color), var(--cs-secondary-color));--cs-header-text-color: #ffffff;--cs-bg-text-color: #1a1a1a;--cs-user-text-color: #ffffff;--cs-assistant-text-color: #1a1a1a;--cs-success-color: #4ade80;--cs-error-color: #ef4444;--cs-error-bg-color: rgba(239, 68, 68, .1);--cs-border-color: rgba(0, 0, 0, .1);--cs-shadow-color: rgba(0, 0, 0, .1);--cs-scrollbar-thumb: rgba(0, 0, 0, .2);--cs-scrollbar-track: transparent;--cs-shadow-sm: 0 1px 2px 0 var(--cs-shadow-color);--cs-shadow: 0 4px 6px -1px var(--cs-shadow-color), 0 2px 4px -1px var(--cs-shadow-color);--cs-shadow-lg: 0 10px 15px -3px var(--cs-shadow-color), 0 4px 6px -2px var(--cs-shadow-color);--cs-shadow-xl: 0 20px 25px -5px var(--cs-shadow-color), 0 10px 10px -5px var(--cs-shadow-color)}.cs-widget{position:fixed;z-index:9999;font-family:var(--cs-font-family)}.cs-widget,.cs-widget *{box-sizing:border-box}.cs-widget--bottom-right{bottom:20px;right:20px}.cs-widget--bottom-left{bottom:20px;left:20px}.cs-widget--top-right{top:20px;right:20px}.cs-widget--top-left{top:20px;left:20px}.cs-widget__toggle{position:relative;width:60px;height:60px;border-radius:50%;background:var(--cs-header-gradient);border:none;color:#fff;cursor:pointer;box-shadow:var(--cs-shadow-xl);transition:all .3s cubic-bezier(.4,0,.2,1);display:flex;align-items:center;justify-content:center}.cs-widget__toggle:hover{transform:scale(1.1);box-shadow:0 15px 25px -5px var(--cs-focus-ring)}.cs-widget__toggle:active{transform:scale(.95)}.cs-widget__toggle--open{background:var(--cs-error-color)}.cs-widget__badge{position:absolute;top:-5px;right:-5px;background:var(--cs-error-color);color:#fff;border-radius:50%;width:24px;height:24px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;box-shadow:var(--cs-shadow)}.cs-window{position:absolute;bottom:85px;right:0;width:380px;max-width:calc(100vw - 40px);height:600px;max-height:calc(100vh - 130px);background:var(--cs-bg-color);border-radius:var(--cs-border-radius);border:1px solid rgba(0,0,0,.1);box-shadow:var(--cs-shadow-xl);display:flex;flex-direction:column;overflow:visible;animation:slideUp .3s cubic-bezier(.4,0,.2,1);transform-origin:bottom right}.cs-window:after{content:"";position:absolute;bottom:-10px;right:25px;width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid var(--cs-bg-color);filter:drop-shadow(0 5px 5px var(--cs-shadow-color))}.cs-widget--bottom-left .cs-window{transform-origin:bottom left;right:auto;left:0}.cs-widget--bottom-left .cs-window:after{right:auto;left:25px}.cs-widget--top-right .cs-window{transform-origin:top right;bottom:auto;top:85px}.cs-widget--top-right .cs-window:after{bottom:auto;top:-10px;border-top:none;border-bottom:10px solid var(--cs-bg-color)}.cs-widget--top-left .cs-window{transform-origin:top left;bottom:auto;top:85px;right:auto;left:0}.cs-widget--top-left .cs-window:after{bottom:auto;top:-10px;border-top:none;border-bottom:10px solid var(--cs-bg-color);right:auto;left:25px}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.cs-window__header{background:var(--cs-header-gradient);color:var(--cs-header-text-color);padding:16px 20px;display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.cs-window__header-info{display:flex;flex-direction:column;gap:2px}.cs-window__title{margin:0;font-size:16px;font-weight:600}.cs-window__status{display:flex;align-items:center;gap:6px;font-size:12px;opacity:.9}.cs-window__status-dot{width:8px;height:8px;background:var(--cs-success-color);border-radius:50%;box-shadow:0 0 0 2px var(--cs-bg-color)}.cs-window__close{background:transparent;border:none;color:var(--cs-header-text-color);width:32px;height:32px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s}.cs-window__close:hover{background:var(--cs-shadow-color)}.cs-window__messages{flex:1;overflow-y:auto;padding:20px;display:flex;flex-direction:column;gap:16px;background:var(--cs-bg-color);color:var(--cs-bg-text-color)}.cs-window__messages::-webkit-scrollbar{width:6px}.cs-window__messages::-webkit-scrollbar-track{background:transparent}.cs-window__messages::-webkit-scrollbar-thumb{background:var(--cs-scrollbar-thumb);border-radius:3px}.cs-window__messages::-webkit-scrollbar-thumb:hover{background:var(--cs-border-color)}.cs-window__welcome{text-align:center;padding:40px 20px;color:var(--cs-bg-text-color);opacity:.7}.cs-window__welcome p{margin:0;font-size:16px}.cs-window__typing{display:flex;align-items:center;gap:8px;padding:12px 16px;background:var(--cs-assistant-message-color);border-radius:var(--cs-border-radius);width:fit-content;color:var(--cs-text-color)}.cs-window__typing-icon{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cs-window__error{background:var(--cs-error-bg-color);border:1px solid var(--cs-error-color);color:var(--cs-error-color);padding:12px 16px;border-radius:var(--cs-border-radius)}.cs-window__error p{margin:0}.cs-message{display:flex;flex-direction:column;gap:6px;max-width:85%;animation:fadeIn .3s ease-in-out}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.cs-message--user{align-self:flex-end;align-items:flex-end}.cs-message--assistant{align-self:flex-start;align-items:flex-start}.cs-message__content{background:var(--cs-assistant-message-color);padding:12px 16px;border-radius:var(--cs-border-radius);border-bottom-left-radius:4px;color:var(--cs-assistant-text-color);word-wrap:break-word;box-shadow:var(--cs-shadow-sm)}.cs-message--user .cs-message__content{background:var(--cs-user-message-color);color:var(--cs-user-text-color);border-radius:var(--cs-border-radius);border-bottom-right-radius:4px}.cs-message__text{margin:0;line-height:1.5;white-space:pre-wrap}.cs-message__time{font-size:11px;color:var(--cs-bg-text-color);opacity:.5;padding:0 4px}.cs-message__sources{margin-top:12px;padding-top:12px;border-top:1px solid var(--cs-border-color)}.cs-message__sources-title{margin:0 0 8px;font-size:12px;font-weight:600;color:var(--cs-bg-text-color);opacity:.7}.cs-message__sources-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:6px}.cs-message__source-item{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px}.cs-message__source-link{display:flex;align-items:center;gap:4px;color:var(--cs-primary-color);text-decoration:none;flex:1;min-width:0}.cs-message__source-link:hover{text-decoration:underline}.cs-message__source-link span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cs-message__source-similarity{color:#6b7280;font-size:11px;white-space:nowrap}.cs-window__input-wrapper{padding:16px;background:var(--cs-bg-color);border-top:1px solid var(--cs-border-color);flex-shrink:0}.cs-input{display:flex;gap:8px;align-items:flex-end}.cs-input__textarea{flex:1;padding:12px 16px;border:1px solid var(--cs-border-color);border-radius:var(--cs-border-radius);font-family:var(--cs-font-family);font-size:14px;resize:none;max-height:120px;min-height:44px;transition:border-color .2s;background:var(--cs-bg-color);color:var(--cs-bg-text-color)}.cs-input__textarea:focus{outline:none;border-color:var(--cs-primary-color);box-shadow:0 0 0 3px var(--cs-focus-ring);background-color:var(--cs-bg-color)}.cs-input__textarea:disabled{background:var(--cs-border-color);cursor:not-allowed;opacity:.5}.cs-input__button{background:var(--cs-button-color);color:var(--cs-header-text-color);border:none;width:44px;height:44px;border-radius:var(--cs-border-radius);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s;flex-shrink:0}.cs-input__button:hover:not(:disabled){background:var(--cs-secondary-color);transform:scale(1.05)}.cs-input__button:active:not(:disabled){transform:scale(.95)}.cs-input__button:disabled{background:var(--cs-border-color);cursor:not-allowed;opacity:.5}@media(max-width:480px){.cs-widget--open{position:fixed!important;inset:auto!important;bottom:20px!important;right:20px!important;width:auto!important;height:auto!important;z-index:10000!important}.cs-window{position:fixed!important;width:88vw!important;height:60vh!important;max-width:400px!important;max-height:500px!important;bottom:90px!important;right:5%!important;left:5%!important;top:auto!important;border-radius:var(--cs-border-radius)!important;box-shadow:var(--cs-shadow-xl)!important;display:flex!important;flex-direction:column!important;animation:slideUp .3s ease-out!important;overflow:visible!important}.cs-widget--open .cs-widget__toggle{display:flex!important;opacity:.8}.cs-window__messages{padding:16px}.cs-window__header{padding:12px 16px}.cs-window__input-wrapper{padding:12px}.cs-widget__toggle{width:50px;height:50px}}', Ds = ({
|
|
2039
|
+
}, ds = ':root{--cs-primary-color: inherit;--cs-secondary-color: inherit;--cs-bg-color: inherit;--cs-text-color: inherit;--cs-font-family: inherit;--cs-border-radius: 12px;--cs-button-color: var(--cs-primary-color);--cs-user-message-color: var(--cs-primary-color);--cs-assistant-message-color: rgba(0, 0, 0, .05);--cs-header-gradient: linear-gradient(135deg, var(--cs-primary-color), var(--cs-secondary-color));--cs-header-text-color: #ffffff;--cs-bg-text-color: #1a1a1a;--cs-user-text-color: #ffffff;--cs-assistant-text-color: #1a1a1a;--cs-success-color: #4ade80;--cs-error-color: #ef4444;--cs-error-bg-color: rgba(239, 68, 68, .1);--cs-border-color: rgba(0, 0, 0, .1);--cs-shadow-color: rgba(0, 0, 0, .1);--cs-scrollbar-thumb: rgba(0, 0, 0, .2);--cs-scrollbar-track: transparent;--cs-shadow-sm: 0 1px 2px 0 var(--cs-shadow-color);--cs-shadow: 0 4px 6px -1px var(--cs-shadow-color), 0 2px 4px -1px var(--cs-shadow-color);--cs-shadow-lg: 0 10px 15px -3px var(--cs-shadow-color), 0 4px 6px -2px var(--cs-shadow-color);--cs-shadow-xl: 0 20px 25px -5px var(--cs-shadow-color), 0 10px 10px -5px var(--cs-shadow-color)}.cs-widget{position:fixed;z-index:9999;font-family:var(--cs-font-family)}.cs-widget,.cs-widget *{box-sizing:border-box}.cs-widget--bottom-right{bottom:20px;right:20px}.cs-widget--bottom-left{bottom:20px;left:20px}.cs-widget--top-right{top:20px;right:20px}.cs-widget--top-left{top:20px;left:20px}.cs-widget__toggle{position:relative;width:60px;height:60px;border-radius:50%;background:var(--cs-header-gradient);border:none;color:#fff;cursor:pointer;box-shadow:var(--cs-shadow-xl);transition:all .3s cubic-bezier(.4,0,.2,1);display:flex;align-items:center;justify-content:center}.cs-widget__toggle:hover{transform:scale(1.1);box-shadow:0 15px 25px -5px var(--cs-focus-ring)}.cs-widget__toggle:active{transform:scale(.95)}.cs-widget__toggle--open{background:var(--cs-error-color)}.cs-widget__badge{position:absolute;top:-5px;right:-5px;background:var(--cs-error-color);color:#fff;border-radius:50%;width:24px;height:24px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;box-shadow:var(--cs-shadow)}.cs-window{position:absolute;bottom:85px;right:0;width:380px;max-width:calc(100vw - 40px);height:600px;max-height:calc(100vh - 130px);background:var(--cs-bg-color);border-radius:var(--cs-border-radius);border:1px solid rgba(0,0,0,.1);box-shadow:var(--cs-shadow-xl);display:flex;flex-direction:column;overflow:visible;animation:slideUp .3s cubic-bezier(.4,0,.2,1);transform-origin:bottom right}.cs-window:after{content:"";position:absolute;bottom:-10px;right:25px;width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid var(--cs-bg-color);filter:drop-shadow(0 5px 5px var(--cs-shadow-color))}.cs-widget--bottom-left .cs-window{transform-origin:bottom left;right:auto;left:0}.cs-widget--bottom-left .cs-window:after{right:auto;left:25px}.cs-widget--top-right .cs-window{transform-origin:top right;bottom:auto;top:85px}.cs-widget--top-right .cs-window:after{bottom:auto;top:-10px;border-top:none;border-bottom:10px solid var(--cs-bg-color)}.cs-widget--top-left .cs-window{transform-origin:top left;bottom:auto;top:85px;right:auto;left:0}.cs-widget--top-left .cs-window:after{bottom:auto;top:-10px;border-top:none;border-bottom:10px solid var(--cs-bg-color);right:auto;left:25px}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.cs-window__header{background:var(--cs-header-gradient);color:var(--cs-header-text-color);padding:16px 20px;display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.cs-window__header-info{display:flex;flex-direction:column;gap:2px}.cs-window__title{margin:0;font-size:16px;font-weight:600}.cs-window__status{display:flex;align-items:center;gap:6px;font-size:12px;opacity:.9}.cs-window__status-dot{width:8px;height:8px;background:var(--cs-success-color);border-radius:50%;box-shadow:0 0 0 2px var(--cs-bg-color)}.cs-window__close{background:transparent;border:none;color:var(--cs-header-text-color);width:32px;height:32px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s}.cs-window__close:hover{background:var(--cs-shadow-color)}.cs-window__messages{flex:1;overflow-y:auto;overflow-x:hidden;padding:20px;display:flex;flex-direction:column;gap:16px;background:var(--cs-bg-color);color:var(--cs-bg-text-color)}.cs-window__messages::-webkit-scrollbar{width:6px}.cs-window__messages::-webkit-scrollbar-track{background:transparent}.cs-window__messages::-webkit-scrollbar-thumb{background:var(--cs-scrollbar-thumb);border-radius:3px}.cs-window__messages::-webkit-scrollbar-thumb:hover{background:var(--cs-border-color)}.cs-window__welcome{text-align:center;padding:40px 20px;color:var(--cs-bg-text-color);opacity:.7}.cs-window__welcome p{margin:0;font-size:16px}.cs-window__typing{display:flex;align-items:center;gap:8px;padding:12px 16px;background:var(--cs-assistant-message-color);border-radius:var(--cs-border-radius);width:fit-content;color:var(--cs-text-color)}.cs-window__typing-icon{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cs-window__error{background:var(--cs-error-bg-color);border:1px solid var(--cs-error-color);color:var(--cs-error-color);padding:12px 16px;border-radius:var(--cs-border-radius)}.cs-window__error p{margin:0}.cs-message{display:flex;flex-direction:column;gap:6px;max-width:85%;animation:fadeIn .3s ease-in-out}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.cs-message--user{align-self:flex-end;align-items:flex-end}.cs-message--assistant{align-self:flex-start;align-items:flex-start}.cs-message__content{background:var(--cs-assistant-message-color);padding:12px 16px;border-radius:var(--cs-border-radius);border-bottom-left-radius:4px;color:var(--cs-assistant-text-color);word-wrap:break-word;box-shadow:var(--cs-shadow-sm)}.cs-message--user .cs-message__content{background:var(--cs-user-message-color);color:var(--cs-user-text-color);border-radius:var(--cs-border-radius);border-bottom-right-radius:4px}.cs-message__text{margin:0;line-height:1.5;white-space:pre-wrap}.cs-message__time{font-size:11px;color:var(--cs-bg-text-color);opacity:.5;padding:0 4px}.cs-message__sources{margin-top:12px;padding-top:12px;border-top:1px solid var(--cs-border-color)}.cs-message__sources-title{margin:0 0 8px;font-size:12px;font-weight:600;color:var(--cs-bg-text-color);opacity:.7}.cs-message__sources-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:6px}.cs-message__source-item{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px}.cs-message__source-link{display:flex;align-items:center;gap:4px;color:var(--cs-primary-color);text-decoration:none;flex:1;min-width:0}.cs-message__source-link:hover{text-decoration:underline}.cs-message__source-link span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cs-message__source-similarity{color:#6b7280;font-size:11px;white-space:nowrap}.cs-window__input-wrapper{padding:16px;background:var(--cs-bg-color);border-top:1px solid var(--cs-border-color);flex-shrink:0}.cs-input{display:flex;gap:8px;align-items:flex-end}.cs-input__textarea{flex:1;padding:12px 16px;border:1px solid var(--cs-border-color);border-radius:var(--cs-border-radius);font-family:var(--cs-font-family);font-size:14px;resize:none;max-height:120px;min-height:44px;transition:border-color .2s;background:var(--cs-bg-color);color:var(--cs-bg-text-color)}.cs-input__textarea:focus{outline:none;border-color:var(--cs-primary-color);box-shadow:0 0 0 3px var(--cs-focus-ring);background-color:var(--cs-bg-color)}.cs-input__textarea:disabled{background:var(--cs-border-color);cursor:not-allowed;opacity:.5}.cs-input__button{background:var(--cs-button-color);color:var(--cs-header-text-color);border:none;width:44px;height:44px;border-radius:var(--cs-border-radius);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s;flex-shrink:0}.cs-input__button:hover:not(:disabled){background:var(--cs-secondary-color);transform:scale(1.05)}.cs-input__button:active:not(:disabled){transform:scale(.95)}.cs-input__button:disabled{background:var(--cs-border-color);cursor:not-allowed;opacity:.5}@media(max-width:480px){.cs-widget--open{position:fixed!important;inset:auto!important;bottom:20px!important;right:20px!important;width:auto!important;height:auto!important;z-index:10000!important}.cs-window{position:fixed!important;width:88vw!important;height:60vh!important;max-width:400px!important;max-height:500px!important;bottom:90px!important;right:5%!important;left:5%!important;top:auto!important;border-radius:var(--cs-border-radius)!important;box-shadow:var(--cs-shadow-xl)!important;display:flex!important;flex-direction:column!important;animation:slideUp .3s ease-out!important;overflow:visible!important}.cs-widget--open .cs-widget__toggle{display:flex!important;opacity:.8}.cs-window__messages{padding:16px}.cs-window__header{padding:12px 16px}.cs-window__input-wrapper{padding:12px}.cs-widget__toggle{width:50px;height:50px}}', Ds = ({
|
|
2040
2040
|
apiKey: e,
|
|
2041
2041
|
baseUrl: t,
|
|
2042
2042
|
theme: r,
|
|
@@ -2050,7 +2050,7 @@ const cs = ({ message: e }) => {
|
|
|
2050
2050
|
}) => {
|
|
2051
2051
|
const [l, p] = G(!1), {
|
|
2052
2052
|
messages: y,
|
|
2053
|
-
sendMessage:
|
|
2053
|
+
sendMessage: A,
|
|
2054
2054
|
isLoading: d,
|
|
2055
2055
|
error: h,
|
|
2056
2056
|
clearError: m
|
|
@@ -2058,30 +2058,43 @@ const cs = ({ message: e }) => {
|
|
|
2058
2058
|
apiKey: e,
|
|
2059
2059
|
baseUrl: t,
|
|
2060
2060
|
onError: a
|
|
2061
|
-
}),
|
|
2062
|
-
if (!
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2061
|
+
}), E = (g) => {
|
|
2062
|
+
if (!g) return "#ffffff";
|
|
2063
|
+
let _, v, C;
|
|
2064
|
+
if (g.startsWith("#")) {
|
|
2065
|
+
const S = g.slice(1);
|
|
2066
|
+
_ = parseInt(S.substring(0, 2), 16), v = parseInt(S.substring(2, 4), 16), C = parseInt(S.substring(4, 6), 16);
|
|
2067
|
+
} else if (g.startsWith("rgb")) {
|
|
2068
|
+
const S = g.match(/\d+/g);
|
|
2069
|
+
if (S && S.length >= 3)
|
|
2070
|
+
_ = parseInt(S[0]), v = parseInt(S[1]), C = parseInt(S[2]);
|
|
2071
|
+
else
|
|
2072
|
+
return "#ffffff";
|
|
2073
|
+
} else
|
|
2074
|
+
return "#ffffff";
|
|
2075
|
+
return (0.299 * _ + 0.587 * v + 0.114 * C) / 255 > 0.6 ? "#1a1a1a" : "#ffffff";
|
|
2076
|
+
}, R = (g, _) => {
|
|
2077
|
+
if (!g) return `rgba(0, 0, 0, ${_})`;
|
|
2078
|
+
let v = 0, C = 0, F = 0;
|
|
2079
|
+
if (g.startsWith("#")) {
|
|
2080
|
+
const S = g.slice(1);
|
|
2081
|
+
S.length === 3 ? (v = parseInt(S[0] + S[0], 16), C = parseInt(S[1] + S[1], 16), F = parseInt(S[2] + S[2], 16)) : (v = parseInt(S.substring(0, 2), 16), C = parseInt(S.substring(2, 4), 16), F = parseInt(S.substring(4, 6), 16));
|
|
2082
|
+
} else if (g.startsWith("rgb")) {
|
|
2083
|
+
const S = g.match(/\d+/g);
|
|
2084
|
+
S && S.length >= 3 && (v = parseInt(S[0]), C = parseInt(S[1]), F = parseInt(S[2]));
|
|
2071
2085
|
}
|
|
2072
|
-
|
|
2073
|
-
return `rgba(${k}, ${B}, ${j}, ${E})`;
|
|
2086
|
+
return `rgba(${v}, ${C}, ${F}, ${_})`;
|
|
2074
2087
|
}, x = b.useMemo(() => {
|
|
2075
|
-
const
|
|
2076
|
-
|
|
2077
|
-
const
|
|
2078
|
-
return
|
|
2079
|
-
}, [r]),
|
|
2080
|
-
if (f == null || f(
|
|
2081
|
-
const
|
|
2082
|
-
(
|
|
2088
|
+
const g = {}, _ = (r == null ? void 0 : r.primaryColor) || "#6366f1", v = (r == null ? void 0 : r.backgroundColor) || "#ffffff", C = (r == null ? void 0 : r.textColor) || (E(v) === "#ffffff" ? "#ffffff" : "#1f2937"), F = (r == null ? void 0 : r.successColor) || "#4ade80", S = (r == null ? void 0 : r.errorColor) || "#ef4444", J = (r == null ? void 0 : r.borderColor) || R(C, 0.1), M = (r == null ? void 0 : r.shadowColor) || "rgba(0, 0, 0, 0.1)";
|
|
2089
|
+
g["--cs-primary-color"] = _, g["--cs-secondary-color"] = (r == null ? void 0 : r.secondaryColor) || _, g["--cs-bg-color"] = v, g["--cs-text-color"] = C, g["--cs-font-family"] = (r == null ? void 0 : r.fontFamily) || "inherit", g["--cs-border-radius"] = (r == null ? void 0 : r.borderRadius) || "12px", g["--cs-success-color"] = F, g["--cs-error-color"] = S, g["--cs-error-bg-color"] = R(S, 0.1), g["--cs-border-color"] = J, g["--cs-shadow-color"] = M, g["--cs-scrollbar-thumb"] = R(C, 0.2), g["--cs-scrollbar-track"] = "transparent", g["--cs-header-text-color"] = E(_), g["--cs-bg-text-color"] = C, g["--cs-button-color"] = (r == null ? void 0 : r.buttonColor) || _, g["--cs-user-message-color"] = (r == null ? void 0 : r.userMessageColor) || _, g["--cs-user-text-color"] = E((r == null ? void 0 : r.userMessageColor) || _);
|
|
2090
|
+
const B = E(v) === "#ffffff";
|
|
2091
|
+
return g["--cs-assistant-message-color"] = (r == null ? void 0 : r.assistantMessageColor) || (B ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.05)"), g["--cs-assistant-text-color"] = C, g["--cs-focus-ring"] = R(_, 0.2), g;
|
|
2092
|
+
}, [r]), O = async (g) => {
|
|
2093
|
+
if (f == null || f(g), await A(g), !h) {
|
|
2094
|
+
const _ = y[y.length - 1];
|
|
2095
|
+
(_ == null ? void 0 : _.role) === "ASSISTANT" && (u == null || u(_.content));
|
|
2083
2096
|
}
|
|
2084
|
-
},
|
|
2097
|
+
}, N = () => {
|
|
2085
2098
|
p(!l), h && m();
|
|
2086
2099
|
};
|
|
2087
2100
|
return /* @__PURE__ */ b.createElement(
|
|
@@ -2095,7 +2108,7 @@ const cs = ({ message: e }) => {
|
|
|
2095
2108
|
us,
|
|
2096
2109
|
{
|
|
2097
2110
|
messages: y,
|
|
2098
|
-
onSendMessage:
|
|
2111
|
+
onSendMessage: O,
|
|
2099
2112
|
onClose: () => p(!1),
|
|
2100
2113
|
isLoading: d,
|
|
2101
2114
|
error: h,
|
|
@@ -2107,12 +2120,12 @@ const cs = ({ message: e }) => {
|
|
|
2107
2120
|
"button",
|
|
2108
2121
|
{
|
|
2109
2122
|
className: `cs-widget__toggle ${l ? "cs-widget__toggle--open" : ""}`,
|
|
2110
|
-
onClick:
|
|
2123
|
+
onClick: N,
|
|
2111
2124
|
"aria-label": l ? "Close chat" : "Open chat",
|
|
2112
2125
|
"aria-expanded": l
|
|
2113
2126
|
},
|
|
2114
2127
|
/* @__PURE__ */ b.createElement(At, { size: 24 }),
|
|
2115
|
-
!l && y.length > 0 && /* @__PURE__ */ b.createElement("span", { className: "cs-widget__badge" }, y.filter((
|
|
2128
|
+
!l && y.length > 0 && /* @__PURE__ */ b.createElement("span", { className: "cs-widget__badge" }, y.filter((g) => g.role.toUpperCase() === "ASSISTANT").length)
|
|
2116
2129
|
)
|
|
2117
2130
|
);
|
|
2118
2131
|
};
|
|
@@ -2123,6 +2136,6 @@ export {
|
|
|
2123
2136
|
ns as CustomerSupportAPIClient,
|
|
2124
2137
|
Ds as CustomerSupportWidget,
|
|
2125
2138
|
as as useCustomerSupport,
|
|
2126
|
-
|
|
2139
|
+
Ve as useLocalStorage
|
|
2127
2140
|
};
|
|
2128
2141
|
//# sourceMappingURL=index.es.js.map
|