1import{p as e}from"./refresh_form_authenticity_token-BAlmWyyV.js";var t=`https://www.recaptcha.net`,n=`recaptcha-api`,r=8e3,i=null,a=()=>new Promise(e=>grecaptcha.ready(()=>e(grecaptcha)));function o(e){if(typeof grecaptcha<`u`)return a();if(i)return i;document.getElementById(n)?.remove();let o=window.App.loadScriptAsync(`${t}/recaptcha/api.js?render=${e}`,n,null,1).then(()=>{if(typeof grecaptcha>`u`)throw Error(`reCAPTCHA loaded without defining grecaptcha`);return a()}),s=new Promise((e,t)=>{setTimeout(()=>t(Error(`reCAPTCHA timed out`)),r)});return i=Promise.race([o,s]).catch(e=>{throw i=null,e}),i}var s=6e3,c=e=>{typeof requestIdleCallback==`function`?requestIdleCallback(e):setTimeout(e,0)};function l(t){let n=document.querySelector(`.verify-with-recaptcha`);if(!n)return;let r=n.closest(`form`),i=r.querySelector(`input[type='email']`),a=r.querySelector(`input[type='password']`),l=()=>o(t).catch(()=>{});e(r,`focusin`,`recaptcha_warm_on_focus`,l),e(window,`load`,`recaptcha_warm_on_idle`,()=>c(l));let u=()=>{let e=new Promise(e=>setTimeout(()=>e(null),s)),n=o(t).then(e=>e.execute(t,{action:`submit`}));return Promise.race([n,e]).catch(()=>null)};e(n,`click`,`recaptcha_submit`,async e=>{if(e.preventDefault(),i&&!i.checkValidity()){i.reportValidity();return}if(a&&!a.checkValidity()){a.reportValidity();return}n.disabled=!0,n.dataset.disableWith&&(n.value=n.dataset.disableWith);let t=await u();if(t){let e=document.createElement(`input`);e.setAttribute(`type`,`hidden`),e.setAttribute(`name`,`recaptcha_token`),e.setAttribute(`value`,t),r.appendChild(e)}r.submit()})}export{l as t}; 2//# sourceMappingURL=handle_recaptcha-C2ZZYmVN.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.