(()=>{"use strict";var e={n:t=>{var a=t&&t.__esModule?()=>t.default:()=>t;return e.d(a,{a}),a},d:(t,a)=>{for(var n in a)e.o(a,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:a[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};window.jQuery;const t=window.grecaptcha;var a=e.n(t);const n=window.wcPPCP.utils,r=window.wcPPCP.actions,c=new(e.n(r)()),s=(0,n.getSetting)("recaptcha"),d=async()=>(await new Promise(e=>a().ready(e)),await a().execute(s.site_key,{action:"submit"}));c.addFilter("create_order_data",async e=>{if(!s.paymentMethods.includes(e?.payment_method))return e;const t=await d();return{...e,ppcp_recaptcha_response:t}}),c.addFilter("add_to_cart_data",async e=>{if(!s.paymentMethods.includes(e?.payment_method))return e;const t=await d();return{...e,ppcp_recaptcha_response:t}}),c.addFilter("create_vault_token_data",async e=>{if(!s.paymentMethods.includes(e?.payment_method))return e;const t=await d();return{...e,ppcp_recaptcha_response:t}}),c.addFilter("create_billing_agreement_data",async e=>{if(!s.paymentMethods.includes(e?.payment_method))return e;const t=await d();return{...e,ppcp_recaptcha_response:t}}),(this.wcPPCP=this.wcPPCP||{}).recaptcha={}})();
//# sourceMappingURL=recaptcha.js.map