(()=>{"use strict";const{applyFilters:t}=JetPlugins.hooks,e=function(e){var n;if(e.parent)return;const o=e.getInput("_captcha_token"),a=e.getSubmit().getFormId(),r=o?.nodes?.[0]?.parentElement;let i=null!==(n=window?.JetFormBuilderCaptchaConfig?.[a])&&void 0!==n&&n;if(!r||!i)return;o.isVisible=()=>!0,i.callback=t=>{o.value.current=t},i=t("jet.fb.hCaptcha.options",i,e);const s=window.hcaptcha.render(r,i);e.getSubmit().submitter?.status?.watch?.((()=>{window.hcaptcha.reset(s),o.onClear()}))};window.jfbHCaptchaOnLoad=function(){const{addAction:t}=JetPlugins.hooks;for(const t of Object.values(window.JetFormBuilder))t.hasOwnProperty("isObserved")&&e(t);t("jet.fb.observe.after","jet-form-builder/hCaptcha",e)}})();