1/* eslint-disable */ 2import{FranklinBlock,overlayHostInstance}from"../../scripts/lib-franklin.js";export default class OverlayPatientStories extends FranklinBlock{variants=[{name:"patientStories",test:!0}];async beforeBlockRender(){let t=!1,e=!1,n=!0;(this.inputData.body||this.inputData?.contentAtoms?.disclaimer)&&(t=!0),(this.inputData.attribution||this.inputData.supportText)&&(e=!0),this.inputData.hiddenButton&&"true"===this.inputData.hiddenButton.toLowerCase()&&(n=!1),this.inputData={patientStories:{...this.inputData,showPatientContent:t,showPatientStoriesSubinfo:e,showPatientButton:n}}}popupOverlay(t,e=!1){const{content:n}=this.block.querySelector("template");if(!n)return void console.error("No content found in overlay block");this.block.classList.contains("full")&&overlayHostInstance().block.classList.add("full","core-overlay-host-full");const o=overlayHostInstance();if(!o)return void console.error("No overlay host found");const i=n.querySelector(".patient-stories-body")?.outerHTML||"";if(e)return void(this.block.innerHTML=i);o.reset(),o.setBodyHTML(i);const s=n.querySelector(".patient-stories-footer")?.outerHTML||null,a=o.block.querySelector(".core-overlay-host-content");a.classList.add("patient-modal"),s?o.setFooterHTML(s,!0):a.classList.add("patient-modal-no-footer"),o.decorateItems(),this.block.classList.forEach(t=>{overlayHostInstance().addCustomClass(t)}),o.open();const r=overlayHostInstance().block.querySelector(".patient-stories-footer");overlayHostInstance().block.querySelector(".core-overlay-host-after-scroll").classList.add("hidden");const l=overlayHostInstance().block.querySelector(".core-overlay-host-scroll-container");var c;c=l,Math.abs(c.scrollHeight-c.clientHeight-c.scrollTop)<=1?r?.classList.add("no-shadow"):r?.classList.remove("no-shadow")}async afterBlockRender(){this.block.classList.add("block-focus-visible"),!1===this.inputData.patientStories.showPatientButton?(this.block.querySelector(".button").style.display="none",setTimeout(()=>{this.popupOverlay(this,!0)},300)):this.block.querySelector(".button").addEventListener("click",this.popupOverlay.bind(this))}}export const schema='{\n "overlay-patient-stories": {\n "name": "overlay-patient-stories",\n "description": "A modal dialog component that displays content over the main page, focusing user attention on specific information or actions. Features multiple presentation styles including full-screen, patient support signup forms, and streamlined single-step interactions, with customizable labels and actions.",\n "coreBlockData": {\n "blockName": "core-overlay-patient-stories",\n "isGlobalBlock": true,\n "variants": ["full"],\n "positionInPage": "modal"\n },\n "schema": {\n "classes": ["full"],\n "contentAtoms": true,\n "label": {\n "selector": "selectRow:label",\n "target": "textContent",\n "description": "The main title or heading text displayed at the top of the overlay to identify its purpose or content. This element establishes context for users, sets expectations about the overlay\'s function, and creates a visual hierarchy within the modal interface. The label should be concise yet descriptive enough to immediately communicate the overlay\'s purpose."\n },\n "patientImage": {\n "selector": "selectRow:patient_image",\n "target": "innerHTML",\n "description": "patient image for patient overlay variant",\n "optional": true\n },\n "quote": {\n "selector": "selectRow:quote",\n "target": "innerHTML",\n "description": "patient quote for patient overlay variant",\n "optional": true\n },\n "attribution": {\n "selector": "selectRow:attribution",\n "target": "textContent",\n "description": "patient attribution for patient overlay variant",\n "optional": true\n },\n "hiddenButton": {\n "selector": "selectRow:hidden_button",\n "target": "textContent",\n "description": "patient hidden button for patient overlay variant",\n "optional": true\n },\n "body": {\n "selector": "selectRow:body",\n "target": "innerHTML",\n "description": "patient body for patient overlay variant",\n "optional": true\n },\n "headline": {\n "selector": "selectRow:headline",\n "target": "innerHTML",\n "description": "patient headline for patient overlay variant",\n "optional": true\n },\n "supportText": {\n "selector": "selectRow:support_text",\n "target": "textContent",\n "description": "patient support text for patient overlay variant",\n "optional": true\n },\n "footerButtons": {\n "selector": "selectRow:footer_buttons",\n "target": "innerHTML",\n "description": "patient footer buttons for patient overlay variant",\n "optional": true\n }\n }\n }\n}\n';export const template=' {{#patientStories}}\n<p class="button-container">\n <a href="#" title="{{ label }}" class="button primary">\n <span>{{ label }}</span>\n </a>\n</p>\n<template>\n <div class="patient-stories-wrapper">\n <div class="patient-stories-body">\n <div class="patient-stories-header">\n {{ #patientImage }}\n <div class="patient-stories-image">{{ patientImage }}</div>\n {{ /patientImage }}\n\n <div class="patient-stories-information">\n {{ #quote }}
2\n <span class="icon icon-lib-quote"></span>\n <div class="patient-stories-quote">{{ quote }}</div>\n {{ /quote }}\n\n {{ #headline }}\n <div class="patient-stories-headline">{{ headline }}</div>\n {{ /headline }}\n\n {{ #showPatientStoriesSubinfo }}\n <div class="patient-stories-subinfo">\n {{ #attribution }}\n <div class="patient-stories-attribution">{{ attribution }}</div>\n {{ /attribution }}\n\n {{ #supportText }}\n <div class="patient-stories-support-text">{{ supportText }}</div>\n {{ /supportText }}\n </div>\n {{ /showPatientStoriesSubinfo }}\n </div>\n </div>\n {{ #showPatientContent }}\n <div class="patient-stories-content">\n {{ #body }}\n <div class="patient-stories-body-content">{{ body }}</div>\n {{ /body }}\n\n {{ #contentAtoms.disclaimer }}\n <div class="patient-stories-disclaimer">{{ contentAtoms.disclaimer }}</div>\n {{ /contentAtoms.disclaimer }}\n </div>\n {{ /showPatientContent }}\n\n </div>\n\n {{ #footerButtons }}\n <div class="patient-stories-footer">\n {{ footerButtons }}\n </div>\n {{ /footerButtons }}\n </div>\n</template>\n{{/patientStories}}\n';export const smartCaptureConfig=" {}";
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.