@quidgest/chatbot 0.5.8 → 0.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -5
- package/dist/index.mjs +285 -281
- package/package.json +1 -1
- package/src/composables/__tests__/useSSE.spec.ts +96 -0
- package/src/composables/useSSE.ts +7 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getCurrentInstance as at, computed as w, inject as rt, ref as T, provide as Xt, defineComponent as O, openBlock as y, createElementBlock as A, normalizeClass as W, normalizeStyle as _e, unref as f, toRef as Se, withModifiers as Me, createVNode as S, createCommentVNode as G, createElementVNode as
|
|
1
|
+
import { getCurrentInstance as at, computed as w, inject as rt, ref as T, provide as Xt, defineComponent as O, openBlock as y, createElementBlock as A, normalizeClass as W, normalizeStyle as _e, unref as f, toRef as Se, withModifiers as Me, createVNode as S, createCommentVNode as G, createElementVNode as L, renderSlot as M, createTextVNode as je, toDisplayString as ae, createBlock as V, resolveDynamicComponent as At, h as Ye, mergeProps as de, useTemplateRef as xt, withCtx as C, normalizeProps as De, guardReactiveProps as Te, mergeModels as ve, useModel as Ee, watch as le, createSlots as It, withDirectives as St, vModelDynamic as Kt, useId as en, onMounted as Ce, onUnmounted as Dt, readonly as tn, customRef as nn, getCurrentScope as on, onScopeDispose as Et, shallowRef as Xe, nextTick as xe, toValue as it, reactive as Ke, onBeforeUnmount as an, Fragment as pe, Teleport as rn, Transition as dt, renderList as Be, toHandlers as ln, vModelText as sn, resolveComponent as cn, withKeys as un, onBeforeMount as dn } from "vue";
|
|
2
2
|
import Ct from "axios";
|
|
3
3
|
import pn from "markdown-it";
|
|
4
4
|
function et(e) {
|
|
@@ -70,7 +70,7 @@ function yn(e, n) {
|
|
|
70
70
|
const o = hn(n);
|
|
71
71
|
return o ? typeof ((t = e.props) == null ? void 0 : t[o]) < "u" : !1;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function K(e) {
|
|
74
74
|
const n = e, t = n.setup;
|
|
75
75
|
return t && (n.setup = (o, r) => {
|
|
76
76
|
const a = fn();
|
|
@@ -87,7 +87,7 @@ function X(e) {
|
|
|
87
87
|
return t(l, r);
|
|
88
88
|
}), e;
|
|
89
89
|
}
|
|
90
|
-
const wn =
|
|
90
|
+
const wn = K(gn);
|
|
91
91
|
function _n(e, n = !1) {
|
|
92
92
|
return n ? /^#[a-fA-F0-9]{6}$/.test(e) : /^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(e);
|
|
93
93
|
}
|
|
@@ -275,7 +275,7 @@ const Cn = ["id", "disabled"], Bn = {
|
|
|
275
275
|
t.loading ? (y(), A("div", Bn, [
|
|
276
276
|
S(f(wn))
|
|
277
277
|
])) : G("v-if", !0),
|
|
278
|
-
|
|
278
|
+
L("span", Rn, [
|
|
279
279
|
M(p.$slots, "default"),
|
|
280
280
|
je(
|
|
281
281
|
" " + ae(t.label),
|
|
@@ -285,7 +285,7 @@ const Cn = ["id", "disabled"], Bn = {
|
|
|
285
285
|
])
|
|
286
286
|
], 14, Cn));
|
|
287
287
|
}
|
|
288
|
-
}), re =
|
|
288
|
+
}), re = K(Ln), qn = /* @__PURE__ */ O({
|
|
289
289
|
__name: "QIcon",
|
|
290
290
|
props: {
|
|
291
291
|
id: {},
|
|
@@ -314,7 +314,7 @@ const Cn = ["id", "disabled"], Bn = {
|
|
|
314
314
|
color: n.color !== void 0 && n.color !== "primary" ? (a = o.value) == null ? void 0 : a.mainColor : void 0
|
|
315
315
|
};
|
|
316
316
|
});
|
|
317
|
-
return (a, i) => (y(),
|
|
317
|
+
return (a, i) => (y(), V(At(t.value), {
|
|
318
318
|
id: n.id,
|
|
319
319
|
class: W(n.class),
|
|
320
320
|
icon: n.icon,
|
|
@@ -497,7 +497,7 @@ const Gn = /* @__PURE__ */ O({
|
|
|
497
497
|
function a() {
|
|
498
498
|
o("unloaded");
|
|
499
499
|
}
|
|
500
|
-
return (i, l) => (y(),
|
|
500
|
+
return (i, l) => (y(), V(f(On), {
|
|
501
501
|
id: t.id,
|
|
502
502
|
class: W(["q-icon", "q-icon__svg", t.class]),
|
|
503
503
|
src: t.bundle,
|
|
@@ -506,7 +506,7 @@ const Gn = /* @__PURE__ */ O({
|
|
|
506
506
|
onUnloaded: a
|
|
507
507
|
}, null, 8, ["id", "class", "src", "symbol"]));
|
|
508
508
|
}
|
|
509
|
-
}),
|
|
509
|
+
}), X = K(qn), jn = K(Nn), zn = K(Fn), Vn = K(Gn);
|
|
510
510
|
let Hn = 0;
|
|
511
511
|
function st(e) {
|
|
512
512
|
return f(e) || `uid-${++Hn}`;
|
|
@@ -541,7 +541,7 @@ const Zn = ["id"], Jn = /* @__PURE__ */ O({
|
|
|
541
541
|
M(t.$slots, "default")
|
|
542
542
|
], 10, Zn));
|
|
543
543
|
}
|
|
544
|
-
}), Nt =
|
|
544
|
+
}), Nt = K(Jn), Qn = ["id"], Wn = ["for"], Yn = /* @__PURE__ */ O({
|
|
545
545
|
inheritAttrs: !1,
|
|
546
546
|
__name: "QLabel",
|
|
547
547
|
props: {
|
|
@@ -564,7 +564,7 @@ const Zn = ["id"], Jn = /* @__PURE__ */ O({
|
|
|
564
564
|
class: W(t.value)
|
|
565
565
|
}, [
|
|
566
566
|
M(o.$slots, "prepend"),
|
|
567
|
-
|
|
567
|
+
L("label", de({
|
|
568
568
|
for: n.for
|
|
569
569
|
}, o.$attrs), [
|
|
570
570
|
M(o.$slots, "default", {}, () => [
|
|
@@ -578,7 +578,7 @@ const Zn = ["id"], Jn = /* @__PURE__ */ O({
|
|
|
578
578
|
M(o.$slots, "append")
|
|
579
579
|
], 10, Qn));
|
|
580
580
|
}
|
|
581
|
-
}), Tt =
|
|
581
|
+
}), Tt = K(Yn), Xn = ["id"], Kn = {
|
|
582
582
|
key: 0,
|
|
583
583
|
class: "q-field__prepend"
|
|
584
584
|
}, eo = {
|
|
@@ -619,24 +619,24 @@ const Zn = ["id"], Jn = /* @__PURE__ */ O({
|
|
|
619
619
|
id: t.id,
|
|
620
620
|
class: W(a.value)
|
|
621
621
|
}, [
|
|
622
|
-
t.label ? (y(),
|
|
622
|
+
t.label ? (y(), V(f(Tt), {
|
|
623
623
|
key: 0,
|
|
624
624
|
class: "q-field__label",
|
|
625
625
|
label: t.label,
|
|
626
626
|
for: t.for,
|
|
627
627
|
required: t.required
|
|
628
628
|
}, {
|
|
629
|
-
prepend:
|
|
629
|
+
prepend: C(() => [
|
|
630
630
|
M(i.$slots, "label.prepend")
|
|
631
631
|
]),
|
|
632
|
-
append:
|
|
632
|
+
append: C(() => [
|
|
633
633
|
M(i.$slots, "label.append")
|
|
634
634
|
]),
|
|
635
635
|
_: 3
|
|
636
636
|
/* FORWARDED */
|
|
637
637
|
}, 8, ["label", "for", "required"])) : G("v-if", !0),
|
|
638
638
|
M(i.$slots, "control", {}, () => [
|
|
639
|
-
|
|
639
|
+
L(
|
|
640
640
|
"div",
|
|
641
641
|
de({
|
|
642
642
|
ref: "field",
|
|
@@ -660,7 +660,7 @@ const Zn = ["id"], Jn = /* @__PURE__ */ O({
|
|
|
660
660
|
])) : G("v-if", !0)
|
|
661
661
|
], 10, Xn));
|
|
662
662
|
}
|
|
663
|
-
}), Ft =
|
|
663
|
+
}), Ft = K(no), oo = {
|
|
664
664
|
clearValue: "Clear value"
|
|
665
665
|
}, ao = {
|
|
666
666
|
clear: {
|
|
@@ -680,7 +680,7 @@ const Zn = ["id"], Jn = /* @__PURE__ */ O({
|
|
|
680
680
|
function r(a) {
|
|
681
681
|
o("click", a);
|
|
682
682
|
}
|
|
683
|
-
return (a, i) => (y(),
|
|
683
|
+
return (a, i) => (y(), V(f(re), {
|
|
684
684
|
id: t.id,
|
|
685
685
|
class: W(["q-clear-btn", t.class]),
|
|
686
686
|
"aria-label": t.texts.clearValue,
|
|
@@ -690,9 +690,9 @@ const Zn = ["id"], Jn = /* @__PURE__ */ O({
|
|
|
690
690
|
tabindex: "-1",
|
|
691
691
|
onClick: r
|
|
692
692
|
}, {
|
|
693
|
-
default:
|
|
693
|
+
default: C(() => [
|
|
694
694
|
S(
|
|
695
|
-
f(
|
|
695
|
+
f(X),
|
|
696
696
|
De(Te(t.icons.clear)),
|
|
697
697
|
null,
|
|
698
698
|
16
|
|
@@ -703,7 +703,7 @@ const Zn = ["id"], Jn = /* @__PURE__ */ O({
|
|
|
703
703
|
/* STABLE */
|
|
704
704
|
}, 8, ["id", "class", "aria-label"]));
|
|
705
705
|
}
|
|
706
|
-
}), io =
|
|
706
|
+
}), io = K(ro), lo = ["id", "type", "maxlength", "required", "placeholder", "readonly", "disabled"], so = /* @__PURE__ */ O({
|
|
707
707
|
inheritAttrs: !1,
|
|
708
708
|
__name: "QTextField",
|
|
709
709
|
props: /* @__PURE__ */ ve({
|
|
@@ -747,7 +747,7 @@ const Zn = ["id"], Jn = /* @__PURE__ */ O({
|
|
|
747
747
|
return (b = u.value) == null ? void 0 : b.fieldRef;
|
|
748
748
|
}),
|
|
749
749
|
inputRef: c
|
|
750
|
-
}), (b, _) => (y(),
|
|
750
|
+
}), (b, _) => (y(), V(f(Ft), {
|
|
751
751
|
ref_key: "fieldRef",
|
|
752
752
|
ref: u,
|
|
753
753
|
class: W(["q-text-field", o.class]),
|
|
@@ -759,14 +759,14 @@ const Zn = ["id"], Jn = /* @__PURE__ */ O({
|
|
|
759
759
|
required: o.required,
|
|
760
760
|
invalid: o.invalid
|
|
761
761
|
}, It({
|
|
762
|
-
"label.prepend":
|
|
762
|
+
"label.prepend": C(() => [
|
|
763
763
|
M(b.$slots, "label.prepend")
|
|
764
764
|
]),
|
|
765
|
-
"label.append":
|
|
765
|
+
"label.append": C(() => [
|
|
766
766
|
M(b.$slots, "label.append")
|
|
767
767
|
]),
|
|
768
|
-
default:
|
|
769
|
-
St(
|
|
768
|
+
default: C(() => [
|
|
769
|
+
St(L("input", de({
|
|
770
770
|
id: f(l),
|
|
771
771
|
ref_key: "inputRef",
|
|
772
772
|
ref: c,
|
|
@@ -787,16 +787,16 @@ const Zn = ["id"], Jn = /* @__PURE__ */ O({
|
|
|
787
787
|
}, [
|
|
788
788
|
b.$slots.prepend ? {
|
|
789
789
|
name: "prepend",
|
|
790
|
-
fn:
|
|
790
|
+
fn: C(() => [
|
|
791
791
|
M(b.$slots, "prepend")
|
|
792
792
|
]),
|
|
793
793
|
key: "0"
|
|
794
794
|
} : void 0,
|
|
795
795
|
b.$slots.append || m.value ? {
|
|
796
796
|
name: "append",
|
|
797
|
-
fn:
|
|
797
|
+
fn: C(() => [
|
|
798
798
|
M(b.$slots, "append"),
|
|
799
|
-
m.value ? (y(),
|
|
799
|
+
m.value ? (y(), V(f(io), {
|
|
800
800
|
key: 0,
|
|
801
801
|
"data-testid": "q-text-field__clear-button",
|
|
802
802
|
texts: o.texts,
|
|
@@ -807,14 +807,14 @@ const Zn = ["id"], Jn = /* @__PURE__ */ O({
|
|
|
807
807
|
} : void 0,
|
|
808
808
|
b.$slots.extras ? {
|
|
809
809
|
name: "extras",
|
|
810
|
-
fn:
|
|
810
|
+
fn: C(() => [
|
|
811
811
|
M(b.$slots, "extras")
|
|
812
812
|
]),
|
|
813
813
|
key: "2"
|
|
814
814
|
} : void 0
|
|
815
815
|
]), 1032, ["class", "for", "label", "size", "readonly", "disabled", "required", "invalid"]));
|
|
816
816
|
}
|
|
817
|
-
}), Ot =
|
|
817
|
+
}), Ot = K(so), co = Symbol("DismissibleLayer");
|
|
818
818
|
function uo(e) {
|
|
819
819
|
const n = rt(co);
|
|
820
820
|
if (!n)
|
|
@@ -891,7 +891,7 @@ const po = { ref: "layer" }, fo = /* @__PURE__ */ O({
|
|
|
891
891
|
/* NEED_PATCH */
|
|
892
892
|
));
|
|
893
893
|
}
|
|
894
|
-
}), vo =
|
|
894
|
+
}), vo = K(fo);
|
|
895
895
|
function mo(e) {
|
|
896
896
|
return on() ? (Et(e), !0) : !1;
|
|
897
897
|
}
|
|
@@ -1327,28 +1327,28 @@ var ht = {
|
|
|
1327
1327
|
// web components if the `tabbableOptions.getShadowRoot` option was used for
|
|
1328
1328
|
// the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
|
|
1329
1329
|
// look inside web components even if open)
|
|
1330
|
-
($ == null ? void 0 : $.includes(I)) || U.find(function(
|
|
1331
|
-
return
|
|
1330
|
+
($ == null ? void 0 : $.includes(I)) || U.find(function(R) {
|
|
1331
|
+
return R === d;
|
|
1332
1332
|
});
|
|
1333
1333
|
});
|
|
1334
1334
|
}, c = function(d) {
|
|
1335
|
-
var v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, $ = v.hasFallback, q = $ === void 0 ? !1 : $, I = v.params, U = I === void 0 ? [] : I,
|
|
1336
|
-
if (typeof
|
|
1337
|
-
if (
|
|
1338
|
-
return
|
|
1335
|
+
var v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, $ = v.hasFallback, q = $ === void 0 ? !1 : $, I = v.params, U = I === void 0 ? [] : I, R = r[d];
|
|
1336
|
+
if (typeof R == "function" && (R = R.apply(void 0, zo(U))), R === !0 && (R = void 0), !R) {
|
|
1337
|
+
if (R === void 0 || R === !1)
|
|
1338
|
+
return R;
|
|
1339
1339
|
throw new Error("`".concat(d, "` was specified but was not a node, or did not return a node"));
|
|
1340
1340
|
}
|
|
1341
|
-
var
|
|
1342
|
-
if (typeof
|
|
1341
|
+
var H = R;
|
|
1342
|
+
if (typeof R == "string") {
|
|
1343
1343
|
try {
|
|
1344
|
-
|
|
1344
|
+
H = t.querySelector(R);
|
|
1345
1345
|
} catch (h) {
|
|
1346
1346
|
throw new Error("`".concat(d, '` appears to be an invalid selector; error="').concat(h.message, '"'));
|
|
1347
1347
|
}
|
|
1348
|
-
if (!
|
|
1348
|
+
if (!H && !q)
|
|
1349
1349
|
throw new Error("`".concat(d, "` as selector refers to no known node"));
|
|
1350
1350
|
}
|
|
1351
|
-
return
|
|
1351
|
+
return H;
|
|
1352
1352
|
}, p = function() {
|
|
1353
1353
|
var d = c("initialFocus", {
|
|
1354
1354
|
hasFallback: !0
|
|
@@ -1370,9 +1370,9 @@ var ht = {
|
|
|
1370
1370
|
if (a.containerGroups = a.containers.map(function(d) {
|
|
1371
1371
|
var v = To(d, r.tabbableOptions), $ = Fo(d, r.tabbableOptions), q = v.length > 0 ? v[0] : void 0, I = v.length > 0 ? v[v.length - 1] : void 0, U = $.find(function(h) {
|
|
1372
1372
|
return ye(h);
|
|
1373
|
-
}),
|
|
1373
|
+
}), R = $.slice().reverse().find(function(h) {
|
|
1374
1374
|
return ye(h);
|
|
1375
|
-
}),
|
|
1375
|
+
}), H = !!v.find(function(h) {
|
|
1376
1376
|
return ge(h) > 0;
|
|
1377
1377
|
});
|
|
1378
1378
|
return {
|
|
@@ -1380,7 +1380,7 @@ var ht = {
|
|
|
1380
1380
|
tabbableNodes: v,
|
|
1381
1381
|
focusableNodes: $,
|
|
1382
1382
|
/** True if at least one node with positive `tabindex` was found in this container. */
|
|
1383
|
-
posTabIndexesFound:
|
|
1383
|
+
posTabIndexesFound: H,
|
|
1384
1384
|
/** First tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
1385
1385
|
firstTabbableNode: q,
|
|
1386
1386
|
/** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
@@ -1395,7 +1395,7 @@ var ht = {
|
|
|
1395
1395
|
/** First tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
1396
1396
|
firstDomTabbableNode: U,
|
|
1397
1397
|
/** Last tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
1398
|
-
lastDomTabbableNode:
|
|
1398
|
+
lastDomTabbableNode: R,
|
|
1399
1399
|
/**
|
|
1400
1400
|
* Finds the __tabbable__ node that follows the given node in the specified direction,
|
|
1401
1401
|
* in this container, if any.
|
|
@@ -1445,27 +1445,27 @@ var ht = {
|
|
|
1445
1445
|
v = v || Re($), s();
|
|
1446
1446
|
var U = null;
|
|
1447
1447
|
if (a.tabbableGroups.length > 0) {
|
|
1448
|
-
var
|
|
1449
|
-
if (
|
|
1448
|
+
var R = u(v, $), H = R >= 0 ? a.containerGroups[R] : void 0;
|
|
1449
|
+
if (R < 0)
|
|
1450
1450
|
I ? U = a.tabbableGroups[a.tabbableGroups.length - 1].lastTabbableNode : U = a.tabbableGroups[0].firstTabbableNode;
|
|
1451
1451
|
else if (I) {
|
|
1452
1452
|
var h = a.tabbableGroups.findIndex(function(fe) {
|
|
1453
1453
|
var ie = fe.firstTabbableNode;
|
|
1454
1454
|
return v === ie;
|
|
1455
1455
|
});
|
|
1456
|
-
if (h < 0 && (
|
|
1456
|
+
if (h < 0 && (H.container === v || He(v, r.tabbableOptions) && !ye(v, r.tabbableOptions) && !H.nextTabbableNode(v, !1)) && (h = R), h >= 0) {
|
|
1457
1457
|
var x = h === 0 ? a.tabbableGroups.length - 1 : h - 1, N = a.tabbableGroups[x];
|
|
1458
1458
|
U = ge(v) >= 0 ? N.lastTabbableNode : N.lastDomTabbableNode;
|
|
1459
|
-
} else Ie($) || (U =
|
|
1459
|
+
} else Ie($) || (U = H.nextTabbableNode(v, !1));
|
|
1460
1460
|
} else {
|
|
1461
1461
|
var F = a.tabbableGroups.findIndex(function(fe) {
|
|
1462
1462
|
var ie = fe.lastTabbableNode;
|
|
1463
1463
|
return v === ie;
|
|
1464
1464
|
});
|
|
1465
|
-
if (F < 0 && (
|
|
1465
|
+
if (F < 0 && (H.container === v || He(v, r.tabbableOptions) && !ye(v, r.tabbableOptions) && !H.nextTabbableNode(v)) && (F = R), F >= 0) {
|
|
1466
1466
|
var J = F === a.tabbableGroups.length - 1 ? 0 : F + 1, se = a.tabbableGroups[J];
|
|
1467
1467
|
U = ge(v) >= 0 ? se.firstTabbableNode : se.firstDomTabbableNode;
|
|
1468
|
-
} else Ie($) || (U =
|
|
1468
|
+
} else Ie($) || (U = H.nextTabbableNode(v));
|
|
1469
1469
|
}
|
|
1470
1470
|
} else
|
|
1471
1471
|
U = c("fallbackFocus");
|
|
@@ -1487,7 +1487,7 @@ var ht = {
|
|
|
1487
1487
|
}
|
|
1488
1488
|
Ae(r.allowOutsideClick, d) || d.preventDefault();
|
|
1489
1489
|
}
|
|
1490
|
-
},
|
|
1490
|
+
}, Y = function(d) {
|
|
1491
1491
|
var v = Re(d), $ = u(v, d) >= 0;
|
|
1492
1492
|
if ($ || v instanceof Document)
|
|
1493
1493
|
$ && (a.mostRecentlyFocusedNode = v);
|
|
@@ -1496,12 +1496,12 @@ var ht = {
|
|
|
1496
1496
|
var q, I = !0;
|
|
1497
1497
|
if (a.mostRecentlyFocusedNode)
|
|
1498
1498
|
if (ge(a.mostRecentlyFocusedNode) > 0) {
|
|
1499
|
-
var U = u(a.mostRecentlyFocusedNode),
|
|
1500
|
-
if (
|
|
1501
|
-
var
|
|
1499
|
+
var U = u(a.mostRecentlyFocusedNode), R = a.containerGroups[U].tabbableNodes;
|
|
1500
|
+
if (R.length > 0) {
|
|
1501
|
+
var H = R.findIndex(function(h) {
|
|
1502
1502
|
return h === a.mostRecentlyFocusedNode;
|
|
1503
1503
|
});
|
|
1504
|
-
|
|
1504
|
+
H >= 0 && (r.isKeyForward(a.recentNavEvent) ? H + 1 < R.length && (q = R[H + 1], I = !1) : H - 1 >= 0 && (q = R[H - 1], I = !1));
|
|
1505
1505
|
}
|
|
1506
1506
|
} else
|
|
1507
1507
|
a.containerGroups.some(function(h) {
|
|
@@ -1527,34 +1527,34 @@ var ht = {
|
|
|
1527
1527
|
isBackward: v
|
|
1528
1528
|
});
|
|
1529
1529
|
$ && (Ie(d) && d.preventDefault(), g($));
|
|
1530
|
-
},
|
|
1530
|
+
}, j = function(d) {
|
|
1531
1531
|
(r.isKeyForward(d) || r.isKeyBackward(d)) && z(d, r.isKeyBackward(d));
|
|
1532
1532
|
}, Q = function(d) {
|
|
1533
1533
|
Qo(d) && Ae(r.escapeDeactivates, d) !== !1 && (d.preventDefault(), i.deactivate());
|
|
1534
|
-
},
|
|
1534
|
+
}, Z = function(d) {
|
|
1535
1535
|
var v = Re(d);
|
|
1536
1536
|
u(v, d) >= 0 || Ae(r.clickOutsideDeactivates, d) || Ae(r.allowOutsideClick, d) || (d.preventDefault(), d.stopImmediatePropagation());
|
|
1537
|
-
},
|
|
1537
|
+
}, B = function() {
|
|
1538
1538
|
if (a.active)
|
|
1539
1539
|
return ht.activateTrap(o, i), a.delayInitialFocusTimer = r.delayInitialFocus ? yt(function() {
|
|
1540
1540
|
g(p());
|
|
1541
|
-
}) : g(p()), t.addEventListener("focusin",
|
|
1541
|
+
}) : g(p()), t.addEventListener("focusin", Y, !0), t.addEventListener("mousedown", E, {
|
|
1542
1542
|
capture: !0,
|
|
1543
1543
|
passive: !1
|
|
1544
1544
|
}), t.addEventListener("touchstart", E, {
|
|
1545
1545
|
capture: !0,
|
|
1546
1546
|
passive: !1
|
|
1547
|
-
}), t.addEventListener("click",
|
|
1547
|
+
}), t.addEventListener("click", Z, {
|
|
1548
1548
|
capture: !0,
|
|
1549
1549
|
passive: !1
|
|
1550
|
-
}), t.addEventListener("keydown",
|
|
1550
|
+
}), t.addEventListener("keydown", j, {
|
|
1551
1551
|
capture: !0,
|
|
1552
1552
|
passive: !1
|
|
1553
1553
|
}), t.addEventListener("keydown", Q), i;
|
|
1554
|
-
},
|
|
1554
|
+
}, P = function() {
|
|
1555
1555
|
if (a.active)
|
|
1556
|
-
return t.removeEventListener("focusin",
|
|
1557
|
-
},
|
|
1556
|
+
return t.removeEventListener("focusin", Y, !0), t.removeEventListener("mousedown", E, !0), t.removeEventListener("touchstart", E, !0), t.removeEventListener("click", Z, !0), t.removeEventListener("keydown", j, !0), t.removeEventListener("keydown", Q), i;
|
|
1557
|
+
}, D = function(d) {
|
|
1558
1558
|
var v = d.some(function($) {
|
|
1559
1559
|
var q = Array.from($.removedNodes);
|
|
1560
1560
|
return q.some(function(I) {
|
|
@@ -1562,7 +1562,7 @@ var ht = {
|
|
|
1562
1562
|
});
|
|
1563
1563
|
});
|
|
1564
1564
|
v && g(p());
|
|
1565
|
-
}, te = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(
|
|
1565
|
+
}, te = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(D) : void 0, ne = function() {
|
|
1566
1566
|
te && (te.disconnect(), a.active && !a.paused && a.containers.map(function(d) {
|
|
1567
1567
|
te.observe(d, {
|
|
1568
1568
|
subtree: !0,
|
|
@@ -1583,7 +1583,7 @@ var ht = {
|
|
|
1583
1583
|
var v = l(d, "onActivate"), $ = l(d, "onPostActivate"), q = l(d, "checkCanFocusTrap");
|
|
1584
1584
|
q || s(), a.active = !0, a.paused = !1, a.nodeFocusedBeforeActivation = t.activeElement, v == null || v();
|
|
1585
1585
|
var I = function() {
|
|
1586
|
-
q && s(),
|
|
1586
|
+
q && s(), B(), ne(), $ == null || $();
|
|
1587
1587
|
};
|
|
1588
1588
|
return q ? (q(a.containers.concat()).then(I, I), this) : (I(), this);
|
|
1589
1589
|
},
|
|
@@ -1595,15 +1595,15 @@ var ht = {
|
|
|
1595
1595
|
onPostDeactivate: r.onPostDeactivate,
|
|
1596
1596
|
checkCanReturnFocus: r.checkCanReturnFocus
|
|
1597
1597
|
}, d);
|
|
1598
|
-
clearTimeout(a.delayInitialFocusTimer), a.delayInitialFocusTimer = void 0,
|
|
1598
|
+
clearTimeout(a.delayInitialFocusTimer), a.delayInitialFocusTimer = void 0, P(), a.active = !1, a.paused = !1, ne(), ht.deactivateTrap(o, i);
|
|
1599
1599
|
var $ = l(v, "onDeactivate"), q = l(v, "onPostDeactivate"), I = l(v, "checkCanReturnFocus"), U = l(v, "returnFocus", "returnFocusOnDeactivate");
|
|
1600
1600
|
$ == null || $();
|
|
1601
|
-
var
|
|
1601
|
+
var R = function() {
|
|
1602
1602
|
yt(function() {
|
|
1603
1603
|
U && g(b(a.nodeFocusedBeforeActivation)), q == null || q();
|
|
1604
1604
|
});
|
|
1605
1605
|
};
|
|
1606
|
-
return U && I ? (I(b(a.nodeFocusedBeforeActivation)).then(
|
|
1606
|
+
return U && I ? (I(b(a.nodeFocusedBeforeActivation)).then(R, R), this) : (R(), this);
|
|
1607
1607
|
},
|
|
1608
1608
|
pause: function(d) {
|
|
1609
1609
|
return a.active ? (a.manuallyPaused = !0, this._setPausedState(!0, d)) : this;
|
|
@@ -1629,10 +1629,10 @@ var ht = {
|
|
|
1629
1629
|
return this;
|
|
1630
1630
|
if (a.paused = d, d) {
|
|
1631
1631
|
var $ = l(v, "onPause"), q = l(v, "onPostPause");
|
|
1632
|
-
$ == null || $(),
|
|
1632
|
+
$ == null || $(), P(), ne(), q == null || q();
|
|
1633
1633
|
} else {
|
|
1634
1634
|
var I = l(v, "onUnpause"), U = l(v, "onPostUnpause");
|
|
1635
|
-
I == null || I(), s(),
|
|
1635
|
+
I == null || I(), s(), B(), ne(), U == null || U();
|
|
1636
1636
|
}
|
|
1637
1637
|
return this;
|
|
1638
1638
|
}
|
|
@@ -1668,11 +1668,11 @@ const ea = /* @__PURE__ */ O({
|
|
|
1668
1668
|
emits: ["update:disabled"],
|
|
1669
1669
|
setup(e) {
|
|
1670
1670
|
const n = e, t = Ee(e, "disabled");
|
|
1671
|
-
return (o, r) => t.value ? M(o.$slots, "default", { key: 0 }) : (y(),
|
|
1671
|
+
return (o, r) => t.value ? M(o.$slots, "default", { key: 0 }) : (y(), V(
|
|
1672
1672
|
f(ea),
|
|
1673
1673
|
De(de({ key: 1 }, n)),
|
|
1674
1674
|
{
|
|
1675
|
-
default:
|
|
1675
|
+
default: C(() => [
|
|
1676
1676
|
M(o.$slots, "default")
|
|
1677
1677
|
]),
|
|
1678
1678
|
_: 3
|
|
@@ -1682,7 +1682,7 @@ const ea = /* @__PURE__ */ O({
|
|
|
1682
1682
|
/* FULL_PROPS */
|
|
1683
1683
|
));
|
|
1684
1684
|
}
|
|
1685
|
-
}), na =
|
|
1685
|
+
}), na = K(ta), we = "data-scroll-locked", Ze = "right-scroll-bar-position", Je = "width-before-scroll-bar", oa = "with-scroll-bars-hidden", aa = "--removed-body-scroll-bar-size", ra = {
|
|
1686
1686
|
left: 0,
|
|
1687
1687
|
top: 0,
|
|
1688
1688
|
right: 0,
|
|
@@ -1785,7 +1785,7 @@ const da = () => {
|
|
|
1785
1785
|
a <= 0 ? document.body.removeAttribute(we) : document.body.setAttribute(we, a.toString()), t.remove();
|
|
1786
1786
|
}), (a, i) => M(a.$slots, "default");
|
|
1787
1787
|
}
|
|
1788
|
-
}), fa =
|
|
1788
|
+
}), fa = K(pa);
|
|
1789
1789
|
function va(e, n, t, o) {
|
|
1790
1790
|
const r = (o == null ? void 0 : o.offset) ?? 0, a = (o == null ? void 0 : o.crossOffset) ?? 0, i = (o == null ? void 0 : o.placement) ?? "bottom", l = e.getBoundingClientRect(), u = n.getBoundingClientRect(), c = t == null ? void 0 : t.getBoundingClientRect(), p = ma(l, u, i, r), s = wa(l, u, p), m = ba(s, p, r), g = ha(m, p, a), b = ga(g, u, p);
|
|
1791
1791
|
let _;
|
|
@@ -1998,7 +1998,7 @@ const xa = ["id"], Ia = ["role"], Sa = /* @__PURE__ */ O({
|
|
|
1998
1998
|
left: m.left !== void 0 ? `${m.left}px` : void 0,
|
|
1999
1999
|
opacity: m.hidden ? 0 : 1
|
|
2000
2000
|
};
|
|
2001
|
-
}), _ = T(null), E = T(null),
|
|
2001
|
+
}), _ = T(null), E = T(null), Y = T(null);
|
|
2002
2002
|
function z() {
|
|
2003
2003
|
const k = I();
|
|
2004
2004
|
if (!k || !E.value)
|
|
@@ -2021,26 +2021,26 @@ const xa = ["id"], Ia = ["role"], Sa = /* @__PURE__ */ O({
|
|
|
2021
2021
|
() => t.placement,
|
|
2022
2022
|
() => xe(z)
|
|
2023
2023
|
);
|
|
2024
|
-
let
|
|
2024
|
+
let j;
|
|
2025
2025
|
function Q() {
|
|
2026
|
-
|
|
2026
|
+
B(0);
|
|
2027
2027
|
}
|
|
2028
|
-
function
|
|
2029
|
-
|
|
2028
|
+
function Z() {
|
|
2029
|
+
B(t.delay);
|
|
2030
2030
|
}
|
|
2031
|
-
function
|
|
2032
|
-
|
|
2031
|
+
function B(k) {
|
|
2032
|
+
j && D(), j = window.setTimeout(() => {
|
|
2033
2033
|
r.value = !0;
|
|
2034
2034
|
}, k);
|
|
2035
2035
|
}
|
|
2036
|
-
function
|
|
2037
|
-
if (
|
|
2036
|
+
function P() {
|
|
2037
|
+
if (j && D(), r.value = !1, t.anchor && t.trigger === "click") {
|
|
2038
2038
|
const k = I();
|
|
2039
2039
|
xe(() => k == null ? void 0 : k.focus());
|
|
2040
2040
|
}
|
|
2041
2041
|
}
|
|
2042
|
-
function
|
|
2043
|
-
clearTimeout(
|
|
2042
|
+
function D() {
|
|
2043
|
+
clearTimeout(j), j = void 0;
|
|
2044
2044
|
}
|
|
2045
2045
|
function te() {
|
|
2046
2046
|
xe(ie), o("enter");
|
|
@@ -2066,7 +2066,7 @@ const xa = ["id"], Ia = ["role"], Sa = /* @__PURE__ */ O({
|
|
|
2066
2066
|
function U(k) {
|
|
2067
2067
|
t.persistent && k.preventDefault();
|
|
2068
2068
|
}
|
|
2069
|
-
function
|
|
2069
|
+
function R(k) {
|
|
2070
2070
|
var ce;
|
|
2071
2071
|
if (t.persistent) {
|
|
2072
2072
|
k.preventDefault();
|
|
@@ -2081,8 +2081,8 @@ const xa = ["id"], Ia = ["role"], Sa = /* @__PURE__ */ O({
|
|
|
2081
2081
|
}
|
|
2082
2082
|
k.detail.originalEvent.type === "focusin" && oe && k.preventDefault();
|
|
2083
2083
|
}
|
|
2084
|
-
function
|
|
2085
|
-
|
|
2084
|
+
function H() {
|
|
2085
|
+
P();
|
|
2086
2086
|
}
|
|
2087
2087
|
let h;
|
|
2088
2088
|
function x() {
|
|
@@ -2098,7 +2098,7 @@ const xa = ["id"], Ia = ["role"], Sa = /* @__PURE__ */ O({
|
|
|
2098
2098
|
k.addEventListener("click", Q);
|
|
2099
2099
|
break;
|
|
2100
2100
|
case "hover":
|
|
2101
|
-
k.addEventListener("mouseenter",
|
|
2101
|
+
k.addEventListener("mouseenter", Z), k.addEventListener("mouseleave", P), k.addEventListener("focusin", Q), k.addEventListener("focusout", P);
|
|
2102
2102
|
break;
|
|
2103
2103
|
}
|
|
2104
2104
|
}
|
|
@@ -2110,7 +2110,7 @@ const xa = ["id"], Ia = ["role"], Sa = /* @__PURE__ */ O({
|
|
|
2110
2110
|
k.removeEventListener("click", Q);
|
|
2111
2111
|
break;
|
|
2112
2112
|
case "hover":
|
|
2113
|
-
k.removeEventListener("mouseenter",
|
|
2113
|
+
k.removeEventListener("mouseenter", Z), k.removeEventListener("mouseleave", P), k.removeEventListener("focusin", Q), k.removeEventListener("focusout", P);
|
|
2114
2114
|
break;
|
|
2115
2115
|
}
|
|
2116
2116
|
}
|
|
@@ -2122,7 +2122,7 @@ const xa = ["id"], Ia = ["role"], Sa = /* @__PURE__ */ O({
|
|
|
2122
2122
|
}
|
|
2123
2123
|
let se;
|
|
2124
2124
|
function fe() {
|
|
2125
|
-
I() ? (z(), se = window.setTimeout(fe, 100)) :
|
|
2125
|
+
I() ? (z(), se = window.setTimeout(fe, 100)) : P();
|
|
2126
2126
|
}
|
|
2127
2127
|
function ie() {
|
|
2128
2128
|
var k;
|
|
@@ -2137,7 +2137,7 @@ const xa = ["id"], Ia = ["role"], Sa = /* @__PURE__ */ O({
|
|
|
2137
2137
|
pe,
|
|
2138
2138
|
null,
|
|
2139
2139
|
[
|
|
2140
|
-
(y(),
|
|
2140
|
+
(y(), V(rn, {
|
|
2141
2141
|
disabled: !p.value,
|
|
2142
2142
|
to: t.attach
|
|
2143
2143
|
}, [
|
|
@@ -2145,7 +2145,7 @@ const xa = ["id"], Ia = ["role"], Sa = /* @__PURE__ */ O({
|
|
|
2145
2145
|
name: "fade",
|
|
2146
2146
|
appear: ""
|
|
2147
2147
|
}, {
|
|
2148
|
-
default:
|
|
2148
|
+
default: C(() => [
|
|
2149
2149
|
u.value ? (y(), A(
|
|
2150
2150
|
"div",
|
|
2151
2151
|
{
|
|
@@ -2172,29 +2172,29 @@ const xa = ["id"], Ia = ["role"], Sa = /* @__PURE__ */ O({
|
|
|
2172
2172
|
onLeave: d,
|
|
2173
2173
|
onAfterLeave: v
|
|
2174
2174
|
}, {
|
|
2175
|
-
default:
|
|
2175
|
+
default: C(() => [
|
|
2176
2176
|
r.value ? (y(), A("div", {
|
|
2177
2177
|
key: 0,
|
|
2178
2178
|
id: t.id,
|
|
2179
2179
|
ref_key: "overlayContainerRef",
|
|
2180
|
-
ref:
|
|
2180
|
+
ref: Y,
|
|
2181
2181
|
tabindex: "-1",
|
|
2182
2182
|
class: W(i.value),
|
|
2183
2183
|
style: _e(g.value)
|
|
2184
2184
|
}, [
|
|
2185
2185
|
S(f(vo), {
|
|
2186
|
-
onDismiss:
|
|
2187
|
-
onInteractOutside:
|
|
2186
|
+
onDismiss: H,
|
|
2187
|
+
onInteractOutside: R,
|
|
2188
2188
|
onPointerDownOutside: U
|
|
2189
2189
|
}, {
|
|
2190
|
-
default:
|
|
2191
|
-
|
|
2190
|
+
default: C(() => [
|
|
2191
|
+
Y.value ? (y(), V(f(na), {
|
|
2192
2192
|
key: 0,
|
|
2193
2193
|
disabled: t.nonModal || !r.value,
|
|
2194
|
-
options: { fallbackFocus:
|
|
2194
|
+
options: { fallbackFocus: Y.value }
|
|
2195
2195
|
}, {
|
|
2196
|
-
default:
|
|
2197
|
-
|
|
2196
|
+
default: C(() => [
|
|
2197
|
+
L("div", de({
|
|
2198
2198
|
ref_key: "overlayRef",
|
|
2199
2199
|
ref: E,
|
|
2200
2200
|
class: "q-overlay__content",
|
|
@@ -2231,13 +2231,13 @@ const xa = ["id"], Ia = ["role"], Sa = /* @__PURE__ */ O({
|
|
|
2231
2231
|
/* FORWARDED */
|
|
2232
2232
|
}, 8, ["name"])
|
|
2233
2233
|
], 8, ["disabled", "to"])),
|
|
2234
|
-
c.value ? (y(),
|
|
2234
|
+
c.value ? (y(), V(f(fa), { key: 0 })) : G("v-if", !0)
|
|
2235
2235
|
],
|
|
2236
2236
|
64
|
|
2237
2237
|
/* STABLE_FRAGMENT */
|
|
2238
2238
|
));
|
|
2239
2239
|
}
|
|
2240
|
-
}), Da =
|
|
2240
|
+
}), Da = K(Sa), Ea = [
|
|
2241
2241
|
{
|
|
2242
2242
|
id: "button",
|
|
2243
2243
|
icon: {
|
|
@@ -2318,7 +2318,7 @@ const xa = ["id"], Ia = ["role"], Sa = /* @__PURE__ */ O({
|
|
|
2318
2318
|
function m() {
|
|
2319
2319
|
o("leave");
|
|
2320
2320
|
}
|
|
2321
|
-
return (g, b) => (y(),
|
|
2321
|
+
return (g, b) => (y(), V(f(Da), {
|
|
2322
2322
|
id: t.id,
|
|
2323
2323
|
modelValue: r.value,
|
|
2324
2324
|
"onUpdate:modelValue": b[1] || (b[1] = (_) => r.value = _),
|
|
@@ -2333,8 +2333,8 @@ const xa = ["id"], Ia = ["role"], Sa = /* @__PURE__ */ O({
|
|
|
2333
2333
|
onEnter: s,
|
|
2334
2334
|
onLeave: m
|
|
2335
2335
|
}, {
|
|
2336
|
-
default:
|
|
2337
|
-
|
|
2336
|
+
default: C(() => [
|
|
2337
|
+
L(
|
|
2338
2338
|
"div",
|
|
2339
2339
|
{
|
|
2340
2340
|
class: W(l.value)
|
|
@@ -2360,7 +2360,7 @@ const xa = ["id"], Ia = ["role"], Sa = /* @__PURE__ */ O({
|
|
|
2360
2360
|
M(g.$slots, "body.icon", {}, () => [
|
|
2361
2361
|
t.icon ? (y(), A("span", Ma, [
|
|
2362
2362
|
S(
|
|
2363
|
-
f(
|
|
2363
|
+
f(X),
|
|
2364
2364
|
De(Te(t.icon)),
|
|
2365
2365
|
null,
|
|
2366
2366
|
16
|
|
@@ -2368,7 +2368,7 @@ const xa = ["id"], Ia = ["role"], Sa = /* @__PURE__ */ O({
|
|
|
2368
2368
|
)
|
|
2369
2369
|
])) : G("v-if", !0)
|
|
2370
2370
|
]),
|
|
2371
|
-
|
|
2371
|
+
L("div", Na, [
|
|
2372
2372
|
t.html ? (y(), A("div", {
|
|
2373
2373
|
key: 0,
|
|
2374
2374
|
innerHTML: t.text
|
|
@@ -2388,8 +2388,8 @@ const xa = ["id"], Ia = ["role"], Sa = /* @__PURE__ */ O({
|
|
|
2388
2388
|
placeholder: (_ = t.input) == null ? void 0 : _.placeholder,
|
|
2389
2389
|
size: "block"
|
|
2390
2390
|
}, {
|
|
2391
|
-
extras:
|
|
2392
|
-
i.value ? (y(),
|
|
2391
|
+
extras: C(() => [
|
|
2392
|
+
i.value ? (y(), V(f(X), {
|
|
2393
2393
|
key: 0,
|
|
2394
2394
|
icon: "exclamation-sign"
|
|
2395
2395
|
})) : G("v-if", !0),
|
|
@@ -2412,13 +2412,13 @@ const xa = ["id"], Ia = ["role"], Sa = /* @__PURE__ */ O({
|
|
|
2412
2412
|
(y(!0), A(
|
|
2413
2413
|
pe,
|
|
2414
2414
|
null,
|
|
2415
|
-
Be(t.buttons, (_) => (y(),
|
|
2415
|
+
Be(t.buttons, (_) => (y(), V(f(re), de({ ref_for: !0 }, _.props, {
|
|
2416
2416
|
key: _.id,
|
|
2417
2417
|
onClick: () => p(_)
|
|
2418
2418
|
}), {
|
|
2419
|
-
default:
|
|
2420
|
-
_.icon ? (y(),
|
|
2421
|
-
f(
|
|
2419
|
+
default: C(() => [
|
|
2420
|
+
_.icon ? (y(), V(
|
|
2421
|
+
f(X),
|
|
2422
2422
|
de({
|
|
2423
2423
|
key: 0,
|
|
2424
2424
|
ref_for: !0
|
|
@@ -2437,15 +2437,15 @@ const xa = ["id"], Ia = ["role"], Sa = /* @__PURE__ */ O({
|
|
|
2437
2437
|
])) : G("v-if", !0),
|
|
2438
2438
|
M(g.$slots, "footer.append")
|
|
2439
2439
|
])) : G("v-if", !0),
|
|
2440
|
-
t.dismissible ? (y(),
|
|
2440
|
+
t.dismissible ? (y(), V(f(re), {
|
|
2441
2441
|
key: 3,
|
|
2442
2442
|
class: "q-dialog__close",
|
|
2443
2443
|
variant: "text",
|
|
2444
2444
|
onClick: c
|
|
2445
2445
|
}, {
|
|
2446
|
-
default:
|
|
2446
|
+
default: C(() => [
|
|
2447
2447
|
S(
|
|
2448
|
-
f(
|
|
2448
|
+
f(X),
|
|
2449
2449
|
De(Te(t.icons.close)),
|
|
2450
2450
|
null,
|
|
2451
2451
|
16
|
|
@@ -2495,7 +2495,7 @@ const za = /* @__PURE__ */ O({
|
|
|
2495
2495
|
return (l, u) => (y(!0), A(
|
|
2496
2496
|
pe,
|
|
2497
2497
|
null,
|
|
2498
|
-
Be(f(r), (c) => (y(),
|
|
2498
|
+
Be(f(r), (c) => (y(), V(f(Ht), de({
|
|
2499
2499
|
key: c.id,
|
|
2500
2500
|
ref_for: !0
|
|
2501
2501
|
}, c.props, {
|
|
@@ -2507,8 +2507,8 @@ const za = /* @__PURE__ */ O({
|
|
|
2507
2507
|
/* KEYED_FRAGMENT */
|
|
2508
2508
|
));
|
|
2509
2509
|
}
|
|
2510
|
-
}), Ht =
|
|
2511
|
-
|
|
2510
|
+
}), Ht = K(Ga);
|
|
2511
|
+
K(za);
|
|
2512
2512
|
const Va = ["id", "required", "placeholder", "readonly", "disabled", "maxlength", "rows", "cols", "resize", "wrap"], Ha = /* @__PURE__ */ O({
|
|
2513
2513
|
inheritAttrs: !1,
|
|
2514
2514
|
__name: "QTextArea",
|
|
@@ -2549,7 +2549,7 @@ const Va = ["id", "required", "placeholder", "readonly", "disabled", "maxlength"
|
|
|
2549
2549
|
element: w(() => n.autosize ? l.value : void 0),
|
|
2550
2550
|
styleProp: "minHeight"
|
|
2551
2551
|
});
|
|
2552
|
-
return (c, p) => (y(),
|
|
2552
|
+
return (c, p) => (y(), V(f(Ft), {
|
|
2553
2553
|
class: W(["q-text-area", n.class]),
|
|
2554
2554
|
for: f(r),
|
|
2555
2555
|
label: n.label,
|
|
@@ -2558,14 +2558,14 @@ const Va = ["id", "required", "placeholder", "readonly", "disabled", "maxlength"
|
|
|
2558
2558
|
disabled: n.disabled,
|
|
2559
2559
|
required: n.required
|
|
2560
2560
|
}, It({
|
|
2561
|
-
"label.prepend":
|
|
2561
|
+
"label.prepend": C(() => [
|
|
2562
2562
|
M(c.$slots, "label.prepend")
|
|
2563
2563
|
]),
|
|
2564
|
-
"label.append":
|
|
2564
|
+
"label.append": C(() => [
|
|
2565
2565
|
M(c.$slots, "label.append")
|
|
2566
2566
|
]),
|
|
2567
|
-
default:
|
|
2568
|
-
St(
|
|
2567
|
+
default: C(() => [
|
|
2568
|
+
St(L("textarea", de({
|
|
2569
2569
|
id: f(r),
|
|
2570
2570
|
ref_key: "textareaRef",
|
|
2571
2571
|
ref: l,
|
|
@@ -2589,28 +2589,28 @@ const Va = ["id", "required", "placeholder", "readonly", "disabled", "maxlength"
|
|
|
2589
2589
|
}, [
|
|
2590
2590
|
c.$slots.prepend ? {
|
|
2591
2591
|
name: "prepend",
|
|
2592
|
-
fn:
|
|
2592
|
+
fn: C(() => [
|
|
2593
2593
|
M(c.$slots, "prepend")
|
|
2594
2594
|
]),
|
|
2595
2595
|
key: "0"
|
|
2596
2596
|
} : void 0,
|
|
2597
2597
|
c.$slots.append ? {
|
|
2598
2598
|
name: "append",
|
|
2599
|
-
fn:
|
|
2599
|
+
fn: C(() => [
|
|
2600
2600
|
M(c.$slots, "append")
|
|
2601
2601
|
]),
|
|
2602
2602
|
key: "1"
|
|
2603
2603
|
} : void 0,
|
|
2604
2604
|
c.$slots.extras ? {
|
|
2605
2605
|
name: "extras",
|
|
2606
|
-
fn:
|
|
2606
|
+
fn: C(() => [
|
|
2607
2607
|
M(c.$slots, "extras")
|
|
2608
2608
|
]),
|
|
2609
2609
|
key: "2"
|
|
2610
2610
|
} : void 0
|
|
2611
2611
|
]), 1032, ["class", "for", "label", "size", "readonly", "disabled", "required"]));
|
|
2612
2612
|
}
|
|
2613
|
-
}), Za =
|
|
2613
|
+
}), Za = K(Ha);
|
|
2614
2614
|
function he() {
|
|
2615
2615
|
return {
|
|
2616
2616
|
copy: "Copy",
|
|
@@ -2643,7 +2643,7 @@ function he() {
|
|
|
2643
2643
|
};
|
|
2644
2644
|
}
|
|
2645
2645
|
async function kt(e, n) {
|
|
2646
|
-
var
|
|
2646
|
+
var c, p, s, m, g, b, _;
|
|
2647
2647
|
const t = new AbortController(), o = t.signal, a = (await Ct({
|
|
2648
2648
|
...e,
|
|
2649
2649
|
headers: {
|
|
@@ -2656,49 +2656,53 @@ async function kt(e, n) {
|
|
|
2656
2656
|
if (!a || !(a instanceof ReadableStream))
|
|
2657
2657
|
throw new Error("Invalid stream response");
|
|
2658
2658
|
const i = a.getReader(), l = new TextDecoder();
|
|
2659
|
+
let u = "";
|
|
2659
2660
|
for (; ; ) {
|
|
2660
|
-
const { done:
|
|
2661
|
-
if (
|
|
2662
|
-
(
|
|
2661
|
+
const { done: E, value: Y } = await i.read();
|
|
2662
|
+
if (E) {
|
|
2663
|
+
(c = n.onDone) == null || c.call(n);
|
|
2663
2664
|
break;
|
|
2664
2665
|
}
|
|
2665
|
-
const z = l.decode(
|
|
2666
|
-
|
|
2667
|
-
|
|
2666
|
+
const z = l.decode(Y, { stream: !0 });
|
|
2667
|
+
u += z;
|
|
2668
|
+
const j = u.split(/\n\n+/);
|
|
2669
|
+
u = j.pop() || "";
|
|
2670
|
+
for (const Q of j) {
|
|
2671
|
+
const Z = Q.trim().split(`
|
|
2668
2672
|
`);
|
|
2669
|
-
let
|
|
2670
|
-
for (const
|
|
2671
|
-
|
|
2672
|
-
if (
|
|
2673
|
+
let B = "", P = "";
|
|
2674
|
+
for (const D of Z)
|
|
2675
|
+
D.startsWith("event:") ? B = D.replace("event:", "").trim() : D.startsWith("data:") && (P = D.replace("data:", "").trim());
|
|
2676
|
+
if (B || (B = "message"), !!P)
|
|
2673
2677
|
try {
|
|
2674
|
-
const
|
|
2675
|
-
switch (
|
|
2678
|
+
const D = JSON.parse(P);
|
|
2679
|
+
switch (B) {
|
|
2676
2680
|
case "message":
|
|
2677
|
-
(
|
|
2681
|
+
(p = n.onMessage) == null || p.call(n, D.value);
|
|
2678
2682
|
break;
|
|
2679
2683
|
case "tool-status":
|
|
2680
|
-
(
|
|
2684
|
+
(s = n.onToolStatus) == null || s.call(
|
|
2681
2685
|
n,
|
|
2682
|
-
|
|
2686
|
+
D
|
|
2683
2687
|
);
|
|
2684
2688
|
break;
|
|
2685
2689
|
case "error":
|
|
2686
|
-
(
|
|
2690
|
+
(m = n.onError) == null || m.call(n, new Error(D.value));
|
|
2687
2691
|
break;
|
|
2688
2692
|
case "field_metadata":
|
|
2689
|
-
(
|
|
2693
|
+
(g = n.onFieldMetadata) == null || g.call(n, D);
|
|
2690
2694
|
break;
|
|
2691
2695
|
case "done":
|
|
2692
|
-
(
|
|
2696
|
+
(b = n.onDone) == null || b.call(n);
|
|
2693
2697
|
break;
|
|
2694
2698
|
default:
|
|
2695
|
-
console.warn(`Unknown event type: ${
|
|
2699
|
+
console.warn(`Unknown event type: ${B}`);
|
|
2696
2700
|
}
|
|
2697
|
-
} catch (
|
|
2698
|
-
(
|
|
2701
|
+
} catch (D) {
|
|
2702
|
+
(_ = n.onError) == null || _.call(n, D), console.error("Error processing event:", D);
|
|
2699
2703
|
continue;
|
|
2700
2704
|
} finally {
|
|
2701
|
-
|
|
2705
|
+
E && (i.releaseLock(), t.abort());
|
|
2702
2706
|
}
|
|
2703
2707
|
}
|
|
2704
2708
|
}
|
|
@@ -2878,20 +2882,20 @@ const Wa = ["data-testid"], Ya = { class: "q-field-preview__toolbar" }, Xa = { c
|
|
|
2878
2882
|
class: "q-field-preview",
|
|
2879
2883
|
"data-testid": f(Qa)(t.name)
|
|
2880
2884
|
}, [
|
|
2881
|
-
|
|
2882
|
-
|
|
2885
|
+
L("div", Ya, [
|
|
2886
|
+
L("span", null, [
|
|
2883
2887
|
je(ae(f(r).suggestionsForField) + " ", 1),
|
|
2884
|
-
|
|
2888
|
+
L("b", null, ae(t.name), 1)
|
|
2885
2889
|
])
|
|
2886
2890
|
]),
|
|
2887
|
-
|
|
2891
|
+
L("div", {
|
|
2888
2892
|
class: W(s.value)
|
|
2889
2893
|
}, [
|
|
2890
|
-
(y(),
|
|
2894
|
+
(y(), V(At(c.value), De(Te(p.value)), null, 16))
|
|
2891
2895
|
], 2),
|
|
2892
|
-
|
|
2896
|
+
L("div", Xa, [
|
|
2893
2897
|
S(f(Nt), { borderless: "" }, {
|
|
2894
|
-
default:
|
|
2898
|
+
default: C(() => [
|
|
2895
2899
|
S(f(re), {
|
|
2896
2900
|
title: f(r).regenerateResponse,
|
|
2897
2901
|
disabled: u.value,
|
|
@@ -2899,8 +2903,8 @@ const Wa = ["data-testid"], Ya = { class: "q-field-preview__toolbar" }, Xa = { c
|
|
|
2899
2903
|
borderless: "",
|
|
2900
2904
|
onClick: g
|
|
2901
2905
|
}, {
|
|
2902
|
-
default:
|
|
2903
|
-
S(f(
|
|
2906
|
+
default: C(() => [
|
|
2907
|
+
S(f(X), { icon: "reset" })
|
|
2904
2908
|
]),
|
|
2905
2909
|
_: 1
|
|
2906
2910
|
}, 8, ["title", "disabled", "readonly"]),
|
|
@@ -2911,8 +2915,8 @@ const Wa = ["data-testid"], Ya = { class: "q-field-preview__toolbar" }, Xa = { c
|
|
|
2911
2915
|
readonly: l.value,
|
|
2912
2916
|
onClick: m
|
|
2913
2917
|
}, {
|
|
2914
|
-
default:
|
|
2915
|
-
S(f(
|
|
2918
|
+
default: C(() => [
|
|
2919
|
+
S(f(X), { icon: "apply" })
|
|
2916
2920
|
]),
|
|
2917
2921
|
_: 1
|
|
2918
2922
|
}, 8, ["label", "disabled", "readonly"])
|
|
@@ -2927,9 +2931,9 @@ const Wa = ["data-testid"], Ya = { class: "q-field-preview__toolbar" }, Xa = { c
|
|
|
2927
2931
|
setup(e) {
|
|
2928
2932
|
const n = [1, 2, 3], t = he();
|
|
2929
2933
|
return (o, r) => (y(), A("div", er, [
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
(y(), A(pe, null, Be(n, (a, i) =>
|
|
2934
|
+
L("span", tr, ae(f(t).generatingResponse), 1),
|
|
2935
|
+
L("div", nr, [
|
|
2936
|
+
(y(), A(pe, null, Be(n, (a, i) => L("span", {
|
|
2933
2937
|
key: i,
|
|
2934
2938
|
class: "dot",
|
|
2935
2939
|
style: _e({ animationDelay: i * 0.2 + "s" })
|
|
@@ -2995,44 +2999,44 @@ const Wa = ["data-testid"], Ya = { class: "q-field-preview__toolbar" }, Xa = { c
|
|
|
2995
2999
|
b === null || _ === null || !t.sessionID || a(b, _, t.sessionID);
|
|
2996
3000
|
}
|
|
2997
3001
|
return (b, _) => {
|
|
2998
|
-
var E,
|
|
3002
|
+
var E, Y, z;
|
|
2999
3003
|
return y(), A("div", ar, [
|
|
3000
|
-
S(f(
|
|
3004
|
+
S(f(X), {
|
|
3001
3005
|
type: "img",
|
|
3002
3006
|
icon: u.value,
|
|
3003
3007
|
alt: f(r).senderImage,
|
|
3004
3008
|
class: "q-chatbot__profile"
|
|
3005
3009
|
}, null, 8, ["icon", "alt"]),
|
|
3006
|
-
|
|
3010
|
+
L("div", rr, [
|
|
3007
3011
|
l.value ? (y(), A("div", ir, [
|
|
3008
|
-
|
|
3012
|
+
L("img", {
|
|
3009
3013
|
src: (E = t.file) == null ? void 0 : E.previewUrl,
|
|
3010
3014
|
alt: f(r).imagePreview
|
|
3011
3015
|
}, null, 8, lr)
|
|
3012
|
-
])) : (
|
|
3013
|
-
|
|
3014
|
-
S(f(
|
|
3016
|
+
])) : (Y = t.file) != null && Y.fileData && !l.value ? (y(), A("div", sr, [
|
|
3017
|
+
L("div", cr, [
|
|
3018
|
+
S(f(X), {
|
|
3015
3019
|
icon: "file",
|
|
3016
3020
|
class: "q-chatbot__file-icon"
|
|
3017
3021
|
})
|
|
3018
3022
|
]),
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3023
|
+
L("div", ur, [
|
|
3024
|
+
L("span", dr, ae((z = t.file) == null ? void 0 : z.fileData.name), 1),
|
|
3025
|
+
L("span", pr, ae(c.value), 1)
|
|
3022
3026
|
])
|
|
3023
3027
|
])) : G("", !0),
|
|
3024
|
-
|
|
3025
|
-
b.loading ? (y(),
|
|
3028
|
+
L("div", fr, [
|
|
3029
|
+
b.loading ? (y(), V(or, { key: 0 })) : t.sender === "bot" && t.fields.length > 0 ? (y(!0), A(pe, { key: 1 }, Be(t.fields, (j, Q) => (y(), V(f(Ka), {
|
|
3026
3030
|
key: Q,
|
|
3027
3031
|
class: "q-chatbot__text",
|
|
3028
|
-
text:
|
|
3029
|
-
name:
|
|
3030
|
-
type:
|
|
3032
|
+
text: j.text || "",
|
|
3033
|
+
name: j.name,
|
|
3034
|
+
type: j.type,
|
|
3031
3035
|
disabled: b.loading,
|
|
3032
|
-
onRegenerate: () => o("regenerate",
|
|
3033
|
-
onApply: (
|
|
3036
|
+
onRegenerate: () => o("regenerate", j.name),
|
|
3037
|
+
onApply: (Z) => s(Z, j)
|
|
3034
3038
|
}, null, 8, ["text", "name", "type", "disabled", "onRegenerate", "onApply"]))), 128)) : (y(), A(pe, { key: 2 }, [
|
|
3035
|
-
t.sender === "bot" ? (y(),
|
|
3039
|
+
t.sender === "bot" ? (y(), V(f(Ne), {
|
|
3036
3040
|
key: 0,
|
|
3037
3041
|
class: "q-chatbot__text",
|
|
3038
3042
|
source: t.message || ""
|
|
@@ -3131,7 +3135,7 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3131
3135
|
const t = e, o = n, r = he(), { getLastMessage: a } = Wt(), i = T(!1), l = T(""), u = T(null), c = T(!1), p = w(() => t.loading || c.value), s = t.date || /* @__PURE__ */ new Date(), m = a(), g = w(() => m ? m.fields && m.fields.length > 1 : !1), b = [
|
|
3132
3136
|
{
|
|
3133
3137
|
id: "confirm-btn",
|
|
3134
|
-
action:
|
|
3138
|
+
action: B,
|
|
3135
3139
|
props: {
|
|
3136
3140
|
label: r.submitButton,
|
|
3137
3141
|
class: "q-chatbot__dialog-confirm-button"
|
|
@@ -3150,38 +3154,38 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3150
3154
|
icon: "cancel"
|
|
3151
3155
|
}
|
|
3152
3156
|
}
|
|
3153
|
-
], _ = w(() => t.dateFormat ?
|
|
3154
|
-
function
|
|
3155
|
-
const ne =
|
|
3157
|
+
], _ = w(() => t.dateFormat ? Y(s, "HH:mm") : s.toLocaleString()), E = w(() => `${_.value}`);
|
|
3158
|
+
function Y(D, te) {
|
|
3159
|
+
const ne = D.getDate().toString().padStart(2, "0"), d = (D.getMonth() + 1).toString().padStart(2, "0"), v = D.getFullYear().toString().padStart(2, "0"), $ = D.getHours().toString().padStart(2, "0"), q = D.getMinutes().toString().padStart(2, "0"), I = D.getSeconds().toString().padStart(2, "0");
|
|
3156
3160
|
return te.replace("dd", ne).replace("MM", d).replace("yyyy", v).replace("HH", $).replace("mm", q).replace("ss", I);
|
|
3157
3161
|
}
|
|
3158
|
-
function z(
|
|
3159
|
-
i.value = !0, l.value = "", u.value =
|
|
3162
|
+
function z(D) {
|
|
3163
|
+
i.value = !0, l.value = "", u.value = D;
|
|
3160
3164
|
}
|
|
3161
|
-
function
|
|
3165
|
+
function j() {
|
|
3162
3166
|
z(0);
|
|
3163
3167
|
}
|
|
3164
3168
|
function Q() {
|
|
3165
3169
|
z(1);
|
|
3166
3170
|
}
|
|
3167
|
-
function
|
|
3171
|
+
function Z() {
|
|
3168
3172
|
c.value || (c.value = !0, o("apply-all"));
|
|
3169
3173
|
}
|
|
3170
|
-
function
|
|
3174
|
+
function B() {
|
|
3171
3175
|
u.value && (o("submit-feedback", u.value, l.value), i.value = !1, l.value = "", u.value = null);
|
|
3172
3176
|
}
|
|
3173
|
-
function
|
|
3177
|
+
function P() {
|
|
3174
3178
|
o("copy-response");
|
|
3175
3179
|
}
|
|
3176
|
-
return (
|
|
3180
|
+
return (D, te) => (y(), A(pe, null, [
|
|
3177
3181
|
S(f(Ht), {
|
|
3178
3182
|
modelValue: i.value,
|
|
3179
3183
|
"onUpdate:modelValue": te[1] || (te[1] = (ne) => i.value = ne),
|
|
3180
3184
|
inline: "",
|
|
3181
3185
|
buttons: b
|
|
3182
3186
|
}, {
|
|
3183
|
-
body:
|
|
3184
|
-
|
|
3187
|
+
body: C(() => [
|
|
3188
|
+
L("div", wr, ae(f(r).commentDialogTitle), 1),
|
|
3185
3189
|
S(f(Ot), {
|
|
3186
3190
|
modelValue: l.value,
|
|
3187
3191
|
"onUpdate:modelValue": te[0] || (te[0] = (ne) => l.value = ne),
|
|
@@ -3193,9 +3197,9 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3193
3197
|
]),
|
|
3194
3198
|
_: 1
|
|
3195
3199
|
}, 8, ["modelValue"]),
|
|
3196
|
-
|
|
3200
|
+
D.showButtons ? (y(), A("div", _r, [
|
|
3197
3201
|
S(f(Nt), null, {
|
|
3198
|
-
default:
|
|
3202
|
+
default: C(() => [
|
|
3199
3203
|
S(f(re), {
|
|
3200
3204
|
title: f(r).goodResponse,
|
|
3201
3205
|
class: "q-chatbot__good-response-button",
|
|
@@ -3203,8 +3207,8 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3203
3207
|
disabled: t.loading,
|
|
3204
3208
|
onClick: Q
|
|
3205
3209
|
}, {
|
|
3206
|
-
default:
|
|
3207
|
-
S(f(
|
|
3210
|
+
default: C(() => [
|
|
3211
|
+
S(f(X), { icon: "thumb-up" })
|
|
3208
3212
|
]),
|
|
3209
3213
|
_: 1
|
|
3210
3214
|
}, 8, ["title", "disabled"]),
|
|
@@ -3213,10 +3217,10 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3213
3217
|
class: "q-chatbot__bad-response-button",
|
|
3214
3218
|
borderless: "",
|
|
3215
3219
|
disabled: t.loading,
|
|
3216
|
-
onClick:
|
|
3220
|
+
onClick: j
|
|
3217
3221
|
}, {
|
|
3218
|
-
default:
|
|
3219
|
-
S(f(
|
|
3222
|
+
default: C(() => [
|
|
3223
|
+
S(f(X), { icon: "thumb-down" })
|
|
3220
3224
|
]),
|
|
3221
3225
|
_: 1
|
|
3222
3226
|
}, 8, ["title", "disabled"]),
|
|
@@ -3225,14 +3229,14 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3225
3229
|
class: "q-chatbot__copy-button",
|
|
3226
3230
|
borderless: "",
|
|
3227
3231
|
disabled: t.loading,
|
|
3228
|
-
onClick:
|
|
3232
|
+
onClick: P
|
|
3229
3233
|
}, {
|
|
3230
|
-
default:
|
|
3231
|
-
S(f(
|
|
3234
|
+
default: C(() => [
|
|
3235
|
+
S(f(X), { icon: "copy-content" })
|
|
3232
3236
|
]),
|
|
3233
3237
|
_: 1
|
|
3234
3238
|
}, 8, ["title", "disabled"]),
|
|
3235
|
-
g.value ? (y(),
|
|
3239
|
+
g.value ? (y(), V(f(re), {
|
|
3236
3240
|
key: 0,
|
|
3237
3241
|
title: f(r).applyAll,
|
|
3238
3242
|
class: "q-chatbot__apply-all-button",
|
|
@@ -3240,10 +3244,10 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3240
3244
|
disabled: p.value,
|
|
3241
3245
|
readonly: p.value,
|
|
3242
3246
|
label: f(r).applyAll,
|
|
3243
|
-
onClick:
|
|
3247
|
+
onClick: Z
|
|
3244
3248
|
}, {
|
|
3245
|
-
default:
|
|
3246
|
-
S(f(
|
|
3249
|
+
default: C(() => [
|
|
3250
|
+
S(f(X), { icon: "apply-all" })
|
|
3247
3251
|
]),
|
|
3248
3252
|
_: 1
|
|
3249
3253
|
}, 8, ["title", "disabled", "readonly", "label"])) : G("", !0)
|
|
@@ -3251,7 +3255,7 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3251
3255
|
_: 1
|
|
3252
3256
|
})
|
|
3253
3257
|
])) : G("", !0),
|
|
3254
|
-
|
|
3258
|
+
L("div", kr, ae(E.value), 1)
|
|
3255
3259
|
], 64));
|
|
3256
3260
|
}
|
|
3257
3261
|
}), Ar = { class: "q-chatbot__tools" }, xr = { class: "q-chatbot__tools__select" }, Ir = /* @__PURE__ */ O({
|
|
@@ -3299,8 +3303,8 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3299
3303
|
return (s, m) => {
|
|
3300
3304
|
const g = cn("q-select");
|
|
3301
3305
|
return y(), A("div", Ar, [
|
|
3302
|
-
|
|
3303
|
-
i.value ? (y(),
|
|
3306
|
+
L("div", xr, [
|
|
3307
|
+
i.value ? (y(), V(g, {
|
|
3304
3308
|
key: 0,
|
|
3305
3309
|
modelValue: l.value,
|
|
3306
3310
|
"onUpdate:modelValue": [
|
|
@@ -3321,8 +3325,8 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3321
3325
|
borderless: "",
|
|
3322
3326
|
onClick: c
|
|
3323
3327
|
}, {
|
|
3324
|
-
default:
|
|
3325
|
-
S(f(
|
|
3328
|
+
default: C(() => [
|
|
3329
|
+
S(f(X), { icon: "bin" })
|
|
3326
3330
|
]),
|
|
3327
3331
|
_: 1
|
|
3328
3332
|
}, 8, ["title", "disabled"])
|
|
@@ -3347,60 +3351,60 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3347
3351
|
emits: ["send-message"],
|
|
3348
3352
|
setup(e, { emit: n }) {
|
|
3349
3353
|
const t = e, o = n, r = he(), a = T(null), i = T(null), l = T(""), u = T(!1), c = w(() => ".png,.jpeg,.jpg,.svg,.webp,.pdf,.doc,.docx"), p = w(() => i.value ? i.value.type.startsWith("image/") ?? !1 : !1), s = T(t.userPrompt ?? ""), m = w(() => t.disabled || t.loading || s.value.trim().length === 0);
|
|
3350
|
-
function g(
|
|
3351
|
-
|
|
3354
|
+
function g(B) {
|
|
3355
|
+
B.preventDefault(), t.disabled || (u.value = !0);
|
|
3352
3356
|
}
|
|
3353
3357
|
const b = w(() => ({
|
|
3354
3358
|
"q-chatbot__footer-disabled": t.disabled,
|
|
3355
3359
|
"drag-over": u.value && !i.value
|
|
3356
3360
|
}));
|
|
3357
|
-
function _(
|
|
3358
|
-
|
|
3361
|
+
function _(B) {
|
|
3362
|
+
B.preventDefault(), u.value = !1;
|
|
3359
3363
|
}
|
|
3360
|
-
function E(
|
|
3361
|
-
var
|
|
3362
|
-
if (
|
|
3363
|
-
const
|
|
3364
|
-
|
|
3364
|
+
function E(B) {
|
|
3365
|
+
var D;
|
|
3366
|
+
if (B.preventDefault(), u.value = !1, t.disabled || i.value) return;
|
|
3367
|
+
const P = (D = B.dataTransfer) == null ? void 0 : D.files;
|
|
3368
|
+
P && Y(P[0]);
|
|
3365
3369
|
}
|
|
3366
|
-
function
|
|
3367
|
-
i.value =
|
|
3370
|
+
function Y(B) {
|
|
3371
|
+
i.value = B, B.type.startsWith("image/") ? l.value = URL.createObjectURL(B) : l.value = "";
|
|
3368
3372
|
}
|
|
3369
3373
|
function z() {
|
|
3370
3374
|
if (!(s.value.trim() === "" || t.loading || t.disabled)) {
|
|
3371
3375
|
if (i.value) {
|
|
3372
|
-
const
|
|
3376
|
+
const B = {
|
|
3373
3377
|
fileData: i.value,
|
|
3374
3378
|
previewUrl: l.value ?? ""
|
|
3375
3379
|
};
|
|
3376
|
-
o("send-message", s.value,
|
|
3380
|
+
o("send-message", s.value, B), j();
|
|
3377
3381
|
} else o("send-message", s.value);
|
|
3378
3382
|
s.value = "";
|
|
3379
3383
|
}
|
|
3380
3384
|
}
|
|
3381
|
-
function
|
|
3385
|
+
function j() {
|
|
3382
3386
|
i.value = null, l.value = "", a.value && (a.value.value = "", a.value.files = null);
|
|
3383
3387
|
}
|
|
3384
3388
|
function Q() {
|
|
3385
|
-
var
|
|
3386
|
-
(
|
|
3389
|
+
var B;
|
|
3390
|
+
(B = a.value) == null || B.click();
|
|
3387
3391
|
}
|
|
3388
|
-
function
|
|
3389
|
-
var
|
|
3390
|
-
const
|
|
3391
|
-
(
|
|
3392
|
+
function Z(B) {
|
|
3393
|
+
var D;
|
|
3394
|
+
const P = B.target;
|
|
3395
|
+
(D = P.files) != null && D[0] && Y(P.files[0]);
|
|
3392
3396
|
}
|
|
3393
|
-
return (
|
|
3397
|
+
return (B, P) => (y(), A(pe, null, [
|
|
3394
3398
|
S(f(Tt), {
|
|
3395
3399
|
label: f(r).inputLabel
|
|
3396
3400
|
}, null, 8, ["label"]),
|
|
3397
|
-
|
|
3401
|
+
L("div", {
|
|
3398
3402
|
class: W(["q-chatbot__footer", b.value]),
|
|
3399
3403
|
onDragover: Me(g, ["prevent"]),
|
|
3400
3404
|
onDragleave: Me(_, ["prevent"]),
|
|
3401
3405
|
onDrop: Me(E, ["prevent"])
|
|
3402
3406
|
}, [
|
|
3403
|
-
|
|
3407
|
+
L("div", Sr, [
|
|
3404
3408
|
i.value ? (y(), A("div", Dr, [
|
|
3405
3409
|
p.value ? (y(), A("img", {
|
|
3406
3410
|
key: 0,
|
|
@@ -3409,30 +3413,30 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3409
3413
|
tabindex: "0",
|
|
3410
3414
|
alt: f(r).imagePreview
|
|
3411
3415
|
}, null, 8, Er)) : (y(), A("div", Cr, [
|
|
3412
|
-
S(f(
|
|
3416
|
+
S(f(X), {
|
|
3413
3417
|
icon: "file",
|
|
3414
3418
|
class: "q-chatbot__file-icon"
|
|
3415
3419
|
}),
|
|
3416
|
-
|
|
3420
|
+
L("span", Br, ae(i.value.name), 1)
|
|
3417
3421
|
])),
|
|
3418
3422
|
S(f(re), {
|
|
3419
3423
|
class: "q-chatbot__remove-file",
|
|
3420
3424
|
tabindex: "0",
|
|
3421
3425
|
flat: "",
|
|
3422
3426
|
round: "",
|
|
3423
|
-
onClick:
|
|
3427
|
+
onClick: j
|
|
3424
3428
|
}, {
|
|
3425
|
-
default:
|
|
3426
|
-
S(f(
|
|
3429
|
+
default: C(() => [
|
|
3430
|
+
S(f(X), { icon: "remove" })
|
|
3427
3431
|
]),
|
|
3428
3432
|
_: 1
|
|
3429
3433
|
})
|
|
3430
3434
|
])) : G("", !0),
|
|
3431
|
-
|
|
3435
|
+
L("div", Rr, [
|
|
3432
3436
|
S(f(Za), {
|
|
3433
3437
|
id: "chatbot-input",
|
|
3434
3438
|
modelValue: s.value,
|
|
3435
|
-
"onUpdate:modelValue":
|
|
3439
|
+
"onUpdate:modelValue": P[0] || (P[0] = (D) => s.value = D),
|
|
3436
3440
|
size: "block",
|
|
3437
3441
|
autosize: "",
|
|
3438
3442
|
resize: "none",
|
|
@@ -3441,26 +3445,26 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3441
3445
|
onKeyup: un(z, ["enter"])
|
|
3442
3446
|
}, null, 8, ["modelValue", "disabled"])
|
|
3443
3447
|
]),
|
|
3444
|
-
|
|
3448
|
+
L("div", Lr, [
|
|
3445
3449
|
S(f(re), {
|
|
3446
3450
|
title: f(r).imageUpload,
|
|
3447
3451
|
class: "q-chatbot__upload",
|
|
3448
3452
|
disabled: t.disabled || t.loading || !!i.value,
|
|
3449
3453
|
onClick: Q
|
|
3450
3454
|
}, {
|
|
3451
|
-
default:
|
|
3452
|
-
S(f(
|
|
3455
|
+
default: C(() => [
|
|
3456
|
+
S(f(X), { icon: "upload" })
|
|
3453
3457
|
]),
|
|
3454
3458
|
_: 1
|
|
3455
3459
|
}, 8, ["title", "disabled"]),
|
|
3456
|
-
|
|
3460
|
+
L("input", {
|
|
3457
3461
|
id: "file-upload",
|
|
3458
3462
|
ref_key: "fileInput",
|
|
3459
3463
|
ref: a,
|
|
3460
3464
|
type: "file",
|
|
3461
3465
|
accept: c.value,
|
|
3462
3466
|
class: "hidden-input",
|
|
3463
|
-
onChange:
|
|
3467
|
+
onChange: Z
|
|
3464
3468
|
}, null, 40, qr),
|
|
3465
3469
|
S(f(re), {
|
|
3466
3470
|
title: f(r).sendMessage,
|
|
@@ -3470,8 +3474,8 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3470
3474
|
readonly: m.value,
|
|
3471
3475
|
onClick: z
|
|
3472
3476
|
}, {
|
|
3473
|
-
default:
|
|
3474
|
-
S(f(
|
|
3477
|
+
default: C(() => [
|
|
3478
|
+
S(f(X), { icon: "send" })
|
|
3475
3479
|
]),
|
|
3476
3480
|
_: 1
|
|
3477
3481
|
}, 8, ["title", "disabled", "readonly"])
|
|
@@ -3502,25 +3506,25 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3502
3506
|
setup(e, { emit: n }) {
|
|
3503
3507
|
const t = e, o = n, r = T(!0), a = T(null), i = T(!0), l = T(t.agentData.id), u = T(t.agentData.formId), c = he(), { isLoading: p, clearChatData: s, getChatData: m, getJobResultData: g, sendPrompt: b } = Zt(
|
|
3504
3508
|
t.apiEndpoint
|
|
3505
|
-
), { messages: _, addChatMessage: E, clearMessages:
|
|
3509
|
+
), { messages: _, addChatMessage: E, clearMessages: Y, getLastMessage: z, deleteMessageById: j } = Wt(), Q = w(() => r.value || p.value);
|
|
3506
3510
|
dn(() => {
|
|
3507
3511
|
var h;
|
|
3508
3512
|
(h = a.value) == null || h.removeEventListener("scroll", ne);
|
|
3509
3513
|
}), Ce(() => {
|
|
3510
|
-
|
|
3514
|
+
B();
|
|
3511
3515
|
});
|
|
3512
|
-
function
|
|
3516
|
+
function Z(h) {
|
|
3513
3517
|
r.value = h;
|
|
3514
3518
|
}
|
|
3515
|
-
async function
|
|
3519
|
+
async function B() {
|
|
3516
3520
|
try {
|
|
3517
|
-
await
|
|
3521
|
+
await P();
|
|
3518
3522
|
} catch (h) {
|
|
3519
3523
|
E(c.loginError), console.error("Error logging in: " + h);
|
|
3520
3524
|
}
|
|
3521
3525
|
}
|
|
3522
|
-
async function
|
|
3523
|
-
|
|
3526
|
+
async function P() {
|
|
3527
|
+
Z(!0);
|
|
3524
3528
|
const { data: h, error: x } = await m(
|
|
3525
3529
|
t.username,
|
|
3526
3530
|
t.projectPath,
|
|
@@ -3528,10 +3532,10 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3528
3532
|
u.value
|
|
3529
3533
|
);
|
|
3530
3534
|
if (x || !h || !h.success) {
|
|
3531
|
-
|
|
3535
|
+
Z(!0), E(c.botIsSick), console.log("Error loading chat data: " + x);
|
|
3532
3536
|
return;
|
|
3533
3537
|
}
|
|
3534
|
-
|
|
3538
|
+
Z(!1), D(), h.history.forEach(async (N) => {
|
|
3535
3539
|
E(
|
|
3536
3540
|
N.content,
|
|
3537
3541
|
N.type === "ai" ? "bot" : "user",
|
|
@@ -3541,12 +3545,12 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3541
3545
|
);
|
|
3542
3546
|
});
|
|
3543
3547
|
}
|
|
3544
|
-
function
|
|
3548
|
+
function D() {
|
|
3545
3549
|
const h = c.initialMessage;
|
|
3546
3550
|
E(h, "bot", void 0, void 0, !0);
|
|
3547
3551
|
}
|
|
3548
3552
|
function te() {
|
|
3549
|
-
|
|
3553
|
+
Y(), Z(!1), i.value = !0;
|
|
3550
3554
|
}
|
|
3551
3555
|
function ne() {
|
|
3552
3556
|
if (a.value) {
|
|
@@ -3586,7 +3590,7 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3586
3590
|
});
|
|
3587
3591
|
},
|
|
3588
3592
|
(N) => {
|
|
3589
|
-
|
|
3593
|
+
Z(!0), E(c.botIsSick), console.error("Error getting job result: " + N), j(x.id);
|
|
3590
3594
|
}
|
|
3591
3595
|
);
|
|
3592
3596
|
}
|
|
@@ -3636,7 +3640,7 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3636
3640
|
}
|
|
3637
3641
|
},
|
|
3638
3642
|
(ie) => {
|
|
3639
|
-
|
|
3643
|
+
Z(!0), E(c.botIsSick), console.error("Error sending message: " + ie), j(J.id);
|
|
3640
3644
|
}
|
|
3641
3645
|
);
|
|
3642
3646
|
}
|
|
@@ -3649,29 +3653,29 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3649
3653
|
u.value
|
|
3650
3654
|
);
|
|
3651
3655
|
if (x || !h || !h.success) {
|
|
3652
|
-
|
|
3656
|
+
Z(!0), E(c.loginError), console.log("Error clearing chat: " + x);
|
|
3653
3657
|
return;
|
|
3654
3658
|
}
|
|
3655
|
-
te(),
|
|
3659
|
+
te(), D();
|
|
3656
3660
|
}
|
|
3657
3661
|
function I(h) {
|
|
3658
3662
|
const x = ["q-chatbot__messages-wrapper"];
|
|
3659
3663
|
return h === "user" && x.push("q-chatbot__messages-wrapper_right"), x;
|
|
3660
3664
|
}
|
|
3661
3665
|
async function U(h) {
|
|
3662
|
-
l.value = h.key, u.value = h.formId, te(), await
|
|
3666
|
+
l.value = h.key, u.value = h.formId, te(), await B();
|
|
3663
3667
|
}
|
|
3664
|
-
function
|
|
3668
|
+
function R(h) {
|
|
3665
3669
|
!h || h.length === 0 || o("apply-fields", h);
|
|
3666
3670
|
}
|
|
3667
|
-
function
|
|
3671
|
+
function H(h) {
|
|
3668
3672
|
const x = c.regenerateResponsePrompt.replace("{0}", h);
|
|
3669
3673
|
o("direct-agent-chat", l.value, x);
|
|
3670
3674
|
}
|
|
3671
3675
|
return le(
|
|
3672
3676
|
() => t.availableAgents,
|
|
3673
3677
|
(h, x) => {
|
|
3674
|
-
h.length === 0 && x.length > 0 && (l.value = "", u.value = "", te(),
|
|
3678
|
+
h.length === 0 && x.length > 0 && (l.value = "", u.value = "", te(), B());
|
|
3675
3679
|
}
|
|
3676
3680
|
), le(
|
|
3677
3681
|
() => t.agentData,
|
|
@@ -3682,7 +3686,7 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3682
3686
|
},
|
|
3683
3687
|
{ deep: !0 }
|
|
3684
3688
|
), (h, x) => (y(), A("div", Fr, [
|
|
3685
|
-
|
|
3689
|
+
L("div", Or, [
|
|
3686
3690
|
S(f(Ir), {
|
|
3687
3691
|
disabled: Q.value,
|
|
3688
3692
|
"available-agents": t.availableAgents,
|
|
@@ -3690,7 +3694,7 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3690
3694
|
onClear: q,
|
|
3691
3695
|
onChangeChat: U
|
|
3692
3696
|
}, null, 8, ["disabled", "available-agents", "selected-agent-key"]),
|
|
3693
|
-
|
|
3697
|
+
L("div", {
|
|
3694
3698
|
ref_key: "messagesContainer",
|
|
3695
3699
|
ref: a,
|
|
3696
3700
|
class: "q-chatbot__messages-container",
|
|
@@ -3709,13 +3713,13 @@ const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
|
3709
3713
|
"api-endpoint": t.apiEndpoint,
|
|
3710
3714
|
"session-i-d": N.sessionID,
|
|
3711
3715
|
fields: N.fields,
|
|
3712
|
-
onRegenerate:
|
|
3713
|
-
onApplyFields:
|
|
3716
|
+
onRegenerate: H,
|
|
3717
|
+
onApplyFields: R
|
|
3714
3718
|
}), null, 16, ["date-format", "user-image", "chatbot-image", "loading", "file", "api-endpoint", "session-i-d", "fields"])
|
|
3715
3719
|
], 2))), 128))
|
|
3716
3720
|
], 544)
|
|
3717
3721
|
]),
|
|
3718
|
-
|
|
3722
|
+
L("div", Ur, [
|
|
3719
3723
|
S(f(Mr), {
|
|
3720
3724
|
disabled: Q.value,
|
|
3721
3725
|
loading: f(p),
|