@8wave/ai-elements 0.123.0-beta.2 → 0.123.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/dist/_chunks/{Agent-BcmcalNN.js → Agent-C0JtGK2t.js} +3 -2
  2. package/dist/_chunks/{Agent-BcmcalNN.js.map → Agent-C0JtGK2t.js.map} +1 -1
  3. package/dist/_chunks/{PkStreamingMarkdown-Dc0R0GHe.js → PkStreamingMarkdown-De3ihxaM.js} +3 -3
  4. package/dist/_chunks/{PkStreamingMarkdown-Dc0R0GHe.js.map → PkStreamingMarkdown-De3ihxaM.js.map} +1 -1
  5. package/dist/_chunks/{PkToolChatFile-3fYhbFSi.js → PkToolChatFile-CRp81vG5.js} +2 -2
  6. package/dist/_chunks/{PkToolChatFile-3fYhbFSi.js.map → PkToolChatFile-CRp81vG5.js.map} +1 -1
  7. package/dist/_chunks/{PkToolRequestGeolocation-n1W_drCv.js → PkToolRequestGeolocation-GlUmGHpD.js} +2 -2
  8. package/dist/_chunks/{PkToolRequestGeolocation-n1W_drCv.js.map → PkToolRequestGeolocation-GlUmGHpD.js.map} +1 -1
  9. package/dist/_chunks/{PkToolRequestOAuthConnection-DmMeSF2m.js → PkToolRequestOAuthConnection-7OvDQZe5.js} +2 -2
  10. package/dist/_chunks/{PkToolRequestOAuthConnection-DmMeSF2m.js.map → PkToolRequestOAuthConnection-7OvDQZe5.js.map} +1 -1
  11. package/dist/_chunks/{PkToolShowArtifact-BUnSqAWQ.js → PkToolShowArtifact-DmVWtJit.js} +2 -2
  12. package/dist/_chunks/{PkToolShowArtifact-BUnSqAWQ.js.map → PkToolShowArtifact-DmVWtJit.js.map} +1 -1
  13. package/dist/_chunks/{PkToolShowContactForm-YX1BuolZ.js → PkToolShowContactForm-9Kv-ZdN9.js} +2 -2
  14. package/dist/_chunks/{PkToolShowContactForm-YX1BuolZ.js.map → PkToolShowContactForm-9Kv-ZdN9.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShowForm-CkpMsrEo.js → PkToolShowForm-CbKhYut7.js} +3 -3
  16. package/dist/_chunks/{PkToolShowForm-CkpMsrEo.js.map → PkToolShowForm-CbKhYut7.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowImageGallery-BnUnjFeU.js → PkToolShowImageGallery-6rZZHDOj.js} +2 -2
  18. package/dist/_chunks/{PkToolShowImageGallery-BnUnjFeU.js.map → PkToolShowImageGallery-6rZZHDOj.js.map} +1 -1
  19. package/dist/_chunks/{PkToolShowProductList-CPqmqS-Q.js → PkToolShowProductList-U9hglluW.js} +2 -2
  20. package/dist/_chunks/{PkToolShowProductList-CPqmqS-Q.js.map → PkToolShowProductList-U9hglluW.js.map} +1 -1
  21. package/dist/_chunks/{PkToolShowSources-BO1IhnmO.js → PkToolShowSources-BB7w_tMo.js} +3 -3
  22. package/dist/_chunks/{PkToolShowSources-BO1IhnmO.js.map → PkToolShowSources-BB7w_tMo.js.map} +1 -1
  23. package/dist/_chunks/{PkToolShowSuggestedReply-79UAjTL4.js → PkToolShowSuggestedReply-BxCeHVdn.js} +2 -2
  24. package/dist/_chunks/{PkToolShowSuggestedReply-79UAjTL4.js.map → PkToolShowSuggestedReply-BxCeHVdn.js.map} +1 -1
  25. package/dist/_chunks/{PkToolShowVideo-DYnH3VIc.js → PkToolShowVideo-BnLOMaQn.js} +2 -2
  26. package/dist/_chunks/{PkToolShowVideo-DYnH3VIc.js.map → PkToolShowVideo-BnLOMaQn.js.map} +1 -1
  27. package/dist/_chunks/{PkToolShowWebPages-Ci_Yut6X.js → PkToolShowWebPages-CBAQf2pg.js} +2 -2
  28. package/dist/_chunks/{PkToolShowWebPages-Ci_Yut6X.js.map → PkToolShowWebPages-CBAQf2pg.js.map} +1 -1
  29. package/dist/_chunks/{chatImagePolicy-B5-NwmIR.js → chatImagePolicy-B3-RzU9W.js} +2 -2
  30. package/dist/_chunks/{chatImagePolicy-B5-NwmIR.js.map → chatImagePolicy-B3-RzU9W.js.map} +1 -1
  31. package/dist/_chunks/{markdown-_sL6w03k.js → markdown-BxOlM5SY.js} +2 -2
  32. package/dist/_chunks/{markdown-_sL6w03k.js.map → markdown-BxOlM5SY.js.map} +1 -1
  33. package/dist/ai-elements.es.js +2674 -2593
  34. package/dist/ai-elements.es.js.map +1 -1
  35. package/dist-vue/PkChatbot.js +1 -1
  36. package/dist-vue/PkChatbotEmptyState.js +1 -1
  37. package/dist-vue/PkChatbotInput.js +1 -1
  38. package/dist-vue/PkChatbotMessages.js +1 -1
  39. package/dist-vue/PkChatbotStepPayload.js +1 -1
  40. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  41. package/dist-vue/PkChatbotSteps.js +1 -1
  42. package/dist-vue/PkChatbotViewChat.js +1 -1
  43. package/dist-vue/PkChatbotViewConversations.js +1 -1
  44. package/dist-vue/PkChatbotViewFiles.js +1 -1
  45. package/dist-vue/PkChatbotViewProfile.js +1 -1
  46. package/dist-vue/_chunks/{Agent-BWwjGG2f.js → Agent-Dsi_xGvV.js} +10 -9
  47. package/dist-vue/_chunks/{Agent-BWwjGG2f.js.map → Agent-Dsi_xGvV.js.map} +1 -1
  48. package/dist-vue/_chunks/{Document-DvRaziIf.js → Document-B5R1PJnc.js} +2 -2
  49. package/dist-vue/_chunks/{Document-DvRaziIf.js.map → Document-B5R1PJnc.js.map} +1 -1
  50. package/dist-vue/_chunks/{PkChatbot-D3KGDerg.js → PkChatbot-B0EC0aOA.js} +8 -8
  51. package/dist-vue/_chunks/{PkChatbot-D3KGDerg.js.map → PkChatbot-B0EC0aOA.js.map} +1 -1
  52. package/dist-vue/_chunks/{PkChatbotEmptyState-B76oD7fB.js → PkChatbotEmptyState-yO8Z-3p4.js} +2 -2
  53. package/dist-vue/_chunks/{PkChatbotEmptyState-B76oD7fB.js.map → PkChatbotEmptyState-yO8Z-3p4.js.map} +1 -1
  54. package/dist-vue/_chunks/{PkChatbotInput-BT51V-v4.js → PkChatbotInput-CiNeclez.js} +2 -2
  55. package/dist-vue/_chunks/{PkChatbotInput-BT51V-v4.js.map → PkChatbotInput-CiNeclez.js.map} +1 -1
  56. package/dist-vue/_chunks/PkChatbotMessages-CcR2PKp3.js +982 -0
  57. package/dist-vue/_chunks/PkChatbotMessages-CcR2PKp3.js.map +1 -0
  58. package/dist-vue/_chunks/{PkChatbotStepPayload-BYChvULZ.js → PkChatbotStepPayload-CWJmmF6k.js} +2 -2
  59. package/dist-vue/_chunks/{PkChatbotStepPayload-BYChvULZ.js.map → PkChatbotStepPayload-CWJmmF6k.js.map} +1 -1
  60. package/dist-vue/_chunks/{PkChatbotStepToolDetail-BysPl2ko.js → PkChatbotStepToolDetail-gT-CpGZH.js} +3 -3
  61. package/dist-vue/_chunks/{PkChatbotStepToolDetail-BysPl2ko.js.map → PkChatbotStepToolDetail-gT-CpGZH.js.map} +1 -1
  62. package/dist-vue/_chunks/{PkChatbotSteps-p8-SuGGe.js → PkChatbotSteps-CUznAYXB.js} +5 -5
  63. package/dist-vue/_chunks/{PkChatbotSteps-p8-SuGGe.js.map → PkChatbotSteps-CUznAYXB.js.map} +1 -1
  64. package/dist-vue/_chunks/{PkChatbotViewChat-BNaSv86u.js → PkChatbotViewChat-DDnJ-2Ic.js} +377 -371
  65. package/dist-vue/_chunks/PkChatbotViewChat-DDnJ-2Ic.js.map +1 -0
  66. package/dist-vue/_chunks/{PkChatbotViewConversations-C1vl8z4o.js → PkChatbotViewConversations-D0I6g4QO.js} +3 -3
  67. package/dist-vue/_chunks/{PkChatbotViewConversations-C1vl8z4o.js.map → PkChatbotViewConversations-D0I6g4QO.js.map} +1 -1
  68. package/dist-vue/_chunks/{PkChatbotViewFiles-DiKHsdPE.js → PkChatbotViewFiles-UjuW1UGm.js} +3 -3
  69. package/dist-vue/_chunks/{PkChatbotViewFiles-DiKHsdPE.js.map → PkChatbotViewFiles-UjuW1UGm.js.map} +1 -1
  70. package/dist-vue/_chunks/{PkChatbotViewProfile-CuQ0MAX7.js → PkChatbotViewProfile-Dvqk0e3I.js} +2 -2
  71. package/dist-vue/_chunks/{PkChatbotViewProfile-CuQ0MAX7.js.map → PkChatbotViewProfile-Dvqk0e3I.js.map} +1 -1
  72. package/dist-vue/_chunks/{PkStreamingMarkdown-B-sEx8BP.js → PkStreamingMarkdown-C_4h85DA.js} +3 -3
  73. package/dist-vue/_chunks/{PkStreamingMarkdown-B-sEx8BP.js.map → PkStreamingMarkdown-C_4h85DA.js.map} +1 -1
  74. package/dist-vue/_chunks/{PkToolChatFile-BJsDSu1Q.js → PkToolChatFile-CMcJl0hu.js} +2 -2
  75. package/dist-vue/_chunks/{PkToolChatFile-BJsDSu1Q.js.map → PkToolChatFile-CMcJl0hu.js.map} +1 -1
  76. package/dist-vue/_chunks/{PkToolRequestGeolocation-e8vyxTI_.js → PkToolRequestGeolocation-Bzu1fQ-X.js} +2 -2
  77. package/dist-vue/_chunks/{PkToolRequestGeolocation-e8vyxTI_.js.map → PkToolRequestGeolocation-Bzu1fQ-X.js.map} +1 -1
  78. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-3zLvNF_c.js → PkToolRequestOAuthConnection-C8t_5YtB.js} +2 -2
  79. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-3zLvNF_c.js.map → PkToolRequestOAuthConnection-C8t_5YtB.js.map} +1 -1
  80. package/dist-vue/_chunks/{PkToolShowArtifact-BRwa5pGY.js → PkToolShowArtifact-Pvi63K3m.js} +2 -2
  81. package/dist-vue/_chunks/{PkToolShowArtifact-BRwa5pGY.js.map → PkToolShowArtifact-Pvi63K3m.js.map} +1 -1
  82. package/dist-vue/_chunks/{PkToolShowContactForm-xHBTmITM.js → PkToolShowContactForm-BNta1jh0.js} +2 -2
  83. package/dist-vue/_chunks/{PkToolShowContactForm-xHBTmITM.js.map → PkToolShowContactForm-BNta1jh0.js.map} +1 -1
  84. package/dist-vue/_chunks/{PkToolShowDiagram-DrJs92dg.js → PkToolShowDiagram-BRHpp_P-.js} +2 -2
  85. package/dist-vue/_chunks/{PkToolShowDiagram-DrJs92dg.js.map → PkToolShowDiagram-BRHpp_P-.js.map} +1 -1
  86. package/dist-vue/_chunks/{PkToolShowForm-Fv4iV0VY.js → PkToolShowForm-DuX1By1C.js} +4 -4
  87. package/dist-vue/_chunks/{PkToolShowForm-Fv4iV0VY.js.map → PkToolShowForm-DuX1By1C.js.map} +1 -1
  88. package/dist-vue/_chunks/{PkToolShowImageGallery-DD_RGcL6.js → PkToolShowImageGallery-9n-B5Jqo.js} +2 -2
  89. package/dist-vue/_chunks/{PkToolShowImageGallery-DD_RGcL6.js.map → PkToolShowImageGallery-9n-B5Jqo.js.map} +1 -1
  90. package/dist-vue/_chunks/{PkToolShowProductList-8UQSQvRr.js → PkToolShowProductList-BE_nXuEa.js} +2 -2
  91. package/dist-vue/_chunks/{PkToolShowProductList-8UQSQvRr.js.map → PkToolShowProductList-BE_nXuEa.js.map} +1 -1
  92. package/dist-vue/_chunks/{PkToolShowSources-C4rKpypf.js → PkToolShowSources-89OXReX8.js} +3 -3
  93. package/dist-vue/_chunks/{PkToolShowSources-C4rKpypf.js.map → PkToolShowSources-89OXReX8.js.map} +1 -1
  94. package/dist-vue/_chunks/{PkToolShowSuggestedReply-Bnhgsh4l.js → PkToolShowSuggestedReply-CxOyvAB6.js} +2 -2
  95. package/dist-vue/_chunks/{PkToolShowSuggestedReply-Bnhgsh4l.js.map → PkToolShowSuggestedReply-CxOyvAB6.js.map} +1 -1
  96. package/dist-vue/_chunks/{PkToolShowVideo-NOwtZPgI.js → PkToolShowVideo-C3SbJ3Zb.js} +2 -2
  97. package/dist-vue/_chunks/{PkToolShowVideo-NOwtZPgI.js.map → PkToolShowVideo-C3SbJ3Zb.js.map} +1 -1
  98. package/dist-vue/_chunks/{PkToolShowWebPages-DcPboNwp.js → PkToolShowWebPages-CjNhdQbq.js} +2 -2
  99. package/dist-vue/_chunks/{PkToolShowWebPages-DcPboNwp.js.map → PkToolShowWebPages-CjNhdQbq.js.map} +1 -1
  100. package/dist-vue/_chunks/{createChatbotApiClient-DAh91HyT.js → createChatbotApiClient-CesweDUX.js} +4 -3
  101. package/dist-vue/_chunks/{createChatbotApiClient-DAh91HyT.js.map → createChatbotApiClient-CesweDUX.js.map} +1 -1
  102. package/dist-vue/_chunks/{useChatbotStore-D1U24qc8.js → useChatbotStore-CNcPLoPf.js} +695 -635
  103. package/dist-vue/_chunks/useChatbotStore-CNcPLoPf.js.map +1 -0
  104. package/dist-vue/_chunks/{utils-DaAIWTtt.js → utils-PU7OuUYN.js} +2 -2
  105. package/dist-vue/_chunks/{utils-DaAIWTtt.js.map → utils-PU7OuUYN.js.map} +1 -1
  106. package/dist-vue/api.js +1 -1
  107. package/dist-vue/composables.js +4 -4
  108. package/dist-vue/index.js +24 -24
  109. package/dist-vue/packages/components/src/chat/useVoiceSession.d.ts +6 -0
  110. package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +2 -0
  111. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +61 -1
  112. package/dist-vue/packages/models/src/schema/Agent.d.ts +1 -0
  113. package/package.json +1 -1
  114. package/dist-vue/_chunks/PkChatbotMessages-qkodgdDE.js +0 -968
  115. package/dist-vue/_chunks/PkChatbotMessages-qkodgdDE.js.map +0 -1
  116. package/dist-vue/_chunks/PkChatbotViewChat-BNaSv86u.js.map +0 -1
  117. package/dist-vue/_chunks/useChatbotStore-D1U24qc8.js.map +0 -1
