var FPF_Pro_Modal=function(){function e(){this.modal=document.querySelector("#fpfUpgradeToPro"),this.modal&&this.initEvents()}var t=e.prototype;return t.initEvents=function(){this.modal.addEventListener("fpf_modal_open",function(e){this.handleProOpen(e)}.bind(this))},t.handleProOpen=function(e){var t=e.detail.initiator,r=t.getAttribute("data-fpf-modal");if(r){var a=t.getAttribute("data-fpf-plugin")||"FireBox",o=a.toLowerCase(),n=document.querySelector(".fpf-modal > .modal"+r);if(n){var i=t.getAttribute("data-fpf-modal-item")||!1;i?(n.querySelector(".po-feature").style.display="",n.querySelector(".po-upgrade").style.display="none"):(n.querySelector(".po-feature").style.display="none",n.querySelector(".po-upgrade").style.display="");var d=n.querySelector("[data-href]");d&&d.setAttribute("href",d.dataset.href.replace("{{PLUGIN_SLUG}}",o));var l=n.querySelectorAll("[data-text]");l&&l.forEach(function(e){e.innerHTML=e.dataset.text.replace("{{PLUGIN_NAME}}",a)}),n.querySelectorAll(".pro-feature-name").forEach(function(e){e.innerHTML=i})}}},e}();document.addEventListener("DOMContentLoaded",function(e){new FPF_Pro_Modal});

