@8wave/ai-elements 0.126.0-beta.33 → 0.126.0-beta.35

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 (126) hide show
  1. package/dist/_chunks/{PkChatbotFilePreview-B4vbUkNp.js → PkChatbotFilePreview-Cw3va5vW.js} +2 -2
  2. package/dist/_chunks/{PkChatbotFilePreview-B4vbUkNp.js.map → PkChatbotFilePreview-Cw3va5vW.js.map} +1 -1
  3. package/dist/_chunks/{PkFilePreview-C6ZZablL.js → PkFilePreview-D4TgY0T9.js} +3 -3
  4. package/dist/_chunks/{PkFilePreview-C6ZZablL.js.map → PkFilePreview-D4TgY0T9.js.map} +1 -1
  5. package/dist/_chunks/{PkFilePreviewDialog-BzBHAt8l.js → PkFilePreviewDialog-8H1GeV91.js} +2 -2
  6. package/dist/_chunks/{PkFilePreviewDialog-BzBHAt8l.js.map → PkFilePreviewDialog-8H1GeV91.js.map} +1 -1
  7. package/dist/_chunks/{PkImageEditorDialog-Dm34WFmS.js → PkImageEditorDialog-BqHjVX97.js} +2 -2
  8. package/dist/_chunks/{PkImageEditorDialog-Dm34WFmS.js.map → PkImageEditorDialog-BqHjVX97.js.map} +1 -1
  9. package/dist/_chunks/{PkSelectionActions-CYqbMEjg.js → PkSelectionActions-BxUXWFNK.js} +2 -2
  10. package/dist/_chunks/{PkSelectionActions-CYqbMEjg.js.map → PkSelectionActions-BxUXWFNK.js.map} +1 -1
  11. package/dist/_chunks/{PkStreamingMarkdown-B8rZbprU.js → PkStreamingMarkdown-14rJ_FK2.js} +3 -3
  12. package/dist/_chunks/{PkStreamingMarkdown-B8rZbprU.js.map → PkStreamingMarkdown-14rJ_FK2.js.map} +1 -1
  13. package/dist/_chunks/{PkToolChatFile-C0emIVfS.js → PkToolChatFile-CSBzfuyE.js} +3 -3
  14. package/dist/_chunks/{PkToolChatFile-C0emIVfS.js.map → PkToolChatFile-CSBzfuyE.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShareDocument-DYr0Rq4D.js → PkToolShareDocument-Kq7SFbw5.js} +2 -2
  16. package/dist/_chunks/{PkToolShareDocument-DYr0Rq4D.js.map → PkToolShareDocument-Kq7SFbw5.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowArtifact-B_KIIjEn.js → PkToolShowArtifact-d5tKvM01.js} +2 -2
  18. package/dist/_chunks/{PkToolShowArtifact-B_KIIjEn.js.map → PkToolShowArtifact-d5tKvM01.js.map} +1 -1
  19. package/dist/_chunks/{PkToolShowContactForm-DiHb3fRQ.js → PkToolShowContactForm-Bni1QzXV.js} +2 -2
  20. package/dist/_chunks/{PkToolShowContactForm-DiHb3fRQ.js.map → PkToolShowContactForm-Bni1QzXV.js.map} +1 -1
  21. package/dist/_chunks/{PkToolShowEmail-CClEA1rp.js → PkToolShowEmail-D6Mw24jB.js} +2 -2
  22. package/dist/_chunks/{PkToolShowEmail-CClEA1rp.js.map → PkToolShowEmail-D6Mw24jB.js.map} +1 -1
  23. package/dist/_chunks/{PkToolShowForm-BmUAhIQy.js → PkToolShowForm-CFXtO0j4.js} +3 -3
  24. package/dist/_chunks/{PkToolShowForm-BmUAhIQy.js.map → PkToolShowForm-CFXtO0j4.js.map} +1 -1
  25. package/dist/_chunks/{PkToolShowImageGallery-CZ394fdT.js → PkToolShowImageGallery-Ci_Kg44s.js} +7 -2
  26. package/dist/_chunks/PkToolShowImageGallery-Ci_Kg44s.js.map +1 -0
  27. package/dist/_chunks/{PkToolShowLocation-DaFjO8MV.js → PkToolShowLocation-DV0puCbD.js} +136 -135
  28. package/dist/_chunks/PkToolShowLocation-DV0puCbD.js.map +1 -0
  29. package/dist/_chunks/{PkToolShowMessage-DIDp9JCf.js → PkToolShowMessage-Bq2dbSy1.js} +2 -2
  30. package/dist/_chunks/{PkToolShowMessage-DIDp9JCf.js.map → PkToolShowMessage-Bq2dbSy1.js.map} +1 -1
  31. package/dist/_chunks/{PkToolShowProductList-uNvUr2s9.js → PkToolShowProductList-BWWzkWWA.js} +2 -2
  32. package/dist/_chunks/{PkToolShowProductList-uNvUr2s9.js.map → PkToolShowProductList-BWWzkWWA.js.map} +1 -1
  33. package/dist/_chunks/{PkToolShowSources-Dm0L4prK.js → PkToolShowSources-Dv7hbDyy.js} +8 -8
  34. package/dist/_chunks/{PkToolShowSources-Dm0L4prK.js.map → PkToolShowSources-Dv7hbDyy.js.map} +1 -1
  35. package/dist/_chunks/{PkToolShowWebPages-Cj2mJrs5.js → PkToolShowWebPages-XxcYBQpr.js} +2 -2
  36. package/dist/_chunks/{PkToolShowWebPages-Cj2mJrs5.js.map → PkToolShowWebPages-XxcYBQpr.js.map} +1 -1
  37. package/dist/_chunks/{utils-DPGBO-HU.js → utils-DE4cAz37.js} +43 -40
  38. package/dist/_chunks/utils-DE4cAz37.js.map +1 -0
  39. package/dist/ai-elements.es.js +1270 -1250
  40. package/dist/ai-elements.es.js.map +1 -1
  41. package/dist-vue/PkChatbot.js +1 -1
  42. package/dist-vue/PkChatbotEmptyState.js +1 -1
  43. package/dist-vue/PkChatbotInput.js +1 -1
  44. package/dist-vue/PkChatbotMessages.js +1 -1
  45. package/dist-vue/PkChatbotStepPayload.js +1 -1
  46. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  47. package/dist-vue/PkChatbotSteps.js +1 -1
  48. package/dist-vue/PkChatbotViewChat.js +1 -1
  49. package/dist-vue/PkChatbotViewConversations.js +1 -1
  50. package/dist-vue/PkChatbotViewProfile.js +1 -1
  51. package/dist-vue/_chunks/{PkChatbot-CXpftmWm.js → PkChatbot-CFJmT4nN.js} +7 -6
  52. package/dist-vue/_chunks/PkChatbot-CFJmT4nN.js.map +1 -0
  53. package/dist-vue/_chunks/PkChatbotAudioTranscript-DgmuXalb.js.map +1 -1
  54. package/dist-vue/_chunks/{PkChatbotEmptyState-vA2v4FES.js → PkChatbotEmptyState-CLfzcH_t.js} +2 -2
  55. package/dist-vue/_chunks/{PkChatbotEmptyState-vA2v4FES.js.map → PkChatbotEmptyState-CLfzcH_t.js.map} +1 -1
  56. package/dist-vue/_chunks/PkChatbotFilePreview-aKJBtw04.js.map +1 -1
  57. package/dist-vue/_chunks/{PkChatbotInput-CIIJ1bpF.js → PkChatbotInput-C9l_1I3d.js} +4 -4
  58. package/dist-vue/_chunks/{PkChatbotInput-CIIJ1bpF.js.map → PkChatbotInput-C9l_1I3d.js.map} +1 -1
  59. package/dist-vue/_chunks/PkChatbotMessages-_-h-egX7.js +1072 -0
  60. package/dist-vue/_chunks/{PkChatbotMessages-15R8RxAq.js.map → PkChatbotMessages-_-h-egX7.js.map} +1 -1
  61. package/dist-vue/_chunks/{PkChatbotStepPayload-BbNSav-U.js → PkChatbotStepPayload-fyrbP7yS.js} +2 -2
  62. package/dist-vue/_chunks/{PkChatbotStepPayload-BbNSav-U.js.map → PkChatbotStepPayload-fyrbP7yS.js.map} +1 -1
  63. package/dist-vue/_chunks/{PkChatbotStepToolDetail-B_4pmbLe.js → PkChatbotStepToolDetail-Drhc6X-x.js} +3 -3
  64. package/dist-vue/_chunks/{PkChatbotStepToolDetail-B_4pmbLe.js.map → PkChatbotStepToolDetail-Drhc6X-x.js.map} +1 -1
  65. package/dist-vue/_chunks/{PkChatbotSteps-h4E6DH_g.js → PkChatbotSteps-DZwV7UVr.js} +5 -5
  66. package/dist-vue/_chunks/{PkChatbotSteps-h4E6DH_g.js.map → PkChatbotSteps-DZwV7UVr.js.map} +1 -1
  67. package/dist-vue/_chunks/{PkChatbotViewChat-CLQ0J9_f.js → PkChatbotViewChat-Bg-Op2Oe.js} +7 -6
  68. package/dist-vue/_chunks/{PkChatbotViewChat-CLQ0J9_f.js.map → PkChatbotViewChat-Bg-Op2Oe.js.map} +1 -1
  69. package/dist-vue/_chunks/{PkChatbotViewConversations-DFBbypGg.js → PkChatbotViewConversations--smzyxqN.js} +4 -4
  70. package/dist-vue/_chunks/{PkChatbotViewConversations-DFBbypGg.js.map → PkChatbotViewConversations--smzyxqN.js.map} +1 -1
  71. package/dist-vue/_chunks/{PkChatbotViewProfile-B0AZvHTr.js → PkChatbotViewProfile-Cn7IQfnQ.js} +2 -1
  72. package/dist-vue/_chunks/PkChatbotViewProfile-Cn7IQfnQ.js.map +1 -0
  73. package/dist-vue/_chunks/{PkFilePreview-Cb-1YRPN.js → PkFilePreview-DydUI1G2.js} +54 -54
  74. package/dist-vue/_chunks/{PkFilePreview-Cb-1YRPN.js.map → PkFilePreview-DydUI1G2.js.map} +1 -1
  75. package/dist-vue/_chunks/{PkFilePreviewDialog-Bd7kEoCB.js → PkFilePreviewDialog-BuG1whsJ.js} +2 -2
  76. package/dist-vue/_chunks/{PkFilePreviewDialog-Bd7kEoCB.js.map → PkFilePreviewDialog-BuG1whsJ.js.map} +1 -1
  77. package/dist-vue/_chunks/{PkImageEditorDialog-Bj4sUHXM.js → PkImageEditorDialog-_-UkV0CO.js} +2 -2
  78. package/dist-vue/_chunks/{PkImageEditorDialog-Bj4sUHXM.js.map → PkImageEditorDialog-_-UkV0CO.js.map} +1 -1
  79. package/dist-vue/_chunks/{PkStreamingMarkdown-BcUq4ThC.js → PkStreamingMarkdown-ha0V58V9.js} +2 -2
  80. package/dist-vue/_chunks/{PkStreamingMarkdown-BcUq4ThC.js.map → PkStreamingMarkdown-ha0V58V9.js.map} +1 -1
  81. package/dist-vue/_chunks/{PkToolChatFile-BOexrlLt.js → PkToolChatFile-OusYITiO.js} +2 -2
  82. package/dist-vue/_chunks/{PkToolChatFile-BOexrlLt.js.map → PkToolChatFile-OusYITiO.js.map} +1 -1
  83. package/dist-vue/_chunks/{PkToolShowArtifact-C4gHB6lH.js → PkToolShowArtifact-x57Gri2a.js} +2 -2
  84. package/dist-vue/_chunks/{PkToolShowArtifact-C4gHB6lH.js.map → PkToolShowArtifact-x57Gri2a.js.map} +1 -1
  85. package/dist-vue/_chunks/{PkToolShowChart-CsPXNAb9.js → PkToolShowChart-BSnYmoJJ.js} +2 -2
  86. package/dist-vue/_chunks/{PkToolShowChart-CsPXNAb9.js.map → PkToolShowChart-BSnYmoJJ.js.map} +1 -1
  87. package/dist-vue/_chunks/{PkToolShowContactForm-2_HBPZaa.js → PkToolShowContactForm-D0lDC69x.js} +2 -2
  88. package/dist-vue/_chunks/{PkToolShowContactForm-2_HBPZaa.js.map → PkToolShowContactForm-D0lDC69x.js.map} +1 -1
  89. package/dist-vue/_chunks/{PkToolShowDiagram-cCbeL6MK.js → PkToolShowDiagram-BR4fE_be.js} +2 -2
  90. package/dist-vue/_chunks/{PkToolShowDiagram-cCbeL6MK.js.map → PkToolShowDiagram-BR4fE_be.js.map} +1 -1
  91. package/dist-vue/_chunks/{PkToolShowEmail-BehvoNsz.js → PkToolShowEmail-idhNR5-l.js} +2 -2
  92. package/dist-vue/_chunks/{PkToolShowEmail-BehvoNsz.js.map → PkToolShowEmail-idhNR5-l.js.map} +1 -1
  93. package/dist-vue/_chunks/{PkToolShowForm-DjB3fji5.js → PkToolShowForm-yh0YAXcg.js} +3 -3
  94. package/dist-vue/_chunks/{PkToolShowForm-DjB3fji5.js.map → PkToolShowForm-yh0YAXcg.js.map} +1 -1
  95. package/dist-vue/_chunks/{PkToolShowImageGallery-C22TCUKW.js → PkToolShowImageGallery-mmUY1Yfg.js} +8 -3
  96. package/dist-vue/_chunks/PkToolShowImageGallery-mmUY1Yfg.js.map +1 -0
  97. package/dist-vue/_chunks/{PkToolShowLocation-CqqtwH_R.js → PkToolShowLocation-CyaKgQUX.js} +3 -3
  98. package/dist-vue/_chunks/PkToolShowLocation-CyaKgQUX.js.map +1 -0
  99. package/dist-vue/_chunks/{PkToolShowMessage-Cca7K7GQ.js → PkToolShowMessage-B4gztWUk.js} +2 -2
  100. package/dist-vue/_chunks/{PkToolShowMessage-Cca7K7GQ.js.map → PkToolShowMessage-B4gztWUk.js.map} +1 -1
  101. package/dist-vue/_chunks/{PkToolShowProductList-BvtmiHBf.js → PkToolShowProductList-B-ya1TDt.js} +3 -3
  102. package/dist-vue/_chunks/{PkToolShowProductList-BvtmiHBf.js.map → PkToolShowProductList-B-ya1TDt.js.map} +1 -1
  103. package/dist-vue/_chunks/{PkToolShowSources-uKO4MQgd.js → PkToolShowSources-DYkHkVdX.js} +8 -8
  104. package/dist-vue/_chunks/{PkToolShowSources-uKO4MQgd.js.map → PkToolShowSources-DYkHkVdX.js.map} +1 -1
  105. package/dist-vue/_chunks/{PkToolShowVideo-DKj5N1vo.js → PkToolShowVideo-CRg2lAY8.js} +2 -2
  106. package/dist-vue/_chunks/{PkToolShowVideo-DKj5N1vo.js.map → PkToolShowVideo-CRg2lAY8.js.map} +1 -1
  107. package/dist-vue/_chunks/{PkToolShowWebPages-BNZmbCSf.js → PkToolShowWebPages-C_pWag94.js} +3 -3
  108. package/dist-vue/_chunks/{PkToolShowWebPages-BNZmbCSf.js.map → PkToolShowWebPages-C_pWag94.js.map} +1 -1
  109. package/dist-vue/_chunks/{utils-waie4Gfn.js → utils-Df5n2cDc.js} +66 -59
  110. package/dist-vue/_chunks/utils-Df5n2cDc.js.map +1 -0
  111. package/dist-vue/composables.js +5 -5
  112. package/dist-vue/index.js +3960 -3954
  113. package/dist-vue/index.js.map +1 -1
  114. package/dist-vue/locales.js +4 -0
  115. package/dist-vue/packages/components/src/chat/utils.d.ts +9 -1
  116. package/dist-vue/style.css +1 -1
  117. package/package.json +1 -1
  118. package/dist/_chunks/PkToolShowImageGallery-CZ394fdT.js.map +0 -1
  119. package/dist/_chunks/PkToolShowLocation-DaFjO8MV.js.map +0 -1
  120. package/dist/_chunks/utils-DPGBO-HU.js.map +0 -1
  121. package/dist-vue/_chunks/PkChatbot-CXpftmWm.js.map +0 -1
  122. package/dist-vue/_chunks/PkChatbotMessages-15R8RxAq.js +0 -1068
  123. package/dist-vue/_chunks/PkChatbotViewProfile-B0AZvHTr.js.map +0 -1
  124. package/dist-vue/_chunks/PkToolShowImageGallery-C22TCUKW.js.map +0 -1
  125. package/dist-vue/_chunks/PkToolShowLocation-CqqtwH_R.js.map +0 -1
  126. package/dist-vue/_chunks/utils-waie4Gfn.js.map +0 -1
