@8wave/ai-elements 0.115.0-beta.60 → 0.115.0-beta.72

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 (193) hide show
  1. package/dist/_chunks/{Agent-Bz23Ejuh.js → Agent-B5gICwnq.js} +2 -5
  2. package/dist/_chunks/Agent-B5gICwnq.js.map +1 -0
  3. package/dist/_chunks/{PkChatbotFilePreview-CyaNjBrA.js → PkChatbotFilePreview-Dc9NJ0WF.js} +2 -2
  4. package/dist/_chunks/{PkChatbotFilePreview-CyaNjBrA.js.map → PkChatbotFilePreview-Dc9NJ0WF.js.map} +1 -1
  5. package/dist/_chunks/{PkHeldImage-CtqqMvpW.js → PkHeldImage-B4gZSfa6.js} +2 -2
  6. package/dist/_chunks/{PkHeldImage-CtqqMvpW.js.map → PkHeldImage-B4gZSfa6.js.map} +1 -1
  7. package/dist/_chunks/{PkLazyImg-Ci06XyhW.js → PkLazyImg-DT3U67q-.js} +3 -2
  8. package/dist/_chunks/PkLazyImg-DT3U67q-.js.map +1 -0
  9. package/dist/_chunks/{PkStreamingMarkdown-DbSttKVa.js → PkStreamingMarkdown-LBiDnEgV.js} +3 -3
  10. package/dist/_chunks/{PkStreamingMarkdown-DbSttKVa.js.map → PkStreamingMarkdown-LBiDnEgV.js.map} +1 -1
  11. package/dist/_chunks/{PkToolEditSpreadsheet-BrYSJlT4.js → PkToolEditSpreadsheet-YoiuyH9p.js} +3 -3
  12. package/dist/_chunks/{PkToolEditSpreadsheet-BrYSJlT4.js.map → PkToolEditSpreadsheet-YoiuyH9p.js.map} +1 -1
  13. package/dist/_chunks/{PkToolRequestGeolocation-D4rIR3LN.js → PkToolRequestGeolocation-m-IXD3Dg.js} +7 -4
  14. package/dist/_chunks/PkToolRequestGeolocation-m-IXD3Dg.js.map +1 -0
  15. package/dist/_chunks/{PkToolRequestOAuthConnection-epwcNb5F.js → PkToolRequestOAuthConnection-BLEQZ51Y.js} +3 -3
  16. package/dist/_chunks/{PkToolRequestOAuthConnection-epwcNb5F.js.map → PkToolRequestOAuthConnection-BLEQZ51Y.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowArtifact-BGUn1sMi.js → PkToolShowArtifact-KbxEd7Tv.js} +3 -3
  18. package/dist/_chunks/{PkToolShowArtifact-BGUn1sMi.js.map → PkToolShowArtifact-KbxEd7Tv.js.map} +1 -1
  19. package/dist/_chunks/{PkToolShowCalendarEvent-DwxqgAUr.js → PkToolShowCalendarEvent-DcaMadO7.js} +3 -3
  20. package/dist/_chunks/PkToolShowCalendarEvent-DcaMadO7.js.map +1 -0
  21. package/dist/_chunks/{PkToolShowComparison-hDhhVvwp.js → PkToolShowComparison-DcXSOyMw.js} +2 -2
  22. package/dist/_chunks/{PkToolShowComparison-hDhhVvwp.js.map → PkToolShowComparison-DcXSOyMw.js.map} +1 -1
  23. package/dist/_chunks/{PkToolShowContactForm-ChaAOt5I.js → PkToolShowContactForm-BjlnuEVy.js} +4 -4
  24. package/dist/_chunks/{PkToolShowContactForm-ChaAOt5I.js.map → PkToolShowContactForm-BjlnuEVy.js.map} +1 -1
  25. package/dist/_chunks/{PkToolShowDiagram-CyNPq6j7.js → PkToolShowDiagram-BgyU0CGk.js} +2 -2
  26. package/dist/_chunks/{PkToolShowDiagram-CyNPq6j7.js.map → PkToolShowDiagram-BgyU0CGk.js.map} +1 -1
  27. package/dist/_chunks/{PkToolShowEmail-BM16pMjW.js → PkToolShowEmail-AWhVo3l3.js} +2 -2
  28. package/dist/_chunks/{PkToolShowEmail-BM16pMjW.js.map → PkToolShowEmail-AWhVo3l3.js.map} +1 -1
  29. package/dist/_chunks/{PkToolShowForm-BpTuRgHg.js → PkToolShowForm-CaYPCOeb.js} +110 -100
  30. package/dist/_chunks/PkToolShowForm-CaYPCOeb.js.map +1 -0
  31. package/dist/_chunks/{PkToolShowImageGallery-CgjP34RE.js → PkToolShowImageGallery-CTuPFowW.js} +4 -4
  32. package/dist/_chunks/{PkToolShowImageGallery-CgjP34RE.js.map → PkToolShowImageGallery-CTuPFowW.js.map} +1 -1
  33. package/dist/_chunks/{PkToolShowLocation-rK5fcW4y.js → PkToolShowLocation-Bf4jmDYQ.js} +2 -2
  34. package/dist/_chunks/{PkToolShowLocation-rK5fcW4y.js.map → PkToolShowLocation-Bf4jmDYQ.js.map} +1 -1
  35. package/dist/_chunks/{PkToolShowMessage-DgT-JkYg.js → PkToolShowMessage-DlckklB3.js} +2 -2
  36. package/dist/_chunks/{PkToolShowMessage-DgT-JkYg.js.map → PkToolShowMessage-DlckklB3.js.map} +1 -1
  37. package/dist/_chunks/{PkToolShowProductList-BIeg8NR-.js → PkToolShowProductList-CThKOr9K.js} +5 -5
  38. package/dist/_chunks/{PkToolShowProductList-BIeg8NR-.js.map → PkToolShowProductList-CThKOr9K.js.map} +1 -1
  39. package/dist/_chunks/{PkToolShowQrCode-C2hZDGqM.js → PkToolShowQrCode-CFueYo4P.js} +2 -2
  40. package/dist/_chunks/{PkToolShowQrCode-C2hZDGqM.js.map → PkToolShowQrCode-CFueYo4P.js.map} +1 -1
  41. package/dist/_chunks/{PkToolShowSources-B9nZyCAn.js → PkToolShowSources-DW4LZzdI.js} +49 -28
  42. package/dist/_chunks/PkToolShowSources-DW4LZzdI.js.map +1 -0
  43. package/dist/_chunks/{PkToolShowSuggestedReply-D6g3UYqI.js → PkToolShowSuggestedReply-C81p7lmP.js} +3 -3
  44. package/dist/_chunks/{PkToolShowSuggestedReply-D6g3UYqI.js.map → PkToolShowSuggestedReply-C81p7lmP.js.map} +1 -1
  45. package/dist/_chunks/{PkToolShowVideo-B6GG8PJm.js → PkToolShowVideo-BBdH255K.js} +4 -4
  46. package/dist/_chunks/{PkToolShowVideo-B6GG8PJm.js.map → PkToolShowVideo-BBdH255K.js.map} +1 -1
  47. package/dist/_chunks/{PkToolShowWeather-C80WsCYi.js → PkToolShowWeather-BVllZARr.js} +2 -2
  48. package/dist/_chunks/{PkToolShowWeather-C80WsCYi.js.map → PkToolShowWeather-BVllZARr.js.map} +1 -1
  49. package/dist/_chunks/{PkToolShowWebPages-BkUh-IyZ.js → PkToolShowWebPages-Bbc8WuLf.js} +5 -5
  50. package/dist/_chunks/{PkToolShowWebPages-BkUh-IyZ.js.map → PkToolShowWebPages-Bbc8WuLf.js.map} +1 -1
  51. package/dist/_chunks/{VvCheckbox.es-UTRUhwdC.js → VvCheckbox.es-DKT8ys4U.js} +2 -2
  52. package/dist/_chunks/{VvCheckbox.es-UTRUhwdC.js.map → VvCheckbox.es-DKT8ys4U.js.map} +1 -1
  53. package/dist/_chunks/{VvCheckboxGroup.es-Cj7KLXHq.js → VvCheckboxGroup.es-BR2Zrit_.js} +2 -2
  54. package/dist/_chunks/{VvCheckboxGroup.es-Cj7KLXHq.js.map → VvCheckboxGroup.es-BR2Zrit_.js.map} +1 -1
  55. package/dist/_chunks/{VvCombobox.es-DptfdnAe.js → VvCombobox.es-DWJtN8ha.js} +2 -2
  56. package/dist/_chunks/{VvCombobox.es-DptfdnAe.js.map → VvCombobox.es-DWJtN8ha.js.map} +1 -1
  57. package/dist/_chunks/{VvInputText.es-DqLQDq9I.js → VvInputText.es-BH6ohnZF.js} +2 -2
  58. package/dist/_chunks/{VvInputText.es-DqLQDq9I.js.map → VvInputText.es-BH6ohnZF.js.map} +1 -1
  59. package/dist/_chunks/{VvRadio.es-D7Ws1in6.js → VvRadio.es-L9HmgYh4.js} +2 -2
  60. package/dist/_chunks/{VvRadio.es-D7Ws1in6.js.map → VvRadio.es-L9HmgYh4.js.map} +1 -1
  61. package/dist/_chunks/{VvRadioGroup.es-BDgpsR9Z.js → VvRadioGroup.es-Dyip2x3c.js} +2 -2
  62. package/dist/_chunks/{VvRadioGroup.es-BDgpsR9Z.js.map → VvRadioGroup.es-Dyip2x3c.js.map} +1 -1
  63. package/dist/_chunks/{VvSelect.es-DWbNpZKw.js → VvSelect.es-B8GZOw4X.js} +2 -2
  64. package/dist/_chunks/{VvSelect.es-DWbNpZKw.js.map → VvSelect.es-B8GZOw4X.js.map} +1 -1
  65. package/dist/_chunks/{VvTextarea.es-5UD9_C3G.js → VvTextarea.es-7E1SuavW.js} +2 -2
  66. package/dist/_chunks/{VvTextarea.es-5UD9_C3G.js.map → VvTextarea.es-7E1SuavW.js.map} +1 -1
  67. package/dist/_chunks/{chatImagePolicy-Cnmsgd96.js → chatImagePolicy-LzNQAjTs.js} +2 -2
  68. package/dist/_chunks/{chatImagePolicy-Cnmsgd96.js.map → chatImagePolicy-LzNQAjTs.js.map} +1 -1
  69. package/dist/_chunks/{index.es-D9VqgSyV.js → index.es-DJbHM2zZ.js} +10 -10
  70. package/dist/_chunks/{index.es-D9VqgSyV.js.map → index.es-DJbHM2zZ.js.map} +1 -1
  71. package/dist/_chunks/{index.es-B9zAw2XU.js → index.es-D_E1Gj_U.js} +2 -2
  72. package/dist/_chunks/{index.es-B9zAw2XU.js.map → index.es-D_E1Gj_U.js.map} +1 -1
  73. package/dist/_chunks/{markdown-25UY48qE.js → markdown-CQLsnBKV.js} +2 -2
  74. package/dist/_chunks/{markdown-25UY48qE.js.map → markdown-CQLsnBKV.js.map} +1 -1
  75. package/dist/ai-elements.es.js +293 -221
  76. package/dist/ai-elements.es.js.map +1 -1
  77. package/dist-vue/PkChatbot.js +1 -1
  78. package/dist-vue/PkChatbotAuth.js +1 -1
  79. package/dist-vue/PkChatbotEmptyState.js +1 -1
  80. package/dist-vue/PkChatbotFeedbackForm.js +1 -1
  81. package/dist-vue/PkChatbotInput.js +1 -1
  82. package/dist-vue/PkChatbotMessages.js +1 -1
  83. package/dist-vue/PkChatbotStepPayload.js +1 -1
  84. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  85. package/dist-vue/PkChatbotSteps.js +1 -1
  86. package/dist-vue/PkChatbotViewChat.js +1 -1
  87. package/dist-vue/PkChatbotViewConversations.js +1 -1
  88. package/dist-vue/PkChatbotViewFiles.js +1 -1
  89. package/dist-vue/PkChatbotViewProfile.js +1 -1
  90. package/dist-vue/_chunks/{Agent-Ci7XnQ12.js → Agent-iJ7nRWUV.js} +3 -7
  91. package/dist-vue/_chunks/Agent-iJ7nRWUV.js.map +1 -0
  92. package/dist-vue/_chunks/{Document-Bhlc3wdt.js → Document-BFyHxMgI.js} +2 -2
  93. package/dist-vue/_chunks/{Document-Bhlc3wdt.js.map → Document-BFyHxMgI.js.map} +1 -1
  94. package/dist-vue/_chunks/{PkAvatar-paEJByEA.js → PkAvatar-ZgCsoO-p.js} +2 -2
  95. package/dist-vue/_chunks/PkAvatar-ZgCsoO-p.js.map +1 -0
  96. package/dist-vue/_chunks/{PkChatbot-C05Rv5zO.js → PkChatbot-Ct2nH8y4.js} +9 -9
  97. package/dist-vue/_chunks/{PkChatbot-C05Rv5zO.js.map → PkChatbot-Ct2nH8y4.js.map} +1 -1
  98. package/dist-vue/_chunks/{PkChatbotAuth-DD5RF7kY.js → PkChatbotAuth-CwsXLIku.js} +4 -4
  99. package/dist-vue/_chunks/PkChatbotAuth-CwsXLIku.js.map +1 -0
  100. package/dist-vue/_chunks/{PkChatbotEmptyState-B5qeL1kv.js → PkChatbotEmptyState-CQCBF59f.js} +3 -3
  101. package/dist-vue/_chunks/{PkChatbotEmptyState-B5qeL1kv.js.map → PkChatbotEmptyState-CQCBF59f.js.map} +1 -1
  102. package/dist-vue/_chunks/{PkChatbotFeedbackForm-BJ_Omuq2.js → PkChatbotFeedbackForm-CYiwvSs_.js} +2 -2
  103. package/dist-vue/_chunks/{PkChatbotFeedbackForm-BJ_Omuq2.js.map → PkChatbotFeedbackForm-CYiwvSs_.js.map} +1 -1
  104. package/dist-vue/_chunks/{PkChatbotInput-BLzTQmvy.js → PkChatbotInput-D7IIfTw1.js} +2 -2
  105. package/dist-vue/_chunks/{PkChatbotInput-BLzTQmvy.js.map → PkChatbotInput-D7IIfTw1.js.map} +1 -1
  106. package/dist-vue/_chunks/{PkChatbotMessages-CxTz0W0d.js → PkChatbotMessages-DJPqKh-G.js} +19 -19
  107. package/dist-vue/_chunks/{PkChatbotMessages-CxTz0W0d.js.map → PkChatbotMessages-DJPqKh-G.js.map} +1 -1
  108. package/dist-vue/_chunks/{PkChatbotStepPayload-B04aqOGu.js → PkChatbotStepPayload-dl2-8f27.js} +2 -2
  109. package/dist-vue/_chunks/{PkChatbotStepPayload-B04aqOGu.js.map → PkChatbotStepPayload-dl2-8f27.js.map} +1 -1
  110. package/dist-vue/_chunks/{PkChatbotStepToolDetail-yII_Dk3p.js → PkChatbotStepToolDetail-f8zOnu2W.js} +3 -3
  111. package/dist-vue/_chunks/{PkChatbotStepToolDetail-yII_Dk3p.js.map → PkChatbotStepToolDetail-f8zOnu2W.js.map} +1 -1
  112. package/dist-vue/_chunks/{PkChatbotSteps-DYiCeWOd.js → PkChatbotSteps-CeuoK2Gk.js} +5 -5
  113. package/dist-vue/_chunks/{PkChatbotSteps-DYiCeWOd.js.map → PkChatbotSteps-CeuoK2Gk.js.map} +1 -1
  114. package/dist-vue/_chunks/{PkChatbotViewChat-s-Vx4U1E.js → PkChatbotViewChat-X9L9a53H.js} +8 -8
  115. package/dist-vue/_chunks/{PkChatbotViewChat-s-Vx4U1E.js.map → PkChatbotViewChat-X9L9a53H.js.map} +1 -1
  116. package/dist-vue/_chunks/{PkChatbotViewConversations-D7XHDBGS.js → PkChatbotViewConversations-NNzeW5c6.js} +4 -2
  117. package/dist-vue/_chunks/PkChatbotViewConversations-NNzeW5c6.js.map +1 -0
  118. package/dist-vue/_chunks/{PkChatbotViewFiles-t07w-VNZ.js → PkChatbotViewFiles-nn23dc0W.js} +3 -3
  119. package/dist-vue/_chunks/{PkChatbotViewFiles-t07w-VNZ.js.map → PkChatbotViewFiles-nn23dc0W.js.map} +1 -1
  120. package/dist-vue/_chunks/{PkChatbotViewProfile-DJT5AEkZ.js → PkChatbotViewProfile-CzY3lj4N.js} +3 -3
  121. package/dist-vue/_chunks/{PkChatbotViewProfile-DJT5AEkZ.js.map → PkChatbotViewProfile-CzY3lj4N.js.map} +1 -1
  122. package/dist-vue/_chunks/{PkLazyImg-CDxX9xnq.js → PkLazyImg-X5BMNU_R.js} +2 -1
  123. package/dist-vue/_chunks/PkLazyImg-X5BMNU_R.js.map +1 -0
  124. package/dist-vue/_chunks/{PkStreamingMarkdown-ALhm02o3.js → PkStreamingMarkdown-CCu2pX2c.js} +3 -3
  125. package/dist-vue/_chunks/{PkStreamingMarkdown-ALhm02o3.js.map → PkStreamingMarkdown-CCu2pX2c.js.map} +1 -1
  126. package/dist-vue/_chunks/{PkToolEditSpreadsheet-DU3RBd6q.js → PkToolEditSpreadsheet-DYcRLINr.js} +2 -2
  127. package/dist-vue/_chunks/{PkToolEditSpreadsheet-DU3RBd6q.js.map → PkToolEditSpreadsheet-DYcRLINr.js.map} +1 -1
  128. package/dist-vue/_chunks/{PkToolRequestGeolocation-CE4zQofM.js → PkToolRequestGeolocation-DLU21rbD.js} +6 -3
  129. package/dist-vue/_chunks/PkToolRequestGeolocation-DLU21rbD.js.map +1 -0
  130. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-CAk5s541.js → PkToolRequestOAuthConnection-BS9Wtn1m.js} +2 -2
  131. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-CAk5s541.js.map → PkToolRequestOAuthConnection-BS9Wtn1m.js.map} +1 -1
  132. package/dist-vue/_chunks/{PkToolShowArtifact-CA1sKasD.js → PkToolShowArtifact-B3b6LYSx.js} +2 -2
  133. package/dist-vue/_chunks/{PkToolShowArtifact-CA1sKasD.js.map → PkToolShowArtifact-B3b6LYSx.js.map} +1 -1
  134. package/dist-vue/_chunks/{PkToolShowCalendarEvent-Cb3lmDQZ.js → PkToolShowCalendarEvent-CL5valn9.js} +2 -2
  135. package/dist-vue/_chunks/PkToolShowCalendarEvent-CL5valn9.js.map +1 -0
  136. package/dist-vue/_chunks/{PkToolShowContactForm-C0QHEj5k.js → PkToolShowContactForm-C7LaYE_c.js} +3 -3
  137. package/dist-vue/_chunks/{PkToolShowContactForm-C0QHEj5k.js.map → PkToolShowContactForm-C7LaYE_c.js.map} +1 -1
  138. package/dist-vue/_chunks/{PkToolShowDiagram-CQUd_reA.js → PkToolShowDiagram-CR-TthJm.js} +2 -2
  139. package/dist-vue/_chunks/{PkToolShowDiagram-CQUd_reA.js.map → PkToolShowDiagram-CR-TthJm.js.map} +1 -1
  140. package/dist-vue/_chunks/{PkToolShowForm-B_ezmfuo.js → PkToolShowForm-BDaYT4E0.js} +100 -90
  141. package/dist-vue/_chunks/PkToolShowForm-BDaYT4E0.js.map +1 -0
  142. package/dist-vue/_chunks/{PkToolShowImageGallery-B8gmmHvk.js → PkToolShowImageGallery-ER7LyVJD.js} +2 -2
  143. package/dist-vue/_chunks/{PkToolShowImageGallery-B8gmmHvk.js.map → PkToolShowImageGallery-ER7LyVJD.js.map} +1 -1
  144. package/dist-vue/_chunks/{PkToolShowProductList-BMvt5mKe.js → PkToolShowProductList-B3iZIwOJ.js} +3 -3
  145. package/dist-vue/_chunks/{PkToolShowProductList-BMvt5mKe.js.map → PkToolShowProductList-B3iZIwOJ.js.map} +1 -1
  146. package/dist-vue/_chunks/PkToolShowSources-ITHEa-D-.js +263 -0
  147. package/dist-vue/_chunks/PkToolShowSources-ITHEa-D-.js.map +1 -0
  148. package/dist-vue/_chunks/{PkToolShowSuggestedReply-BE6gBA-2.js → PkToolShowSuggestedReply-CZm_THD0.js} +2 -2
  149. package/dist-vue/_chunks/{PkToolShowSuggestedReply-BE6gBA-2.js.map → PkToolShowSuggestedReply-CZm_THD0.js.map} +1 -1
  150. package/dist-vue/_chunks/{PkToolShowVideo-ZPDVzjPX.js → PkToolShowVideo-Pe0DhYm5.js} +2 -2
  151. package/dist-vue/_chunks/{PkToolShowVideo-ZPDVzjPX.js.map → PkToolShowVideo-Pe0DhYm5.js.map} +1 -1
  152. package/dist-vue/_chunks/{PkToolShowWebPages-dI4WMr7F.js → PkToolShowWebPages-ZfGH4XNP.js} +3 -3
  153. package/dist-vue/_chunks/{PkToolShowWebPages-dI4WMr7F.js.map → PkToolShowWebPages-ZfGH4XNP.js.map} +1 -1
  154. package/dist-vue/_chunks/{createChatbotApiClient-IlTQndxL.js → createChatbotApiClient-BVC9GxV_.js} +2 -2
  155. package/dist-vue/_chunks/createChatbotApiClient-BVC9GxV_.js.map +1 -0
  156. package/dist-vue/_chunks/{index.es-VzNLOQUv.js → index.es-Io4Mdm4X.js} +2 -2
  157. package/dist-vue/_chunks/{index.es-VzNLOQUv.js.map → index.es-Io4Mdm4X.js.map} +1 -1
  158. package/dist-vue/_chunks/{useChatbotStore-CtJ3bwuy.js → useChatbotStore-Drg3gBff.js} +3 -3
  159. package/dist-vue/_chunks/{useChatbotStore-CtJ3bwuy.js.map → useChatbotStore-Drg3gBff.js.map} +1 -1
  160. package/dist-vue/_chunks/{utils-BzypADaU.js → utils-wUVFCJMG.js} +2 -2
  161. package/dist-vue/_chunks/{utils-BzypADaU.js.map → utils-wUVFCJMG.js.map} +1 -1
  162. package/dist-vue/api.js +1 -1
  163. package/dist-vue/composables.js +261 -191
  164. package/dist-vue/composables.js.map +1 -1
  165. package/dist-vue/index.js +249 -201
  166. package/dist-vue/index.js.map +1 -1
  167. package/dist-vue/locales.js +171 -169
  168. package/dist-vue/packages/ability/src/types.d.ts +0 -1
  169. package/dist-vue/packages/components/src/chat/PkDocumentHeader.d.ts +5 -0
  170. package/dist-vue/packages/components/src/chat/PkMessageDetail.d.ts +2 -2
  171. package/dist-vue/packages/components/src/table/PkTableSortable.d.ts +4 -0
  172. package/dist-vue/packages/composable/src/useBranding.d.ts +0 -1
  173. package/dist-vue/packages/models/src/schema/Branding.d.ts +21 -9
  174. package/dist-vue/packages/models/src/schema/TimingLog.d.ts +4 -6
  175. package/dist-vue/style.css +1 -1
  176. package/package.json +1 -1
  177. package/dist/_chunks/Agent-Bz23Ejuh.js.map +0 -1
  178. package/dist/_chunks/PkLazyImg-Ci06XyhW.js.map +0 -1
  179. package/dist/_chunks/PkToolRequestGeolocation-D4rIR3LN.js.map +0 -1
  180. package/dist/_chunks/PkToolShowCalendarEvent-DwxqgAUr.js.map +0 -1
  181. package/dist/_chunks/PkToolShowForm-BpTuRgHg.js.map +0 -1
  182. package/dist/_chunks/PkToolShowSources-B9nZyCAn.js.map +0 -1
  183. package/dist-vue/_chunks/Agent-Ci7XnQ12.js.map +0 -1
  184. package/dist-vue/_chunks/PkAvatar-paEJByEA.js.map +0 -1
  185. package/dist-vue/_chunks/PkChatbotAuth-DD5RF7kY.js.map +0 -1
  186. package/dist-vue/_chunks/PkChatbotViewConversations-D7XHDBGS.js.map +0 -1
  187. package/dist-vue/_chunks/PkLazyImg-CDxX9xnq.js.map +0 -1
  188. package/dist-vue/_chunks/PkToolRequestGeolocation-CE4zQofM.js.map +0 -1
  189. package/dist-vue/_chunks/PkToolShowCalendarEvent-Cb3lmDQZ.js.map +0 -1
  190. package/dist-vue/_chunks/PkToolShowForm-B_ezmfuo.js.map +0 -1
  191. package/dist-vue/_chunks/PkToolShowSources-DEmjN0Ou.js +0 -242
  192. package/dist-vue/_chunks/PkToolShowSources-DEmjN0Ou.js.map +0 -1
  193. package/dist-vue/_chunks/createChatbotApiClient-IlTQndxL.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"PkToolShowEmail-BM16pMjW.js","names":["$t","__unplugin_components_0","__unplugin_components_1","__unplugin_components_2","__unplugin_components_3","__unplugin_components_4","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_toDisplayString","_withCtx","_unref","_normalizeProps","_guardReactiveProps","_createTextVNode","_sfc_main","withCtx","defineComponent","normalizeProps","openBlock","init_runtime_core_esm_bundler","guardReactiveProps","toDisplayString","createTextVNode","unref","createBaseVNode","init_reactivity_esm_bundler","computed","createElementBlock","createVNode","init_shared_esm_bundler","useClipboard","Qi","ru","Ca","Ae","ra","useShortUrlResolver","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","PkToolShowEmail_default","props","__props","toolPart","subject","resolveText","body","openInMailApp","mailtoLink","openInOutlook","url","openInGmail","openInYahooMail","_component_VvIcon","_component_VvButton","_component_VvDropdownAction","_component_VvDropdown","_component_VvButtonGroup","_ctx","copied","_cache","copy"],"sources":["../../../../packages/components/src/chat/PkToolShowEmail.vue","../../../../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","<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,IAAMiD,IAAQC,GAIR,EAAE,SAAM,cAAWlB,EAAa,GAEhCmB,IAAWvB,QACAqB,EAAM,IAOtB,GAIK,EAAE,mBAAgBX,EAAoB,GACtCc,IAAUC,QAAkBF,EAAS,MAAM,OAAO,OAAO,GACzDG,IAAOD,QAAkBF,EAAS,MAAM,OAAO,IAAI,GAEnDI,UAAsB;GACxB,IAAI,CAACJ,EAAS,MAAM,OAChB;GAEJ,IAAMK,IAAa,mBAAmB,mBAClCJ,EAAQ,KACZ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,GAEMpC,EADCV,EAAAA,GAAE,YAAA,CAAA,GAAA,CAAA,GAETQ,EAEQ,OAFRuC,GAEQrC,EADJE,EAAA0C,CAAA,CAAI,GAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"PkToolShowEmail-AWhVo3l3.js","names":["$t","__unplugin_components_0","__unplugin_components_1","__unplugin_components_2","__unplugin_components_3","__unplugin_components_4","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_toDisplayString","_withCtx","_unref","_normalizeProps","_guardReactiveProps","_createTextVNode","_sfc_main","withCtx","defineComponent","normalizeProps","openBlock","init_runtime_core_esm_bundler","guardReactiveProps","toDisplayString","createTextVNode","unref","createBaseVNode","init_reactivity_esm_bundler","computed","createElementBlock","createVNode","init_shared_esm_bundler","useClipboard","Qi","ru","Ca","Ae","ra","useShortUrlResolver","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","PkToolShowEmail_default","props","__props","toolPart","subject","resolveText","body","openInMailApp","mailtoLink","openInOutlook","url","openInGmail","openInYahooMail","_component_VvIcon","_component_VvButton","_component_VvDropdownAction","_component_VvDropdown","_component_VvButtonGroup","_ctx","copied","_cache","copy"],"sources":["../../../../packages/components/src/chat/PkToolShowEmail.vue","../../../../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","<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,IAAMiD,IAAQC,GAIR,EAAE,SAAM,cAAWlB,EAAa,GAEhCmB,IAAWvB,QACAqB,EAAM,IAOtB,GAIK,EAAE,mBAAgBX,EAAoB,GACtCc,IAAUC,QAAkBF,EAAS,MAAM,OAAO,OAAO,GACzDG,IAAOD,QAAkBF,EAAS,MAAM,OAAO,IAAI,GAEnDI,UAAsB;GACxB,IAAI,CAACJ,EAAS,MAAM,OAChB;GAEJ,IAAMK,IAAa,mBAAmB,mBAClCJ,EAAQ,KACZ,EAAE,QAAQ,mBAAmBE,EAAK,KAAK;GACvC,OAAO,KAAKE,CAAU;EAC1B,GAEMC,UAAsB;GACxB,IAAI,CAACN,EAAS,MAAM,OAChB;GAEJ,IAAMO,IAAM,gEAAgE,mBACxEN,EAAQ,KACZ,EAAE,QAAQ,mBAAmBE,EAAK,KAAK;GACvC,OAAO,KAAKI,GAAK,QAAQ;EAC7B,GAEMC,UAAoB;GACtB,IAAI,CAACR,EAAS,MAAM,OAChB;GAEJ,IAAMO,IAAM,kDAAkD,mBAC1DN,EAAQ,KACZ,EAAE,QAAQ,mBAAmBE,EAAK,KAAK;GACvC,OAAO,KAAKI,GAAK,QAAQ;EAC7B,GAEME,UAAwB;GAC1B,IAAI,CAACT,EAAS,MAAM,OAChB;GAEJ,IAAMO,IAAM,+CAA+C,mBACvDN,EAAQ,KACZ,EAAE,QAAQ,mBAAmBE,EAAK,KAAK;GACvC,O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oD,GAAA,EAAnB,MAAK,YAAW,CAAA,GAAG9C,EAAA,MAC3BL,EAAGV,EAAAA,GAAE,wBAAA,CAAA,GAAA,CAAA,CAAA,CAAA;;;QAETS,EAGmBsD,GAAA,EAHA,SAAOR,EAAa,GAAA;SACnC,SAAA5C,QAAmC,CAAnCF,EAAmCoD,GAAA,EAA3B,MAAK,oBAAmB,CAAA,GAAG9C,EAAA,MACnCL,EAAGV,EAAAA,GAAE,sBAAA,CAAA,GAAA,CAAA,CAAA,CAAA;;;;OAnBb,SAAAW,QAGiC,CAHjCF,EAGiCqD,GAAA;QAF7B,MAAK;QACL,WAAU;QACT,OAAO9D,EAAAA,GAAE,aAAA;;;;;;;IAsB1BQ,EAOM,OAPNkC,GAOM,CANFlC,EAEM,OAFNmC,GAEMjC,EADCV,EAAAA,GAAE,eAAA,CAAA,GAAA,CAAA,GAETQ,EAEM,OAFNoC,GAEMlC,EADCE,EAAAwC,CAAA,CAAO,GAAA,CAAA,CAAA,CAAA;IAGlB5C,EAOM,OAPNqC,GAOM,CANFrC,EAEM,OAFNsC,GAEMpC,EADCV,EAAAA,GAAE,YAAA,CAAA,GAAA,CAAA,GAETQ,EAEQ,OAFRuC,GAEQrC,EADJE,EAAA0C,CAAA,CAAI,GAAA,CAAA,CAAA,CAAA"}
@@ -1,8 +1,8 @@
1
1
  import { $ as e, B as t, C as n, G as r, K as i, L as a, M as o, O as s, St as c, Tt as l, X as u, _ as d, b as f, bt as p, d as m, dt as ee, g as h, h as g, it as _, j as v, l as te, m as y, pt as b, r as x, u as S, v as C, wt as ne, x as w, xt as T, y as E, z as D } from "./vue.runtime.esm-bundler-B-NVlZCY.js";
2
2
  import { r as re } from "./vue-i18n-BAndfHYX.js";
3
- import { c as ie, l as ae, t as oe } from "./PkStreamingMarkdown-DbSttKVa.js";
4
- import { d as O } from "./Agent-Bz23Ejuh.js";
5
- import { c as k, f as se, o as A, p as j, r as ce, s as M, t as le } from "./index.es-B9zAw2XU.js";
3
+ import { c as ie, l as ae, t as oe } from "./PkStreamingMarkdown-LBiDnEgV.js";
4
+ import { d as O } from "./Agent-B5gICwnq.js";
5
+ import { c as k, f as se, o as A, p as j, r as ce, s as M, t as le } from "./index.es-D_E1Gj_U.js";
6
6
  //#region ../../packages/components/src/PkEditorRadioButtons.vue?vue&type=script&setup=true&lang.ts
7
7
  s(), T();
8
8
  //#endregion
@@ -144,25 +144,25 @@ var fe = {
144
144
  }, me = {
145
145
  key: 0,
146
146
  class: "text-12 border-b border-surface-3 text-word-3 bg-surface-1"
147
- }, N = {
147
+ }, he = {
148
148
  key: 1,
149
149
  class: "flex flex-col gap-4 p-sm"
150
- }, P = { class: "flex justify-between text-10 text-word-3" }, F = { class: "h-4 bg-surface-3 rounded-full overflow-hidden" }, I = { class: "px-sm py-16 flex flex-col gap-12" }, L = { class: "leading-normal text-12" }, R = { class: "font-semibold" }, z = { class: "text-12" }, he = { class: "font-semibold" }, ge = {
150
+ }, N = { class: "flex justify-between text-10 text-word-3" }, P = { class: "h-4 bg-surface-3 rounded-full overflow-hidden" }, F = { class: "px-sm py-16 flex flex-col gap-12" }, I = { class: "leading-normal text-12" }, L = ["id"], R = { class: "text-12" }, ge = { class: "font-semibold" }, _e = {
151
151
  key: 0,
152
152
  class: "text-word-3"
153
- }, _e = { class: "text-12" }, ve = { class: "font-semibold" }, ye = {
153
+ }, ve = { class: "text-12" }, ye = { class: "font-semibold" }, be = {
154
154
  key: 0,
155
155
  class: "text-word-3"
156
- }, B = {
156
+ }, xe = {
157
157
  key: 2,
158
158
  class: "flex flex-col gap-6 w-full"
159
- }, be = {
159
+ }, Se = {
160
160
  key: 0,
161
161
  class: "px-sm pb-sm border-t border-surface-3"
162
- }, xe = {
162
+ }, Ce = {
163
163
  key: 1,
164
164
  class: "px-sm py-10 bg-surface border-t border-surface-3 flex justify-between gap-12"
165
- }, Se = { key: 1 }, Ce = { class: "px-sm py-12 bg-surface space-y-10" }, we = { class: "flex flex-col gap-8" }, Te = { class: "text-12 text-word-3" }, Ee = { class: "text-12 text-word-2 font-semibold" }, De = { class: "px-sm py-12 bg-surface border-t border-surface-3 flex items-center gap-10" }, Oe = { class: "flex flex-col" }, ke = { class: "font-medium text-12 text-word-1 leading-tight" }, V = /* @__PURE__ */ n({
165
+ }, we = { key: 1 }, Te = { class: "px-sm py-12 bg-surface flex flex-col gap-10" }, Ee = { class: "flex flex-col gap-8" }, De = { class: "text-12 text-word-3" }, Oe = { class: "text-12 text-word-2 font-semibold" }, ke = { class: "px-sm py-12 bg-surface border-t border-surface-3 flex items-center gap-10" }, Ae = { class: "flex flex-col" }, je = { class: "font-medium text-12 text-word-1 leading-tight" }, z = /* @__PURE__ */ n({
166
166
  __name: "PkToolShowForm",
167
167
  props: {
168
168
  part: { type: null },
@@ -171,201 +171,211 @@ var fe = {
171
171
  },
172
172
  emits: ["select"],
173
173
  setup(t, { emit: n }) {
174
- let r = t, i = n, { t: o, d: s } = re({ useScope: "global" }), f = y(() => JSON.parse(JSON.stringify(r.part))), _ = y(() => f.value.toolName === "showMultipleChoice" || f.value.type === "tool-showMultipleChoice"), v = y(() => O(f.value.output)), x = y(() => !r.answered && (f.value.state === "input-available" || v.value)), T = y(() => {
175
- let e = H.value;
176
- return e ? j.value.length === 1 && !e.allowFreeformInput && !r.allowCustomAnswer : !1;
177
- }), k = y(() => _.value && j.value.length === 1 && !H.value?.multiSelect), A = y(() => !!H.value?.options && !H.value?.multiSelect && (T.value || k.value)), j = y(() => {
178
- let e = f.value.input;
174
+ let i = t, o = n, { t: s, d: f } = re({ useScope: "global" }), _ = y(() => JSON.parse(JSON.stringify(i.part))), v = r(), x = y(() => _.value.toolName === "showMultipleChoice" || _.value.type === "tool-showMultipleChoice"), T = y(() => O(_.value.output)), k = y(() => !i.answered && (_.value.state === "input-available" || T.value)), A = y(() => {
175
+ let e = V.value;
176
+ return e ? z.value.length === 1 && !e.allowFreeformInput && !i.allowCustomAnswer : !1;
177
+ }), j = y(() => x.value && z.value.length === 1 && !V.value?.multiSelect), M = y(() => !!V.value?.options && !V.value?.multiSelect && (A.value || j.value)), z = y(() => {
178
+ let e = _.value.input;
179
179
  return e?.steps?.length ? e.steps : e?.question && e?.options ? [{
180
180
  id: "legacy",
181
181
  question: e.question,
182
182
  options: e.options.map((e) => typeof e == "string" ? { label: e } : e)
183
183
  }] : [];
184
- }), M = y(() => f.value.state === "output-error" && !j.value.length), V = b(0), H = y(() => j.value[V.value]), U = y(() => V.value > 0), W = y(() => V.value < j.value.length - 1), Ae = y(() => j.value.length > 1), G = y(() => Ae.value ? Math.round((V.value + 1) / j.value.length * 100) : null), K = ee({}), q = b("");
185
- u(V, () => {
186
- q.value = "";
184
+ }), Me = y(() => _.value.state === "output-error" && !z.value.length), B = b(0), V = y(() => z.value[B.value]), H = y(() => B.value > 0), U = y(() => B.value < z.value.length - 1), Ne = y(() => z.value.length > 1), W = y(() => Ne.value ? Math.round((B.value + 1) / z.value.length * 100) : null), G = ee({}), K = b("");
185
+ u(B, () => {
186
+ K.value = "";
187
187
  });
188
- let J = y({
188
+ let q = y({
189
189
  get: () => {
190
- let e = H.value ? K[V.value] : void 0;
190
+ let e = V.value ? G[B.value] : void 0;
191
191
  if (!(e == null || Array.isArray(e))) return e;
192
192
  },
193
193
  set: (e) => {
194
- H.value && (K[V.value] = e ?? null);
194
+ V.value && (G[B.value] = e ?? null);
195
195
  }
196
- }), Y = y({
196
+ }), J = y({
197
197
  get: () => {
198
- let e = H.value ? K[V.value] : void 0;
198
+ let e = V.value ? G[B.value] : void 0;
199
199
  return Array.isArray(e) ? e : [];
200
200
  },
201
201
  set: (e) => {
202
- H.value && (K[V.value] = e ?? []);
202
+ V.value && (G[B.value] = e ?? []);
203
203
  }
204
204
  });
205
- function je(e) {
205
+ function Pe(e) {
206
206
  if (!e || typeof e == "string") return;
207
207
  let t = e.answers;
208
208
  return Array.isArray(t) ? t : void 0;
209
209
  }
210
- u(() => f.value.output, (e) => {
211
- e && !O(e) && Object.assign(K, ie(j.value, e));
210
+ u(() => _.value.output, (e) => {
211
+ e && !O(e) && Object.assign(G, ie(z.value, e));
212
212
  }, { immediate: !0 });
213
- let Me = y(() => {
214
- let e = f.value.output;
213
+ let Y = y(() => {
214
+ let e = _.value.output;
215
215
  if (!e || O(e)) return;
216
216
  if (typeof e == "string") return e;
217
- let t = je(e);
217
+ let t = Pe(e);
218
218
  if (t?.length === 1) {
219
219
  let e = t[0].value;
220
220
  return Array.isArray(e) ? e.join(", ") : String(e);
221
221
  }
222
222
  });
223
- u(Me, (e) => {
224
- e && H.value && ((H.value.options ?? []).map((e) => e.label).includes(e) || (q.value = e));
223
+ u(Y, (e) => {
224
+ e && V.value && ((V.value.options ?? []).map((e) => e.label).includes(e) || (K.value = e));
225
225
  }, { immediate: !0 });
226
- let X = y(() => ae(H.value));
226
+ let X = y(() => ae(V.value));
227
227
  function Z() {
228
- q.value.trim() ? $() : W.value ? V.value++ : Q();
228
+ K.value.trim() ? $() : U.value ? B.value++ : Q();
229
229
  }
230
- function Ne() {
231
- U.value && V.value--;
230
+ function Fe() {
231
+ H.value && B.value--;
232
232
  }
233
233
  function Q() {
234
- if (!x.value) return;
235
- let e = j.value.map((e, t) => ({
234
+ if (!k.value) return;
235
+ let e = z.value.map((e, t) => ({
236
236
  id: e.id,
237
- value: K[t] ?? null
237
+ value: G[t] ?? null
238
238
  }));
239
- if (k.value && !H.value?.allowFreeformInput) {
239
+ if (j.value && !V.value?.allowFreeformInput) {
240
240
  let t = e[0].value;
241
- i("select", Array.isArray(t) ? t[0] : t);
242
- } else i("select", { answers: e });
241
+ o("select", Array.isArray(t) ? t[0] : t);
242
+ } else o("select", { answers: e });
243
243
  }
244
244
  function $() {
245
- let e = q.value.trim();
246
- e && (K[V.value] = e, q.value = "", j.value.length === 1 ? Q() : Z());
245
+ let e = K.value.trim();
246
+ e && (G[B.value] = e, K.value = "", z.value.length === 1 ? Q() : Z());
247
247
  }
248
- function Pe() {
249
- x.value && (T.value || k.value) && Q();
248
+ function Ie() {
249
+ k.value && (A.value || j.value) && Q();
250
250
  }
251
- function Fe(e, t) {
252
- let n = K[t];
253
- return n == null ? "—" : Array.isArray(n) ? n.join(", ") : e.type === "date" ? s(new Date(n), "short") : n;
251
+ function Le(e, t) {
252
+ let n = G[t];
253
+ return n == null ? "—" : Array.isArray(n) ? n.join(", ") : e.type === "date" ? f(new Date(n), "short") : n;
254
254
  }
255
255
  return (t, n) => {
256
- let r = se, i = ce, s = le;
257
- return M.value ? (a(), C("div", fe, [n[4] ||= g("span", { class: "i-vv-alert-circle text-16 shrink-0" }, null, -1), g("span", null, l(p(o)("message.formRenderError")), 1)])) : j.value.length ? (a(), C("div", pe, [f.value.input?.title || x.value && j.value.length > 1 ? (a(), C("div", me, [f.value.input?.title ? (a(), C("div", {
256
+ let r = le, i = se, o = ce;
257
+ return Me.value ? (a(), C("div", fe, [w(r, {
258
+ name: "ri:error-warning-line",
259
+ class: "w-16 h-16 shrink-0"
260
+ }), g("span", null, l(p(s)("message.formRenderError")), 1)])) : z.value.length ? (a(), C("div", pe, [_.value.input?.title || k.value && z.value.length > 1 ? (a(), C("div", me, [_.value.input?.title ? (a(), C("div", {
258
261
  key: 0,
259
- class: c(["px-sm py-10 font-bold", { "border-b border-surface-3": x.value && j.value.length > 1 }])
260
- }, l(f.value.input?.title), 3)) : d("", !0), x.value && j.value.length > 1 ? (a(), C("div", N, [g("div", P, [g("span", null, l(p(o)("showForm.step", {
261
- current: V.value + 1,
262
- total: j.value.length
263
- })), 1), g("span", null, l(G.value) + "%", 1)]), g("div", F, [g("div", {
262
+ class: c(["px-sm py-10 font-bold", { "border-b border-surface-3": k.value && z.value.length > 1 }])
263
+ }, l(_.value.input?.title), 3)) : d("", !0), k.value && z.value.length > 1 ? (a(), C("div", he, [g("div", N, [g("span", null, l(p(s)("showForm.step", {
264
+ current: B.value + 1,
265
+ total: z.value.length
266
+ })), 1), g("span", null, l(W.value) + "%", 1)]), g("div", P, [g("div", {
264
267
  class: "h-full bg-word-4 transition-all duration-300",
265
- style: ne({ width: `${G.value}%` })
266
- }, null, 4)])])) : d("", !0)])) : d("", !0), x.value ? (a(), C(m, { key: 1 }, [
267
- g("div", I, [g("div", L, [g("strong", R, l(H.value.question), 1), H.value.message ? (a(), h(oe, {
268
+ style: ne({ width: `${W.value}%` })
269
+ }, null, 4)])])) : d("", !0)])) : d("", !0), k.value ? (a(), C(m, { key: 1 }, [
270
+ g("div", F, [g("div", I, [g("strong", {
271
+ id: p(v),
272
+ class: "font-semibold"
273
+ }, l(V.value.question), 9, L), V.value.message ? (a(), h(oe, {
268
274
  key: 0,
269
- markdown: H.value.message,
275
+ markdown: V.value.message,
270
276
  class: "text-word-2 mt-4"
271
- }, null, 8, ["markdown"])) : d("", !0)]), H.value.options && H.value.multiSelect ? (a(), h(de, {
277
+ }, null, 8, ["markdown"])) : d("", !0)]), V.value.options && V.value.multiSelect ? (a(), h(de, {
272
278
  key: 0,
273
- modelValue: Y.value,
274
- "onUpdate:modelValue": n[0] ||= (e) => Y.value = e,
275
- name: H.value.id,
279
+ modelValue: J.value,
280
+ "onUpdate:modelValue": n[0] ||= (e) => J.value = e,
281
+ name: V.value.id,
276
282
  options: X.value,
277
- readonly: !x.value,
283
+ readonly: !k.value,
278
284
  class: "mb-0",
279
285
  vertical: ""
280
286
  }, E({ _: 2 }, [D(X.value, (t) => ({
281
287
  name: t.value,
282
- fn: e(() => [g("div", z, [g("div", he, l(t.label), 1), t.description ? (a(), C("div", ge, l(t.description), 1)) : d("", !0)])])
288
+ fn: e(() => [g("div", R, [g("div", ge, l(t.label), 1), t.description ? (a(), C("div", _e, l(t.description), 1)) : d("", !0)])])
283
289
  }))]), 1032, [
284
290
  "modelValue",
285
291
  "name",
286
292
  "options",
287
293
  "readonly"
288
- ])) : H.value.options && !H.value.multiSelect ? (a(), h(ue, {
294
+ ])) : V.value.options && !V.value.multiSelect ? (a(), h(ue, {
289
295
  key: 1,
290
- modelValue: J.value,
291
- "onUpdate:modelValue": [n[1] ||= (e) => J.value = e, Pe],
292
- name: H.value.id,
296
+ modelValue: q.value,
297
+ "onUpdate:modelValue": [n[1] ||= (e) => q.value = e, Ie],
298
+ name: V.value.id,
293
299
  options: X.value,
294
- readonly: !x.value,
300
+ readonly: !k.value,
295
301
  vertical: "",
296
302
  class: "mb-0"
297
303
  }, E({ _: 2 }, [D(X.value, (t) => ({
298
304
  name: t.value,
299
- fn: e(() => [g("div", _e, [g("div", ve, l(t.label), 1), t.description ? (a(), C("div", ye, l(t.description), 1)) : d("", !0)])])
305
+ fn: e(() => [g("div", ve, [g("div", ye, l(t.label), 1), t.description ? (a(), C("div", be, l(t.description), 1)) : d("", !0)])])
300
306
  }))]), 1032, [
301
307
  "modelValue",
302
308
  "name",
303
309
  "options",
304
310
  "readonly"
305
- ])) : H.value.options ? d("", !0) : (a(), C("div", B, [(a(), h(r, {
306
- key: H.value.id,
307
- modelValue: J.value,
308
- "onUpdate:modelValue": n[2] ||= (e) => J.value = e,
309
- placeholder: H.value.placeholder || p(o)("placeholder.insert"),
310
- type: H.value.type,
311
+ ])) : V.value.options ? d("", !0) : (a(), C("div", xe, [(a(), h(i, {
312
+ key: V.value.id,
313
+ modelValue: q.value,
314
+ "onUpdate:modelValue": n[2] ||= (e) => q.value = e,
315
+ "aria-labelledby": p(v),
316
+ placeholder: V.value.placeholder || p(s)("placeholder.insert"),
317
+ type: V.value.type,
311
318
  class: "w-full",
312
- name: H.value.id,
319
+ name: V.value.id,
313
320
  modifiers: "compact",
314
- disabled: !x.value,
321
+ disabled: !k.value,
315
322
  onKeyup: te(Z, ["enter"])
316
323
  }, null, 8, [
317
324
  "modelValue",
325
+ "aria-labelledby",
318
326
  "placeholder",
319
327
  "type",
320
328
  "name",
321
329
  "disabled"
322
330
  ]))]))]),
323
- H.value.allowFreeformInput && H.value.options ? (a(), C("div", be, [g("form", {
331
+ V.value.allowFreeformInput && V.value.options ? (a(), C("div", Se, [g("form", {
324
332
  class: "flex gap-xs pt-sm",
325
333
  onSubmit: S($, ["prevent"])
326
- }, [(a(), h(r, {
327
- key: `${H.value.id}-custom`,
328
- modelValue: q.value,
329
- "onUpdate:modelValue": n[3] ||= (e) => q.value = e,
334
+ }, [(a(), h(i, {
335
+ key: `${V.value.id}-custom`,
336
+ modelValue: K.value,
337
+ "onUpdate:modelValue": n[3] ||= (e) => K.value = e,
330
338
  class: "flex-1",
331
- name: `${H.value.id}-custom`,
339
+ name: `${V.value.id}-custom`,
332
340
  modifiers: "compact",
333
- disabled: !x.value,
334
- placeholder: H.value.placeholder || p(o)("showForm.otherPlaceholder")
341
+ disabled: !k.value,
342
+ "aria-label": V.value.placeholder || p(s)("showForm.otherPlaceholder"),
343
+ placeholder: V.value.placeholder || p(s)("showForm.otherPlaceholder")
335
344
  }, null, 8, [
336
345
  "modelValue",
337
346
  "name",
338
347
  "disabled",
348
+ "aria-label",
339
349
  "placeholder"
340
350
  ]))], 32)])) : d("", !0),
341
- A.value ? d("", !0) : (a(), C("div", xe, [U.value ? (a(), h(i, {
351
+ M.value ? d("", !0) : (a(), C("div", Ce, [H.value ? (a(), h(o, {
342
352
  key: 0,
343
353
  modifiers: "action-quiet",
344
354
  icon: "ri:arrow-left-s-line",
345
- label: p(o)("action.back"),
346
- onClick: S(Ne, ["stop"])
347
- }, null, 8, ["label"])) : (a(), C("div", Se)), w(i, {
348
- modifiers: W.value ? "action-quiet" : "action-primary",
349
- icon: W.value ? "ri:arrow-right-s-line" : "ri:send-plane-2-line",
355
+ label: p(s)("action.back"),
356
+ onClick: S(Fe, ["stop"])
357
+ }, null, 8, ["label"])) : (a(), C("div", we)), w(o, {
358
+ modifiers: U.value ? "action-quiet" : "action-primary",
359
+ icon: U.value ? "ri:arrow-right-s-line" : "ri:send-plane-2-line",
350
360
  "icon-position": "right",
351
- label: W.value ? p(o)("action.next") : p(o)("action.submit"),
361
+ label: U.value ? p(s)("action.next") : p(s)("action.submit"),
352
362
  onClick: S(Z, ["stop"])
353
363
  }, null, 8, [
354
364
  "modifiers",
355
365
  "icon",
356
366
  "label"
357
367
  ])]))
358
- ], 64)) : (a(), C(m, { key: 2 }, [g("div", Ce, [g("ul", we, [(a(!0), C(m, null, D(j.value, (e, t) => (a(), C("li", {
368
+ ], 64)) : (a(), C(m, { key: 2 }, [g("div", Te, [g("ul", Ee, [(a(!0), C(m, null, D(z.value, (e, t) => (a(), C("li", {
359
369
  key: t,
360
370
  class: "leading-normal"
361
- }, [g("div", Te, l(e.question), 1), g("span", Ee, l(Fe(e, t)), 1)]))), 128))])]), g("div", De, [w(s, {
371
+ }, [g("div", De, l(e.question), 1), g("span", Oe, l(Le(e, t)), 1)]))), 128))])]), g("div", ke, [w(r, {
362
372
  name: "ri:check-line",
363
373
  class: "text-16 text-success"
364
- }), g("div", Oe, [g("span", ke, l(p(o)("showForm.completed")), 1)])])], 64))])) : d("", !0);
374
+ }), g("div", Ae, [g("span", je, l(p(s)("showForm.completed")), 1)])])], 64))])) : d("", !0);
365
375
  };
366
376
  }
367
377
  });
368
378
  //#endregion
369
- export { V as default };
379
+ export { z as default };
370
380
 
371
- //# sourceMappingURL=PkToolShowForm-BpTuRgHg.js.map
381
+ //# sourceMappingURL=PkToolShowForm-CaYPCOeb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PkToolShowForm-CaYPCOeb.js","names":["_useModel","__unplugin_components_0","__unplugin_components_1","_openBlock","_createBlock","_withCtx","_createElementBlock","_Fragment","_renderList","_renderSlot","_mergeProps","_createTextVNode","_toDisplayString","_sfc_main","_useModel","__unplugin_components_0","__unplugin_components_1","_openBlock","_createBlock","_withCtx","_createElementBlock","_Fragment","_renderList","_renderSlot","_mergeProps","_createTextVNode","_toDisplayString","_sfc_main","__unplugin_components_0","__unplugin_components_1","__unplugin_components_2","_openBlock","_createElementBlock","_createVNode","_createElementVNode","_toDisplayString","_unref","_normalizeClass","_createCommentVNode","_normalizeStyle","_Fragment","_createBlock","PkStreamingMarkdown","PkEditorCheckboxButtons","_createSlots","_renderList","_withCtx","PkEditorRadioButtons","_withKeys","_withModifiers","_sfc_main","withCtx","renderSlot","defineComponent","useId","useModel","openBlock","mergeProps","init_runtime_core_esm_bundler","normalizeClass","toDisplayString","watch","createCommentVNode","createTextVNode","unref","Fragment","reactive","createBlock","createBaseVNode","init_reactivity_esm_bundler","mergeModels","withKeys","computed","ref","init_runtime_dom_esm_bundler","withModifiers","createElementBlock","normalizeStyle","createVNode","init_shared_esm_bundler","createSlots","renderList","useI18n","formAnswerSlots","formStepOptions","PkStreamingMarkdown_default","isVoiceRenderAck","du","su","Zo","tu","Ca","bi","Ae","PkEditorRadioButtons_default","\"modelValue\"","\"modelModifiers\"","props","__props","modelValue","uid","groupName","radioModifiers","_component_VvRadio","_component_VvRadioGroup","_cache","$event","option","_ctx","PkEditorCheckboxButtons_default","_component_VvCheckbox","_component_VvCheckboxGroup","_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","PkToolShowForm_default","__emit","emit","$t","$d","toolPart","questionId","isLegacy","isRenderAck","isInteractive","isAutoSubmitStep","step","currentStep","steps","isLegacyAutoSubmit","isSelfSubmitting","input","o","hasFailed","currentStepIndex","canGoBack","canGoNext","isMultiStep","progress","answers","customAnswer","scalarValue","val","activeCheckboxValue","outputAnswers","output","list","normalizedOutput","out","value","radioOptions","goNext","submitCustomAnswer","submitForm","goBack","finalAnswers","index","onRadioChange","getSummaryValue","_component_VvIcon","_component_VvInputText","_component_VvButton"],"sources":["../../../../packages/components/src/PkEditorRadioButtons.vue","../../../../packages/components/src/PkEditorRadioButtons.vue","../../../../packages/components/src/PkEditorCheckboxButtons.vue","../../../../packages/components/src/PkEditorCheckboxButtons.vue","../../../../packages/components/src/chat/PkToolShowForm.vue","../../../../packages/components/src/chat/PkToolShowForm.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import type { Option } from '@volverjs/ui-vue'\n import { computed, useId } from 'vue'\n\n const props = defineProps<{\n name: string\n label?: string\n hintLabel?: string\n invalid?: boolean\n invalidLabel?: string | string[]\n required?: boolean\n options: Option[]\n readonly?: boolean\n disabled?: boolean\n modifiers?: string | string[]\n /**\n * Render the options as one segmented control (a recessed track with\n * the chosen option raised) instead of a row of boxed cards. Suits a\n * choice between a few short named states, such as a level or a mode.\n */\n segmented?: boolean\n }>()\n\n const modelValue = defineModel<\n string | number | boolean | symbol | unknown[] | undefined\n >({ default: undefined })\n\n // Native radios group by their name attribute across the whole document, so\n // two instances sharing one name become a single group: the browser unchecks\n // the other instance's inputs and Vue never puts them back, because its own\n // model did not change. It happened with \"theme\", offered by the profile\n // menu and the agent settings panel at the same time, and it can happen to\n // any two tool forms with the same step id. Scope the name to the instance.\n const uid = useId()\n const groupName = computed(() => `${props.name}-${uid}`)\n\n const radioModifiers = computed(() => {\n const toReturn = props.modifiers\n ? Array.isArray(props.modifiers)\n ? props.modifiers\n : [props.modifiers]\n : []\n return [...toReturn, props.segmented ? 'segment' : 'card']\n })\n</script>\n\n<template>\n <VvRadioGroup\n v-model=\"modelValue\"\n :name=\"groupName\"\n :label\n :hint-label=\"hintLabel\"\n :invalid\n :invalid-label=\"invalidLabel\"\n :modifiers=\"segmented ? 'segmented' : 'cards'\">\n <VvRadio\n v-for=\"(option, key) in options\"\n :key\n :name=\"groupName\"\n :required\n :readonly\n :disabled\n :value=\"option.value\"\n :modifiers=\"radioModifiers\">\n <slot :name=\"option.value\" v-bind=\"{ option }\">\n {{ option.label }}\n </slot>\n </VvRadio>\n </VvRadioGroup>\n</template>\n","<script setup lang=\"ts\">\n import type { Option } from '@volverjs/ui-vue'\n import { computed, useId } from 'vue'\n\n const props = defineProps<{\n name: string\n label?: string\n hintLabel?: string\n invalid?: boolean\n invalidLabel?: string | string[]\n required?: boolean\n options: Option[]\n readonly?: boolean\n disabled?: boolean\n modifiers?: string | string[]\n /**\n * Render the options as one segmented control (a recessed track with\n * the chosen option raised) instead of a row of boxed cards. Suits a\n * choice between a few short named states, such as a level or a mode.\n */\n segmented?: boolean\n }>()\n\n const modelValue = defineModel<\n string | number | boolean | symbol | unknown[] | undefined\n >({ default: undefined })\n\n // Native radios group by their name attribute across the whole document, so\n // two instances sharing one name become a single group: the browser unchecks\n // the other instance's inputs and Vue never puts them back, because its own\n // model did not change. It happened with \"theme\", offered by the profile\n // menu and the agent settings panel at the same time, and it can happen to\n // any two tool forms with the same step id. Scope the name to the instance.\n const uid = useId()\n const groupName = computed(() => `${props.name}-${uid}`)\n\n const radioModifiers = computed(() => {\n const toReturn = props.modifiers\n ? Array.isArray(props.modifiers)\n ? props.modifiers\n : [props.modifiers]\n : []\n return [...toReturn, props.segmented ? 'segment' : 'card']\n })\n</script>\n\n<template>\n <VvRadioGroup\n v-model=\"modelValue\"\n :name=\"groupName\"\n :label\n :hint-label=\"hintLabel\"\n :invalid\n :invalid-label=\"invalidLabel\"\n :modifiers=\"segmented ? 'segmented' : 'cards'\">\n <VvRadio\n v-for=\"(option, key) in options\"\n :key\n :name=\"groupName\"\n :required\n :readonly\n :disabled\n :value=\"option.value\"\n :modifiers=\"radioModifiers\">\n <slot :name=\"option.value\" v-bind=\"{ option }\">\n {{ option.label }}\n </slot>\n </VvRadio>\n </VvRadioGroup>\n</template>\n","<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 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\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 const isInteractive = computed(\n () =>\n !props.answered &&\n (toolPart.value.state === 'input-available' || isRenderAck.value),\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 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 <VvIcon name=\"ri:check-line\" class=\"text-16 text-success\" />\n <div class=\"flex flex-col\">\n <span class=\"font-medium text-12 text-word-1 leading-tight\">\n {{ $t('showForm.completed') }}\n </span>\n </div>\n </div>\n </template>\n </div>\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\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 const isInteractive = computed(\n () =>\n !props.answered &&\n (toolPart.value.state === 'input-available' || isRenderAck.value),\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 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 <VvIcon name=\"ri:check-line\" class=\"text-16 text-success\" />\n <div class=\"flex flex-col\">\n <span class=\"font-medium text-12 text-word-1 leading-tight\">\n {{ $t('showForm.completed') }}\n </span>\n </div>\n </div>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAII,IAAMiG,IAAQC,GAmBRC,IAAanG,EAElBkG,GAAA,YAAuB,GAQlBE,IAAM9C,EAAM,GACZ+C,IAAY7B,QAAe,GAAGyB,EAAM,KAAK,GAAG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