{"version":3,"file":"RecapchaInput.BSHPeeN7.mjs","names":[],"sources":["https:/framerusercontent.com/modules/Hbc0lxqGSRzFG6uMT9yO/jZfB18ggDrqER5ihmIsa/GoogleMaps.js","https:/framerusercontent.com/modules/LTiDVJjck6SSTlFhMJBt/S0lunmRcGLdLBsRjcuZ3/RecapchaInput.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,motion}from\"framer\";import{containerStyles,useRadius,borderRadiusControl}from\"https://framer.com/m/framer/default-utils.js@^0.45.0\";const coordinatesRegex=/^((?:\\-?|\\+?)?\\d+(?:\\.\\d+)?),\\s*((?:\\-?|\\+?)?\\d+(?:\\.\\d+)?)$/;/**\n * GOOGLE MAPS\n *\n * @framerIntrinsicWidth 600\n * @framerIntrinsicHeight 400\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function GoogleMaps({coordinates,zoom,style,...props}){const borderRadius=useRadius(props);return /*#__PURE__*/_jsx(motion.div,{style:{...style,...containerStyles,overflow:\"hidden\",borderRadius},...props,children:/*#__PURE__*/_jsx(\"iframe\",{style:{height:\"100%\",width:\"100%\",border:0},src:`https://maps.google.com/maps?q=${encodeURIComponent(coordinates)}&z=${zoom}&output=embed`})});}addPropertyControls(GoogleMaps,{coordinates:{type:ControlType.String,title:\"Location\",placeholder:\"Framer B.V.\",defaultValue:\"Framer B.V.\",description:\"The name of the place or its GPS coordinates.\"},zoom:{type:ControlType.Number,step:1,min:0,max:25,title:\"Zoom\",defaultValue:15},...borderRadiusControl});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GoogleMaps\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"400\",\"framerIntrinsicWidth\":\"600\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GoogleMaps.map","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect,useRef,useState}from\"react\";import{HiddenInput}from\"https://framerusercontent.com/modules/DwWOdDzQZGCuvkNlbUjZ/p64C0n6xNEFY9NovSiJw/FramerFormsShared.js\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function RecaptchaInput(props){const[verified,setVerified]=useState(false);if(!props.siteKey){return /*#__PURE__*/_jsx(\"div\",{style:{...props.style},children:/*#__PURE__*/_jsx(InvalideSetupMessage,{})});}return /*#__PURE__*/_jsxs(\"div\",{style:{...props.style},children:[/*#__PURE__*/_jsx(RepatchaContainer,{siteKey:props.siteKey,onVerifiedChange:setVerified}),/*#__PURE__*/_jsx(HiddenInput,{name:\"recaptcha\",required:true,value:verified?\"Yes\":\"\"})]});}RecaptchaInput.displayName=\"reCAPTCHA Input\";addPropertyControls(RecaptchaInput,{siteKey:{type:ControlType.String,title:\"Site Key\",defaultValue:\"\",placeholder:\"Paste your site key here\"}});const RepatchaContainer=props=>{const captchaContainerRef=useRef(null);useEffect(()=>{if(!document.getElementById(\"recaptcha-script\")){const script=document.createElement(\"script\");script.id=\"recaptcha-script\";script.src=\"https://www.google.com/recaptcha/api.js?render=explicit\";script.async=true;script.defer=true;document.body.appendChild(script);}},[]);useEffect(()=>{if(!props.siteKey)return;const interval=setInterval(()=>{const reCaptchaInitialized=!!window.grecaptcha&&window.grecaptcha.render;const captchaContainer=captchaContainerRef.current;if(!captchaContainer)return;if(!reCaptchaInitialized)return;window.grecaptcha.render(captchaContainer,{sitekey:props.siteKey,callback:()=>props.onVerifiedChange(true),\"expired-callback\":()=>props.onVerifiedChange(false)});clearInterval(interval);},500);return()=>clearInterval(interval);},[props.siteKey]);return /*#__PURE__*/_jsx(\"div\",{ref:captchaContainerRef});};const InvalideSetupMessage=()=>{return /*#__PURE__*/_jsx(\"div\",{style:{padding:\"12px\",background:\"#f5f5f5\",color:\"#888\",borderRadius:\"6px\",fontSize:\"14px\",textAlign:\"center\"},children:\"Enter your reCAPTCHA site key in the properties panel\"});};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RecaptchaInput\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RecapchaInput.map"],"mappings":"koBAQG,SAAwB,EAAW,CAAC,cAAY,OAAK,QAAM,GAAG,EAAM,CAAC,CAAC,IAAM,EAAa,EAAU,EAAM,CAAC,MAAoB,GAAK,EAAO,IAAI,CAAC,MAAM,CAAC,GAAG,EAAM,GAAG,EAAgB,SAAS,SAAS,cAAa,EAAC,GAAG,EAAM,SAAsB,EAAK,SAAS,CAAC,MAAM,CAAC,OAAO,OAAO,MAAM,OAAO,OAAO,CAAE,EAAC,KAAK,iCAAiC,mBAAmB,EAAY,CAAC,KAAK,EAAK,cAAe,EAAC,AAAC,EAAC,AAAE,cAAA,AARnZ,GAA2C,IAA2D,IAAgH,CAQ6L,EAAoB,EAAW,CAAC,YAAY,CAAC,KAAK,EAAY,OAAO,MAAM,WAAW,YAAY,cAAc,aAAa,cAAc,YAAY,+CAAgD,EAAC,KAAK,CAAC,KAAK,EAAY,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,GAAG,MAAM,OAAO,aAAa,EAAG,EAAC,GAAG,CAAoB,EAAC,GCLhsB,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,EAAS,EAAY,CAAC,GAAS,EAAM,CAAkI,OAA7H,EAAM,QAA2I,EAAM,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,KAAM,EAAC,SAAS,CAAc,EAAK,EAAkB,CAAC,QAAQ,EAAM,QAAQ,iBAAiB,CAAY,EAAC,CAAc,EAAK,EAAY,CAAC,KAAK,YAAY,UAA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