{"version":3,"mappings":";meA+FA,MAAMA,EAAiBC,EAAqB,IAAMC,EAAA,WAAO,8BAAwC,6BAAC,EAU5FC,EAAQC,EAiBR,CAAE,YAAAC,CAAY,EAAIC,EAAc,EAEhCC,EAAaC,EAAS,IACnBL,EAAM,UAAY,kCAAoC,iCAC9D,EACKM,EAAaD,EAAS,IACnBL,EAAM,UAAY,IAAM,GAChC,EAED,SAASO,EAAQC,EAAwB,CAChC,OAAAA,EAAO,KAAOA,EAAO,KAG9B,SAASC,EAAUC,EAAkC,CAC/C,OAAAA,GAAUA,IAAW,IAChB,SAGF,QAGT,SAASC,EAAQC,EAAsB,CACrC,OAAQA,EAAM,CACZ,IAAK,OACI,kBACT,IAAK,UACI,uBACT,IAAK,YACI,yBACT,QACS,SACX","names":["PreparedAnchor","defineAsyncComponent","__vitePreload","props","__props","proxySource","useImageProxy","imageSizes","computed","imageWidth","getLink","button","getTarget","target","getType","type"],"ignoreList":[],"sources":["../../src/components/shortcodes/StackedContent.vue"],"sourcesContent":["<template>\n <section v-if=\"stacks.length\" :class=\"$style.stacked\">\n <header v-if=\"header && headerLevel\">\n <component :is=\"headerLevel\" v-html=\"header\"></component>\n </header>\n <div\n v-for=\"(stack, index) in stacks\"\n :key=\"index\"\n :class=\"[$style.content, { [$style.noheader]: !(header && headerLevel) }]\"\n >\n <figure :class=\"[$style.figure, { 'aspect-container summary-image-frame': !stack.link }]\">\n <PreparedAnchor\n v-if=\"stack.link\"\n :to=\"stack.link\"\n :behavior=\"getTarget(stack.new_tab)\"\n class=\"aspect-container summary-image-frame\"\n >\n <picture>\n <img\n :alt=\"stack.altText\"\n :src=\"proxySource(stack.image, imageWidth)\"\n :srcset=\"stack.imageSrcset\"\n class=\"aspect-image\"\n loading=\"lazy\"\n :sizes=\"imageSizes\"\n />\n </picture>\n </PreparedAnchor>\n <picture v-else>\n <img\n :alt=\"stack.altText\"\n :src=\"proxySource(stack.image, imageWidth)\"\n :srcset=\"stack.imageSrcset\"\n class=\"aspect-image\"\n loading=\"lazy\"\n :sizes=\"imageSizes\"\n />\n </picture>\n </figure>\n <section :class=\"$style.section\">\n <header v-if=\"stack.title || stack.subtitle\" :class=\"$style.header\">\n <h4 v-if=\"stack.title && stack.link\">\n <PreparedAnchor :to=\"stack.link\" :behavior=\"getTarget(stack.new_tab)\">\n {{ stack.title }}\n </PreparedAnchor>\n </h4>\n <h4 v-else-if=\"stack.title\">\n {{ stack.title }}\n </h4>\n <h5\n v-if=\"stack.subtitle\"\n :class=\"{ [$style.notitle]: !stack.title }\"\n v-html=\"stack.subtitle\"\n ></h5>\n </header>\n <div\n v-if=\"stack.excerpt\"\n :class=\"[\n $style.excerpt,\n { [$style.notitle]: !stack.title && !stack.subtitle },\n 'space-8-10-above',\n ]\"\n v-html=\"stack.excerpt\"\n ></div>\n <div\n v-if=\"stack.button\"\n :class=\"{ 'space-8-10-above': stack.button.button_type !== 'icon' }\"\n >\n <a\n v-if=\"stack.button.pdf\"\n :href=\"getLink(stack.button)\"\n :class=\"getType(stack.button.button_type)\"\n :target=\"\n getLink(stack.button).includes('http') ? getTarget(stack.button.new_tab) : '_blank'\n \"\n v-html=\"stack.button.title\"\n ></a>\n <PreparedAnchor\n v-else\n :to=\"getLink(stack.button)\"\n :behavior=\"getTarget(stack.button.new_tab)\"\n :class=\"getType(stack.button.button_type)\"\n >\n {{ stack.button.title }}\n </PreparedAnchor>\n </div>\n </section>\n </div>\n </section>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, defineAsyncComponent } from 'vue';\nimport { useImageProxy } from '@/composables/Common.js';\n\nconst PreparedAnchor = defineAsyncComponent(() => import('@/components/common/PreparedAnchor.vue'));\n\ninterface Button {\n button_type: string;\n link: string;\n new_tab: string | boolean;\n pdf: string;\n title: string;\n}\n\nconst props = defineProps<{\n header?: string;\n headerLevel?: string;\n isSixSpan?: boolean;\n stacks: Array<{\n altText: string;\n button: Button;\n excerpt: string;\n imageSrcset: string;\n image: string;\n link: string;\n new_tab: string | boolean;\n subtitle: string;\n title: string;\n }>;\n}>();\n\nconst { proxySource } = useImageProxy();\n\nconst imageSizes = computed(() => {\n return props.isSixSpan ? '(min-width: 960px) 620px, 100vw' : '(min-width: 960px) 470px, 100vw';\n});\nconst imageWidth = computed(() => {\n return props.isSixSpan ? 720 : 400;\n});\n\nfunction getLink(button: Button): string {\n return button.pdf || button.link;\n}\n\nfunction getTarget(target: string | boolean): string {\n if (target && target === '1') {\n return '_blank';\n }\n\n return '_self';\n}\n\nfunction getType(type: string): string {\n switch (type) {\n case 'icon':\n return 'more-link';\n case 'primary':\n return 'button-primary';\n case 'secondary':\n return 'button-secondary';\n default:\n return '';\n }\n}\n</script>\n\n<style lang=\"scss\" module>\n.content {\n display: block;\n margin-top: 3rem;\n\n &:first-of-type {\n margin-top: 1rem;\n\n &.noheader {\n margin-top: 0;\n }\n }\n\n a[href$='.pdf'][href$='.pdf'],\n section > a {\n display: inline-block;\n margin-bottom: 0;\n margin-right: 0;\n margin-top: 1rem;\n }\n}\n\n.excerpt {\n p:first-of-type {\n margin-top: 0;\n }\n\n &.notitle {\n margin-top: 1rem;\n }\n}\n\n.header {\n margin-top: 1rem;\n\n a {\n text-decoration: none;\n }\n\n h4 {\n margin-top: 0;\n }\n\n h5 {\n margin-top: 0;\n }\n}\n\n.notitle {\n margin-top: 0;\n\n p {\n margin-top: 0;\n }\n}\n\n.stacked {\n > header {\n h2,\n h3,\n h4 {\n margin: 0;\n }\n }\n}\n\n@media (min-width: $break-point) {\n .content {\n @include grid;\n }\n\n .excerpt {\n &.notitle {\n margin-top: 0;\n }\n }\n\n .figure {\n @include space-5-above;\n }\n\n .figure,\n .section {\n grid-column: span 6;\n }\n\n .header {\n margin-top: 0;\n }\n}\n</style>\n"],"file":"assets/StackedContent-BY_noG07.js"}