1import{r as v,y as h,o as O,a as k,c as E,z as L,u as p,b as C,h as M,d as _}from"./main-Ch-kpcoJ.js";import{E as y}from"./eventBus-CP2x0Qys.js";function b(l={}){const{initialOpen:d=!1,closeOnEsc:s=!0,closeOnOverlay:u=!0,onOpen:r,onClose:n,beforeClose:c}=l,o=v(d),a=v(null);function i(e){e!==void 0&&(a.value=e),o.value=!0,r==null||r()}async function t(){c&&!await c()||(o.value=!1,n==null||n(),a.value=null)}function m(e){o.value?t():i(e)}function g(e){u&&e.target===e.currentTarget&&t()}function f(e){s&&e.key==="Escape"&&o.value&&t()}function w(){s&&window.removeEventListener("keydown",f)}s&&window.addEventListener("keydown",f);try{h(()=>{w()})}catch{}return{isOpen:o,data:a,open:i,close:t,toggle:m,handleOverlayClick:g,handleEscKey:f,cleanup:w}}const B={key:0,class:"fixed top-0 left-0 z-50 flex justify-center items-center w-full h-full bg-black-true bg-opacity-90 overflow-y-auto"},I={__name:"AppModal",props:{modalId:{type:String,required:!0},mode:{type:String,default:"if",validator:l=>["if","show"].includes(l)}},setup(l){const d=l,{isOpen:s,open:u,toggle:r,handleOverlayClick:n,cleanup:c}=b({closeOnEsc:!0,closeOnOverlay:!0,onOpen:()=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"videoModalOpen"})},onClose:()=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"videoModalClose"})}}),o=a=>{a===d.modalId&&r()};return O(()=>{new URLSearchParams(window.location.search).get("preview_video")===d.modalId&&u(),y.$on("toggle:modal",o)}),k(()=>{y.$off("toggle:modal",o),c()}),(a,i)=>p(s)?(C(),E("div",B,[M("div",{class:"adhere",onClick:i[0]||(i[0]=(...t)=>p(n)&&p(n)(...t))}),_(a.$slots,"default")])):L("",!0)}};export{I as default};
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.