Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-google-recaptcha-ultimate

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-google-recaptcha-ultimate - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

dist/cjs/components/GoogleReCaptchaCheckbox.js

4

dist/cjs/index.js

@@ -1,3 +0,3 @@

/* @license react-google-recaptcha-ultimate v1.0.2 */
"use strict";var e=require("react");const t=e.createContext({googleReCaptcha:{},siteKey:"",language:"",isLoading:!0,executeV3:()=>{throw Error("GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider")},executeV2Invisible:()=>{throw Error("GoogleReCaptchaContext has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider")},reset:()=>{throw Error("GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider")},getResponse:()=>{throw Error("GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider")},render:()=>{throw Error("GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider")}}),{Provider:o,Consumer:a}=t,r=()=>e.useContext(t),n=({host:e="google.com",isEnterprise:t,render:o,hl:a,badge:r})=>`https://www.${e}/recaptcha/${t?"enterprise.js":"api.js"}?${new URLSearchParams({...a&&{hl:a},...r&&{badge:r},render:o})}`,c=()=>".grecaptcha-badge{display: none !important;}",i=e=>{const t=document.getElementById(e);if(t)for(;t.lastChild;)t.lastChild.remove()},s="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;exports.GoogleReCaptchaCheckbox=({id:t="google-recaptcha-checkbox-container",onChange:o,action:a,language:n,...c})=>{const{siteKey:d,render:l,language:p}=r(),h=e.useRef(null);return s((()=>{if(!l)return;const e=document.createElement("div"),r={sitekey:d,callback:o,...(n??p)&&{hl:n??p},...c};return l(e,a?{...r,action:a}:r),h.current&&h.current.appendChild(e),()=>{i(t)}}),[l,n,o,t,d,c.size,a,c.theme]),e.createElement("div",{id:t,ref:h,...c})},exports.GoogleReCaptchaProvider=({type:t,siteKey:a,language:r,scriptProps:c,isEnterprise:s=!1,host:d,children:l,explicit:p,onLoad:h,onError:g})=>{const[u,m]=e.useState(!0),[b,y]=e.useState();e.useEffect((()=>{if(!a)throw new Error("Google ReCaptcha site key not provided");const e=c?.id??"google-recaptcha-script",o=(e=>!!document.querySelector(`#${e}`)||!!document.querySelector('script[src*="/recaptcha/"]:not([src*="gstatic"])'))(e),l=()=>{const e=s?window.grecaptcha?.enterprise:window.grecaptcha;if(e){if(p||e.ready((async()=>{y(e),h&&await h(e),m(!0)})),p){const r={size:"v3"===t||"v2-invisible"===t?"invisible":"normal",...("v3"===t||"v2-invisible"===t)&&{badge:"bottomright"},sitekey:a,...p};if(!o){("v3"===t||"v2-invisible"===t)&&"hidden"===p?.badge&&(()=>{const e=document.createElement("style");e.innerHTML=".grecaptcha-badge{display: none !important;}",document.body.appendChild(e)})()}e.ready((async()=>{p.container&&e.render(p.container,r,!!p.inherit),y(e),h&&await h(e),m(!0)}))}}else g&&g()};return window.onGoogleReCaptchaLoad=l,o?l():(({onload:e,appendTo:t="head",isEnterprise:o=!1,host:a,render:r,badge:c,hl:i,...s})=>{const d=n({host:a,isEnterprise:o,render:r,hl:i,badge:c}),l=document.createElement("script");Object.entries(s).forEach((([e,t])=>{l.setAttribute(e,t?.toString()??"")})),l.src=d,l.onload=e,document[t].appendChild(l)})({isEnterprise:s,host:d,...("v3"===t||"v2-invisible"===t)&&p?.badge&&{badge:"hidden"===p?.badge?"bottomright":p?.badge},...r&&{hl:r},render:("v3"===t||"v2-invisible"===t)&&p?.container||"v2-checkbox"===t?"explicit":a,...c,onload:l,id:e}),()=>{b?.reset(),o||(e=>{window.___grecaptcha_cfg=void 0;const t=document.querySelector(`#${e}`);t&&t.remove();const o=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]');o&&o.remove()})(e),"v3"!==t&&"v2-invisible"!==t||p?.container||!p?.badge?(()=>{const e=document.querySelector(".grecaptcha-badge");e&&e.parentNode&&document.body.removeChild(e.parentNode)})():i("google-recaptcha-container")}}),[s,r,d]);const C=e.useCallback((e=>{if(!b?.execute)throw new Error("Google ReCaptcha has not been loaded");return b.execute(a,{action:e})}),[b]),v=e.useCallback((e=>{if(!b?.execute)throw new Error("Google ReCaptcha has not been loaded");return b.execute(e)}),[b]),w=e.useMemo((()=>({googleReCaptcha:b,siteKey:a,isLoading:u,executeV2Invisible:v,executeV3:C,reset:b?.reset,getResponse:b?.getResponse,render:b?.render,...r&&{language:r}})),[a,b,u,r]);return e.createElement(o,{value:w},l)},exports.generateGoogleReCaptchaHiddenBadgeStyles=c,exports.generateGoogleReCaptchaScriptSrc=n,exports.useGoogleReCaptcha=r,exports.withGoogleReCaptcha=t=>{const o=o=>e.createElement(a,null,(a=>e.createElement(t,{...o,googleReCaptcha:a})));return o.displayName=`withGoogleReCaptcha(${t.displayName||t.name||"Component"})`,o};
/* @license react-google-recaptcha-ultimate v1.1.0 */
"use strict";var e=require("./components/GoogleReCaptchaCheckbox.js"),o=require("./context/GoogleReCaptchaProvider.js"),t=require("./context/useGoogleReCaptcha.js"),r=require("./context/withGoogleReCaptcha.js"),a=require("./utils/helpers/generateGoogleReCaptchaHiddenBadgeStyles.js"),s=require("./utils/helpers/generateGoogleReCaptchaScriptSrc.js");require("react"),require("./utils/helpers/removeGoogleReCaptchaContainer.js"),require("./utils/hooks/useIsomorphicLayoutEffect.js"),require("./jsx-runtime-4cf02145.js"),require("./utils/helpers/checkGoogleReCaptchaInjected.js"),require("./utils/helpers/hideGoogleReCaptchaBadge.js"),require("./utils/helpers/injectGoogleReCaptchaScript.js"),require("./utils/helpers/removeGoogleReCaptchaBadge.js"),require("./utils/helpers/removeGoogleReCaptchaScript.js"),require("./context/GoogleReCaptchaContext.js"),exports.GoogleReCaptchaCheckbox=e.GoogleReCaptchaCheckbox,exports.GoogleReCaptchaProvider=o.GoogleReCaptchaProvider,exports.useGoogleReCaptcha=t.useGoogleReCaptcha,exports.withGoogleReCaptcha=r.withGoogleReCaptcha,exports.generateGoogleReCaptchaHiddenBadgeStyles=a.generateGoogleReCaptchaHiddenBadgeStyles,exports.generateGoogleReCaptchaScriptSrc=s.generateGoogleReCaptchaScriptSrc;
//# sourceMappingURL=index.js.map

