@eloquentai/chat-sdk 0.33.15-dev → 0.34.2-dev.1
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/contexts/error-handling/error-messages.d.ts +2 -0
- package/dist/index.mjs +7 -5
- package/dist/index.mjs.map +1 -1
- package/dist/{skeleton-UBO_tD3w.js → skeleton-77mw6CSd.js} +142 -127
- package/dist/skeleton-77mw6CSd.js.map +1 -0
- package/dist/ui.mjs +1 -1
- package/package.json +8 -2
- package/dist/skeleton-UBO_tD3w.js.map +0 -1
|
@@ -5,12 +5,12 @@ import { useState as Ee, forwardRef as Te, createContext as Br, useContext as Ur
|
|
|
5
5
|
import * as Qa 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] = "0cadff6c-780b-4e99-a630-f589b89f2b85", e._sentryDebugIdIdentifier = "sentry-dbid-0cadff6c-780b-4e99-a630-f589b89f2b85");
|
|
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: "d19b287b111c8c57112a3205167eb6dfd33d3366" };
|
|
14
14
|
}
|
|
15
15
|
function Za(e) {
|
|
16
16
|
var t, n, r = "";
|
|
@@ -3844,7 +3844,7 @@ function Ds(e, t) {
|
|
|
3844
3844
|
return w.useReducer((n, r) => t[n][r] ?? n, e);
|
|
3845
3845
|
}
|
|
3846
3846
|
oe(Ds, "useStateMachine");
|
|
3847
|
-
var Ls = "ScrollArea", [Ns,
|
|
3847
|
+
var Ls = "ScrollArea", [Ns, SS] = /* @__PURE__ */ Hr(Ls), [bp, at] = Ns(Ls), Os = /* @__PURE__ */ w.forwardRef(
|
|
3848
3848
|
/* @__PURE__ */ oe(function(t, n) {
|
|
3849
3849
|
const {
|
|
3850
3850
|
__scopeScrollArea: r,
|
|
@@ -4421,11 +4421,18 @@ function Lp({
|
|
|
4421
4421
|
a && /* @__PURE__ */ v(
|
|
4422
4422
|
"button",
|
|
4423
4423
|
{
|
|
4424
|
+
type: "button",
|
|
4424
4425
|
onClick: async () => {
|
|
4425
|
-
|
|
4426
|
+
try {
|
|
4427
|
+
await navigator.clipboard.writeText(e.content);
|
|
4428
|
+
} catch {
|
|
4429
|
+
return;
|
|
4430
|
+
}
|
|
4431
|
+
o(!0), setTimeout(() => o(!1), 2e3);
|
|
4426
4432
|
},
|
|
4427
4433
|
className: Z(lo, r && "eloq:text-primary"),
|
|
4428
4434
|
title: "Copy message",
|
|
4435
|
+
"aria-label": "Copy message",
|
|
4429
4436
|
children: /* @__PURE__ */ v(Pd, { size: 16 })
|
|
4430
4437
|
}
|
|
4431
4438
|
),
|
|
@@ -5442,7 +5449,7 @@ var Bh = function(e) {
|
|
|
5442
5449
|
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Hh(r, o, n, "aria-hidden")) : function() {
|
|
5443
5450
|
return null;
|
|
5444
5451
|
};
|
|
5445
|
-
}, Vh = Object.defineProperty, st = (e, t) => Vh(e, "name", { value: t, configurable: !0 }), Ri = "Dialog", [bu,
|
|
5452
|
+
}, Vh = Object.defineProperty, st = (e, t) => Vh(e, "name", { value: t, configurable: !0 }), Ri = "Dialog", [bu, CS] = /* @__PURE__ */ Hr(Ri), [$h, Ct] = bu(Ri), Wh = /* @__PURE__ */ st((e) => {
|
|
5446
5453
|
const {
|
|
5447
5454
|
__scopeDialog: t,
|
|
5448
5455
|
children: n,
|
|
@@ -16985,6 +16992,12 @@ function Qi(e) {
|
|
|
16985
16992
|
return (n + 0.05) / 0.05 >= r * Xk ? "#000000" : "#ffffff";
|
|
16986
16993
|
}
|
|
16987
16994
|
const Kk = "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", Qk = 2e3, Zk = /* @__PURE__ */ new Set(["Routing"]), Jk = /^Thinking\.+$/;
|
|
16995
|
+
function ev(e) {
|
|
16996
|
+
let t = e.length;
|
|
16997
|
+
for (; t > 0 && e.charCodeAt(t - 1) === 46; )
|
|
16998
|
+
t--;
|
|
16999
|
+
return e.slice(0, t);
|
|
17000
|
+
}
|
|
16988
17001
|
function Ia({
|
|
16989
17002
|
messageData: e,
|
|
16990
17003
|
isBot: t,
|
|
@@ -17006,7 +17019,7 @@ function Ia({
|
|
|
17006
17019
|
return () => clearTimeout(E);
|
|
17007
17020
|
}, [f]);
|
|
17008
17021
|
const d = Zk.has(
|
|
17009
|
-
e.content
|
|
17022
|
+
ev(e.content)
|
|
17010
17023
|
), h = !!(t && e.isThinking), b = h && !f && !d, y = Vk(
|
|
17011
17024
|
b ? e.content.replace(Jk, "Thinking") : "",
|
|
17012
17025
|
b
|
|
@@ -17117,7 +17130,7 @@ const Bc = "eloq:p-4 eloq:flex eloq:flex-row eloq:items-center eloq:justify-betw
|
|
|
17117
17130
|
"eloq:rounded-2xl eloq:border": !t
|
|
17118
17131
|
}
|
|
17119
17132
|
);
|
|
17120
|
-
function
|
|
17133
|
+
function tv({
|
|
17121
17134
|
className: e,
|
|
17122
17135
|
message: t,
|
|
17123
17136
|
nextMessage: n,
|
|
@@ -17207,7 +17220,7 @@ function ev({
|
|
|
17207
17220
|
o
|
|
17208
17221
|
);
|
|
17209
17222
|
}
|
|
17210
|
-
function
|
|
17223
|
+
function nv({
|
|
17211
17224
|
value: e,
|
|
17212
17225
|
onChange: t,
|
|
17213
17226
|
disabled: n = !1
|
|
@@ -17245,16 +17258,16 @@ function tv({
|
|
|
17245
17258
|
}
|
|
17246
17259
|
);
|
|
17247
17260
|
}
|
|
17248
|
-
function
|
|
17261
|
+
function rv({ onRate: e }) {
|
|
17249
17262
|
const [t, n] = Ee(0), [r, o] = Ee(!1);
|
|
17250
17263
|
return /* @__PURE__ */ v("div", { className: "eloq:flex eloq:justify-center eloq:pt-2 eloq:pb-2", children: /* @__PURE__ */ ne("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: [
|
|
17251
17264
|
/* @__PURE__ */ v("p", { className: "eloq:text-sm eloq:font-medium eloq:text-foreground", children: r ? "Thanks for your feedback!" : "How was your experience" }),
|
|
17252
|
-
/* @__PURE__ */ v(
|
|
17265
|
+
/* @__PURE__ */ v(nv, { value: t, onChange: (l) => {
|
|
17253
17266
|
n(l), o(!0), e(l);
|
|
17254
17267
|
} })
|
|
17255
17268
|
] }) });
|
|
17256
17269
|
}
|
|
17257
|
-
const
|
|
17270
|
+
const ov = Br(null), iv = {
|
|
17258
17271
|
isVisible: !1,
|
|
17259
17272
|
content: null,
|
|
17260
17273
|
showCognition: () => {
|
|
@@ -17262,11 +17275,11 @@ const rv = Br(null), ov = {
|
|
|
17262
17275
|
hideCognition: () => {
|
|
17263
17276
|
}
|
|
17264
17277
|
};
|
|
17265
|
-
function iv() {
|
|
17266
|
-
return Ur(rv) ?? ov;
|
|
17267
|
-
}
|
|
17268
17278
|
function lv() {
|
|
17269
|
-
|
|
17279
|
+
return Ur(ov) ?? iv;
|
|
17280
|
+
}
|
|
17281
|
+
function av() {
|
|
17282
|
+
const e = on(), t = lv(), n = _t(null), r = _t(!0), o = _t(0), [i, l] = Ee(!1), [a, s] = Ee(!1), u = (d) => d.scrollHeight - d.scrollTop <= d.clientHeight + 60, f = (d) => {
|
|
17270
17283
|
const h = d.target;
|
|
17271
17284
|
u(h) ? (l(!1), s(!1)) : (l(!0), s(!0));
|
|
17272
17285
|
}, c = xf((d = "smooth") => {
|
|
@@ -17321,7 +17334,7 @@ function lv() {
|
|
|
17321
17334
|
const y = Array.isArray(d) ? d.map((E) => E.id).join("-") : d.id;
|
|
17322
17335
|
if (!Array.isArray(d) && d.isRatingRequest)
|
|
17323
17336
|
return /* @__PURE__ */ v(
|
|
17324
|
-
|
|
17337
|
+
rv,
|
|
17325
17338
|
{
|
|
17326
17339
|
onRate: (E) => e.onRateChat?.(E)
|
|
17327
17340
|
},
|
|
@@ -17329,7 +17342,7 @@ function lv() {
|
|
|
17329
17342
|
);
|
|
17330
17343
|
const k = e.suggestedMessages && !!e.suggestedMessageTexts?.length && !e.messages?.some((E) => E.sender === "user");
|
|
17331
17344
|
return /* @__PURE__ */ v(
|
|
17332
|
-
|
|
17345
|
+
tv,
|
|
17333
17346
|
{
|
|
17334
17347
|
message: d,
|
|
17335
17348
|
nextMessage: b[h + 1],
|
|
@@ -17361,10 +17374,10 @@ function Ra(e, t) {
|
|
|
17361
17374
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
17362
17375
|
return r;
|
|
17363
17376
|
}
|
|
17364
|
-
function
|
|
17377
|
+
function sv(e) {
|
|
17365
17378
|
if (Array.isArray(e)) return e;
|
|
17366
17379
|
}
|
|
17367
|
-
function
|
|
17380
|
+
function uv(e, t) {
|
|
17368
17381
|
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
17369
17382
|
if (n != null) {
|
|
17370
17383
|
var r, o, i, l, a = [], s = !0, u = !1;
|
|
@@ -17382,21 +17395,21 @@ function sv(e, t) {
|
|
|
17382
17395
|
return a;
|
|
17383
17396
|
}
|
|
17384
17397
|
}
|
|
17385
|
-
function
|
|
17398
|
+
function cv() {
|
|
17386
17399
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
17387
17400
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
17388
17401
|
}
|
|
17389
|
-
function cv(e, t) {
|
|
17390
|
-
return av(e) || sv(e, t) || fv(e, t) || uv();
|
|
17391
|
-
}
|
|
17392
17402
|
function fv(e, t) {
|
|
17403
|
+
return sv(e) || uv(e, t) || dv(e, t) || cv();
|
|
17404
|
+
}
|
|
17405
|
+
function dv(e, t) {
|
|
17393
17406
|
if (e) {
|
|
17394
17407
|
if (typeof e == "string") return Ra(e, t);
|
|
17395
17408
|
var n = {}.toString.call(e).slice(8, -1);
|
|
17396
17409
|
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) ? Ra(e, t) : void 0;
|
|
17397
17410
|
}
|
|
17398
17411
|
}
|
|
17399
|
-
const Vc = Object.entries, Pa = Object.setPrototypeOf,
|
|
17412
|
+
const Vc = Object.entries, Pa = Object.setPrototypeOf, pv = Object.isFrozen, hv = Object.getPrototypeOf, mv = Object.getOwnPropertyDescriptor;
|
|
17400
17413
|
let Se = Object.freeze, Ae = Object.seal, vn = Object.create, $c = typeof Reflect < "u" && Reflect, ci = $c.apply, fi = $c.construct;
|
|
17401
17414
|
Se || (Se = function(t) {
|
|
17402
17415
|
return t;
|
|
@@ -17414,7 +17427,7 @@ fi || (fi = function(t) {
|
|
|
17414
17427
|
r[o - 1] = arguments[o];
|
|
17415
17428
|
return new t(...r);
|
|
17416
17429
|
});
|
|
17417
|
-
const Qt = ke(Array.prototype.forEach),
|
|
17430
|
+
const Qt = ke(Array.prototype.forEach), gv = ke(Array.prototype.lastIndexOf), Da = ke(Array.prototype.pop), Fn = ke(Array.prototype.push), bv = ke(Array.prototype.splice), Cn = Array.isArray, Hn = ke(String.prototype.toLowerCase), Ro = ke(String.prototype.toString), La = ke(String.prototype.match), Bn = ke(String.prototype.replace), Na = ke(String.prototype.indexOf), yv = ke(String.prototype.trim), wv = ke(Number.prototype.toString), xv = ke(Boolean.prototype.toString), Oa = typeof BigInt > "u" ? null : ke(BigInt.prototype.toString), Ma = typeof Symbol > "u" ? null : ke(Symbol.prototype.toString), $e = ke(Object.prototype.hasOwnProperty), Un = ke(Object.prototype.toString), De = ke(RegExp.prototype.test), Xt = kv(TypeError);
|
|
17418
17431
|
function ke(e) {
|
|
17419
17432
|
return function(t) {
|
|
17420
17433
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
@@ -17423,7 +17436,7 @@ function ke(e) {
|
|
|
17423
17436
|
return ci(e, t, r);
|
|
17424
17437
|
};
|
|
17425
17438
|
}
|
|
17426
|
-
function
|
|
17439
|
+
function kv(e) {
|
|
17427
17440
|
return function() {
|
|
17428
17441
|
for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
|
|
17429
17442
|
n[r] = arguments[r];
|
|
@@ -17439,13 +17452,13 @@ function ae(e, t) {
|
|
|
17439
17452
|
let o = t[r];
|
|
17440
17453
|
if (typeof o == "string") {
|
|
17441
17454
|
const i = n(o);
|
|
17442
|
-
i !== o && (
|
|
17455
|
+
i !== o && (pv(t) || (t[r] = i), o = i);
|
|
17443
17456
|
}
|
|
17444
17457
|
e[o] = !0;
|
|
17445
17458
|
}
|
|
17446
17459
|
return e;
|
|
17447
17460
|
}
|
|
17448
|
-
function
|
|
17461
|
+
function vv(e) {
|
|
17449
17462
|
for (let t = 0; t < e.length; t++)
|
|
17450
17463
|
$e(e, t) || (e[t] = null);
|
|
17451
17464
|
return e;
|
|
@@ -17453,20 +17466,20 @@ function kv(e) {
|
|
|
17453
17466
|
function Ze(e) {
|
|
17454
17467
|
const t = vn(null);
|
|
17455
17468
|
for (const r of Vc(e)) {
|
|
17456
|
-
var n =
|
|
17469
|
+
var n = fv(r, 2);
|
|
17457
17470
|
const o = n[0], i = n[1];
|
|
17458
|
-
$e(e, o) && (Cn(i) ? t[o] =
|
|
17471
|
+
$e(e, o) && (Cn(i) ? t[o] = vv(i) : i && typeof i == "object" && i.constructor === Object ? t[o] = Ze(i) : t[o] = i);
|
|
17459
17472
|
}
|
|
17460
17473
|
return t;
|
|
17461
17474
|
}
|
|
17462
|
-
function
|
|
17475
|
+
function Sv(e) {
|
|
17463
17476
|
switch (typeof e) {
|
|
17464
17477
|
case "string":
|
|
17465
17478
|
return e;
|
|
17466
17479
|
case "number":
|
|
17467
|
-
return yv(e);
|
|
17468
|
-
case "boolean":
|
|
17469
17480
|
return wv(e);
|
|
17481
|
+
case "boolean":
|
|
17482
|
+
return xv(e);
|
|
17470
17483
|
case "bigint":
|
|
17471
17484
|
return Oa ? Oa(e) : "0";
|
|
17472
17485
|
case "symbol":
|
|
@@ -17490,34 +17503,34 @@ function vv(e) {
|
|
|
17490
17503
|
}
|
|
17491
17504
|
function ft(e, t) {
|
|
17492
17505
|
for (; e !== null; ) {
|
|
17493
|
-
const r =
|
|
17506
|
+
const r = mv(e, t);
|
|
17494
17507
|
if (r) {
|
|
17495
17508
|
if (r.get)
|
|
17496
17509
|
return ke(r.get);
|
|
17497
17510
|
if (typeof r.value == "function")
|
|
17498
17511
|
return ke(r.value);
|
|
17499
17512
|
}
|
|
17500
|
-
e =
|
|
17513
|
+
e = hv(e);
|
|
17501
17514
|
}
|
|
17502
17515
|
function n() {
|
|
17503
17516
|
return null;
|
|
17504
17517
|
}
|
|
17505
17518
|
return n;
|
|
17506
17519
|
}
|
|
17507
|
-
function
|
|
17520
|
+
function Cv(e) {
|
|
17508
17521
|
try {
|
|
17509
17522
|
return De(e, ""), !0;
|
|
17510
17523
|
} catch {
|
|
17511
17524
|
return !1;
|
|
17512
17525
|
}
|
|
17513
17526
|
}
|
|
17514
|
-
const za = Se(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Po = Se(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Do = Se(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]),
|
|
17527
|
+
const za = Se(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Po = Se(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Do = Se(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Ev = Se(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Lo = Se(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Av = Se(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Fa = Se(["#text"]), Ba = Se(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), No = Se(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dominant-baseline", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "pointer-events", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-orientation", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "vector-effect", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Ua = Se(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), _r = Se(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Tv = Ae(/{{[\w\W]*|^[\w\W]*}}/g), qv = Ae(/<%[\w\W]*|^[\w\W]*%>/g), _v = Ae(/\${[\w\W]*/g), Iv = Ae(/^data-[\-\w.\u00B7-\uFFFF]+$/), Rv = Ae(/^aria-[\-\w]+$/), Ha = Ae(
|
|
17515
17528
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
17516
17529
|
// eslint-disable-line no-useless-escape
|
|
17517
|
-
),
|
|
17530
|
+
), Pv = Ae(/^(?:\w+script|data):/i), Dv = Ae(
|
|
17518
17531
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
17519
17532
|
// eslint-disable-line no-control-regex
|
|
17520
|
-
),
|
|
17533
|
+
), Lv = Ae(/^html$/i), Nv = Ae(/^[a-z][.\w]*(-[.\w]+)+$/i), ja = Ae(/<[/\w!]/g), Va = Ae(/<[/\w]/g), Ov = Ae(/<\/no(script|embed|frames)/i), Mv = Ae(/\/>/i), Ke = {
|
|
17521
17534
|
element: 1,
|
|
17522
17535
|
attribute: 2,
|
|
17523
17536
|
text: 3,
|
|
@@ -17533,14 +17546,14 @@ const za = Se(["a", "abbr", "acronym", "address", "area", "article", "aside", "a
|
|
|
17533
17546
|
documentFragment: 11,
|
|
17534
17547
|
notation: 12
|
|
17535
17548
|
// Deprecated
|
|
17536
|
-
}, Wc = ["style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript"],
|
|
17549
|
+
}, Wc = ["style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript"], zv = Se(ae({}, Wc)), Fv = (function() {
|
|
17537
17550
|
const e = {};
|
|
17538
17551
|
return Qt(Wc, (t) => {
|
|
17539
17552
|
e[t] = Ae(new RegExp("</" + t + "(?=[\\t\\n\\f\\r />])", "i"));
|
|
17540
17553
|
}), Se(e);
|
|
17541
|
-
})(),
|
|
17554
|
+
})(), Bv = function() {
|
|
17542
17555
|
return typeof window > "u" ? null : window;
|
|
17543
|
-
},
|
|
17556
|
+
}, Uv = function(t, n) {
|
|
17544
17557
|
if (typeof t != "object" || typeof t.createPolicy != "function")
|
|
17545
17558
|
return null;
|
|
17546
17559
|
let r = null;
|
|
@@ -17578,7 +17591,7 @@ const za = Se(["a", "abbr", "acronym", "address", "area", "article", "aside", "a
|
|
|
17578
17591
|
return o && typeof o == "object" ? Ze(o) : r();
|
|
17579
17592
|
};
|
|
17580
17593
|
function Gc() {
|
|
17581
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
17594
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Bv();
|
|
17582
17595
|
const t = (L) => Gc(L);
|
|
17583
17596
|
if (t.version = "3.4.14", t.removed = [], !e || !e.document || e.document.nodeType !== Ke.document || !e.Element)
|
|
17584
17597
|
return t.isSupported = !1, t;
|
|
@@ -17615,11 +17628,11 @@ function Gc() {
|
|
|
17615
17628
|
K--;
|
|
17616
17629
|
}
|
|
17617
17630
|
}, ce = function() {
|
|
17618
|
-
return R || (M =
|
|
17631
|
+
return R || (M = Uv(c, o), R = !0), M;
|
|
17619
17632
|
}, we = n, qe = we.implementation, g = we.createNodeIterator, _e = we.createDocumentFragment, Ue = we.getElementsByTagName, x = r.importNode;
|
|
17620
17633
|
let J = $a();
|
|
17621
17634
|
t.isSupported = typeof Vc == "function" && typeof k == "function" && qe && qe.createHTMLDocument !== void 0;
|
|
17622
|
-
const ge =
|
|
17635
|
+
const ge = Tv, ie = qv, et = _v, Xe = Iv, fe = Rv, ut = Pv, tt = Dv, Lt = Nv;
|
|
17623
17636
|
let Nt = Ha, ue = null;
|
|
17624
17637
|
const an = ae({}, [...za, ...Po, ...Do, ...Lo, ...Fa]);
|
|
17625
17638
|
let de = null;
|
|
@@ -17736,7 +17749,7 @@ function Gc() {
|
|
|
17736
17749
|
transform: ye
|
|
17737
17750
|
}), _n = Bt(m, "FORBID_ATTR", Ze({}), {
|
|
17738
17751
|
transform: ye
|
|
17739
|
-
}), un = $e(m, "USE_PROFILES") ? m.USE_PROFILES && typeof m.USE_PROFILES == "object" ? Ze(m.USE_PROFILES) : m.USE_PROFILES : !1, or = m.ALLOW_ARIA_ATTR !== !1, In = m.ALLOW_DATA_ATTR !== !1, ir = m.ALLOW_UNKNOWN_PROTOCOLS || !1, lr = m.ALLOW_SELF_CLOSE_IN_ATTR !== !1, q = m.SAFE_FOR_TEMPLATES || !1, O = m.SAFE_FOR_XML !== !1, G = m.WHOLE_DOCUMENT || !1, Re = m.RETURN_DOM || !1, gt = m.RETURN_DOM_FRAGMENT || !1, bt = m.RETURN_TRUSTED_TYPE || !1, ct = m.FORCE_BODY || !1, Pe = m.SANITIZE_DOM !== !1, At = m.SANITIZE_NAMED_PROPS || !1, Xr = m.KEEP_CONTENT !== !1, Kr = m.IN_PLACE || !1, Nt =
|
|
17752
|
+
}), un = $e(m, "USE_PROFILES") ? m.USE_PROFILES && typeof m.USE_PROFILES == "object" ? Ze(m.USE_PROFILES) : m.USE_PROFILES : !1, or = m.ALLOW_ARIA_ATTR !== !1, In = m.ALLOW_DATA_ATTR !== !1, ir = m.ALLOW_UNKNOWN_PROTOCOLS || !1, lr = m.ALLOW_SELF_CLOSE_IN_ATTR !== !1, q = m.SAFE_FOR_TEMPLATES || !1, O = m.SAFE_FOR_XML !== !1, G = m.WHOLE_DOCUMENT || !1, Re = m.RETURN_DOM || !1, gt = m.RETURN_DOM_FRAGMENT || !1, bt = m.RETURN_TRUSTED_TYPE || !1, ct = m.FORCE_BODY || !1, Pe = m.SANITIZE_DOM !== !1, At = m.SANITIZE_NAMED_PROPS || !1, Xr = m.KEEP_CONTENT !== !1, Kr = m.IN_PLACE || !1, Nt = Cv(m.ALLOWED_URI_REGEXP) ? m.ALLOWED_URI_REGEXP : Ha, fn = typeof m.NAMESPACE == "string" ? m.NAMESPACE : yt, Jr = Oo(
|
|
17740
17753
|
m,
|
|
17741
17754
|
"MATHML_TEXT_INTEGRATION_POINTS",
|
|
17742
17755
|
() => ae({}, rl)
|
|
@@ -17762,7 +17775,7 @@ function Gc() {
|
|
|
17762
17775
|
}
|
|
17763
17776
|
} else m.TRUSTED_TYPES_POLICY === null ? (F = void 0, C = "") : (F === void 0 && (F = ce()), F && typeof C == "string" && (C = z("")));
|
|
17764
17777
|
Se && Se(m), dn = m;
|
|
17765
|
-
}, ll = ae({}, [...Po, ...Do, ...
|
|
17778
|
+
}, ll = ae({}, [...Po, ...Do, ...Ev]), al = ae({}, [...Lo, ...Av]), uf = function(m, S, _) {
|
|
17766
17779
|
return S.namespaceURI === yt ? m === "svg" : S.namespaceURI === ar ? m === "svg" && (_ === "annotation-xml" || Jr[_]) : !!ll[m];
|
|
17767
17780
|
}, cf = function(m, S, _) {
|
|
17768
17781
|
return S.namespaceURI === yt ? m === "math" : S.namespaceURI === sr ? m === "math" && eo[_] : !!al[m];
|
|
@@ -17990,7 +18003,7 @@ function Gc() {
|
|
|
17990
18003
|
});
|
|
17991
18004
|
}
|
|
17992
18005
|
const mf = function(m, S) {
|
|
17993
|
-
return !!(O && m.hasChildNodes() && !Pn(m.firstElementChild) && De(ja, m.textContent) && De(ja, m.innerHTML) || O && m.namespaceURI === yt &&
|
|
18006
|
+
return !!(O && m.hasChildNodes() && !Pn(m.firstElementChild) && De(ja, m.textContent) && De(ja, m.innerHTML) || O && m.namespaceURI === yt && zv[S] && (Pn(m.firstElementChild) || typeof m.textContent == "string" && De(Fv[S], m.textContent)) || m.nodeType === Ke.processingInstruction || O && m.nodeType === Ke.comment && De(Va, m.data));
|
|
17994
18007
|
}, pr = function(m, S) {
|
|
17995
18008
|
if (m instanceof RegExp)
|
|
17996
18009
|
return De(m, S);
|
|
@@ -18035,7 +18048,7 @@ function Gc() {
|
|
|
18035
18048
|
const $ = gf(m, _, S);
|
|
18036
18049
|
return $ === !1 && wt(J.afterSanitizeElements, m, null), $;
|
|
18037
18050
|
}
|
|
18038
|
-
if (U(m) === Ke.element && !df(m) || (_ === "noscript" || _ === "noembed" || _ === "noframes") && De(
|
|
18051
|
+
if (U(m) === Ke.element && !df(m) || (_ === "noscript" || _ === "noembed" || _ === "noframes") && De(Ov, m.innerHTML))
|
|
18039
18052
|
return Mt(m), !0;
|
|
18040
18053
|
if (q && m.nodeType === Ke.text) {
|
|
18041
18054
|
const $ = fr(m.textContent);
|
|
@@ -18091,7 +18104,7 @@ function Gc() {
|
|
|
18091
18104
|
const $ = ye(m.nodeName);
|
|
18092
18105
|
for (; B--; ) {
|
|
18093
18106
|
const Y = S[B], me = Y.name, be = Y.namespaceURI, He = Y.value, je = ye(me), oo = He;
|
|
18094
|
-
let Oe = me === "value" ? oo :
|
|
18107
|
+
let Oe = me === "value" ? oo : yv(oo);
|
|
18095
18108
|
if (_.attrName = je, _.attrValue = Oe, _.keepAttr = !0, _.forceKeepAttr = void 0, wt(J.uponSanitizeAttribute, m, _), Oe = _.attrValue, At && (je === "id" || je === "name") && Na(Oe, rt) !== 0 && ($t(me, m, Y), Oe = rt + Oe), O && De(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, Oe)) {
|
|
18096
18109
|
$t(me, m, Y);
|
|
18097
18110
|
continue;
|
|
@@ -18105,7 +18118,7 @@ function Gc() {
|
|
|
18105
18118
|
$t(me, m, Y);
|
|
18106
18119
|
continue;
|
|
18107
18120
|
}
|
|
18108
|
-
if (!lr && De(
|
|
18121
|
+
if (!lr && De(Mv, Oe)) {
|
|
18109
18122
|
$t(me, m, Y);
|
|
18110
18123
|
continue;
|
|
18111
18124
|
}
|
|
@@ -18168,7 +18181,7 @@ function Gc() {
|
|
|
18168
18181
|
};
|
|
18169
18182
|
return t.sanitize = function(L) {
|
|
18170
18183
|
let m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, S = null, _ = null, B = null, $ = null;
|
|
18171
|
-
if (Qr = !L, Qr && (L = "<!-->"), typeof L != "string" && !Pn(L) && (L =
|
|
18184
|
+
if (Qr = !L, Qr && (L = "<!-->"), typeof L != "string" && !Pn(L) && (L = Sv(L), typeof L != "string"))
|
|
18172
18185
|
throw Xt("dirty is not a string, aborting");
|
|
18173
18186
|
if (!t.isSupported)
|
|
18174
18187
|
return L;
|
|
@@ -18222,7 +18235,7 @@ function Gc() {
|
|
|
18222
18235
|
return (de.shadowroot || de.shadowrootmode) && ($ = x.call(r, $, !0)), $;
|
|
18223
18236
|
}
|
|
18224
18237
|
let be = G ? S.outerHTML : S.innerHTML;
|
|
18225
|
-
return G && ue["!doctype"] && S.ownerDocument && S.ownerDocument.doctype && S.ownerDocument.doctype.name && De(
|
|
18238
|
+
return G && ue["!doctype"] && S.ownerDocument && S.ownerDocument.doctype && S.ownerDocument.doctype.name && De(Lv, S.ownerDocument.doctype.name) && (be = "<!DOCTYPE " + S.ownerDocument.doctype.name + `>
|
|
18226
18239
|
` + be), q && (be = fr(be)), F && bt ? z(be) : be;
|
|
18227
18240
|
}, t.setConfig = function() {
|
|
18228
18241
|
let L = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
@@ -18238,8 +18251,8 @@ function Gc() {
|
|
|
18238
18251
|
}, t.removeHook = function(L, m) {
|
|
18239
18252
|
if ($e(J, L)) {
|
|
18240
18253
|
if (m !== void 0) {
|
|
18241
|
-
const S =
|
|
18242
|
-
return S === -1 ? void 0 :
|
|
18254
|
+
const S = gv(J[L], m);
|
|
18255
|
+
return S === -1 ? void 0 : bv(J[L], S, 1)[0];
|
|
18243
18256
|
}
|
|
18244
18257
|
return Da(J[L]);
|
|
18245
18258
|
}
|
|
@@ -18264,9 +18277,9 @@ const Yc = Te(
|
|
|
18264
18277
|
)
|
|
18265
18278
|
);
|
|
18266
18279
|
Yc.displayName = "Textarea";
|
|
18267
|
-
const
|
|
18268
|
-
function
|
|
18269
|
-
const t =
|
|
18280
|
+
const Hv = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
18281
|
+
function jv(e) {
|
|
18282
|
+
const t = Hv.exec(e.trim());
|
|
18270
18283
|
if (!t) return null;
|
|
18271
18284
|
let n = t[1];
|
|
18272
18285
|
return n.length === 3 && (n = n.split("").map((r) => r + r).join("")), [
|
|
@@ -18275,7 +18288,7 @@ function Hv(e) {
|
|
|
18275
18288
|
Number.parseInt(n.slice(4, 6), 16)
|
|
18276
18289
|
];
|
|
18277
18290
|
}
|
|
18278
|
-
function
|
|
18291
|
+
function Vv([e, t, n]) {
|
|
18279
18292
|
const r = e / 255, o = t / 255, i = n / 255, l = Math.max(r, o, i), a = Math.min(r, o, i), s = l - a, u = (l + a) / 2;
|
|
18280
18293
|
if (s === 0)
|
|
18281
18294
|
return { hue: 0, saturation: 0, lightness: u };
|
|
@@ -18291,11 +18304,11 @@ function Wa({ hue: e, saturation: t, lightness: n }) {
|
|
|
18291
18304
|
n * 100
|
|
18292
18305
|
)}%)`;
|
|
18293
18306
|
}
|
|
18294
|
-
function
|
|
18295
|
-
const t = e ?
|
|
18307
|
+
function $v(e) {
|
|
18308
|
+
const t = e ? jv(e) : null;
|
|
18296
18309
|
if (!t)
|
|
18297
18310
|
return { strong: "hsl(0 0% 62%)", soft: "hsl(0 0% 82%)" };
|
|
18298
|
-
const { hue: n, saturation: r, lightness: o } =
|
|
18311
|
+
const { hue: n, saturation: r, lightness: o } = Vv(t), i = {
|
|
18299
18312
|
hue: n,
|
|
18300
18313
|
saturation: Ir(Math.max(r * 1.35, r + 0.25)),
|
|
18301
18314
|
lightness: Math.min(Ir(o + 0.45), 0.95)
|
|
@@ -18306,7 +18319,7 @@ function Vv(e) {
|
|
|
18306
18319
|
};
|
|
18307
18320
|
return { strong: Wa(i), soft: Wa(l) };
|
|
18308
18321
|
}
|
|
18309
|
-
function
|
|
18322
|
+
function Wv() {
|
|
18310
18323
|
const e = _t(!1), t = _t(0), n = _t(0);
|
|
18311
18324
|
return {
|
|
18312
18325
|
onMouseDown: (a) => {
|
|
@@ -18328,18 +18341,18 @@ function $v() {
|
|
|
18328
18341
|
}
|
|
18329
18342
|
};
|
|
18330
18343
|
}
|
|
18331
|
-
const
|
|
18332
|
-
function
|
|
18344
|
+
const Gv = 1100, Ga = 4e3, Yv = 9e3;
|
|
18345
|
+
function Xv(e) {
|
|
18333
18346
|
const [t, n] = Ee(!1);
|
|
18334
18347
|
return Ht(() => {
|
|
18335
18348
|
if (!e) return;
|
|
18336
18349
|
let r, o = !1;
|
|
18337
18350
|
const i = () => {
|
|
18338
|
-
const l = Ga + Math.random() * (
|
|
18351
|
+
const l = Ga + Math.random() * (Yv - Ga);
|
|
18339
18352
|
r = setTimeout(() => {
|
|
18340
18353
|
o || (n(!0), r = setTimeout(() => {
|
|
18341
18354
|
o || (n(!1), i());
|
|
18342
|
-
},
|
|
18355
|
+
}, Gv));
|
|
18343
18356
|
}, l);
|
|
18344
18357
|
};
|
|
18345
18358
|
return i(), () => {
|
|
@@ -18347,7 +18360,7 @@ function Yv(e) {
|
|
|
18347
18360
|
};
|
|
18348
18361
|
}, [e]), t;
|
|
18349
18362
|
}
|
|
18350
|
-
function
|
|
18363
|
+
function Kv() {
|
|
18351
18364
|
const [e, t] = Ee(!1), n = _t(null);
|
|
18352
18365
|
return { scrollContainerRef: (o) => {
|
|
18353
18366
|
if (n.current?.disconnect(), n.current = null, !o) return;
|
|
@@ -18362,12 +18375,12 @@ function Xv() {
|
|
|
18362
18375
|
}
|
|
18363
18376
|
}, hasOverflow: e };
|
|
18364
18377
|
}
|
|
18365
|
-
function
|
|
18366
|
-
const t = on(), n = xi(), r =
|
|
18378
|
+
function Qv({ onSelect: e }) {
|
|
18379
|
+
const t = on(), n = xi(), r = Wv(), { scrollContainerRef: o, hasOverflow: i } = Kv(), l = !!t.messages?.some(
|
|
18367
18380
|
(b) => b.sender === "user"
|
|
18368
|
-
), a = t.suggestedMessageTexts ?? [], s = !!t.suggestedMessages && a.length > 0 && !l, u = !!t.hasSuggestedMessageAura && s, f = !!t.hasSuggestedMessageShine && s, c =
|
|
18381
|
+
), a = t.suggestedMessageTexts ?? [], s = !!t.suggestedMessages && a.length > 0 && !l, u = !!t.hasSuggestedMessageAura && s, f = !!t.hasSuggestedMessageShine && s, c = Xv(f);
|
|
18369
18382
|
if (!s) return null;
|
|
18370
|
-
const p = u ?
|
|
18383
|
+
const p = u ? $v(n.suggestedMessageBubbleColor || n.userBubbleColor) : null, d = n.suggestedMessageBubbleColor ? {
|
|
18371
18384
|
backgroundColor: n.suggestedMessageBubbleColor,
|
|
18372
18385
|
color: n.suggestedMessageBubbleTextColor || Qi(n.suggestedMessageBubbleColor)
|
|
18373
18386
|
} : void 0, h = (b, y = {
|
|
@@ -18454,9 +18467,11 @@ const Ya = {
|
|
|
18454
18467
|
0: "Unable to connect to the service. Please check your network connection.",
|
|
18455
18468
|
5031: "The service is currently undergoing maintenance. Please try again later.",
|
|
18456
18469
|
5032: "I am sorry this service is currently unavailable, please try again later.",
|
|
18470
|
+
5033: "Sorry we are unable to help right now, please try again later.",
|
|
18471
|
+
5034: "Sorry we are unable to help right now, please try again later.",
|
|
18457
18472
|
5001: "We are currently facing technical difficulties. Please try again later.",
|
|
18458
18473
|
DEFAULT: "Something went wrong. Please try again later."
|
|
18459
|
-
},
|
|
18474
|
+
}, Zv = (e) => Ya[e] || Ya.DEFAULT, Jv = Br({
|
|
18460
18475
|
error: null,
|
|
18461
18476
|
hideSdk: !1,
|
|
18462
18477
|
publishApiError: () => {
|
|
@@ -18467,14 +18482,14 @@ const Ya = {
|
|
|
18467
18482
|
},
|
|
18468
18483
|
clearError: () => {
|
|
18469
18484
|
}
|
|
18470
|
-
}),
|
|
18471
|
-
const e = Ur(
|
|
18485
|
+
}), eS = () => {
|
|
18486
|
+
const e = Ur(Jv);
|
|
18472
18487
|
if (e === void 0)
|
|
18473
18488
|
throw new Error("useError must be used within an ErrorProvider");
|
|
18474
18489
|
return e;
|
|
18475
|
-
},
|
|
18476
|
-
const n =
|
|
18477
|
-
e({ code:
|
|
18490
|
+
}, ES = (e) => (t) => {
|
|
18491
|
+
const n = t.response?.errors?.[0], r = Number(n?.error_code), o = Zv(r);
|
|
18492
|
+
e({ code: r, message: o });
|
|
18478
18493
|
}, Xa = {
|
|
18479
18494
|
warning: {
|
|
18480
18495
|
bgColor: "eloq:bg-amber-50 eloq:dark:bg-amber-400/10",
|
|
@@ -18504,7 +18519,7 @@ const Ya = {
|
|
|
18504
18519
|
iconColor: "eloq:text-green-500 eloq:dark:text-green-400",
|
|
18505
18520
|
icon: qd
|
|
18506
18521
|
}
|
|
18507
|
-
},
|
|
18522
|
+
}, tS = ({ message: e, type: t }) => {
|
|
18508
18523
|
const n = Xa[t] || Xa.warning, r = n.icon;
|
|
18509
18524
|
return /* @__PURE__ */ ne(
|
|
18510
18525
|
"div",
|
|
@@ -18520,15 +18535,15 @@ const Ya = {
|
|
|
18520
18535
|
Fr.isSupported && Fr.addHook("afterSanitizeAttributes", (e) => {
|
|
18521
18536
|
e.tagName === "A" && (e.setAttribute("rel", "noopener noreferrer"), e.hasAttribute("target") && e.setAttribute("target", "_blank"));
|
|
18522
18537
|
});
|
|
18523
|
-
const
|
|
18524
|
-
function
|
|
18538
|
+
const nS = "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", rS = "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", oS = "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", iS = "eloq:bg-cream", lS = "eloq:bg-muted-foreground eloq:dark:bg-muted eloq:dark:text-muted-foreground/50";
|
|
18539
|
+
function aS() {
|
|
18525
18540
|
const [e, t] = Ee(!1);
|
|
18526
18541
|
return Ht(() => {
|
|
18527
18542
|
t(!0);
|
|
18528
18543
|
}, []), e && Fr.isSupported;
|
|
18529
18544
|
}
|
|
18530
|
-
function
|
|
18531
|
-
const { error: e } =
|
|
18545
|
+
function sS() {
|
|
18546
|
+
const { error: e } = eS(), t = !!e, n = on(), r = _t(null), [o, i] = Ee(""), l = xi(), a = !!n.messages?.some((b) => b.isRatingRequest), s = n.keyboardInset ?? 0, u = aS(), f = l.userBubbleTextColor || Qi(l.userBubbleColor), c = () => o.trim() && !t && !a ? {
|
|
18532
18547
|
backgroundColor: l.userBubbleColor,
|
|
18533
18548
|
color: f
|
|
18534
18549
|
} : {}, p = (b) => {
|
|
@@ -18557,7 +18572,7 @@ function aS() {
|
|
|
18557
18572
|
n.isChatClosed ? /* @__PURE__ */ v("div", { className: "eloq:w-full eloq:z-20 eloq:animate-slide-up-in", children: /* @__PURE__ */ ne(
|
|
18558
18573
|
"div",
|
|
18559
18574
|
{
|
|
18560
|
-
className:
|
|
18575
|
+
className: rS,
|
|
18561
18576
|
role: "status",
|
|
18562
18577
|
"aria-live": "polite",
|
|
18563
18578
|
children: [
|
|
@@ -18567,7 +18582,7 @@ function aS() {
|
|
|
18567
18582
|
{
|
|
18568
18583
|
type: "button",
|
|
18569
18584
|
onClick: () => n.onStartNewChat?.(),
|
|
18570
|
-
className:
|
|
18585
|
+
className: oS,
|
|
18571
18586
|
style: {
|
|
18572
18587
|
backgroundColor: l.userBubbleColor,
|
|
18573
18588
|
color: f
|
|
@@ -18581,21 +18596,21 @@ function aS() {
|
|
|
18581
18596
|
]
|
|
18582
18597
|
}
|
|
18583
18598
|
) }) : /* @__PURE__ */ ne(tn, { children: [
|
|
18584
|
-
/* @__PURE__ */ v(
|
|
18599
|
+
/* @__PURE__ */ v(Qv, { onSelect: p }),
|
|
18585
18600
|
/* @__PURE__ */ ne(
|
|
18586
18601
|
"div",
|
|
18587
18602
|
{
|
|
18588
18603
|
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",
|
|
18589
18604
|
style: s ? { transform: `translateY(-${s}px)` } : void 0,
|
|
18590
18605
|
children: [
|
|
18591
|
-
t && /* @__PURE__ */ v(
|
|
18606
|
+
t && /* @__PURE__ */ v(tS, { message: e.message, type: "error" }),
|
|
18592
18607
|
/* @__PURE__ */ ne(
|
|
18593
18608
|
"form",
|
|
18594
18609
|
{
|
|
18595
18610
|
className: "eloq:relative eloq:flex eloq:items-center eloq:w-full eloq:m-0",
|
|
18596
18611
|
onSubmit: d,
|
|
18597
18612
|
children: [
|
|
18598
|
-
/* @__PURE__ */ v("div", { className: Z("eloq:flex-1",
|
|
18613
|
+
/* @__PURE__ */ v("div", { className: Z("eloq:flex-1", nS), children: /* @__PURE__ */ v(
|
|
18599
18614
|
Yc,
|
|
18600
18615
|
{
|
|
18601
18616
|
ref: r,
|
|
@@ -18630,7 +18645,7 @@ function aS() {
|
|
|
18630
18645
|
disabled: !o.trim() || t || a,
|
|
18631
18646
|
className: Z(
|
|
18632
18647
|
"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",
|
|
18633
|
-
o.trim() && !t ? "eloq:text-primary-foreground" :
|
|
18648
|
+
o.trim() && !t ? "eloq:text-primary-foreground" : lS
|
|
18634
18649
|
),
|
|
18635
18650
|
style: c(),
|
|
18636
18651
|
children: /* @__PURE__ */ v(vd, { className: "eloq:h-4 eloq:w-4" })
|
|
@@ -18648,7 +18663,7 @@ function aS() {
|
|
|
18648
18663
|
{
|
|
18649
18664
|
className: Z(
|
|
18650
18665
|
"eloq:w-full eloq:flex eloq:flex-col eloq:items-center eloq:justify-center eloq:space-x-2 eloq:px-0",
|
|
18651
|
-
|
|
18666
|
+
iS
|
|
18652
18667
|
),
|
|
18653
18668
|
children: [
|
|
18654
18669
|
/* @__PURE__ */ ne("div", { className: "eloq:w-full eloq:flex eloq:items-center eloq:justify-center eloq:space-x-2 eloq:py-1", children: [
|
|
@@ -18679,16 +18694,16 @@ function aS() {
|
|
|
18679
18694
|
)
|
|
18680
18695
|
] });
|
|
18681
18696
|
}
|
|
18682
|
-
var
|
|
18697
|
+
var uS = Object.defineProperty, Rt = (e, t) => uS(e, "name", { value: t, configurable: !0 }), Xc = "Avatar", [cS, AS] = /* @__PURE__ */ Hr(Xc), fS = [
|
|
18683
18698
|
0,
|
|
18684
18699
|
() => {
|
|
18685
18700
|
}
|
|
18686
|
-
], [
|
|
18701
|
+
], [dS, Kc] = cS(Xc), Qc = /* @__PURE__ */ w.forwardRef(
|
|
18687
18702
|
// blank line to reduce diff noise
|
|
18688
18703
|
/* @__PURE__ */ Rt(function(t, n) {
|
|
18689
18704
|
const { __scopeAvatar: r, ...o } = t, [i, l] = w.useState("idle"), [a, s] = tf();
|
|
18690
18705
|
return /* @__PURE__ */ v(
|
|
18691
|
-
|
|
18706
|
+
dS,
|
|
18692
18707
|
{
|
|
18693
18708
|
scope: r,
|
|
18694
18709
|
imageLoadingStatus: i,
|
|
@@ -18699,9 +18714,9 @@ var sS = Object.defineProperty, Rt = (e, t) => sS(e, "name", { value: t, configu
|
|
|
18699
18714
|
}
|
|
18700
18715
|
);
|
|
18701
18716
|
}, "Avatar")
|
|
18702
|
-
),
|
|
18717
|
+
), pS = "AvatarImage", Zc = /* @__PURE__ */ w.forwardRef(
|
|
18703
18718
|
/* @__PURE__ */ Rt(function(t, n) {
|
|
18704
|
-
const { __scopeAvatar: r, src: o, onLoadingStatusChange: i, ...l } = t, a = Kc(
|
|
18719
|
+
const { __scopeAvatar: r, src: o, onLoadingStatusChange: i, ...l } = t, a = Kc(pS, r);
|
|
18705
18720
|
a.setImageCount;
|
|
18706
18721
|
const s = ef(o, {
|
|
18707
18722
|
referrerPolicy: l.referrerPolicy,
|
|
@@ -18716,9 +18731,9 @@ var sS = Object.defineProperty, Rt = (e, t) => sS(e, "name", { value: t, configu
|
|
|
18716
18731
|
f.current = s, s !== c && u(s);
|
|
18717
18732
|
}, [s, u]), s === "loaded" ? /* @__PURE__ */ v(Be.img, { ...l, ref: n, src: o }) : null;
|
|
18718
18733
|
}, "AvatarImage")
|
|
18719
|
-
),
|
|
18734
|
+
), hS = "AvatarFallback", Jc = /* @__PURE__ */ w.forwardRef(
|
|
18720
18735
|
/* @__PURE__ */ Rt(function(t, n) {
|
|
18721
|
-
const { __scopeAvatar: r, delayMs: o, ...i } = t, l = Kc(
|
|
18736
|
+
const { __scopeAvatar: r, delayMs: o, ...i } = t, l = Kc(hS, r), [a, s] = w.useState(o === void 0);
|
|
18722
18737
|
return w.useEffect(() => {
|
|
18723
18738
|
if (o !== void 0) {
|
|
18724
18739
|
const u = window.setTimeout(() => s(!0), o);
|
|
@@ -18753,12 +18768,12 @@ function di(e) {
|
|
|
18753
18768
|
}
|
|
18754
18769
|
Rt(di, "getImageLoadingStatus");
|
|
18755
18770
|
function tf() {
|
|
18756
|
-
return
|
|
18771
|
+
return fS;
|
|
18757
18772
|
}
|
|
18758
18773
|
Rt(tf, "useImageCount");
|
|
18759
|
-
function
|
|
18774
|
+
function mS(e) {
|
|
18760
18775
|
}
|
|
18761
|
-
Rt(
|
|
18776
|
+
Rt(mS, "useUpdateImageCount");
|
|
18762
18777
|
const nf = Te(({ className: e, ...t }, n) => /* @__PURE__ */ v(
|
|
18763
18778
|
Qc,
|
|
18764
18779
|
{
|
|
@@ -18771,7 +18786,7 @@ const nf = Te(({ className: e, ...t }, n) => /* @__PURE__ */ v(
|
|
|
18771
18786
|
}
|
|
18772
18787
|
));
|
|
18773
18788
|
nf.displayName = Qc.displayName;
|
|
18774
|
-
const
|
|
18789
|
+
const gS = Te(({ className: e, ...t }, n) => /* @__PURE__ */ v(
|
|
18775
18790
|
Zc,
|
|
18776
18791
|
{
|
|
18777
18792
|
ref: n,
|
|
@@ -18779,8 +18794,8 @@ const mS = Te(({ className: e, ...t }, n) => /* @__PURE__ */ v(
|
|
|
18779
18794
|
...t
|
|
18780
18795
|
}
|
|
18781
18796
|
));
|
|
18782
|
-
|
|
18783
|
-
const
|
|
18797
|
+
gS.displayName = Zc.displayName;
|
|
18798
|
+
const bS = Te(({ className: e, ...t }, n) => /* @__PURE__ */ v(
|
|
18784
18799
|
Jc,
|
|
18785
18800
|
{
|
|
18786
18801
|
ref: n,
|
|
@@ -18791,14 +18806,14 @@ const gS = Te(({ className: e, ...t }, n) => /* @__PURE__ */ v(
|
|
|
18791
18806
|
...t
|
|
18792
18807
|
}
|
|
18793
18808
|
));
|
|
18794
|
-
|
|
18795
|
-
const
|
|
18796
|
-
function
|
|
18809
|
+
bS.displayName = Jc.displayName;
|
|
18810
|
+
const yS = "eloq:shadow-[0_3px_4px_-2px_rgba(0,0,0,0.04)] eloq:dark:shadow-none eloq:dark:border-b eloq:dark:border-border", Ka = "eloq:text-gray-400 eloq:hover:text-gray-600 eloq:dark:hover:text-gray-300 eloq:p-2";
|
|
18811
|
+
function wS({
|
|
18797
18812
|
onCleanChat: e,
|
|
18798
18813
|
onClose: t
|
|
18799
18814
|
}) {
|
|
18800
18815
|
const n = on(), r = n.hasCleanChatButton ?? n.cleanChatButton ?? !0, o = n.hasCloseButton ?? n.closeButton ?? !0;
|
|
18801
|
-
return /* @__PURE__ */ ne(bi, { className: Z(Bc,
|
|
18816
|
+
return /* @__PURE__ */ ne(bi, { className: Z(Bc, yS), children: [
|
|
18802
18817
|
/* @__PURE__ */ ne("div", { className: Uc, children: [
|
|
18803
18818
|
/* @__PURE__ */ v(nf, { className: "eloq:h-10 eloq:w-10", children: /* @__PURE__ */ v(
|
|
18804
18819
|
mi,
|
|
@@ -18819,7 +18834,7 @@ function yS({
|
|
|
18819
18834
|
] })
|
|
18820
18835
|
] });
|
|
18821
18836
|
}
|
|
18822
|
-
function
|
|
18837
|
+
function TS(e) {
|
|
18823
18838
|
const {
|
|
18824
18839
|
isOpen: t = !1,
|
|
18825
18840
|
isMobile: n,
|
|
@@ -18844,14 +18859,14 @@ function AS(e) {
|
|
|
18844
18859
|
}
|
|
18845
18860
|
),
|
|
18846
18861
|
/* @__PURE__ */ v(
|
|
18847
|
-
|
|
18862
|
+
wS,
|
|
18848
18863
|
{
|
|
18849
18864
|
onCleanChat: () => r?.(),
|
|
18850
18865
|
onClose: () => o?.()
|
|
18851
18866
|
}
|
|
18852
18867
|
),
|
|
18853
|
-
/* @__PURE__ */ v(
|
|
18854
|
-
/* @__PURE__ */ v(
|
|
18868
|
+
/* @__PURE__ */ v(av, {}),
|
|
18869
|
+
/* @__PURE__ */ v(sS, {})
|
|
18855
18870
|
] });
|
|
18856
18871
|
return /* @__PURE__ */ v(md, { ...i, children: /* @__PURE__ */ v(Dp, { ...e, children: /* @__PURE__ */ v(
|
|
18857
18872
|
"main",
|
|
@@ -18878,7 +18893,7 @@ function kt({ className: e, ...t }) {
|
|
|
18878
18893
|
}
|
|
18879
18894
|
);
|
|
18880
18895
|
}
|
|
18881
|
-
function
|
|
18896
|
+
function xS(e, t) {
|
|
18882
18897
|
const [n, r] = Ee(e);
|
|
18883
18898
|
return Ht(() => {
|
|
18884
18899
|
const o = setTimeout(() => {
|
|
@@ -18889,12 +18904,12 @@ function wS(e, t) {
|
|
|
18889
18904
|
};
|
|
18890
18905
|
}, [e, t]), n;
|
|
18891
18906
|
}
|
|
18892
|
-
function
|
|
18907
|
+
function qS({
|
|
18893
18908
|
isOpen: e = !1,
|
|
18894
18909
|
isMobile: t,
|
|
18895
18910
|
skipAnimation: n = !1
|
|
18896
18911
|
}) {
|
|
18897
|
-
const r =
|
|
18912
|
+
const r = xS(e, 10), o = jc({
|
|
18898
18913
|
isOpen: n ? e : r,
|
|
18899
18914
|
isMobile: t,
|
|
18900
18915
|
skipAnimation: n
|
|
@@ -18927,25 +18942,25 @@ function TS({
|
|
|
18927
18942
|
] }, "chat-interface-skeleton");
|
|
18928
18943
|
}
|
|
18929
18944
|
export {
|
|
18930
|
-
|
|
18931
|
-
|
|
18932
|
-
|
|
18933
|
-
|
|
18945
|
+
ov as A,
|
|
18946
|
+
tS as B,
|
|
18947
|
+
TS as C,
|
|
18948
|
+
Jv as E,
|
|
18934
18949
|
mi as L,
|
|
18935
18950
|
Uk as M,
|
|
18936
|
-
|
|
18937
|
-
|
|
18951
|
+
rv as R,
|
|
18952
|
+
qS as S,
|
|
18938
18953
|
md as T,
|
|
18939
18954
|
ms as X,
|
|
18940
18955
|
Dp as a,
|
|
18941
|
-
|
|
18956
|
+
tv as b,
|
|
18942
18957
|
Z as c,
|
|
18943
|
-
|
|
18944
|
-
|
|
18945
|
-
|
|
18958
|
+
eS as d,
|
|
18959
|
+
Zv as e,
|
|
18960
|
+
lv as f,
|
|
18946
18961
|
Qi as g,
|
|
18947
|
-
|
|
18948
|
-
|
|
18962
|
+
xS as h,
|
|
18963
|
+
ES as i,
|
|
18949
18964
|
xi as u
|
|
18950
18965
|
};
|
|
18951
|
-
//# sourceMappingURL=skeleton-
|
|
18966
|
+
//# sourceMappingURL=skeleton-77mw6CSd.js.map
|