@@ -1,39 +1,39 @@
1
- import { t as e } from "./PkChatbotMessages-qkodgdDE.js";
1
+ import { t as e } from "./PkChatbotMessages-CcR2PKp3.js";
2
2
  import { o as t } from "./Media-DylqhvaF.js";
3
- import { a as n, n as r, t as i } from "./useChatbotStore-D1U24qc8.js";
3
+ import { a as n, n as r, t as i } from "./useChatbotStore-CNcPLoPf.js";
4
4
  import { n as a } from "./src-B-ZKEhTU.js";
5
- import { c as o, h as s, n as c } from "./utils-DaAIWTtt.js";
5
+ import { c as o, h as s, n as c } from "./utils-PU7OuUYN.js";
6
6
  import { t as l } from "./useLocalizedString-Dmn92nix.js";
7
7
  import { t as u } from "./PkAvatar-DwtZWSW4.js";
8
- import { n as d, t as f } from "./PkChatbotInput-BT51V-v4.js";
8
+ import { n as d, t as f } from "./PkChatbotInput-CiNeclez.js";
9
9
  import { t as p } from "./PkChatbotQueuedMessages-CIJFAvE2.js";
10
- import { t as ee } from "./PkChatbotEmptyState-B76oD7fB.js";
10
+ import { t as ee } from "./PkChatbotEmptyState-yO8Z-3p4.js";
11
11
  import { t as m } from "./PkChatbotWakeupBar-DEP-d-Fp.js";
12
12
  import { VvDialog as h, VvIcon as g } from "@volverjs/ui-vue/components";
13
- import { Fragment as _, Transition as v, computed as y, createBlock as b, createCommentVNode as x, createElementBlock as S, createElementVNode as C, createSlots as te, createTextVNode as ne, createVNode as w, defineAsyncComponent as T, defineComponent as E, isRef as re, nextTick as ie, normalizeClass as D, onBeforeUnmount as ae, onMounted as oe, onScopeDispose as se, onUnmounted as ce, openBlock as O, provide as le, ref as k, renderList as ue, shallowRef as A, toDisplayString as j, toValue as de, unref as M, useTemplateRef as fe, watch as N, withCtx as P } from "vue";
14
- import { useI18n as pe } from "vue-i18n";
15
- import { useDropZone as me, useElementSize as he } from "@vueuse/core";
16
- import { storeToRefs as ge } from "pinia";
13
+ import { Fragment as _, Transition as v, computed as y, createBlock as b, createCommentVNode as x, createElementBlock as S, createElementVNode as C, createSlots as te, createTextVNode as ne, createVNode as w, defineAsyncComponent as T, defineComponent as re, isRef as ie, nextTick as ae, normalizeClass as E, onBeforeUnmount as oe, onMounted as se, onScopeDispose as ce, onUnmounted as le, openBlock as D, provide as ue, ref as O, renderList as de, shallowRef as k, toDisplayString as A, toValue as fe, unref as j, useTemplateRef as pe, watch as M, withCtx as N } from "vue";
14
+ import { useI18n as me } from "vue-i18n";
15
+ import { useDropZone as he, useElementSize as ge } from "@vueuse/core";
16
+ import { storeToRefs as _e } from "pinia";
17
17
  // ../../packages/composable/src/chatbot/useGreeting.ts
18
- function _e(e, t) {
19
- let { locale: n, t: r, te: i } = pe({ useScope: "global" });
20
- return y(() => ve(de(e)?.greeting?.[0]?.[n.value] ?? "", de(t)) || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""));
21
- }
22
18
  function ve(e, t) {
19
+ let { locale: n, t: r, te: i } = me({ useScope: "global" });
20
+ return y(() => ye(fe(e)?.greeting?.[0]?.[n.value] ?? "", fe(t)) || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""));
21
+ }
22
+ function ye(e, t) {
23
23
  return (t ? e.replace(/\{name\}/g, t) : e.replace(/[,\s]*\{name\}[!?]?/g, "")).trim();
24
24
  }
25
25
  // ../../packages/components/src/chat/PkAuroraCanvas.vue?vue&type=script&setup=true&lang.ts
