@8wave/ai-elements 0.126.0-beta.34 → 0.126.0-beta.36

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
- {"version":3,"file":"PkToolShowEmail-BehvoNsz.js","names":["$t","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_toDisplayString","_withCtx","_unref","_normalizeProps","_guardReactiveProps","_createTextVNode","__exportAll","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","PkToolShowEmail_vue_vue_type_script_setup_true_lang_default","props","__props","useClipboard","toolPart","computed","useShortUrlResolver","subject","resolveText","body","openInMailApp","mailtoLink","openInOutlook","url","openInGmail","openInYahooMail","_component_VvIcon","VvIcon","_component_VvButton","VvButtonLocalized","_component_VvDropdownAction","VvDropdownAction","_component_VvDropdown","VvDropdown","_component_VvButtonGroup","VvButtonGroup","openBlock","createElementBlock","createElementVNode","createVNode","toDisplayString","_ctx","withCtx","unref","copied","_cache","copy","normalizeProps","guardReactiveProps","createTextVNode","PkToolShowEmail_exports","PkToolShowEmail_default"],"sources":["../../../../packages/components/src/chat/PkToolShowEmail.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import { useShortUrlResolver } from 'composables'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n subject: string\n body: string\n }\n }\n return part\n })\n\n // Emails leave the app (mailto/webmail/clipboard), so expand short urls to\n // their real target rather than keeping the fragile `/api/r/` redirect.\n const { resolveText } = useShortUrlResolver()\n const subject = resolveText(() => toolPart.value.input?.subject)\n const body = resolveText(() => toolPart.value.input?.body)\n\n const openInMailApp = () => {\n if (!toolPart.value.input) {\n return\n }\n const mailtoLink = `mailto:?subject=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(mailtoLink)\n }\n\n const openInOutlook = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://outlook.office.com/mail/deeplink/compose?to=&subject=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInGmail = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://mail.google.com/mail/u/0/?tf=cm&to=&su=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInYahooMail = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://compose.mail.yahoo.com/?to=&subject=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n</script>\n\n<template>\n <div\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:mail-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{ $t('label.email') }}\n </strong>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copy(`${subject}\\n\\n${body}`)\" />\n <VvDropdown\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n strategy: 'fixed',\n }\">\n <VvButton\n icon=\"ri:mail-send-line\"\n modifiers=\"action-quiet-small\"\n :label=\"$t('action.send')\" />\n <template #items>\n <VvDropdownAction @click=\"openInOutlook\">\n <VvIcon name=\"mdi:outlook\" />\n {{ $t('action.openInOutlook') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInGmail\">\n <VvIcon name=\"mdi:gmail\" />\n {{ $t('action.openInGmail') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInYahooMail\">\n <VvIcon name=\"mdi:yahoo\" />\n {{ $t('action.openInYahooMail') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInMailApp\">\n <VvIcon name=\"ri:mail-open-line\" />\n {{ $t('action.openInMailApp') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </VvButtonGroup>\n </div>\n <div class=\"border-b border-surface-3 p-sm\">\n <div class=\"text-12 text-word-4 mb-4\">\n {{ $t('label.subject') }}\n </div>\n <div class=\"text-word-2 font-semibold\">\n {{ subject }}\n </div>\n </div>\n <div class=\"p-sm\">\n <div class=\"text-12 text-word-4 mb-4\">\n {{ $t('label.body') }}\n </div>\n <pre class=\"text-word-2 whitespace-pre-wrap break-words\">{{\n body\n }}</pre>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;EAKI,IAAMsB,IAAQC,GAIR,EAAE,SAAM,cAAWC,EAAa,GAEhCC,IAAWC,QACAJ,EAAM,IAOtB,GAIK,EAAE,mBAAgBK,EAAoB,GACtCC,IAAUC,QAAkBJ,EAAS,MAAM,OAAO,OAAO,GACzDK,IAAOD,QAAkBJ,EAAS,MAAM,OAAO,IAAI,GAEnDM,UAAsB;GACxB,IAAI,CAACN,EAAS,MAAM,OAChB;GAEJ,IAAMO,IAAa,mBAAmB,mBAClCJ,EAAQ,KACZ,EAAE,QAAQ,mBAAmBE,EAAK,KAAK;GACvC,OAAO,KAAKE,CAAU;EAC1B,GAEMC,UAAsB;GACxB,IAAI,CAACR,EAAS,MAAM,OAChB;GAEJ,IAAMS,IAAM,gEAAgE,mBACxEN,EAAQ,KACZ,EAAE,QAAQ,mBAAmBE,EAAK,KAAK;GACvC,OAAO,KAAKI,GAAK,QAAQ;EAC7B,GAEMC,UAAoB;GACtB,IAAI,CAACV,EAAS,MAAM,OAChB;GAEJ,IAAMS,IAAM,kDAAkD,mBAC1DN,EAAQ,KACZ,EAAE,QAAQ,mBAAmBE,EAAK,KAAK;GACvC,OAAO,KAAKI,GAAK,QAAQ;EAC7B,GAEME,UAAwB;GAC1B,IAAI,CAACX,EAAS,MAAM,OAChB;GAEJ,IAAMS,IAAM,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EAAnB,MAAK,YAAW,CAAA,GAAG3B,EAAA,MAC3BL,EAAGL,EAAAA,GAAE,wBAAA,CAAA,GAAA,CAAA,C;;;QAETI,EAGmBqC,GAAA,EAHA,SAAOV,EAAa,GAAA;SACnC,SAAAzB,QAAmC,CAAnCF,EAAmCiC,GAAA,EAA3B,MAAK,oBAAmB,CAAA,GAAG3B,EAAA,MACnCL,EAAGL,EAAAA,GAAE,sBAAA,CAAA,GAAA,CAAA,C;;;;OAnBb,SAAAM,QAGiC,CAHjCF,EAGiCmC,GAAA;QAF7B,MAAK;QACL,WAAU;QACT,OAAOvC,EAAAA,GAAE,aAAA;;;;;;;IAsB1BG,EAOM,OAPNY,GAOM,CANFZ,EAEM,OAFNa,GAEMX,EADCL,EAAAA,GAAE,eAAA,CAAA,GAAA,CAAA,GAETG,EAEM,OAFNc,GAEMZ,EADCE,EAAAqB,CAAA,CAAO,GAAA,CAAA,C;IAGlBzB,EAOM,OAPNe,GAOM,CANFf,EAEM,OAFNgB,GAEMd,EADCL,EAAAA,GAAE,YAAA,CAAA,GAAA,CAAA,GAETG,EAEQ,OAFRiB,GAEQf,EADJE,EAAAuB,CAAA,CAAI,GAAA,CAAA,C"}
1
+ {"version":3,"file":"PkToolShowEmail-idhNR5-l.js","names":["$t","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_toDisplayString","_withCtx","_unref","_normalizeProps","_guardReactiveProps","_createTextVNode","__exportAll","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","PkToolShowEmail_vue_vue_type_script_setup_true_lang_default","props","__props","useClipboard","toolPart","computed","useShortUrlResolver","subject","resolveText","body","openInMailApp","mailtoLink","openInOutlook","url","openInGmail","openInYahooMail","_component_VvIcon","VvIcon","_component_VvButton","VvButtonLocalized","_component_VvDropdownAction","VvDropdownAction","_component_VvDropdown","VvDropdown","_component_VvButtonGroup","VvButtonGroup","openBlock","createElementBlock","createElementVNode","createVNode","toDisplayString","_ctx","withCtx","unref","copied","_cache","copy","normalizeProps","guardReactiveProps","createTextVNode","PkToolShowEmail_exports","PkToolShowEmail_default"],"sources":["../../../../packages/components/src/chat/PkToolShowEmail.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import { useShortUrlResolver } from 'composables'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n subject: string\n body: string\n }\n }\n return part\n })\n\n // Emails leave the app (mailto/webmail/clipboard), so expand short urls to\n // their real target rather than keeping the fragile `/api/r/` redirect.\n const { resolveText } = useShortUrlResolver()\n const subject = resolveText(() => toolPart.value.input?.subject)\n const body = resolveText(() => toolPart.value.input?.body)\n\n const openInMailApp = () => {\n if (!toolPart.value.input) {\n return\n }\n const mailtoLink = `mailto:?subject=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(mailtoLink)\n }\n\n const openInOutlook = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://outlook.office.com/mail/deeplink/compose?to=&subject=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInGmail = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://mail.google.com/mail/u/0/?tf=cm&to=&su=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInYahooMail = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://compose.mail.yahoo.com/?to=&subject=${encodeURIComponent(\n subject.value,\n )}&body=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n</script>\n\n<template>\n <div\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:mail-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{ $t('label.email') }}\n </strong>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copy(`${subject}\\n\\n${body}`)\" />\n <VvDropdown\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n strategy: 'fixed',\n }\">\n <VvButton\n icon=\"ri:mail-send-line\"\n modifiers=\"action-quiet-small\"\n :label=\"$t('action.send')\" />\n <template #items>\n <VvDropdownAction @click=\"openInOutlook\">\n <VvIcon name=\"mdi:outlook\" />\n {{ $t('action.openInOutlook') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInGmail\">\n <VvIcon name=\"mdi:gmail\" />\n {{ $t('action.openInGmail') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInYahooMail\">\n <VvIcon name=\"mdi:yahoo\" />\n {{ $t('action.openInYahooMail') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInMailApp\">\n <VvIcon name=\"ri:mail-open-line\" />\n {{ $t('action.openInMailApp') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </VvButtonGroup>\n </div>\n <div class=\"border-b border-surface-3 p-sm\">\n <div class=\"text-12 text-word-3 mb-4\">\n {{ $t('label.subject') }}\n </div>\n <div class=\"text-word-2 font-semibold\">\n {{ subject }}\n </div>\n </div>\n <div class=\"p-sm\">\n <div class=\"text-12 text-word-3 mb-4\">\n {{ $t('label.body') }}\n </div>\n <pre class=\"text-word-2 whitespace-pre-wrap break-words\">{{\n body\n }}</pre>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;EAKI,IAAMsB,IAAQC,GAIR,EAAE,SAAM,cAAWC,EAAa,GAEhCC,IAAWC,QACAJ,EAAM,IAOtB,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,OAFNc,GAEMZ,EADCE,EAAAqB,CAAA,CAAO,GAAA,CAAA,C;IAGlBzB,EAOM,OAPNe,GAOM,CANFf,EAEM,OAFNgB,GAEMd,EADCL,EAAAA,GAAE,YAAA,CAAA,GAAA,CAAA,GAETG,EAEQ,OAFRiB,GAEQf,EADJE,EAAAuB,CAAA,CAAI,GAAA,CAAA,C"}
@@ -1,8 +1,8 @@
1
1
  import { t as e } from "./rolldown-runtime-CGnMp29N.js";
2
2
  import { t } from "./VvButtonLocalized-C-vx25u4.js";
3
3
  import { H as n } from "./Agent-CBAd3F7k.js";
4
- import { h as r, m as i } from "./utils-waie4Gfn.js";
5
- import { t as a } from "./PkStreamingMarkdown-BcUq4ThC.js";
4
+ import { h as r, m as i } from "./utils-Df5n2cDc.js";
5
+ import { t as a } from "./PkStreamingMarkdown-ha0V58V9.js";
6
6
  import { t as ee } from "./PkEditorRadioButtons-Bw576DPQ.js";
7
7
  import { VvCheckbox as o, VvCheckboxGroup as s, VvIcon as te, VvInputText as ne } from "@volverjs/ui-vue/components";
8
8
  import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as m, createTextVNode as h, createVNode as g, defineComponent as _, mergeModels as v, mergeProps as y, normalizeClass as re, normalizeStyle as ie, openBlock as b, reactive as ae, ref as x, renderList as S, renderSlot as C, toDisplayString as w, unref as T, useId as oe, useModel as E, watch as D, withCtx as O, withKeys as se, withModifiers as k } from "vue";
@@ -305,4 +305,4 @@ var A = /* @__PURE__ */ _({
305
305
  }), P = /* @__PURE__ */ e({ default: () => F }), F = N;
306
306
  export { P as n, A as r, F as t };
307
307
 
308
- //# sourceMappingURL=PkToolShowForm-DjB3fji5.js.map
308
+ //# sourceMappingURL=PkToolShowForm-yh0YAXcg.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PkToolShowForm-DjB3fji5.js","names":["_useModel","_openBlock","_createBlock","_withCtx","_createElementBlock","_Fragment","_renderList","_renderSlot","_mergeProps","_createTextVNode","_toDisplayString","_openBlock","_createElementBlock","_createVNode","_createElementVNode","_toDisplayString","_unref","_normalizeClass","_normalizeStyle","_Fragment","_createBlock","PkStreamingMarkdown","PkEditorCheckboxButtons","_renderList","_withCtx","PkEditorRadioButtons","_withKeys","_withModifiers","__exportAll","isVoiceRenderAck","formStepOptions","formAnswerSlots","PkStreamingMarkdown_default","PkEditorRadioButtons_default","PkEditorCheckboxButtons_default","defineComponent","\"modelValue\"","\"modelModifiers\"","modelValue","useModel","__props","_component_VvCheckbox","VvCheckbox","_component_VvCheckboxGroup","VvCheckboxGroup","openBlock","createBlock","_cache","$event","withCtx","createElementBlock","Fragment","renderList","option","renderSlot","_ctx","mergeProps","createTextVNode","toDisplayString","_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","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","PkToolShowForm_vue_vue_type_script_setup_true_lang_default","__emit","props","emit","$t","$d","useI18n","toolPart","computed","questionId","useId","isLegacy","isRenderAck","isUnsent","isInteractive","hasNoAnswer","isAutoSubmitStep","step","currentStep","steps","isLegacyAutoSubmit","isSelfSubmitting","input","o","hasFailed","currentStepIndex","ref","canGoBack","canGoNext","isMultiStep","progress","answers","reactive","customAnswer","scalarValue","val","activeCheckboxValue","outputAnswers","output","list","normalizedOutput","out","value","radioOptions","goNext","submitCustomAnswer","submitForm","goBack","finalAnswers","index","onRadioChange","getSummaryValue","_component_VvIcon","VvIcon","_component_VvInputText","VvInputText","_component_VvButton","VvButtonLocalized","createVNode","createElementVNode","unref","normalizeClass","createCommentVNode","normalizeStyle","createSlots","withKeys","withModifiers","PkToolShowForm_exports","PkToolShowForm_default"],"sources":["../../../../packages/components/src/PkEditorCheckboxButtons.vue","../../../../packages/components/src/chat/PkToolShowForm.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import type { Option } from '@volverjs/ui-vue'\n\n defineProps<{\n name: string\n required?: boolean\n options: Option[]\n readonly?: boolean\n disabled?: boolean\n }>()\n\n const modelValue = defineModel<unknown[] | undefined>({\n default: undefined,\n })\n</script>\n\n<template>\n <VvCheckboxGroup v-model=\"modelValue\" :name modifiers=\"cards\">\n <VvCheckbox\n v-for=\"(option, key) in options\"\n :key\n :name\n :required\n :readonly\n :disabled\n :value=\"option.value\"\n modifiers=\"card\">\n <slot :name=\"String(option.value)\" v-bind=\"{ option }\">\n {{ option.label }}\n </slot>\n </VvCheckbox>\n </VvCheckboxGroup>\n</template>\n","<script setup lang=\"ts\">\n import { computed, ref, reactive, watch, useId } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { isVoiceRenderAck } from 'models'\n import { formAnswerSlots, formStepOptions } from './utils'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n import PkEditorRadioButtons from '../PkEditorRadioButtons.vue'\n import PkEditorCheckboxButtons from '../PkEditorCheckboxButtons.vue'\n\n // --- Types ---\n\n interface FormOption {\n label: string\n description?: string\n }\n\n interface FormStep {\n id: string\n question: string\n message?: string\n type?: 'text' | 'number' | 'date'\n options?: FormOption[]\n multiSelect?: boolean\n allowFreeformInput?: boolean\n placeholder?: string\n }\n\n interface FormAnswer {\n id: string\n value: string | string[] | number | null\n }\n\n interface ToolPartShape {\n state?: 'input-available' | 'output-available' | 'output-error'\n toolCallId?: string\n // AI SDK v5 encodes the tool name in `type` (e.g. 'tool-showMultipleChoice').\n // `toolName` is kept for backward compatibility but is normally absent.\n type?: string\n toolName?: string\n input?: {\n title?: string\n steps?: FormStep[]\n // Legacy showMultipleChoice fields\n question?: string\n options?: (string | FormOption)[]\n }\n // The web card submits `{ answers: [...] }`; the platform channels\n // (Teams modal) submit a flat record keyed by step id.\n output?: string | { answers: FormAnswer[] } | Record<string, unknown>\n }\n\n type AnswerValue = string | string[] | number | null\n\n // --- Props & Emits ---\n\n const props = defineProps<{\n part: unknown\n allowCustomAnswer?: boolean\n /**\n * Answered during a call. Nothing in the part says so (the answer went\n * to the agent as speech, not to the tool call), so the surface that\n * sent it is the only one that knows, and without it the same form\n * could be submitted again and again.\n */\n answered?: boolean\n /**\n * A conversation read back (the chat logs): the record of the form the\n * agent showed, never one to fill in. A form nobody sent from the card\n * shows the options it offered instead of answers.\n */\n record?: boolean\n }>()\n\n const emit = defineEmits<{\n select: [answer: string | { answers: FormAnswer[] }]\n }>()\n\n const { t: $t, d: $d } = useI18n({ useScope: 'global' })\n\n // --- Parsed tool part ---\n\n const toolPart = computed(\n () => JSON.parse(JSON.stringify(props.part)) as ToolPartShape,\n )\n\n // The question names the free answer field: its placeholder only said\n // \"Insert…\", so a screen reader could not tell which answer was asked for\n const questionId = useId()\n\n const isLegacy = computed(\n () =>\n toolPart.value.toolName === 'showMultipleChoice' ||\n toolPart.value.type === 'tool-showMultipleChoice',\n )\n\n /**\n * A form drawn during a CALL is already \"answered\" as far as the tool loop\n * is concerned: the turn could not wait for it, so the backend closed it\n * with a note saying the widget was drawn (see `isVoiceRenderAck`). That\n * note is not an answer, and the caller still has to give one.\n */\n const isRenderAck = computed(() => isVoiceRenderAck(toolPart.value.output))\n\n /** Still waiting for the card: open, or drawn during a call. */\n const isUnsent = computed(\n () => toolPart.value.state === 'input-available' || isRenderAck.value,\n )\n\n const isInteractive = computed(\n () => !props.record && !props.answered && isUnsent.value,\n )\n\n /**\n * No answer recorded in the part, so the summary shows the options the\n * form offered, never \"completed\": in a record, a form left open or\n * drawn during a call, whose answer went as a message or aloud if it\n * came at all; anywhere, a call that failed with its questions in place.\n */\n const hasNoAnswer = computed(\n () =>\n (props.record && isUnsent.value) ||\n toolPart.value.state === 'output-error',\n )\n\n /** Single-step with no custom-answer and no freeform → auto-submit on option pick */\n const isAutoSubmitStep = computed(() => {\n const step = currentStep.value\n if (!step) {\n return false\n }\n return (\n steps.value.length === 1 &&\n !step.allowFreeformInput &&\n !props.allowCustomAnswer\n )\n })\n\n /** Legacy tool should auto-submit on option pick regardless of allowCustomAnswer */\n const isLegacyAutoSubmit = computed(\n () =>\n isLegacy.value &&\n steps.value.length === 1 &&\n !currentStep.value?.multiSelect,\n )\n\n /**\n * True only for the steps that send themselves as soon as an option is\n * picked: the single case where the footer button would be redundant.\n * Every other shape needs it, single-step forms included: with\n * `allowFreeformInput` (or `allowCustomAnswer`) the radio pick no longer\n * auto-submits, so without the footer the user was left with a chosen\n * option and no way to send it.\n */\n const isSelfSubmitting = computed(\n () =>\n Boolean(currentStep.value?.options) &&\n !currentStep.value?.multiSelect &&\n (isAutoSubmitStep.value || isLegacyAutoSubmit.value),\n )\n\n // --- Steps ---\n\n const steps = computed<FormStep[]>(() => {\n const input = toolPart.value.input\n if (input?.steps?.length) {\n return input.steps\n }\n // Legacy showMultipleChoice → normalize into a single step\n if (input?.question && input?.options) {\n return [\n {\n id: 'legacy',\n question: input.question,\n options: input.options.map((o) =>\n typeof o === 'string' ? { label: o } : o,\n ),\n },\n ]\n }\n return []\n })\n\n /**\n * The reason the card has nothing to draw. A call the SDK rejected keeps\n * `state: 'output-error'` and moves the arguments it could not validate to\n * `rawInput`, so `input` is empty and there are no steps: without this the\n * component rendered NOTHING, and the user was left with a question that\n * had been announced and never appeared.\n */\n const hasFailed = computed(\n () => toolPart.value.state === 'output-error' && !steps.value.length,\n )\n\n // --- Navigation state ---\n\n const currentStepIndex = ref(0)\n const currentStep = computed(() => steps.value[currentStepIndex.value])\n const canGoBack = computed(() => currentStepIndex.value > 0)\n const canGoNext = computed(\n () => currentStepIndex.value < steps.value.length - 1,\n )\n const isMultiStep = computed(() => steps.value.length > 1)\n\n const progress = computed(() => {\n if (!isMultiStep.value) {\n return null\n }\n return Math.round(\n ((currentStepIndex.value + 1) / steps.value.length) * 100,\n )\n })\n\n // --- Answers ---\n\n /**\n * One slot PER STEP, keyed by position and not by step id: the ids come\n * from the model and nothing enforces they are unique, and keyed by id two\n * steps sharing one collapsed onto a single answer. See `formAnswerSlots`.\n */\n const answers = reactive<Record<number, AnswerValue>>({})\n const customAnswer = ref('')\n\n // The freeform field belongs to the step showing it: text left behind\n // (unsubmitted, or arriving from a late input update) must not follow the\n // user to the next or previous question.\n watch(currentStepIndex, () => {\n customAnswer.value = ''\n })\n\n // Single scalar answer shared by radio buttons and freeform text/number/date inputs.\n const scalarValue = computed<string | number | undefined>({\n get: () => {\n const val = currentStep.value\n ? answers[currentStepIndex.value]\n : undefined\n if (val == null || Array.isArray(val)) {\n return undefined\n }\n return val\n },\n set: (val) => {\n if (currentStep.value) {\n answers[currentStepIndex.value] = val ?? null\n }\n },\n })\n\n const activeCheckboxValue = computed<unknown[] | undefined>({\n get: () => {\n const val = currentStep.value\n ? answers[currentStepIndex.value]\n : undefined\n return Array.isArray(val) ? val : []\n },\n set: (val) => {\n if (currentStep.value) {\n answers[currentStepIndex.value] = (val as string[]) ?? []\n }\n },\n })\n\n // --- Initialize answers from existing output ---\n\n /** The `{ answers: [...] }` list, when the output carries one. */\n function outputAnswers(output: ToolPartShape['output']) {\n if (!output || typeof output === 'string') {\n return undefined\n }\n const list = (output as { answers?: unknown }).answers\n return Array.isArray(list) ? (list as FormAnswer[]) : undefined\n }\n\n watch(\n () => toolPart.value.output,\n (output) => {\n if (!output || isVoiceRenderAck(output)) {\n return\n }\n // Every shape an answered form comes back in (the web card's list,\n // a legacy plain string, the flat record a platform channel posts)\n // lands on the same per-position slots: see `formAnswerSlots`.\n Object.assign(\n answers,\n formAnswerSlots(steps.value, output) as Record<\n number,\n AnswerValue\n >,\n )\n },\n { immediate: true },\n )\n\n // --- Restore custom answer from output when it doesn't match any option ---\n\n const normalizedOutput = computed(() => {\n const out = toolPart.value.output\n if (!out || isVoiceRenderAck(out)) {\n return undefined\n }\n if (typeof out === 'string') {\n return out\n }\n const list = outputAnswers(out)\n if (list?.length === 1) {\n const val = list[0].value\n return Array.isArray(val) ? val.join(', ') : String(val)\n }\n return undefined\n })\n\n watch(\n normalizedOutput,\n (value) => {\n if (!value || !currentStep.value) {\n return\n }\n const optionLabels = (currentStep.value.options ?? []).map(\n (o) => o.label,\n )\n if (!optionLabels.includes(value)) {\n customAnswer.value = value\n }\n },\n { immediate: true },\n )\n\n // --- Option mapping for radio/checkbox components ---\n\n const radioOptions = computed(() => formStepOptions(currentStep.value))\n\n // --- Navigation & Submission ---\n\n /** Footer button, and Enter on a pure freeform step. */\n function goNext() {\n // A typed freeform answer wins over the picked option: it is the more\n // recent intent, and the footer button is now the visible way to send\n // it (the freeform field only submits on Enter).\n if (customAnswer.value.trim()) {\n submitCustomAnswer()\n return\n }\n if (canGoNext.value) {\n currentStepIndex.value++\n } else {\n submitForm()\n }\n }\n\n function goBack() {\n if (canGoBack.value) {\n currentStepIndex.value--\n }\n }\n\n function submitForm() {\n if (!isInteractive.value) {\n return\n }\n\n const finalAnswers: FormAnswer[] = steps.value.map((step, index) => ({\n id: step.id,\n value: answers[index] ?? null,\n }))\n\n // Legacy backward compatibility: single-step, single-select → return plain string\n if (\n isLegacyAutoSubmit.value &&\n !currentStep.value?.allowFreeformInput\n ) {\n const val = finalAnswers[0].value\n emit('select', Array.isArray(val) ? val[0] : (val as string))\n } else {\n emit('select', { answers: finalAnswers })\n }\n }\n\n /** Enter inside the freeform field shown alongside the options. */\n function submitCustomAnswer() {\n const value = customAnswer.value.trim()\n if (!value) {\n return\n }\n\n answers[currentStepIndex.value] = value\n // Cleared before navigating: `goNext()` reads it back to route a typed\n // answer here, so leaving it set would recurse.\n customAnswer.value = ''\n if (steps.value.length === 1) {\n submitForm()\n } else {\n goNext()\n }\n }\n\n function onRadioChange() {\n if (!isInteractive.value) {\n return\n }\n if (isAutoSubmitStep.value || isLegacyAutoSubmit.value) {\n submitForm()\n }\n }\n\n // --- Summary helpers ---\n\n function getSummaryValue(step: FormStep, index: number) {\n const val = answers[index]\n if (val == null) {\n return '—'\n }\n if (Array.isArray(val)) {\n return val.join(', ')\n }\n if (step.type === 'date') {\n return $d(new Date(val), 'short')\n }\n return val\n }\n</script>\n\n<template>\n <div\n v-if=\"hasFailed\"\n class=\"text-12 text-danger flex items-center gap-6 py-8\">\n <VvIcon name=\"ri:error-warning-line\" class=\"w-16 h-16 shrink-0\" />\n <span>{{ $t('message.formRenderError') }}</span>\n </div>\n <div\n v-else-if=\"steps.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden flex flex-col bg-surface\">\n <!-- Header -->\n <div\n v-if=\"toolPart.input?.title || (isInteractive && steps.length > 1)\"\n class=\"text-12 border-b border-surface-3 text-word-3 bg-surface-1\">\n <div\n v-if=\"toolPart.input?.title\"\n class=\"px-sm py-10 font-bold\"\n :class=\"{\n 'border-b border-surface-3':\n isInteractive && steps.length > 1,\n }\">\n {{ toolPart.input?.title }}\n </div>\n <!-- Progress for multi-step -->\n <div\n v-if=\"isInteractive && steps.length > 1\"\n class=\"flex flex-col gap-4 p-sm\">\n <div class=\"flex justify-between text-10 text-word-3\">\n <span>\n {{\n $t('showForm.step', {\n current: currentStepIndex + 1,\n total: steps.length,\n })\n }}\n </span>\n <span>{{ progress }}%</span>\n </div>\n <div class=\"h-4 bg-surface-3 rounded-full overflow-hidden\">\n <div\n class=\"h-full bg-word-4 transition-all duration-300\"\n :style=\"{ width: `${progress}%` }\"></div>\n </div>\n </div>\n </div>\n\n <!-- Input Available State -->\n <template v-if=\"isInteractive\">\n <!-- Current Step Content -->\n <div class=\"px-sm py-16 flex flex-col gap-12\">\n <div class=\"leading-normal text-12\">\n <strong :id=\"questionId\" class=\"font-semibold\">\n {{ currentStep.question }}\n </strong>\n <PkStreamingMarkdown\n v-if=\"currentStep.message\"\n :markdown=\"currentStep.message\"\n class=\"text-word-2 mt-4\" />\n </div>\n\n <!-- Checkbox list for multi-select -->\n <PkEditorCheckboxButtons\n v-if=\"currentStep.options && currentStep.multiSelect\"\n v-model=\"activeCheckboxValue\"\n :name=\"currentStep.id\"\n :options=\"radioOptions\"\n :readonly=\"!isInteractive\"\n class=\"mb-0\"\n vertical>\n <template\n v-for=\"option in radioOptions\"\n :key=\"option.value\"\n #[option.value]>\n <!-- Shared option layout: label + optional description -->\n <div class=\"text-12\">\n <div class=\"font-semibold\">{{ option.label }}</div>\n <div v-if=\"option.description\" class=\"text-word-3\">\n {{ option.description }}\n </div>\n </div>\n </template>\n </PkEditorCheckboxButtons>\n\n <!-- Radio buttons for single-select -->\n <PkEditorRadioButtons\n v-else-if=\"currentStep.options && !currentStep.multiSelect\"\n v-model=\"scalarValue\"\n :name=\"currentStep.id\"\n :options=\"radioOptions\"\n :readonly=\"!isInteractive\"\n vertical\n class=\"mb-0\"\n @update:model-value=\"onRadioChange\">\n <template\n v-for=\"option in radioOptions\"\n :key=\"option.value\"\n #[option.value]>\n <!-- Shared option layout: label + optional description -->\n <div class=\"text-12\">\n <div class=\"font-semibold\">{{ option.label }}</div>\n <div v-if=\"option.description\" class=\"text-word-3\">\n {{ option.description }}\n </div>\n </div>\n </template>\n </PkEditorRadioButtons>\n\n <!-- Pure Freeform Input (text, number, date) -->\n <div\n v-else-if=\"!currentStep.options\"\n class=\"flex flex-col gap-6 w-full\">\n <VvInputText\n :key=\"currentStep.id\"\n v-model=\"scalarValue\"\n :aria-labelledby=\"questionId\"\n :placeholder=\"\n currentStep.placeholder || $t('placeholder.insert')\n \"\n :type=\"currentStep.type\"\n class=\"w-full\"\n :name=\"currentStep.id\"\n modifiers=\"compact\"\n :disabled=\"!isInteractive\"\n @keyup.enter=\"goNext\" />\n </div>\n </div>\n\n <!-- Custom footer freeform input (shown alongside options when allowFreeformInput) -->\n <div\n v-if=\"currentStep.allowFreeformInput && currentStep.options\"\n class=\"px-sm pb-sm border-t border-surface-3\">\n <form\n class=\"flex gap-xs pt-sm\"\n @submit.prevent=\"submitCustomAnswer\">\n <VvInputText\n :key=\"`${currentStep.id}-custom`\"\n v-model=\"customAnswer\"\n class=\"flex-1\"\n :name=\"`${currentStep.id}-custom`\"\n modifiers=\"compact\"\n :disabled=\"!isInteractive\"\n :aria-label=\"\n currentStep.placeholder ||\n $t('showForm.otherPlaceholder')\n \"\n :placeholder=\"\n currentStep.placeholder ||\n $t('showForm.otherPlaceholder')\n \" />\n </form>\n </div>\n\n <!-- Footer navigation: shown for every step that does not submit\n itself on option pick (see `isSelfSubmitting`). -->\n <div\n v-if=\"!isSelfSubmitting\"\n class=\"px-sm py-10 bg-surface border-t border-surface-3 flex justify-between gap-12\">\n <VvButton\n v-if=\"canGoBack\"\n modifiers=\"action-quiet\"\n icon=\"ri:arrow-left-s-line\"\n :label=\"$t('action.back')\"\n @click.stop=\"goBack\" />\n <div v-else></div>\n\n <VvButton\n :modifiers=\"canGoNext ? 'action-quiet' : 'action-primary'\"\n :icon=\"\n canGoNext\n ? 'ri:arrow-right-s-line'\n : 'ri:send-plane-2-line'\n \"\n icon-position=\"right\"\n :label=\"canGoNext ? $t('action.next') : $t('action.submit')\"\n @click.stop=\"goNext\" />\n </div>\n </template>\n\n <!-- Output Available State (Multi-step Summary) -->\n <template v-else>\n <div class=\"px-sm py-12 bg-surface flex flex-col gap-10\">\n <ul class=\"flex flex-col gap-8\">\n <li\n v-for=\"(step, index) in steps\"\n :key=\"index\"\n class=\"leading-normal\">\n <div class=\"text-12 text-word-3\">\n {{ step.question }}\n </div>\n <span v-if=\"hasNoAnswer\" class=\"text-12 text-word-3\">\n {{\n step.options\n ?.map((option) => option.label)\n .join(', ') || '—'\n }}\n </span>\n <span v-else class=\"text-12 text-word-2 font-semibold\">\n {{ getSummaryValue(step, index) }}\n </span>\n </li>\n </ul>\n </div>\n <div\n class=\"px-sm py-12 bg-surface border-t border-surface-3 flex items-center gap-10\">\n <template v-if=\"hasNoAnswer\">\n <VvIcon\n name=\"ri:information-line\"\n class=\"text-16 text-word-3 shrink-0\" />\n <span class=\"text-12 text-word-2 leading-tight\">\n {{ $t('showForm.noAnswerRecorded') }}\n </span>\n </template>\n <template v-else>\n <VvIcon name=\"ri:check-line\" class=\"text-16 text-success\" />\n <div class=\"flex flex-col\">\n <span\n class=\"font-medium text-12 text-word-1 leading-tight\">\n {{ $t('showForm.completed') }}\n </span>\n </div>\n </template>\n </div>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAWI,IAAMsC,IAAatC,EAAkCwC,GAAA,YAEpD;;;GAID,OAAAvC,EAAA,GAAAC,EAckByC,GAAA;IAdQ,YAAAL,EAAA;IAAA,uBAAA,AAAAS,EAAA,QAAA,MAAA,EAAU,QAAAC;IAAG,MAAAR,EAAA;IAAK,WAAU;;IAE9C,SAAArC,QAAgC,EADpCF,EAAA,EAAA,GAAAG,EAYaC,GAAA,MAAAC,EAXekC,EAAA,UAAhB,GAAQ,OADpBvC,EAAA,GAAAC,EAYauC,GAAA;KAVR;KACA,MAAAD,EAAA;KACA,UAAAA,EAAA;KACA,UAAAA,EAAA;KACA,UAAAA,EAAA;KACA,OAAOa,EAAO;KACf,WAAU;;KACV,SAAAlD,QAEO,CAFPI,EAEOgD,EAAA,QAFM,OAAOF,EAAO,KAAK,GAAhC7C,EAEO,EAAA,SAAA,GAAA,GAAA,EAFsC,UAAM,CAAA,SAE5C,CADAC,EAAAC,EAAA2C,EAAO,KAAK,GAAA,CAAA,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EC2B3B,IAAMoC,IAAQjD,GAkBRkD,IAAOF,GAIP,EAAE,GAAGG,GAAI,GAAGC,MAAOC,GAAQ,EAAE,UAAU,SAAS,CAAC,GAIjDC,IAAWC,QACP,KAAK,MAAM,KAAK,UAAUN,EAAM,IAAI,CAAC,CAC/C,GAIMO,IAAaC,GAAM,GAEnBC,IAAWH,QAETD,EAAS,MAAM,aAAa,wBAC5BA,EAAS,MAAM,SAAS,yBAChC,GAQMK,IAAcJ,QAAelE,EAAiBiE,EAAS,MAAM,MAAM,CAAC,GAGpEM,IAAWL,QACPD,EAAS,MAA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GbhF,EAAA,GAAAC,EAQWO,GAAA,EAAA,KAAA,EAAA,GAAA,CAPPN,EAA4D8H,GAAA;IAApD,MAAK;IAAgB,OAAM;G,IACnC7H,EAKM,OALNuE,IAKM,CAJFvE,EAGO,QAHPwE,IAGOvE,EADAC,EAAA2E,CAAA,CAAE,CAAA,oBAAA,CAAA,GAAA,CAAA,C"}
1
+ {"version":3,"file":"PkToolShowForm-yh0YAXcg.js","names":["_useModel","_openBlock","_createBlock","_withCtx","_createElementBlock","_Fragment","_renderList","_renderSlot","_mergeProps","_createTextVNode","_toDisplayString","_openBlock","_createElementBlock","_createVNode","_createElementVNode","_toDisplayString","_unref","_normalizeClass","_normalizeStyle","_Fragment","_createBlock","PkStreamingMarkdown","PkEditorCheckboxButtons","_renderList","_withCtx","PkEditorRadioButtons","_withKeys","_withModifiers","__exportAll","isVoiceRenderAck","formStepOptions","formAnswerSlots","PkStreamingMarkdown_default","PkEditorRadioButtons_default","PkEditorCheckboxButtons_default","defineComponent","\"modelValue\"","\"modelModifiers\"","modelValue","useModel","__props","_component_VvCheckbox","VvCheckbox","_component_VvCheckboxGroup","VvCheckboxGroup","openBlock","createBlock","_cache","$event","withCtx","createElementBlock","Fragment","renderList","option","renderSlot","_ctx","mergeProps","createTextVNode","toDisplayString","_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","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","PkToolShowForm_vue_vue_type_script_setup_true_lang_default","__emit","props","emit","$t","$d","useI18n","toolPart","computed","questionId","useId","isLegacy","isRenderAck","isUnsent","isInteractive","hasNoAnswer","isAutoSubmitStep","step","currentStep","steps","isLegacyAutoSubmit","isSelfSubmitting","input","o","hasFailed","currentStepIndex","ref","canGoBack","canGoNext","isMultiStep","progress","answers","reactive","customAnswer","scalarValue","val","activeCheckboxValue","outputAnswers","output","list","normalizedOutput","out","value","radioOptions","goNext","submitCustomAnswer","submitForm","goBack","finalAnswers","index","onRadioChange","getSummaryValue","_component_VvIcon","VvIcon","_component_VvInputText","VvInputText","_component_VvButton","VvButtonLocalized","createVNode","createElementVNode","unref","normalizeClass","createCommentVNode","normalizeStyle","createSlots","withKeys","withModifiers","PkToolShowForm_exports","PkToolShowForm_default"],"sources":["../../../../packages/components/src/PkEditorCheckboxButtons.vue","../../../../packages/components/src/chat/PkToolShowForm.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import type { Option } from '@volverjs/ui-vue'\n\n defineProps<{\n name: string\n required?: boolean\n options: Option[]\n readonly?: boolean\n disabled?: boolean\n }>()\n\n const modelValue = defineModel<unknown[] | undefined>({\n default: undefined,\n })\n</script>\n\n<template>\n <VvCheckboxGroup v-model=\"modelValue\" :name modifiers=\"cards\">\n <VvCheckbox\n v-for=\"(option, key) in options\"\n :key\n :name\n :required\n :readonly\n :disabled\n :value=\"option.value\"\n modifiers=\"card\">\n <slot :name=\"String(option.value)\" v-bind=\"{ option }\">\n {{ option.label }}\n </slot>\n </VvCheckbox>\n </VvCheckboxGroup>\n</template>\n","<script setup lang=\"ts\">\n import { computed, ref, reactive, watch, useId } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { isVoiceRenderAck } from 'models'\n import { formAnswerSlots, formStepOptions } from './utils'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n import PkEditorRadioButtons from '../PkEditorRadioButtons.vue'\n import PkEditorCheckboxButtons from '../PkEditorCheckboxButtons.vue'\n\n // --- Types ---\n\n interface FormOption {\n label: string\n description?: string\n }\n\n interface FormStep {\n id: string\n question: string\n message?: string\n type?: 'text' | 'number' | 'date'\n options?: FormOption[]\n multiSelect?: boolean\n allowFreeformInput?: boolean\n placeholder?: string\n }\n\n interface FormAnswer {\n id: string\n value: string | string[] | number | null\n }\n\n interface ToolPartShape {\n state?: 'input-available' | 'output-available' | 'output-error'\n toolCallId?: string\n // AI SDK v5 encodes the tool name in `type` (e.g. 'tool-showMultipleChoice').\n // `toolName` is kept for backward compatibility but is normally absent.\n type?: string\n toolName?: string\n input?: {\n title?: string\n steps?: FormStep[]\n // Legacy showMultipleChoice fields\n question?: string\n options?: (string | FormOption)[]\n }\n // The web card submits `{ answers: [...] }`; the platform channels\n // (Teams modal) submit a flat record keyed by step id.\n output?: string | { answers: FormAnswer[] } | Record<string, unknown>\n }\n\n type AnswerValue = string | string[] | number | null\n\n // --- Props & Emits ---\n\n const props = defineProps<{\n part: unknown\n allowCustomAnswer?: boolean\n /**\n * Answered during a call. Nothing in the part says so (the answer went\n * to the agent as speech, not to the tool call), so the surface that\n * sent it is the only one that knows, and without it the same form\n * could be submitted again and again.\n */\n answered?: boolean\n /**\n * A conversation read back (the chat logs): the record of the form the\n * agent showed, never one to fill in. A form nobody sent from the card\n * shows the options it offered instead of answers.\n */\n record?: boolean\n }>()\n\n const emit = defineEmits<{\n select: [answer: string | { answers: FormAnswer[] }]\n }>()\n\n const { t: $t, d: $d } = useI18n({ useScope: 'global' })\n\n // --- Parsed tool part ---\n\n const toolPart = computed(\n () => JSON.parse(JSON.stringify(props.part)) as ToolPartShape,\n )\n\n // The question names the free answer field: its placeholder only said\n // \"Insert…\", so a screen reader could not tell which answer was asked for\n const questionId = useId()\n\n const isLegacy = computed(\n () =>\n toolPart.value.toolName === 'showMultipleChoice' ||\n toolPart.value.type === 'tool-showMultipleChoice',\n )\n\n /**\n * A form drawn during a CALL is already \"answered\" as far as the tool loop\n * is concerned: the turn could not wait for it, so the backend closed it\n * with a note saying the widget was drawn (see `isVoiceRenderAck`). That\n * note is not an answer, and the caller still has to give one.\n */\n const isRenderAck = computed(() => isVoiceRenderAck(toolPart.value.output))\n\n /** Still waiting for the card: open, or drawn during a call. */\n const isUnsent = computed(\n () => toolPart.value.state === 'input-available' || isRenderAck.value,\n )\n\n const isInteractive = computed(\n () => !props.record && !props.answered && isUnsent.value,\n )\n\n /**\n * No answer recorded in the part, so the summary shows the options the\n * form offered, never \"completed\": in a record, a form left open or\n * drawn during a call, whose answer went as a message or aloud if it\n * came at all; anywhere, a call that failed with its questions in place.\n */\n const hasNoAnswer = computed(\n () =>\n (props.record && isUnsent.value) ||\n toolPart.value.state === 'output-error',\n )\n\n /** Single-step with no custom-answer and no freeform → auto-submit on option pick */\n const isAutoSubmitStep = computed(() => {\n const step = currentStep.value\n if (!step) {\n return false\n }\n return (\n steps.value.length === 1 &&\n !step.allowFreeformInput &&\n !props.allowCustomAnswer\n )\n })\n\n /** Legacy tool should auto-submit on option pick regardless of allowCustomAnswer */\n const isLegacyAutoSubmit = computed(\n () =>\n isLegacy.value &&\n steps.value.length === 1 &&\n !currentStep.value?.multiSelect,\n )\n\n /**\n * True only for the steps that send themselves as soon as an option is\n * picked: the single case where the footer button would be redundant.\n * Every other shape needs it, single-step forms included: with\n * `allowFreeformInput` (or `allowCustomAnswer`) the radio pick no longer\n * auto-submits, so without the footer the user was left with a chosen\n * option and no way to send it.\n */\n const isSelfSubmitting = computed(\n () =>\n Boolean(currentStep.value?.options) &&\n !currentStep.value?.multiSelect &&\n (isAutoSubmitStep.value || isLegacyAutoSubmit.value),\n )\n\n // --- Steps ---\n\n const steps = computed<FormStep[]>(() => {\n const input = toolPart.value.input\n if (input?.steps?.length) {\n return input.steps\n }\n // Legacy showMultipleChoice → normalize into a single step\n if (input?.question && input?.options) {\n return [\n {\n id: 'legacy',\n question: input.question,\n options: input.options.map((o) =>\n typeof o === 'string' ? { label: o } : o,\n ),\n },\n ]\n }\n return []\n })\n\n /**\n * The reason the card has nothing to draw. A call the SDK rejected keeps\n * `state: 'output-error'` and moves the arguments it could not validate to\n * `rawInput`, so `input` is empty and there are no steps: without this the\n * component rendered NOTHING, and the user was left with a question that\n * had been announced and never appeared.\n */\n const hasFailed = computed(\n () => toolPart.value.state === 'output-error' && !steps.value.length,\n )\n\n // --- Navigation state ---\n\n const currentStepIndex = ref(0)\n const currentStep = computed(() => steps.value[currentStepIndex.value])\n const canGoBack = computed(() => currentStepIndex.value > 0)\n const canGoNext = computed(\n () => currentStepIndex.value < steps.value.length - 1,\n )\n const isMultiStep = computed(() => steps.value.length > 1)\n\n const progress = computed(() => {\n if (!isMultiStep.value) {\n return null\n }\n return Math.round(\n ((currentStepIndex.value + 1) / steps.value.length) * 100,\n )\n })\n\n // --- Answers ---\n\n /**\n * One slot PER STEP, keyed by position and not by step id: the ids come\n * from the model and nothing enforces they are unique, and keyed by id two\n * steps sharing one collapsed onto a single answer. See `formAnswerSlots`.\n */\n const answers = reactive<Record<number, AnswerValue>>({})\n const customAnswer = ref('')\n\n // The freeform field belongs to the step showing it: text left behind\n // (unsubmitted, or arriving from a late input update) must not follow the\n // user to the next or previous question.\n watch(currentStepIndex, () => {\n customAnswer.value = ''\n })\n\n // Single scalar answer shared by radio buttons and freeform text/number/date inputs.\n const scalarValue = computed<string | number | undefined>({\n get: () => {\n const val = currentStep.value\n ? answers[currentStepIndex.value]\n : undefined\n if (val == null || Array.isArray(val)) {\n return undefined\n }\n return val\n },\n set: (val) => {\n if (currentStep.value) {\n answers[currentStepIndex.value] = val ?? null\n }\n },\n })\n\n const activeCheckboxValue = computed<unknown[] | undefined>({\n get: () => {\n const val = currentStep.value\n ? answers[currentStepIndex.value]\n : undefined\n return Array.isArray(val) ? val : []\n },\n set: (val) => {\n if (currentStep.value) {\n answers[currentStepIndex.value] = (val as string[]) ?? []\n }\n },\n })\n\n // --- Initialize answers from existing output ---\n\n /** The `{ answers: [...] }` list, when the output carries one. */\n function outputAnswers(output: ToolPartShape['output']) {\n if (!output || typeof output === 'string') {\n return undefined\n }\n const list = (output as { answers?: unknown }).answers\n return Array.isArray(list) ? (list as FormAnswer[]) : undefined\n }\n\n watch(\n () => toolPart.value.output,\n (output) => {\n if (!output || isVoiceRenderAck(output)) {\n return\n }\n // Every shape an answered form comes back in (the web card's list,\n // a legacy plain string, the flat record a platform channel posts)\n // lands on the same per-position slots: see `formAnswerSlots`.\n Object.assign(\n answers,\n formAnswerSlots(steps.value, output) as Record<\n number,\n AnswerValue\n >,\n )\n },\n { immediate: true },\n )\n\n // --- Restore custom answer from output when it doesn't match any option ---\n\n const normalizedOutput = computed(() => {\n const out = toolPart.value.output\n if (!out || isVoiceRenderAck(out)) {\n return undefined\n }\n if (typeof out === 'string') {\n return out\n }\n const list = outputAnswers(out)\n if (list?.length === 1) {\n const val = list[0].value\n return Array.isArray(val) ? val.join(', ') : String(val)\n }\n return undefined\n })\n\n watch(\n normalizedOutput,\n (value) => {\n if (!value || !currentStep.value) {\n return\n }\n const optionLabels = (currentStep.value.options ?? []).map(\n (o) => o.label,\n )\n if (!optionLabels.includes(value)) {\n customAnswer.value = value\n }\n },\n { immediate: true },\n )\n\n // --- Option mapping for radio/checkbox components ---\n\n const radioOptions = computed(() => formStepOptions(currentStep.value))\n\n // --- Navigation & Submission ---\n\n /** Footer button, and Enter on a pure freeform step. */\n function goNext() {\n // A typed freeform answer wins over the picked option: it is the more\n // recent intent, and the footer button is now the visible way to send\n // it (the freeform field only submits on Enter).\n if (customAnswer.value.trim()) {\n submitCustomAnswer()\n return\n }\n if (canGoNext.value) {\n currentStepIndex.value++\n } else {\n submitForm()\n }\n }\n\n function goBack() {\n if (canGoBack.value) {\n currentStepIndex.value--\n }\n }\n\n function submitForm() {\n if (!isInteractive.value) {\n return\n }\n\n const finalAnswers: FormAnswer[] = steps.value.map((step, index) => ({\n id: step.id,\n value: answers[index] ?? null,\n }))\n\n // Legacy backward compatibility: single-step, single-select → return plain string\n if (\n isLegacyAutoSubmit.value &&\n !currentStep.value?.allowFreeformInput\n ) {\n const val = finalAnswers[0].value\n emit('select', Array.isArray(val) ? val[0] : (val as string))\n } else {\n emit('select', { answers: finalAnswers })\n }\n }\n\n /** Enter inside the freeform field shown alongside the options. */\n function submitCustomAnswer() {\n const value = customAnswer.value.trim()\n if (!value) {\n return\n }\n\n answers[currentStepIndex.value] = value\n // Cleared before navigating: `goNext()` reads it back to route a typed\n // answer here, so leaving it set would recurse.\n customAnswer.value = ''\n if (steps.value.length === 1) {\n submitForm()\n } else {\n goNext()\n }\n }\n\n function onRadioChange() {\n if (!isInteractive.value) {\n return\n }\n if (isAutoSubmitStep.value || isLegacyAutoSubmit.value) {\n submitForm()\n }\n }\n\n // --- Summary helpers ---\n\n function getSummaryValue(step: FormStep, index: number) {\n const val = answers[index]\n if (val == null) {\n return '—'\n }\n if (Array.isArray(val)) {\n return val.join(', ')\n }\n if (step.type === 'date') {\n return $d(new Date(val), 'short')\n }\n return val\n }\n</script>\n\n<template>\n <div\n v-if=\"hasFailed\"\n class=\"text-12 text-danger flex items-center gap-6 py-8\">\n <VvIcon name=\"ri:error-warning-line\" class=\"w-16 h-16 shrink-0\" />\n <span>{{ $t('message.formRenderError') }}</span>\n </div>\n <div\n v-else-if=\"steps.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden flex flex-col bg-surface\">\n <!-- Header -->\n <div\n v-if=\"toolPart.input?.title || (isInteractive && steps.length > 1)\"\n class=\"text-12 border-b border-surface-3 text-word-3 bg-surface-1\">\n <div\n v-if=\"toolPart.input?.title\"\n class=\"px-sm py-10 font-bold\"\n :class=\"{\n 'border-b border-surface-3':\n isInteractive && steps.length > 1,\n }\">\n {{ toolPart.input?.title }}\n </div>\n <!-- Progress for multi-step -->\n <div\n v-if=\"isInteractive && steps.length > 1\"\n class=\"flex flex-col gap-4 p-sm\">\n <div class=\"flex justify-between text-10 text-word-3\">\n <span>\n {{\n $t('showForm.step', {\n current: currentStepIndex + 1,\n total: steps.length,\n })\n }}\n </span>\n <span>{{ progress }}%</span>\n </div>\n <div class=\"h-4 bg-surface-3 rounded-full overflow-hidden\">\n <div\n class=\"h-full bg-word-4 transition-all duration-300\"\n :style=\"{ width: `${progress}%` }\"></div>\n </div>\n </div>\n </div>\n\n <!-- Input Available State -->\n <template v-if=\"isInteractive\">\n <!-- Current Step Content -->\n <div class=\"px-sm py-16 flex flex-col gap-12\">\n <div class=\"leading-normal text-12\">\n <strong :id=\"questionId\" class=\"font-semibold\">\n {{ currentStep.question }}\n </strong>\n <PkStreamingMarkdown\n v-if=\"currentStep.message\"\n :markdown=\"currentStep.message\"\n class=\"text-word-2 mt-4\" />\n </div>\n\n <!-- Checkbox list for multi-select -->\n <PkEditorCheckboxButtons\n v-if=\"currentStep.options && currentStep.multiSelect\"\n v-model=\"activeCheckboxValue\"\n :name=\"currentStep.id\"\n :options=\"radioOptions\"\n :readonly=\"!isInteractive\"\n class=\"mb-0\"\n vertical>\n <template\n v-for=\"option in radioOptions\"\n :key=\"option.value\"\n #[option.value]>\n <!-- Shared option layout: label + optional description -->\n <div class=\"text-12\">\n <div class=\"font-semibold\">{{ option.label }}</div>\n <div v-if=\"option.description\" class=\"text-word-3\">\n {{ option.description }}\n </div>\n </div>\n </template>\n </PkEditorCheckboxButtons>\n\n <!-- Radio buttons for single-select -->\n <PkEditorRadioButtons\n v-else-if=\"currentStep.options && !currentStep.multiSelect\"\n v-model=\"scalarValue\"\n :name=\"currentStep.id\"\n :options=\"radioOptions\"\n :readonly=\"!isInteractive\"\n vertical\n class=\"mb-0\"\n @update:model-value=\"onRadioChange\">\n <template\n v-for=\"option in radioOptions\"\n :key=\"option.value\"\n #[option.value]>\n <!-- Shared option layout: label + optional description -->\n <div class=\"text-12\">\n <div class=\"font-semibold\">{{ option.label }}</div>\n <div v-if=\"option.description\" class=\"text-word-3\">\n {{ option.description }}\n </div>\n </div>\n </template>\n </PkEditorRadioButtons>\n\n <!-- Pure Freeform Input (text, number, date) -->\n <div\n v-else-if=\"!currentStep.options\"\n class=\"flex flex-col gap-6 w-full\">\n <VvInputText\n :key=\"currentStep.id\"\n v-model=\"scalarValue\"\n :aria-labelledby=\"questionId\"\n :placeholder=\"\n currentStep.placeholder || $t('placeholder.insert')\n \"\n :type=\"currentStep.type\"\n class=\"w-full\"\n :name=\"currentStep.id\"\n modifiers=\"compact\"\n :disabled=\"!isInteractive\"\n @keyup.enter=\"goNext\" />\n </div>\n </div>\n\n <!-- Custom footer freeform input (shown alongside options when allowFreeformInput) -->\n <div\n v-if=\"currentStep.allowFreeformInput && currentStep.options\"\n class=\"px-sm pb-sm border-t border-surface-3\">\n <form\n class=\"flex gap-xs pt-sm\"\n @submit.prevent=\"submitCustomAnswer\">\n <VvInputText\n :key=\"`${currentStep.id}-custom`\"\n v-model=\"customAnswer\"\n class=\"flex-1\"\n :name=\"`${currentStep.id}-custom`\"\n modifiers=\"compact\"\n :disabled=\"!isInteractive\"\n :aria-label=\"\n currentStep.placeholder ||\n $t('showForm.otherPlaceholder')\n \"\n :placeholder=\"\n currentStep.placeholder ||\n $t('showForm.otherPlaceholder')\n \" />\n </form>\n </div>\n\n <!-- Footer navigation: shown for every step that does not submit\n itself on option pick (see `isSelfSubmitting`). -->\n <div\n v-if=\"!isSelfSubmitting\"\n class=\"px-sm py-10 bg-surface border-t border-surface-3 flex justify-between gap-12\">\n <VvButton\n v-if=\"canGoBack\"\n modifiers=\"action-quiet\"\n icon=\"ri:arrow-left-s-line\"\n :label=\"$t('action.back')\"\n @click.stop=\"goBack\" />\n <div v-else></div>\n\n <VvButton\n :modifiers=\"canGoNext ? 'action-quiet' : 'action-primary'\"\n :icon=\"\n canGoNext\n ? 'ri:arrow-right-s-line'\n : 'ri:send-plane-2-line'\n \"\n icon-position=\"right\"\n :label=\"canGoNext ? $t('action.next') : $t('action.submit')\"\n @click.stop=\"goNext\" />\n </div>\n </template>\n\n <!-- Output Available State (Multi-step Summary) -->\n <template v-else>\n <div class=\"px-sm py-12 bg-surface flex flex-col gap-10\">\n <ul class=\"flex flex-col gap-8\">\n <li\n v-for=\"(step, index) in steps\"\n :key=\"index\"\n class=\"leading-normal\">\n <div class=\"text-12 text-word-3\">\n {{ step.question }}\n </div>\n <span v-if=\"hasNoAnswer\" class=\"text-12 text-word-3\">\n {{\n step.options\n ?.map((option) => option.label)\n .join(', ') || '—'\n }}\n </span>\n <span v-else class=\"text-12 text-word-2 font-semibold\">\n {{ getSummaryValue(step, index) }}\n </span>\n </li>\n </ul>\n </div>\n <div\n class=\"px-sm py-12 bg-surface border-t border-surface-3 flex items-center gap-10\">\n <template v-if=\"hasNoAnswer\">\n <VvIcon\n name=\"ri:information-line\"\n class=\"text-16 text-word-3 shrink-0\" />\n <span class=\"text-12 text-word-2 leading-tight\">\n {{ $t('showForm.noAnswerRecorded') }}\n </span>\n </template>\n <template v-else>\n <VvIcon name=\"ri:check-line\" class=\"text-16 text-success\" />\n <div class=\"flex flex-col\">\n <span\n class=\"font-medium text-12 text-word-1 leading-tight\">\n {{ $t('showForm.completed') }}\n </span>\n </div>\n </template>\n </div>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAWI,IAAMsC,IAAatC,EAAkCwC,GAAA,YAEpD;;;GAID,OAAAvC,EAAA,GAAAC,EAckByC,GAAA;IAdQ,YAAAL,EAAA;IAAA,uBAAA,AAAAS,EAAA,QAAA,MAAA,EAAU,QAAAC;IAAG,MAAAR,EAAA;IAAK,WAAU;;IAE9C,SAAArC,QAAgC,EADpCF,EAAA,EAAA,GAAAG,EAYaC,GAAA,MAAAC,EAXekC,EAAA,UAAhB,GAAQ,OADpBvC,EAAA,GAAAC,EAYauC,GAAA;KAVR;KACA,MAAAD,EAAA;KACA,UAAAA,EAAA;KACA,UAAAA,EAAA;KACA,UAAAA,EAAA;KACA,OAAOa,EAAO;KACf,WAAU;;KACV,SAAAlD,QAEO,CAFPI,EAEOgD,EAAA,QAFM,OAAOF,EAAO,KAAK,GAAhC7C,EAEO,EAAA,SAAA,GAAA,GAAA,EAFsC,UAAM,CAAA,SAE5C,CADAC,EAAAC,EAAA2C,EAAO,KAAK,GAAA,CAAA,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EC2B3B,IAAMoC,IAAQjD,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1C,EAAA,GAAAC,EAEO,QAFPsE,IAEOnE,EADA2H,GAAgBlC,GAAMgC,CAAK,CAAA,GAAA,CAAA,E,iBAK9C1H,EAmBM,OAnBNqE,IAmBM,CAjBcmB,EAAA,SAAhB3F,EAAA,GAAAC,EAOWO,GAAA,EAAA,KAAA,EAAA,GAAA,CANPN,EAE2C8H,GAAA;IADvC,MAAK;IACL,OAAM;G,IACV7H,EAEO,QAFPsE,IAEOrE,EADAC,EAAA2E,CAAA,CAAE,CAAA,2BAAA,CAAA,GAAA,CAAA,C,WAGbhF,EAAA,GAAAC,EAQWO,GAAA,EAAA,KAAA,EAAA,GAAA,CAPPN,EAA4D8H,GAAA;IAApD,MAAK;IAAgB,OAAM;G,IACnC7H,EAKM,OALNuE,IAKM,CAJFvE,EAGO,QAHPwE,IAGOvE,EADAC,EAAA2E,CAAA,CAAE,CAAA,oBAAA,CAAA,GAAA,CAAA,C"}
@@ -3,7 +3,7 @@ import "./src-nb8MU1sh.js";
3
3
  import { t } from "./useImageFallback-HUe4GHah.js";
4
4
  import { i as n, r } from "./useLightbox-DrEFS3gx.js";
5
5
  import { n as i } from "./url-validation-CJV9pp4v.js";
6
- import { r as a } from "./PkStreamingMarkdown-BcUq4ThC.js";
6
+ import { r as a } from "./PkStreamingMarkdown-ha0V58V9.js";
7
7
  import { t as o } from "./PkHeldImage-CK1xwkvq.js";
8
8
  import { VvIcon as s } from "@volverjs/ui-vue/components";
9
9
  import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createVNode as m, defineComponent as h, normalizeClass as g, onMounted as _, openBlock as v, ref as y, renderList as b, toDisplayString as x, unref as S, watchEffect as C } from "vue";
@@ -12,6 +12,7 @@ var w = {
12
12
  key: 0,
13
13
  class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-surface"
14
14
  }, T = { class: "px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8" }, E = { class: "font-bold" }, D = { class: "p-sm" }, O = [
15
+ "aria-label",
15
16
  "href",
16
17
  "data-pswp-src",
17
18
  "data-pswp-width",
@@ -57,8 +58,12 @@ var w = {
57
58
  ref_key: "galleryRef",
58
59
  ref: N,
59
60
  class: g(["grid gap-8", U.value])
60
- }, [(v(!0), f(c, null, b(I.value, (t) => (v(), f("a", {
61
+ }, [(v(!0), f(c, null, b(I.value, (t, r) => (v(), f("a", {
61
62
  key: t.url,
63
+ "aria-label": B(t.url) && !(t.caption || t.alt) ? e.$t("label.galleryImage", {
64
+ index: r + 1,
65
+ count: I.value.length
66
+ }) : void 0,
62
67
  href: B(t.url) ? t.url : void 0,
63
68
  "data-pswp-src": B(t.url) ? t.url : void 0,
64
69
  "data-pswp-width": S(F)(t.url).width,
@@ -90,4 +95,4 @@ var w = {
90
95
  }), N = /* @__PURE__ */ e({ default: () => P }), P = M;
91
96
  export { N as n, P as t };
92
97
 
93
- //# sourceMappingURL=PkToolShowImageGallery-C22TCUKW.js.map
98
+ //# sourceMappingURL=PkToolShowImageGallery-mmUY1Yfg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PkToolShowImageGallery-mmUY1Yfg.js","names":["$t","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_toDisplayString","_normalizeClass","_Fragment","_renderList","_unref","_createBlock","PkHeldImage","__exportAll","useLightbox","isSameSite","useChatImageGate","PkHeldImage_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","PkToolShowImageGallery_vue_vue_type_script_setup_true_lang_default","props","__props","toolPart","computed","galleryRef","ref","useImageSizes","images","useImageFallback","imageGate","isShown","url","canShowImage","showsWhole","measured","ready","image","gridCols","count","onMounted","init","_component_VvIcon","VvIcon","openBlock","createElementBlock","createElementVNode","createVNode","toDisplayString","_ctx","normalizeClass","Fragment","renderList","index","unref","getSize","shared","onImageError","createBlock","createCommentVNode","PkToolShowImageGallery_exports","PkToolShowImageGallery_default"],"sources":["../../../../packages/components/src/chat/PkToolShowImageGallery.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref, onMounted, watchEffect } from 'vue'\n import { isSameSite } from 'utils'\n import { useImageFallback } from 'composables'\n import { useLightbox, useImageSizes } from '../composables/useLightbox'\n import { useChatImageGate } from './chatImagePolicy'\n import PkHeldImage from './PkHeldImage.vue'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n images: Array<{\n url: string\n caption?: string\n alt?: string\n }>\n }\n }\n return part\n })\n\n const galleryRef = ref<HTMLElement>()\n const { preload, getSize } = useImageSizes()\n\n const images = computed(() => toolPart.value.input?.images ?? [])\n\n const { canShowImage, onImageError } = useImageFallback()\n // The model writes these urls: one from a host the agent does not list\n // waits for a click (chatImagePolicy.ts). Until then it is not measured,\n // linked or handed to the lightbox, which would all fetch it.\n const imageGate = useChatImageGate()\n const isShown = (url: string) => imageGate.canLoad(url) && canShowImage(url)\n\n // A single image is shown whole, at its own proportions: a square crop\n // can hide what it is about, such as the first and last bars of a chart.\n // Several share a grid of squares, and the lightbox shows each one whole.\n const showsWhole = (url: string) =>\n images.value.length === 1 && isShown(url)\n\n // Measured once it may load: a held image when it is released, a short\n // link when it resolves to a listed host.\n const measured = new Set<string>()\n watchEffect(() => {\n const ready = images.value.filter(\n (image) => !measured.has(image.url) && imageGate.canLoad(image.url),\n )\n for (const image of ready) {\n measured.add(image.url)\n }\n preload(ready)\n })\n\n const gridCols = computed(() => {\n const count = images.value.length\n if (count === 1) {\n return 'grid-cols-1 justify-items-center'\n }\n if (count === 2) {\n return 'grid-cols-2'\n }\n return 'grid-cols-3'\n })\n\n // In a conversation the images join its lightbox, with the others\n const { init, shared } = useLightbox({ gallery: galleryRef, shared: true })\n\n onMounted(async () => {\n await init()\n })\n</script>\n\n<template>\n <div\n v-if=\"images.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:image-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{\n $t('label.gallery', { count: images.length }, images.length)\n }}\n </strong>\n </div>\n <div class=\"p-sm\">\n <div ref=\"galleryRef\" class=\"grid gap-8\" :class=\"gridCols\">\n <!-- Without a caption or an alt the image's alt is empty and\n the link would have no name: a screen reader read its URL.\n A held or broken image has no href, and an element with\n no role takes no aria-label. -->\n <a\n v-for=\"(image, index) in images\"\n :key=\"image.url\"\n :aria-label=\"\n isShown(image.url) && !(image.caption || image.alt)\n ? $t('label.galleryImage', {\n index: index + 1,\n count: images.length,\n })\n : undefined\n \"\n :href=\"isShown(image.url) ? image.url : undefined\"\n :data-pswp-src=\"isShown(image.url) ? image.url : undefined\"\n :data-pswp-width=\"getSize(image.url).width\"\n :data-pswp-height=\"getSize(image.url).height\"\n :data-pswp-caption=\"image.caption ?? image.alt ?? ''\"\n :data-pswp-shared=\"shared || undefined\"\n :data-cropped=\"showsWhole(image.url) ? undefined : true\"\n class=\"relative block overflow-hidden rounded-xl group\"\n :class=\"[\n showsWhole(image.url)\n ? 'max-w-full'\n : [\n 'aspect-square max-h-384',\n { 'w-384 max-w-full': images.length === 1 },\n ],\n canShowImage(image.url)\n ? 'cursor-pointer'\n : 'pointer-events-none',\n ]\"\n :title=\"image.caption ?? image.alt ?? ''\"\n :target=\"isSameSite(image.url) ? undefined : '_blank'\"\n :rel=\"\n isSameSite(image.url)\n ? undefined\n : 'noopener noreferrer'\n \">\n <PkHeldImage\n v-if=\"!imageGate.canLoad(image.url)\"\n :host=\"imageGate.hostOf(image.url)\"\n fill\n @release=\"imageGate.release(image.url)\" />\n <img\n v-else-if=\"canShowImage(image.url)\"\n :src=\"image.url\"\n :alt=\"image.alt ?? image.caption ?? ''\"\n class=\"transition-opacity group-hover:opacity-80\"\n :class=\"\n showsWhole(image.url)\n ? 'block w-auto h-auto max-w-full max-h-384'\n : 'w-full h-full object-cover'\n \"\n @error=\"onImageError(image.url)\" />\n <div\n v-else\n class=\"w-full h-full flex flex-col items-center justify-center gap-4 bg-surface-1 text-word-3\">\n <VvIcon name=\"ri:camera-off-line\" class=\"text-24\" />\n <span class=\"text-12\">{{\n $t('label.imageLoadError')\n }}</span>\n </div>\n </a>\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQI,IAAM0B,IAAQC,GAIRC,IAAWC,QACAH,EAAM,IAUtB,GAEKI,IAAaC,EAAiB,GAC9B,EAAE,YAAS,eAAYC,EAAc,GAErCC,IAASJ,QAAeD,EAAS,MAAM,OAAO,UAAU,CAAC,CAAC,GAE1D,EAAE,iBAAc,oBAAiBM,EAAiB,GAIlDC,IAAYpB,EAAiB,GAC7BqB,KAAW,MAAgBD,EAAU,QAAQE,CAAG,KAAKC,EAAaD,CAAG,GAKrEE,KAAc,MAChBN,EAAO,MAAM,WAAW,KAAKG,EAAQC,CAAG,GAItCG,oBAAW,IAAI,IAAY;EACjC,QAAkB;GACd,IAAMC,IAAQR,EAAO,MAAM,QACtB,MAAU,CAACO,EAAS,IAAIE,EAAM,GAAG,KAAKP,EAAU,QAAQO,EAAM,GAAG,CACtE;GACA,KAAK,IAAMA,KAASD,GAChB,EAAS,IAAIC,EAAM,GAAG;GAE1B,EAAQD,CAAK;EACjB,CAAC;EAED,IAAME,IAAWd,QAAe;GAC5B,IAAMe,IAAQX,EAAO,MAAM;GAO3B,OANIW,MAAU,IACH,qCAEPA,MAAU,IACH,gBAEJ;EACX,CAAC,GAGK,EAAE,SAAM,cAAW/B,EAAY;GAAE,SAASiB;GAAY,QAAQ;EAAK,CAAC;E,OAE1Ee,EAAU,YAAY;GAClB,MAAMC,EAAK;EACf,CAAC,I;;GAKS,OAAAb,EAAA,MAAO,UADjBhC,EAAA,GAAAC,EAkFM,OAlFNe,GAkFM,CA/EFd,EAQM,OARNe,GAQM,CANFd,EAA+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AAU,CAAC4B,EAAM,GAAG,IAAI,KAAA,IAAS;IACzC,KAA8BjC,EAAAK,CAAA,CAAU,CAAC4B,EAAM,GAAG,IAAgC,KAAA,I;G,IAMxEjC,EAAA0B,CAAA,CAAS,CAAC,QAAQO,EAAM,GAAG,IAKvBjC,EAAA6B,CAAA,CAAY,CAACI,EAAM,GAAG,KADrCzC,EAAA,GAAAC,EAUuC,OAAA;;IARlC,KAAKwC,EAAM;IACX,KAAKA,EAAM,OAAOA,EAAM,WAAO;IAChC,OAAKpC,EAAA,CAAC,6CAC+BiC,EAAWG,EAAM,GAAG,I;IAKxD,UAAK,MAAEjC,EAAAqD,CAAA,CAAY,CAACpB,EAAM,GAAG;G,oBAClCzC,EAAA,GAAAC,EAOM,OAPNqB,GAOM,CAJFnB,EAAoD2C,GAAA;IAA5C,MAAK;IAAqB,OAAM;G,IACxC5C,EAES,QAFTqB,GAESnB,EADLL,EAAAA,GAAE,sBAAA,CAAA,GAAA,CAAA,C,OArBVC,EAAA,GAAAS,EAI8CC,GAAA;;IAFzC,MAAMF,EAAA0B,CAAA,CAAS,CAAC,OAAOO,EAAM,GAAG;IACjC,MAAA;IACC,YAAO,MAAEjC,EAAA0B,CAAA,CAAS,CAAC,QAAQO,EAAM,GAAG"}
@@ -9,7 +9,7 @@ import { MglGeolocateControl as E, MglMap as D, MglMarker as O, MglNavigationCon
9
9
  // ../../packages/components/src/chat/PkToolShowLocation.vue?vue&type=script&setup=true&lang.ts
10
10
  var M = {
11
11
  key: 0,
12
- class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-surface"
12
+ class: "pk-tool-show-location border border-surface-3 rounded-xl w-full overflow-hidden bg-surface"
13
13
  }, N = { class: "px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8" }, P = { class: "font-bold" }, F = {
14
14
  key: 0,
15
15
  class: "h-224 border-b border-surface-3"
@@ -18,7 +18,7 @@ var M = {
18
18
  class: "text-word-3"
19
19
  }, z = { class: "p-sm flex flex-col gap-4" }, B = { class: "font-semibold text-word-1 text-14" }, V = { class: "text-12 text-word-3" }, H = {
20
20
  key: 0,
21
- class: "text-12 text-word-4"
21
+ class: "text-12 text-word-3"
22
22
  }, U = /*@__PURE__*/ m({
23
23
  __name: "PkToolShowLocation",
24
24
  props: {
@@ -141,4 +141,4 @@ var M = {
141
141
  }), W = /* @__PURE__ */ e({ default: () => G }), G = U;
142
142
  export { W as n, G as t };
143
143
 
144
- //# sourceMappingURL=PkToolShowLocation-CqqtwH_R.js.map
144
+ //# sourceMappingURL=PkToolShowLocation-CyaKgQUX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PkToolShowLocation-CyaKgQUX.js","names":["$t","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_toDisplayString","_withCtx","_unref","_normalizeProps","_guardReactiveProps","_createTextVNode","__exportAll","getShadowRoot","loadCdnCss","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","PkToolShowLocation_vue_vue_type_script_setup_true_lang_default","props","__props","useClipboard","toolPart","computed","geocodedCoords","ref","MAP_STYLES","getCurrentInstance","mapStyle","input","result","hasCoords","center","getNavDestination","openGoogleMaps","openAppleMaps","openWaze","copyLocation","copy","_component_VvIcon","VvIcon","_component_VvButton","VvButtonLocalized","_component_VvDropdownAction","VvDropdownAction","_component_VvDropdown","VvDropdown","_component_VvButtonGroup","VvButtonGroup","openBlock","createElementBlock","createElementVNode","createVNode","toDisplayString","_ctx","withCtx","unref","copied","normalizeProps","guardReactiveProps","_cache","createTextVNode","MglMap","MglNavigationControl","MglGeolocateControl","MglScaleControl","MglMarker","MglPopup","createCommentVNode","PkToolShowLocation_exports","PkToolShowLocation_default"],"sources":["../../../../packages/components/src/chat/PkToolShowLocation.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import {\n computed,\n ref,\n watchEffect,\n onMounted,\n getCurrentInstance,\n } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import { loadCdnCss, getShadowRoot } from 'utils'\n import {\n MglGeolocateControl,\n MglMap,\n MglMarker,\n MglNavigationControl,\n MglPopup,\n MglScaleControl,\n } from '@indoorequal/vue-maplibre-gl'\n\n const props = defineProps<{\n part: unknown\n isDark?: boolean\n mainColor?: string\n forwardGeocode?: (\n query: string,\n lang?: string,\n ) => Promise<\n | { latitude: number; longitude: number; displayName: string }\n | undefined\n >\n }>()\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n name: string\n address: string\n latitude?: number\n longitude?: number\n additionalInfo?: string\n }\n }\n return part\n })\n\n const geocodedCoords = ref<[number, number] | null>(null)\n\n const MAP_STYLES = {\n light: 'https://basemaps.cartocdn.com/gl/positron-gl-style/style.json',\n dark: 'https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json',\n } as const\n\n onMounted(() => {\n loadCdnCss(\n 'https://cdn.jsdelivr.net/npm/maplibre-gl@5/dist/maplibre-gl.css',\n getShadowRoot(getCurrentInstance()?.proxy?.$el),\n )\n })\n\n const mapStyle = computed(() =>\n props.isDark ? MAP_STYLES.dark : MAP_STYLES.light,\n )\n\n watchEffect(async () => {\n const input = toolPart.value.input\n if (!input || input.latitude != null || !input.address) {\n return\n }\n if (!props.forwardGeocode) {\n return\n }\n\n try {\n const result = await props.forwardGeocode(input.address)\n if (result) {\n // [lng, lat] — MapLibre coordinate order\n geocodedCoords.value = [result.longitude, result.latitude]\n }\n } catch {\n // Geocoding failed — fallback to text-only card\n }\n })\n\n const hasCoords = computed(\n () =>\n (toolPart.value.input?.latitude != null &&\n toolPart.value.input?.longitude != null) ||\n geocodedCoords.value != null,\n )\n\n const center = computed<[number, number]>(() => {\n if (\n toolPart.value.input?.latitude != null &&\n toolPart.value.input?.longitude != null\n ) {\n // [lng, lat] — MapLibre coordinate order\n return [\n toolPart.value.input.longitude,\n toolPart.value.input.latitude,\n ]\n }\n return geocodedCoords.value ?? [0, 0]\n })\n\n // Navigation services expect \"lat,lng\" — center is [lng, lat]\n const getNavDestination = () =>\n hasCoords.value\n ? `${center.value[1]},${center.value[0]}`\n : (toolPart.value.input?.address ?? '')\n\n const openGoogleMaps = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n window.open(\n `https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent(getNavDestination())}`,\n '_blank',\n )\n }\n\n const openAppleMaps = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n window.open(\n `https://maps.apple.com/?daddr=${encodeURIComponent(getNavDestination())}`,\n '_blank',\n )\n }\n\n const openWaze = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n if (hasCoords.value) {\n window.open(\n `https://waze.com/ul?ll=${center.value[1]},${center.value[0]}&navigate=yes`,\n '_blank',\n )\n } else {\n window.open(\n `https://waze.com/ul?q=${encodeURIComponent(input.address)}&navigate=yes`,\n '_blank',\n )\n }\n }\n\n const copyLocation = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n copy(`${input.name}\\n${input.address}`)\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input\"\n class=\"pk-tool-show-location border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:map-pin-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{ $t('label.location') }}</strong>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copyLocation\" />\n <VvDropdown\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n strategy: 'fixed',\n }\">\n <VvButton\n icon=\"ri:direction-line\"\n modifiers=\"action-quiet-small\"\n :label=\"$t('action.getDirections')\" />\n <template #items>\n <VvDropdownAction @click=\"openGoogleMaps\">\n <VvIcon name=\"ri:map-2-line\" />\n Google Maps\n </VvDropdownAction>\n <VvDropdownAction @click=\"openAppleMaps\">\n <VvIcon name=\"ri:map-line\" />\n Apple Maps\n </VvDropdownAction>\n <VvDropdownAction @click=\"openWaze\">\n <VvIcon name=\"ri:navigation-line\" />\n Waze\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </VvButtonGroup>\n </div>\n <div v-if=\"hasCoords\" class=\"h-224 border-b border-surface-3\">\n <MglMap\n :map-style=\"mapStyle\"\n :zoom=\"12\"\n :center=\"center\"\n :scroll-zoom=\"false\"\n :attribution-control=\"false\">\n <MglNavigationControl\n position=\"top-right\"\n :show-compass=\"false\" />\n <MglGeolocateControl position=\"top-right\" />\n <MglScaleControl position=\"bottom-left\" />\n <MglMarker :coordinates=\"center\" :color=\"mainColor\">\n <MglPopup :close-button=\"false\">\n <div class=\"flex flex-col leading-normal text-12 pr-12\">\n <p class=\"font-semibold\">\n {{ toolPart.input.name }}\n </p>\n <p\n v-if=\"toolPart.input.address\"\n class=\"text-word-3\">\n {{ toolPart.input.address }}\n </p>\n </div>\n </MglPopup>\n </MglMarker>\n </MglMap>\n </div>\n <div class=\"p-sm flex flex-col gap-4\">\n <p class=\"font-semibold text-word-1 text-14\">\n {{ toolPart.input.name }}\n </p>\n <p class=\"text-12 text-word-3\">{{ toolPart.input.address }}</p>\n <p v-if=\"toolPart.input.additionalInfo\" class=\"text-12 text-word-3\">\n {{ toolPart.input.additionalInfo }}\n </p>\n </div>\n </div>\n</template>\n\n<style lang=\"scss\">\n // MapLibre rings its controls on focus but not the marker, a tab stop that\n // opens the popup: with the browser's outline reset, a keyboard user saw\n // nothing land on it (WCAG 2.4.7). The ring is the controls' own.\n .pk-tool-show-location .maplibregl-marker:focus-visible {\n border-radius: var(--rounded-sm);\n box-shadow: 0 0 2px 2px rgb(0 150 255);\n }\n</style>\n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A+DlB,EAA7BwB,EAAA,MAAS,MAAM,OAAO,GAAA,CAAA;KAC/CA,EAAA,MAAS,MAAM,kBAAxB5B,EAAA,GAAAC,EAEI,KAFJsB,GAEInB,EADGwB,EAAA,MAAS,MAAM,cAAc,GAAA,CAAA,K"}
@@ -5,7 +5,7 @@ import { VvButtonGroup as r, VvDropdown as i, VvDropdownAction as a, VvIcon as o
5
5
  import { computed as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, guardReactiveProps as p, normalizeProps as m, openBlock as h, toDisplayString as g, unref as _, withCtx as v } from "vue";
6
6
  import { useClipboard as y } from "@vueuse/core";
7
7
  // ../../packages/components/src/chat/PkToolShowMessage.vue?vue&type=script&setup=true&lang.ts
8
- var b = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-surface" }, x = { class: "px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8" }, S = { class: "font-bold" }, C = { class: "p-sm" }, w = { class: "text-12 text-word-4 mb-4" }, T = { class: "text-word-2 whitespace-pre-wrap break-words" }, E = /*@__PURE__*/ f({
8
+ var b = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-surface" }, x = { class: "px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8" }, S = { class: "font-bold" }, C = { class: "p-sm" }, w = { class: "text-12 text-word-3 mb-4" }, T = { class: "text-word-2 whitespace-pre-wrap break-words" }, E = /*@__PURE__*/ f({
9
9
  __name: "PkToolShowMessage",
10
10
  props: { part: {} },
11
11
  setup(e) {
@@ -75,4 +75,4 @@ var b = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-s
75
75
  }), D = /* @__PURE__ */ e({ default: () => O }), O = E;
76
76
  export { D as n, O as t };
77
77
 
78
- //# sourceMappingURL=PkToolShowMessage-Cca7K7GQ.js.map
78
+ //# sourceMappingURL=PkToolShowMessage-B4gztWUk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PkToolShowMessage-Cca7K7GQ.js","names":["$t","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_toDisplayString","_withCtx","_unref","_normalizeProps","_guardReactiveProps","_createTextVNode","__exportAll","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","PkToolShowMessage_vue_vue_type_script_setup_true_lang_default","props","__props","useClipboard","toolPart","computed","useShortUrlResolver","body","resolveText","openInWhatsApp","url","openInTelegram","openInSms","_component_VvIcon","VvIcon","_component_VvButton","VvButtonLocalized","_component_VvDropdownAction","VvDropdownAction","_component_VvDropdown","VvDropdown","_component_VvButtonGroup","VvButtonGroup","openBlock","createElementBlock","createElementVNode","createVNode","toDisplayString","_ctx","withCtx","unref","copied","_cache","copy","normalizeProps","guardReactiveProps","createTextVNode","PkToolShowMessage_exports","PkToolShowMessage_default"],"sources":["../../../../packages/components/src/chat/PkToolShowMessage.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import { useShortUrlResolver } from 'composables'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n body: string\n }\n }\n return part\n })\n\n // Messages leave the app (WhatsApp/Telegram/SMS/clipboard), so expand short\n // urls to their real target rather than keeping the fragile `/api/r/` link.\n const { resolveText } = useShortUrlResolver()\n const body = resolveText(() => toolPart.value.input?.body)\n\n const openInWhatsApp = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://wa.me/?text=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInTelegram = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://t.me/share/url?text=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInSms = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `sms:?body=${encodeURIComponent(body.value)}`\n window.open(url)\n }\n</script>\n\n<template>\n <div\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:chat-1-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{ $t('label.message') }}\n </strong>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copy(body)\" />\n <VvDropdown\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n strategy: 'fixed',\n }\">\n <VvButton\n icon=\"ri:send-plane-line\"\n modifiers=\"action-quiet-small\"\n :label=\"$t('action.send')\" />\n <template #items>\n <VvDropdownAction @click=\"openInWhatsApp\">\n <VvIcon name=\"ri:whatsapp-line\" />\n {{ $t('action.openInWhatsApp') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInTelegram\">\n <VvIcon name=\"ri:telegram-line\" />\n {{ $t('action.openInTelegram') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInSms\">\n <VvIcon name=\"ri:message-2-line\" />\n {{ $t('action.openInSms') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </VvButtonGroup>\n </div>\n <div class=\"p-sm\">\n <div class=\"text-12 text-word-4 mb-4\">\n {{ $t('label.body') }}\n </div>\n <pre class=\"text-word-2 whitespace-pre-wrap break-words\">{{\n body\n }}</pre>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;EAKI,IAAMmB,IAAQC,GAIR,EAAE,SAAM,cAAWC,EAAa,GAEhCC,IAAWC,QACAJ,EAAM,IAMtB,GAIK,EAAE,mBAAgBK,EAAoB,GACtCC,IAAOC,QAAkBJ,EAAS,MAAM,OAAO,IAAI,GAEnDK,UAAuB;GACzB,IAAI,CAACL,EAA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AAA;QACpC,SAAAvB,QAAkC,CAAlCF,EAAkC2B,GAAA,EAA1B,MAAK,mBAAkB,CAAA,GAAGrB,EAAA,MAClCL,EAAGL,EAAAA,GAAE,uBAAA,CAAA,GAAA,CAAA,C;;;OAETI,EAGmB+B,GAAA,EAHA,SAAOL,EAAS,GAAA;QAC/B,SAAAxB,QAAmC,CAAnCF,EAAmC2B,GAAA,EAA3B,MAAK,oBAAmB,CAAA,GAAGrB,EAAA,MACnCL,EAAGL,EAAAA,GAAE,kBAAA,CAAA,GAAA,CAAA,C;;;;MAfb,SAAAM,QAGiC,CAHjCF,EAGiC6B,GAAA;OAF7B,MAAK;OACL,WAAU;OACT,OAAOjC,EAAAA,GAAE,aAAA;;;;;;G,IAkB1BG,EAOM,OAPNY,GAOM,CANFZ,EAEM,OAFNa,GAEMX,EADCL,EAAAA,GAAE,YAAA,CAAA,GAAA,CAAA,GAETG,EAEQ,OAFRc,GAEQZ,EADJE,EAAAkB,CAAA,CAAI,GAAA,CAAA,C"}
1
+ {"version":3,"file":"PkToolShowMessage-B4gztWUk.js","names":["$t","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_toDisplayString","_withCtx","_unref","_normalizeProps","_guardReactiveProps","_createTextVNode","__exportAll","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","PkToolShowMessage_vue_vue_type_script_setup_true_lang_default","props","__props","useClipboard","toolPart","computed","useShortUrlResolver","body","resolveText","openInWhatsApp","url","openInTelegram","openInSms","_component_VvIcon","VvIcon","_component_VvButton","VvButtonLocalized","_component_VvDropdownAction","VvDropdownAction","_component_VvDropdown","VvDropdown","_component_VvButtonGroup","VvButtonGroup","openBlock","createElementBlock","createElementVNode","createVNode","toDisplayString","_ctx","withCtx","unref","copied","_cache","copy","normalizeProps","guardReactiveProps","createTextVNode","PkToolShowMessage_exports","PkToolShowMessage_default"],"sources":["../../../../packages/components/src/chat/PkToolShowMessage.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import { useShortUrlResolver } from 'composables'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n body: string\n }\n }\n return part\n })\n\n // Messages leave the app (WhatsApp/Telegram/SMS/clipboard), so expand short\n // urls to their real target rather than keeping the fragile `/api/r/` link.\n const { resolveText } = useShortUrlResolver()\n const body = resolveText(() => toolPart.value.input?.body)\n\n const openInWhatsApp = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://wa.me/?text=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInTelegram = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `https://t.me/share/url?text=${encodeURIComponent(body.value)}`\n window.open(url, '_blank')\n }\n\n const openInSms = () => {\n if (!toolPart.value.input) {\n return\n }\n const url = `sms:?body=${encodeURIComponent(body.value)}`\n window.open(url)\n }\n</script>\n\n<template>\n <div\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:chat-1-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{ $t('label.message') }}\n </strong>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copy(body)\" />\n <VvDropdown\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n strategy: 'fixed',\n }\">\n <VvButton\n icon=\"ri:send-plane-line\"\n modifiers=\"action-quiet-small\"\n :label=\"$t('action.send')\" />\n <template #items>\n <VvDropdownAction @click=\"openInWhatsApp\">\n <VvIcon name=\"ri:whatsapp-line\" />\n {{ $t('action.openInWhatsApp') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInTelegram\">\n <VvIcon name=\"ri:telegram-line\" />\n {{ $t('action.openInTelegram') }}\n </VvDropdownAction>\n <VvDropdownAction @click=\"openInSms\">\n <VvIcon name=\"ri:message-2-line\" />\n {{ $t('action.openInSms') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </VvButtonGroup>\n </div>\n <div class=\"p-sm\">\n <div class=\"text-12 text-word-3 mb-4\">\n {{ $t('label.body') }}\n </div>\n <pre class=\"text-word-2 whitespace-pre-wrap break-words\">{{\n body\n }}</pre>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;EAKI,IAAMmB,IAAQC,GAIR,EAAE,SAAM,cAAWC,EAAa,GAEhCC,IAAWC,QACAJ,EAAM,IAMtB,GAIK,EAAE,mBAAgBK,EAAoB,GACtCC,IAAOC,QAAkBJ,EAAS,MAAM,OAAO,IAAI,GAEnDK,UAAuB;GACzB,IAAI,CAACL,EAAS,MAAM,OAChB;GAEJ,IAAMM,IAAM,uBAAuB,mBAAmBH,EAAK,KAAK;GAChE,OAAO,KAAKG,GAAK,QAAQ;EAC7B,GAEMC,UAAuB;GACzB,IAAI,CAACP,EAAS,MAAM,OAChB;GAEJ,IAAMM,IAAM,+BAA+B,mBAAmBH,EAAK,KAAK;GACxE,OAAO,KAAKG,GAAK,QAAQ;EAC7B,GAEME,UAAkB;GACpB,IAAI,CAACR,EAAS,MAAM,OAChB;GAEJ,IAAMM,IAAM,aAAa,mBAAmBH,EAAK,KAAK;GACtD,OAAO,KAAKG,CAAG;EACnB;;;GAIA,OAAA3B,EAAA,GAAAC,EAmDM,OAnDNU,GAmDM,CAjDFT,EAwCM,OAxCNU,GAwCM;IAtCFT,EAAgD2B,GAAA;KAAxC,MAAK;KAAiB,OAAM;;IACpC5B,EAES,UAFTW,GAEST,EADFL,EAAAA,GAAE,eAAA,CAAA,GAAA,CAAA;IAETI,EAiCgBmC,GAAA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A,CAAI,GAAA,CAAA,C"}
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./rolldown-runtime-CGnMp29N.js";
2
2
  import { t } from "./PkLazyImg-D_Tmtfz3.js";
3
- import { r as n } from "./PkStreamingMarkdown-BcUq4ThC.js";
3
+ import { r as n } from "./PkStreamingMarkdown-ha0V58V9.js";
4
4
  import { t as r } from "./PkHeldImage-CK1xwkvq.js";
5
5
  import { t as i } from "./PkUrl-IFszepUi.js";
6
6
  import { VvIcon as a } from "@volverjs/ui-vue/components";
@@ -11,7 +11,7 @@ var x = {
11
11
  class: "vv-item-group vv-item-group--framed w-full"
12
12
  }, S = { class: "flex flex-col gap-4 min-w-0 flex-1" }, C = { class: "font-bold text-12 text-word-1 truncate" }, w = {
13
13
  key: 0,
14
- class: "text-10 text-word-4 truncate flex items-center gap-4"
14
+ class: "text-10 text-word-3 truncate flex items-center gap-4"
15
15
  }, T = { class: "flex items-center gap-sm flex-wrap text-12" }, E = {
16
16
  key: 0,
17
17
  class: "font-semibold text-word-1"
@@ -68,4 +68,4 @@ var x = {
68
68
  }), A = /* @__PURE__ */ e({ default: () => j }), j = k;
69
69
  export { A as n, j as t };
70
70
 
71
- //# sourceMappingURL=PkToolShowProductList-BvtmiHBf.js.map
71
+ //# sourceMappingURL=PkToolShowProductList-B-ya1TDt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PkToolShowProductList-BvtmiHBf.js","names":["_openBlock","_createElementBlock","_Fragment","_renderList","_normalizeClass","_createBlock","_resolveDynamicComponent","_withCtx","_unref","PkHeldImage","PkLazyImg","_createElementVNode","_toDisplayString","_createVNode","PkUrl","__exportAll","useChatImageGate","PkHeldImage_default","PkUrl_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","PkToolShowProductList_vue_vue_type_script_setup_true_lang_default","props","__props","toolPart","computed","imageGate","_component_VvIcon","VvIcon","openBlock","createElementBlock","Fragment","renderList","index","normalizeClass","product","createBlock","resolveDynamicComponent","withCtx","unref","PkLazyImg_default","createCommentVNode","createElementVNode","toDisplayString","createVNode","PkToolShowProductList_exports","PkToolShowProductList_default"],"sources":["../../../../packages/components/src/chat/PkToolShowProductList.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import PkLazyImg from '../PkLazyImg.vue'\n import { useChatImageGate } from './chatImagePolicy'\n import PkHeldImage from './PkHeldImage.vue'\n import PkUrl from '../PkUrl.vue'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n products: Array<{\n name: string\n url?: string\n image?: string\n price?: string\n availability?: string\n description?: string\n }>\n }\n }\n return part\n })\n\n // The model writes these urls: one from a host the agent does not list\n // waits for a click (chatImagePolicy.ts).\n const imageGate = useChatImageGate()\n</script>\n\n<template>\n <ul\n v-if=\"toolPart?.input?.products?.length\"\n class=\"vv-item-group vv-item-group--framed w-full\">\n <li\n v-for=\"(product, index) in toolPart.input.products\"\n :key=\"index\"\n class=\"vv-item\"\n :class=\"{ 'vv-item--plain': !product.url }\">\n <!-- A product without a link answers no click: no hover, no hand -->\n <component\n :is=\"product.url ? 'a' : 'div'\"\n :href=\"product.url\"\n :target=\"product.url ? '_blank' : undefined\"\n :rel=\"product.url ? 'noopener noreferrer' : undefined\"\n class=\"vv-item__entry\">\n <!-- Merchant images rot over time: a dead one degrades to an icon\n so the row keeps its thumbnail slot -->\n <PkHeldImage\n v-if=\"product.image && !imageGate.canLoad(product.image)\"\n :host=\"imageGate.hostOf(product.image)\"\n class=\"w-48 h-48 rounded-lg shrink-0 border border-surface-3 bg-surface\"\n @release=\"imageGate.release(product.image)\" />\n <PkLazyImg\n v-else-if=\"product.image\"\n :src=\"product.image\"\n :alt=\"product.name\"\n fallback-icon=\"ri:image-off-line\"\n class=\"w-48 h-48 object-contain rounded-lg shrink-0 border border-surface-3 bg-surface\" />\n <div class=\"flex flex-col gap-4 min-w-0 flex-1\">\n <strong class=\"font-bold text-12 text-word-1 truncate\">\n {{ product.name }}\n </strong>\n <span\n v-if=\"product.url\"\n class=\"text-10 text-word-4 truncate flex items-center gap-4\">\n <VvIcon name=\"ri:link\" class=\"shrink-0 text-12\" />\n <PkUrl :url=\"product.url\" />\n </span>\n <div class=\"flex items-center gap-sm flex-wrap text-12\">\n <span\n v-if=\"product.price\"\n class=\"font-semibold text-word-1\">\n {{ product.price }}\n </span>\n <!-- Free text from the merchant: it was colour-coded by\n substring, which only ever matched English and\n Italian. It reads as the note it is. -->\n <span\n v-if=\"product.availability\"\n class=\"text-10 text-word-3\">\n {{ product.availability }}\n </span>\n </div>\n <p\n v-if=\"product.description\"\n class=\"text-12 text-word-3 line-clamp-2\">\n {{ product.description }}\n </p>\n </div>\n </component>\n </li>\n </ul>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAOI,IAAM4B,IAAQC,GAIRC,IAAWC,QACAH,EAAM,IAatB,GAIKI,IAAYhB,EAAiB;;;GAKzB,OAAAc,EAAA,OAAU,OAAO,UAAU,UADrC9B,EAAA,GAAAC,EA6DK,MA7DLkB,GA6DK,EA1DDnB,EAAA,EAAA,GAAAC,EAyDKC,GAAA,MAAAC,EAxD0B2B,EAAA,MAAS,MAAM,WAAlC,GAAS,OADrB9B,EAAA,GAAAC,EAyDK,MAAA;IAvDA,KAAKsC;IACN,OAAKnC,EAAA,CAAC,WAAS,EAAA,kBAAA,CACcqC,EAAQ,IAAG,CAAA,CAAA;G,KAExCzC,EAAA,GAAAK,EAkDYC,EAjDHmC,EAAQ,MAAG,MAAA,KAAA,GAAA;IACf,MAAMA,EAAQ;IACd,QAAQA,EAAQ,MAAG,WAAc,KAAA;IACjC,KAAKA,EAAQ,MAAG,wBAA2B,KAAA;IAC5C,OAAM;;IAGN,SAAAlC,QAIkD,CAHxCkC,EAAQ,SAAK,CAAKjC,EAAAwB,CAAA,CAAS,CAAC,QAAQS,EAAQ,KAAK,KAD3DzC,EAAA,GAAAK,EAIkDI,GAAA;;KAF7C,MAAMD,EAAAwB,CAAA,CAAS,CAAC,OAAOS,EAAQ,KAAK;KACrC,OAAM;KACL,YAAO,MAAEjC,EAAAwB,CAAA,CAAS,CAAC,QAAQS,EAAQ,KAAK;I,sCAE9BA,EAAQ,SADvBzC,EAAA,GAAAK,EAK8FK,GAAA;;KAHzF,KAAK+B,EAAQ;KACb,KAAKA,EAAQ;KACd,iBAAc;KACd,OAAM;I,0CACV9B,EA8BM,OA9BNS,GA8BM;KA7BFT,EAES,UAFTU,GAEST,EADF6B,EAAQ,IAAI,GAAA,CAAA;KAGTA,EAAQ,OADlBzC,EAAA,GAAAC,EAKO,QALPqB,GAKO,CAFHT,EAAkDoB,GAAA;MAA1C,MAAK;MAAU,OAAM;K,IAC7BpB,EAA4BC,GAAA,EAApB,KAAK2B,EAAQ,I;KAEzB9B,EAcM,OAdNY,GAcM,CAZQkB,EAAQ,SADlBzC,EAAA,GAAAC,EAIO,QAJPuB,GAIOZ,EADA6B,EAAQ,KAAK,GAAA,CAAA,K,WAMVA,EAAQ,gBADlBzC,EAAA,GAAAC,EAIO,QAJPwB,GAIOb,EADA6B,EAAQ,YAAY,GAAA,CAAA,K;KAIrBA,EAAQ,eADlBzC,EAAA,GAAAC,EAII,KAJJyB,GAIId,EADG6B,EAAQ,WAAW,GAAA,CAAA,K"}
1
+ {"version":3,"file":"PkToolShowProductList-B-ya1TDt.js","names":["_openBlock","_createElementBlock","_Fragment","_renderList","_normalizeClass","_createBlock","_resolveDynamicComponent","_withCtx","_unref","PkHeldImage","PkLazyImg","_createElementVNode","_toDisplayString","_createVNode","PkUrl","__exportAll","useChatImageGate","PkHeldImage_default","PkUrl_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","PkToolShowProductList_vue_vue_type_script_setup_true_lang_default","props","__props","toolPart","computed","imageGate","_component_VvIcon","VvIcon","openBlock","createElementBlock","Fragment","renderList","index","normalizeClass","product","createBlock","resolveDynamicComponent","withCtx","unref","PkLazyImg_default","createCommentVNode","createElementVNode","toDisplayString","createVNode","PkToolShowProductList_exports","PkToolShowProductList_default"],"sources":["../../../../packages/components/src/chat/PkToolShowProductList.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import PkLazyImg from '../PkLazyImg.vue'\n import { useChatImageGate } from './chatImagePolicy'\n import PkHeldImage from './PkHeldImage.vue'\n import PkUrl from '../PkUrl.vue'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n products: Array<{\n name: string\n url?: string\n image?: string\n price?: string\n availability?: string\n description?: string\n }>\n }\n }\n return part\n })\n\n // The model writes these urls: one from a host the agent does not list\n // waits for a click (chatImagePolicy.ts).\n const imageGate = useChatImageGate()\n</script>\n\n<template>\n <ul\n v-if=\"toolPart?.input?.products?.length\"\n class=\"vv-item-group vv-item-group--framed w-full\">\n <li\n v-for=\"(product, index) in toolPart.input.products\"\n :key=\"index\"\n class=\"vv-item\"\n :class=\"{ 'vv-item--plain': !product.url }\">\n <!-- A product without a link answers no click: no hover, no hand -->\n <component\n :is=\"product.url ? 'a' : 'div'\"\n :href=\"product.url\"\n :target=\"product.url ? '_blank' : undefined\"\n :rel=\"product.url ? 'noopener noreferrer' : undefined\"\n class=\"vv-item__entry\">\n <!-- Merchant images rot over time: a dead one degrades to an icon\n so the row keeps its thumbnail slot -->\n <PkHeldImage\n v-if=\"product.image && !imageGate.canLoad(product.image)\"\n :host=\"imageGate.hostOf(product.image)\"\n class=\"w-48 h-48 rounded-lg shrink-0 border border-surface-3 bg-surface\"\n @release=\"imageGate.release(product.image)\" />\n <PkLazyImg\n v-else-if=\"product.image\"\n :src=\"product.image\"\n :alt=\"product.name\"\n fallback-icon=\"ri:image-off-line\"\n class=\"w-48 h-48 object-contain rounded-lg shrink-0 border border-surface-3 bg-surface\" />\n <div class=\"flex flex-col gap-4 min-w-0 flex-1\">\n <strong class=\"font-bold text-12 text-word-1 truncate\">\n {{ product.name }}\n </strong>\n <span\n v-if=\"product.url\"\n class=\"text-10 text-word-3 truncate flex items-center gap-4\">\n <VvIcon name=\"ri:link\" class=\"shrink-0 text-12\" />\n <PkUrl :url=\"product.url\" />\n </span>\n <div class=\"flex items-center gap-sm flex-wrap text-12\">\n <span\n v-if=\"product.price\"\n class=\"font-semibold text-word-1\">\n {{ product.price }}\n </span>\n <!-- Free text from the merchant: it was colour-coded by\n substring, which only ever matched English and\n Italian. It reads as the note it is. -->\n <span\n v-if=\"product.availability\"\n class=\"text-10 text-word-3\">\n {{ product.availability }}\n </span>\n </div>\n <p\n v-if=\"product.description\"\n class=\"text-12 text-word-3 line-clamp-2\">\n {{ product.description }}\n </p>\n </div>\n </component>\n </li>\n </ul>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAOI,IAAM4B,IAAQC,GAIRC,IAAWC,QACAH,EAAM,IAatB,GAIKI,IAAYhB,EAAiB;;;GAKzB,OAAAc,EAAA,OAAU,OAAO,UAAU,UADrC9B,EAAA,GAAAC,EA6DK,MA7DLkB,GA6DK,EA1DDnB,EAAA,EAAA,GAAAC,EAyDKC,GAAA,MAAAC,EAxD0B2B,EAAA,MAAS,MAAM,WAAlC,GAAS,OADrB9B,EAAA,GAAAC,EAyDK,MAAA;IAvDA,KAAKsC;IACN,OAAKnC,EAAA,CAAC,WAAS,EAAA,kBAAA,CACcqC,EAAQ,IAAG,CAAA,CAAA;G,KAExCzC,EAAA,GAAAK,EAkDYC,EAjDHmC,EAAQ,MAAG,MAAA,KAAA,GAAA;IACf,MAAMA,EAAQ;IACd,QAAQA,EAAQ,MAAG,WAAc,KAAA;IACjC,KAAKA,EAAQ,MAAG,wBAA2B,KAAA;IAC5C,OAAM;;IAGN,SAAAlC,QAIkD,CAHxCkC,EAAQ,SAAK,CAAKjC,EAAAwB,CAAA,CAAS,CAAC,QAAQS,EAAQ,KAAK,KAD3DzC,EAAA,GAAAK,EAIkDI,GAAA;;KAF7C,MAAMD,EAAAwB,CAAA,CAAS,CAAC,OAAOS,EAAQ,KAAK;KACrC,OAAM;KACL,YAAO,MAAEjC,EAAAwB,CAAA,CAAS,CAAC,QAAQS,EAAQ,KAAK;I,sCAE9BA,EAAQ,SADvBzC,EAAA,GAAAK,EAK8FK,GAAA;;KAHzF,KAAK+B,EAAQ;KACb,KAAKA,EAAQ;KACd,iBAAc;KACd,OAAM;I,0CACV9B,EA8BM,OA9BNS,GA8BM;KA7BFT,EAES,UAFTU,GAEST,EADF6B,EAAQ,IAAI,GAAA,CAAA;KAGTA,EAAQ,OADlBzC,EAAA,GAAAC,EAKO,QALPqB,GAKO,CAFHT,EAAkDoB,GAAA;MAA1C,MAAK;MAAU,OAAM;K,IAC7BpB,EAA4BC,GAAA,EAApB,KAAK2B,EAAQ,I;KAEzB9B,EAcM,OAdNY,GAcM,CAZQkB,EAAQ,SADlBzC,EAAA,GAAAC,EAIO,QAJPuB,GAIOZ,EADA6B,EAAQ,KAAK,GAAA,CAAA,K,WAMVA,EAAQ,gBADlBzC,EAAA,GAAAC,EAIO,QAJPwB,GAIOb,EADA6B,EAAQ,YAAY,GAAA,CAAA,K;KAIrBA,EAAQ,eADlBzC,EAAA,GAAAC,EAII,KAJJyB,GAIId,EADG6B,EAAQ,WAAW,GAAA,CAAA,K"}
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./rolldown-runtime-CGnMp29N.js";
2
2
  import { t } from "./VvButtonLocalized-C-vx25u4.js";
3
- import { t as n } from "./PkStreamingMarkdown-BcUq4ThC.js";
3
+ import { t as n } from "./PkStreamingMarkdown-ha0V58V9.js";
4
4
  import "./src-nb8MU1sh.js";
5
5
  import { i as r } from "./Document-B3w5H0R0.js";
6
6
  import { t as i } from "./markdown-BiG_7-9D.js";
@@ -10,7 +10,7 @@ import { Fragment as s, Transition as c, computed as l, createBlock as u, create
10
10
  // ../../packages/components/src/chat/PkChunkPreview.vue?vue&type=script&setup=true&lang.ts
11
11
  var T = ["title"], E = {
12
12
  key: 0,
13
- class: "text-10 text-word-4 shrink-0"
13
+ class: "text-10 text-word-3 shrink-0"
14
14
  }, D = /* @__PURE__ */ g({
15
15
  __name: "PkChunkPreview",
16
16
  props: {
@@ -46,10 +46,10 @@ var T = ["title"], E = {
46
46
  }
47
47
  }), O = { class: "flex flex-col gap-2 min-w-0 flex-1" }, k = { class: "font-bold text-12 text-word-1 truncate block" }, A = {
48
48
  key: 0,
49
- class: "text-10 text-word-4 truncate"
49
+ class: "text-10 text-word-3 truncate"
50
50
  }, j = {
51
51
  key: 1,
52
- class: "text-10 text-word-4 truncate flex items-center gap-4"
52
+ class: "text-10 text-word-3 truncate flex items-center gap-4"
53
53
  }, M = /* @__PURE__ */ g({
54
54
  __name: "PkDocumentHeader",
55
55
  props: {
@@ -81,10 +81,10 @@ var T = ["title"], E = {
81
81
  }), N = {
82
82
  key: 0,
83
83
  class: "flex flex-col gap-xs w-full"
84
- }, P = { class: "flex items-center gap-4 text-12 text-word-3 font-semibold" }, F = { class: "text-word-4 font-normal" }, I = { class: "flex flex-col gap-xs" }, L = { class: "flex items-center hover:bg-surface-1 transition-colors" }, R = ["aria-expanded", "onClick"], z = { class: "flex items-center gap-4 shrink-0" }, B = {
84
+ }, P = { class: "flex items-center gap-4 text-12 text-word-3 font-semibold" }, F = { class: "text-word-3 font-normal" }, I = { class: "flex flex-col gap-xs" }, L = { class: "flex items-center hover:bg-surface-1 transition-colors" }, R = ["aria-expanded", "onClick"], z = { class: "flex items-center gap-4 shrink-0" }, B = {
85
85
  key: 0,
86
- class: "text-10 text-word-4 bg-surface-2 rounded px-4 py-2"
87
- }, V = { class: "text-10 text-word-4 bg-surface-2 rounded px-4 py-2 uppercase" }, H = {
86
+ class: "text-10 text-word-3 bg-surface-2 rounded px-4 py-2"
87
+ }, V = { class: "text-10 text-word-3 bg-surface-2 rounded px-4 py-2 uppercase" }, H = {
88
88
  key: 0,
89
89
  class: "border-t border-surface-3"
90
90
  }, U = ["onClick"], W = {
@@ -260,4 +260,4 @@ var T = ["title"], E = {
260
260
  }), Q = /* @__PURE__ */ e({ default: () => $ }), $ = Z;
261
261
  export { D as i, Q as n, M as r, $ as t };
262
262
 
263
- //# sourceMappingURL=PkToolShowSources-uKO4MQgd.js.map
263
+ //# sourceMappingURL=PkToolShowSources-DYkHkVdX.js.map