@8wave/ai-elements 0.75.0 → 0.77.0

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 (110) hide show
  1. package/dist/_chunks/{PkStreamingMarkdown-rIdQh5_D.js → PkStreamingMarkdown-COZApJzT.js} +3 -3
  2. package/dist/_chunks/{PkStreamingMarkdown-rIdQh5_D.js.map → PkStreamingMarkdown-COZApJzT.js.map} +1 -1
  3. package/dist/_chunks/{PkToolShowArtifact-CeLgwZBA.js → PkToolShowArtifact-BZQixk9z.js} +5 -5
  4. package/dist/_chunks/{PkToolShowArtifact-CeLgwZBA.js.map → PkToolShowArtifact-BZQixk9z.js.map} +1 -1
  5. package/dist/_chunks/{PkToolShowCalendarEvent-cQpAAE3a.js → PkToolShowCalendarEvent-BEqn5iEb.js} +6 -6
  6. package/dist/_chunks/{PkToolShowCalendarEvent-cQpAAE3a.js.map → PkToolShowCalendarEvent-BEqn5iEb.js.map} +1 -1
  7. package/dist/_chunks/{PkToolShowComparison-Cu-zT8-Z.js → PkToolShowComparison-p34r0Hhd.js} +4 -4
  8. package/dist/_chunks/{PkToolShowComparison-Cu-zT8-Z.js.map → PkToolShowComparison-p34r0Hhd.js.map} +1 -1
  9. package/dist/_chunks/{PkToolShowContactForm-CqoSVvjG.js → PkToolShowContactForm-thS7c8iL.js} +18 -18
  10. package/dist/_chunks/{PkToolShowContactForm-CqoSVvjG.js.map → PkToolShowContactForm-thS7c8iL.js.map} +1 -1
  11. package/dist/_chunks/{PkToolShowEmail-oLGym0R9.js → PkToolShowEmail-Be8FvWjw.js} +4 -4
  12. package/dist/_chunks/{PkToolShowEmail-oLGym0R9.js.map → PkToolShowEmail-Be8FvWjw.js.map} +1 -1
  13. package/dist/_chunks/{PkToolShowImageGallery-CDXSL1Mg.js → PkToolShowImageGallery-DmJztS-Z.js} +5 -5
  14. package/dist/_chunks/{PkToolShowImageGallery-CDXSL1Mg.js.map → PkToolShowImageGallery-DmJztS-Z.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShowLocation-BtRUdoEw.js → PkToolShowLocation-DOoLCHzS.js} +6 -6
  16. package/dist/_chunks/{PkToolShowLocation-BtRUdoEw.js.map → PkToolShowLocation-DOoLCHzS.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowMessage-tJQGRhce.js → PkToolShowMessage-DgeULbdQ.js} +4 -4
  18. package/dist/_chunks/{PkToolShowMessage-tJQGRhce.js.map → PkToolShowMessage-DgeULbdQ.js.map} +1 -1
  19. package/dist/_chunks/{PkToolShowMultipleChoice-CtVvdyDg.js → PkToolShowMultipleChoice-CpGyn_bZ.js} +3 -3
  20. package/dist/_chunks/{PkToolShowMultipleChoice-CtVvdyDg.js.map → PkToolShowMultipleChoice-CpGyn_bZ.js.map} +1 -1
  21. package/dist/_chunks/{PkToolShowProductList-D_k6CDdb.js → PkToolShowProductList-DEo7XogW.js} +4 -4
  22. package/dist/_chunks/{PkToolShowProductList-D_k6CDdb.js.map → PkToolShowProductList-DEo7XogW.js.map} +1 -1
  23. package/dist/_chunks/{PkToolShowQrCode-S1j_T8wQ.js → PkToolShowQrCode-UE4uSyvJ.js} +4 -4
  24. package/dist/_chunks/{PkToolShowQrCode-S1j_T8wQ.js.map → PkToolShowQrCode-UE4uSyvJ.js.map} +1 -1
  25. package/dist/_chunks/{PkToolShowSources-CroItMtG.js → PkToolShowSources-BMXftK6O.js} +7 -7
  26. package/dist/_chunks/PkToolShowSources-BMXftK6O.js.map +1 -0
  27. package/dist/_chunks/{PkToolShowSuggestedReply-BRa5Lpti.js → PkToolShowSuggestedReply-CPAnHI0c.js} +3 -3
  28. package/dist/_chunks/{PkToolShowSuggestedReply-BRa5Lpti.js.map → PkToolShowSuggestedReply-CPAnHI0c.js.map} +1 -1
  29. package/dist/_chunks/{PkToolShowWeather-CUpCJ8Nj.js → PkToolShowWeather-DcSUbzx0.js} +4 -4
  30. package/dist/_chunks/{PkToolShowWeather-CUpCJ8Nj.js.map → PkToolShowWeather-DcSUbzx0.js.map} +1 -1
  31. package/dist/_chunks/{PkToolShowWebPages-f-dHyxfD.js → PkToolShowWebPages-aH_GarEV.js} +5 -5
  32. package/dist/_chunks/{PkToolShowWebPages-f-dHyxfD.js.map → PkToolShowWebPages-aH_GarEV.js.map} +1 -1
  33. package/dist/_chunks/{PkUrl-CI17WkYu.js → PkUrl-BHD0_pal.js} +2 -2
  34. package/dist/_chunks/{PkUrl-CI17WkYu.js.map → PkUrl-BHD0_pal.js.map} +1 -1
  35. package/dist/_chunks/{VvCheckbox.es-BF8Mdg0O.js → VvCheckbox.es-ohF87NOe.js} +3 -3
  36. package/dist/_chunks/{VvCheckbox.es-BF8Mdg0O.js.map → VvCheckbox.es-ohF87NOe.js.map} +1 -1
  37. package/dist/_chunks/{VvCheckboxGroup.es-BJc8MmJ3.js → VvCheckboxGroup.es-DZCbyLN0.js} +4 -4
  38. package/dist/_chunks/{VvCheckboxGroup.es-BJc8MmJ3.js.map → VvCheckboxGroup.es-DZCbyLN0.js.map} +1 -1
  39. package/dist/_chunks/{VvCombobox.es-ILRHqAye.js → VvCombobox.es-YLPD7MpO.js} +6 -6
  40. package/dist/_chunks/{VvCombobox.es-ILRHqAye.js.map → VvCombobox.es-YLPD7MpO.js.map} +1 -1
  41. package/dist/_chunks/{VvInputText.es-CDnMeO26.js → VvInputText.es-DAnAXfBO.js} +7 -7
  42. package/dist/_chunks/{VvInputText.es-CDnMeO26.js.map → VvInputText.es-DAnAXfBO.js.map} +1 -1
  43. package/dist/_chunks/{VvRadio.es-C2p5vvAx.js → VvRadio.es-Do9oyNtV.js} +3 -3
  44. package/dist/_chunks/{VvRadio.es-C2p5vvAx.js.map → VvRadio.es-Do9oyNtV.js.map} +1 -1
  45. package/dist/_chunks/{VvRadioGroup.es-6GlWuDjY.js → VvRadioGroup.es-BHcqcJFC.js} +4 -4
  46. package/dist/_chunks/{VvRadioGroup.es-6GlWuDjY.js.map → VvRadioGroup.es-BHcqcJFC.js.map} +1 -1
  47. package/dist/_chunks/{VvSelect.es-i4lO9onq.js → VvSelect.es-CP_y02fy.js} +5 -5
  48. package/dist/_chunks/{VvSelect.es-i4lO9onq.js.map → VvSelect.es-CP_y02fy.js.map} +1 -1
  49. package/dist/_chunks/{VvTextarea.es-CGpiCS4S.js → VvTextarea.es-DetA_2DM.js} +6 -6
  50. package/dist/_chunks/{VvTextarea.es-CGpiCS4S.js.map → VvTextarea.es-DetA_2DM.js.map} +1 -1
  51. package/dist/_chunks/{dist-BTnzL-m0.js → dist-yqV26MWM.js} +4 -4
  52. package/dist/_chunks/{dist-BTnzL-m0.js.map → dist-yqV26MWM.js.map} +1 -1
  53. package/dist/_chunks/{esm-0nyRYwmP.js → esm-DLxNpT06.js} +7 -7
  54. package/dist/_chunks/{esm-0nyRYwmP.js.map → esm-DLxNpT06.js.map} +1 -1
  55. package/dist/_chunks/{floating-ui.vue-B5ZV-j8C.js → floating-ui.vue-tVPpNXUc.js} +3 -3
  56. package/dist/_chunks/{floating-ui.vue-B5ZV-j8C.js.map → floating-ui.vue-tVPpNXUc.js.map} +1 -1
  57. package/dist/_chunks/{iconify-C1EOwL90.js → iconify-y0w2FIJH.js} +3 -3
  58. package/dist/_chunks/{iconify-C1EOwL90.js.map → iconify-y0w2FIJH.js.map} +1 -1
  59. package/dist/_chunks/{index.es-CUjDCkXD.js → index.es-7fUi-rc0.js} +7 -7
  60. package/dist/_chunks/{index.es-CUjDCkXD.js.map → index.es-7fUi-rc0.js.map} +1 -1
  61. package/dist/_chunks/{src-C_wl-KYN.js → src-BfoQF6Z3.js} +2 -2
  62. package/dist/_chunks/{src-C_wl-KYN.js.map → src-BfoQF6Z3.js.map} +1 -1
  63. package/dist/_chunks/{useLightbox-CH1KeVqr.js → useLightbox-DL_oVBep.js} +3 -3
  64. package/dist/_chunks/{useLightbox-CH1KeVqr.js.map → useLightbox-DL_oVBep.js.map} +1 -1
  65. package/dist/_chunks/{vue-i18n-KvYvoek4.js → vue-i18n-DAH6nDTN.js} +3 -3
  66. package/dist/_chunks/{vue-i18n-KvYvoek4.js.map → vue-i18n-DAH6nDTN.js.map} +1 -1
  67. package/dist/_chunks/{vue.runtime.esm-bundler-BmggS4HU.js → vue.runtime.esm-bundler-Dq29dQrz.js} +16 -10
  68. package/dist/_chunks/vue.runtime.esm-bundler-Dq29dQrz.js.map +1 -0
  69. package/dist/ai-elements.es.js +65 -53
  70. package/dist/ai-elements.es.js.map +1 -1
  71. package/dist-vue/PkChatbot.js +1 -1
  72. package/dist-vue/PkChatbotFeedbackForm.js +1 -1
  73. package/dist-vue/PkChatbotMessages.js +1 -1
  74. package/dist-vue/PkChatbotViewChat.js +1 -1
  75. package/dist-vue/PkChatbotViewConversations.js +1 -1
  76. package/dist-vue/PkChatbotViewProfile.js +1 -1
  77. package/dist-vue/_chunks/{Media-CXQSoKqt.js → Media-kK7BnZGr.js} +2 -2
  78. package/dist-vue/_chunks/Media-kK7BnZGr.js.map +1 -0
  79. package/dist-vue/_chunks/{PkChatbot-DAzGc7al.js → PkChatbot-B9RSkQmJ.js} +6 -6
  80. package/dist-vue/_chunks/{PkChatbot-DAzGc7al.js.map → PkChatbot-B9RSkQmJ.js.map} +1 -1
  81. package/dist-vue/_chunks/{PkChatbotFeedbackForm-DvUzirPP.js → PkChatbotFeedbackForm-lj9CHdhn.js} +2 -2
  82. package/dist-vue/_chunks/{PkChatbotFeedbackForm-DvUzirPP.js.map → PkChatbotFeedbackForm-lj9CHdhn.js.map} +1 -1
  83. package/dist-vue/_chunks/{PkChatbotMessages-dsjB0-26.js → PkChatbotMessages-DOeUT6YL.js} +4 -4
  84. package/dist-vue/_chunks/{PkChatbotMessages-dsjB0-26.js.map → PkChatbotMessages-DOeUT6YL.js.map} +1 -1
  85. package/dist-vue/_chunks/{PkChatbotViewChat-CjoezIyz.js → PkChatbotViewChat-C2FuDayB.js} +5 -5
  86. package/dist-vue/_chunks/{PkChatbotViewChat-CjoezIyz.js.map → PkChatbotViewChat-C2FuDayB.js.map} +1 -1
  87. package/dist-vue/_chunks/{PkChatbotViewConversations-DSQu6vY1.js → PkChatbotViewConversations-2xc0o-fO.js} +2 -2
  88. package/dist-vue/_chunks/{PkChatbotViewConversations-DSQu6vY1.js.map → PkChatbotViewConversations-2xc0o-fO.js.map} +1 -1
  89. package/dist-vue/_chunks/{PkChatbotViewProfile-BJJiaG9H.js → PkChatbotViewProfile-CoT1JnMk.js} +2 -2
  90. package/dist-vue/_chunks/{PkChatbotViewProfile-BJJiaG9H.js.map → PkChatbotViewProfile-CoT1JnMk.js.map} +1 -1
  91. package/dist-vue/_chunks/{PkToolShowContactForm-r_GgO-ZX.js → PkToolShowContactForm-5H4jfq1F.js} +2 -2
  92. package/dist-vue/_chunks/{PkToolShowContactForm-r_GgO-ZX.js.map → PkToolShowContactForm-5H4jfq1F.js.map} +1 -1
  93. package/dist-vue/_chunks/{PkToolShowSources-DK2DCvU3.js → PkToolShowSources-Dv0uuvqS.js} +2 -2
  94. package/dist-vue/_chunks/{PkToolShowSources-DK2DCvU3.js.map → PkToolShowSources-Dv0uuvqS.js.map} +1 -1
  95. package/dist-vue/_chunks/{createChatbotApiClient-f86KwRcq.js → createChatbotApiClient-CvDRMmDa.js} +2 -2
  96. package/dist-vue/_chunks/{createChatbotApiClient-f86KwRcq.js.map → createChatbotApiClient-CvDRMmDa.js.map} +1 -1
  97. package/dist-vue/_chunks/{index.es-_14zrNZB.js → index.es-Dk_HaA08.js} +2 -2
  98. package/dist-vue/_chunks/{index.es-_14zrNZB.js.map → index.es-Dk_HaA08.js.map} +1 -1
  99. package/dist-vue/_chunks/{useChatbotStore-CJlkoNn7.js → useChatbotStore-DMDbzuub.js} +5 -5
  100. package/dist-vue/_chunks/{useChatbotStore-CJlkoNn7.js.map → useChatbotStore-DMDbzuub.js.map} +1 -1
  101. package/dist-vue/api.js +1 -1
  102. package/dist-vue/composables.js +2 -2
  103. package/dist-vue/index.js +18 -18
  104. package/dist-vue/index.js.map +1 -1
  105. package/dist-vue/packages/models/src/schema/AgentEndpoint.d.ts +1 -1
  106. package/dist-vue/packages/models/src/schema/constants.d.ts +3 -1
  107. package/package.json +2 -2
  108. package/dist/_chunks/PkToolShowSources-CroItMtG.js.map +0 -1
  109. package/dist/_chunks/vue.runtime.esm-bundler-BmggS4HU.js.map +0 -1
  110. package/dist-vue/_chunks/Media-CXQSoKqt.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import { Bt as e, C as t, E as n, Gt as r, Z as i, _ as a, ft as o, v as s, w as c, x as l, y as u, yt as d, z as f } from "./vue.runtime.esm-bundler-BmggS4HU.js";
