@8wave/ai-elements 0.106.0-beta.2 → 0.106.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 (81) hide show
  1. package/dist/_chunks/{PkLazyImg-BoH1s5ni.js → PkLazyImg-Beug40gC.js} +2 -2
  2. package/dist/_chunks/{PkLazyImg-BoH1s5ni.js.map → PkLazyImg-Beug40gC.js.map} +1 -1
  3. package/dist/_chunks/{PkToolRequestGeolocation-CNAtslfG.js → PkToolRequestGeolocation-DUHzWOSe.js} +2 -2
  4. package/dist/_chunks/{PkToolRequestGeolocation-CNAtslfG.js.map → PkToolRequestGeolocation-DUHzWOSe.js.map} +1 -1
  5. package/dist/_chunks/{PkToolRequestOAuthConnection-DNZHj2Kx.js → PkToolRequestOAuthConnection-CdtnIiy6.js} +2 -2
  6. package/dist/_chunks/{PkToolRequestOAuthConnection-DNZHj2Kx.js.map → PkToolRequestOAuthConnection-CdtnIiy6.js.map} +1 -1
  7. package/dist/_chunks/{PkToolShowArtifact-Kfm50DPr.js → PkToolShowArtifact-B0gZZGvT.js} +3 -3
  8. package/dist/_chunks/{PkToolShowArtifact-Kfm50DPr.js.map → PkToolShowArtifact-B0gZZGvT.js.map} +1 -1
  9. package/dist/_chunks/{PkToolShowCalendarEvent-KJXNC-E_.js → PkToolShowCalendarEvent-DpEWSENB.js} +3 -3
  10. package/dist/_chunks/{PkToolShowCalendarEvent-KJXNC-E_.js.map → PkToolShowCalendarEvent-DpEWSENB.js.map} +1 -1
  11. package/dist/_chunks/{PkToolShowComparison-C1GPvcNH.js → PkToolShowComparison-DkHRpM8n.js} +3 -3
  12. package/dist/_chunks/{PkToolShowComparison-C1GPvcNH.js.map → PkToolShowComparison-DkHRpM8n.js.map} +1 -1
  13. package/dist/_chunks/{PkToolShowContactForm-Ws8DysdD.js → PkToolShowContactForm-B8YI2e0B.js} +3 -3
  14. package/dist/_chunks/{PkToolShowContactForm-Ws8DysdD.js.map → PkToolShowContactForm-B8YI2e0B.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShowDiagram-CMuKde1V.js → PkToolShowDiagram-vmSzw6s0.js} +3 -3
  16. package/dist/_chunks/{PkToolShowDiagram-CMuKde1V.js.map → PkToolShowDiagram-vmSzw6s0.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowEmail-DvA69GLP.js → PkToolShowEmail-BtntDg5l.js} +3 -3
  18. package/dist/_chunks/{PkToolShowEmail-DvA69GLP.js.map → PkToolShowEmail-BtntDg5l.js.map} +1 -1
  19. package/dist/_chunks/{PkToolShowForm-CadrjzZx.js → PkToolShowForm-gD0MfOjQ.js} +104 -104
  20. package/dist/_chunks/PkToolShowForm-gD0MfOjQ.js.map +1 -0
  21. package/dist/_chunks/{PkToolShowImageGallery-CosOsHSh.js → PkToolShowImageGallery-DL-bFOKl.js} +2 -2
  22. package/dist/_chunks/{PkToolShowImageGallery-CosOsHSh.js.map → PkToolShowImageGallery-DL-bFOKl.js.map} +1 -1
  23. package/dist/_chunks/{PkToolShowLocation-BLSkytqC.js → PkToolShowLocation-DXPAEQCf.js} +3 -3
  24. package/dist/_chunks/{PkToolShowLocation-BLSkytqC.js.map → PkToolShowLocation-DXPAEQCf.js.map} +1 -1
  25. package/dist/_chunks/{PkToolShowMessage-Bb1fhAcX.js → PkToolShowMessage-WendSuVW.js} +3 -3
  26. package/dist/_chunks/{PkToolShowMessage-Bb1fhAcX.js.map → PkToolShowMessage-WendSuVW.js.map} +1 -1
  27. package/dist/_chunks/{PkToolShowProductList-DkaEOhxY.js → PkToolShowProductList-_ULcSOL_.js} +3 -3
  28. package/dist/_chunks/{PkToolShowProductList-DkaEOhxY.js.map → PkToolShowProductList-_ULcSOL_.js.map} +1 -1
  29. package/dist/_chunks/{PkToolShowQrCode-GaZJBhqE.js → PkToolShowQrCode-BIhYJSTf.js} +3 -3
  30. package/dist/_chunks/{PkToolShowQrCode-GaZJBhqE.js.map → PkToolShowQrCode-BIhYJSTf.js.map} +1 -1
  31. package/dist/_chunks/{PkToolShowSources-BcxmwOsZ.js → PkToolShowSources-BprUew-i.js} +2 -2
  32. package/dist/_chunks/{PkToolShowSources-BcxmwOsZ.js.map → PkToolShowSources-BprUew-i.js.map} +1 -1
  33. package/dist/_chunks/{PkToolShowSuggestedReply-4S7VvK7s.js → PkToolShowSuggestedReply-FJMsf1Ft.js} +2 -2
  34. package/dist/_chunks/{PkToolShowSuggestedReply-4S7VvK7s.js.map → PkToolShowSuggestedReply-FJMsf1Ft.js.map} +1 -1
  35. package/dist/_chunks/{PkToolShowVideo-CbSNJlH1.js → PkToolShowVideo-DXQo_Frk.js} +2 -2
  36. package/dist/_chunks/{PkToolShowVideo-CbSNJlH1.js.map → PkToolShowVideo-DXQo_Frk.js.map} +1 -1
  37. package/dist/_chunks/{PkToolShowWeather-Cr3NJEMI.js → PkToolShowWeather-Ca-ZrKx3.js} +2 -2
  38. package/dist/_chunks/{PkToolShowWeather-Cr3NJEMI.js.map → PkToolShowWeather-Ca-ZrKx3.js.map} +1 -1
  39. package/dist/_chunks/{PkToolShowWebPages-DLpd7Kg0.js → PkToolShowWebPages-DxxqCOav.js} +3 -3
  40. package/dist/_chunks/{PkToolShowWebPages-DLpd7Kg0.js.map → PkToolShowWebPages-DxxqCOav.js.map} +1 -1
  41. package/dist/_chunks/{VvCheckboxGroup.es-DLgx43U_.js → VvCheckboxGroup.es-6rXZzFDs.js} +2 -2
  42. package/dist/_chunks/{VvCheckboxGroup.es-DLgx43U_.js.map → VvCheckboxGroup.es-6rXZzFDs.js.map} +1 -1
  43. package/dist/_chunks/{VvCombobox.es-D5zLGtOy.js → VvCombobox.es-DgB4YbSj.js} +409 -409
  44. package/dist/_chunks/{VvCombobox.es-D5zLGtOy.js.map → VvCombobox.es-DgB4YbSj.js.map} +1 -1
  45. package/dist/_chunks/{VvInputText.es-DWwDzlwZ.js → VvInputText.es-UTEISDKU.js} +181 -181
  46. package/dist/_chunks/{VvInputText.es-DWwDzlwZ.js.map → VvInputText.es-UTEISDKU.js.map} +1 -1
  47. package/dist/_chunks/{VvRadioGroup.es-BZdnaITO.js → VvRadioGroup.es-CqMnxRGR.js} +2 -2
  48. package/dist/_chunks/{VvRadioGroup.es-BZdnaITO.js.map → VvRadioGroup.es-CqMnxRGR.js.map} +1 -1
  49. package/dist/_chunks/{VvSelect.es-BP6Gn5BZ.js → VvSelect.es-BLNrNcIi.js} +6 -6
  50. package/dist/_chunks/{VvSelect.es-BP6Gn5BZ.js.map → VvSelect.es-BLNrNcIi.js.map} +1 -1
  51. package/dist/_chunks/{VvTextarea.es-BuLyBuYz.js → VvTextarea.es-ChkbZSw6.js} +296 -296
  52. package/dist/_chunks/{VvTextarea.es-BuLyBuYz.js.map → VvTextarea.es-ChkbZSw6.js.map} +1 -1
  53. package/dist/_chunks/{dist-vbhhaYbZ.js → dist-Dhop5_et.js} +91 -28
  54. package/dist/_chunks/{dist-vbhhaYbZ.js.map → dist-Dhop5_et.js.map} +1 -1
  55. package/dist/_chunks/{index.es-DFq55nZZ.js → index.es-CNKCTfCu.js} +93 -93
  56. package/dist/_chunks/{index.es-DFq55nZZ.js.map → index.es-CNKCTfCu.js.map} +1 -1
  57. package/dist/_chunks/{index.es-DhjFGu5c.js → index.es-DB9_sQvG.js} +16 -16
  58. package/dist/_chunks/{index.es-DhjFGu5c.js.map → index.es-DB9_sQvG.js.map} +1 -1
  59. package/dist/ai-elements.es.js +2334 -2327
  60. package/dist/ai-elements.es.js.map +1 -1
  61. package/dist-vue/PkChatbot.js +1 -1
  62. package/dist-vue/PkChatbotMessages.js +1 -1
  63. package/dist-vue/PkChatbotViewChat.js +1 -1
  64. package/dist-vue/_chunks/{PkChatbot-a8Wh4tN4.js → PkChatbot-i_07-rvf.js} +76 -68
  65. package/dist-vue/_chunks/PkChatbot-i_07-rvf.js.map +1 -0
  66. package/dist-vue/_chunks/PkChatbotEmptyState-C7W0QgqW.js.map +1 -1
  67. package/dist-vue/_chunks/{PkChatbotMessages-D6rNh6PF.js → PkChatbotMessages-CZLj_OeK.js} +4 -4
  68. package/dist-vue/_chunks/PkChatbotMessages-CZLj_OeK.js.map +1 -0
  69. package/dist-vue/_chunks/{PkChatbotViewChat-DUn7M4SL.js → PkChatbotViewChat-B6MfjQIa.js} +3 -3
  70. package/dist-vue/_chunks/{PkChatbotViewChat-DUn7M4SL.js.map → PkChatbotViewChat-B6MfjQIa.js.map} +1 -1
  71. package/dist-vue/_chunks/{PkToolShowDiagram-Bbqo6jm8.js → PkToolShowDiagram-D7jh-yIc.js} +2 -2
  72. package/dist-vue/_chunks/{PkToolShowDiagram-Bbqo6jm8.js.map → PkToolShowDiagram-D7jh-yIc.js.map} +1 -1
  73. package/dist-vue/_chunks/{PkToolShowForm-CJtmt5yd.js → PkToolShowForm-BGp_gbtr.js} +54 -54
  74. package/dist-vue/_chunks/PkToolShowForm-BGp_gbtr.js.map +1 -0
  75. package/dist-vue/index.js +8 -8
  76. package/dist-vue/style.css +1 -1
  77. package/package.json +1 -1
  78. package/dist/_chunks/PkToolShowForm-CadrjzZx.js.map +0 -1
  79. package/dist-vue/_chunks/PkChatbot-a8Wh4tN4.js.map +0 -1
  80. package/dist-vue/_chunks/PkChatbotMessages-D6rNh6PF.js.map +0 -1
  81. package/dist-vue/_chunks/PkToolShowForm-CJtmt5yd.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"PkToolShowImageGallery-CosOsHSh.js","names":["$t"],"sources":["../../../../packages/components/src/chat/PkToolShowImageGallery.vue","../../../../packages/components/src/chat/PkToolShowImageGallery.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref, onMounted } from 'vue'\n import { isSameSite } from 'utils'\n import { useImageFallback } from 'composables'\n import { useLightbox, useImageSizes } from '../composables/useLightbox'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n images: Array<{\n url: string\n caption?: string\n alt?: string\n }>\n }\n }\n return part\n })\n\n const galleryRef = ref<HTMLElement>()\n const { preload, getSize } = useImageSizes()\n\n const images = computed(() => toolPart.value.input?.images ?? [])\n\n const { canShowImage, onImageError } = useImageFallback()\n\n const gridCols = computed(() => {\n const count = images.value.length\n if (count === 1) {\n return 'grid-cols-1 justify-items-center'\n }\n if (count === 2) {\n return 'grid-cols-2'\n }\n return 'grid-cols-3'\n })\n\n const { init } = useLightbox({ gallery: galleryRef })\n\n onMounted(async () => {\n preload(images.value)\n await init()\n })\n</script>\n\n<template>\n <div\n v-if=\"images.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40\">\n <VvIcon name=\"ri:image-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{ $t('label.gallery', { count: images.length }) }}\n </strong>\n </div>\n <div class=\"p-sm\">\n <div ref=\"galleryRef\" class=\"grid gap-8\" :class=\"gridCols\">\n <a\n v-for=\"image in images\"\n :key=\"image.url\"\n :href=\"canShowImage(image.url) ? image.url : undefined\"\n :data-pswp-src=\"\n canShowImage(image.url) ? image.url : undefined\n \"\n :data-pswp-width=\"getSize(image.url).width\"\n :data-pswp-height=\"getSize(image.url).height\"\n :data-pswp-caption=\"image.caption ?? image.alt ?? ''\"\n :data-cropped=\"true\"\n class=\"relative block aspect-square overflow-hidden rounded-xl group max-h-384\"\n :class=\"[\n { 'w-384 max-w-full': images.length === 1 },\n canShowImage(image.url)\n ? 'cursor-pointer'\n : 'pointer-events-none',\n ]\"\n :title=\"image.caption ?? image.alt ?? ''\"\n :target=\"isSameSite(image.url) ? undefined : '_blank'\"\n :rel=\"\n isSameSite(image.url)\n ? undefined\n : 'noopener noreferrer'\n \">\n <img\n v-if=\"canShowImage(image.url)\"\n :src=\"image.url\"\n :alt=\"image.alt ?? image.caption ?? ''\"\n class=\"w-full h-full object-cover transition-opacity group-hover:opacity-80\"\n @error=\"onImageError(image.url)\" />\n <div\n v-else\n class=\"w-full h-full flex flex-col items-center justify-center gap-4 bg-surface-1 text-word-3\">\n <VvIcon name=\"ri:camera-off-line\" class=\"text-24\" />\n <span class=\"text-12\">{{\n $t('label.imageLoadError')\n }}</span>\n </div>\n </a>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed, ref, onMounted } from 'vue'\n import { isSameSite } from 'utils'\n import { useImageFallback } from 'composables'\n import { useLightbox, useImageSizes } from '../composables/useLightbox'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n images: Array<{\n url: string\n caption?: string\n alt?: string\n }>\n }\n }\n return part\n })\n\n const galleryRef = ref<HTMLElement>()\n const { preload, getSize } = useImageSizes()\n\n const images = computed(() => toolPart.value.input?.images ?? [])\n\n const { canShowImage, onImageError } = useImageFallback()\n\n const gridCols = computed(() => {\n const count = images.value.length\n if (count === 1) {\n return 'grid-cols-1 justify-items-center'\n }\n if (count === 2) {\n return 'grid-cols-2'\n }\n return 'grid-cols-3'\n })\n\n const { init } = useLightbox({ gallery: galleryRef })\n\n onMounted(async () => {\n preload(images.value)\n await init()\n })\n</script>\n\n<template>\n <div\n v-if=\"images.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40\">\n <VvIcon name=\"ri:image-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{ $t('label.gallery', { count: images.length }) }}\n </strong>\n </div>\n <div class=\"p-sm\">\n <div ref=\"galleryRef\" class=\"grid gap-8\" :class=\"gridCols\">\n <a\n v-for=\"image in images\"\n :key=\"image.url\"\n :href=\"canShowImage(image.url) ? image.url : undefined\"\n :data-pswp-src=\"\n canShowImage(image.url) ? image.url : undefined\n \"\n :data-pswp-width=\"getSize(image.url).width\"\n :data-pswp-height=\"getSize(image.url).height\"\n :data-pswp-caption=\"image.caption ?? image.alt ?? ''\"\n :data-cropped=\"true\"\n class=\"relative block aspect-square overflow-hidden rounded-xl group max-h-384\"\n :class=\"[\n { 'w-384 max-w-full': images.length === 1 },\n canShowImage(image.url)\n ? 'cursor-pointer'\n : 'pointer-events-none',\n ]\"\n :title=\"image.caption ?? image.alt ?? ''\"\n :target=\"isSameSite(image.url) ? undefined : '_blank'\"\n :rel=\"\n isSameSite(image.url)\n ? undefined\n : 'noopener noreferrer'\n \">\n <img\n v-if=\"canShowImage(image.url)\"\n :src=\"image.url\"\n :alt=\"image.alt ?? image.caption ?? ''\"\n class=\"w-full h-full object-cover transition-opacity group-hover:opacity-80\"\n @error=\"onImageError(image.url)\" />\n <div\n v-else\n class=\"w-full h-full flex flex-col items-center justify-center gap-4 bg-surface-1 text-word-3\">\n <VvIcon name=\"ri:camera-off-line\" class=\"text-24\" />\n <span class=\"text-12\">{{\n $t('label.imageLoadError')\n }}</span>\n </div>\n </a>\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMI,IAAM,IAAQ,GAIR,IAAW,QACA,EAAM,IAUtB,GAEK,IAAa,EAAiB,GAC9B,EAAE,YAAS,eAAY,EAAc,GAErC,IAAS,QAAe,EAAS,MAAM,OAAO,UAAU,CAAC,CAAC,GAE1D,EAAE,iBAAc,oBAAiB,EAAiB,GAElD,IAAW,QAAe;GAC5B,IAAM,IAAQ,EAAO,MAAM;GAO3B,OANI,MAAU,IACH,qCAEP,MAAU,IACH,gBAEJ;EACX,CAAC,GAEK,EAAE,YAAS,EAAY,EAAE,SAAS,EAAW,CAAC;SAEpD,EAAU,YAAY;GAElB,AADA,EAAQ,EAAO,KAAK,GACpB,MAAM,EAAK;EACf,CAAC;;GAKS,OAAA,EAAA,MAAO,UADjB,EAAA,GAAA,EAsDM,OAtDN,GAsDM,CAnDF,EAMM,OANN,GAMM,CAJF,EAA+C,GAAA;IAAvC,MAAK;IAAgB,OAAM;GACnC,CAAA,GAAA,EA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IAAA,CAAA,MAAA,EAAA,GAAA,EAOM,OAPN,GAOM,CAJF,EAAoD,GAAA;IAA5C,MAAK;IAAqB,OAAM;GACxC,CAAA,GAAA,EAES,QAFT,GAES,EADLA,EAAAA,GAAE,sBAAA,CAAA,GAAA,CAAA,CAAA,CAAA,EAAA,GAAA,IAAA,CAAA"}
