!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t)}]),function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([,function(e,t,n){"use strict";function r(e){e.preventDefault();const t=this,n=t.querySelector('button[type="submit"]'),r=t.querySelector(".edd-sl-sdk-license-response");n&&function(e){e.disabled=!0,e.classList.add("updating-message")}(n),fetch(ajaxurl,{method:"POST",credentials:"same-origin",body:new FormData(t)}).then(e=>e.json()).then(e=>{e.success?(r.classList.remove("edd-sl-sdk-license-response__invalid"),r.classList.add("edd-sl-sdk-license-response__valid"),e.data.message&&(r.innerHTML=e.data.message),e.data.newFormInputs&&function(e,t){Object.keys(t).forEach(n=>{if("buttonText"===n){const r=e.querySelector('button[type="submit"]');r&&(r.textContent=t[n])}else{const r=e.querySelector('input[name="'+n+'"]');r&&(r.value=t[n])}})}(t,e.data.newFormInputs)):(r.classList.remove("edd-sl-sdk-license-response__valid"),r.classList.add("edd-sl-sdk-license-response__invalid"),r.textContent=e.data)}).finally(()=>{!function(e){e.disabled=!1,e.classList.remove("updating-message")}(n)})}n.r(t),document.addEventListener("DOMContentLoaded",()=>{const e=document.querySelectorAll(".edd-sl-sdk-license-form");e&&e.forEach(e=>{e.addEventListener("submit",r)})})}]);