1(()=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,n(o.key),o)}}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,n||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}var i=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(this.popinElement=t,this.popinId=this.popinElement.dataset.popinId,this.scrollThreshold=this.getScrollThreshold(),this.isOpened=!1,this.closeBtnElement=this.popinElement.querySelector("[data-popin-close]"),this.inputEmailElement=this.popinElement.querySelector("[data-popin-email]"),this.containerElement=this.popinElement.querySelector(".container"),this.handleScroll=this.handleScroll.bind(this),this.handleOutsideClick=this.handleOutsideClick.bind(this),this.close=this.close.bind(this),this.handleInput=this.handleInput.bind(this),this.init())},(n=[{key:"init",value:function(){var e=JSON.parse(localStorage.getItem("closedPopins"))||[];this.popinId&&e.includes(this.popinId)||window.addEventListener("scroll",this.handleScroll,{once:!0})}},{key:"getScrollThreshold",value:function(){var e=this.popinElement.dataset.popin,t=parseInt(e,10);return!isNaN(t)&&t>=0&&t<=100?t/100:.5}},{key:"handleScroll",value:function(){window.scrollY+window.innerHeight>=document.documentElement.scrollHeight*this.scrollThreshold?this.open():window.addEventListener("scroll",this.handleScroll,{once:!0})}},{key:"open",value:function(){var e=this;this.isOpened||(this.isOpened=!0,this.popinElement.classList.add("open"),requestAnimationFrame(function(){e.containerElement.classList.add("open")}),window.addEventListener("click",this.handleOutsideClick),this.closeBtnElement&&this.closeBtnElement.addEventListener("click",this.close),this.inputEmailElement&&this.inputEmailElement.addEventListener("input",this.handleInput))}},{key:"close",value:function(){var e=this;if(this.isOpened){if(this.isOpened=!1,this.popinId){var t=JSON.parse(localStorage.getItem("closedPopins"))||[];t.includes(this.popinId)||(t.push(this.popinId),localStorage.setItem("closedPopins",JSON.stringify(t)))}this.containerElement.classList.remove("open"),this.popinElement.addEventListener("transitionend",function(){e.popinElement.classList.remove("open"),e.removeEventListeners()},{once:!0})}}},{key:"handleOutsideClick",value:function(e){e.target===this.popinElement&&this.close()}},{key:"handleInput",value:function(){var e=this.inputEmailElement.parentNode;""!==this.inputEmailElement.value.trim()?e.classList.add("is-not-empty"):e.classList.remove("is-not-empty")}},{key:"removeEventListeners",value:function(){window.removeEventListener("click",this.handleOutsideClick),this.closeBtnElement&&this.closeBtnElement.removeEventListener("click",this.close),this.inputEmailElement&&this.inputEmailElement.removeEventListener("input",this.handleInput)}}])&&t(e.prototype,n),i&&t(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,i}();document.addEventListener("DOMContentLoaded",function(){var e=document.querySelector("[data-popin]");e&&new i(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.