(()=>{var e={774:()=>{document.addEventListener("DOMContentLoaded",(function(){for(var e=document.querySelectorAll("input, textarea"),t=0;t<e.length;t++)e[t].addEventListener("change",(function(){window.onbeforeunload=function(){return!0}}));document.getElementById("submit").addEventListener("click",(function(){window.onbeforeunload=null}))}))},1669:e=>{"use strict";e.exports=jQuery},3643:()=>{const e=document.getElementById("edd-email-reset");e&&(e.addEventListener("click",(t=>{t.preventDefault(),e.classList.remove("button-primary"),e.classList.add("updating-message"),e.disabled=!0;const n={action:"edd_reset_email",nonce:EDDAdminEmails.nonce,email_id:e.dataset.email};fetch(EDDAdminEmails.ajaxurl,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(n)}).then((e=>e.json())).then((t=>{if(t.success){const n=tinymce.get("edd-email-content"),d=document.getElementById("edd-email-content");n&&n.setContent(t.data.content),d.value=t.data.content,document.querySelector(".edd-promo-notice-dismiss").click(),e.classList.remove("updating-message"),e.classList.add("button-primary","updated-message")}})).catch((e=>{console.error(e)}))})),document.addEventListener("edd_promo_notice_dismiss",(t=>{e.classList.remove("updated-message"),e.disabled=!1})))},4451:(e,t,n)=>{var d=n(1669);!function(e,t){"use strict";const n=t(".edd-email__recipient");if(n.length){const e=t(".edd-email__recipient--custom"),d=t(".edd-email__recipient--admin");n.on("change",(function(t){"default"===t.target.value?(e.hide(),d.show()):"custom"===t.target.value?(e.show(),d.hide()):(e.hide(),d.hide())}))}}(document,d)},6434:()=>{document.querySelectorAll(".edd-email-status-badge").forEach((function(e){setTimeout((function(){e.classList.contains("edd-hidden")||e.classList.add("edd-fadeout")}),5e3)})),document.getElementById("submit").addEventListener("click",(function(e){document.querySelectorAll(".edd-email-status-badge").forEach((function(e){e.classList.contains("edd-hidden")?e.classList.remove("edd-hidden"):e.remove()}))}))}},t={};function n(d){var o=t[d];if(void 0!==o)return o.exports;var a=t[d]={exports:{}};return e[d](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var d in t)n.o(t,d)&&!n.o(e,d)&&Object.defineProperty(e,d,{enumerable:!0,get:t[d]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";n(4451),n(3643),n(6434),n(774)})()})();