!function(){"use strict";var t={145:function(t,n,r){function e(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=Array(n);r3?(o=d===e)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=r<2&&ye||e>d)&&(i[4]=r,i[5]=e,p.n=d,c=0))}if(o||r>1)return a;throw s=!0,e}return function(o,l,d){if(f>1)throw TypeError("Generator is already running");for(s&&1===l&&y(l,d),c=l,u=d;(n=c<2?t:u)||!s;){i||(c?c<3?(c>1&&(p.n=-1),y(c,u)):p.n=u:p.v=u);try{if(f=2,i){if(c||(o="next"),n=i[o]){if(!(n=n.call(i,u)))throw TypeError("iterator result is not an object");if(!n.done)return n;u=n.value,c<2&&(c=0)}else 1===c&&(n=i.return)&&n.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=t}else if((n=(s=p.n<0)?u:r.call(e,p))!==a)break}catch(n){i=t,c=1,u=n}finally{f=1}}return{value:n,done:s}}}(r,o,i),!0),l}var a={};function f(){}function l(){}function s(){}n=Object.getPrototypeOf;var p=[][e]?n(n([][e]())):(c(n={},e,function(){return this}),n),y=s.prototype=f.prototype=Object.create(p);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,c(t,o,"GeneratorFunction")),t.prototype=Object.create(y),t}return l.prototype=s,c(y,"constructor",s),c(s,"constructor",l),l.displayName="GeneratorFunction",c(s,o,"GeneratorFunction"),c(y),c(y,o,"Generator"),c(y,e,function(){return this}),c(y,"toString",function(){return"[object Generator]"}),(i=function(){return{w:u,m:d}})()}function c(t,n,r,e){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}c=function(t,n,r,e){function i(n,r){c(t,n,function(t){return this._invoke(n,r,t)})}n?o?o(t,n,{value:r,enumerable:!e,configurable:!e,writable:!e}):t[n]=r:(i("next",0),i("throw",1),i("return",2))},c(t,n,r,e)}document.addEventListener("DOMContentLoaded",function(){var t=hostinger_reach_subscription_block_data.translations;document.querySelectorAll(".hostinger-reach-block-subscription-form").forEach(function(n){var r=n.querySelector(".reach-subscription-message");n.addEventListener("submit",function(c){c.preventDefault();var u=n.querySelector('button[type="submit"]'),a=new FormData(n),f={};a.forEach(function(t,n){if(n.includes(".")){var r=n.split("."),e=(0,o.A)(r,2),i=e[0],c=e[1];f[i]||(f[i]={}),f[i][c]=t}else f[n]=t}),u.disabled=!0,fetch(hostinger_reach_subscription_block_data.endpoint,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":hostinger_reach_subscription_block_data.nonce},body:JSON.stringify(f)}).then(function(){var o=(0,e.A)(i().m(function e(o){var c;return i().w(function(e){for(;;)switch(e.n){case 0:if(r.style.display="block",n.reset(),!o.ok){e.n=1;break}r.textContent=t.thanks,n.querySelector(".hostinger-reach-block-submit").style.display="none",e.n=4;break;case 1:return e.n=2,o.json();case 2:if(!(c=e.v).errors){e.n=3;break}r.textContent=c.errors,r.style.display="block",u.disabled=!1,e.n=4;break;case 3:throw new Error;case 4:return e.a(2)}},e)}));return function(_x){return o.apply(this,arguments)}}()).catch(function(n){r.textContent=t.error,r.style.display="block",u.disabled=!1})})})})}() ;