@quidgest/chatbot 0.6.3 → 0.6.4
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 +10 -9
- package/dist/index.mjs +802 -770
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/ChatBot/ChatBot.vue +6 -1
- package/src/components/MarkdownRender/MarkdownRender.vue +39 -1
- package/src/components/MarkdownRender/__tests__/MarkdownRender.spec.ts +13 -0
- package/src/components/MarkdownRender/markdown-render.scss +44 -0
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getCurrentInstance as ut, computed as w, inject as dt, ref as q, provide as an, defineComponent as V, openBlock as y, createElementBlock as x, normalizeClass as
|
|
1
|
+
import { getCurrentInstance as ut, computed as w, inject as dt, ref as q, provide as an, defineComponent as V, openBlock as y, createElementBlock as x, normalizeClass as K, normalizeStyle as Ie, unref as f, toRef as Le, withModifiers as Ue, createVNode as D, createCommentVNode as O, createElementVNode as T, renderSlot as P, createTextVNode as Qe, toDisplayString as se, createBlock as W, resolveDynamicComponent as Bt, h as at, mergeProps as pe, useTemplateRef as Lt, withCtx as R, normalizeProps as Re, guardReactiveProps as Ge, mergeModels as be, useModel as Te, watch as ce, createSlots as Rt, withDirectives as Tt, vModelDynamic as ln, useId as rn, onMounted as Me, onUnmounted as Mt, readonly as sn, customRef as cn, getCurrentScope as un, onScopeDispose as qt, shallowRef as lt, nextTick as De, toValue as pt, reactive as ze, onBeforeUnmount as dn, Fragment as ve, Teleport as pn, Transition as bt, renderList as qe, toHandlers as fn, vModelText as vn, resolveComponent as mn, withKeys as gn, onBeforeMount as bn } from "vue";
|
|
2
2
|
import Nt from "axios";
|
|
3
3
|
import hn from "markdown-it";
|
|
4
4
|
function it(e) {
|
|
@@ -54,8 +54,8 @@ const _n = ["id"], xn = /* @__PURE__ */ V({
|
|
|
54
54
|
}));
|
|
55
55
|
return (o, l) => (y(), x("div", {
|
|
56
56
|
id: n.id,
|
|
57
|
-
class:
|
|
58
|
-
style:
|
|
57
|
+
class: K(["q-spinner-loader", n.class]),
|
|
58
|
+
style: Ie(t.value)
|
|
59
59
|
}, null, 14, _n));
|
|
60
60
|
}
|
|
61
61
|
});
|
|
@@ -70,7 +70,7 @@ function An(e, n) {
|
|
|
70
70
|
const o = $n(n);
|
|
71
71
|
return o ? typeof ((t = e.props) == null ? void 0 : t[o]) < "u" : !1;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function ee(e) {
|
|
74
74
|
const n = e, t = n.setup;
|
|
75
75
|
return t && (n.setup = (o, l) => {
|
|
76
76
|
const a = yn();
|
|
@@ -80,15 +80,15 @@ function K(e) {
|
|
|
80
80
|
const r = new Proxy(o, {
|
|
81
81
|
get(c, u) {
|
|
82
82
|
var d;
|
|
83
|
-
const s = Reflect.get(c, u),
|
|
84
|
-
return typeof u == "string" && !An(i.vnode, u) ?
|
|
83
|
+
const s = Reflect.get(c, u), h = (d = a.value) == null ? void 0 : d[u];
|
|
84
|
+
return typeof u == "string" && !An(i.vnode, u) ? h ?? s : s;
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
87
|
return t(r, l);
|
|
88
88
|
}), e;
|
|
89
89
|
}
|
|
90
|
-
const
|
|
91
|
-
function
|
|
90
|
+
const In = ee(xn);
|
|
91
|
+
function En(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
|
}
|
|
94
94
|
function Cn(e) {
|
|
@@ -99,7 +99,7 @@ function Cn(e) {
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
function Sn(e) {
|
|
102
|
-
if (
|
|
102
|
+
if (En(e)) {
|
|
103
103
|
e.length === 4 && (e = "#" + e[1] + e[1] + e[2] + e[2] + e[3] + e[3]);
|
|
104
104
|
const n = parseInt(e.slice(1, 3), 16), t = parseInt(e.slice(3, 5), 16), o = parseInt(e.slice(5, 7), 16);
|
|
105
105
|
return { r: n, g: t, b: o };
|
|
@@ -175,7 +175,7 @@ function Ut() {
|
|
|
175
175
|
throw new Error("[Quidgest UI] Could not find theme instance");
|
|
176
176
|
return e;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function jt(e) {
|
|
179
179
|
const n = w(() => f(e)), t = w(
|
|
180
180
|
() => n.value ? !Mn(n.value) : !1
|
|
181
181
|
), o = w(() => {
|
|
@@ -184,14 +184,14 @@ function Gt(e) {
|
|
|
184
184
|
let a = l;
|
|
185
185
|
const i = Ut();
|
|
186
186
|
if (t.value) {
|
|
187
|
-
const
|
|
188
|
-
a = i.current.value.scheme[
|
|
187
|
+
const h = l;
|
|
188
|
+
a = i.current.value.scheme[h] ?? l;
|
|
189
189
|
}
|
|
190
190
|
let r;
|
|
191
191
|
try {
|
|
192
192
|
if (r = Sn(a), !r) return;
|
|
193
|
-
} catch (
|
|
194
|
-
console.error("Failed to parse color:",
|
|
193
|
+
} catch (h) {
|
|
194
|
+
console.error("Failed to parse color:", h);
|
|
195
195
|
return;
|
|
196
196
|
}
|
|
197
197
|
const c = Ot(r), u = Rn(c.l), d = Dn(r, 25), s = Bn(d);
|
|
@@ -235,14 +235,14 @@ const qn = ["id", "disabled"], Nn = {
|
|
|
235
235
|
function a(d) {
|
|
236
236
|
l.value || o("click", d);
|
|
237
237
|
}
|
|
238
|
-
const { isUtilityColor: i, style: r } =
|
|
239
|
-
const d = i.value ? `q-button--${t.color}` : void 0, s = t.size !== "regular" ? `q-button--${t.size}` : void 0,
|
|
238
|
+
const { isUtilityColor: i, style: r } = jt(Le(t, "color")), c = w(() => {
|
|
239
|
+
const d = i.value ? `q-button--${t.color}` : void 0, s = t.size !== "regular" ? `q-button--${t.size}` : void 0, h = t.iconPos !== "start" ? `q-button--icon-${t.iconPos}` : void 0;
|
|
240
240
|
return [
|
|
241
241
|
"q-button",
|
|
242
242
|
`q-button--${t.variant}`,
|
|
243
243
|
d,
|
|
244
244
|
s,
|
|
245
|
-
|
|
245
|
+
h,
|
|
246
246
|
{
|
|
247
247
|
"q-button--borderless": t.borderless,
|
|
248
248
|
"q-button--elevated": t.elevated,
|
|
@@ -253,39 +253,39 @@ const qn = ["id", "disabled"], Nn = {
|
|
|
253
253
|
t.class
|
|
254
254
|
];
|
|
255
255
|
}), u = w(() => {
|
|
256
|
-
var d, s,
|
|
256
|
+
var d, s, h, v, m, _;
|
|
257
257
|
if (!i.value)
|
|
258
258
|
return {
|
|
259
259
|
"--q-button-main-color": (d = r.value) == null ? void 0 : d.mainColor,
|
|
260
260
|
"--q-button-main-color-rgb": (s = r.value) == null ? void 0 : s.mainColorRgb,
|
|
261
|
-
"--q-button-on-main-color": (
|
|
262
|
-
"--q-button-hover-color": (
|
|
263
|
-
"--q-button-hover-color-rgb": (
|
|
261
|
+
"--q-button-on-main-color": (h = r.value) == null ? void 0 : h.onMainColor,
|
|
262
|
+
"--q-button-hover-color": (v = r.value) == null ? void 0 : v.hoverColor,
|
|
263
|
+
"--q-button-hover-color-rgb": (m = r.value) == null ? void 0 : m.hoverColorRgb,
|
|
264
264
|
"--q-button-on-hover-color": (_ = r.value) == null ? void 0 : _.onHoverColor
|
|
265
265
|
};
|
|
266
266
|
});
|
|
267
267
|
return (d, s) => (y(), x("button", {
|
|
268
268
|
id: t.id,
|
|
269
269
|
type: "button",
|
|
270
|
-
class:
|
|
270
|
+
class: K(c.value),
|
|
271
271
|
disabled: l.value,
|
|
272
|
-
style:
|
|
272
|
+
style: Ie(u.value),
|
|
273
273
|
onClick: Ue(a, ["stop", "prevent"])
|
|
274
274
|
}, [
|
|
275
275
|
t.loading ? (y(), x("div", Nn, [
|
|
276
|
-
D(f(
|
|
277
|
-
])) :
|
|
278
|
-
|
|
279
|
-
|
|
276
|
+
D(f(In))
|
|
277
|
+
])) : O("v-if", !0),
|
|
278
|
+
T("span", Fn, [
|
|
279
|
+
P(d.$slots, "default"),
|
|
280
280
|
Qe(
|
|
281
|
-
" " +
|
|
281
|
+
" " + se(t.label),
|
|
282
282
|
1
|
|
283
283
|
/* TEXT */
|
|
284
284
|
)
|
|
285
285
|
])
|
|
286
286
|
], 14, qn));
|
|
287
287
|
}
|
|
288
|
-
}), oe =
|
|
288
|
+
}), oe = ee(Pn), On = /* @__PURE__ */ V({
|
|
289
289
|
__name: "QIcon",
|
|
290
290
|
props: {
|
|
291
291
|
id: {},
|
|
@@ -307,21 +307,21 @@ const qn = ["id", "disabled"], Nn = {
|
|
|
307
307
|
default:
|
|
308
308
|
return;
|
|
309
309
|
}
|
|
310
|
-
}), { style: o } =
|
|
310
|
+
}), { style: o } = jt(Le(n, "color")), l = w(() => {
|
|
311
311
|
var a;
|
|
312
312
|
return {
|
|
313
313
|
"font-size": n.size !== void 0 ? `${n.size}px` : void 0,
|
|
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(), W(Bt(t.value), {
|
|
318
318
|
id: n.id,
|
|
319
|
-
class:
|
|
319
|
+
class: K(n.class),
|
|
320
320
|
icon: n.icon,
|
|
321
|
-
style:
|
|
321
|
+
style: Ie(l.value)
|
|
322
322
|
}, null, 8, ["id", "class", "icon", "style"]));
|
|
323
323
|
}
|
|
324
|
-
}), Un = ["id"],
|
|
324
|
+
}), Un = ["id"], jn = /* @__PURE__ */ V({
|
|
325
325
|
__name: "QIconFont",
|
|
326
326
|
props: {
|
|
327
327
|
id: {},
|
|
@@ -334,10 +334,10 @@ const qn = ["id", "disabled"], Nn = {
|
|
|
334
334
|
const n = e, t = w(() => n.variant ? `${n.library}-${n.variant}` : n.library), o = w(() => n.library && n.icon ? `${n.library}-${n.icon}` : n.icon);
|
|
335
335
|
return (l, a) => (y(), x("i", {
|
|
336
336
|
id: n.id,
|
|
337
|
-
class:
|
|
337
|
+
class: K(["q-icon", "q-icon__font", t.value, o.value, n.class])
|
|
338
338
|
}, null, 10, Un));
|
|
339
339
|
}
|
|
340
|
-
}),
|
|
340
|
+
}), Gn = ["id", "src"], zn = /* @__PURE__ */ V({
|
|
341
341
|
__name: "QIconImg",
|
|
342
342
|
props: {
|
|
343
343
|
id: {},
|
|
@@ -349,8 +349,8 @@ const qn = ["id", "disabled"], Nn = {
|
|
|
349
349
|
return (t, o) => (y(), x("img", {
|
|
350
350
|
id: n.id,
|
|
351
351
|
src: n.icon,
|
|
352
|
-
class:
|
|
353
|
-
}, null, 10,
|
|
352
|
+
class: K(["q-icon", "q-icon__img", n.class])
|
|
353
|
+
}, null, 10, Gn));
|
|
354
354
|
}
|
|
355
355
|
}), Ce = {}, Vn = V({
|
|
356
356
|
name: "InlineSvg",
|
|
@@ -497,16 +497,16 @@ const Wn = /* @__PURE__ */ V({
|
|
|
497
497
|
function a() {
|
|
498
498
|
o("unloaded");
|
|
499
499
|
}
|
|
500
|
-
return (i, r) => (y(),
|
|
500
|
+
return (i, r) => (y(), W(f(Vn), {
|
|
501
501
|
id: t.id,
|
|
502
|
-
class:
|
|
502
|
+
class: K(["q-icon", "q-icon__svg", t.class]),
|
|
503
503
|
src: t.bundle,
|
|
504
504
|
symbol: t.icon,
|
|
505
505
|
onLoaded: l,
|
|
506
506
|
onUnloaded: a
|
|
507
507
|
}, null, 8, ["id", "class", "src", "symbol"]));
|
|
508
508
|
}
|
|
509
|
-
}),
|
|
509
|
+
}), X = ee(On), Jn = ee(jn), Qn = ee(zn), Yn = ee(Wn);
|
|
510
510
|
let Xn = 0;
|
|
511
511
|
function vt(e) {
|
|
512
512
|
return f(e) || `uid-${++Xn}`;
|
|
@@ -529,7 +529,7 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
|
|
|
529
529
|
}
|
|
530
530
|
}), (t, o) => (y(), x("div", {
|
|
531
531
|
id: n.id,
|
|
532
|
-
class:
|
|
532
|
+
class: K([
|
|
533
533
|
"q-button-group",
|
|
534
534
|
{
|
|
535
535
|
"q-button-group--elevated": n.elevated
|
|
@@ -538,10 +538,10 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
|
|
|
538
538
|
]),
|
|
539
539
|
role: "group"
|
|
540
540
|
}, [
|
|
541
|
-
|
|
541
|
+
P(t.$slots, "default")
|
|
542
542
|
], 10, Kn));
|
|
543
543
|
}
|
|
544
|
-
}),
|
|
544
|
+
}), Gt = ee(eo), to = ["id"], no = ["for"], oo = /* @__PURE__ */ V({
|
|
545
545
|
inheritAttrs: !1,
|
|
546
546
|
__name: "QLabel",
|
|
547
547
|
props: {
|
|
@@ -561,24 +561,24 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
|
|
|
561
561
|
]);
|
|
562
562
|
return (o, l) => (y(), x("div", {
|
|
563
563
|
id: n.id,
|
|
564
|
-
class:
|
|
564
|
+
class: K(t.value)
|
|
565
565
|
}, [
|
|
566
|
-
|
|
567
|
-
|
|
566
|
+
P(o.$slots, "prepend"),
|
|
567
|
+
T("label", pe({
|
|
568
568
|
for: n.for
|
|
569
569
|
}, o.$attrs), [
|
|
570
|
-
|
|
570
|
+
P(o.$slots, "default", {}, () => [
|
|
571
571
|
Qe(
|
|
572
|
-
|
|
572
|
+
se(n.label),
|
|
573
573
|
1
|
|
574
574
|
/* TEXT */
|
|
575
575
|
)
|
|
576
576
|
])
|
|
577
577
|
], 16, no),
|
|
578
|
-
|
|
578
|
+
P(o.$slots, "append")
|
|
579
579
|
], 10, to));
|
|
580
580
|
}
|
|
581
|
-
}), zt =
|
|
581
|
+
}), zt = ee(oo), ao = ["id"], lo = {
|
|
582
582
|
key: 0,
|
|
583
583
|
class: "q-field__prepend"
|
|
584
584
|
}, io = {
|
|
@@ -617,9 +617,9 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
|
|
|
617
617
|
fieldRef: o
|
|
618
618
|
}), (i, r) => (y(), x("div", {
|
|
619
619
|
id: t.id,
|
|
620
|
-
class:
|
|
620
|
+
class: K(a.value)
|
|
621
621
|
}, [
|
|
622
|
-
t.label ? (y(),
|
|
622
|
+
t.label ? (y(), W(f(zt), {
|
|
623
623
|
key: 0,
|
|
624
624
|
class: "q-field__label",
|
|
625
625
|
label: t.label,
|
|
@@ -627,16 +627,16 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
|
|
|
627
627
|
required: t.required
|
|
628
628
|
}, {
|
|
629
629
|
prepend: R(() => [
|
|
630
|
-
|
|
630
|
+
P(i.$slots, "label.prepend")
|
|
631
631
|
]),
|
|
632
632
|
append: R(() => [
|
|
633
|
-
|
|
633
|
+
P(i.$slots, "label.append")
|
|
634
634
|
]),
|
|
635
635
|
_: 3
|
|
636
636
|
/* FORWARDED */
|
|
637
|
-
}, 8, ["label", "for", "required"])) :
|
|
638
|
-
|
|
639
|
-
|
|
637
|
+
}, 8, ["label", "for", "required"])) : O("v-if", !0),
|
|
638
|
+
P(i.$slots, "control", {}, () => [
|
|
639
|
+
T(
|
|
640
640
|
"div",
|
|
641
641
|
pe({
|
|
642
642
|
ref: "field",
|
|
@@ -644,23 +644,23 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
|
|
|
644
644
|
}, i.$attrs),
|
|
645
645
|
[
|
|
646
646
|
i.$slots.prepend ? (y(), x("div", lo, [
|
|
647
|
-
|
|
648
|
-
])) :
|
|
649
|
-
|
|
647
|
+
P(i.$slots, "prepend")
|
|
648
|
+
])) : O("v-if", !0),
|
|
649
|
+
P(i.$slots, "default"),
|
|
650
650
|
i.$slots.append ? (y(), x("div", io, [
|
|
651
|
-
|
|
652
|
-
])) :
|
|
651
|
+
P(i.$slots, "append")
|
|
652
|
+
])) : O("v-if", !0)
|
|
653
653
|
],
|
|
654
654
|
16
|
|
655
655
|
/* FULL_PROPS */
|
|
656
656
|
)
|
|
657
657
|
]),
|
|
658
658
|
i.$slots.extras ? (y(), x("div", ro, [
|
|
659
|
-
|
|
660
|
-
])) :
|
|
659
|
+
P(i.$slots, "extras")
|
|
660
|
+
])) : O("v-if", !0)
|
|
661
661
|
], 10, ao));
|
|
662
662
|
}
|
|
663
|
-
}), Vt =
|
|
663
|
+
}), Vt = ee(so), co = {
|
|
664
664
|
clearValue: "Clear value"
|
|
665
665
|
}, uo = {
|
|
666
666
|
clear: {
|
|
@@ -680,9 +680,9 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
|
|
|
680
680
|
function l(a) {
|
|
681
681
|
o("click", a);
|
|
682
682
|
}
|
|
683
|
-
return (a, i) => (y(),
|
|
683
|
+
return (a, i) => (y(), W(f(oe), {
|
|
684
684
|
id: t.id,
|
|
685
|
-
class:
|
|
685
|
+
class: K(["q-clear-btn", t.class]),
|
|
686
686
|
"aria-label": t.texts.clearValue,
|
|
687
687
|
variant: "ghost",
|
|
688
688
|
color: "neutral",
|
|
@@ -692,8 +692,8 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
|
|
|
692
692
|
}, {
|
|
693
693
|
default: R(() => [
|
|
694
694
|
D(
|
|
695
|
-
f(
|
|
696
|
-
Re(
|
|
695
|
+
f(X),
|
|
696
|
+
Re(Ge(t.icons.clear)),
|
|
697
697
|
null,
|
|
698
698
|
16
|
|
699
699
|
/* FULL_PROPS */
|
|
@@ -703,7 +703,7 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
|
|
|
703
703
|
/* STABLE */
|
|
704
704
|
}, 8, ["id", "class", "aria-label"]));
|
|
705
705
|
}
|
|
706
|
-
}), fo =
|
|
706
|
+
}), fo = ee(po), vo = ["id", "type", "maxlength", "required", "placeholder", "readonly", "disabled"], mo = /* @__PURE__ */ V({
|
|
707
707
|
inheritAttrs: !1,
|
|
708
708
|
__name: "QTextField",
|
|
709
709
|
props: /* @__PURE__ */ be({
|
|
@@ -729,28 +729,28 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
|
|
|
729
729
|
setup(e, { expose: n, emit: t }) {
|
|
730
730
|
const o = e, l = t, a = Te(e, "modelValue"), i = w({
|
|
731
731
|
get: () => a.value,
|
|
732
|
-
set: (
|
|
732
|
+
set: (m) => {
|
|
733
733
|
const _ = o.maxLength;
|
|
734
|
-
a.value = _ ?
|
|
734
|
+
a.value = _ ? m == null ? void 0 : m.slice(0, _) : m;
|
|
735
735
|
}
|
|
736
736
|
});
|
|
737
|
-
|
|
737
|
+
ce(a, (m) => i.value = m, { immediate: !0 });
|
|
738
738
|
const r = vt(o.id), c = q(null), u = q(null), d = w(
|
|
739
739
|
() => o.readonly || o.disabled ? void 0 : o.placeholder
|
|
740
|
-
), s = w(() => o.clearable && !o.readonly && !o.disabled),
|
|
741
|
-
function
|
|
742
|
-
s.value && (a.value = "", l("click:clear",
|
|
740
|
+
), s = w(() => o.clearable && !o.readonly && !o.disabled), h = w(() => s.value && a.value);
|
|
741
|
+
function v(m) {
|
|
742
|
+
s.value && (a.value = "", l("click:clear", m));
|
|
743
743
|
}
|
|
744
744
|
return n({
|
|
745
745
|
fieldRef: w(() => {
|
|
746
|
-
var
|
|
747
|
-
return (
|
|
746
|
+
var m;
|
|
747
|
+
return (m = c.value) == null ? void 0 : m.fieldRef;
|
|
748
748
|
}),
|
|
749
749
|
inputRef: u
|
|
750
|
-
}), (
|
|
750
|
+
}), (m, _) => (y(), W(f(Vt), {
|
|
751
751
|
ref_key: "fieldRef",
|
|
752
752
|
ref: c,
|
|
753
|
-
class:
|
|
753
|
+
class: K(["q-text-field", o.class]),
|
|
754
754
|
for: f(r),
|
|
755
755
|
label: o.label,
|
|
756
756
|
size: o.size,
|
|
@@ -760,17 +760,17 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
|
|
|
760
760
|
invalid: o.invalid
|
|
761
761
|
}, Rt({
|
|
762
762
|
"label.prepend": R(() => [
|
|
763
|
-
|
|
763
|
+
P(m.$slots, "label.prepend")
|
|
764
764
|
]),
|
|
765
765
|
"label.append": R(() => [
|
|
766
|
-
|
|
766
|
+
P(m.$slots, "label.append")
|
|
767
767
|
]),
|
|
768
768
|
default: R(() => [
|
|
769
|
-
Tt(
|
|
769
|
+
Tt(T("input", pe({
|
|
770
770
|
id: f(r),
|
|
771
771
|
ref_key: "inputRef",
|
|
772
772
|
ref: u,
|
|
773
|
-
"onUpdate:modelValue": _[0] || (_[0] = (
|
|
773
|
+
"onUpdate:modelValue": _[0] || (_[0] = (N) => i.value = N),
|
|
774
774
|
class: "q-text-field__input",
|
|
775
775
|
type: o.type,
|
|
776
776
|
maxlength: o.maxLength,
|
|
@@ -778,45 +778,45 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
|
|
|
778
778
|
placeholder: d.value,
|
|
779
779
|
readonly: o.readonly,
|
|
780
780
|
disabled: o.disabled
|
|
781
|
-
},
|
|
781
|
+
}, m.$attrs), null, 16, vo), [
|
|
782
782
|
[ln, i.value]
|
|
783
783
|
])
|
|
784
784
|
]),
|
|
785
785
|
_: 2
|
|
786
786
|
/* DYNAMIC */
|
|
787
787
|
}, [
|
|
788
|
-
|
|
788
|
+
m.$slots.prepend ? {
|
|
789
789
|
name: "prepend",
|
|
790
790
|
fn: R(() => [
|
|
791
|
-
|
|
791
|
+
P(m.$slots, "prepend")
|
|
792
792
|
]),
|
|
793
793
|
key: "0"
|
|
794
794
|
} : void 0,
|
|
795
|
-
|
|
795
|
+
m.$slots.append || h.value ? {
|
|
796
796
|
name: "append",
|
|
797
797
|
fn: R(() => [
|
|
798
|
-
|
|
799
|
-
|
|
798
|
+
P(m.$slots, "append"),
|
|
799
|
+
h.value ? (y(), W(f(fo), {
|
|
800
800
|
key: 0,
|
|
801
801
|
"data-testid": "q-text-field__clear-button",
|
|
802
802
|
texts: o.texts,
|
|
803
|
-
onClick:
|
|
804
|
-
}, null, 8, ["texts"])) :
|
|
803
|
+
onClick: v
|
|
804
|
+
}, null, 8, ["texts"])) : O("v-if", !0)
|
|
805
805
|
]),
|
|
806
806
|
key: "1"
|
|
807
807
|
} : void 0,
|
|
808
|
-
|
|
808
|
+
m.$slots.extras ? {
|
|
809
809
|
name: "extras",
|
|
810
810
|
fn: R(() => [
|
|
811
|
-
|
|
811
|
+
P(m.$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
|
-
}), Ht =
|
|
817
|
+
}), Ht = ee(mo), go = Symbol("DismissibleLayer");
|
|
818
818
|
function bo(e) {
|
|
819
|
-
const n = dt(
|
|
819
|
+
const n = dt(go);
|
|
820
820
|
if (!n)
|
|
821
821
|
throw new Error(
|
|
822
822
|
"useDismissibleLayerStackItem must be used within a dismissible layer stack context."
|
|
@@ -838,26 +838,26 @@ const ho = { ref: "layer" }, yo = /* @__PURE__ */ V({
|
|
|
838
838
|
}
|
|
839
839
|
function c(s) {
|
|
840
840
|
if (!o.value) return;
|
|
841
|
-
const
|
|
842
|
-
if (!o.value.contains(
|
|
843
|
-
const
|
|
841
|
+
const h = s.target;
|
|
842
|
+
if (!o.value.contains(h) && a != null && a.isTop()) {
|
|
843
|
+
const v = new CustomEvent("focus-outside", {
|
|
844
844
|
bubbles: !1,
|
|
845
845
|
cancelable: !0,
|
|
846
846
|
detail: { originalEvent: s }
|
|
847
847
|
});
|
|
848
|
-
t("focus-outside",
|
|
848
|
+
t("focus-outside", v), t("interact-outside", v), v.defaultPrevented || t("dismiss", v);
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
851
|
function u(s) {
|
|
852
852
|
if (!o.value || !(a != null && a.isTop())) return;
|
|
853
|
-
const
|
|
854
|
-
if (!o.value.contains(
|
|
855
|
-
const
|
|
853
|
+
const h = s.target;
|
|
854
|
+
if (!o.value.contains(h)) {
|
|
855
|
+
const v = new CustomEvent("pointer-down-outside", {
|
|
856
856
|
bubbles: !1,
|
|
857
857
|
cancelable: !0,
|
|
858
858
|
detail: { originalEvent: s }
|
|
859
859
|
});
|
|
860
|
-
t("pointer-down-outside",
|
|
860
|
+
t("pointer-down-outside", v), t("interact-outside", v), v.defaultPrevented || t("dismiss", v);
|
|
861
861
|
}
|
|
862
862
|
}
|
|
863
863
|
function d() {
|
|
@@ -881,17 +881,17 @@ const ho = { ref: "layer" }, yo = /* @__PURE__ */ V({
|
|
|
881
881
|
}), d();
|
|
882
882
|
}), Mt(() => {
|
|
883
883
|
a == null || a.unregister(), i.forEach((s) => s()), i = [];
|
|
884
|
-
}), (s,
|
|
884
|
+
}), (s, h) => (y(), x(
|
|
885
885
|
"div",
|
|
886
886
|
ho,
|
|
887
887
|
[
|
|
888
|
-
|
|
888
|
+
P(s.$slots, "default")
|
|
889
889
|
],
|
|
890
890
|
512
|
|
891
891
|
/* NEED_PATCH */
|
|
892
892
|
));
|
|
893
893
|
}
|
|
894
|
-
}), wo =
|
|
894
|
+
}), wo = ee(yo);
|
|
895
895
|
function _o(e) {
|
|
896
896
|
return un() ? (qt(e), !0) : !1;
|
|
897
897
|
}
|
|
@@ -905,7 +905,7 @@ function wt(...e) {
|
|
|
905
905
|
const n = e[0];
|
|
906
906
|
return typeof n == "function" ? sn(cn(() => ({ get: n, set: ko }))) : q(n);
|
|
907
907
|
}
|
|
908
|
-
const
|
|
908
|
+
const mt = xo ? window : void 0;
|
|
909
909
|
function rt(e) {
|
|
910
910
|
var n;
|
|
911
911
|
const t = pt(e);
|
|
@@ -921,21 +921,21 @@ function Ao(e) {
|
|
|
921
921
|
const n = $o();
|
|
922
922
|
return w(() => (n.value, !!e()));
|
|
923
923
|
}
|
|
924
|
-
function
|
|
925
|
-
const { window: o =
|
|
924
|
+
function Io(e, n, t = {}) {
|
|
925
|
+
const { window: o = mt, ...l } = t;
|
|
926
926
|
let a;
|
|
927
927
|
const i = Ao(() => o && "ResizeObserver" in o), r = () => {
|
|
928
928
|
a && (a.disconnect(), a = void 0);
|
|
929
929
|
}, c = w(() => {
|
|
930
930
|
const s = pt(e);
|
|
931
|
-
return Array.isArray(s) ? s.map((
|
|
932
|
-
}), u =
|
|
931
|
+
return Array.isArray(s) ? s.map((h) => rt(h)) : [rt(s)];
|
|
932
|
+
}), u = ce(
|
|
933
933
|
c,
|
|
934
934
|
(s) => {
|
|
935
935
|
if (r(), i.value && o) {
|
|
936
936
|
a = new ResizeObserver(n);
|
|
937
|
-
for (const
|
|
938
|
-
|
|
937
|
+
for (const h of s)
|
|
938
|
+
h && a.observe(h, l);
|
|
939
939
|
}
|
|
940
940
|
},
|
|
941
941
|
{ immediate: !0, flush: "post" }
|
|
@@ -947,29 +947,29 @@ function Eo(e, n, t = {}) {
|
|
|
947
947
|
stop: d
|
|
948
948
|
};
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function Eo(e = mt, n) {
|
|
951
951
|
e && typeof e.requestAnimationFrame == "function" ? e.requestAnimationFrame(n) : n();
|
|
952
952
|
}
|
|
953
953
|
function Co(e = {}) {
|
|
954
954
|
var n, t;
|
|
955
|
-
const { window: o =
|
|
955
|
+
const { window: o = mt } = e, l = wt(e == null ? void 0 : e.element), a = wt((n = e == null ? void 0 : e.input) != null ? n : ""), i = (t = e == null ? void 0 : e.styleProp) != null ? t : "height", r = lt(1), c = lt(0);
|
|
956
956
|
function u() {
|
|
957
957
|
var d;
|
|
958
958
|
if (!l.value)
|
|
959
959
|
return;
|
|
960
960
|
let s = "";
|
|
961
961
|
l.value.style[i] = "1px", r.value = (d = l.value) == null ? void 0 : d.scrollHeight;
|
|
962
|
-
const
|
|
963
|
-
|
|
962
|
+
const h = pt(e == null ? void 0 : e.styleTarget);
|
|
963
|
+
h ? h.style[i] = `${r.value}px` : s = `${r.value}px`, l.value.style[i] = s;
|
|
964
964
|
}
|
|
965
|
-
return
|
|
965
|
+
return ce([a, l], () => De(u), { immediate: !0 }), ce(r, () => {
|
|
966
966
|
var d;
|
|
967
967
|
return (d = e == null ? void 0 : e.onResize) == null ? void 0 : d.call(e);
|
|
968
|
-
}),
|
|
969
|
-
c.value !== d.width &&
|
|
968
|
+
}), Io(l, ([{ contentRect: d }]) => {
|
|
969
|
+
c.value !== d.width && Eo(o, () => {
|
|
970
970
|
c.value = d.width, u();
|
|
971
971
|
});
|
|
972
|
-
}), e != null && e.watch &&
|
|
972
|
+
}), e != null && e.watch && ce(e.watch, u, { immediate: !0, deep: !0 }), {
|
|
973
973
|
textarea: l,
|
|
974
974
|
input: a,
|
|
975
975
|
triggerResize: u
|
|
@@ -1012,12 +1012,12 @@ var Zt = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1012
1012
|
var d = xe.call(i, Ve);
|
|
1013
1013
|
d && o.filter(i) && (t || !n.includes(i)) && l.push(i);
|
|
1014
1014
|
var s = i.shadowRoot || // check for an undisclosed shadow
|
|
1015
|
-
typeof o.getShadowRoot == "function" && o.getShadowRoot(i),
|
|
1016
|
-
if (s &&
|
|
1017
|
-
var
|
|
1018
|
-
o.flatten ? l.push.apply(l,
|
|
1015
|
+
typeof o.getShadowRoot == "function" && o.getShadowRoot(i), h = !Ze(s, !1) && (!o.shadowRootFilter || o.shadowRootFilter(i));
|
|
1016
|
+
if (s && h) {
|
|
1017
|
+
var v = e(s === !0 ? i.children : s.children, !0, o);
|
|
1018
|
+
o.flatten ? l.push.apply(l, v) : l.push({
|
|
1019
1019
|
scopeParent: i,
|
|
1020
|
-
candidates:
|
|
1020
|
+
candidates: v
|
|
1021
1021
|
});
|
|
1022
1022
|
} else
|
|
1023
1023
|
a.unshift.apply(a, i.children);
|
|
@@ -1130,7 +1130,7 @@ var Zt = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1130
1130
|
}, Uo = function(e) {
|
|
1131
1131
|
var n = parseInt(e.getAttribute("tabindex"), 10);
|
|
1132
1132
|
return !!(isNaN(n) || n >= 0);
|
|
1133
|
-
},
|
|
1133
|
+
}, jo = function e(n) {
|
|
1134
1134
|
var t = [], o = [];
|
|
1135
1135
|
return n.forEach(function(l, a) {
|
|
1136
1136
|
var i = !!l.scopeParent, r = i ? l.scopeParent : l, c = Do(r, i), u = i ? e(l.candidates) : r;
|
|
@@ -1144,7 +1144,7 @@ var Zt = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1144
1144
|
}), o.sort(Bo).reduce(function(l, a) {
|
|
1145
1145
|
return a.isScope ? l.push.apply(l, a.content) : l.push(a.content), l;
|
|
1146
1146
|
}, []).concat(t);
|
|
1147
|
-
},
|
|
1147
|
+
}, Go = function(e, n) {
|
|
1148
1148
|
n = n || {};
|
|
1149
1149
|
var t;
|
|
1150
1150
|
return n.getShadowRoot ? t = Qt([e], n.includeContainer, {
|
|
@@ -1152,7 +1152,7 @@ var Zt = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1152
1152
|
flatten: !1,
|
|
1153
1153
|
getShadowRoot: n.getShadowRoot,
|
|
1154
1154
|
shadowRootFilter: Uo
|
|
1155
|
-
}) : t = Jt(e, n.includeContainer, st.bind(null, n)),
|
|
1155
|
+
}) : t = Jt(e, n.includeContainer, st.bind(null, n)), jo(t);
|
|
1156
1156
|
}, zo = function(e, n) {
|
|
1157
1157
|
n = n || {};
|
|
1158
1158
|
var t;
|
|
@@ -1317,35 +1317,35 @@ var $t = {
|
|
|
1317
1317
|
delayInitialFocusTimer: void 0,
|
|
1318
1318
|
// the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
|
|
1319
1319
|
recentNavEvent: void 0
|
|
1320
|
-
}, i, r = function(p,
|
|
1321
|
-
return p && p[
|
|
1322
|
-
}, c = function(p,
|
|
1323
|
-
var k = typeof (
|
|
1324
|
-
return a.containerGroups.findIndex(function(
|
|
1325
|
-
var L =
|
|
1320
|
+
}, i, r = function(p, b, k) {
|
|
1321
|
+
return p && p[b] !== void 0 ? p[b] : l[k || b];
|
|
1322
|
+
}, c = function(p, b) {
|
|
1323
|
+
var k = typeof (b == null ? void 0 : b.composedPath) == "function" ? b.composedPath() : void 0;
|
|
1324
|
+
return a.containerGroups.findIndex(function(F) {
|
|
1325
|
+
var L = F.container, C = F.tabbableNodes;
|
|
1326
1326
|
return L.contains(p) || // fall back to explicit tabbable search which will take into consideration any
|
|
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
|
-
(k == null ? void 0 : k.includes(L)) || C.find(function(
|
|
1331
|
-
return
|
|
1330
|
+
(k == null ? void 0 : k.includes(L)) || C.find(function(E) {
|
|
1331
|
+
return E === p;
|
|
1332
1332
|
});
|
|
1333
1333
|
});
|
|
1334
1334
|
}, u = function(p) {
|
|
1335
|
-
var
|
|
1336
|
-
if (typeof
|
|
1337
|
-
if (
|
|
1338
|
-
return
|
|
1335
|
+
var b = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, k = b.hasFallback, F = k === void 0 ? !1 : k, L = b.params, C = L === void 0 ? [] : L, E = l[p];
|
|
1336
|
+
if (typeof E == "function" && (E = E.apply(void 0, Qo(C))), E === !0 && (E = void 0), !E) {
|
|
1337
|
+
if (E === void 0 || E === !1)
|
|
1338
|
+
return E;
|
|
1339
1339
|
throw new Error("`".concat(p, "` was specified but was not a node, or did not return a node"));
|
|
1340
1340
|
}
|
|
1341
|
-
var z =
|
|
1342
|
-
if (typeof
|
|
1341
|
+
var z = E;
|
|
1342
|
+
if (typeof E == "string") {
|
|
1343
1343
|
try {
|
|
1344
|
-
z = t.querySelector(
|
|
1345
|
-
} catch (
|
|
1346
|
-
throw new Error("`".concat(p, '` appears to be an invalid selector; error="').concat(
|
|
1344
|
+
z = t.querySelector(E);
|
|
1345
|
+
} catch (j) {
|
|
1346
|
+
throw new Error("`".concat(p, '` appears to be an invalid selector; error="').concat(j.message, '"'));
|
|
1347
1347
|
}
|
|
1348
|
-
if (!z && !
|
|
1348
|
+
if (!z && !F)
|
|
1349
1349
|
throw new Error("`".concat(p, "` as selector refers to no known node"));
|
|
1350
1350
|
}
|
|
1351
1351
|
return z;
|
|
@@ -1359,7 +1359,7 @@ var $t = {
|
|
|
1359
1359
|
if (c(t.activeElement) >= 0)
|
|
1360
1360
|
p = t.activeElement;
|
|
1361
1361
|
else {
|
|
1362
|
-
var
|
|
1362
|
+
var b = a.tabbableGroups[0], k = b && b.firstTabbableNode;
|
|
1363
1363
|
p = k || u("fallbackFocus");
|
|
1364
1364
|
}
|
|
1365
1365
|
else p === null && (p = u("fallbackFocus"));
|
|
@@ -1368,21 +1368,21 @@ var $t = {
|
|
|
1368
1368
|
return p;
|
|
1369
1369
|
}, s = function() {
|
|
1370
1370
|
if (a.containerGroups = a.containers.map(function(p) {
|
|
1371
|
-
var
|
|
1372
|
-
return $e(
|
|
1373
|
-
}),
|
|
1374
|
-
return $e(
|
|
1375
|
-
}), z = !!
|
|
1376
|
-
return _e(
|
|
1371
|
+
var b = Go(p, l.tabbableOptions), k = zo(p, l.tabbableOptions), F = b.length > 0 ? b[0] : void 0, L = b.length > 0 ? b[b.length - 1] : void 0, C = k.find(function(j) {
|
|
1372
|
+
return $e(j);
|
|
1373
|
+
}), E = k.slice().reverse().find(function(j) {
|
|
1374
|
+
return $e(j);
|
|
1375
|
+
}), z = !!b.find(function(j) {
|
|
1376
|
+
return _e(j) > 0;
|
|
1377
1377
|
});
|
|
1378
1378
|
return {
|
|
1379
1379
|
container: p,
|
|
1380
|
-
tabbableNodes:
|
|
1380
|
+
tabbableNodes: b,
|
|
1381
1381
|
focusableNodes: k,
|
|
1382
1382
|
/** True if at least one node with positive `tabindex` was found in this container. */
|
|
1383
1383
|
posTabIndexesFound: z,
|
|
1384
1384
|
/** First tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
1385
|
-
firstTabbableNode:
|
|
1385
|
+
firstTabbableNode: F,
|
|
1386
1386
|
/** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
1387
1387
|
lastTabbableNode: L,
|
|
1388
1388
|
// NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
|
|
@@ -1395,7 +1395,7 @@ var $t = {
|
|
|
1395
1395
|
/** First tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
1396
1396
|
firstDomTabbableNode: C,
|
|
1397
1397
|
/** Last tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
1398
|
-
lastDomTabbableNode:
|
|
1398
|
+
lastDomTabbableNode: E,
|
|
1399
1399
|
/**
|
|
1400
1400
|
* Finds the __tabbable__ node that follows the given node in the specified direction,
|
|
1401
1401
|
* in this container, if any.
|
|
@@ -1404,13 +1404,13 @@ var $t = {
|
|
|
1404
1404
|
* in reverse.
|
|
1405
1405
|
* @returns {HTMLElement|undefined} The next tabbable node, if any.
|
|
1406
1406
|
*/
|
|
1407
|
-
nextTabbableNode: function(
|
|
1408
|
-
var ae = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0,
|
|
1409
|
-
return
|
|
1410
|
-
return $e(
|
|
1411
|
-
}) : k.slice(0, k.indexOf(
|
|
1412
|
-
return $e(
|
|
1413
|
-
}) :
|
|
1407
|
+
nextTabbableNode: function(j) {
|
|
1408
|
+
var ae = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, ue = b.indexOf(j);
|
|
1409
|
+
return ue < 0 ? ae ? k.slice(k.indexOf(j) + 1).find(function(ne) {
|
|
1410
|
+
return $e(ne);
|
|
1411
|
+
}) : k.slice(0, k.indexOf(j)).reverse().find(function(ne) {
|
|
1412
|
+
return $e(ne);
|
|
1413
|
+
}) : b[ue + (ae ? 1 : -1)];
|
|
1414
1414
|
}
|
|
1415
1415
|
};
|
|
1416
1416
|
}), a.tabbableGroups = a.containerGroups.filter(function(p) {
|
|
@@ -1421,58 +1421,58 @@ var $t = {
|
|
|
1421
1421
|
return p.posTabIndexesFound;
|
|
1422
1422
|
}) && a.containerGroups.length > 1)
|
|
1423
1423
|
throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
|
|
1424
|
+
}, h = function(p) {
|
|
1425
|
+
var b = p.activeElement;
|
|
1426
|
+
if (b)
|
|
1427
|
+
return b.shadowRoot && b.shadowRoot.activeElement !== null ? h(b.shadowRoot) : b;
|
|
1424
1428
|
}, v = function(p) {
|
|
1425
|
-
|
|
1426
|
-
if (m)
|
|
1427
|
-
return m.shadowRoot && m.shadowRoot.activeElement !== null ? v(m.shadowRoot) : m;
|
|
1428
|
-
}, b = function(p) {
|
|
1429
|
-
if (p !== !1 && p !== v(document)) {
|
|
1429
|
+
if (p !== !1 && p !== h(document)) {
|
|
1430
1430
|
if (!p || !p.focus) {
|
|
1431
|
-
|
|
1431
|
+
v(d());
|
|
1432
1432
|
return;
|
|
1433
1433
|
}
|
|
1434
1434
|
p.focus({
|
|
1435
1435
|
preventScroll: !!l.preventScroll
|
|
1436
1436
|
}), a.mostRecentlyFocusedNode = p, ea(p) && p.select();
|
|
1437
1437
|
}
|
|
1438
|
-
},
|
|
1439
|
-
var
|
|
1438
|
+
}, m = function(p) {
|
|
1439
|
+
var b = u("setReturnFocus", {
|
|
1440
1440
|
params: [p]
|
|
1441
1441
|
});
|
|
1442
|
-
return
|
|
1442
|
+
return b || (b === !1 ? !1 : p);
|
|
1443
1443
|
}, _ = function(p) {
|
|
1444
|
-
var
|
|
1445
|
-
|
|
1444
|
+
var b = p.target, k = p.event, F = p.isBackward, L = F === void 0 ? !1 : F;
|
|
1445
|
+
b = b || Fe(k), s();
|
|
1446
1446
|
var C = null;
|
|
1447
1447
|
if (a.tabbableGroups.length > 0) {
|
|
1448
|
-
var
|
|
1449
|
-
if (
|
|
1448
|
+
var E = c(b, k), z = E >= 0 ? a.containerGroups[E] : void 0;
|
|
1449
|
+
if (E < 0)
|
|
1450
1450
|
L ? C = a.tabbableGroups[a.tabbableGroups.length - 1].lastTabbableNode : C = a.tabbableGroups[0].firstTabbableNode;
|
|
1451
1451
|
else if (L) {
|
|
1452
|
-
var
|
|
1453
|
-
var ye =
|
|
1454
|
-
return
|
|
1452
|
+
var j = a.tabbableGroups.findIndex(function(ge) {
|
|
1453
|
+
var ye = ge.firstTabbableNode;
|
|
1454
|
+
return b === ye;
|
|
1455
1455
|
});
|
|
1456
|
-
if (
|
|
1457
|
-
var ae =
|
|
1458
|
-
C = _e(
|
|
1459
|
-
} else Be(k) || (C = z.nextTabbableNode(
|
|
1456
|
+
if (j < 0 && (z.container === b || Ke(b, l.tabbableOptions) && !$e(b, l.tabbableOptions) && !z.nextTabbableNode(b, !1)) && (j = E), j >= 0) {
|
|
1457
|
+
var ae = j === 0 ? a.tabbableGroups.length - 1 : j - 1, ue = a.tabbableGroups[ae];
|
|
1458
|
+
C = _e(b) >= 0 ? ue.lastTabbableNode : ue.lastDomTabbableNode;
|
|
1459
|
+
} else Be(k) || (C = z.nextTabbableNode(b, !1));
|
|
1460
1460
|
} else {
|
|
1461
|
-
var
|
|
1462
|
-
var ye =
|
|
1463
|
-
return
|
|
1461
|
+
var ne = a.tabbableGroups.findIndex(function(ge) {
|
|
1462
|
+
var ye = ge.lastTabbableNode;
|
|
1463
|
+
return b === ye;
|
|
1464
1464
|
});
|
|
1465
|
-
if (
|
|
1466
|
-
var he =
|
|
1467
|
-
C = _e(
|
|
1468
|
-
} else Be(k) || (C = z.nextTabbableNode(
|
|
1465
|
+
if (ne < 0 && (z.container === b || Ke(b, l.tabbableOptions) && !$e(b, l.tabbableOptions) && !z.nextTabbableNode(b)) && (ne = E), ne >= 0) {
|
|
1466
|
+
var he = ne === a.tabbableGroups.length - 1 ? 0 : ne + 1, me = a.tabbableGroups[he];
|
|
1467
|
+
C = _e(b) >= 0 ? me.firstTabbableNode : me.firstDomTabbableNode;
|
|
1468
|
+
} else Be(k) || (C = z.nextTabbableNode(b));
|
|
1469
1469
|
}
|
|
1470
1470
|
} else
|
|
1471
1471
|
C = u("fallbackFocus");
|
|
1472
1472
|
return C;
|
|
1473
|
-
},
|
|
1474
|
-
var
|
|
1475
|
-
if (!(c(
|
|
1473
|
+
}, N = function(p) {
|
|
1474
|
+
var b = Fe(p);
|
|
1475
|
+
if (!(c(b, p) >= 0)) {
|
|
1476
1476
|
if (Se(l.clickOutsideDeactivates, p)) {
|
|
1477
1477
|
i.deactivate({
|
|
1478
1478
|
// NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
|
|
@@ -1487,61 +1487,61 @@ var $t = {
|
|
|
1487
1487
|
}
|
|
1488
1488
|
Se(l.allowOutsideClick, p) || p.preventDefault();
|
|
1489
1489
|
}
|
|
1490
|
-
},
|
|
1491
|
-
var
|
|
1492
|
-
if (k ||
|
|
1493
|
-
k && (a.mostRecentlyFocusedNode =
|
|
1490
|
+
}, Z = function(p) {
|
|
1491
|
+
var b = Fe(p), k = c(b, p) >= 0;
|
|
1492
|
+
if (k || b instanceof Document)
|
|
1493
|
+
k && (a.mostRecentlyFocusedNode = b);
|
|
1494
1494
|
else {
|
|
1495
1495
|
p.stopImmediatePropagation();
|
|
1496
|
-
var
|
|
1496
|
+
var F, L = !0;
|
|
1497
1497
|
if (a.mostRecentlyFocusedNode)
|
|
1498
1498
|
if (_e(a.mostRecentlyFocusedNode) > 0) {
|
|
1499
|
-
var C = c(a.mostRecentlyFocusedNode),
|
|
1500
|
-
if (
|
|
1501
|
-
var z =
|
|
1502
|
-
return
|
|
1499
|
+
var C = c(a.mostRecentlyFocusedNode), E = a.containerGroups[C].tabbableNodes;
|
|
1500
|
+
if (E.length > 0) {
|
|
1501
|
+
var z = E.findIndex(function(j) {
|
|
1502
|
+
return j === a.mostRecentlyFocusedNode;
|
|
1503
1503
|
});
|
|
1504
|
-
z >= 0 && (l.isKeyForward(a.recentNavEvent) ? z + 1 <
|
|
1504
|
+
z >= 0 && (l.isKeyForward(a.recentNavEvent) ? z + 1 < E.length && (F = E[z + 1], L = !1) : z - 1 >= 0 && (F = E[z - 1], L = !1));
|
|
1505
1505
|
}
|
|
1506
1506
|
} else
|
|
1507
|
-
a.containerGroups.some(function(
|
|
1508
|
-
return
|
|
1507
|
+
a.containerGroups.some(function(j) {
|
|
1508
|
+
return j.tabbableNodes.some(function(ae) {
|
|
1509
1509
|
return _e(ae) > 0;
|
|
1510
1510
|
});
|
|
1511
1511
|
}) || (L = !1);
|
|
1512
1512
|
else
|
|
1513
1513
|
L = !1;
|
|
1514
|
-
L && (
|
|
1514
|
+
L && (F = _({
|
|
1515
1515
|
// move FROM the MRU node, not event-related node (which will be the node that is
|
|
1516
1516
|
// outside the trap causing the focus escape we're trying to fix)
|
|
1517
1517
|
target: a.mostRecentlyFocusedNode,
|
|
1518
1518
|
isBackward: l.isKeyBackward(a.recentNavEvent)
|
|
1519
|
-
})),
|
|
1519
|
+
})), v(F || a.mostRecentlyFocusedNode || d());
|
|
1520
1520
|
}
|
|
1521
1521
|
a.recentNavEvent = void 0;
|
|
1522
1522
|
}, J = function(p) {
|
|
1523
|
-
var
|
|
1523
|
+
var b = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
1524
1524
|
a.recentNavEvent = p;
|
|
1525
1525
|
var k = _({
|
|
1526
1526
|
event: p,
|
|
1527
|
-
isBackward:
|
|
1527
|
+
isBackward: b
|
|
1528
1528
|
});
|
|
1529
|
-
k && (Be(p) && p.preventDefault(),
|
|
1529
|
+
k && (Be(p) && p.preventDefault(), v(k));
|
|
1530
1530
|
}, A = function(p) {
|
|
1531
1531
|
(l.isKeyForward(p) || l.isKeyBackward(p)) && J(p, l.isKeyBackward(p));
|
|
1532
|
-
},
|
|
1532
|
+
}, U = function(p) {
|
|
1533
1533
|
ta(p) && Se(l.escapeDeactivates, p) !== !1 && (p.preventDefault(), i.deactivate());
|
|
1534
1534
|
}, Q = function(p) {
|
|
1535
|
-
var
|
|
1536
|
-
c(
|
|
1535
|
+
var b = Fe(p);
|
|
1536
|
+
c(b, p) >= 0 || Se(l.clickOutsideDeactivates, p) || Se(l.allowOutsideClick, p) || (p.preventDefault(), p.stopImmediatePropagation());
|
|
1537
1537
|
}, B = function() {
|
|
1538
1538
|
if (a.active)
|
|
1539
1539
|
return $t.activateTrap(o, i), a.delayInitialFocusTimer = l.delayInitialFocus ? At(function() {
|
|
1540
|
-
|
|
1541
|
-
}) :
|
|
1540
|
+
v(d());
|
|
1541
|
+
}) : v(d()), t.addEventListener("focusin", Z, !0), t.addEventListener("mousedown", N, {
|
|
1542
1542
|
capture: !0,
|
|
1543
1543
|
passive: !1
|
|
1544
|
-
}), t.addEventListener("touchstart",
|
|
1544
|
+
}), t.addEventListener("touchstart", N, {
|
|
1545
1545
|
capture: !0,
|
|
1546
1546
|
passive: !1
|
|
1547
1547
|
}), t.addEventListener("click", Q, {
|
|
@@ -1550,21 +1550,21 @@ var $t = {
|
|
|
1550
1550
|
}), t.addEventListener("keydown", A, {
|
|
1551
1551
|
capture: !0,
|
|
1552
1552
|
passive: !1
|
|
1553
|
-
}), t.addEventListener("keydown",
|
|
1553
|
+
}), t.addEventListener("keydown", U), i;
|
|
1554
1554
|
}, $ = function() {
|
|
1555
1555
|
if (a.active)
|
|
1556
|
-
return t.removeEventListener("focusin",
|
|
1557
|
-
},
|
|
1558
|
-
var
|
|
1559
|
-
var
|
|
1560
|
-
return
|
|
1556
|
+
return t.removeEventListener("focusin", Z, !0), t.removeEventListener("mousedown", N, !0), t.removeEventListener("touchstart", N, !0), t.removeEventListener("click", Q, !0), t.removeEventListener("keydown", A, !0), t.removeEventListener("keydown", U), i;
|
|
1557
|
+
}, M = function(p) {
|
|
1558
|
+
var b = p.some(function(k) {
|
|
1559
|
+
var F = Array.from(k.removedNodes);
|
|
1560
|
+
return F.some(function(L) {
|
|
1561
1561
|
return L === a.mostRecentlyFocusedNode;
|
|
1562
1562
|
});
|
|
1563
1563
|
});
|
|
1564
|
-
|
|
1565
|
-
},
|
|
1566
|
-
|
|
1567
|
-
|
|
1564
|
+
b && v(d());
|
|
1565
|
+
}, de = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(M) : void 0, ie = function() {
|
|
1566
|
+
de && (de.disconnect(), a.active && !a.paused && a.containers.map(function(p) {
|
|
1567
|
+
de.observe(p, {
|
|
1568
1568
|
subtree: !0,
|
|
1569
1569
|
childList: !0
|
|
1570
1570
|
});
|
|
@@ -1580,30 +1580,30 @@ var $t = {
|
|
|
1580
1580
|
activate: function(p) {
|
|
1581
1581
|
if (a.active)
|
|
1582
1582
|
return this;
|
|
1583
|
-
var
|
|
1584
|
-
|
|
1583
|
+
var b = r(p, "onActivate"), k = r(p, "onPostActivate"), F = r(p, "checkCanFocusTrap");
|
|
1584
|
+
F || s(), a.active = !0, a.paused = !1, a.nodeFocusedBeforeActivation = t.activeElement, b == null || b();
|
|
1585
1585
|
var L = function() {
|
|
1586
|
-
|
|
1586
|
+
F && s(), B(), ie(), k == null || k();
|
|
1587
1587
|
};
|
|
1588
|
-
return
|
|
1588
|
+
return F ? (F(a.containers.concat()).then(L, L), this) : (L(), this);
|
|
1589
1589
|
},
|
|
1590
1590
|
deactivate: function(p) {
|
|
1591
1591
|
if (!a.active)
|
|
1592
1592
|
return this;
|
|
1593
|
-
var
|
|
1593
|
+
var b = kt({
|
|
1594
1594
|
onDeactivate: l.onDeactivate,
|
|
1595
1595
|
onPostDeactivate: l.onPostDeactivate,
|
|
1596
1596
|
checkCanReturnFocus: l.checkCanReturnFocus
|
|
1597
1597
|
}, p);
|
|
1598
1598
|
clearTimeout(a.delayInitialFocusTimer), a.delayInitialFocusTimer = void 0, $(), a.active = !1, a.paused = !1, ie(), $t.deactivateTrap(o, i);
|
|
1599
|
-
var k = r(
|
|
1599
|
+
var k = r(b, "onDeactivate"), F = r(b, "onPostDeactivate"), L = r(b, "checkCanReturnFocus"), C = r(b, "returnFocus", "returnFocusOnDeactivate");
|
|
1600
1600
|
k == null || k();
|
|
1601
|
-
var
|
|
1601
|
+
var E = function() {
|
|
1602
1602
|
At(function() {
|
|
1603
|
-
C &&
|
|
1603
|
+
C && v(m(a.nodeFocusedBeforeActivation)), F == null || F();
|
|
1604
1604
|
});
|
|
1605
1605
|
};
|
|
1606
|
-
return C && L ? (L(
|
|
1606
|
+
return C && L ? (L(m(a.nodeFocusedBeforeActivation)).then(E, E), this) : (E(), this);
|
|
1607
1607
|
},
|
|
1608
1608
|
pause: function(p) {
|
|
1609
1609
|
return a.active ? (a.manuallyPaused = !0, this._setPausedState(!0, p)) : this;
|
|
@@ -1612,8 +1612,8 @@ var $t = {
|
|
|
1612
1612
|
return a.active ? (a.manuallyPaused = !1, o[o.length - 1] !== this ? this : this._setPausedState(!1, p)) : this;
|
|
1613
1613
|
},
|
|
1614
1614
|
updateContainerElements: function(p) {
|
|
1615
|
-
var
|
|
1616
|
-
return a.containers =
|
|
1615
|
+
var b = [].concat(p).filter(Boolean);
|
|
1616
|
+
return a.containers = b.map(function(k) {
|
|
1617
1617
|
return typeof k == "string" ? t.querySelector(k) : k;
|
|
1618
1618
|
}), a.active && s(), ie(), this;
|
|
1619
1619
|
}
|
|
@@ -1624,14 +1624,14 @@ var $t = {
|
|
|
1624
1624
|
}
|
|
1625
1625
|
},
|
|
1626
1626
|
_setPausedState: {
|
|
1627
|
-
value: function(p,
|
|
1627
|
+
value: function(p, b) {
|
|
1628
1628
|
if (a.paused === p)
|
|
1629
1629
|
return this;
|
|
1630
1630
|
if (a.paused = p, p) {
|
|
1631
|
-
var k = r(
|
|
1632
|
-
k == null || k(), $(), ie(),
|
|
1631
|
+
var k = r(b, "onPause"), F = r(b, "onPostPause");
|
|
1632
|
+
k == null || k(), $(), ie(), F == null || F();
|
|
1633
1633
|
} else {
|
|
1634
|
-
var L = r(
|
|
1634
|
+
var L = r(b, "onUnpause"), C = r(b, "onPostUnpause");
|
|
1635
1635
|
L == null || L(), s(), B(), ie(), C == null || C();
|
|
1636
1636
|
}
|
|
1637
1637
|
return this;
|
|
@@ -1645,7 +1645,7 @@ const ia = /* @__PURE__ */ V({
|
|
|
1645
1645
|
setup(e, { slots: n }) {
|
|
1646
1646
|
let t;
|
|
1647
1647
|
const o = q(), l = () => t && t.activate(), a = () => t && t.deactivate();
|
|
1648
|
-
return
|
|
1648
|
+
return ce(
|
|
1649
1649
|
() => rt(o),
|
|
1650
1650
|
(i) => {
|
|
1651
1651
|
i && (t = la(i, e.options || {}), l());
|
|
@@ -1668,12 +1668,12 @@ const ia = /* @__PURE__ */ V({
|
|
|
1668
1668
|
emits: ["update:disabled"],
|
|
1669
1669
|
setup(e) {
|
|
1670
1670
|
const n = e, t = Te(e, "disabled");
|
|
1671
|
-
return (o, l) => t.value ?
|
|
1671
|
+
return (o, l) => t.value ? P(o.$slots, "default", { key: 0 }) : (y(), W(
|
|
1672
1672
|
f(ia),
|
|
1673
1673
|
Re(pe({ key: 1 }, n)),
|
|
1674
1674
|
{
|
|
1675
1675
|
default: R(() => [
|
|
1676
|
-
|
|
1676
|
+
P(o.$slots, "default")
|
|
1677
1677
|
]),
|
|
1678
1678
|
_: 3
|
|
1679
1679
|
/* FORWARDED */
|
|
@@ -1682,7 +1682,7 @@ const ia = /* @__PURE__ */ V({
|
|
|
1682
1682
|
/* FULL_PROPS */
|
|
1683
1683
|
));
|
|
1684
1684
|
}
|
|
1685
|
-
}), sa =
|
|
1685
|
+
}), sa = ee(ra), Ae = "data-scroll-locked", et = "right-scroll-bar-position", tt = "width-before-scroll-bar", ca = "with-scroll-bars-hidden", ua = "--removed-body-scroll-bar-size", da = {
|
|
1686
1686
|
left: 0,
|
|
1687
1687
|
top: 0,
|
|
1688
1688
|
right: 0,
|
|
@@ -1704,17 +1704,17 @@ const ia = /* @__PURE__ */ V({
|
|
|
1704
1704
|
function va() {
|
|
1705
1705
|
return document ? document.createElement("style") : null;
|
|
1706
1706
|
}
|
|
1707
|
-
function
|
|
1707
|
+
function ma(e, n) {
|
|
1708
1708
|
e.appendChild(document.createTextNode(n));
|
|
1709
1709
|
}
|
|
1710
|
-
function
|
|
1710
|
+
function ga(e) {
|
|
1711
1711
|
(document.head || document.getElementsByTagName("head")[0]).appendChild(e);
|
|
1712
1712
|
}
|
|
1713
1713
|
const ba = () => {
|
|
1714
1714
|
let e = 0, n = null;
|
|
1715
1715
|
return {
|
|
1716
1716
|
add: (t) => {
|
|
1717
|
-
e === 0 && (n = va()) && (
|
|
1717
|
+
e === 0 && (n = va()) && (ma(n, t), ga(n)), e++;
|
|
1718
1718
|
},
|
|
1719
1719
|
remove: () => {
|
|
1720
1720
|
var t;
|
|
@@ -1783,34 +1783,34 @@ const ba = () => {
|
|
|
1783
1783
|
}), Mt(() => {
|
|
1784
1784
|
const a = o() - 1;
|
|
1785
1785
|
a <= 0 ? document.body.removeAttribute(Ae) : document.body.setAttribute(Ae, a.toString()), t.remove();
|
|
1786
|
-
}), (a, i) =>
|
|
1786
|
+
}), (a, i) => P(a.$slots, "default");
|
|
1787
1787
|
}
|
|
1788
|
-
}), ya =
|
|
1788
|
+
}), ya = ee(ha);
|
|
1789
1789
|
function wa(e, n, t, o) {
|
|
1790
|
-
const l = (o == null ? void 0 : o.offset) ?? 0, a = (o == null ? void 0 : o.crossOffset) ?? 0, i = (o == null ? void 0 : o.placement) ?? "bottom", r = e.getBoundingClientRect(), c = n.getBoundingClientRect(), u = t == null ? void 0 : t.getBoundingClientRect(), d = _a(r, c, i, l), s =
|
|
1790
|
+
const l = (o == null ? void 0 : o.offset) ?? 0, a = (o == null ? void 0 : o.crossOffset) ?? 0, i = (o == null ? void 0 : o.placement) ?? "bottom", r = e.getBoundingClientRect(), c = n.getBoundingClientRect(), u = t == null ? void 0 : t.getBoundingClientRect(), d = _a(r, c, i, l), s = Ia(r, c, d), h = ka(s, d, l), v = $a(h, d, a), m = xa(v, c, d);
|
|
1791
1791
|
let _;
|
|
1792
1792
|
if (o != null && o.arrow) {
|
|
1793
1793
|
if (!u)
|
|
1794
1794
|
throw new Error("[Quidgest UI] The arrow element must exist to compute its position");
|
|
1795
|
-
_ = Aa(
|
|
1795
|
+
_ = Aa(m, r, c, u, d);
|
|
1796
1796
|
}
|
|
1797
|
-
return { overlayCoords:
|
|
1797
|
+
return { overlayCoords: m, arrowCoords: _, placement: d };
|
|
1798
1798
|
}
|
|
1799
1799
|
function _a(e, n, t, o) {
|
|
1800
|
-
const l =
|
|
1801
|
-
if (
|
|
1802
|
-
const a =
|
|
1800
|
+
const l = It(e, n, t, o);
|
|
1801
|
+
if (Et(l)) {
|
|
1802
|
+
const a = Ee(t), i = {
|
|
1803
1803
|
top: "bottom",
|
|
1804
1804
|
bottom: "top",
|
|
1805
1805
|
left: "right",
|
|
1806
1806
|
right: "left"
|
|
1807
|
-
}[a], r =
|
|
1807
|
+
}[a], r = It(
|
|
1808
1808
|
e,
|
|
1809
1809
|
n,
|
|
1810
1810
|
i,
|
|
1811
1811
|
o
|
|
1812
1812
|
);
|
|
1813
|
-
if (
|
|
1813
|
+
if (Et(r))
|
|
1814
1814
|
return t;
|
|
1815
1815
|
const c = Sa(t);
|
|
1816
1816
|
return c ? `${i}-${c}` : i;
|
|
@@ -1822,14 +1822,14 @@ function xa(e, n, t) {
|
|
|
1822
1822
|
return o === "x" ? a.x = l(e.x, 8, window.innerWidth - n.width - 8) : a.y = l(e.y, 8, window.innerHeight - n.height - 8), a;
|
|
1823
1823
|
}
|
|
1824
1824
|
function ka(e, n, t) {
|
|
1825
|
-
const o =
|
|
1825
|
+
const o = Ee(n);
|
|
1826
1826
|
return {
|
|
1827
1827
|
x: e.x + (o === "left" ? -t : o === "right" ? t : 0),
|
|
1828
1828
|
y: e.y + (o === "top" ? -t : o === "bottom" ? t : 0)
|
|
1829
1829
|
};
|
|
1830
1830
|
}
|
|
1831
1831
|
function $a(e, n, t) {
|
|
1832
|
-
const o =
|
|
1832
|
+
const o = Ee(n);
|
|
1833
1833
|
return {
|
|
1834
1834
|
x: e.x + (o === "top" || o === "bottom" ? t : 0),
|
|
1835
1835
|
y: e.y + (o === "right" || o === "left" ? t : 0)
|
|
@@ -1850,7 +1850,7 @@ function Aa(e, n, t, o, l) {
|
|
|
1850
1850
|
};
|
|
1851
1851
|
}
|
|
1852
1852
|
}
|
|
1853
|
-
function
|
|
1853
|
+
function Ia(e, n, t) {
|
|
1854
1854
|
const [o, l] = t.split("-"), a = e.x + e.width / 2 - n.width / 2, i = e.y + e.height / 2 - n.height / 2;
|
|
1855
1855
|
let r;
|
|
1856
1856
|
switch (o) {
|
|
@@ -1884,8 +1884,8 @@ function Ea(e, n, t) {
|
|
|
1884
1884
|
}
|
|
1885
1885
|
return r;
|
|
1886
1886
|
}
|
|
1887
|
-
function
|
|
1888
|
-
const l =
|
|
1887
|
+
function It(e, n, t, o) {
|
|
1888
|
+
const l = Ee(t);
|
|
1889
1889
|
let a = 0;
|
|
1890
1890
|
switch (l) {
|
|
1891
1891
|
case "top":
|
|
@@ -1905,17 +1905,17 @@ function Et(e, n, t, o) {
|
|
|
1905
1905
|
}
|
|
1906
1906
|
return a;
|
|
1907
1907
|
}
|
|
1908
|
-
function
|
|
1908
|
+
function Ea(e) {
|
|
1909
1909
|
return e === "x" ? "y" : "x";
|
|
1910
1910
|
}
|
|
1911
1911
|
function Ca(e) {
|
|
1912
|
-
const n =
|
|
1912
|
+
const n = Ee(e);
|
|
1913
1913
|
return ["left", "right"].includes(n) ? "x" : "y";
|
|
1914
1914
|
}
|
|
1915
1915
|
function Je(e) {
|
|
1916
|
-
return
|
|
1916
|
+
return Ea(Ca(e));
|
|
1917
1917
|
}
|
|
1918
|
-
function
|
|
1918
|
+
function Ee(e) {
|
|
1919
1919
|
const [n] = e.split("-");
|
|
1920
1920
|
return n;
|
|
1921
1921
|
}
|
|
@@ -1923,7 +1923,7 @@ function Sa(e) {
|
|
|
1923
1923
|
const [, n] = e.split("-");
|
|
1924
1924
|
return n;
|
|
1925
1925
|
}
|
|
1926
|
-
function
|
|
1926
|
+
function Et(e) {
|
|
1927
1927
|
return e < 0;
|
|
1928
1928
|
}
|
|
1929
1929
|
function Da(e) {
|
|
@@ -1963,7 +1963,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
1963
1963
|
setup(e, { emit: n }) {
|
|
1964
1964
|
const t = e, o = n, l = Te(e, "modelValue"), { class: a } = Ut(), i = w(() => [
|
|
1965
1965
|
"q-overlay",
|
|
1966
|
-
`q-overlay--${
|
|
1966
|
+
`q-overlay--${Ee(s.placement)}`,
|
|
1967
1967
|
a.value,
|
|
1968
1968
|
{
|
|
1969
1969
|
"q-overlay--independent": r.value,
|
|
@@ -1977,13 +1977,13 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
1977
1977
|
left: 0,
|
|
1978
1978
|
width: 0,
|
|
1979
1979
|
placement: t.placement
|
|
1980
|
-
}),
|
|
1980
|
+
}), h = ze({
|
|
1981
1981
|
top: void 0,
|
|
1982
1982
|
left: void 0,
|
|
1983
1983
|
hidden: !0
|
|
1984
1984
|
});
|
|
1985
|
-
|
|
1986
|
-
const
|
|
1985
|
+
ce(l, k);
|
|
1986
|
+
const v = w(() => {
|
|
1987
1987
|
if (r.value) return;
|
|
1988
1988
|
const S = L(), fe = t.width === "anchor", g = fe ? S == null ? void 0 : S.getBoundingClientRect().width : void 0;
|
|
1989
1989
|
return {
|
|
@@ -1991,17 +1991,17 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
1991
1991
|
left: `${s.left}px`,
|
|
1992
1992
|
width: g !== void 0 ? `${g}px` : void 0
|
|
1993
1993
|
};
|
|
1994
|
-
}),
|
|
1994
|
+
}), m = w(() => {
|
|
1995
1995
|
if (t.arrow)
|
|
1996
1996
|
return {
|
|
1997
|
-
top:
|
|
1998
|
-
left:
|
|
1999
|
-
opacity:
|
|
1997
|
+
top: h.top !== void 0 ? `${h.top}px` : void 0,
|
|
1998
|
+
left: h.left !== void 0 ? `${h.left}px` : void 0,
|
|
1999
|
+
opacity: h.hidden ? 0 : 1
|
|
2000
2000
|
};
|
|
2001
|
-
}), _ = q(null),
|
|
2001
|
+
}), _ = q(null), N = q(null), Z = q(null);
|
|
2002
2002
|
function J() {
|
|
2003
2003
|
const S = L();
|
|
2004
|
-
if (!S || !
|
|
2004
|
+
if (!S || !N.value)
|
|
2005
2005
|
return;
|
|
2006
2006
|
const fe = {
|
|
2007
2007
|
placement: t.placement,
|
|
@@ -2011,53 +2011,53 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2011
2011
|
arrow: t.arrow
|
|
2012
2012
|
}, g = wa(
|
|
2013
2013
|
S,
|
|
2014
|
-
|
|
2014
|
+
N.value,
|
|
2015
2015
|
(_ == null ? void 0 : _.value) ?? void 0,
|
|
2016
2016
|
fe
|
|
2017
2017
|
);
|
|
2018
|
-
s.left = g.overlayCoords.x, s.top = g.overlayCoords.y, s.placement = g.placement,
|
|
2018
|
+
s.left = g.overlayCoords.x, s.top = g.overlayCoords.y, s.placement = g.placement, h.hidden = g.arrowCoords === void 0, g.arrowCoords && (h.top = g.arrowCoords.y, h.left = g.arrowCoords.x);
|
|
2019
2019
|
}
|
|
2020
|
-
|
|
2020
|
+
ce(
|
|
2021
2021
|
() => t.placement,
|
|
2022
2022
|
() => De(J)
|
|
2023
2023
|
);
|
|
2024
2024
|
let A;
|
|
2025
|
-
function
|
|
2025
|
+
function U() {
|
|
2026
2026
|
B(0);
|
|
2027
2027
|
}
|
|
2028
2028
|
function Q() {
|
|
2029
2029
|
B(t.delay);
|
|
2030
2030
|
}
|
|
2031
2031
|
function B(S) {
|
|
2032
|
-
A &&
|
|
2032
|
+
A && M(), A = window.setTimeout(() => {
|
|
2033
2033
|
l.value = !0;
|
|
2034
2034
|
}, S);
|
|
2035
2035
|
}
|
|
2036
2036
|
function $() {
|
|
2037
|
-
if (A &&
|
|
2037
|
+
if (A && M(), l.value = !1, t.anchor && t.trigger === "click") {
|
|
2038
2038
|
const S = L();
|
|
2039
2039
|
De(() => S == null ? void 0 : S.focus());
|
|
2040
2040
|
}
|
|
2041
2041
|
}
|
|
2042
|
-
function
|
|
2042
|
+
function M() {
|
|
2043
2043
|
clearTimeout(A), A = void 0;
|
|
2044
2044
|
}
|
|
2045
|
-
function
|
|
2045
|
+
function de() {
|
|
2046
2046
|
De(ye), o("enter");
|
|
2047
2047
|
}
|
|
2048
2048
|
function ie() {
|
|
2049
|
-
|
|
2049
|
+
F();
|
|
2050
2050
|
}
|
|
2051
2051
|
function p() {
|
|
2052
2052
|
o("leave");
|
|
2053
2053
|
}
|
|
2054
|
-
function
|
|
2055
|
-
|
|
2054
|
+
function b() {
|
|
2055
|
+
F(), Ne();
|
|
2056
2056
|
}
|
|
2057
2057
|
function k() {
|
|
2058
2058
|
s.animating = !0;
|
|
2059
2059
|
}
|
|
2060
|
-
function
|
|
2060
|
+
function F() {
|
|
2061
2061
|
s.animating = !1;
|
|
2062
2062
|
}
|
|
2063
2063
|
function L() {
|
|
@@ -2066,7 +2066,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2066
2066
|
function C(S) {
|
|
2067
2067
|
t.persistent && S.preventDefault();
|
|
2068
2068
|
}
|
|
2069
|
-
function
|
|
2069
|
+
function E(S) {
|
|
2070
2070
|
var fe;
|
|
2071
2071
|
if (t.persistent) {
|
|
2072
2072
|
S.preventDefault();
|
|
@@ -2074,8 +2074,8 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2074
2074
|
}
|
|
2075
2075
|
let g = !1;
|
|
2076
2076
|
S.defaultPrevented || S.detail.originalEvent.type === "pointerdown" && (g = !0);
|
|
2077
|
-
const
|
|
2078
|
-
if ((fe = L()) != null && fe.contains(
|
|
2077
|
+
const I = S.detail.originalEvent.target;
|
|
2078
|
+
if ((fe = L()) != null && fe.contains(I)) {
|
|
2079
2079
|
S.preventDefault();
|
|
2080
2080
|
return;
|
|
2081
2081
|
}
|
|
@@ -2084,60 +2084,60 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2084
2084
|
function z() {
|
|
2085
2085
|
$();
|
|
2086
2086
|
}
|
|
2087
|
-
let
|
|
2087
|
+
let j;
|
|
2088
2088
|
function ae() {
|
|
2089
2089
|
const S = L();
|
|
2090
2090
|
if (S)
|
|
2091
|
-
switch (
|
|
2091
|
+
switch (j = new MutationObserver(J), j.observe(S, {
|
|
2092
2092
|
attributes: !1,
|
|
2093
2093
|
childList: !0,
|
|
2094
2094
|
characterData: !0,
|
|
2095
2095
|
subtree: !0
|
|
2096
2096
|
}), t.trigger) {
|
|
2097
2097
|
case "click":
|
|
2098
|
-
S.addEventListener("click",
|
|
2098
|
+
S.addEventListener("click", U);
|
|
2099
2099
|
break;
|
|
2100
2100
|
case "hover":
|
|
2101
|
-
S.addEventListener("mouseenter", Q), S.addEventListener("mouseleave", $), S.addEventListener("focusin",
|
|
2101
|
+
S.addEventListener("mouseenter", Q), S.addEventListener("mouseleave", $), S.addEventListener("focusin", U), S.addEventListener("focusout", $);
|
|
2102
2102
|
break;
|
|
2103
2103
|
}
|
|
2104
2104
|
}
|
|
2105
|
-
function
|
|
2105
|
+
function ue() {
|
|
2106
2106
|
const S = L();
|
|
2107
2107
|
if (S)
|
|
2108
|
-
switch (
|
|
2108
|
+
switch (j == null || j.disconnect(), t.trigger) {
|
|
2109
2109
|
case "click":
|
|
2110
|
-
S.removeEventListener("click",
|
|
2110
|
+
S.removeEventListener("click", U);
|
|
2111
2111
|
break;
|
|
2112
2112
|
case "hover":
|
|
2113
|
-
S.removeEventListener("mouseenter", Q), S.removeEventListener("mouseleave", $), S.removeEventListener("focusin",
|
|
2113
|
+
S.removeEventListener("mouseenter", Q), S.removeEventListener("mouseleave", $), S.removeEventListener("focusin", U), S.removeEventListener("focusout", $);
|
|
2114
2114
|
break;
|
|
2115
2115
|
}
|
|
2116
2116
|
}
|
|
2117
|
-
function
|
|
2117
|
+
function ne() {
|
|
2118
2118
|
window.addEventListener("resize", J), t.scrollLock || window.addEventListener("scroll", J);
|
|
2119
2119
|
}
|
|
2120
2120
|
function he() {
|
|
2121
2121
|
window.removeEventListener("resize", J), t.scrollLock || window.removeEventListener("scroll", J);
|
|
2122
2122
|
}
|
|
2123
|
-
let
|
|
2124
|
-
function
|
|
2125
|
-
L() ? (J(),
|
|
2123
|
+
let me;
|
|
2124
|
+
function ge() {
|
|
2125
|
+
L() ? (J(), me = window.setTimeout(ge, 100)) : $();
|
|
2126
2126
|
}
|
|
2127
2127
|
function ye() {
|
|
2128
2128
|
var S;
|
|
2129
|
-
r.value || (
|
|
2129
|
+
r.value || (ne(), t.spy ? ge() : J()), (r.value || t.trigger === "click") && ((S = N.value) == null || S.focus());
|
|
2130
2130
|
}
|
|
2131
2131
|
function Ne() {
|
|
2132
|
-
r.value || he(), t.spy && (clearTimeout(
|
|
2132
|
+
r.value || he(), t.spy && (clearTimeout(me), me = void 0);
|
|
2133
2133
|
}
|
|
2134
2134
|
return Me(() => {
|
|
2135
2135
|
De(ae);
|
|
2136
|
-
}), dn(
|
|
2136
|
+
}), dn(ue), (S, fe) => (y(), x(
|
|
2137
2137
|
ve,
|
|
2138
2138
|
null,
|
|
2139
2139
|
[
|
|
2140
|
-
(y(),
|
|
2140
|
+
(y(), W(pn, {
|
|
2141
2141
|
disabled: !d.value,
|
|
2142
2142
|
to: t.attach
|
|
2143
2143
|
}, [
|
|
@@ -2150,7 +2150,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2150
2150
|
"div",
|
|
2151
2151
|
{
|
|
2152
2152
|
key: 0,
|
|
2153
|
-
class:
|
|
2153
|
+
class: K([
|
|
2154
2154
|
t.backdropClass,
|
|
2155
2155
|
"q-overlay__underlay",
|
|
2156
2156
|
{ "q-overlay__underlay--blur": t.backdropBlur }
|
|
@@ -2159,7 +2159,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2159
2159
|
null,
|
|
2160
2160
|
2
|
|
2161
2161
|
/* CLASS */
|
|
2162
|
-
)) :
|
|
2162
|
+
)) : O("v-if", !0)
|
|
2163
2163
|
]),
|
|
2164
2164
|
_: 1
|
|
2165
2165
|
/* STABLE */
|
|
@@ -2167,36 +2167,36 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2167
2167
|
D(bt, {
|
|
2168
2168
|
name: t.transition,
|
|
2169
2169
|
appear: "",
|
|
2170
|
-
onEnter:
|
|
2170
|
+
onEnter: de,
|
|
2171
2171
|
onAfterEnter: ie,
|
|
2172
2172
|
onLeave: p,
|
|
2173
|
-
onAfterLeave:
|
|
2173
|
+
onAfterLeave: b
|
|
2174
2174
|
}, {
|
|
2175
2175
|
default: R(() => [
|
|
2176
2176
|
l.value ? (y(), x("div", {
|
|
2177
2177
|
key: 0,
|
|
2178
2178
|
id: t.id,
|
|
2179
2179
|
ref_key: "overlayContainerRef",
|
|
2180
|
-
ref:
|
|
2180
|
+
ref: Z,
|
|
2181
2181
|
tabindex: "-1",
|
|
2182
|
-
class:
|
|
2183
|
-
style:
|
|
2182
|
+
class: K(i.value),
|
|
2183
|
+
style: Ie(v.value)
|
|
2184
2184
|
}, [
|
|
2185
2185
|
D(f(wo), {
|
|
2186
2186
|
onDismiss: z,
|
|
2187
|
-
onInteractOutside:
|
|
2187
|
+
onInteractOutside: E,
|
|
2188
2188
|
onPointerDownOutside: C
|
|
2189
2189
|
}, {
|
|
2190
2190
|
default: R(() => [
|
|
2191
|
-
|
|
2191
|
+
Z.value ? (y(), W(f(sa), {
|
|
2192
2192
|
key: 0,
|
|
2193
2193
|
disabled: t.nonModal || !l.value,
|
|
2194
|
-
options: { fallbackFocus:
|
|
2194
|
+
options: { fallbackFocus: Z.value }
|
|
2195
2195
|
}, {
|
|
2196
2196
|
default: R(() => [
|
|
2197
|
-
|
|
2197
|
+
T("div", pe({
|
|
2198
2198
|
ref_key: "overlayRef",
|
|
2199
|
-
ref:
|
|
2199
|
+
ref: N,
|
|
2200
2200
|
class: "q-overlay__content",
|
|
2201
2201
|
tabindex: "-1",
|
|
2202
2202
|
role: c.value ? "dialog" : void 0
|
|
@@ -2209,35 +2209,35 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2209
2209
|
ref: _,
|
|
2210
2210
|
role: "presentation",
|
|
2211
2211
|
class: "q-overlay__arrow",
|
|
2212
|
-
style:
|
|
2212
|
+
style: Ie(m.value)
|
|
2213
2213
|
},
|
|
2214
2214
|
null,
|
|
2215
2215
|
4
|
|
2216
2216
|
/* STYLE */
|
|
2217
|
-
)) :
|
|
2218
|
-
|
|
2217
|
+
)) : O("v-if", !0),
|
|
2218
|
+
P(S.$slots, "default")
|
|
2219
2219
|
], 16, La)
|
|
2220
2220
|
]),
|
|
2221
2221
|
_: 3
|
|
2222
2222
|
/* FORWARDED */
|
|
2223
|
-
}, 8, ["disabled", "options"])) :
|
|
2223
|
+
}, 8, ["disabled", "options"])) : O("v-if", !0)
|
|
2224
2224
|
]),
|
|
2225
2225
|
_: 3
|
|
2226
2226
|
/* FORWARDED */
|
|
2227
2227
|
})
|
|
2228
|
-
], 14, Ba)) :
|
|
2228
|
+
], 14, Ba)) : O("v-if", !0)
|
|
2229
2229
|
]),
|
|
2230
2230
|
_: 3
|
|
2231
2231
|
/* FORWARDED */
|
|
2232
2232
|
}, 8, ["name"])
|
|
2233
2233
|
], 8, ["disabled", "to"])),
|
|
2234
|
-
u.value ? (y(),
|
|
2234
|
+
u.value ? (y(), W(f(ya), { key: 0 })) : O("v-if", !0)
|
|
2235
2235
|
],
|
|
2236
2236
|
64
|
|
2237
2237
|
/* STABLE_FRAGMENT */
|
|
2238
2238
|
));
|
|
2239
2239
|
}
|
|
2240
|
-
}), Ta =
|
|
2240
|
+
}), Ta = ee(Ra), Ma = [
|
|
2241
2241
|
{
|
|
2242
2242
|
id: "button",
|
|
2243
2243
|
icon: {
|
|
@@ -2266,7 +2266,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2266
2266
|
}, Ua = {
|
|
2267
2267
|
key: 0,
|
|
2268
2268
|
class: "q-dialog__body-icon"
|
|
2269
|
-
},
|
|
2269
|
+
}, ja = { class: "q-dialog__body-text" }, Ga = ["innerHTML"], za = { key: 1 }, Va = {
|
|
2270
2270
|
key: 0,
|
|
2271
2271
|
class: "q-dialog__input"
|
|
2272
2272
|
}, Ha = {
|
|
@@ -2303,25 +2303,25 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2303
2303
|
function u() {
|
|
2304
2304
|
l.value = !1;
|
|
2305
2305
|
}
|
|
2306
|
-
function d(
|
|
2307
|
-
var
|
|
2308
|
-
if (
|
|
2309
|
-
if ((
|
|
2306
|
+
function d(v) {
|
|
2307
|
+
var m, _;
|
|
2308
|
+
if (v.action) {
|
|
2309
|
+
if ((m = t.input) != null && m.validator && (i.value = t.input.validator(f(a)), f(i)))
|
|
2310
2310
|
return;
|
|
2311
|
-
(_ =
|
|
2311
|
+
(_ = v.action) == null || _.call(v, f(a));
|
|
2312
2312
|
}
|
|
2313
2313
|
u();
|
|
2314
2314
|
}
|
|
2315
2315
|
function s() {
|
|
2316
2316
|
o("enter");
|
|
2317
2317
|
}
|
|
2318
|
-
function
|
|
2318
|
+
function h() {
|
|
2319
2319
|
o("leave");
|
|
2320
2320
|
}
|
|
2321
|
-
return (
|
|
2321
|
+
return (v, m) => (y(), W(f(Ta), {
|
|
2322
2322
|
id: t.id,
|
|
2323
2323
|
modelValue: l.value,
|
|
2324
|
-
"onUpdate:modelValue":
|
|
2324
|
+
"onUpdate:modelValue": m[1] || (m[1] = (_) => l.value = _),
|
|
2325
2325
|
"backdrop-class": "q-dialog__underlay",
|
|
2326
2326
|
"scroll-lock": "",
|
|
2327
2327
|
persistent: "",
|
|
@@ -2329,53 +2329,53 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2329
2329
|
attach: t.attach,
|
|
2330
2330
|
"backdrop-blur": t.backdropBlur,
|
|
2331
2331
|
"center-vertically": t.centerVertically,
|
|
2332
|
-
class:
|
|
2332
|
+
class: K(c.value),
|
|
2333
2333
|
onEnter: s,
|
|
2334
|
-
onLeave:
|
|
2334
|
+
onLeave: h
|
|
2335
2335
|
}, {
|
|
2336
2336
|
default: R(() => [
|
|
2337
|
-
|
|
2337
|
+
T(
|
|
2338
2338
|
"div",
|
|
2339
2339
|
{
|
|
2340
|
-
class:
|
|
2340
|
+
class: K(r.value)
|
|
2341
2341
|
},
|
|
2342
2342
|
[
|
|
2343
|
-
t.title ||
|
|
2344
|
-
|
|
2345
|
-
|
|
2343
|
+
t.title || v.$slots.header || v.$slots["header.prepend"] || v.$slots["header.append"] ? (y(), x("div", Fa, [
|
|
2344
|
+
P(v.$slots, "header", {}, () => [
|
|
2345
|
+
P(v.$slots, "header.prepend"),
|
|
2346
2346
|
t.title ? (y(), x(
|
|
2347
2347
|
"span",
|
|
2348
2348
|
Pa,
|
|
2349
|
-
|
|
2349
|
+
se(t.title),
|
|
2350
2350
|
1
|
|
2351
2351
|
/* TEXT */
|
|
2352
|
-
)) :
|
|
2353
|
-
|
|
2352
|
+
)) : O("v-if", !0),
|
|
2353
|
+
P(v.$slots, "header.append")
|
|
2354
2354
|
])
|
|
2355
|
-
])) :
|
|
2356
|
-
t.icon || t.text ||
|
|
2357
|
-
|
|
2355
|
+
])) : O("v-if", !0),
|
|
2356
|
+
t.icon || t.text || v.$slots.body ? (y(), x("div", Oa, [
|
|
2357
|
+
P(v.$slots, "body", {}, () => {
|
|
2358
2358
|
var _;
|
|
2359
2359
|
return [
|
|
2360
|
-
|
|
2360
|
+
P(v.$slots, "body.icon", {}, () => [
|
|
2361
2361
|
t.icon ? (y(), x("span", Ua, [
|
|
2362
2362
|
D(
|
|
2363
|
-
f(
|
|
2364
|
-
Re(
|
|
2363
|
+
f(X),
|
|
2364
|
+
Re(Ge(t.icon)),
|
|
2365
2365
|
null,
|
|
2366
2366
|
16
|
|
2367
2367
|
/* FULL_PROPS */
|
|
2368
2368
|
)
|
|
2369
|
-
])) :
|
|
2369
|
+
])) : O("v-if", !0)
|
|
2370
2370
|
]),
|
|
2371
|
-
|
|
2371
|
+
T("div", ja, [
|
|
2372
2372
|
t.html ? (y(), x("div", {
|
|
2373
2373
|
key: 0,
|
|
2374
2374
|
innerHTML: t.text
|
|
2375
|
-
}, null, 8,
|
|
2375
|
+
}, null, 8, Ga)) : (y(), x(
|
|
2376
2376
|
"div",
|
|
2377
2377
|
za,
|
|
2378
|
-
|
|
2378
|
+
se(t.text),
|
|
2379
2379
|
1
|
|
2380
2380
|
/* TEXT */
|
|
2381
2381
|
))
|
|
@@ -2383,18 +2383,18 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2383
2383
|
t.input ? (y(), x("div", Va, [
|
|
2384
2384
|
D(f(Ht), {
|
|
2385
2385
|
modelValue: a.value,
|
|
2386
|
-
"onUpdate:modelValue":
|
|
2386
|
+
"onUpdate:modelValue": m[0] || (m[0] = (N) => a.value = N),
|
|
2387
2387
|
invalid: !!i.value,
|
|
2388
2388
|
placeholder: (_ = t.input) == null ? void 0 : _.placeholder,
|
|
2389
2389
|
size: "block"
|
|
2390
2390
|
}, {
|
|
2391
2391
|
extras: R(() => [
|
|
2392
|
-
i.value ? (y(),
|
|
2392
|
+
i.value ? (y(), W(f(X), {
|
|
2393
2393
|
key: 0,
|
|
2394
2394
|
icon: "exclamation-sign"
|
|
2395
|
-
})) :
|
|
2395
|
+
})) : O("v-if", !0),
|
|
2396
2396
|
Qe(
|
|
2397
|
-
" " +
|
|
2397
|
+
" " + se(i.value),
|
|
2398
2398
|
1
|
|
2399
2399
|
/* TEXT */
|
|
2400
2400
|
)
|
|
@@ -2402,23 +2402,23 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2402
2402
|
_: 1
|
|
2403
2403
|
/* STABLE */
|
|
2404
2404
|
}, 8, ["modelValue", "invalid", "placeholder"])
|
|
2405
|
-
])) :
|
|
2406
|
-
|
|
2405
|
+
])) : O("v-if", !0),
|
|
2406
|
+
P(v.$slots, "body.append")
|
|
2407
2407
|
];
|
|
2408
2408
|
})
|
|
2409
|
-
])) :
|
|
2410
|
-
t.buttons ||
|
|
2409
|
+
])) : O("v-if", !0),
|
|
2410
|
+
t.buttons || v.$slots["footer.append"] ? (y(), x("div", Ha, [
|
|
2411
2411
|
t.buttons ? (y(), x("span", Za, [
|
|
2412
2412
|
(y(!0), x(
|
|
2413
2413
|
ve,
|
|
2414
2414
|
null,
|
|
2415
|
-
qe(t.buttons, (_) => (y(),
|
|
2415
|
+
qe(t.buttons, (_) => (y(), W(f(oe), pe({ ref_for: !0 }, _.props, {
|
|
2416
2416
|
key: _.id,
|
|
2417
2417
|
onClick: () => d(_)
|
|
2418
2418
|
}), {
|
|
2419
2419
|
default: R(() => [
|
|
2420
|
-
_.icon ? (y(),
|
|
2421
|
-
f(
|
|
2420
|
+
_.icon ? (y(), W(
|
|
2421
|
+
f(X),
|
|
2422
2422
|
pe({
|
|
2423
2423
|
key: 0,
|
|
2424
2424
|
ref_for: !0
|
|
@@ -2426,7 +2426,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2426
2426
|
null,
|
|
2427
2427
|
16
|
|
2428
2428
|
/* FULL_PROPS */
|
|
2429
|
-
)) :
|
|
2429
|
+
)) : O("v-if", !0)
|
|
2430
2430
|
]),
|
|
2431
2431
|
_: 2
|
|
2432
2432
|
/* DYNAMIC */
|
|
@@ -2434,10 +2434,10 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2434
2434
|
128
|
|
2435
2435
|
/* KEYED_FRAGMENT */
|
|
2436
2436
|
))
|
|
2437
|
-
])) :
|
|
2438
|
-
|
|
2439
|
-
])) :
|
|
2440
|
-
t.dismissible ? (y(),
|
|
2437
|
+
])) : O("v-if", !0),
|
|
2438
|
+
P(v.$slots, "footer.append")
|
|
2439
|
+
])) : O("v-if", !0),
|
|
2440
|
+
t.dismissible ? (y(), W(f(oe), {
|
|
2441
2441
|
key: 3,
|
|
2442
2442
|
class: "q-dialog__close",
|
|
2443
2443
|
variant: "text",
|
|
@@ -2445,8 +2445,8 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2445
2445
|
}, {
|
|
2446
2446
|
default: R(() => [
|
|
2447
2447
|
D(
|
|
2448
|
-
f(
|
|
2449
|
-
Re(
|
|
2448
|
+
f(X),
|
|
2449
|
+
Re(Ge(t.icons.close)),
|
|
2450
2450
|
null,
|
|
2451
2451
|
16
|
|
2452
2452
|
/* FULL_PROPS */
|
|
@@ -2454,7 +2454,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2454
2454
|
]),
|
|
2455
2455
|
_: 1
|
|
2456
2456
|
/* STABLE */
|
|
2457
|
-
})) :
|
|
2457
|
+
})) : O("v-if", !0)
|
|
2458
2458
|
],
|
|
2459
2459
|
2
|
|
2460
2460
|
/* CLASS */
|
|
@@ -2495,7 +2495,7 @@ const Qa = /* @__PURE__ */ V({
|
|
|
2495
2495
|
return (r, c) => (y(!0), x(
|
|
2496
2496
|
ve,
|
|
2497
2497
|
null,
|
|
2498
|
-
qe(f(l), (u) => (y(),
|
|
2498
|
+
qe(f(l), (u) => (y(), W(f(Kt), pe({
|
|
2499
2499
|
key: u.id,
|
|
2500
2500
|
ref_for: !0
|
|
2501
2501
|
}, u.props, {
|
|
@@ -2507,8 +2507,8 @@ const Qa = /* @__PURE__ */ V({
|
|
|
2507
2507
|
/* KEYED_FRAGMENT */
|
|
2508
2508
|
));
|
|
2509
2509
|
}
|
|
2510
|
-
}), Kt =
|
|
2511
|
-
|
|
2510
|
+
}), Kt = ee(Wa);
|
|
2511
|
+
ee(Qa);
|
|
2512
2512
|
const Ya = ["id", "required", "placeholder", "readonly", "disabled", "maxlength", "rows", "cols", "resize", "wrap"], Xa = /* @__PURE__ */ V({
|
|
2513
2513
|
inheritAttrs: !1,
|
|
2514
2514
|
__name: "QTextArea",
|
|
@@ -2542,15 +2542,15 @@ const Ya = ["id", "required", "placeholder", "readonly", "disabled", "maxlength"
|
|
|
2542
2542
|
t.value = d ? u == null ? void 0 : u.slice(0, d) : u;
|
|
2543
2543
|
}
|
|
2544
2544
|
});
|
|
2545
|
-
|
|
2545
|
+
ce(t, (u) => o.value = u, { immediate: !0 });
|
|
2546
2546
|
const l = vt(n.id), a = w(
|
|
2547
2547
|
() => n.readonly || n.disabled ? void 0 : n.placeholder
|
|
2548
2548
|
), i = w(() => ({ input: n.autosize ? c : null })), r = q(), { triggerResize: c } = Co({
|
|
2549
2549
|
element: w(() => n.autosize ? r.value : void 0),
|
|
2550
2550
|
styleProp: "minHeight"
|
|
2551
2551
|
});
|
|
2552
|
-
return (u, d) => (y(),
|
|
2553
|
-
class:
|
|
2552
|
+
return (u, d) => (y(), W(f(Vt), {
|
|
2553
|
+
class: K(["q-text-area", n.class]),
|
|
2554
2554
|
for: f(l),
|
|
2555
2555
|
label: n.label,
|
|
2556
2556
|
size: n.size,
|
|
@@ -2559,13 +2559,13 @@ const Ya = ["id", "required", "placeholder", "readonly", "disabled", "maxlength"
|
|
|
2559
2559
|
required: n.required
|
|
2560
2560
|
}, Rt({
|
|
2561
2561
|
"label.prepend": R(() => [
|
|
2562
|
-
|
|
2562
|
+
P(u.$slots, "label.prepend")
|
|
2563
2563
|
]),
|
|
2564
2564
|
"label.append": R(() => [
|
|
2565
|
-
|
|
2565
|
+
P(u.$slots, "label.append")
|
|
2566
2566
|
]),
|
|
2567
2567
|
default: R(() => [
|
|
2568
|
-
Tt(
|
|
2568
|
+
Tt(T("textarea", pe({
|
|
2569
2569
|
id: f(l),
|
|
2570
2570
|
ref_key: "textareaRef",
|
|
2571
2571
|
ref: r,
|
|
@@ -2590,27 +2590,27 @@ const Ya = ["id", "required", "placeholder", "readonly", "disabled", "maxlength"
|
|
|
2590
2590
|
u.$slots.prepend ? {
|
|
2591
2591
|
name: "prepend",
|
|
2592
2592
|
fn: R(() => [
|
|
2593
|
-
|
|
2593
|
+
P(u.$slots, "prepend")
|
|
2594
2594
|
]),
|
|
2595
2595
|
key: "0"
|
|
2596
2596
|
} : void 0,
|
|
2597
2597
|
u.$slots.append ? {
|
|
2598
2598
|
name: "append",
|
|
2599
2599
|
fn: R(() => [
|
|
2600
|
-
|
|
2600
|
+
P(u.$slots, "append")
|
|
2601
2601
|
]),
|
|
2602
2602
|
key: "1"
|
|
2603
2603
|
} : void 0,
|
|
2604
2604
|
u.$slots.extras ? {
|
|
2605
2605
|
name: "extras",
|
|
2606
2606
|
fn: R(() => [
|
|
2607
|
-
|
|
2607
|
+
P(u.$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
|
-
}), Ka =
|
|
2613
|
+
}), Ka = ee(Xa);
|
|
2614
2614
|
function ke() {
|
|
2615
2615
|
return {
|
|
2616
2616
|
copy: "Copy",
|
|
@@ -2645,7 +2645,7 @@ function ke() {
|
|
|
2645
2645
|
};
|
|
2646
2646
|
}
|
|
2647
2647
|
async function Ct(e, n) {
|
|
2648
|
-
var u, d, s,
|
|
2648
|
+
var u, d, s, h, v, m, _;
|
|
2649
2649
|
const t = new AbortController(), o = t.signal, a = (await Nt({
|
|
2650
2650
|
...e,
|
|
2651
2651
|
headers: {
|
|
@@ -2660,51 +2660,51 @@ async function Ct(e, n) {
|
|
|
2660
2660
|
const i = a.getReader(), r = new TextDecoder();
|
|
2661
2661
|
let c = "";
|
|
2662
2662
|
for (; ; ) {
|
|
2663
|
-
const { done:
|
|
2664
|
-
if (
|
|
2663
|
+
const { done: N, value: Z } = await i.read();
|
|
2664
|
+
if (N) {
|
|
2665
2665
|
(u = n.onDone) == null || u.call(n);
|
|
2666
2666
|
break;
|
|
2667
2667
|
}
|
|
2668
|
-
const J = r.decode(
|
|
2668
|
+
const J = r.decode(Z, { stream: !0 });
|
|
2669
2669
|
c += J;
|
|
2670
2670
|
const A = c.split(/\n\n+/);
|
|
2671
2671
|
c = A.pop() || "";
|
|
2672
|
-
for (const
|
|
2673
|
-
const Q =
|
|
2672
|
+
for (const U of A) {
|
|
2673
|
+
const Q = U.trim().split(`
|
|
2674
2674
|
`);
|
|
2675
2675
|
let B = "", $ = "";
|
|
2676
|
-
for (const
|
|
2677
|
-
|
|
2676
|
+
for (const M of Q)
|
|
2677
|
+
M.startsWith("event:") ? B = M.replace("event:", "").trim() : M.startsWith("data:") && ($ = M.replace("data:", "").trim());
|
|
2678
2678
|
if (B || (B = "message"), !!$)
|
|
2679
2679
|
try {
|
|
2680
|
-
const
|
|
2680
|
+
const M = JSON.parse($);
|
|
2681
2681
|
switch (B) {
|
|
2682
2682
|
case "message":
|
|
2683
|
-
(d = n.onMessage) == null || d.call(n,
|
|
2683
|
+
(d = n.onMessage) == null || d.call(n, M.value);
|
|
2684
2684
|
break;
|
|
2685
2685
|
case "tool-status":
|
|
2686
2686
|
(s = n.onToolStatus) == null || s.call(
|
|
2687
2687
|
n,
|
|
2688
|
-
|
|
2688
|
+
M
|
|
2689
2689
|
);
|
|
2690
2690
|
break;
|
|
2691
2691
|
case "error":
|
|
2692
|
-
(
|
|
2692
|
+
(h = n.onError) == null || h.call(n, new Error(M.value));
|
|
2693
2693
|
break;
|
|
2694
2694
|
case "field_metadata":
|
|
2695
|
-
(
|
|
2695
|
+
(v = n.onFieldMetadata) == null || v.call(n, M);
|
|
2696
2696
|
break;
|
|
2697
2697
|
case "done":
|
|
2698
|
-
(
|
|
2698
|
+
(m = n.onDone) == null || m.call(n);
|
|
2699
2699
|
break;
|
|
2700
2700
|
default:
|
|
2701
2701
|
console.warn(`Unknown event type: ${B}`);
|
|
2702
2702
|
}
|
|
2703
|
-
} catch (
|
|
2704
|
-
(_ = n.onError) == null || _.call(n,
|
|
2703
|
+
} catch (M) {
|
|
2704
|
+
(_ = n.onError) == null || _.call(n, M), console.error("Error processing event:", M);
|
|
2705
2705
|
continue;
|
|
2706
2706
|
} finally {
|
|
2707
|
-
|
|
2707
|
+
N && (i.releaseLock(), t.abort());
|
|
2708
2708
|
}
|
|
2709
2709
|
}
|
|
2710
2710
|
}
|
|
@@ -2726,19 +2726,19 @@ function en(e) {
|
|
|
2726
2726
|
}
|
|
2727
2727
|
return { data: null, error: new Error("Unknown error occurred in baseRequest") };
|
|
2728
2728
|
}
|
|
2729
|
-
async function l(d, s,
|
|
2729
|
+
async function l(d, s, h, v) {
|
|
2730
2730
|
return await o({
|
|
2731
2731
|
method: "POST",
|
|
2732
2732
|
url: "/prompt/load",
|
|
2733
2733
|
data: {
|
|
2734
2734
|
username: d,
|
|
2735
2735
|
project: s,
|
|
2736
|
-
agentID:
|
|
2737
|
-
formId:
|
|
2736
|
+
agentID: h,
|
|
2737
|
+
formId: v
|
|
2738
2738
|
}
|
|
2739
2739
|
});
|
|
2740
2740
|
}
|
|
2741
|
-
async function a(d, s,
|
|
2741
|
+
async function a(d, s, h, v, m) {
|
|
2742
2742
|
n.value = !0;
|
|
2743
2743
|
try {
|
|
2744
2744
|
return await Ct(
|
|
@@ -2752,15 +2752,15 @@ function en(e) {
|
|
|
2752
2752
|
s(_);
|
|
2753
2753
|
},
|
|
2754
2754
|
onToolStatus: (_) => {
|
|
2755
|
-
|
|
2755
|
+
h == null || h(_);
|
|
2756
2756
|
},
|
|
2757
2757
|
onDone: () => {
|
|
2758
|
-
n.value = !1,
|
|
2758
|
+
n.value = !1, m == null || m();
|
|
2759
2759
|
}
|
|
2760
2760
|
}
|
|
2761
2761
|
);
|
|
2762
2762
|
} catch (_) {
|
|
2763
|
-
throw n.value = !1,
|
|
2763
|
+
throw n.value = !1, v == null || v(_), console.error("Error in sendPrompt:", _), _;
|
|
2764
2764
|
}
|
|
2765
2765
|
}
|
|
2766
2766
|
async function i(d) {
|
|
@@ -2772,7 +2772,7 @@ function en(e) {
|
|
|
2772
2772
|
}
|
|
2773
2773
|
});
|
|
2774
2774
|
}
|
|
2775
|
-
async function r(d, s,
|
|
2775
|
+
async function r(d, s, h, v) {
|
|
2776
2776
|
n.value = !0;
|
|
2777
2777
|
try {
|
|
2778
2778
|
return await Ct(
|
|
@@ -2784,34 +2784,34 @@ function en(e) {
|
|
|
2784
2784
|
}
|
|
2785
2785
|
},
|
|
2786
2786
|
{
|
|
2787
|
-
onMessage: (
|
|
2788
|
-
onFieldMetadata: (
|
|
2787
|
+
onMessage: (m) => s(m),
|
|
2788
|
+
onFieldMetadata: (m) => h(m),
|
|
2789
2789
|
onDone: () => n.value = !1
|
|
2790
2790
|
}
|
|
2791
2791
|
);
|
|
2792
|
-
} catch (
|
|
2793
|
-
t.value =
|
|
2792
|
+
} catch (m) {
|
|
2793
|
+
t.value = m, v == null || v(m), n.value = !1;
|
|
2794
2794
|
}
|
|
2795
2795
|
}
|
|
2796
|
-
async function c(d, s,
|
|
2796
|
+
async function c(d, s, h, v, m) {
|
|
2797
2797
|
return await o({
|
|
2798
2798
|
method: "POST",
|
|
2799
2799
|
url: "/prompt/clear",
|
|
2800
2800
|
data: {
|
|
2801
2801
|
username: d,
|
|
2802
2802
|
project: s,
|
|
2803
|
-
agentId:
|
|
2804
|
-
formId:
|
|
2805
|
-
sessionId:
|
|
2803
|
+
agentId: h,
|
|
2804
|
+
formId: v,
|
|
2805
|
+
sessionId: m
|
|
2806
2806
|
}
|
|
2807
2807
|
});
|
|
2808
2808
|
}
|
|
2809
|
-
async function u(d, s,
|
|
2809
|
+
async function u(d, s, h) {
|
|
2810
2810
|
return await o({
|
|
2811
2811
|
method: "POST",
|
|
2812
2812
|
url: "/prompt/feedback",
|
|
2813
2813
|
data: {
|
|
2814
|
-
messageSessionID:
|
|
2814
|
+
messageSessionID: h,
|
|
2815
2815
|
feedbackValue: d,
|
|
2816
2816
|
feedbackComment: s
|
|
2817
2817
|
}
|
|
@@ -2831,10 +2831,13 @@ function en(e) {
|
|
|
2831
2831
|
const el = ["innerHTML"], tl = {
|
|
2832
2832
|
key: 1,
|
|
2833
2833
|
class: "markdown-renderer"
|
|
2834
|
-
}, nl = ["innerHTML"],
|
|
2834
|
+
}, nl = { class: "markdown-renderer__chat-summary" }, ol = ["innerHTML"], al = ["innerHTML"], ll = {
|
|
2835
2835
|
key: 2,
|
|
2836
2836
|
class: "markdown-renderer"
|
|
2837
|
-
},
|
|
2837
|
+
}, il = ["innerHTML"], rl = ["innerHTML"], sl = {
|
|
2838
|
+
key: 3,
|
|
2839
|
+
class: "markdown-renderer"
|
|
2840
|
+
}, cl = ["innerHTML"], ul = ["innerHTML"], je = /* @__PURE__ */ V({
|
|
2838
2841
|
__name: "MarkdownRender",
|
|
2839
2842
|
props: {
|
|
2840
2843
|
source: {},
|
|
@@ -2849,51 +2852,74 @@ const el = ["innerHTML"], tl = {
|
|
|
2849
2852
|
...n.options ?? {}
|
|
2850
2853
|
})
|
|
2851
2854
|
);
|
|
2852
|
-
n.plugins && n.plugins.forEach((
|
|
2853
|
-
const o = w(() => t.value.render(n.source)), l = w(() => n.source.includes('data-type="execution-plan"')), a = w(() => {
|
|
2855
|
+
n.plugins && n.plugins.forEach((v) => t.value.use(v));
|
|
2856
|
+
const o = w(() => t.value.render(n.source)), l = w(() => n.source.includes('data-type="execution-plan"')), a = w(() => n.source.includes('data-type="chat-summary"')), i = w(() => {
|
|
2857
|
+
if (!a.value) return "";
|
|
2858
|
+
const m = n.source.split(/\n|<br>/).find((_) => _.includes('data-type="chat-summary"'));
|
|
2859
|
+
return t.value.render(m || "Conversation Summary");
|
|
2860
|
+
}), r = w(() => {
|
|
2861
|
+
if (!a.value) return "";
|
|
2862
|
+
const v = n.source.split(/\n|<br>/), m = v.findIndex((N) => N.includes('data-type="chat-summary"'));
|
|
2863
|
+
if (m === -1) return "";
|
|
2864
|
+
const _ = v.slice(m + 1).join(`
|
|
2865
|
+
`);
|
|
2866
|
+
return t.value.render(_);
|
|
2867
|
+
}), c = w(() => {
|
|
2854
2868
|
if (!l.value) return "";
|
|
2855
|
-
const
|
|
2856
|
-
return
|
|
2857
|
-
}),
|
|
2869
|
+
const m = n.source.split(/\n|<br>/).find((_) => _.includes('data-type="execution-plan"'));
|
|
2870
|
+
return m ? t.value.render(m) : "";
|
|
2871
|
+
}), u = w(() => {
|
|
2858
2872
|
if (!l.value) return "";
|
|
2859
|
-
const
|
|
2860
|
-
if (
|
|
2861
|
-
const
|
|
2873
|
+
const v = n.source.split(/\n|<br>/), m = v.findIndex((N) => N.includes('data-type="execution-plan"'));
|
|
2874
|
+
if (m === -1) return "";
|
|
2875
|
+
const _ = v.slice(m + 1).join(`
|
|
2862
2876
|
`);
|
|
2863
|
-
return t.value.render(
|
|
2864
|
-
}),
|
|
2865
|
-
if (!
|
|
2866
|
-
const
|
|
2867
|
-
return
|
|
2868
|
-
}),
|
|
2869
|
-
if (!
|
|
2870
|
-
const
|
|
2871
|
-
(
|
|
2877
|
+
return t.value.render(_);
|
|
2878
|
+
}), d = w(() => n.source.includes('data-type="execution-progress"')), s = w(() => {
|
|
2879
|
+
if (!d.value) return "";
|
|
2880
|
+
const m = n.source.split(/\n|<br>/).find((_) => _.includes('data-type="execution-progress"'));
|
|
2881
|
+
return m ? t.value.render(m) : "";
|
|
2882
|
+
}), h = w(() => {
|
|
2883
|
+
if (!d.value) return "";
|
|
2884
|
+
const v = n.source.split(/\n|<br>/), m = v.findIndex(
|
|
2885
|
+
(N) => N.includes('data-type="execution-progress"')
|
|
2872
2886
|
);
|
|
2873
|
-
if (
|
|
2874
|
-
const
|
|
2887
|
+
if (m === -1) return "";
|
|
2888
|
+
const _ = v.slice(m + 1).join(`
|
|
2875
2889
|
`);
|
|
2876
|
-
return t.value.render(
|
|
2890
|
+
return t.value.render(_);
|
|
2877
2891
|
});
|
|
2878
|
-
return (
|
|
2892
|
+
return (v, m) => !l.value && !d.value && !a.value ? (y(), x("div", {
|
|
2879
2893
|
key: 0,
|
|
2880
2894
|
class: "markdown-renderer",
|
|
2881
2895
|
innerHTML: o.value
|
|
2882
|
-
}, null, 8, el)) :
|
|
2883
|
-
|
|
2884
|
-
|
|
2896
|
+
}, null, 8, el)) : a.value ? (y(), x("div", tl, [
|
|
2897
|
+
T("details", nl, [
|
|
2898
|
+
T("summary", {
|
|
2899
|
+
class: "markdown-renderer__chat-summary-title",
|
|
2900
|
+
innerHTML: i.value
|
|
2901
|
+
}, null, 8, ol),
|
|
2902
|
+
r.value ? (y(), x("div", {
|
|
2903
|
+
key: 0,
|
|
2904
|
+
class: "markdown-renderer__chat-summary-content",
|
|
2905
|
+
innerHTML: r.value
|
|
2906
|
+
}, null, 8, al)) : O("", !0)
|
|
2907
|
+
])
|
|
2908
|
+
])) : l.value ? (y(), x("div", ll, [
|
|
2909
|
+
T("div", { innerHTML: c.value }, null, 8, il),
|
|
2910
|
+
u.value ? (y(), x("div", {
|
|
2885
2911
|
key: 0,
|
|
2886
2912
|
class: "markdown-renderer__execution-plan-content",
|
|
2887
|
-
innerHTML:
|
|
2888
|
-
}, null, 8,
|
|
2889
|
-
])) :
|
|
2890
|
-
|
|
2891
|
-
|
|
2913
|
+
innerHTML: u.value
|
|
2914
|
+
}, null, 8, rl)) : O("", !0)
|
|
2915
|
+
])) : d.value ? (y(), x("div", sl, [
|
|
2916
|
+
T("div", { innerHTML: s.value }, null, 8, cl),
|
|
2917
|
+
h.value ? (y(), x("div", {
|
|
2892
2918
|
key: 0,
|
|
2893
2919
|
class: "markdown-renderer__execution-progress-content",
|
|
2894
|
-
innerHTML:
|
|
2895
|
-
}, null, 8,
|
|
2896
|
-
])) :
|
|
2920
|
+
innerHTML: h.value
|
|
2921
|
+
}, null, 8, ul)) : O("", !0)
|
|
2922
|
+
])) : O("", !0);
|
|
2897
2923
|
}
|
|
2898
2924
|
});
|
|
2899
2925
|
function tn(e, n) {
|
|
@@ -2908,10 +2934,10 @@ function tn(e, n) {
|
|
|
2908
2934
|
return n.toString();
|
|
2909
2935
|
}
|
|
2910
2936
|
}
|
|
2911
|
-
function
|
|
2937
|
+
function dl(e) {
|
|
2912
2938
|
return e.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
|
|
2913
2939
|
}
|
|
2914
|
-
const
|
|
2940
|
+
const pl = ["data-testid"], fl = { class: "q-field-preview__toolbar" }, vl = { class: "q-field-preview__footer" }, ml = /* @__PURE__ */ V({
|
|
2915
2941
|
__name: "FieldPreview",
|
|
2916
2942
|
props: {
|
|
2917
2943
|
name: {},
|
|
@@ -2922,49 +2948,49 @@ const sl = ["data-testid"], cl = { class: "q-field-preview__toolbar" }, ul = { c
|
|
|
2922
2948
|
},
|
|
2923
2949
|
emits: ["apply", "regenerate"],
|
|
2924
2950
|
setup(e, { emit: n }) {
|
|
2925
|
-
const t = e, o = n, l = ke(), a = q(t.applied), i = q(!1), r = w(() => t.disabled || a.value), c = w(() => t.disabled || i.value), u = w(() => t.type === "text" || t.type === "multiline_text" ?
|
|
2926
|
-
const
|
|
2927
|
-
return u.value ===
|
|
2951
|
+
const t = e, o = n, l = ke(), a = q(t.applied), i = q(!1), r = w(() => t.disabled || a.value), c = w(() => t.disabled || i.value), u = w(() => t.type === "text" || t.type === "multiline_text" ? je : "div"), d = w(() => {
|
|
2952
|
+
const m = {};
|
|
2953
|
+
return u.value === je ? m.source = t.text : m.innerHTML = t.text, m;
|
|
2928
2954
|
}), s = w(() => {
|
|
2929
|
-
const
|
|
2930
|
-
return u.value !==
|
|
2955
|
+
const m = ["q-field-preview__content"];
|
|
2956
|
+
return u.value !== je && m.push("preserve-whitespace"), m;
|
|
2931
2957
|
});
|
|
2932
|
-
function
|
|
2958
|
+
function h() {
|
|
2933
2959
|
if (a.value) return;
|
|
2934
2960
|
a.value = !0;
|
|
2935
|
-
const
|
|
2936
|
-
o("apply",
|
|
2961
|
+
const m = tn(t.type, t.text);
|
|
2962
|
+
o("apply", m);
|
|
2937
2963
|
}
|
|
2938
|
-
function
|
|
2964
|
+
function v() {
|
|
2939
2965
|
i.value || (i.value = !0, o("regenerate", t.name));
|
|
2940
2966
|
}
|
|
2941
|
-
return (
|
|
2967
|
+
return (m, _) => (y(), x("div", {
|
|
2942
2968
|
class: "q-field-preview",
|
|
2943
|
-
"data-testid": f(
|
|
2969
|
+
"data-testid": f(dl)(t.name)
|
|
2944
2970
|
}, [
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
Qe(
|
|
2948
|
-
|
|
2971
|
+
T("div", fl, [
|
|
2972
|
+
T("span", null, [
|
|
2973
|
+
Qe(se(f(l).suggestionsForField) + " ", 1),
|
|
2974
|
+
T("b", null, se(t.name), 1)
|
|
2949
2975
|
])
|
|
2950
2976
|
]),
|
|
2951
|
-
|
|
2952
|
-
class:
|
|
2977
|
+
T("div", {
|
|
2978
|
+
class: K(s.value)
|
|
2953
2979
|
}, [
|
|
2954
|
-
(y(),
|
|
2980
|
+
(y(), W(Bt(u.value), Re(Ge(d.value)), null, 16))
|
|
2955
2981
|
], 2),
|
|
2956
|
-
|
|
2957
|
-
D(f(
|
|
2982
|
+
T("div", vl, [
|
|
2983
|
+
D(f(Gt), { borderless: "" }, {
|
|
2958
2984
|
default: R(() => [
|
|
2959
2985
|
D(f(oe), {
|
|
2960
2986
|
title: f(l).regenerateResponse,
|
|
2961
2987
|
disabled: c.value,
|
|
2962
2988
|
readonly: c.value,
|
|
2963
2989
|
borderless: "",
|
|
2964
|
-
onClick:
|
|
2990
|
+
onClick: v
|
|
2965
2991
|
}, {
|
|
2966
2992
|
default: R(() => [
|
|
2967
|
-
D(f(
|
|
2993
|
+
D(f(X), { icon: "reset" })
|
|
2968
2994
|
]),
|
|
2969
2995
|
_: 1
|
|
2970
2996
|
}, 8, ["title", "disabled", "readonly"]),
|
|
@@ -2973,10 +2999,10 @@ const sl = ["data-testid"], cl = { class: "q-field-preview__toolbar" }, ul = { c
|
|
|
2973
2999
|
"data-testid": "apply-button",
|
|
2974
3000
|
disabled: r.value,
|
|
2975
3001
|
readonly: r.value,
|
|
2976
|
-
onClick:
|
|
3002
|
+
onClick: h
|
|
2977
3003
|
}, {
|
|
2978
3004
|
default: R(() => [
|
|
2979
|
-
D(f(
|
|
3005
|
+
D(f(X), { icon: "apply" })
|
|
2980
3006
|
]),
|
|
2981
3007
|
_: 1
|
|
2982
3008
|
}, 8, ["label", "disabled", "readonly"])
|
|
@@ -2984,42 +3010,42 @@ const sl = ["data-testid"], cl = { class: "q-field-preview__toolbar" }, ul = { c
|
|
|
2984
3010
|
_: 1
|
|
2985
3011
|
})
|
|
2986
3012
|
])
|
|
2987
|
-
], 8,
|
|
3013
|
+
], 8, pl));
|
|
2988
3014
|
}
|
|
2989
|
-
}),
|
|
3015
|
+
}), gl = { class: "pulsing-dots" }, bl = ["innerHTML"], hl = { class: "dots-container" }, St = /* @__PURE__ */ V({
|
|
2990
3016
|
__name: "PulseDots",
|
|
2991
3017
|
props: {
|
|
2992
3018
|
text: {}
|
|
2993
3019
|
},
|
|
2994
3020
|
setup(e) {
|
|
2995
3021
|
const n = e, t = [1, 2, 3], o = ke(), l = w(() => n.text || o.generatingResponse);
|
|
2996
|
-
return (a, i) => (y(), x("div",
|
|
2997
|
-
|
|
3022
|
+
return (a, i) => (y(), x("div", gl, [
|
|
3023
|
+
T("span", {
|
|
2998
3024
|
class: "generating-text",
|
|
2999
3025
|
innerHTML: l.value
|
|
3000
|
-
}, null, 8,
|
|
3001
|
-
|
|
3002
|
-
(y(), x(ve, null, qe(t, (r, c) =>
|
|
3026
|
+
}, null, 8, bl),
|
|
3027
|
+
T("div", hl, [
|
|
3028
|
+
(y(), x(ve, null, qe(t, (r, c) => T("span", {
|
|
3003
3029
|
key: c,
|
|
3004
3030
|
class: "dot",
|
|
3005
|
-
style:
|
|
3031
|
+
style: Ie({ animationDelay: c * 0.2 + "s" })
|
|
3006
3032
|
}, " • ", 4)), 64))
|
|
3007
3033
|
])
|
|
3008
3034
|
]));
|
|
3009
3035
|
}
|
|
3010
|
-
}),
|
|
3036
|
+
}), yl = { class: "q-chatbot__message-container" }, wl = { class: "q-chatbot__message-wrapper" }, _l = {
|
|
3011
3037
|
key: 0,
|
|
3012
3038
|
class: "q-chatbot__image-preview"
|
|
3013
|
-
},
|
|
3039
|
+
}, xl = ["src", "alt"], kl = {
|
|
3014
3040
|
key: 1,
|
|
3015
3041
|
class: "q-chatbot__file-preview-container"
|
|
3016
|
-
},
|
|
3042
|
+
}, $l = { class: "q-chatbot__file-icon-container" }, Al = { class: "q-chatbot__file-info" }, Il = { class: "q-chatbot__file-name" }, El = { class: "q-chatbot__file-extension" }, Cl = { class: "q-chatbot__message" }, Sl = {
|
|
3017
3043
|
key: 1,
|
|
3018
3044
|
class: "q-chatbot__text q-chatbot__user-text"
|
|
3019
|
-
},
|
|
3045
|
+
}, Dl = {
|
|
3020
3046
|
key: 2,
|
|
3021
3047
|
class: "q-chatbot__message"
|
|
3022
|
-
},
|
|
3048
|
+
}, Bl = /* @__PURE__ */ V({
|
|
3023
3049
|
__name: "ChatBotMessage",
|
|
3024
3050
|
props: {
|
|
3025
3051
|
sender: { default: "user" },
|
|
@@ -3047,8 +3073,8 @@ const sl = ["data-testid"], cl = { class: "q-field-preview__toolbar" }, ul = { c
|
|
|
3047
3073
|
}), c = w(
|
|
3048
3074
|
() => t.sender === "bot" ? t.chatbotImage : t.userImage
|
|
3049
3075
|
), u = w(() => {
|
|
3050
|
-
var
|
|
3051
|
-
const A = (
|
|
3076
|
+
var U;
|
|
3077
|
+
const A = (U = t.message) == null ? void 0 : U.match(/<span data-type="tool-calling">(.*?)<\/span>/);
|
|
3052
3078
|
return A ? A[1] : "";
|
|
3053
3079
|
}), d = w(
|
|
3054
3080
|
() => {
|
|
@@ -3056,16 +3082,16 @@ const sl = ["data-testid"], cl = { class: "q-field-preview__toolbar" }, ul = { c
|
|
|
3056
3082
|
return ((A = t.message) == null ? void 0 : A.replace(/<span data-type="tool-calling">.*?<\/span>/, "")) ?? "";
|
|
3057
3083
|
}
|
|
3058
3084
|
), s = w(() => {
|
|
3059
|
-
var
|
|
3060
|
-
return (
|
|
3061
|
-
}),
|
|
3085
|
+
var U, Q;
|
|
3086
|
+
return (U = t.file) != null && U.fileData ? ((Q = t.file.fileData.name.split(".").pop()) == null ? void 0 : Q.toUpperCase()) ?? "" : "";
|
|
3087
|
+
}), h = w(() => {
|
|
3062
3088
|
var A;
|
|
3063
3089
|
return ((A = t.message) == null ? void 0 : A.includes('data-type="execution-plan"')) ?? !1;
|
|
3064
3090
|
});
|
|
3065
|
-
function
|
|
3091
|
+
function v() {
|
|
3066
3092
|
o("send-message", l.approveProceedPlan);
|
|
3067
3093
|
}
|
|
3068
|
-
function
|
|
3094
|
+
function m() {
|
|
3069
3095
|
o("cancel-execution");
|
|
3070
3096
|
}
|
|
3071
3097
|
function _() {
|
|
@@ -3075,116 +3101,116 @@ const sl = ["data-testid"], cl = { class: "q-field-preview__toolbar" }, ul = { c
|
|
|
3075
3101
|
console.error("Failed to copy response: ", A);
|
|
3076
3102
|
});
|
|
3077
3103
|
}
|
|
3078
|
-
function
|
|
3079
|
-
o("apply-fields", [{ id:
|
|
3104
|
+
function N(A, U) {
|
|
3105
|
+
o("apply-fields", [{ id: U.id, text: A }]);
|
|
3080
3106
|
}
|
|
3081
|
-
function
|
|
3107
|
+
function Z() {
|
|
3082
3108
|
if (!t.fields || t.fields.length === 0) return;
|
|
3083
|
-
const A = t.fields.map((
|
|
3084
|
-
id:
|
|
3085
|
-
text: tn(
|
|
3109
|
+
const A = t.fields.map((U) => ({
|
|
3110
|
+
id: U.id,
|
|
3111
|
+
text: tn(U.type, U.text)
|
|
3086
3112
|
}));
|
|
3087
3113
|
o("apply-fields", A);
|
|
3088
3114
|
}
|
|
3089
|
-
function J(A,
|
|
3090
|
-
A === null ||
|
|
3115
|
+
function J(A, U) {
|
|
3116
|
+
A === null || U === null || !t.sessionID || a(A, U, t.sessionID);
|
|
3091
3117
|
}
|
|
3092
|
-
return (A,
|
|
3118
|
+
return (A, U) => {
|
|
3093
3119
|
var Q, B, $;
|
|
3094
|
-
return y(), x("div",
|
|
3095
|
-
D(f(
|
|
3120
|
+
return y(), x("div", yl, [
|
|
3121
|
+
D(f(X), {
|
|
3096
3122
|
type: "img",
|
|
3097
3123
|
icon: c.value,
|
|
3098
3124
|
alt: f(l).senderImage,
|
|
3099
3125
|
class: "q-chatbot__profile"
|
|
3100
3126
|
}, null, 8, ["icon", "alt"]),
|
|
3101
|
-
|
|
3102
|
-
r.value ? (y(), x("div",
|
|
3103
|
-
|
|
3127
|
+
T("div", wl, [
|
|
3128
|
+
r.value ? (y(), x("div", _l, [
|
|
3129
|
+
T("img", {
|
|
3104
3130
|
src: (Q = t.file) == null ? void 0 : Q.previewUrl,
|
|
3105
3131
|
alt: f(l).imagePreview
|
|
3106
|
-
}, null, 8,
|
|
3107
|
-
])) : (B = t.file) != null && B.fileData && !r.value ? (y(), x("div",
|
|
3108
|
-
|
|
3109
|
-
D(f(
|
|
3132
|
+
}, null, 8, xl)
|
|
3133
|
+
])) : (B = t.file) != null && B.fileData && !r.value ? (y(), x("div", kl, [
|
|
3134
|
+
T("div", $l, [
|
|
3135
|
+
D(f(X), {
|
|
3110
3136
|
icon: "file",
|
|
3111
3137
|
class: "q-chatbot__file-icon"
|
|
3112
3138
|
})
|
|
3113
3139
|
]),
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3140
|
+
T("div", Al, [
|
|
3141
|
+
T("span", Il, se(($ = t.file) == null ? void 0 : $.fileData.name), 1),
|
|
3142
|
+
T("span", El, se(s.value), 1)
|
|
3117
3143
|
])
|
|
3118
|
-
])) :
|
|
3119
|
-
|
|
3120
|
-
A.loading ? (y(),
|
|
3121
|
-
key:
|
|
3144
|
+
])) : O("", !0),
|
|
3145
|
+
T("div", Cl, [
|
|
3146
|
+
A.loading ? (y(), W(St, { key: 0 })) : t.sender === "bot" && t.fields.length > 0 ? (y(!0), x(ve, { key: 1 }, qe(t.fields, (M, de) => (y(), W(f(ml), {
|
|
3147
|
+
key: de,
|
|
3122
3148
|
class: "q-chatbot__text",
|
|
3123
|
-
text:
|
|
3124
|
-
name:
|
|
3125
|
-
type:
|
|
3149
|
+
text: M.text || "",
|
|
3150
|
+
name: M.name,
|
|
3151
|
+
type: M.type,
|
|
3126
3152
|
disabled: A.loading,
|
|
3127
|
-
onRegenerate: () => o("regenerate",
|
|
3128
|
-
onApply: (ie) =>
|
|
3153
|
+
onRegenerate: () => o("regenerate", M.name),
|
|
3154
|
+
onApply: (ie) => N(ie, M)
|
|
3129
3155
|
}, null, 8, ["text", "name", "type", "disabled", "onRegenerate", "onApply"]))), 128)) : (y(), x(ve, { key: 2 }, [
|
|
3130
|
-
t.sender === "bot" ? (y(),
|
|
3156
|
+
t.sender === "bot" ? (y(), W(f(je), {
|
|
3131
3157
|
key: 0,
|
|
3132
3158
|
class: "q-chatbot__text",
|
|
3133
3159
|
source: d.value || ""
|
|
3134
|
-
}, null, 8, ["source"])) : (y(), x("div",
|
|
3160
|
+
}, null, 8, ["source"])) : (y(), x("div", Sl, se(t.message), 1))
|
|
3135
3161
|
], 64))
|
|
3136
3162
|
]),
|
|
3137
|
-
u.value ? (y(), x("div",
|
|
3163
|
+
u.value ? (y(), x("div", Dl, [
|
|
3138
3164
|
D(St, {
|
|
3139
3165
|
class: "q-chatbot__text",
|
|
3140
3166
|
text: u.value
|
|
3141
3167
|
}, null, 8, ["text"])
|
|
3142
|
-
])) :
|
|
3168
|
+
])) : O("", !0)
|
|
3143
3169
|
]),
|
|
3144
|
-
D(f(
|
|
3170
|
+
D(f(Pl), {
|
|
3145
3171
|
"show-buttons": i.value,
|
|
3146
3172
|
loading: t.loading,
|
|
3147
3173
|
"date-format": t.dateFormat,
|
|
3148
3174
|
"is-last-message": t.isLastMessage,
|
|
3149
|
-
"is-execution-plan":
|
|
3175
|
+
"is-execution-plan": h.value,
|
|
3150
3176
|
"is-streaming": t.isStreaming,
|
|
3151
3177
|
"show-cancel-execution": t.showCancelExecution,
|
|
3152
3178
|
"cancel-execution-disabled": t.cancelExecutionDisabled,
|
|
3153
3179
|
onCopyResponse: _,
|
|
3154
3180
|
onSubmitFeedback: J,
|
|
3155
|
-
onApplyAll:
|
|
3156
|
-
onApproveProceedPlan:
|
|
3157
|
-
onCancelExecution:
|
|
3181
|
+
onApplyAll: Z,
|
|
3182
|
+
onApproveProceedPlan: v,
|
|
3183
|
+
onCancelExecution: m
|
|
3158
3184
|
}, null, 8, ["show-buttons", "loading", "date-format", "is-last-message", "is-execution-plan", "is-streaming", "show-cancel-execution", "cancel-execution-disabled"])
|
|
3159
3185
|
]);
|
|
3160
3186
|
};
|
|
3161
3187
|
}
|
|
3162
|
-
}),
|
|
3188
|
+
}), te = [];
|
|
3163
3189
|
for (let e = 0; e < 256; ++e)
|
|
3164
|
-
|
|
3165
|
-
function
|
|
3166
|
-
return (
|
|
3190
|
+
te.push((e + 256).toString(16).slice(1));
|
|
3191
|
+
function Ll(e, n = 0) {
|
|
3192
|
+
return (te[e[n + 0]] + te[e[n + 1]] + te[e[n + 2]] + te[e[n + 3]] + "-" + te[e[n + 4]] + te[e[n + 5]] + "-" + te[e[n + 6]] + te[e[n + 7]] + "-" + te[e[n + 8]] + te[e[n + 9]] + "-" + te[e[n + 10]] + te[e[n + 11]] + te[e[n + 12]] + te[e[n + 13]] + te[e[n + 14]] + te[e[n + 15]]).toLowerCase();
|
|
3167
3193
|
}
|
|
3168
3194
|
let ot;
|
|
3169
|
-
const
|
|
3170
|
-
function
|
|
3195
|
+
const Rl = new Uint8Array(16);
|
|
3196
|
+
function Tl() {
|
|
3171
3197
|
if (!ot) {
|
|
3172
3198
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
3173
3199
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
3174
3200
|
ot = crypto.getRandomValues.bind(crypto);
|
|
3175
3201
|
}
|
|
3176
|
-
return ot(
|
|
3202
|
+
return ot(Rl);
|
|
3177
3203
|
}
|
|
3178
|
-
const
|
|
3204
|
+
const Ml = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Dt = { randomUUID: Ml };
|
|
3179
3205
|
function nn(e, n, t) {
|
|
3180
3206
|
var l;
|
|
3181
3207
|
if (Dt.randomUUID && !n && !e)
|
|
3182
3208
|
return Dt.randomUUID();
|
|
3183
3209
|
e = e || {};
|
|
3184
|
-
const o = e.random ?? ((l = e.rng) == null ? void 0 : l.call(e)) ??
|
|
3210
|
+
const o = e.random ?? ((l = e.rng) == null ? void 0 : l.call(e)) ?? Tl();
|
|
3185
3211
|
if (o.length < 16)
|
|
3186
3212
|
throw new Error("Random bytes length must be >= 16");
|
|
3187
|
-
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128,
|
|
3213
|
+
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, Ll(o);
|
|
3188
3214
|
}
|
|
3189
3215
|
const we = q([]), Oe = q(1);
|
|
3190
3216
|
function on() {
|
|
@@ -3223,10 +3249,10 @@ function on() {
|
|
|
3223
3249
|
deleteMessageById: o
|
|
3224
3250
|
};
|
|
3225
3251
|
}
|
|
3226
|
-
const
|
|
3252
|
+
const ql = { class: "q-chatbot__dialog-title" }, Nl = {
|
|
3227
3253
|
key: 0,
|
|
3228
3254
|
class: "q-chatbot__feedback-buttons"
|
|
3229
|
-
},
|
|
3255
|
+
}, Fl = { class: "q-chatbot__sender" }, Pl = /* @__PURE__ */ V({
|
|
3230
3256
|
__name: "ChatBotMessageButtons",
|
|
3231
3257
|
props: {
|
|
3232
3258
|
loading: { type: Boolean },
|
|
@@ -3241,10 +3267,10 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3241
3267
|
},
|
|
3242
3268
|
emits: ["submit-feedback", "copy-response", "apply-all", "approve-proceed-plan", "cancel-execution"],
|
|
3243
3269
|
setup(e, { emit: n }) {
|
|
3244
|
-
const t = e, o = n, l = ke(), { getLastMessage: a } = on(), i = q(!1), r = q(""), c = q(null), u = q(!1), d = q(!1), s = q(!1),
|
|
3270
|
+
const t = e, o = n, l = ke(), { getLastMessage: a } = on(), i = q(!1), r = q(""), c = q(null), u = q(!1), d = q(!1), s = q(!1), h = w(() => t.loading || u.value), v = w(() => d.value || !t.isLastMessage || t.loading || t.isStreaming), m = w(() => s.value || t.cancelExecutionDisabled || !t.isLastMessage || t.loading), _ = t.date || /* @__PURE__ */ new Date(), N = a(), Z = w(() => N ? N.fields && N.fields.length > 1 : !1), J = w(() => t.isExecutionPlan), A = w(() => t.showCancelExecution), U = [
|
|
3245
3271
|
{
|
|
3246
3272
|
id: "confirm-btn",
|
|
3247
|
-
action:
|
|
3273
|
+
action: F,
|
|
3248
3274
|
props: {
|
|
3249
3275
|
label: l.submitButton,
|
|
3250
3276
|
class: "q-chatbot__dialog-confirm-button"
|
|
@@ -3264,46 +3290,46 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3264
3290
|
}
|
|
3265
3291
|
}
|
|
3266
3292
|
], Q = w(() => t.dateFormat ? $(_, "HH:mm") : _.toLocaleString()), B = w(() => `${Q.value}`);
|
|
3267
|
-
function $(C,
|
|
3268
|
-
const z = C.getDate().toString().padStart(2, "0"),
|
|
3269
|
-
return
|
|
3293
|
+
function $(C, E) {
|
|
3294
|
+
const z = C.getDate().toString().padStart(2, "0"), j = (C.getMonth() + 1).toString().padStart(2, "0"), ae = C.getFullYear().toString().padStart(2, "0"), ue = C.getHours().toString().padStart(2, "0"), ne = C.getMinutes().toString().padStart(2, "0"), he = C.getSeconds().toString().padStart(2, "0");
|
|
3295
|
+
return E.replace("dd", z).replace("MM", j).replace("yyyy", ae).replace("HH", ue).replace("mm", ne).replace("ss", he);
|
|
3270
3296
|
}
|
|
3271
|
-
function
|
|
3297
|
+
function M(C) {
|
|
3272
3298
|
i.value = !0, r.value = "", c.value = C;
|
|
3273
3299
|
}
|
|
3274
|
-
function
|
|
3275
|
-
|
|
3300
|
+
function de() {
|
|
3301
|
+
M(0);
|
|
3276
3302
|
}
|
|
3277
3303
|
function ie() {
|
|
3278
|
-
|
|
3304
|
+
M(1);
|
|
3279
3305
|
}
|
|
3280
3306
|
function p() {
|
|
3281
3307
|
u.value || (u.value = !0, o("apply-all"));
|
|
3282
3308
|
}
|
|
3283
|
-
function
|
|
3309
|
+
function b() {
|
|
3284
3310
|
d.value || (d.value = !0, o("approve-proceed-plan"));
|
|
3285
3311
|
}
|
|
3286
3312
|
function k() {
|
|
3287
3313
|
s.value || (s.value = !0, o("cancel-execution"));
|
|
3288
3314
|
}
|
|
3289
|
-
function
|
|
3315
|
+
function F() {
|
|
3290
3316
|
c.value && (o("submit-feedback", c.value, r.value), i.value = !1, r.value = "", c.value = null);
|
|
3291
3317
|
}
|
|
3292
3318
|
function L() {
|
|
3293
3319
|
o("copy-response");
|
|
3294
3320
|
}
|
|
3295
|
-
return (C,
|
|
3321
|
+
return (C, E) => (y(), x(ve, null, [
|
|
3296
3322
|
D(f(Kt), {
|
|
3297
3323
|
modelValue: i.value,
|
|
3298
|
-
"onUpdate:modelValue":
|
|
3324
|
+
"onUpdate:modelValue": E[1] || (E[1] = (z) => i.value = z),
|
|
3299
3325
|
inline: "",
|
|
3300
|
-
buttons:
|
|
3326
|
+
buttons: U
|
|
3301
3327
|
}, {
|
|
3302
3328
|
body: R(() => [
|
|
3303
|
-
|
|
3329
|
+
T("div", ql, se(f(l).commentDialogTitle), 1),
|
|
3304
3330
|
D(f(Ht), {
|
|
3305
3331
|
modelValue: r.value,
|
|
3306
|
-
"onUpdate:modelValue":
|
|
3332
|
+
"onUpdate:modelValue": E[0] || (E[0] = (z) => r.value = z),
|
|
3307
3333
|
class: "q-chatbot__dialog-comment-input",
|
|
3308
3334
|
"max-length": 150,
|
|
3309
3335
|
size: "large",
|
|
@@ -3312,8 +3338,8 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3312
3338
|
]),
|
|
3313
3339
|
_: 1
|
|
3314
3340
|
}, 8, ["modelValue"]),
|
|
3315
|
-
C.showButtons ? (y(), x("div",
|
|
3316
|
-
D(f(
|
|
3341
|
+
C.showButtons ? (y(), x("div", Nl, [
|
|
3342
|
+
D(f(Gt), null, {
|
|
3317
3343
|
default: R(() => [
|
|
3318
3344
|
D(f(oe), {
|
|
3319
3345
|
title: f(l).goodResponse,
|
|
@@ -3323,7 +3349,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3323
3349
|
onClick: ie
|
|
3324
3350
|
}, {
|
|
3325
3351
|
default: R(() => [
|
|
3326
|
-
D(f(
|
|
3352
|
+
D(f(X), { icon: "thumb-up" })
|
|
3327
3353
|
]),
|
|
3328
3354
|
_: 1
|
|
3329
3355
|
}, 8, ["title", "disabled"]),
|
|
@@ -3332,10 +3358,10 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3332
3358
|
class: "q-chatbot__bad-response-button",
|
|
3333
3359
|
borderless: "",
|
|
3334
3360
|
disabled: t.loading,
|
|
3335
|
-
onClick:
|
|
3361
|
+
onClick: de
|
|
3336
3362
|
}, {
|
|
3337
3363
|
default: R(() => [
|
|
3338
|
-
D(f(
|
|
3364
|
+
D(f(X), { icon: "thumb-down" })
|
|
3339
3365
|
]),
|
|
3340
3366
|
_: 1
|
|
3341
3367
|
}, 8, ["title", "disabled"]),
|
|
@@ -3347,65 +3373,65 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3347
3373
|
onClick: L
|
|
3348
3374
|
}, {
|
|
3349
3375
|
default: R(() => [
|
|
3350
|
-
D(f(
|
|
3376
|
+
D(f(X), { icon: "copy-content" })
|
|
3351
3377
|
]),
|
|
3352
3378
|
_: 1
|
|
3353
3379
|
}, 8, ["title", "disabled"]),
|
|
3354
|
-
|
|
3380
|
+
Z.value ? (y(), W(f(oe), {
|
|
3355
3381
|
key: 0,
|
|
3356
|
-
title:
|
|
3382
|
+
title: h.value ? void 0 : f(l).applyAll,
|
|
3357
3383
|
class: "q-chatbot__apply-all-button",
|
|
3358
3384
|
variant: "bold",
|
|
3359
3385
|
borderless: "",
|
|
3360
|
-
disabled:
|
|
3361
|
-
readonly:
|
|
3386
|
+
disabled: h.value,
|
|
3387
|
+
readonly: h.value,
|
|
3362
3388
|
label: f(l).applyAll,
|
|
3363
3389
|
onClick: p
|
|
3364
3390
|
}, {
|
|
3365
3391
|
default: R(() => [
|
|
3366
|
-
D(f(
|
|
3392
|
+
D(f(X), { icon: "apply" })
|
|
3367
3393
|
]),
|
|
3368
3394
|
_: 1
|
|
3369
|
-
}, 8, ["title", "disabled", "readonly", "label"])) :
|
|
3370
|
-
J.value ? (y(),
|
|
3395
|
+
}, 8, ["title", "disabled", "readonly", "label"])) : O("", !0),
|
|
3396
|
+
J.value ? (y(), W(f(oe), {
|
|
3371
3397
|
key: 1,
|
|
3372
|
-
title:
|
|
3398
|
+
title: v.value ? void 0 : f(l).approveProceed,
|
|
3373
3399
|
class: "q-chatbot__approve-proceed-plan-button",
|
|
3374
3400
|
variant: "bold",
|
|
3375
3401
|
borderless: "",
|
|
3376
|
-
disabled:
|
|
3377
|
-
readonly:
|
|
3402
|
+
disabled: v.value,
|
|
3403
|
+
readonly: v.value,
|
|
3378
3404
|
label: f(l).approveProceed,
|
|
3379
|
-
onClick:
|
|
3405
|
+
onClick: b
|
|
3380
3406
|
}, {
|
|
3381
3407
|
default: R(() => [
|
|
3382
|
-
D(f(
|
|
3408
|
+
D(f(X), { icon: "apply" })
|
|
3383
3409
|
]),
|
|
3384
3410
|
_: 1
|
|
3385
|
-
}, 8, ["title", "disabled", "readonly", "label"])) :
|
|
3386
|
-
A.value ? (y(),
|
|
3411
|
+
}, 8, ["title", "disabled", "readonly", "label"])) : O("", !0),
|
|
3412
|
+
A.value ? (y(), W(f(oe), {
|
|
3387
3413
|
key: 2,
|
|
3388
|
-
title:
|
|
3414
|
+
title: m.value ? void 0 : f(l).cancelButton,
|
|
3389
3415
|
class: "q-chatbot__cancel-execution-button",
|
|
3390
3416
|
borderless: "",
|
|
3391
|
-
disabled:
|
|
3392
|
-
readonly:
|
|
3417
|
+
disabled: m.value,
|
|
3418
|
+
readonly: m.value,
|
|
3393
3419
|
label: f(l).cancelButton,
|
|
3394
3420
|
onClick: k
|
|
3395
3421
|
}, {
|
|
3396
3422
|
default: R(() => [
|
|
3397
|
-
D(f(
|
|
3423
|
+
D(f(X), { icon: "cancel" })
|
|
3398
3424
|
]),
|
|
3399
3425
|
_: 1
|
|
3400
|
-
}, 8, ["title", "disabled", "readonly", "label"])) :
|
|
3426
|
+
}, 8, ["title", "disabled", "readonly", "label"])) : O("", !0)
|
|
3401
3427
|
]),
|
|
3402
3428
|
_: 1
|
|
3403
3429
|
})
|
|
3404
|
-
])) :
|
|
3405
|
-
|
|
3430
|
+
])) : O("", !0),
|
|
3431
|
+
T("div", Fl, se(B.value), 1)
|
|
3406
3432
|
], 64));
|
|
3407
3433
|
}
|
|
3408
|
-
}),
|
|
3434
|
+
}), Ol = { class: "q-chatbot__tools" }, Ul = { class: "q-chatbot__tools__select" }, jl = /* @__PURE__ */ V({
|
|
3409
3435
|
__name: "ChatToolBar",
|
|
3410
3436
|
props: {
|
|
3411
3437
|
disabled: { type: Boolean },
|
|
@@ -3419,18 +3445,18 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3419
3445
|
value: "Default Chat",
|
|
3420
3446
|
formId: ""
|
|
3421
3447
|
}, i = w(() => t.availableAgents && t.availableAgents.length > 0), r = q(t.selectedAgentKey || a.key);
|
|
3422
|
-
|
|
3448
|
+
ce(
|
|
3423
3449
|
() => t.selectedAgentKey,
|
|
3424
3450
|
(s) => {
|
|
3425
3451
|
r.value = s || a.key;
|
|
3426
3452
|
}
|
|
3427
3453
|
);
|
|
3428
3454
|
const c = w(() => {
|
|
3429
|
-
var
|
|
3430
|
-
const s = (
|
|
3431
|
-
key:
|
|
3432
|
-
value:
|
|
3433
|
-
formId:
|
|
3455
|
+
var h;
|
|
3456
|
+
const s = (h = t.availableAgents) == null ? void 0 : h.map((v) => ({
|
|
3457
|
+
key: v.key,
|
|
3458
|
+
value: v.value,
|
|
3459
|
+
formId: v.formId
|
|
3434
3460
|
}));
|
|
3435
3461
|
return s == null || s.push(a), s || [a];
|
|
3436
3462
|
});
|
|
@@ -3438,24 +3464,24 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3438
3464
|
o("clear");
|
|
3439
3465
|
}
|
|
3440
3466
|
function d(s) {
|
|
3441
|
-
const
|
|
3442
|
-
if (
|
|
3443
|
-
if (
|
|
3467
|
+
const h = c.value.find((v) => v.key === s);
|
|
3468
|
+
if (h) {
|
|
3469
|
+
if (h.key === a.key) {
|
|
3444
3470
|
o("change-chat", { key: "", formId: "" });
|
|
3445
3471
|
return;
|
|
3446
3472
|
}
|
|
3447
|
-
o("change-chat",
|
|
3473
|
+
o("change-chat", h);
|
|
3448
3474
|
}
|
|
3449
3475
|
}
|
|
3450
|
-
return (s,
|
|
3451
|
-
const
|
|
3452
|
-
return y(), x("div",
|
|
3453
|
-
|
|
3454
|
-
i.value ? (y(),
|
|
3476
|
+
return (s, h) => {
|
|
3477
|
+
const v = mn("q-select");
|
|
3478
|
+
return y(), x("div", Ol, [
|
|
3479
|
+
T("div", Ul, [
|
|
3480
|
+
i.value ? (y(), W(v, {
|
|
3455
3481
|
key: 0,
|
|
3456
3482
|
modelValue: r.value,
|
|
3457
3483
|
"onUpdate:modelValue": [
|
|
3458
|
-
|
|
3484
|
+
h[0] || (h[0] = (m) => r.value = m),
|
|
3459
3485
|
d
|
|
3460
3486
|
],
|
|
3461
3487
|
inline: "",
|
|
@@ -3463,7 +3489,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3463
3489
|
class: "q-chatbot__tools-select-input",
|
|
3464
3490
|
size: "medium",
|
|
3465
3491
|
items: c.value
|
|
3466
|
-
}, null, 8, ["modelValue", "items"])) :
|
|
3492
|
+
}, null, 8, ["modelValue", "items"])) : O("", !0)
|
|
3467
3493
|
]),
|
|
3468
3494
|
D(f(oe), {
|
|
3469
3495
|
title: f(l),
|
|
@@ -3473,21 +3499,21 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3473
3499
|
onClick: u
|
|
3474
3500
|
}, {
|
|
3475
3501
|
default: R(() => [
|
|
3476
|
-
D(f(
|
|
3502
|
+
D(f(X), { icon: "bin" })
|
|
3477
3503
|
]),
|
|
3478
3504
|
_: 1
|
|
3479
3505
|
}, 8, ["title", "disabled"])
|
|
3480
3506
|
]);
|
|
3481
3507
|
};
|
|
3482
3508
|
}
|
|
3483
|
-
}),
|
|
3509
|
+
}), Gl = { class: "q-chatbot__input-wrapper" }, zl = {
|
|
3484
3510
|
key: 0,
|
|
3485
3511
|
class: "q-chatbot__file-preview"
|
|
3486
|
-
},
|
|
3512
|
+
}, Vl = ["src", "alt"], Hl = {
|
|
3487
3513
|
key: 1,
|
|
3488
3514
|
class: "q-chatbot__file-preview",
|
|
3489
3515
|
tabindex: "0"
|
|
3490
|
-
},
|
|
3516
|
+
}, Zl = { class: "q-chatbot__file-name" }, Wl = { class: "q-chatbot__input" }, Jl = { class: "q-chatbot__send-container" }, Ql = ["accept"], Yl = /* @__PURE__ */ V({
|
|
3491
3517
|
__name: "ChatBotInput",
|
|
3492
3518
|
props: {
|
|
3493
3519
|
disabled: { type: Boolean },
|
|
@@ -3497,24 +3523,24 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3497
3523
|
},
|
|
3498
3524
|
emits: ["send-message"],
|
|
3499
3525
|
setup(e, { emit: n }) {
|
|
3500
|
-
const t = e, o = n, l = ke(), a = q(null), i = q(null), r = q(""), c = q(!1), u = w(() => ".png,.jpeg,.jpg,.svg,.webp,.pdf,.doc,.docx"), d = w(() => i.value ? i.value.type.startsWith("image/") ?? !1 : !1), s = q(t.userPrompt ?? ""),
|
|
3501
|
-
function
|
|
3526
|
+
const t = e, o = n, l = ke(), a = q(null), i = q(null), r = q(""), c = q(!1), u = w(() => ".png,.jpeg,.jpg,.svg,.webp,.pdf,.doc,.docx"), d = w(() => i.value ? i.value.type.startsWith("image/") ?? !1 : !1), s = q(t.userPrompt ?? ""), h = w(() => t.disabled || t.loading || s.value.trim().length === 0);
|
|
3527
|
+
function v(B) {
|
|
3502
3528
|
B.preventDefault(), t.disabled || (c.value = !0);
|
|
3503
3529
|
}
|
|
3504
|
-
const
|
|
3530
|
+
const m = w(() => ({
|
|
3505
3531
|
"q-chatbot__footer-disabled": t.disabled,
|
|
3506
3532
|
"drag-over": c.value && !i.value
|
|
3507
3533
|
}));
|
|
3508
3534
|
function _(B) {
|
|
3509
3535
|
B.preventDefault(), c.value = !1;
|
|
3510
3536
|
}
|
|
3511
|
-
function
|
|
3512
|
-
var
|
|
3537
|
+
function N(B) {
|
|
3538
|
+
var M;
|
|
3513
3539
|
if (B.preventDefault(), c.value = !1, t.disabled || i.value) return;
|
|
3514
|
-
const $ = (
|
|
3515
|
-
$ &&
|
|
3540
|
+
const $ = (M = B.dataTransfer) == null ? void 0 : M.files;
|
|
3541
|
+
$ && Z($[0]);
|
|
3516
3542
|
}
|
|
3517
|
-
function
|
|
3543
|
+
function Z(B) {
|
|
3518
3544
|
i.value = B, B.type.startsWith("image/") ? r.value = URL.createObjectURL(B) : r.value = "";
|
|
3519
3545
|
}
|
|
3520
3546
|
function J() {
|
|
@@ -3532,39 +3558,39 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3532
3558
|
function A() {
|
|
3533
3559
|
i.value = null, r.value = "", a.value && (a.value.value = "", a.value.files = null);
|
|
3534
3560
|
}
|
|
3535
|
-
function
|
|
3561
|
+
function U() {
|
|
3536
3562
|
var B;
|
|
3537
3563
|
(B = a.value) == null || B.click();
|
|
3538
3564
|
}
|
|
3539
3565
|
function Q(B) {
|
|
3540
|
-
var
|
|
3566
|
+
var M;
|
|
3541
3567
|
const $ = B.target;
|
|
3542
|
-
(
|
|
3568
|
+
(M = $.files) != null && M[0] && Z($.files[0]);
|
|
3543
3569
|
}
|
|
3544
3570
|
return (B, $) => (y(), x(ve, null, [
|
|
3545
3571
|
D(f(zt), {
|
|
3546
3572
|
label: f(l).inputLabel
|
|
3547
3573
|
}, null, 8, ["label"]),
|
|
3548
|
-
|
|
3549
|
-
class:
|
|
3550
|
-
onDragover: Ue(
|
|
3574
|
+
T("div", {
|
|
3575
|
+
class: K(["q-chatbot__footer", m.value]),
|
|
3576
|
+
onDragover: Ue(v, ["prevent"]),
|
|
3551
3577
|
onDragleave: Ue(_, ["prevent"]),
|
|
3552
|
-
onDrop: Ue(
|
|
3578
|
+
onDrop: Ue(N, ["prevent"])
|
|
3553
3579
|
}, [
|
|
3554
|
-
|
|
3555
|
-
i.value ? (y(), x("div",
|
|
3580
|
+
T("div", Gl, [
|
|
3581
|
+
i.value ? (y(), x("div", zl, [
|
|
3556
3582
|
d.value ? (y(), x("img", {
|
|
3557
3583
|
key: 0,
|
|
3558
3584
|
class: "q-chatbot__image-preview",
|
|
3559
3585
|
src: r.value,
|
|
3560
3586
|
tabindex: "0",
|
|
3561
3587
|
alt: f(l).imagePreview
|
|
3562
|
-
}, null, 8,
|
|
3563
|
-
D(f(
|
|
3588
|
+
}, null, 8, Vl)) : (y(), x("div", Hl, [
|
|
3589
|
+
D(f(X), {
|
|
3564
3590
|
icon: "file",
|
|
3565
3591
|
class: "q-chatbot__file-icon"
|
|
3566
3592
|
}),
|
|
3567
|
-
|
|
3593
|
+
T("span", Zl, se(i.value.name), 1)
|
|
3568
3594
|
])),
|
|
3569
3595
|
D(f(oe), {
|
|
3570
3596
|
class: "q-chatbot__remove-file",
|
|
@@ -3574,37 +3600,37 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3574
3600
|
onClick: A
|
|
3575
3601
|
}, {
|
|
3576
3602
|
default: R(() => [
|
|
3577
|
-
D(f(
|
|
3603
|
+
D(f(X), { icon: "remove" })
|
|
3578
3604
|
]),
|
|
3579
3605
|
_: 1
|
|
3580
3606
|
})
|
|
3581
|
-
])) :
|
|
3582
|
-
|
|
3607
|
+
])) : O("", !0),
|
|
3608
|
+
T("div", Wl, [
|
|
3583
3609
|
D(f(Ka), {
|
|
3584
3610
|
id: "chatbot-input",
|
|
3585
3611
|
modelValue: s.value,
|
|
3586
|
-
"onUpdate:modelValue": $[0] || ($[0] = (
|
|
3612
|
+
"onUpdate:modelValue": $[0] || ($[0] = (M) => s.value = M),
|
|
3587
3613
|
size: "block",
|
|
3588
3614
|
autosize: "",
|
|
3589
3615
|
resize: "none",
|
|
3590
3616
|
rows: 2,
|
|
3591
3617
|
disabled: t.disabled,
|
|
3592
|
-
onKeyup:
|
|
3618
|
+
onKeyup: gn(J, ["enter"])
|
|
3593
3619
|
}, null, 8, ["modelValue", "disabled"])
|
|
3594
3620
|
]),
|
|
3595
|
-
|
|
3621
|
+
T("div", Jl, [
|
|
3596
3622
|
D(f(oe), {
|
|
3597
3623
|
title: f(l).imageUpload,
|
|
3598
3624
|
class: "q-chatbot__upload",
|
|
3599
3625
|
disabled: t.disabled || t.loading || !!i.value,
|
|
3600
|
-
onClick:
|
|
3626
|
+
onClick: U
|
|
3601
3627
|
}, {
|
|
3602
3628
|
default: R(() => [
|
|
3603
|
-
D(f(
|
|
3629
|
+
D(f(X), { icon: "upload" })
|
|
3604
3630
|
]),
|
|
3605
3631
|
_: 1
|
|
3606
3632
|
}, 8, ["title", "disabled"]),
|
|
3607
|
-
|
|
3633
|
+
T("input", {
|
|
3608
3634
|
id: "file-upload",
|
|
3609
3635
|
ref_key: "fileInput",
|
|
3610
3636
|
ref: a,
|
|
@@ -3612,17 +3638,17 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3612
3638
|
accept: u.value,
|
|
3613
3639
|
class: "hidden-input",
|
|
3614
3640
|
onChange: Q
|
|
3615
|
-
}, null, 40,
|
|
3641
|
+
}, null, 40, Ql),
|
|
3616
3642
|
D(f(oe), {
|
|
3617
3643
|
title: f(l).sendMessage,
|
|
3618
3644
|
variant: "bold",
|
|
3619
3645
|
class: "q-chatbot__send",
|
|
3620
|
-
disabled:
|
|
3621
|
-
readonly:
|
|
3646
|
+
disabled: h.value,
|
|
3647
|
+
readonly: h.value,
|
|
3622
3648
|
onClick: J
|
|
3623
3649
|
}, {
|
|
3624
3650
|
default: R(() => [
|
|
3625
|
-
D(f(
|
|
3651
|
+
D(f(X), { icon: "send" })
|
|
3626
3652
|
]),
|
|
3627
3653
|
_: 1
|
|
3628
3654
|
}, 8, ["title", "disabled", "readonly"])
|
|
@@ -3631,7 +3657,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3631
3657
|
], 34)
|
|
3632
3658
|
], 64));
|
|
3633
3659
|
}
|
|
3634
|
-
}),
|
|
3660
|
+
}), Xl = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20126.25%20110.36'%3e%3cdefs%3e%3cradialGradient%20id='radial-gradient'%20cx='45.24'%20cy='38.05'%20fx='45.24'%20fy='38.05'%20r='59.09'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2331319e'/%3e%3cstop%20offset='.19'%20stop-color='%232e2e97'/%3e%3cstop%20offset='.45'%20stop-color='%23292985'/%3e%3cstop%20offset='.75'%20stop-color='%23202067'/%3e%3cstop%20offset='1'%20stop-color='%2317174a'/%3e%3c/radialGradient%3e%3clinearGradient%20id='linear-gradient'%20x1='82.65'%20y1='50.41'%20x2='82.65'%20y2='77.5'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='.02'%20stop-color='%2366ebfe'/%3e%3cstop%20offset='.96'%20stop-color='%2300bfdb'/%3e%3c/linearGradient%3e%3clinearGradient%20id='linear-gradient-2'%20x1='44.6'%20y1='50.01'%20x2='44.6'%20y2='77.1'%20xlink:href='%23linear-gradient'/%3e%3c/defs%3e%3cg%20isolation='isolate'%3e%3cg%20id='Layer_1'%3e%3cpath%20d='M126.2,61.4c-.2-3.69-2.61-17.39-5.92-22.09-2.42-3.44-5.89-4.03-7.96-4.38-.13-.02-.27-.05-.41-.07-.16-.28-.32-.58-.45-.81-.63-1.14-1.03-1.87-1.44-2.44-6.96-9.88-14.91-16.51-24.85-20.69-.25-2.29-.84-5.24-3.37-7.44-2.93-2.55-7.58-2.9-11.68-3.21-.93-.07-1.82-.14-2.4-.22l-.33-.05h-8.61l-.36.05c-.65.1-1.61.17-2.63.24-3.75.27-8.01.57-10.98,2.85-2.94,2.26-3.58,5.55-3.79,7.84-9.71,3.94-17.86,10.71-24.85,20.62-.4.57-.81,1.3-1.43,2.44-.13.23-.29.53-.45.81-.14.02-.28.05-.4.07-2.07.35-5.54.94-7.96,4.39-2.25,3.19-3.84,9.89-4.58,13.59-.6,2.97-1.9,10.3-1.08,14.26.79,3.78,3.66,5.6,5.37,6.68.12.08.26.16.39.25,1.65,10.03,6.98,18.56,15.52,24.77,9.23,6.72,20.2,9.43,27.78,10.52,4.49.65,9.15.97,13.85.97,9.67,0,23.77-1.39,36-8.02,11.58-6.27,18.81-16,21.04-28.24,4.52-2.76,6.36-5.67,5.98-12.71Z'%20fill='%2317174a'/%3e%3cpath%20d='M67.15,4.69c2.98.42,9.31.31,11.62,2.31,1.99,1.73,1.65,4.82,2.06,7.22,10.77,3.89,18.73,10.59,25.39,20.04.64.91,2.13,3.95,2.58,4.33,1.71,1.46,5.54.35,7.67,3.37,2.29,3.25,4.83,15.41,5.06,19.59.31,5.82-.76,6.9-5.58,9.44-3.28,26.16-29.7,34.5-52.68,34.5-4.6,0-9.06-.33-13.17-.93-18.13-2.61-37.11-12.11-39.51-33.08-1.7-1.92-4.96-2.54-5.55-5.39-.95-4.56,2.21-20.32,4.89-24.14,2.13-3.02,5.96-1.91,7.67-3.37.46-.39,1.94-3.42,2.58-4.33,6.54-9.28,14.55-16.22,25.21-19.87.85-.87-.3-5.45,2.43-7.55,2.52-1.94,8.35-1.69,11.42-2.16h7.91'%20fill='%23fff'/%3e%3cpath%20d='M121.86,61.51c-.22-4.2-2.78-16.43-5.07-19.7-1.77-2.51-4.71-2.18-6.64-2.83.1,1.18.16,2.37.16,3.57,0,26.85-25.96,48.61-57.98,48.61-15.83,0-30.17-5.32-40.63-13.94,4.91,17.1,22.06,25.14,38.51,27.52,4.12.59,8.6.93,13.21.93,23.06,0,49.57-8.38,52.85-34.68,4.83-2.56,5.91-3.63,5.6-9.49Z'%20fill='%23d0d7e2'%20mix-blend-mode='multiply'%20opacity='.4'/%3e%3cpath%20d='M62.91,97.68c5.82,0,11.67-.53,16.72-1.56,13.1-2.67,22.09-8.06,26.72-16.03,4.43-7.63,4.75-17.33.96-28.84-4.28-13-13.22-22.77-24.7-27.89-.13,4.51-3.84,8.16-8.38,8.16h-20.89c-4.61,0-8.39-3.78-8.39-8.39v-.14c-5.36,2.25-10.29,5.49-14.5,9.61-8.23,8.06-13.16,19.02-13.9,30.84-.59,9.44,2.67,17.53,9.43,23.42,6.27,5.46,15.68,9.02,27.2,10.3,3.13.35,6.43.52,9.73.52'%20fill='url(%23radial-gradient)'/%3e%3crect%20x='74.34'%20y='50.41'%20width='16.62'%20height='27.09'%20rx='4.06'%20ry='4.06'%20fill='url(%23linear-gradient)'/%3e%3crect%20x='36.29'%20y='50.01'%20width='16.62'%20height='27.09'%20rx='4.06'%20ry='4.06'%20fill='url(%23linear-gradient-2)'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e", Kl = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF2GlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDggNzkuMTY0MDM2LCAyMDE5LzA4LzEzLTAxOjA2OjU3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjEuMCAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDE5LTExLTI5VDEwOjI0OjU3WiIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAxOS0xMS0yOVQxMDoyNDo1N1oiIHhtcDpNb2RpZnlEYXRlPSIyMDE5LTExLTI5VDEwOjI0OjU3WiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpiN2ViMDM0NC1hN2UzLTI3NGItODgwNi00ZjMxMzRiNDUwNDEiIHhtcE1NOkRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDo2ODJkMGU1OC1kZmQyLTZkNDEtOGIwNy01ZWUxNjU4MWY2ZWEiIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0N2I2NzcxYy1kZmY0LTJkNGItYjJmNC00ZGJiNmQ3MjRmYzAiIGRjOmZvcm1hdD0iaW1hZ2UvcG5nIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEiPiA8eG1wTU06SGlzdG9yeT4gPHJkZjpTZXE+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJjcmVhdGVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjQ3YjY3NzFjLWRmZjQtMmQ0Yi1iMmY0LTRkYmI2ZDcyNGZjMCIgc3RFdnQ6d2hlbj0iMjAxOS0xMS0yOVQxMDoyNDo1N1oiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCAyMS4wIChXaW5kb3dzKSIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6YjdlYjAzNDQtYTdlMy0yNzRiLTg4MDYtNGYzMTM0YjQ1MDQxIiBzdEV2dDp3aGVuPSIyMDE5LTExLTI5VDEwOjI0OjU3WiIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIDIxLjAgKFdpbmRvd3MpIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDwvcmRmOlNlcT4gPC94bXBNTTpIaXN0b3J5PiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pm5CcJ8AAAudSURBVHja7Z17sBTFFYe/WYiCYNZalKirgzImEuShFRgM11eiJSpEiC9UCEg0GEl8JGLUaGLUGIyJMcZnLExMJegFi1Ipc41EU5ThERp8oIAx0j4aF5WH60YJV0TIH93gBXZxZ3d2tmd3flVbdWvr7nbP+bZ7us+cPsehAeR6/v7AAOAQoDdwELAv0MO8ugO77/CxD4GNwFpgDfAOsBJYAfwHeEVJoeJuGyeGMLsARwFDgRZgEJCpUXNrgUXmNQdYoKRoTwCHD9UFRgLDgWOBLnXqSjswD5gFPBqHEe5YDLUnMBoYAwyxtJuLgGnANCXF2gRweWCPBy4ERgGfi8lMuNGM6nuUFP9IAO8MtTNwNjAZGBjzdc3zwG+AViXFpqYG7Hq+Y6bhnwMejSUJ3AD8RUmxuekAu55/EjAFOJzG1svAZCVFW1MAdj2/F3Ab8E2aS23AZUqKVxsSsLnPXg5cB3SlObXRTNu/jOr+7EQEtw/wgMXbnaj1LHCekmJprRvqFAHcC4DH0O7DRFr7A+enM9m1hXxucSxHsOv53YDfG0dFotKaDnxHSfFBbACbhdRjDbCnjUrLgRFKitfD/uJUDeC2ACKBG0h9gUWu5x9tNWDX878B/B3omTALrB7AU67nh7p97BQi3PHAg8BuCauqeJyZzmRXFvK5F6wB7Hr+hcDUWkz5TSgHGJnOZFeHscLuFALcMQauk7AJVcPTmaws5HMv1g2w6/lnmGk5Gbm10ah0Jru8kM8tj3ybZFbLT1G/6Ipytx+LgNeAVcAG835X42zoDQw2q1hb1Q6coKSYFxlg1/MPARYAe1tokCVoB8tMJcXqMq+nJ3A6OtDAxu3dOuBIJcWKmgN2Pb87sNDCX70ELgXalBRbKvzhOsApwO3Y93x6OTBESfFhzQAbA0wHzrTs4u8Hvh9WxKOJ3LwTON+y63wYGB3kBxxokZXOZCcBV1h20VcrKX5UyOdCe/xWyOc2FfK5WelM9iPgBIuu9TBgdSGfWxQ6YNfz+wIzgc4WXfAUJcX1tfryQj43N53J7g4cbdE1H5/OZB8p5HNryvnnVJlwO5vtkE0r5qeBayNo51rApkjJLsCDhkk4gLEv2rEd/Yit5sFspo0LTJu2aKBhUv0U7Xq+ZxZWNsUo36WkaI2qsUI+9346k90HONIiG7SkM9nWQj6Xr3YE34VdMVRb0EF7Ues207Yt6mrYVD5Fm9DWYZatmucoKd6MulHT5hzLbDHMMAoO2PX8FHAL9mlWk7ZdSrcYVoFH8Digv4UXNK9J2y6l/oZV+YBdz+8U0RakEr3UpG3vcitnmJU9gs/EzrNC79TzALZp+10L7eJRwn2cKjJ6HeAqS3+pa5I+lNRVht1njuBjsTcicrMFffjEUtsMNOw+E/BEEsVVE3cJ2PX8vdEPvhPFU6cbhiVH8LdIwl7jrN0Mw5KARyc2ir1GFwVsUhUlxzvjryGG5U4j+LTENg2j04oBPjmxS8Po5O0Au56/R7E9VKLY6ljDdNsI/io7J+tMFF/tbphuA9yS2KTh1JIAbiLAg2LSaRuiOuOSAmoQgGOSaedi0ul2YI9Kj6ZUKxM5sYH4ePuyKXSmdGI0guvZ3wHEy5U7IIU+QhknjbTBgRAT9U4Bbsw6fZHJwRX19Lwn+nhpnOSmgANj1ul9gV/Uod1fEb/sQQfGcQQDXOJ6/iURjt4fx3D0bhvB+8V0n3e76/mjIoB7BnBTTG20X4p4p/bdK4I2usfYPl1TQDcSNaq6JYCbAHDnxA4Nq85JArMGVwK4CQC3J2ZoWLWngPWJHRpW61PoNHmJGlPrEsBNAPjtxA4Nq7dTwBuJHRpWb6aA1xM7NKxeSwEr4thx4HvoBG211nT0uduXY2inV+MWdLcMXdxxppIi0pP2Jj3CMHR6i7icAsk6pvNrsDN7+1a9bMDOqGex5Q6wjwN+ZjnotUqKfba6Kp+ztJMSOAfop6RotQEugJJijpLiOOBrwHxLbfccfOqLti3B1zvAJKCPTWBLgG4BRqFT7tukeR0Bz7WkUwXgGsBTUtwTVRHlEEA/ho6Z/jaw0pJuzQVTs8EcNXyP+p0wbEfXSJiipHgvzvsS1/O7mtnnanQ9wnroIyCjpPif06FjTwInRtyRLcCfgJ8oKd5qpA2o6/l7AVcCP6jDwJmtpBjWcYoGaIu4E08DRygpJjQaXDNtv6+kuBroA8yIuPltLDuOYBeIIg/zcuAKJUUbTSTX84eik4r7ETTXS0mhthvB5o2FNWx0NXARMLDZ4Br7zkeXBBgL1HLGWrgV7o5TNMBDNVpA3QwcoqS4Ny4r4xpB3qKkmAZ8CbiOT2sphqntGDo7TCM9za8rrAIcM4ArlRRvkKjYtH0A+szT2SF95cfAAR1rNjpFGp1B9aXrlqBLzc1NMJZ9f76b6rP8PqykOKvjG8WiKu+pspE7gcEJ3MD358HGdtVoJ3ZOiV/UCxX+mlqVFOckyKoazQ9VOGUvUVIcvuObpeKiK6m2shn7ClfGUVdQWeLzosxSu1gcyYANLGpEh0Udpuu30FXLg0iWcqakSjSyCbgxYCP/TvCEpqC2vLHU9nNXR1f+TLBHYD0SLqEpiC2XG1YEAmyewQa5p45wPf+8hE3Vi6zzgBEBPjJ5V8/LnTIa/Cu6rn05Wg8MUlIk03VlcPsAiyn/zHabkmL4rv6hnNOFl6KfL5ajbsCj5lFZomBw9wIeDQD3I8OGqgArKVYAQcqoHwq0liq1lqgo3E5Aq7FdubresKHaEQzaX/psgMaHAXcXq8SVaCe4DtpNGaSM77OGCaEANkvwcQQ7SzwRmJIg/ExNIVgxsnZgXLlP5cqeRgv53Jp0Jrsu4ArvqHQmu6mQz/0z4Vh09F4D/DTgxy5WUjxR7j8Huk8W8rnF6Uy2L3BYgI99PZ3Jdi3kc08lSLeDe3MFcGcoKQIVDnUq6Fh34F8BIQPcB0yK+siJpQuquwleI3IZcKSS4sOaAjad7A0IgnuvZgNnKSkKTQo3jfYZB41eXQf4SorXgrZZUZYd09AogidwORFYYDb0zejEmF8B3HZgVCVwKwZsIM8FxhD80daXgcWu549tIrhj0R6qvgE/uhkYU03whBNC58cDD1T48QeBS5QU6xoUbA/gd8C5FX7FBCXFA9X0oWpvUyGfW5LOZFcDwyv4eH9gfDqTVYV8blmDwT0LeBxToKoCTVJSTK22H06IFzQBmFrFtP80cJmSYmnMwfYDfgscX+FXbAYuUFL8MYz+OCFf3AizSqw0B/UnwP3ATR2Dt2MC1kWfjDy/iplxg9llPB5Wv5waXOhQ4BGqq2/wMfAH4FYlxauWg/0icDn66Gg18eSrgdOUFKGe1XZqdNG9gFlUX+NoC/A34A7gSVsOgpsCWcOAi4GTQrDji8CpSorQz4Y5NTRCd+Bes5UKQ2+bVfdDwHP1qH7mev5X0CklziW8WhfTgO8G9VDVHXAHo0w0i44wa0PkzMh+ApirpHi3Rn3/AnAUuuDySUA2xK/fYBaV99XS/k5Ev/w+6IPetTo6+TraP74MnZHnFWClkuK/Zfbv8+j6UYcaR8xh6JOAB9eovwIYH0VoU2QP5F3P7wxMRj9BiarSSzuwCvjA/L3VtdrFvPYE9ie6qqYb0Omgfh3VKcvIIy5czz8YfQbnFJpLbegDeZGmjqxbSI3r+ScCtwL9GhzsS+jQ1tn1aLxuNRvMBR8OTCD4MZk4SJprO6JecOs6govcn88GfggcEXOwz5uZaboN2Qysi3p0Pf8Y40A4lfgUY96IduzcoaR4xqaOWRvW6nr+3sZJcg4wxNJuLjSOl2lKirU2djAWccvGkX+6cTYcE+G2pti26xnjZJkZhwcisQtMN6kCW4Ch5jUYyNSoufeMU2IBOtxmnpJiQ5zs1RAnD0xS837orHIHAb2MAyODDgzcs8j9fKNxgKwzIFehE8G9gT6fu1RJsSrutvk/GdqIAV0smzEAAAAASUVORK5CYII=", ei = { class: "q-chatbot" }, ti = { class: "q-chatbot__content" }, ni = { class: "q-chatbot__footer-container" }, oi = '<span data-type="execution-progress">', ri = /* @__PURE__ */ V({
|
|
3635
3661
|
name: "ChatBot",
|
|
3636
3662
|
__name: "ChatBot",
|
|
3637
3663
|
props: {
|
|
@@ -3639,8 +3665,8 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3639
3665
|
controllerEndpoint: {},
|
|
3640
3666
|
username: {},
|
|
3641
3667
|
projectPath: {},
|
|
3642
|
-
userImage: { default:
|
|
3643
|
-
chatbotImage: { default:
|
|
3668
|
+
userImage: { default: Kl },
|
|
3669
|
+
chatbotImage: { default: Xl },
|
|
3644
3670
|
dateFormat: {},
|
|
3645
3671
|
agentData: { default: () => ({
|
|
3646
3672
|
id: "",
|
|
@@ -3651,31 +3677,31 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3651
3677
|
},
|
|
3652
3678
|
emits: ["apply-fields", "direct-agent-chat"],
|
|
3653
3679
|
setup(e, { emit: n }) {
|
|
3654
|
-
const t = e, o = n, l = q(!0), a = q(null), i = q(!0), r = q(t.agentData.id), c = q(t.agentData.formId), u = ke(), { isLoading: d, clearChatData: s, getChatData:
|
|
3680
|
+
const t = e, o = n, l = q(!0), a = q(null), i = q(!0), r = q(t.agentData.id), c = q(t.agentData.formId), u = ke(), { isLoading: d, clearChatData: s, getChatData: h, getJobResultData: v, sendPrompt: m, cancelExecution: _ } = en(t.apiEndpoint), { messages: N, addChatMessage: Z, clearMessages: J, getLastMessage: A, deleteMessageById: U } = on(), Q = w(() => l.value || d.value), B = /<span data-type="tool-calling">.*?<\/span>/, $ = ze({
|
|
3655
3681
|
active: !1,
|
|
3656
3682
|
sessionId: "",
|
|
3657
3683
|
cancelling: !1,
|
|
3658
3684
|
cancelled: !1,
|
|
3659
3685
|
callingTools: !1
|
|
3660
3686
|
});
|
|
3661
|
-
function
|
|
3687
|
+
function M(g) {
|
|
3662
3688
|
return g.includes('data-type="execution-progress"');
|
|
3663
3689
|
}
|
|
3664
|
-
function
|
|
3665
|
-
return !
|
|
3690
|
+
function de(g) {
|
|
3691
|
+
return !M(g) || $.cancelling || $.cancelled || !$.active || !$.callingTools;
|
|
3666
3692
|
}
|
|
3667
3693
|
async function ie() {
|
|
3668
3694
|
if (!$.sessionId || $.cancelling) return;
|
|
3669
3695
|
$.cancelling = !0;
|
|
3670
3696
|
const g = A();
|
|
3671
3697
|
if (g) {
|
|
3672
|
-
const
|
|
3673
|
-
B.test(g.message) && (g.message = g.message.replace(B,
|
|
3698
|
+
const I = '<span data-type="tool-calling">Cancelling</span>';
|
|
3699
|
+
B.test(g.message) && (g.message = g.message.replace(B, I));
|
|
3674
3700
|
}
|
|
3675
3701
|
try {
|
|
3676
3702
|
await _($.sessionId), $.cancelled = !0;
|
|
3677
|
-
} catch (
|
|
3678
|
-
console.error("Error cancelling execution: ",
|
|
3703
|
+
} catch (I) {
|
|
3704
|
+
console.error("Error cancelling execution: ", I);
|
|
3679
3705
|
} finally {
|
|
3680
3706
|
$.cancelling = !1;
|
|
3681
3707
|
}
|
|
@@ -3683,240 +3709,246 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3683
3709
|
function p(g) {
|
|
3684
3710
|
$.active = !0, $.sessionId = g, $.cancelling = !1, $.cancelled = !1;
|
|
3685
3711
|
}
|
|
3686
|
-
function
|
|
3712
|
+
function b() {
|
|
3687
3713
|
$.active = !1, $.sessionId = "", $.cancelling = !1;
|
|
3688
3714
|
}
|
|
3689
|
-
function k(g,
|
|
3690
|
-
const
|
|
3715
|
+
function k(g, I) {
|
|
3716
|
+
const H = `<span data-type="tool-calling">${I.replace(/<br\s*\/?>/gi, "")}</span>`;
|
|
3691
3717
|
if (B.test(g.message))
|
|
3692
|
-
g.message = g.message.replace(B,
|
|
3718
|
+
g.message = g.message.replace(B, H);
|
|
3693
3719
|
else {
|
|
3694
|
-
const
|
|
3695
|
-
|
|
3720
|
+
const Y = g.message.indexOf(oi);
|
|
3721
|
+
Y !== -1 ? g.message = g.message.slice(0, Y) + H + g.message.slice(Y) : g.message = H + g.message;
|
|
3696
3722
|
}
|
|
3697
3723
|
}
|
|
3698
|
-
function
|
|
3699
|
-
g.message.endsWith("<br>") || (g.message += "<br>"), g.message += `${
|
|
3724
|
+
function F(g, I) {
|
|
3725
|
+
g.message.endsWith("<br>") || (g.message += "<br>"), g.message += `${I}<br>`;
|
|
3700
3726
|
}
|
|
3701
3727
|
function L(g) {
|
|
3702
3728
|
g.message = g.message.replace(B, "");
|
|
3703
3729
|
}
|
|
3704
3730
|
bn(() => {
|
|
3705
3731
|
var g;
|
|
3706
|
-
(g = a.value) == null || g.removeEventListener("scroll",
|
|
3732
|
+
(g = a.value) == null || g.removeEventListener("scroll", ue);
|
|
3707
3733
|
}), Me(() => {
|
|
3708
|
-
|
|
3734
|
+
E();
|
|
3709
3735
|
});
|
|
3710
3736
|
function C(g) {
|
|
3711
3737
|
l.value = g;
|
|
3712
3738
|
}
|
|
3713
|
-
async function
|
|
3739
|
+
async function E() {
|
|
3714
3740
|
try {
|
|
3715
3741
|
await z();
|
|
3716
3742
|
} catch (g) {
|
|
3717
|
-
|
|
3743
|
+
Z(u.loginError), console.error("Error logging in: " + g);
|
|
3718
3744
|
}
|
|
3719
3745
|
}
|
|
3720
3746
|
async function z() {
|
|
3747
|
+
var H;
|
|
3721
3748
|
C(!0);
|
|
3722
|
-
const { data: g, error:
|
|
3749
|
+
const { data: g, error: I } = await h(
|
|
3723
3750
|
t.username,
|
|
3724
3751
|
t.projectPath,
|
|
3725
3752
|
r.value,
|
|
3726
3753
|
c.value
|
|
3727
3754
|
);
|
|
3728
|
-
if (
|
|
3729
|
-
C(!0),
|
|
3755
|
+
if (I || !g || !g.success) {
|
|
3756
|
+
C(!0), Z(u.botIsSick), console.log("Error loading chat data: " + I);
|
|
3730
3757
|
return;
|
|
3731
3758
|
}
|
|
3732
|
-
C(!1),
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3759
|
+
C(!1), ((H = g.history) == null ? void 0 : H.some(
|
|
3760
|
+
(Y) => {
|
|
3761
|
+
var re;
|
|
3762
|
+
return (re = Y.content) == null ? void 0 : re.includes('data-type="chat-summary"');
|
|
3763
|
+
}
|
|
3764
|
+
)) || j(), g.history.forEach(async (Y) => {
|
|
3765
|
+
Z(
|
|
3766
|
+
Y.content,
|
|
3767
|
+
Y.type === "ai" ? "bot" : "user",
|
|
3736
3768
|
void 0,
|
|
3737
3769
|
// At this point we don't have preview URLs for past messages
|
|
3738
|
-
|
|
3770
|
+
Y.sessionID
|
|
3739
3771
|
);
|
|
3740
3772
|
});
|
|
3741
3773
|
}
|
|
3742
|
-
function
|
|
3774
|
+
function j() {
|
|
3743
3775
|
const g = u.initialMessage;
|
|
3744
|
-
|
|
3776
|
+
Z(g, "bot", void 0, void 0, !0);
|
|
3745
3777
|
}
|
|
3746
3778
|
function ae() {
|
|
3747
|
-
J(), C(!1), i.value = !0,
|
|
3779
|
+
J(), C(!1), i.value = !0, b();
|
|
3748
3780
|
}
|
|
3749
|
-
function
|
|
3781
|
+
function ue() {
|
|
3750
3782
|
if (a.value) {
|
|
3751
|
-
const { scrollTop:
|
|
3752
|
-
i.value =
|
|
3783
|
+
const { scrollTop: I, clientHeight: G, scrollHeight: H } = a.value;
|
|
3784
|
+
i.value = I + G >= H - 20;
|
|
3753
3785
|
}
|
|
3754
3786
|
}
|
|
3755
|
-
async function
|
|
3787
|
+
async function ne(g, I) {
|
|
3756
3788
|
a.value && a.value.scrollTo({
|
|
3757
3789
|
top: a.value.scrollHeight,
|
|
3758
3790
|
behavior: "smooth"
|
|
3759
|
-
}),
|
|
3791
|
+
}), Z(g, "user", I), me(g, I == null ? void 0 : I.fileData);
|
|
3760
3792
|
}
|
|
3761
3793
|
async function he(g) {
|
|
3762
3794
|
a.value && a.value.scrollTo({
|
|
3763
3795
|
top: a.value.scrollHeight,
|
|
3764
3796
|
behavior: "smooth"
|
|
3765
|
-
}),
|
|
3766
|
-
const
|
|
3767
|
-
|
|
3797
|
+
}), Z("", "bot");
|
|
3798
|
+
const I = A();
|
|
3799
|
+
I && await v(
|
|
3768
3800
|
g,
|
|
3769
|
-
(
|
|
3770
|
-
if (
|
|
3771
|
-
const
|
|
3772
|
-
|
|
3801
|
+
(G) => {
|
|
3802
|
+
if (I.message += G, I.fields || (I.fields = []), I.fields.length > 0) {
|
|
3803
|
+
const H = I.fields[I.fields.length - 1];
|
|
3804
|
+
H.text = I.message;
|
|
3773
3805
|
}
|
|
3774
3806
|
},
|
|
3775
|
-
(
|
|
3776
|
-
var
|
|
3777
|
-
|
|
3778
|
-
const
|
|
3779
|
-
(
|
|
3780
|
-
id:
|
|
3781
|
-
type:
|
|
3782
|
-
name:
|
|
3783
|
-
text:
|
|
3807
|
+
(G) => {
|
|
3808
|
+
var Y;
|
|
3809
|
+
I.message = "";
|
|
3810
|
+
const H = G;
|
|
3811
|
+
(Y = I.fields) == null || Y.push({
|
|
3812
|
+
id: H.id,
|
|
3813
|
+
type: H.type,
|
|
3814
|
+
name: H.name,
|
|
3815
|
+
text: H.text
|
|
3784
3816
|
});
|
|
3785
3817
|
},
|
|
3786
|
-
(
|
|
3787
|
-
C(!0),
|
|
3818
|
+
(G) => {
|
|
3819
|
+
C(!0), Z(u.botIsSick), console.error("Error getting job result: " + G), U(I.id);
|
|
3788
3820
|
}
|
|
3789
3821
|
);
|
|
3790
3822
|
}
|
|
3791
|
-
async function
|
|
3792
|
-
const
|
|
3793
|
-
if (
|
|
3823
|
+
async function me(g, I) {
|
|
3824
|
+
const G = nn(), H = g.trim().toLowerCase() === u.approveProceedPlan.toLowerCase(), Y = new FormData();
|
|
3825
|
+
if (I && Y.append("file", I), Y.append("message", g), Y.append("project", t.projectPath), Y.append("user", t.username), Y.append("sessionID", G), r.value !== "")
|
|
3794
3826
|
o("direct-agent-chat", r.value, g);
|
|
3795
3827
|
else {
|
|
3796
|
-
|
|
3797
|
-
const
|
|
3798
|
-
if (!
|
|
3799
|
-
|
|
3828
|
+
Z("", "bot");
|
|
3829
|
+
const re = A();
|
|
3830
|
+
if (!re) return;
|
|
3831
|
+
H && p(G);
|
|
3800
3832
|
let Ye = null;
|
|
3801
3833
|
try {
|
|
3802
|
-
await
|
|
3803
|
-
|
|
3834
|
+
await m(
|
|
3835
|
+
Y,
|
|
3804
3836
|
(le) => {
|
|
3805
|
-
|
|
3837
|
+
re && (Ye === "tools" && le.trim() && (L(re), Ye = "text", $.callingTools = !1), re.message += le);
|
|
3806
3838
|
},
|
|
3807
3839
|
(le) => {
|
|
3808
|
-
var
|
|
3809
|
-
(
|
|
3840
|
+
var gt;
|
|
3841
|
+
(gt = le == null ? void 0 : le.data) != null && gt.html && (le.event === "tool_start" ? (k(re, le.data.html), Ye = "tools", $.callingTools = !0) : le.event === "tool_end" && (F(re, le.data.html), k(re, u.generatingResponse), $.callingTools = !0));
|
|
3810
3842
|
},
|
|
3811
3843
|
(le) => {
|
|
3812
|
-
C(!0),
|
|
3844
|
+
C(!0), Z(u.botIsSick), console.error("Error sending message: " + le), U(re.id), H && b();
|
|
3813
3845
|
},
|
|
3814
3846
|
() => {
|
|
3815
|
-
L(
|
|
3847
|
+
L(re), H && b();
|
|
3816
3848
|
}
|
|
3817
3849
|
);
|
|
3818
3850
|
} catch (le) {
|
|
3819
|
-
|
|
3851
|
+
H && b(), console.error("Error sending prompt: ", le);
|
|
3820
3852
|
}
|
|
3821
3853
|
}
|
|
3822
3854
|
}
|
|
3823
|
-
async function
|
|
3824
|
-
const g = A(),
|
|
3855
|
+
async function ge() {
|
|
3856
|
+
const g = A(), I = g == null ? void 0 : g.sessionID, { data: G, error: H } = await s(
|
|
3825
3857
|
t.username,
|
|
3826
3858
|
t.projectPath,
|
|
3827
3859
|
r.value,
|
|
3828
3860
|
c.value,
|
|
3829
|
-
|
|
3861
|
+
I
|
|
3830
3862
|
);
|
|
3831
|
-
if (
|
|
3832
|
-
C(!0),
|
|
3863
|
+
if (H || !G || !G.success) {
|
|
3864
|
+
C(!0), Z(u.loginError), console.log("Error clearing chat: " + H);
|
|
3833
3865
|
return;
|
|
3834
3866
|
}
|
|
3835
|
-
ae(),
|
|
3867
|
+
ae(), j();
|
|
3836
3868
|
}
|
|
3837
3869
|
function ye(g) {
|
|
3838
|
-
const
|
|
3839
|
-
return g === "user" &&
|
|
3870
|
+
const I = ["q-chatbot__messages-wrapper"];
|
|
3871
|
+
return g === "user" && I.push("q-chatbot__messages-wrapper_right"), I;
|
|
3840
3872
|
}
|
|
3841
3873
|
async function Ne(g) {
|
|
3842
|
-
r.value = g.key, c.value = g.formId, ae(), await
|
|
3874
|
+
r.value = g.key, c.value = g.formId, ae(), await E();
|
|
3843
3875
|
}
|
|
3844
3876
|
function S(g) {
|
|
3845
3877
|
!g || g.length === 0 || o("apply-fields", g);
|
|
3846
3878
|
}
|
|
3847
3879
|
function fe(g) {
|
|
3848
|
-
const
|
|
3849
|
-
o("direct-agent-chat", r.value,
|
|
3880
|
+
const I = u.regenerateResponsePrompt.replace("{0}", g);
|
|
3881
|
+
o("direct-agent-chat", r.value, I);
|
|
3850
3882
|
}
|
|
3851
|
-
return
|
|
3883
|
+
return ce(
|
|
3852
3884
|
() => t.availableAgents,
|
|
3853
|
-
(g,
|
|
3854
|
-
g.length === 0 &&
|
|
3885
|
+
(g, I) => {
|
|
3886
|
+
g.length === 0 && I.length > 0 && (r.value = "", c.value = "", ae(), E());
|
|
3855
3887
|
}
|
|
3856
|
-
),
|
|
3888
|
+
), ce(
|
|
3857
3889
|
() => t.agentData,
|
|
3858
|
-
async (g,
|
|
3890
|
+
async (g, I) => {
|
|
3859
3891
|
if (Q.value) return;
|
|
3860
|
-
const
|
|
3861
|
-
g.id !== r.value && await Ne({ formId: g.formId, key: g.id }),
|
|
3892
|
+
const G = g.jobId, H = I.jobId, Y = G !== H;
|
|
3893
|
+
g.id !== r.value && await Ne({ formId: g.formId, key: g.id }), G && Y && await he(G);
|
|
3862
3894
|
},
|
|
3863
3895
|
{ deep: !0 }
|
|
3864
|
-
),
|
|
3865
|
-
() =>
|
|
3896
|
+
), ce(
|
|
3897
|
+
() => N.value,
|
|
3866
3898
|
async () => {
|
|
3867
3899
|
i.value && a.value && (await new Promise((g) => setTimeout(g, 0)), a.value.scrollTop = a.value.scrollHeight);
|
|
3868
3900
|
},
|
|
3869
3901
|
{ deep: !0, flush: "post" }
|
|
3870
|
-
), (g,
|
|
3871
|
-
|
|
3872
|
-
D(f(
|
|
3902
|
+
), (g, I) => (y(), x("div", ei, [
|
|
3903
|
+
T("div", ti, [
|
|
3904
|
+
D(f(jl), {
|
|
3873
3905
|
disabled: Q.value,
|
|
3874
3906
|
"available-agents": t.availableAgents,
|
|
3875
3907
|
"selected-agent-key": r.value,
|
|
3876
|
-
onClear:
|
|
3908
|
+
onClear: ge,
|
|
3877
3909
|
onChangeChat: Ne
|
|
3878
3910
|
}, null, 8, ["disabled", "available-agents", "selected-agent-key"]),
|
|
3879
|
-
|
|
3911
|
+
T("div", {
|
|
3880
3912
|
ref_key: "messagesContainer",
|
|
3881
3913
|
ref: a,
|
|
3882
3914
|
class: "q-chatbot__messages-container",
|
|
3883
|
-
onScroll:
|
|
3915
|
+
onScroll: ue
|
|
3884
3916
|
}, [
|
|
3885
|
-
(y(!0), x(ve, null, qe(f(
|
|
3886
|
-
key:
|
|
3887
|
-
class:
|
|
3917
|
+
(y(!0), x(ve, null, qe(f(N), (G, H) => (y(), x("div", {
|
|
3918
|
+
key: G.id,
|
|
3919
|
+
class: K(ye(G.sender))
|
|
3888
3920
|
}, [
|
|
3889
|
-
D(f(
|
|
3921
|
+
D(f(Bl), pe({ ref_for: !0 }, G, {
|
|
3890
3922
|
"date-format": t.dateFormat,
|
|
3891
3923
|
"user-image": t.userImage,
|
|
3892
3924
|
"chatbot-image": t.chatbotImage,
|
|
3893
|
-
loading: f(d) && !
|
|
3894
|
-
file:
|
|
3925
|
+
loading: f(d) && !G.message,
|
|
3926
|
+
file: G.file,
|
|
3895
3927
|
"api-endpoint": t.apiEndpoint,
|
|
3896
|
-
"session-i-d":
|
|
3897
|
-
fields:
|
|
3898
|
-
"is-last-message":
|
|
3928
|
+
"session-i-d": G.sessionID,
|
|
3929
|
+
fields: G.fields,
|
|
3930
|
+
"is-last-message": H === f(N).length - 1,
|
|
3899
3931
|
"is-streaming": f(d),
|
|
3900
|
-
"show-cancel-execution":
|
|
3901
|
-
"cancel-execution-disabled":
|
|
3932
|
+
"show-cancel-execution": M(G.message),
|
|
3933
|
+
"cancel-execution-disabled": de(G.message),
|
|
3902
3934
|
onRegenerate: fe,
|
|
3903
3935
|
onApplyFields: S,
|
|
3904
|
-
onSendMessage:
|
|
3936
|
+
onSendMessage: ne,
|
|
3905
3937
|
onCancelExecution: ie
|
|
3906
3938
|
}), null, 16, ["date-format", "user-image", "chatbot-image", "loading", "file", "api-endpoint", "session-i-d", "fields", "is-last-message", "is-streaming", "show-cancel-execution", "cancel-execution-disabled"])
|
|
3907
3939
|
], 2))), 128))
|
|
3908
3940
|
], 544)
|
|
3909
3941
|
]),
|
|
3910
|
-
|
|
3911
|
-
D(f(
|
|
3942
|
+
T("div", ni, [
|
|
3943
|
+
D(f(Yl), {
|
|
3912
3944
|
disabled: Q.value,
|
|
3913
3945
|
loading: f(d),
|
|
3914
|
-
onSendMessage:
|
|
3946
|
+
onSendMessage: ne
|
|
3915
3947
|
}, null, 8, ["disabled", "loading"])
|
|
3916
3948
|
])
|
|
3917
3949
|
]));
|
|
3918
3950
|
}
|
|
3919
3951
|
});
|
|
3920
3952
|
export {
|
|
3921
|
-
|
|
3953
|
+
ri as default
|
|
3922
3954
|
};
|