@@ -1 +1 @@
1
- export { t as default } from "./_chunks/PkChatbot-CXpftmWm.js";
1
+ export { t as default } from "./_chunks/PkChatbot-CFJmT4nN.js";
@@ -1 +1 @@
1
- export { t as default } from "./_chunks/PkChatbotEmptyState-vA2v4FES.js";
1
+ export { t as default } from "./_chunks/PkChatbotEmptyState-CLfzcH_t.js";
@@ -1 +1 @@
1
- export { t as default } from "./_chunks/PkChatbotInput-CIIJ1bpF.js";
1
+ export { t as default } from "./_chunks/PkChatbotInput-C9l_1I3d.js";
@@ -1 +1 @@
1
- export { t as default } from "./_chunks/PkChatbotMessages-15R8RxAq.js";
1
+ export { t as default } from "./_chunks/PkChatbotMessages-_-h-egX7.js";
@@ -1 +1 @@
1
- export { t as default } from "./_chunks/PkChatbotStepPayload-BbNSav-U.js";
1
+ export { t as default } from "./_chunks/PkChatbotStepPayload-fyrbP7yS.js";
@@ -1 +1 @@
1
- export { t as default } from "./_chunks/PkChatbotStepToolDetail-B_4pmbLe.js";
1
+ export { t as default } from "./_chunks/PkChatbotStepToolDetail-Drhc6X-x.js";
@@ -1 +1 @@
1
- export { t as default } from "./_chunks/PkChatbotSteps-h4E6DH_g.js";
1
+ export { t as default } from "./_chunks/PkChatbotSteps-DZwV7UVr.js";
@@ -1 +1 @@
1
- export { t as default } from "./_chunks/PkChatbotViewChat-CLQ0J9_f.js";
1
+ export { t as default } from "./_chunks/PkChatbotViewChat-Bg-Op2Oe.js";
@@ -1 +1 @@
1
- export { t as default } from "./_chunks/PkChatbotViewConversations-DFBbypGg.js";
1
+ export { t as default } from "./_chunks/PkChatbotViewConversations--smzyxqN.js";
@@ -1 +1 @@
1
- export { t as default } from "./_chunks/PkChatbotViewProfile-B0AZvHTr.js";
1
+ export { t as default } from "./_chunks/PkChatbotViewProfile-Cn7IQfnQ.js";
@@ -3,13 +3,13 @@ import { n as t } from "./useChatbotStore-Hb5EjISl.js";
3
3
  import { t as n } from "./useLocalizedString-Dmn92nix.js";
4
4
  import { t as r } from "./useShortUrlResolver-KJDk7QLj.js";
5
5
  import { t as ee } from "./PkAvatar-DwtZWSW4.js";
6
- import { t as te } from "./PkChatbotViewChat-CLQ0J9_f.js";
7
- import { t as ne } from "./PkChatbotViewConversations-DFBbypGg.js";
6
+ import { t as te } from "./PkChatbotViewChat-Bg-Op2Oe.js";
7
+ import { t as ne } from "./PkChatbotViewConversations--smzyxqN.js";
8
8
  import { t as re } from "./PkChatbotViewFiles-PHdrHZOf.js";
9
- import { t as ie } from "./PkChatbotViewProfile-B0AZvHTr.js";
10
- import { n as i, t as ae } from "./PkStreamingMarkdown-BcUq4ThC.js";
9
+ import { t as ie } from "./PkChatbotViewProfile-Cn7IQfnQ.js";
10
+ import { n as i, t as ae } from "./PkStreamingMarkdown-ha0V58V9.js";
11
11
  import { t as a } from "./chatbotProfileContext-b-nve-mR.js";
12
- import { c as oe, z as se } from "./utils-waie4Gfn.js";
12
+ import { c as oe, z as se } from "./utils-Df5n2cDc.js";
13
13
  import { VvAlert as ce, VvButtonGroup as le, VvDropdown as ue, VvDropdownAction as de, VvIcon as fe } from "@volverjs/ui-vue/components";
14
14
  import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createSlots as f, createTextVNode as p, createVNode as m, defineComponent as h, guardReactiveProps as g, inject as pe, mergeModels as _, mergeProps as v, normalizeClass as me, normalizeProps as y, normalizeStyle as b, openBlock as x, renderList as S, renderSlot as C, toDisplayString as w, toRef as he, unref as T, useModel as ge, useSlots as _e, useTemplateRef as ve, watch as E, watchEffect as ye, withCtx as D } from "vue";
15
15
  import { useI18n as be } from "vue-i18n";