2
- import { c as p } from "./index.es-CUjDCkXD.js";
3
- import { i as m } from "./dist-BTnzL-m0.js";
4
- import { t as h } from "./PkStreamingMarkdown-rIdQh5_D.js";
1
+ import { Bt as e, C as t, E as n, Gt as r, Z as i, _ as a, ft as o, v as s, w as c, x as l, y as u, yt as d, z as f } from "./vue.runtime.esm-bundler-Dq29dQrz.js";
2
+ import { c as p } from "./index.es-7fUi-rc0.js";
3
+ import { i as m } from "./dist-yqV26MWM.js";
4
+ import { t as h } from "./PkStreamingMarkdown-COZApJzT.js";
5
5
  //#region ../../packages/components/src/chat/PkCode.vue?vue&type=script&setup=true&lang.ts
6
6
  var g = ["innerHTML"], _ = /* @__PURE__ */ n({
7
7
  inheritAttrs: !1,
@@ -87,4 +87,4 @@ var g = ["innerHTML"], _ = /* @__PURE__ */ n({
87
87
  //#endregion
88
88
  export { C as default };
89
89
 
90
- //# sourceMappingURL=PkToolShowArtifact-CeLgwZBA.js.map
90
+ //# sourceMappingURL=PkToolShowArtifact-BZQixk9z.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PkToolShowArtifact-CeLgwZBA.js","names":["$attrs","$t"],"sources":["../../../../packages/components/src/chat/PkCode.vue","../../../../packages/components/src/chat/PkCode.vue","../../../../packages/components/src/chat/PkToolShowArtifact.vue","../../../../packages/components/src/chat/PkToolShowArtifact.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref, watch } from 'vue'\n\n defineOptions({\n inheritAttrs: false,\n })\n\n const props = defineProps<{\n code: unknown\n language: string\n line?: boolean\n }>()\n\n const highlightedHtml = ref('')\n\n const hasCode = computed(() => {\n if (typeof props.code === 'string') {\n return props.code\n }\n return JSON.stringify(props.code, null, 2)\n })\n\n async function highlight() {\n const hljs = (await import('highlight.js/lib/common')).default\n try {\n const result = props.language\n ? hljs.highlight(hasCode.value, { language: props.language })\n : hljs.highlightAuto(hasCode.value)\n highlightedHtml.value = result.value\n } catch {\n highlightedHtml.value = hasCode.value\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n }\n }\n\n watch(hasCode, highlight, { immediate: true })\n</script>\n\n<template>\n <pre\n :class=\"\n $attrs.class\n ? $attrs.class\n : 'font-mono leading-snug text-smaller bg-surface-1'\n \">\n <code :class=\"['hljs', line ? 'whitespace-pre-line' : 'whitespace-pre', language]\" v-html=\"highlightedHtml\"></code>\n </pre>\n</template>\n","<script setup lang=\"ts\">\n import { computed, ref, watch } from 'vue'\n\n defineOptions({\n inheritAttrs: false,\n })\n\n const props = defineProps<{\n code: unknown\n language: string\n line?: boolean\n }>()\n\n const highlightedHtml = ref('')\n\n const hasCode = computed(() => {\n if (typeof props.code === 'string') {\n return props.code\n }\n return JSON.stringify(props.code, null, 2)\n })\n\n async function highlight() {\n const hljs = (await import('highlight.js/lib/common')).default\n try {\n const result = props.language\n ? hljs.highlight(hasCode.value, { language: props.language })\n : hljs.highlightAuto(hasCode.value)\n highlightedHtml.value = result.value\n } catch {\n highlightedHtml.value = hasCode.value\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n }\n }\n\n watch(hasCode, highlight, { immediate: true })\n</script>\n\n<template>\n <pre\n :class=\"\n $attrs.class\n ? $attrs.class\n : 'font-mono leading-snug text-smaller bg-surface-1'\n \">\n <code :class=\"['hljs', line ? 'whitespace-pre-line' : 'whitespace-pre', language]\" v-html=\"highlightedHtml\"></code>\n </pre>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import PkCode from './PkCode.vue'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n\n const { copy, copied } = useClipboard()\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title: string\n content: string\n artifactType: string\n language?: string\n }\n }\n return part\n })\n\n const artifactTypeLabel = computed(() => {\n const labels: Record<string, string> = {\n code: 'Code',\n document: 'Document',\n markdown: 'Markdown',\n json: 'JSON',\n xml: 'XML',\n csv: 'CSV',\n html: 'HTML',\n yaml: 'YAML',\n sql: 'SQL',\n text: 'Text',\n }\n if (!toolPart.value.input?.artifactType) {\n return 'Artifact'\n }\n return labels[toolPart.value.input.artifactType] || 'Artifact'\n })\n\n const languageLabel = computed(() => {\n if (!toolPart.value.input?.language) {\n return ''\n }\n return ` (${toolPart.value.input.language})`\n })\n\n const isCodeType = computed(() => {\n return (\n toolPart.value.input?.artifactType === 'code' ||\n toolPart.value.input?.artifactType === 'json' ||\n toolPart.value.input?.artifactType === 'xml' ||\n toolPart.value.input?.artifactType === 'yaml' ||\n toolPart.value.input?.artifactType === 'html' ||\n toolPart.value.input?.artifactType === 'sql'\n )\n })\n\n const isMarkdownType = computed(() => {\n return toolPart.value.input?.artifactType === 'markdown'\n })\n\n const codeLanguage = computed(() => {\n if (toolPart.value.input?.language) {\n return toolPart.value.input.language\n }\n // Map artifact types to highlight.js languages\n const languageMap: Record<string, string> = {\n json: 'json',\n xml: 'xml',\n yaml: 'yaml',\n html: 'html',\n sql: 'sql',\n }\n if (!toolPart.value.input?.artifactType) {\n return 'plaintext'\n }\n return languageMap[toolPart.value.input.artifactType] || 'plaintext'\n })\n</script>\n\n<template>\n <div class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 font-bold bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex justify-between items-center\">\n <div class=\"flex flex-col items-start gap-4\">\n <span>{{ toolPart?.input?.title }}</span>\n <span class=\"text-10 opacity-60 font-normal\">\n {{ artifactTypeLabel }}{{ languageLabel }}\n </span>\n </div>\n <VvButton\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n modifiers=\"action-quiet-small\"\n :title=\"$t('action.copy')\"\n class=\"shrink-0\"\n @click=\"copy(toolPart?.input?.content || '')\" />\n </div>\n <div class=\"px-sm py-10\">\n <PkCode\n v-if=\"isCodeType\"\n :code=\"toolPart?.input?.content\"\n :language=\"codeLanguage\" />\n <PkStreamingMarkdown\n v-else-if=\"isMarkdownType\"\n :markdown=\"toolPart?.input?.content\"\n class=\"wysiwyg text-word-2\" />\n <pre\n v-else\n class=\"text-word-2 whitespace-pre-wrap break-words\"\n :class=\"{\n italic:\n toolPart?.input?.artifactType === 'document' ||\n toolPart?.input?.artifactType === 'text',\n }\"\n >{{ toolPart?.input?.content }}</pre\n >\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import PkCode from './PkCode.vue'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n\n const { copy, copied } = useClipboard()\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title: string\n content: string\n artifactType: string\n language?: string\n }\n }\n return part\n })\n\n const artifactTypeLabel = computed(() => {\n const labels: Record<string, string> = {\n code: 'Code',\n document: 'Document',\n markdown: 'Markdown',\n json: 'JSON',\n xml: 'XML',\n csv: 'CSV',\n html: 'HTML',\n yaml: 'YAML',\n sql: 'SQL',\n text: 'Text',\n }\n if (!toolPart.value.input?.artifactType) {\n return 'Artifact'\n }\n return labels[toolPart.value.input.artifactType] || 'Artifact'\n })\n\n const languageLabel = computed(() => {\n if (!toolPart.value.input?.language) {\n return ''\n }\n return ` (${toolPart.value.input.language})`\n })\n\n const isCodeType = computed(() => {\n return (\n toolPart.value.input?.artifactType === 'code' ||\n toolPart.value.input?.artifactType === 'json' ||\n toolPart.value.input?.artifactType === 'xml' ||\n toolPart.value.input?.artifactType === 'yaml' ||\n toolPart.value.input?.artifactType === 'html' ||\n toolPart.value.input?.artifactType === 'sql'\n )\n })\n\n const isMarkdownType = computed(() => {\n return toolPart.value.input?.artifactType === 'markdown'\n })\n\n const codeLanguage = computed(() => {\n if (toolPart.value.input?.language) {\n return toolPart.value.input.language\n }\n // Map artifact types to highlight.js languages\n const languageMap: Record<string, string> = {\n json: 'json',\n xml: 'xml',\n yaml: 'yaml',\n html: 'html',\n sql: 'sql',\n }\n if (!toolPart.value.input?.artifactType) {\n return 'plaintext'\n }\n return languageMap[toolPart.value.input.artifactType] || 'plaintext'\n })\n</script>\n\n<template>\n <div class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 font-bold bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex justify-between items-center\">\n <div class=\"flex flex-col items-start gap-4\">\n <span>{{ toolPart?.input?.title }}</span>\n <span class=\"text-10 opacity-60 font-normal\">\n {{ artifactTypeLabel }}{{ languageLabel }}\n </span>\n </div>\n <VvButton\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n modifiers=\"action-quiet-small\"\n :title=\"$t('action.copy')\"\n class=\"shrink-0\"\n @click=\"copy(toolPart?.input?.content || '')\" />\n </div>\n <div class=\"px-sm py-10\">\n <PkCode\n v-if=\"isCodeType\"\n :code=\"toolPart?.input?.content\"\n :language=\"codeLanguage\" />\n <PkStreamingMarkdown\n v-else-if=\"isMarkdownType\"\n :markdown=\"toolPart?.input?.content\"\n class=\"wysiwyg text-word-2\" />\n <pre\n v-else\n class=\"text-word-2 whitespace-pre-wrap break-words\"\n :class=\"{\n italic:\n toolPart?.input?.artifactType === 'document' ||\n toolPart?.input?.artifactType === 'text',\n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BAAY,cAA2C,EAAA,OAAU,OAAO,iBAAY,QAAA,CAAA,CAAA;QAK/J,EAAA,OAAU,OAAO,QAAO,EAAA,EAAA,EAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"PkToolShowArtifact-BZQixk9z.js","names":["$attrs","$t"],"sources":["../../../../packages/components/src/chat/PkCode.vue","../../../../packages/components/src/chat/PkCode.vue","../../../../packages/components/src/chat/PkToolShowArtifact.vue","../../../../packages/components/src/chat/PkToolShowArtifact.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref, watch } from 'vue'\n\n defineOptions({\n inheritAttrs: false,\n })\n\n const props = defineProps<{\n code: unknown\n language: string\n line?: boolean\n }>()\n\n const highlightedHtml = ref('')\n\n const hasCode = computed(() => {\n if (typeof props.code === 'string') {\n return props.code\n }\n return JSON.stringify(props.code, null, 2)\n })\n\n async function highlight() {\n const hljs = (await import('highlight.js/lib/common')).default\n try {\n const result = props.language\n ? hljs.highlight(hasCode.value, { language: props.language })\n : hljs.highlightAuto(hasCode.value)\n highlightedHtml.value = result.value\n } catch {\n highlightedHtml.value = hasCode.value\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n }\n }\n\n watch(hasCode, highlight, { immediate: true })\n</script>\n\n<template>\n <pre\n :class=\"\n $attrs.class\n ? $attrs.class\n : 'font-mono leading-snug text-smaller bg-surface-1'\n \">\n <code :class=\"['hljs', line ? 'whitespace-pre-line' : 'whitespace-pre', language]\" v-html=\"highlightedHtml\"></code>\n </pre>\n</template>\n","<script setup lang=\"ts\">\n import { computed, ref, watch } from 'vue'\n\n defineOptions({\n inheritAttrs: false,\n })\n\n const props = defineProps<{\n code: unknown\n language: string\n line?: boolean\n }>()\n\n const highlightedHtml = ref('')\n\n const hasCode = computed(() => {\n if (typeof props.code === 'string') {\n return props.code\n }\n return JSON.stringify(props.code, null, 2)\n })\n\n async function highlight() {\n const hljs = (await import('highlight.js/lib/common')).default\n try {\n const result = props.language\n ? hljs.highlight(hasCode.value, { language: props.language })\n : hljs.highlightAuto(hasCode.value)\n highlightedHtml.value = result.value\n } catch {\n highlightedHtml.value = hasCode.value\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n }\n }\n\n watch(hasCode, highlight, { immediate: true })\n</script>\n\n<template>\n <pre\n :class=\"\n $attrs.class\n ? $attrs.class\n : 'font-mono leading-snug text-smaller bg-surface-1'\n \">\n <code :class=\"['hljs', line ? 'whitespace-pre-line' : 'whitespace-pre', language]\" v-html=\"highlightedHtml\"></code>\n </pre>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import PkCode from './PkCode.vue'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n\n const { copy, copied } = useClipboard()\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title: string\n content: string\n artifactType: string\n language?: string\n }\n }\n return part\n })\n\n const artifactTypeLabel = computed(() => {\n const labels: Record<string, string> = {\n code: 'Code',\n document: 'Document',\n markdown: 'Markdown',\n json: 'JSON',\n xml: 'XML',\n csv: 'CSV',\n html: 'HTML',\n yaml: 'YAML',\n sql: 'SQL',\n text: 'Text',\n }\n if (!toolPart.value.input?.artifactType) {\n return 'Artifact'\n }\n return labels[toolPart.value.input.artifactType] || 'Artifact'\n })\n\n const languageLabel = computed(() => {\n if (!toolPart.value.input?.language) {\n return ''\n }\n return ` (${toolPart.value.input.language})`\n })\n\n const isCodeType = computed(() => {\n return (\n toolPart.value.input?.artifactType === 'code' ||\n toolPart.value.input?.artifactType === 'json' ||\n toolPart.value.input?.artifactType === 'xml' ||\n toolPart.value.input?.artifactType === 'yaml' ||\n toolPart.value.input?.artifactType === 'html' ||\n toolPart.value.input?.artifactType === 'sql'\n )\n })\n\n const isMarkdownType = computed(() => {\n return toolPart.value.input?.artifactType === 'markdown'\n })\n\n const codeLanguage = computed(() => {\n if (toolPart.value.input?.language) {\n return toolPart.value.input.language\n }\n // Map artifact types to highlight.js languages\n const languageMap: Record<string, string> = {\n json: 'json',\n xml: 'xml',\n yaml: 'yaml',\n html: 'html',\n sql: 'sql',\n }\n if (!toolPart.value.input?.artifactType) {\n return 'plaintext'\n }\n return languageMap[toolPart.value.input.artifactType] || 'plaintext'\n })\n</script>\n\n<template>\n <div class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 font-bold bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex justify-between items-center\">\n <div class=\"flex flex-col items-start gap-4\">\n <span>{{ toolPart?.input?.title }}</span>\n <span class=\"text-10 opacity-60 font-normal\">\n {{ artifactTypeLabel }}{{ languageLabel }}\n </span>\n </div>\n <VvButton\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n modifiers=\"action-quiet-small\"\n :title=\"$t('action.copy')\"\n class=\"shrink-0\"\n @click=\"copy(toolPart?.input?.content || '')\" />\n </div>\n <div class=\"px-sm py-10\">\n <PkCode\n v-if=\"isCodeType\"\n :code=\"toolPart?.input?.content\"\n :language=\"codeLanguage\" />\n <PkStreamingMarkdown\n v-else-if=\"isMarkdownType\"\n :markdown=\"toolPart?.input?.content\"\n class=\"wysiwyg text-word-2\" />\n <pre\n v-else\n class=\"text-word-2 whitespace-pre-wrap break-words\"\n :class=\"{\n italic:\n toolPart?.input?.artifactType === 'document' ||\n toolPart?.input?.artifactType === 'text',\n }\"\n >{{ toolPart?.input?.content }}</pre\n >\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n import PkCode from './PkCode.vue'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n\n const { copy, copied } = useClipboard()\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title: string\n content: string\n artifactType: string\n language?: string\n }\n }\n return part\n })\n\n const artifactTypeLabel = computed(() => {\n const labels: Record<string, string> = {\n code: 'Code',\n document: 'Document',\n markdown: 'Markdown',\n json: 'JSON',\n xml: 'XML',\n csv: 'CSV',\n html: 'HTML',\n yaml: 'YAML',\n sql: 'SQL',\n text: 'Text',\n }\n if (!toolPart.value.input?.artifactType) {\n return 'Artifact'\n }\n return labels[toolPart.value.input.artifactType] || 'Artifact'\n })\n\n const languageLabel = computed(() => {\n if (!toolPart.value.input?.language) {\n return ''\n }\n return ` (${toolPart.value.input.language})`\n })\n\n const isCodeType = computed(() => {\n return (\n toolPart.value.input?.artifactType === 'code' ||\n toolPart.value.input?.artifactType === 'json' ||\n toolPart.value.input?.artifactType === 'xml' ||\n toolPart.value.input?.artifactType === 'yaml' ||\n toolPart.value.input?.artifactType === 'html' ||\n toolPart.value.input?.artifactType === 'sql'\n )\n })\n\n const isMarkdownType = computed(() => {\n return toolPart.value.input?.artifactType === 'markdown'\n })\n\n const codeLanguage = computed(() => {\n if (toolPart.value.input?.language) {\n return toolPart.value.input.language\n }\n // Map artifact types to highlight.js languages\n const languageMap: Record<string, string> = {\n json: 'json',\n xml: 'xml',\n yaml: 'yaml',\n html: 'html',\n sql: 'sql',\n }\n if (!toolPart.value.input?.artifactType) {\n return 'plaintext'\n }\n return languageMap[toolPart.value.input.artifactType] || 'plaintext'\n })\n</script>\n\n<template>\n <div class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 font-bold bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex justify-between items-center\">\n <div class=\"flex flex-col items-start gap-4\">\n <span>{{ toolPart?.input?.title }}</span>\n <span class=\"text-10 opacity-60 font-normal\">\n {{ artifactTypeLabel }}{{ languageLabel }}\n </span>\n </div>\n <VvButton\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n modifiers=\"action-quiet-small\"\n :title=\"$t('action.copy')\"\n class=\"shrink-0\"\n @click=\"copy(toolPart?.input?.content || '')\" />\n </div>\n <div class=\"px-sm py-10\">\n <PkCode\n v-if=\"isCodeType\"\n :code=\"toolPart?.input?.content\"\n :language=\"codeLanguage\" />\n <PkStreamingMarkdown\n v-else-if=\"isMarkdownType\"\n :markdown=\"toolPart?.input?.content\"\n class=\"wysiwyg text-word-2\" />\n <pre\n v-else\n class=\"text-word-2 whitespace-pre-wrap break-words\"\n :class=\"{\n italic:\n toolPart?.input?.artifactType === 'document' ||\n toolPart?.input?.artifactType === 'text',\n }\"\n >{{ toolPart?.input?.content }}</pre\n >\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAOI,IAAM,IAAQ,GAMR,IAAkB,EAAI,GAAE,EAExB,IAAU,QACR,OAAO,EAAM,QAAS,WACf,EAAM,OAEV,KAAK,UAAU,EAAM,MAAM,MAAM,EAAC,CAC5C;EAED,eAAe,IAAY;GACvB,IAAM,KAAQ,MAAM,OAAO,8DAA4B;AACvD,OAAI;AAIA,MAAgB,SAHD,EAAM,WACf,EAAK,UAAU,EAAQ,OAAO,EAAE,UAAU,EAAM,UAAU,CAAA,GAC1D,EAAK,cAAc,EAAQ,MAAK,EACP;WAC3B;AACJ,MAAgB,QAAQ,EAAQ,MAC3B,QAAQ,MAAM,QAAO,CACrB,QAAQ,MAAM,OAAM,CACpB,QAAQ,MAAM,OAAM;;;SAIjC,EAAM,GAAS,GAAW,EAAE,WAAW,IAAM,CAAA,kBAI7C,EAOM,OAAA,EAND,OAAK,EAAeA,EAAAA,OAAO,QAAwBA,EAAAA,OAAO,QAAA,mDAAA,EAAA,EAAA;cAIzD,YACF,GAAA;GAAA,EAAmH,QAAA;IAA5G,OAAK,EAAA;KAAA;KAAW,EAAA,OAAI,wBAAA;KAA6C,EAAA;KAAQ,CAAA;IAAG,WAAQ,EAAA;;cAAwB,UACvH,GAAA;;;;;;;EE1CA,IAAM,EAAE,SAAM,cAAW,GAAa,EAE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QAAA,MAAE,EAAA,EAAI,CAAC,EAAA,OAAU,OAAO,WAAO,GAAA;;;;;SAE7C,EAmBM,OAnBN,GAmBM,CAjBQ,EAAA,SAAA,GAAA,EADV,EAG+B,GAAA;;IAD1B,MAAM,EAAA,OAAU,OAAO;IACvB,UAAU,EAAA;wCAEA,EAAA,SAAA,GAAA,EADf,EAGkC,GAAA;;IAD7B,UAAU,EAAA,OAAU,OAAO;IAC5B,OAAM;sCACV,EASC,OAAA;;IAPG,OAAK,EAAA,CAAC,+CAA6C,EAAA,QACW,EAAA,OAAU,OAAO,iBAAY,cAA2C,EAAA,OAAU,OAAO,iBAAY,QAAA,CAAA,CAAA;QAK/J,EAAA,OAAU,OAAO,QAAO,EAAA,EAAA,EAAA,CAAA,CAAA,CAAA"}
@@ -1,8 +1,8 @@
1
- import { $ as e, C as t, E as n, Gt as r, O as i, Vt as a, _ as o, b as s, v as c, w as l, x as u, yt as d, z as f } from "./vue.runtime.esm-bundler-BmggS4HU.js";
2
- import { n as p } from "./vue-i18n-KvYvoek4.js";
3
- import { c as m, n as h, o as g, r as _, s as v } from "./index.es-CUjDCkXD.js";
4
- import { n as y } from "./src-C_wl-KYN.js";
5
- import { i as b } from "./dist-BTnzL-m0.js";
1
+ import { $ as e, C as t, E as n, Gt as r, O as i, Vt as a, _ as o, b as s, v as c, w as l, x as u, yt as d, z as f } from "./vue.runtime.esm-bundler-Dq29dQrz.js";
2
+ import { n as p } from "./vue-i18n-DAH6nDTN.js";
3
+ import { c as m, n as h, o as g, r as _, s as v } from "./index.es-7fUi-rc0.js";
4
+ import { n as y } from "./src-BfoQF6Z3.js";
5
+ import { i as b } from "./dist-yqV26MWM.js";
6
6
  //#region ../../packages/components/src/chat/PkToolShowCalendarEvent.vue?vue&type=script&setup=true&lang.ts
7
7
  var x = {
8
8
  key: 0,
@@ -142,4 +142,4 @@ var x = {
142
142
  //#endregion
143
143
  export { I as default };
144
144
 
145
- //# sourceMappingURL=PkToolShowCalendarEvent-cQpAAE3a.js.map
145
+ //# sourceMappingURL=PkToolShowCalendarEvent-BEqn5iEb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PkToolShowCalendarEvent-cQpAAE3a.js","names":["$t"],"sources":["../../../../packages/components/src/chat/PkToolShowCalendarEvent.vue","../../../../packages/components/src/chat/PkToolShowCalendarEvent.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { useClipboard } from '@vueuse/core'\n import { isSameSite } from 'utils'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n const { d } = useI18n()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title: string\n startDate: string\n endDate: string\n location?: string\n additionalInfo?: string\n allDay?: boolean\n }\n }\n return part\n })\n\n const dateDisplay = computed(() => {\n const input = toolPart.value.input\n if (!input) {\n return ''\n }\n const { startDate, endDate, allDay } = input\n const start = new Date(startDate)\n const end = new Date(endDate)\n const startDay = startDate.slice(0, 10)\n const endDay = endDate.slice(0, 10)\n if (allDay) {\n if (startDay === endDay) {\n return d(start, 'date-medium')\n }\n return `${d(start, 'date-medium')} - ${d(end, 'date-medium')}`\n }\n if (startDay === endDay) {\n return `${d(start, 'date-time-medium')} - ${d(end, 'time')}`\n }\n return `${d(start, 'date-time-medium')} - ${d(end, 'date-time-medium')}`\n })\n\n const calendarStart = computed(() =>\n toolPart.value.input ? new Date(toolPart.value.input.startDate) : null,\n )\n\n const calendarDay = computed(\n () => calendarStart.value?.getDate().toString() ?? '',\n )\n\n const calendarMonth = computed(() =>\n calendarStart.value ? d(calendarStart.value, 'month-short') : '',\n )\n\n // Floating time: remove dashes/colons without converting to UTC\n const toIcsDateTime = (iso: string) =>\n iso.replace(/[-:]/g, '').replace(/\\.\\d{3}$/, '')\n\n const escapeIcs = (str: string) =>\n str\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/;/g, '\\\\;')\n .replace(/,/g, '\\\\,')\n .replace(/\\n/g, '\\\\n')\n\n const generateIcs = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const ics = [\n 'BEGIN:VCALENDAR',\n 'VERSION:2.0',\n 'PRODID:-//8wave//8bot//EN',\n 'BEGIN:VEVENT',\n `DTSTART:${toIcsDateTime(startDate)}`,\n `DTEND:${toIcsDateTime(endDate)}`,\n `SUMMARY:${escapeIcs(title)}`,\n location ? `LOCATION:${escapeIcs(location)}` : '',\n additionalInfo ? `DESCRIPTION:${escapeIcs(additionalInfo)}` : '',\n `DTSTAMP:${new Date()\n .toISOString()\n .replace(/[-:]/g, '')\n .replace(/\\.\\d{3}/, '')}`,\n `UID:${crypto.randomUUID()}@8bot.ai`,\n 'END:VEVENT',\n 'END:VCALENDAR',\n ]\n .filter(Boolean)\n .join('\\r\\n')\n\n const blob = new Blob([ics], { type: 'text/calendar;charset=utf-8' })\n const url = URL.createObjectURL(blob)\n const a = document.createElement('a')\n a.href = url\n a.download = `${title.replace(/[^a-zA-Z0-9\\s-]/g, '')}.ics`\n a.click()\n URL.revokeObjectURL(url)\n }\n\n const openGoogleCalendar = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const start = toIcsDateTime(startDate)\n const end = toIcsDateTime(endDate)\n const params = new URLSearchParams({\n action: 'TEMPLATE',\n text: title,\n dates: `${start}/${end}`,\n })\n if (location) {\n params.set('location', location)\n }\n if (additionalInfo) {\n params.set('details', additionalInfo)\n }\n window.open(\n `https://calendar.google.com/calendar/render?${params.toString()}`,\n '_blank',\n )\n }\n\n const openOutlook = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const params = new URLSearchParams({\n subject: title,\n startdt: startDate,\n enddt: endDate,\n })\n if (location) {\n params.set('location', location)\n }\n if (additionalInfo) {\n params.set('body', additionalInfo)\n }\n window.open(\n `https://outlook.office.com/calendar/0/action/compose?${params.toString()}`,\n '_blank',\n )\n }\n\n const copyEvent = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const lines = [input.title, dateDisplay.value]\n if (input.location) {\n lines.push(input.location)\n }\n if (input.additionalInfo) {\n lines.push(input.additionalInfo)\n }\n copy(lines.join('\\n'))\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:calendar-event-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{ $t('label.calendarEvent') }}</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=\"copyEvent\" />\n <VvDropdown\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n }\">\n <VvButton\n icon=\"ri:calendar-line\"\n modifiers=\"action-quiet-small\"\n :label=\"$t('action.addToCalendar')\" />\n <template #items>\n <VvDropdownAction @click=\"openGoogleCalendar\">\n <VvIcon name=\"ri:google-line\" />\n Google Calendar\n </VvDropdownAction>\n <VvDropdownAction @click=\"openOutlook\">\n <VvIcon name=\"ri:microsoft-line\" />\n Outlook\n </VvDropdownAction>\n <VvDropdownAction @click=\"generateIcs\">\n <VvIcon name=\"ri:download-line\" />\n {{ $t('action.downloadIcs') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </VvButtonGroup>\n </div>\n <div class=\"p-sm flex gap-sm items-start\">\n <div\n class=\"shrink-0 w-44 rounded-lg overflow-hidden border border-surface-3 text-center select-none\">\n <div\n class=\"bg-brand px-8 py-2 text-white text-10 font-bold uppercase tracking-wide\">\n {{ calendarMonth }}\n </div>\n <div\n class=\"bg-surface-1 py-4 text-word-1 text-24 font-bold leading-none\">\n {{ calendarDay }}\n </div>\n </div>\n <div class=\"flex flex-col gap-4 min-w-0\">\n <p class=\"font-semibold text-word-1 text-14\">\n {{ toolPart.input.title }}\n </p>\n <div class=\"flex items-center gap-8 text-12 text-word-3\">\n <VvIcon name=\"ri:time-line\" class=\"text-14 shrink-0\" />\n <time :datetime=\"toolPart.input.startDate\">{{\n dateDisplay\n }}</time>\n </div>\n <div\n v-if=\"toolPart.input.location\"\n class=\"flex items-center gap-8 text-12 text-word-3\">\n <VvIcon name=\"ri:map-pin-line\" class=\"text-14 shrink-0\" />\n <a\n v-if=\"toolPart.input.location.startsWith('http')\"\n :href=\"toolPart.input.location\"\n :target=\"\n isSameSite(toolPart.input.location)\n ? undefined\n : '_blank'\n \"\n :rel=\"\n isSameSite(toolPart.input.location)\n ? undefined\n : 'noopener noreferrer'\n \"\n class=\"underline truncate\">\n {{ toolPart.input.location }}\n </a>\n <span v-else>{{ toolPart.input.location }}</span>\n </div>\n <div\n v-if=\"toolPart.input.additionalInfo\"\n class=\"flex items-start gap-8 text-12 text-word-3\">\n <VvIcon\n name=\"ri:sticky-note-line\"\n class=\"text-14 shrink-0 mt-1\" />\n <span>{{ toolPart.input.additionalInfo }}</span>\n </div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { useClipboard } from '@vueuse/core'\n import { isSameSite } from 'utils'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n const { d } = useI18n()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title: string\n startDate: string\n endDate: string\n location?: string\n additionalInfo?: string\n allDay?: boolean\n }\n }\n return part\n })\n\n const dateDisplay = computed(() => {\n const input = toolPart.value.input\n if (!input) {\n return ''\n }\n const { startDate, endDate, allDay } = input\n const start = new Date(startDate)\n const end = new Date(endDate)\n const startDay = startDate.slice(0, 10)\n const endDay = endDate.slice(0, 10)\n if (allDay) {\n if (startDay === endDay) {\n return d(start, 'date-medium')\n }\n return `${d(start, 'date-medium')} - ${d(end, 'date-medium')}`\n }\n if (startDay === endDay) {\n return `${d(start, 'date-time-medium')} - ${d(end, 'time')}`\n }\n return `${d(start, 'date-time-medium')} - ${d(end, 'date-time-medium')}`\n })\n\n const calendarStart = computed(() =>\n toolPart.value.input ? new Date(toolPart.value.input.startDate) : null,\n )\n\n const calendarDay = computed(\n () => calendarStart.value?.getDate().toString() ?? '',\n )\n\n const calendarMonth = computed(() =>\n calendarStart.value ? d(calendarStart.value, 'month-short') : '',\n )\n\n // Floating time: remove dashes/colons without converting to UTC\n const toIcsDateTime = (iso: string) =>\n iso.replace(/[-:]/g, '').replace(/\\.\\d{3}$/, '')\n\n const escapeIcs = (str: string) =>\n str\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/;/g, '\\\\;')\n .replace(/,/g, '\\\\,')\n .replace(/\\n/g, '\\\\n')\n\n const generateIcs = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const ics = [\n 'BEGIN:VCALENDAR',\n 'VERSION:2.0',\n 'PRODID:-//8wave//8bot//EN',\n 'BEGIN:VEVENT',\n `DTSTART:${toIcsDateTime(startDate)}`,\n `DTEND:${toIcsDateTime(endDate)}`,\n `SUMMARY:${escapeIcs(title)}`,\n location ? `LOCATION:${escapeIcs(location)}` : '',\n additionalInfo ? `DESCRIPTION:${escapeIcs(additionalInfo)}` : '',\n `DTSTAMP:${new Date()\n .toISOString()\n .replace(/[-:]/g, '')\n .replace(/\\.\\d{3}/, '')}`,\n `UID:${crypto.randomUUID()}@8bot.ai`,\n 'END:VEVENT',\n 'END:VCALENDAR',\n ]\n .filter(Boolean)\n .join('\\r\\n')\n\n const blob = new Blob([ics], { type: 'text/calendar;charset=utf-8' })\n const url = URL.createObjectURL(blob)\n const a = document.createElement('a')\n a.href = url\n a.download = `${title.replace(/[^a-zA-Z0-9\\s-]/g, '')}.ics`\n a.click()\n URL.revokeObjectURL(url)\n }\n\n const openGoogleCalendar = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const start = toIcsDateTime(startDate)\n const end = toIcsDateTime(endDate)\n const params = new URLSearchParams({\n action: 'TEMPLATE',\n text: title,\n dates: `${start}/${end}`,\n })\n if (location) {\n params.set('location', location)\n }\n if (additionalInfo) {\n params.set('details', additionalInfo)\n }\n window.open(\n `https://calendar.google.com/calendar/render?${params.toString()}`,\n '_blank',\n )\n }\n\n const openOutlook = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const params = new URLSearchParams({\n subject: title,\n startdt: startDate,\n enddt: endDate,\n })\n if (location) {\n params.set('location', location)\n }\n if (additionalInfo) {\n params.set('body', additionalInfo)\n }\n window.open(\n `https://outlook.office.com/calendar/0/action/compose?${params.toString()}`,\n '_blank',\n )\n }\n\n const copyEvent = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const lines = [input.title, dateDisplay.value]\n if (input.location) {\n lines.push(input.location)\n }\n if (input.additionalInfo) {\n lines.push(input.additionalInfo)\n }\n copy(lines.join('\\n'))\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:calendar-event-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{ $t('label.calendarEvent') }}</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=\"copyEvent\" />\n <VvDropdown\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n }\">\n <VvButton\n icon=\"ri:calendar-line\"\n modifiers=\"action-quiet-small\"\n :label=\"$t('action.addToCalendar')\" />\n <template #items>\n <VvDropdownAction @click=\"openGoogleCalendar\">\n <VvIcon name=\"ri:google-line\" />\n Google Calendar\n </VvDropdownAction>\n <VvDropdownAction @click=\"openOutlook\">\n <VvIcon name=\"ri:microsoft-line\" />\n Outlook\n </VvDropdownAction>\n <VvDropdownAction @click=\"generateIcs\">\n <VvIcon name=\"ri:download-line\" />\n {{ $t('action.downloadIcs') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </VvButtonGroup>\n </div>\n <div class=\"p-sm flex gap-sm items-start\">\n <div\n class=\"shrink-0 w-44 rounded-lg overflow-hidden border border-surface-3 text-center select-none\">\n <div\n class=\"bg-brand px-8 py-2 text-white text-10 font-bold uppercase tracking-wide\">\n {{ calendarMonth }}\n </div>\n <div\n class=\"bg-surface-1 py-4 text-word-1 text-24 font-bold leading-none\">\n {{ calendarDay }}\n </div>\n </div>\n <div class=\"flex flex-col gap-4 min-w-0\">\n <p class=\"font-semibold text-word-1 text-14\">\n {{ toolPart.input.title }}\n </p>\n <div class=\"flex items-center gap-8 text-12 text-word-3\">\n <VvIcon name=\"ri:time-line\" class=\"text-14 shrink-0\" />\n <time :datetime=\"toolPart.input.startDate\">{{\n dateDisplay\n }}</time>\n </div>\n <div\n v-if=\"toolPart.input.location\"\n class=\"flex items-center gap-8 text-12 text-word-3\">\n <VvIcon name=\"ri:map-pin-line\" class=\"text-14 shrink-0\" />\n <a\n v-if=\"toolPart.input.location.startsWith('http')\"\n :href=\"toolPart.input.location\"\n :target=\"\n isSameSite(toolPart.input.location)\n ? undefined\n : '_blank'\n \"\n :rel=\"\n isSameSite(toolPart.input.location)\n ? undefined\n : 'noopener noreferrer'\n \"\n class=\"underline truncate\">\n {{ toolPart.input.location }}\n </a>\n <span v-else>{{ toolPart.input.location }}</span>\n </div>\n <div\n v-if=\"toolPart.input.additionalInfo\"\n class=\"flex items-start gap-8 text-12 text-word-3\">\n <VvIcon\n name=\"ri:sticky-note-line\"\n class=\"text-14 shrink-0 mt-1\" />\n <span>{{ toolPart.input.additionalInfo }}</span>\n </div>\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;EAMI,IAAM,IAAQ,GAIR,EAAE,SAAM,cAAW,GAAa,EAChC,EAAE,SAAM,GAAQ,EAEhB,IAAW,QACA,EAAM,KAWtB,EAEK,IAAc,QAAe;GAC/B,IAAM,IAAQ,EAAS,MAAM;AAC7B,OAAI,CAAC,EACD,QAAO;GAEX,IAAM,EAAE,cAAW,YAAS,cAAW,GACjC,IAAQ,IAAI,KAAK,EAAS,EAC1B,IAAM,IAAI,KAAK,EAAO,EACtB,IAAW,EAAU,MAAM,GAAG,GAAE,EAChC,IAAS,EAAQ,MAAM,GAAG,GAAE;AAUlC,UATI,IACI,MAAa,IACN,EAAE,GAAO,cAAa,GAE1B,GAAG,EAAE,GAAO,cAAc,CAAC,KAAK,EAAE,GAAK,cAAc,KAE5D,MAAa,IACN,GAAG,EAAE,GAAO,mBAAmB,CAAC,KAAK,EAAE,GAAK,OAAO,KAEvD,GAAG,EAAE,GAAO,mBAAmB,CAAC,KAAK,EAAE,GAAK,mBAAmB;IACzE,EAEK,IAAgB,QAClB,EAAS,MAAM,QAAQ,IAAI,KAAK,EAAS,MAAM,MAAM,UAAU,GAAG,KACtE,EAEM,IAAc,QACV,EAAc,OAAO,SAAS,CAAC,UAAU,IAAI,GACvD,EAEM,IAAgB,QAClB,EAAc,QAAQ,EAAE,EAAc,OAAO,cAAc,GAAG,GAClE,EAGM,KAAiB,MACnB,EAAI,QAAQ,SAAS,GAAG,CAAC,QAAQ,YAAY,GAAE,EAE7C,KAAa,MACf,EACK,QAAQ,OAAO,OAAM,CACrB,QAAQ,MAAM,MAAK,CACnB,QAAQ,MAAM,MAAK,CACnB,QAAQ,OAAO,MAAK,EAEvB,UAAoB;GACtB,IAAM,IAAQ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AQ,EAAA,EAAA,EAAA,CAAA,IAAA,EAAA,IAAA,GAAA;IAGjC,EAAA,MAAS,MAAM,kBAAA,GAAA,EADzB,EAOM,OAPN,GAOM,CAJF,EAEoC,GAAA;KADhC,MAAK;KACL,OAAM;QACV,EAAgD,QAAA,MAAA,EAAvC,EAAA,MAAS,MAAM,eAAc,EAAA,EAAA,CAAA,CAAA,IAAA,EAAA,IAAA,GAAA"}
1
+ {"version":3,"file":"PkToolShowCalendarEvent-BEqn5iEb.js","names":["$t"],"sources":["../../../../packages/components/src/chat/PkToolShowCalendarEvent.vue","../../../../packages/components/src/chat/PkToolShowCalendarEvent.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { useClipboard } from '@vueuse/core'\n import { isSameSite } from 'utils'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n const { d } = useI18n()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title: string\n startDate: string\n endDate: string\n location?: string\n additionalInfo?: string\n allDay?: boolean\n }\n }\n return part\n })\n\n const dateDisplay = computed(() => {\n const input = toolPart.value.input\n if (!input) {\n return ''\n }\n const { startDate, endDate, allDay } = input\n const start = new Date(startDate)\n const end = new Date(endDate)\n const startDay = startDate.slice(0, 10)\n const endDay = endDate.slice(0, 10)\n if (allDay) {\n if (startDay === endDay) {\n return d(start, 'date-medium')\n }\n return `${d(start, 'date-medium')} - ${d(end, 'date-medium')}`\n }\n if (startDay === endDay) {\n return `${d(start, 'date-time-medium')} - ${d(end, 'time')}`\n }\n return `${d(start, 'date-time-medium')} - ${d(end, 'date-time-medium')}`\n })\n\n const calendarStart = computed(() =>\n toolPart.value.input ? new Date(toolPart.value.input.startDate) : null,\n )\n\n const calendarDay = computed(\n () => calendarStart.value?.getDate().toString() ?? '',\n )\n\n const calendarMonth = computed(() =>\n calendarStart.value ? d(calendarStart.value, 'month-short') : '',\n )\n\n // Floating time: remove dashes/colons without converting to UTC\n const toIcsDateTime = (iso: string) =>\n iso.replace(/[-:]/g, '').replace(/\\.\\d{3}$/, '')\n\n const escapeIcs = (str: string) =>\n str\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/;/g, '\\\\;')\n .replace(/,/g, '\\\\,')\n .replace(/\\n/g, '\\\\n')\n\n const generateIcs = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const ics = [\n 'BEGIN:VCALENDAR',\n 'VERSION:2.0',\n 'PRODID:-//8wave//8bot//EN',\n 'BEGIN:VEVENT',\n `DTSTART:${toIcsDateTime(startDate)}`,\n `DTEND:${toIcsDateTime(endDate)}`,\n `SUMMARY:${escapeIcs(title)}`,\n location ? `LOCATION:${escapeIcs(location)}` : '',\n additionalInfo ? `DESCRIPTION:${escapeIcs(additionalInfo)}` : '',\n `DTSTAMP:${new Date()\n .toISOString()\n .replace(/[-:]/g, '')\n .replace(/\\.\\d{3}/, '')}`,\n `UID:${crypto.randomUUID()}@8bot.ai`,\n 'END:VEVENT',\n 'END:VCALENDAR',\n ]\n .filter(Boolean)\n .join('\\r\\n')\n\n const blob = new Blob([ics], { type: 'text/calendar;charset=utf-8' })\n const url = URL.createObjectURL(blob)\n const a = document.createElement('a')\n a.href = url\n a.download = `${title.replace(/[^a-zA-Z0-9\\s-]/g, '')}.ics`\n a.click()\n URL.revokeObjectURL(url)\n }\n\n const openGoogleCalendar = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const start = toIcsDateTime(startDate)\n const end = toIcsDateTime(endDate)\n const params = new URLSearchParams({\n action: 'TEMPLATE',\n text: title,\n dates: `${start}/${end}`,\n })\n if (location) {\n params.set('location', location)\n }\n if (additionalInfo) {\n params.set('details', additionalInfo)\n }\n window.open(\n `https://calendar.google.com/calendar/render?${params.toString()}`,\n '_blank',\n )\n }\n\n const openOutlook = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const params = new URLSearchParams({\n subject: title,\n startdt: startDate,\n enddt: endDate,\n })\n if (location) {\n params.set('location', location)\n }\n if (additionalInfo) {\n params.set('body', additionalInfo)\n }\n window.open(\n `https://outlook.office.com/calendar/0/action/compose?${params.toString()}`,\n '_blank',\n )\n }\n\n const copyEvent = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const lines = [input.title, dateDisplay.value]\n if (input.location) {\n lines.push(input.location)\n }\n if (input.additionalInfo) {\n lines.push(input.additionalInfo)\n }\n copy(lines.join('\\n'))\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:calendar-event-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{ $t('label.calendarEvent') }}</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=\"copyEvent\" />\n <VvDropdown\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n }\">\n <VvButton\n icon=\"ri:calendar-line\"\n modifiers=\"action-quiet-small\"\n :label=\"$t('action.addToCalendar')\" />\n <template #items>\n <VvDropdownAction @click=\"openGoogleCalendar\">\n <VvIcon name=\"ri:google-line\" />\n Google Calendar\n </VvDropdownAction>\n <VvDropdownAction @click=\"openOutlook\">\n <VvIcon name=\"ri:microsoft-line\" />\n Outlook\n </VvDropdownAction>\n <VvDropdownAction @click=\"generateIcs\">\n <VvIcon name=\"ri:download-line\" />\n {{ $t('action.downloadIcs') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </VvButtonGroup>\n </div>\n <div class=\"p-sm flex gap-sm items-start\">\n <div\n class=\"shrink-0 w-44 rounded-lg overflow-hidden border border-surface-3 text-center select-none\">\n <div\n class=\"bg-brand px-8 py-2 text-white text-10 font-bold uppercase tracking-wide\">\n {{ calendarMonth }}\n </div>\n <div\n class=\"bg-surface-1 py-4 text-word-1 text-24 font-bold leading-none\">\n {{ calendarDay }}\n </div>\n </div>\n <div class=\"flex flex-col gap-4 min-w-0\">\n <p class=\"font-semibold text-word-1 text-14\">\n {{ toolPart.input.title }}\n </p>\n <div class=\"flex items-center gap-8 text-12 text-word-3\">\n <VvIcon name=\"ri:time-line\" class=\"text-14 shrink-0\" />\n <time :datetime=\"toolPart.input.startDate\">{{\n dateDisplay\n }}</time>\n </div>\n <div\n v-if=\"toolPart.input.location\"\n class=\"flex items-center gap-8 text-12 text-word-3\">\n <VvIcon name=\"ri:map-pin-line\" class=\"text-14 shrink-0\" />\n <a\n v-if=\"toolPart.input.location.startsWith('http')\"\n :href=\"toolPart.input.location\"\n :target=\"\n isSameSite(toolPart.input.location)\n ? undefined\n : '_blank'\n \"\n :rel=\"\n isSameSite(toolPart.input.location)\n ? undefined\n : 'noopener noreferrer'\n \"\n class=\"underline truncate\">\n {{ toolPart.input.location }}\n </a>\n <span v-else>{{ toolPart.input.location }}</span>\n </div>\n <div\n v-if=\"toolPart.input.additionalInfo\"\n class=\"flex items-start gap-8 text-12 text-word-3\">\n <VvIcon\n name=\"ri:sticky-note-line\"\n class=\"text-14 shrink-0 mt-1\" />\n <span>{{ toolPart.input.additionalInfo }}</span>\n </div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { useClipboard } from '@vueuse/core'\n import { isSameSite } from 'utils'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n const { d } = useI18n()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title: string\n startDate: string\n endDate: string\n location?: string\n additionalInfo?: string\n allDay?: boolean\n }\n }\n return part\n })\n\n const dateDisplay = computed(() => {\n const input = toolPart.value.input\n if (!input) {\n return ''\n }\n const { startDate, endDate, allDay } = input\n const start = new Date(startDate)\n const end = new Date(endDate)\n const startDay = startDate.slice(0, 10)\n const endDay = endDate.slice(0, 10)\n if (allDay) {\n if (startDay === endDay) {\n return d(start, 'date-medium')\n }\n return `${d(start, 'date-medium')} - ${d(end, 'date-medium')}`\n }\n if (startDay === endDay) {\n return `${d(start, 'date-time-medium')} - ${d(end, 'time')}`\n }\n return `${d(start, 'date-time-medium')} - ${d(end, 'date-time-medium')}`\n })\n\n const calendarStart = computed(() =>\n toolPart.value.input ? new Date(toolPart.value.input.startDate) : null,\n )\n\n const calendarDay = computed(\n () => calendarStart.value?.getDate().toString() ?? '',\n )\n\n const calendarMonth = computed(() =>\n calendarStart.value ? d(calendarStart.value, 'month-short') : '',\n )\n\n // Floating time: remove dashes/colons without converting to UTC\n const toIcsDateTime = (iso: string) =>\n iso.replace(/[-:]/g, '').replace(/\\.\\d{3}$/, '')\n\n const escapeIcs = (str: string) =>\n str\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/;/g, '\\\\;')\n .replace(/,/g, '\\\\,')\n .replace(/\\n/g, '\\\\n')\n\n const generateIcs = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const ics = [\n 'BEGIN:VCALENDAR',\n 'VERSION:2.0',\n 'PRODID:-//8wave//8bot//EN',\n 'BEGIN:VEVENT',\n `DTSTART:${toIcsDateTime(startDate)}`,\n `DTEND:${toIcsDateTime(endDate)}`,\n `SUMMARY:${escapeIcs(title)}`,\n location ? `LOCATION:${escapeIcs(location)}` : '',\n additionalInfo ? `DESCRIPTION:${escapeIcs(additionalInfo)}` : '',\n `DTSTAMP:${new Date()\n .toISOString()\n .replace(/[-:]/g, '')\n .replace(/\\.\\d{3}/, '')}`,\n `UID:${crypto.randomUUID()}@8bot.ai`,\n 'END:VEVENT',\n 'END:VCALENDAR',\n ]\n .filter(Boolean)\n .join('\\r\\n')\n\n const blob = new Blob([ics], { type: 'text/calendar;charset=utf-8' })\n const url = URL.createObjectURL(blob)\n const a = document.createElement('a')\n a.href = url\n a.download = `${title.replace(/[^a-zA-Z0-9\\s-]/g, '')}.ics`\n a.click()\n URL.revokeObjectURL(url)\n }\n\n const openGoogleCalendar = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const start = toIcsDateTime(startDate)\n const end = toIcsDateTime(endDate)\n const params = new URLSearchParams({\n action: 'TEMPLATE',\n text: title,\n dates: `${start}/${end}`,\n })\n if (location) {\n params.set('location', location)\n }\n if (additionalInfo) {\n params.set('details', additionalInfo)\n }\n window.open(\n `https://calendar.google.com/calendar/render?${params.toString()}`,\n '_blank',\n )\n }\n\n const openOutlook = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const { title, startDate, endDate, location, additionalInfo } = input\n const params = new URLSearchParams({\n subject: title,\n startdt: startDate,\n enddt: endDate,\n })\n if (location) {\n params.set('location', location)\n }\n if (additionalInfo) {\n params.set('body', additionalInfo)\n }\n window.open(\n `https://outlook.office.com/calendar/0/action/compose?${params.toString()}`,\n '_blank',\n )\n }\n\n const copyEvent = () => {\n const input = toolPart.value.input\n if (!input) {\n return\n }\n const lines = [input.title, dateDisplay.value]\n if (input.location) {\n lines.push(input.location)\n }\n if (input.additionalInfo) {\n lines.push(input.additionalInfo)\n }\n copy(lines.join('\\n'))\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:calendar-event-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{ $t('label.calendarEvent') }}</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=\"copyEvent\" />\n <VvDropdown\n v-bind=\"{\n placement: 'bottom-end',\n modifiers: 'menu',\n flip: true,\n offset: 3,\n }\">\n <VvButton\n icon=\"ri:calendar-line\"\n modifiers=\"action-quiet-small\"\n :label=\"$t('action.addToCalendar')\" />\n <template #items>\n <VvDropdownAction @click=\"openGoogleCalendar\">\n <VvIcon name=\"ri:google-line\" />\n Google Calendar\n </VvDropdownAction>\n <VvDropdownAction @click=\"openOutlook\">\n <VvIcon name=\"ri:microsoft-line\" />\n Outlook\n </VvDropdownAction>\n <VvDropdownAction @click=\"generateIcs\">\n <VvIcon name=\"ri:download-line\" />\n {{ $t('action.downloadIcs') }}\n </VvDropdownAction>\n </template>\n </VvDropdown>\n </VvButtonGroup>\n </div>\n <div class=\"p-sm flex gap-sm items-start\">\n <div\n class=\"shrink-0 w-44 rounded-lg overflow-hidden border border-surface-3 text-center select-none\">\n <div\n class=\"bg-brand px-8 py-2 text-white text-10 font-bold uppercase tracking-wide\">\n {{ calendarMonth }}\n </div>\n <div\n class=\"bg-surface-1 py-4 text-word-1 text-24 font-bold leading-none\">\n {{ calendarDay }}\n </div>\n </div>\n <div class=\"flex flex-col gap-4 min-w-0\">\n <p class=\"font-semibold text-word-1 text-14\">\n {{ toolPart.input.title }}\n </p>\n <div class=\"flex items-center gap-8 text-12 text-word-3\">\n <VvIcon name=\"ri:time-line\" class=\"text-14 shrink-0\" />\n <time :datetime=\"toolPart.input.startDate\">{{\n dateDisplay\n }}</time>\n </div>\n <div\n v-if=\"toolPart.input.location\"\n class=\"flex items-center gap-8 text-12 text-word-3\">\n <VvIcon name=\"ri:map-pin-line\" class=\"text-14 shrink-0\" />\n <a\n v-if=\"toolPart.input.location.startsWith('http')\"\n :href=\"toolPart.input.location\"\n :target=\"\n isSameSite(toolPart.input.location)\n ? undefined\n : '_blank'\n \"\n :rel=\"\n isSameSite(toolPart.input.location)\n ? undefined\n : 'noopener noreferrer'\n \"\n class=\"underline truncate\">\n {{ toolPart.input.location }}\n </a>\n <span v-else>{{ toolPart.input.location }}</span>\n </div>\n <div\n v-if=\"toolPart.input.additionalInfo\"\n class=\"flex items-start gap-8 text-12 text-word-3\">\n <VvIcon\n name=\"ri:sticky-note-line\"\n class=\"text-14 shrink-0 mt-1\" />\n <span>{{ toolPart.input.additionalInfo }}</span>\n </div>\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;EAMI,IAAM,IAAQ,GAIR,EAAE,SAAM,cAAW,GAAa,EAChC,EAAE,SAAM,GAAQ,EAEhB,IAAW,QACA,EAAM,KAWtB,EAEK,IAAc,QAAe;GAC/B,IAAM,IAAQ,EAAS,MAAM;AAC7B,OAAI,CAAC,EACD,QAAO;GAEX,IAAM,EAAE,cAAW,YAAS,cAAW,GACjC,IAAQ,IAAI,KAAK,EAAS,EAC1B,IAAM,IAAI,KAAK,EAAO,EACtB,IAAW,EAAU,MAAM,GAAG,GAAE,EAChC,IAAS,EAAQ,MAAM,GAAG,GAAE;AAUlC,UATI,IACI,MAAa,IACN,EAAE,GAAO,cAAa,GAE1B,GAAG,EAAE,GAAO,cAAc,CAAC,KAAK,EAAE,GAAK,cAAc,KAE5D,MAAa,IACN,GAAG,EAAE,GAAO,mBAAmB,CAAC,KAAK,EAAE,GAAK,OAAO,KAEvD,GAAG,EAAE,GAAO,mBAAmB,CAAC,KAAK,EAAE,GAAK,mBAAmB;IACzE,EAEK,IAAgB,QAClB,EAAS,MAAM,QAAQ,IAAI,KAAK,EAAS,MAAM,MAAM,UAAU,GAAG,KACtE,EAEM,IAAc,QACV,EAAc,OAAO,SAAS,CAAC,UAAU,IAAI,GACvD,EAEM,IAAgB,QAClB,EAAc,QAAQ,EAAE,EAAc,OAAO,cAAc,GAAG,GAClE,EAGM,KAAiB,MACnB,EAAI,QAA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EAAA,EAAU,CAAC,EAAA,MAAS,MAAM,SAAQ,GAAoC,KAAA,IAAA;KAKzG,OAAM;SACH,EAAA,MAAS,MAAM,SAAQ,EAAA,GAAA,EAAA,KAAA,GAAA,EAE9B,EAAiD,QAAA,GAAA,EAAjC,EAAA,MAAS,MAAM,SAAQ,EAAA,EAAA,EAAA,CAAA,IAAA,EAAA,IAAA,GAAA;IAGjC,EAAA,MAAS,MAAM,kBAAA,GAAA,EADzB,EAOM,OAPN,GAOM,CAJF,EAEoC,GAAA;KADhC,MAAK;KACL,OAAM;QACV,EAAgD,QAAA,MAAA,EAAvC,EAAA,MAAS,MAAM,eAAc,EAAA,EAAA,CAAA,CAAA,IAAA,EAAA,IAAA,GAAA"}
@@ -1,6 +1,6 @@
1
- import { $ as e, Bt as t, C as n, E as r, Gt as i, V as a, _ as o, b as s, h as c, v as l, w as u, x as d, yt as f, z as p } from "./vue.runtime.esm-bundler-BmggS4HU.js";
2
- import { c as m, n as h, o as g } from "./index.es-CUjDCkXD.js";
3
- import { i as _ } from "./dist-BTnzL-m0.js";
1
+ import { $ as e, Bt as t, C as n, E as r, Gt as i, V as a, _ as o, b as s, h as c, v as l, w as u, x as d, yt as f, z as p } from "./vue.runtime.esm-bundler-Dq29dQrz.js";
2
+ import { c as m, n as h, o as g } from "./index.es-7fUi-rc0.js";
3
+ import { i as _ } from "./dist-yqV26MWM.js";
4
4
  //#region ../../packages/components/src/chat/PkToolShowComparison.vue?vue&type=script&setup=true&lang.ts
5
5
  var v = {
6
6
  key: 0,
@@ -61,4 +61,4 @@ var v = {
61
61
  //#endregion
62
62
  export { w as default };
63
63
 
64
- //# sourceMappingURL=PkToolShowComparison-Cu-zT8-Z.js.map
64
+ //# sourceMappingURL=PkToolShowComparison-p34r0Hhd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PkToolShowComparison-Cu-zT8-Z.js","names":["$t"],"sources":["../../../../packages/components/src/chat/PkToolShowComparison.vue","../../../../packages/components/src/chat/PkToolShowComparison.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\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 title?: string\n items: Array<{\n name: string\n values: Record<string, string>\n highlighted?: boolean\n }>\n }\n }\n return part\n })\n\n const features = computed(() => {\n const items = toolPart.value.input?.items\n if (!items || items.length === 0) {\n return []\n }\n return Object.keys(items[0].values)\n })\n\n const copyTable = () => {\n const items = toolPart.value.input?.items\n if (!items) {\n return\n }\n const header = ['', ...items.map((i) => i.name)].join('\\t')\n const rows = features.value.map((f) =>\n [f.replace(/_/g, ' '), ...items.map((i) => i.values[f] ?? '')].join(\n '\\t',\n ),\n )\n copy([header, ...rows].join('\\n'))\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input?.items?.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:scales-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{\n toolPart.input.title ?? $t('label.comparison')\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=\"copyTable\" />\n </VvButtonGroup>\n </div>\n <div class=\"overflow-x-auto\">\n <table class=\"w-full text-12 border-collapse\">\n <thead>\n <tr>\n <th\n class=\"text-left text-word-3 font-medium p-8 border-b border-surface-3 min-w-32\"></th>\n <th\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n class=\"text-center font-semibold text-word-1 p-8 border-b border-surface-3 min-w-24\"\n :class=\"\n item.highlighted\n ? 'bg-primary/5 border-primary/20'\n : ''\n \">\n {{ item.name }}\n <span v-if=\"item.highlighted\" class=\"ml-4\">⭐</span>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n v-for=\"(feature, fIdx) in features\"\n :key=\"feature\"\n :class=\"{ 'bg-surface-1': fIdx % 2 !== 0 }\">\n <td\n class=\"text-word-3 font-medium p-8 whitespace-nowrap\"\n :class=\"{\n 'border-b border-surface-3':\n fIdx !== features.length - 1,\n }\">\n {{ feature.replace(/_/g, ' ') }}\n </td>\n <td\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n class=\"text-center p-8\"\n :class=\"{\n 'border-b border-surface-3':\n fIdx !== features.length - 1,\n 'bg-surface-info': item.highlighted,\n 'text-success': item.values[feature] === '✓',\n 'text-danger':\n item.values[feature] === '\\u2717',\n 'text-word-2':\n item.values[feature] !== '✓' &&\n item.values[feature] !== '\\u2717',\n }\">\n {{ item.values[feature] ?? '—' }}\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\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 title?: string\n items: Array<{\n name: string\n values: Record<string, string>\n highlighted?: boolean\n }>\n }\n }\n return part\n })\n\n const features = computed(() => {\n const items = toolPart.value.input?.items\n if (!items || items.length === 0) {\n return []\n }\n return Object.keys(items[0].values)\n })\n\n const copyTable = () => {\n const items = toolPart.value.input?.items\n if (!items) {\n return\n }\n const header = ['', ...items.map((i) => i.name)].join('\\t')\n const rows = features.value.map((f) =>\n [f.replace(/_/g, ' '), ...items.map((i) => i.values[f] ?? '')].join(\n '\\t',\n ),\n )\n copy([header, ...rows].join('\\n'))\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input?.items?.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:scales-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{\n toolPart.input.title ?? $t('label.comparison')\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=\"copyTable\" />\n </VvButtonGroup>\n </div>\n <div class=\"overflow-x-auto\">\n <table class=\"w-full text-12 border-collapse\">\n <thead>\n <tr>\n <th\n class=\"text-left text-word-3 font-medium p-8 border-b border-surface-3 min-w-32\"></th>\n <th\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n class=\"text-center font-semibold text-word-1 p-8 border-b border-surface-3 min-w-24\"\n :class=\"\n item.highlighted\n ? 'bg-primary/5 border-primary/20'\n : ''\n \">\n {{ item.name }}\n <span v-if=\"item.highlighted\" class=\"ml-4\">⭐</span>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n v-for=\"(feature, fIdx) in features\"\n :key=\"feature\"\n :class=\"{ 'bg-surface-1': fIdx % 2 !== 0 }\">\n <td\n class=\"text-word-3 font-medium p-8 whitespace-nowrap\"\n :class=\"{\n 'border-b border-surface-3':\n fIdx !== features.length - 1,\n }\">\n {{ feature.replace(/_/g, ' ') }}\n </td>\n <td\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n class=\"text-center p-8\"\n :class=\"{\n 'border-b border-surface-3':\n fIdx !== features.length - 1,\n 'bg-surface-info': item.highlighted,\n 'text-success': item.values[feature] === '✓',\n 'text-danger':\n item.values[feature] === '\\u2717',\n 'text-word-2':\n item.values[feature] !== '✓' &&\n item.values[feature] !== '\\u2717',\n }\">\n {{ item.values[feature] ?? '—' }}\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAII,IAAM,IAAQ,GAIR,EAAE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,MAAM,QAAvB,YADX,EAWK,MAAA;IATA,KAAK,EAAK;IACX,OAAK,EAAA,CAAC,gFACmC,EAAK,cAAA,mCAAA,GAAA,CAAA;WAK3C,EAAK,KAAI,GAAG,KACf,EAAA,EAAY,EAAK,eAAA,GAAA,EAAjB,EAAmD,QAAnD,GAA2C,IAAC,IAAA,EAAA,IAAA,GAAA,CAAA,EAAA,EAAA,eAIxD,EA+BQ,SAAA,MAAA,EAAA,EAAA,GAAA,EA9BJ,EA6BK,GAAA,MAAA,EA5ByB,EAAA,QAAlB,GAAS,YADrB,EA6BK,MAAA;IA3BA,KAAK;IACL,OAAK,EAAA,EAAA,gBAAoB,IAAI,KAAA,GAAA,CAAA;OAC9B,EAOK,MAAA,EAND,OAAK,EAAA,CAAC,iDAA+C,EAAA,6BACsD,MAAS,EAAA,MAAS,SAAM,GAAA,CAAA,CAAA,EAAA,EAAA,EAIhI,EAAQ,QAAO,MAAA,IAAA,CAAA,EAAA,EAAA,GAAA,EAAA,GAAA,EAEtB,EAgBK,GAAA,MAAA,EAfc,EAAA,MAAS,MAAM,QAAvB,YADX,EAgBK,MAAA;IAdA,KAAK,EAAK;IACX,OAAK,EAAA,CAAC,mBAAiB;kCACoF,MAAS,EAAA,MAAS,SAAM;wBAAyD,EAAK;qBAA6D,EAAK,OAAO,OAAO;oBAA8F,EAAK,OAAO,OAAO;oBAAmG,EAAK,OAAO,OAAO,OAAiD,EAAK,OAAO,OAAO;;QAWzjB,EAAK,OAAO,MAAO,IAAA,EAAA,EAAA"}
1
+ {"version":3,"file":"PkToolShowComparison-p34r0Hhd.js","names":["$t"],"sources":["../../../../packages/components/src/chat/PkToolShowComparison.vue","../../../../packages/components/src/chat/PkToolShowComparison.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\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 title?: string\n items: Array<{\n name: string\n values: Record<string, string>\n highlighted?: boolean\n }>\n }\n }\n return part\n })\n\n const features = computed(() => {\n const items = toolPart.value.input?.items\n if (!items || items.length === 0) {\n return []\n }\n return Object.keys(items[0].values)\n })\n\n const copyTable = () => {\n const items = toolPart.value.input?.items\n if (!items) {\n return\n }\n const header = ['', ...items.map((i) => i.name)].join('\\t')\n const rows = features.value.map((f) =>\n [f.replace(/_/g, ' '), ...items.map((i) => i.values[f] ?? '')].join(\n '\\t',\n ),\n )\n copy([header, ...rows].join('\\n'))\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input?.items?.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:scales-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{\n toolPart.input.title ?? $t('label.comparison')\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=\"copyTable\" />\n </VvButtonGroup>\n </div>\n <div class=\"overflow-x-auto\">\n <table class=\"w-full text-12 border-collapse\">\n <thead>\n <tr>\n <th\n class=\"text-left text-word-3 font-medium p-8 border-b border-surface-3 min-w-32\"></th>\n <th\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n class=\"text-center font-semibold text-word-1 p-8 border-b border-surface-3 min-w-24\"\n :class=\"\n item.highlighted\n ? 'bg-primary/5 border-primary/20'\n : ''\n \">\n {{ item.name }}\n <span v-if=\"item.highlighted\" class=\"ml-4\">⭐</span>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n v-for=\"(feature, fIdx) in features\"\n :key=\"feature\"\n :class=\"{ 'bg-surface-1': fIdx % 2 !== 0 }\">\n <td\n class=\"text-word-3 font-medium p-8 whitespace-nowrap\"\n :class=\"{\n 'border-b border-surface-3':\n fIdx !== features.length - 1,\n }\">\n {{ feature.replace(/_/g, ' ') }}\n </td>\n <td\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n class=\"text-center p-8\"\n :class=\"{\n 'border-b border-surface-3':\n fIdx !== features.length - 1,\n 'bg-surface-info': item.highlighted,\n 'text-success': item.values[feature] === '✓',\n 'text-danger':\n item.values[feature] === '\\u2717',\n 'text-word-2':\n item.values[feature] !== '✓' &&\n item.values[feature] !== '\\u2717',\n }\">\n {{ item.values[feature] ?? '—' }}\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\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 title?: string\n items: Array<{\n name: string\n values: Record<string, string>\n highlighted?: boolean\n }>\n }\n }\n return part\n })\n\n const features = computed(() => {\n const items = toolPart.value.input?.items\n if (!items || items.length === 0) {\n return []\n }\n return Object.keys(items[0].values)\n })\n\n const copyTable = () => {\n const items = toolPart.value.input?.items\n if (!items) {\n return\n }\n const header = ['', ...items.map((i) => i.name)].join('\\t')\n const rows = features.value.map((f) =>\n [f.replace(/_/g, ' '), ...items.map((i) => i.values[f] ?? '')].join(\n '\\t',\n ),\n )\n copy([header, ...rows].join('\\n'))\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input?.items?.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:scales-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{\n toolPart.input.title ?? $t('label.comparison')\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=\"copyTable\" />\n </VvButtonGroup>\n </div>\n <div class=\"overflow-x-auto\">\n <table class=\"w-full text-12 border-collapse\">\n <thead>\n <tr>\n <th\n class=\"text-left text-word-3 font-medium p-8 border-b border-surface-3 min-w-32\"></th>\n <th\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n class=\"text-center font-semibold text-word-1 p-8 border-b border-surface-3 min-w-24\"\n :class=\"\n item.highlighted\n ? 'bg-primary/5 border-primary/20'\n : ''\n \">\n {{ item.name }}\n <span v-if=\"item.highlighted\" class=\"ml-4\">⭐</span>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n v-for=\"(feature, fIdx) in features\"\n :key=\"feature\"\n :class=\"{ 'bg-surface-1': fIdx % 2 !== 0 }\">\n <td\n class=\"text-word-3 font-medium p-8 whitespace-nowrap\"\n :class=\"{\n 'border-b border-surface-3':\n fIdx !== features.length - 1,\n }\">\n {{ feature.replace(/_/g, ' ') }}\n </td>\n <td\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n class=\"text-center p-8\"\n :class=\"{\n 'border-b border-surface-3':\n fIdx !== features.length - 1,\n 'bg-surface-info': item.highlighted,\n 'text-success': item.values[feature] === '✓',\n 'text-danger':\n item.values[feature] === '\\u2717',\n 'text-word-2':\n item.values[feature] !== '✓' &&\n item.values[feature] !== '\\u2717',\n }\">\n {{ item.values[feature] ?? '—' }}\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAII,IAAM,IAAQ,GAIR,EAAE,SAAM,cAAW,GAAa,EAEhC,IAAW,QACA,EAAM,KAWtB,EAEK,IAAW,QAAe;GAC5B,IAAM,IAAQ,EAAS,MAAM,OAAO;AAIpC,UAHI,CAAC,KAAS,EAAM,WAAW,IACpB,EAAC,GAEL,OAAO,KAA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AjB,EAAmD,QAAnD,GAA2C,IAAC,IAAA,EAAA,IAAA,GAAA,CAAA,EAAA,EAAA,eAIxD,EA+BQ,SAAA,MAAA,EAAA,EAAA,GAAA,EA9BJ,EA6BK,GAAA,MAAA,EA5ByB,EAAA,QAAlB,GAAS,YADrB,EA6BK,MAAA;IA3BA,KAAK;IACL,OAAK,EAAA,EAAA,gBAAoB,IAAI,KAAA,GAAA,CAAA;OAC9B,EAOK,MAAA,EAND,OAAK,EAAA,CAAC,iDAA+C,EAAA,6BACsD,MAAS,EAAA,MAAS,SAAM,GAAA,CAAA,CAAA,EAAA,EAAA,EAIhI,EAAQ,QAAO,MAAA,IAAA,CAAA,EAAA,EAAA,GAAA,EAAA,GAAA,EAEtB,EAgBK,GAAA,MAAA,EAfc,EAAA,MAAS,MAAM,QAAvB,YADX,EAgBK,MAAA;IAdA,KAAK,EAAK;IACX,OAAK,EAAA,CAAC,mBAAiB;kCACoF,MAAS,EAAA,MAAS,SAAM;wBAAyD,EAAK;qBAA6D,EAAK,OAAO,OAAO;oBAA8F,EAAK,OAAO,OAAO;oBAAmG,EAAK,OAAO,OAAO,OAAiD,EAAK,OAAO,OAAO;;QAWzjB,EAAK,OAAO,MAAO,IAAA,EAAA,EAAA"}
@@ -1,13 +1,13 @@
1
1
  import { r as e } from "./rolldown-runtime-DHui2AQb.js";
2
- import { $ as t, B as n, D as r, E as i, F as a, Gt as o, I as s, L as c, Q as l, T as u, U as d, Z as f, _ as p, _t as m, dt as h, ft as g, gt as _, ht as v, it as y, j as b, k as x, lt as S, m as C, mt as w, n as T, pt as E, q as D, rt as O, st as k, tt as A, v as j, vt as M, w as N, x as P, yt as F, z as I } from "./vue.runtime.esm-bundler-BmggS4HU.js";
3
- import { n as ee } from "./vue-i18n-KvYvoek4.js";
2
+ import { $ as t, B as n, D as r, E as i, F as a, Gt as o, I as s, L as c, Q as l, T as u, U as d, Z as f, _ as p, _t as m, dt as h, ft as g, gt as _, ht as v, it as y, j as b, k as x, lt as S, m as C, mt as w, n as T, pt as E, q as D, rt as O, st as k, tt as A, v as j, vt as M, w as N, x as P, yt as F, z as I } from "./vue.runtime.esm-bundler-Dq29dQrz.js";
3
+ import { n as ee } from "./vue-i18n-DAH6nDTN.js";
4
4
  import { n as te, t as L } from "./dot-prop-ByInxMX6.js";
5
- import { c as ne, o as re } from "./index.es-CUjDCkXD.js";
5
+ import { c as ne, o as re } from "./index.es-7fUi-rc0.js";
6
6
  import { D as ie, E as ae, O as oe, T as se, l as ce, m as le, v as ue } from "./schemas-aPiXCaCc.js";
7
- import { f as de } from "./src-C_wl-KYN.js";
8
- import { h as fe, m as pe } from "./dist-BTnzL-m0.js";
9
- import { t as me } from "./PkStreamingMarkdown-rIdQh5_D.js";
10
- //#region ../../node_modules/.pnpm/@vueuse+shared@14.2.1_vue@3.5.33_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
7
+ import { f as de } from "./src-BfoQF6Z3.js";
8
+ import { h as fe, m as pe } from "./dist-yqV26MWM.js";
9
+ import { t as me } from "./PkStreamingMarkdown-COZApJzT.js";
10
+ //#region ../../node_modules/.pnpm/@vueuse+shared@14.2.1_vue@3.5.34_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
11
11
  function he(e, t) {
12
12
  return O() ? (S(e, t), !0) : !1;
13
13
  }
@@ -118,7 +118,7 @@ function Pe(e, t, n) {
118
118
  });
119
119
  }
120
120
  //#endregion
121
- //#region ../../node_modules/.pnpm/@vueuse+core@14.2.1_vue@3.5.33_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
121
+ //#region ../../node_modules/.pnpm/@vueuse+core@14.2.1_vue@3.5.34_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
122
122
  function Fe(e, t, n) {
123
123
  let r;
124
124
  r = k(n) ? { evaluating: n } : n || {};
@@ -719,7 +719,7 @@ function ft(e, t) {
719
719
  }
720
720
  }
721
721
  //#endregion
722
- //#region ../../node_modules/.pnpm/@volverjs+form-vue@1.1.1_@volverjs+ui-vue@0.0.13-beta.8_@volverjs+style@0.1.24-beta.3_@_982498bd370508873bcafdf8c66a8f9d/node_modules/@volverjs/form-vue/dist/index.es.js
722
+ //#region ../../node_modules/.pnpm/@volverjs+form-vue@1.1.1_@volverjs+ui-vue@0.0.13-beta.8_@volverjs+style@0.1.24-beta.3_@_8eaf8a064fcd23c20757f706f5acdc49/node_modules/@volverjs/form-vue/dist/index.es.js
723
723
  var Y = /* @__PURE__ */ ((e) => (e.text = "text", e.number = "number", e.email = "email", e.password = "password", e.tel = "tel", e.url = "url", e.search = "search", e.date = "date", e.time = "time", e.datetimeLocal = "datetime-local", e.month = "month", e.week = "week", e.color = "color", e.select = "select", e.checkbox = "checkbox", e.radio = "radio", e.textarea = "textarea", e.radioGroup = "radioGroup", e.checkboxGroup = "checkboxGroup", e.combobox = "combobox", e.custom = "custom", e))(Y || {}), X = /* @__PURE__ */ ((e) => (e.invalid = "invalid", e.valid = "valid", e.submitting = "submitting", e.reset = "reset", e.updated = "updated", e.unknown = "unknown", e))(X || {}), Z = (e) => e._def.typeName === "ZodObject", pt = (e) => e._zod.def.type === "object", mt = (e) => e._def.typeName === "ZodDefault", ht = (e) => e._zod.def.type === "default", gt = (e) => e._def.typeName === "ZodNullable", _t = (e) => e._zod.def.type === "nullable", vt = (e) => e._def.typeName === "ZodRecord", yt = (e) => e._zod.def.type === "record", bt = (e) => e._def.typeName === "ZodArray", xt = (e) => e._zod.def.type === "array", St = (e) => e._def.typeName === "ZodEffects", Ct = (e) => e._def.typeName === "ZodOptional", wt = (e) => e._zod.def.type === "optional", Tt = (e) => e._zod.def.type === "pipe", Et = (e) => e._zod.def.type === "transform";
724
724
  function Dt(e) {
725
725
  let t = e;
@@ -1159,15 +1159,15 @@ function Lt(e, t, r, a) {
1159
1159
  }
1160
1160
  return u(async () => {
1161
1161
  switch (a?.sideEffects && await Promise.resolve(a.sideEffects(i.type)), i.type) {
1162
- case Y.textarea: return import("./VvTextarea.es-CGpiCS4S.js");
1163
- case Y.radio: return import("./VvRadio.es-C2p5vvAx.js");
1164
- case Y.radioGroup: return import("./VvRadioGroup.es-6GlWuDjY.js");
1165
- case Y.checkbox: return import("./VvCheckbox.es-BF8Mdg0O.js");
1166
- case Y.checkboxGroup: return import("./VvCheckboxGroup.es-BJc8MmJ3.js");
1167
- case Y.select: return import("./VvSelect.es-i4lO9onq.js");
1168
- case Y.combobox: return import("./VvCombobox.es-ILRHqAye.js");
1162
+ case Y.textarea: return import("./VvTextarea.es-DetA_2DM.js");
1163
+ case Y.radio: return import("./VvRadio.es-Do9oyNtV.js");
1164
+ case Y.radioGroup: return import("./VvRadioGroup.es-BHcqcJFC.js");
1165
+ case Y.checkbox: return import("./VvCheckbox.es-ohF87NOe.js");
1166
+ case Y.checkboxGroup: return import("./VvCheckboxGroup.es-DZCbyLN0.js");
1167
+ case Y.select: return import("./VvSelect.es-CP_y02fy.js");
1168
+ case Y.combobox: return import("./VvCombobox.es-YLPD7MpO.js");
1169
1169
  }
1170
- return import("./VvInputText.es-CDnMeO26.js");
1170
+ return import("./VvInputText.es-DAnAXfBO.js");
1171
1171
  });
1172
1172
  }),
1173
1173
  hasProps: M,
@@ -1655,4 +1655,4 @@ var Kt = { class: "border border-surface-3 rounded-xl w-full overflow-hidden" },
1655
1655
  //#endregion
1656
1656
  export { ot as _, ft as a, ct as b, q as c, Fe as d, Le as f, nt as g, tt as h, Wt as i, ut as l, $e as m, rn as n, J as o, Ue as p, Gt as r, dt as s, an as t, K as u, Be as v, ke as x, Qe as y };
1657
1657
 
1658
- //# sourceMappingURL=PkToolShowContactForm-CqoSVvjG.js.map
1658
+ //# sourceMappingURL=PkToolShowContactForm-thS7c8iL.js.map