@8wave/ai-elements 0.125.0-beta.17 → 0.125.0-beta.19
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/README.md +1 -0
- package/dist/_chunks/{PkChatbotFilePreview-xDlDvl5m.js → PkChatbotFilePreview-CFGqa-tX.js} +2 -2
- package/dist/_chunks/{PkChatbotFilePreview-xDlDvl5m.js.map → PkChatbotFilePreview-CFGqa-tX.js.map} +1 -1
- package/dist/_chunks/{PkFilePreview-BIFkMsAC.js → PkFilePreview-BzNLupQS.js} +318 -315
- package/dist/_chunks/PkFilePreview-BzNLupQS.js.map +1 -0
- package/dist/_chunks/{PkFilePreviewDialog-NLk4gZMd.js → PkFilePreviewDialog-BfZFgdOi.js} +2 -2
- package/dist/_chunks/{PkFilePreviewDialog-NLk4gZMd.js.map → PkFilePreviewDialog-BfZFgdOi.js.map} +1 -1
- package/dist/_chunks/{PkStreamingMarkdown-BFTTLuPc.js → PkStreamingMarkdown-CqLpNWQv.js} +2 -2
- package/dist/_chunks/{PkStreamingMarkdown-BFTTLuPc.js.map → PkStreamingMarkdown-CqLpNWQv.js.map} +1 -1
- package/dist/_chunks/{PkToolChatFile-Buv7Qkes.js → PkToolChatFile-iE4ZokYD.js} +2 -2
- package/dist/_chunks/{PkToolChatFile-Buv7Qkes.js.map → PkToolChatFile-iE4ZokYD.js.map} +1 -1
- package/dist/_chunks/{PkToolShareDocument-kB0qoQda.js → PkToolShareDocument-lTHNZodf.js} +2 -2
- package/dist/_chunks/{PkToolShareDocument-kB0qoQda.js.map → PkToolShareDocument-lTHNZodf.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-ClYqvIqB.js → PkToolShowArtifact-BNQrM5fY.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-ClYqvIqB.js.map → PkToolShowArtifact-BNQrM5fY.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-C0ABjvtZ.js → PkToolShowContactForm-CvQoLumn.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-C0ABjvtZ.js.map → PkToolShowContactForm-CvQoLumn.js.map} +1 -1
- package/dist/_chunks/{PkToolShowDiagram-BZbHtEs5.js → PkToolShowDiagram-COt1Z3q9.js} +2 -2
- package/dist/_chunks/{PkToolShowDiagram-BZbHtEs5.js.map → PkToolShowDiagram-COt1Z3q9.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-DUjR-9o1.js → PkToolShowForm-DcPccCEU.js} +2 -2
- package/dist/_chunks/{PkToolShowForm-DUjR-9o1.js.map → PkToolShowForm-DcPccCEU.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-CNU2Zvso.js → PkToolShowImageGallery-DefXra8-.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-CNU2Zvso.js.map → PkToolShowImageGallery-DefXra8-.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-DhDjNIFa.js → PkToolShowSources-BE3Zv_uz.js} +2 -2
- package/dist/_chunks/{PkToolShowSources-DhDjNIFa.js.map → PkToolShowSources-BE3Zv_uz.js.map} +1 -1
- package/dist/_chunks/{useLightbox-BEEzZ0qT.js → useLightbox-D2Zi-Fpe.js} +72 -13
- package/dist/_chunks/useLightbox-D2Zi-Fpe.js.map +1 -0
- package/dist/ai-elements.es.js +461 -429
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotFilePreview.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{PkChatbot-BtUaZ-LR.js → PkChatbot-BVZgvanv.js} +7 -7
- package/dist-vue/_chunks/{PkChatbot-BtUaZ-LR.js.map → PkChatbot-BVZgvanv.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-DJIkAskP.js → PkChatbotEmptyState-COya3H3C.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-DJIkAskP.js.map → PkChatbotEmptyState-COya3H3C.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotFilePreview-BpVM850N.js → PkChatbotFilePreview-BsvT6orx.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotFilePreview-BpVM850N.js.map → PkChatbotFilePreview-BsvT6orx.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-DzqaW3EE.js → PkChatbotInput-D0KUEkAs.js} +5 -4
- package/dist-vue/_chunks/PkChatbotInput-D0KUEkAs.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotMessages-vkbq5p1X.js → PkChatbotMessages-l-IzEWsN.js} +17 -17
- package/dist-vue/_chunks/{PkChatbotMessages-vkbq5p1X.js.map → PkChatbotMessages-l-IzEWsN.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-D5yz8lut.js → PkChatbotSteps-_Aqft0em.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotSteps-D5yz8lut.js.map → PkChatbotSteps-_Aqft0em.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-DCPRePrE.js → PkChatbotViewChat-C1uzFQCJ.js} +458 -453
- package/dist-vue/_chunks/PkChatbotViewChat-C1uzFQCJ.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-BBd3XMmM.js → PkChatbotViewConversations-DjhiHp8-.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-BBd3XMmM.js.map → PkChatbotViewConversations-DjhiHp8-.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-BiQzDqJg.js → PkChatbotViewFiles-CtOhnFCc.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewFiles-BiQzDqJg.js.map → PkChatbotViewFiles-CtOhnFCc.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-7266UiRM.js → PkChatbotViewProfile-NfTamy9j.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-7266UiRM.js.map → PkChatbotViewProfile-NfTamy9j.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreview-DLo9nI2g.js → PkFilePreview-C2VOU99H.js} +469 -466
- package/dist-vue/_chunks/PkFilePreview-C2VOU99H.js.map +1 -0
- package/dist-vue/_chunks/{PkFilePreviewDialog-CgDJQgIJ.js → PkFilePreviewDialog-C6QQMntW.js} +2 -2
- package/dist-vue/_chunks/{PkFilePreviewDialog-CgDJQgIJ.js.map → PkFilePreviewDialog-C6QQMntW.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-C3UGCEXm.js → PkStreamingMarkdown-2FN4WMQD.js} +2 -2
- package/dist-vue/_chunks/{PkStreamingMarkdown-C3UGCEXm.js.map → PkStreamingMarkdown-2FN4WMQD.js.map} +1 -1
- package/dist-vue/_chunks/{PkSvgViewer-DmkElalq.js → PkSvgViewer-BsdSOBpH.js} +2 -2
- package/dist-vue/_chunks/{PkSvgViewer-DmkElalq.js.map → PkSvgViewer-BsdSOBpH.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolChatFile-Dy0rGC29.js → PkToolChatFile-DAT1tv52.js} +2 -2
- package/dist-vue/_chunks/{PkToolChatFile-Dy0rGC29.js.map → PkToolChatFile-DAT1tv52.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShareDocument-BIZkgcJ3.js → PkToolShareDocument-Qb2Lu5vh.js} +2 -2
- package/dist-vue/_chunks/{PkToolShareDocument-BIZkgcJ3.js.map → PkToolShareDocument-Qb2Lu5vh.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-B7udnhpb.js → PkToolShowArtifact-Bskomw05.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-B7udnhpb.js.map → PkToolShowArtifact-Bskomw05.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-0SEgxn2S.js → PkToolShowContactForm-iQrlqv7j.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-0SEgxn2S.js.map → PkToolShowContactForm-iQrlqv7j.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-BqHBhZgd.js → PkToolShowDiagram-C-43uUoh.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-BqHBhZgd.js.map → PkToolShowDiagram-C-43uUoh.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-C4n_3mFL.js → PkToolShowForm-CKXpqQxy.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowForm-C4n_3mFL.js.map → PkToolShowForm-CKXpqQxy.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-DEpdtLns.js → PkToolShowImageGallery-DLTn6JmU.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowImageGallery-DEpdtLns.js.map → PkToolShowImageGallery-DLTn6JmU.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowLocation-DCPaDtBI.js → PkToolShowLocation-B8FE_Sqd.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowLocation-DCPaDtBI.js.map → PkToolShowLocation-B8FE_Sqd.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-Bm2NLUGS.js → PkToolShowProductList-hhSBAQVC.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-Bm2NLUGS.js.map → PkToolShowProductList-hhSBAQVC.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-DwFqlit2.js → PkToolShowSources-BiP9fVV2.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSources-DwFqlit2.js.map → PkToolShowSources-BiP9fVV2.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-BLEJ8tng.js → PkToolShowVideo-DJhsbDuX.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-BLEJ8tng.js.map → PkToolShowVideo-DJhsbDuX.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-CeAXllAF.js → PkToolShowWebPages-BAv66f5H.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-CeAXllAF.js.map → PkToolShowWebPages-BAv66f5H.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-BPN6cLGF.js → createChatbotApiClient-DO4_I5hT.js} +8 -1
- package/dist-vue/_chunks/createChatbotApiClient-DO4_I5hT.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-C4xhJtrb.js → useChatbotStore-BZ1n3Hyx.js} +662 -649
- package/dist-vue/_chunks/useChatbotStore-BZ1n3Hyx.js.map +1 -0
- package/dist-vue/_chunks/{useLightbox-gSzoBgNv.js → useLightbox-FDyQrPWe.js} +72 -13
- package/dist-vue/_chunks/useLightbox-FDyQrPWe.js.map +1 -0
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +8 -2
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +25 -25
- package/dist-vue/locales.js +6 -0
- package/dist-vue/packages/components/src/chat/PkChatbotInput.d.ts +2 -0
- package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +6 -0
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +4 -1
- package/package.json +1 -1
- package/dist/_chunks/PkFilePreview-BIFkMsAC.js.map +0 -1
- package/dist/_chunks/useLightbox-BEEzZ0qT.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotInput-DzqaW3EE.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-DCPRePrE.js.map +0 -1
- package/dist-vue/_chunks/PkFilePreview-DLo9nI2g.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-BPN6cLGF.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-C4xhJtrb.js.map +0 -1
- package/dist-vue/_chunks/useLightbox-gSzoBgNv.js.map +0 -1
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { t as e } from "./PkChatbotMessages-
|
|
1
|
+
import { t as e } from "./PkChatbotMessages-l-IzEWsN.js";
|
|
2
2
|
import { o as t } from "./Media-DylqhvaF.js";
|
|
3
|
-
import { a as n, n as r, t as i } from "./useChatbotStore-
|
|
3
|
+
import { a as n, n as r, t as i } from "./useChatbotStore-BZ1n3Hyx.js";
|
|
4
4
|
import { n as a } from "./src-nb8MU1sh.js";
|
|
5
5
|
import { s as o, t as s } from "./message-DuibQyHy.js";
|
|
6
6
|
import { L as c, f as l, l as u, n as d, r as f, y as p } from "./utils-RwaXl9-x.js";
|
|
7
7
|
import { t as m } from "./useLocalizedString-Dmn92nix.js";
|
|
8
8
|
import { t as h } from "./PkAvatar-DwtZWSW4.js";
|
|
9
|
-
import { n as g, t as _ } from "./PkChatbotInput-
|
|
9
|
+
import { n as g, t as _ } from "./PkChatbotInput-D0KUEkAs.js";
|
|
10
10
|
import { t as v } from "./PkChatbotQueuedMessages-CIJFAvE2.js";
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { VvIcon as
|
|
14
|
-
import { Fragment as
|
|
15
|
-
import { useI18n as
|
|
16
|
-
import { useDropZone as
|
|
17
|
-
import { storeToRefs as
|
|
11
|
+
import { t as y } from "./PkChatbotEmptyState-COya3H3C.js";
|
|
12
|
+
import { t as ee } from "./PkChatbotWakeupBar-DEP-d-Fp.js";
|
|
13
|
+
import { VvIcon as b } from "@volverjs/ui-vue/components";
|
|
14
|
+
import { Fragment as x, Teleport as S, Transition as C, computed as w, createBlock as T, createCommentVNode as E, createElementBlock as D, createElementVNode as O, createSlots as te, createTextVNode as ne, createVNode as k, defineAsyncComponent as A, defineComponent as re, inject as ie, isRef as ae, nextTick as oe, normalizeClass as j, normalizeStyle as se, onBeforeUnmount as ce, onMounted as le, onScopeDispose as ue, onUnmounted as de, openBlock as M, provide as fe, ref as N, renderList as pe, shallowRef as me, toDisplayString as P, toValue as F, unref as I, useTemplateRef as L, watch as R, withCtx as z } from "vue";
|
|
15
|
+
import { useI18n as he } from "vue-i18n";
|
|
16
|
+
import { useDropZone as ge, useResizeObserver as _e } from "@vueuse/core";
|
|
17
|
+
import { storeToRefs as ve } from "pinia";
|
|
18
18
|
// ../../packages/composable/src/chatbot/useGreeting.ts
|
|
19
|
-
function
|
|
20
|
-
let { locale: n, t: r, te: i } =
|
|
21
|
-
return
|
|
19
|
+
function ye(e, t) {
|
|
20
|
+
let { locale: n, t: r, te: i } = he({ useScope: "global" });
|
|
21
|
+
return w(() => be(F(e)?.greeting?.[0]?.[n.value] ?? "", F(t)) || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""));
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function be(e, t) {
|
|
24
24
|
return (t ? e.replace(/\{name\}/g, t) : e.replace(/[,\s]*\{name\}[!?]?/g, "")).trim();
|
|
25
25
|
}
|
|
26
26
|
// ../../packages/components/src/chat/PkAuroraCanvas.vue?vue&type=script&setup=true&lang.ts
|
|
27
|
-
var
|
|
27
|
+
var B = {
|
|
28
28
|
key: 1,
|
|
29
29
|
class: "pk-aurora__fallback"
|
|
30
|
-
},
|
|
30
|
+
}, V = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", xe = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\nuniform vec3 u_color2;\nuniform float u_duo;\nuniform vec2 u_center;\nuniform vec2 u_half;\nuniform float u_spread;\n\nvec3 permute(vec3 x) { return mod(((x * 34.0) + 1.0) * x, 289.0); }\n\nfloat snoise(vec2 v) {\n const vec4 C = vec4(0.211324865405187, 0.366025403784439,\n -0.577350269189626, 0.024390243902439);\n vec2 i = floor(v + dot(v, C.yy));\n vec2 x0 = v - i + dot(i, C.xx);\n vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n vec4 x12 = x0.xyxy + C.xxzz;\n x12.xy -= i1;\n i = mod(i, 289.0);\n vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0))\n + i.x + vec3(0.0, i1.x, 1.0));\n vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x12.xy, x12.xy),\n dot(x12.zw, x12.zw)), 0.0);\n m = m * m;\n m = m * m;\n vec3 x = 2.0 * fract(p * C.www) - 1.0;\n vec3 h = abs(x) - 0.5;\n vec3 ox = floor(x + 0.5);\n vec3 a0 = x - ox;\n m *= 1.79284291400159 - 0.85373472095314 * (a0 * a0 + h * h);\n vec3 g;\n g.x = a0.x * x0.x + h.x * x0.y;\n g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n return 130.0 * dot(m, g);\n}\n\nvoid main() {\n vec2 px = gl_FragCoord.xy;\n vec2 rel = px - u_center;\n\n // Ignition: the ellipse lights up expanding from the center on mount\n float intro = smoothstep(0.0, 1.4, u_time);\n\n // Breathing: size and brightness oscillate gently but visibly\n float breath = 1.0\n + 0.12 * sin(u_time * 0.55)\n + 0.06 * snoise(vec2(u_time * 0.1, 3.7));\n float pulse = 1.0 + 0.2 * sin(u_time * 0.55 + 1.3);\n\n // Keep it simple (Gemini-style): one huge soft elliptical glow\n // centered on the pill\n vec2 radii = vec2(u_half.x * 0.95, u_half.y * 6.5)\n * u_spread\n * breath\n * mix(0.15, 1.0, intro);\n float r = length(rel / max(radii, vec2(1.0)));\n float glow = exp(-r * r * 2.2);\n\n // Never cut hard against the canvas bounds\n vec2 m = min(px, u_resolution - px);\n glow *= smoothstep(0.0, 32.0, min(m.x, m.y));\n\n // Dither: breaks the 8-bit banding rings of the very soft gradient\n // (no CSS blur on the canvas, the noise must fully mask the bands)\n glow = max(glow + (snoise(px * 0.9) - 0.5) * 0.03, 0.0);\n\n float alpha = glow * 0.2 * pulse * intro;\n\n // Two tones: left to right the glow passes from the first to the\n // second, along a border a slow noise field keeps bending\n vec2 q = rel / max(radii, vec2(1.0));\n float bands = q.x * 0.9\n + 0.7 * snoise(q * 0.8 + vec2(u_time * 0.07, -u_time * 0.05));\n vec3 color = mix(u_color, u_color2, u_duo * smoothstep(-0.6, 0.6, bands));\n\n // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(color * alpha, alpha);\n}", Se = /* @__PURE__ */ re({
|
|
31
31
|
__name: "PkAuroraCanvas",
|
|
32
32
|
props: {
|
|
33
33
|
sourceSelector: {},
|
|
@@ -36,26 +36,26 @@ var R = {
|
|
|
36
36
|
secondColor: {}
|
|
37
37
|
},
|
|
38
38
|
setup(e) {
|
|
39
|
-
let t = e, n =
|
|
39
|
+
let t = e, n = L("rootEl"), r = L("canvasEl"), i = N(!1), a = N(null), o = w(() => a.value ? {
|
|
40
40
|
"--pk-aurora-tint": `rgb(${a.value.first.join(" ")})`,
|
|
41
41
|
"--pk-aurora-tint-2": `rgb(${(a.value.duo ? a.value.second : a.value.first).join(" ")})`
|
|
42
|
-
} : void 0), s = null, l = 0, u = null, d = null, f = null, p = null, m = null, h = null, g = null, _ = null, v = null,
|
|
42
|
+
} : void 0), s = null, l = 0, u = null, d = null, f = null, p = null, m = null, h = null, g = null, _ = null, v = null, y = performance.now(), ee = (e, t) => {
|
|
43
43
|
if (!s) return null;
|
|
44
44
|
let n = s.createShader(e);
|
|
45
45
|
return !n || (s.shaderSource(n, t), s.compileShader(n), !s.getShaderParameter(n, s.COMPILE_STATUS)) ? null : n;
|
|
46
|
-
},
|
|
46
|
+
}, b = (e) => e.map((e) => e / 255), x = () => {
|
|
47
47
|
n.value && (a.value = c(n.value, {
|
|
48
48
|
mainColor: t.mainColor,
|
|
49
49
|
tones: t.tones,
|
|
50
50
|
secondColor: t.secondColor
|
|
51
|
-
}), s && !i.value && a.value && (s.uniform3f(g, ...
|
|
51
|
+
}), s && !i.value && a.value && (s.uniform3f(g, ...b(a.value.first)), s.uniform3f(_, ...b(a.value.second)), s.uniform1f(v, +!!a.value.duo), T(C() ? 10 : void 0)));
|
|
52
52
|
};
|
|
53
|
-
|
|
53
|
+
R([
|
|
54
54
|
() => t.mainColor,
|
|
55
55
|
() => t.tones,
|
|
56
56
|
() => t.secondColor
|
|
57
|
-
],
|
|
58
|
-
let
|
|
57
|
+
], x);
|
|
58
|
+
let S = () => {
|
|
59
59
|
if (!s || !r.value) return;
|
|
60
60
|
let e = Math.min(window.devicePixelRatio || 1, 1.5), { clientWidth: n, clientHeight: i } = r.value;
|
|
61
61
|
r.value.width = Math.max(1, Math.round(n * e)), r.value.height = Math.max(1, Math.round(i * e)), s.viewport(0, 0, r.value.width, r.value.height);
|
|
@@ -66,19 +66,19 @@ var R = {
|
|
|
66
66
|
let u = Number.parseFloat(getComputedStyle(r.value).getPropertyValue("--aurora-spread"));
|
|
67
67
|
s.uniform1f(h, Number.isNaN(u) ? 1 : u);
|
|
68
68
|
}
|
|
69
|
-
C(
|
|
70
|
-
},
|
|
71
|
-
s && r.value && (s.uniform1f(d, e ?? (performance.now() -
|
|
72
|
-
},
|
|
73
|
-
|
|
69
|
+
T(C() ? 10 : void 0);
|
|
70
|
+
}, C = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches, T = (e) => {
|
|
71
|
+
s && r.value && (s.uniform1f(d, e ?? (performance.now() - y) / 1e3), s.uniform2f(f, r.value.width, r.value.height), s.drawArrays(s.TRIANGLE_STRIP, 0, 4));
|
|
72
|
+
}, E = () => {
|
|
73
|
+
T(), l = requestAnimationFrame(E);
|
|
74
74
|
};
|
|
75
|
-
return
|
|
75
|
+
return le(() => {
|
|
76
76
|
let e = r.value;
|
|
77
|
-
if (
|
|
77
|
+
if (x(), s = e?.getContext("webgl", { alpha: !0 }) ?? null, !e || !s || !a.value) {
|
|
78
78
|
i.value = !0;
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
|
-
let t =
|
|
81
|
+
let t = ee(s.VERTEX_SHADER, V), n = ee(s.FRAGMENT_SHADER, xe), o = s.createProgram();
|
|
82
82
|
if (!t || !n || !o || (s.attachShader(o, t), s.attachShader(o, n), s.linkProgram(o), !s.getProgramParameter(o, s.LINK_STATUS))) {
|
|
83
83
|
i.value = !0;
|
|
84
84
|
return;
|
|
@@ -96,28 +96,28 @@ var R = {
|
|
|
96
96
|
1
|
|
97
97
|
]), s.STATIC_DRAW);
|
|
98
98
|
let l = s.getAttribLocation(o, "a_position");
|
|
99
|
-
s.enableVertexAttribArray(l), s.vertexAttribPointer(l, 2, s.FLOAT, !1, 0, 0), d = s.getUniformLocation(o, "u_time"), f = s.getUniformLocation(o, "u_resolution"), p = s.getUniformLocation(o, "u_center"), m = s.getUniformLocation(o, "u_half"), h = s.getUniformLocation(o, "u_spread"), g = s.getUniformLocation(o, "u_color"), _ = s.getUniformLocation(o, "u_color2"), v = s.getUniformLocation(o, "u_duo"),
|
|
100
|
-
}),
|
|
99
|
+
s.enableVertexAttribArray(l), s.vertexAttribPointer(l, 2, s.FLOAT, !1, 0, 0), d = s.getUniformLocation(o, "u_time"), f = s.getUniformLocation(o, "u_resolution"), p = s.getUniformLocation(o, "u_center"), m = s.getUniformLocation(o, "u_half"), h = s.getUniformLocation(o, "u_spread"), g = s.getUniformLocation(o, "u_color"), _ = s.getUniformLocation(o, "u_color2"), v = s.getUniformLocation(o, "u_duo"), x(), u = new ResizeObserver(S), u.observe(e), S(), oe(S), C() ? T(10) : E();
|
|
100
|
+
}), ce(() => {
|
|
101
101
|
cancelAnimationFrame(l), u?.disconnect();
|
|
102
|
-
}),
|
|
102
|
+
}), de(() => {
|
|
103
103
|
let e = s;
|
|
104
104
|
s = null, setTimeout(() => {
|
|
105
105
|
e?.getExtension("WEBGL_lose_context")?.loseContext();
|
|
106
106
|
}, 150);
|
|
107
|
-
}), (e, t) => (
|
|
107
|
+
}), (e, t) => (M(), D("div", {
|
|
108
108
|
ref_key: "rootEl",
|
|
109
109
|
ref: n,
|
|
110
110
|
class: "pk-aurora",
|
|
111
111
|
"aria-hidden": "true",
|
|
112
|
-
style:
|
|
113
|
-
}, [i.value ? (
|
|
112
|
+
style: se(o.value)
|
|
113
|
+
}, [i.value ? (M(), D("div", B)) : (M(), D("canvas", {
|
|
114
114
|
key: 0,
|
|
115
115
|
ref_key: "canvasEl",
|
|
116
116
|
ref: r,
|
|
117
117
|
class: "pk-aurora__canvas"
|
|
118
118
|
}, null, 512))], 4));
|
|
119
119
|
}
|
|
120
|
-
}),
|
|
120
|
+
}), H = .18, Ce = .35, we = /* @__PURE__ */ re({
|
|
121
121
|
__name: "PkVoiceOrb",
|
|
122
122
|
props: {
|
|
123
123
|
sample: {},
|
|
@@ -129,20 +129,20 @@ var R = {
|
|
|
129
129
|
bars: { default: 5 }
|
|
130
130
|
},
|
|
131
131
|
setup(e) {
|
|
132
|
-
let t = e, n =
|
|
132
|
+
let t = e, n = L("barsEl"), r = Array.from({ length: t.bars }, () => H), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
|
|
133
133
|
let e = Math.min(1, Math.max(0, t.sample())), n = t.spectrum?.(), i = r.length;
|
|
134
134
|
if (!n?.length) {
|
|
135
135
|
let t = Date.now() / 260;
|
|
136
136
|
return Array.from({ length: i }, (n, r) => {
|
|
137
137
|
let i = .65 + .35 * Math.sin(t + r * .9);
|
|
138
|
-
return
|
|
138
|
+
return H + e * 2.4 * i;
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
let a = Math.max(1, Math.floor(n.length / 2)), o = Math.max(1, Math.floor(a / i));
|
|
142
142
|
return Array.from({ length: i }, (e, t) => {
|
|
143
143
|
let r = 0;
|
|
144
144
|
for (let e = 0; e < o; e += 1) r += n[t * o + e] ?? 0;
|
|
145
|
-
return
|
|
145
|
+
return H + r / o / 255 * 2.2;
|
|
146
146
|
});
|
|
147
147
|
}, s = () => {
|
|
148
148
|
let e = n.value?.children;
|
|
@@ -151,36 +151,36 @@ var R = {
|
|
|
151
151
|
});
|
|
152
152
|
}, c = () => {
|
|
153
153
|
let e = o();
|
|
154
|
-
r = r.map((t, n) => t + (Math.min(1, Math.max(
|
|
154
|
+
r = r.map((t, n) => t + (Math.min(1, Math.max(H, e[n] ?? H)) - t) * Ce), s(), i = requestAnimationFrame(c);
|
|
155
155
|
}, l = () => {
|
|
156
156
|
i !== void 0 && (cancelAnimationFrame(i), i = void 0);
|
|
157
157
|
};
|
|
158
|
-
return
|
|
159
|
-
e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() =>
|
|
160
|
-
}, { immediate: !0 }),
|
|
161
|
-
class:
|
|
158
|
+
return R(() => t.state, async (e) => {
|
|
159
|
+
e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => H * 1.6), await oe(), s()) : i === void 0 && (i = requestAnimationFrame(c));
|
|
160
|
+
}, { immediate: !0 }), ce(l), (t, r) => (M(), D("div", {
|
|
161
|
+
class: j(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
|
|
162
162
|
"aria-hidden": "true"
|
|
163
|
-
}, [
|
|
163
|
+
}, [O("div", {
|
|
164
164
|
ref_key: "barsEl",
|
|
165
165
|
ref: n,
|
|
166
166
|
class: "pk-voice-orb__bars"
|
|
167
|
-
}, [(
|
|
167
|
+
}, [(M(!0), D(x, null, pe(e.bars, (e) => (M(), D("span", {
|
|
168
168
|
key: e,
|
|
169
169
|
class: "pk-voice-orb__bar"
|
|
170
170
|
}))), 128))], 512)], 2));
|
|
171
171
|
}
|
|
172
|
-
}),
|
|
172
|
+
}), Te = {
|
|
173
173
|
key: 0,
|
|
174
174
|
class: "pk-voice-session__badge",
|
|
175
175
|
"aria-hidden": "true"
|
|
176
|
-
},
|
|
176
|
+
}, U = {
|
|
177
177
|
class: "pk-voice-session__status",
|
|
178
178
|
role: "status"
|
|
179
|
-
},
|
|
179
|
+
}, W = {
|
|
180
180
|
key: 0,
|
|
181
181
|
class: "pk-voice-session__live-dot",
|
|
182
182
|
"aria-hidden": "true"
|
|
183
|
-
},
|
|
183
|
+
}, Ee = ["title"], De = ["title"], Oe = { class: "pk-voice-session__actions" }, ke = /* @__PURE__ */ re({
|
|
184
184
|
__name: "PkVoiceSession",
|
|
185
185
|
props: {
|
|
186
186
|
state: {},
|
|
@@ -199,17 +199,17 @@ var R = {
|
|
|
199
199
|
"dismiss"
|
|
200
200
|
],
|
|
201
201
|
setup(e, { emit: t }) {
|
|
202
|
-
let n = e, r = t, { t: i } =
|
|
202
|
+
let n = e, r = t, { t: i } = he({ useScope: "global" }), a = w(() => n.error ? i("message.voiceFailed") : n.state === "connecting" ? i("message.voiceConnecting") : n.state === "speaking" ? i("message.voiceSpeaking") : n.muted ? i("message.voiceMuted") : i("message.voiceListening")), o = w(() => {
|
|
203
203
|
if (n.remainingSeconds === void 0) return;
|
|
204
204
|
let e = Math.floor(n.remainingSeconds / 60), t = n.remainingSeconds % 60;
|
|
205
205
|
return `${e}:${String(t).padStart(2, "0")}`;
|
|
206
|
-
}), s =
|
|
206
|
+
}), s = w(() => n.remainingSeconds !== void 0 && n.remainingSeconds <= 30), c = w(() => !n.error && (n.state === "listening" || n.state === "speaking")), l = w(() => {
|
|
207
207
|
if (c.value) return n.state === "speaking" ? "speaking" : n.muted ? void 0 : "listening";
|
|
208
208
|
});
|
|
209
209
|
return (t, n) => {
|
|
210
|
-
let u =
|
|
211
|
-
return
|
|
212
|
-
e.error ? (
|
|
210
|
+
let u = b;
|
|
211
|
+
return M(), D("div", { class: j(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
|
|
212
|
+
e.error ? (M(), D("span", Te, [k(u, { name: "ri:error-warning-line" })])) : (M(), T(we, {
|
|
213
213
|
key: 1,
|
|
214
214
|
state: e.state,
|
|
215
215
|
sample: e.sample,
|
|
@@ -219,37 +219,37 @@ var R = {
|
|
|
219
219
|
"sample",
|
|
220
220
|
"spectrum"
|
|
221
221
|
])),
|
|
222
|
-
|
|
222
|
+
O("div", U, [O("span", { class: j(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (M(), D("span", W)) : E("", !0), ne(" " + P(a.value), 1)], 2), e.error ? (M(), D("p", {
|
|
223
223
|
key: 0,
|
|
224
224
|
class: "pk-voice-session__detail",
|
|
225
225
|
title: e.rawError ?? e.error
|
|
226
|
-
},
|
|
227
|
-
o.value ? (
|
|
226
|
+
}, P(e.error), 9, Ee)) : E("", !0)]),
|
|
227
|
+
o.value ? (M(), D("span", {
|
|
228
228
|
key: 2,
|
|
229
|
-
class:
|
|
230
|
-
title:
|
|
229
|
+
class: j(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
|
|
230
|
+
title: I(i)("hint.voiceRemaining"),
|
|
231
231
|
"aria-hidden": "true"
|
|
232
|
-
},
|
|
233
|
-
|
|
232
|
+
}, P(o.value), 11, De)) : E("", !0),
|
|
233
|
+
O("div", Oe, [e.error ? (M(), D(x, { key: 0 }, [k(g, {
|
|
234
234
|
icon: "ri:refresh-line",
|
|
235
|
-
label:
|
|
235
|
+
label: I(i)("action.retry"),
|
|
236
236
|
onClick: n[0] ||= (e) => r("retry")
|
|
237
|
-
}, null, 8, ["label"]), e.live ? (
|
|
237
|
+
}, null, 8, ["label"]), e.live ? (M(), T(g, {
|
|
238
238
|
key: 0,
|
|
239
239
|
icon: "ri:stop-circle-line",
|
|
240
240
|
modifiers: "danger",
|
|
241
|
-
title:
|
|
242
|
-
"aria-label":
|
|
241
|
+
title: I(i)("action.hangUp"),
|
|
242
|
+
"aria-label": I(i)("action.hangUp"),
|
|
243
243
|
onClick: n[1] ||= (e) => r("hang-up")
|
|
244
|
-
}, null, 8, ["title", "aria-label"])) : (
|
|
244
|
+
}, null, 8, ["title", "aria-label"])) : (M(), T(g, {
|
|
245
245
|
key: 1,
|
|
246
246
|
icon: "ri:close-line",
|
|
247
|
-
label:
|
|
247
|
+
label: I(i)("action.close"),
|
|
248
248
|
onClick: n[2] ||= (e) => r("dismiss")
|
|
249
|
-
}, null, 8, ["label"]))], 64)) : (
|
|
249
|
+
}, null, 8, ["label"]))], 64)) : (M(), D(x, { key: 1 }, [k(g, {
|
|
250
250
|
icon: e.muted ? "ri:mic-off-line" : "ri:mic-line",
|
|
251
|
-
title: e.muted ?
|
|
252
|
-
"aria-label": e.muted ?
|
|
251
|
+
title: e.muted ? I(i)("action.unmute") : I(i)("action.mute"),
|
|
252
|
+
"aria-label": e.muted ? I(i)("action.unmute") : I(i)("action.mute"),
|
|
253
253
|
"aria-pressed": e.muted,
|
|
254
254
|
onClick: n[3] ||= (e) => r("toggle-mute")
|
|
255
255
|
}, null, 8, [
|
|
@@ -257,18 +257,18 @@ var R = {
|
|
|
257
257
|
"title",
|
|
258
258
|
"aria-label",
|
|
259
259
|
"aria-pressed"
|
|
260
|
-
]),
|
|
260
|
+
]), k(g, {
|
|
261
261
|
icon: "ri:stop-circle-line",
|
|
262
262
|
modifiers: "danger",
|
|
263
|
-
title:
|
|
264
|
-
"aria-label":
|
|
263
|
+
title: I(i)("action.hangUp"),
|
|
264
|
+
"aria-label": I(i)("action.hangUp"),
|
|
265
265
|
onClick: n[4] ||= (e) => r("hang-up")
|
|
266
266
|
}, null, 8, ["title", "aria-label"])], 64))])
|
|
267
267
|
], 2);
|
|
268
268
|
};
|
|
269
269
|
}
|
|
270
|
-
}),
|
|
271
|
-
let t =
|
|
270
|
+
}), Ae = (e) => {
|
|
271
|
+
let t = me(), n = N("disconnected"), r = N("listening"), i = N(), o = N([]), s = N(), c = N(), l, u, d = 0, f = !1, p = () => {
|
|
272
272
|
u &&= (clearInterval(u), void 0), s.value = void 0;
|
|
273
273
|
}, m = (e) => {
|
|
274
274
|
let t = Date.now() + e * 1e3, n = () => {
|
|
@@ -340,9 +340,9 @@ var R = {
|
|
|
340
340
|
}
|
|
341
341
|
}, v = () => {
|
|
342
342
|
i.value = void 0;
|
|
343
|
-
},
|
|
343
|
+
}, y = (e) => {
|
|
344
344
|
t.value?.setMicMuted(e);
|
|
345
|
-
},
|
|
345
|
+
}, ee = (e) => {
|
|
346
346
|
let n = t.value;
|
|
347
347
|
if (!n || !e.trim()) return !1;
|
|
348
348
|
try {
|
|
@@ -350,7 +350,7 @@ var R = {
|
|
|
350
350
|
} catch (e) {
|
|
351
351
|
return a.warn("The spoken answer could not be sent", e), !1;
|
|
352
352
|
}
|
|
353
|
-
},
|
|
353
|
+
}, b = (e) => {
|
|
354
354
|
let n = t.value;
|
|
355
355
|
if (!n) return 0;
|
|
356
356
|
try {
|
|
@@ -358,21 +358,21 @@ var R = {
|
|
|
358
358
|
} catch {
|
|
359
359
|
return 0;
|
|
360
360
|
}
|
|
361
|
-
},
|
|
361
|
+
}, x = (e) => {
|
|
362
362
|
let n = t.value;
|
|
363
363
|
if (n) try {
|
|
364
364
|
return e === "input" ? n.getInputByteFrequencyData() : n.getOutputByteFrequencyData();
|
|
365
365
|
} catch {
|
|
366
366
|
return;
|
|
367
367
|
}
|
|
368
|
-
},
|
|
368
|
+
}, S = () => {
|
|
369
369
|
let e = l;
|
|
370
370
|
l = void 0, d += 1, p(), h(e);
|
|
371
371
|
let r = t.value;
|
|
372
372
|
t.value = void 0, r?.endSession().catch(() => void 0), n.value = "disconnected";
|
|
373
373
|
};
|
|
374
|
-
return typeof window < "u" && window.addEventListener("pagehide",
|
|
375
|
-
f = !0, typeof window < "u" && window.removeEventListener("pagehide",
|
|
374
|
+
return typeof window < "u" && window.addEventListener("pagehide", S), ue(() => {
|
|
375
|
+
f = !0, typeof window < "u" && window.removeEventListener("pagehide", S), g();
|
|
376
376
|
}), {
|
|
377
377
|
status: n,
|
|
378
378
|
mode: r,
|
|
@@ -380,33 +380,33 @@ var R = {
|
|
|
380
380
|
transcript: o,
|
|
381
381
|
remainingSeconds: s,
|
|
382
382
|
chatId: c,
|
|
383
|
-
isActive:
|
|
384
|
-
isConnecting:
|
|
385
|
-
isSpeaking:
|
|
386
|
-
isListening:
|
|
383
|
+
isActive: w(() => n.value === "connected" || n.value === "connecting"),
|
|
384
|
+
isConnecting: w(() => n.value === "connecting"),
|
|
385
|
+
isSpeaking: w(() => n.value === "connected" && r.value === "speaking"),
|
|
386
|
+
isListening: w(() => n.value === "connected" && r.value === "listening"),
|
|
387
387
|
start: _,
|
|
388
388
|
stop: g,
|
|
389
389
|
dismissError: v,
|
|
390
|
-
setMuted:
|
|
391
|
-
sendUserMessage:
|
|
392
|
-
readLevel:
|
|
393
|
-
readSpectrum:
|
|
390
|
+
setMuted: y,
|
|
391
|
+
sendUserMessage: ee,
|
|
392
|
+
readLevel: b,
|
|
393
|
+
readSpectrum: x
|
|
394
394
|
};
|
|
395
|
-
},
|
|
396
|
-
function
|
|
397
|
-
|
|
395
|
+
}, je = Symbol("ChatFilePreviewDock");
|
|
396
|
+
function Me(e) {
|
|
397
|
+
fe(je, e);
|
|
398
398
|
}
|
|
399
|
-
function
|
|
400
|
-
return
|
|
399
|
+
function Ne() {
|
|
400
|
+
return ie(je, void 0);
|
|
401
401
|
}
|
|
402
402
|
// ../../packages/components/src/chat/useWakeupWatch.ts
|
|
403
|
-
var
|
|
403
|
+
var Pe = 4e3, Fe = [
|
|
404
404
|
3e3,
|
|
405
405
|
5e3,
|
|
406
406
|
1e4
|
|
407
|
-
],
|
|
408
|
-
function
|
|
409
|
-
let t =
|
|
407
|
+
], Ie = 12e4, G = 3e4;
|
|
408
|
+
function Le(e) {
|
|
409
|
+
let t = N(null), n = N(!1), r, i = !1, a = () => {
|
|
410
410
|
clearTimeout(r), r = void 0;
|
|
411
411
|
}, o = (e, t) => {
|
|
412
412
|
a(), i || (r = setTimeout(() => void t(), e));
|
|
@@ -423,12 +423,12 @@ function ze(e) {
|
|
|
423
423
|
}
|
|
424
424
|
let r = t.value;
|
|
425
425
|
if (r) {
|
|
426
|
-
let e = Date.parse(r.dueAt) - Date.now() +
|
|
427
|
-
o(Math.max(
|
|
426
|
+
let e = Date.parse(r.dueAt) - Date.now() + Pe;
|
|
427
|
+
o(Math.max(Pe, e), () => l(r.wakeId, Date.now(), 0));
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
430
|
async function l(t, n, r) {
|
|
431
|
-
await e.refreshMessages(), !i && (s(t) || Date.now() - n >=
|
|
431
|
+
await e.refreshMessages(), !i && (s(t) || Date.now() - n >= Ie ? await c() : o(Fe[Math.min(r, Fe.length - 1)], () => l(t, n, r + 1)));
|
|
432
432
|
}
|
|
433
433
|
async function u() {
|
|
434
434
|
n.value = !0;
|
|
@@ -452,23 +452,23 @@ function ze(e) {
|
|
|
452
452
|
function h() {
|
|
453
453
|
f = void 0;
|
|
454
454
|
}
|
|
455
|
-
let g =
|
|
456
|
-
|
|
455
|
+
let g = w(() => e.messages().some((e) => e.role === "user"));
|
|
456
|
+
R([e.chatId, g], ([, t]) => {
|
|
457
457
|
d();
|
|
458
458
|
let n = e.status(), r = n === "submitted" || n === "streaming" || f === e.chatId();
|
|
459
459
|
t && !r && c();
|
|
460
|
-
}, { immediate: !0 }),
|
|
460
|
+
}, { immediate: !0 }), R(e.status, (e, t) => {
|
|
461
461
|
e === "ready" && t !== "ready" && g.value && c();
|
|
462
462
|
});
|
|
463
463
|
let _;
|
|
464
464
|
function v() {
|
|
465
465
|
t.value && document.visibilityState === "visible" && e.apiClient().markChatWakeupPresence(e.agentId(), e.chatId()).catch(() => void 0);
|
|
466
466
|
}
|
|
467
|
-
let
|
|
468
|
-
return document.addEventListener("visibilitychange",
|
|
469
|
-
clearInterval(_), _ = void 0, e && !i && (v(), _ = setInterval(v,
|
|
470
|
-
}),
|
|
471
|
-
i = !0, a(), clearInterval(_), document.removeEventListener("visibilitychange",
|
|
467
|
+
let y = () => v();
|
|
468
|
+
return document.addEventListener("visibilitychange", y), R(() => t.value?.wakeId, (e) => {
|
|
469
|
+
clearInterval(_), _ = void 0, e && !i && (v(), _ = setInterval(v, G));
|
|
470
|
+
}), ce(() => {
|
|
471
|
+
i = !0, a(), clearInterval(_), document.removeEventListener("visibilitychange", y);
|
|
472
472
|
}), {
|
|
473
473
|
pendingWakeup: t,
|
|
474
474
|
isStopping: n,
|
|
@@ -481,8 +481,8 @@ function ze(e) {
|
|
|
481
481
|
};
|
|
482
482
|
}
|
|
483
483
|
// ../../packages/components/src/chat/useChatFilePreview.ts
|
|
484
|
-
function
|
|
485
|
-
let t =
|
|
484
|
+
function Re(e) {
|
|
485
|
+
let t = N(), n = N(), r = N(!1), i = N(!1), a = /* @__PURE__ */ new Map(), o = 0, s = 0, c = async (c) => {
|
|
486
486
|
let l = ++o, u = s;
|
|
487
487
|
t.value = c, i.value = !1;
|
|
488
488
|
let d = a.get(c.storedFileName);
|
|
@@ -513,16 +513,16 @@ function Be(e) {
|
|
|
513
513
|
};
|
|
514
514
|
}
|
|
515
515
|
// ../../packages/components/src/chat/PkChatbotViewChat.vue?vue&type=script&setup=true&lang.ts
|
|
516
|
-
var
|
|
516
|
+
var ze = { class: "pk-chatbot-view-chat__input-stage" }, Be = {
|
|
517
517
|
key: 1,
|
|
518
518
|
class: "p-md border-t border-surface-3 text-center text-12 text-danger bg-surface-danger"
|
|
519
|
-
},
|
|
519
|
+
}, Ve = { class: "pk-chatbot-view-chat__agent-chip" }, He = {
|
|
520
520
|
key: 0,
|
|
521
521
|
class: "pk-chatbot-view-chat__agent-chip-name"
|
|
522
|
-
},
|
|
522
|
+
}, Ue = {
|
|
523
523
|
key: 0,
|
|
524
524
|
class: "pk-chatbot-view-chat__drop-overlay"
|
|
525
|
-
},
|
|
525
|
+
}, We = 1e3, Ge = 3e3, Ke = 6e4, qe = 3e5, Je = 6e5, Ye = /* @__PURE__ */ re({
|
|
526
526
|
__name: "PkChatbotViewChat",
|
|
527
527
|
props: {
|
|
528
528
|
agentId: {},
|
|
@@ -535,146 +535,149 @@ var Ve = { class: "pk-chatbot-view-chat__input-stage" }, He = {
|
|
|
535
535
|
"selection-action"
|
|
536
536
|
],
|
|
537
537
|
setup(a, { emit: c }) {
|
|
538
|
-
let g =
|
|
539
|
-
|
|
540
|
-
let
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
}),
|
|
544
|
-
e &&
|
|
538
|
+
let g = A(() => import("./PkToolShowForm-CKXpqQxy.js").then((e) => e.n)), x = A(() => import("./PkToolShowContactForm-iQrlqv7j.js").then((e) => e.n)), ne = A(() => import("./PkToolShowSuggestedReply-BRIzGNwx.js").then((e) => e.n)), re = A(() => import("./PkToolShowSources-BiP9fVV2.js").then((e) => e.n)), ie = A(() => import("./PkToolRequestGeolocation-p7Ip17F7.js").then((e) => e.n)), oe = A(() => import("./PkToolRequestOAuthConnection-CtXSzKzM.js")), se = A(() => import("./PkToolShowLocation-B8FE_Sqd.js").then((e) => e.n)), le = A(() => import("./PkToolShowDiagram-C-43uUoh.js")), ue = A(() => import("./PkToolChatFile-DAT1tv52.js").then((e) => e.n)), de = A(() => import("./PkToolShareDocument-Qb2Lu5vh.js").then((e) => e.n)), pe = A(() => import("./PkFilePreview-C2VOU99H.js").then((e) => e.n)), me = A(() => import("./PkFilePreviewDialog-C6QQMntW.js").then((e) => e.n)), F = a, be = c, B = r(F.agentId), { agentInterface: V, agentFileUpload: xe, agentType: H, agentVoice: Ce, actions: we, revisedAnswers: Te, messages: U, chat: W, messageFeedbacks: Ee, feedbackDialogMessage: De, isFeedbackSubmitting: Oe, isFeedbackSubmitted: je, feedbackSubmitError: Me, isLeadSubmitted: Pe, isLoadingSubmitLead: Fe, submitLeadError: Ie, input: G, inputMessagePlaceholder: Ye, isConversationBlocked: Xe, baseUrl: Ze, pendingAttachments: Qe, isAttachmentLimitReached: $e, fileLimitError: et, apiClient: K, isDark: tt, hostToolsPending: nt, pageNoticeLevel: rt, hostConfirmation: it, agentPageAccess: at, hostStepTitles: ot, hostStepChanges: st, confirmationMode: ct, canQueue: lt, queuedMessages: ut, backgroundAnswers: dt, inputFocusRequest: ft, pagePointer: pt, pagePointerAvailable: mt, pagePointing: ht, agentSelectionActions: gt } = ve(B);
|
|
539
|
+
fe(f, ot), fe(d, st);
|
|
540
|
+
let _t = L("inputEl");
|
|
541
|
+
R(ft, () => {
|
|
542
|
+
_t.value?.focus();
|
|
543
|
+
}), R(pt, (e) => {
|
|
544
|
+
e && _t.value?.focus();
|
|
545
545
|
});
|
|
546
|
-
let
|
|
547
|
-
kind:
|
|
548
|
-
label:
|
|
549
|
-
} : void 0),
|
|
550
|
-
let e =
|
|
546
|
+
let vt = w(() => pt.value ? {
|
|
547
|
+
kind: pt.value.kind,
|
|
548
|
+
label: pt.value.label
|
|
549
|
+
} : void 0), yt = w(() => H.value === "reasoning" ? void 0 : xe.value), q = (e) => K.value.getMediaDownloadUrl(F.agentId, B.localChatId, e), { handleSubmit: bt, stopGeneration: xt, regenerate: St, onUpvote: Ct, onDownvote: wt, onFeedback: Tt, onFeedbackSubmit: Et, onLeadSubmit: Dt, startNewChat: Ot, addToolOutput: kt, addToolApprovalResponse: At, handleFileSelect: jt, discardPendingAttachment: Mt, clearFileLimitError: Nt, refreshMessages: Pt, appendMessage: Ft, closePageNotice: It, respondHostConfirmation: Lt, editQueuedMessage: Rt, removeQueuedMessage: zt, openBackgroundAnswer: Bt, dismissBackgroundAnswer: Vt } = B, { t: J } = he({ useScope: "global" }), Ht = w(() => nt.value > 0), Ut = w(() => Ht.value && W.value.status === "ready" ? "streaming" : W.value.status), Wt = m(() => at.value?.notice), Gt = w(() => rt.value ? Wt.value || J(`message.pageAccessNotice.${rt.value}`) : void 0), Kt = w(() => {
|
|
550
|
+
let e = et.value;
|
|
551
551
|
if (e) return e.reason === "per-chat" ? J("message.fileLimitPerChat", { max: e.max }) : J("message.fileLimitPerMessage", { max: e.max });
|
|
552
|
-
}),
|
|
552
|
+
}), qt = w(() => dt.value.map(({ chatId: e, title: t }) => ({
|
|
553
553
|
id: e,
|
|
554
554
|
text: t ? J("message.backgroundAnswerReady", { title: t }) : J("message.backgroundAnswerReadyUntitled")
|
|
555
|
-
}))),
|
|
556
|
-
|
|
555
|
+
}))), Jt = m(() => V.value?.dismissableNotice), Yt = w(() => U.value.some((e) => e.role === "user")), Xt = w(() => F.modifier === "fullscreen" && !Yt.value), Zt = ye(V, () => F.userName), Qt = L("chatViewEl"), $t = Ne(), en = w(() => !!$t?.value), tn = w(() => $t?.value ?? "body"), nn = N(0), rn = N(0);
|
|
556
|
+
_e([Qt, w(() => $t?.value ?? void 0)], (e) => {
|
|
557
557
|
for (let t of e) {
|
|
558
558
|
let e = t.borderBoxSize?.[0]?.inlineSize ?? t.contentRect.width;
|
|
559
|
-
t.target ===
|
|
559
|
+
t.target === Qt.value ? nn.value = e : rn.value = e;
|
|
560
560
|
}
|
|
561
561
|
}, { box: "border-box" });
|
|
562
|
-
let
|
|
562
|
+
let an = w(() => nn.value + (en.value ? rn.value : 0) >= We), on = w(() => nn.value > 0 && nn.value < 576), { target: Y, preview: sn, loading: cn, error: ln, open: un, close: dn, reset: fn } = Re((e) => K.value.getChatFilePreview(F.agentId, B.localChatId, e)), X = N({}), pn = (e) => {
|
|
563
563
|
let t = (e) => e?.fileId ?? e?.storedFileName;
|
|
564
|
-
return t(e) !== t(Y.value) && (X.value = {}),
|
|
565
|
-
},
|
|
566
|
-
|
|
567
|
-
},
|
|
564
|
+
return t(e) !== t(Y.value) && (X.value = {}), un(e);
|
|
565
|
+
}, mn = N(!1), hn = w(() => !!Y.value && an.value && !mn.value), gn = () => {
|
|
566
|
+
dn(), mn.value = !1;
|
|
567
|
+
}, _n = /* @__PURE__ */ new Set([
|
|
568
568
|
"tool-editSpreadsheet",
|
|
569
569
|
"tool-editWordDocument",
|
|
570
570
|
"tool-createSpreadsheet",
|
|
571
571
|
"tool-createWordDocument"
|
|
572
|
-
]),
|
|
572
|
+
]), vn = w(() => {
|
|
573
573
|
let e = /* @__PURE__ */ new Map();
|
|
574
|
-
for (let t of
|
|
574
|
+
for (let t of U.value) for (let n of t.parts) {
|
|
575
575
|
let { type: t, state: r, output: i } = n;
|
|
576
|
-
if (
|
|
576
|
+
if (_n.has(t) && r === "output-available" && i?.fileId && i.version && i.storedFileName) {
|
|
577
577
|
let t = e.get(i.fileId) ?? /* @__PURE__ */ new Map();
|
|
578
578
|
t.set(i.version, i.storedFileName), e.set(i.fileId, t);
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
581
|
for (let [t, n] of e) n.has(1) || n.set(1, t);
|
|
582
582
|
return e;
|
|
583
|
-
}),
|
|
584
|
-
let t = Y.value, n =
|
|
585
|
-
t && n &&
|
|
583
|
+
}), yn = w(() => [...vn.value.get(Y.value?.fileId ?? "")?.keys() ?? []].sort((e, t) => e - t)), bn = (e) => {
|
|
584
|
+
let t = Y.value, n = vn.value.get(t?.fileId ?? "")?.get(e);
|
|
585
|
+
t && n && pn({
|
|
586
586
|
...t,
|
|
587
587
|
version: e,
|
|
588
588
|
storedFileName: n
|
|
589
589
|
});
|
|
590
|
-
},
|
|
591
|
-
let e = Y.value, t =
|
|
590
|
+
}, xn = w(() => {
|
|
591
|
+
let e = Y.value, t = yn.value;
|
|
592
592
|
return !!$.value && !!e?.fileId && !!e.version && t.length > 0 && e.version < t[t.length - 1];
|
|
593
|
-
}),
|
|
593
|
+
}), Sn = () => {
|
|
594
594
|
let e = Y.value;
|
|
595
595
|
e?.fileId && e.version && ($.value?.({
|
|
596
596
|
fileId: e.fileId,
|
|
597
597
|
version: e.version,
|
|
598
598
|
filename: e.filename
|
|
599
|
-
}),
|
|
599
|
+
}), gn());
|
|
600
600
|
};
|
|
601
|
-
|
|
602
|
-
let
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
601
|
+
R(() => B.localChatId, fn), R(() => {
|
|
602
|
+
let e = Y.value?.fileId;
|
|
603
|
+
return e ? {
|
|
604
|
+
fileId: e,
|
|
605
|
+
newest: Math.max(0, ...yn.value)
|
|
606
|
+
} : void 0;
|
|
607
|
+
}, (e, t) => {
|
|
608
|
+
e && t && e.fileId === t.fileId && e.newest > t.newest && Y.value?.version === t.newest && bn(e.newest);
|
|
606
609
|
});
|
|
607
|
-
let
|
|
608
|
-
let e =
|
|
609
|
-
if (!(
|
|
610
|
-
}),
|
|
611
|
-
|
|
610
|
+
let Cn = w(() => {
|
|
611
|
+
let e = W.value?.status;
|
|
612
|
+
if (!(Xe.value || e === "submitted" || e === "streaming")) return Y.value?.kind === "word" ? gt.value?.word : gt.value?.excel;
|
|
613
|
+
}), wn = (e, t, n) => {
|
|
614
|
+
B.sendSelection(e, { filePointer: t }) && be("selection-action", {
|
|
612
615
|
surface: t.format === "docx" ? "word" : "excel",
|
|
613
616
|
action: n.id,
|
|
614
617
|
state: "chat",
|
|
615
618
|
size: String(n.size)
|
|
616
619
|
});
|
|
617
|
-
},
|
|
618
|
-
let t = await
|
|
620
|
+
}, Tn = async (e) => (await K.value.expandSourceContext(F.agentId, e.documentId, e.chunkIndex)).content, En = async (e) => {
|
|
621
|
+
let t = await K.value.downloadSourceDocument(F.agentId, e);
|
|
619
622
|
window.open(t.downloadUrl, "_blank");
|
|
620
|
-
}, { isOverDropZone:
|
|
621
|
-
dataTypes: (e) => t(e,
|
|
623
|
+
}, { isOverDropZone: Dn } = ge(Qt, {
|
|
624
|
+
dataTypes: (e) => t(e, yt.value?.allowedMimeTypes ?? []),
|
|
622
625
|
onDrop: (e) => {
|
|
623
|
-
if (
|
|
626
|
+
if (yt.value?.enabled && e) for (let t of e) jt(t);
|
|
624
627
|
}
|
|
625
|
-
}),
|
|
628
|
+
}), On = N(!1), kn = !1, Z = N(!1), An = [
|
|
626
629
|
3e3,
|
|
627
630
|
5e3,
|
|
628
631
|
1e4
|
|
629
|
-
],
|
|
630
|
-
function
|
|
631
|
-
clearTimeout(
|
|
632
|
+
], jn, Mn, Nn = !1, Pn = 0, Fn = !1;
|
|
633
|
+
function In() {
|
|
634
|
+
clearTimeout(jn), jn = void 0, Mn = void 0, Nn = !1, Pn = 0, Z.value = !1;
|
|
632
635
|
}
|
|
633
|
-
function
|
|
634
|
-
|
|
635
|
-
|
|
636
|
+
function Ln(e) {
|
|
637
|
+
kn || (clearTimeout(jn), jn = setTimeout(() => {
|
|
638
|
+
Rn();
|
|
636
639
|
}, e));
|
|
637
640
|
}
|
|
638
|
-
async function
|
|
639
|
-
if (
|
|
640
|
-
|
|
641
|
+
async function Rn() {
|
|
642
|
+
if (kn || Fn) return;
|
|
643
|
+
Fn = !0;
|
|
641
644
|
let e;
|
|
642
645
|
try {
|
|
643
|
-
e = await
|
|
646
|
+
e = await Pt();
|
|
644
647
|
} finally {
|
|
645
|
-
|
|
648
|
+
Fn = !1;
|
|
646
649
|
}
|
|
647
|
-
if (
|
|
648
|
-
if (e === "caught-up" && (Z.value = !1,
|
|
649
|
-
|
|
650
|
+
if (kn) return;
|
|
651
|
+
if (e === "caught-up" && (Z.value = !1, mr()), Q.isActive.value) {
|
|
652
|
+
Mn = void 0, Nn = !1, Pn = 0, Ln(Ge);
|
|
650
653
|
return;
|
|
651
654
|
}
|
|
652
|
-
|
|
653
|
-
let t = Date.now() -
|
|
654
|
-
if (e === "caught-up" && t >= (
|
|
655
|
-
|
|
655
|
+
Mn === void 0 && (Mn = Date.now(), Nn = !!Q.error.value);
|
|
656
|
+
let t = Date.now() - Mn;
|
|
657
|
+
if (e === "caught-up" && t >= (Nn ? qe : Ke) || t >= Je) {
|
|
658
|
+
In(), hr();
|
|
656
659
|
return;
|
|
657
660
|
}
|
|
658
|
-
let n =
|
|
659
|
-
|
|
661
|
+
let n = An[Math.min(Pn, An.length - 1)];
|
|
662
|
+
Pn += 1, Ln(n);
|
|
660
663
|
}
|
|
661
|
-
let
|
|
662
|
-
|
|
663
|
-
},
|
|
664
|
+
let zn = (e = 1200) => {
|
|
665
|
+
Ln(e);
|
|
666
|
+
}, Bn, Q = Ae({
|
|
664
667
|
fetchGrant: async () => {
|
|
665
|
-
|
|
666
|
-
let e = await
|
|
667
|
-
deviceContext:
|
|
668
|
-
externalContext:
|
|
669
|
-
pageTools:
|
|
670
|
-
...
|
|
668
|
+
Bn = B.voicePageTools();
|
|
669
|
+
let e = await K.value.createVoiceSession(F.agentId, B.localChatId, {
|
|
670
|
+
deviceContext: B.buildDeviceContext(),
|
|
671
|
+
externalContext: B.externalContext,
|
|
672
|
+
pageTools: Bn?.declaration,
|
|
673
|
+
...B.confirmationMode === "automatic" && { confirmations: "automatic" }
|
|
671
674
|
});
|
|
672
|
-
return e.chatId !==
|
|
675
|
+
return e.chatId !== B.localChatId && (B.localChatId = e.chatId), e;
|
|
673
676
|
},
|
|
674
|
-
closeGrant: (e) =>
|
|
675
|
-
clientTools: () =>
|
|
677
|
+
closeGrant: (e) => K.value.closeVoiceSession(F.agentId, e),
|
|
678
|
+
clientTools: () => Bn?.clientTools,
|
|
676
679
|
onTranscript: (e) => {
|
|
677
|
-
e.role === "user" ? (Z.value = !0,
|
|
680
|
+
e.role === "user" ? (Z.value = !0, pr(), Ft({
|
|
678
681
|
id: `${i}user-${n()}`,
|
|
679
682
|
role: "user",
|
|
680
683
|
parts: [{
|
|
@@ -684,166 +687,166 @@ var Ve = { class: "pk-chatbot-view-chat__input-stage" }, He = {
|
|
|
684
687
|
})) : Z.value = !1;
|
|
685
688
|
},
|
|
686
689
|
onTurnEnd: () => {
|
|
687
|
-
|
|
690
|
+
zn();
|
|
688
691
|
}
|
|
689
692
|
});
|
|
690
|
-
|
|
691
|
-
e ||
|
|
692
|
-
}),
|
|
693
|
+
R(() => Q.isActive.value, (e) => {
|
|
694
|
+
e || B.cancelVoicePageCalls();
|
|
695
|
+
}), R(() => Q.error.value, (e) => {
|
|
693
696
|
e && (Z.value = !1);
|
|
694
697
|
});
|
|
695
|
-
let
|
|
698
|
+
let Vn = w(() => Ce.value?.enabled === !0), Hn = w(() => Q.error.value ? "error" : Q.isConnecting.value ? "connecting" : Q.isSpeaking.value ? "speaking" : Q.isActive.value ? "listening" : "idle"), Un = w(() => {
|
|
696
699
|
let e = Q.error.value;
|
|
697
700
|
if (e) return /took too long/i.test(e) ? J("message.voiceTookTooLong") : /cascade|no response|custom_llm_error/i.test(e) ? J("message.voiceNoAnswer") : J("message.voiceInterrupted");
|
|
698
|
-
}),
|
|
699
|
-
|
|
700
|
-
},
|
|
701
|
-
Z.value = !1, await Q.stop(), !
|
|
702
|
-
},
|
|
701
|
+
}), Wn = w(() => Q.isSpeaking.value ? "output" : "input"), Gn = () => Q.readLevel(Wn.value), Kn = () => Q.readSpectrum(Wn.value), qn = async () => {
|
|
702
|
+
On.value = !1, await Q.start(), Q.isActive.value && (In(), Ln(Ge));
|
|
703
|
+
}, Jn = async () => {
|
|
704
|
+
Z.value = !1, await Q.stop(), !kn && zn(0);
|
|
705
|
+
}, Yn = () => {
|
|
703
706
|
Q.dismissError();
|
|
704
|
-
},
|
|
705
|
-
Q.dismissError(), await Q.stop(), await
|
|
706
|
-
},
|
|
707
|
-
|
|
707
|
+
}, Xn = async () => {
|
|
708
|
+
Q.dismissError(), await Q.stop(), await qn();
|
|
709
|
+
}, Zn = (e) => e?.toolCallId ?? "", Qn = N(/* @__PURE__ */ new Set()), $n = (e) => Qn.value.has(Zn(e)), er = N(/* @__PURE__ */ new Map()), tr = (e, t) => Q.isActive.value ? (Q.sendUserMessage(t) && (Qn.value = new Set(Qn.value).add(Zn(e)), zn()), !0) : !1, nr = (e, t, n) => {
|
|
710
|
+
tr(t, l(t, n)) || kt({
|
|
708
711
|
tool: e,
|
|
709
|
-
toolCallId:
|
|
712
|
+
toolCallId: Zn(t),
|
|
710
713
|
output: n
|
|
711
714
|
});
|
|
712
|
-
},
|
|
715
|
+
}, rr = (e) => {
|
|
713
716
|
let t = e.confirmed ? J("message.voiceConfirmed") : J("message.voiceCancelled");
|
|
714
|
-
|
|
717
|
+
tr({ toolCallId: e.toolCallId }, t) ? Qn.value.has(e.toolCallId) && (er.value = new Map(er.value).set(e.toolCallId, e.confirmed)) : kt({
|
|
715
718
|
tool: "requestConfirm",
|
|
716
719
|
toolCallId: e.toolCallId,
|
|
717
720
|
output: e.confirmed ? "confirmed" : "cancelled"
|
|
718
721
|
});
|
|
719
|
-
},
|
|
722
|
+
}, ir = w(() => {
|
|
720
723
|
let e = /* @__PURE__ */ new Map();
|
|
721
|
-
for (let t of
|
|
724
|
+
for (let t of U.value) for (let n of t.parts) {
|
|
722
725
|
let { type: t, state: r, output: i } = n;
|
|
723
|
-
|
|
726
|
+
_n.has(t) && r === "output-available" && i?.fileId && i.version && e.set(i.fileId, Math.max(e.get(i.fileId) ?? 0, i.version));
|
|
724
727
|
}
|
|
725
728
|
return e;
|
|
726
|
-
}),
|
|
729
|
+
}), ar = w(() => {
|
|
727
730
|
let e = /* @__PURE__ */ new Map(), t = (t, n) => {
|
|
728
731
|
if (t && n) {
|
|
729
732
|
let r = t.toLowerCase();
|
|
730
733
|
e.set(r, (e.get(r) ?? /* @__PURE__ */ new Set()).add(n));
|
|
731
734
|
}
|
|
732
735
|
};
|
|
733
|
-
for (let e of
|
|
736
|
+
for (let e of U.value) for (let n of e.parts) {
|
|
734
737
|
if (o(n)) {
|
|
735
738
|
t(n.filename, s(n)?.storedFileName);
|
|
736
739
|
continue;
|
|
737
740
|
}
|
|
738
741
|
let { type: e, state: r, output: i } = n;
|
|
739
|
-
|
|
742
|
+
_n.has(e) && r === "output-available" && i?.filename && t(u(i.filename, i.version), i.fileId);
|
|
740
743
|
}
|
|
741
744
|
return e;
|
|
742
|
-
}), $ =
|
|
743
|
-
let t = (
|
|
744
|
-
|
|
745
|
-
}),
|
|
746
|
-
|
|
747
|
-
},
|
|
745
|
+
}), $ = w(() => Xe.value ? void 0 : (e) => {
|
|
746
|
+
let t = (ar.value.get(e.filename.toLowerCase())?.size ?? 0) > 1;
|
|
747
|
+
G.value = J(t ? "messagePart.chatFileRestoreRequestById" : "messagePart.chatFileRestoreRequest", e), bt();
|
|
748
|
+
}), or = (e, t) => {
|
|
749
|
+
tr(e, t) || (G.value = t, bt());
|
|
750
|
+
}, sr = (e, t) => {
|
|
748
751
|
let n = t.error ? J("message.voiceLocationRefused") : J("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
|
|
749
|
-
|
|
752
|
+
tr(e, n) || kt({
|
|
750
753
|
tool: "requestGeolocation",
|
|
751
|
-
toolCallId:
|
|
754
|
+
toolCallId: Zn(e),
|
|
752
755
|
output: t
|
|
753
756
|
});
|
|
754
|
-
},
|
|
755
|
-
|
|
757
|
+
}, cr = (e, t) => {
|
|
758
|
+
tr(e, J("message.voiceConnectionDone")) || kt({
|
|
756
759
|
tool: "requestOAuthConnection",
|
|
757
|
-
toolCallId:
|
|
760
|
+
toolCallId: Zn(e),
|
|
758
761
|
output: {
|
|
759
762
|
connected: !0,
|
|
760
763
|
mcpServerId: t
|
|
761
764
|
}
|
|
762
765
|
});
|
|
763
|
-
},
|
|
764
|
-
|
|
766
|
+
}, lr = () => {
|
|
767
|
+
On.value = !On.value, Q.setMuted(On.value);
|
|
765
768
|
};
|
|
766
|
-
|
|
767
|
-
|
|
769
|
+
ce(() => {
|
|
770
|
+
kn = !0, In();
|
|
768
771
|
});
|
|
769
|
-
let { pendingWakeup:
|
|
770
|
-
agentId: () =>
|
|
771
|
-
chatId: () =>
|
|
772
|
-
apiClient: () =>
|
|
773
|
-
messages: () =>
|
|
774
|
-
refreshMessages:
|
|
775
|
-
status: () =>
|
|
772
|
+
let { pendingWakeup: ur, isStopping: dr, stop: fr, spokenTurnStarted: pr, spokenTurnsWritten: mr, forgetSpokenTurns: hr } = Le({
|
|
773
|
+
agentId: () => F.agentId,
|
|
774
|
+
chatId: () => B.localChatId,
|
|
775
|
+
apiClient: () => K.value,
|
|
776
|
+
messages: () => U.value,
|
|
777
|
+
refreshMessages: Pt,
|
|
778
|
+
status: () => W.value.status
|
|
776
779
|
});
|
|
777
780
|
return (t, n) => {
|
|
778
|
-
let r =
|
|
779
|
-
return
|
|
781
|
+
let r = b;
|
|
782
|
+
return M(), D("div", {
|
|
780
783
|
ref_key: "chatViewEl",
|
|
781
|
-
ref:
|
|
782
|
-
class:
|
|
783
|
-
"pk-chatbot-view-chat--dragover":
|
|
784
|
-
"pk-chatbot-view-chat--empty":
|
|
785
|
-
"pk-chatbot-view-chat--with-preview":
|
|
784
|
+
ref: Qt,
|
|
785
|
+
class: j(["pk-chatbot-view-chat", {
|
|
786
|
+
"pk-chatbot-view-chat--dragover": I(Dn) && yt.value?.enabled,
|
|
787
|
+
"pk-chatbot-view-chat--empty": Xt.value,
|
|
788
|
+
"pk-chatbot-view-chat--with-preview": hn.value && !en.value
|
|
786
789
|
}])
|
|
787
790
|
}, [
|
|
788
|
-
|
|
791
|
+
k(C, {
|
|
789
792
|
name: "pk-chatbot-view-chat-fade",
|
|
790
793
|
mode: "out-in"
|
|
791
794
|
}, {
|
|
792
|
-
default:
|
|
795
|
+
default: z(() => [Xt.value ? (M(), T(y, {
|
|
793
796
|
key: 0,
|
|
794
|
-
greeting:
|
|
795
|
-
logo:
|
|
796
|
-
name:
|
|
797
|
+
greeting: I(Zt),
|
|
798
|
+
logo: I(V)?.logo,
|
|
799
|
+
name: I(B).name
|
|
797
800
|
}, null, 8, [
|
|
798
801
|
"greeting",
|
|
799
802
|
"logo",
|
|
800
803
|
"name"
|
|
801
|
-
])) : (
|
|
804
|
+
])) : (M(), T(e, {
|
|
802
805
|
key: 1,
|
|
803
806
|
class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
|
|
804
807
|
interactive: "",
|
|
805
|
-
messages:
|
|
806
|
-
"confirm-verdicts-on-call":
|
|
807
|
-
status:
|
|
808
|
-
error:
|
|
809
|
-
"main-color":
|
|
810
|
-
"text-color":
|
|
811
|
-
"revised-answers":
|
|
812
|
-
actions:
|
|
813
|
-
"message-feedbacks":
|
|
814
|
-
"feedback-message-id":
|
|
815
|
-
"feedback-loading":
|
|
816
|
-
"feedback-submitted":
|
|
817
|
-
"feedback-error":
|
|
818
|
-
"show-extended-steps":
|
|
819
|
-
"hide-reasoning":
|
|
808
|
+
messages: I(U),
|
|
809
|
+
"confirm-verdicts-on-call": er.value,
|
|
810
|
+
status: I(W).status,
|
|
811
|
+
error: I(W).error,
|
|
812
|
+
"main-color": I(V)?.mainColor,
|
|
813
|
+
"text-color": I(V)?.textColor,
|
|
814
|
+
"revised-answers": I(Te),
|
|
815
|
+
actions: I(we),
|
|
816
|
+
"message-feedbacks": I(Ee),
|
|
817
|
+
"feedback-message-id": I(De)?.id,
|
|
818
|
+
"feedback-loading": I(Oe),
|
|
819
|
+
"feedback-submitted": I(je),
|
|
820
|
+
"feedback-error": I(Me),
|
|
821
|
+
"show-extended-steps": I(V)?.showExtendedSteps,
|
|
822
|
+
"hide-reasoning": I(V)?.showReasoning === !1,
|
|
820
823
|
"awaiting-spoken-answer": Z.value,
|
|
821
|
-
"host-working":
|
|
822
|
-
"host-confirmation":
|
|
823
|
-
"is-dark":
|
|
824
|
+
"host-working": Ht.value,
|
|
825
|
+
"host-confirmation": I(it),
|
|
826
|
+
"is-dark": I(tt),
|
|
824
827
|
"show-scroll-to-bottom": a.modifier === "fullscreen",
|
|
825
|
-
onFeedbackSubmit: n[0] ||= (e) =>
|
|
826
|
-
onFeedbackClose: n[1] ||= (e) =>
|
|
827
|
-
onRegenerate:
|
|
828
|
-
onAutoRetry:
|
|
829
|
-
onResetChat:
|
|
830
|
-
onShowInfo: n[2] ||= (e) =>
|
|
831
|
-
onRevise: n[3] ||= (e) =>
|
|
832
|
-
onUpvote:
|
|
833
|
-
onDownvote:
|
|
834
|
-
onFeedback:
|
|
835
|
-
onApprovalRespond:
|
|
836
|
-
onConfirmRespond:
|
|
837
|
-
onHostConfirmRespond:
|
|
828
|
+
onFeedbackSubmit: n[0] ||= (e) => I(Et)(e),
|
|
829
|
+
onFeedbackClose: n[1] ||= (e) => De.value = void 0,
|
|
830
|
+
onRegenerate: I(St),
|
|
831
|
+
onAutoRetry: I(St),
|
|
832
|
+
onResetChat: I(Ot),
|
|
833
|
+
onShowInfo: n[2] ||= (e) => be("show-info", e),
|
|
834
|
+
onRevise: n[3] ||= (e) => be("revise", e),
|
|
835
|
+
onUpvote: I(Ct),
|
|
836
|
+
onDownvote: I(wt),
|
|
837
|
+
onFeedback: I(Tt),
|
|
838
|
+
onApprovalRespond: I(At),
|
|
839
|
+
onConfirmRespond: rr,
|
|
840
|
+
onHostConfirmRespond: I(Lt)
|
|
838
841
|
}, {
|
|
839
|
-
"tool-showContactForm":
|
|
842
|
+
"tool-showContactForm": z(({ part: e }) => [k(I(x), {
|
|
840
843
|
part: e,
|
|
841
|
-
readonly: !
|
|
842
|
-
submitted:
|
|
843
|
-
loading:
|
|
844
|
-
error:
|
|
845
|
-
"privacy-policy-notice":
|
|
846
|
-
onSubmit:
|
|
844
|
+
readonly: !I(Ze),
|
|
845
|
+
submitted: I(Pe),
|
|
846
|
+
loading: I(Fe),
|
|
847
|
+
error: I(Ie),
|
|
848
|
+
"privacy-policy-notice": I(V)?.privacyPolicyNotice,
|
|
849
|
+
onSubmit: I(Dt)
|
|
847
850
|
}, null, 8, [
|
|
848
851
|
"part",
|
|
849
852
|
"readonly",
|
|
@@ -853,20 +856,20 @@ var Ve = { class: "pk-chatbot-view-chat__input-stage" }, He = {
|
|
|
853
856
|
"privacy-policy-notice",
|
|
854
857
|
"onSubmit"
|
|
855
858
|
])]),
|
|
856
|
-
"tool-showSuggestedReply":
|
|
859
|
+
"tool-showSuggestedReply": z(({ part: e }) => [k(I(ne), {
|
|
857
860
|
part: e,
|
|
858
|
-
onSelect: (t) =>
|
|
861
|
+
onSelect: (t) => or(e, t)
|
|
859
862
|
}, null, 8, ["part", "onSelect"])]),
|
|
860
|
-
"tool-showSources":
|
|
863
|
+
"tool-showSources": z(({ part: e }) => [k(I(re), {
|
|
861
864
|
part: e,
|
|
862
|
-
"on-expand-context":
|
|
863
|
-
"on-download":
|
|
865
|
+
"on-expand-context": Tn,
|
|
866
|
+
"on-download": En
|
|
864
867
|
}, null, 8, ["part"])]),
|
|
865
|
-
"tool-showForm":
|
|
866
|
-
default:
|
|
868
|
+
"tool-showForm": z(({ part: e }) => [k(C, { mode: "out-in" }, {
|
|
869
|
+
default: z(() => [k(I(g), {
|
|
867
870
|
part: e,
|
|
868
|
-
answered:
|
|
869
|
-
onSelect: (t) =>
|
|
871
|
+
answered: $n(e),
|
|
872
|
+
onSelect: (t) => nr("showForm", e, t)
|
|
870
873
|
}, null, 8, [
|
|
871
874
|
"part",
|
|
872
875
|
"answered",
|
|
@@ -874,12 +877,12 @@ var Ve = { class: "pk-chatbot-view-chat__input-stage" }, He = {
|
|
|
874
877
|
])]),
|
|
875
878
|
_: 2
|
|
876
879
|
}, 1024)]),
|
|
877
|
-
"tool-showMultipleChoice":
|
|
878
|
-
default:
|
|
880
|
+
"tool-showMultipleChoice": z(({ part: e }) => [k(C, { mode: "out-in" }, {
|
|
881
|
+
default: z(() => [k(I(g), {
|
|
879
882
|
part: e,
|
|
880
883
|
"allow-custom-answer": "",
|
|
881
|
-
answered:
|
|
882
|
-
onSelect: (t) =>
|
|
884
|
+
answered: $n(e),
|
|
885
|
+
onSelect: (t) => nr("showMultipleChoice", e, t)
|
|
883
886
|
}, null, 8, [
|
|
884
887
|
"part",
|
|
885
888
|
"answered",
|
|
@@ -887,12 +890,12 @@ var Ve = { class: "pk-chatbot-view-chat__input-stage" }, He = {
|
|
|
887
890
|
])]),
|
|
888
891
|
_: 2
|
|
889
892
|
}, 1024)]),
|
|
890
|
-
"tool-requestOAuthConnection":
|
|
893
|
+
"tool-requestOAuthConnection": z(({ part: e }) => [k(I(oe), {
|
|
891
894
|
part: e,
|
|
892
|
-
"backend-url":
|
|
893
|
-
"resolve-connection": (e) =>
|
|
894
|
-
"check-connection": (e) =>
|
|
895
|
-
onConnected: (t) =>
|
|
895
|
+
"backend-url": I(Ze),
|
|
896
|
+
"resolve-connection": (e) => I(K).getOAuthAuthorizeUrl(F.agentId, e),
|
|
897
|
+
"check-connection": (e) => I(K).getOAuthConnectionStatus(F.agentId, e),
|
|
898
|
+
onConnected: (t) => cr(e, t)
|
|
896
899
|
}, null, 8, [
|
|
897
900
|
"part",
|
|
898
901
|
"backend-url",
|
|
@@ -900,166 +903,167 @@ var Ve = { class: "pk-chatbot-view-chat__input-stage" }, He = {
|
|
|
900
903
|
"check-connection",
|
|
901
904
|
"onConnected"
|
|
902
905
|
])]),
|
|
903
|
-
"tool-requestGeolocation":
|
|
906
|
+
"tool-requestGeolocation": z(({ part: e }) => [k(I(ie), {
|
|
904
907
|
part: e,
|
|
905
|
-
"call-live":
|
|
906
|
-
"reverse-geocode": (e, t) =>
|
|
907
|
-
onResult: (t) =>
|
|
908
|
+
"call-live": I(Q).isActive.value,
|
|
909
|
+
"reverse-geocode": (e, t) => I(K).reverseGeocode(e, t),
|
|
910
|
+
onResult: (t) => sr(e, t)
|
|
908
911
|
}, null, 8, [
|
|
909
912
|
"part",
|
|
910
913
|
"call-live",
|
|
911
914
|
"reverse-geocode",
|
|
912
915
|
"onResult"
|
|
913
916
|
])]),
|
|
914
|
-
"tool-showLocation":
|
|
917
|
+
"tool-showLocation": z(({ part: e }) => [k(I(se), {
|
|
915
918
|
part: e,
|
|
916
|
-
"is-dark":
|
|
917
|
-
"main-color":
|
|
918
|
-
"forward-geocode": (e, t) =>
|
|
919
|
+
"is-dark": I(tt),
|
|
920
|
+
"main-color": I(V)?.mainColor,
|
|
921
|
+
"forward-geocode": (e, t) => I(K).forwardGeocode(e, t)
|
|
919
922
|
}, null, 8, [
|
|
920
923
|
"part",
|
|
921
924
|
"is-dark",
|
|
922
925
|
"main-color",
|
|
923
926
|
"forward-geocode"
|
|
924
927
|
])]),
|
|
925
|
-
"tool-showDiagram":
|
|
928
|
+
"tool-showDiagram": z(({ part: e }) => [k(I(le), {
|
|
926
929
|
part: e,
|
|
927
|
-
"is-dark":
|
|
930
|
+
"is-dark": I(tt)
|
|
928
931
|
}, null, 8, ["part", "is-dark"])]),
|
|
929
|
-
"tool-editSpreadsheet":
|
|
930
|
-
key:
|
|
932
|
+
"tool-editSpreadsheet": z(({ part: e }) => [(M(), T(I(ue), {
|
|
933
|
+
key: I(p)(e),
|
|
931
934
|
part: e,
|
|
932
935
|
"file-url": q,
|
|
933
|
-
preview:
|
|
934
|
-
"latest-versions":
|
|
936
|
+
preview: pn,
|
|
937
|
+
"latest-versions": ir.value,
|
|
935
938
|
restore: $.value
|
|
936
939
|
}, null, 8, [
|
|
937
940
|
"part",
|
|
938
941
|
"latest-versions",
|
|
939
942
|
"restore"
|
|
940
943
|
]))]),
|
|
941
|
-
"tool-editWordDocument":
|
|
942
|
-
key:
|
|
944
|
+
"tool-editWordDocument": z(({ part: e }) => [(M(), T(I(ue), {
|
|
945
|
+
key: I(p)(e),
|
|
943
946
|
part: e,
|
|
944
947
|
"file-url": q,
|
|
945
|
-
preview:
|
|
946
|
-
"latest-versions":
|
|
948
|
+
preview: pn,
|
|
949
|
+
"latest-versions": ir.value,
|
|
947
950
|
restore: $.value
|
|
948
951
|
}, null, 8, [
|
|
949
952
|
"part",
|
|
950
953
|
"latest-versions",
|
|
951
954
|
"restore"
|
|
952
955
|
]))]),
|
|
953
|
-
"tool-createSpreadsheet":
|
|
954
|
-
key:
|
|
956
|
+
"tool-createSpreadsheet": z(({ part: e }) => [(M(), T(I(ue), {
|
|
957
|
+
key: I(p)(e),
|
|
955
958
|
part: e,
|
|
956
959
|
"file-url": q,
|
|
957
|
-
preview:
|
|
958
|
-
"latest-versions":
|
|
960
|
+
preview: pn,
|
|
961
|
+
"latest-versions": ir.value,
|
|
959
962
|
restore: $.value
|
|
960
963
|
}, null, 8, [
|
|
961
964
|
"part",
|
|
962
965
|
"latest-versions",
|
|
963
966
|
"restore"
|
|
964
967
|
]))]),
|
|
965
|
-
"tool-createWordDocument":
|
|
966
|
-
key:
|
|
968
|
+
"tool-createWordDocument": z(({ part: e }) => [(M(), T(I(ue), {
|
|
969
|
+
key: I(p)(e),
|
|
967
970
|
part: e,
|
|
968
971
|
"file-url": q,
|
|
969
|
-
preview:
|
|
970
|
-
"latest-versions":
|
|
972
|
+
preview: pn,
|
|
973
|
+
"latest-versions": ir.value,
|
|
971
974
|
restore: $.value
|
|
972
975
|
}, null, 8, [
|
|
973
976
|
"part",
|
|
974
977
|
"latest-versions",
|
|
975
978
|
"restore"
|
|
976
979
|
]))]),
|
|
977
|
-
"tool-shareDocument":
|
|
978
|
-
key:
|
|
980
|
+
"tool-shareDocument": z(({ part: e }) => [(M(), T(I(de), {
|
|
981
|
+
key: I(p)(e),
|
|
979
982
|
part: e,
|
|
980
|
-
"on-download":
|
|
983
|
+
"on-download": En
|
|
981
984
|
}, null, 8, ["part"]))]),
|
|
982
985
|
_: 1
|
|
983
986
|
}, 8, /* @__PURE__ */ "messages.confirm-verdicts-on-call.status.error.main-color.text-color.revised-answers.actions.message-feedbacks.feedback-message-id.feedback-loading.feedback-submitted.feedback-error.show-extended-steps.hide-reasoning.awaiting-spoken-answer.host-working.host-confirmation.is-dark.show-scroll-to-bottom.onRegenerate.onAutoRetry.onResetChat.onUpvote.onDownvote.onFeedback.onApprovalRespond.onHostConfirmRespond".split(".")))]),
|
|
984
987
|
_: 1
|
|
985
988
|
}),
|
|
986
|
-
|
|
989
|
+
I(ut).length ? (M(), T(v, {
|
|
987
990
|
key: 0,
|
|
988
|
-
messages:
|
|
989
|
-
onEdit:
|
|
990
|
-
onRemove:
|
|
991
|
+
messages: I(ut),
|
|
992
|
+
onEdit: I(Rt),
|
|
993
|
+
onRemove: I(zt)
|
|
991
994
|
}, null, 8, [
|
|
992
995
|
"messages",
|
|
993
996
|
"onEdit",
|
|
994
997
|
"onRemove"
|
|
995
|
-
])) :
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
default:
|
|
998
|
+
])) : E("", !0),
|
|
999
|
+
O("div", ze, [
|
|
1000
|
+
k(C, { name: "pk-chatbot-view-chat-fade" }, {
|
|
1001
|
+
default: z(() => [Xt.value ? (M(), T(Se, {
|
|
999
1002
|
key: 0,
|
|
1000
1003
|
class: "pk-chatbot-view-chat__aurora",
|
|
1001
1004
|
"source-selector": ".pk-chatbot-input__form",
|
|
1002
|
-
"main-color":
|
|
1003
|
-
tones:
|
|
1004
|
-
"second-color":
|
|
1005
|
+
"main-color": I(V)?.mainColor,
|
|
1006
|
+
tones: I(V)?.glowTones,
|
|
1007
|
+
"second-color": I(V)?.glowSecondColor
|
|
1005
1008
|
}, null, 8, [
|
|
1006
1009
|
"main-color",
|
|
1007
1010
|
"tones",
|
|
1008
1011
|
"second-color"
|
|
1009
|
-
])) :
|
|
1012
|
+
])) : E("", !0)]),
|
|
1010
1013
|
_: 1
|
|
1011
1014
|
}),
|
|
1012
|
-
|
|
1015
|
+
I(ur) && !I(Xe) ? (M(), T(ee, {
|
|
1013
1016
|
key: 0,
|
|
1014
|
-
pending:
|
|
1015
|
-
stopping:
|
|
1016
|
-
onStop:
|
|
1017
|
+
pending: I(ur),
|
|
1018
|
+
stopping: I(dr),
|
|
1019
|
+
onStop: I(fr)
|
|
1017
1020
|
}, null, 8, [
|
|
1018
1021
|
"pending",
|
|
1019
1022
|
"stopping",
|
|
1020
1023
|
"onStop"
|
|
1021
|
-
])) :
|
|
1022
|
-
|
|
1024
|
+
])) : E("", !0),
|
|
1025
|
+
I(Xe) ? (M(), D("div", Be, P(I(J)("message.chatErrorConversationBlocked")), 1)) : Hn.value === "idle" ? (M(), T(_, {
|
|
1023
1026
|
key: 3,
|
|
1024
1027
|
ref_key: "inputEl",
|
|
1025
|
-
ref:
|
|
1026
|
-
modelValue:
|
|
1027
|
-
"onUpdate:modelValue": n[4] ||= (e) =>
|
|
1028
|
-
"pending-attachments":
|
|
1029
|
-
"onUpdate:pendingAttachments": n[5] ||= (e) =>
|
|
1030
|
-
placeholder:
|
|
1031
|
-
"dismissable-notice":
|
|
1032
|
-
"page-notice":
|
|
1033
|
-
status:
|
|
1034
|
-
"max-message-length":
|
|
1035
|
-
"file-upload":
|
|
1036
|
-
"attachment-limit-reached":
|
|
1037
|
-
"attachment-notice":
|
|
1038
|
-
"voice-enabled":
|
|
1039
|
-
"queue-enabled":
|
|
1040
|
-
"answer-notices":
|
|
1041
|
-
"pointer-available":
|
|
1042
|
-
pointing:
|
|
1043
|
-
pointer:
|
|
1044
|
-
"automatic-confirmations":
|
|
1045
|
-
onPoint: n[6] ||= (e) =>
|
|
1046
|
-
onRemovePointer: n[7] ||= (e) =>
|
|
1047
|
-
onManualConfirmations: n[8] ||= (e) =>
|
|
1048
|
-
onStopGeneration:
|
|
1049
|
-
onSubmit:
|
|
1050
|
-
onFileSelect:
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1028
|
+
ref: _t,
|
|
1029
|
+
modelValue: I(G),
|
|
1030
|
+
"onUpdate:modelValue": n[4] ||= (e) => ae(G) ? G.value = e : null,
|
|
1031
|
+
"pending-attachments": I(Qe),
|
|
1032
|
+
"onUpdate:pendingAttachments": n[5] ||= (e) => ae(Qe) ? Qe.value = e : null,
|
|
1033
|
+
placeholder: I(Ye),
|
|
1034
|
+
"dismissable-notice": I(Jt) && I(W).messages.length <= 1 ? I(Jt) : void 0,
|
|
1035
|
+
"page-notice": Gt.value,
|
|
1036
|
+
status: Ut.value,
|
|
1037
|
+
"max-message-length": I(V)?.maxMessageLength,
|
|
1038
|
+
"file-upload": yt.value,
|
|
1039
|
+
"attachment-limit-reached": I($e),
|
|
1040
|
+
"attachment-notice": Kt.value,
|
|
1041
|
+
"voice-enabled": Vn.value,
|
|
1042
|
+
"queue-enabled": I(lt),
|
|
1043
|
+
"answer-notices": qt.value,
|
|
1044
|
+
"pointer-available": I(mt),
|
|
1045
|
+
pointing: I(ht),
|
|
1046
|
+
pointer: vt.value,
|
|
1047
|
+
"automatic-confirmations": I(ct) === "automatic",
|
|
1048
|
+
onPoint: n[6] ||= (e) => I(B).pagePointerStart?.(),
|
|
1049
|
+
onRemovePointer: n[7] ||= (e) => pt.value = void 0,
|
|
1050
|
+
onManualConfirmations: n[8] ||= (e) => I(B).setConfirmationMode("manual"),
|
|
1051
|
+
onStopGeneration: I(xt),
|
|
1052
|
+
onSubmit: I(bt),
|
|
1053
|
+
onFileSelect: I(jt),
|
|
1054
|
+
onRemoveAttachment: I(Mt),
|
|
1055
|
+
onDismissAttachmentNotice: I(Nt),
|
|
1056
|
+
onDismissPageNotice: I(It),
|
|
1057
|
+
onOpenAnswerNotice: I(Bt),
|
|
1058
|
+
onDismissAnswerNotice: I(Vt),
|
|
1059
|
+
onVoiceStart: qn
|
|
1060
|
+
}, te({ _: 2 }, [a.modifier === "fullscreen" ? {
|
|
1057
1061
|
name: "prepend",
|
|
1058
|
-
fn:
|
|
1062
|
+
fn: z(() => [O("span", Ve, [k(h, {
|
|
1059
1063
|
class: "pk-chatbot-view-chat__agent-chip-avatar",
|
|
1060
|
-
"img-src":
|
|
1061
|
-
name:
|
|
1062
|
-
}, null, 8, ["img-src", "name"]),
|
|
1064
|
+
"img-src": I(V)?.logo,
|
|
1065
|
+
name: I(B).name
|
|
1066
|
+
}, null, 8, ["img-src", "name"]), I(B).name ? (M(), D("strong", He, P(I(B).name), 1)) : E("", !0)])]),
|
|
1063
1067
|
key: "0"
|
|
1064
1068
|
} : void 0]), 1032, [
|
|
1065
1069
|
"modelValue",
|
|
@@ -1082,25 +1086,26 @@ var Ve = { class: "pk-chatbot-view-chat__input-stage" }, He = {
|
|
|
1082
1086
|
"onStopGeneration",
|
|
1083
1087
|
"onSubmit",
|
|
1084
1088
|
"onFileSelect",
|
|
1089
|
+
"onRemoveAttachment",
|
|
1085
1090
|
"onDismissAttachmentNotice",
|
|
1086
1091
|
"onDismissPageNotice",
|
|
1087
1092
|
"onOpenAnswerNotice",
|
|
1088
1093
|
"onDismissAnswerNotice"
|
|
1089
|
-
])) : (
|
|
1094
|
+
])) : (M(), T(ke, {
|
|
1090
1095
|
key: 2,
|
|
1091
|
-
state:
|
|
1092
|
-
sample:
|
|
1093
|
-
spectrum:
|
|
1094
|
-
"remaining-seconds":
|
|
1095
|
-
muted:
|
|
1096
|
-
error:
|
|
1097
|
-
"raw-error":
|
|
1098
|
-
live:
|
|
1096
|
+
state: Hn.value,
|
|
1097
|
+
sample: Gn,
|
|
1098
|
+
spectrum: Kn,
|
|
1099
|
+
"remaining-seconds": I(Q).remainingSeconds.value,
|
|
1100
|
+
muted: On.value,
|
|
1101
|
+
error: Un.value,
|
|
1102
|
+
"raw-error": I(Q).error.value,
|
|
1103
|
+
live: I(Q).isActive.value,
|
|
1099
1104
|
class: "pk-chatbot-view-chat__voice",
|
|
1100
|
-
onToggleMute:
|
|
1101
|
-
onHangUp:
|
|
1102
|
-
onRetry:
|
|
1103
|
-
onDismiss:
|
|
1105
|
+
onToggleMute: lr,
|
|
1106
|
+
onHangUp: Jn,
|
|
1107
|
+
onRetry: Xn,
|
|
1108
|
+
onDismiss: Yn
|
|
1104
1109
|
}, null, 8, [
|
|
1105
1110
|
"state",
|
|
1106
1111
|
"remaining-seconds",
|
|
@@ -1110,18 +1115,18 @@ var Ve = { class: "pk-chatbot-view-chat__input-stage" }, He = {
|
|
|
1110
1115
|
"live"
|
|
1111
1116
|
]))
|
|
1112
1117
|
]),
|
|
1113
|
-
|
|
1114
|
-
default:
|
|
1118
|
+
k(C, null, {
|
|
1119
|
+
default: z(() => [I(Dn) && yt.value?.enabled ? (M(), D("div", Ue, [k(r, {
|
|
1115
1120
|
name: "ri:upload-cloud-2-line",
|
|
1116
1121
|
class: "pk-chatbot-view-chat__drop-overlay-icon"
|
|
1117
|
-
}),
|
|
1122
|
+
}), O("span", null, P(I(J)("action.dropFile")), 1)])) : E("", !0)]),
|
|
1118
1123
|
_: 1
|
|
1119
1124
|
}),
|
|
1120
|
-
|
|
1125
|
+
hn.value ? (M(), T(S, {
|
|
1121
1126
|
key: 1,
|
|
1122
|
-
to:
|
|
1123
|
-
disabled:
|
|
1124
|
-
}, [
|
|
1127
|
+
to: tn.value,
|
|
1128
|
+
disabled: !en.value
|
|
1129
|
+
}, [O("aside", { class: j(["pk-chatbot-view-chat__preview", { "pk-chatbot-view-chat__preview--docked": en.value }]) }, [I(Y) ? (M(), T(I(pe), {
|
|
1125
1130
|
key: 0,
|
|
1126
1131
|
mode: X.value.mode,
|
|
1127
1132
|
"onUpdate:mode": n[9] ||= (e) => X.value.mode = e,
|
|
@@ -1131,24 +1136,24 @@ var Ve = { class: "pk-chatbot-view-chat__input-stage" }, He = {
|
|
|
1131
1136
|
"onUpdate:zoom": n[11] ||= (e) => X.value.zoom = e,
|
|
1132
1137
|
fit: X.value.fit,
|
|
1133
1138
|
"onUpdate:fit": n[12] ||= (e) => X.value.fit = e,
|
|
1134
|
-
kind:
|
|
1135
|
-
filename:
|
|
1136
|
-
version:
|
|
1137
|
-
versions:
|
|
1138
|
-
"download-url": q(
|
|
1139
|
-
preview:
|
|
1140
|
-
loading:
|
|
1141
|
-
error:
|
|
1142
|
-
restorable:
|
|
1139
|
+
kind: I(Y).kind,
|
|
1140
|
+
filename: I(Y).filename,
|
|
1141
|
+
version: I(Y).version,
|
|
1142
|
+
versions: yn.value,
|
|
1143
|
+
"download-url": q(I(Y).storedFileName),
|
|
1144
|
+
preview: I(sn),
|
|
1145
|
+
loading: I(cn),
|
|
1146
|
+
error: I(ln),
|
|
1147
|
+
restorable: xn.value,
|
|
1143
1148
|
resize: "expand",
|
|
1144
|
-
"file-id":
|
|
1145
|
-
"stored-file-name":
|
|
1146
|
-
"selection-actions":
|
|
1147
|
-
onVersion:
|
|
1148
|
-
onRestore:
|
|
1149
|
-
onResize: n[13] ||= (e) =>
|
|
1150
|
-
onSelectionSend:
|
|
1151
|
-
onClose:
|
|
1149
|
+
"file-id": I(Y).fileId,
|
|
1150
|
+
"stored-file-name": I(Y).storedFileName,
|
|
1151
|
+
"selection-actions": Cn.value,
|
|
1152
|
+
onVersion: bn,
|
|
1153
|
+
onRestore: Sn,
|
|
1154
|
+
onResize: n[13] ||= (e) => mn.value = !0,
|
|
1155
|
+
onSelectionSend: wn,
|
|
1156
|
+
onClose: gn
|
|
1152
1157
|
}, null, 8, [
|
|
1153
1158
|
"mode",
|
|
1154
1159
|
"sheet",
|
|
@@ -1166,8 +1171,8 @@ var Ve = { class: "pk-chatbot-view-chat__input-stage" }, He = {
|
|
|
1166
1171
|
"file-id",
|
|
1167
1172
|
"stored-file-name",
|
|
1168
1173
|
"selection-actions"
|
|
1169
|
-
])) :
|
|
1170
|
-
|
|
1174
|
+
])) : E("", !0)], 2)], 8, ["to", "disabled"])) : E("", !0),
|
|
1175
|
+
I(Y) && !hn.value ? (M(), T(I(me), {
|
|
1171
1176
|
key: 2,
|
|
1172
1177
|
mode: X.value.mode,
|
|
1173
1178
|
"onUpdate:mode": n[14] ||= (e) => X.value.mode = e,
|
|
@@ -1177,21 +1182,21 @@ var Ve = { class: "pk-chatbot-view-chat__input-stage" }, He = {
|
|
|
1177
1182
|
"onUpdate:zoom": n[16] ||= (e) => X.value.zoom = e,
|
|
1178
1183
|
fit: X.value.fit,
|
|
1179
1184
|
"onUpdate:fit": n[17] ||= (e) => X.value.fit = e,
|
|
1180
|
-
target:
|
|
1181
|
-
versions:
|
|
1182
|
-
"download-url": q(
|
|
1183
|
-
preview:
|
|
1184
|
-
loading:
|
|
1185
|
-
error:
|
|
1186
|
-
restorable:
|
|
1187
|
-
resize:
|
|
1188
|
-
fullscreen:
|
|
1189
|
-
"selection-actions":
|
|
1190
|
-
onVersion:
|
|
1191
|
-
onRestore:
|
|
1192
|
-
onResize: n[18] ||= (e) =>
|
|
1193
|
-
onSelectionSend:
|
|
1194
|
-
onClose:
|
|
1185
|
+
target: I(Y),
|
|
1186
|
+
versions: yn.value,
|
|
1187
|
+
"download-url": q(I(Y).storedFileName),
|
|
1188
|
+
preview: I(sn),
|
|
1189
|
+
loading: I(cn),
|
|
1190
|
+
error: I(ln),
|
|
1191
|
+
restorable: xn.value,
|
|
1192
|
+
resize: an.value ? "shrink" : void 0,
|
|
1193
|
+
fullscreen: on.value,
|
|
1194
|
+
"selection-actions": Cn.value,
|
|
1195
|
+
onVersion: bn,
|
|
1196
|
+
onRestore: Sn,
|
|
1197
|
+
onResize: n[18] ||= (e) => mn.value = !1,
|
|
1198
|
+
onSelectionSend: wn,
|
|
1199
|
+
onClose: gn
|
|
1195
1200
|
}, null, 8, [
|
|
1196
1201
|
"mode",
|
|
1197
1202
|
"sheet",
|
|
@@ -1207,11 +1212,11 @@ var Ve = { class: "pk-chatbot-view-chat__input-stage" }, He = {
|
|
|
1207
1212
|
"resize",
|
|
1208
1213
|
"fullscreen",
|
|
1209
1214
|
"selection-actions"
|
|
1210
|
-
])) :
|
|
1215
|
+
])) : E("", !0)
|
|
1211
1216
|
], 2);
|
|
1212
1217
|
};
|
|
1213
1218
|
}
|
|
1214
1219
|
});
|
|
1215
|
-
export {
|
|
1220
|
+
export { we as a, ke as i, Re as n, Se as o, Me as r, Ye as t };
|
|
1216
1221
|
|
|
1217
|
-
//# sourceMappingURL=PkChatbotViewChat-
|
|
1222
|
+
//# sourceMappingURL=PkChatbotViewChat-C1uzFQCJ.js.map
|