"use strict";var e=require("react/jsx-runtime"),r=require("@marsidev/react-turnstile"),t=require("./context-rs-ygOK2.js");require("react"),require("@privy-io/js-sdk-core"),require("tinycolor2");const o=({delayedExecution:o,captchaContext:n,...i})=>{let{appId:s,setError:c,setToken:p,setExecuting:a,siteKey:u,ref:d}=n,{scriptNonce:x}=t.useAppConfig();/*#__PURE__*/return e.jsx(r.Turnstile,{...i,ref:d,siteKey:u??"",scriptOptions:x?{nonce:x}:void 0,options:{action:s,size:"invisible",...o?{appearance:"execute",execution:"execute"}:{appearance:"always",execution:"render"}},onUnsupported:()=>{i.onUnsupported?.(),console.warn("Browser does not support Turnstile.")},onError:e=>{i.onError?.(e),c("Captcha failed"),a(!1)},onSuccess:e=>{i.onSuccess?.(e),p(e),a(!1)},onExpire:e=>{i.onExpire?.(e);try{d.current?.reset(),c(void 0),p(void 0)}catch(e){c("expired_and_failed_reset")}}})};exports.TurnstileWrapper=o,exports.default=o;
//# sourceMappingURL=TurnstileWrapper-Dq0J9Ttc.js.map