@@ -128,6 +128,7 @@ var Ce = { class: "pk-chatbot__header-start" }, we = ["title"], Te = { key: 1 },
128
128
  }, [d("div", Ce, [T(I) === "chat" ? J.value ? l("", !0) : (x(), c(ee, {
129
129
  key: 1,
130
130
  class: "pk-chatbot__avatar",
131
+ "aria-hidden": "true",
131
132
  name: h.name,
132
133
  "img-src": h.agentInterface?.logo
133
134
  }, null, 8, ["name", "img-src"])) : (x(), u(o, { key: 0 }, [m(r, v({
@@ -295,4 +296,4 @@ var Ce = { class: "pk-chatbot__header-start" }, we = ["title"], Te = { key: 1 },
295
296
  });
296
297
  export { O as t };
297
298
 
298
- //# sourceMappingURL=PkChatbot-CXpftmWm.js.map
299
+ //# sourceMappingURL=PkChatbot-CFJmT4nN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PkChatbot-CFJmT4nN.js","names":["_useModel","_openBlock","_createElementBlock","_normalizeClass","_normalizeStyle","_createElementVNode","_unref","_Fragment","_createVNode","_mergeProps","_createBlock","PkAvatar","_toDisplayString","_withCtx","_renderSlot","_normalizeProps","_guardReactiveProps","_createTextVNode","PkChatbotViewChat","_renderList","PkChatbotViewConversations","PkChatbotViewFiles","PkChatbotViewProfile","PkStreamingMarkdown","VvButtonLocalized","useChatbotStore","useLocalizedString","provideShortUrlResolver","PkAvatar_default","PkChatbotViewChat_default","PkChatbotViewConversations_default","PkChatbotViewFiles_default","PkChatbotViewProfile_default","provideChatImagePolicy","PkStreamingMarkdown_default","ChatbotProfileContextKey","agentThemeStyle","resolveContrastColor","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","PkChatbot_default","defineComponent","\"chatId\"","\"chatIdModifiers\"","__expose","__emit","slots","useSlots","$t","useI18n","props","__props","emit","chatId","useModel","store","hashes","storeToRefs","storeAgentId","toRef","profile","inject","canManageProfile","computed","canSignIn","watch","canManage","activeView","navigate","watchEffect","id","localChatId","chatError","error","parsedError","isFullscreen","isPanel","chatbotEl","useTemplateRef","chatbotWidth","useElementSize","isPhoneWidth","isTightWidth","isWideWidth","isReasoningAgent","showReasoningNotice","messages","message","useColorsForAgentHeader","showHeaderMenu","pageAccessAvailable","confirmationsAvailable","themeClass","isDark","mainColor","contrastColor","themeStyle","footerMessage","title","activeMessage","newAgentId","newChatId","newView","_component_VvButton","_component_VvIcon","VvIcon","_component_VvDropdownAction","VvDropdownAction","_component_VvDropdown","VvDropdown","_component_VvButtonGroup","VvButtonGroup","_component_VvAlert","VvAlert","openBlock","createElementBlock","normalizeClass","normalizeStyle","createCommentVNode","createElementVNode","unref","createBlock","Fragment","createVNode","mergeProps","_cache","toDisplayString","withCtx","renderSlot","_ctx","normalizeProps","guardReactiveProps","startNewChat","stopGeneration","createTextVNode","setPageAccessOff","pageAccessOff","setConfirmationMode","confirmationMode","$event","createSlots","renderList","slotName","slotData"],"sources":["../../../../packages/components/src/chat/PkChatbot.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import {\n computed,\n inject,\n toRef,\n useTemplateRef,\n watch,\n watchEffect,\n useSlots,\n } from 'vue'\n import { useElementSize } from '@vueuse/core'\n import { storeToRefs } from 'pinia'\n import { useI18n } from 'vue-i18n'\n import type {\n AgentConfirmationsCapability,\n AgentInterface,\n AgentModel,\n AgentFileUpload,\n AgentGatewayOptions,\n AgentVoiceCapability,\n ChatMessageActions,\n RevisedAnswer,\n UIChatMessage,\n AgentTools,\n HostToolsCapability,\n PageAccessCapability,\n SelectionActionsCapability,\n } from 'models'\n import {\n type RegisteredHostTool,\n useChatbotStore,\n useLocalizedString,\n provideShortUrlResolver,\n } from 'composables'\n import PkAvatar from './PkAvatar.vue'\n import PkChatbotViewChat from './PkChatbotViewChat.vue'\n import PkChatbotViewConversations from './PkChatbotViewConversations.vue'\n import PkChatbotViewFiles from './PkChatbotViewFiles.vue'\n import PkChatbotViewProfile from './PkChatbotViewProfile.vue'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n import { ChatbotProfileContextKey } from './chatbotProfileContext'\n import { provideChatImagePolicy } from './chatImagePolicy'\n import { agentThemeStyle, resolveContrastColor } from './utils'\n\n // Captured in script setup to avoid TS7022 circular inference in template\n const slots = useSlots()\n\n const { t: $t } = useI18n({\n useScope: 'global',\n })\n\n const props = defineProps<{\n baseUrl: string\n basePath?: string\n agentId: string\n agentType?: 'reasoning' | 'chat'\n userId?: string\n name?: string\n model?: string\n agentModel?: AgentModel\n agentTools?: AgentTools\n agentInterface?: AgentInterface\n actions?: ChatMessageActions[]\n revisedAnswers?: RevisedAnswer[]\n headers?: Record<string, string>\n systemTheme?: 'light' | 'dark'\n agentFileUpload?: AgentFileUpload\n /** Voice configuration from the agent settings: enables the talk button. */\n voice?: AgentVoiceCapability\n fallbackModels?: string[]\n gatewayOptions?: Partial<AgentGatewayOptions>\n externalContext?: Record<string, unknown>\n /** Host tools as the agent allows them (`capabilities.hostTools` of the public agent). */\n hostTools?: HostToolsCapability\n /** Tools the embedding app registered, with the function that runs each (spec `host-tools.md`). */\n hostToolRegistry?: RegisteredHostTool[]\n /** Page access as the agent allows it (`capabilities.pageAccess`, spec `page-tools.md`). */\n pageAccess?: PageAccessCapability\n /** Whether the user may choose automatic confirmations (`capabilities.confirmations`, spec `auto-confirmations.md`). */\n confirmations?: AgentConfirmationsCapability\n /** The selection bar's groups (`capabilities.selectionActions`, spec `selection-actions.md`). */\n selectionActions?: SelectionActionsCapability\n /** The widget's page tools: only the web component provides them. */\n pageToolRegistry?: RegisteredHostTool[]\n /** The tools of the forms annotated on the page now, read on every request. */\n pageForms?: () => RegisteredHostTool[]\n /** Layout modifier: `widget` (default) keeps the contained layout with header, `fullscreen` removes header/background for full-page usage (the page provides the chrome), `panel` keeps the header but slims it down for a docked side panel (the host provides background and border) */\n modifier?: 'widget' | 'fullscreen' | 'panel'\n /** Display name of the current user, used for the `{name}` placeholder in the fullscreen greeting */\n userName?: string\n /** Show the \"Files in this chat\" menu for hosts that don't provide the\n * profile context but whose user is authenticated (e.g. the backoffice\n * playground). The widget host relies on `canManageProfile` instead. */\n userFilesEnabled?: boolean\n /** The host can close the chat: the header menu offers \"Close\", which emits `close`. */\n closable?: boolean\n }>()\n const emit = defineEmits<{\n 'message-update': [message: UIChatMessage]\n 'show-info': [message: UIChatMessage]\n revise: [message: UIChatMessage]\n error: [error: { type: string; title: string; status: number }]\n /** That conversation is loaded: a message sent now lands in it. */\n loaded: [chatId: string]\n /** The user chose \"Close\" in the header menu. */\n close: []\n /** An action of a selection bar was sent: the telemetry's properties (spec `selection-actions.md`). */\n 'selection-action': [properties: Record<string, string>]\n }>()\n\n const chatId = defineModel<string | undefined>('chatId', {\n type: String,\n default: undefined,\n })\n\n const store = useChatbotStore(props.agentId)\n\n // Resolve backend short-urls (`/api/r/<hash>`) back to their real target\n // for display in tool components. Batched + cached across the chat tree.\n provideShortUrlResolver((hashes) =>\n store.apiClient.resolveShortUrls(hashes),\n )\n\n const {\n messages,\n localChatId,\n activeView,\n chatError,\n isDark,\n pageAccessAvailable,\n pageAccessOff,\n confirmationsAvailable,\n confirmationMode,\n } = storeToRefs(store)\n\n // Ref to store.agentId for watchers (avoids duplicate-key with agentId prop)\n const storeAgentId = toRef(store, 'agentId')\n\n const {\n startNewChat,\n stopGeneration,\n regenerate,\n navigate,\n sendMessage,\n setPageAccessOff,\n setConfirmationMode,\n } = store\n\n // When the agent holds external images, the answers and the tool cards\n // load them by themselves only from the backend this chat talks to and\n // from the hosts the agent lists.\n provideChatImagePolicy(\n () => props.agentInterface,\n () => props.baseUrl,\n )\n\n // Optional profile-management context provided by the host widget.\n // Present only for authenticated, non-anonymous sessions.\n const profile = inject(ChatbotProfileContextKey, undefined)\n const canManageProfile = computed(\n () => profile?.canManageProfile.value ?? false,\n )\n // Anonymous users get a \"Sign in\" entry instead of the profile one,\n // provided the host filled the `view-auth` slot and the agent has at\n // least one auth method enabled.\n const canSignIn = computed(\n () =>\n !canManageProfile.value &&\n (profile?.canSignIn?.value ?? false) &&\n slots['view-auth'] !== undefined,\n )\n\n // Once the sign-in completes (the session becomes non-anonymous) leave\n // the auth view and return to the conversation.\n watch(canManageProfile, (canManage) => {\n if (canManage && activeView.value === 'auth') {\n navigate('chat')\n }\n })\n\n // Sync props → store reactively\n watchEffect(() => {\n store.baseUrl = props.baseUrl\n store.basePath = props.basePath\n store.name = props.name\n store.agentType = props.agentType\n store.userId = props.userId\n store.agentInterface = props.agentInterface\n store.agentModel = props.agentModel\n store.agentTools = props.agentTools\n store.headers = props.headers\n store.revisedAnswers = props.revisedAnswers\n store.model = props.model\n store.actionsInput = props.actions\n store.agentFileUpload = props.agentFileUpload\n store.agentVoice = props.voice\n store.fallbackModels = props.fallbackModels\n store.gatewayOptions = props.gatewayOptions\n store.externalContext = props.externalContext\n store.agentHostTools = props.hostTools\n store.hostToolRegistry = props.hostToolRegistry\n store.agentPageAccess = props.pageAccess\n store.agentConfirmations = props.confirmations\n store.agentSelectionActions = props.selectionActions\n store.pageToolRegistry = props.pageToolRegistry\n store.pageFormsProvider = props.pageForms\n store.systemTheme = props.systemTheme\n store.hideWelcomeMessage = props.modifier === 'fullscreen'\n })\n\n // Sync chatId v-model ↔ store (bidirectional)\n // Parent → store: if the parent provides an external chatId, push it into\n // the store so the Chat instance picks it up.\n watch(\n () => chatId.value,\n (id) => {\n if (id && id !== store.localChatId) {\n store.localChatId = id\n }\n },\n { immediate: true },\n )\n // Store → parent: keep the v-model in sync whenever the store changes\n // the chatId internally (e.g. startNewChat).\n watch(localChatId, (id) => {\n chatId.value = id\n })\n\n // Emit structured errors from chat to the parent component\n watch(chatError, (error) => {\n if (!error) {\n return\n }\n try {\n const parsedError = JSON.parse(error.message) as {\n type: string\n title: string\n status: number\n }\n emit('error', parsedError)\n } catch {\n // ignore non-JSON errors\n }\n })\n\n // ui\n const isFullscreen = computed(() => props.modifier === 'fullscreen')\n const isPanel = computed(() => props.modifier === 'panel')\n\n /**\n * How much room the chat has, measured on the chat and not on the window.\n *\n * The same chat renders in a phone page, in a 408px widget, in a docked\n * panel and in a preview frame that the side panels squeeze to phone width\n * on a desktop screen, so the viewport says nothing about the space the\n * layout actually has. A CSS container query would read the same number\n * with no JavaScript, but `container-type` makes the element a containing\n * block for `position: fixed` descendants on every engine except Chrome\n * 129 and later, which displaces every dropdown in the chat: see\n * docs/agents/gotchas.md, \"The chat measures its own width, and not with a\n * container query\".\n *\n * The thresholds carry the modifiers, so the CSS stays declarative:\n * `--phone` has as much room as a phone page, `--tight` is too tight for\n * the agent chip beside the field, `--wide` has room for the outline rail\n * beside the reading column. Before the first measurement the width is 0\n * and no modifier applies, which is the roomy layout the base CSS writes.\n */\n const chatbotEl = useTemplateRef<HTMLDivElement>('chatbotEl')\n const { width: chatbotWidth } = useElementSize(chatbotEl)\n const isPhoneWidth = computed(\n () => chatbotWidth.value > 0 && chatbotWidth.value < 576,\n )\n const isTightWidth = computed(\n () => chatbotWidth.value > 0 && chatbotWidth.value < 640,\n )\n const isWideWidth = computed(() => chatbotWidth.value >= 848)\n const isReasoningAgent = computed(() => props.agentType === 'reasoning')\n // The notice says how a reasoning agent reads a message: it stands before\n // the first one, then leaves the room to the answers (pinned, it took a\n // third of a phone screen in the reasoning playground)\n const showReasoningNotice = computed(\n () =>\n isReasoningAgent.value &&\n !messages.value.some((message) => message.role === 'user'),\n )\n // A docked panel keeps a neutral header whatever the agent asks: it sits\n // beside the site or the app as part of the frame, and a colored band\n // made it read as a second site next to the first one.\n const useColorsForAgentHeader = computed(\n () => !isPanel.value && props.agentInterface?.useColorsForAgentHeader,\n )\n // Panel mode promotes the everyday actions (new chat, history) from the\n // dropdown to direct header buttons: the dropdown then only remains for\n // the secondary entries (files, profile, sign-in) and disappears when\n // none of them applies.\n const showHeaderMenu = computed(\n () =>\n !isPanel.value ||\n canManageProfile.value ||\n canSignIn.value ||\n pageAccessAvailable.value ||\n confirmationsAvailable.value ||\n props.closable ||\n (!!props.userFilesEnabled && !!localChatId.value),\n )\n const themeClass = computed(() => [\n 'theme',\n `theme--${isDark.value ? 'dark' : 'light'}`,\n ])\n const mainColor = computed(() => props.agentInterface?.mainColor)\n const contrastColor = computed(() =>\n resolveContrastColor(props.agentInterface?.textColor, mainColor.value),\n )\n const themeStyle = computed(() =>\n agentThemeStyle(mainColor.value, contrastColor.value),\n )\n const footerMessage = useLocalizedString(\n () => props.agentInterface?.footerMessage,\n )\n const title = computed(() => {\n if (activeView.value === 'conversations') {\n return $t('label.conversations')\n }\n if (activeView.value === 'profile') {\n return $t('label.profile')\n }\n if (activeView.value === 'auth') {\n return $t('label.authentication')\n }\n if (activeView.value === 'files') {\n return $t('userFiles.chatFilesTitle')\n }\n return props.name\n })\n\n // state\n const activeMessage = computed(() => {\n return messages.value?.[messages.value.length - 1]\n })\n\n // expose\n defineExpose({\n startNewChat,\n regenerate,\n stopGeneration,\n sendMessage,\n sendSelection: store.sendSelection,\n })\n\n // load chat, conversations and feedbacks on agent or chat change\n watch(\n [storeAgentId, localChatId],\n async ([newAgentId, newChatId]) => {\n await store.initialize(newAgentId, newChatId)\n emit('loaded', newChatId)\n },\n {\n immediate: true,\n },\n )\n // load conversations when navigating to conversations view\n watch(activeView, (newView) => {\n if (newView === 'conversations') {\n store.loadConversations(storeAgentId.value)\n } else if (newView === 'files') {\n store.loadChatFiles()\n }\n })\n // emit message updates for up-to-date context in parent components\n watch(\n activeMessage,\n (message) => {\n if (message) {\n emit('message-update', message)\n }\n },\n {\n deep: true,\n immediate: true,\n },\n )\n</script>\n\n<template>\n <div\n ref=\"chatbotEl\"\n class=\"pk-chatbot\"\n :class=\"[\n themeClass,\n {\n 'pk-chatbot--fullscreen': isFullscreen,\n 'pk-chatbot--panel': isPanel,\n 'pk-chatbot--phone': isPhoneWidth,\n 'pk-chatbot--tight': isTightWidth,\n 'pk-chatbot--wide': isWideWidth,\n },\n ]\"\n :style=\"themeStyle\">\n <!-- #region title -->\n <div\n v-if=\"!isFullscreen\"\n class=\"pk-chatbot__header\"\n :style=\"\n useColorsForAgentHeader\n ? {\n backgroundColor: mainColor,\n }\n : undefined\n \">\n <div class=\"pk-chatbot__header-start\">\n <template v-if=\"activeView !== 'chat'\">\n <VvButton\n v-bind=\"{\n modifiers: useColorsForAgentHeader\n ? `action-quiet-${contrastColor}`\n : 'action-quiet',\n icon: 'ri:arrow-left-s-line',\n title: $t('action.goBack'),\n }\"\n @click=\"navigate('chat')\" />\n <VvIcon\n :name=\"\n activeView === 'conversations'\n ? 'ri:history-line'\n : activeView === 'files'\n ? 'ri:attachment-2'\n : 'ri:user-line'\n \"\n class=\"pk-chatbot__nav-icon\"\n :style=\"\n useColorsForAgentHeader\n ? {\n color: contrastColor,\n }\n : undefined\n \" />\n </template>\n <!-- Panel mode: no avatar, the docked panel identifies the\n agent with the title alone. The title beside it names\n the agent, so the tile is hidden from screen readers:\n VvAvatar would announce it as \"avatar\". -->\n <PkAvatar\n v-else-if=\"!isPanel\"\n class=\"pk-chatbot__avatar\"\n aria-hidden=\"true\"\n :name\n :img-src=\"agentInterface?.logo\" />\n <strong\n class=\"pk-chatbot__title\"\n :title=\"title\"\n :style=\"\n useColorsForAgentHeader\n ? {\n color: contrastColor,\n }\n : undefined\n \">\n {{ title }}\n </strong>\n </div>\n <VvButtonGroup class=\"pk-chatbot__header-end\" modifiers=\"compact\">\n <slot\n name=\"header-actions\"\n v-bind=\"{\n mainColor,\n useColorsForAgentHeader,\n contrastColor,\n startNewChat,\n stopGeneration,\n }\" />\n <template v-if=\"isPanel\">\n <VvButton\n :modifiers=\"\n useColorsForAgentHeader\n ? `action-quiet-${contrastColor}`\n : 'action-quiet'\n \"\n icon=\"ri:edit-box-line\"\n :title=\"$t('action.startNewChat')\"\n @click=\"startNewChat()\" />\n <VvButton\n v-if=\"!isReasoningAgent\"\n :modifiers=\"\n useColorsForAgentHeader\n ? `action-quiet-${contrastColor}`\n : 'action-quiet'\n \"\n icon=\"ri:history-line\"\n :title=\"$t('action.viewRecentChats')\"\n @click=\"navigate('conversations')\" />\n </template>\n <VvDropdown\n v-if=\"showHeaderMenu\"\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n strategy: 'fixed',\n }\">\n <VvButton\n v-bind=\"{\n modifiers: useColorsForAgentHeader\n ? `action-quiet-${contrastColor}`\n : 'action-quiet',\n icon: 'ri:more-2-fill',\n title: $t('action.moreActions'),\n }\" />\n <template #items>\n <VvDropdownAction\n v-if=\"!isPanel\"\n @click=\"startNewChat()\">\n <VvIcon name=\"ri:edit-box-line\" />\n {{ $t('action.startNewChat') }}\n </VvDropdownAction>\n <VvDropdownAction\n v-if=\"!isReasoningAgent && !isPanel\"\n @click=\"navigate('conversations')\">\n <VvIcon name=\"ri:history-line\" />\n {{ $t('action.viewRecentChats') }}\n </VvDropdownAction>\n <VvDropdownAction\n v-if=\"\n (canManageProfile || userFilesEnabled) &&\n localChatId\n \"\n @click=\"navigate('files')\">\n <VvIcon name=\"ri:attachment-2\" />\n {{ $t('userFiles.chatFilesTitle') }}\n </VvDropdownAction>\n <!-- The user's own switch for the page tools, for\n this tab (spec page-tools.md) -->\n <VvDropdownAction\n v-if=\"pageAccessAvailable\"\n @click=\"setPageAccessOff(!pageAccessOff)\">\n <VvIcon\n :name=\"\n pageAccessOff\n ? 'ri:pages-line'\n : 'ri:forbid-line'\n \" />\n {{\n pageAccessOff\n ? $t('action.enablePageAccess')\n : $t('action.disablePageAccess')\n }}\n </VvDropdownAction>\n <!-- The user's choice of confirmations, where the\n agent allows it (spec auto-confirmations.md) -->\n <VvDropdownAction\n v-if=\"confirmationsAvailable\"\n @click=\"\n setConfirmationMode(\n confirmationMode === 'automatic'\n ? 'manual'\n : 'automatic',\n )\n \">\n <VvIcon\n :name=\"\n confirmationMode === 'automatic'\n ? 'ri:hand'\n : 'ri:flashlight-line'\n \" />\n {{\n confirmationMode === 'automatic'\n ? $t('action.manualConfirmations')\n : $t('action.automaticConfirmations')\n }}\n </VvDropdownAction>\n <VvDropdownAction\n v-if=\"canManageProfile\"\n @click=\"navigate('profile')\">\n <VvIcon name=\"ri:user-line\" />\n {{ $t('label.profile') }}\n </VvDropdownAction>\n <VvDropdownAction\n v-else-if=\"canSignIn\"\n @click=\"navigate('auth')\">\n <VvIcon name=\"ri:account-circle-line\" />\n {{ $t('action.signIn') }}\n </VvDropdownAction>\n <VvDropdownAction\n v-if=\"closable\"\n @click=\"emit('close')\">\n <VvIcon name=\"ri:close-line\" />\n {{ $t('action.close') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n <slot\n name=\"actions\"\n v-bind=\"{\n mainColor,\n useColorsForAgentHeader,\n contrastColor,\n startNewChat,\n stopGeneration,\n }\" />\n </VvButtonGroup>\n </div>\n <!-- #endregion -->\n\n <div v-if=\"showReasoningNotice\">\n <div class=\"pk-chatbot__warning-body\">\n <VvAlert modifiers=\"callout\">\n <div class=\"pk-chatbot__warning-header\">\n <VvIcon\n name=\"ri:alert-line\"\n class=\"pk-chatbot__warning-icon\" />\n <strong class=\"pk-chatbot__warning-title\">\n {{ $t('message.warning') }}\n </strong>\n </div>\n <p class=\"pk-chatbot__warning-text\">\n {{ $t('message.reasoningAgent') }}\n </p>\n </VvAlert>\n </div>\n </div>\n\n <!-- #region views -->\n <PkChatbotViewChat\n v-if=\"activeView === 'chat'\"\n :agent-id\n :modifier\n :user-name\n @show-info=\"emit('show-info', $event)\"\n @revise=\"emit('revise', $event)\"\n @selection-action=\"emit('selection-action', $event)\">\n <template\n v-for=\"slotName in Object.keys(slots)\"\n #[slotName]=\"slotData\"\n ><slot :name=\"slotName\" v-bind=\"slotData\"\n /></template>\n </PkChatbotViewChat>\n <PkChatbotViewConversations\n v-else-if=\"activeView === 'conversations'\"\n :agent-id>\n <template\n v-for=\"slotName in Object.keys(slots)\"\n #[slotName]=\"slotData\"\n ><slot :name=\"slotName\" v-bind=\"slotData\"\n /></template>\n </PkChatbotViewConversations>\n <PkChatbotViewFiles v-else-if=\"activeView === 'files'\" :agent-id />\n <div\n v-else-if=\"activeView === 'auth'\"\n class=\"pk-chatbot__view-auth flex-1 min-h-0 overflow-y-auto\">\n <!-- Sign-in form provided by the host widget (owns the auth client) -->\n <slot name=\"view-auth\" />\n </div>\n <PkChatbotViewProfile v-else :agent-id>\n <template\n v-for=\"slotName in Object.keys(slots)\"\n #[slotName]=\"slotData\"\n ><slot :name=\"slotName\" v-bind=\"slotData\"\n /></template>\n </PkChatbotViewProfile>\n <!-- #endregion -->\n\n <!-- #region footer -->\n <div v-if=\"footerMessage\" class=\"pk-chatbot__footer\">\n <PkStreamingMarkdown :markdown=\"footerMessage\" class=\"wysiwyg\" />\n </div>\n <!-- #endregion -->\n </div>\n</template>\n\n<style lang=\"scss\">\n .pk-chatbot {\n display: flex;\n flex-direction: column;\n position: relative;\n height: 100%;\n background-color: var(--color-surface);\n\n &__header {\n position: sticky;\n top: 0;\n z-index: 1;\n display: flex;\n justify-content: space-between;\n gap: var(--spacing-14);\n background-color: var(--color-surface-1);\n padding: var(--spacing-14);\n border-bottom: 1px solid var(--color-surface-3);\n }\n\n &__header-start {\n display: flex;\n align-items: center;\n gap: var(--spacing-sm);\n min-width: 0;\n }\n\n &__nav-icon {\n font-size: var(--text-18);\n }\n\n &__avatar {\n width: var(--spacing-24);\n height: var(--spacing-24);\n }\n\n &__title {\n font-size: var(--text-16);\n font-weight: var(--font-semibold);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &__header-end {\n flex-shrink: 0;\n }\n\n &__warning-body {\n padding: var(--spacing-md);\n border-bottom: 1px solid var(--color-surface-3);\n }\n\n &__warning-header {\n display: flex;\n align-items: center;\n gap: var(--spacing-4);\n margin-bottom: var(--spacing-4);\n }\n\n &__warning-icon {\n width: var(--spacing-16);\n height: var(--spacing-16);\n }\n\n &__warning-title {\n font-weight: 600;\n font-size: var(--text-14);\n }\n\n &__warning-text {\n font-size: var(--text-12);\n color: var(--color-word-3);\n }\n\n &__footer {\n padding: var(--spacing-md);\n border-top: 1px solid var(--color-surface-3);\n text-align: center;\n font-size: var(--text-12);\n color: var(--color-word-2);\n }\n\n // Modifier: fullscreen — layout full-page (Gemini-style): nessun\n // header interno, sfondo trasparente, input pill centrato.\n // Il chrome (sidebar, navigazione) è gestito dalla pagina ospite.\n &--fullscreen {\n // The dock, 60px. Declared rather than taken from the agent chip,\n // which the tight layout hides: the pill fell to 54px there and\n // the call bar that takes its place stayed at 60. There is no 60\n // in the spacing scale and a raw `60px` would stop following the\n // root font size, which the labels inside do follow.\n --pk-chat-fullscreen-dock-height: calc(\n var(--spacing-56) + var(--spacing-4)\n );\n\n // The pill, the notice that tucks into its top corners and the\n // call bar all round their ends on half of it.\n --pk-chat-dock-radius: calc(\n var(--pk-chat-fullscreen-dock-height) / 2\n );\n\n background-color: transparent;\n\n .pk-chatbot__footer {\n border-top: none;\n padding: 0 var(--spacing-md) var(--spacing-sm) var(--spacing-md);\n }\n\n // Reading column aligned with the input (Gemini-style). The\n // constraint lives on the inner wrapper so the scroll container\n // spans the page and the scrollbar sits at its edge.\n .pk-chatbot-messages {\n // Symmetric gutters: a visible scrollbar would otherwise\n // shrink the content box on one side only, shifting the\n // column off the input axis\n scrollbar-gutter: stable both-edges;\n\n // Dissolve the content at both edges (works on any page\n // background, dots included — a surface-colored fade band\n // would cut through the pattern instead)\n mask-image: linear-gradient(\n to bottom,\n transparent 0,\n #000 var(--spacing-40),\n #000 calc(100% - var(--spacing-40)),\n transparent 100%\n );\n\n // Resting clearance so the first/last lines sit inside the\n // fully opaque zone\n padding-block: var(--spacing-48);\n }\n\n .pk-chatbot-messages__wrapper {\n width: 100%;\n max-width: 768px;\n margin-inline: auto;\n }\n\n // Outline rail: wide chats only, measured on the chat and not on\n // the viewport, so a preview frame squeezed by side panels loses\n // it like a phone does. The rail sits at the edge of the scroll\n // area beside the reading column: below the `--wide` threshold\n // (768px column plus a 40px rail on each side) it would cover the\n // messages instead.\n .pk-chatbot-messages__outline {\n display: none;\n }\n\n &.pk-chatbot--wide .pk-chatbot-messages__outline {\n display: block;\n }\n\n .pk-chatbot-file-preview {\n background-color: var(--color-surface);\n }\n\n .pk-chatbot-input__notice {\n background-color: var(--color-surface);\n border-inline: 1px solid var(--color-surface-3);\n border-top: 1px solid var(--color-surface-2);\n padding: var(--spacing-10) var(--spacing-16);\n\n // As deep as the pill's corners, or the page shows through\n // where their curve leaves the side\n &::after {\n background-color: var(--color-surface);\n border-inline: 1px solid var(--color-surface-2);\n bottom: calc(-1 * var(--pk-chat-dock-radius));\n height: var(--pk-chat-dock-radius);\n left: -1px;\n right: -1px;\n }\n }\n\n .pk-chatbot-input {\n width: calc(100% - var(--spacing-sm) * 2);\n max-width: 768px;\n margin-inline: auto;\n\n &__form {\n // True semicircles at rest, concentric with the send\n // button, whose center sits 30px in. Not `rounded-full`:\n // once Shift+Enter grows the field the ends would swell\n // with it and cut into the first and last line.\n border-radius: var(--pk-chat-dock-radius);\n min-height: var(--pk-chat-fullscreen-dock-height);\n padding: var(--spacing-12) var(--spacing-16);\n background-color: var(--color-surface-1);\n border-color: var(--color-surface-2);\n box-shadow: none;\n transition:\n border-color var(--duration-200) var(--ease-in-out),\n box-shadow var(--duration-200) var(--ease-in-out);\n\n &:has(:focus-within) {\n border-color: var(--color-surface-4);\n box-shadow: var(--shadow-sm);\n }\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n\n &__textarea {\n background-color: transparent;\n }\n }\n\n // A live call takes the place of the input, so it takes its shape,\n // its column and its height: full-bleed here would break the\n // reading axis, and a different height would make the dock jump\n // the moment the call starts.\n .pk-voice-session {\n --pk-chat-dock-height: var(--pk-chat-fullscreen-dock-height);\n --pk-voice-orb-size: var(--spacing-40);\n --pk-voice-orb-bars-height: var(--spacing-20);\n --pk-voice-session-surface: var(--color-surface-1);\n\n width: calc(100% - var(--spacing-sm) * 2);\n max-width: 768px;\n margin-inline: auto;\n padding-inline: var(--spacing-16);\n border-color: var(--color-surface-2);\n border-radius: var(--pk-chat-dock-radius);\n box-shadow: none;\n\n &__timer {\n font-size: var(--text-14);\n }\n }\n\n // A colleague's conversation in a shared project: the line that\n // takes the input's place takes its shape, column and height too,\n // as the call does, so the dock does not jump between chats.\n .pk-chatbot-view-chat__read-only {\n width: calc(100% - var(--spacing-sm) * 2);\n max-width: 768px;\n min-height: var(--pk-chat-fullscreen-dock-height);\n margin-inline: auto;\n padding-inline: var(--spacing-16) var(--spacing-12);\n border-color: var(--color-surface-2);\n border-radius: var(--pk-chat-dock-radius);\n background-color: var(--color-surface-1);\n }\n }\n\n // Modifier: panel — compact chrome for a docked side panel: the host\n // container owns background and border, the header slims down and\n // drops its own surface so the chat blends into the panel.\n &--panel {\n background-color: transparent;\n\n .pk-chatbot__header {\n background-color: transparent;\n\n // Fixed height so the panel header lines up with the host's\n // own chrome. Custom properties inherit through the shadow\n // root: an embedding host can override it to match its\n // header (the default matches the platform header, 50px).\n height: var(--pk-chatbot-panel-header-height, 50px);\n align-items: center;\n padding-block: 0;\n padding-inline: var(--spacing-10);\n border-bottom: 1px solid var(--color-surface-3);\n }\n\n .pk-chatbot__title {\n font-size: var(--text-14);\n }\n\n .pk-chatbot__footer {\n border-top: none;\n padding: var(--spacing-6) var(--spacing-md);\n }\n }\n\n // A chat given a whole page without the fullscreen layout (the page\n // an iframe embeds, a widget its host lets fill the screen) keeps the\n // reading column of the fullscreen one: at 1440px an answer ran\n // 1408px wide, some two hundred characters a line. Measured on the\n // chat, like `--wide` itself, so a narrow frame is left alone.\n &--wide:not(.pk-chatbot--fullscreen) {\n .pk-chatbot-messages__wrapper,\n .pk-chatbot-input {\n width: 100%;\n max-width: 768px;\n margin-inline: auto;\n }\n }\n }\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CI,IAAMqD,IAAQC,GAAS,GAEjB,EAAE,GAAGC,MAAOC,GAAQ,EACtB,UAAU,SACd,CAAC,GAEKC,IAAQC,GA8CRC,IAAOP,GAaPQ,KAAS5D,GAA+B0D,GAAC,QAG9C,GAEKI,IAAQrC,EAAgBgC,EAAM,OAAO;EAI3C,GAAyB,MACrBK,EAAM,UAAU,iBAAiBC,CAAM,CAC3C;EAEA,IAAM,EACF,aACA,gBACA,eACA,eACA,YACA,wBACA,kBACA,2BACA,wBACAC,GAAYF,CAAK,GAGfG,IAAeC,GAAMJ,GAAO,SAAS,GAErC,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,EAAAkG,EAAA,KAAXvG,EAAA,GAAAC,EAEM,OAFN4C,IAEM,CADFtC,EAAiEe,IAAA;KAA3C,UAAUjB,EAAAkG,EAAA;KAAe,OAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"PkChatbotAudioTranscript-DgmuXalb.js","names":["_openBlock","_createElementBlock","_createElementVNode","_createVNode","_toDisplayString","_unref","formatClock","total","seconds","hours","minutes","rest","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","PkChatbotAudioTranscript_default","defineComponent","props","__props","$t","useI18n","isOpen","ref","text","computed","duration","missing","_component_VvIcon","VvIcon","openBlock","createElementBlock","createElementVNode","createVNode","toDisplayString","unref","_cache","createCommentVNode"],"sources":["../../../../packages/utils/src/text-metrics.ts","../../../../packages/components/src/chat/PkChatbotAudioTranscript.vue"],"sourcesContent":["/**\n * Utility functions for calculating text metrics\n * Shared across document converters and scrapers\n */\n\n/**\n * Count words in markdown/plain text\n * Removes markdown syntax and counts actual words\n */\nexport function countWords(text: string): number {\n const plainText = text\n .replace(/[#*_~`[\\]()]/g, '') // Remove markdown characters\n .replace(/\\n+/g, ' ') // Replace newlines with spaces\n .trim()\n\n if (!plainText) {\n return 0\n }\n\n return plainText.split(/\\s+/).filter((word) => word.length > 0).length\n}\n\n/**\n * Count characters (excluding markdown syntax and whitespace)\n */\nexport function countCharacters(text: string): number {\n return text.replace(/[#*_~`[\\]()]/g, '').replace(/\\s/g, '').length\n}\n\n/**\n * Count paragraphs (separated by double newline)\n */\nexport function countParagraphs(text: string): number {\n return text.split(/\\n\\n+/).filter((p) => p.trim().length > 0).length\n}\n\n/**\n * Count lines (non-empty lines)\n */\nexport function countLines(text: string): number {\n return text.split('\\n').filter((line) => line.trim().length > 0).length\n}\n\n/**\n * Estimate reading time in minutes\n * @param wordCount - Number of words\n * @param wordsPerMinute - Average reading speed (default: 200)\n * @returns Estimated reading time in minutes (minimum 1)\n */\nexport function estimateReadingTime(\n wordCount: number,\n wordsPerMinute = 200,\n): number {\n const minutes = Math.ceil(wordCount / wordsPerMinute)\n return Math.max(1, minutes) // Minimum 1 minute\n}\n\n/**\n * A duration as a player shows it: `m:ss`, or `h:mm:ss` from an hour up.\n * @param seconds - The duration, rounded to the second\n */\nexport function formatClock(seconds: number): string {\n const total = Math.max(0, Math.round(seconds))\n const hours = Math.floor(total / 3600)\n const minutes = String(Math.floor((total % 3600) / 60)).padStart(\n hours ? 2 : 1,\n '0',\n )\n const rest = String(total % 60).padStart(2, '0')\n return hours ? `${hours}:${minutes}:${rest}` : `${minutes}:${rest}`\n}\n","<script lang=\"ts\" setup>\n import { computed, ref } from 'vue'\n import { useI18n } from 'vue-i18n'\n import type { ChatAudioTranscript } from 'models'\n import { formatClock } from 'utils'\n\n const props = defineProps<{\n /** Where the recording plays from. */\n url: string\n /** What the turn heard, once it has (spec `audio-file-transcription.md`, D4). */\n transcript?: ChatAudioTranscript\n /** The turn is still transcribing it: the answer waits on it. */\n pending?: boolean\n }>()\n\n const { t: $t } = useI18n({ useScope: 'global' })\n\n /** Arrives open: it is what the turn heard, and its height is bounded. */\n const isOpen = ref(true)\n\n const text = computed(() =>\n props.transcript?.status === 'ready'\n ? props.transcript.text?.trim()\n : undefined,\n )\n\n const duration = computed(() =>\n props.transcript?.durationSeconds\n ? formatClock(props.transcript.durationSeconds)\n : undefined,\n )\n\n /** Why there is no transcript to open, when there is none. */\n const missing = computed(() => {\n switch (props.transcript?.status) {\n case 'no-speech':\n return $t('messagePart.audioTranscriptNoSpeech')\n case 'failed':\n return $t('messagePart.audioTranscriptFailed')\n case 'off':\n return $t('messagePart.audioTranscriptOff')\n default:\n return undefined\n }\n })\n</script>\n\n<template>\n <div class=\"pk-chatbot-audio\">\n <audio\n class=\"pk-chatbot-audio__player\"\n :src=\"url\"\n controls\n preload=\"none\" />\n <!-- The same box as the steps of an answer (`PkChatbotSteps`): a\n header row that opens a body of bounded height. -->\n <div\n v-if=\"pending && !transcript\"\n class=\"pk-chatbot-audio__box\"\n role=\"status\">\n <div class=\"pk-chatbot-audio__header\">\n <VvIcon name=\"loading-loop\" class=\"shrink-0\" />\n <span class=\"pk-chatbot-audio__title\">\n {{ $t('messagePart.audioTranscribing') }}\n </span>\n </div>\n </div>\n <div v-else-if=\"text\" class=\"pk-chatbot-audio__box\">\n <button\n type=\"button\"\n class=\"pk-chatbot-audio__header pk-chatbot-audio__header--toggle\"\n :aria-expanded=\"isOpen\"\n @click=\"isOpen = !isOpen\">\n <VvIcon name=\"ri:file-text-line\" class=\"shrink-0\" />\n <span class=\"pk-chatbot-audio__title\">\n {{ $t('messagePart.audioTranscript') }}\n </span>\n <span v-if=\"duration\" class=\"pk-chatbot-audio__meta\">\n {{ duration }}\n </span>\n <VvIcon\n :name=\"\n isOpen ? 'ri:arrow-up-s-line' : 'ri:arrow-down-s-line'\n \"\n class=\"pk-chatbot-audio__chevron shrink-0 ml-auto\" />\n </button>\n <div v-if=\"isOpen\" class=\"pk-chatbot-audio__body\">\n {{ text }}\n </div>\n </div>\n <div v-else-if=\"missing\" class=\"pk-chatbot-audio__box\">\n <div class=\"pk-chatbot-audio__header\">\n <VvIcon name=\"ri:file-text-line\" class=\"shrink-0\" />\n <span>{{ missing }}</span>\n </div>\n </div>\n </div>\n</template>\n\n<style lang=\"scss\">\n // On the side of the message it belongs to, as wide as a transcript reads\n // well.\n .pk-chatbot-audio {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: var(--spacing-8);\n width: 100%;\n max-width: 28rem;\n min-width: 0;\n\n // As wide as the file card above.\n &__player {\n width: 100%;\n max-width: 280px;\n }\n\n // The frame and the rows of `.pk-chatbot-steps`, so a transcript reads\n // as one more thing the turn did.\n &__box {\n width: 100%;\n border: var(--spacing-px) solid var(--color-surface-3);\n border-radius: var(--rounded-lg);\n background-color: var(--color-surface-1);\n font-size: var(--text-12);\n color: var(--color-word-3);\n overflow: hidden;\n }\n\n &__header {\n display: flex;\n align-items: center;\n gap: var(--spacing-8);\n width: 100%;\n min-height: var(--spacing-40);\n padding: var(--spacing-8) var(--spacing-sm);\n text-align: left;\n\n &--toggle {\n cursor: pointer;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: var(--color-surface-2);\n }\n }\n }\n\n &__title {\n font-weight: 600;\n color: var(--color-word-2);\n flex-grow: 1;\n }\n\n &__meta {\n color: var(--color-word-4);\n font-variant-numeric: tabular-nums;\n }\n\n &__chevron {\n font-size: var(--text-16);\n }\n\n // The paragraphs and their [hh:mm:ss] stamps are the transcript's\n // own; a long meeting scrolls inside, as a finished reasoning does.\n &__body {\n max-height: var(--spacing-256);\n overflow: auto;\n padding: var(--spacing-8) var(--spacing-sm);\n border-top: var(--spacing-px) solid var(--color-surface-3);\n background-color: var(--color-surface);\n color: var(--color-word-2);\n line-height: 1.6;\n white-space: pre-line;\n overflow-wrap: anywhere;\n }\n }\n</style>\n"],"mappings":";;;;;AA6DA,SAAgBM,EAAY,GAAyB;CACjD,IAAMC,IAAQ,KAAK,IAAI,GAAG,KAAK,MAAMC,CAAO,CAAC,GACvCC,IAAQ,KAAK,MAAMF,IAAQ,IAAI,GAC/BG,IAAU,OAAO,KAAK,MAAOH,IAAQ,OAAQ,EAAE,CAAC,CAAC,CAAC,SACpDE,IAAQ,IAAI,GACZ,GACJ,GACME,IAAO,OAAOJ,IAAQ,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG;CAC/C,OAAOE,IAAQ,GAAGA,EAAM,GAAGC,EAAQ,GAAGC,MAAS,GAAGD,EAAQ,GAAGC;AACjE;;;;;;;;;;;;;;;;;;;;;;;;;;EChEI,IAAMe,IAAQC,GASR,EAAE,GAAGC,MAAOC,EAAQ,EAAE,UAAU,SAAS,CAAC,GAG1CC,IAASC,EAAI,EAAI,GAEjBC,IAAOC,QACTP,EAAM,YAAY,WAAW,UACvBA,EAAM,WAAW,MAAM,KAAK,IAC5B,KAAA,CACV,GAE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A,K,eAGCG,EAAA,SAAhBnC,EAAA,GAAAC,EAKM,OALNqB,GAKM,CAJFpB,EAGM,OAHNqB,GAGM,CAFFpB,EAAoDiC,GAAA;IAA5C,MAAK;IAAoB,OAAM;G,IACvClC,EAA0B,QAAA,MAAAE,EAAjB+B,EAAA,KAAO,GAAA,CAAA,C"}
1
+ {"version":3,"file":"PkChatbotAudioTranscript-DgmuXalb.js","names":["_openBlock","_createElementBlock","_createElementVNode","_createVNode","_toDisplayString","_unref","formatClock","total","seconds","hours","minutes","rest","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","PkChatbotAudioTranscript_default","defineComponent","props","__props","$t","useI18n","isOpen","ref","text","computed","duration","missing","_component_VvIcon","VvIcon","openBlock","createElementBlock","createElementVNode","createVNode","toDisplayString","unref","_cache","createCommentVNode"],"sources":["../../../../packages/utils/src/text-metrics.ts","../../../../packages/components/src/chat/PkChatbotAudioTranscript.vue"],"sourcesContent":["/**\n * Utility functions for calculating text metrics\n * Shared across document converters and scrapers\n */\n\n/**\n * Count words in markdown/plain text\n * Removes markdown syntax and counts actual words\n */\nexport function countWords(text: string): number {\n const plainText = text\n .replace(/[#*_~`[\\]()]/g, '') // Remove markdown characters\n .replace(/\\n+/g, ' ') // Replace newlines with spaces\n .trim()\n\n if (!plainText) {\n return 0\n }\n\n return plainText.split(/\\s+/).filter((word) => word.length > 0).length\n}\n\n/**\n * Count characters (excluding markdown syntax and whitespace)\n */\nexport function countCharacters(text: string): number {\n return text.replace(/[#*_~`[\\]()]/g, '').replace(/\\s/g, '').length\n}\n\n/**\n * Count paragraphs (separated by double newline)\n */\nexport function countParagraphs(text: string): number {\n return text.split(/\\n\\n+/).filter((p) => p.trim().length > 0).length\n}\n\n/**\n * Count lines (non-empty lines)\n */\nexport function countLines(text: string): number {\n return text.split('\\n').filter((line) => line.trim().length > 0).length\n}\n\n/**\n * Estimate reading time in minutes\n * @param wordCount - Number of words\n * @param wordsPerMinute - Average reading speed (default: 200)\n * @returns Estimated reading time in minutes (minimum 1)\n */\nexport function estimateReadingTime(\n wordCount: number,\n wordsPerMinute = 200,\n): number {\n const minutes = Math.ceil(wordCount / wordsPerMinute)\n return Math.max(1, minutes) // Minimum 1 minute\n}\n\n/**\n * A duration as a player shows it: `m:ss`, or `h:mm:ss` from an hour up.\n * @param seconds - The duration, rounded to the second\n */\nexport function formatClock(seconds: number): string {\n const total = Math.max(0, Math.round(seconds))\n const hours = Math.floor(total / 3600)\n const minutes = String(Math.floor((total % 3600) / 60)).padStart(\n hours ? 2 : 1,\n '0',\n )\n const rest = String(total % 60).padStart(2, '0')\n return hours ? `${hours}:${minutes}:${rest}` : `${minutes}:${rest}`\n}\n","<script lang=\"ts\" setup>\n import { computed, ref } from 'vue'\n import { useI18n } from 'vue-i18n'\n import type { ChatAudioTranscript } from 'models'\n import { formatClock } from 'utils'\n\n const props = defineProps<{\n /** Where the recording plays from. */\n url: string\n /** What the turn heard, once it has (spec `audio-file-transcription.md`, D4). */\n transcript?: ChatAudioTranscript\n /** The turn is still transcribing it: the answer waits on it. */\n pending?: boolean\n }>()\n\n const { t: $t } = useI18n({ useScope: 'global' })\n\n /** Arrives open: it is what the turn heard, and its height is bounded. */\n const isOpen = ref(true)\n\n const text = computed(() =>\n props.transcript?.status === 'ready'\n ? props.transcript.text?.trim()\n : undefined,\n )\n\n const duration = computed(() =>\n props.transcript?.durationSeconds\n ? formatClock(props.transcript.durationSeconds)\n : undefined,\n )\n\n /** Why there is no transcript to open, when there is none. */\n const missing = computed(() => {\n switch (props.transcript?.status) {\n case 'no-speech':\n return $t('messagePart.audioTranscriptNoSpeech')\n case 'failed':\n return $t('messagePart.audioTranscriptFailed')\n case 'off':\n return $t('messagePart.audioTranscriptOff')\n default:\n return undefined\n }\n })\n</script>\n\n<template>\n <div class=\"pk-chatbot-audio\">\n <audio\n class=\"pk-chatbot-audio__player\"\n :src=\"url\"\n controls\n preload=\"none\" />\n <!-- The same box as the steps of an answer (`PkChatbotSteps`): a\n header row that opens a body of bounded height. -->\n <div\n v-if=\"pending && !transcript\"\n class=\"pk-chatbot-audio__box\"\n role=\"status\">\n <div class=\"pk-chatbot-audio__header\">\n <VvIcon name=\"loading-loop\" class=\"shrink-0\" />\n <span class=\"pk-chatbot-audio__title\">\n {{ $t('messagePart.audioTranscribing') }}\n </span>\n </div>\n </div>\n <div v-else-if=\"text\" class=\"pk-chatbot-audio__box\">\n <button\n type=\"button\"\n class=\"pk-chatbot-audio__header pk-chatbot-audio__header--toggle\"\n :aria-expanded=\"isOpen\"\n @click=\"isOpen = !isOpen\">\n <VvIcon name=\"ri:file-text-line\" class=\"shrink-0\" />\n <span class=\"pk-chatbot-audio__title\">\n {{ $t('messagePart.audioTranscript') }}\n </span>\n <span v-if=\"duration\" class=\"pk-chatbot-audio__meta\">\n {{ duration }}\n </span>\n <VvIcon\n :name=\"\n isOpen ? 'ri:arrow-up-s-line' : 'ri:arrow-down-s-line'\n \"\n class=\"pk-chatbot-audio__chevron shrink-0 ml-auto\" />\n </button>\n <div v-if=\"isOpen\" class=\"pk-chatbot-audio__body\">\n {{ text }}\n </div>\n </div>\n <div v-else-if=\"missing\" class=\"pk-chatbot-audio__box\">\n <div class=\"pk-chatbot-audio__header\">\n <VvIcon name=\"ri:file-text-line\" class=\"shrink-0\" />\n <span>{{ missing }}</span>\n </div>\n </div>\n </div>\n</template>\n\n<style lang=\"scss\">\n // On the side of the message it belongs to, as wide as a transcript reads\n // well.\n .pk-chatbot-audio {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: var(--spacing-8);\n width: 100%;\n max-width: 28rem;\n min-width: 0;\n\n // As wide as the file card above.\n &__player {\n width: 100%;\n max-width: 280px;\n }\n\n // The frame and the rows of `.pk-chatbot-steps`, so a transcript reads\n // as one more thing the turn did.\n &__box {\n width: 100%;\n border: var(--spacing-px) solid var(--color-surface-3);\n border-radius: var(--rounded-lg);\n background-color: var(--color-surface-1);\n font-size: var(--text-12);\n color: var(--color-word-3);\n overflow: hidden;\n }\n\n &__header {\n display: flex;\n align-items: center;\n gap: var(--spacing-8);\n width: 100%;\n min-height: var(--spacing-40);\n padding: var(--spacing-8) var(--spacing-sm);\n text-align: left;\n\n &--toggle {\n cursor: pointer;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: var(--color-surface-2);\n }\n }\n }\n\n &__title {\n font-weight: 600;\n color: var(--color-word-2);\n flex-grow: 1;\n }\n\n &__meta {\n color: var(--color-word-3);\n font-variant-numeric: tabular-nums;\n }\n\n &__chevron {\n font-size: var(--text-16);\n }\n\n // The paragraphs and their [hh:mm:ss] stamps are the transcript's\n // own; a long meeting scrolls inside, as a finished reasoning does.\n &__body {\n max-height: var(--spacing-256);\n overflow: auto;\n padding: var(--spacing-8) var(--spacing-sm);\n border-top: var(--spacing-px) solid var(--color-surface-3);\n background-color: var(--color-surface);\n color: var(--color-word-2);\n line-height: 1.6;\n white-space: pre-line;\n overflow-wrap: anywhere;\n }\n }\n</style>\n"],"mappings":";;;;;AA6DA,SAAgBM,EAAY,GAAyB;CACjD,IAAMC,IAAQ,KAAK,IAAI,GAAG,KAAK,MAAMC,CAAO,CAAC,GACvCC,IAAQ,KAAK,MAAMF,IAAQ,IAAI,GAC/BG,IAAU,OAAO,KAAK,MAAOH,IAAQ,OAAQ,EAAE,CAAC,CAAC,CAAC,SACpDE,IAAQ,IAAI,GACZ,GACJ,GACME,IAAO,OAAOJ,IAAQ,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG;CAC/C,OAAOE,IAAQ,GAAGA,EAAM,GAAGC,EAAQ,GAAGC,MAAS,GAAGD,EAAQ,GAAGC;AACjE;;;;;;;;;;;;;;;;;;;;;;;;;;EChEI,IAAMe,IAAQC,GASR,EAAE,GAAGC,MAAOC,EAAQ,EAAE,UAAU,SAAS,CAAC,GAG1CC,IAASC,EAAI,EAAI,GAEjBC,IAAOC,QACTP,E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X9B,EAAA,GAAAC,EAEM,OAFNoB,GAEMjB,EADC4B,EAAA,KAAI,GAAA,CAAA,K,eAGCG,EAAA,SAAhBnC,EAAA,GAAAC,EAKM,OALNqB,GAKM,CAJFpB,EAGM,OAHNqB,GAGM,CAFFpB,EAAoDiC,GAAA;IAA5C,MAAK;IAAoB,OAAM;G,IACvClC,EAA0B,QAAA,MAAAE,EAAjB+B,EAAA,KAAO,GAAA,CAAA,C"}
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./PkAvatar-DwtZWSW4.js";
2
- import { t } from "./PkStreamingMarkdown-BcUq4ThC.js";
2
+ import { t } from "./PkStreamingMarkdown-ha0V58V9.js";
3
3
  import { createBlock as n, createCommentVNode as r, createElementBlock as i, defineComponent as a, openBlock as o } from "vue";
4
4
  // ../../packages/components/src/chat/PkChatbotEmptyState.vue?vue&type=script&setup=true&lang.ts
5
5
  var s = { class: "pk-chatbot-empty-state" }, c = /* @__PURE__ */ a({
@@ -25,4 +25,4 @@ var s = { class: "pk-chatbot-empty-state" }, c = /* @__PURE__ */ a({
25
25
  });
26
26
  export { c as t };
27
27
 
28
- //# sourceMappingURL=PkChatbotEmptyState-vA2v4FES.js.map
28
+ //# sourceMappingURL=PkChatbotEmptyState-CLfzcH_t.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PkChatbotEmptyState-vA2v4FES.js","names":["_openBlock","_createElementBlock","_createBlock","PkAvatar","PkStreamingMarkdown","PkAvatar_default","_hoisted_1","PkChatbotEmptyState_default","defineComponent","openBlock","createElementBlock","__props","createBlock","createCommentVNode","PkStreamingMarkdown_default"],"sources":["../../../../packages/components/src/chat/PkChatbotEmptyState.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import PkAvatar from './PkAvatar.vue'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n\n defineProps<{\n greeting?: string\n /** Agent avatar shown above the greeting where the input chip is hidden (mobile) */\n logo?: string | null\n name?: string\n }>()\n</script>\n\n<template>\n <div class=\"pk-chatbot-empty-state\">\n <PkAvatar\n v-if=\"logo || name\"\n class=\"pk-chatbot-empty-state__avatar\"\n :img-src=\"logo\"\n :name=\"name\" />\n <PkStreamingMarkdown\n v-if=\"greeting\"\n :markdown=\"greeting\"\n :animation=\"null\"\n class=\"wysiwyg pk-chatbot-empty-state__greeting\" />\n </div>\n</template>\n\n<style lang=\"scss\">\n .pk-chatbot-empty-state {\n // Above the fullscreen ambient glow\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--spacing-sm);\n padding: var(--spacing-md);\n text-align: center;\n\n // Let the greeting wrap on a couple of lines (Gemini-like). Keyed on\n // the chat's own width (`--phone`, measured in PkChatbot): a narrow\n // preview frame on a desktop screen wraps like a phone\n .pk-chatbot--phone & {\n padding-inline: var(--spacing-56);\n }\n\n &__avatar {\n width: var(--spacing-64);\n height: var(--spacing-64);\n font-size: var(--text-20);\n\n // The agent identity lives in the input chip when that is\n // visible: the chip hides itself at `--tight`, so keying the\n // avatar on the absence of that modifier shows exactly one of\n // the two\n .pk-chatbot:not(.pk-chatbot--tight) & {\n display: none;\n }\n }\n\n &__greeting {\n font-size: var(--text-28);\n font-weight: var(--font-light);\n color: var(--color-word-1);\n text-wrap: balance;\n\n // Render the greeting markdown inline as a single heading line\n :first-child {\n margin-top: 0;\n }\n\n :last-child {\n margin-bottom: 0;\n }\n }\n\n // Enters fading in from below, in sync with the glow ignition\n &__avatar,\n &__greeting {\n animation: pk-chatbot-greeting-enter 600ms var(--ease-out) both;\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n }\n }\n }\n\n @keyframes pk-chatbot-greeting-enter {\n from {\n opacity: 0;\n transform: translateY(var(--spacing-16));\n }\n }\n</style>\n"],"mappings":";;;;;;;;;;;;E,kBAaIA,EAAA,GAAAC,EAWM,OAXNK,GAWM,CATQK,EAAA,QAAQA,EAAA,QADlBX,EAAA,GAAAE,EAImBC,GAAA;;GAFf,OAAM;GACL,WAASQ,EAAA;GACT,MAAMA,EAAA;E,+CAEDA,EAAA,YADVX,EAAA,GAAAE,EAIuDE,GAAA;;GAFlD,UAAUO,EAAA;GACV,WAAW;GACZ,OAAM"}
1
+ {"version":3,"file":"PkChatbotEmptyState-CLfzcH_t.js","names":["_openBlock","_createElementBlock","_createBlock","PkAvatar","PkStreamingMarkdown","PkAvatar_default","_hoisted_1","PkChatbotEmptyState_default","defineComponent","openBlock","createElementBlock","__props","createBlock","createCommentVNode","PkStreamingMarkdown_default"],"sources":["../../../../packages/components/src/chat/PkChatbotEmptyState.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import PkAvatar from './PkAvatar.vue'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n\n defineProps<{\n greeting?: string\n /** Agent avatar shown above the greeting where the input chip is hidden (mobile) */\n logo?: string | null\n name?: string\n }>()\n</script>\n\n<template>\n <div class=\"pk-chatbot-empty-state\">\n <PkAvatar\n v-if=\"logo || name\"\n class=\"pk-chatbot-empty-state__avatar\"\n :img-src=\"logo\"\n :name=\"name\" />\n <PkStreamingMarkdown\n v-if=\"greeting\"\n :markdown=\"greeting\"\n :animation=\"null\"\n class=\"wysiwyg pk-chatbot-empty-state__greeting\" />\n </div>\n</template>\n\n<style lang=\"scss\">\n .pk-chatbot-empty-state {\n // Above the fullscreen ambient glow\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--spacing-sm);\n padding: var(--spacing-md);\n text-align: center;\n\n // Let the greeting wrap on a couple of lines (Gemini-like). Keyed on\n // the chat's own width (`--phone`, measured in PkChatbot): a narrow\n // preview frame on a desktop screen wraps like a phone\n .pk-chatbot--phone & {\n padding-inline: var(--spacing-56);\n }\n\n &__avatar {\n width: var(--spacing-64);\n height: var(--spacing-64);\n font-size: var(--text-20);\n\n // The agent identity lives in the input chip when that is\n // visible: the chip hides itself at `--tight`, so keying the\n // avatar on the absence of that modifier shows exactly one of\n // the two\n .pk-chatbot:not(.pk-chatbot--tight) & {\n display: none;\n }\n }\n\n &__greeting {\n font-size: var(--text-28);\n font-weight: var(--font-light);\n color: var(--color-word-1);\n text-wrap: balance;\n\n // Render the greeting markdown inline as a single heading line\n :first-child {\n margin-top: 0;\n }\n\n :last-child {\n margin-bottom: 0;\n }\n }\n\n // Enters fading in from below, in sync with the glow ignition\n &__avatar,\n &__greeting {\n animation: pk-chatbot-greeting-enter 600ms var(--ease-out) both;\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n }\n }\n }\n\n @keyframes pk-chatbot-greeting-enter {\n from {\n opacity: 0;\n transform: translateY(var(--spacing-16));\n }\n }\n</style>\n"],"mappings":";;;;;;;;;;;;E,kBAaIA,EAAA,GAAAC,EAWM,OAXNK,GAWM,CATQK,EAAA,QAAQA,EAAA,QADlBX,EAAA,GAAAE,EAImBC,GAAA;;GAFf,OAAM;GACL,WAASQ,EAAA;GACT,MAAMA,EAAA;E,+CAEDA,EAAA,YADVX,EAAA,GAAAE,EAIuDE,GAAA;;GAFlD,UAAUO,EAAA;GACV,WAAW;GACZ,OAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"PkChatbotFilePreview-aKJBtw04.js","names":["$t","$emit","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_unref","_withDirectives","_vShow","_createVNode","_withModifiers","_toDisplayString","_createTextVNode","_Fragment","_normalizeStyle","_createBlock","useLightbox","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","THUMB_CACHE_MAX","PkChatbotFilePreview_default","defineComponent","props","__props","onOpenClick","event","isImage","computed","extension","name","dot","subtype","KINDS","fileKind","haystack","test","kind","typeTag","formattedSize","bytes","units","value","unitIndex","thumbCache","setThumbCache","url","entry","cached","thumbStatus","ref","dimensions","onImageLoad","img","onImageError","pswpSize","DEFAULT_PSWP_SIZE","imageMeta","docMeta","galleryRef","onMounted","init","_component_VvIcon","VvIcon","openBlock","createElementBlock","normalizeClass","createElementVNode","unref","shared","_ctx","withDirectives","vShow","createVNode","_cache","withModifiers","createCommentVNode","toDisplayString","createTextVNode","Fragment","normalizeStyle","createBlock","args"],"sources":["../../../../packages/components/src/chat/PkChatbotFilePreview.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { computed, ref, onMounted } from 'vue'\n import { useLightbox } from '../composables/useLightbox'\n\n const props = defineProps<{\n mediaType: string\n url: string\n filename?: string\n /** Size in bytes, when known (e.g. local uploads). */\n size?: number\n loading?: boolean\n error?: string\n removable?: boolean\n /**\n * Shows the \"Edit\" button on an image of the composer (`compact`),\n * opposite the remove one: the host opens the image editor on `edit`.\n */\n editable?: boolean\n /**\n * The upload failed (`error`) and can be tried again: the failure\n * mark becomes a \"Retry\" button, and the host uploads again on `retry`.\n */\n retryable?: boolean\n /**\n * Dense layout for the composer: a small square thumbnail / slim row,\n * without the metadata caption. The full card is reserved for the\n * message log where the details matter.\n */\n compact?: boolean\n /**\n * Keeps the download button visible instead of revealing it on hover:\n * for a file the agent wrote, which the user is there to download.\n */\n showDownload?: boolean\n /**\n * Replaces the download link of a document with a call, for a file\n * whose download URL is minted on demand (a knowledge base document\n * shared in the chat). `url` stays the link's `href`.\n */\n onDownload?: () => void | Promise<void>\n /**\n * Draws an image as a file row, with its download button, instead of\n * a thumbnail: for an image whose `url` stops working while its\n * download keeps going (a shared document after its link expires).\n */\n asFile?: boolean\n /**\n * Opens the file in the chat's viewer: a Word document or a\n * spreadsheet the chat stores, with a button beside the download.\n */\n onPreview?: () => void\n /**\n * Asks for this earlier version of the file back as the newest one,\n * with a button before the others.\n */\n onRestore?: () => void\n }>()\n\n defineEmits<{\n remove: []\n edit: []\n retry: []\n }>()\n\n const onOpenClick = (event: MouseEvent) => {\n if (!props.onDownload) {\n return\n }\n event.preventDefault()\n void props.onDownload()\n }\n\n const isImage = computed(\n () => !props.asFile && props.mediaType.startsWith('image/'),\n )\n\n // --- File-type identity (icon + accent + human kind label) ---\n\n const extension = computed(() => {\n const name = props.filename ?? ''\n const dot = name.lastIndexOf('.')\n return dot > 0 ? name.slice(dot + 1).toLowerCase() : ''\n })\n\n // mediaType subtype, e.g. \"pdf\" from \"application/pdf\"\n const subtype = computed(\n () => props.mediaType.split('/')[1]?.split(';')[0] ?? '',\n )\n\n type FileKind = {\n icon: string\n // CSS color driving the icon glyph + tile tint\n accent: string\n label: string\n }\n\n const KINDS: Array<{ test: RegExp; kind: FileKind }> = [\n {\n test: /pdf/,\n kind: {\n icon: 'ri:file-pdf-2-line',\n accent: '#e2483d',\n label: 'PDF',\n },\n },\n {\n // Match Word specifically: the generic `document` substring also\n // appears in the XLSX/PPTX OOXML mime types (…officedocument…), so\n // matching it here would mis-label spreadsheets/decks as Word.\n test: /msword|wordprocessingml/,\n kind: {\n icon: 'ri:file-word-2-line',\n accent: '#2b7de9',\n label: 'Word',\n },\n },\n {\n test: /sheet|excel|csv/,\n kind: {\n icon: 'ri:file-excel-2-line',\n accent: '#1f9d57',\n label: 'Spreadsheet',\n },\n },\n {\n test: /presentation|powerpoint/,\n kind: {\n icon: 'ri:file-ppt-2-line',\n accent: '#d98324',\n label: 'Presentation',\n },\n },\n {\n test: /zip|compressed|x-7z|x-rar|x-tar|gzip/,\n kind: {\n icon: 'ri:file-zip-line',\n accent: '#c08a1e',\n label: 'Archive',\n },\n },\n {\n // Reached only by an image drawn as a file (`asFile`).\n test: /^image\\//,\n kind: {\n icon: 'ri:image-2-line',\n accent: '#0ea5e9',\n label: 'Image',\n },\n },\n {\n test: /^audio\\//,\n kind: {\n icon: 'ri:file-music-line',\n accent: '#8b5cf6',\n label: 'Audio',\n },\n },\n {\n test: /^video\\//,\n kind: {\n icon: 'ri:film-line',\n accent: '#6366f1',\n label: 'Video',\n },\n },\n {\n // The code an agent can take (`SUPPORTED_CODE_TYPES`).\n test: /json|javascript|typescript|xml|html|css|yaml|toml|sql|x-(?:sh|python|java|kotlin|c|csharp|go|rust|ruby|php|swift|vue)\\b/,\n kind: {\n icon: 'ri:file-code-line',\n accent: '#0d9488',\n label: 'Code',\n },\n },\n {\n test: /^text\\//,\n kind: {\n icon: 'ri:file-text-line',\n accent: '#64748b',\n label: 'Text',\n },\n },\n ]\n\n const fileKind = computed<FileKind>(() => {\n const haystack = `${props.mediaType} ${extension.value}`\n for (const { test, kind } of KINDS) {\n if (test.test(haystack)) {\n return kind\n }\n }\n return {\n icon: 'ri:file-line',\n accent: '#64748b',\n label: 'File',\n }\n })\n\n // Short type tag shown in the meta line: prefer the real extension, fall\n // back to the mime subtype, then the generic kind label.\n const typeTag = computed(() =>\n (\n extension.value ||\n subtype.value ||\n fileKind.value.label\n ).toUpperCase(),\n )\n\n // --- Size & dimensions ---\n\n const formattedSize = computed(() => {\n const bytes = props.size\n if (bytes === undefined || bytes < 0) {\n return undefined\n }\n if (bytes < 1024) {\n return `${bytes} B`\n }\n const units = ['KB', 'MB', 'GB', 'TB']\n let value = bytes / 1024\n let unitIndex = 0\n while (value >= 1024 && unitIndex < units.length - 1) {\n value /= 1024\n unitIndex += 1\n }\n return `${value < 10 ? value.toFixed(1) : Math.round(value)} ${units[unitIndex]}`\n })\n\n // Thumbnail load lifecycle. Driving the spinner and the error fallback\n // off the real <img> events (not a second background fetch) means the\n // image is requested exactly once and reuses the browser cache on any\n // later re-render, instead of re-downloading every time the message list\n // repaints.\n // Not `useImageFallback`: this tile also needs `loading` vs `loaded` and the\n // decoded dimensions, cached across remounts, so the error flag is one field\n // of a richer per-url entry rather than a standalone broken-url set.\n type ThumbStatus = 'loading' | 'loaded' | 'error'\n\n // Module-level, keyed by URL: survives component recreation. In polled\n // views (e.g. admin chat-logs, refreshed every few seconds) the whole\n // message array is replaced on each poll, so this component can be torn\n // down and rebuilt. Seeding from the cache means a URL that already\n // decoded starts in `loaded` (no spinner flash, no re-decode) instead of\n // flickering back through `loading`. This is a client-side, per-session\n // cache (no server/Redis involved); bounded to a max size so a long-lived\n // session browsing many images can't grow it without limit — the oldest\n // entry is evicted first (Map preserves insertion order).\n type ThumbEntry = {\n status: ThumbStatus\n dimensions?: { width: number; height: number }\n }\n const THUMB_CACHE_MAX = 300\n const thumbCache = new Map<string, ThumbEntry>()\n const setThumbCache = (url: string, entry: ThumbEntry) => {\n // Re-insert to mark as most-recently used, then trim from the front.\n thumbCache.delete(url)\n thumbCache.set(url, entry)\n if (thumbCache.size > THUMB_CACHE_MAX) {\n thumbCache.delete(thumbCache.keys().next().value as string)\n }\n }\n\n const cached = thumbCache.get(props.url)\n const thumbStatus = ref<ThumbStatus>(cached?.status ?? 'loading')\n\n // Natural pixel dimensions, captured once the thumbnail decodes. Doubles\n // as the size hint PhotoSwipe needs for its slide (falls back until known).\n const dimensions = ref<{ width: number; height: number } | undefined>(\n cached?.dimensions,\n )\n const onImageLoad = (event: Event) => {\n const img = event.target as HTMLImageElement\n if (img.naturalWidth && img.naturalHeight) {\n dimensions.value = {\n width: img.naturalWidth,\n height: img.naturalHeight,\n }\n }\n thumbStatus.value = 'loaded'\n setThumbCache(props.url, {\n status: 'loaded',\n dimensions: dimensions.value,\n })\n }\n const onImageError = () => {\n thumbStatus.value = 'error'\n setThumbCache(props.url, { status: 'error' })\n }\n\n const pswpSize = computed(() => dimensions.value ?? DEFAULT_PSWP_SIZE)\n\n // Meta fragments joined with \" · \" for the caption / doc subtitle.\n const imageMeta = computed(() =>\n [\n dimensions.value &&\n `${dimensions.value.width}×${dimensions.value.height}`,\n formattedSize.value,\n ].filter(Boolean),\n )\n const docMeta = computed(() =>\n [typeTag.value, formattedSize.value].filter(Boolean),\n )\n\n // --- Lightbox ---\n\n // Slide size PhotoSwipe assumes before the real dimensions are known.\n const DEFAULT_PSWP_SIZE = { width: 1200, height: 800 }\n\n // In a conversation the image opens in its lightbox, with the others\n const galleryRef = ref<HTMLElement>()\n const { init, shared } = useLightbox({\n gallery: galleryRef,\n loop: false,\n shared: true,\n })\n\n onMounted(async () => {\n if (!isImage.value) {\n return\n }\n await init()\n })\n</script>\n\n<template>\n <!-- Image attachment: a thumbnail tile with a metadata caption -->\n <figure\n v-if=\"isImage\"\n class=\"pk-chatbot-file-preview pk-chatbot-file-preview--image\"\n :class=\"{\n 'pk-chatbot-file-preview--error': error,\n 'pk-chatbot-file-preview--compact': compact,\n }\">\n <div ref=\"galleryRef\" class=\"pk-chatbot-file-preview__thumb-wrap\">\n <a\n :href=\"url\"\n :data-pswp-src=\"url\"\n :data-pswp-width=\"pswpSize.width\"\n :data-pswp-height=\"pswpSize.height\"\n :data-pswp-caption=\"filename ?? ''\"\n :data-pswp-shared=\"shared || undefined\"\n class=\"pk-chatbot-file-preview__thumb-link\"\n :aria-label=\"filename ?? $t('label.file')\">\n <img\n v-show=\"thumbStatus === 'loaded'\"\n :src=\"url\"\n :alt=\"filename\"\n decoding=\"async\"\n class=\"pk-chatbot-file-preview__thumb\"\n @load=\"onImageLoad\"\n @error=\"onImageError\" />\n </a>\n <!-- Spinner until the thumbnail decodes (or while an upload is in\n flight); a fixed box keeps this from shifting the layout. -->\n <span\n v-if=\"loading || thumbStatus === 'loading'\"\n class=\"pk-chatbot-file-preview__status pk-chatbot-file-preview__status--overlay\">\n <VvIcon name=\"loading-loop\" />\n </span>\n <!-- The upload failed: the image would not be sent. The mark says\n so on the thumbnail, where the composer hides the caption, and\n is the retry when the host offers one. -->\n <button\n v-else-if=\"error && retryable\"\n type=\"button\"\n class=\"pk-chatbot-file-preview__status pk-chatbot-file-preview__status--overlay pk-chatbot-file-preview__status--failed\"\n :title=\"error\"\n :aria-label=\"$t('action.retry')\"\n @click.prevent=\"$emit('retry')\">\n <VvIcon name=\"ri:refresh-line\" />\n </button>\n <span\n v-else-if=\"error\"\n class=\"pk-chatbot-file-preview__status pk-chatbot-file-preview__status--overlay pk-chatbot-file-preview__status--failed\"\n role=\"img\"\n :title=\"error\"\n :aria-label=\"error\">\n <VvIcon name=\"ri:error-warning-line\" />\n </span>\n <!-- Failed to load: a quiet icon instead of the browser's broken\n image glyph. -->\n <span\n v-else-if=\"thumbStatus === 'error'\"\n class=\"pk-chatbot-file-preview__status pk-chatbot-file-preview__status--overlay pk-chatbot-file-preview__status--error\">\n <VvIcon name=\"ri:image-2-line\" />\n </span>\n </div>\n <figcaption v-if=\"!compact\" class=\"pk-chatbot-file-preview__caption\">\n <span\n v-if=\"filename\"\n class=\"pk-chatbot-file-preview__name\"\n :title=\"filename\"\n >{{ filename }}</span\n >\n <span class=\"pk-chatbot-file-preview__meta\">\n <span\n v-if=\"error\"\n class=\"pk-chatbot-file-preview__error\"\n :title=\"error\">\n <VvIcon name=\"ri:error-warning-line\" />\n {{ error }}\n </span>\n <template v-else>{{ imageMeta.join(' · ') }}</template>\n </span>\n </figcaption>\n <button\n v-if=\"editable && compact && !loading\"\n type=\"button\"\n class=\"pk-chatbot-file-preview__edit\"\n :title=\"$t('imageEditor.edit')\"\n :aria-label=\"$t('imageEditor.edit')\"\n @click.prevent=\"$emit('edit')\">\n <VvIcon name=\"ri:edit-line\" />\n </button>\n <button\n v-if=\"removable && !loading\"\n type=\"button\"\n class=\"pk-chatbot-file-preview__remove\"\n :title=\"$t('action.remove')\"\n :aria-label=\"$t('action.remove')\"\n @click.prevent=\"$emit('remove')\">\n <VvIcon name=\"ri:close-line\" />\n </button>\n </figure>\n\n <!-- Document attachment: an icon tile + name + type · size -->\n <div\n v-else\n class=\"pk-chatbot-file-preview pk-chatbot-file-preview--doc\"\n :class=\"{\n 'pk-chatbot-file-preview--error': error,\n 'pk-chatbot-file-preview--compact': compact,\n 'pk-chatbot-file-preview--show-download': showDownload,\n }\">\n <!-- A failed upload the host can try again: the tile is the retry -->\n <button\n v-if=\"error && retryable && !loading\"\n type=\"button\"\n class=\"pk-chatbot-file-preview__icon-tile pk-chatbot-file-preview__retry u-touch-target\"\n :title=\"error\"\n :aria-label=\"$t('action.retry')\"\n @click=\"$emit('retry')\">\n <VvIcon\n name=\"ri:refresh-line\"\n class=\"pk-chatbot-file-preview__icon\" />\n </button>\n <span\n v-else\n class=\"pk-chatbot-file-preview__icon-tile\"\n :style=\"{ '--file-accent': fileKind.accent }\">\n <VvIcon\n v-if=\"loading\"\n name=\"loading-loop\"\n class=\"pk-chatbot-file-preview__icon\" />\n <VvIcon\n v-else\n :name=\"fileKind.icon\"\n class=\"pk-chatbot-file-preview__icon\" />\n </span>\n <span class=\"pk-chatbot-file-preview__body\">\n <span\n v-if=\"filename\"\n class=\"pk-chatbot-file-preview__name\"\n :title=\"filename\"\n >{{ filename }}</span\n >\n <span class=\"pk-chatbot-file-preview__meta\">\n <span\n v-if=\"error\"\n class=\"pk-chatbot-file-preview__error\"\n :title=\"error\">\n <VvIcon name=\"ri:error-warning-line\" />\n {{ error }}\n </span>\n <template v-else>{{ docMeta.join(' · ') }}</template>\n </span>\n </span>\n <!-- The actions of a file the chat's viewer opens: a small bar of\n their own, apart from the name and the size -->\n <span\n v-if=\"!loading && !error && !compact\"\n class=\"pk-chatbot-file-preview__actions\"\n :class=\"{\n 'pk-chatbot-file-preview__actions--bar': onPreview || onRestore,\n }\">\n <button\n v-if=\"onRestore\"\n type=\"button\"\n class=\"pk-chatbot-file-preview__open u-touch-target\"\n :title=\"$t('chatFilePreview.restore')\"\n :aria-label=\"`${$t('chatFilePreview.restore')}${filename ? ` — ${filename}` : ''}`\"\n @click=\"onRestore\">\n <VvIcon name=\"ri:arrow-go-back-line\" />\n </button>\n <button\n v-if=\"onPreview\"\n type=\"button\"\n class=\"pk-chatbot-file-preview__open u-touch-target\"\n :title=\"$t('chatFilePreview.open')\"\n :aria-label=\"`${$t('chatFilePreview.open')}${filename ? ` — ${filename}` : ''}`\"\n @click=\"onPreview\">\n <VvIcon name=\"ri:eye-line\" />\n </button>\n <a\n :href=\"url\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"pk-chatbot-file-preview__open u-touch-target\"\n :title=\"$t('action.download')\"\n :aria-label=\"`${$t('action.download')}${filename ? ` — ${filename}` : ''}`\"\n @click=\"onOpenClick\">\n <VvIcon name=\"ri:download-2-line\" />\n </a>\n </span>\n <button\n v-if=\"removable && !loading\"\n type=\"button\"\n class=\"pk-chatbot-file-preview__remove\"\n :class=\"{ 'pk-chatbot-file-preview__remove--inline': !compact }\"\n :title=\"$t('action.remove')\"\n :aria-label=\"$t('action.remove')\"\n @click=\"$emit('remove')\">\n <VvIcon name=\"ri:close-line\" />\n </button>\n </div>\n</template>\n\n<style lang=\"scss\">\n .pk-chatbot-file-preview {\n // Concentric radii: outer card and inner tiles share an 8px step.\n --file-radius: var(--rounded-lg, 12px);\n\n position: relative;\n max-width: 280px;\n background-color: var(--color-surface-1);\n border: 1px solid var(--color-surface-3);\n border-radius: var(--file-radius);\n color: var(--color-word-2);\n font-size: var(--text-12);\n\n &--error {\n border-color: var(--color-danger);\n }\n\n // --- Document card ---\n &--doc {\n display: flex;\n align-items: center;\n gap: var(--spacing-8);\n padding: var(--spacing-8);\n min-width: 0;\n transition:\n border-color 0.18s var(--ease-out),\n background-color 0.18s var(--ease-out),\n box-shadow 0.18s var(--ease-out);\n\n &:hover {\n border-color: var(--color-surface-4);\n background-color: var(--color-surface-2);\n box-shadow: var(--shadow-sm);\n }\n }\n\n &__icon-tile {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: var(--spacing-36);\n height: var(--spacing-36);\n\n // One step down from the card radius keeps the nested tile concentric.\n border-radius: var(--rounded-md, 6px);\n\n // Tint derived from the file-type accent; glyph sits at full accent.\n background-color: color-mix(\n in srgb,\n var(--file-accent) 14%,\n transparent\n );\n color: var(--file-accent);\n }\n\n &__icon {\n width: var(--spacing-20);\n height: var(--spacing-20);\n }\n\n &__body {\n display: flex;\n flex-direction: column;\n gap: 1px;\n min-width: 0;\n flex: 1;\n }\n\n &__actions {\n display: flex;\n flex-shrink: 0;\n align-items: center;\n margin-inline-start: var(--spacing-4);\n }\n\n // Restore, open and download of a file the viewer opens: one small\n // bar, its hairline setting it apart from the name and the size, the\n // icons 8px apart so they read as a group\n &__actions--bar {\n margin-inline-start: var(--spacing-8);\n padding: var(--spacing-2);\n border: var(--border) solid var(--color-surface-3);\n border-radius: var(--rounded);\n }\n\n // 28px to aim at with a mouse, 24 in the bar; 40px under a finger\n // (u-touch-target)\n &__open {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: var(--spacing-28);\n height: var(--spacing-28);\n padding: 0;\n border: 0;\n border-radius: var(--rounded);\n background: none;\n color: var(--color-word-3);\n text-decoration: none;\n cursor: pointer;\n opacity: 0;\n transition:\n opacity 0.18s var(--ease-out),\n color 0.18s var(--ease-out),\n background-color 0.18s var(--ease-out);\n\n &:hover {\n background-color: var(--color-surface-3);\n color: var(--color-word-1);\n }\n\n .vv-icon {\n width: var(--spacing-16);\n height: var(--spacing-16);\n }\n }\n\n &__actions--bar &__open {\n width: var(--spacing-24);\n height: var(--spacing-24);\n }\n\n &--doc:hover &__open,\n &--doc:focus-within &__open,\n &--show-download &__open {\n opacity: 1;\n }\n\n // Touch devices have no hover: keep the open affordance visible.\n @media (hover: none) {\n &--doc &__open {\n opacity: 1;\n }\n }\n\n // --- Image card ---\n &--image {\n display: inline-flex;\n flex-direction: column;\n margin: 0;\n }\n\n &__thumb-wrap {\n position: relative;\n display: flex;\n\n // Fixed box: the card claims its final footprint before the\n // image decodes, so the message log never shifts on load.\n width: 280px;\n max-width: 100%;\n height: 200px;\n background-color: var(--color-surface);\n border-radius: var(--file-radius);\n overflow: hidden;\n }\n\n &__thumb-link {\n display: flex;\n width: 100%;\n height: 100%;\n cursor: pointer;\n }\n\n &__thumb {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n &__caption {\n display: flex;\n flex-direction: column;\n gap: 1px;\n padding: var(--spacing-8);\n min-width: 0;\n }\n\n &__name {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-weight: var(--font-medium, 500);\n color: var(--color-word-1);\n }\n\n &__meta {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: var(--text-10);\n line-height: var(--leading-normal);\n\n // Reserve the line even while empty: image dimensions arrive\n // only after decode and must not grow the caption.\n min-height: 1.4em;\n color: var(--color-word-4);\n\n // Stable column for the dimensions/size figures.\n font-variant-numeric: tabular-nums;\n }\n\n &__error {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-4);\n color: var(--u-danger-text, var(--color-danger));\n\n .vv-icon {\n flex-shrink: 0;\n }\n }\n\n &__status {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n .vv-icon {\n width: var(--spacing-32);\n height: var(--spacing-32);\n }\n\n &--overlay {\n position: absolute;\n inset: 0;\n background-color: color-mix(\n in srgb,\n var(--color-surface-1) 70%,\n transparent\n );\n color: var(--color-word-1);\n }\n\n &--error {\n color: var(--color-word-4);\n }\n\n // An upload that failed, in the danger text of the caption's error\n &--failed {\n padding: 0;\n border: 0;\n color: var(--u-danger-text, var(--color-danger));\n font: inherit;\n\n .vv-icon {\n width: var(--spacing-24);\n height: var(--spacing-24);\n }\n }\n\n &--failed:is(button) {\n cursor: pointer;\n\n &:hover {\n background-color: color-mix(\n in srgb,\n var(--color-surface-1) 85%,\n transparent\n );\n }\n }\n }\n\n // The tile of a document whose upload failed, as a retry\n &__retry {\n --file-accent: var(--u-danger-text, var(--color-danger));\n\n position: relative;\n padding: 0;\n border: 0;\n cursor: pointer;\n }\n\n // --- Remove and edit buttons (input context) ---\n &__remove,\n &__edit {\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n display: flex;\n align-items: center;\n justify-content: center;\n\n // Visible glyph is 18px but the hit area stays a comfortable 28px.\n width: var(--spacing-28);\n height: var(--spacing-28);\n padding: 0;\n border: none;\n border-radius: var(--rounded-full, 9999px);\n background-color: color-mix(\n in srgb,\n var(--color-surface-1) 85%,\n transparent\n );\n color: var(--color-word-2);\n cursor: pointer;\n line-height: 1;\n box-shadow: var(--shadow-sm);\n transition:\n background-color 0.18s var(--ease-out),\n color 0.18s var(--ease-out),\n scale 0.12s var(--ease-out);\n\n &:hover {\n background-color: var(--color-surface-2);\n color: var(--color-word-1);\n }\n\n &:active {\n scale: 0.96;\n }\n\n // Inside the document row the button rides inline, not overlaid\n // (size is inherited from the base).\n &--inline {\n position: static;\n flex-shrink: 0;\n box-shadow: none;\n background-color: transparent;\n color: var(--color-word-4);\n\n &:hover {\n background-color: var(--color-surface-3);\n color: var(--color-word-1);\n }\n }\n }\n\n // --- Compact (composer) chips ---\n // ChatGPT/Gemini-style: every attachment is the SAME height and carries\n // an always-visible round remove control in the top-right corner — no\n // hover-revealed actions, no size mismatch between image and file chips.\n &--compact {\n // Shared chip height so image and file chips align in the row.\n --chip-size: var(--spacing-56);\n\n max-width: 240px;\n\n &.pk-chatbot-file-preview--image {\n width: var(--chip-size);\n height: var(--chip-size);\n border-radius: var(--rounded-md, 6px);\n }\n\n // Fill the square; the root's `overflow: hidden` rounds the corners.\n .pk-chatbot-file-preview__thumb-wrap,\n .pk-chatbot-file-preview__thumb-link {\n width: 100%;\n height: 100%;\n }\n\n &.pk-chatbot-file-preview--doc {\n height: var(--chip-size);\n gap: var(--spacing-8);\n padding: var(--spacing-8);\n\n // Reserve room so the corner remove button never overlaps the\n // name/meta text.\n padding-inline-end: var(--spacing-28);\n }\n\n // Square icon tile that fills the chip height, so file chips read at\n // the same scale as image thumbnails: the chip less its padding and\n // its two 1px borders. Not `align-self: stretch` with `aspect-ratio`,\n // which Safari sizes from the chip's outer height, so the tile ran\n // past the chip's bottom edge.\n .pk-chatbot-file-preview__icon-tile {\n --chip-tile-size: calc(\n var(--chip-size) - 2 * var(--spacing-8) - 2px\n );\n\n width: var(--chip-tile-size);\n height: var(--chip-tile-size);\n }\n\n .pk-chatbot-file-preview__icon {\n width: var(--spacing-20);\n height: var(--spacing-20);\n }\n }\n\n // Always-visible round remove control on the top-right corner: the\n // base transform centres it 4px inside the corner, so half of it rides\n // over the chip's edge (nothing clips it), with an extended hit area\n // for easy tapping. The edit control of an image mirrors it on the\n // top-left corner.\n &--compact &__remove,\n &--compact &__edit {\n top: var(--spacing-4);\n right: var(--spacing-4);\n width: var(--spacing-24);\n height: var(--spacing-24);\n border: 1px solid var(--color-surface-4);\n background-color: var(--color-surface);\n color: var(--color-word-1);\n font-size: var(--text-16);\n box-shadow: var(--shadow-sm);\n\n // Comfortable touch/click target beyond the small visible glyph.\n &::after {\n content: '';\n position: absolute;\n inset: calc(-1 * var(--spacing-4));\n }\n\n &:hover {\n background-color: var(--color-surface-2);\n color: var(--color-word-1);\n }\n }\n\n &--compact &__edit {\n right: auto;\n left: var(--spacing-4);\n transform: translate(-50%, -50%);\n }\n\n @media (prefers-reduced-motion: reduce) {\n &--doc,\n &__open,\n &__remove,\n &__edit {\n transition: none;\n }\n }\n }\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;A,gCA2PUsC,IAAkB,K;;;;;;;;;;;;;;;;;;;;;;;;;EAvPxB,IAAMG,IAAQC,GA4DRC,KAAe,MAAsB;GACvC,AAAKF,EAAM,eAGXG,EAAM,eAAe,GACrBH,EAAW,WAAW;EAC1B,GAEMI,IAAUC,QACN,CAACL,EAAM,UAAUA,EAAM,UAAU,WAAW,QAAQ,CAC9D,GAIMM,IAAYD,QAAe;GAC7B,IAAME,IAAOP,EAAM,YAAY,IACzBQ,IAAMD,EAAK,YAAY,GAAG;GAChC,OAAOC,IAAM,IAAID,EAAK,MAAMC,IAAM,CAAC,CAAC,CAAC,YAAY,IAAI;EACzD,CAAC,GAGKC,IAAUJ,QACNL,EAAM,UAAU,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,MAAM,GAAG,CAAC,CAAC,MAAM,EAC1D,GASMU,IAAiD;GACnD;IACI,MAAM;IACN,MAAM;KACF,MAAM;KACN,QAAQ;KACR,OAAO;IACX;GACJ;GACA;IAII,MAAM;IACN,MAAM;KACF,MAAM;KACN,QAAQ;KACR,OAAO;IACX;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KACT,cAAYA,EAAAA,GAAE,eAAA;KACd,SAAK,AAAA4F,EAAA,QAAA,MAAE3F,EAAAA,MAAK,QAAA;I,IACbQ,EAA+BuE,GAAA,EAAvB,MAAK,gBAAe,CAAA,C"}
1
+ {"version":3,"file":"PkChatbotFilePreview-aKJBtw04.js","names":["$t","$emit","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_unref","_withDirectives","_vShow","_createVNode","_withModifiers","_toDisplayString","_createTextVNode","_Fragment","_normalizeStyle","_createBlock","useLightbox","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","THUMB_CACHE_MAX","PkChatbotFilePreview_default","defineComponent","props","__props","onOpenClick","event","isImage","computed","extension","name","dot","subtype","KINDS","fileKind","haystack","test","kind","typeTag","formattedSize","bytes","units","value","unitIndex","thumbCache","setThumbCache","url","entry","cached","thumbStatus","ref","dimensions","onImageLoad","img","onImageError","pswpSize","DEFAULT_PSWP_SIZE","imageMeta","docMeta","galleryRef","onMounted","init","_component_VvIcon","VvIcon","openBlock","createElementBlock","normalizeClass","createElementVNode","unref","shared","_ctx","withDirectives","vShow","createVNode","_cache","withModifiers","createCommentVNode","toDisplayString","createTextVNode","Fragment","normalizeStyle","createBlock","args"],"sources":["../../../../packages/components/src/chat/PkChatbotFilePreview.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { computed, ref, onMounted } from 'vue'\n import { useLightbox } from '../composables/useLightbox'\n\n const props = defineProps<{\n mediaType: string\n url: string\n filename?: string\n /** Size in bytes, when known (e.g. local uploads). */\n size?: number\n loading?: boolean\n error?: string\n removable?: boolean\n /**\n * Shows the \"Edit\" button on an image of the composer (`compact`),\n * opposite the remove one: the host opens the image editor on `edit`.\n */\n editable?: boolean\n /**\n * The upload failed (`error`) and can be tried again: the failure\n * mark becomes a \"Retry\" button, and the host uploads again on `retry`.\n */\n retryable?: boolean\n /**\n * Dense layout for the composer: a small square thumbnail / slim row,\n * without the metadata caption. The full card is reserved for the\n * message log where the details matter.\n */\n compact?: boolean\n /**\n * Keeps the download button visible instead of revealing it on hover:\n * for a file the agent wrote, which the user is there to download.\n */\n showDownload?: boolean\n /**\n * Replaces the download link of a document with a call, for a file\n * whose download URL is minted on demand (a knowledge base document\n * shared in the chat). `url` stays the link's `href`.\n */\n onDownload?: () => void | Promise<void>\n /**\n * Draws an image as a file row, with its download button, instead of\n * a thumbnail: for an image whose `url` stops working while its\n * download keeps going (a shared document after its link expires).\n */\n asFile?: boolean\n /**\n * Opens the file in the chat's viewer: a Word document or a\n * spreadsheet the chat stores, with a button beside the download.\n */\n onPreview?: () => void\n /**\n * Asks for this earlier version of the file back as the newest one,\n * with a button before the others.\n */\n onRestore?: () => void\n }>()\n\n defineEmits<{\n remove: []\n edit: []\n retry: []\n }>()\n\n const onOpenClick = (event: MouseEvent) => {\n if (!props.onDownload) {\n return\n }\n event.preventDefault()\n void props.onDownload()\n }\n\n const isImage = computed(\n () => !props.asFile && props.mediaType.startsWith('image/'),\n )\n\n // --- File-type identity (icon + accent + human kind label) ---\n\n const extension = computed(() => {\n const name = props.filename ?? ''\n const dot = name.lastIndexOf('.')\n return dot > 0 ? name.slice(dot + 1).toLowerCase() : ''\n })\n\n // mediaType subtype, e.g. \"pdf\" from \"application/pdf\"\n const subtype = computed(\n () => props.mediaType.split('/')[1]?.split(';')[0] ?? '',\n )\n\n type FileKind = {\n icon: string\n // CSS color driving the icon glyph + tile tint\n accent: string\n label: string\n }\n\n const KINDS: Array<{ test: RegExp; kind: FileKind }> = [\n {\n test: /pdf/,\n kind: {\n icon: 'ri:file-pdf-2-line',\n accent: '#e2483d',\n label: 'PDF',\n },\n },\n {\n // Match Word specifically: the generic `document` substring also\n // appears in the XLSX/PPTX OOXML mime types (…officedocument…), so\n // matching it here would mis-label spreadsheets/decks as Word.\n test: /msword|wordprocessingml/,\n kind: {\n icon: 'ri:file-word-2-line',\n accent: '#2b7de9',\n label: 'Word',\n },\n },\n {\n test: /sheet|excel|csv/,\n kind: {\n icon: 'ri:file-excel-2-line',\n accent: '#1f9d57',\n label: 'Spreadsheet',\n },\n },\n {\n test: /presentation|powerpoint/,\n kind: {\n icon: 'ri:file-ppt-2-line',\n accent: '#d98324',\n label: 'Presentation',\n },\n },\n {\n test: /zip|compressed|x-7z|x-rar|x-tar|gzip/,\n kind: {\n icon: 'ri:file-zip-line',\n accent: '#c08a1e',\n label: 'Archive',\n },\n },\n {\n // Reached only by an image drawn as a file (`asFile`).\n test: /^image\\//,\n kind: {\n icon: 'ri:image-2-line',\n accent: '#0ea5e9',\n label: 'Image',\n },\n },\n {\n test: /^audio\\//,\n kind: {\n icon: 'ri:file-music-line',\n accent: '#8b5cf6',\n label: 'Audio',\n },\n },\n {\n test: /^video\\//,\n kind: {\n icon: 'ri:film-line',\n accent: '#6366f1',\n label: 'Video',\n },\n },\n {\n // The code an agent can take (`SUPPORTED_CODE_TYPES`).\n test: /json|javascript|typescript|xml|html|css|yaml|toml|sql|x-(?:sh|python|java|kotlin|c|csharp|go|rust|ruby|php|swift|vue)\\b/,\n kind: {\n icon: 'ri:file-code-line',\n accent: '#0d9488',\n label: 'Code',\n },\n },\n {\n test: /^text\\//,\n kind: {\n icon: 'ri:file-text-line',\n accent: '#64748b',\n label: 'Text',\n },\n },\n ]\n\n const fileKind = computed<FileKind>(() => {\n const haystack = `${props.mediaType} ${extension.value}`\n for (const { test, kind } of KINDS) {\n if (test.test(haystack)) {\n return kind\n }\n }\n return {\n icon: 'ri:file-line',\n accent: '#64748b',\n label: 'File',\n }\n })\n\n // Short type tag shown in the meta line: prefer the real extension, fall\n // back to the mime subtype, then the generic kind label.\n const typeTag = computed(() =>\n (\n extension.value ||\n subtype.value ||\n fileKind.value.label\n ).toUpperCase(),\n )\n\n // --- Size & dimensions ---\n\n const formattedSize = computed(() => {\n const bytes = props.size\n if (bytes === undefined || bytes < 0) {\n return undefined\n }\n if (bytes < 1024) {\n return `${bytes} B`\n }\n const units = ['KB', 'MB', 'GB', 'TB']\n let value = bytes / 1024\n let unitIndex = 0\n while (value >= 1024 && unitIndex < units.length - 1) {\n value /= 1024\n unitIndex += 1\n }\n return `${value < 10 ? value.toFixed(1) : Math.round(value)} ${units[unitIndex]}`\n })\n\n // Thumbnail load lifecycle. Driving the spinner and the error fallback\n // off the real <img> events (not a second background fetch) means the\n // image is requested exactly once and reuses the browser cache on any\n // later re-render, instead of re-downloading every time the message list\n // repaints.\n // Not `useImageFallback`: this tile also needs `loading` vs `loaded` and the\n // decoded dimensions, cached across remounts, so the error flag is one field\n // of a richer per-url entry rather than a standalone broken-url set.\n type ThumbStatus = 'loading' | 'loaded' | 'error'\n\n // Module-level, keyed by URL: survives component recreation. In polled\n // views (e.g. admin chat-logs, refreshed every few seconds) the whole\n // message array is replaced on each poll, so this component can be torn\n // down and rebuilt. Seeding from the cache means a URL that already\n // decoded starts in `loaded` (no spinner flash, no re-decode) instead of\n // flickering back through `loading`. This is a client-side, per-session\n // cache (no server/Redis involved); bounded to a max size so a long-lived\n // session browsing many images can't grow it without limit — the oldest\n // entry is evicted first (Map preserves insertion order).\n type ThumbEntry = {\n status: ThumbStatus\n dimensions?: { width: number; height: number }\n }\n const THUMB_CACHE_MAX = 300\n const thumbCache = new Map<string, ThumbEntry>()\n const setThumbCache = (url: string, entry: ThumbEntry) => {\n // Re-insert to mark as most-recently used, then trim from the front.\n thumbCache.delete(url)\n thumbCache.set(url, entry)\n if (thumbCache.size > THUMB_CACHE_MAX) {\n thumbCache.delete(thumbCache.keys().next().value as string)\n }\n }\n\n const cached = thumbCache.get(props.url)\n const thumbStatus = ref<ThumbStatus>(cached?.status ?? 'loading')\n\n // Natural pixel dimensions, captured once the thumbnail decodes. Doubles\n // as the size hint PhotoSwipe needs for its slide (falls back until known).\n const dimensions = ref<{ width: number; height: number } | undefined>(\n cached?.dimensions,\n )\n const onImageLoad = (event: Event) => {\n const img = event.target as HTMLImageElement\n if (img.naturalWidth && img.naturalHeight) {\n dimensions.value = {\n width: img.naturalWidth,\n height: img.naturalHeight,\n }\n }\n thumbStatus.value = 'loaded'\n setThumbCache(props.url, {\n status: 'loaded',\n dimensions: dimensions.value,\n })\n }\n const onImageError = () => {\n thumbStatus.value = 'error'\n setThumbCache(props.url, { status: 'error' })\n }\n\n const pswpSize = computed(() => dimensions.value ?? DEFAULT_PSWP_SIZE)\n\n // Meta fragments joined with \" · \" for the caption / doc subtitle.\n const imageMeta = computed(() =>\n [\n dimensions.value &&\n `${dimensions.value.width}×${dimensions.value.height}`,\n formattedSize.value,\n ].filter(Boolean),\n )\n const docMeta = computed(() =>\n [typeTag.value, formattedSize.value].filter(Boolean),\n )\n\n // --- Lightbox ---\n\n // Slide size PhotoSwipe assumes before the real dimensions are known.\n const DEFAULT_PSWP_SIZE = { width: 1200, height: 800 }\n\n // In a conversation the image opens in its lightbox, with the others\n const galleryRef = ref<HTMLElement>()\n const { init, shared } = useLightbox({\n gallery: galleryRef,\n loop: false,\n shared: true,\n })\n\n onMounted(async () => {\n if (!isImage.value) {\n return\n }\n await init()\n })\n</script>\n\n<template>\n <!-- Image attachment: a thumbnail tile with a metadata caption -->\n <figure\n v-if=\"isImage\"\n class=\"pk-chatbot-file-preview pk-chatbot-file-preview--image\"\n :class=\"{\n 'pk-chatbot-file-preview--error': error,\n 'pk-chatbot-file-preview--compact': compact,\n }\">\n <div ref=\"galleryRef\" class=\"pk-chatbot-file-preview__thumb-wrap\">\n <a\n :href=\"url\"\n :data-pswp-src=\"url\"\n :data-pswp-width=\"pswpSize.width\"\n :data-pswp-height=\"pswpSize.height\"\n :data-pswp-caption=\"filename ?? ''\"\n :data-pswp-shared=\"shared || undefined\"\n class=\"pk-chatbot-file-preview__thumb-link\"\n :aria-label=\"filename ?? $t('label.file')\">\n <img\n v-show=\"thumbStatus === 'loaded'\"\n :src=\"url\"\n :alt=\"filename\"\n decoding=\"async\"\n class=\"pk-chatbot-file-preview__thumb\"\n @load=\"onImageLoad\"\n @error=\"onImageError\" />\n </a>\n <!-- Spinner until the thumbnail decodes (or while an upload is in\n flight); a fixed box keeps this from shifting the layout. -->\n <span\n v-if=\"loading || thumbStatus === 'loading'\"\n class=\"pk-chatbot-file-preview__status pk-chatbot-file-preview__status--overlay\">\n <VvIcon name=\"loading-loop\" />\n </span>\n <!-- The upload failed: the image would not be sent. The mark says\n so on the thumbnail, where the composer hides the caption, and\n is the retry when the host offers one. -->\n <button\n v-else-if=\"error && retryable\"\n type=\"button\"\n class=\"pk-chatbot-file-preview__status pk-chatbot-file-preview__status--overlay pk-chatbot-file-preview__status--failed\"\n :title=\"error\"\n :aria-label=\"$t('action.retry')\"\n @click.prevent=\"$emit('retry')\">\n <VvIcon name=\"ri:refresh-line\" />\n </button>\n <span\n v-else-if=\"error\"\n class=\"pk-chatbot-file-preview__status pk-chatbot-file-preview__status--overlay pk-chatbot-file-preview__status--failed\"\n role=\"img\"\n :title=\"error\"\n :aria-label=\"error\">\n <VvIcon name=\"ri:error-warning-line\" />\n </span>\n <!-- Failed to load: a quiet icon instead of the browser's broken\n image glyph. -->\n <span\n v-else-if=\"thumbStatus === 'error'\"\n class=\"pk-chatbot-file-preview__status pk-chatbot-file-preview__status--overlay pk-chatbot-file-preview__status--error\">\n <VvIcon name=\"ri:image-2-line\" />\n </span>\n </div>\n <figcaption v-if=\"!compact\" class=\"pk-chatbot-file-preview__caption\">\n <span\n v-if=\"filename\"\n class=\"pk-chatbot-file-preview__name\"\n :title=\"filename\"\n >{{ filename }}</span\n >\n <span class=\"pk-chatbot-file-preview__meta\">\n <span\n v-if=\"error\"\n class=\"pk-chatbot-file-preview__error\"\n :title=\"error\">\n <VvIcon name=\"ri:error-warning-line\" />\n {{ error }}\n </span>\n <template v-else>{{ imageMeta.join(' · ') }}</template>\n </span>\n </figcaption>\n <button\n v-if=\"editable && compact && !loading\"\n type=\"button\"\n class=\"pk-chatbot-file-preview__edit\"\n :title=\"$t('imageEditor.edit')\"\n :aria-label=\"$t('imageEditor.edit')\"\n @click.prevent=\"$emit('edit')\">\n <VvIcon name=\"ri:edit-line\" />\n </button>\n <button\n v-if=\"removable && !loading\"\n type=\"button\"\n class=\"pk-chatbot-file-preview__remove\"\n :title=\"$t('action.remove')\"\n :aria-label=\"$t('action.remove')\"\n @click.prevent=\"$emit('remove')\">\n <VvIcon name=\"ri:close-line\" />\n </button>\n </figure>\n\n <!-- Document attachment: an icon tile + name + type · size -->\n <div\n v-else\n class=\"pk-chatbot-file-preview pk-chatbot-file-preview--doc\"\n :class=\"{\n 'pk-chatbot-file-preview--error': error,\n 'pk-chatbot-file-preview--compact': compact,\n 'pk-chatbot-file-preview--show-download': showDownload,\n }\">\n <!-- A failed upload the host can try again: the tile is the retry -->\n <button\n v-if=\"error && retryable && !loading\"\n type=\"button\"\n class=\"pk-chatbot-file-preview__icon-tile pk-chatbot-file-preview__retry u-touch-target\"\n :title=\"error\"\n :aria-label=\"$t('action.retry')\"\n @click=\"$emit('retry')\">\n <VvIcon\n name=\"ri:refresh-line\"\n class=\"pk-chatbot-file-preview__icon\" />\n </button>\n <span\n v-else\n class=\"pk-chatbot-file-preview__icon-tile\"\n :style=\"{ '--file-accent': fileKind.accent }\">\n <VvIcon\n v-if=\"loading\"\n name=\"loading-loop\"\n class=\"pk-chatbot-file-preview__icon\" />\n <VvIcon\n v-else\n :name=\"fileKind.icon\"\n class=\"pk-chatbot-file-preview__icon\" />\n </span>\n <span class=\"pk-chatbot-file-preview__body\">\n <span\n v-if=\"filename\"\n class=\"pk-chatbot-file-preview__name\"\n :title=\"filename\"\n >{{ filename }}</span\n >\n <span class=\"pk-chatbot-file-preview__meta\">\n <span\n v-if=\"error\"\n class=\"pk-chatbot-file-preview__error\"\n :title=\"error\">\n <VvIcon name=\"ri:error-warning-line\" />\n {{ error }}\n </span>\n <template v-else>{{ docMeta.join(' · ') }}</template>\n </span>\n </span>\n <!-- The actions of a file the chat's viewer opens: a small bar of\n their own, apart from the name and the size -->\n <span\n v-if=\"!loading && !error && !compact\"\n class=\"pk-chatbot-file-preview__actions\"\n :class=\"{\n 'pk-chatbot-file-preview__actions--bar': onPreview || onRestore,\n }\">\n <button\n v-if=\"onRestore\"\n type=\"button\"\n class=\"pk-chatbot-file-preview__open u-touch-target\"\n :title=\"$t('chatFilePreview.restore')\"\n :aria-label=\"`${$t('chatFilePreview.restore')}${filename ? ` — ${filename}` : ''}`\"\n @click=\"onRestore\">\n <VvIcon name=\"ri:arrow-go-back-line\" />\n </button>\n <button\n v-if=\"onPreview\"\n type=\"button\"\n class=\"pk-chatbot-file-preview__open u-touch-target\"\n :title=\"$t('chatFilePreview.open')\"\n :aria-label=\"`${$t('chatFilePreview.open')}${filename ? ` — ${filename}` : ''}`\"\n @click=\"onPreview\">\n <VvIcon name=\"ri:eye-line\" />\n </button>\n <a\n :href=\"url\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"pk-chatbot-file-preview__open u-touch-target\"\n :title=\"$t('action.download')\"\n :aria-label=\"`${$t('action.download')}${filename ? ` — ${filename}` : ''}`\"\n @click=\"onOpenClick\">\n <VvIcon name=\"ri:download-2-line\" />\n </a>\n </span>\n <button\n v-if=\"removable && !loading\"\n type=\"button\"\n class=\"pk-chatbot-file-preview__remove\"\n :class=\"{ 'pk-chatbot-file-preview__remove--inline': !compact }\"\n :title=\"$t('action.remove')\"\n :aria-label=\"$t('action.remove')\"\n @click=\"$emit('remove')\">\n <VvIcon name=\"ri:close-line\" />\n </button>\n </div>\n</template>\n\n<style lang=\"scss\">\n .pk-chatbot-file-preview {\n // Concentric radii: outer card and inner tiles share an 8px step.\n --file-radius: var(--rounded-lg, 12px);\n\n position: relative;\n max-width: 280px;\n background-color: var(--color-surface-1);\n border: 1px solid var(--color-surface-3);\n border-radius: var(--file-radius);\n color: var(--color-word-2);\n font-size: var(--text-12);\n\n &--error {\n border-color: var(--color-danger);\n }\n\n // --- Document card ---\n &--doc {\n display: flex;\n align-items: center;\n gap: var(--spacing-8);\n padding: var(--spacing-8);\n min-width: 0;\n transition:\n border-color 0.18s var(--ease-out),\n background-color 0.18s var(--ease-out),\n box-shadow 0.18s var(--ease-out);\n\n &:hover {\n border-color: var(--color-surface-4);\n background-color: var(--color-surface-2);\n box-shadow: var(--shadow-sm);\n }\n }\n\n &__icon-tile {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: var(--spacing-36);\n height: var(--spacing-36);\n\n // One step down from the card radius keeps the nested tile concentric.\n border-radius: var(--rounded-md, 6px);\n\n // Tint derived from the file-type accent; glyph sits at full accent.\n background-color: color-mix(\n in srgb,\n var(--file-accent) 14%,\n transparent\n );\n color: var(--file-accent);\n }\n\n &__icon {\n width: var(--spacing-20);\n height: var(--spacing-20);\n }\n\n &__body {\n display: flex;\n flex-direction: column;\n gap: 1px;\n min-width: 0;\n flex: 1;\n }\n\n &__actions {\n display: flex;\n flex-shrink: 0;\n align-items: center;\n margin-inline-start: var(--spacing-4);\n }\n\n // Restore, open and download of a file the viewer opens: one small\n // bar, its hairline setting it apart from the name and the size, the\n // icons 8px apart so they read as a group\n &__actions--bar {\n margin-inline-start: var(--spacing-8);\n padding: var(--spacing-2);\n border: var(--border) solid var(--color-surface-3);\n border-radius: var(--rounded);\n }\n\n // 28px to aim at with a mouse, 24 in the bar; 40px under a finger\n // (u-touch-target)\n &__open {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: var(--spacing-28);\n height: var(--spacing-28);\n padding: 0;\n border: 0;\n border-radius: var(--rounded);\n background: none;\n color: var(--color-word-3);\n text-decoration: none;\n cursor: pointer;\n opacity: 0;\n transition:\n opacity 0.18s var(--ease-out),\n color 0.18s var(--ease-out),\n background-color 0.18s var(--ease-out);\n\n &:hover {\n background-color: var(--color-surface-3);\n color: var(--color-word-1);\n }\n\n .vv-icon {\n width: var(--spacing-16);\n height: var(--spacing-16);\n }\n }\n\n &__actions--bar &__open {\n width: var(--spacing-24);\n height: var(--spacing-24);\n }\n\n &--doc:hover &__open,\n &--doc:focus-within &__open,\n &--show-download &__open {\n opacity: 1;\n }\n\n // Touch devices have no hover: keep the open affordance visible.\n @media (hover: none) {\n &--doc &__open {\n opacity: 1;\n }\n }\n\n // --- Image card ---\n &--image {\n display: inline-flex;\n flex-direction: column;\n margin: 0;\n }\n\n &__thumb-wrap {\n position: relative;\n display: flex;\n\n // Fixed box: the card claims its final footprint before the\n // image decodes, so the message log never shifts on load.\n width: 280px;\n max-width: 100%;\n height: 200px;\n background-color: var(--color-surface);\n border-radius: var(--file-radius);\n overflow: hidden;\n }\n\n &__thumb-link {\n display: flex;\n width: 100%;\n height: 100%;\n cursor: pointer;\n }\n\n &__thumb {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n &__caption {\n display: flex;\n flex-direction: column;\n gap: 1px;\n padding: var(--spacing-8);\n min-width: 0;\n }\n\n &__name {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-weight: var(--font-medium, 500);\n color: var(--color-word-1);\n }\n\n &__meta {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: var(--text-10);\n line-height: var(--leading-normal);\n\n // Reserve the line even while empty: image dimensions arrive\n // only after decode and must not grow the caption.\n min-height: 1.4em;\n color: var(--color-word-3);\n\n // Stable column for the dimensions/size figures.\n font-variant-numeric: tabular-nums;\n }\n\n &__error {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-4);\n color: var(--u-danger-text, var(--color-danger));\n\n .vv-icon {\n flex-shrink: 0;\n }\n }\n\n &__status {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n .vv-icon {\n width: var(--spacing-32);\n height: var(--spacing-32);\n }\n\n &--overlay {\n position: absolute;\n inset: 0;\n background-color: color-mix(\n in srgb,\n var(--color-surface-1) 70%,\n transparent\n );\n color: var(--color-word-1);\n }\n\n &--error {\n color: var(--color-word-4);\n }\n\n // An upload that failed, in the danger text of the caption's error\n &--failed {\n padding: 0;\n border: 0;\n color: var(--u-danger-text, var(--color-danger));\n font: inherit;\n\n .vv-icon {\n width: var(--spacing-24);\n height: var(--spacing-24);\n }\n }\n\n &--failed:is(button) {\n cursor: pointer;\n\n &:hover {\n background-color: color-mix(\n in srgb,\n var(--color-surface-1) 85%,\n transparent\n );\n }\n }\n }\n\n // The tile of a document whose upload failed, as a retry\n &__retry {\n --file-accent: var(--u-danger-text, var(--color-danger));\n\n position: relative;\n padding: 0;\n border: 0;\n cursor: pointer;\n }\n\n // --- Remove and edit buttons (input context) ---\n &__remove,\n &__edit {\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n display: flex;\n align-items: center;\n justify-content: center;\n\n // Visible glyph is 18px but the hit area stays a comfortable 28px.\n width: var(--spacing-28);\n height: var(--spacing-28);\n padding: 0;\n border: none;\n border-radius: var(--rounded-full, 9999px);\n background-color: color-mix(\n in srgb,\n var(--color-surface-1) 85%,\n transparent\n );\n color: var(--color-word-2);\n cursor: pointer;\n line-height: 1;\n box-shadow: var(--shadow-sm);\n transition:\n background-color 0.18s var(--ease-out),\n color 0.18s var(--ease-out),\n scale 0.12s var(--ease-out);\n\n &:hover {\n background-color: var(--color-surface-2);\n color: var(--color-word-1);\n }\n\n &:active {\n scale: 0.96;\n }\n\n // Inside the document row the button rides inline, not overlaid\n // (size is inherited from the base).\n &--inline {\n position: static;\n flex-shrink: 0;\n box-shadow: none;\n background-color: transparent;\n color: var(--color-word-4);\n\n &:hover {\n background-color: var(--color-surface-3);\n color: var(--color-word-1);\n }\n }\n }\n\n // --- Compact (composer) chips ---\n // ChatGPT/Gemini-style: every attachment is the SAME height and carries\n // an always-visible round remove control in the top-right corner — no\n // hover-revealed actions, no size mismatch between image and file chips.\n &--compact {\n // Shared chip height so image and file chips align in the row.\n --chip-size: var(--spacing-56);\n\n max-width: 240px;\n\n &.pk-chatbot-file-preview--image {\n width: var(--chip-size);\n height: var(--chip-size);\n border-radius: var(--rounded-md, 6px);\n }\n\n // Fill the square; the root's `overflow: hidden` rounds the corners.\n .pk-chatbot-file-preview__thumb-wrap,\n .pk-chatbot-file-preview__thumb-link {\n width: 100%;\n height: 100%;\n }\n\n &.pk-chatbot-file-preview--doc {\n height: var(--chip-size);\n gap: var(--spacing-8);\n padding: var(--spacing-8);\n\n // Reserve room so the corner remove button never overlaps the\n // name/meta text.\n padding-inline-end: var(--spacing-28);\n }\n\n // Square icon tile that fills the chip height, so file chips read at\n // the same scale as image thumbnails: the chip less its padding and\n // its two 1px borders. Not `align-self: stretch` with `aspect-ratio`,\n // which Safari sizes from the chip's outer height, so the tile ran\n // past the chip's bottom edge.\n .pk-chatbot-file-preview__icon-tile {\n --chip-tile-size: calc(\n var(--chip-size) - 2 * var(--spacing-8) - 2px\n );\n\n width: var(--chip-tile-size);\n height: var(--chip-tile-size);\n }\n\n .pk-chatbot-file-preview__icon {\n width: var(--spacing-20);\n height: var(--spacing-20);\n }\n }\n\n // Always-visible round remove control on the top-right corner: the\n // base transform centres it 4px inside the corner, so half of it rides\n // over the chip's edge (nothing clips it), with an extended hit area\n // for easy tapping. The edit control of an image mirrors it on the\n // top-left corner.\n &--compact &__remove,\n &--compact &__edit {\n top: var(--spacing-4);\n right: var(--spacing-4);\n width: var(--spacing-24);\n height: var(--spacing-24);\n border: 1px solid var(--color-surface-4);\n background-color: var(--color-surface);\n color: var(--color-word-1);\n font-size: var(--text-16);\n box-shadow: var(--shadow-sm);\n\n // Comfortable touch/click target beyond the small visible glyph.\n &::after {\n content: '';\n position: absolute;\n inset: calc(-1 * var(--spacing-4));\n }\n\n &:hover {\n background-color: var(--color-surface-2);\n color: var(--color-word-1);\n }\n }\n\n &--compact &__edit {\n right: auto;\n left: var(--spacing-4);\n transform: translate(-50%, -50%);\n }\n\n @media (prefers-reduced-motion: reduce) {\n &--doc,\n &__open,\n &__remove,\n &__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,UAAA;;MANL,MAAK;MACL,OAAM;MACL,OAAOH,EAAAA,GAAE,sBAAA;MACT,cAAU,GAAKA,EAAAA,GAAE,sBAAA,IAA2B0C,EAAA,WAAQ,MAASA,EAAA,aAAQ;MACrE,SAAK,AAAAkD,EAAA,QAAE,GAAAQ,MAAA1D,EAAA,aAAAA,EAAA,UAAA,GAAA0D,CAAA;K,IACR3F,EAA6BuE,GAAA,EAArB,MAAK,cAAa,CAAA,C;KAE9B3E,EASI,KAAA;MARC,MAAMqC,EAAA;MACP,QAAO;MACP,KAAI;MACJ,OAAM;MACL,OAAO1C,EAAAA,GAAE,iBAAA;MACT,cAAU,GAAKA,EAAAA,GAAE,iBAAA,IAAsB0C,EAAA,WAAQ,MAASA,EAAA,aAAQ;MAChE,SAAOC;K,IACRlC,EAAoCuE,GAAA,EAA5B,MAAK,qBAAoB,CAAA,C;;IAI/BtC,EAAA,aAAS,CAAKA,EAAA,WADxBxC,EAAA,GAAAC,EASS,UAAA;;KAPL,MAAK;KACL,OAAKC,EAAA,CAAC,mCAAiC,EAAA,2CAAA,CACesC,EAAA,QAAO,CAAA,CAAA;KAC5D,OAAO1C,EAAAA,GAAE,eAAA;KACT,cAAYA,EAAAA,GAAE,eAAA;KACd,SAAK,AAAA4F,EAAA,QAAA,MAAE3F,EAAAA,MAAK,QAAA;I,IACbQ,EAA+BuE,GAAA,EAAvB,MAAK,gBAAe,CAAA,C"}
@@ -1,8 +1,8 @@
1
1
  import { t as e } from "./VvButtonLocalized-C-vx25u4.js";
2
2
  import { s as t } from "./Media-0U2B_qCS.js";
3
- import { t as n } from "./PkStreamingMarkdown-BcUq4ThC.js";
3
+ import { t as n } from "./PkStreamingMarkdown-ha0V58V9.js";
4
4
  import { t as r } from "./PkChatbotFilePreview-aKJBtw04.js";
5
- import { j as i, k as a } from "./utils-waie4Gfn.js";
5
+ import { j as i, k as a } from "./utils-Df5n2cDc.js";
6
6
  import { VvDropdown as o, VvDropdownAction as s, VvIcon as c } from "@volverjs/ui-vue/components";
7
7
  import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as h, createVNode as g, defineAsyncComponent as _, defineComponent as v, mergeModels as y, mergeProps as ee, nextTick as b, normalizeClass as te, normalizeProps as ne, onBeforeUnmount as re, onMounted as ie, onScopeDispose as ae, openBlock as x, ref as S, renderList as oe, renderSlot as se, shallowRef as ce, toDisplayString as C, unref as w, useId as le, useModel as ue, useTemplateRef as T, watch as E, withCtx as D, withKeys as de, withModifiers as fe } from "vue";
8
8
  import { useI18n as pe } from "vue-i18n";
@@ -225,7 +225,7 @@ var L = I, R = ["type"], z = {
225
225
  "manual-confirmations"
226
226
  ], ["update:modelValue", "update:pendingAttachments"]),
227
227
  setup(v, { expose: y, emit: ae }) {
228
- let he = _(() => import("./PkImageEditorDialog-Bj4sUHXM.js")), O = ue(v, "modelValue"), k = ue(v, "pendingAttachments"), j = ae, M = v, { t: N } = pe({ useScope: "global" }), P = T("textareaEl"), F = T("fileInputEl"), I = T("cameraInputEl"), R = T("formEl"), z = S(O.value ?? ""), V = null, H = () => {
228
+ let he = _(() => import("./PkImageEditorDialog-_-UkV0CO.js")), O = ue(v, "modelValue"), k = ue(v, "pendingAttachments"), j = ae, M = v, { t: N } = pe({ useScope: "global" }), P = T("textareaEl"), F = T("fileInputEl"), I = T("cameraInputEl"), R = T("formEl"), z = S(O.value ?? ""), V = null, H = () => {
229
229
  V !== null && (clearTimeout(V), V = null);
230
230
  }, Ne = () => {
231
231
  H(), O.value = z.value;
@@ -581,4 +581,4 @@ var L = I, R = ["type"], z = {
581
581
  });
582
582
  export { M as i, B as n, A as r, V as t };
583
583
 
584
- //# sourceMappingURL=PkChatbotInput-CIIJ1bpF.js.map
584
+ //# sourceMappingURL=PkChatbotInput-C9l_1I3d.js.map