@8wave/ai-elements 0.125.0-beta.32 → 0.125.0-beta.33

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.
Files changed (103) hide show
  1. package/dist/_chunks/{PkChatbotFilePreview-CqxtVySb.js → PkChatbotFilePreview-DsRAk1js.js} +2 -2
  2. package/dist/_chunks/{PkChatbotFilePreview-CqxtVySb.js.map → PkChatbotFilePreview-DsRAk1js.js.map} +1 -1
  3. package/dist/_chunks/PkImageEditorDialog-BQwM06kT.js +939 -0
  4. package/dist/_chunks/PkImageEditorDialog-BQwM06kT.js.map +1 -0
  5. package/dist/_chunks/{PkStreamingMarkdown-BqDooeUU.js → PkStreamingMarkdown-CjL7l_3E.js} +2 -2
  6. package/dist/_chunks/{PkStreamingMarkdown-BqDooeUU.js.map → PkStreamingMarkdown-CjL7l_3E.js.map} +1 -1
  7. package/dist/_chunks/{PkToolChatFile-DpStX3wS.js → PkToolChatFile-weptM8iA.js} +2 -2
  8. package/dist/_chunks/{PkToolChatFile-DpStX3wS.js.map → PkToolChatFile-weptM8iA.js.map} +1 -1
  9. package/dist/_chunks/{PkToolShareDocument-BvHklbzb.js → PkToolShareDocument-D5K3uJ2x.js} +2 -2
  10. package/dist/_chunks/{PkToolShareDocument-BvHklbzb.js.map → PkToolShareDocument-D5K3uJ2x.js.map} +1 -1
  11. package/dist/_chunks/{PkToolShowArtifact-YPwJLLlW.js → PkToolShowArtifact-Bm2zS5YS.js} +2 -2
  12. package/dist/_chunks/{PkToolShowArtifact-YPwJLLlW.js.map → PkToolShowArtifact-Bm2zS5YS.js.map} +1 -1
  13. package/dist/_chunks/{PkToolShowContactForm-CTc1mbA8.js → PkToolShowContactForm-BKJCv5To.js} +2 -2
  14. package/dist/_chunks/{PkToolShowContactForm-CTc1mbA8.js.map → PkToolShowContactForm-BKJCv5To.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShowDiagram-COt1Z3q9.js → PkToolShowDiagram-jpaEAi2X.js} +2 -2
  16. package/dist/_chunks/{PkToolShowDiagram-COt1Z3q9.js.map → PkToolShowDiagram-jpaEAi2X.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowForm-DT5EyYVY.js → PkToolShowForm-DvAcJgDP.js} +2 -2
  18. package/dist/_chunks/{PkToolShowForm-DT5EyYVY.js.map → PkToolShowForm-DvAcJgDP.js.map} +1 -1
  19. package/dist/_chunks/{PkToolShowImageGallery-DKrCrrB5.js → PkToolShowImageGallery-D0htuXNL.js} +4 -4
  20. package/dist/_chunks/{PkToolShowImageGallery-DKrCrrB5.js.map → PkToolShowImageGallery-D0htuXNL.js.map} +1 -1
  21. package/dist/_chunks/{PkToolShowSources-CzSknPo6.js → PkToolShowSources-Cfj6iRGj.js} +2 -2
  22. package/dist/_chunks/{PkToolShowSources-CzSknPo6.js.map → PkToolShowSources-Cfj6iRGj.js.map} +1 -1
  23. package/dist/_chunks/{useLightbox-D2Zi-Fpe.js → useLightbox-C54BCSbU.js} +130 -89
  24. package/dist/_chunks/useLightbox-C54BCSbU.js.map +1 -0
  25. package/dist/ai-elements.es.js +2774 -2721
  26. package/dist/ai-elements.es.js.map +1 -1
  27. package/dist-vue/PkChatbot.js +1 -1
  28. package/dist-vue/PkChatbotEmptyState.js +1 -1
  29. package/dist-vue/PkChatbotFilePreview.js +1 -1
  30. package/dist-vue/PkChatbotInput.js +1 -1
  31. package/dist-vue/PkChatbotMessages.js +1 -1
  32. package/dist-vue/PkChatbotSteps.js +1 -1
  33. package/dist-vue/PkChatbotViewChat.js +1 -1
  34. package/dist-vue/_chunks/{PkChatbot-g-mj6Luo.js → PkChatbot-Bc2hlwFO.js} +3 -3
  35. package/dist-vue/_chunks/{PkChatbot-g-mj6Luo.js.map → PkChatbot-Bc2hlwFO.js.map} +1 -1
  36. package/dist-vue/_chunks/{PkChatbotEmptyState-DMPEj1Qa.js → PkChatbotEmptyState-NHarCaDm.js} +2 -2
  37. package/dist-vue/_chunks/{PkChatbotEmptyState-DMPEj1Qa.js.map → PkChatbotEmptyState-NHarCaDm.js.map} +1 -1
  38. package/dist-vue/_chunks/{PkChatbotFilePreview-j_8sDZUE.js → PkChatbotFilePreview-BIta8Yg-.js} +2 -2
  39. package/dist-vue/_chunks/{PkChatbotFilePreview-j_8sDZUE.js.map → PkChatbotFilePreview-BIta8Yg-.js.map} +1 -1
  40. package/dist-vue/_chunks/{PkChatbotInput-OBoyFkZ-.js → PkChatbotInput-BSzDRoDD.js} +192 -181
  41. package/dist-vue/_chunks/PkChatbotInput-BSzDRoDD.js.map +1 -0
  42. package/dist-vue/_chunks/{PkChatbotMessages-bPBOSAv7.js → PkChatbotMessages-DEMKZDCb.js} +17 -17
  43. package/dist-vue/_chunks/{PkChatbotMessages-bPBOSAv7.js.map → PkChatbotMessages-DEMKZDCb.js.map} +1 -1
  44. package/dist-vue/_chunks/{PkChatbotSteps-pibgqxus.js → PkChatbotSteps-DGQoYxJ9.js} +2 -2
  45. package/dist-vue/_chunks/{PkChatbotSteps-pibgqxus.js.map → PkChatbotSteps-DGQoYxJ9.js.map} +1 -1
  46. package/dist-vue/_chunks/{PkChatbotViewChat-C28g7dz-.js → PkChatbotViewChat-aKi08vCz.js} +440 -431
  47. package/dist-vue/_chunks/PkChatbotViewChat-aKi08vCz.js.map +1 -0
  48. package/dist-vue/_chunks/{PkFilePreview-BgyJngDt.js → PkFilePreview-D2HInDoA.js} +2 -2
  49. package/dist-vue/_chunks/{PkFilePreview-BgyJngDt.js.map → PkFilePreview-D2HInDoA.js.map} +1 -1
  50. package/dist-vue/_chunks/{PkFilePreviewDialog-B3-oF1_R.js → PkFilePreviewDialog-jxcUSzPx.js} +2 -2
  51. package/dist-vue/_chunks/{PkFilePreviewDialog-B3-oF1_R.js.map → PkFilePreviewDialog-jxcUSzPx.js.map} +1 -1
  52. package/dist-vue/_chunks/PkImageEditorDialog-Dn3HV_ny.js +934 -0
  53. package/dist-vue/_chunks/PkImageEditorDialog-Dn3HV_ny.js.map +1 -0
  54. package/dist-vue/_chunks/{PkStreamingMarkdown-B3VWOaWb.js → PkStreamingMarkdown-DdOv86Eb.js} +11 -11
  55. package/dist-vue/_chunks/{PkStreamingMarkdown-B3VWOaWb.js.map → PkStreamingMarkdown-DdOv86Eb.js.map} +1 -1
  56. package/dist-vue/_chunks/{PkSvgViewer-BsdSOBpH.js → PkSvgViewer-vkd5Dluw.js} +2 -2
  57. package/dist-vue/_chunks/{PkSvgViewer-BsdSOBpH.js.map → PkSvgViewer-vkd5Dluw.js.map} +1 -1
  58. package/dist-vue/_chunks/{PkToolChatFile-PXpiJLZ6.js → PkToolChatFile-8nx166iM.js} +2 -2
  59. package/dist-vue/_chunks/{PkToolChatFile-PXpiJLZ6.js.map → PkToolChatFile-8nx166iM.js.map} +1 -1
  60. package/dist-vue/_chunks/{PkToolShareDocument-cMUqik6v.js → PkToolShareDocument-CspvFwRR.js} +2 -2
  61. package/dist-vue/_chunks/{PkToolShareDocument-cMUqik6v.js.map → PkToolShareDocument-CspvFwRR.js.map} +1 -1
  62. package/dist-vue/_chunks/{PkToolShowArtifact-DouCz_dZ.js → PkToolShowArtifact-BppP_xSN.js} +2 -2
  63. package/dist-vue/_chunks/{PkToolShowArtifact-DouCz_dZ.js.map → PkToolShowArtifact-BppP_xSN.js.map} +1 -1
  64. package/dist-vue/_chunks/{PkToolShowContactForm-BmiNlFfx.js → PkToolShowContactForm-Bm0icz24.js} +2 -2
  65. package/dist-vue/_chunks/{PkToolShowContactForm-BmiNlFfx.js.map → PkToolShowContactForm-Bm0icz24.js.map} +1 -1
  66. package/dist-vue/_chunks/{PkToolShowDiagram-D6mYTDU-.js → PkToolShowDiagram-CgukB1Ss.js} +2 -2
  67. package/dist-vue/_chunks/{PkToolShowDiagram-D6mYTDU-.js.map → PkToolShowDiagram-CgukB1Ss.js.map} +1 -1
  68. package/dist-vue/_chunks/{PkToolShowForm-CksTiimD.js → PkToolShowForm-CyyN7GQP.js} +2 -2
  69. package/dist-vue/_chunks/{PkToolShowForm-CksTiimD.js.map → PkToolShowForm-CyyN7GQP.js.map} +1 -1
  70. package/dist-vue/_chunks/{PkToolShowImageGallery-B-lVY0xH.js → PkToolShowImageGallery-zQF_lsxI.js} +5 -5
  71. package/dist-vue/_chunks/{PkToolShowImageGallery-B-lVY0xH.js.map → PkToolShowImageGallery-zQF_lsxI.js.map} +1 -1
  72. package/dist-vue/_chunks/{PkToolShowLocation-B8FE_Sqd.js → PkToolShowLocation-WdRqG8Wi.js} +2 -2
  73. package/dist-vue/_chunks/{PkToolShowLocation-B8FE_Sqd.js.map → PkToolShowLocation-WdRqG8Wi.js.map} +1 -1
  74. package/dist-vue/_chunks/{PkToolShowProductList-Dcq3Kdse.js → PkToolShowProductList-DW_P0gC2.js} +2 -2
  75. package/dist-vue/_chunks/{PkToolShowProductList-Dcq3Kdse.js.map → PkToolShowProductList-DW_P0gC2.js.map} +1 -1
  76. package/dist-vue/_chunks/{PkToolShowSources-DApWmwvk.js → PkToolShowSources-BugMybUx.js} +2 -2
  77. package/dist-vue/_chunks/{PkToolShowSources-DApWmwvk.js.map → PkToolShowSources-BugMybUx.js.map} +1 -1
  78. package/dist-vue/_chunks/{PkToolShowVideo-CjrYh9-q.js → PkToolShowVideo-BW7aRKs_.js} +2 -2
  79. package/dist-vue/_chunks/{PkToolShowVideo-CjrYh9-q.js.map → PkToolShowVideo-BW7aRKs_.js.map} +1 -1
  80. package/dist-vue/_chunks/{PkToolShowWebPages-DSIAizw-.js → PkToolShowWebPages-DxKimT-2.js} +2 -2
  81. package/dist-vue/_chunks/{PkToolShowWebPages-DSIAizw-.js.map → PkToolShowWebPages-DxKimT-2.js.map} +1 -1
  82. package/dist-vue/_chunks/{useLightbox-FDyQrPWe.js → useLightbox-Ctl9zaMX.js} +132 -91
  83. package/dist-vue/_chunks/useLightbox-Ctl9zaMX.js.map +1 -0
  84. package/dist-vue/composables.js +36 -2
  85. package/dist-vue/composables.js.map +1 -1
  86. package/dist-vue/index.js +22 -22
  87. package/dist-vue/index.js.map +1 -1
  88. package/dist-vue/locales.js +34 -0
  89. package/dist-vue/packages/components/src/chat/PkChatbotInput.d.ts +5 -0
  90. package/dist-vue/packages/components/src/chat/PkImageEditor.d.ts +11 -9
  91. package/dist-vue/packages/components/src/chat/PkImageEditorDialog.d.ts +12 -5
  92. package/dist-vue/packages/components/src/chat/imageEdits.d.ts +77 -1
  93. package/dist-vue/packages/components/src/composables/useLightbox.d.ts +26 -0
  94. package/dist-vue/style.css +1 -1
  95. package/package.json +1 -1
  96. package/dist/_chunks/PkImageEditorDialog-BMCnqiqI.js +0 -555
  97. package/dist/_chunks/PkImageEditorDialog-BMCnqiqI.js.map +0 -1
  98. package/dist/_chunks/useLightbox-D2Zi-Fpe.js.map +0 -1
  99. package/dist-vue/_chunks/PkChatbotInput-OBoyFkZ-.js.map +0 -1
  100. package/dist-vue/_chunks/PkChatbotViewChat-C28g7dz-.js.map +0 -1
  101. package/dist-vue/_chunks/PkImageEditorDialog-3L4URgPw.js +0 -550
  102. package/dist-vue/_chunks/PkImageEditorDialog-3L4URgPw.js.map +0 -1
  103. package/dist-vue/_chunks/useLightbox-FDyQrPWe.js.map +0 -1