1
+ {"version":3,"file":"PkToolShowImageGallery-DL-bFOKl.js","names":["$t"],"sources":["../../../../packages/components/src/chat/PkToolShowImageGallery.vue","../../../../packages/components/src/chat/PkToolShowImageGallery.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref, onMounted } from 'vue'\n import { isSameSite } from 'utils'\n import { useImageFallback } from 'composables'\n import { useLightbox, useImageSizes } from '../composables/useLightbox'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n images: Array<{\n url: string\n caption?: string\n alt?: string\n }>\n }\n }\n return part\n })\n\n const galleryRef = ref<HTMLElement>()\n const { preload, getSize } = useImageSizes()\n\n const images = computed(() => toolPart.value.input?.images ?? [])\n\n const { canShowImage, onImageError } = useImageFallback()\n\n const gridCols = computed(() => {\n const count = images.value.length\n if (count === 1) {\n return 'grid-cols-1 justify-items-center'\n }\n if (count === 2) {\n return 'grid-cols-2'\n }\n return 'grid-cols-3'\n })\n\n const { init } = useLightbox({ gallery: galleryRef })\n\n onMounted(async () => {\n preload(images.value)\n await init()\n })\n</script>\n\n<template>\n <div\n v-if=\"images.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40\">\n <VvIcon name=\"ri:image-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{ $t('label.gallery', { count: images.length }) }}\n </strong>\n </div>\n <div class=\"p-sm\">\n <div ref=\"galleryRef\" class=\"grid gap-8\" :class=\"gridCols\">\n <a\n v-for=\"image in images\"\n :key=\"image.url\"\n :href=\"canShowImage(image.url) ? image.url : undefined\"\n :data-pswp-src=\"\n canShowImage(image.url) ? image.url : undefined\n \"\n :data-pswp-width=\"getSize(image.url).width\"\n :data-pswp-height=\"getSize(image.url).height\"\n :data-pswp-caption=\"image.caption ?? image.alt ?? ''\"\n :data-cropped=\"true\"\n class=\"relative block aspect-square overflow-hidden rounded-xl group max-h-384\"\n :class=\"[\n { 'w-384 max-w-full': images.length === 1 },\n canShowImage(image.url)\n ? 'cursor-pointer'\n : 'pointer-events-none',\n ]\"\n :title=\"image.caption ?? image.alt ?? ''\"\n :target=\"isSameSite(image.url) ? undefined : '_blank'\"\n :rel=\"\n isSameSite(image.url)\n ? undefined\n : 'noopener noreferrer'\n \">\n <img\n v-if=\"canShowImage(image.url)\"\n :src=\"image.url\"\n :alt=\"image.alt ?? image.caption ?? ''\"\n class=\"w-full h-full object-cover transition-opacity group-hover:opacity-80\"\n @error=\"onImageError(image.url)\" />\n <div\n v-else\n class=\"w-full h-full flex flex-col items-center justify-center gap-4 bg-surface-1 text-word-3\">\n <VvIcon name=\"ri:camera-off-line\" class=\"text-24\" />\n <span class=\"text-12\">{{\n $t('label.imageLoadError')\n }}</span>\n </div>\n </a>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed, ref, onMounted } from 'vue'\n import { isSameSite } from 'utils'\n import { useImageFallback } from 'composables'\n import { useLightbox, useImageSizes } from '../composables/useLightbox'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n images: Array<{\n url: string\n caption?: string\n alt?: string\n }>\n }\n }\n return part\n })\n\n const galleryRef = ref<HTMLElement>()\n const { preload, getSize } = useImageSizes()\n\n const images = computed(() => toolPart.value.input?.images ?? [])\n\n const { canShowImage, onImageError } = useImageFallback()\n\n const gridCols = computed(() => {\n const count = images.value.length\n if (count === 1) {\n return 'grid-cols-1 justify-items-center'\n }\n if (count === 2) {\n return 'grid-cols-2'\n }\n return 'grid-cols-3'\n })\n\n const { init } = useLightbox({ gallery: galleryRef })\n\n onMounted(async () => {\n preload(images.value)\n await init()\n })\n</script>\n\n<template>\n <div\n v-if=\"images.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40\">\n <VvIcon name=\"ri:image-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{ $t('label.gallery', { count: images.length }) }}\n </strong>\n </div>\n <div class=\"p-sm\">\n <div ref=\"galleryRef\" class=\"grid gap-8\" :class=\"gridCols\">\n <a\n v-for=\"image in images\"\n :key=\"image.url\"\n :href=\"canShowImage(image.url) ? image.url : undefined\"\n :data-pswp-src=\"\n canShowImage(image.url) ? image.url : undefined\n \"\n :data-pswp-width=\"getSize(image.url).width\"\n :data-pswp-height=\"getSize(image.url).height\"\n :data-pswp-caption=\"image.caption ?? image.alt ?? ''\"\n :data-cropped=\"true\"\n class=\"relative block aspect-square overflow-hidden rounded-xl group max-h-384\"\n :class=\"[\n { 'w-384 max-w-full': images.length === 1 },\n canShowImage(image.url)\n ? 'cursor-pointer'\n : 'pointer-events-none',\n ]\"\n :title=\"image.caption ?? image.alt ?? ''\"\n :target=\"isSameSite(image.url) ? undefined : '_blank'\"\n :rel=\"\n isSameSite(image.url)\n ? undefined\n : 'noopener noreferrer'\n \">\n <img\n v-if=\"canShowImage(image.url)\"\n :src=\"image.url\"\n :alt=\"image.alt ?? image.caption ?? ''\"\n class=\"w-full h-full object-cover transition-opacity group-hover:opacity-80\"\n @error=\"onImageError(image.url)\" />\n <div\n v-else\n class=\"w-full h-full flex flex-col items-center justify-center gap-4 bg-surface-1 text-word-3\">\n <VvIcon name=\"ri:camera-off-line\" class=\"text-24\" />\n <span class=\"text-12\">{{\n $t('label.imageLoadError')\n }}</span>\n </div>\n </a>\n </div>\n </div>\n </div>\n</template>\n"],"mappings":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AAG,CAAA,CAAE;IACrC,qBAAmB,EAAM,WAAW,EAAM,OAAG;IAC7C,gBAAc;IACf,OAAK,EAAA,CAAC,2EAAyE,CACvB,EAAA,oBAAA,EAAA,MAAO,WAAM,EAAA,GAAkC,EAAA,CAAA,CAAY,CAAC,EAAM,GAAG,IAAA,mBAAA,qBAAA,CAAA,CAAA;IAM5H,OAAO,EAAM,WAAW,EAAM,OAAG;IACjC,QAAQ,EAAA,CAAA,CAAU,CAAC,EAAM,GAAG,IAAI,KAAA,IAAS;IACzC,KAA8B,EAAA,CAAA,CAAU,CAAC,EAAM,GAAG,IAAgC,KAAA,IAAA;GAMzE,GAAA,CAAA,EAAA,CAAA,CAAY,CAAC,EAAM,GAAG,KADhC,EAAA,GAAA,EAKuC,OAAA;;IAHlC,KAAK,EAAM;IACX,KAAK,EAAM,OAAO,EAAM,WAAO;IAChC,OAAM;IACL,UAAK,MAAE,EAAA,CAAA,CAAY,CAAC,EAAM,GAAG;GAClC,GAAA,MAAA,IAAA,CAAA,MAAA,EAAA,GAAA,EAOM,OAPN,GAOM,CAJF,EAAoD,GAAA;IAA5C,MAAK;IAAqB,OAAM;GACxC,CAAA,GAAA,EAES,QAFT,GAES,EADLA,EAAAA,GAAE,sBAAA,CAAA,GAAA,CAAA,CAAA,CAAA,EAAA,GAAA,IAAA,CAAA"}
@@ -2,8 +2,8 @@ import { t as e } from "./rolldown-runtime-CoeuCKPe.js";
2
2
  import { $ as t, C as n, Ct as r, E as i, F as a, L as o, N as s, O as c, P as l, R as u, T as d, Tt as f, X as p, Y as m, Z as h, _ as g, b as _, bt as v, ct as y, dt as b, f as x, h as S, ht as C, it as w, k as T, lt as E, m as D, pt as O, v as k, w as A, x as j, xt as ee } from "./vue.runtime.esm-bundler-D6KKITU0.js";
3
3
  import { n as M, t as te } from "./cdn-css-JUUNhyQ6.js";
4
4
  import "./src-CS32P2Dg.js";
5
- import { i as ne } from "./dist-vbhhaYbZ.js";
6
- import { a as re, i as ie, l as ae, m as oe, n as se } from "./index.es-DFq55nZZ.js";
5
+ import { i as ne } from "./dist-Dhop5_et.js";
6
+ import { a as re, i as ie, l as ae, m as oe, n as se } from "./index.es-CNKCTfCu.js";
7
7
  //#region ../../node_modules/.pnpm/maplibre-gl@5.24.0/node_modules/maplibre-gl/dist/maplibre-gl.js
8
8
  var ce = /* @__PURE__ */ e(((e, t) => {
9
9
  (function(n, r) {
@@ -34783,4 +34783,4 @@ var Ue = {
34783
34783
  //#endregion
34784
34784
  export { $e as default };
34785
34785
 
34786
- //# sourceMappingURL=PkToolShowLocation-BLSkytqC.js.map
34786
+ //# sourceMappingURL=PkToolShowLocation-DXPAEQCf.js.map