1import{l as t}from"./app.js";class s{constructor(s){return this.log=t("CtaModal"),s?(this.log("Init CtaModal: ",s),this.$node=s,this.$close=this.$node.querySelector(".article-cta-modal__close"),this.lsKey=`${encodeURIComponent(document.location.href)}-cta-modal-${this.$node.dataset.ctaModal}`,this.lsLocalKey=localStorage.getItem(this.lsKey),this.activeClass="active",this.events(),this):(this.log("Node not found"),!1)}events(){switch(this.lsLocalKey){case null:case"1":this.show(this.$node);break;default:return null}return this.show(this.$node),this.$close.addEventListener("click",(t=>{t.preventDefault(),this.$node.classList.contains(this.activeClass)&&this.hide(this.$node)})),this}show(t){return t.addEventListener("transitionend",(()=>t.classList.add(this.activeClass))()),this}hide(t){switch(this.lsLocalKey){case null:localStorage.setItem(this.lsKey,"1");break;case"1":localStorage.setItem(this.lsKey,"2");break;default:return null}return t.addEventListener("transitionend",(()=>t.classList.remove(this.activeClass))()),this}}export{s as CtaModal};
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.