{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/TbMjFwrsAA7NHbGcrRbU/LgyCsEhOEb4LdsTuxHlJ/typeformEmbed.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useEffect}from\"react\";import ReactDOM from\"react-dom\";export default function TypeformModalPopup(props){const[isOpen,setIsOpen]=useState(false)// Track whether the modal is open\n;const[iframeSrc,setIframeSrc]=useState(\"\")// Dynamically set iframeSrc on the client side\n;useEffect(()=>{// Ensure this runs only on the client side\nif(typeof window!==\"undefined\"){const queryParams=new URLSearchParams(window.location.search);// Extract the current page's slug from the URL safely\nconst urlPath=window?.location?.pathname||\"\"// Fallback to empty string\n;const slug=urlPath.split(\"/\").filter(Boolean).pop()||\"Home\"// Get the last part of the path or default to \"Home\"\n;const hiddenFields={utm_source:queryParams.get(\"utm_source\")||\"\",utm_medium:queryParams.get(\"utm_medium\")||\"\",utm_campaign:queryParams.get(\"utm_campaign\")||\"\",utm_term:queryParams.get(\"utm_term\")||\"\",utm_content:queryParams.get(\"utm_content\")||\"\",gclid:queryParams.get(\"gclid\")||\"\",hubspot_page_name:slug};// Construct the iframeSrc dynamically with hidden fields\nsetIframeSrc(`https://form.typeform.com/to/vIFnng2u?${new URLSearchParams(hiddenFields).toString()}`);}},[])// Runs only once after the component mounts\n;// Lock or unlock body scroll when the modal is open/closed\nuseEffect(()=>{if(isOpen){document.body.style.overflow=\"hidden\"// Prevent scrolling\n;}else{document.body.style.overflow=\"auto\"// Restore scrolling\n;}},[isOpen]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs(\"button\",{onClick:()=>setIsOpen(true),style:{all:\"unset\",fontFamily:\"inter,sans-serif\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",width:\"100%\",height:\"68px\",cursor:\"pointer\",margin:\"auto\",backgroundImage:\"linear-gradient(90deg, rgb(138, 255, 216) 0%, rgb(246, 245, 84) 100%)\",color:\"#1D1D20\",fontSize:\"20px\",fontWeight:\"400\",lineHeight:\"68px\",textAlign:\"center\",textDecoration:\"none\"},children:[props.text,/*#__PURE__*/_jsx(\"span\",{style:{paddingRight:\"12px\"}}),/*#__PURE__*/_jsxs(\"svg\",{width:\"24\",height:\"24\",viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"M2.75 12H19.25\",stroke:\"#1D1D20\",strokeWidth:\"1.5\",strokeLinecap:\"square\",strokeLinejoin:\"round\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M13.5 5.25L20.25 12L13.5 18.75\",stroke:\"#1D1D20\",strokeWidth:\"1.5\",strokeLinecap:\"square\",strokeLinejoin:\"square\"})]})]}),isOpen&&/*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/_jsxs(\"div\",{style:containerStyle,children:[iframeSrc&&/*#__PURE__*/_jsx(\"iframe\",{src:iframeSrc,style:iframeStyle,frameBorder:\"0\",allow:\"fullscreen\"// Enables fullscreen capabilities\n}),/*#__PURE__*/_jsx(\"button\",{onClick:()=>setIsOpen(false),style:{position:\"absolute\",top:\"20px\",right:\"20px\",backgroundColor:\"#ff4d4d\",color:\"#fff\",border:\"none\",borderRadius:\"5px\",padding:\"10px 15px\",cursor:\"pointer\",zIndex:1e4},children:\"Close\"})]}),document.body// Render modal at the top level of the DOM\n)]});}// Styles for the modal container\nconst containerStyle={position:\"fixed\",top:0,left:0,width:\"100vw\",height:\"100vh\",zIndex:9999,display:\"flex\",justifyContent:\"center\",alignItems:\"center\",backgroundColor:\"rgba(0, 0, 0, 0.5)\"};// Styles for the iframe\nconst iframeStyle={position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",border:\"none\",borderRadius:\"0px\"};TypeformModalPopup.defaultProps={text:\"Request a Demo\"};addPropertyControls(TypeformModalPopup,{text:{type:ControlType.String,title:\"Button Text\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TypeformModalPopup\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./typeformEmbed.map"],
  "mappings": "qKAAwN,SAARA,EAAoCC,EAAM,CAAC,GAAK,CAACC,EAAOC,CAAS,EAAEC,EAAS,EAAK,EAC3R,CAACC,EAAUC,CAAY,EAAEF,EAAS,EAAE,EACzC,OAAAG,EAAU,IAAI,CACf,GAAG,OAAOC,EAAS,IAAY,CAAC,IAAMC,EAAY,IAAI,gBAAgBD,EAAO,SAAS,MAAM,EAErFE,GADOF,GAAQ,UAAU,UAAU,IACtB,MAAM,GAAG,EAAE,OAAO,OAAO,EAAE,IAAI,GAAG,OAC/CG,EAAa,CAAC,WAAWF,EAAY,IAAI,YAAY,GAAG,GAAG,WAAWA,EAAY,IAAI,YAAY,GAAG,GAAG,aAAaA,EAAY,IAAI,cAAc,GAAG,GAAG,SAASA,EAAY,IAAI,UAAU,GAAG,GAAG,YAAYA,EAAY,IAAI,aAAa,GAAG,GAAG,MAAMA,EAAY,IAAI,OAAO,GAAG,GAAG,kBAAkBC,CAAI,EACjTJ,EAAa,yCAAyC,IAAI,gBAAgBK,CAAY,EAAE,SAAS,CAAC,EAAE,CAAE,CAAC,EAAE,CAAC,CAAC,EAE3GJ,EAAU,IAAI,CAAIL,EAAQ,SAAS,KAAK,MAAM,SAAS,SAChD,SAAS,KAAK,MAAM,SAAS,MAClC,EAAE,CAACA,CAAM,CAAC,EAAsBU,EAAMC,EAAU,CAAC,SAAS,CAAcD,EAAM,SAAS,CAAC,QAAQ,IAAIT,EAAU,EAAI,EAAE,MAAM,CAAC,IAAI,QAAQ,WAAW,mBAAmB,QAAQ,OAAO,eAAe,SAAS,WAAW,SAAS,MAAM,OAAO,OAAO,OAAO,OAAO,UAAU,OAAO,OAAO,gBAAgB,wEAAwE,MAAM,UAA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CAAC,KAAK,CAAC,KAAKmB,EAAY,OAAO,MAAM,aAAa,CAAC,CAAC",
  "names": ["TypeformModalPopup", "props", "isOpen", "setIsOpen", "ye", "iframeSrc", "setIframeSrc", "ue", "window", "queryParams", "slug", "hiddenFields", "u", "l", "p", "Ha", "containerStyle", "iframeStyle", "addPropertyControls", "ControlType"]
}