@@ -1,33 +1,34 @@
1
- import { t as e } from "./PkChatbotMessages-bPBOSAv7.js";
1
+ import { t as e } from "./PkChatbotMessages-DEMKZDCb.js";
2
2
  import { o as t } from "./Media-DylqhvaF.js";
3
- import { a as n, n as r, t as i } from "./useChatbotStore-Kk3ioX3v.js";
4
- import { n as a } from "./src-nb8MU1sh.js";
5
- import { s as o, t as s } from "./message-DuibQyHy.js";
6
- import { R as c, f as l, l as u, n as d, r as f, y as p } from "./utils-DXOZ6zjh.js";
7
- import { t as m } from "./useLocalizedString-Dmn92nix.js";
8
- import { t as h } from "./PkAvatar-DwtZWSW4.js";
9
- import { n as g, t as _ } from "./PkChatbotInput-OBoyFkZ-.js";
10
- import { t as v } from "./PkChatbotQueuedMessages-CIJFAvE2.js";
11
- import { t as ee } from "./PkChatbotEmptyState-DMPEj1Qa.js";
12
- import { t as te } from "./PkChatbotWakeupBar-DEP-d-Fp.js";
13
- import { VvIcon as ne } from "@volverjs/ui-vue/components";
14
- import { Fragment as y, Teleport as b, Transition as x, computed as S, createBlock as C, createCommentVNode as w, createElementBlock as T, createElementVNode as E, createSlots as re, createTextVNode as ie, createVNode as D, defineAsyncComponent as O, defineComponent as ae, inject as oe, isRef as se, nextTick as ce, normalizeClass as k, normalizeStyle as le, onBeforeUnmount as ue, onMounted as de, onScopeDispose as fe, onUnmounted as pe, openBlock as A, provide as me, ref as j, renderList as he, shallowRef as ge, toDisplayString as M, toValue as N, unref as P, useTemplateRef as F, watch as I, withCtx as L } from "vue";
15
- import { useI18n as _e } from "vue-i18n";
16
- import { useDropZone as ve, useResizeObserver as ye } from "@vueuse/core";
17
- import { storeToRefs as be } from "pinia";
3
+ import { t as n } from "./useLightbox-Ctl9zaMX.js";
4
+ import { a as r, n as i, t as a } from "./useChatbotStore-Kk3ioX3v.js";
5
+ import { n as o } from "./src-nb8MU1sh.js";
6
+ import { s, t as c } from "./message-DuibQyHy.js";
7
+ import { R as l, f as u, l as d, n as f, r as p, y as m } from "./utils-DXOZ6zjh.js";
8
+ import { t as h } from "./useLocalizedString-Dmn92nix.js";
9
+ import { t as g } from "./PkAvatar-DwtZWSW4.js";
10
+ import { n as _, t as v } from "./PkChatbotInput-BSzDRoDD.js";
11
+ import { t as ee } from "./PkChatbotQueuedMessages-CIJFAvE2.js";
12
+ import { t as te } from "./PkChatbotEmptyState-NHarCaDm.js";
13
+ import { t as ne } from "./PkChatbotWakeupBar-DEP-d-Fp.js";
14
+ import { VvIcon as y } from "@volverjs/ui-vue/components";
15
+ import { Fragment as b, Teleport as re, Transition as x, computed as S, createBlock as C, createCommentVNode as w, createElementBlock as T, createElementVNode as E, createSlots as ie, createTextVNode as ae, createVNode as D, defineAsyncComponent as O, defineComponent as oe, inject as se, isRef as ce, nextTick as le, normalizeClass as k, normalizeStyle as ue, onBeforeUnmount as de, onMounted as fe, onScopeDispose as pe, onUnmounted as me, openBlock as A, provide as he, ref as j, renderList as ge, shallowRef as _e, toDisplayString as M, toValue as N, unref as P, useTemplateRef as ve, watch as F, withCtx as I } from "vue";
16
+ import { useI18n as ye } from "vue-i18n";
17
+ import { useDropZone as be, useResizeObserver as xe } from "@vueuse/core";
18
+ import { storeToRefs as Se } from "pinia";
18
19
  // ../../packages/composable/src/chatbot/useGreeting.ts
19
- function xe(e, t) {
20
- let { locale: n, t: r, te: i } = _e({ useScope: "global" });
21
- return S(() => Se(N(e)?.greeting?.[0]?.[n.value] ?? "", N(t)) || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""));
20
+ function Ce(e, t) {
21
+ let { locale: n, t: r, te: i } = ye({ useScope: "global" });
22
+ return S(() => we(N(e)?.greeting?.[0]?.[n.value] ?? "", N(t)) || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""));
22
23
  }
