@eloquentai/chat-sdk 0.35.1-dev.1 → 0.35.1-dev.2
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.
|
@@ -5,12 +5,12 @@ import { useState as Ae, forwardRef as je, createContext as Ar, useContext as Er
|
|
|
5
5
|
import * as vc from "react-dom";
|
|
6
6
|
try {
|
|
7
7
|
let e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, t = new e.Error().stack;
|
|
8
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "
|
|
8
|
+
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "b7d035fa-8c7a-417d-8c0c-35820b79aca5", e._sentryDebugIdIdentifier = "sentry-dbid-b7d035fa-8c7a-417d-8c0c-35820b79aca5");
|
|
9
9
|
} catch {
|
|
10
10
|
}
|
|
11
11
|
{
|
|
12
12
|
let e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
13
|
-
e.SENTRY_RELEASE = { id: "
|
|
13
|
+
e.SENTRY_RELEASE = { id: "8519bacc8776a5f2f56d7364c00ca2b537f1abb9" };
|
|
14
14
|
}
|
|
15
15
|
function ka(e) {
|
|
16
16
|
var t, n, r = "";
|
|
@@ -3878,7 +3878,7 @@ function os(e, t) {
|
|
|
3878
3878
|
return R.useReducer((n, r) => t[n][r] ?? n, e);
|
|
3879
3879
|
}
|
|
3880
3880
|
ie(os, "useStateMachine");
|
|
3881
|
-
var is = "ScrollArea", [ls,
|
|
3881
|
+
var is = "ScrollArea", [ls, wk] = /* @__PURE__ */ ni(is), [Cp, ot] = ls(is), as = /* @__PURE__ */ R.forwardRef(
|
|
3882
3882
|
/* @__PURE__ */ ie(function(t, n) {
|
|
3883
3883
|
const {
|
|
3884
3884
|
__scopeScrollArea: r,
|
|
@@ -15819,7 +15819,7 @@ class Jt extends Error {
|
|
|
15819
15819
|
}
|
|
15820
15820
|
}
|
|
15821
15821
|
const Mx = "x-elo-chat-token", Ql = "x-elo-chat-token-renewed";
|
|
15822
|
-
class
|
|
15822
|
+
class kk {
|
|
15823
15823
|
baseURL;
|
|
15824
15824
|
appId;
|
|
15825
15825
|
region = null;
|
|
@@ -15944,7 +15944,7 @@ async function Ox(e) {
|
|
|
15944
15944
|
class xr extends Error {
|
|
15945
15945
|
name = "AttachmentUploadError";
|
|
15946
15946
|
}
|
|
15947
|
-
function
|
|
15947
|
+
function Sk(e, t) {
|
|
15948
15948
|
return e instanceof Jt ? e.status === 413 ? new xr(`${t} is too large.`) : e.status === 415 ? new xr(
|
|
15949
15949
|
`${t} isn't a supported file type.`
|
|
15950
15950
|
) : e.status === 403 || e.status >= 500 ? new xr(Ru) : e : e;
|
|
@@ -15983,26 +15983,26 @@ function Fx(e, t) {
|
|
|
15983
15983
|
function Bx(e, t) {
|
|
15984
15984
|
return e instanceof xr ? e.message : t.length > 0 ? Ru : null;
|
|
15985
15985
|
}
|
|
15986
|
-
function
|
|
15986
|
+
function vk(e, t) {
|
|
15987
15987
|
return e.map((n, r) => ({
|
|
15988
15988
|
...n,
|
|
15989
15989
|
displayUrl: t[r].previewUrl
|
|
15990
15990
|
}));
|
|
15991
15991
|
}
|
|
15992
|
-
function
|
|
15992
|
+
function Ck(e, t, n) {
|
|
15993
15993
|
return Promise.all(
|
|
15994
15994
|
n.map(
|
|
15995
15995
|
(r) => Hx(e, t, r)
|
|
15996
15996
|
)
|
|
15997
15997
|
);
|
|
15998
15998
|
}
|
|
15999
|
-
function
|
|
15999
|
+
function Ak(e) {
|
|
16000
16000
|
return Pu(e).length > 0;
|
|
16001
16001
|
}
|
|
16002
16002
|
function Ux(e) {
|
|
16003
16003
|
return e.displayUrl ? e.displayUrl : Lu(e.url) ? void 0 : e.url;
|
|
16004
16004
|
}
|
|
16005
|
-
function
|
|
16005
|
+
function Ek(e) {
|
|
16006
16006
|
for (const t of e)
|
|
16007
16007
|
for (const n of t.attachments ?? [])
|
|
16008
16008
|
n.displayUrl && URL.revokeObjectURL(n.displayUrl);
|
|
@@ -16137,13 +16137,7 @@ function Ou({ name: e, progress: t }) {
|
|
|
16137
16137
|
}
|
|
16138
16138
|
);
|
|
16139
16139
|
}
|
|
16140
|
-
const Gx = "eloq:h-[0.42em] eloq:w-[0.42em] eloq:rounded-full eloq:bg-gray-400 eloq:dark:bg-gray-200 eloq:animate-thinking-dot eloq:motion-reduce:animate-none eloq:motion-reduce:opacity-70"
|
|
16141
|
-
function Xx(e) {
|
|
16142
|
-
let t = e.length;
|
|
16143
|
-
for (; t > 0 && e.charCodeAt(t - 1) === 46; )
|
|
16144
|
-
t--;
|
|
16145
|
-
return e.slice(0, t);
|
|
16146
|
-
}
|
|
16140
|
+
const Gx = "eloq:h-[0.42em] eloq:w-[0.42em] eloq:rounded-full eloq:bg-gray-400 eloq:dark:bg-gray-200 eloq:animate-thinking-dot eloq:motion-reduce:animate-none eloq:motion-reduce:opacity-70";
|
|
16147
16141
|
function Zl({
|
|
16148
16142
|
messageData: e,
|
|
16149
16143
|
isBot: t,
|
|
@@ -16152,41 +16146,39 @@ function Zl({
|
|
|
16152
16146
|
const r = ei(), { onMessageClick: o, highlightedMessageId: l } = nn(), i = l != null && l === e.id, a = Xe(null);
|
|
16153
16147
|
vt(() => {
|
|
16154
16148
|
if (!i) return;
|
|
16155
|
-
const
|
|
16149
|
+
const v = window.matchMedia?.(
|
|
16156
16150
|
"(prefers-reduced-motion: reduce)"
|
|
16157
16151
|
).matches;
|
|
16158
16152
|
a.current?.scrollIntoView?.({
|
|
16159
16153
|
block: "nearest",
|
|
16160
|
-
behavior:
|
|
16154
|
+
behavior: v ? "auto" : "smooth"
|
|
16161
16155
|
});
|
|
16162
16156
|
}, [i]);
|
|
16163
16157
|
const s = te({
|
|
16164
16158
|
[r.botBubbleColor]: e.sender === "assistant",
|
|
16165
16159
|
[r.userBubbleColor]: e.sender === "user"
|
|
16166
|
-
}), f = (e.sender === "assistant" ? r.botBubbleTextColor : r.userBubbleTextColor) || Ai(s), c = e.attachments ?? [], d = e.type === "image" || e.content !== "" || c.length === 0, p =
|
|
16167
|
-
|
|
16168
|
-
|
|
16169
|
-
|
|
16170
|
-
k
|
|
16171
|
-
), w = () => g ? /* @__PURE__ */ Z("div", { className: "eloq:ml-1 eloq:flex eloq:items-center eloq:gap-2 eloq:animate-message-in", children: [
|
|
16160
|
+
}), f = (e.sender === "assistant" ? r.botBubbleTextColor : r.userBubbleTextColor) || Ai(s), c = e.attachments ?? [], d = e.type === "image" || e.content !== "" || c.length === 0, p = !!(t && e.isThinking), g = _x(
|
|
16161
|
+
p ? e.content : "",
|
|
16162
|
+
p
|
|
16163
|
+
), k = () => p ? /* @__PURE__ */ Z("div", { className: "eloq:ml-1 eloq:flex eloq:items-center eloq:gap-2 eloq:animate-message-in", children: [
|
|
16172
16164
|
/* @__PURE__ */ x(
|
|
16173
16165
|
"span",
|
|
16174
16166
|
{
|
|
16175
16167
|
className: "eloq:flex eloq:h-5 eloq:items-center eloq:gap-[0.25em] eloq:rounded-2xl eloq:px-[12px] eloq:py-[8px] eloq:text-sm eloq:box-content",
|
|
16176
16168
|
style: { backgroundColor: r.botBubbleColor },
|
|
16177
|
-
children: [0, 150, 300].map((
|
|
16169
|
+
children: [0, 150, 300].map((v) => /* @__PURE__ */ x(
|
|
16178
16170
|
"span",
|
|
16179
16171
|
{
|
|
16180
16172
|
className: Gx,
|
|
16181
|
-
style: { animationDelay: `${
|
|
16173
|
+
style: { animationDelay: `${v}ms` }
|
|
16182
16174
|
},
|
|
16183
|
-
|
|
16175
|
+
v
|
|
16184
16176
|
))
|
|
16185
16177
|
}
|
|
16186
16178
|
),
|
|
16187
|
-
|
|
16179
|
+
g && // Outside the bubble, on the panel background. Same wave as the
|
|
16188
16180
|
// dots, swept through the glyphs.
|
|
16189
|
-
/* @__PURE__ */ x("span", { className: "eloq-thinking-shimmer eloq:text-sm eloq:font-medium eloq:animate-thinking-shimmer eloq:motion-reduce:animate-none", children:
|
|
16181
|
+
/* @__PURE__ */ x("span", { className: "eloq-thinking-shimmer eloq:text-sm eloq:font-medium eloq:animate-thinking-shimmer eloq:motion-reduce:animate-none", children: g })
|
|
16190
16182
|
] }) : /* @__PURE__ */ Z(
|
|
16191
16183
|
"div",
|
|
16192
16184
|
{
|
|
@@ -16258,7 +16250,7 @@ function Zl({
|
|
|
16258
16250
|
"eloq:max-w-[75%]": !t,
|
|
16259
16251
|
"eloq:max-w-full": n
|
|
16260
16252
|
}),
|
|
16261
|
-
children:
|
|
16253
|
+
children: k()
|
|
16262
16254
|
}
|
|
16263
16255
|
)
|
|
16264
16256
|
]
|
|
@@ -16280,7 +16272,7 @@ const zu = "eloq:p-4 eloq:flex eloq:flex-row eloq:items-center eloq:justify-betw
|
|
|
16280
16272
|
"eloq:rounded-2xl eloq:border": !t
|
|
16281
16273
|
}
|
|
16282
16274
|
);
|
|
16283
|
-
function
|
|
16275
|
+
function Yx({
|
|
16284
16276
|
className: e,
|
|
16285
16277
|
message: t,
|
|
16286
16278
|
nextMessage: n,
|
|
@@ -16370,7 +16362,7 @@ function Kx({
|
|
|
16370
16362
|
o
|
|
16371
16363
|
);
|
|
16372
16364
|
}
|
|
16373
|
-
function
|
|
16365
|
+
function Xx({
|
|
16374
16366
|
value: e,
|
|
16375
16367
|
onChange: t,
|
|
16376
16368
|
disabled: n = !1
|
|
@@ -16408,16 +16400,16 @@ function Jx({
|
|
|
16408
16400
|
}
|
|
16409
16401
|
);
|
|
16410
16402
|
}
|
|
16411
|
-
function
|
|
16403
|
+
function Kx({ onRate: e }) {
|
|
16412
16404
|
const [t, n] = Ae(0), [r, o] = Ae(!1);
|
|
16413
16405
|
return /* @__PURE__ */ x("div", { className: "eloq:flex eloq:justify-center eloq:pt-2 eloq:pb-2", children: /* @__PURE__ */ Z("div", { className: "eloq:rounded-2xl eloq:bg-muted eloq:px-4 eloq:py-3 eloq:flex eloq:flex-col eloq:items-center eloq:gap-1.5", children: [
|
|
16414
16406
|
/* @__PURE__ */ x("p", { className: "eloq:text-sm eloq:font-medium eloq:text-foreground", children: r ? "Thanks for your feedback!" : "How was your experience" }),
|
|
16415
|
-
/* @__PURE__ */ x(
|
|
16407
|
+
/* @__PURE__ */ x(Xx, { value: t, onChange: (i) => {
|
|
16416
16408
|
n(i), o(!0), e(i);
|
|
16417
16409
|
} })
|
|
16418
16410
|
] }) });
|
|
16419
16411
|
}
|
|
16420
|
-
const
|
|
16412
|
+
const Jx = Ar(null), Qx = {
|
|
16421
16413
|
isVisible: !1,
|
|
16422
16414
|
content: null,
|
|
16423
16415
|
showCognition: () => {
|
|
@@ -16425,11 +16417,11 @@ const Zx = Ar(null), ew = {
|
|
|
16425
16417
|
hideCognition: () => {
|
|
16426
16418
|
}
|
|
16427
16419
|
};
|
|
16428
|
-
function
|
|
16429
|
-
return Er(
|
|
16420
|
+
function Zx() {
|
|
16421
|
+
return Er(Jx) ?? Qx;
|
|
16430
16422
|
}
|
|
16431
|
-
function
|
|
16432
|
-
const e = nn(), t =
|
|
16423
|
+
function ew() {
|
|
16424
|
+
const e = nn(), t = Zx(), n = Xe(null), r = Xe(!0), o = Xe(0), [l, i] = Ae(!1), [a, s] = Ae(!1), u = (p) => p.scrollHeight - p.scrollTop <= p.clientHeight + 60, f = (p) => {
|
|
16433
16425
|
const g = p.target;
|
|
16434
16426
|
u(g) ? (i(!1), s(!1)) : (i(!0), s(!0));
|
|
16435
16427
|
}, c = wa((p = "smooth") => {
|
|
@@ -16484,7 +16476,7 @@ function nw() {
|
|
|
16484
16476
|
const v = Array.isArray(p) ? p.map((E) => E.id).join("-") : p.id;
|
|
16485
16477
|
if (!Array.isArray(p) && p.isRatingRequest)
|
|
16486
16478
|
return /* @__PURE__ */ x(
|
|
16487
|
-
|
|
16479
|
+
Kx,
|
|
16488
16480
|
{
|
|
16489
16481
|
onRate: (E) => e.onRateChat?.(E)
|
|
16490
16482
|
},
|
|
@@ -16492,7 +16484,7 @@ function nw() {
|
|
|
16492
16484
|
);
|
|
16493
16485
|
const w = e.suggestedMessages && !!e.suggestedMessageTexts?.length && !e.messages?.some((E) => E.sender === "user");
|
|
16494
16486
|
return /* @__PURE__ */ x(
|
|
16495
|
-
|
|
16487
|
+
Yx,
|
|
16496
16488
|
{
|
|
16497
16489
|
message: p,
|
|
16498
16490
|
nextMessage: k[g + 1],
|
|
@@ -16524,10 +16516,10 @@ function ea(e, t) {
|
|
|
16524
16516
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
16525
16517
|
return r;
|
|
16526
16518
|
}
|
|
16527
|
-
function
|
|
16519
|
+
function tw(e) {
|
|
16528
16520
|
if (Array.isArray(e)) return e;
|
|
16529
16521
|
}
|
|
16530
|
-
function
|
|
16522
|
+
function nw(e, t) {
|
|
16531
16523
|
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
16532
16524
|
if (n != null) {
|
|
16533
16525
|
var r, o, l, i, a = [], s = !0, u = !1;
|
|
@@ -16545,22 +16537,22 @@ function ow(e, t) {
|
|
|
16545
16537
|
return a;
|
|
16546
16538
|
}
|
|
16547
16539
|
}
|
|
16548
|
-
function
|
|
16540
|
+
function rw() {
|
|
16549
16541
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
16550
16542
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
16551
16543
|
}
|
|
16552
16544
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
16553
|
-
function
|
|
16554
|
-
return
|
|
16545
|
+
function ow(e, t) {
|
|
16546
|
+
return tw(e) || nw(e, t) || iw(e, t) || rw();
|
|
16555
16547
|
}
|
|
16556
|
-
function
|
|
16548
|
+
function iw(e, t) {
|
|
16557
16549
|
if (e) {
|
|
16558
16550
|
if (typeof e == "string") return ea(e, t);
|
|
16559
16551
|
var n = {}.toString.call(e).slice(8, -1);
|
|
16560
16552
|
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? ea(e, t) : void 0;
|
|
16561
16553
|
}
|
|
16562
16554
|
}
|
|
16563
|
-
const Hu = Object.entries, ta = Object.setPrototypeOf,
|
|
16555
|
+
const Hu = Object.entries, ta = Object.setPrototypeOf, lw = Object.isFrozen, ju = Object.getPrototypeOf, Vu = Object.getOwnPropertyDescriptor;
|
|
16564
16556
|
let Ce = Object.freeze, _e = Object.seal, bn = Object.create, $u = typeof Reflect < "u" && Reflect, Vo = $u.apply, $o = $u.construct;
|
|
16565
16557
|
Ce || (Ce = function(t) {
|
|
16566
16558
|
return t;
|
|
@@ -16576,7 +16568,7 @@ $o || ($o = function(t) {
|
|
|
16576
16568
|
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++) r[o - 1] = arguments[o];
|
|
16577
16569
|
return new t(...r);
|
|
16578
16570
|
});
|
|
16579
|
-
const wt = ge(Array.prototype.forEach),
|
|
16571
|
+
const wt = ge(Array.prototype.forEach), aw = ge(Array.prototype.lastIndexOf), na = ge(Array.prototype.pop), Pn = ge(Array.prototype.push), sw = ge(Array.prototype.slice), uw = ge(Array.prototype.splice), yn = Array.isArray, mo = Wu(Set), go = ge(Set.prototype.add), Dn = ge(Set.prototype.has), Kt = ge(String.prototype.toLowerCase), bo = ge(String.prototype.toString), ra = ge(String.prototype.match), Mn = ge(String.prototype.replace), oa = ge(String.prototype.indexOf), cw = ge(String.prototype.trim), fw = ge(Number.prototype.toString), pw = ge(Boolean.prototype.toString), ia = typeof BigInt > "u" ? null : ge(BigInt.prototype.toString), la = typeof Symbol > "u" ? null : ge(Symbol.prototype.toString), He = ge(Object.prototype.hasOwnProperty), On = ge(Object.prototype.toString), qe = ge(RegExp.prototype.test), kt = Wu(TypeError);
|
|
16580
16572
|
function ge(e) {
|
|
16581
16573
|
return function(t) {
|
|
16582
16574
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
@@ -16598,33 +16590,33 @@ function ue(e, t) {
|
|
|
16598
16590
|
let o = t[r];
|
|
16599
16591
|
if (typeof o == "string") {
|
|
16600
16592
|
const l = n(o);
|
|
16601
|
-
l !== o && (
|
|
16593
|
+
l !== o && (lw(t) || (t[r] = l), o = l);
|
|
16602
16594
|
}
|
|
16603
16595
|
e[o] = !0;
|
|
16604
16596
|
}
|
|
16605
16597
|
return e;
|
|
16606
16598
|
}
|
|
16607
|
-
function
|
|
16599
|
+
function dw(e) {
|
|
16608
16600
|
for (let t = 0; t < e.length; t++) He(e, t) || (e[t] = null);
|
|
16609
16601
|
return e;
|
|
16610
16602
|
}
|
|
16611
16603
|
function Ye(e) {
|
|
16612
16604
|
const t = bn(null);
|
|
16613
16605
|
for (const r of Hu(e)) {
|
|
16614
|
-
var n =
|
|
16606
|
+
var n = ow(r, 2);
|
|
16615
16607
|
const o = n[0], l = n[1];
|
|
16616
|
-
He(e, o) && (yn(l) ? t[o] =
|
|
16608
|
+
He(e, o) && (yn(l) ? t[o] = dw(l) : l && typeof l == "object" && l.constructor === Object ? t[o] = Ye(l) : t[o] = l);
|
|
16617
16609
|
}
|
|
16618
16610
|
return t;
|
|
16619
16611
|
}
|
|
16620
|
-
function
|
|
16612
|
+
function hw(e) {
|
|
16621
16613
|
switch (typeof e) {
|
|
16622
16614
|
case "string":
|
|
16623
16615
|
return e;
|
|
16624
16616
|
case "number":
|
|
16625
|
-
return
|
|
16617
|
+
return fw(e);
|
|
16626
16618
|
case "boolean":
|
|
16627
|
-
return
|
|
16619
|
+
return pw(e);
|
|
16628
16620
|
case "bigint":
|
|
16629
16621
|
return ia ? ia(e) : "0";
|
|
16630
16622
|
case "symbol":
|
|
@@ -16659,7 +16651,7 @@ function tt(e, t) {
|
|
|
16659
16651
|
}
|
|
16660
16652
|
return n;
|
|
16661
16653
|
}
|
|
16662
|
-
function
|
|
16654
|
+
function mw(e, t) {
|
|
16663
16655
|
for (; e !== null; ) {
|
|
16664
16656
|
const n = Vu(e, t);
|
|
16665
16657
|
if (n) return n.get ? ge(n.get) : null;
|
|
@@ -16667,7 +16659,7 @@ function bw(e, t) {
|
|
|
16667
16659
|
}
|
|
16668
16660
|
return null;
|
|
16669
16661
|
}
|
|
16670
|
-
function
|
|
16662
|
+
function gw(e) {
|
|
16671
16663
|
try {
|
|
16672
16664
|
return qe(e, ""), !0;
|
|
16673
16665
|
} catch {
|
|
@@ -16868,7 +16860,7 @@ const aa = Ce([
|
|
|
16868
16860
|
"feSpotLight",
|
|
16869
16861
|
"feTile",
|
|
16870
16862
|
"feTurbulence"
|
|
16871
|
-
]),
|
|
16863
|
+
]), bw = Ce([
|
|
16872
16864
|
"animate",
|
|
16873
16865
|
"color-profile",
|
|
16874
16866
|
"cursor",
|
|
@@ -16922,7 +16914,7 @@ const aa = Ce([
|
|
|
16922
16914
|
"munder",
|
|
16923
16915
|
"munderover",
|
|
16924
16916
|
"mprescripts"
|
|
16925
|
-
]),
|
|
16917
|
+
]), yw = Ce([
|
|
16926
16918
|
"maction",
|
|
16927
16919
|
"maligngroup",
|
|
16928
16920
|
"malignmark",
|
|
@@ -17311,7 +17303,7 @@ const aa = Ce([
|
|
|
17311
17303
|
"xlink:title",
|
|
17312
17304
|
"xml:space",
|
|
17313
17305
|
"xmlns:xlink"
|
|
17314
|
-
]),
|
|
17306
|
+
]), xw = _e(/{{[\w\W]*|^[\w\W]*}}/g), ww = _e(/<%[\w\W]*|^[\w\W]*%>/g), kw = _e(/\${[\w\W]*/g), Sw = _e(/^data-[\-\w.\u00B7-\uFFFF]+$/), vw = _e(/^aria-[\-\w]+$/), fa = _e(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Cw = _e(/^(?:\w+script|data):/i), Aw = _e(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Ew = _e(/^html$/i), Tw = _e(/^[a-z][.\w]*(-[.\w]+)+$/i), So = _e(/<[/\w!]/g), pa = _e(/<[/\w]/g), qw = _e(/<\/no(script|embed|frames)/i), da = _e(/\/>/i), ye = {
|
|
17315
17307
|
element: 1,
|
|
17316
17308
|
attribute: 2,
|
|
17317
17309
|
text: 3,
|
|
@@ -17324,7 +17316,7 @@ const aa = Ce([
|
|
|
17324
17316
|
documentType: 10,
|
|
17325
17317
|
documentFragment: 11,
|
|
17326
17318
|
notation: 12
|
|
17327
|
-
},
|
|
17319
|
+
}, _w = Ce(ue({}, [
|
|
17328
17320
|
"style",
|
|
17329
17321
|
"script",
|
|
17330
17322
|
"xmp",
|
|
@@ -17333,9 +17325,9 @@ const aa = Ce([
|
|
|
17333
17325
|
"noframes",
|
|
17334
17326
|
"plaintext",
|
|
17335
17327
|
"noscript"
|
|
17336
|
-
])),
|
|
17328
|
+
])), Iw = function() {
|
|
17337
17329
|
return typeof window > "u" ? null : window;
|
|
17338
|
-
},
|
|
17330
|
+
}, Rw = function(t, n) {
|
|
17339
17331
|
if (typeof t != "object" || typeof t.createPolicy != "function") return null;
|
|
17340
17332
|
let r = null;
|
|
17341
17333
|
const o = "data-tt-policy-suffix";
|
|
@@ -17372,7 +17364,7 @@ const aa = Ce([
|
|
|
17372
17364
|
return o && typeof o == "object" ? Ye(o) : r();
|
|
17373
17365
|
};
|
|
17374
17366
|
function Gu() {
|
|
17375
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
17367
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Iw();
|
|
17376
17368
|
const t = (I) => Gu(I);
|
|
17377
17369
|
if (t.version = "3.4.17", t.removed = [], !e || !e.document || e.document.nodeType !== ye.document || !e.Element)
|
|
17378
17370
|
return t.isSupported = !1, t;
|
|
@@ -17385,7 +17377,7 @@ function Gu() {
|
|
|
17385
17377
|
return O ? O(h) : h.nodeType;
|
|
17386
17378
|
}, N = function(h) {
|
|
17387
17379
|
return F ? F(h) : h.nodeName;
|
|
17388
|
-
}, W =
|
|
17380
|
+
}, W = mw(c, "namespaceURI"), S = function(h) {
|
|
17389
17381
|
return W ? W(h) : h.namespaceURI;
|
|
17390
17382
|
};
|
|
17391
17383
|
if (typeof l == "function") {
|
|
@@ -17410,11 +17402,11 @@ function Gu() {
|
|
|
17410
17402
|
D--;
|
|
17411
17403
|
}
|
|
17412
17404
|
}, Le = function() {
|
|
17413
|
-
return V || (re =
|
|
17405
|
+
return V || (re = Rw(f, o), V = !0), re;
|
|
17414
17406
|
}, m = n, Se = m.implementation, Pe = m.createNodeIterator, b = m.createDocumentFragment, Te = m.getElementsByTagName, me = r.importNode;
|
|
17415
17407
|
let j = ha();
|
|
17416
17408
|
t.isSupported = typeof Hu == "function" && typeof w == "function" && Se && Se.createHTMLDocument !== void 0;
|
|
17417
|
-
const Je =
|
|
17409
|
+
const Je = xw, $e = ww, ce = kw, it = Sw, lt = vw, qt = Cw, _t = Aw, It = Tw;
|
|
17418
17410
|
let vn = fa, fe = null;
|
|
17419
17411
|
const on = ue({}, [
|
|
17420
17412
|
...aa,
|
|
@@ -17557,7 +17549,7 @@ function Gu() {
|
|
|
17557
17549
|
}), _i = Dt(h, "ADD_DATA_URI_TAGS", Ii, {
|
|
17558
17550
|
transform: be,
|
|
17559
17551
|
base: Ii
|
|
17560
|
-
}), $t = Dt(h, "FORBID_CONTENTS", qi, { transform: be }), jt = Dt(h, "FORBID_TAGS", Ye({}), { transform: be }), Zn = Dt(h, "FORBID_ATTR", Ye({}), { transform: be }), an = He(h, "USE_PROFILES") ? h.USE_PROFILES && typeof h.USE_PROFILES == "object" ? Ye(h.USE_PROFILES) : h.USE_PROFILES : !1, er = h.ALLOW_ARIA_ATTR !== !1, Cn = h.ALLOW_DATA_ATTR !== !1, A = h.ALLOW_UNKNOWN_PROTOCOLS || !1, M = h.ALLOW_SELF_CLOSE_IN_ATTR !== !1, G = h.SAFE_FOR_TEMPLATES || !1, Q = h.SAFE_FOR_XML !== !1, le = h.WHOLE_DOCUMENT || !1, Ze = h.RETURN_DOM || !1, ve = h.RETURN_DOM_FRAGMENT || !1, at = h.RETURN_TRUSTED_TYPE || !1, yt = h.FORCE_BODY || !1, et = h.SANITIZE_DOM !== !1, Ei = h.SANITIZE_NAMED_PROPS || !1, Lr = h.KEEP_CONTENT !== !1, Pr = h.IN_PLACE || !1, vn =
|
|
17552
|
+
}), $t = Dt(h, "FORBID_CONTENTS", qi, { transform: be }), jt = Dt(h, "FORBID_TAGS", Ye({}), { transform: be }), Zn = Dt(h, "FORBID_ATTR", Ye({}), { transform: be }), an = He(h, "USE_PROFILES") ? h.USE_PROFILES && typeof h.USE_PROFILES == "object" ? Ye(h.USE_PROFILES) : h.USE_PROFILES : !1, er = h.ALLOW_ARIA_ATTR !== !1, Cn = h.ALLOW_DATA_ATTR !== !1, A = h.ALLOW_UNKNOWN_PROTOCOLS || !1, M = h.ALLOW_SELF_CLOSE_IN_ATTR !== !1, G = h.SAFE_FOR_TEMPLATES || !1, Q = h.SAFE_FOR_XML !== !1, le = h.WHOLE_DOCUMENT || !1, Ze = h.RETURN_DOM || !1, ve = h.RETURN_DOM_FRAGMENT || !1, at = h.RETURN_TRUSTED_TYPE || !1, yt = h.FORCE_BODY || !1, et = h.SANITIZE_DOM !== !1, Ei = h.SANITIZE_NAMED_PROPS || !1, Lr = h.KEEP_CONTENT !== !1, Pr = h.IN_PLACE || !1, vn = gw(h.ALLOWED_URI_REGEXP) ? h.ALLOWED_URI_REGEXP : fa, sn = typeof h.NAMESPACE == "string" ? h.NAMESPACE : pt, Or = vo(h, "MATHML_TEXT_INTEGRATION_POINTS", () => ue({}, Li)), zr = vo(h, "HTML_INTEGRATION_POINTS", () => ue({}, Pi));
|
|
17561
17553
|
const y = vo(h, "CUSTOM_ELEMENT_HANDLING", () => bn(null));
|
|
17562
17554
|
if (We = bn(null), He(y, "tagNameCheck") && Di(y.tagNameCheck) && (We.tagNameCheck = y.tagNameCheck), He(y, "attributeNameCheck") && Di(y.attributeNameCheck) && (We.attributeNameCheck = y.attributeNameCheck), He(y, "allowCustomizedBuiltInElements") && typeof y.allowCustomizedBuiltInElements == "boolean" && (We.allowCustomizedBuiltInElements = y.allowCustomizedBuiltInElements), _e(We), G && (Cn = !1), ve && (Ze = !0), an && (fe = ue({}, sa), he = bn(null), an.html === !0 && (ue(fe, aa), ue(he, ua)), an.svg === !0 && (ue(fe, yo), ue(he, ko), ue(he, mr)), an.svgFilters === !0 && (ue(fe, xo), ue(he, ko), ue(he, mr)), an.mathMl === !0 && (ue(fe, wo), ue(he, ca), ue(he, mr))), ft.tagCheck = null, ft.attributeCheck = null, He(h, "ADD_TAGS") && (typeof h.ADD_TAGS == "function" ? ft.tagCheck = h.ADD_TAGS : yn(h.ADD_TAGS) && (fe === on && (fe = Ye(fe)), ue(fe, h.ADD_TAGS, be))), He(h, "ADD_ATTR") && (typeof h.ADD_ATTR == "function" ? ft.attributeCheck = h.ADD_ATTR : yn(h.ADD_ATTR) && (he === ln && (he = Ye(he)), ue(he, h.ADD_ATTR, be))), He(h, "ADD_FORBID_CONTENTS") && yn(h.ADD_FORBID_CONTENTS) && ($t === qi && ($t = Ye($t)), ue($t, h.ADD_FORBID_CONTENTS, be)), Lr && (fe["#text"] = !0), le && ue(fe, [
|
|
17563
17555
|
"html",
|
|
@@ -17578,8 +17570,8 @@ function Gu() {
|
|
|
17578
17570
|
}, Mi = ue({}, [
|
|
17579
17571
|
...yo,
|
|
17580
17572
|
...xo,
|
|
17581
|
-
...
|
|
17582
|
-
]), Oi = ue({}, [...wo, ...
|
|
17573
|
+
...bw
|
|
17574
|
+
]), Oi = ue({}, [...wo, ...yw]), sc = function(h, y, T) {
|
|
17583
17575
|
return y.namespaceURI === pt ? h === "svg" : y.namespaceURI === tr ? h === "svg" && (T === "annotation-xml" || Or[T]) : !!Mi[h];
|
|
17584
17576
|
}, uc = function(h, y, T) {
|
|
17585
17577
|
return y.namespaceURI === pt ? h === "math" : y.namespaceURI === nr ? h === "math" && zr[T] : !!Oi[h];
|
|
@@ -17608,7 +17600,7 @@ function Gu() {
|
|
|
17608
17600
|
}, Br = function(h) {
|
|
17609
17601
|
Hr(h);
|
|
17610
17602
|
const y = v(h);
|
|
17611
|
-
y && wt(
|
|
17603
|
+
y && wt(sw(y), (q) => {
|
|
17612
17604
|
try {
|
|
17613
17605
|
p(q);
|
|
17614
17606
|
} catch {
|
|
@@ -17796,7 +17788,7 @@ function Gu() {
|
|
|
17796
17788
|
});
|
|
17797
17789
|
}
|
|
17798
17790
|
const yc = function(h, y) {
|
|
17799
|
-
return !!(Q && h.hasChildNodes() && !En(h.firstElementChild) && qe(So, h.textContent) && qe(So, h.innerHTML) || Q &&
|
|
17791
|
+
return !!(Q && h.hasChildNodes() && !En(h.firstElementChild) && qe(So, h.textContent) && qe(So, h.innerHTML) || Q && _w[y] && B(h) === ye.element && S(h) === pt && (En(h.firstElementChild) || typeof h.textContent == "string" && qe(So, h.textContent)) || h.nodeType === ye.processingInstruction || Q && h.nodeType === ye.comment && qe(pa, h.data));
|
|
17800
17792
|
}, ir = function(h, y) {
|
|
17801
17793
|
if (h instanceof RegExp) return qe(h, y);
|
|
17802
17794
|
if (h instanceof Function) {
|
|
@@ -17836,7 +17828,7 @@ function Gu() {
|
|
|
17836
17828
|
const q = xc(h, T, y);
|
|
17837
17829
|
return q === !1 && (st(j.afterSanitizeElements, h, null), fn(h, y)) ? !0 : q;
|
|
17838
17830
|
}
|
|
17839
|
-
if (B(h) === ye.element && !fc(h) || (T === "noscript" || T === "noembed" || T === "noframes") && qe(
|
|
17831
|
+
if (B(h) === ye.element && !fc(h) || (T === "noscript" || T === "noembed" || T === "noframes") && qe(qw, h.innerHTML))
|
|
17840
17832
|
return Rt(h), !0;
|
|
17841
17833
|
if (G && h.nodeType === ye.text) {
|
|
17842
17834
|
const q = rr(h.textContent);
|
|
@@ -17890,7 +17882,7 @@ function Gu() {
|
|
|
17890
17882
|
const X = be(h.nodeName);
|
|
17891
17883
|
for (; $--; ) {
|
|
17892
17884
|
const ne = T[$], we = ne.name, dt = ne.namespaceURI, Me = ne.value, Fe = be(we), pn = Me;
|
|
17893
|
-
let Be = we === "value" ? pn :
|
|
17885
|
+
let Be = we === "value" ? pn : cw(pn), Yi = !1;
|
|
17894
17886
|
if (q.attrName = Fe, q.attrValue = Be, q.keepAttr = !0, q.forceKeepAttr = void 0, st(j.uponSanitizeAttribute, h, q), Be = q.attrValue, Ei && (Fe === "id" || Fe === "name") && oa(Be, Ti) !== 0 && (cn(we, h, ne), Be = Ti + Be, Yi = !0), Gi(we, Be)) {
|
|
17895
17887
|
cn(we, h, ne);
|
|
17896
17888
|
continue;
|
|
@@ -17961,7 +17953,7 @@ function Gu() {
|
|
|
17961
17953
|
};
|
|
17962
17954
|
return t.sanitize = function(I) {
|
|
17963
17955
|
let h = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, y = null, T = null, q = null, $ = null;
|
|
17964
|
-
if (Dr = !I, Dr && (I = "<!-->"), typeof I != "string" && !En(I) && (I =
|
|
17956
|
+
if (Dr = !I, Dr && (I = "<!-->"), typeof I != "string" && !En(I) && (I = hw(I), typeof I != "string"))
|
|
17965
17957
|
throw kt("dirty is not a string, aborting");
|
|
17966
17958
|
if (!t.isSupported) return I;
|
|
17967
17959
|
De ? (fe = Qe, he = ze) : Fr(h), (j.uponSanitizeElement.length > 0 || j.uponSanitizeAttribute.length > 0) && (fe = Ye(fe)), j.uponSanitizeAttribute.length > 0 && (he = Ye(he)), t.removed = [];
|
|
@@ -18009,7 +18001,7 @@ function Gu() {
|
|
|
18009
18001
|
return (he.shadowroot || he.shadowrootmode) && ($ = me.call(r, $, !0)), $;
|
|
18010
18002
|
}
|
|
18011
18003
|
let Me = le ? y.outerHTML : y.innerHTML;
|
|
18012
|
-
return le && fe["!doctype"] && y.ownerDocument && y.ownerDocument.doctype && y.ownerDocument.doctype.name && qe(
|
|
18004
|
+
return le && fe["!doctype"] && y.ownerDocument && y.ownerDocument.doctype && y.ownerDocument.doctype.name && qe(Ew, y.ownerDocument.doctype.name) && (Me = "<!DOCTYPE " + y.ownerDocument.doctype.name + `>
|
|
18013
18005
|
` + Me), G && (Me = rr(Me)), P && at ? ae(Me) : Me;
|
|
18014
18006
|
}, t.setConfig = function() {
|
|
18015
18007
|
let I = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
@@ -18025,8 +18017,8 @@ function Gu() {
|
|
|
18025
18017
|
}, t.removeHook = function(I, h) {
|
|
18026
18018
|
if (He(j, I)) {
|
|
18027
18019
|
if (h !== void 0) {
|
|
18028
|
-
const y =
|
|
18029
|
-
return y === -1 ? void 0 :
|
|
18020
|
+
const y = aw(j[I], h);
|
|
18021
|
+
return y === -1 ? void 0 : uw(j[I], y, 1)[0];
|
|
18030
18022
|
}
|
|
18031
18023
|
return na(j[I]);
|
|
18032
18024
|
}
|
|
@@ -18051,7 +18043,7 @@ const Yu = je(
|
|
|
18051
18043
|
)
|
|
18052
18044
|
);
|
|
18053
18045
|
Yu.displayName = "Textarea";
|
|
18054
|
-
function
|
|
18046
|
+
function Nw({
|
|
18055
18047
|
isDisabled: e,
|
|
18056
18048
|
onFiles: t
|
|
18057
18049
|
}) {
|
|
@@ -18084,7 +18076,7 @@ function Pw({
|
|
|
18084
18076
|
)
|
|
18085
18077
|
] });
|
|
18086
18078
|
}
|
|
18087
|
-
function
|
|
18079
|
+
function Lw({
|
|
18088
18080
|
attachmentFiles: e,
|
|
18089
18081
|
error: t,
|
|
18090
18082
|
onRemove: n
|
|
@@ -18135,7 +18127,7 @@ function Dw({
|
|
|
18135
18127
|
)
|
|
18136
18128
|
] });
|
|
18137
18129
|
}
|
|
18138
|
-
function
|
|
18130
|
+
function Pw(e) {
|
|
18139
18131
|
const [t, n] = Ae([]), [r, o] = Ae(null), l = e && t.length < Wn;
|
|
18140
18132
|
return {
|
|
18141
18133
|
attachmentFiles: t,
|
|
@@ -18159,18 +18151,18 @@ function Mw(e) {
|
|
|
18159
18151
|
}
|
|
18160
18152
|
};
|
|
18161
18153
|
}
|
|
18162
|
-
function
|
|
18154
|
+
function Dw(e) {
|
|
18163
18155
|
const t = Xe(e);
|
|
18164
18156
|
return vt(() => {
|
|
18165
18157
|
t.current = e;
|
|
18166
18158
|
}), t;
|
|
18167
18159
|
}
|
|
18168
|
-
function
|
|
18169
|
-
const [t, n] = Ae(!1), r =
|
|
18160
|
+
function Mw(e) {
|
|
18161
|
+
const [t, n] = Ae(!1), r = Dw(e), o = Xe(null), l = wa(
|
|
18170
18162
|
(i) => {
|
|
18171
18163
|
if (o.current?.abort(), o.current = null, !i) return;
|
|
18172
18164
|
const a = new AbortController();
|
|
18173
|
-
o.current = a,
|
|
18165
|
+
o.current = a, Ow(i.ownerDocument, a.signal, {
|
|
18174
18166
|
onDragChange: n,
|
|
18175
18167
|
onFiles: (s) => r.current(s)
|
|
18176
18168
|
});
|
|
@@ -18179,7 +18171,7 @@ function zw(e) {
|
|
|
18179
18171
|
);
|
|
18180
18172
|
return { isDraggingFiles: t, listenForFiles: l };
|
|
18181
18173
|
}
|
|
18182
|
-
function
|
|
18174
|
+
function Ow(e, t, { onDragChange: n, onFiles: r }) {
|
|
18183
18175
|
const o = { signal: t };
|
|
18184
18176
|
let l = 0;
|
|
18185
18177
|
e.addEventListener(
|
|
@@ -18209,7 +18201,7 @@ function Fw(e, t, { onDragChange: n, onFiles: r }) {
|
|
|
18209
18201
|
), e.addEventListener(
|
|
18210
18202
|
"paste",
|
|
18211
18203
|
(i) => {
|
|
18212
|
-
const a =
|
|
18204
|
+
const a = zw(i);
|
|
18213
18205
|
a.length !== 0 && (i.preventDefault(), r(a));
|
|
18214
18206
|
},
|
|
18215
18207
|
o
|
|
@@ -18218,12 +18210,12 @@ function Fw(e, t, { onDragChange: n, onFiles: r }) {
|
|
|
18218
18210
|
function gr(e) {
|
|
18219
18211
|
return !!e.dataTransfer?.types.includes("Files");
|
|
18220
18212
|
}
|
|
18221
|
-
function
|
|
18213
|
+
function zw(e) {
|
|
18222
18214
|
return Array.from(e.clipboardData?.files ?? []);
|
|
18223
18215
|
}
|
|
18224
|
-
const
|
|
18225
|
-
function
|
|
18226
|
-
const t =
|
|
18216
|
+
const Fw = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
18217
|
+
function Bw(e) {
|
|
18218
|
+
const t = Fw.exec(e.trim());
|
|
18227
18219
|
if (!t) return null;
|
|
18228
18220
|
let n = t[1];
|
|
18229
18221
|
return n.length === 3 && (n = n.split("").map((r) => r + r).join("")), [
|
|
@@ -18232,7 +18224,7 @@ function Hw(e) {
|
|
|
18232
18224
|
Number.parseInt(n.slice(4, 6), 16)
|
|
18233
18225
|
];
|
|
18234
18226
|
}
|
|
18235
|
-
function
|
|
18227
|
+
function Uw([e, t, n]) {
|
|
18236
18228
|
const r = e / 255, o = t / 255, l = n / 255, i = Math.max(r, o, l), a = Math.min(r, o, l), s = i - a, u = (i + a) / 2;
|
|
18237
18229
|
if (s === 0)
|
|
18238
18230
|
return { hue: 0, saturation: 0, lightness: u };
|
|
@@ -18248,11 +18240,11 @@ function ma({ hue: e, saturation: t, lightness: n }) {
|
|
|
18248
18240
|
n * 100
|
|
18249
18241
|
)}%)`;
|
|
18250
18242
|
}
|
|
18251
|
-
function
|
|
18252
|
-
const t = e ?
|
|
18243
|
+
function Hw(e) {
|
|
18244
|
+
const t = e ? Bw(e) : null;
|
|
18253
18245
|
if (!t)
|
|
18254
18246
|
return { strong: "hsl(0 0% 62%)", soft: "hsl(0 0% 82%)" };
|
|
18255
|
-
const { hue: n, saturation: r, lightness: o } =
|
|
18247
|
+
const { hue: n, saturation: r, lightness: o } = Uw(t), l = {
|
|
18256
18248
|
hue: n,
|
|
18257
18249
|
saturation: br(Math.max(r * 1.35, r + 0.25)),
|
|
18258
18250
|
lightness: Math.min(br(o + 0.45), 0.95)
|
|
@@ -18263,7 +18255,7 @@ function Vw(e) {
|
|
|
18263
18255
|
};
|
|
18264
18256
|
return { strong: ma(l), soft: ma(i) };
|
|
18265
18257
|
}
|
|
18266
|
-
function
|
|
18258
|
+
function jw() {
|
|
18267
18259
|
const e = Xe(!1), t = Xe(0), n = Xe(0);
|
|
18268
18260
|
return {
|
|
18269
18261
|
onMouseDown: (a) => {
|
|
@@ -18285,18 +18277,18 @@ function $w() {
|
|
|
18285
18277
|
}
|
|
18286
18278
|
};
|
|
18287
18279
|
}
|
|
18288
|
-
const
|
|
18289
|
-
function
|
|
18280
|
+
const Vw = 1100, ga = 4e3, $w = 9e3;
|
|
18281
|
+
function Ww(e) {
|
|
18290
18282
|
const [t, n] = Ae(!1);
|
|
18291
18283
|
return vt(() => {
|
|
18292
18284
|
if (!e) return;
|
|
18293
18285
|
let r, o = !1;
|
|
18294
18286
|
const l = () => {
|
|
18295
|
-
const i = ga + Math.random() * (
|
|
18287
|
+
const i = ga + Math.random() * ($w - ga);
|
|
18296
18288
|
r = setTimeout(() => {
|
|
18297
18289
|
o || (n(!0), r = setTimeout(() => {
|
|
18298
18290
|
o || (n(!1), l());
|
|
18299
|
-
},
|
|
18291
|
+
}, Vw));
|
|
18300
18292
|
}, i);
|
|
18301
18293
|
};
|
|
18302
18294
|
return l(), () => {
|
|
@@ -18304,7 +18296,7 @@ function Yw(e) {
|
|
|
18304
18296
|
};
|
|
18305
18297
|
}, [e]), t;
|
|
18306
18298
|
}
|
|
18307
|
-
function
|
|
18299
|
+
function Gw() {
|
|
18308
18300
|
const [e, t] = Ae(!1), n = Xe(null);
|
|
18309
18301
|
return { scrollContainerRef: (o) => {
|
|
18310
18302
|
if (n.current?.disconnect(), n.current = null, !o) return;
|
|
@@ -18319,12 +18311,12 @@ function Xw() {
|
|
|
18319
18311
|
}
|
|
18320
18312
|
}, hasOverflow: e };
|
|
18321
18313
|
}
|
|
18322
|
-
function
|
|
18323
|
-
const t = nn(), n = ei(), r =
|
|
18314
|
+
function Yw({ onSelect: e }) {
|
|
18315
|
+
const t = nn(), n = ei(), r = jw(), { scrollContainerRef: o, hasOverflow: l } = Gw(), i = !!t.messages?.some(
|
|
18324
18316
|
(k) => k.sender === "user"
|
|
18325
|
-
), a = t.suggestedMessageTexts ?? [], s = !!t.suggestedMessages && a.length > 0 && !i, u = !!t.hasSuggestedMessageAura && s, f = !!t.hasSuggestedMessageShine && s, c =
|
|
18317
|
+
), a = t.suggestedMessageTexts ?? [], s = !!t.suggestedMessages && a.length > 0 && !i, u = !!t.hasSuggestedMessageAura && s, f = !!t.hasSuggestedMessageShine && s, c = Ww(f);
|
|
18326
18318
|
if (!s) return null;
|
|
18327
|
-
const d = u ?
|
|
18319
|
+
const d = u ? Hw(n.suggestedMessageBubbleColor || n.userBubbleColor) : null, p = n.suggestedMessageBubbleColor ? {
|
|
18328
18320
|
backgroundColor: n.suggestedMessageBubbleColor,
|
|
18329
18321
|
color: n.suggestedMessageBubbleTextColor || Ai(n.suggestedMessageBubbleColor)
|
|
18330
18322
|
} : void 0, g = (k, v = {
|
|
@@ -18415,7 +18407,7 @@ const ba = {
|
|
|
18415
18407
|
5034: "Sorry we are unable to help right now, please try again later.",
|
|
18416
18408
|
5001: "We are currently facing technical difficulties. Please try again later.",
|
|
18417
18409
|
DEFAULT: "Something went wrong. Please try again later."
|
|
18418
|
-
},
|
|
18410
|
+
}, Xw = (e) => ba[e] || ba.DEFAULT, Kw = Ar({
|
|
18419
18411
|
error: null,
|
|
18420
18412
|
hideSdk: !1,
|
|
18421
18413
|
publishApiError: () => {
|
|
@@ -18426,13 +18418,13 @@ const ba = {
|
|
|
18426
18418
|
},
|
|
18427
18419
|
clearError: () => {
|
|
18428
18420
|
}
|
|
18429
|
-
}),
|
|
18430
|
-
const e = Er(
|
|
18421
|
+
}), Jw = () => {
|
|
18422
|
+
const e = Er(Kw);
|
|
18431
18423
|
if (e === void 0)
|
|
18432
18424
|
throw new Error("useError must be used within an ErrorProvider");
|
|
18433
18425
|
return e;
|
|
18434
|
-
},
|
|
18435
|
-
const n = t instanceof Jt ? t.response?.errors?.[0] : void 0, r = Number(n?.error_code), o =
|
|
18426
|
+
}, Tk = (e) => (t) => {
|
|
18427
|
+
const n = t instanceof Jt ? t.response?.errors?.[0] : void 0, r = Number(n?.error_code), o = Xw(r);
|
|
18436
18428
|
e({ code: r, message: o });
|
|
18437
18429
|
}, ya = {
|
|
18438
18430
|
warning: {
|
|
@@ -18463,7 +18455,7 @@ const ba = {
|
|
|
18463
18455
|
iconColor: "eloq:text-green-500 eloq:dark:text-green-400",
|
|
18464
18456
|
icon: Nf
|
|
18465
18457
|
}
|
|
18466
|
-
},
|
|
18458
|
+
}, Qw = ({ message: e, type: t }) => {
|
|
18467
18459
|
const n = ya[t] || ya.warning, r = n.icon;
|
|
18468
18460
|
return /* @__PURE__ */ Z(
|
|
18469
18461
|
"div",
|
|
@@ -18479,17 +18471,17 @@ const ba = {
|
|
|
18479
18471
|
Cr.isSupported && Cr.addHook("afterSanitizeAttributes", (e) => {
|
|
18480
18472
|
e.tagName === "A" && (e.setAttribute("rel", "noopener noreferrer"), e.hasAttribute("target") && e.setAttribute("target", "_blank"));
|
|
18481
18473
|
});
|
|
18482
|
-
const
|
|
18483
|
-
function
|
|
18474
|
+
const Zw = "eloq:bg-card eloq:rounded-3xl eloq:shadow-[0_0_4px_0_rgba(0,0,0,0.20)] eloq:dark:shadow-none eloq:dark:border eloq:dark:border-border", ek = "eloq:w-full eloq:rounded-t-2xl eloq:bg-cream eloq:border-t eloq:border-x eloq:border-border eloq:px-5 eloq:pt-5 eloq:pb-4 eloq:shadow-[0_-8px_24px_rgba(0,0,0,0.08)] eloq:dark:shadow-none", tk = "eloq:flex eloq:items-center eloq:justify-between eloq:w-[70%] eloq:m-auto eloq:rounded-full eloq:py-2 eloq:pl-4 eloq:pr-2 eloq:text-sm eloq:font-semibold eloq:transition-opacity eloq:hover:opacity-90 eloq:focus-visible:outline-none eloq:focus-visible:ring-2 eloq:focus-visible:ring-primary eloq:focus-visible:ring-offset-2", nk = "eloq:bg-cream", rk = "eloq:bg-muted-foreground eloq:dark:bg-muted eloq:dark:text-muted-foreground/50";
|
|
18475
|
+
function ok() {
|
|
18484
18476
|
const [e, t] = Ae(!1);
|
|
18485
18477
|
return vt(() => {
|
|
18486
18478
|
t(!0);
|
|
18487
18479
|
}, []), e && Cr.isSupported;
|
|
18488
18480
|
}
|
|
18489
|
-
function
|
|
18490
|
-
const { error: e } =
|
|
18481
|
+
function ik() {
|
|
18482
|
+
const { error: e } = Jw(), t = !!e, n = nn(), r = Xe(null), [o, l] = Ae(""), i = ei(), a = !!n.messages?.some((O) => O.isRatingRequest), s = n.keyboardInset ?? 0, u = ok(), f = !!n.hasAttachments, c = t || a, d = Pw(
|
|
18491
18483
|
f && !c
|
|
18492
|
-
), p =
|
|
18484
|
+
), p = Mw(d.addFiles), g = !!o.trim() || d.attachmentFiles.length > 0, k = i.userBubbleTextColor || Ai(i.userBubbleColor), v = () => g && !c ? {
|
|
18493
18485
|
backgroundColor: i.userBubbleColor,
|
|
18494
18486
|
color: k
|
|
18495
18487
|
} : {}, w = (O) => {
|
|
@@ -18521,7 +18513,7 @@ function ak() {
|
|
|
18521
18513
|
}, _ = () => n.isChatClosed ? /* @__PURE__ */ x("div", { className: "eloq:w-full eloq:z-20 eloq:animate-slide-up-in", children: /* @__PURE__ */ Z(
|
|
18522
18514
|
"div",
|
|
18523
18515
|
{
|
|
18524
|
-
className:
|
|
18516
|
+
className: ek,
|
|
18525
18517
|
role: "status",
|
|
18526
18518
|
"aria-live": "polite",
|
|
18527
18519
|
children: [
|
|
@@ -18531,7 +18523,7 @@ function ak() {
|
|
|
18531
18523
|
{
|
|
18532
18524
|
type: "button",
|
|
18533
18525
|
onClick: () => n.onStartNewChat?.(),
|
|
18534
|
-
className:
|
|
18526
|
+
className: tk,
|
|
18535
18527
|
style: {
|
|
18536
18528
|
backgroundColor: i.userBubbleColor,
|
|
18537
18529
|
color: k
|
|
@@ -18545,16 +18537,16 @@ function ak() {
|
|
|
18545
18537
|
]
|
|
18546
18538
|
}
|
|
18547
18539
|
) }) : /* @__PURE__ */ Z(zt, { children: [
|
|
18548
|
-
/* @__PURE__ */ x(
|
|
18540
|
+
/* @__PURE__ */ x(Yw, { onSelect: w }),
|
|
18549
18541
|
/* @__PURE__ */ Z(
|
|
18550
18542
|
"div",
|
|
18551
18543
|
{
|
|
18552
18544
|
className: "eloq:flex eloq:flex-col eloq:w-full eloq:items-center eloq:px-4 eloq:mx-1 eloq:pb-4 eloq:-mt-6 eloq:z-20",
|
|
18553
18545
|
style: s ? { transform: `translateY(-${s}px)` } : void 0,
|
|
18554
18546
|
children: [
|
|
18555
|
-
t && /* @__PURE__ */ x(
|
|
18547
|
+
t && /* @__PURE__ */ x(Qw, { message: e.message, type: "error" }),
|
|
18556
18548
|
f && /* @__PURE__ */ x(
|
|
18557
|
-
|
|
18549
|
+
Lw,
|
|
18558
18550
|
{
|
|
18559
18551
|
attachmentFiles: d.attachmentFiles,
|
|
18560
18552
|
error: d.attachmentError,
|
|
@@ -18567,7 +18559,7 @@ function ak() {
|
|
|
18567
18559
|
className: "eloq:relative eloq:flex eloq:items-center eloq:w-full eloq:m-0",
|
|
18568
18560
|
onSubmit: E,
|
|
18569
18561
|
children: [
|
|
18570
|
-
/* @__PURE__ */ x("div", { className: te("eloq:flex-1",
|
|
18562
|
+
/* @__PURE__ */ x("div", { className: te("eloq:flex-1", Zw), children: /* @__PURE__ */ x(
|
|
18571
18563
|
Yu,
|
|
18572
18564
|
{
|
|
18573
18565
|
ref: r,
|
|
@@ -18599,7 +18591,7 @@ function ak() {
|
|
|
18599
18591
|
}
|
|
18600
18592
|
) }),
|
|
18601
18593
|
f && /* @__PURE__ */ x(
|
|
18602
|
-
|
|
18594
|
+
Nw,
|
|
18603
18595
|
{
|
|
18604
18596
|
isDisabled: !d.canAddFiles,
|
|
18605
18597
|
onFiles: d.addFiles
|
|
@@ -18612,7 +18604,7 @@ function ak() {
|
|
|
18612
18604
|
disabled: !g || c,
|
|
18613
18605
|
className: te(
|
|
18614
18606
|
"eloq:absolute eloq:top-0 eloq:bottom-2 eloq:right-2 eloq:self-end eloq:p-2 eloq:text-muted eloq:rounded-full eloq:transition-colors",
|
|
18615
|
-
g && !t ? "eloq:text-primary-foreground" :
|
|
18607
|
+
g && !t ? "eloq:text-primary-foreground" : rk
|
|
18616
18608
|
),
|
|
18617
18609
|
style: v(),
|
|
18618
18610
|
children: /* @__PURE__ */ x(Ef, { className: "eloq:h-4 eloq:w-4" })
|
|
@@ -18641,7 +18633,7 @@ function ak() {
|
|
|
18641
18633
|
{
|
|
18642
18634
|
className: te(
|
|
18643
18635
|
"eloq:w-full eloq:flex eloq:flex-col eloq:items-center eloq:justify-center eloq:space-x-2 eloq:px-0",
|
|
18644
|
-
|
|
18636
|
+
nk
|
|
18645
18637
|
),
|
|
18646
18638
|
children: [
|
|
18647
18639
|
/* @__PURE__ */ Z("div", { className: "eloq:w-full eloq:flex eloq:items-center eloq:justify-center eloq:space-x-2 eloq:py-1", children: [
|
|
@@ -18674,16 +18666,16 @@ function ak() {
|
|
|
18674
18666
|
}
|
|
18675
18667
|
);
|
|
18676
18668
|
}
|
|
18677
|
-
var
|
|
18669
|
+
var lk = Object.defineProperty, At = (e, t) => lk(e, "name", { value: t, configurable: !0 }), Xu = "Avatar", [ak, qk] = /* @__PURE__ */ ni(Xu), sk = [
|
|
18678
18670
|
0,
|
|
18679
18671
|
() => {
|
|
18680
18672
|
}
|
|
18681
|
-
], [
|
|
18673
|
+
], [uk, Ku] = ak(Xu), Ju = /* @__PURE__ */ R.forwardRef(
|
|
18682
18674
|
// blank line to reduce diff noise
|
|
18683
18675
|
/* @__PURE__ */ At(function(t, n) {
|
|
18684
18676
|
const { __scopeAvatar: r, ...o } = t, [l, i] = R.useState("idle"), [a, s] = tc();
|
|
18685
18677
|
return /* @__PURE__ */ x(
|
|
18686
|
-
|
|
18678
|
+
uk,
|
|
18687
18679
|
{
|
|
18688
18680
|
scope: r,
|
|
18689
18681
|
imageLoadingStatus: l,
|
|
@@ -18694,9 +18686,9 @@ var sk = Object.defineProperty, At = (e, t) => sk(e, "name", { value: t, configu
|
|
|
18694
18686
|
}
|
|
18695
18687
|
);
|
|
18696
18688
|
}, "Avatar")
|
|
18697
|
-
),
|
|
18689
|
+
), ck = "AvatarImage", Qu = /* @__PURE__ */ R.forwardRef(
|
|
18698
18690
|
/* @__PURE__ */ At(function(t, n) {
|
|
18699
|
-
const { __scopeAvatar: r, src: o, onLoadingStatusChange: l, ...i } = t, a = Ku(
|
|
18691
|
+
const { __scopeAvatar: r, src: o, onLoadingStatusChange: l, ...i } = t, a = Ku(ck, r);
|
|
18700
18692
|
a.setImageCount;
|
|
18701
18693
|
const s = ec(o, {
|
|
18702
18694
|
referrerPolicy: i.referrerPolicy,
|
|
@@ -18711,9 +18703,9 @@ var sk = Object.defineProperty, At = (e, t) => sk(e, "name", { value: t, configu
|
|
|
18711
18703
|
f.current = s, s !== c && u(s);
|
|
18712
18704
|
}, [s, u]), s === "loaded" ? /* @__PURE__ */ x(Ut.img, { ...i, ref: n, src: o }) : null;
|
|
18713
18705
|
}, "AvatarImage")
|
|
18714
|
-
),
|
|
18706
|
+
), fk = "AvatarFallback", Zu = /* @__PURE__ */ R.forwardRef(
|
|
18715
18707
|
/* @__PURE__ */ At(function(t, n) {
|
|
18716
|
-
const { __scopeAvatar: r, delayMs: o, ...l } = t, i = Ku(
|
|
18708
|
+
const { __scopeAvatar: r, delayMs: o, ...l } = t, i = Ku(fk, r), [a, s] = R.useState(o === void 0);
|
|
18717
18709
|
return R.useEffect(() => {
|
|
18718
18710
|
if (o !== void 0) {
|
|
18719
18711
|
const u = window.setTimeout(() => s(!0), o);
|
|
@@ -18748,12 +18740,12 @@ function Wo(e) {
|
|
|
18748
18740
|
}
|
|
18749
18741
|
At(Wo, "getImageLoadingStatus");
|
|
18750
18742
|
function tc() {
|
|
18751
|
-
return
|
|
18743
|
+
return sk;
|
|
18752
18744
|
}
|
|
18753
18745
|
At(tc, "useImageCount");
|
|
18754
|
-
function
|
|
18746
|
+
function pk(e) {
|
|
18755
18747
|
}
|
|
18756
|
-
At(
|
|
18748
|
+
At(pk, "useUpdateImageCount");
|
|
18757
18749
|
const nc = je(({ className: e, ...t }, n) => /* @__PURE__ */ x(
|
|
18758
18750
|
Ju,
|
|
18759
18751
|
{
|
|
@@ -18766,7 +18758,7 @@ const nc = je(({ className: e, ...t }, n) => /* @__PURE__ */ x(
|
|
|
18766
18758
|
}
|
|
18767
18759
|
));
|
|
18768
18760
|
nc.displayName = Ju.displayName;
|
|
18769
|
-
const
|
|
18761
|
+
const dk = je(({ className: e, ...t }, n) => /* @__PURE__ */ x(
|
|
18770
18762
|
Qu,
|
|
18771
18763
|
{
|
|
18772
18764
|
ref: n,
|
|
@@ -18774,8 +18766,8 @@ const mk = je(({ className: e, ...t }, n) => /* @__PURE__ */ x(
|
|
|
18774
18766
|
...t
|
|
18775
18767
|
}
|
|
18776
18768
|
));
|
|
18777
|
-
|
|
18778
|
-
const
|
|
18769
|
+
dk.displayName = Qu.displayName;
|
|
18770
|
+
const hk = je(({ className: e, ...t }, n) => /* @__PURE__ */ x(
|
|
18779
18771
|
Zu,
|
|
18780
18772
|
{
|
|
18781
18773
|
ref: n,
|
|
@@ -18786,14 +18778,14 @@ const gk = je(({ className: e, ...t }, n) => /* @__PURE__ */ x(
|
|
|
18786
18778
|
...t
|
|
18787
18779
|
}
|
|
18788
18780
|
));
|
|
18789
|
-
|
|
18790
|
-
const
|
|
18791
|
-
function
|
|
18781
|
+
hk.displayName = Zu.displayName;
|
|
18782
|
+
const mk = "eloq:shadow-[0_3px_4px_-2px_rgba(0,0,0,0.04)] eloq:dark:shadow-none eloq:dark:border-b eloq:dark:border-border", xa = "eloq:text-gray-400 eloq:hover:text-gray-600 eloq:dark:hover:text-gray-300 eloq:p-2";
|
|
18783
|
+
function gk({
|
|
18792
18784
|
onCleanChat: e,
|
|
18793
18785
|
onClose: t
|
|
18794
18786
|
}) {
|
|
18795
18787
|
const n = nn(), r = n.hasCleanChatButton ?? n.cleanChatButton ?? !0, o = n.hasCloseButton ?? n.closeButton ?? !0;
|
|
18796
|
-
return /* @__PURE__ */ Z(Jo, { className: te(zu,
|
|
18788
|
+
return /* @__PURE__ */ Z(Jo, { className: te(zu, mk), children: [
|
|
18797
18789
|
/* @__PURE__ */ Z("div", { className: Fu, children: [
|
|
18798
18790
|
/* @__PURE__ */ x(nc, { className: "eloq:h-10 eloq:w-10", children: /* @__PURE__ */ x(
|
|
18799
18791
|
Xo,
|
|
@@ -18814,7 +18806,7 @@ function yk({
|
|
|
18814
18806
|
] })
|
|
18815
18807
|
] });
|
|
18816
18808
|
}
|
|
18817
|
-
function
|
|
18809
|
+
function _k(e) {
|
|
18818
18810
|
const {
|
|
18819
18811
|
isOpen: t = !1,
|
|
18820
18812
|
isMobile: n,
|
|
@@ -18841,14 +18833,14 @@ function Rk(e) {
|
|
|
18841
18833
|
}
|
|
18842
18834
|
),
|
|
18843
18835
|
/* @__PURE__ */ x(
|
|
18844
|
-
|
|
18836
|
+
gk,
|
|
18845
18837
|
{
|
|
18846
18838
|
onCleanChat: () => r?.(),
|
|
18847
18839
|
onClose: () => o?.()
|
|
18848
18840
|
}
|
|
18849
18841
|
),
|
|
18850
|
-
/* @__PURE__ */ x(
|
|
18851
|
-
/* @__PURE__ */ x(
|
|
18842
|
+
/* @__PURE__ */ x(ew, {}),
|
|
18843
|
+
/* @__PURE__ */ x(ik, {})
|
|
18852
18844
|
] });
|
|
18853
18845
|
return /* @__PURE__ */ x(xf, { ...l, children: /* @__PURE__ */ x(Bp, { ...e, children: /* @__PURE__ */ x(
|
|
18854
18846
|
"main",
|
|
@@ -18875,7 +18867,7 @@ function mt({ className: e, ...t }) {
|
|
|
18875
18867
|
}
|
|
18876
18868
|
);
|
|
18877
18869
|
}
|
|
18878
|
-
function
|
|
18870
|
+
function bk(e, t) {
|
|
18879
18871
|
const [n, r] = Ae(e);
|
|
18880
18872
|
return vt(() => {
|
|
18881
18873
|
const o = setTimeout(() => {
|
|
@@ -18886,12 +18878,12 @@ function xk(e, t) {
|
|
|
18886
18878
|
};
|
|
18887
18879
|
}, [e, t]), n;
|
|
18888
18880
|
}
|
|
18889
|
-
function
|
|
18881
|
+
function Ik({
|
|
18890
18882
|
isOpen: e = !1,
|
|
18891
18883
|
isMobile: t,
|
|
18892
18884
|
skipAnimation: n = !1
|
|
18893
18885
|
}) {
|
|
18894
|
-
const r =
|
|
18886
|
+
const r = bk(e, 10), o = Uu({
|
|
18895
18887
|
isOpen: n ? e : r,
|
|
18896
18888
|
isMobile: t,
|
|
18897
18889
|
skipAnimation: n
|
|
@@ -18925,37 +18917,37 @@ function Nk({
|
|
|
18925
18917
|
}
|
|
18926
18918
|
export {
|
|
18927
18919
|
Iu as A,
|
|
18928
|
-
|
|
18929
|
-
|
|
18930
|
-
|
|
18931
|
-
|
|
18920
|
+
Qw as B,
|
|
18921
|
+
_k as C,
|
|
18922
|
+
Kw as E,
|
|
18923
|
+
kk as H,
|
|
18932
18924
|
Xo as L,
|
|
18933
18925
|
Ex as M,
|
|
18934
18926
|
Jl as N,
|
|
18935
|
-
|
|
18936
|
-
|
|
18927
|
+
Kx as R,
|
|
18928
|
+
Ik as S,
|
|
18937
18929
|
xf as T,
|
|
18938
18930
|
Ba as X,
|
|
18939
18931
|
Bp as a,
|
|
18940
|
-
|
|
18932
|
+
Yx as b,
|
|
18941
18933
|
te as c,
|
|
18942
|
-
|
|
18943
|
-
|
|
18944
|
-
|
|
18934
|
+
Dw as d,
|
|
18935
|
+
Jw as e,
|
|
18936
|
+
Xw as f,
|
|
18945
18937
|
Ai as g,
|
|
18946
|
-
|
|
18938
|
+
Zx as h,
|
|
18947
18939
|
Lu as i,
|
|
18948
18940
|
xr as j,
|
|
18949
18941
|
Jt as k,
|
|
18950
|
-
|
|
18951
|
-
|
|
18952
|
-
|
|
18953
|
-
|
|
18954
|
-
|
|
18955
|
-
|
|
18956
|
-
|
|
18957
|
-
|
|
18942
|
+
vk as l,
|
|
18943
|
+
Ak as m,
|
|
18944
|
+
bk as n,
|
|
18945
|
+
Jx as o,
|
|
18946
|
+
Tk as p,
|
|
18947
|
+
Ek as r,
|
|
18948
|
+
Ck as s,
|
|
18949
|
+
Sk as t,
|
|
18958
18950
|
ei as u,
|
|
18959
18951
|
Ox as w
|
|
18960
18952
|
};
|
|
18961
|
-
//# sourceMappingURL=skeleton-
|
|
18953
|
+
//# sourceMappingURL=skeleton-CyUpDF_5.js.map
|