!function(){var e={2662:function(){document.addEventListener("DOMContentLoaded",(()=>(()=>{document.querySelectorAll(".wp-mastertoolkit__input-text.slug-url").forEach((t=>{const o=t.querySelector(".home-url"),n=t.querySelector(".copy-button"),r=t.querySelector(".slug-input");n&&r&&o&&void 0!==o.value&&n.addEventListener("click",(t=>e(t,r,o.value)))}));const e=(e,t,o)=>{e.preventDefault();const n=`${o}${t.value}`,r=document.createElement("textarea");r.value=n,document.body.appendChild(r),r.select(),document.execCommand("copy"),document.body.removeChild(r)}})()))},7876:function(){document.addEventListener("DOMContentLoaded",(function(){const e=document.querySelectorAll("[data-show-if]");function t(e){let[t,o]=e.includes("!=")?e.split("!="):e.split("=");const n=e.includes("!="),r=document.querySelector(`[name="${t}"]:last-of-type`),c=document.querySelector(`input[type="radio"][name="${t}"]:checked`);if(!r&&!c)return!1;let a=r;c&&(a=c);let s=a.value;if("checkbox"===a.type){const e=document.querySelector(`input[type="hidden"][name="${t}"]`);s=a.checked?a.value:e?e.value:""}return n?s!==o:s===o}function o(){e.forEach((e=>{const o=e.dataset.showIf.split("|").map((e=>e.trim()));let n=!1;for(const e of o)if(e.split("&").map((e=>e.trim())).every(t)){n=!0;break}e.style.display=n?"":"none",e.querySelectorAll("input[required], select[required], textarea[required]").forEach((e=>{n?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}))}))}o();const n=new Set;e.forEach((e=>{e.dataset.showIf.split(/[&|]/).forEach((e=>{const t=e.trim(),o=t.includes("!=")?t.split("!=")[0]:t.split("=")[0];n.add(o)}))})),n.forEach((e=>{const t=document.querySelector(`[name="${e}"]:last-of-type`),n=document.querySelectorAll(`input[type="radio"][name="${e}"]`);t&&0===n.length?t.addEventListener("change",o):n.length>0&&n.forEach((e=>{e.addEventListener("change",o)}))}))}))},3907:function(){document.addEventListener("DOMContentLoaded",(()=>(()=>{const e=document.querySelector(".wrap.wp-mastertoolkit form"),t=document.querySelector(".wp-mastertoolkit__save-button");e&&t&&e.addEventListener("change",(e=>{t.classList.add("show")}))})()))}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var c=t[n]={exports:{}};return e[n](c,c.exports,o),c.exports}o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";o(3907),o(2662),o(7876),document.addEventListener("DOMContentLoaded",(()=>{const e=document.querySelector(".wrap.wp-mastertoolkit form"),t=document.querySelector("#JS-test-btn"),o=document.querySelector("#JS-test-input"),n=document.querySelector("#JS-test-loader"),r=document.querySelector("#JS-test-msg"),c=document.querySelectorAll(".wp-mastertoolkit__providers__input"),a=document.querySelectorAll(".JS-confirm-authorization-btn"),s=document.querySelectorAll(".JS-confirm-authorization-text"),i=e=>{"JS-test-input"!==(e.target.id||"")&&(t.disabled=!0,r.innerHTML=wpmastertoolkit_smtp_mailer.i18n.save_before_test,a.forEach((e=>{e.classList.add("disabled")})),s.forEach((e=>{e.innerHTML=wpmastertoolkit_smtp_mailer.i18n.save_before_confirm,e.classList.remove("warning"),e.classList.add("danger")})))},d=(e,t=!1)=>{r.innerHTML=e,t?r.classList.add("success"):r.classList.remove("success")};e&&(e.addEventListener("change",(e=>i(e))),e.addEventListener("keyup",(e=>i(e)))),t&&t.addEventListener("click",(e=>(e=>{e.preventDefault();const t=new FormData;t.append("action",wpmastertoolkit_smtp_mailer.action),t.append("nonce",wpmastertoolkit_smtp_mailer.nonce),t.append("testEmail",o.value);const r={method:"POST",body:t,redirect:"follow"};d(""),n.classList.add("show"),fetch(wpmastertoolkit_smtp_mailer.ajaxUrl,r).then((e=>e.json())).then((e=>{e.success?d(e.data.message,!0):d(e.data.message,!1),n.classList.remove("show")}))})(e))),c.forEach((e=>{e.addEventListener("click",(()=>(e=>{const t=e.value;if(!t)return;const o=document.querySelector(`.wp-mastertoolkit__section__body.${t}`);o&&(document.querySelectorAll(".wp-mastertoolkit__section__body.active").forEach((e=>{e.classList.remove("active")})),o.classList.add("active"))})(e)))}))}))}()}();