23
- function Se(e, t) {
24
+ function we(e, t) {
24
25
  return (t ? e.replace(/\{name\}/g, t) : e.replace(/[,\s]*\{name\}[!?]?/g, "")).trim();
25
26
  }
26
27
  // ../../packages/components/src/chat/PkAuroraCanvas.vue?vue&type=script&setup=true&lang.ts
27
- var R = {
28
+ var L = {
28
29
  key: 1,
29
30
  class: "pk-aurora__fallback"
30
- }, z = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", Ce = "\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. Its height follows the pill's, but each half\n // ends inside the canvas: at most the room to that edge over 1.75, so\n // at the widest breath (1.24) the glow there is about 1% of its peak,\n // under one 8-bit step, and the edge fade below finds nothing to cut.\n // Uncapped, a taller pill (a second line, an attachment) or a short\n // canvas left a quarter of the glow or more at the edge, cut straight.\n vec2 radii = vec2(u_half.x * 0.95, u_half.y * 6.5) * u_spread;\n float room = rel.y > 0.0 ? u_resolution.y - u_center.y : u_center.y;\n radii.y = min(radii.y, room / 1.75);\n radii *= breath * 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}", we = /* @__PURE__ */ ae({
31
+ }, R = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", Te = "\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. Its height follows the pill's, but each half\n // ends inside the canvas: at most the room to that edge over 1.75, so\n // at the widest breath (1.24) the glow there is about 1% of its peak,\n // under one 8-bit step, and the edge fade below finds nothing to cut.\n // Uncapped, a taller pill (a second line, an attachment) or a short\n // canvas left a quarter of the glow or more at the edge, cut straight.\n vec2 radii = vec2(u_half.x * 0.95, u_half.y * 6.5) * u_spread;\n float room = rel.y > 0.0 ? u_resolution.y - u_center.y : u_center.y;\n radii.y = min(radii.y, room / 1.75);\n radii *= breath * 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}", Ee = /* @__PURE__ */ oe({
31
32
  __name: "PkAuroraCanvas",
32
33
  props: {
33
34
  sourceSelector: {},
@@ -36,21 +37,21 @@ var R = {
36
37
  secondColor: {}
37
38
  },
38
39
  setup(e) {
39
- let t = e, n = F("rootEl"), r = F("canvasEl"), i = j(!1), a = j(null), o = S(() => a.value ? {
40
+ let t = e, n = ve("rootEl"), r = ve("canvasEl"), i = j(!1), a = j(null), o = S(() => a.value ? {
40
41
  "--pk-aurora-tint": `rgb(${a.value.first.join(" ")})`,
41
42
  "--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, ee = performance.now(), te = (e, t) => {
43
+ } : void 0), s = null, c = 0, u = null, d = null, f = null, p = null, m = null, h = null, g = null, _ = null, v = null, ee = performance.now(), te = (e, t) => {
43
44
  if (!s) return null;
44
45
  let n = s.createShader(e);
45
46
  return !n || (s.shaderSource(n, t), s.compileShader(n), !s.getShaderParameter(n, s.COMPILE_STATUS)) ? null : n;
46
47
  }, ne = (e) => e.map((e) => e / 255), y = () => {
47
- n.value && (a.value = c(n.value, {
48
+ n.value && (a.value = l(n.value, {
48
49
  mainColor: t.mainColor,
49
50
  tones: t.tones,
50
51
  secondColor: t.secondColor
51
- }), s && !i.value && a.value && (s.uniform3f(g, ...ne(a.value.first)), s.uniform3f(_, ...ne(a.value.second)), s.uniform1f(v, +!!a.value.duo), C(x() ? 10 : void 0)));
52
+ }), s && !i.value && a.value && (s.uniform3f(g, ...ne(a.value.first)), s.uniform3f(_, ...ne(a.value.second)), s.uniform1f(v, +!!a.value.duo), x(re() ? 10 : void 0)));
52
53
  };
53
- I([
54
+ F([
54
55
  () => t.mainColor,
55
56
  () => t.tones,
56
57
  () => t.secondColor
@@ -66,19 +67,19 @@ var R = {
66
67
  let u = Number.parseFloat(getComputedStyle(r.value).getPropertyValue("--aurora-spread"));
67
68
  s.uniform1f(h, Number.isNaN(u) ? 1 : u);
68
69
  }
69
- C(x() ? 10 : void 0);
70
- }, x = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches, C = (e) => {
70
+ x(re() ? 10 : void 0);
71
+ }, re = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches, x = (e) => {
71
72
  s && r.value && (s.uniform1f(d, e ?? (performance.now() - ee) / 1e3), s.uniform2f(f, r.value.width, r.value.height), s.drawArrays(s.TRIANGLE_STRIP, 0, 4));
72
- }, w = () => {
73
- C(), l = requestAnimationFrame(w);
73
+ }, C = () => {
74
+ x(), c = requestAnimationFrame(C);
74
75
  };
75
- return de(() => {
76
+ return fe(() => {
76
77
  let e = r.value;
77
78
  if (y(), s = e?.getContext("webgl", { alpha: !0 }) ?? null, !e || !s || !a.value) {
78
79
  i.value = !0;
79
80
  return;
80
81
  }
81
- let t = te(s.VERTEX_SHADER, z), n = te(s.FRAGMENT_SHADER, Ce), o = s.createProgram();
82
+ let t = te(s.VERTEX_SHADER, R), n = te(s.FRAGMENT_SHADER, Te), o = s.createProgram();
82
83
  if (!t || !n || !o || (s.attachShader(o, t), s.attachShader(o, n), s.linkProgram(o), !s.getProgramParameter(o, s.LINK_STATUS))) {
83
84
  i.value = !0;
84
85
  return;
@@ -96,10 +97,10 @@ var R = {
96
97
  1
97
98
  ]), s.STATIC_DRAW);
98
99
  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"), y(), u = new ResizeObserver(b), u.observe(e), b(), ce(b), x() ? C(10) : w();
100
- }), ue(() => {
101
- cancelAnimationFrame(l), u?.disconnect();
102
- }), pe(() => {
100
+ 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"), y(), u = new ResizeObserver(b), u.observe(e), b(), le(b), re() ? x(10) : C();
101
+ }), de(() => {
102
+ cancelAnimationFrame(c), u?.disconnect();
103
+ }), me(() => {
103
104
  let e = s;
104
105
  s = null, setTimeout(() => {
105
106
  e?.getExtension("WEBGL_lose_context")?.loseContext();
@@ -109,15 +110,15 @@ var R = {
109
110
  ref: n,
110
111
  class: "pk-aurora",
111
112
  "aria-hidden": "true",
112
- style: le(o.value)
113
- }, [i.value ? (A(), T("div", R)) : (A(), T("canvas", {
113
+ style: ue(o.value)
114
+ }, [i.value ? (A(), T("div", L)) : (A(), T("canvas", {
114
115
  key: 0,
115
116
  ref_key: "canvasEl",
116
117
  ref: r,
117
118
  class: "pk-aurora__canvas"
118
119
  }, null, 512))], 4));
119
120
  }
120
- }), B = .18, Te = .35, Ee = /* @__PURE__ */ ae({
121
+ }), z = .18, De = .35, Oe = /* @__PURE__ */ oe({
121
122
  __name: "PkVoiceOrb",
122
123
  props: {
123
124
  sample: {},
@@ -129,20 +130,20 @@ var R = {
129
130
  bars: { default: 5 }
130
131
  },
131
132
  setup(e) {
132
- let t = e, n = F("barsEl"), r = Array.from({ length: t.bars }, () => B), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
133
+ let t = e, n = ve("barsEl"), r = Array.from({ length: t.bars }, () => z), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
133
134
  let e = Math.min(1, Math.max(0, t.sample())), n = t.spectrum?.(), i = r.length;
134
135
  if (!n?.length) {
135
136
  let t = Date.now() / 260;
136
137
  return Array.from({ length: i }, (n, r) => {
137
138
  let i = .65 + .35 * Math.sin(t + r * .9);
138
- return B + e * 2.4 * i;
139
+ return z + e * 2.4 * i;
139
140
  });
140
141
  }
141
142
  let a = Math.max(1, Math.floor(n.length / 2)), o = Math.max(1, Math.floor(a / i));
142
143
  return Array.from({ length: i }, (e, t) => {
143
144
  let r = 0;
144
145
  for (let e = 0; e < o; e += 1) r += n[t * o + e] ?? 0;
145
- return B + r / o / 255 * 2.2;
146
+ return z + r / o / 255 * 2.2;
146
147
  });
147
148
  }, s = () => {
148
149
  let e = n.value?.children;
@@ -151,36 +152,36 @@ var R = {
151
152
  });
152
153
  }, c = () => {
153
154
  let e = o();
154
- r = r.map((t, n) => t + (Math.min(1, Math.max(B, e[n] ?? B)) - t) * Te), s(), i = requestAnimationFrame(c);
155
+ r = r.map((t, n) => t + (Math.min(1, Math.max(z, e[n] ?? z)) - t) * De), s(), i = requestAnimationFrame(c);
155
156
  }, l = () => {
156
157
  i !== void 0 && (cancelAnimationFrame(i), i = void 0);
157
158
  };
158
- return I(() => t.state, async (e) => {
159
- e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => B * 1.6), await ce(), s()) : i === void 0 && (i = requestAnimationFrame(c));
160
- }, { immediate: !0 }), ue(l), (t, r) => (A(), T("div", {
159
+ return F(() => t.state, async (e) => {
160
+ e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => z * 1.6), await le(), s()) : i === void 0 && (i = requestAnimationFrame(c));
161
+ }, { immediate: !0 }), de(l), (t, r) => (A(), T("div", {
161
162
  class: k(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
162
163
  "aria-hidden": "true"
163
164
  }, [E("div", {
164
165
  ref_key: "barsEl",
165
166
  ref: n,
166
167
  class: "pk-voice-orb__bars"
167
- }, [(A(!0), T(y, null, he(e.bars, (e) => (A(), T("span", {
168
+ }, [(A(!0), T(b, null, ge(e.bars, (e) => (A(), T("span", {
168
169
  key: e,
169
170
  class: "pk-voice-orb__bar"
170
171
  }))), 128))], 512)], 2));
171
172
  }
172
- }), De = {
173
+ }), ke = {
173
174
  key: 0,
174
175
  class: "pk-voice-session__badge",
175
176
  "aria-hidden": "true"
176
- }, V = {
177
+ }, B = {
177
178
  class: "pk-voice-session__status",
178
179
  role: "status"
179
- }, H = {
180
+ }, V = {
180
181
  key: 0,
181
182
  class: "pk-voice-session__live-dot",
182
183
  "aria-hidden": "true"
183
- }, Oe = ["title"], ke = ["title"], Ae = { class: "pk-voice-session__actions" }, je = /* @__PURE__ */ ae({
184
+ }, Ae = ["title"], je = ["title"], Me = { class: "pk-voice-session__actions" }, Ne = /* @__PURE__ */ oe({
184
185
  __name: "PkVoiceSession",
185
186
  props: {
186
187
  state: {},
@@ -199,7 +200,7 @@ var R = {
199
200
  "dismiss"
200
201
  ],
201
202
  setup(e, { emit: t }) {
202
- let n = e, r = t, { t: i } = _e({ useScope: "global" }), a = S(() => 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 = S(() => {
203
+ let n = e, r = t, { t: i } = ye({ useScope: "global" }), a = S(() => 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 = S(() => {
203
204
  if (n.remainingSeconds === void 0) return;
204
205
  let e = Math.floor(n.remainingSeconds / 60), t = n.remainingSeconds % 60;
205
206
  return `${e}:${String(t).padStart(2, "0")}`;
@@ -207,9 +208,9 @@ var R = {
207
208
  if (c.value) return n.state === "speaking" ? "speaking" : n.muted ? void 0 : "listening";
208
209
  });
209
210
  return (t, n) => {
210
- let u = ne;
211
+ let u = y;
211
212
  return A(), T("div", { class: k(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
212
- e.error ? (A(), T("span", De, [D(u, { name: "ri:error-warning-line" })])) : (A(), C(Ee, {
213
+ e.error ? (A(), T("span", ke, [D(u, { name: "ri:error-warning-line" })])) : (A(), C(Oe, {
213
214
  key: 1,
214
215
  state: e.state,
215
216
  sample: e.sample,
@@ -219,34 +220,34 @@ var R = {
219
220
  "sample",
220
221
  "spectrum"
221
222
  ])),
222
- E("div", V, [E("span", { class: k(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (A(), T("span", H)) : w("", !0), ie(" " + M(a.value), 1)], 2), e.error ? (A(), T("p", {
223
+ E("div", B, [E("span", { class: k(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (A(), T("span", V)) : w("", !0), ae(" " + M(a.value), 1)], 2), e.error ? (A(), T("p", {
223
224
  key: 0,
224
225
  class: "pk-voice-session__detail",
225
226
  title: e.rawError ?? e.error
226
- }, M(e.error), 9, Oe)) : w("", !0)]),
227
+ }, M(e.error), 9, Ae)) : w("", !0)]),
227
228
  o.value ? (A(), T("span", {
228
229
  key: 2,
229
230
  class: k(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
230
231
  title: P(i)("hint.voiceRemaining"),
231
232
  "aria-hidden": "true"
232
- }, M(o.value), 11, ke)) : w("", !0),
233
- E("div", Ae, [e.error ? (A(), T(y, { key: 0 }, [D(g, {
233
+ }, M(o.value), 11, je)) : w("", !0),
234
+ E("div", Me, [e.error ? (A(), T(b, { key: 0 }, [D(_, {
234
235
  icon: "ri:refresh-line",
235
236
  label: P(i)("action.retry"),
236
237
  onClick: n[0] ||= (e) => r("retry")
237
- }, null, 8, ["label"]), e.live ? (A(), C(g, {
238
+ }, null, 8, ["label"]), e.live ? (A(), C(_, {
238
239
  key: 0,
239
240
  icon: "ri:stop-circle-line",
240
241
  modifiers: "danger",
241
242
  title: P(i)("action.hangUp"),
242
243
  "aria-label": P(i)("action.hangUp"),
243
244
  onClick: n[1] ||= (e) => r("hang-up")
244
- }, null, 8, ["title", "aria-label"])) : (A(), C(g, {
245
+ }, null, 8, ["title", "aria-label"])) : (A(), C(_, {
245
246
  key: 1,
246
247
  icon: "ri:close-line",
247
248
  label: P(i)("action.close"),
248
249
  onClick: n[2] ||= (e) => r("dismiss")
249
- }, null, 8, ["label"]))], 64)) : (A(), T(y, { key: 1 }, [D(g, {
250
+ }, null, 8, ["label"]))], 64)) : (A(), T(b, { key: 1 }, [D(_, {
250
251
  icon: e.muted ? "ri:mic-off-line" : "ri:mic-line",
251
252
  title: e.muted ? P(i)("action.unmute") : P(i)("action.mute"),
252
253
  "aria-label": e.muted ? P(i)("action.unmute") : P(i)("action.mute"),
@@ -257,7 +258,7 @@ var R = {
257
258
  "title",
258
259
  "aria-label",
259
260
  "aria-pressed"
260
- ]), D(g, {
261
+ ]), D(_, {
261
262
  icon: "ri:stop-circle-line",
262
263
  modifiers: "danger",
263
264
  title: P(i)("action.hangUp"),
@@ -267,8 +268,8 @@ var R = {
267
268
  ], 2);
268
269
  };
269
270
  }
270
- }), Me = (e) => {
271
- let t = ge(), n = j("disconnected"), r = j("listening"), i = j(), o = j([]), s = j(), c = j(), l, u, d = 0, f = !1, p = () => {
271
+ }), Pe = (e) => {
272
+ let t = _e(), n = j("disconnected"), r = j("listening"), i = j(), a = j([]), s = j(), c = j(), l, u, d = 0, f = !1, p = () => {
272
273
  u &&= (clearInterval(u), void 0), s.value = void 0;
273
274
  }, m = (e) => {
274
275
  let t = Date.now() + e * 1e3, n = () => {
@@ -286,18 +287,18 @@ var R = {
286
287
  t.value = void 0, await i?.endSession().catch(() => void 0), await h(e), n.value = "disconnected", r.value = "listening";
287
288
  }, _ = async () => {
288
289
  if (f || t.value || n.value === "connecting") return;
289
- i.value = void 0, o.value = [], r.value = "listening", c.value = void 0, n.value = "connecting", d += 1;
290
- let a = d, s = () => a === d && !f, u;
290
+ i.value = void 0, a.value = [], r.value = "listening", c.value = void 0, n.value = "connecting", d += 1;
291
+ let o = d, s = () => o === d && !f, u;
291
292
  try {
292
- let a = import("./web-BIOlKgFq.js");
293
- a.catch(() => void 0);
293
+ let o = import("./web-BIOlKgFq.js");
294
+ o.catch(() => void 0);
294
295
  let d = await e.fetchGrant();
295
296
  if (!s()) {
296
297
  await e.closeGrant?.(d.sessionId).catch(() => void 0);
297
298
  return;
298
299
  }
299
300
  l = d.sessionId, u = d.sessionId, c.value = d.chatId;
300
- let { VoiceConversation: f } = await a;
301
+ let { VoiceConversation: f } = await o;
301
302
  if (!s()) {
302
303
  await h(d.sessionId);
303
304
  return;
@@ -320,7 +321,7 @@ var R = {
320
321
  role: n,
321
322
  text: t
322
323
  };
323
- o.value = [...o.value, r], e.onTranscript?.(r);
324
+ a.value = [...a.value, r], e.onTranscript?.(r);
324
325
  },
325
326
  onError: (e) => {
326
327
  s() && (i.value = e);
@@ -348,7 +349,7 @@ var R = {
348
349
  try {
349
350
  return n.sendUserMessage(e), !0;
350
351
  } catch (e) {
351
- return a.warn("The spoken answer could not be sent", e), !1;
352
+ return o.warn("The spoken answer could not be sent", e), !1;
352
353
  }
353
354
  }, ne = (e) => {
354
355
  let n = t.value;
@@ -371,13 +372,13 @@ var R = {
371
372
  let r = t.value;
372
373
  t.value = void 0, r?.endSession().catch(() => void 0), n.value = "disconnected";
373
374
  };
374
- return typeof window < "u" && window.addEventListener("pagehide", b), fe(() => {
375
+ return typeof window < "u" && window.addEventListener("pagehide", b), pe(() => {
375
376
  f = !0, typeof window < "u" && window.removeEventListener("pagehide", b), g();
376
377
  }), {
377
378
  status: n,
378
379
  mode: r,
379
380
  error: i,
380
- transcript: o,
381
+ transcript: a,
381
382
  remainingSeconds: s,
382
383
  chatId: c,
383
384
  isActive: S(() => n.value === "connected" || n.value === "connecting"),
@@ -392,20 +393,20 @@ var R = {
392
393
  readLevel: ne,
393
394
  readSpectrum: y
394
395
  };
395
- }, Ne = Symbol("ChatFilePreviewDock");
396
- function Pe(e) {
397
- me(Ne, e);
396
+ }, Fe = Symbol("ChatFilePreviewDock");
397
+ function Ie(e) {
398
+ he(Fe, e);
398
399
  }
399
- function Fe() {
400
- return oe(Ne, void 0);
400
+ function Le() {
401
+ return se(Fe, void 0);
401
402
  }
402
403
  // ../../packages/components/src/chat/useWakeupWatch.ts
403
- var Ie = 4e3, Le = [
404
+ var Re = 4e3, ze = [
404
405
  3e3,
405
406
  5e3,
406
407
  1e4
407
- ], Re = 12e4, U = 3e4;
408
- function ze(e) {
408
+ ], Be = 12e4, H = 3e4;
409
+ function Ve(e) {
409
410
  let t = j(null), n = j(!1), r, i = !1, a = () => {
410
411
  clearTimeout(r), r = void 0;
411
412
  }, o = (e, t) => {
@@ -423,12 +424,12 @@ function ze(e) {
423
424
  }
424
425
  let r = t.value;
425
426
  if (r) {
426
- let e = Date.parse(r.dueAt) - Date.now() + Ie;
427
- o(Math.max(Ie, e), () => l(r.wakeId, Date.now(), 0));
427
+ let e = Date.parse(r.dueAt) - Date.now() + Re;
428
+ o(Math.max(Re, e), () => l(r.wakeId, Date.now(), 0));
428
429
  }
429
430
  }
430
431
  async function l(t, n, r) {
431
- await e.refreshMessages(), !i && (s(t) || Date.now() - n >= Re ? await c() : o(Le[Math.min(r, Le.length - 1)], () => l(t, n, r + 1)));
432
+ await e.refreshMessages(), !i && (s(t) || Date.now() - n >= Be ? await c() : o(ze[Math.min(r, ze.length - 1)], () => l(t, n, r + 1)));
432
433
  }
433
434
  async function u() {
434
435
  n.value = !0;
@@ -453,11 +454,11 @@ function ze(e) {
453
454
  f = void 0;
454
455
  }
455
456
  let g = S(() => e.messages().some((e) => e.role === "user"));
456
- I([e.chatId, g], ([, t]) => {
457
+ F([e.chatId, g], ([, t]) => {
457
458
  d();
458
459
  let n = e.status(), r = n === "submitted" || n === "streaming" || f === e.chatId();
459
460
  t && !r && c();
460
- }, { immediate: !0 }), I(e.status, (e, t) => {
461
+ }, { immediate: !0 }), F(e.status, (e, t) => {
461
462
  e === "ready" && t !== "ready" && g.value && c();
462
463
  });
463
464
  let _;
@@ -465,9 +466,9 @@ function ze(e) {
465
466
  t.value && document.visibilityState === "visible" && e.apiClient().markChatWakeupPresence(e.agentId(), e.chatId()).catch(() => void 0);
466
467
  }
467
468
  let ee = () => v();
468
- return document.addEventListener("visibilitychange", ee), I(() => t.value?.wakeId, (e) => {
469
- clearInterval(_), _ = void 0, e && !i && (v(), _ = setInterval(v, U));
470
- }), ue(() => {
469
+ return document.addEventListener("visibilitychange", ee), F(() => t.value?.wakeId, (e) => {
470
+ clearInterval(_), _ = void 0, e && !i && (v(), _ = setInterval(v, H));
471
+ }), de(() => {
471
472
  i = !0, a(), clearInterval(_), document.removeEventListener("visibilitychange", ee);
472
473
  }), {
473
474
  pendingWakeup: t,
@@ -481,7 +482,7 @@ function ze(e) {
481
482
  };
482
483
  }
483
484
  // ../../packages/components/src/chat/previewChanges.ts
484
- var Be = 1e6, W = (e, t) => {
485
+ var He = 1e6, U = (e, t) => {
485
486
  let n = 0;
486
487
  for (; n < e.length && n < t.length && e[n] === t[n];) n += 1;
487
488
  let r = 0;
@@ -493,29 +494,29 @@ var Be = 1e6, W = (e, t) => {
493
494
  }
494
495
  };
495
496
  if (!a) return o;
496
- if (!i || i * a > Be) return s(n, n + i, n, n + a), o;
497
+ if (!i || i * a > He) return s(n, n + i, n, n + a), o;
497
498
  let c = new Uint32Array((i + 1) * (a + 1));
498
499
  for (let r = i - 1; r >= 0; r--) for (let i = a - 1; i >= 0; i--) c[r * (a + 1) + i] = e[n + r] === t[n + i] ? c[(r + 1) * (a + 1) + i + 1] + 1 : Math.max(c[(r + 1) * (a + 1) + i], c[r * (a + 1) + i + 1]);
499
500
  let l = 0, u = 0, d = 0, f = 0;
500
501
  for (; l < i && u < a;) e[n + l] === t[n + u] ? (s(n + d, n + l, n + f, n + u), l += 1, u += 1, d = l, f = u) : c[(l + 1) * (a + 1) + u] >= c[l * (a + 1) + u + 1] ? l += 1 : u += 1;
501
502
  return s(n + d, n + i, n + f, n + a), o;
502
- }, Ve = (e, t) => e === "id" || e === "ids" ? void 0 : t, G = (e) => JSON.stringify(e, Ve), He = (e, t) => {
503
+ }, Ue = (e, t) => e === "id" || e === "ids" ? void 0 : t, W = (e) => JSON.stringify(e, Ue), We = (e, t) => {
503
504
  let n = (e) => e.flatMap((e) => e.ids ?? []);
504
- return t?.kind === "table" ? [...W(t.rows.map(G), e.rows.map(G))].flatMap(([r, i]) => {
505
+ return t?.kind === "table" ? [...U(t.rows.map(W), e.rows.map(W))].flatMap(([r, i]) => {
505
506
  let a = i === void 0 ? void 0 : t.rows[i];
506
- return n(e.rows[r].filter((e, t) => !a?.[t] || G(a[t]) !== G(e)));
507
+ return n(e.rows[r].filter((e, t) => !a?.[t] || W(a[t]) !== W(e)));
507
508
  }) : n(e.rows.flat());
508
- }, Ue = (e, t) => {
509
- let n = /* @__PURE__ */ new Set(), r = W(e.blocks.map(G), t.blocks.map(G));
509
+ }, Ge = (e, t) => {
510
+ let n = /* @__PURE__ */ new Set(), r = U(e.blocks.map(W), t.blocks.map(W));
510
511
  for (let [i, a] of r) {
511
512
  let r = t.blocks[i];
512
513
  if (r.kind === "table") {
513
514
  let t = a === void 0 ? void 0 : e.blocks[a];
514
- for (let e of He(r, t)) n.add(e);
515
+ for (let e of We(r, t)) n.add(e);
515
516
  } else r.id && n.add(r.id);
516
517
  }
517
518
  return n;
518
- }, K = (e, t) => {
519
+ }, G = (e, t) => {
519
520
  let n = /* @__PURE__ */ new Map();
520
521
  for (let r of t.rows) for (let t of r.cells) n.set(`${r.row}:${t.col}`, JSON.stringify({
521
522
  ...t,
@@ -523,43 +524,43 @@ var Be = 1e6, W = (e, t) => {
523
524
  numFmt: t.numFmt === void 0 ? void 0 : e.numberFormats?.[t.numFmt]
524
525
  }));
525
526
  return n;
526
- }, We = (e, t) => {
527
+ }, Ke = (e, t) => {
527
528
  let n = /* @__PURE__ */ new Map();
528
529
  for (let r of t.sheets) {
529
- let i = e.sheets.find((e) => e.name === r.name), a = K(t, r), o = i ? K(e, i) : /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set();
530
+ let i = e.sheets.find((e) => e.name === r.name), a = G(t, r), o = i ? G(e, i) : /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set();
530
531
  for (let [e, t] of a) o.get(e) !== t && s.add(e);
531
532
  for (let e of o.keys()) a.has(e) || s.add(e);
532
533
  s.size && n.set(r.name, s);
533
534
  }
534
535
  return n;
535
- }, Ge = (e, t) => {
536
+ }, qe = (e, t) => {
536
537
  if (e.kind === "word" && t.kind === "word") {
537
- let n = Ue(e, t);
538
+ let n = Ge(e, t);
538
539
  return n.size ? {
539
540
  kind: "word",
540
541
  paragraphs: n
541
542
  } : void 0;
542
543
  }
543
544
  if (e.kind === "spreadsheet" && t.kind === "spreadsheet") {
544
- let n = We(e, t);
545
+ let n = Ke(e, t);
545
546
  return n.size ? {
546
547
  kind: "spreadsheet",
547
548
  cells: n
548
549
  } : void 0;
549
550
  }
550
- }, Ke = (e, t) => {
551
+ }, Je = (e, t) => {
551
552
  let n = e?.querySelector(t);
552
553
  if (!e || !n) return !1;
553
554
  let r = e.getBoundingClientRect(), i = n.getBoundingClientRect();
554
555
  return (i.top < r.top || i.bottom > r.bottom) && (e.scrollTop += i.top - r.top - (r.height - i.height) / 2), (i.left < r.left || i.right > r.right) && (e.scrollLeft += i.left - r.left - (r.width - i.width) / 2), !0;
555
- }, qe = 4e3;
556
- function Je(e) {
557
- let t = j(), n = j(), r = j(!1), i = j(!1), a = ge(), o = /* @__PURE__ */ new Map(), s, c = 0, l = 0, u = () => {
556
+ }, Ye = 4e3;
557
+ function Xe(e) {
558
+ let t = j(), n = j(), r = j(!1), i = j(!1), a = _e(), o = /* @__PURE__ */ new Map(), s, c = 0, l = 0, u = () => {
558
559
  clearTimeout(s), a.value = void 0;
559
560
  }, d = (e, t) => {
560
561
  u();
561
- let r = e && t ? Ge(t, e) : void 0;
562
- r && (a.value = r, s = setTimeout(u, qe)), n.value = e;
562
+ let r = e && t ? qe(t, e) : void 0;
563
+ r && (a.value = r, s = setTimeout(u, Ye)), n.value = e;
563
564
  }, f = async (n, a) => {
564
565
  let s = ++c, u = l, f = a ? o.get(a) : void 0;
565
566
  t.value = n, i.value = !1;
@@ -592,16 +593,16 @@ function Je(e) {
592
593
  };
593
594
  }
594
595
  // ../../packages/components/src/chat/PkChatbotViewChat.vue?vue&type=script&setup=true&lang.ts
595
- var Ye = { class: "pk-chatbot-view-chat__input-stage" }, Xe = {
596
+ var Ze = { class: "pk-chatbot-view-chat__input-stage" }, Qe = {
596
597
  key: 1,
597
598
  class: "p-md border-t border-surface-3 text-center text-12 text-danger bg-surface-danger"
598
- }, Ze = { class: "pk-chatbot-view-chat__agent-chip" }, Qe = {
599
+ }, $e = { class: "pk-chatbot-view-chat__agent-chip" }, et = {
599
600
  key: 0,
600
601
  class: "pk-chatbot-view-chat__agent-chip-name"
601
- }, $e = {
602
+ }, tt = {
602
603
  key: 0,
603
604
  class: "pk-chatbot-view-chat__drop-overlay"
604
- }, et = 1e3, tt = 3e3, nt = 6e4, rt = 3e5, it = 6e5, at = /* @__PURE__ */ ae({
605
+ }, nt = 1e3, rt = 3e3, it = 6e4, at = 3e5, ot = 6e5, st = /* @__PURE__ */ oe({
605
606
  __name: "PkChatbotViewChat",
606
607
  props: {
607
608
  agentId: {},
@@ -613,151 +614,159 @@ var Ye = { class: "pk-chatbot-view-chat__input-stage" }, Xe = {
613
614
  "revise",
614
615
  "selection-action"
615
616
  ],
616
- setup(a, { emit: c }) {
617
- let g = O(() => import("./PkToolShowForm-CksTiimD.js").then((e) => e.n)), y = O(() => import("./PkToolShowContactForm-BmiNlFfx.js").then((e) => e.n)), ie = O(() => import("./PkToolShowSuggestedReply-CXGpPEl-.js").then((e) => e.n)), ae = O(() => import("./PkToolShowSources-DApWmwvk.js").then((e) => e.n)), oe = O(() => import("./PkToolRequestGeolocation-Bx2Vtb-5.js").then((e) => e.n)), ce = O(() => import("./PkToolRequestOAuthConnection-Dp_dx8cQ.js")), le = O(() => import("./PkToolShowLocation-B8FE_Sqd.js").then((e) => e.n)), de = O(() => import("./PkToolShowDiagram-D6mYTDU-.js")), fe = O(() => import("./PkToolChatFile-PXpiJLZ6.js").then((e) => e.n)), pe = O(() => import("./PkToolShareDocument-cMUqik6v.js").then((e) => e.n)), he = O(() => import("./PkFilePreview-BgyJngDt.js").then((e) => e.n)), ge = O(() => import("./PkFilePreviewDialog-B3-oF1_R.js").then((e) => e.n)), N = a, Se = c, R = r(N.agentId), { agentInterface: z, agentFileUpload: Ce, agentType: B, agentVoice: Te, actions: Ee, revisedAnswers: De, messages: V, chat: H, messageFeedbacks: Oe, feedbackDialogMessage: ke, isFeedbackSubmitting: Ae, isFeedbackSubmitted: Ne, feedbackSubmitError: Pe, isLeadSubmitted: Ie, isLoadingSubmitLead: Le, submitLeadError: Re, input: U, inputMessagePlaceholder: Be, isConversationBlocked: W, baseUrl: Ve, pendingAttachments: G, isAttachmentLimitReached: He, fileLimitError: Ue, apiClient: K, isDark: We, hostToolsPending: Ge, pageNoticeLevel: Ke, hostConfirmation: qe, agentPageAccess: at, hostStepTitles: ot, hostStepChanges: st, confirmationMode: ct, canQueue: lt, queuedMessages: ut, backgroundAnswers: dt, inputFocusRequest: ft, pagePointer: pt, pagePointerAvailable: mt, pagePointing: ht, agentSelectionActions: gt } = be(R);
618
- me(f, ot), me(d, st);
619
- let _t = F("inputEl");
620
- I(ft, () => {
621
- _t.value?.focus();
622
- }), I(pt, (e) => {
623
- e && _t.value?.focus();
617
+ setup(o, { emit: l }) {
618
+ let _ = O(() => import("./PkToolShowForm-CyyN7GQP.js").then((e) => e.n)), b = O(() => import("./PkToolShowContactForm-Bm0icz24.js").then((e) => e.n)), ae = O(() => import("./PkToolShowSuggestedReply-CXGpPEl-.js").then((e) => e.n)), oe = O(() => import("./PkToolShowSources-BugMybUx.js").then((e) => e.n)), se = O(() => import("./PkToolRequestGeolocation-Bx2Vtb-5.js").then((e) => e.n)), le = O(() => import("./PkToolRequestOAuthConnection-Dp_dx8cQ.js")), ue = O(() => import("./PkToolShowLocation-WdRqG8Wi.js").then((e) => e.n)), fe = O(() => import("./PkToolShowDiagram-CgukB1Ss.js")), pe = O(() => import("./PkToolChatFile-8nx166iM.js").then((e) => e.n)), me = O(() => import("./PkToolShareDocument-CspvFwRR.js").then((e) => e.n)), ge = O(() => import("./PkFilePreview-D2HInDoA.js").then((e) => e.n)), _e = O(() => import("./PkFilePreviewDialog-jxcUSzPx.js").then((e) => e.n)), N = o, we = l, L = i(N.agentId), { agentInterface: R, agentFileUpload: Te, agentType: z, agentVoice: De, actions: Oe, revisedAnswers: ke, messages: B, chat: V, messageFeedbacks: Ae, feedbackDialogMessage: je, isFeedbackSubmitting: Me, isFeedbackSubmitted: Fe, feedbackSubmitError: Ie, isLeadSubmitted: Re, isLoadingSubmitLead: ze, submitLeadError: Be, input: H, inputMessagePlaceholder: He, isConversationBlocked: U, baseUrl: Ue, pendingAttachments: W, isAttachmentLimitReached: We, fileLimitError: Ge, apiClient: G, isDark: Ke, hostToolsPending: qe, pageNoticeLevel: Je, hostConfirmation: Ye, agentPageAccess: st, hostStepTitles: ct, hostStepChanges: lt, confirmationMode: ut, canQueue: dt, queuedMessages: ft, backgroundAnswers: pt, inputFocusRequest: mt, pagePointer: ht, pagePointerAvailable: gt, pagePointing: _t, agentSelectionActions: vt } = Se(L);
619
+ he(p, ct), he(f, lt);
620
+ let yt = ve("inputEl");
621
+ F(mt, () => {
622
+ yt.value?.focus();
623
+ }), F(ht, (e) => {
624
+ e && yt.value?.focus();
625
+ });
626
+ let bt = S(() => ht.value ? {
627
+ kind: ht.value.kind,
628
+ label: ht.value.label
629
+ } : void 0), K = S(() => z.value === "reasoning" ? void 0 : Te.value), xt = S(() => {
630
+ let e = K.value?.allowedMimeTypes ?? [];
631
+ return !!K.value?.enabled && (!e.length || e.some((e) => e.startsWith("image/")));
632
+ });
633
+ n({
634
+ available: () => !!yt.value && xt.value && !We.value,
635
+ annotate: (e) => yt.value?.annotateImage(e)
624
636
  });
625
- let vt = S(() => pt.value ? {
626
- kind: pt.value.kind,
627
- label: pt.value.label
628
- } : void 0), yt = S(() => B.value === "reasoning" ? void 0 : Ce.value), q = (e) => K.value.getMediaDownloadUrl(N.agentId, R.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, replacePendingAttachment: Nt, retryPendingAttachment: Pt, clearFileLimitError: Ft, refreshMessages: It, appendMessage: Lt, closePageNotice: Rt, respondHostConfirmation: zt, editQueuedMessage: Bt, removeQueuedMessage: Vt, openBackgroundAnswer: Ht, dismissBackgroundAnswer: Ut } = R, { t: J } = _e({ useScope: "global" }), Wt = S(() => Ge.value > 0), Gt = S(() => Wt.value && H.value.status === "ready" ? "streaming" : H.value.status), Kt = m(() => at.value?.notice), qt = S(() => Ke.value ? Kt.value || J(`message.pageAccessNotice.${Ke.value}`) : void 0), Jt = S(() => {
629
- let e = Ue.value;
637
+ let q = (e) => G.value.getMediaDownloadUrl(N.agentId, L.localChatId, e), { handleSubmit: St, stopGeneration: Ct, regenerate: wt, onUpvote: Tt, onDownvote: Et, onFeedback: Dt, onFeedbackSubmit: Ot, onLeadSubmit: kt, startNewChat: At, addToolOutput: jt, addToolApprovalResponse: Mt, handleFileSelect: Nt, discardPendingAttachment: Pt, replacePendingAttachment: Ft, retryPendingAttachment: It, clearFileLimitError: Lt, refreshMessages: Rt, appendMessage: zt, closePageNotice: Bt, respondHostConfirmation: Vt, editQueuedMessage: Ht, removeQueuedMessage: Ut, openBackgroundAnswer: Wt, dismissBackgroundAnswer: Gt } = L, { t: J } = ye({ useScope: "global" }), Kt = S(() => qe.value > 0), qt = S(() => Kt.value && V.value.status === "ready" ? "streaming" : V.value.status), Jt = h(() => st.value?.notice), Yt = S(() => Je.value ? Jt.value || J(`message.pageAccessNotice.${Je.value}`) : void 0), Xt = S(() => {
638
+ let e = Ge.value;
630
639
  if (e) return e.reason === "per-chat" ? J("message.fileLimitPerChat", { max: e.max }) : J("message.fileLimitPerMessage", { max: e.max });
631
- }), Yt = S(() => dt.value.map(({ chatId: e, title: t }) => ({
640
+ }), Zt = S(() => pt.value.map(({ chatId: e, title: t }) => ({
632
641
  id: e,
633
642
  text: t ? J("message.backgroundAnswerReady", { title: t }) : J("message.backgroundAnswerReadyUntitled")
634
- }))), Xt = m(() => z.value?.dismissableNotice), Zt = S(() => V.value.some((e) => e.role === "user")), Qt = S(() => N.modifier === "fullscreen" && !Zt.value), $t = xe(z, () => N.userName), en = F("chatViewEl"), tn = Fe(), nn = S(() => !!tn?.value), rn = S(() => tn?.value ?? "body"), an = j(0), on = j(0);
635
- ye([en, S(() => tn?.value ?? void 0)], (e) => {
643
+ }))), Qt = h(() => R.value?.dismissableNotice), $t = S(() => B.value.some((e) => e.role === "user")), en = S(() => N.modifier === "fullscreen" && !$t.value), tn = Ce(R, () => N.userName), nn = ve("chatViewEl"), rn = Le(), an = S(() => !!rn?.value), on = S(() => rn?.value ?? "body"), sn = j(0), cn = j(0);
644
+ xe([nn, S(() => rn?.value ?? void 0)], (e) => {
636
645
  for (let t of e) {
637
646
  let e = t.borderBoxSize?.[0]?.inlineSize ?? t.contentRect.width;
638
- t.target === en.value ? an.value = e : on.value = e;
647
+ t.target === nn.value ? sn.value = e : cn.value = e;
639
648
  }
640
649
  }, { box: "border-box" });
641
- let sn = S(() => an.value + (nn.value ? on.value : 0) >= et), cn = S(() => an.value > 0 && an.value < 576), { target: Y, preview: ln, loading: un, error: dn, changes: fn, open: pn, close: mn, reset: hn } = Je((e) => K.value.getChatFilePreview(N.agentId, R.localChatId, e)), X = j({}), gn = (e, t) => {
650
+ let ln = S(() => sn.value + (an.value ? cn.value : 0) >= nt), un = S(() => sn.value > 0 && sn.value < 576), { target: Y, preview: dn, loading: fn, error: pn, changes: mn, open: hn, close: gn, reset: _n } = Xe((e) => G.value.getChatFilePreview(N.agentId, L.localChatId, e)), X = j({}), vn = (e, t) => {
642
651
  let n = (e) => e?.fileId ?? e?.storedFileName;
643
- return n(e) !== n(Y.value) && (X.value = {}), pn(e, t);
644
- }, _n = j(!1), vn = S(() => !!Y.value && sn.value && !_n.value), yn = () => {
645
- mn(), _n.value = !1;
646
- }, bn = /* @__PURE__ */ new Set([
652
+ return n(e) !== n(Y.value) && (X.value = {}), hn(e, t);
653
+ }, yn = j(!1), bn = S(() => !!Y.value && ln.value && !yn.value), xn = () => {
654
+ gn(), yn.value = !1;
655
+ }, Sn = /* @__PURE__ */ new Set([
647
656
  "tool-editSpreadsheet",
648
657
  "tool-editWordDocument",
649
658
  "tool-createSpreadsheet",
650
659
  "tool-createWordDocument"
651
- ]), xn = S(() => {
660
+ ]), Cn = S(() => {
652
661
  let e = /* @__PURE__ */ new Map();
653
- for (let t of V.value) for (let n of t.parts) {
662
+ for (let t of B.value) for (let n of t.parts) {
654
663
  let { type: t, state: r, output: i } = n;
655
- if (bn.has(t) && r === "output-available" && i?.fileId && i.version && i.storedFileName) {
664
+ if (Sn.has(t) && r === "output-available" && i?.fileId && i.version && i.storedFileName) {
656
665
  let t = e.get(i.fileId) ?? /* @__PURE__ */ new Map();
657
666
  t.set(i.version, i.storedFileName), e.set(i.fileId, t);
658
667
  }
659
668
  }
660
669
  for (let [t, n] of e) n.has(1) || n.set(1, t);
661
670
  return e;
662
- }), Sn = S(() => [...xn.value.get(Y.value?.fileId ?? "")?.keys() ?? []].sort((e, t) => e - t)), Cn = (e, t) => {
663
- let n = Y.value, r = xn.value.get(n?.fileId ?? "")?.get(e);
664
- n && r && gn({
671
+ }), wn = S(() => [...Cn.value.get(Y.value?.fileId ?? "")?.keys() ?? []].sort((e, t) => e - t)), Tn = (e, t) => {
672
+ let n = Y.value, r = Cn.value.get(n?.fileId ?? "")?.get(e);
673
+ n && r && vn({
665
674
  ...n,
666
675
  version: e,
667
676
  storedFileName: r
668
677
  }, t);
669
- }, wn = S(() => {
670
- let e = Y.value, t = Sn.value;
678
+ }, En = S(() => {
679
+ let e = Y.value, t = wn.value;
671
680
  return !!$.value && !!e?.fileId && !!e.version && t.length > 0 && e.version < t[t.length - 1];
672
- }), Tn = () => {
681
+ }), Dn = () => {
673
682
  let e = Y.value;
674
683
  e?.fileId && e.version && ($.value?.({
675
684
  fileId: e.fileId,
676
685
  version: e.version,
677
686
  filename: e.filename
678
- }), yn());
687
+ }), xn());
679
688
  };
680
- I(() => R.localChatId, hn), I(() => {
689
+ F(() => L.localChatId, _n), F(() => {
681
690
  let e = Y.value?.fileId;
682
691
  return e ? {
683
692
  fileId: e,
684
- newest: Math.max(0, ...Sn.value)
693
+ newest: Math.max(0, ...wn.value)
685
694
  } : void 0;
686
695
  }, (e, t) => {
687
- e && t && e.fileId === t.fileId && e.newest > t.newest && Y.value?.version === t.newest && Cn(e.newest, Y.value.storedFileName);
696
+ e && t && e.fileId === t.fileId && e.newest > t.newest && Y.value?.version === t.newest && Tn(e.newest, Y.value.storedFileName);
688
697
  });
689
- let En = S(() => {
690
- let e = H.value?.status;
691
- if (!(W.value || e === "submitted" || e === "streaming")) return Y.value?.kind === "word" ? gt.value?.word : gt.value?.excel;
692
- }), Dn = (e, t, n) => {
693
- R.sendSelection(e, { filePointer: t }) && Se("selection-action", {
698
+ let On = S(() => {
699
+ let e = V.value?.status;
700
+ if (!(U.value || e === "submitted" || e === "streaming")) return Y.value?.kind === "word" ? vt.value?.word : vt.value?.excel;
701
+ }), kn = (e, t, n) => {
702
+ L.sendSelection(e, { filePointer: t }) && we("selection-action", {
694
703
  surface: t.format === "docx" ? "word" : "excel",
695
704
  action: n.id,
696
705
  state: "chat",
697
706
  size: String(n.size)
698
707
  });
699
- }, On = async (e) => (await K.value.expandSourceContext(N.agentId, e.documentId, e.chunkIndex)).content, kn = async (e) => {
700
- let t = await K.value.downloadSourceDocument(N.agentId, e);
708
+ }, An = async (e) => (await G.value.expandSourceContext(N.agentId, e.documentId, e.chunkIndex)).content, jn = async (e) => {
709
+ let t = await G.value.downloadSourceDocument(N.agentId, e);
701
710
  window.open(t.downloadUrl, "_blank");
702
- }, { isOverDropZone: An } = ve(en, {
703
- dataTypes: (e) => t(e, yt.value?.allowedMimeTypes ?? []),
711
+ }, { isOverDropZone: Mn } = be(nn, {
712
+ dataTypes: (e) => t(e, K.value?.allowedMimeTypes ?? []),
704
713
  onDrop: (e) => {
705
- if (yt.value?.enabled && e) for (let t of e) jt(t);
714
+ if (K.value?.enabled && e) for (let t of e) Nt(t);
706
715
  }
707
- }), jn = j(!1), Mn = !1, Z = j(!1), Nn = [
716
+ }), Nn = j(!1), Pn = !1, Z = j(!1), Fn = [
708
717
  3e3,
709
718
  5e3,
710
719
  1e4
711
- ], Pn, Fn, In = !1, Ln = 0, Rn = !1;
712
- function zn() {
713
- clearTimeout(Pn), Pn = void 0, Fn = void 0, In = !1, Ln = 0, Z.value = !1;
720
+ ], In, Ln, Rn = !1, zn = 0, Bn = !1;
721
+ function Vn() {
722
+ clearTimeout(In), In = void 0, Ln = void 0, Rn = !1, zn = 0, Z.value = !1;
714
723
  }
715
- function Bn(e) {
716
- Mn || (clearTimeout(Pn), Pn = setTimeout(() => {
717
- Vn();
724
+ function Hn(e) {
725
+ Pn || (clearTimeout(In), In = setTimeout(() => {
726
+ Un();
718
727
  }, e));
719
728
  }
720
- async function Vn() {
721
- if (Mn || Rn) return;
722
- Rn = !0;
729
+ async function Un() {
730
+ if (Pn || Bn) return;
731
+ Bn = !0;
723
732
  let e;
724
733
  try {
725
- e = await It();
734
+ e = await Rt();
726
735
  } finally {
727
- Rn = !1;
736
+ Bn = !1;
728
737
  }
729
- if (Mn) return;
730
- if (e === "caught-up" && (Z.value = !1, _r()), Q.isActive.value) {
731
- Fn = void 0, In = !1, Ln = 0, Bn(tt);
738
+ if (Pn) return;
739
+ if (e === "caught-up" && (Z.value = !1, yr()), Q.isActive.value) {
740
+ Ln = void 0, Rn = !1, zn = 0, Hn(rt);
732
741
  return;
733
742
  }
734
- Fn === void 0 && (Fn = Date.now(), In = !!Q.error.value);
735
- let t = Date.now() - Fn;
736
- if (e === "caught-up" && t >= (In ? rt : nt) || t >= it) {
737
- zn(), vr();
743
+ Ln === void 0 && (Ln = Date.now(), Rn = !!Q.error.value);
744
+ let t = Date.now() - Ln;
745
+ if (e === "caught-up" && t >= (Rn ? at : it) || t >= ot) {
746
+ Vn(), br();
738
747
  return;
739
748
  }
740
- let n = Nn[Math.min(Ln, Nn.length - 1)];
741
- Ln += 1, Bn(n);
749
+ let n = Fn[Math.min(zn, Fn.length - 1)];
750
+ zn += 1, Hn(n);
742
751
  }
743
- let Hn = (e = 1200) => {
744
- Bn(e);
745
- }, Un, Q = Me({
752
+ let Wn = (e = 1200) => {
753
+ Hn(e);
754
+ }, Gn, Q = Pe({
746
755
  fetchGrant: async () => {
747
- Un = R.voicePageTools();
748
- let e = await K.value.createVoiceSession(N.agentId, R.localChatId, {
749
- deviceContext: R.buildDeviceContext(),
750
- externalContext: R.externalContext,
751
- pageTools: Un?.declaration,
752
- ...R.confirmationMode === "automatic" && { confirmations: "automatic" }
756
+ Gn = L.voicePageTools();
757
+ let e = await G.value.createVoiceSession(N.agentId, L.localChatId, {
758
+ deviceContext: L.buildDeviceContext(),
759
+ externalContext: L.externalContext,
760
+ pageTools: Gn?.declaration,
761
+ ...L.confirmationMode === "automatic" && { confirmations: "automatic" }
753
762
  });
754
- return e.chatId !== R.localChatId && (R.localChatId = e.chatId), e;
763
+ return e.chatId !== L.localChatId && (L.localChatId = e.chatId), e;
755
764
  },
756
- closeGrant: (e) => K.value.closeVoiceSession(N.agentId, e),
757
- clientTools: () => Un?.clientTools,
765
+ closeGrant: (e) => G.value.closeVoiceSession(N.agentId, e),
766
+ clientTools: () => Gn?.clientTools,
758
767
  onTranscript: (e) => {
759
- e.role === "user" ? (Z.value = !0, gr(), Lt({
760
- id: `${i}user-${n()}`,
768
+ e.role === "user" ? (Z.value = !0, vr(), zt({
769
+ id: `${a}user-${r()}`,
761
770
  role: "user",
762
771
  parts: [{
763
772
  type: "text",
@@ -766,116 +775,116 @@ var Ye = { class: "pk-chatbot-view-chat__input-stage" }, Xe = {
766
775
  })) : Z.value = !1;
767
776
  },
768
777
  onTurnEnd: () => {
769
- Hn();
778
+ Wn();
770
779
  }
771
780
  });
772
- I(() => Q.isActive.value, (e) => {
773
- e || R.cancelVoicePageCalls();
774
- }), I(() => Q.error.value, (e) => {
781
+ F(() => Q.isActive.value, (e) => {
782
+ e || L.cancelVoicePageCalls();
783
+ }), F(() => Q.error.value, (e) => {
775
784
  e && (Z.value = !1);
776
785
  });
777
- let Wn = S(() => Te.value?.enabled === !0), Gn = S(() => Q.error.value ? "error" : Q.isConnecting.value ? "connecting" : Q.isSpeaking.value ? "speaking" : Q.isActive.value ? "listening" : "idle"), Kn = S(() => {
786
+ let Kn = S(() => De.value?.enabled === !0), qn = S(() => Q.error.value ? "error" : Q.isConnecting.value ? "connecting" : Q.isSpeaking.value ? "speaking" : Q.isActive.value ? "listening" : "idle"), Jn = S(() => {
778
787
  let e = Q.error.value;
779
788
  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");
780
- }), qn = S(() => Q.isSpeaking.value ? "output" : "input"), Jn = () => Q.readLevel(qn.value), Yn = () => Q.readSpectrum(qn.value), Xn = async () => {
781
- jn.value = !1, await Q.start(), Q.isActive.value && (zn(), Bn(tt));
782
- }, Zn = async () => {
783
- Z.value = !1, await Q.stop(), !Mn && Hn(0);
784
- }, Qn = () => {
785
- Q.dismissError();
789
+ }), Yn = S(() => Q.isSpeaking.value ? "output" : "input"), Xn = () => Q.readLevel(Yn.value), Zn = () => Q.readSpectrum(Yn.value), Qn = async () => {
790
+ Nn.value = !1, await Q.start(), Q.isActive.value && (Vn(), Hn(rt));
786
791
  }, $n = async () => {
787
- Q.dismissError(), await Q.stop(), await Xn();
788
- }, er = (e) => e?.toolCallId ?? "", tr = j(/* @__PURE__ */ new Set()), nr = (e) => tr.value.has(er(e)), rr = j(/* @__PURE__ */ new Map()), ir = (e, t) => Q.isActive.value ? (Q.sendUserMessage(t) && (tr.value = new Set(tr.value).add(er(e)), Hn()), !0) : !1, ar = (e, t, n) => {
789
- ir(t, l(t, n)) || kt({
792
+ Z.value = !1, await Q.stop(), !Pn && Wn(0);
793
+ }, er = () => {
794
+ Q.dismissError();
795
+ }, tr = async () => {
796
+ Q.dismissError(), await Q.stop(), await Qn();
797
+ }, nr = (e) => e?.toolCallId ?? "", rr = j(/* @__PURE__ */ new Set()), ir = (e) => rr.value.has(nr(e)), ar = j(/* @__PURE__ */ new Map()), or = (e, t) => Q.isActive.value ? (Q.sendUserMessage(t) && (rr.value = new Set(rr.value).add(nr(e)), Wn()), !0) : !1, sr = (e, t, n) => {
798
+ or(t, u(t, n)) || jt({
790
799
  tool: e,
791
- toolCallId: er(t),
800
+ toolCallId: nr(t),
792
801
  output: n
793
802
  });
794
- }, or = (e) => {
803
+ }, cr = (e) => {
795
804
  let t = e.confirmed ? J("message.voiceConfirmed") : J("message.voiceCancelled");
796
- ir({ toolCallId: e.toolCallId }, t) ? tr.value.has(e.toolCallId) && (rr.value = new Map(rr.value).set(e.toolCallId, e.confirmed)) : kt({
805
+ or({ toolCallId: e.toolCallId }, t) ? rr.value.has(e.toolCallId) && (ar.value = new Map(ar.value).set(e.toolCallId, e.confirmed)) : jt({
797
806
  tool: "requestConfirm",
798
807
  toolCallId: e.toolCallId,
799
808
  output: e.confirmed ? "confirmed" : "cancelled"
800
809
  });
801
- }, sr = S(() => {
810
+ }, lr = S(() => {
802
811
  let e = /* @__PURE__ */ new Map();
803
- for (let t of V.value) for (let n of t.parts) {
812
+ for (let t of B.value) for (let n of t.parts) {
804
813
  let { type: t, state: r, output: i } = n;
805
- bn.has(t) && r === "output-available" && i?.fileId && i.version && e.set(i.fileId, Math.max(e.get(i.fileId) ?? 0, i.version));
814
+ Sn.has(t) && r === "output-available" && i?.fileId && i.version && e.set(i.fileId, Math.max(e.get(i.fileId) ?? 0, i.version));
806
815
  }
807
816
  return e;
808
- }), cr = S(() => {
817
+ }), ur = S(() => {
809
818
  let e = /* @__PURE__ */ new Map(), t = (t, n) => {
810
819
  if (t && n) {
811
820
  let r = t.toLowerCase();
812
821
  e.set(r, (e.get(r) ?? /* @__PURE__ */ new Set()).add(n));
813
822
  }
814
823
  };
815
- for (let e of V.value) for (let n of e.parts) {
816
- if (o(n)) {
817
- t(n.filename, s(n)?.storedFileName);
824
+ for (let e of B.value) for (let n of e.parts) {
825
+ if (s(n)) {
826
+ t(n.filename, c(n)?.storedFileName);
818
827
  continue;
819
828
  }
820
829
  let { type: e, state: r, output: i } = n;
821
- bn.has(e) && r === "output-available" && i?.filename && t(u(i.filename, i.version), i.fileId);
830
+ Sn.has(e) && r === "output-available" && i?.filename && t(d(i.filename, i.version), i.fileId);
822
831
  }
823
832
  return e;
824
- }), $ = S(() => W.value ? void 0 : (e) => {
825
- let t = (cr.value.get(e.filename.toLowerCase())?.size ?? 0) > 1;
826
- U.value = J(t ? "messagePart.chatFileRestoreRequestById" : "messagePart.chatFileRestoreRequest", e), bt();
827
- }), lr = (e, t) => {
828
- ir(e, t) || (U.value = t, bt());
829
- }, ur = (e, t) => {
833
+ }), $ = S(() => U.value ? void 0 : (e) => {
834
+ let t = (ur.value.get(e.filename.toLowerCase())?.size ?? 0) > 1;
835
+ H.value = J(t ? "messagePart.chatFileRestoreRequestById" : "messagePart.chatFileRestoreRequest", e), St();
836
+ }), dr = (e, t) => {
837
+ or(e, t) || (H.value = t, St());
838
+ }, fr = (e, t) => {
830
839
  let n = t.error ? J("message.voiceLocationRefused") : J("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
831
- ir(e, n) || kt({
840
+ or(e, n) || jt({
832
841
  tool: "requestGeolocation",
833
- toolCallId: er(e),
842
+ toolCallId: nr(e),
834
843
  output: t
835
844
  });
836
- }, dr = (e, t) => {
837
- ir(e, J("message.voiceConnectionDone")) || kt({
845
+ }, pr = (e, t) => {
846
+ or(e, J("message.voiceConnectionDone")) || jt({
838
847
  tool: "requestOAuthConnection",
839
- toolCallId: er(e),
848
+ toolCallId: nr(e),
840
849
  output: {
841
850
  connected: !0,
842
851
  mcpServerId: t
843
852
  }
844
853
  });
845
- }, fr = () => {
846
- jn.value = !jn.value, Q.setMuted(jn.value);
854
+ }, mr = () => {
855
+ Nn.value = !Nn.value, Q.setMuted(Nn.value);
847
856
  };
848
- ue(() => {
849
- Mn = !0, zn();
857
+ de(() => {
858
+ Pn = !0, Vn();
850
859
  });
851
- let { pendingWakeup: pr, isStopping: mr, stop: hr, spokenTurnStarted: gr, spokenTurnsWritten: _r, forgetSpokenTurns: vr } = ze({
860
+ let { pendingWakeup: hr, isStopping: gr, stop: _r, spokenTurnStarted: vr, spokenTurnsWritten: yr, forgetSpokenTurns: br } = Ve({
852
861
  agentId: () => N.agentId,
853
- chatId: () => R.localChatId,
854
- apiClient: () => K.value,
855
- messages: () => V.value,
856
- refreshMessages: It,
857
- status: () => H.value.status
862
+ chatId: () => L.localChatId,
863
+ apiClient: () => G.value,
864
+ messages: () => B.value,
865
+ refreshMessages: Rt,
866
+ status: () => V.value.status
858
867
  });
859
868
  return (t, n) => {
860
- let r = ne;
869
+ let r = y;
861
870
  return A(), T("div", {
862
871
  ref_key: "chatViewEl",
863
- ref: en,
872
+ ref: nn,
864
873
  class: k(["pk-chatbot-view-chat", {
865
- "pk-chatbot-view-chat--dragover": P(An) && yt.value?.enabled,
866
- "pk-chatbot-view-chat--empty": Qt.value,
867
- "pk-chatbot-view-chat--with-preview": vn.value && !nn.value
874
+ "pk-chatbot-view-chat--dragover": P(Mn) && K.value?.enabled,
875
+ "pk-chatbot-view-chat--empty": en.value,
876
+ "pk-chatbot-view-chat--with-preview": bn.value && !an.value
868
877
  }])
869
878
  }, [
870
879
  D(x, {
871
880
  name: "pk-chatbot-view-chat-fade",
872
881
  mode: "out-in"
873
882
  }, {
874
- default: L(() => [Qt.value ? (A(), C(ee, {
883
+ default: I(() => [en.value ? (A(), C(te, {
875
884
  key: 0,
876
- greeting: P($t),
877
- logo: P(z)?.logo,
878
- name: P(R).name
885
+ greeting: P(tn),
886
+ logo: P(R)?.logo,
887
+ name: P(L).name
879
888
  }, null, 8, [
880
889
  "greeting",
881
890
  "logo",
@@ -884,48 +893,48 @@ var Ye = { class: "pk-chatbot-view-chat__input-stage" }, Xe = {
884
893
  key: 1,
885
894
  class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
886
895
  interactive: "",
887
- messages: P(V),
888
- "confirm-verdicts-on-call": rr.value,
889
- status: P(H).status,
890
- error: P(H).error,
891
- "main-color": P(z)?.mainColor,
892
- "text-color": P(z)?.textColor,
893
- "revised-answers": P(De),
894
- actions: P(Ee),
895
- "message-feedbacks": P(Oe),
896
- "feedback-message-id": P(ke)?.id,
897
- "feedback-loading": P(Ae),
898
- "feedback-submitted": P(Ne),
899
- "feedback-error": P(Pe),
900
- "show-extended-steps": P(z)?.showExtendedSteps,
901
- "hide-reasoning": P(z)?.showReasoning === !1,
896
+ messages: P(B),
897
+ "confirm-verdicts-on-call": ar.value,
898
+ status: P(V).status,
899
+ error: P(V).error,
900
+ "main-color": P(R)?.mainColor,
901
+ "text-color": P(R)?.textColor,
902
+ "revised-answers": P(ke),
903
+ actions: P(Oe),
904
+ "message-feedbacks": P(Ae),
905
+ "feedback-message-id": P(je)?.id,
906
+ "feedback-loading": P(Me),
907
+ "feedback-submitted": P(Fe),
908
+ "feedback-error": P(Ie),
909
+ "show-extended-steps": P(R)?.showExtendedSteps,
910
+ "hide-reasoning": P(R)?.showReasoning === !1,
902
911
  "awaiting-spoken-answer": Z.value,
903
- "host-working": Wt.value,
904
- "host-confirmation": P(qe),
905
- "is-dark": P(We),
906
- "show-scroll-to-bottom": a.modifier === "fullscreen",
907
- onFeedbackSubmit: n[0] ||= (e) => P(Et)(e),
908
- onFeedbackClose: n[1] ||= (e) => ke.value = void 0,
909
- onRegenerate: P(St),
910
- onAutoRetry: P(St),
911
- onResetChat: P(Ot),
912
- onShowInfo: n[2] ||= (e) => Se("show-info", e),
913
- onRevise: n[3] ||= (e) => Se("revise", e),
914
- onUpvote: P(Ct),
915
- onDownvote: P(wt),
916
- onFeedback: P(Tt),
917
- onApprovalRespond: P(At),
918
- onConfirmRespond: or,
919
- onHostConfirmRespond: P(zt)
912
+ "host-working": Kt.value,
913
+ "host-confirmation": P(Ye),
914
+ "is-dark": P(Ke),
915
+ "show-scroll-to-bottom": o.modifier === "fullscreen",
916
+ onFeedbackSubmit: n[0] ||= (e) => P(Ot)(e),
917
+ onFeedbackClose: n[1] ||= (e) => je.value = void 0,
918
+ onRegenerate: P(wt),
919
+ onAutoRetry: P(wt),
920
+ onResetChat: P(At),
921
+ onShowInfo: n[2] ||= (e) => we("show-info", e),
922
+ onRevise: n[3] ||= (e) => we("revise", e),
923
+ onUpvote: P(Tt),
924
+ onDownvote: P(Et),
925
+ onFeedback: P(Dt),
926
+ onApprovalRespond: P(Mt),
927
+ onConfirmRespond: cr,
928
+ onHostConfirmRespond: P(Vt)
920
929
  }, {
921
- "tool-showContactForm": L(({ part: e }) => [D(P(y), {
930
+ "tool-showContactForm": I(({ part: e }) => [D(P(b), {
922
931
  part: e,
923
- readonly: !P(Ve),
924
- submitted: P(Ie),
925
- loading: P(Le),
926
- error: P(Re),
927
- "privacy-policy-notice": P(z)?.privacyPolicyNotice,
928
- onSubmit: P(Dt)
932
+ readonly: !P(Ue),
933
+ submitted: P(Re),
934
+ loading: P(ze),
935
+ error: P(Be),
936
+ "privacy-policy-notice": P(R)?.privacyPolicyNotice,
937
+ onSubmit: P(kt)
929
938
  }, null, 8, [
930
939
  "part",
931
940
  "readonly",
@@ -935,20 +944,20 @@ var Ye = { class: "pk-chatbot-view-chat__input-stage" }, Xe = {
935
944
  "privacy-policy-notice",
936
945
  "onSubmit"
937
946
  ])]),
938
- "tool-showSuggestedReply": L(({ part: e }) => [D(P(ie), {
947
+ "tool-showSuggestedReply": I(({ part: e }) => [D(P(ae), {
939
948
  part: e,
940
- onSelect: (t) => lr(e, t)
949
+ onSelect: (t) => dr(e, t)
941
950
  }, null, 8, ["part", "onSelect"])]),
942
- "tool-showSources": L(({ part: e }) => [D(P(ae), {
951
+ "tool-showSources": I(({ part: e }) => [D(P(oe), {
943
952
  part: e,
944
- "on-expand-context": On,
945
- "on-download": kn
953
+ "on-expand-context": An,
954
+ "on-download": jn
946
955
  }, null, 8, ["part"])]),
947
- "tool-showForm": L(({ part: e }) => [D(x, { mode: "out-in" }, {
948
- default: L(() => [D(P(g), {
956
+ "tool-showForm": I(({ part: e }) => [D(x, { mode: "out-in" }, {
957
+ default: I(() => [D(P(_), {
949
958
  part: e,
950
- answered: nr(e),
951
- onSelect: (t) => ar("showForm", e, t)
959
+ answered: ir(e),
960
+ onSelect: (t) => sr("showForm", e, t)
952
961
  }, null, 8, [
953
962
  "part",
954
963
  "answered",
@@ -956,12 +965,12 @@ var Ye = { class: "pk-chatbot-view-chat__input-stage" }, Xe = {
956
965
  ])]),
957
966
  _: 2
958
967
  }, 1024)]),
959
- "tool-showMultipleChoice": L(({ part: e }) => [D(x, { mode: "out-in" }, {
960
- default: L(() => [D(P(g), {
968
+ "tool-showMultipleChoice": I(({ part: e }) => [D(x, { mode: "out-in" }, {
969
+ default: I(() => [D(P(_), {
961
970
  part: e,
962
971
  "allow-custom-answer": "",
963
- answered: nr(e),
964
- onSelect: (t) => ar("showMultipleChoice", e, t)
972
+ answered: ir(e),
973
+ onSelect: (t) => sr("showMultipleChoice", e, t)
965
974
  }, null, 8, [
966
975
  "part",
967
976
  "answered",
@@ -969,12 +978,12 @@ var Ye = { class: "pk-chatbot-view-chat__input-stage" }, Xe = {
969
978
  ])]),
970
979
  _: 2
971
980
  }, 1024)]),
972
- "tool-requestOAuthConnection": L(({ part: e }) => [D(P(ce), {
981
+ "tool-requestOAuthConnection": I(({ part: e }) => [D(P(le), {
973
982
  part: e,
974
- "backend-url": P(Ve),
975
- "resolve-connection": (e) => P(K).getOAuthAuthorizeUrl(N.agentId, e),
976
- "check-connection": (e) => P(K).getOAuthConnectionStatus(N.agentId, e),
977
- onConnected: (t) => dr(e, t)
983
+ "backend-url": P(Ue),
984
+ "resolve-connection": (e) => P(G).getOAuthAuthorizeUrl(N.agentId, e),
985
+ "check-connection": (e) => P(G).getOAuthConnectionStatus(N.agentId, e),
986
+ onConnected: (t) => pr(e, t)
978
987
  }, null, 8, [
979
988
  "part",
980
989
  "backend-url",
@@ -982,108 +991,108 @@ var Ye = { class: "pk-chatbot-view-chat__input-stage" }, Xe = {
982
991
  "check-connection",
983
992
  "onConnected"
984
993
  ])]),
985
- "tool-requestGeolocation": L(({ part: e }) => [D(P(oe), {
994
+ "tool-requestGeolocation": I(({ part: e }) => [D(P(se), {
986
995
  part: e,
987
996
  "call-live": P(Q).isActive.value,
988
- "reverse-geocode": (e, t) => P(K).reverseGeocode(e, t),
989
- onResult: (t) => ur(e, t)
997
+ "reverse-geocode": (e, t) => P(G).reverseGeocode(e, t),
998
+ onResult: (t) => fr(e, t)
990
999
  }, null, 8, [
991
1000
  "part",
992
1001
  "call-live",
993
1002
  "reverse-geocode",
994
1003
  "onResult"
995
1004
  ])]),
996
- "tool-showLocation": L(({ part: e }) => [D(P(le), {
1005
+ "tool-showLocation": I(({ part: e }) => [D(P(ue), {
997
1006
  part: e,
998
- "is-dark": P(We),
999
- "main-color": P(z)?.mainColor,
1000
- "forward-geocode": (e, t) => P(K).forwardGeocode(e, t)
1007
+ "is-dark": P(Ke),
1008
+ "main-color": P(R)?.mainColor,
1009
+ "forward-geocode": (e, t) => P(G).forwardGeocode(e, t)
1001
1010
  }, null, 8, [
1002
1011
  "part",
1003
1012
  "is-dark",
1004
1013
  "main-color",
1005
1014
  "forward-geocode"
1006
1015
  ])]),
1007
- "tool-showDiagram": L(({ part: e }) => [D(P(de), {
1016
+ "tool-showDiagram": I(({ part: e }) => [D(P(fe), {
1008
1017
  part: e,
1009
- "is-dark": P(We)
1018
+ "is-dark": P(Ke)
1010
1019
  }, null, 8, ["part", "is-dark"])]),
1011
- "tool-editSpreadsheet": L(({ part: e }) => [(A(), C(P(fe), {
1012
- key: P(p)(e),
1020
+ "tool-editSpreadsheet": I(({ part: e }) => [(A(), C(P(pe), {
1021
+ key: P(m)(e),
1013
1022
  part: e,
1014
1023
  "file-url": q,
1015
- preview: gn,
1016
- "latest-versions": sr.value,
1024
+ preview: vn,
1025
+ "latest-versions": lr.value,
1017
1026
  restore: $.value
1018
1027
  }, null, 8, [
1019
1028
  "part",
1020
1029
  "latest-versions",
1021
1030
  "restore"
1022
1031
  ]))]),
1023
- "tool-editWordDocument": L(({ part: e }) => [(A(), C(P(fe), {
1024
- key: P(p)(e),
1032
+ "tool-editWordDocument": I(({ part: e }) => [(A(), C(P(pe), {
1033
+ key: P(m)(e),
1025
1034
  part: e,
1026
1035
  "file-url": q,
1027
- preview: gn,
1028
- "latest-versions": sr.value,
1036
+ preview: vn,
1037
+ "latest-versions": lr.value,
1029
1038
  restore: $.value
1030
1039
  }, null, 8, [
1031
1040
  "part",
1032
1041
  "latest-versions",
1033
1042
  "restore"
1034
1043
  ]))]),
1035
- "tool-createSpreadsheet": L(({ part: e }) => [(A(), C(P(fe), {
1036
- key: P(p)(e),
1044
+ "tool-createSpreadsheet": I(({ part: e }) => [(A(), C(P(pe), {
1045
+ key: P(m)(e),
1037
1046
  part: e,
1038
1047
  "file-url": q,
1039
- preview: gn,
1040
- "latest-versions": sr.value,
1048
+ preview: vn,
1049
+ "latest-versions": lr.value,
1041
1050
  restore: $.value
1042
1051
  }, null, 8, [
1043
1052
  "part",
1044
1053
  "latest-versions",
1045
1054
  "restore"
1046
1055
  ]))]),
1047
- "tool-createWordDocument": L(({ part: e }) => [(A(), C(P(fe), {
1048
- key: P(p)(e),
1056
+ "tool-createWordDocument": I(({ part: e }) => [(A(), C(P(pe), {
1057
+ key: P(m)(e),
1049
1058
  part: e,
1050
1059
  "file-url": q,
1051
- preview: gn,
1052
- "latest-versions": sr.value,
1060
+ preview: vn,
1061
+ "latest-versions": lr.value,
1053
1062
  restore: $.value
1054
1063
  }, null, 8, [
1055
1064
  "part",
1056
1065
  "latest-versions",
1057
1066
  "restore"
1058
1067
  ]))]),
1059
- "tool-shareDocument": L(({ part: e }) => [(A(), C(P(pe), {
1060
- key: P(p)(e),
1068
+ "tool-shareDocument": I(({ part: e }) => [(A(), C(P(me), {
1069
+ key: P(m)(e),
1061
1070
  part: e,
1062
- "on-download": kn
1071
+ "on-download": jn
1063
1072
  }, null, 8, ["part"]))]),
1064
1073
  _: 1
1065
1074
  }, 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(".")))]),
1066
1075
  _: 1
1067
1076
  }),
1068
- P(ut).length ? (A(), C(v, {
1077
+ P(ft).length ? (A(), C(ee, {
1069
1078
  key: 0,
1070
- messages: P(ut),
1071
- onEdit: P(Bt),
1072
- onRemove: P(Vt)
1079
+ messages: P(ft),
1080
+ onEdit: P(Ht),
1081
+ onRemove: P(Ut)
1073
1082
  }, null, 8, [
1074
1083
  "messages",
1075
1084
  "onEdit",
1076
1085
  "onRemove"
1077
1086
  ])) : w("", !0),
1078
- E("div", Ye, [
1087
+ E("div", Ze, [
1079
1088
  D(x, { name: "pk-chatbot-view-chat-fade" }, {
1080
- default: L(() => [Qt.value ? (A(), C(we, {
1089
+ default: I(() => [en.value ? (A(), C(Ee, {
1081
1090
  key: 0,
1082
1091
  class: "pk-chatbot-view-chat__aurora",
1083
1092
  "source-selector": ".pk-chatbot-input__form",
1084
- "main-color": P(z)?.mainColor,
1085
- tones: P(z)?.glowTones,
1086
- "second-color": P(z)?.glowSecondColor
1093
+ "main-color": P(R)?.mainColor,
1094
+ tones: P(R)?.glowTones,
1095
+ "second-color": P(R)?.glowSecondColor
1087
1096
  }, null, 8, [
1088
1097
  "main-color",
1089
1098
  "tones",
@@ -1091,78 +1100,78 @@ var Ye = { class: "pk-chatbot-view-chat__input-stage" }, Xe = {
1091
1100
  ])) : w("", !0)]),
1092
1101
  _: 1
1093
1102
  }),
1094
- P(pr) && !P(W) ? (A(), C(te, {
1103
+ P(hr) && !P(U) ? (A(), C(ne, {
1095
1104
  key: 0,
1096
- pending: P(pr),
1097
- stopping: P(mr),
1098
- onStop: P(hr)
1105
+ pending: P(hr),
1106
+ stopping: P(gr),
1107
+ onStop: P(_r)
1099
1108
  }, null, 8, [
1100
1109
  "pending",
1101
1110
  "stopping",
1102
1111
  "onStop"
1103
1112
  ])) : w("", !0),
1104
- P(W) ? (A(), T("div", Xe, M(P(J)("message.chatErrorConversationBlocked")), 1)) : Gn.value === "idle" ? (A(), C(_, {
1113
+ P(U) ? (A(), T("div", Qe, M(P(J)("message.chatErrorConversationBlocked")), 1)) : qn.value === "idle" ? (A(), C(v, {
1105
1114
  key: 3,
1106
1115
  ref_key: "inputEl",
1107
- ref: _t,
1108
- modelValue: P(U),
1109
- "onUpdate:modelValue": n[4] ||= (e) => se(U) ? U.value = e : null,
1110
- "pending-attachments": P(G),
1111
- "onUpdate:pendingAttachments": n[5] ||= (e) => se(G) ? G.value = e : null,
1112
- placeholder: P(Be),
1113
- "dismissable-notice": P(Xt) && P(H).messages.length <= 1 ? P(Xt) : void 0,
1114
- "page-notice": qt.value,
1115
- status: Gt.value,
1116
- "max-message-length": P(z)?.maxMessageLength,
1117
- "file-upload": yt.value,
1118
- "attachment-limit-reached": P(He),
1119
- "attachment-notice": Jt.value,
1120
- "voice-enabled": Wn.value,
1121
- "queue-enabled": P(lt),
1122
- "answer-notices": Yt.value,
1123
- "pointer-available": P(mt),
1124
- pointing: P(ht),
1125
- pointer: vt.value,
1126
- "automatic-confirmations": P(ct) === "automatic",
1116
+ ref: yt,
1117
+ modelValue: P(H),
1118
+ "onUpdate:modelValue": n[4] ||= (e) => ce(H) ? H.value = e : null,
1119
+ "pending-attachments": P(W),
1120
+ "onUpdate:pendingAttachments": n[5] ||= (e) => ce(W) ? W.value = e : null,
1121
+ placeholder: P(He),
1122
+ "dismissable-notice": P(Qt) && P(V).messages.length <= 1 ? P(Qt) : void 0,
1123
+ "page-notice": Yt.value,
1124
+ status: qt.value,
1125
+ "max-message-length": P(R)?.maxMessageLength,
1126
+ "file-upload": K.value,
1127
+ "attachment-limit-reached": P(We),
1128
+ "attachment-notice": Xt.value,
1129
+ "voice-enabled": Kn.value,
1130
+ "queue-enabled": P(dt),
1131
+ "answer-notices": Zt.value,
1132
+ "pointer-available": P(gt),
1133
+ pointing: P(_t),
1134
+ pointer: bt.value,
1135
+ "automatic-confirmations": P(ut) === "automatic",
1127
1136
  "editable-images": "",
1128
1137
  "retryable-attachments": "",
1129
- onPoint: n[6] ||= (e) => P(R).pagePointerStart?.(),
1130
- onRemovePointer: n[7] ||= (e) => pt.value = void 0,
1131
- onManualConfirmations: n[8] ||= (e) => P(R).setConfirmationMode("manual"),
1132
- onStopGeneration: P(xt),
1133
- onSubmit: P(bt),
1134
- onFileSelect: P(jt),
1135
- onRemoveAttachment: P(Mt),
1136
- onReplaceAttachment: P(Nt),
1137
- onRetryAttachment: P(Pt),
1138
- onDismissAttachmentNotice: P(Ft),
1139
- onDismissPageNotice: P(Rt),
1140
- onOpenAnswerNotice: P(Ht),
1141
- onDismissAnswerNotice: P(Ut),
1142
- onVoiceStart: Xn
1143
- }, re({ _: 2 }, [a.modifier === "fullscreen" ? {
1138
+ onPoint: n[6] ||= (e) => P(L).pagePointerStart?.(),
1139
+ onRemovePointer: n[7] ||= (e) => ht.value = void 0,
1140
+ onManualConfirmations: n[8] ||= (e) => P(L).setConfirmationMode("manual"),
1141
+ onStopGeneration: P(Ct),
1142
+ onSubmit: P(St),
1143
+ onFileSelect: P(Nt),
1144
+ onRemoveAttachment: P(Pt),
1145
+ onReplaceAttachment: P(Ft),
1146
+ onRetryAttachment: P(It),
1147
+ onDismissAttachmentNotice: P(Lt),
1148
+ onDismissPageNotice: P(Bt),
1149
+ onOpenAnswerNotice: P(Wt),
1150
+ onDismissAnswerNotice: P(Gt),
1151
+ onVoiceStart: Qn
1152
+ }, ie({ _: 2 }, [o.modifier === "fullscreen" ? {
1144
1153
  name: "prepend",
1145
- fn: L(() => [E("span", Ze, [D(h, {
1154
+ fn: I(() => [E("span", $e, [D(g, {
1146
1155
  class: "pk-chatbot-view-chat__agent-chip-avatar",
1147
- "img-src": P(z)?.logo,
1148
- name: P(R).name
1149
- }, null, 8, ["img-src", "name"]), P(R).name ? (A(), T("strong", Qe, M(P(R).name), 1)) : w("", !0)])]),
1156
+ "img-src": P(R)?.logo,
1157
+ name: P(L).name
1158
+ }, null, 8, ["img-src", "name"]), P(L).name ? (A(), T("strong", et, M(P(L).name), 1)) : w("", !0)])]),
1150
1159
  key: "0"
1151
- } : void 0]), 1032, /* @__PURE__ */ "modelValue.pending-attachments.placeholder.dismissable-notice.page-notice.status.max-message-length.file-upload.attachment-limit-reached.attachment-notice.voice-enabled.queue-enabled.answer-notices.pointer-available.pointing.pointer.automatic-confirmations.onStopGeneration.onSubmit.onFileSelect.onRemoveAttachment.onReplaceAttachment.onRetryAttachment.onDismissAttachmentNotice.onDismissPageNotice.onOpenAnswerNotice.onDismissAnswerNotice".split("."))) : (A(), C(je, {
1160
+ } : void 0]), 1032, /* @__PURE__ */ "modelValue.pending-attachments.placeholder.dismissable-notice.page-notice.status.max-message-length.file-upload.attachment-limit-reached.attachment-notice.voice-enabled.queue-enabled.answer-notices.pointer-available.pointing.pointer.automatic-confirmations.onStopGeneration.onSubmit.onFileSelect.onRemoveAttachment.onReplaceAttachment.onRetryAttachment.onDismissAttachmentNotice.onDismissPageNotice.onOpenAnswerNotice.onDismissAnswerNotice".split("."))) : (A(), C(Ne, {
1152
1161
  key: 2,
1153
- state: Gn.value,
1154
- sample: Jn,
1155
- spectrum: Yn,
1162
+ state: qn.value,
1163
+ sample: Xn,
1164
+ spectrum: Zn,
1156
1165
  "remaining-seconds": P(Q).remainingSeconds.value,
1157
- muted: jn.value,
1158
- error: Kn.value,
1166
+ muted: Nn.value,
1167
+ error: Jn.value,
1159
1168
  "raw-error": P(Q).error.value,
1160
1169
  live: P(Q).isActive.value,
1161
1170
  class: "pk-chatbot-view-chat__voice",
1162
- onToggleMute: fr,
1163
- onHangUp: Zn,
1164
- onRetry: $n,
1165
- onDismiss: Qn
1171
+ onToggleMute: mr,
1172
+ onHangUp: $n,
1173
+ onRetry: tr,
1174
+ onDismiss: er
1166
1175
  }, null, 8, [
1167
1176
  "state",
1168
1177
  "remaining-seconds",
@@ -1173,17 +1182,17 @@ var Ye = { class: "pk-chatbot-view-chat__input-stage" }, Xe = {
1173
1182
  ]))
1174
1183
  ]),
1175
1184
  D(x, null, {
1176
- default: L(() => [P(An) && yt.value?.enabled ? (A(), T("div", $e, [D(r, {
1185
+ default: I(() => [P(Mn) && K.value?.enabled ? (A(), T("div", tt, [D(r, {
1177
1186
  name: "ri:upload-cloud-2-line",
1178
1187
  class: "pk-chatbot-view-chat__drop-overlay-icon"
1179
1188
  }), E("span", null, M(P(J)("action.dropFile")), 1)])) : w("", !0)]),
1180
1189
  _: 1
1181
1190
  }),
1182
- vn.value ? (A(), C(b, {
1191
+ bn.value ? (A(), C(re, {
1183
1192
  key: 1,
1184
- to: rn.value,
1185
- disabled: !nn.value
1186
- }, [E("aside", { class: k(["pk-chatbot-view-chat__preview", { "pk-chatbot-view-chat__preview--docked": nn.value }]) }, [P(Y) ? (A(), C(P(he), {
1193
+ to: on.value,
1194
+ disabled: !an.value
1195
+ }, [E("aside", { class: k(["pk-chatbot-view-chat__preview", { "pk-chatbot-view-chat__preview--docked": an.value }]) }, [P(Y) ? (A(), C(P(ge), {
1187
1196
  key: 0,
1188
1197
  mode: X.value.mode,
1189
1198
  "onUpdate:mode": n[9] ||= (e) => X.value.mode = e,
@@ -1196,22 +1205,22 @@ var Ye = { class: "pk-chatbot-view-chat__input-stage" }, Xe = {
1196
1205
  kind: P(Y).kind,
1197
1206
  filename: P(Y).filename,
1198
1207
  version: P(Y).version,
1199
- versions: Sn.value,
1208
+ versions: wn.value,
1200
1209
  "download-url": q(P(Y).storedFileName),
1201
- preview: P(ln),
1202
- changes: P(fn),
1203
- loading: P(un),
1204
- error: P(dn),
1205
- restorable: wn.value,
1210
+ preview: P(dn),
1211
+ changes: P(mn),
1212
+ loading: P(fn),
1213
+ error: P(pn),
1214
+ restorable: En.value,
1206
1215
  resize: "expand",
1207
1216
  "file-id": P(Y).fileId,
1208
1217
  "stored-file-name": P(Y).storedFileName,
1209
- "selection-actions": En.value,
1210
- onVersion: Cn,
1211
- onRestore: Tn,
1212
- onResize: n[13] ||= (e) => _n.value = !0,
1213
- onSelectionSend: Dn,
1214
- onClose: yn
1218
+ "selection-actions": On.value,
1219
+ onVersion: Tn,
1220
+ onRestore: Dn,
1221
+ onResize: n[13] ||= (e) => yn.value = !0,
1222
+ onSelectionSend: kn,
1223
+ onClose: xn
1215
1224
  }, null, 8, [
1216
1225
  "mode",
1217
1226
  "sheet",
@@ -1231,7 +1240,7 @@ var Ye = { class: "pk-chatbot-view-chat__input-stage" }, Xe = {
1231
1240
  "stored-file-name",
1232
1241
  "selection-actions"
1233
1242
  ])) : w("", !0)], 2)], 8, ["to", "disabled"])) : w("", !0),
1234
- P(Y) && !vn.value ? (A(), C(P(ge), {
1243
+ P(Y) && !bn.value ? (A(), C(P(_e), {
1235
1244
  key: 2,
1236
1245
  mode: X.value.mode,
1237
1246
  "onUpdate:mode": n[14] ||= (e) => X.value.mode = e,
@@ -1242,21 +1251,21 @@ var Ye = { class: "pk-chatbot-view-chat__input-stage" }, Xe = {
1242
1251
  fit: X.value.fit,
1243
1252
  "onUpdate:fit": n[17] ||= (e) => X.value.fit = e,
1244
1253
  target: P(Y),
1245
- versions: Sn.value,
1254
+ versions: wn.value,
1246
1255
  "download-url": q(P(Y).storedFileName),
1247
- preview: P(ln),
1248
- changes: P(fn),
1249
- loading: P(un),
1250
- error: P(dn),
1251
- restorable: wn.value,
1252
- resize: sn.value ? "shrink" : void 0,
1253
- fullscreen: cn.value,
1254
- "selection-actions": En.value,
1255
- onVersion: Cn,
1256
- onRestore: Tn,
1257
- onResize: n[18] ||= (e) => _n.value = !1,
1258
- onSelectionSend: Dn,
1259
- onClose: yn
1256
+ preview: P(dn),
1257
+ changes: P(mn),
1258
+ loading: P(fn),
1259
+ error: P(pn),
1260
+ restorable: En.value,
1261
+ resize: ln.value ? "shrink" : void 0,
1262
+ fullscreen: un.value,
1263
+ "selection-actions": On.value,
1264
+ onVersion: Tn,
1265
+ onRestore: Dn,
1266
+ onResize: n[18] ||= (e) => yn.value = !1,
1267
+ onSelectionSend: kn,
1268
+ onClose: xn
1260
1269
  }, null, 8, [
1261
1270
  "mode",
1262
1271
  "sheet",
@@ -1278,6 +1287,6 @@ var Ye = { class: "pk-chatbot-view-chat__input-stage" }, Xe = {
1278
1287
  };
1279
1288
  }
1280
1289
  });
1281
- export { je as a, Pe as i, Je as n, Ee as o, Ke as r, we as s, at as t };
1290
+ export { Ne as a, Ie as i, Xe as n, Oe as o, Je as r, Ee as s, st as t };
1282
1291
 
1283
- //# sourceMappingURL=PkChatbotViewChat-C28g7dz-.js.map
1292
+ //# sourceMappingURL=PkChatbotViewChat-aKi08vCz.js.map