1const modal_open_event=new Event("modalopen"),modal_closed_event=new Event("modalclosed");function open_modal(id){const modal=document.getElementById(id);modal&&(modal.classList.add("modal--active"),document.body.classList.add("modal-active"),modal_group_init(modal),modal.setAttribute("tabindex",0),modal.addEventListener("animationend",e=>{e.target===modal&&modal.focus(),e.stopImmediatePropagation()}),modal.addEventListener("keydown",e=>{"Escape"===e.key?close_modal(modal.id):"Tab"===e.key&&setTimeout(function(){act.isfocuswithin(modal)||close_modal(modal.id)},100)}),modal.dispatchEvent(modal_open_event))}function close_modal(id){const modal=document.getElementById(id);if(modal){modal.classList.remove("modal--active"),document.body.classList.remove("modal-active");const modal_arrows=modal.querySelector(".modal__arrows");modal_arrows&&modal_arrows.remove(),modal.addEventListener("keydown",function(e){e.stopImmediatePropagation()}),modal.dispatchEvent(modal_closed_event)}}function modal_group_init(modal){if("modalGroup"in modal.dataset){const group=modal.dataset.modalGroup,group_modals=document.querySelectorAll('.modal[data-modal-group="'+group+'"]');if(group_modals.length>1){let prev_svg,next_svg;for(modal.classList.add("modal--has-arrows"),"rtl"==document.documentElement.getAttribute("dir")?(prev_svg='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.32218 2.32544C6.75176 1.89152 7.44824 1.89152 7.87782 2.32544L17.6778 11.2143C18.1074 11.6482 18.1074 12.3518 17.6778 12.7857L7.87782 21.6746C7.44824 22.1085 6.75176 22.1085 6.32218 21.6746C5.89261 21.2406 5.89261 20.5371 6.32218 20.1032L15.3444 12L6.32218 3.89679C5.89261 3.46287 5.89261 2.75935 6.32218 2.32544Z" fill="currentColor"/></svg>',next_svg='<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M17.6778 2.32544C17.2482 1.89152 16.5518 1.89152 16.1222 2.32544L6.32219 11.2143C5.89261 11.6482 5.89261 12.3518 6.32219 12.7857L16.1222 21.6746C16.5518 22.1085 17.2482 22.1085 17.6778 21.6746C18.1074 21.2406 18.1074 20.5371 17.6778 20.1032L8.65564 12L17.6778 3.89679C18.1074 3.46287 18.1074 2.75935 17.6778 2.32544Z" fill="currentColor"/></svg>'):(prev_svg='<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M17.6778 2.32544C17.2482 1.89152 16.5518 1.89152 16.1222 2.32544L6.32219 11.2143C5.89261 11.6482 5.89261 12.3518 6.32219 12.7857L16.1222 21.6746C16.5518 22.1085 17.2482 22.1085 17.6778 21.6746C18.1074 21.2406 18.1074 20.5371 17.6778 20.1032L8.65564 12L17.6778 3.89679C18.1074 3.46287 18.1074 2.75935 17.6778 2.32544Z" fill="currentColor"/></svg>',next_svg='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.32218 2.32544C6.75176 1.89152 7.44824 1.89152 7.87782 2.32544L17.6778 11.2143C18.1074 11.6482 18.1074 12.3518 17.6778 12.7857L7.87782 21.6746C7.44824 22.1085 6.75176 22.1085 6.32218 21.6746C5.89261 21.2406 5.89261 20.5371 6.32218 20.1032L15.3444 12L6.32218 3.89679C5.89261 3.46287 5.89261 2.75935 6.32218 2.32544Z" fill="currentColor"/></svg>'),i=0;i<group_modals.length;i++)if(group_modals[i]==modal){let prev_modal,next_modal;return group_modals[i-1]?prev_modal=group_modals[i-1].id:group_modals[i]==group_modals[0]&&(prev_modal=group_modals[group_modals.length-1].id),group_modals[i+1]?next_modal=group_modals[i+1].id:group_modals[i]==group_modals[group_modals.length-1]&&(next_modal=group_modals[0].id),modal.insertAdjacentHTML("beforeend",'<div class="modal__arrows"><button class="modal__arrow modal__arrow--prev" close-modal="'+modal.id+'" open-modal="'+prev_modal+'" aria-label="Previous">'+prev_svg+'</button><button class="modal__arrow modal__arrow--next" close-modal="'+modal.id+'" open-modal="'+next_modal+'" aria-label="Next">'+next_svg+"</button></div>"),modal.addEventListener("keydown",e=>{"ArrowLeft"==e.key?(close_modal(modal.id),"rtl"==document.documentElement.getAttribute("dir")?open_modal(next_modal):open_modal(prev_modal)):"ArrowRight"==e.key&&(close_modal(modal.id),"rtl"==document.documentElement.getAttribute("dir")?open_modal(prev_modal):open_modal(next_modal))}),void act.swipedetect(modal,function(swipedir){"right"==swipedir?(close_modal(modal.id),"rtl"==document.documentElement.getAttribute("dir")?open_modal(next_modal):open_modal(prev_modal)):"left"==swipedir&&(close_modal(modal.id),"rtl"==document.documentElement.getAttribute("dir")?open_modal(prev_modal):open_modal(next_modal))})}}}}const modal_iframe=document.getElementsByClassName("modal__iframe");for(let i=0;i<modal_iframe.length;i++)modal_iframe[i].closest(".modal").addEventListener("modalopen",function(e){modal_iframe[i].hasAttribute("data-src")&&(modal_iframe[i].setAttribute("src",modal_iframe[i].getAttribute("data-src")),modal_iframe[i].removeAttribute("data-src"))}),modal_iframe[i].closest(".modal").addEventListener("modalclosed",function(e){modal_iframe[i].hasAttribute("src")&&(modal_iframe[i].setAttribute("data-src",modal_iframe[i].getAttribute("src")),modal_iframe[i].removeAttribute("src"))});const modal_media=document.getElementsByClassName("modal__media");for(let i=0;i<modal_media.length;i++)modal_media[i].closest(".modal").addEventListener("modalopen",function(e){modal_media[i].hasAttribute("data-autoplay")&&modal_media[i].play()}),modal_media[i].closest(".modal").addEventListener("modalclosed",function(e){modal_media[i].pause()});document.addEventListener("click",function(e){const link=e.target.closest("[open-modal]");link&&open_modal(link.getAttribute("open-modal"))}),document.addEventListener("click",function(e){const link=e.target.closest("[close-modal]");link&&close_modal(link.getAttribute("close-modal"))}); 2//# sourceURL=https://39661307.fs1.hubspotusercontent-na1.net/hubfs/39661307/hub_generated/template_assets/1/114053264300/1783796077252/template_modal.js
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.