{"version":3,"file":"CustomHubspotMeetingForm.CDbDwxEB.mjs","names":[],"sources":["https:/framerusercontent.com/modules/FtxzWERKKoyfwlQWZe4g/LuTe0zlWE0TpXqGrk97V/CustomHubspotMeetingForm.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect}from\"react\";/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/components/auto-sizing\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function CustomHubspotMeetingForm(props){const meetingIdentifier=\"custom-meeting-\"+Math.random().toString(36).substring(7);useEffect(()=>{injectHubspotStyle();injectHubspotMeetingScript(()=>{// The component initializes any div with a class \".meetings-iframe-container\"\n// and data-src for the iframe by default\n// This is a workaround for the embedded forms, where the script is loaded\n// before the HTML container\nif(window.hbspt&&window.hbspt.meetings){const element=document.querySelector(`.${meetingIdentifier}`);// Check if the element is present and hasn't been initialized yet\nif(element&&!element.firstChild){window.hbspt.meetings.create(`.${meetingIdentifier}`);}}});},[]);return /*#__PURE__*/_jsx(\"div\",{className:`meetings-iframe-container custom-hubspot-meeting-form ${meetingIdentifier}`,\"data-src\":`${props.meetingUrl}?embed=true`});}const injectHubspotMeetingScript=callback=>{const SCRIPT_ID=\"custom-hubspot-meeting-script\";const scriptAlreadyLoaded=document.getElementById(SCRIPT_ID);if(scriptAlreadyLoaded){callback();}else{const script=document.createElement(\"script\");script.src=\"https://static.hsappstatic.net/MeetingsEmbed/ex/MeetingsEmbedCode.js\";script.id=SCRIPT_ID;document.body.appendChild(script);script.onload=callback;}};const injectHubspotStyle=()=>{const styling=`\n        .meetings-iframe-container iframe {\n            height: 720px !important;\n        }\n    `;const style=document.createElement(\"style\");style.innerHTML=styling;document.head.appendChild(style);};addPropertyControls(CustomHubspotMeetingForm,{meetingUrl:{type:ControlType.String,title:\"Hubspot Meeting URL\",defaultValue:\"https://meetings.hubspot.com/tomuxdi/speak-to-an-advisor-generic-\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CustomHubspotMeetingForm\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CustomHubspotMeetingForm.map"],"mappings":"wLAMG,SAAwB,EAAyB,EAAM,CAAC,IAAM,EAAkB,kBAAkB,KAAK,QAAQ,CAAC,SAAS,GAAG,CAAC,UAAU,EAAE,CAK1C,OAL2C,MAAc,CAAC,GAAoB,CAAC,MAA+B,CAIhN,GAAG,EAAO,OAAO,EAAO,MAAM,SAAS,CAAC,IAAM,EAAQ,SAAS,cAAc,IAAI,IAAoB,CAClG,GAAS,CAAC,EAAQ,YAAY,EAAO,MAAM,SAAS,OAAO,IAAI,IAAoB,GAAK,EAAG,EAAE,CAAC,CAAqB,EAAK,MAAM,CAAC,UAAU,yDAAyD,IAAoB,WAAW,GAAG,EAAM,WAAW,aAAa,CAAC,0BAX3N,IAAoD,IAA6B,CAWkJ,EAA2B,GAAU,CAAC,IAAM,EAAU,gCAA6F,GAAnC,SAAS,eAAe,EAAU,CAAyB,GAAU,KAAM,CAAC,IAAM,EAAO,SAAS,cAAc,SAAS,CAAC,EAAO,IAAI,uEAAuE,EAAO,GAAG,EAAU,SAAS,KAAK,YAAY,EAAO,CAAC,EAAO,OAAO,IAAkB,MAAuB,CAAC,IAI5qB,EAAM,SAAS,cAAc,QAAQ,CAAC,EAAM,UAAU;;;;MAAQ,SAAS,KAAK,YAAY,EAAM,EAAG,EAAoB,EAAyB,CAAC,WAAW,CAAC,KAAK,EAAY,OAAO,MAAM,sBAAsB,aAAa,oEAAoE,CAAC,CAAC"}