(()=>{var e={5359(){const e=document.getElementById("mailchimp_api_key");e&&e.addEventListener("change",function(){const t=document.createElement("p");t.className="mc4wp-red",t.innerText=window.mc4wp_vars.i18n.invalid_api_key,e.nextElementSibling.innerText===t.innerText&&e.nextElementSibling.parentElement.removeChild(e.nextElementSibling),e.value.match(/^[0-9a-zA-Z*]{32}-[a-z]{2}[0-9]{1,2}$/)||e.parentElement.insertBefore(t,e.nextElementSibling)})},5602(){const e=window.mc4wp_vars.ajaxurl,t=window.mc4wp_vars.nonce,n=document.getElementById("mc4wp-mailchimp-lists-overview");n&&n.addEventListener("click",n=>{n.target.matches(".mc4wp-mailchimp-list")&&function(n){n.preventDefault();const i=n.target,l=i.parentElement.parentElement.nextElementSibling,o=i.getAttribute("data-list-id"),a=l.querySelector("div");if("none"===l.style.display){const n=new XMLHttpRequest;n.open("GET",e+"?action=mc4wp_get_list_details&_ajax_nonce="+t+"&format=html&ids="+o,!0),n.onload=function(){this.status>=400||(a.innerHTML=this.responseText)},n.send(null),l.style.display=""}else l.style.display="none"}(n)})},7785(e,t,n){const i=document.getElementById("mc4wp-admin").querySelectorAll(".mc4wp-list-input"),l=window.mc4wp_vars.mailchimp.lists;let o=[];const a=new(n(9885));function c(){o=[];for(let e=0;e *");for(let t=0;te.id===n).length>0;e[t].style.display=i?"":"none"}}(),a.emit("selectedLists.change",[o]),o}const s=document.getElementById("mc4wp-lists");s&&s.addEventListener("change",c),c(),e.exports={getSelectedLists:function(){return o},on:a.on.bind(a)}},1485(){function e(e,t,n,i){if("radio"===n.type&&!n.checked)return;const l="checkbox"===n.type?n.checked:n.value,o=String(l)===String(i);t?(e.style.display=o?"":"none",e.style.visibility=o?"":"hidden"):(e.style.opacity=o?"":"0.4",e.style.pointerEvents=o?"":"none"),[].forEach.call(e.querySelectorAll("input,select,textarea:not([readonly])"),function(e){e.readOnly=!o})}[].forEach.call(document.querySelectorAll("[data-showif]"),function(t){const n=JSON.parse(t.getAttribute("data-showif")),i=document.querySelectorAll('[name="'+n.element+'"]'),l=void 0===n.hide||n.hide;for(let o=0;o{const n=e.id.split("-").pop();return{id:n,title:e.querySelector("h2:first-of-type").textContent,element:e,nav:t.querySelectorAll(".nav-tab-"+n),open:d.bind(null,n)}});function a(e){for(let t=0;tnull!==e.element.offsetParent).shift();if(!e)return;const t=a(e.id);t&&(history.replaceState&&null===history.state&&history.replaceState(t.id,""),p(t))}(),e.exports={open:d,get:a}},9885(e){function t(){this.listeners={}}t.prototype.emit=function(e,t){this.listeners[e]=this.listeners[e]??[],this.listeners[e].forEach(e=>e.apply(null,t))},t.prototype.on=function(e,t){this.listeners[e]=this.listeners[e]??[],this.listeners[e].push(t)},e.exports=t}},t={};function n(i){var l=t[i];if(void 0!==l)return l.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}const i=n(4688),l=n(7785);n(5359),n(5602),n(1485),window.mc4wp=window.mc4wp||{},window.mc4wp.settings=l,window.mc4wp.tabs=i})();