((t,c)=>{t.ConvertFormsInitCheckboxReCaptcha=function(){var e=["sitekey","theme","size","tabindex","callback","expired-callback","error-callback"];c.querySelectorAll(".g-recaptcha").forEach(function(a){var r={};a.dataset?r=a.dataset:e.forEach(function(e){var t="data-"+e;a.hasAttribute(t)&&(r[e]=a.getAttribute(t))}),a.setAttribute("data-recaptcha-widget-id",t.grecaptcha.render(a,r)),(a.closest(".convertforms")||c).querySelectorAll('textarea[name="g-recaptcha-response"]').forEach(function(e){e.setAttribute("aria-hidden","true"),e.setAttribute("aria-label","reCAPTCHA response")})})},ConvertForms.Helper.onReady(function(){var e;"object"!=typeof grecaptcha&&0!=(e=c.querySelectorAll(".nr-recaptcha:not([data-recaptcha-widget-id])")).length&&e.forEach(function(e){e.innerHTML=ConvertForms.Helper.text("COM_CONVERTFORMS_RECAPTCHA_NOT_LOADED")})}),c.addEventListener("ConvertFormsAfterSubmit",function(e){var t,e=e.detail.instance.selector.querySelector(".g-recaptcha");e&&(t=e.getAttribute("data-size"),e)&&(e=e.getAttribute("data-recaptcha-widget-id"))&&(grecaptcha.reset(e),"invisible"==t)&&grecaptcha.execute(e)})})(window,document);