@@ -1,3 +0,3 @@

/* @license react-google-recaptcha-ultimate v1.0.2 */
import e from"react";import{useGoogleReCaptcha as t}from"../context/useGoogleReCaptcha.js";import{removeGoogleReCaptchaContainer as o}from"../utils/helpers/removeGoogleReCaptchaContainer.js";import{useIsomorphicLayoutEffect as r}from"../utils/hooks/useIsomorphicLayoutEffect.js";const n=({id:n="google-recaptcha-checkbox-container",onChange:a,action:c,language:i,...s})=>{const{siteKey:l,render:u,language:m}=t(),p=e.useRef(null);return r((()=>{if(!u)return;const e=document.createElement("div"),t={sitekey:l,callback:a,...(i??m)&&{hl:i??m},...s};return u(e,c?{...t,action:c}:t),p.current&&p.current.appendChild(e),()=>{o(n)}}),[u,i,a,n,l,s.size,c,s.theme]),e.createElement("div",{id:n,ref:p,...s})};export{n as GoogleReCaptchaCheckbox,n as default};
/* @license react-google-recaptcha-ultimate v1.1.0 */
import e from"react";import{useGoogleReCaptcha as t}from"../context/useGoogleReCaptcha.js";import{removeGoogleReCaptchaContainer as r}from"../utils/helpers/removeGoogleReCaptchaContainer.js";import{useIsomorphicLayoutEffect as n}from"../utils/hooks/useIsomorphicLayoutEffect.js";import{j as o}from"../jsx-runtime-93ea8bed.js";import"../context/GoogleReCaptchaContext.js";function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var c=["id","onChange","action","language"];function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===i(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=function(i){var u=i.id,a=void 0===u?"google-recaptcha-checkbox-container":u,p=i.onChange,s=i.action,b=i.language,m=f(i,c),y=t(),g=y.siteKey,j=y.render,O=y.language,v=e.useRef(null);return n((function(){if(j){var e=document.createElement("div"),t=l(l({sitekey:g,callback:p},(null!=b?b:O)&&{hl:null!=b?b:O}),m);return j(e,s?l(l({},t),{},{action:s}):t),v.current&&v.current.appendChild(e),function(){r(a)}}}),[j,b,p,a,g,m.size,s,m.theme]),o.jsx("div",l({id:a,ref:v},m))};export{p as GoogleReCaptchaCheckbox,p as default};
//# sourceMappingURL=GoogleReCaptchaCheckbox.js.map

@@ -1,3 +0,3 @@

/* @license react-google-recaptcha-ultimate v1.0.2 */
import{createContext as e}from"react";const o=e({googleReCaptcha:{},siteKey:"",language:"",isLoading:!0,executeV3:()=>{throw Error("GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider")},executeV2Invisible:()=>{throw Error("GoogleReCaptchaContext has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider")},reset:()=>{throw Error("GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider")},getResponse:()=>{throw Error("GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider")},render:()=>{throw Error("GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider")}}),{Provider:t,Consumer:a}=o;export{o as GoogleReCaptchaContext,a as GoogleReCaptchaContextConsumer,t as GoogleReCaptchaContextProvider};
/* @license react-google-recaptcha-ultimate v1.1.0 */
import{createContext as e}from"react";var o=e({googleReCaptcha:{},siteKey:"",language:"",isLoading:!0,executeV3:function(){throw Error("GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider")},executeV2Invisible:function(){throw Error("GoogleReCaptchaContext has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider")},reset:function(){throw Error("GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider")},getResponse:function(){throw Error("GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider")},render:function(){throw Error("GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider")}}),t=o.Provider,a=o.Consumer;export{o as GoogleReCaptchaContext,a as GoogleReCaptchaContextConsumer,t as GoogleReCaptchaContextProvider};
//# sourceMappingURL=GoogleReCaptchaContext.js.map

@@ -1,3 +0,3 @@

/* @license react-google-recaptcha-ultimate v1.0.2 */
import e from"react";import{removeGoogleReCaptchaScript as t}from"../utils/helpers/removeGoogleReCaptchaScript.js";import{injectGoogleReCaptchaScript as o}from"../utils/helpers/injectGoogleReCaptchaScript.js";import{hideGoogleReCaptchaBadge as r}from"../utils/helpers/hideGoogleReCaptchaBadge.js";import{removeGoogleReCaptchaBadge as i}from"../utils/helpers/removeGoogleReCaptchaBadge.js";import{removeGoogleReCaptchaContainer as a}from"../utils/helpers/removeGoogleReCaptchaContainer.js";import{checkGoogleReCaptchaInjected as n}from"../utils/helpers/checkGoogleReCaptchaInjected.js";import{GoogleReCaptchaContextProvider as s}from"./GoogleReCaptchaContext.js";const c=({type:c,siteKey:l,language:p,scriptProps:h,isEnterprise:d=!1,host:g,children:v,explicit:u,onLoad:m,onError:b})=>{const[f,C]=e.useState(!0),[w,R]=e.useState();e.useEffect((()=>{if(!l)throw new Error("Google ReCaptcha site key not provided");const e=h?.id??"google-recaptcha-script",s=n(e),v=()=>{const e=d?window.grecaptcha?.enterprise:window.grecaptcha;if(e){if(u||e.ready((async()=>{R(e),m&&await m(e),C(!0)})),u){const t={size:"v3"===c||"v2-invisible"===c?"invisible":"normal",...("v3"===c||"v2-invisible"===c)&&{badge:"bottomright"},sitekey:l,...u};if(!s){("v3"===c||"v2-invisible"===c)&&"hidden"===u?.badge&&r()}e.ready((async()=>{u.container&&e.render(u.container,t,!!u.inherit),R(e),m&&await m(e),C(!0)}))}}else b&&b()};return window.onGoogleReCaptchaLoad=v,s?v():o({isEnterprise:d,host:g,...("v3"===c||"v2-invisible"===c)&&u?.badge&&{badge:"hidden"===u?.badge?"bottomright":u?.badge},...p&&{hl:p},render:("v3"===c||"v2-invisible"===c)&&u?.container||"v2-checkbox"===c?"explicit":l,...h,onload:v,id:e}),()=>{w?.reset(),s||t(e),"v3"!==c&&"v2-invisible"!==c||u?.container||!u?.badge?i():a("google-recaptcha-container")}}),[d,p,g]);const x=e.useCallback((e=>{if(!w?.execute)throw new Error("Google ReCaptcha has not been loaded");return w.execute(l,{action:e})}),[w]),G=e.useCallback((e=>{if(!w?.execute)throw new Error("Google ReCaptcha has not been loaded");return w.execute(e)}),[w]),j=e.useMemo((()=>({googleReCaptcha:w,siteKey:l,isLoading:f,executeV2Invisible:G,executeV3:x,reset:w?.reset,getResponse:w?.getResponse,render:w?.render,...p&&{language:p}})),[l,w,f,p]);return e.createElement(s,{value:j},v)};export{c as GoogleReCaptchaProvider};
/* @license react-google-recaptcha-ultimate v1.1.0 */
import t from"react";import{checkGoogleReCaptchaInjected as e}from"../utils/helpers/checkGoogleReCaptchaInjected.js";import{hideGoogleReCaptchaBadge as r}from"../utils/helpers/hideGoogleReCaptchaBadge.js";import{injectGoogleReCaptchaScript as n}from"../utils/helpers/injectGoogleReCaptchaScript.js";import{removeGoogleReCaptchaBadge as o}from"../utils/helpers/removeGoogleReCaptchaBadge.js";import{removeGoogleReCaptchaContainer as i}from"../utils/helpers/removeGoogleReCaptchaContainer.js";import{removeGoogleReCaptchaScript as a}from"../utils/helpers/removeGoogleReCaptchaScript.js";import{GoogleReCaptchaContextProvider as c}from"./GoogleReCaptchaContext.js";import{j as u}from"../jsx-runtime-93ea8bed.js";import"../utils/helpers/generateGoogleReCaptchaHiddenBadgeStyles.js";import"../utils/helpers/generateGoogleReCaptchaScriptSrc.js";function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==l(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===l(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function p(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */p=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),c=new _(n||[]);return o(a,"_invoke",{value:P(t,r,c)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var v="suspendedStart",y="suspendedYield",d="executing",g="completed",m={};function b(){}function w(){}function j(){}var x={};s(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(N([])));E&&E!==r&&n.call(E,a)&&(x=E);var L=j.prototype=b.prototype=Object.create(x);function S(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function G(t,e){function r(o,i,a,c){var u=h(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==l(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function P(e,r,n){var o=v;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=k(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?g:y,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=g,n.method="throw",n.arg=l.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function R(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(l(e)+" is not iterable")}return w.prototype=j,o(L,"constructor",{value:j,configurable:!0}),o(j,"constructor",{value:w,configurable:!0}),w.displayName=s(j,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,j):(t.__proto__=j,s(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},S(G.prototype),s(G.prototype,c,(function(){return this})),e.AsyncIterator=G,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new G(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(L),s(L,u,"Generator"),s(L,a,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(R),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),R(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;R(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function v(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function y(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){v(i,n,o,a,c,"next",t)}function c(t){v(i,n,o,a,c,"throw",t)}a(void 0)}))}}function d(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return g(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var m=function(l){var s=l.type,h=l.siteKey,v=l.language,g=l.scriptProps,m=l.isEnterprise,b=void 0!==m&&m,w=l.host,j=l.children,x=l.explicit,O=l.onLoad,E=l.onError,L=d(t.useState(!0),2),S=L[0],G=L[1],P=d(t.useState(),2),k=P[0],C=P[1];t.useEffect((function(){var t;if(!h)throw new Error("Google ReCaptcha site key not provided");var c=null!==(t=null==g?void 0:g.id)&&void 0!==t?t:"google-recaptcha-script",u=e(c),l=function(){var t,e=b?null===(t=window.grecaptcha)||void 0===t?void 0:t.enterprise:window.grecaptcha;if(e){if(x||e.ready(y(p().mark((function t(){return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(C(e),!O){t.next=4;break}return t.next=4,O(e);case 4:G(!0);case 5:case"end":return t.stop()}}),t)})))),x){var n=f(f({size:"v3"===s||"v2-invisible"===s?"invisible":"normal"},("v3"===s||"v2-invisible"===s)&&{badge:"bottomright"}),{},{sitekey:h},x);if(!u)("v3"===s||"v2-invisible"===s)&&"hidden"===(null==x?void 0:x.badge)&&r();e.ready(y(p().mark((function t(){return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(x.container&&e.render(x.container,n,!!x.inherit),C(e),!O){t.next=5;break}return t.next=5,O(e);case 5:G(!0);case 6:case"end":return t.stop()}}),t)}))))}}else E&&E()};return window.onGoogleReCaptchaLoad=l,u?l():n(f(f(f(f({isEnterprise:b,host:w},("v3"===s||"v2-invisible"===s)&&(null==x?void 0:x.badge)&&{badge:"hidden"===(null==x?void 0:x.badge)?"bottomright":null==x?void 0:x.badge}),v&&{hl:v}),{},{render:("v3"===s||"v2-invisible"===s)&&null!=x&&x.container||"v2-checkbox"===s?"explicit":h},g),{},{onload:l,id:c})),function(){null==k||k.reset(),u||a(c),"v3"!==s&&"v2-invisible"!==s||null!=x&&x.container||null==x||!x.badge?o():i("google-recaptcha-container")}}),[b,v,w]);var R=t.useCallback((function(t){if(null==k||!k.execute)throw new Error("Google ReCaptcha has not been loaded");return k.execute(h,{action:t})}),[k]),_=t.useCallback((function(t){if(null==k||!k.execute)throw new Error("Google ReCaptcha has not been loaded");return k.execute(t)}),[k]),N=t.useMemo((function(){return f({googleReCaptcha:k,siteKey:h,isLoading:S,executeV2Invisible:_,executeV3:R,reset:null==k?void 0:k.reset,getResponse:null==k?void 0:k.getResponse,render:null==k?void 0:k.render},v&&{language:v})}),[h,k,S,v]);return u.jsx(c,{value:N,children:j})};export{m as GoogleReCaptchaProvider};
//# sourceMappingURL=GoogleReCaptchaProvider.js.map

@@ -1,3 +0,3 @@

/* @license react-google-recaptcha-ultimate v1.0.2 */
import o from"react";import{GoogleReCaptchaContext as t}from"./GoogleReCaptchaContext.js";const e=()=>o.useContext(t);export{e as useGoogleReCaptcha};
/* @license react-google-recaptcha-ultimate v1.1.0 */
import t from"react";import{GoogleReCaptchaContext as o}from"./GoogleReCaptchaContext.js";var r=function(){return t.useContext(o)};export{r as useGoogleReCaptcha};
//# sourceMappingURL=useGoogleReCaptcha.js.map

@@ -1,3 +0,3 @@

/* @license react-google-recaptcha-ultimate v1.0.2 */
import e from"react";import{GoogleReCaptchaContextConsumer as t}from"./GoogleReCaptchaContext.js";const o=o=>{const a=a=>e.createElement(t,null,(t=>e.createElement(o,{...a,googleReCaptcha:t})));return a.displayName=`withGoogleReCaptcha(${o.displayName||o.name||"Component"})`,a};export{o as withGoogleReCaptcha};
/* @license react-google-recaptcha-ultimate v1.1.0 */
import"react";import{GoogleReCaptchaContextConsumer as t}from"./GoogleReCaptchaContext.js";import{j as r}from"../jsx-runtime-93ea8bed.js";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function o(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,o)}return e}function n(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?o(Object(e),!0).forEach((function(r){i(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):o(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}function i(t,r,o){return(r=function(t){var r=function(t,r){if("object"!==e(t)||null===t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var n=o.call(t,r||"default");if("object"!==e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===e(r)?r:String(r)}(r))in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}var c=function(e){var o=function(o){return r.jsx(t,{children:function(t){return r.jsx(e,n(n({},o),{},{googleReCaptcha:t}))}})};return o.displayName="withGoogleReCaptcha(".concat(e.displayName||e.name||"Component",")"),o};export{c as withGoogleReCaptcha};
//# sourceMappingURL=withGoogleReCaptcha.js.map

@@ -1,3 +0,3 @@

/* @license react-google-recaptcha-ultimate v1.0.2 */
export{GoogleReCaptchaCheckbox}from"./components/GoogleReCaptchaCheckbox.js";export{GoogleReCaptchaProvider}from"./context/GoogleReCaptchaProvider.js";export{useGoogleReCaptcha}from"./context/useGoogleReCaptcha.js";export{withGoogleReCaptcha}from"./context/withGoogleReCaptcha.js";export{generateGoogleReCaptchaScriptSrc}from"./utils/helpers/generateGoogleReCaptchaScriptSrc.js";export{generateGoogleReCaptchaHiddenBadgeStyles}from"./utils/helpers/generateGoogleReCaptchaHiddenBadgeStyles.js";
/* @license react-google-recaptcha-ultimate v1.1.0 */
export{GoogleReCaptchaCheckbox}from"./components/GoogleReCaptchaCheckbox.js";export{GoogleReCaptchaProvider}from"./context/GoogleReCaptchaProvider.js";export{useGoogleReCaptcha}from"./context/useGoogleReCaptcha.js";export{withGoogleReCaptcha}from"./context/withGoogleReCaptcha.js";export{generateGoogleReCaptchaHiddenBadgeStyles}from"./utils/helpers/generateGoogleReCaptchaHiddenBadgeStyles.js";export{generateGoogleReCaptchaScriptSrc}from"./utils/helpers/generateGoogleReCaptchaScriptSrc.js";import"react";import"./utils/helpers/removeGoogleReCaptchaContainer.js";import"./utils/hooks/useIsomorphicLayoutEffect.js";import"./jsx-runtime-93ea8bed.js";import"./utils/helpers/checkGoogleReCaptchaInjected.js";import"./utils/helpers/hideGoogleReCaptchaBadge.js";import"./utils/helpers/injectGoogleReCaptchaScript.js";import"./utils/helpers/removeGoogleReCaptchaBadge.js";import"./utils/helpers/removeGoogleReCaptchaScript.js";import"./context/GoogleReCaptchaContext.js";
//# sourceMappingURL=index.js.map

@@ -1,3 +0,3 @@

/* @license react-google-recaptcha-ultimate v1.0.2 */
const c=c=>!!document.querySelector(`#${c}`)||!!document.querySelector('script[src*="/recaptcha/"]:not([src*="gstatic"])');export{c as checkGoogleReCaptchaInjected};
/* @license react-google-recaptcha-ultimate v1.1.0 */
var c=function(c){return!!document.querySelector("#".concat(c))||!!document.querySelector('script[src*="/recaptcha/"]:not([src*="gstatic"])')};export{c as checkGoogleReCaptchaInjected};
//# sourceMappingURL=checkGoogleReCaptchaInjected.js.map

@@ -1,3 +0,3 @@

/* @license react-google-recaptcha-ultimate v1.0.2 */
const a=()=>".grecaptcha-badge{display: none !important;}";export{a as generateGoogleReCaptchaHiddenBadgeStyles};
/* @license react-google-recaptcha-ultimate v1.1.0 */
var a=function(){return".grecaptcha-badge{display: none !important;}"};export{a as generateGoogleReCaptchaHiddenBadgeStyles};
//# sourceMappingURL=generateGoogleReCaptchaHiddenBadgeStyles.js.map

@@ -1,3 +0,3 @@

/* @license react-google-recaptcha-ultimate v1.0.2 */
const e=({host:e="google.com",isEnterprise:r,render:s,hl:a,badge:t})=>`https://www.${e}/recaptcha/${r?"enterprise.js":"api.js"}?${new URLSearchParams({...a&&{hl:a},...t&&{badge:t},render:s})}`;export{e as generateGoogleReCaptchaScriptSrc};
/* @license react-google-recaptcha-ultimate v1.1.0 */
function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},r(e)}function e(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function t(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?e(Object(o),!0).forEach((function(e){n(r,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}function n(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===r(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=function(r){var e=r.host,n=void 0===e?"google.com":e,o=r.isEnterprise,i=r.render,c=r.hl,u=r.badge,a=new URLSearchParams(t(t(t({},c&&{hl:c}),u&&{badge:u}),{},{render:i})),b=o?"enterprise.js":"api.js";return"https://www.".concat(n,"/recaptcha/").concat(b,"?").concat(a)};export{o as generateGoogleReCaptchaScriptSrc};
//# sourceMappingURL=generateGoogleReCaptchaScriptSrc.js.map

@@ -1,3 +0,3 @@

/* @license react-google-recaptcha-ultimate v1.0.2 */
import{generateGoogleReCaptchaHiddenBadgeStyles as e}from"./generateGoogleReCaptchaHiddenBadgeStyles.js";const t=()=>{const t=document.createElement("style");t.innerHTML=e(),document.body.appendChild(t)};export{t as hideGoogleReCaptchaBadge};
/* @license react-google-recaptcha-ultimate v1.1.0 */
import{generateGoogleReCaptchaHiddenBadgeStyles as e}from"./generateGoogleReCaptchaHiddenBadgeStyles.js";var t=function(){var t=document.createElement("style");t.innerHTML=e(),document.body.appendChild(t)};export{t as hideGoogleReCaptchaBadge};
//# sourceMappingURL=hideGoogleReCaptchaBadge.js.map

@@ -1,3 +0,3 @@

/* @license react-google-recaptcha-ultimate v1.0.2 */
import{generateGoogleReCaptchaScriptSrc as e}from"./generateGoogleReCaptchaScriptSrc.js";const t=({onload:t,appendTo:r="head",isEnterprise:o=!1,host:n,render:s,badge:a,hl:c,...d})=>{const i=e({host:n,isEnterprise:o,render:s,hl:c,badge:a}),p=document.createElement("script");Object.entries(d).forEach((([e,t])=>{p.setAttribute(e,t?.toString()??"")})),p.src=i,p.onload=t,document[r].appendChild(p)};export{t as injectGoogleReCaptchaScript};
/* @license react-google-recaptcha-ultimate v1.1.0 */
import{generateGoogleReCaptchaScriptSrc as r}from"./generateGoogleReCaptchaScriptSrc.js";var e=["onload","appendTo","isEnterprise","host","render","badge","hl"];function t(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var n,o,i,l,a=[],u=!0,c=!1;try{if(i=(t=t.call(r)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(n=i.call(t)).done)&&(a.push(n.value),a.length!==e);u=!0);}catch(r){c=!0,o=r}finally{try{if(!u&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(c)throw o}}return a}}(r,e)||function(r,e){if(!r)return;if("string"==typeof r)return n(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);"Object"===t&&r.constructor&&(t=r.constructor.name);if("Map"===t||"Set"===t)return Array.from(r);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return n(r,e)}(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function o(r,e){if(null==r)return{};var t,n,o=function(r,e){if(null==r)return{};var t,n,o={},i=Object.keys(r);for(n=0;n<i.length;n++)t=i[n],e.indexOf(t)>=0||(o[t]=r[t]);return o}(r,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(n=0;n<i.length;n++)t=i[n],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(r,t)&&(o[t]=r[t])}return o}var i=function(n){var i=n.onload,l=n.appendTo,a=void 0===l?"head":l,u=n.isEnterprise,c=void 0!==u&&u,f=n.host,s=n.render,d=n.badge,p=n.hl,y=o(n,e),b=r({host:f,isEnterprise:c,render:s,hl:p,badge:d}),h=document.createElement("script");Object.entries(y).forEach((function(r){var e,n=t(r,2),o=n[0],i=n[1];h.setAttribute(o,null!==(e=null==i?void 0:i.toString())&&void 0!==e?e:"")})),h.src=b,h.onload=i,document[a].appendChild(h)};export{i as injectGoogleReCaptchaScript};
//# sourceMappingURL=injectGoogleReCaptchaScript.js.map

@@ -1,3 +0,3 @@

/* @license react-google-recaptcha-ultimate v1.0.2 */
const e=()=>{const e=document.querySelector(".grecaptcha-badge");e&&e.parentNode&&document.body.removeChild(e.parentNode)};export{e as removeGoogleReCaptchaBadge};
/* @license react-google-recaptcha-ultimate v1.1.0 */
var e=function(){var e=document.querySelector(".grecaptcha-badge");e&&e.parentNode&&document.body.removeChild(e.parentNode)};export{e as removeGoogleReCaptchaBadge};
//# sourceMappingURL=removeGoogleReCaptchaBadge.js.map

@@ -1,3 +0,3 @@

/* @license react-google-recaptcha-ultimate v1.0.2 */
const t=t=>{const e=document.getElementById(t);if(e)for(;e.lastChild;)e.lastChild.remove()};export{t as removeGoogleReCaptchaContainer};
/* @license react-google-recaptcha-ultimate v1.1.0 */
var e=function(e){var t=document.getElementById(e);if(t)for(;t.lastChild;)t.lastChild.remove()};export{e as removeGoogleReCaptchaContainer};
//# sourceMappingURL=removeGoogleReCaptchaContainer.js.map

@@ -1,3 +0,3 @@

/* @license react-google-recaptcha-ultimate v1.0.2 */
const e="https://www.gstatic.com/recaptcha/releases",c=c=>{window.___grecaptcha_cfg=void 0;const t=document.querySelector(`#${c}`);t&&t.remove();const o=document.querySelector(`script[src^="${e}"]`);o&&o.remove()};export{e as GSTATIC_URL,c as removeGoogleReCaptchaScript};
/* @license react-google-recaptcha-ultimate v1.1.0 */
var c="https://www.gstatic.com/recaptcha/releases",e=function(e){window.___grecaptcha_cfg=void 0;var r=document.querySelector("#".concat(e));r&&r.remove();var t=document.querySelector('script[src^="'.concat(c,'"]'));t&&t.remove()};export{c as GSTATIC_URL,e as removeGoogleReCaptchaScript};
//# sourceMappingURL=removeGoogleReCaptchaScript.js.map

@@ -1,3 +0,3 @@

/* @license react-google-recaptcha-ultimate v1.0.2 */
import{useLayoutEffect as o,useEffect as e}from"react";const t="undefined"!=typeof window?o:e;export{t as useIsomorphicLayoutEffect};
/* @license react-google-recaptcha-ultimate v1.1.0 */
import{useLayoutEffect as e,useEffect as o}from"react";var r="undefined"!=typeof window?e:o;export{r as useIsomorphicLayoutEffect};
//# sourceMappingURL=useIsomorphicLayoutEffect.js.map
import React, { ComponentProps } from 'react';
/**
* The function returns hidden styles for google recaptcha badge.
*
* @category Function
* @returns Hidden styles
*/
declare const generateGoogleReCaptchaHiddenBadgeStyles: () => string;
type ContainerId = string;

@@ -62,10 +70,2 @@ type Container = ContainerId | HTMLElement;

/**
* The function returns hidden styles for google recaptcha badge.
*
* @category Function
* @returns Hidden styles
*/
declare const generateGoogleReCaptchaHiddenBadgeStyles: () => string;
interface GoogleReCaptchaCheckboxProps extends Omit<ComponentProps<'div'>, 'onChange'> {

@@ -150,2 +150,2 @@ id?: string;

export { GoogleReCaptchaCheckbox, GoogleReCaptchaProvider, GoogleReCaptchaProviderProps, GoogleReCaptchaV2CheckBoxProviderProps, GoogleReCaptchaV2InvisibleProviderProps, GoogleReCaptchaV3ProviderProps, WithGoogleReCaptchaParams, generateGoogleReCaptchaHiddenBadgeStyles, generateGoogleReCaptchaScriptSrc, useGoogleReCaptcha, withGoogleReCaptcha };
export { GoogleReCaptchaCheckbox, GoogleReCaptchaProvider, type GoogleReCaptchaProviderProps, type GoogleReCaptchaV2CheckBoxProviderProps, type GoogleReCaptchaV2InvisibleProviderProps, type GoogleReCaptchaV3ProviderProps, type WithGoogleReCaptchaParams, generateGoogleReCaptchaHiddenBadgeStyles, generateGoogleReCaptchaScriptSrc, useGoogleReCaptcha, withGoogleReCaptcha };
{
"name": "react-google-recaptcha-ultimate",
"version": "1.0.2",
"version": "1.1.0",
"description": "Tool that easily and quickly add Google ReCaptcha for your website or application\n",

@@ -52,12 +52,15 @@ "author": {

"prepare": "husky install && npm run build",
"lint": "eslint . --ext ts --no-error-on-unmatched-pattern --fix",
"format": "prettier --write **/*.{ts,js}",
"type": "tsc --noEmit",
"pretty": "yarn type && yarn format && yarn lint",
"test": "jest",
"lint": "eslint . --ext ts --ext tsx --no-error-on-unmatched-pattern",
"format": "prettier --write src/**/*.{ts,tsx}",
"pretty": "yarn type && yarn format && yarn lint --fix",
"storybook": "storybook dev -p 6010"
},
"lint-staged": {
"*.js": "yarn format",
"*.ts": "yarn pretty"
"*.js": "prettier --write",
"*.ts": [
"prettier --write",
"eslint --no-error-on-unmatched-pattern --fix"
]
},

@@ -68,44 +71,31 @@ "peerDependencies": {

"devDependencies": {
"@babel/preset-env": "^7.22.9",
"@babel/preset-react": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-node-resolve": "^15.1.0",
"@rollup/plugin-terser": "^0.4.3",
"@rollup/plugin-typescript": "^11.1.1",
"@storybook/addon-actions": "^7.0.27",
"@storybook/addon-essentials": "^7.0.27",
"@storybook/addon-interactions": "^7.0.27",
"@storybook/addon-links": "^7.0.27",
"@storybook/react": "^7.0.27",
"@storybook/react-webpack5": "^7.0.27",
"@storybook/testing-library": "^0.2.0",
"@testing-library/jest-dom": "^5.16.5",
"@babel/preset-env": "^7.22.20",
"@babel/preset-react": "^7.22.15",
"@babel/preset-typescript": "^7.22.15",
"@siberiacancode/builder": "^1.1.0",
"@siberiacancode/eslint": "^1.0.2",
"@siberiacancode/jest": "^1.0.1",
"@siberiacancode/prettier": "^1.0.0",
"@storybook/addon-actions": "^7.4.4",
"@storybook/addon-essentials": "^7.4.4",
"@storybook/addon-interactions": "^7.4.4",
"@storybook/addon-links": "^7.4.4",
"@storybook/react": "^7.4.4",
"@storybook/react-webpack5": "^7.4.4",
"@storybook/testing-library": "^0.2.1",
"@testing-library/jest-dom": "^6.1.3",
"@testing-library/react": "^14.0.0",
"@types/jest": "^29.5.3",
"@types/react": "18.2.9",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"@typescript-eslint/parser": "^5.59.9",
"eslint": "^8.42.0",
"eslint-config-airbnb": "7.0.26^19.0.4",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.7.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.1",
"jest": "^29.6.1",
"jest-environment-jsdom": "^29.6.1",
"lint-staged": "^13.2.2",
"prettier": "^2.8.8",
"@types/jest": "^29.5.5",
"@types/react": "18.2.22",
"husky": "^8.0.3",
"jest-environment-jsdom": "^29.7.0",
"lint-staged": "^14.0.1",
"prettier": "^3.0.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rollup": "^3.24.0",
"rollup-plugin-dts": "^5.3.0",
"rollup-plugin-terser": "^7.0.2",
"shx": "^0.3.4",
"storybook": "^7.0.27",
"storybook": "^7.4.4",
"ts-loader": "^9.4.4",
"typescript": "^5.1.3"
"typescript": "^5.2.2"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc