1(()=>{function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(e){var i=function(e,i){if("object"!=t(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,i||"default");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===i?String:Number)(e)}(e,"string");return"symbol"==t(i)?i:String(i)}var o=function(){return t=function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=e,this.options={backdrop:!1!==i.backdrop,keyboard:!1!==i.keyboard,focus:!1!==i.focus,lockBody:!1!==i.lockBody},this.backdrop=null,this.isShown=!1,this._previousActiveElement=null,this._originalBodyOverflow="",this._originalBodyPaddingRight="",this._onClickModal=this._onClickModal.bind(this),this._onKeydown=this._onKeydown.bind(this),this._onFocusin=this._onFocusin.bind(this),this.el.addEventListener("click",this._onClickModal)},i=[{key:"show",value:function(){var t=this;this.isShown||this._dispatch("show",!0).defaultPrevented||(this.isShown=!0,this._previousActiveElement=document.activeElement,this.options.backdrop&&this._showBackdrop(),this.options.lockBody&&this._lockBody(),this.options.keyboard&&this.el.addEventListener("keydown",this._onKeydown),this.options.focus&&document.addEventListener("focusin",this._onFocusin),this.el.style.display="block",this.el.removeAttribute("aria-hidden"),this.el.setAttribute("aria-modal","true"),this.el.setAttribute("role","dialog"),this.el.setAttribute("tabindex","-1"),this.el.scrollTop=0,this.el.offsetHeight,this.el.classList.add("show"),this._transitionEnd(this.el,(function(){t.options.focus&&t.el.focus(),t._dispatch("shown")})))}},{key:"hide",value:function(){var t=this;this.isShown&&(this._dispatch("hide",!0).defaultPrevented||(this.isShown=!1,this.el.removeEventListener("keydown",this._onKeydown),document.removeEventListener("focusin",this._onFocusin),this.el.classList.remove("show"),this._transitionEnd(this.el,(function(){t.el.style.display="none",t.el.setAttribute("aria-hidden","true"),t.el.removeAttribute("aria-modal"),t.el.removeAttribute("role"),t._hideBackdrop(),t.options.lockBody&&t._unlockBody(),t._previousActiveElement&&"function"==typeof t._previousActiveElement.focus&&t._previousActiveElement.focus(),t._dispatch("hidden")}))))}},{key:"_onClickModal",value:function(t){var e=t.target.closest('[data-lvl-dismiss="modal"]');if(e&&this.el.contains(e))return t.preventDefault(),void this.hide();this.options.backdrop&&t.target===this.el&&this.hide()}},{key:"_onKeydown",value:function(t){"Escape"===t.key&&(t.preventDefault(),this.hide())}},{key:"_onFocusin",value:function(t){this.el.contains(t.target)||this.backdrop&&this.backdrop.contains(t.target)||this.el.focus()}},{key:"_showBackdrop",value:function(){this.backdrop=document.createElement("div"),this.backdrop.className="lvl-modal-backdrop fade",document.body.appendChild(this.backdrop),this.backdrop.offsetHeight,this.backdrop.classList.add("show")}},{key:"_hideBackdrop",value:function(){if(this.backdrop){var t=this.backdrop;this.backdrop=null,t.classList.remove("show"),this._transitionEnd(t,(function(){t.parentNode&&t.parentNode.removeChild(t)}))}}},{key:"_lockBody",value:function(){var t=window.innerWidth-document.documentElement.clientWidth;this._originalBodyOverflow=document.body.style.overflow,this._originalBodyPaddingRight=document.body.style.paddingRight,t>0&&(document.body.style.paddingRight=t+"px"),document.body.style.overflow="hidden",document.body.classList.add("lvl-modal-open")}},{key:"_unlockBody",value:function(){document.body.style.overflow=this._originalBodyOverflow||"",document.body.style.paddingRight=this._originalBodyPaddingRight||"",document.body.classList.remove("lvl-modal-open")}},{key:"_dispatch",value:function(t){var e=new CustomEvent(t+".lvl-modal",{bubbles:!0,cancelable:arguments.length>1&&void 0!==arguments[1]&&arguments[1]});return this.el.dispatchEvent(e),e}},{key:"_transitionEnd",value:function(t,e){var i=this._getTransitionDuration(t);
1if(0!==i){var o=!1,n=function(){o||(o=!0,clearTimeout(l),t.removeEventListener("transitionend",s),e())},s=function(e){e.target===t&&n()};t.addEventListener("transitionend",s);var l=setTimeout(n,i+50)}else e()}},{key:"_getTransitionDuration",value:function(t){var e=window.getComputedStyle(t);return 1e3*((parseFloat(e.transitionDuration)||0)+(parseFloat(e.transitionDelay)||0))}}],i&&e(t.prototype,i),o&&e(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i,o}();document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll(".lvl-modal").forEach((function(t){try{var e={el:null,id:null,args:null,modal:null,wrapper:null,content:null,height:null,expiration:30,init:function(t){this.el=t,this.id=this.el.id;var e=this.el.dataset.options.replace(/"/g,'"');this.args=JSON.parse(e),this.buildModal()},buildModal:function(){var t=this,e="banner"===this.args._lvl_modal_layout,i=this.args._lvl_modal_position,n=1==this.args._lvl_modal_allow_interaction,s=e||n;e?(this.el.dataset.modalType="banner",this.el.classList.add("modal-banner"),"top"!==i&&this.el.classList.add("fade")):(this.el.dataset.modalType="modal",this.el.classList.add("fade")),s&&this.el.classList.add("modal-no-backdrop");var l=document.createElement("div");l.classList.add("modal-dialog"),i&&l.classList.add("modal-dialog-"+i),"large"===this.args._lvl_modal_layout&&l.classList.add("modal-lg"),"small"===this.args._lvl_modal_layout&&l.classList.add("modal-sm"),e&&this.el.classList.add("modal-banner-"+i);var a=document.createElement("div");a.classList.add("modal-content"),l.appendChild(a);var r=document.createElement("div");if(r.classList.add("modal-body"),a.appendChild(r),!e&&"top"!==i||"bottom"===i){var d=document.createElement("button");d.classList.add("modal-close"),d.setAttribute("type","button"),d.setAttribute("data-lvl-dismiss","modal"),d.setAttribute("aria-label","Close"),d.innerHTML='<span aria-hidden="true">×</span>',a.appendChild(d)}r.innerHTML=this.el.innerHTML,this.el.innerHTML="",this.el.appendChild(l),this.modal=new o(this.el,{backdrop:!s,keyboard:!0,focus:!s,lockBody:!e}),this.el.addEventListener("hidden.lvl-modal",(function(){t.args._lvl_modal_set_cookie&&t.setCookie()})),e&&"top"===i&&this.buildBanner(),this.getCookie()&&"top"!==i||("load"===this.args._lvl_modal_trigger&&this.triggerLoad(),"exit"===this.args._lvl_modal_trigger&&this.triggerExit(),"time"===this.args._lvl_modal_trigger&&this.triggerTime(),"scroll"===this.args._lvl_modal_trigger&&this.triggerScroll(this.args._lvl_modal_trigger_scroll),"end"===this.args._lvl_modal_trigger&&this.triggerScroll(100),"click"===this.args._lvl_modal_trigger&&this.triggerClick())},buildBanner:function(){this.wrapper=this.el.querySelector(".wp-block-lvl-modals-lvl-modal-wrapper"),this.content=this.wrapper?this.wrapper.querySelector(".inner-content-wrapper"):null;var t=this,e=this.args._lvl_modal_target?this.args._lvl_modal_target:"body",i=document.querySelector(e);if(i||(console.warn("[lvl-modals] "+this.id+': banner Target "'+e+'" matched nothing on this page; using body instead.'),i=document.body),i.insertBefore(this.el,i.firstChild),this.wrapper&&this.content){if("top"===this.args._lvl_modal_position)if(this.args._lvl_modal_disable_toggle)setTimeout((function(){t.contentHeight()}),100);else{var o=document.createElement("button");o.classList.add("toggle"),o.setAttribute("type","button"),o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/></svg>',this.wrapper.appendChild(o),setTimeout((function(){t.contentHeight(),t.getCookie()&&(t.el.classList.add("collapsed"),t.toggleHeight())}),100),o.addEventListener("click",(function(){t.args._lvl_modal_set_cookie&&t.setCookie(),t.el.classList.toggle("collapsed"),t.toggleHeight()}))}}else console.warn("[lvl-modals] "+this.id+": no .wp-block-lvl-modals-lvl-modal-wrapper/.inner-content-wrapper found â skipping banner toggle. Check that this modal's content starts with the Modal/Banner Wrapper block.")},contentHeight:function(){this.height=this.content.offsetHeight+"px",this.content.style.height=this.height,this.setWrapperColor()},setWrapperColor:function(){var t=window.getComputedStyle(this.wrapper).backgroundColor;this.is_dark(t)?this.wrapper.classList.add("is-dark"):this.wrapper.classList.add("is-light")},is_dark:function(t){if(!t||"string"!=typeof t)return!1;if(t.includes("url("))return!1;var e,i,o,n=1;if(t.startsWith("#")){var s=t.replace("#","");e=parseInt(s.substring(0,2),16),i=parseInt(s.substring(2,4),16),o=parseInt(s.substring(4,6),16)}else{var l=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(!l)return!1;e=parseInt(l[1]),i=parseInt(l[2]),o=parseInt(l[3]),n=parseFloat(l[4]||1)}return(299*(e=Math.round(255*(1-n)+n*e))+587*(i=Math.round(255*(1-n)+n*i))+114*(o=Math.round(255*(1-n)+n*o)))/1e3<125},toggleHeight:function(){this.height||(this.height=this.content.offsetHeight+"px",this.content.style.height=this.height),this.content.style.height===this.height?this.content.style.height="0":this.content.style.height=this.height},triggerLoad:function(){this.modal.show()},triggerTime:function(){var t=this;setTimeout((function(){t.modal.show()}),this.args._lvl_modal_trigger_time)},triggerScroll:function(t){var e=this,i=function(){var i=document.documentElement.scrollHeight;(window.innerHeight+window.scrollY)/i>=t/100&&e.modal.show()};window.addEventListener("scroll",i),this.el.addEventListener("hidden.lvl-modal",(function(){window.removeEventListener("scroll",i)}))},triggerExit:function(){var t=this,e=function(e){e.toElement||e.relatedTarget||t.modal.show()};document.addEventListener("mouseout",e),this.el.addEventListener("hidden.lvl-modal",(function(){document.removeEventListener("mouseout",e)}))},triggerClick:function(){var t=this,e=this.id.replace("lvl-modal-","");
1document.querySelectorAll('a[href="#modal-'+e+'"]').forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault(),t.modal.show()}))}))},setSession:function(){sessionStorage.setItem(this.id,"1")},setCookie:function(){var t=new Date;t.setTime(t.getTime()+24*this.expiration*60*60*1e3),t=t.toUTCString(),document.cookie=this.id+"=1; expires="+t+"; path=/"},getCookie:function(){for(var t=this.id+"=",e=decodeURIComponent(document.cookie).split(";"),i=0;i<e.length;i++){for(var o=e[i];" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return!0}return!1},log:function(t){console.log(t)}};e.init(t)}catch(e){console.error("[lvl-modals] failed to initialize "+(t.id||"modal")+":",e)}}))}))})();
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.