26
- var F = {
26
+ var P = {
27
27
  class: "pk-aurora",
28
28
  "aria-hidden": "true"
29
- }, ye = {
29
+ }, be = {
30
30
  key: 1,
31
31
  class: "pk-aurora__fallback"
32
- }, I = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", L = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\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 // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(u_color * alpha, alpha);\n}", be = /* @__PURE__ */ E({
32
+ }, F = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", I = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\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 // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(u_color * alpha, alpha);\n}", xe = /* @__PURE__ */ re({
33
33
  __name: "PkAuroraCanvas",
34
34
  props: { sourceSelector: {} },
35
35
  setup(e) {
36
- let t = e, n = fe("canvasEl"), r = k(!1), i = null, a = 0, o = null, s = null, c = null, l = null, u = null, d = null, f = performance.now(), p = (e, t) => {
36
+ let t = e, n = pe("canvasEl"), r = O(!1), i = null, a = 0, o = null, s = null, c = null, l = null, u = null, d = null, f = performance.now(), p = (e, t) => {
37
37
  if (!i) return null;
38
38
  let n = i.createShader(e);
39
39
  return !n || (i.shaderSource(n, t), i.compileShader(n), !i.getShaderParameter(n, i.COMPILE_STATUS)) ? null : n;
@@ -62,7 +62,7 @@ var F = {
62
62
  }, _ = () => {
63
63
  g(), a = requestAnimationFrame(_);
64
64
  };
65
- return oe(() => {
65
+ return se(() => {
66
66
  let e = n.value;
67
67
  i = e?.getContext("webgl", { alpha: !0 }) ?? null;
68
68
  let t = ee();
@@ -70,7 +70,7 @@ var F = {
70
70
  r.value = !0;
71
71
  return;
72
72
  }
73
- let a = p(i.VERTEX_SHADER, I), f = p(i.FRAGMENT_SHADER, L), v = i.createProgram();
73
+ let a = p(i.VERTEX_SHADER, F), f = p(i.FRAGMENT_SHADER, I), v = i.createProgram();
74
74
  if (!a || !f || !v || (i.attachShader(v, a), i.attachShader(v, f), i.linkProgram(v), !i.getProgramParameter(v, i.LINK_STATUS))) {
75
75
  r.value = !0;
76
76
  return;
@@ -88,22 +88,22 @@ var F = {
88
88
  1
89
89
  ]), i.STATIC_DRAW);
90
90
  let b = i.getAttribLocation(v, "a_position");
91
- i.enableVertexAttribArray(b), i.vertexAttribPointer(b, 2, i.FLOAT, !1, 0, 0), s = i.getUniformLocation(v, "u_time"), c = i.getUniformLocation(v, "u_resolution"), l = i.getUniformLocation(v, "u_center"), u = i.getUniformLocation(v, "u_half"), d = i.getUniformLocation(v, "u_spread"), i.uniform3f(i.getUniformLocation(v, "u_color"), ...t), o = new ResizeObserver(m), o.observe(e), m(), ie(m), h() ? g(10) : _();
92
- }), ae(() => {
91
+ i.enableVertexAttribArray(b), i.vertexAttribPointer(b, 2, i.FLOAT, !1, 0, 0), s = i.getUniformLocation(v, "u_time"), c = i.getUniformLocation(v, "u_resolution"), l = i.getUniformLocation(v, "u_center"), u = i.getUniformLocation(v, "u_half"), d = i.getUniformLocation(v, "u_spread"), i.uniform3f(i.getUniformLocation(v, "u_color"), ...t), o = new ResizeObserver(m), o.observe(e), m(), ae(m), h() ? g(10) : _();
92
+ }), oe(() => {
93
93
  cancelAnimationFrame(a), o?.disconnect();
94
- }), ce(() => {
94
+ }), le(() => {
95
95
  let e = i;
96
96
  i = null, setTimeout(() => {
97
97
  e?.getExtension("WEBGL_lose_context")?.loseContext();
98
98
  }, 150);
99
- }), (e, t) => (O(), S("div", F, [r.value ? (O(), S("div", ye)) : (O(), S("canvas", {
99
+ }), (e, t) => (D(), S("div", P, [r.value ? (D(), S("div", be)) : (D(), S("canvas", {
100
100
  key: 0,
101
101
  ref_key: "canvasEl",
102
102
  ref: n,
103
103
  class: "pk-aurora__canvas"
104
104
  }, null, 512))]));
105
105
  }
106
- }), R = .18, xe = .35, Se = /* @__PURE__ */ E({
106
+ }), L = .18, Se = .35, Ce = /* @__PURE__ */ re({
107
107
  __name: "PkVoiceOrb",
108
108
  props: {
109
109
  sample: {},
@@ -115,20 +115,20 @@ var F = {
115
115
  bars: { default: 5 }
116
116
  },
117
117
  setup(e) {
118
- let t = e, n = fe("barsEl"), r = Array.from({ length: t.bars }, () => R), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
118
+ let t = e, n = pe("barsEl"), r = Array.from({ length: t.bars }, () => L), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
119
119
  let e = Math.min(1, Math.max(0, t.sample())), n = t.spectrum?.(), i = r.length;
120
120
  if (!n?.length) {
121
121
  let t = Date.now() / 260;
122
122
  return Array.from({ length: i }, (n, r) => {
123
123
  let i = .65 + .35 * Math.sin(t + r * .9);
124
- return R + e * 2.4 * i;
124
+ return L + e * 2.4 * i;
125
125
  });
126
126
  }
127
127
  let a = Math.max(1, Math.floor(n.length / 2)), o = Math.max(1, Math.floor(a / i));
128
128
  return Array.from({ length: i }, (e, t) => {
129
129
  let r = 0;
130
130
  for (let e = 0; e < o; e += 1) r += n[t * o + e] ?? 0;
131
- return R + r / o / 255 * 2.2;
131
+ return L + r / o / 255 * 2.2;
132
132
  });
133
133
  }, s = () => {
134
134
  let e = n.value?.children;
@@ -137,36 +137,36 @@ var F = {
137
137
  });
138
138
  }, c = () => {
139
139
  let e = o();
140
- r = r.map((t, n) => t + (Math.min(1, Math.max(R, e[n] ?? R)) - t) * xe), s(), i = requestAnimationFrame(c);
140
+ r = r.map((t, n) => t + (Math.min(1, Math.max(L, e[n] ?? L)) - t) * Se), s(), i = requestAnimationFrame(c);
141
141
  }, l = () => {
142
142
  i !== void 0 && (cancelAnimationFrame(i), i = void 0);
143
143
  };
144
- return N(() => t.state, async (e) => {
145
- e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => R * 1.6), await ie(), s()) : i === void 0 && (i = requestAnimationFrame(c));
146
- }, { immediate: !0 }), ae(l), (t, r) => (O(), S("div", {
147
- class: D(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
144
+ return M(() => t.state, async (e) => {
145
+ e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => L * 1.6), await ae(), s()) : i === void 0 && (i = requestAnimationFrame(c));
146
+ }, { immediate: !0 }), oe(l), (t, r) => (D(), S("div", {
147
+ class: E(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
148
148
  "aria-hidden": "true"
149
149
  }, [C("div", {
150
150
  ref_key: "barsEl",
151
151
  ref: n,
152
152
  class: "pk-voice-orb__bars"
153
- }, [(O(!0), S(_, null, ue(e.bars, (e) => (O(), S("span", {
153
+ }, [(D(!0), S(_, null, de(e.bars, (e) => (D(), S("span", {
154
154
  key: e,
155
155
  class: "pk-voice-orb__bar"
156
156
  }))), 128))], 512)], 2));
157
157
  }
158
- }), Ce = {
158
+ }), we = {
159
159
  key: 0,
160
160
  class: "pk-voice-session__badge",
161
161
  "aria-hidden": "true"
162
- }, we = {
162
+ }, Te = {
163
163
  class: "pk-voice-session__status",
164
164
  role: "status"
165
- }, z = {
165
+ }, R = {
166
166
  key: 0,
167
167
  class: "pk-voice-session__live-dot",
168
168
  "aria-hidden": "true"
169
- }, B = ["title"], Te = ["title"], Ee = { class: "pk-voice-session__actions" }, De = /* @__PURE__ */ E({
169
+ }, z = ["title"], Ee = ["title"], De = { class: "pk-voice-session__actions" }, Oe = /* @__PURE__ */ re({
170
170
  __name: "PkVoiceSession",
171
171
  props: {
172
172
  state: {},
@@ -185,7 +185,7 @@ var F = {
185
185
  "dismiss"
186
186
  ],
187
187
  setup(e, { emit: t }) {
188
- let n = e, r = t, { t: i } = pe({ useScope: "global" }), a = y(() => 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 = y(() => {
188
+ let n = e, r = t, { t: i } = me({ useScope: "global" }), a = y(() => 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 = y(() => {
189
189
  if (n.remainingSeconds === void 0) return;
190
190
  let e = Math.floor(n.remainingSeconds / 60), t = n.remainingSeconds % 60;
191
191
  return `${e}:${String(t).padStart(2, "0")}`;
@@ -194,8 +194,8 @@ var F = {
194
194
  });
195
195
  return (t, n) => {
196
196
  let u = g;
197
- return O(), S("div", { class: D(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
198
- e.error ? (O(), S("span", Ce, [w(u, { name: "ri:error-warning-line" })])) : (O(), b(Se, {
197
+ return D(), S("div", { class: E(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
198
+ e.error ? (D(), S("span", we, [w(u, { name: "ri:error-warning-line" })])) : (D(), b(Ce, {
199
199
  key: 1,
200
200
  state: e.state,
201
201
  sample: e.sample,
@@ -205,37 +205,37 @@ var F = {
205
205
  "sample",
206
206
  "spectrum"
207
207
  ])),
208
- C("div", we, [C("span", { class: D(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (O(), S("span", z)) : x("", !0), ne(" " + j(a.value), 1)], 2), e.error ? (O(), S("p", {
208
+ C("div", Te, [C("span", { class: E(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (D(), S("span", R)) : x("", !0), ne(" " + A(a.value), 1)], 2), e.error ? (D(), S("p", {
209
209
  key: 0,
210
210
  class: "pk-voice-session__detail",
211
211
  title: e.rawError ?? e.error
212
- }, j(e.error), 9, B)) : x("", !0)]),
213
- o.value ? (O(), S("span", {
212
+ }, A(e.error), 9, z)) : x("", !0)]),
213
+ o.value ? (D(), S("span", {
214
214
  key: 2,
215
- class: D(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
216
- title: M(i)("hint.voiceRemaining"),
215
+ class: E(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
216
+ title: j(i)("hint.voiceRemaining"),
217
217
  "aria-hidden": "true"
218
- }, j(o.value), 11, Te)) : x("", !0),
219
- C("div", Ee, [e.error ? (O(), S(_, { key: 0 }, [w(d, {
218
+ }, A(o.value), 11, Ee)) : x("", !0),
219
+ C("div", De, [e.error ? (D(), S(_, { key: 0 }, [w(d, {
220
220
  icon: "ri:refresh-line",
221
- label: M(i)("action.retry"),
221
+ label: j(i)("action.retry"),
222
222
  onClick: n[0] ||= (e) => r("retry")
223
- }, null, 8, ["label"]), e.live ? (O(), b(d, {
223
+ }, null, 8, ["label"]), e.live ? (D(), b(d, {
224
224
  key: 0,
225
225
  icon: "ri:stop-circle-line",
226
226
  modifiers: "danger",
227
- title: M(i)("action.hangUp"),
228
- "aria-label": M(i)("action.hangUp"),
227
+ title: j(i)("action.hangUp"),
228
+ "aria-label": j(i)("action.hangUp"),
229
229
  onClick: n[1] ||= (e) => r("hang-up")
230
- }, null, 8, ["title", "aria-label"])) : (O(), b(d, {
230
+ }, null, 8, ["title", "aria-label"])) : (D(), b(d, {
231
231
  key: 1,
232
232
  icon: "ri:close-line",
233
- label: M(i)("action.close"),
233
+ label: j(i)("action.close"),
234
234
  onClick: n[2] ||= (e) => r("dismiss")
235
- }, null, 8, ["label"]))], 64)) : (O(), S(_, { key: 1 }, [w(d, {
235
+ }, null, 8, ["label"]))], 64)) : (D(), S(_, { key: 1 }, [w(d, {
236
236
  icon: e.muted ? "ri:mic-off-line" : "ri:mic-line",
237
- title: e.muted ? M(i)("action.unmute") : M(i)("action.mute"),
238
- "aria-label": e.muted ? M(i)("action.unmute") : M(i)("action.mute"),
237
+ title: e.muted ? j(i)("action.unmute") : j(i)("action.mute"),
238
+ "aria-label": e.muted ? j(i)("action.unmute") : j(i)("action.mute"),
239
239
  "aria-pressed": e.muted,
240
240
  onClick: n[3] ||= (e) => r("toggle-mute")
241
241
  }, null, 8, [
@@ -246,15 +246,15 @@ var F = {
246
246
  ]), w(d, {
247
247
  icon: "ri:stop-circle-line",
248
248
  modifiers: "danger",
249
- title: M(i)("action.hangUp"),
250
- "aria-label": M(i)("action.hangUp"),
249
+ title: j(i)("action.hangUp"),
250
+ "aria-label": j(i)("action.hangUp"),
251
251
  onClick: n[4] ||= (e) => r("hang-up")
252
252
  }, null, 8, ["title", "aria-label"])], 64))])
253
253
  ], 2);
254
254
  };
255
255
  }
256
- }), Oe = (e) => {
257
- let t = A(), n = k("disconnected"), r = k("listening"), i = k(), o = k([]), s = k(), c = k(), l, u, d = 0, f = !1, p = () => {
256
+ }), ke = (e) => {
257
+ let t = k(), n = O("disconnected"), r = O("listening"), i = O(), o = O([]), s = O(), c = O(), l, u, d = 0, f = !1, p = () => {
258
258
  u &&= (clearInterval(u), void 0), s.value = void 0;
259
259
  }, ee = (e) => {
260
260
  let t = Date.now() + e * 1e3, n = () => {
@@ -291,6 +291,7 @@ var F = {
291
291
  let h = await f.startSession({
292
292
  signedUrl: d.signedUrl,
293
293
  customLlmExtraBody: { voice_session_id: d.sessionId },
294
+ clientTools: e.clientTools?.() ?? {},
294
295
  onStatusChange: ({ status: e }) => {
295
296
  s() && (n.value = e);
296
297
  },
@@ -356,7 +357,7 @@ var F = {
356
357
  let r = t.value;
357
358
  t.value = void 0, r?.endSession().catch(() => void 0), n.value = "disconnected";
358
359
  };
359
- return typeof window < "u" && window.addEventListener("pagehide", C), se(() => {
360
+ return typeof window < "u" && window.addEventListener("pagehide", C), ce(() => {
360
361
  f = !0, typeof window < "u" && window.removeEventListener("pagehide", C), h();
361
362
  }), {
362
363
  status: n,
@@ -377,13 +378,13 @@ var F = {
377
378
  readLevel: x,
378
379
  readSpectrum: S
379
380
  };
380
- }, ke = 4e3, Ae = [
381
+ }, Ae = 4e3, je = [
381
382
  3e3,
382
383
  5e3,
383
384
  1e4
384
- ], je = 12e4, Me = 3e4;
385
- function Ne(e) {
386
- let t = k(null), n = k(!1), r, i = !1, a = () => {
385
+ ], Me = 12e4, Ne = 3e4;
386
+ function Pe(e) {
387
+ let t = O(null), n = O(!1), r, i = !1, a = () => {
387
388
  clearTimeout(r), r = void 0;
388
389
  }, o = (e, t) => {
389
390
  a(), i || (r = setTimeout(() => void t(), e));
@@ -400,12 +401,12 @@ function Ne(e) {
400
401
  }
401
402
  let r = t.value;
402
403
  if (r) {
403
- let e = Date.parse(r.dueAt) - Date.now() + ke;
404
- o(Math.max(ke, e), () => l(r.wakeId, Date.now(), 0));
404
+ let e = Date.parse(r.dueAt) - Date.now() + Ae;
405
+ o(Math.max(Ae, e), () => l(r.wakeId, Date.now(), 0));
405
406
  }
406
407
  }
407
408
  async function l(t, n, r) {
408
- await e.refreshMessages(), !i && (s(t) || Date.now() - n >= je ? await c() : o(Ae[Math.min(r, Ae.length - 1)], () => l(t, n, r + 1)));
409
+ await e.refreshMessages(), !i && (s(t) || Date.now() - n >= Me ? await c() : o(je[Math.min(r, je.length - 1)], () => l(t, n, r + 1)));
409
410
  }
410
411
  async function u() {
411
412
  n.value = !0;
@@ -430,11 +431,11 @@ function Ne(e) {
430
431
  f = void 0;
431
432
  }
432
433
  let h = y(() => e.messages().some((e) => e.role === "user"));
433
- N([e.chatId, h], ([, t]) => {
434
+ M([e.chatId, h], ([, t]) => {
434
435
  d();
435
436
  let n = e.status(), r = n === "submitted" || n === "streaming" || f === e.chatId();
436
437
  t && !r && c();
437
- }, { immediate: !0 }), N(e.status, (e, t) => {
438
+ }, { immediate: !0 }), M(e.status, (e, t) => {
438
439
  e === "ready" && t !== "ready" && h.value && c();
439
440
  });
440
441
  let g;
@@ -442,9 +443,9 @@ function Ne(e) {
442
443
  t.value && document.visibilityState === "visible" && e.apiClient().markChatWakeupPresence(e.agentId(), e.chatId()).catch(() => void 0);
443
444
  }
444
445
  let v = () => _();
445
- return document.addEventListener("visibilitychange", v), N(() => t.value?.wakeId, (e) => {
446
- clearInterval(g), g = void 0, e && !i && (_(), g = setInterval(_, Me));
447
- }), ae(() => {
446
+ return document.addEventListener("visibilitychange", v), M(() => t.value?.wakeId, (e) => {
447
+ clearInterval(g), g = void 0, e && !i && (_(), g = setInterval(_, Ne));
448
+ }), oe(() => {
448
449
  i = !0, a(), clearInterval(g), document.removeEventListener("visibilitychange", v);
449
450
  }), {
450
451
  pendingWakeup: t,
@@ -458,19 +459,19 @@ function Ne(e) {
458
459
  };
459
460
  }
460
461
  // ../../packages/components/src/chat/PkChatbotViewChat.vue?vue&type=script&setup=true&lang.ts
461
- var Pe = { class: "pk-chatbot-view-chat__input-stage" }, Fe = {
462
+ var Fe = { class: "pk-chatbot-view-chat__input-stage" }, Ie = {
462
463
  key: 1,
463
464
  class: "p-md border-t border-surface-3 text-center text-12 text-danger bg-surface-danger"
464
- }, Ie = { class: "pk-chatbot-view-chat__agent-chip" }, Le = {
465
+ }, Le = { class: "pk-chatbot-view-chat__agent-chip" }, Re = {
465
466
  key: 0,
466
467
  class: "pk-chatbot-view-chat__agent-chip-name"
467
- }, Re = {
468
+ }, ze = {
468
469
  key: 0,
469
470
  class: "pk-chatbot-view-chat__drop-overlay"
470
- }, ze = {
471
+ }, Be = {
471
472
  key: 1,
472
473
  class: "pk-chatbot-view-chat__preview"
473
- }, Be = 1e3, Ve = 3e3, He = 6e4, Ue = 3e5, We = 6e5, Ge = /* @__PURE__ */ E({
474
+ }, Ve = 1e3, He = 3e3, Ue = 6e4, We = 3e5, Ge = 6e5, Ke = /* @__PURE__ */ re({
474
475
  __name: "PkChatbotViewChat",
475
476
  props: {
476
477
  agentId: {},
@@ -479,258 +480,263 @@ var Pe = { class: "pk-chatbot-view-chat__input-stage" }, Fe = {
479
480
  },
480
481
  emits: ["show-info", "revise"],
481
482
  setup(a, { emit: d }) {
482
- let _ = T(() => import("./PkToolShowForm-Fv4iV0VY.js").then((e) => e.n)), ne = T(() => import("./PkToolShowContactForm-xHBTmITM.js").then((e) => e.n)), E = T(() => import("./PkToolShowSuggestedReply-Bnhgsh4l.js").then((e) => e.n)), ie = T(() => import("./PkToolShowSources-C4rKpypf.js").then((e) => e.n)), oe = T(() => import("./PkToolRequestGeolocation-e8vyxTI_.js")), se = T(() => import("./PkToolRequestOAuthConnection-3zLvNF_c.js")), ce = T(() => import("./PkToolShowLocation-Cq0IXye1.js").then((e) => e.n)), ue = T(() => import("./PkToolShowDiagram-DrJs92dg.js")), A = T(() => import("./PkToolChatFile-BJsDSu1Q.js")), de = T(() => import("./PkToolShareDocument-CRghPfep.js").then((e) => e.n)), ve = T(() => import("./PkFilePreview-Cx6jmJCD.js")), F = a, ye = d, I = r(F.agentId), { agentInterface: L, agentFileUpload: R, agentType: xe, agentVoice: Se, actions: Ce, revisedAnswers: we, messages: z, chat: B, messageFeedbacks: Te, feedbackDialogMessage: Ee, isFeedbackSubmitting: ke, isFeedbackSubmitted: Ae, feedbackSubmitError: je, isLeadSubmitted: Me, isLoadingSubmitLead: Ge, submitLeadError: Ke, input: V, inputMessagePlaceholder: qe, isConversationBlocked: Je, baseUrl: Ye, pendingAttachments: Xe, isAttachmentLimitReached: Ze, fileLimitError: Qe, apiClient: H, isDark: $e, hostToolsPending: et, pageNoticeLevel: tt, hostConfirmation: nt, agentPageAccess: rt, hostStepTitles: it, canQueue: at, queuedMessages: ot, backgroundAnswers: st, inputFocusRequest: ct } = ge(I);
483
- le(c, it);
484
- let lt = fe("inputEl");
485
- N(ct, () => {
486
- lt.value?.focus();
483
+ let _ = T(() => import("./PkToolShowForm-DuX1By1C.js").then((e) => e.n)), ne = T(() => import("./PkToolShowContactForm-BNta1jh0.js").then((e) => e.n)), re = T(() => import("./PkToolShowSuggestedReply-CxOyvAB6.js").then((e) => e.n)), ae = T(() => import("./PkToolShowSources-89OXReX8.js").then((e) => e.n)), se = T(() => import("./PkToolRequestGeolocation-Bzu1fQ-X.js")), ce = T(() => import("./PkToolRequestOAuthConnection-C8t_5YtB.js")), le = T(() => import("./PkToolShowLocation-Cq0IXye1.js").then((e) => e.n)), de = T(() => import("./PkToolShowDiagram-BRHpp_P-.js")), k = T(() => import("./PkToolChatFile-CMcJl0hu.js")), fe = T(() => import("./PkToolShareDocument-CRghPfep.js").then((e) => e.n)), ye = T(() => import("./PkFilePreview-Cx6jmJCD.js")), P = a, be = d, F = r(P.agentId), { agentInterface: I, agentFileUpload: L, agentType: Se, agentVoice: Ce, actions: we, revisedAnswers: Te, messages: R, chat: z, messageFeedbacks: Ee, feedbackDialogMessage: De, isFeedbackSubmitting: Ae, isFeedbackSubmitted: je, feedbackSubmitError: Me, isLeadSubmitted: Ne, isLoadingSubmitLead: Ke, submitLeadError: qe, input: B, inputMessagePlaceholder: Je, isConversationBlocked: Ye, baseUrl: Xe, pendingAttachments: Ze, isAttachmentLimitReached: Qe, fileLimitError: $e, apiClient: V, isDark: et, hostToolsPending: tt, pageNoticeLevel: nt, hostConfirmation: rt, agentPageAccess: it, hostStepTitles: at, canQueue: ot, queuedMessages: st, backgroundAnswers: ct, inputFocusRequest: lt } = _e(F);
484
+ ue(c, at);
485
+ let ut = pe("inputEl");
486
+ M(lt, () => {
487
+ ut.value?.focus();
487
488
  });
488
- let U = y(() => xe.value === "reasoning" ? void 0 : R.value), W = (e) => H.value.getMediaDownloadUrl(F.agentId, I.localChatId, e), { handleSubmit: ut, stopGeneration: dt, regenerate: ft, onUpvote: pt, onDownvote: mt, onFeedback: ht, onFeedbackSubmit: gt, onLeadSubmit: _t, startNewChat: vt, addToolOutput: yt, addToolApprovalResponse: bt, handleFileSelect: xt, clearFileLimitError: St, refreshMessages: Ct, appendMessage: wt, closePageNotice: Tt, respondHostConfirmation: Et, editQueuedMessage: Dt, removeQueuedMessage: Ot, openBackgroundAnswer: kt, dismissBackgroundAnswer: At } = I, { t: G } = pe({ useScope: "global" }), jt = y(() => et.value > 0), Mt = y(() => jt.value && B.value.status === "ready" ? "streaming" : B.value.status), Nt = l(() => rt.value?.notice), Pt = y(() => tt.value ? Nt.value || G(`message.pageAccessNotice.${tt.value}`) : void 0), Ft = y(() => {
489
- let e = Qe.value;
490
- if (e) return e.reason === "per-chat" ? G("message.fileLimitPerChat", { max: e.max }) : G("message.fileLimitPerMessage", { max: e.max });
491
- }), It = y(() => st.value.map(({ chatId: e, title: t }) => ({
489
+ let H = y(() => Se.value === "reasoning" ? void 0 : L.value), U = (e) => V.value.getMediaDownloadUrl(P.agentId, F.localChatId, e), { handleSubmit: dt, stopGeneration: ft, regenerate: pt, onUpvote: mt, onDownvote: ht, onFeedback: gt, onFeedbackSubmit: _t, onLeadSubmit: vt, startNewChat: yt, addToolOutput: bt, addToolApprovalResponse: xt, handleFileSelect: St, clearFileLimitError: Ct, refreshMessages: wt, appendMessage: Tt, closePageNotice: Et, respondHostConfirmation: Dt, editQueuedMessage: Ot, removeQueuedMessage: kt, openBackgroundAnswer: At, dismissBackgroundAnswer: jt } = F, { t: W } = me({ useScope: "global" }), Mt = y(() => tt.value > 0), Nt = y(() => Mt.value && z.value.status === "ready" ? "streaming" : z.value.status), Pt = l(() => it.value?.notice), Ft = y(() => nt.value ? Pt.value || W(`message.pageAccessNotice.${nt.value}`) : void 0), It = y(() => {
490
+ let e = $e.value;
491
+ if (e) return e.reason === "per-chat" ? W("message.fileLimitPerChat", { max: e.max }) : W("message.fileLimitPerMessage", { max: e.max });
492
+ }), Lt = y(() => ct.value.map(({ chatId: e, title: t }) => ({
492
493
  id: e,
493
- text: t ? G("message.backgroundAnswerReady", { title: t }) : G("message.backgroundAnswerReadyUntitled")
494
- }))), Lt = l(() => L.value?.dismissableNotice), Rt = y(() => z.value.some((e) => e.role === "user")), zt = y(() => F.modifier === "fullscreen" && !Rt.value), Bt = _e(L, () => F.userName), Vt = fe("chatViewEl"), { width: Ht } = he(Vt, {
494
+ text: t ? W("message.backgroundAnswerReady", { title: t }) : W("message.backgroundAnswerReadyUntitled")
495
+ }))), Rt = l(() => I.value?.dismissableNotice), zt = y(() => R.value.some((e) => e.role === "user")), Bt = y(() => P.modifier === "fullscreen" && !zt.value), Vt = ve(I, () => P.userName), Ht = pe("chatViewEl"), { width: Ut } = ge(Ht, {
495
496
  width: 0,
496
497
  height: 0
497
- }, { box: "border-box" }), Ut = y(() => Ht.value >= Be), Wt = y(() => Ht.value > 0 && Ht.value < 576), K = k(), Gt = k(), q = k(!1), Kt = k(!1), qt = /* @__PURE__ */ new Map(), Jt = async (e) => {
498
- K.value = e, Kt.value = !1;
499
- let t = qt.get(e.storedFileName);
500
- if (Gt.value = t, q.value = !1, t) return;
501
- q.value = !0;
502
- let n = () => K.value?.storedFileName === e.storedFileName;
498
+ }, { box: "border-box" }), Wt = y(() => Ut.value >= Ve), Gt = y(() => Ut.value > 0 && Ut.value < 576), G = O(), Kt = O(), K = O(!1), qt = O(!1), Jt = /* @__PURE__ */ new Map(), Yt = async (e) => {
499
+ G.value = e, qt.value = !1;
500
+ let t = Jt.get(e.storedFileName);
501
+ if (Kt.value = t, K.value = !1, t) return;
502
+ K.value = !0;
503
+ let n = () => G.value?.storedFileName === e.storedFileName;
503
504
  try {
504
- let t = await H.value.getChatFilePreview(F.agentId, I.localChatId, e.storedFileName);
505
- qt.set(e.storedFileName, t), n() && (Gt.value = t);
505
+ let t = await V.value.getChatFilePreview(P.agentId, F.localChatId, e.storedFileName);
506
+ Jt.set(e.storedFileName, t), n() && (Kt.value = t);
506
507
  } catch {
507
- n() && (Kt.value = !0);
508
+ n() && (qt.value = !0);
508
509
  } finally {
509
- n() && (q.value = !1);
510
+ n() && (K.value = !1);
510
511
  }
511
- }, Yt = () => {
512
- K.value = void 0;
513
- }, Xt = y({
514
- get: () => !!K.value && !Ut.value,
512
+ }, Xt = () => {
513
+ G.value = void 0;
514
+ }, Zt = y({
515
+ get: () => !!G.value && !Wt.value,
515
516
  set: (e) => {
516
- e || Yt();
517
+ e || Xt();
517
518
  }
518
519
  });
519
- N(() => I.localChatId, () => {
520
- Yt(), qt.clear();
520
+ M(() => F.localChatId, () => {
521
+ Xt(), Jt.clear();
521
522
  });
522
- let Zt = async (e) => (await H.value.expandSourceContext(F.agentId, e.documentId, e.chunkIndex)).content, Qt = async (e) => {
523
- let t = await H.value.downloadSourceDocument(F.agentId, e);
523
+ let Qt = async (e) => (await V.value.expandSourceContext(P.agentId, e.documentId, e.chunkIndex)).content, $t = async (e) => {
524
+ let t = await V.value.downloadSourceDocument(P.agentId, e);
524
525
  window.open(t.downloadUrl, "_blank");
525
- }, { isOverDropZone: $t } = me(Vt, {
526
- dataTypes: (e) => t(e, U.value?.allowedMimeTypes ?? []),
526
+ }, { isOverDropZone: en } = he(Ht, {
527
+ dataTypes: (e) => t(e, H.value?.allowedMimeTypes ?? []),
527
528
  onDrop: (e) => {
528
- if (U.value?.enabled && e) for (let t of e) xt(t);
529
+ if (H.value?.enabled && e) for (let t of e) St(t);
529
530
  }
530
- }), J = k(!1), Y = !1, X = k(!1), en = [
531
+ }), q = O(!1), J = !1, Y = O(!1), tn = [
531
532
  3e3,
532
533
  5e3,
533
534
  1e4
534
- ], tn, Z, nn = !1, rn = 0, an = !1;
535
- function on() {
536
- clearTimeout(tn), tn = void 0, Z = void 0, nn = !1, rn = 0, X.value = !1;
535
+ ], nn, X, rn = !1, an = 0, on = !1;
536
+ function sn() {
537
+ clearTimeout(nn), nn = void 0, X = void 0, rn = !1, an = 0, Y.value = !1;
537
538
  }
538
- function sn(e) {
539
- Y || (clearTimeout(tn), tn = setTimeout(() => {
540
- cn();
539
+ function cn(e) {
540
+ J || (clearTimeout(nn), nn = setTimeout(() => {
541
+ ln();
541
542
  }, e));
542
543
  }
543
- async function cn() {
544
- if (Y || an) return;
545
- an = !0;
544
+ async function ln() {
545
+ if (J || on) return;
546
+ on = !0;
546
547
  let e;
547
548
  try {
548
- e = await Ct();
549
+ e = await wt();
549
550
  } finally {
550
- an = !1;
551
+ on = !1;
551
552
  }
552
- if (Y) return;
553
- if (e === "caught-up" && (X.value = !1, Ln()), Q.isActive.value) {
554
- Z = void 0, nn = !1, rn = 0, sn(Ve);
553
+ if (J) return;
554
+ if (e === "caught-up" && (Y.value = !1, Rn()), Z.isActive.value) {
555
+ X = void 0, rn = !1, an = 0, cn(He);
555
556
  return;
556
557
  }
557
- Z === void 0 && (Z = Date.now(), nn = !!Q.error.value);
558
- let t = Date.now() - Z;
559
- if (e === "caught-up" && t >= (nn ? Ue : He) || t >= We) {
560
- on(), Rn();
558
+ X === void 0 && (X = Date.now(), rn = !!Z.error.value);
559
+ let t = Date.now() - X;
560
+ if (e === "caught-up" && t >= (rn ? We : Ue) || t >= Ge) {
561
+ sn(), zn();
561
562
  return;
562
563
  }
563
- let n = en[Math.min(rn, en.length - 1)];
564
- rn += 1, sn(n);
564
+ let n = tn[Math.min(an, tn.length - 1)];
565
+ an += 1, cn(n);
565
566
  }
566
- let ln = (e = 1200) => {
567
- sn(e);
568
- }, Q = Oe({
567
+ let un = (e = 1200) => {
568
+ cn(e);
569
+ }, dn, Z = ke({
569
570
  fetchGrant: async () => {
570
- let e = await H.value.createVoiceSession(F.agentId, I.localChatId, {
571
- deviceContext: I.buildDeviceContext(),
572
- externalContext: I.externalContext
571
+ dn = F.voicePageTools();
572
+ let e = await V.value.createVoiceSession(P.agentId, F.localChatId, {
573
+ deviceContext: F.buildDeviceContext(),
574
+ externalContext: F.externalContext,
575
+ pageTools: dn?.declaration
573
576
  });
574
- return e.chatId !== I.localChatId && (I.localChatId = e.chatId), e;
577
+ return e.chatId !== F.localChatId && (F.localChatId = e.chatId), e;
575
578
  },
576
- closeGrant: (e) => H.value.closeVoiceSession(F.agentId, e),
579
+ closeGrant: (e) => V.value.closeVoiceSession(P.agentId, e),
580
+ clientTools: () => dn?.clientTools,
577
581
  onTranscript: (e) => {
578
- e.role === "user" ? (X.value = !0, In(), wt({
582
+ e.role === "user" ? (Y.value = !0, Ln(), Tt({
579
583
  id: `${i}user-${n()}`,
580
584
  role: "user",
581
585
  parts: [{
582
586
  type: "text",
583
587
  text: e.text
584
588
  }]
585
- })) : X.value = !1;
589
+ })) : Y.value = !1;
586
590
  },
587
591
  onTurnEnd: () => {
588
- ln();
592
+ un();
589
593
  }
590
594
  });
591
- N(() => Q.error.value, (e) => {
592
- e && (X.value = !1);
595
+ M(() => Z.isActive.value, (e) => {
596
+ e || F.cancelVoicePageCalls();
597
+ }), M(() => Z.error.value, (e) => {
598
+ e && (Y.value = !1);
593
599
  });
594
- let un = y(() => Se.value?.enabled === !0), dn = y(() => Q.error.value ? "error" : Q.isConnecting.value ? "connecting" : Q.isSpeaking.value ? "speaking" : Q.isActive.value ? "listening" : "idle"), fn = y(() => {
595
- let e = Q.error.value;
596
- if (e) return /took too long/i.test(e) ? G("message.voiceTookTooLong") : /cascade|no response|custom_llm_error/i.test(e) ? G("message.voiceNoAnswer") : G("message.voiceInterrupted");
597
- }), pn = y(() => Q.isSpeaking.value ? "output" : "input"), mn = () => Q.readLevel(pn.value), hn = () => Q.readSpectrum(pn.value), gn = async () => {
598
- J.value = !1, await Q.start(), Q.isActive.value && (on(), sn(Ve));
599
- }, _n = async () => {
600
- X.value = !1, await Q.stop(), !Y && ln(0);
601
- }, vn = () => {
602
- Q.dismissError();
600
+ let fn = y(() => Ce.value?.enabled === !0), pn = y(() => Z.error.value ? "error" : Z.isConnecting.value ? "connecting" : Z.isSpeaking.value ? "speaking" : Z.isActive.value ? "listening" : "idle"), mn = y(() => {
601
+ let e = Z.error.value;
602
+ if (e) return /took too long/i.test(e) ? W("message.voiceTookTooLong") : /cascade|no response|custom_llm_error/i.test(e) ? W("message.voiceNoAnswer") : W("message.voiceInterrupted");
603
+ }), hn = y(() => Z.isSpeaking.value ? "output" : "input"), gn = () => Z.readLevel(hn.value), _n = () => Z.readSpectrum(hn.value), vn = async () => {
604
+ q.value = !1, await Z.start(), Z.isActive.value && (sn(), cn(He));
603
605
  }, yn = async () => {
604
- Q.dismissError(), await Q.stop(), await gn();
605
- }, $ = (e) => e?.toolCallId ?? "", bn = k(/* @__PURE__ */ new Set()), xn = (e) => bn.value.has($(e)), Sn = k(/* @__PURE__ */ new Map()), Cn = (e, t) => Q.isActive.value ? (Q.sendUserMessage(t) && (bn.value = new Set(bn.value).add($(e)), ln()), !0) : !1, wn = (e, t, n) => {
606
- Cn(t, o(t, n)) || yt({
606
+ Y.value = !1, await Z.stop(), !J && un(0);
607
+ }, bn = () => {
608
+ Z.dismissError();
609
+ }, xn = async () => {
610
+ Z.dismissError(), await Z.stop(), await vn();
611
+ }, Q = (e) => e?.toolCallId ?? "", Sn = O(/* @__PURE__ */ new Set()), Cn = (e) => Sn.value.has(Q(e)), wn = O(/* @__PURE__ */ new Map()), $ = (e, t) => Z.isActive.value ? (Z.sendUserMessage(t) && (Sn.value = new Set(Sn.value).add(Q(e)), un()), !0) : !1, Tn = (e, t, n) => {
612
+ $(t, o(t, n)) || bt({
607
613
  tool: e,
608
- toolCallId: $(t),
614
+ toolCallId: Q(t),
609
615
  output: n
610
616
  });
611
- }, Tn = (e) => {
612
- let t = e.confirmed ? G("message.voiceConfirmed") : G("message.voiceCancelled");
613
- Cn({ toolCallId: e.toolCallId }, t) ? bn.value.has(e.toolCallId) && (Sn.value = new Map(Sn.value).set(e.toolCallId, e.confirmed)) : yt({
617
+ }, En = (e) => {
618
+ let t = e.confirmed ? W("message.voiceConfirmed") : W("message.voiceCancelled");
619
+ $({ toolCallId: e.toolCallId }, t) ? Sn.value.has(e.toolCallId) && (wn.value = new Map(wn.value).set(e.toolCallId, e.confirmed)) : bt({
614
620
  tool: "requestConfirm",
615
621
  toolCallId: e.toolCallId,
616
622
  output: e.confirmed ? "confirmed" : "cancelled"
617
623
  });
618
- }, En = /* @__PURE__ */ new Set([
624
+ }, Dn = /* @__PURE__ */ new Set([
619
625
  "tool-editSpreadsheet",
620
626
  "tool-editWordDocument",
621
627
  "tool-createSpreadsheet",
622
628
  "tool-createWordDocument"
623
- ]), Dn = y(() => {
629
+ ]), On = y(() => {
624
630
  let e = /* @__PURE__ */ new Map();
625
- for (let t of z.value) for (let n of t.parts) {
631
+ for (let t of R.value) for (let n of t.parts) {
626
632
  let { type: t, state: r, output: i } = n;
627
- En.has(t) && r === "output-available" && i?.fileId && i.version && e.set(i.fileId, Math.max(e.get(i.fileId) ?? 0, i.version));
633
+ Dn.has(t) && r === "output-available" && i?.fileId && i.version && e.set(i.fileId, Math.max(e.get(i.fileId) ?? 0, i.version));
628
634
  }
629
635
  return e;
630
- }), On = y(() => Je.value ? void 0 : (e) => {
631
- V.value = G("messagePart.chatFileRestoreRequest", e), ut();
632
- }), kn = (e, t) => {
633
- Cn(e, t) || (V.value = t, ut());
634
- }, An = (e, t) => {
635
- let n = t.error ? G("message.voiceLocationRefused") : G("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
636
- Cn(e, n) || yt({
636
+ }), kn = y(() => Ye.value ? void 0 : (e) => {
637
+ B.value = W("messagePart.chatFileRestoreRequest", e), dt();
638
+ }), An = (e, t) => {
639
+ $(e, t) || (B.value = t, dt());
640
+ }, jn = (e, t) => {
641
+ let n = t.error ? W("message.voiceLocationRefused") : W("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
642
+ $(e, n) || bt({
637
643
  tool: "requestGeolocation",
638
- toolCallId: $(e),
644
+ toolCallId: Q(e),
639
645
  output: t
640
646
  });
641
- }, jn = (e, t) => {
642
- Cn(e, G("message.voiceConnectionDone")) || yt({
647
+ }, Mn = (e, t) => {
648
+ $(e, W("message.voiceConnectionDone")) || bt({
643
649
  tool: "requestOAuthConnection",
644
- toolCallId: $(e),
650
+ toolCallId: Q(e),
645
651
  output: {
646
652
  connected: !0,
647
653
  mcpServerId: t
648
654
  }
649
655
  });
650
- }, Mn = () => {
651
- J.value = !J.value, Q.setMuted(J.value);
656
+ }, Nn = () => {
657
+ q.value = !q.value, Z.setMuted(q.value);
652
658
  };
653
- ae(() => {
654
- Y = !0, on();
659
+ oe(() => {
660
+ J = !0, sn();
655
661
  });
656
- let { pendingWakeup: Nn, isStopping: Pn, stop: Fn, spokenTurnStarted: In, spokenTurnsWritten: Ln, forgetSpokenTurns: Rn } = Ne({
657
- agentId: () => F.agentId,
658
- chatId: () => I.localChatId,
659
- apiClient: () => H.value,
660
- messages: () => z.value,
661
- refreshMessages: Ct,
662
- status: () => B.value.status
662
+ let { pendingWakeup: Pn, isStopping: Fn, stop: In, spokenTurnStarted: Ln, spokenTurnsWritten: Rn, forgetSpokenTurns: zn } = Pe({
663
+ agentId: () => P.agentId,
664
+ chatId: () => F.localChatId,
665
+ apiClient: () => V.value,
666
+ messages: () => R.value,
667
+ refreshMessages: wt,
668
+ status: () => z.value.status
663
669
  });
664
670
  return (t, n) => {
665
671
  let r = g, i = h;
666
- return O(), S("div", {
672
+ return D(), S("div", {
667
673
  ref_key: "chatViewEl",
668
- ref: Vt,
669
- class: D(["pk-chatbot-view-chat", {
670
- "pk-chatbot-view-chat--dragover": M($t) && U.value?.enabled,
671
- "pk-chatbot-view-chat--empty": zt.value,
672
- "pk-chatbot-view-chat--with-preview": !!K.value && Ut.value
674
+ ref: Ht,
675
+ class: E(["pk-chatbot-view-chat", {
676
+ "pk-chatbot-view-chat--dragover": j(en) && H.value?.enabled,
677
+ "pk-chatbot-view-chat--empty": Bt.value,
678
+ "pk-chatbot-view-chat--with-preview": !!G.value && Wt.value
673
679
  }])
674
680
  }, [
675
681
  w(v, {
676
682
  name: "pk-chatbot-view-chat-fade",
677
683
  mode: "out-in"
678
684
  }, {
679
- default: P(() => [zt.value ? (O(), b(ee, {
685
+ default: N(() => [Bt.value ? (D(), b(ee, {
680
686
  key: 0,
681
- greeting: M(Bt),
682
- logo: M(L)?.logo,
683
- name: M(I).name
687
+ greeting: j(Vt),
688
+ logo: j(I)?.logo,
689
+ name: j(F).name
684
690
  }, null, 8, [
685
691
  "greeting",
686
692
  "logo",
687
693
  "name"
688
- ])) : (O(), b(e, {
694
+ ])) : (D(), b(e, {
689
695
  key: 1,
690
696
  class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
691
697
  interactive: "",
692
- messages: M(z),
693
- "confirm-verdicts-on-call": Sn.value,
694
- status: M(B).status,
695
- error: M(B).error,
696
- "main-color": M(L)?.mainColor,
697
- "text-color": M(L)?.textColor,
698
- "revised-answers": M(we),
699
- actions: M(Ce),
700
- "message-feedbacks": M(Te),
701
- "feedback-message-id": M(Ee)?.id,
702
- "feedback-loading": M(ke),
703
- "feedback-submitted": M(Ae),
704
- "feedback-error": M(je),
705
- "show-extended-steps": M(L)?.showExtendedSteps,
706
- "hide-reasoning": M(L)?.showReasoning === !1,
707
- "awaiting-spoken-answer": X.value,
708
- "host-working": jt.value,
709
- "host-confirmation": M(nt),
710
- "is-dark": M($e),
698
+ messages: j(R),
699
+ "confirm-verdicts-on-call": wn.value,
700
+ status: j(z).status,
701
+ error: j(z).error,
702
+ "main-color": j(I)?.mainColor,
703
+ "text-color": j(I)?.textColor,
704
+ "revised-answers": j(Te),
705
+ actions: j(we),
706
+ "message-feedbacks": j(Ee),
707
+ "feedback-message-id": j(De)?.id,
708
+ "feedback-loading": j(Ae),
709
+ "feedback-submitted": j(je),
710
+ "feedback-error": j(Me),
711
+ "show-extended-steps": j(I)?.showExtendedSteps,
712
+ "hide-reasoning": j(I)?.showReasoning === !1,
713
+ "awaiting-spoken-answer": Y.value,
714
+ "host-working": Mt.value,
715
+ "host-confirmation": j(rt),
716
+ "is-dark": j(et),
711
717
  "show-scroll-to-bottom": a.modifier === "fullscreen",
712
- onFeedbackSubmit: n[0] ||= (e) => M(gt)(e),
713
- onFeedbackClose: n[1] ||= (e) => Ee.value = void 0,
714
- onRegenerate: M(ft),
715
- onAutoRetry: M(ft),
716
- onResetChat: M(vt),
717
- onShowInfo: n[2] ||= (e) => ye("show-info", e),
718
- onRevise: n[3] ||= (e) => ye("revise", e),
719
- onUpvote: M(pt),
720
- onDownvote: M(mt),
721
- onFeedback: M(ht),
722
- onApprovalRespond: M(bt),
723
- onConfirmRespond: Tn,
724
- onHostConfirmRespond: M(Et)
718
+ onFeedbackSubmit: n[0] ||= (e) => j(_t)(e),
719
+ onFeedbackClose: n[1] ||= (e) => De.value = void 0,
720
+ onRegenerate: j(pt),
721
+ onAutoRetry: j(pt),
722
+ onResetChat: j(yt),
723
+ onShowInfo: n[2] ||= (e) => be("show-info", e),
724
+ onRevise: n[3] ||= (e) => be("revise", e),
725
+ onUpvote: j(mt),
726
+ onDownvote: j(ht),
727
+ onFeedback: j(gt),
728
+ onApprovalRespond: j(xt),
729
+ onConfirmRespond: En,
730
+ onHostConfirmRespond: j(Dt)
725
731
  }, {
726
- "tool-showContactForm": P(({ part: e }) => [w(M(ne), {
732
+ "tool-showContactForm": N(({ part: e }) => [w(j(ne), {
727
733
  part: e,
728
- readonly: !M(Ye),
729
- submitted: M(Me),
730
- loading: M(Ge),
731
- error: M(Ke),
732
- "privacy-policy-notice": M(L)?.privacyPolicyNotice,
733
- onSubmit: M(_t)
734
+ readonly: !j(Xe),
735
+ submitted: j(Ne),
736
+ loading: j(Ke),
737
+ error: j(qe),
738
+ "privacy-policy-notice": j(I)?.privacyPolicyNotice,
739
+ onSubmit: j(vt)
734
740
  }, null, 8, [
735
741
  "part",
736
742
  "readonly",
@@ -740,20 +746,20 @@ var Pe = { class: "pk-chatbot-view-chat__input-stage" }, Fe = {
740
746
  "privacy-policy-notice",
741
747
  "onSubmit"
742
748
  ])]),
743
- "tool-showSuggestedReply": P(({ part: e }) => [w(M(E), {
749
+ "tool-showSuggestedReply": N(({ part: e }) => [w(j(re), {
744
750
  part: e,
745
- onSelect: (t) => kn(e, t)
751
+ onSelect: (t) => An(e, t)
746
752
  }, null, 8, ["part", "onSelect"])]),
747
- "tool-showSources": P(({ part: e }) => [w(M(ie), {
753
+ "tool-showSources": N(({ part: e }) => [w(j(ae), {
748
754
  part: e,
749
- "on-expand-context": Zt,
750
- "on-download": Qt
755
+ "on-expand-context": Qt,
756
+ "on-download": $t
751
757
  }, null, 8, ["part"])]),
752
- "tool-showForm": P(({ part: e }) => [w(v, { mode: "out-in" }, {
753
- default: P(() => [w(M(_), {
758
+ "tool-showForm": N(({ part: e }) => [w(v, { mode: "out-in" }, {
759
+ default: N(() => [w(j(_), {
754
760
  part: e,
755
- answered: xn(e),
756
- onSelect: (t) => wn("showForm", e, t)
761
+ answered: Cn(e),
762
+ onSelect: (t) => Tn("showForm", e, t)
757
763
  }, null, 8, [
758
764
  "part",
759
765
  "answered",
@@ -761,12 +767,12 @@ var Pe = { class: "pk-chatbot-view-chat__input-stage" }, Fe = {
761
767
  ])]),
762
768
  _: 2
763
769
  }, 1024)]),
764
- "tool-showMultipleChoice": P(({ part: e }) => [w(v, { mode: "out-in" }, {
765
- default: P(() => [w(M(_), {
770
+ "tool-showMultipleChoice": N(({ part: e }) => [w(v, { mode: "out-in" }, {
771
+ default: N(() => [w(j(_), {
766
772
  part: e,
767
773
  "allow-custom-answer": "",
768
- answered: xn(e),
769
- onSelect: (t) => wn("showMultipleChoice", e, t)
774
+ answered: Cn(e),
775
+ onSelect: (t) => Tn("showMultipleChoice", e, t)
770
776
  }, null, 8, [
771
777
  "part",
772
778
  "answered",
@@ -774,12 +780,12 @@ var Pe = { class: "pk-chatbot-view-chat__input-stage" }, Fe = {
774
780
  ])]),
775
781
  _: 2
776
782
  }, 1024)]),
777
- "tool-requestOAuthConnection": P(({ part: e }) => [w(M(se), {
783
+ "tool-requestOAuthConnection": N(({ part: e }) => [w(j(ce), {
778
784
  part: e,
779
- "backend-url": M(Ye),
780
- "resolve-connection": (e) => M(H).getOAuthAuthorizeUrl(F.agentId, e),
781
- "check-connection": (e) => M(H).getOAuthConnectionStatus(F.agentId, e),
782
- onConnected: (t) => jn(e, t)
785
+ "backend-url": j(Xe),
786
+ "resolve-connection": (e) => j(V).getOAuthAuthorizeUrl(P.agentId, e),
787
+ "check-connection": (e) => j(V).getOAuthConnectionStatus(P.agentId, e),
788
+ onConnected: (t) => Mn(e, t)
783
789
  }, null, 8, [
784
790
  "part",
785
791
  "backend-url",
@@ -787,152 +793,152 @@ var Pe = { class: "pk-chatbot-view-chat__input-stage" }, Fe = {
787
793
  "check-connection",
788
794
  "onConnected"
789
795
  ])]),
790
- "tool-requestGeolocation": P(({ part: e }) => [w(M(oe), {
796
+ "tool-requestGeolocation": N(({ part: e }) => [w(j(se), {
791
797
  part: e,
792
- "call-live": M(Q).isActive.value,
793
- "reverse-geocode": (e, t) => M(H).reverseGeocode(e, t),
794
- onResult: (t) => An(e, t)
798
+ "call-live": j(Z).isActive.value,
799
+ "reverse-geocode": (e, t) => j(V).reverseGeocode(e, t),
800
+ onResult: (t) => jn(e, t)
795
801
  }, null, 8, [
796
802
  "part",
797
803
  "call-live",
798
804
  "reverse-geocode",
799
805
  "onResult"
800
806
  ])]),
801
- "tool-showLocation": P(({ part: e }) => [w(M(ce), {
807
+ "tool-showLocation": N(({ part: e }) => [w(j(le), {
802
808
  part: e,
803
- "is-dark": M($e),
804
- "main-color": M(L)?.mainColor,
805
- "forward-geocode": (e, t) => M(H).forwardGeocode(e, t)
809
+ "is-dark": j(et),
810
+ "main-color": j(I)?.mainColor,
811
+ "forward-geocode": (e, t) => j(V).forwardGeocode(e, t)
806
812
  }, null, 8, [
807
813
  "part",
808
814
  "is-dark",
809
815
  "main-color",
810
816
  "forward-geocode"
811
817
  ])]),
812
- "tool-showDiagram": P(({ part: e }) => [w(M(ue), {
818
+ "tool-showDiagram": N(({ part: e }) => [w(j(de), {
813
819
  part: e,
814
- "is-dark": M($e)
820
+ "is-dark": j(et)
815
821
  }, null, 8, ["part", "is-dark"])]),
816
- "tool-editSpreadsheet": P(({ part: e }) => [(O(), b(M(A), {
817
- key: M(s)(e),
822
+ "tool-editSpreadsheet": N(({ part: e }) => [(D(), b(j(k), {
823
+ key: j(s)(e),
818
824
  part: e,
819
- "file-url": W,
820
- preview: Jt,
821
- "latest-versions": Dn.value,
822
- restore: On.value
825
+ "file-url": U,
826
+ preview: Yt,
827
+ "latest-versions": On.value,
828
+ restore: kn.value
823
829
  }, null, 8, [
824
830
  "part",
825
831
  "latest-versions",
826
832
  "restore"
827
833
  ]))]),
828
- "tool-editWordDocument": P(({ part: e }) => [(O(), b(M(A), {
829
- key: M(s)(e),
834
+ "tool-editWordDocument": N(({ part: e }) => [(D(), b(j(k), {
835
+ key: j(s)(e),
830
836
  part: e,
831
- "file-url": W,
832
- preview: Jt,
833
- "latest-versions": Dn.value,
834
- restore: On.value
837
+ "file-url": U,
838
+ preview: Yt,
839
+ "latest-versions": On.value,
840
+ restore: kn.value
835
841
  }, null, 8, [
836
842
  "part",
837
843
  "latest-versions",
838
844
  "restore"
839
845
  ]))]),
840
- "tool-createSpreadsheet": P(({ part: e }) => [(O(), b(M(A), {
841
- key: M(s)(e),
846
+ "tool-createSpreadsheet": N(({ part: e }) => [(D(), b(j(k), {
847
+ key: j(s)(e),
842
848
  part: e,
843
- "file-url": W,
844
- preview: Jt,
845
- "latest-versions": Dn.value,
846
- restore: On.value
849
+ "file-url": U,
850
+ preview: Yt,
851
+ "latest-versions": On.value,
852
+ restore: kn.value
847
853
  }, null, 8, [
848
854
  "part",
849
855
  "latest-versions",
850
856
  "restore"
851
857
  ]))]),
852
- "tool-createWordDocument": P(({ part: e }) => [(O(), b(M(A), {
853
- key: M(s)(e),
858
+ "tool-createWordDocument": N(({ part: e }) => [(D(), b(j(k), {
859
+ key: j(s)(e),
854
860
  part: e,
855
- "file-url": W,
856
- preview: Jt,
857
- "latest-versions": Dn.value,
858
- restore: On.value
861
+ "file-url": U,
862
+ preview: Yt,
863
+ "latest-versions": On.value,
864
+ restore: kn.value
859
865
  }, null, 8, [
860
866
  "part",
861
867
  "latest-versions",
862
868
  "restore"
863
869
  ]))]),
864
- "tool-shareDocument": P(({ part: e }) => [(O(), b(M(de), {
865
- key: M(s)(e),
870
+ "tool-shareDocument": N(({ part: e }) => [(D(), b(j(fe), {
871
+ key: j(s)(e),
866
872
  part: e,
867
- "on-download": Qt
873
+ "on-download": $t
868
874
  }, null, 8, ["part"]))]),
869
875
  _: 1
870
876
  }, 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(".")))]),
871
877
  _: 1
872
878
  }),
873
- M(ot).length ? (O(), b(p, {
879
+ j(st).length ? (D(), b(p, {
874
880
  key: 0,
875
- messages: M(ot),
876
- onEdit: M(Dt),
877
- onRemove: M(Ot)
881
+ messages: j(st),
882
+ onEdit: j(Ot),
883
+ onRemove: j(kt)
878
884
  }, null, 8, [
879
885
  "messages",
880
886
  "onEdit",
881
887
  "onRemove"
882
888
  ])) : x("", !0),
883
- C("div", Pe, [
889
+ C("div", Fe, [
884
890
  w(v, { name: "pk-chatbot-view-chat-fade" }, {
885
- default: P(() => [zt.value ? (O(), b(be, {
891
+ default: N(() => [Bt.value ? (D(), b(xe, {
886
892
  key: 0,
887
893
  class: "pk-chatbot-view-chat__aurora",
888
894
  "source-selector": ".pk-chatbot-input__form"
889
895
  })) : x("", !0)]),
890
896
  _: 1
891
897
  }),
892
- M(Nn) && !M(Je) ? (O(), b(m, {
898
+ j(Pn) && !j(Ye) ? (D(), b(m, {
893
899
  key: 0,
894
- pending: M(Nn),
895
- stopping: M(Pn),
896
- onStop: M(Fn)
900
+ pending: j(Pn),
901
+ stopping: j(Fn),
902
+ onStop: j(In)
897
903
  }, null, 8, [
898
904
  "pending",
899
905
  "stopping",
900
906
  "onStop"
901
907
  ])) : x("", !0),
902
- M(Je) ? (O(), S("div", Fe, j(M(G)("message.chatErrorConversationBlocked")), 1)) : dn.value === "idle" ? (O(), b(f, {
908
+ j(Ye) ? (D(), S("div", Ie, A(j(W)("message.chatErrorConversationBlocked")), 1)) : pn.value === "idle" ? (D(), b(f, {
903
909
  key: 3,
904
910
  ref_key: "inputEl",
905
- ref: lt,
906
- modelValue: M(V),
907
- "onUpdate:modelValue": n[4] ||= (e) => re(V) ? V.value = e : null,
908
- "pending-attachments": M(Xe),
909
- "onUpdate:pendingAttachments": n[5] ||= (e) => re(Xe) ? Xe.value = e : null,
910
- placeholder: M(qe),
911
- "dismissable-notice": M(Lt) && M(B).messages.length <= 1 ? M(Lt) : void 0,
912
- "page-notice": Pt.value,
913
- status: Mt.value,
914
- "max-message-length": M(L)?.maxMessageLength,
915
- "file-upload": U.value,
916
- "attachment-limit-reached": M(Ze),
917
- "attachment-notice": Ft.value,
918
- "voice-enabled": un.value,
919
- "queue-enabled": M(at),
920
- "answer-notices": It.value,
921
- onStopGeneration: M(dt),
922
- onSubmit: M(ut),
923
- onFileSelect: M(xt),
924
- onDismissAttachmentNotice: M(St),
925
- onDismissPageNotice: M(Tt),
926
- onOpenAnswerNotice: M(kt),
927
- onDismissAnswerNotice: M(At),
928
- onVoiceStart: gn
911
+ ref: ut,
912
+ modelValue: j(B),
913
+ "onUpdate:modelValue": n[4] ||= (e) => ie(B) ? B.value = e : null,
914
+ "pending-attachments": j(Ze),
915
+ "onUpdate:pendingAttachments": n[5] ||= (e) => ie(Ze) ? Ze.value = e : null,
916
+ placeholder: j(Je),
917
+ "dismissable-notice": j(Rt) && j(z).messages.length <= 1 ? j(Rt) : void 0,
918
+ "page-notice": Ft.value,
919
+ status: Nt.value,
920
+ "max-message-length": j(I)?.maxMessageLength,
921
+ "file-upload": H.value,
922
+ "attachment-limit-reached": j(Qe),
923
+ "attachment-notice": It.value,
924
+ "voice-enabled": fn.value,
925
+ "queue-enabled": j(ot),
926
+ "answer-notices": Lt.value,
927
+ onStopGeneration: j(ft),
928
+ onSubmit: j(dt),
929
+ onFileSelect: j(St),
930
+ onDismissAttachmentNotice: j(Ct),
931
+ onDismissPageNotice: j(Et),
932
+ onOpenAnswerNotice: j(At),
933
+ onDismissAnswerNotice: j(jt),
934
+ onVoiceStart: vn
929
935
  }, te({ _: 2 }, [a.modifier === "fullscreen" ? {
930
936
  name: "prepend",
931
- fn: P(() => [C("span", Ie, [w(u, {
937
+ fn: N(() => [C("span", Le, [w(u, {
932
938
  class: "pk-chatbot-view-chat__agent-chip-avatar",
933
- "img-src": M(L)?.logo,
934
- name: M(I).name
935
- }, null, 8, ["img-src", "name"]), M(I).name ? (O(), S("strong", Le, j(M(I).name), 1)) : x("", !0)])]),
939
+ "img-src": j(I)?.logo,
940
+ name: j(F).name
941
+ }, null, 8, ["img-src", "name"]), j(F).name ? (D(), S("strong", Re, A(j(F).name), 1)) : x("", !0)])]),
936
942
  key: "0"
937
943
  } : void 0]), 1032, [
938
944
  "modelValue",
@@ -955,21 +961,21 @@ var Pe = { class: "pk-chatbot-view-chat__input-stage" }, Fe = {
955
961
  "onDismissPageNotice",
956
962
  "onOpenAnswerNotice",
957
963
  "onDismissAnswerNotice"
958
- ])) : (O(), b(De, {
964
+ ])) : (D(), b(Oe, {
959
965
  key: 2,
960
- state: dn.value,
961
- sample: mn,
962
- spectrum: hn,
963
- "remaining-seconds": M(Q).remainingSeconds.value,
964
- muted: J.value,
965
- error: fn.value,
966
- "raw-error": M(Q).error.value,
967
- live: M(Q).isActive.value,
966
+ state: pn.value,
967
+ sample: gn,
968
+ spectrum: _n,
969
+ "remaining-seconds": j(Z).remainingSeconds.value,
970
+ muted: q.value,
971
+ error: mn.value,
972
+ "raw-error": j(Z).error.value,
973
+ live: j(Z).isActive.value,
968
974
  class: "pk-chatbot-view-chat__voice",
969
- onToggleMute: Mn,
970
- onHangUp: _n,
971
- onRetry: yn,
972
- onDismiss: vn
975
+ onToggleMute: Nn,
976
+ onHangUp: yn,
977
+ onRetry: xn,
978
+ onDismiss: bn
973
979
  }, null, 8, [
974
980
  "state",
975
981
  "remaining-seconds",
@@ -980,22 +986,22 @@ var Pe = { class: "pk-chatbot-view-chat__input-stage" }, Fe = {
980
986
  ]))
981
987
  ]),
982
988
  w(v, null, {
983
- default: P(() => [M($t) && U.value?.enabled ? (O(), S("div", Re, [w(r, {
989
+ default: N(() => [j(en) && H.value?.enabled ? (D(), S("div", ze, [w(r, {
984
990
  name: "ri:upload-cloud-2-line",
985
991
  class: "pk-chatbot-view-chat__drop-overlay-icon"
986
- }), C("span", null, j(M(G)("action.dropFile")), 1)])) : x("", !0)]),
992
+ }), C("span", null, A(j(W)("action.dropFile")), 1)])) : x("", !0)]),
987
993
  _: 1
988
994
  }),
989
- K.value && Ut.value ? (O(), S("aside", ze, [w(M(ve), {
995
+ G.value && Wt.value ? (D(), S("aside", Be, [w(j(ye), {
990
996
  closable: "",
991
- kind: K.value.kind,
992
- filename: K.value.filename,
993
- version: K.value.version,
994
- "download-url": W(K.value.storedFileName),
995
- preview: Gt.value,
996
- loading: q.value,
997
- error: Kt.value,
998
- onClose: Yt
997
+ kind: G.value.kind,
998
+ filename: G.value.filename,
999
+ version: G.value.version,
1000
+ "download-url": U(G.value.storedFileName),
1001
+ preview: Kt.value,
1002
+ loading: K.value,
1003
+ error: qt.value,
1004
+ onClose: Xt
999
1005
  }, null, 8, [
1000
1006
  "kind",
1001
1007
  "filename",
@@ -1005,23 +1011,23 @@ var Pe = { class: "pk-chatbot-view-chat__input-stage" }, Fe = {
1005
1011
  "loading",
1006
1012
  "error"
1007
1013
  ])])) : x("", !0),
1008
- K.value && !Ut.value ? (O(), b(i, {
1014
+ G.value && !Wt.value ? (D(), b(i, {
1009
1015
  key: 2,
1010
- modelValue: Xt.value,
1011
- "onUpdate:modelValue": n[6] ||= (e) => Xt.value = e,
1012
- title: K.value.filename,
1013
- "label-close": M(G)("chatFilePreview.close"),
1014
- modifiers: Wt.value ? "fullscreen" : void 0,
1016
+ modelValue: Zt.value,
1017
+ "onUpdate:modelValue": n[6] ||= (e) => Zt.value = e,
1018
+ title: G.value.filename,
1019
+ "label-close": j(W)("chatFilePreview.close"),
1020
+ modifiers: Gt.value ? "fullscreen" : void 0,
1015
1021
  class: "pk-chatbot-view-chat__preview-dialog"
1016
1022
  }, {
1017
- default: P(() => [w(M(ve), {
1018
- kind: K.value.kind,
1019
- filename: K.value.filename,
1020
- version: K.value.version,
1021
- "download-url": W(K.value.storedFileName),
1022
- preview: Gt.value,
1023
- loading: q.value,
1024
- error: Kt.value
1023
+ default: N(() => [w(j(ye), {
1024
+ kind: G.value.kind,
1025
+ filename: G.value.filename,
1026
+ version: G.value.version,
1027
+ "download-url": U(G.value.storedFileName),
1028
+ preview: Kt.value,
1029
+ loading: K.value,
1030
+ error: qt.value
1025
1031
  }, null, 8, [
1026
1032
  "kind",
1027
1033
  "filename",
@@ -1042,6 +1048,6 @@ var Pe = { class: "pk-chatbot-view-chat__input-stage" }, Fe = {
1042
1048
  };
1043
1049
  }
1044
1050
  });
1045
- export { be as i, De as n, Se as r, Ge as t };
1051
+ export { xe as i, Oe as n, Ce as r, Ke as t };
1046
1052
 
1047
- //# sourceMappingURL=PkChatbotViewChat-BNaSv86u.js.map
1053
+ //# sourceMappingURL=PkChatbotViewChat-DDnJ-2Ic.js.map